@scaleflex/widget-explorer 4.4.0 → 4.5.1
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.
- package/CHANGELOG.md +22 -0
- package/README.md +21 -3
- package/dist/style.css +2197 -0
- package/dist/style.min.css +1 -0
- package/lib/Explorer.styled.js +48 -0
- package/lib/components/ActionBar/ActionBar.styled.js +103 -0
- package/lib/components/ActionBar/DownloadWithExportButton.js +231 -0
- package/lib/components/ActionBar/SelectionMenu.js +111 -0
- package/lib/components/ActionBar/index.js +105 -0
- package/lib/components/AddFilesPanel/AddFiles.js +183 -0
- package/lib/components/AddFilesPanel/AddFiles.styled.js +137 -0
- package/lib/components/AddFilesPanel/index.js +59 -0
- package/lib/components/AiSwitcher/AiSwitcher.constants.js +1 -0
- package/lib/components/AiSwitcher/AiSwitcher.styled.js +24 -0
- package/lib/components/AiSwitcher/index.js +81 -0
- package/lib/components/AssetsList/AssetsList.styled.js +217 -0
- package/lib/components/AssetsList/GridView/FilesAccordion.js +76 -0
- package/lib/components/AssetsList/GridView/FilesSection/FileCell.js +260 -0
- package/lib/components/AssetsList/GridView/FilesSection/FileOverlayOptions.js +140 -0
- package/lib/components/AssetsList/GridView/FilesSection/FilesSection.styled.js +15 -0
- package/lib/components/AssetsList/GridView/FilesSection/index.js +31 -0
- package/lib/components/AssetsList/GridView/FilesSkeleton.js +47 -0
- package/lib/components/AssetsList/GridView/FoldersSection/FolderCell.js +239 -0
- package/lib/components/AssetsList/GridView/FoldersSection/FolderPreviewGrid.js +106 -0
- package/lib/components/AssetsList/GridView/FoldersSection/FolderTopOptions.js +70 -0
- package/lib/components/AssetsList/GridView/FoldersSection/index.js +23 -0
- package/lib/components/AssetsList/GridView/FoldersSkeleton.js +77 -0
- package/lib/components/AssetsList/GridView/GridView.styled.js +11 -0
- package/lib/components/AssetsList/GridView/SearchGridView/SearchGridView.styled.js +15 -0
- package/lib/components/AssetsList/GridView/SearchGridView/SearchGridViewSkeleton.js +30 -0
- package/lib/components/AssetsList/GridView/SearchGridView/index.js +97 -0
- package/lib/components/AssetsList/GridView/index.js +196 -0
- package/lib/components/AssetsList/ListView/AssetsSection/AssetsSectionTableHeader.js +152 -0
- package/lib/components/AssetsList/ListView/AssetsSection/AssetsSectionTableRow.js +333 -0
- package/lib/components/AssetsList/ListView/AssetsSection/index.js +99 -0
- package/lib/components/AssetsList/ListView/ColumnsMenu.js +89 -0
- package/lib/components/AssetsList/ListView/FilesAccordion.js +74 -0
- package/lib/components/AssetsList/ListView/FilesSkeleton.js +68 -0
- package/lib/components/AssetsList/ListView/FoldersSection/FoldersSectionTableHeader.js +98 -0
- package/lib/components/AssetsList/ListView/FoldersSection/FoldersSectionTableRow.js +156 -0
- package/lib/components/AssetsList/ListView/FoldersSection/index.js +54 -0
- package/lib/components/AssetsList/ListView/FoldersSkeleton.js +67 -0
- package/lib/components/AssetsList/ListView/ListView.styled.js +181 -0
- package/lib/components/AssetsList/ListView/ListView.utils.js +30 -0
- package/lib/components/AssetsList/ListView/SearchListView/index.js +109 -0
- package/lib/components/AssetsList/ListView/index.js +203 -0
- package/lib/components/AssetsList/ScrollToTop.js +70 -0
- package/lib/components/AssetsList/SearchView.hook.js +241 -0
- package/lib/components/AssetsList/__SearchTestPannel.js +238 -0
- package/lib/components/AssetsList/__SearchTestPannel.mock.js +1 -0
- package/lib/components/AssetsList/index.js +266 -0
- package/lib/components/AssetsList/relevanceBadge.js +15 -0
- package/lib/components/AssetsView/AssetsView.styled.js +25 -0
- package/lib/components/AssetsView/AssetsView.thunks.js +64 -0
- package/lib/components/AssetsView/index.js +142 -0
- package/lib/components/AuthExplorerView.js +79 -0
- package/lib/components/Breadcrumbs/BreadCrumbViews/BreadCrumbsViews.styled.js +30 -0
- package/lib/components/Breadcrumbs/BreadCrumbViews/index.js +32 -0
- package/lib/components/Breadcrumbs/Breadcrumb.js +52 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.styled.js +81 -0
- package/lib/components/Breadcrumbs/BreadcrumbsSkeleton.js +12 -0
- package/lib/components/Breadcrumbs/index.js +295 -0
- package/lib/components/BulkEditPanel/BulkEdit.js +330 -0
- package/lib/components/BulkEditPanel/BulkEditPanel.styled.js +62 -0
- package/lib/components/BulkEditPanel/BulkEditPanel.utils.js +55 -0
- package/lib/components/BulkEditPanel/components/AssetsList/AssetsList.constants.js +29 -0
- package/lib/components/BulkEditPanel/components/AssetsList/AssetsList.js +148 -0
- package/lib/components/BulkEditPanel/components/AssetsList/AssetsList.styled.js +81 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/Columns.styled.js +99 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/FileMetadataField.js +263 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/FileTagField.js +228 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/FileTextField.js +107 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/MetadataColumn.js +142 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/TableRow.js +139 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/TagsColumn.js +58 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/TagsField.js +80 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/TextColumn.js +53 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/columns.utils.js +272 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/getActiveColumn.js +23 -0
- package/lib/components/BulkEditPanel/components/AssetsList/FloatyPreview.js +55 -0
- package/lib/components/BulkEditPanel/components/AssetsList/FloatyPreview.styled.js +21 -0
- package/lib/components/BulkEditPanel/components/AssetsList/TableBody.js +64 -0
- package/lib/components/BulkEditPanel/components/AssetsList/TableHeader.js +67 -0
- package/lib/components/BulkEditPanel/components/BulkEditFooter.js +33 -0
- package/lib/components/BulkEditPanel/components/ConfirmationModal/ConfirmationModal.js +47 -0
- package/lib/components/BulkEditPanel/components/ConfirmationModal/ConfirmationModal.styled.js +25 -0
- package/lib/components/BulkEditPanel/components/MainContent/MainContent.js +110 -0
- package/lib/components/BulkEditPanel/components/MainContent/MainContent.styled.js +12 -0
- package/lib/components/BulkEditPanel/components/MainContent/index.js +2 -0
- package/lib/components/BulkEditPanel/components/Sidebar/Sidebar.styled.js +53 -0
- package/lib/components/BulkEditPanel/components/Sidebar/Sidebar.utils.js +28 -0
- package/lib/components/BulkEditPanel/components/Sidebar/index.js +158 -0
- package/lib/components/BulkEditPanel/components/Tabs/Metadata/Metadata.js +246 -0
- package/lib/components/BulkEditPanel/components/Tabs/Metadata/Metadata.styled.js +17 -0
- package/lib/components/BulkEditPanel/components/Tabs/Tags/Tags.js +222 -0
- package/lib/components/BulkEditPanel/components/Tabs/Tags/Tags.mixin.js +20 -0
- package/lib/components/BulkEditPanel/components/Tabs/Tags/Tags.styled.js +123 -0
- package/lib/components/BulkEditPanel/components/Tabs/Tags/TagsContianer.js +31 -0
- package/lib/components/BulkEditPanel/components/Tabs/Tags/TagsPaper.js +95 -0
- package/lib/components/BulkEditPanel/components/Tabs/Text/Text.js +167 -0
- package/lib/components/BulkEditPanel/components/Tabs/Text/Text.styled.js +15 -0
- package/lib/components/BulkEditPanel/components/Tabs/tabs.constants.js +113 -0
- package/lib/components/BulkEditPanel/components/Tabs/tabs.js +43 -0
- package/lib/components/BulkEditPanel/components/Tabs/tabs.utils.js +239 -0
- package/lib/components/BulkEditPanel/index.js +28 -0
- package/lib/components/CollectionsView/CollectionFolderIcon.js +35 -0
- package/lib/components/CollectionsView/CollectionVirtualFoldersTree/CollectionTreeSkeletion.js +26 -0
- package/lib/components/CollectionsView/CollectionVirtualFoldersTree/CollectionVirtualFoldersTree.styled.js +52 -0
- package/lib/components/CollectionsView/CollectionVirtualFoldersTree/CollectionVirtualFoldersTree.utils.js +24 -0
- package/lib/components/CollectionsView/CollectionVirtualFoldersTree/Folder.js +88 -0
- package/lib/components/CollectionsView/CollectionVirtualFoldersTree/Tree.js +50 -0
- package/lib/components/CollectionsView/CollectionVirtualFoldersTree/index.js +75 -0
- package/lib/components/CollectionsView/CollectionsSkeleton.js +30 -0
- package/lib/components/CollectionsView/CollectionsTree/ActiveCollectionContent.js +61 -0
- package/lib/components/CollectionsView/CollectionsTree/CollectionTreeItem.js +44 -0
- package/lib/components/CollectionsView/CollectionsTree/CollectionsContent.js +130 -0
- package/lib/components/CollectionsView/CollectionsTree/CollectionsTree.styled.js +84 -0
- package/lib/components/CollectionsView/CollectionsTree/index.js +47 -0
- package/lib/components/CollectionsView/CollectionsView.styled.js +38 -0
- package/lib/components/CollectionsView/VirtualFoldersGrid.js +67 -0
- package/lib/components/CollectionsView/index.js +188 -0
- package/lib/components/ContextMenu/BeforeUploadMenu/index.js +51 -0
- package/lib/components/ContextMenu/ContextMenu.constants.js +64 -0
- package/lib/components/ContextMenu/ContextMenu.hooks.js +35 -0
- package/lib/components/ContextMenu/ContextMenu.styled.js +107 -0
- package/lib/components/ContextMenu/ContextMenuContent.js +202 -0
- package/lib/components/ContextMenu/ContextMenuItem.js +142 -0
- package/lib/components/ContextMenu/FileMenu/CollaborateSection/index.js +33 -0
- package/lib/components/ContextMenu/FileMenu/DeleteSection/index.js +25 -0
- package/lib/components/ContextMenu/FileMenu/EditSection/index.js +42 -0
- package/lib/components/ContextMenu/FileMenu/FindSection/index.js +29 -0
- package/lib/components/ContextMenu/FileMenu/index.js +15 -0
- package/lib/components/ContextMenu/FolderMenu/CollaborateSection/index.js +17 -0
- package/lib/components/ContextMenu/FolderMenu/DeleteSection/index.js +41 -0
- package/lib/components/ContextMenu/FolderMenu/EditSection/index.js +49 -0
- package/lib/components/ContextMenu/FolderMenu/FindSection/index.js +49 -0
- package/lib/components/ContextMenu/FolderMenu/FolderMenu.utils.js +31 -0
- package/lib/components/ContextMenu/FolderMenu/index.js +14 -0
- package/lib/components/ContextMenu/MenuOptions/AddVariationOption.js +59 -0
- package/lib/components/ContextMenu/MenuOptions/BulkEditOption.js +47 -0
- package/lib/components/ContextMenu/MenuOptions/CdnLinkOption.js +54 -0
- package/lib/components/ContextMenu/MenuOptions/DeleteOption.js +70 -0
- package/lib/components/ContextMenu/MenuOptions/DownloadOption.js +88 -0
- package/lib/components/ContextMenu/MenuOptions/EditImageOption.js +63 -0
- package/lib/components/ContextMenu/MenuOptions/EditVideoOption.js +87 -0
- package/lib/components/ContextMenu/MenuOptions/LocateFileOption.js +45 -0
- package/lib/components/ContextMenu/MenuOptions/ManagaAccessOption.js +67 -0
- package/lib/components/ContextMenu/MenuOptions/ManageDetailsOption.js +52 -0
- package/lib/components/ContextMenu/MenuOptions/MoveOption.js +54 -0
- package/lib/components/ContextMenu/MenuOptions/PreviewOption.js +35 -0
- package/lib/components/ContextMenu/MenuOptions/RenameOption.js +66 -0
- package/lib/components/ContextMenu/MenuOptions/TransformationOption.js +63 -0
- package/lib/components/ContextMenu/MultipleMenu/CollaborateSection/index.js +31 -0
- package/lib/components/ContextMenu/MultipleMenu/DeleteSection/index.js +6 -0
- package/lib/components/ContextMenu/MultipleMenu/EditSection/index.js +14 -0
- package/lib/components/ContextMenu/MultipleMenu/FindSection/index.js +14 -0
- package/lib/components/ContextMenu/MultipleMenu/index.js +14 -0
- package/lib/components/ContextMenu/SharedMenus/DownloadFolderSubMenu.js +36 -0
- package/lib/components/ContextMenu/SharedMenus/DownloadSubMenu.js +70 -0
- package/lib/components/ContextMenu/index.js +34 -0
- package/lib/components/ContextMenu/utils/calculateMenuHeight.js +20 -0
- package/lib/components/ContextMenu/utils/calculateMenuPosition.js +42 -0
- package/lib/components/ContextMenu/utils/createSeparator.js +14 -0
- package/lib/components/ContextMenu/utils/editMedia.js +17 -0
- package/lib/components/ContextMenu/utils/getFileLocation.js +8 -0
- package/lib/components/ContextMenu/utils/getFilteredOptions.js +20 -0
- package/lib/components/ContextMenu/utils/getProperFolderSelections.js +7 -0
- package/lib/components/ContextMenu/utils/isEmptyFolderSelection.js +5 -0
- package/lib/components/ContextMenu/utils/isFileContextMenu.js +5 -0
- package/lib/components/ContextMenu/utils/isFirstFileVisibilityPublic.js +9 -0
- package/lib/components/ContextMenu/utils/isMenuItemVisible.js +5 -0
- package/lib/components/ContextMenu/utils/isMixedFiles.js +9 -0
- package/lib/components/ContextMenu/utils/isMultipleSelection.js +6 -0
- package/lib/components/ContextMenu/utils/isSeparatorHidden.js +7 -0
- package/lib/components/ContextMenu/utils/triggerDownload.js +45 -0
- package/lib/components/CropPanel/CropOptions.js +155 -0
- package/lib/components/CropPanel/CropPanel.constants.js +44 -0
- package/lib/components/CropPanel/CropPanel.styled.js +107 -0
- package/lib/components/CropPanel/CropPanel.utils.js +48 -0
- package/lib/components/CropPanel/CropPanelContent.js +209 -0
- package/lib/components/CropPanel/ImageOptions.js +326 -0
- package/lib/components/CropPanel/ImageResize.js +207 -0
- package/lib/components/CropPanel/Option.js +113 -0
- package/lib/components/CropPanel/index.js +22 -0
- package/lib/components/Details/Details.constants.js +76 -0
- package/lib/components/Details/Details.utils.js +232 -0
- package/lib/components/Details/DetailsSideBar.styled.js +139 -0
- package/lib/components/Details/EditActionButtons/EditActionButtons.styled.js +27 -0
- package/lib/components/Details/EditActionButtons/index.js +38 -0
- package/lib/components/Details/FileDetails.js +31 -0
- package/lib/components/Details/FileItem/CustomMetadataTab.js +50 -0
- package/lib/components/Details/FileItem/FileItem.styled.js +47 -0
- package/lib/components/Details/FileItem/GeneralTab.js +113 -0
- package/lib/components/Details/FileItem/SharedFileEditData.js +97 -0
- package/lib/components/Details/FileItem/index.js +2 -0
- package/lib/components/Details/FolderDetails.js +138 -0
- package/lib/components/Details/FolderItemList/FolderListItem.js +77 -0
- package/lib/components/Details/FolderItemList/index.js +62 -0
- package/lib/components/Details/MultiItemsDetails.js +69 -0
- package/lib/components/Details/MultipleItems.js +71 -0
- package/lib/components/Details/TabChips.js +51 -0
- package/lib/components/Details/TabPanels.js +42 -0
- package/lib/components/Details/Title.js +52 -0
- package/lib/components/Details/index.js +53 -0
- package/lib/components/DnD/Dnd.styled.js +11 -0
- package/lib/components/DnD/DragImage.js +61 -0
- package/lib/components/DnD/index.js +219 -0
- package/lib/components/Drawer/Drawer.styled.js +45 -0
- package/lib/components/Drawer/Drawer.utils.js +163 -0
- package/lib/components/Drawer/Resizer.js +141 -0
- package/lib/components/Drawer/ResizerCore.js +213 -0
- package/lib/components/Drawer/index.js +68 -0
- package/lib/components/EmptyViewPlaceholder/EmptyViewPlaceholder.styled.js +39 -0
- package/lib/components/EmptyViewPlaceholder/index.js +58 -0
- package/lib/components/ExploreView.js +46 -0
- package/lib/components/ExplorerUI.js +17 -0
- package/lib/components/ExplorerWrapper.js +114 -0
- package/lib/components/FacetedSearch/DrawerBody/index.js +42 -0
- package/lib/components/FacetedSearch/DrawerWrapper/index.js +83 -0
- package/lib/components/FacetedSearch/FacetedSearch.constants.js +27 -0
- package/lib/components/FacetedSearch/FacetedSearch.styled.js +101 -0
- package/lib/components/FacetedSearch/FacetedSearch.utils.js +3 -0
- package/lib/components/FacetedSearch/Field/Date.js +69 -0
- package/lib/components/FacetedSearch/Field/Placeholder.js +20 -0
- package/lib/components/FacetedSearch/Field/Select.js +136 -0
- package/lib/components/FacetedSearch/Field/Switch.js +59 -0
- package/lib/components/FacetedSearch/Field/index.js +27 -0
- package/lib/components/FacetedSearch/GroupWrapper/index.js +129 -0
- package/lib/components/FacetedSearch/StaticFields/Date.js +152 -0
- package/lib/components/FacetedSearch/index.js +12 -0
- package/lib/components/FileItem/FileInfo/FileInfo.styled.js +126 -0
- package/lib/components/FileItem/FileInfo/FileInfo.utils.js +13 -0
- package/lib/components/FileItem/FileInfo/FileMetadata.js +37 -0
- package/lib/components/FileItem/FileInfo/FileName.js +197 -0
- package/lib/components/FileItem/FileInfo/index.js +200 -0
- package/lib/components/FileItem/FileItem.mixin.js +22 -0
- package/lib/components/FileItem/FileItem.styled.js +54 -0
- package/lib/components/FileItem/FileUploadTopOptions.js +87 -0
- package/lib/components/FileItem/PreUploadFileThumbnail/FileThumbnail.js +61 -0
- package/lib/components/FileItem/PreUploadFileThumbnail/PreUploadFileThumbnail.styled.js +8 -0
- package/lib/components/FileItem/PreUploadFileThumbnail/index.js +27 -0
- package/lib/components/FileItem/index.js +164 -0
- package/lib/components/FileWindowPanel/Body/ActionButtons.js +70 -0
- package/lib/components/FileWindowPanel/Body/Body.constants.js +5 -0
- package/lib/components/FileWindowPanel/Body/Body.styled.js +196 -0
- package/lib/components/FileWindowPanel/Body/BodyFile.js +165 -0
- package/lib/components/FileWindowPanel/Body/Footer.js +60 -0
- package/lib/components/FileWindowPanel/Body/Preview.js +232 -0
- package/lib/components/FileWindowPanel/Body/PreviewPlaceholder.js +20 -0
- package/lib/components/FileWindowPanel/Body/VideoEmbed.js +80 -0
- package/lib/components/FileWindowPanel/Body/index.js +108 -0
- package/lib/components/FileWindowPanel/FileTabs/FileTabButtons.js +98 -0
- package/lib/components/FileWindowPanel/FileTabs/FileTabs.constants.js +50 -0
- package/lib/components/FileWindowPanel/FileTabs/FileTabs.styled.js +99 -0
- package/lib/components/FileWindowPanel/FileTabs/FileTabsList.js +91 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/EditableField.js +78 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldLabel.js +40 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldRow.js +57 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldValue.js +20 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldWithTooltip.js +29 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralSection.js +183 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralTab.constants.js +2 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralTab.styled.js +112 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralTabSkeleton.js +70 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/TableSeparator.js +10 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/index.js +100 -0
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/CustomMetadataSection.js +247 -0
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/EmbeddedMetadataSection.js +31 -0
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/MetadataTab.constants.js +2 -0
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/MetadataTab.styled.js +134 -0
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/MetadataTabSkeleton.js +70 -0
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/index.js +181 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationItem.js +78 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.constants.js +26 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.styled.js +177 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.thunks.js +99 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.utils.js +23 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsContent.js +92 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsEditModalContent.js +57 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsSearch.js +44 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsSkeleton.js +35 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTabNavigator.js +35 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTabs.js +40 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTopOptions.js +204 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/index.js +606 -0
- package/lib/components/FileWindowPanel/FileTabs/index.js +83 -0
- package/lib/components/FileWindowPanel/FileWindow.js +221 -0
- package/lib/components/FileWindowPanel/FileWindow.styled.js +19 -0
- package/lib/components/FileWindowPanel/FileWindow.utils.js +38 -0
- package/lib/components/FileWindowPanel/Header/AfterUploadActionBtns.js +69 -0
- package/lib/components/FileWindowPanel/Header/BeforeUploadActionBtns.js +100 -0
- package/lib/components/FileWindowPanel/Header/FileWindowHeader.styled.js +56 -0
- package/lib/components/FileWindowPanel/Header/MutualActionBtns.js +92 -0
- package/lib/components/FileWindowPanel/Header/index.js +118 -0
- package/lib/components/FileWindowPanel/index.js +60 -0
- package/lib/components/Filters/Filters.constants.js +358 -0
- package/lib/components/Filters/Filters.styled.js +235 -0
- package/lib/components/Filters/Filters.utils.js +536 -0
- package/lib/components/Filters/FiltersContext.js +59 -0
- package/lib/components/Filters/FiltersSkeleton.js +14 -0
- package/lib/components/Filters/Groups/Date/index.js +201 -0
- package/lib/components/Filters/Groups/Folders/FoldersSkeleton.js +43 -0
- package/lib/components/Filters/Groups/Folders/index.js +109 -0
- package/lib/components/Filters/Groups/Image/Colors.js +73 -0
- package/lib/components/Filters/Groups/Image/Faces.js +64 -0
- package/lib/components/Filters/Groups/Image/Orientations.js +64 -0
- package/lib/components/Filters/Groups/Image/Resolutions.js +65 -0
- package/lib/components/Filters/Groups/Image/Tooltip.js +14 -0
- package/lib/components/Filters/Groups/Image/index.js +104 -0
- package/lib/components/Filters/Groups/LicenseExpiry/LicenseExpiry.styled.js +17 -0
- package/lib/components/Filters/Groups/LicenseExpiry/index.js +97 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/ConditionSelector.js +40 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/ExtraRow/ConditionSelector.js +35 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/ExtraRow/ValueSelector.js +33 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/ExtraRow/index.js +18 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/AutoComplete.js +56 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Boolean.js +35 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Date.js +36 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/GeoPointField.js +30 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Numeric.js +32 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Select.js +55 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Tags.js +21 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Text.js +39 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/index.js +52 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/KeySelector.js +34 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Row.js +53 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/index.js +48 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Date.js +45 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Field.utils.js +58 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Numeric.js +51 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/OptionsPopup.js +87 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Select.js +168 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Switch.js +41 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Tags.js +38 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Text.js +57 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Uri.js +54 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/index.js +46 -0
- package/lib/components/Filters/Groups/Metadata/Basic/GroupWrapper.js +79 -0
- package/lib/components/Filters/Groups/Metadata/Basic/index.js +80 -0
- package/lib/components/Filters/Groups/Metadata/Metadata.constants.js +42 -0
- package/lib/components/Filters/Groups/Metadata/Metadata.styled.js +150 -0
- package/lib/components/Filters/Groups/Metadata/Metadata.utils.js +160 -0
- package/lib/components/Filters/Groups/Metadata/MetadataFiltersContext.js +329 -0
- package/lib/components/Filters/Groups/Metadata/Placeholder.js +25 -0
- package/lib/components/Filters/Groups/Metadata/common/TagsField/TagsMenu.js +81 -0
- package/lib/components/Filters/Groups/Metadata/common/TagsField/TagsSearchPlaceholder.js +18 -0
- package/lib/components/Filters/Groups/Metadata/common/TagsField/index.js +142 -0
- package/lib/components/Filters/Groups/Metadata/index.js +111 -0
- package/lib/components/Filters/Groups/Size/index.js +125 -0
- package/lib/components/Filters/Groups/Tags/FilteredTags.js +62 -0
- package/lib/components/Filters/Groups/Tags/SelectedTags.js +51 -0
- package/lib/components/Filters/Groups/Tags/SuggestedTags.js +43 -0
- package/lib/components/Filters/Groups/Tags/index.js +146 -0
- package/lib/components/Filters/Groups/TypeAndFormat/Format.js +65 -0
- package/lib/components/Filters/Groups/TypeAndFormat/Type.js +85 -0
- package/lib/components/Filters/Groups/TypeAndFormat/index.js +114 -0
- package/lib/components/Filters/Groups/common/DateRangeField/DateRangeField.styled.js +10 -0
- package/lib/components/Filters/Groups/common/DateRangeField/index.js +72 -0
- package/lib/components/Filters/Groups/common/FilterFooter.js +67 -0
- package/lib/components/Filters/Groups/common/FilterOptions.js +29 -0
- package/lib/components/Filters/Groups/common/FilterSearch.js +22 -0
- package/lib/components/Filters/Groups/common/FilterSearch.styled.js +15 -0
- package/lib/components/Filters/Groups/common/FilterSkeleton.js +44 -0
- package/lib/components/Filters/Groups/common/TimeFrames.js +35 -0
- package/lib/components/Filters/Groups/index.js +55 -0
- package/lib/components/Filters/Placeholder.js +29 -0
- package/lib/components/Filters/hooks/useDateTypeFilterValues.js +182 -0
- package/lib/components/Filters/hooks/useFilters.js +79 -0
- package/lib/components/Filters/index.js +78 -0
- package/lib/components/FoldersView/FoldersTree/FoldersTree.styled.js +193 -0
- package/lib/components/FoldersView/FoldersTree/FoldersTree.utils.js +78 -0
- package/lib/components/FoldersView/FoldersTree/FoldersTreeHeader.js +52 -0
- package/lib/components/FoldersView/FoldersTree/FoldersTreeList.js +64 -0
- package/lib/components/FoldersView/FoldersTree/FoldersTreeListItem.js +270 -0
- package/lib/components/FoldersView/FoldersTree/FoldersTreeSearch.js +70 -0
- package/lib/components/FoldersView/FoldersTree/FoldersTreeSkeleton.js +23 -0
- package/lib/components/FoldersView/FoldersTree/NoFoldersResult.js +19 -0
- package/lib/components/FoldersView/FoldersTree/SearchedFoldersItem.js +113 -0
- package/lib/components/FoldersView/FoldersTree/index.js +163 -0
- package/lib/components/FoldersView/hooks/useAddFolder.js +60 -0
- package/lib/components/FoldersView/index.js +282 -0
- package/lib/components/GalleryRoleSelect/CustomRolesTab.js +47 -0
- package/lib/components/GalleryRoleSelect/CustomRolesTab.styled.js +10 -0
- package/lib/components/GalleryRoleSelect/GalleryRoleSelect.constants.js +11 -0
- package/lib/components/GalleryRoleSelect/GalleryRoleSelect.styled.js +132 -0
- package/lib/components/GalleryRoleSelect/GalleryRoleSelect.utils.js +87 -0
- package/lib/components/GalleryRoleSelect/StandardRolesTab.js +58 -0
- package/lib/components/GalleryRoleSelect/index.js +234 -0
- package/lib/components/HeaderBar/FacetedSearchToggleButton.js +28 -0
- package/lib/components/HeaderBar/HeaderBar.styled.js +25 -0
- package/lib/components/HeaderBar/RightSide.js +127 -0
- package/lib/components/HeaderBar/index.js +81 -0
- package/lib/components/ImageEditorPanel/index.js +33 -0
- package/lib/components/InfiniteScroll/InfiniteScroll.js +97 -0
- package/lib/components/InfiniteScroll/InfiniteScroll.styled.js +11 -0
- package/lib/components/Informer/index.js +9 -0
- package/lib/components/LabelsView/LabelsTree/LabelsTree.styled.js +86 -0
- package/lib/components/LabelsView/LabelsTree/LabelsTreeSkeleton.js +21 -0
- package/lib/components/LabelsView/LabelsTree/index.js +128 -0
- package/lib/components/LabelsView/LabelsView.styled.js +10 -0
- package/lib/components/LabelsView/index.js +139 -0
- package/lib/components/LoginScreen/LoginScreen.styled.js +39 -0
- package/lib/components/LoginScreen/index.js +133 -0
- package/lib/components/MainMenu/MainMenu.styled.js +12 -0
- package/lib/components/MainMenu/index.js +77 -0
- package/lib/components/Modals/AddNewFolder/AddNewFolder.hooks.js +99 -0
- package/lib/components/Modals/AddNewFolder/index.js +1 -0
- package/lib/components/Modals/ConfirmationModal/ConfirmationModal.hooks.js +101 -0
- package/lib/components/Modals/ConfirmationModal/index.js +1 -0
- package/lib/components/Modals/DeleteItems/DeleteItems.hooks.js +233 -0
- package/lib/components/Modals/DeleteItems/index.js +1 -0
- package/lib/components/Modals/DeleteModal/DeleteModal.hooks.js +87 -0
- package/lib/components/Modals/DeleteModal/index.js +1 -0
- package/lib/components/Modals/DownloadConsent/DownlaodConsent.styled.js +8 -0
- package/lib/components/Modals/DownloadConsent/DownloadConsent.hooks.js +101 -0
- package/lib/components/Modals/DownloadConsent/DownloadConsentContent.js +52 -0
- package/lib/components/Modals/DownloadConsent/index.js +2 -0
- package/lib/components/Modals/Modals.js +386 -0
- package/lib/components/Modals/Modals.styled.js +80 -0
- package/lib/components/Modals/MoveItems/MoveItems.hooks.js +88 -0
- package/lib/components/Modals/MoveItems/index.js +1 -0
- package/lib/components/Modals/TransformedDownload/PdfModalContent.js +109 -0
- package/lib/components/Modals/TransformedDownload/TransformedDownload.hooks.js +197 -0
- package/lib/components/Modals/TransformedDownload/TransformedDownload.styled.js +29 -0
- package/lib/components/Modals/TransformedDownload/TransformedDownload.utils.js +46 -0
- package/lib/components/Modals/TransformedDownload/index.js +2 -0
- package/lib/components/Modals/index.js +8 -0
- package/lib/components/NoItems/NoItems.styled.js +54 -0
- package/lib/components/NoItems/index.js +50 -0
- package/lib/components/PdftronPanel/index.js +31 -0
- package/lib/components/PickerPanel/PickerPanel.styled.js +41 -0
- package/lib/components/PickerPanel/PickerPanelContent.js +100 -0
- package/lib/components/PickerPanel/index.js +21 -0
- package/lib/components/ProgressPanel/ProgressPanel.utils.js +29 -0
- package/lib/components/ProgressPanel/index.js +37 -0
- package/lib/components/TopBar/AppliedFilterChips/AppliedFilterChips.styled.js +11 -0
- package/lib/components/TopBar/AppliedFilterChips/index.js +77 -0
- package/lib/components/TopBar/Search/ContextDropdown/ContextDropdown.styled.js +59 -0
- package/lib/components/TopBar/Search/ContextDropdown/ContextDropdown.utils.js +67 -0
- package/lib/components/TopBar/Search/ContextDropdown/index.js +170 -0
- package/lib/components/TopBar/Search/PrependedOptions/TempFilterRegexInput.js +133 -0
- package/lib/components/TopBar/Search/Search.utils.js +88 -0
- package/lib/components/TopBar/Search/SimilarSearchTag.js +60 -0
- package/lib/components/TopBar/Search/index.js +251 -0
- package/lib/components/TopBar/TopBar.styled.js +37 -0
- package/lib/components/TopBar/index.js +61 -0
- package/lib/components/TopSection/TopSection.styled.js +22 -0
- package/lib/components/TopSection/index.js +58 -0
- package/lib/components/UploadBar/UploadBar.styled.js +84 -0
- package/lib/components/UploadBar/index.js +222 -0
- package/lib/components/UploadStatus/index.js +20 -0
- package/lib/components/UploadsPanel/UploadsList/Header.js +19 -0
- package/lib/components/UploadsPanel/UploadsList/List.js +29 -0
- package/lib/components/UploadsPanel/UploadsList/PreUploadPlugins.js +22 -0
- package/lib/components/UploadsPanel/UploadsList/UploadsList.styled.js +64 -0
- package/lib/components/UploadsPanel/UploadsList/UploadsList.utils.js +17 -0
- package/lib/components/UploadsPanel/UploadsList/UploadsVirtualGrid.js +29 -0
- package/lib/components/UploadsPanel/UploadsList/index.js +55 -0
- package/lib/components/UploadsPanel/UploadsPanel.styled.js +24 -0
- package/lib/components/UploadsPanel/UploadsPanelTopBar.js +16 -0
- package/lib/components/UploadsPanel/index.js +36 -0
- package/lib/components/UrlBuilderModal/UrlBuilderModal.styled.js +9 -0
- package/lib/components/UrlBuilderModal/index.js +97 -0
- package/lib/components/Views/ErroredViewPlaceholder.js +48 -0
- package/lib/components/Views/Views.constants.js +55 -0
- package/lib/components/Views/Views.styled.js +87 -0
- package/lib/components/Views/index.js +107 -0
- package/lib/components/common/DeleteModalItemText/DeleteModalItemText.styled.js +8 -0
- package/lib/components/common/DeleteModalItemText/index.js +29 -0
- package/lib/components/common/EditDetailsButton/EditDetailsButton.styled.js +35 -0
- package/lib/components/common/EditDetailsButton/index.js +28 -0
- package/lib/components/common/ExpiryDateTooltipContent/ExpiryDateTooltipContent.styled.js +16 -0
- package/lib/components/common/ExpiryDateTooltipContent/index.js +29 -0
- package/lib/components/common/FileApprovalsInfoPopup/index.js +46 -0
- package/lib/components/common/FileMetadataFieldValue/CustomMetadataFieldValue.js +48 -0
- package/lib/components/common/FileMetadataFieldValue/FileMetadataFieldValue.styled.js +66 -0
- package/lib/components/common/FileMetadataFieldValue/FileMetadataFieldValue.utils.js +315 -0
- package/lib/components/common/FileMetadataFieldValue/GeneralMetadataFieldValue.js +120 -0
- package/lib/components/common/FileMetadataFieldValue/index.js +26 -0
- package/lib/components/common/FileMetadataFieldValue/utils/getFontInfo.js +78 -0
- package/lib/components/common/FolderSelector/BrowseFoldersMenu.js +114 -0
- package/lib/components/common/FolderSelector/FolderSearchMenu.js +45 -0
- package/lib/components/common/FolderSelector/FolderSelector.styled.js +41 -0
- package/lib/components/common/FolderSelector/index.js +186 -0
- package/lib/components/common/FormattedUriLink/FormattedUriLink.styled.js +15 -0
- package/lib/components/common/FormattedUriLink/index.js +21 -0
- package/lib/components/common/OriginalBadge/OriginalBadge.styled.js +17 -0
- package/lib/components/common/OriginalBadge/index.js +14 -0
- package/lib/components/common/SanitizedHtmlElement/index.js +11 -0
- package/lib/components/common/Sort/Sort.constants.js +88 -0
- package/lib/components/common/Sort/Sort.styled.js +47 -0
- package/lib/components/common/Sort/Sort.utils.js +14 -0
- package/lib/components/common/Sort/index.js +183 -0
- package/lib/components/common/TextWithCopyIcon/TextWithCopyIcon.styled.js +44 -0
- package/lib/components/common/TextWithCopyIcon/index.js +71 -0
- package/lib/components/common/TopBarUploadButton/index.js +40 -0
- package/lib/components/common/TrimmedFilePathWithLocate/TrimmedFilePathWithLocate.utils.js +3 -0
- package/lib/components/common/TrimmedFilePathWithLocate/index.js +34 -0
- package/lib/components/common/TrimmedFolderPathWithLocate/index.js +13 -0
- package/lib/components/common/TrimmedPathWithLocate/TrimmedPathWithLocate.styled.js +30 -0
- package/lib/components/common/TrimmedPathWithLocate/index.js +40 -0
- package/lib/components/metadata.adapter.js +365 -0
- package/lib/defaultLocale.js +1396 -0
- package/lib/hooks/index.js +16 -0
- package/lib/hooks/useAssetsPicker.js +274 -0
- package/lib/hooks/useDownloadFilesCsv.js +20 -0
- package/lib/hooks/useEditFileDetails.js +505 -0
- package/lib/hooks/useExplorer.js +6 -0
- package/lib/hooks/useExplorerI18n.js +10 -0
- package/lib/hooks/useExplorerInformer.js +10 -0
- package/lib/hooks/useFetchFileFolderPermissions.js +31 -0
- package/lib/hooks/useFetchMetadataTagsBySearchQuery.js +38 -0
- package/lib/hooks/useFileMetadata.js +117 -0
- package/lib/hooks/useFilterSearch.js +37 -0
- package/lib/hooks/useForcedFilters.js +39 -0
- package/lib/hooks/useIsOverflow.js +25 -0
- package/lib/hooks/useIsSmallScreen.js +20 -0
- package/lib/hooks/useLocateFile.js +231 -0
- package/lib/hooks/usePrevious.js +9 -0
- package/lib/hooks/useSearchSuggestions.js +168 -0
- package/lib/hooks/useStartUpload.js +43 -0
- package/lib/hooks/useToLocaleNumber.js +14 -0
- package/lib/hooks/useValidateFileName.js +324 -0
- package/lib/index.js +1616 -0
- package/lib/slices/collections.slice.js +714 -0
- package/lib/slices/common.slice.js +217 -0
- package/lib/slices/drag.slice.js +75 -0
- package/lib/slices/files.slice.js +1310 -0
- package/lib/slices/filters.slice.js +382 -0
- package/lib/slices/folders.slice.js +978 -0
- package/lib/slices/foldersTree.slice.js +501 -0
- package/lib/slices/index.js +36 -0
- package/lib/slices/labels.slice.js +652 -0
- package/lib/slices/metadata.slice.js +494 -0
- package/lib/slices/panels.slice.js +351 -0
- package/lib/slices/search.slice.js +995 -0
- package/lib/slices/selections.slice.js +315 -0
- package/lib/slices/targets.slice.js +44 -0
- package/lib/slices/topSection.slice.js +71 -0
- package/lib/slices/views.slice.js +357 -0
- package/lib/thunks/archive.thunks.js +175 -0
- package/lib/thunks/downloads.thunks.js +415 -0
- package/lib/thunks/items.thunks.js +274 -0
- package/lib/thunks/permissions.thunks.js +66 -0
- package/lib/thunks/uploads.thunks.js +235 -0
- package/lib/utils/SearchSuggestions/SearchSuggestionsMenu.js +95 -0
- package/lib/utils/SearchSuggestions/SuggestionMode.js +70 -0
- package/lib/utils/SearchSuggestions/SuggestionModeAttribute.js +87 -0
- package/lib/utils/SearchSuggestions/SuggestionModeExpression.js +121 -0
- package/lib/utils/SearchSuggestions/SuggestionModeTag.js +87 -0
- package/lib/utils/SearchSuggestions/SuggestionsManager.js +242 -0
- package/lib/utils/SearchSuggestions/constants.js +14 -0
- package/lib/utils/SearchSuggestions/index.js +4 -0
- package/lib/utils/SearchSuggestions/styled.js +12 -0
- package/lib/utils/availableScreenSizes.js +4 -0
- package/lib/utils/constants.js +14 -0
- package/lib/utils/convertItemsToFilesFoldersUuids.js +12 -0
- package/lib/utils/convertItemstoFoldersParentUuids.js +12 -0
- package/lib/utils/createPromise.js +9 -0
- package/lib/utils/createSuperFocus.js +43 -0
- package/lib/utils/decodeB64ToStr.js +11 -0
- package/lib/utils/filters.js +333 -0
- package/lib/utils/formatFolderPath.js +10 -0
- package/lib/utils/formatPinSubTitle.js +17 -0
- package/lib/utils/getAcquirerTitle.js +10 -0
- package/lib/utils/getActiveOverlayEl.js +11 -0
- package/lib/utils/getApiPathtype.js +10 -0
- package/lib/utils/getClosestStr.js +22 -0
- package/lib/utils/getItemUuids.js +12 -0
- package/lib/utils/getLabelsTotalAssetsCount.js +6 -0
- package/lib/utils/getMoveAndDeleteData.js +15 -0
- package/lib/utils/getParentFolderPath.js +4 -0
- package/lib/utils/getQueryStringFromUrl.js +6 -0
- package/lib/utils/getScrollableParent.js +15 -0
- package/lib/utils/getStringValueExistedInObj.js +9 -0
- package/lib/utils/isEmbeddableAsset.js +6 -0
- package/lib/utils/isFileVersion.js +9 -0
- package/lib/utils/mapArrayKeysToObjValues.js +33 -0
- package/lib/utils/mapFiltersToShownFormat.js +252 -0
- package/lib/utils/prepareExportedFilesLinks.js +12 -0
- package/lib/utils/prepareSearchUrl.js +75 -0
- package/lib/utils/removeBackground.js +60 -0
- package/lib/utils/removeExtraUrlParams.js +13 -0
- package/lib/utils/scrollToAndFocusItemElement.js +16 -0
- package/lib/utils/toggleFolderNotFoundModal.js +25 -0
- package/lib/utils/trapFocus.js +59 -0
- package/lib/utils/truncateString.js +28 -0
- package/package.json +8 -8
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { useMemo, useCallback } from 'react';
|
|
2
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
3
|
+
import { Download, FitScreen, Link, More } from '@scaleflex/icons';
|
|
4
|
+
import { selectIsUserPermittedToDisplayFile, selectIsUserPermittedToShare } from '@scaleflex/widget-core/lib/slices/user.slice';
|
|
5
|
+
import { isVisibilityPublic } from '@scaleflex/widget-utils/lib/visibility';
|
|
6
|
+
import { PERMISSIONS } from '@scaleflex/widget-utils/lib/constants';
|
|
7
|
+
import { Button, IconButton } from '@scaleflex/ui/core';
|
|
8
|
+
import { downloadOneFile, emitExportEvent } from '../../../../thunks/downloads.thunks';
|
|
9
|
+
import { useExplorer } from '../../../../hooks';
|
|
10
|
+
import { useDownloadConsentModal } from '../../../Modals';
|
|
11
|
+
import { copyFileCdnLink } from '../../../../slices/files.slice';
|
|
12
|
+
import { ANIMATED_IMG_ACCEPT_HEADER } from '../../../../utils/constants';
|
|
13
|
+
import Styled from './FilesSection.styled';
|
|
14
|
+
import prepareExportedFilesLinks from '@scaleflex/widget-explorer/lib/utils/prepareExportedFilesLinks';
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
var FileOverlayOptions = function FileOverlayOptions(_ref) {
|
|
17
|
+
var file = _ref.file,
|
|
18
|
+
onContextMenu = _ref.onContextMenu,
|
|
19
|
+
toggleFileWindow = _ref.toggleFileWindow;
|
|
20
|
+
var dispatch = useDispatch();
|
|
21
|
+
var triggerDownloadConsentModal = useDownloadConsentModal();
|
|
22
|
+
var _useExplorer = useExplorer(),
|
|
23
|
+
checkFileFolderPermissions = _useExplorer.checkFileFolderPermissions,
|
|
24
|
+
i18n = _useExplorer.i18n,
|
|
25
|
+
_useExplorer$opts = _useExplorer.opts,
|
|
26
|
+
useAssetsPicker = _useExplorer$opts.useAssetsPicker,
|
|
27
|
+
noImgOperationsAndDownload = _useExplorer$opts.noImgOperationsAndDownload,
|
|
28
|
+
preventDownloadDefaultBehavior = _useExplorer$opts.preventDownloadDefaultBehavior;
|
|
29
|
+
var isUserPermittedToShare = useSelector(selectIsUserPermittedToShare);
|
|
30
|
+
var isUserPermittedToDisplayFile = useSelector(selectIsUserPermittedToDisplayFile);
|
|
31
|
+
var copyLinkToClipboard = function copyLinkToClipboard() {
|
|
32
|
+
dispatch(copyFileCdnLink(file));
|
|
33
|
+
};
|
|
34
|
+
var download = useCallback(function (event) {
|
|
35
|
+
event.stopPropagation();
|
|
36
|
+
if (preventDownloadDefaultBehavior) {
|
|
37
|
+
var _file$url;
|
|
38
|
+
dispatch(emitExportEvent([{
|
|
39
|
+
link: file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.cdn,
|
|
40
|
+
file: file
|
|
41
|
+
}]));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
triggerDownloadConsentModal(function () {
|
|
45
|
+
return dispatch(downloadOneFile({
|
|
46
|
+
file: file,
|
|
47
|
+
headers: ANIMATED_IMG_ACCEPT_HEADER
|
|
48
|
+
}));
|
|
49
|
+
});
|
|
50
|
+
}, [triggerDownloadConsentModal, preventDownloadDefaultBehavior]);
|
|
51
|
+
var options = useMemo(function () {
|
|
52
|
+
return useAssetsPicker ? [{
|
|
53
|
+
key: 'GridLi-SelectButton',
|
|
54
|
+
onClick: function onClick() {
|
|
55
|
+
var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
56
|
+
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
57
|
+
dispatch(emitExportEvent(prepareExportedFilesLinks([file])));
|
|
58
|
+
},
|
|
59
|
+
label: i18n('explorerGridFileOptionsOverlaySelectBtn'),
|
|
60
|
+
testId: 'fmaw-explorer-grid_file_options_select'
|
|
61
|
+
}, {
|
|
62
|
+
key: 'GridLi-FitScreen',
|
|
63
|
+
Icon: FitScreen,
|
|
64
|
+
iconSize: 16,
|
|
65
|
+
onClick: function onClick(event) {
|
|
66
|
+
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
67
|
+
toggleFileWindow(event);
|
|
68
|
+
},
|
|
69
|
+
hidden: !isUserPermittedToDisplayFile,
|
|
70
|
+
testId: 'fmaw-explorer-grid_file_options_fit_screen',
|
|
71
|
+
style: {
|
|
72
|
+
position: 'absolute',
|
|
73
|
+
top: 12,
|
|
74
|
+
right: 12
|
|
75
|
+
},
|
|
76
|
+
color: 'secondary'
|
|
77
|
+
}] : [{
|
|
78
|
+
key: 'GridLi-CopyLink',
|
|
79
|
+
Icon: Link,
|
|
80
|
+
iconSize: 16,
|
|
81
|
+
onClick: copyLinkToClipboard,
|
|
82
|
+
hidden: !isVisibilityPublic(file.visibility),
|
|
83
|
+
testId: 'fmaw-explorer-grid_file_options_copy',
|
|
84
|
+
color: 'secondary'
|
|
85
|
+
}, {
|
|
86
|
+
key: 'GridLi-OpenMenu',
|
|
87
|
+
Icon: More,
|
|
88
|
+
iconSize: 16,
|
|
89
|
+
onClick: onContextMenu,
|
|
90
|
+
testId: 'fmaw-explorer-grid_file_options_open_menu',
|
|
91
|
+
color: 'secondary'
|
|
92
|
+
}, {
|
|
93
|
+
key: 'GridLi-DownloadFile',
|
|
94
|
+
Icon: Download,
|
|
95
|
+
iconSize: 16,
|
|
96
|
+
onClick: download,
|
|
97
|
+
hidden: noImgOperationsAndDownload || !isUserPermittedToDisplayFile,
|
|
98
|
+
disabled: !checkFileFolderPermissions({
|
|
99
|
+
permissionsToCheck: [PERMISSIONS.DISPLAY],
|
|
100
|
+
permissionsList: file.permissions
|
|
101
|
+
}),
|
|
102
|
+
disabledTooltip: i18n('mutualizedFileOptionPermissionsMutedHint'),
|
|
103
|
+
testId: 'fmaw-explorer-grid_file_options_download'
|
|
104
|
+
}];
|
|
105
|
+
}, [file, noImgOperationsAndDownload, isUserPermittedToShare, isUserPermittedToDisplayFile, download, checkFileFolderPermissions, i18n, useAssetsPicker]);
|
|
106
|
+
var renderOption = function renderOption(_ref2) {
|
|
107
|
+
var key = _ref2.key,
|
|
108
|
+
label = _ref2.label,
|
|
109
|
+
Icon = _ref2.Icon,
|
|
110
|
+
iconSize = _ref2.iconSize,
|
|
111
|
+
onClick = _ref2.onClick,
|
|
112
|
+
testId = _ref2.testId,
|
|
113
|
+
style = _ref2.style,
|
|
114
|
+
color = _ref2.color,
|
|
115
|
+
hidden = _ref2.hidden;
|
|
116
|
+
if (hidden) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
return label ? /*#__PURE__*/_jsx(Button, {
|
|
120
|
+
size: "md",
|
|
121
|
+
onClick: onClick,
|
|
122
|
+
"data-testid": testId,
|
|
123
|
+
style: style,
|
|
124
|
+
children: label
|
|
125
|
+
}, key) : /*#__PURE__*/_jsx(IconButton, {
|
|
126
|
+
onClick: onClick,
|
|
127
|
+
"data-testid": testId,
|
|
128
|
+
size: "md",
|
|
129
|
+
style: style,
|
|
130
|
+
color: color,
|
|
131
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
132
|
+
size: iconSize
|
|
133
|
+
})
|
|
134
|
+
}, key);
|
|
135
|
+
};
|
|
136
|
+
return /*#__PURE__*/_jsx(Styled.FileOverlay, {
|
|
137
|
+
children: options.map(renderOption)
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
export default FileOverlayOptions;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var _templateObject, _templateObject2;
|
|
2
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
3
|
+
import { PC } from '@scaleflex/widget-common/lib';
|
|
4
|
+
import { Button } from '@scaleflex/ui/core';
|
|
5
|
+
import styled from 'styled-components';
|
|
6
|
+
var FileOverlay = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n visibility: hidden;\n gap: 8px;\n\n *:hover>& {\n visibility: visible;\n }\n"])), function (_ref) {
|
|
7
|
+
var theme = _ref.theme;
|
|
8
|
+
return theme.palette[PC.Extra_0_7_Overlay];
|
|
9
|
+
});
|
|
10
|
+
var FileOverlayButton = styled(Button)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 40px;\n height: 40px;\n"])));
|
|
11
|
+
var Styled = {
|
|
12
|
+
FileOverlay: FileOverlay,
|
|
13
|
+
FileOverlayButton: FileOverlayButton
|
|
14
|
+
};
|
|
15
|
+
export default Styled;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["filesUuids"];
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
10
|
+
import { memo, useContext } from 'react';
|
|
11
|
+
import { VirtualGrid } from '@scaleflex/widget-common';
|
|
12
|
+
import { VirtualListDataContext } from '@scaleflex/widget-core/lib/Providers';
|
|
13
|
+
import FileCell from './FileCell';
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
var getFileItemKey = function getFileItemKey(uuid) {
|
|
16
|
+
return uuid;
|
|
17
|
+
};
|
|
18
|
+
var FilesSection = function FilesSection(_ref) {
|
|
19
|
+
var filesUuids = _ref.filesUuids,
|
|
20
|
+
others = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
+
var _useContext = useContext(VirtualListDataContext),
|
|
22
|
+
apiRef = _useContext.apiRef;
|
|
23
|
+
return /*#__PURE__*/_jsx(VirtualGrid, {
|
|
24
|
+
items: filesUuids,
|
|
25
|
+
injectedItemPropName: "fileUuid",
|
|
26
|
+
getItemKey: getFileItemKey,
|
|
27
|
+
apiRef: apiRef,
|
|
28
|
+
children: /*#__PURE__*/_jsx(FileCell, _objectSpread({}, others))
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
export default /*#__PURE__*/memo(FilesSection);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Skeleton } from '@scaleflex/ui/core';
|
|
2
|
+
import Styled from '../AssetsList.styled';
|
|
3
|
+
import StyledGridView from './GridView.styled';
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
var GridLayoutFilesSkeleton = function GridLayoutFilesSkeleton(_ref) {
|
|
6
|
+
var hideAccordionHeader = _ref.hideAccordionHeader;
|
|
7
|
+
return /*#__PURE__*/_jsx(Styled.Accordion, {
|
|
8
|
+
expanded: true,
|
|
9
|
+
label: /*#__PURE__*/_jsx(Skeleton, {
|
|
10
|
+
width: 200
|
|
11
|
+
}),
|
|
12
|
+
style: {
|
|
13
|
+
marginTop: hideAccordionHeader ? 0 : 12
|
|
14
|
+
},
|
|
15
|
+
detailStyle: {
|
|
16
|
+
margin: '0px'
|
|
17
|
+
},
|
|
18
|
+
hideIcon: true,
|
|
19
|
+
onContextMenu: function onContextMenu(e) {
|
|
20
|
+
return e.stopPropagation();
|
|
21
|
+
},
|
|
22
|
+
hideHeader: hideAccordionHeader,
|
|
23
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
24
|
+
className: "filerobot-Provider-ItemCategory-wrapper",
|
|
25
|
+
children: /*#__PURE__*/_jsx(StyledGridView.SkeletonContainer, {
|
|
26
|
+
children: Array(18).fill().map(function (_, index) {
|
|
27
|
+
return /*#__PURE__*/_jsx(Styled.FileSectionItem, {
|
|
28
|
+
isSkeleton: true,
|
|
29
|
+
children: /*#__PURE__*/_jsxs(Styled.FileSectionItemWrapper, {
|
|
30
|
+
type: "button",
|
|
31
|
+
className: "filerobot-u-reset",
|
|
32
|
+
$loading: true,
|
|
33
|
+
children: [/*#__PURE__*/_jsx(Styled.FileSkeleton, {
|
|
34
|
+
bottom: "16%",
|
|
35
|
+
width: 150
|
|
36
|
+
}), /*#__PURE__*/_jsx(Styled.FileSkeleton, {
|
|
37
|
+
bottom: "5%",
|
|
38
|
+
width: 66
|
|
39
|
+
})]
|
|
40
|
+
})
|
|
41
|
+
}, index);
|
|
42
|
+
})
|
|
43
|
+
})
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
export default GridLayoutFilesSkeleton;
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
var _excluded = ["folderUuid", "handleNavigatingThroughArrows", "DetailsView", "hideTopOptions", "openFolderOnClick", "hideDetailsInfo", "disableHoverEffects"];
|
|
2
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
3
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
|
+
import { useRef, useEffect } from 'react';
|
|
5
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
6
|
+
import { EllipsedText } from '@scaleflex/ui/core';
|
|
7
|
+
import ignoreEvent from '@scaleflex/widget-utils/lib/ignoreEvent';
|
|
8
|
+
import getFolderDetails from '@scaleflex/widget-utils/lib/getFolderDetails';
|
|
9
|
+
import handlePromise from '@scaleflex/widget-utils/lib/handlePromise';
|
|
10
|
+
import { checkFileOrFolderNameValidation } from '@scaleflex/widget-utils/lib/checkFileOrFolderNameValidation';
|
|
11
|
+
import { PERMISSIONS } from '@scaleflex/widget-utils/lib/constants';
|
|
12
|
+
import DnD from '../../../DnD';
|
|
13
|
+
import FolderTopOptions from './FolderTopOptions';
|
|
14
|
+
import FolderPreviewGrid from './FolderPreviewGrid';
|
|
15
|
+
import { useExplorer, useFetchFileFolderPermissions } from '../../../../hooks';
|
|
16
|
+
import { selectIsItemChecked, toggleSelection } from '../../../../slices/selections.slice';
|
|
17
|
+
import { itemRenameOpened, selectIsRenameItemFromSidebar, selectRenameItemFor } from '../../../../slices/panels.slice';
|
|
18
|
+
import { renameFolder, selectFolderByUuid } from '../../../../slices/folders.slice';
|
|
19
|
+
import Styled from '../../AssetsList.styled';
|
|
20
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
+
var checkboxOnChange = function checkboxOnChange() {};
|
|
22
|
+
var FolderCell = function FolderCell(_ref) {
|
|
23
|
+
var folderUuid = _ref.folderUuid,
|
|
24
|
+
handleNavigatingThroughArrows = _ref.handleNavigatingThroughArrows,
|
|
25
|
+
DetailsView = _ref.DetailsView,
|
|
26
|
+
hideTopOptions = _ref.hideTopOptions,
|
|
27
|
+
openFolderOnClick = _ref.openFolderOnClick,
|
|
28
|
+
hideDetailsInfo = _ref.hideDetailsInfo,
|
|
29
|
+
_ref$disableHoverEffe = _ref.disableHoverEffects,
|
|
30
|
+
disableHoverEffects = _ref$disableHoverEffe === void 0 ? false : _ref$disableHoverEffe,
|
|
31
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
var dispatch = useDispatch();
|
|
33
|
+
var _useExplorer = useExplorer(),
|
|
34
|
+
i18n = _useExplorer.i18n,
|
|
35
|
+
info = _useExplorer.info,
|
|
36
|
+
opts = _useExplorer.opts,
|
|
37
|
+
checkUserPermissions = _useExplorer.checkUserPermissions;
|
|
38
|
+
var _useFetchFileFolderPe = useFetchFileFolderPermissions(),
|
|
39
|
+
fetchPermissions = _useFetchFileFolderPe.fetchPermissions,
|
|
40
|
+
clearFetchPermissionsTimer = _useFetchFileFolderPe.clearFetchPermissionsTimer;
|
|
41
|
+
var folder = useSelector(function (state) {
|
|
42
|
+
return selectFolderByUuid(state, folderUuid) || {};
|
|
43
|
+
});
|
|
44
|
+
var renameItemFor = useSelector(selectRenameItemFor);
|
|
45
|
+
var renameSidebarItem = useSelector(selectIsRenameItemFromSidebar);
|
|
46
|
+
var isChecked = useSelector(function (state) {
|
|
47
|
+
return selectIsItemChecked(state, getFolderDetails(folder).uuid);
|
|
48
|
+
});
|
|
49
|
+
var disableFolderSelection = opts.disableFolderSelection,
|
|
50
|
+
hideFolderOptions = opts.hideFolderOptions,
|
|
51
|
+
useAssetsPicker = opts.useAssetsPicker;
|
|
52
|
+
var isLoading = folder.loading;
|
|
53
|
+
var stagedFileName = useRef(folder.name);
|
|
54
|
+
var focusedInput = useRef();
|
|
55
|
+
var id = getFolderDetails(folder).uuid;
|
|
56
|
+
var folderName = getFolderDetails(folder).name;
|
|
57
|
+
var isItemBeingRenamed = renameItemFor === id;
|
|
58
|
+
var isFolderChecked = isChecked;
|
|
59
|
+
var isRenamingFolder = !renameSidebarItem && renameItemFor && isItemBeingRenamed;
|
|
60
|
+
useEffect(function () {
|
|
61
|
+
if (focusedInput.current) {
|
|
62
|
+
focusedInput.current.focus();
|
|
63
|
+
}
|
|
64
|
+
}, [renameSidebarItem, renameItemFor]);
|
|
65
|
+
useEffect(function () {
|
|
66
|
+
window.addEventListener('mousedown', handleSubmitRename);
|
|
67
|
+
return function () {
|
|
68
|
+
window.removeEventListener('mousedown', handleSubmitRename);
|
|
69
|
+
};
|
|
70
|
+
}, [isRenamingFolder, isLoading]);
|
|
71
|
+
var handleToggleCheckbox = function handleToggleCheckbox(event) {
|
|
72
|
+
if (isLoading || disableFolderSelection || useAssetsPicker) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
dispatch(toggleSelection({
|
|
76
|
+
event: event,
|
|
77
|
+
itemUuid: id,
|
|
78
|
+
isMultiple: event.isMultiple
|
|
79
|
+
}));
|
|
80
|
+
};
|
|
81
|
+
var handleOnContextMenu = function handleOnContextMenu(event) {
|
|
82
|
+
event.preventDefault();
|
|
83
|
+
event.stopPropagation();
|
|
84
|
+
if (!isLoading && typeof props.handleContextMenuToggle === 'function') {
|
|
85
|
+
props.handleContextMenuToggle(event, folder);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
var triggerRenaming = function triggerRenaming(newName) {
|
|
89
|
+
var renameAction = renameFolder({
|
|
90
|
+
uuid: id,
|
|
91
|
+
name: newName
|
|
92
|
+
});
|
|
93
|
+
handlePromise(dispatch(renameAction), function () {
|
|
94
|
+
return info(i18n('mutualizedRenamedSuccessfullyInfo'), 'success');
|
|
95
|
+
}, info);
|
|
96
|
+
};
|
|
97
|
+
var handleRenaming = function handleRenaming(newName) {
|
|
98
|
+
if (isLoading) return;
|
|
99
|
+
var oldName = folderName;
|
|
100
|
+
if (!newName || newName === oldName) {
|
|
101
|
+
dispatch(itemRenameOpened(null));
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (checkFileOrFolderNameValidation(newName)) {
|
|
105
|
+
info(i18n('mutualizedFolderInvalidNameError'));
|
|
106
|
+
} else if (newName) {
|
|
107
|
+
triggerRenaming(newName);
|
|
108
|
+
} else if (newName === '') {
|
|
109
|
+
// 'else if' not 'else' Cuz maybe the user would cancel then we don't need to show the msg.
|
|
110
|
+
info(i18n('explorerInvalidNameInfo'));
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
var handleSubmitRename = function handleSubmitRename(event) {
|
|
114
|
+
if (!isRenamingFolder || isLoading || event.target.dataset.folderName === folder.name) return;
|
|
115
|
+
event.target.value = stagedFileName.current;
|
|
116
|
+
handleRenaming(event.target.value);
|
|
117
|
+
};
|
|
118
|
+
var handleKeyUp = function handleKeyUp(event) {
|
|
119
|
+
if (isLoading) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
var eventKey = event.key.toLowerCase();
|
|
123
|
+
var newName = event.target.value;
|
|
124
|
+
if (eventKey === 'escape') {
|
|
125
|
+
dispatch(itemRenameOpened(null));
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
stagedFileName.current = newName;
|
|
129
|
+
if (eventKey !== 'enter') {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
handleRenaming(newName);
|
|
133
|
+
};
|
|
134
|
+
var startRenameOnSecondClick = function startRenameOnSecondClick(event) {
|
|
135
|
+
if (isLoading || DetailsView || event.detail !== 1 || !checkUserPermissions([PERMISSIONS.FOLDER_RENAME])) return;
|
|
136
|
+
event.stopPropagation();
|
|
137
|
+
dispatch(itemRenameOpened(folder.uuid || folder.id));
|
|
138
|
+
};
|
|
139
|
+
var _getFolderDetails = getFolderDetails(folder),
|
|
140
|
+
filesDirect = _getFolderDetails.filesDirect,
|
|
141
|
+
filesRecursive = _getFolderDetails.filesRecursive;
|
|
142
|
+
return /*#__PURE__*/_jsx(DnD, {
|
|
143
|
+
disableDrag: isItemBeingRenamed || isLoading,
|
|
144
|
+
disableDrop: isLoading,
|
|
145
|
+
item: folder,
|
|
146
|
+
children: /*#__PURE__*/_jsxs(Styled.FolderSectionItem, {
|
|
147
|
+
role: "button",
|
|
148
|
+
className: "item-folder".concat(props.isDragging ? ' filerobot-Dragging-folders' : ''),
|
|
149
|
+
onKeyDown: isLoading ? undefined : handleNavigatingThroughArrows,
|
|
150
|
+
onKeyUp: function onKeyUp() {
|
|
151
|
+
return fetchPermissions({
|
|
152
|
+
foldersUuids: [id]
|
|
153
|
+
});
|
|
154
|
+
},
|
|
155
|
+
"data-filerobot-focusable-uuid": id,
|
|
156
|
+
tabIndex: "-1",
|
|
157
|
+
selected: isFolderChecked && !DetailsView,
|
|
158
|
+
onClick: handleToggleCheckbox,
|
|
159
|
+
onDoubleClick: function onDoubleClick(e) {
|
|
160
|
+
return isLoading ? ignoreEvent(e) : openFolderOnClick(folder);
|
|
161
|
+
},
|
|
162
|
+
onContextMenu: handleOnContextMenu,
|
|
163
|
+
"aria-label": isFolderChecked && !DetailsView ? i18n('mutualizedUnselectFileNamedLabel', {
|
|
164
|
+
name: folderName
|
|
165
|
+
}) : i18n('mutualizedSelectFileNamedLabel', {
|
|
166
|
+
name: folderName
|
|
167
|
+
}),
|
|
168
|
+
$loading: isLoading,
|
|
169
|
+
disableHoverEffects: disableHoverEffects,
|
|
170
|
+
onMouseEnter: function onMouseEnter() {
|
|
171
|
+
return fetchPermissions({
|
|
172
|
+
foldersUuids: [id]
|
|
173
|
+
});
|
|
174
|
+
},
|
|
175
|
+
onMouseLeave: clearFetchPermissionsTimer,
|
|
176
|
+
children: [/*#__PURE__*/_jsx(Styled.FolderIcon, {
|
|
177
|
+
small: hideDetailsInfo
|
|
178
|
+
}), /*#__PURE__*/_jsxs(Styled.FolderContent, {
|
|
179
|
+
fullSizeGrid: hideDetailsInfo,
|
|
180
|
+
children: [/*#__PURE__*/_jsx(FolderPreviewGrid, {
|
|
181
|
+
folder: folder
|
|
182
|
+
}), !hideDetailsInfo && /*#__PURE__*/_jsxs(Styled.FolderInfo, {
|
|
183
|
+
children: [/*#__PURE__*/_jsx(Styled.FolderTitle, {
|
|
184
|
+
onClick: isFolderChecked ? startRenameOnSecondClick : undefined,
|
|
185
|
+
children: isRenamingFolder ? /*#__PURE__*/_jsx(Styled.FolderInputRename, {
|
|
186
|
+
type: "text",
|
|
187
|
+
size: "sm",
|
|
188
|
+
defaultValue: folderName,
|
|
189
|
+
onKeyUp: handleKeyUp,
|
|
190
|
+
onKeyDown: ignoreEvent,
|
|
191
|
+
onClick: ignoreEvent,
|
|
192
|
+
onDoubleClick: ignoreEvent,
|
|
193
|
+
onContextMenu: ignoreEvent,
|
|
194
|
+
ref: focusedInput,
|
|
195
|
+
disabled: isLoading,
|
|
196
|
+
focusOnMount: true,
|
|
197
|
+
"data-folder-name": folder.name
|
|
198
|
+
}) : /*#__PURE__*/_jsx(EllipsedText, {
|
|
199
|
+
maxLinesCount: 1,
|
|
200
|
+
children: folderName
|
|
201
|
+
})
|
|
202
|
+
}), /*#__PURE__*/_jsxs(Styled.FolderSubTitle, {
|
|
203
|
+
children: [/*#__PURE__*/_jsx(Styled.FolderSubTitleText, {
|
|
204
|
+
size: "sm",
|
|
205
|
+
children: i18n('gridViewFolderSubTitleAssets', {
|
|
206
|
+
count: filesDirect
|
|
207
|
+
})
|
|
208
|
+
}), /*#__PURE__*/_jsx(Styled.FolderSubTitleText, {
|
|
209
|
+
size: "sm",
|
|
210
|
+
children: i18n('gridViewFolderSubTitleSubAssets', {
|
|
211
|
+
count: filesRecursive - filesDirect
|
|
212
|
+
})
|
|
213
|
+
})]
|
|
214
|
+
})]
|
|
215
|
+
}), !DetailsView && !disableFolderSelection && !useAssetsPicker && /*#__PURE__*/_jsx(Styled.FolderSectionItemCheckbox, {
|
|
216
|
+
// TODO: fix
|
|
217
|
+
// we use onClick instead of onChange as onChange causes multiple rerenders
|
|
218
|
+
// we add onChnage as emty function to avoid type warning
|
|
219
|
+
onClick: function onClick(e) {
|
|
220
|
+
e.isMultiple = true;
|
|
221
|
+
},
|
|
222
|
+
onChange: checkboxOnChange,
|
|
223
|
+
checked: isFolderChecked,
|
|
224
|
+
onContextMenu: handleOnContextMenu,
|
|
225
|
+
size: "md"
|
|
226
|
+
}), !hideTopOptions && !isLoading && !hideFolderOptions && !useAssetsPicker && /*#__PURE__*/_jsx(FolderTopOptions, {
|
|
227
|
+
folder: folder,
|
|
228
|
+
onContextMenu: handleOnContextMenu,
|
|
229
|
+
style: {
|
|
230
|
+
padding: 12,
|
|
231
|
+
top: 0,
|
|
232
|
+
right: 0
|
|
233
|
+
}
|
|
234
|
+
})]
|
|
235
|
+
})]
|
|
236
|
+
})
|
|
237
|
+
});
|
|
238
|
+
};
|
|
239
|
+
export default FolderCell;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { useSelector } from 'react-redux';
|
|
8
|
+
import { Skeleton } from '@scaleflex/ui/core';
|
|
9
|
+
import getItemIcon from '@scaleflex/widget-utils/lib/getItemIcon';
|
|
10
|
+
import getFormattedPreviewUrl from '@scaleflex/widget-utils/lib/getFormattedPreviewUrl';
|
|
11
|
+
import isThumbnailCloudimgSupported from '@scaleflex/widget-utils/lib/isThumbnailCloudimgSupported';
|
|
12
|
+
import getFileDefaultIcon from '@scaleflex/widget-utils/lib/getFileDefaultIcon';
|
|
13
|
+
import LinkHelper from '@scaleflex/widget-utils/lib/LinkHelper';
|
|
14
|
+
import { FILE_TYPES_ICON_PATH } from '@scaleflex/widget-utils/lib/constants';
|
|
15
|
+
import { useExplorer } from '../../../../hooks';
|
|
16
|
+
import { selectIsExplorerPluginLoading } from '../../../../slices/common.slice';
|
|
17
|
+
import Styled from '../../AssetsList.styled';
|
|
18
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
var DEFAULT_ICON_WIDTH = 84;
|
|
20
|
+
var DEFAULT_ICON_HEIGHT = 84;
|
|
21
|
+
var DEFAULT_ICON_MARGIN = 30;
|
|
22
|
+
var FolderPreviewGrid = function FolderPreviewGrid(_ref) {
|
|
23
|
+
var folder = _ref.folder;
|
|
24
|
+
var _useExplorer = useExplorer(),
|
|
25
|
+
isFastToken = _useExplorer.opts.isFastToken,
|
|
26
|
+
isDevEnv = _useExplorer.isDevEnv,
|
|
27
|
+
container = _useExplorer.container;
|
|
28
|
+
var loading = useSelector(selectIsExplorerPluginLoading);
|
|
29
|
+
var isLoadingPreviews = !folder.previews && !folder.files && !isFastToken;
|
|
30
|
+
var isLoading = isLoadingPreviews || loading;
|
|
31
|
+
var folderAssetsPreviews = folder.previews || folder.files || [];
|
|
32
|
+
var hideImgOnLoadingErr = function hideImgOnLoadingErr() {
|
|
33
|
+
var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
34
|
+
if (e.currentTarget) {
|
|
35
|
+
e.currentTarget.style.display = 'none';
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var getAppendedLink = function getAppendedLink(_ref2) {
|
|
39
|
+
var url = _ref2.url,
|
|
40
|
+
searchParams = _ref2.searchParams;
|
|
41
|
+
return new LinkHelper({
|
|
42
|
+
href: url || ''
|
|
43
|
+
}).appendSearchParams(searchParams);
|
|
44
|
+
};
|
|
45
|
+
var renderPreviewGridImg = function renderPreviewGridImg(file) {
|
|
46
|
+
var _file$info, _file$url;
|
|
47
|
+
if (isLoading) {
|
|
48
|
+
return /*#__PURE__*/_jsx(Styled.PreviewGridImgWrapper, {
|
|
49
|
+
children: /*#__PURE__*/_jsx(Skeleton, {
|
|
50
|
+
height: "100%",
|
|
51
|
+
width: "100%"
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
if (!file) {
|
|
56
|
+
return /*#__PURE__*/_jsx(Styled.PreviewGridImgWrapper, {});
|
|
57
|
+
}
|
|
58
|
+
var filePreviewUrl = file.file_uri_cdn || (file === null || file === void 0 ? void 0 : (_file$info = file.info) === null || _file$info === void 0 ? void 0 : _file$info.video_gif) || (file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.cdn);
|
|
59
|
+
var tmpFile = _objectSpread(_objectSpread({}, file), {}, {
|
|
60
|
+
url: getFormattedPreviewUrl({
|
|
61
|
+
url: filePreviewUrl,
|
|
62
|
+
isDevEnv: isDevEnv,
|
|
63
|
+
containerToken: container
|
|
64
|
+
}),
|
|
65
|
+
type: file.file_type || file.type,
|
|
66
|
+
uuid: file.file_uuid
|
|
67
|
+
});
|
|
68
|
+
var itemIconUrl = getItemIcon({
|
|
69
|
+
fileOrFolder: tmpFile,
|
|
70
|
+
showVideoGif: true,
|
|
71
|
+
cloudimgFunc: 'bound',
|
|
72
|
+
isDevEnv: isDevEnv,
|
|
73
|
+
container: container
|
|
74
|
+
});
|
|
75
|
+
var isFileTypeIcon = itemIconUrl.includes(FILE_TYPES_ICON_PATH);
|
|
76
|
+
var filePreviewUri = isFileTypeIcon ? getAppendedLink({
|
|
77
|
+
url: itemIconUrl,
|
|
78
|
+
searchParams: {
|
|
79
|
+
w: DEFAULT_ICON_WIDTH,
|
|
80
|
+
func: 'fit',
|
|
81
|
+
h: DEFAULT_ICON_HEIGHT,
|
|
82
|
+
margin: "".concat(DEFAULT_ICON_MARGIN, "p")
|
|
83
|
+
}
|
|
84
|
+
}) : itemIconUrl;
|
|
85
|
+
var isContainedFit = !isThumbnailCloudimgSupported(tmpFile);
|
|
86
|
+
return /*#__PURE__*/_jsx(Styled.PreviewGridImgWrapper, {
|
|
87
|
+
children: filePreviewUri && /*#__PURE__*/_jsx(Styled.PreviewGridImg, {
|
|
88
|
+
src: filePreviewUri,
|
|
89
|
+
isContainedFit: isContainedFit,
|
|
90
|
+
onError: hideImgOnLoadingErr,
|
|
91
|
+
firstFallbackSrc: function firstFallbackSrc() {
|
|
92
|
+
return getFileDefaultIcon(file);
|
|
93
|
+
},
|
|
94
|
+
applyFallback: true
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
return /*#__PURE__*/_jsxs(Styled.FolderPreviewGrid, {
|
|
99
|
+
children: [/*#__PURE__*/_jsx(Styled.PreviewGridLeftColumn, {
|
|
100
|
+
children: renderPreviewGridImg(folderAssetsPreviews[0])
|
|
101
|
+
}), /*#__PURE__*/_jsxs(Styled.PreviewGridRightColumn, {
|
|
102
|
+
children: [renderPreviewGridImg(folderAssetsPreviews[1]), renderPreviewGridImg(folderAssetsPreviews[2])]
|
|
103
|
+
})]
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
export default FolderPreviewGrid;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["folder", "onContextMenu"];
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
10
|
+
import { useMemo, useCallback } from 'react';
|
|
11
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
12
|
+
import { ItemHoverTopOptions } from '@scaleflex/widget-common';
|
|
13
|
+
import { Download, More } from '@scaleflex/icons';
|
|
14
|
+
import { selectIsUserPermittedToDisplayFile } from '@scaleflex/widget-core/lib/slices/user.slice';
|
|
15
|
+
import { PERMISSIONS } from '@scaleflex/widget-utils/lib/constants';
|
|
16
|
+
import { useDownloadConsentModal } from '../../../Modals';
|
|
17
|
+
import { downloadItems } from '../../../../thunks/downloads.thunks';
|
|
18
|
+
import { useExplorer } from '../../../../hooks';
|
|
19
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
+
var FolderTopOptions = function FolderTopOptions(_ref) {
|
|
21
|
+
var folder = _ref.folder,
|
|
22
|
+
onContextMenu = _ref.onContextMenu,
|
|
23
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
24
|
+
var dispatch = useDispatch();
|
|
25
|
+
var _useExplorer = useExplorer(),
|
|
26
|
+
i18n = _useExplorer.i18n,
|
|
27
|
+
_useExplorer$opts = _useExplorer.opts,
|
|
28
|
+
preventDownloadDefaultBehavior = _useExplorer$opts.preventDownloadDefaultBehavior,
|
|
29
|
+
noImgOperationsAndDownload = _useExplorer$opts.noImgOperationsAndDownload;
|
|
30
|
+
var triggerDownloadConsentModal = useDownloadConsentModal();
|
|
31
|
+
var isUserPermittedToDisplayFile = useSelector(selectIsUserPermittedToDisplayFile);
|
|
32
|
+
var _useExplorer2 = useExplorer(),
|
|
33
|
+
checkFileFolderPermissions = _useExplorer2.checkFileFolderPermissions;
|
|
34
|
+
var notifyAndDownload = useCallback(function (event) {
|
|
35
|
+
event.stopPropagation();
|
|
36
|
+
if (preventDownloadDefaultBehavior) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
triggerDownloadConsentModal(function () {
|
|
40
|
+
return dispatch(downloadItems({
|
|
41
|
+
items: [folder]
|
|
42
|
+
}));
|
|
43
|
+
});
|
|
44
|
+
}, [preventDownloadDefaultBehavior, triggerDownloadConsentModal]);
|
|
45
|
+
var options = useMemo(function () {
|
|
46
|
+
return [{
|
|
47
|
+
key: 'GridLi-DownloadFolder',
|
|
48
|
+
Icon: Download,
|
|
49
|
+
iconSize: 12,
|
|
50
|
+
onClick: notifyAndDownload,
|
|
51
|
+
hidden: noImgOperationsAndDownload || preventDownloadDefaultBehavior,
|
|
52
|
+
disabled: !checkFileFolderPermissions({
|
|
53
|
+
permissionsToCheck: [PERMISSIONS.DISPLAY],
|
|
54
|
+
permissionsList: folder.permissions
|
|
55
|
+
}),
|
|
56
|
+
disabledTooltip: i18n('mutualizedFileOptionPermissionsMutedHint'),
|
|
57
|
+
testId: 'fmaw-explorer-grid_folder_top_options_download'
|
|
58
|
+
}, {
|
|
59
|
+
key: 'GridLi-OpenMenu',
|
|
60
|
+
Icon: More,
|
|
61
|
+
iconSize: 12,
|
|
62
|
+
onClick: onContextMenu
|
|
63
|
+
}];
|
|
64
|
+
}, [folder, i18n, preventDownloadDefaultBehavior, notifyAndDownload, isUserPermittedToDisplayFile, checkFileFolderPermissions]);
|
|
65
|
+
return /*#__PURE__*/_jsx(ItemHoverTopOptions, _objectSpread({
|
|
66
|
+
options: options,
|
|
67
|
+
onContextMenu: onContextMenu
|
|
68
|
+
}, props));
|
|
69
|
+
};
|
|
70
|
+
export default FolderTopOptions;
|