@scaleflex/widget-explorer 0.0.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 +11924 -0
- package/LICENSE +21 -0
- package/README.md +1258 -0
- package/dist/style.css +1850 -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 +202 -0
- package/lib/components/ActionBar/SelectionMenu.js +129 -0
- package/lib/components/ActionBar/index.js +105 -0
- package/lib/components/AddFilesPanel/AddFiles.js +174 -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 +219 -0
- package/lib/components/AssetsList/GridView/FilesAccordion.js +76 -0
- package/lib/components/AssetsList/GridView/FilesSection/FileCell.js +276 -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 +187 -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/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/CropPanel/index.scss +55 -0
- package/lib/components/Details/Details.constants.js +70 -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 +45 -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/FileItem/style.scss +11 -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 +46 -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 +218 -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 +113 -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 +194 -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/PreUploadFileThumbnail/index.scss +19 -0
- package/lib/components/FileItem/index.js +162 -0
- package/lib/components/FileItem/index.scss +0 -0
- package/lib/components/FileWindowPanel/Body/ActionButtons.js +69 -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 +58 -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 +106 -0
- package/lib/components/FileWindowPanel/FileTabs/FileTabButtons.js +98 -0
- package/lib/components/FileWindowPanel/FileTabs/FileTabs.constants.js +46 -0
- package/lib/components/FileWindowPanel/FileTabs/FileTabs.styled.js +99 -0
- package/lib/components/FileWindowPanel/FileTabs/FileTabsList.js +88 -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 +182 -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 +234 -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 +22 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.styled.js +175 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.thunks.js +54 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.utils.js +23 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsContent.js +76 -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 +38 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTabs.js +32 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTopOptions.js +204 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/index.js +431 -0
- package/lib/components/FileWindowPanel/FileTabs/index.js +83 -0
- package/lib/components/FileWindowPanel/FileWindow.js +220 -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 +109 -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 +78 -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 +256 -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 +77 -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/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/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 +90 -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 +384 -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 +188 -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 +7 -0
- package/lib/components/Modals/index.scss +0 -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 +95 -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 +278 -0
- package/lib/components/TopBar/TopBar.styled.js +37 -0
- package/lib/components/TopBar/index.js +61 -0
- package/lib/components/TopBar/index.scss +20 -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 +212 -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 +25 -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 +93 -0
- package/lib/components/Views/ErroredViewPlaceholder.js +48 -0
- package/lib/components/Views/Views.constants.js +29 -0
- package/lib/components/Views/Views.styled.js +87 -0
- package/lib/components/Views/index.js +100 -0
- package/lib/components/common/DeleteModalItemText/DeleteModalItemText.styled.js +8 -0
- package/lib/components/common/DeleteModalItemText/index.js +24 -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 +311 -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 +61 -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 +1353 -0
- package/lib/hooks/index.js +16 -0
- package/lib/hooks/useAssetPicker.js +213 -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 +115 -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 +1560 -0
- package/lib/slices/common.slice.js +254 -0
- package/lib/slices/drag.slice.js +75 -0
- package/lib/slices/files.slice.js +1307 -0
- package/lib/slices/filters.slice.js +382 -0
- package/lib/slices/folders.slice.js +964 -0
- package/lib/slices/foldersTree.slice.js +501 -0
- package/lib/slices/index.js +32 -0
- package/lib/slices/metadata.slice.js +487 -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 +346 -0
- package/lib/style.scss +265 -0
- package/lib/thunks/archive.thunks.js +175 -0
- package/lib/thunks/downloads.thunks.js +416 -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 +65 -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 +55 -0
- package/types/index.d.ts +108 -0
|
@@ -0,0 +1,23 @@
|
|
|
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 = ["foldersUuids"];
|
|
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 } from 'react';
|
|
11
|
+
import { VirtualGrid } from '@scaleflex/widget-common';
|
|
12
|
+
import FolderCell from './FolderCell';
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
var FoldersSection = function FoldersSection(_ref) {
|
|
15
|
+
var foldersUuids = _ref.foldersUuids,
|
|
16
|
+
others = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
return /*#__PURE__*/_jsx(VirtualGrid, {
|
|
18
|
+
items: foldersUuids,
|
|
19
|
+
injectedItemPropName: "folderUuid",
|
|
20
|
+
children: /*#__PURE__*/_jsx(FolderCell, _objectSpread({}, others))
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
export default /*#__PURE__*/memo(FoldersSection);
|
|
@@ -0,0 +1,77 @@
|
|
|
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 GridLayoutFoldersSkeleton = function GridLayoutFoldersSkeleton(_ref) {
|
|
6
|
+
var hidePreviewSkeleton = _ref.hidePreviewSkeleton;
|
|
7
|
+
return /*#__PURE__*/_jsx(Styled.Accordion, {
|
|
8
|
+
expanded: true,
|
|
9
|
+
label: /*#__PURE__*/_jsx(Skeleton, {
|
|
10
|
+
width: 200
|
|
11
|
+
}),
|
|
12
|
+
style: {
|
|
13
|
+
marginTop: '12px'
|
|
14
|
+
},
|
|
15
|
+
detailStyle: {
|
|
16
|
+
margin: '0px'
|
|
17
|
+
},
|
|
18
|
+
hideIcon: true,
|
|
19
|
+
onContextMenu: function onContextMenu(e) {
|
|
20
|
+
return e.stopPropagation();
|
|
21
|
+
},
|
|
22
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
23
|
+
className: "filerobot-Provider-ItemCategory-wrapper",
|
|
24
|
+
children: /*#__PURE__*/_jsx(StyledGridView.SkeletonContainer, {
|
|
25
|
+
children: Array(18).fill().map(function (_, index) {
|
|
26
|
+
return /*#__PURE__*/_jsxs(Styled.FolderSectionItem, {
|
|
27
|
+
className: "item-folder",
|
|
28
|
+
children: [/*#__PURE__*/_jsx(Styled.FolderIcon, {}), /*#__PURE__*/_jsxs(Styled.FolderContent, {
|
|
29
|
+
role: "button",
|
|
30
|
+
$loading: true,
|
|
31
|
+
children: [!hidePreviewSkeleton && /*#__PURE__*/_jsxs(Styled.FolderPreviewGrid, {
|
|
32
|
+
children: [/*#__PURE__*/_jsx(Styled.PreviewGridLeftColumn, {
|
|
33
|
+
children: /*#__PURE__*/_jsx(Skeleton, {
|
|
34
|
+
height: "100%",
|
|
35
|
+
width: "100%"
|
|
36
|
+
})
|
|
37
|
+
}), /*#__PURE__*/_jsxs(Styled.PreviewGridRightColumn, {
|
|
38
|
+
children: [/*#__PURE__*/_jsx(Styled.PreviewGridImgWrapper, {
|
|
39
|
+
children: /*#__PURE__*/_jsx(Skeleton, {
|
|
40
|
+
height: "100%",
|
|
41
|
+
width: "100%"
|
|
42
|
+
})
|
|
43
|
+
}), /*#__PURE__*/_jsx(Styled.PreviewGridImgWrapper, {
|
|
44
|
+
children: /*#__PURE__*/_jsx(Skeleton, {
|
|
45
|
+
height: "100%",
|
|
46
|
+
width: "100%"
|
|
47
|
+
})
|
|
48
|
+
})]
|
|
49
|
+
})]
|
|
50
|
+
}), /*#__PURE__*/_jsxs(Styled.FolderInfo, {
|
|
51
|
+
children: [/*#__PURE__*/_jsx(Styled.FolderTitle, {
|
|
52
|
+
children: /*#__PURE__*/_jsx(Skeleton, {
|
|
53
|
+
width: 150
|
|
54
|
+
})
|
|
55
|
+
}), /*#__PURE__*/_jsxs(Styled.FolderSubTitle, {
|
|
56
|
+
size: "sm",
|
|
57
|
+
children: [/*#__PURE__*/_jsx(Styled.FolderSubTitleText, {
|
|
58
|
+
size: "sm",
|
|
59
|
+
children: /*#__PURE__*/_jsx(Skeleton, {
|
|
60
|
+
width: 66
|
|
61
|
+
})
|
|
62
|
+
}), /*#__PURE__*/_jsx(Styled.FolderSubTitleText, {
|
|
63
|
+
size: "sm",
|
|
64
|
+
children: /*#__PURE__*/_jsx(Skeleton, {
|
|
65
|
+
width: 66
|
|
66
|
+
})
|
|
67
|
+
})]
|
|
68
|
+
})]
|
|
69
|
+
})]
|
|
70
|
+
})]
|
|
71
|
+
}, index);
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
})
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
export default GridLayoutFoldersSkeleton;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import StyledVirtualGrid from '@scaleflex/widget-common/lib/VirtualGrid/VirtualGrid.styled';
|
|
5
|
+
|
|
6
|
+
// Same styles as VirtualGrid's container but with overflow: auto
|
|
7
|
+
var SkeletonContainer = styled(StyledVirtualGrid.GridContainer)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow: auto;\n"])));
|
|
8
|
+
var Styled = {
|
|
9
|
+
SkeletonContainer: SkeletonContainer
|
|
10
|
+
};
|
|
11
|
+
export default Styled;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var _templateObject;
|
|
2
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { FV } from '@scaleflex/widget-common';
|
|
5
|
+
var RowLabel = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n padding: ", ";\n position: sticky;\n top: -12px;\n background: white;\n z-index: 101;\n"])), function (_ref) {
|
|
6
|
+
var typography = _ref.theme.typography;
|
|
7
|
+
return typography.font[FV.LabelLarge];
|
|
8
|
+
}, function (_ref2) {
|
|
9
|
+
var padding = _ref2.padding;
|
|
10
|
+
return padding || '27px 24px 15px !important';
|
|
11
|
+
});
|
|
12
|
+
var Styled = {
|
|
13
|
+
RowLabel: RowLabel
|
|
14
|
+
};
|
|
15
|
+
export default Styled;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import Styled from '../../AssetsList.styled';
|
|
2
|
+
import StyledGridView from '../GridView.styled';
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
var SearchGridViewSkeleton = function SearchGridViewSkeleton() {
|
|
5
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
6
|
+
_ref$count = _ref.count,
|
|
7
|
+
count = _ref$count === void 0 ? 18 : _ref$count;
|
|
8
|
+
return /*#__PURE__*/_jsx("div", {
|
|
9
|
+
className: "filerobot-Provider-ItemCategory-wrapper",
|
|
10
|
+
children: /*#__PURE__*/_jsx(StyledGridView.SkeletonContainer, {
|
|
11
|
+
children: Array(count).fill().map(function (_, index) {
|
|
12
|
+
return /*#__PURE__*/_jsx(Styled.FileSectionItem, {
|
|
13
|
+
children: /*#__PURE__*/_jsxs(Styled.FileSectionItemWrapper, {
|
|
14
|
+
type: "button",
|
|
15
|
+
className: "filerobot-u-reset",
|
|
16
|
+
$loading: true,
|
|
17
|
+
children: [/*#__PURE__*/_jsx(Styled.FileSkeleton, {
|
|
18
|
+
bottom: "16%",
|
|
19
|
+
width: 150
|
|
20
|
+
}), /*#__PURE__*/_jsx(Styled.FileSkeleton, {
|
|
21
|
+
bottom: "5%",
|
|
22
|
+
width: 66
|
|
23
|
+
})]
|
|
24
|
+
})
|
|
25
|
+
}, index);
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
export default SearchGridViewSkeleton;
|
|
@@ -0,0 +1,97 @@
|
|
|
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 { Notification } from '@scaleflex/ui/core';
|
|
8
|
+
import SearchGridViewSkeleton from './SearchGridViewSkeleton';
|
|
9
|
+
import { useSearchView } from '../../SearchView.hook';
|
|
10
|
+
import { useExplorerI18n } from '../../../../hooks';
|
|
11
|
+
import FilesAccordion from '../FilesAccordion';
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
var SearchGridView = function SearchGridView(_ref) {
|
|
14
|
+
var openCurrentFolderContextMenu = _ref.openCurrentFolderContextMenu,
|
|
15
|
+
noTopMargin = _ref.noTopMargin,
|
|
16
|
+
containerWidth = _ref.containerWidth,
|
|
17
|
+
handleContextMenuToggle = _ref.handleContextMenuToggle,
|
|
18
|
+
handleNavigatingThroughArrows = _ref.handleNavigatingThroughArrows,
|
|
19
|
+
filesSectionProps = _ref.filesSectionProps,
|
|
20
|
+
children = _ref.children;
|
|
21
|
+
var _useSearchView = useSearchView(),
|
|
22
|
+
searchViewDetails = _useSearchView.searchViewDetails,
|
|
23
|
+
isNotificationVisible = _useSearchView.isNotificationVisible,
|
|
24
|
+
setIsNotificationVisible = _useSearchView.setIsNotificationVisible;
|
|
25
|
+
var i18n = useExplorerI18n();
|
|
26
|
+
var renderContent = function renderContent() {
|
|
27
|
+
var _ref2 = searchViewDetails || {},
|
|
28
|
+
showSkeletonLoader = _ref2.showSkeletonLoader,
|
|
29
|
+
noResultsContent = _ref2.noResultsContent,
|
|
30
|
+
itemsDetails = _ref2.itemsDetails;
|
|
31
|
+
if (showSkeletonLoader) return /*#__PURE__*/_jsx(SearchGridViewSkeleton, {});
|
|
32
|
+
if (noResultsContent) return children || noResultsContent;
|
|
33
|
+
if (itemsDetails) {
|
|
34
|
+
var firstRowLabel = itemsDetails.firstRowLabel,
|
|
35
|
+
firstRowLoading = itemsDetails.firstRowLoading,
|
|
36
|
+
_itemsDetails$firstRo = itemsDetails.firstRowFilesUuids,
|
|
37
|
+
firstRowFilesUuids = _itemsDetails$firstRo === void 0 ? [] : _itemsDetails$firstRo,
|
|
38
|
+
_itemsDetails$firstRo2 = itemsDetails.firstRowIsNoMoreFiles,
|
|
39
|
+
firstRowIsNoMoreFiles = _itemsDetails$firstRo2 === void 0 ? true : _itemsDetails$firstRo2,
|
|
40
|
+
firstRowFetchNextFiles = itemsDetails.firstRowFetchNextFiles,
|
|
41
|
+
_itemsDetails$showSec = itemsDetails.showSecondRow,
|
|
42
|
+
showSecondRow = _itemsDetails$showSec === void 0 ? true : _itemsDetails$showSec,
|
|
43
|
+
secondRowLabel = itemsDetails.secondRowLabel,
|
|
44
|
+
_itemsDetails$secondR = itemsDetails.secondRowFilesUuids,
|
|
45
|
+
secondRowFilesUuids = _itemsDetails$secondR === void 0 ? [] : _itemsDetails$secondR,
|
|
46
|
+
_itemsDetails$secondR2 = itemsDetails.secondRowLoading,
|
|
47
|
+
secondRowLoading = _itemsDetails$secondR2 === void 0 ? false : _itemsDetails$secondR2,
|
|
48
|
+
_itemsDetails$secondR3 = itemsDetails.secondRowIsNoMoreFiles,
|
|
49
|
+
secondRowIsNoMoreFiles = _itemsDetails$secondR3 === void 0 ? true : _itemsDetails$secondR3,
|
|
50
|
+
secondRowFetchNextFiles = itemsDetails.secondRowFetchNextFiles,
|
|
51
|
+
infoMessage = itemsDetails.infoMessage;
|
|
52
|
+
var commonProps = {
|
|
53
|
+
noTopMargin: noTopMargin,
|
|
54
|
+
containerWidth: containerWidth,
|
|
55
|
+
filesSectionProps: filesSectionProps,
|
|
56
|
+
handleContextMenuToggle: handleContextMenuToggle,
|
|
57
|
+
handleNavigatingThroughArrows: handleNavigatingThroughArrows,
|
|
58
|
+
openCurrentFolderContextMenu: openCurrentFolderContextMenu
|
|
59
|
+
};
|
|
60
|
+
var renderInfoMessage = function renderInfoMessage() {
|
|
61
|
+
if (!(infoMessage && isNotificationVisible)) return;
|
|
62
|
+
return /*#__PURE__*/_jsx("div", {
|
|
63
|
+
className: "filerobot-Provider-ItemCategory-wrapper",
|
|
64
|
+
children: /*#__PURE__*/_jsx(Notification, {
|
|
65
|
+
status: "info",
|
|
66
|
+
message: infoMessage,
|
|
67
|
+
onClose: function onClose() {
|
|
68
|
+
return setIsNotificationVisible(false);
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
74
|
+
children: [renderInfoMessage(), children, firstRowFilesUuids.length > 0 && /*#__PURE__*/_jsx(FilesAccordion, _objectSpread({
|
|
75
|
+
label: firstRowLabel,
|
|
76
|
+
isLoading: firstRowLoading,
|
|
77
|
+
filesUuids: firstRowFilesUuids,
|
|
78
|
+
noMoreFiles: firstRowIsNoMoreFiles,
|
|
79
|
+
fetchNextFiles: firstRowFetchNextFiles,
|
|
80
|
+
hideAccordionHeader: !firstRowLabel
|
|
81
|
+
}, commonProps)), showSecondRow && /*#__PURE__*/_jsx(FilesAccordion, _objectSpread({
|
|
82
|
+
label: secondRowLabel || i18n('searchExtendedWithCountLabel', {
|
|
83
|
+
files_count: (secondRowFilesUuids === null || secondRowFilesUuids === void 0 ? void 0 : secondRowFilesUuids.length) || 0
|
|
84
|
+
}),
|
|
85
|
+
isLoading: secondRowLoading,
|
|
86
|
+
filesUuids: secondRowFilesUuids,
|
|
87
|
+
noMoreFiles: secondRowIsNoMoreFiles,
|
|
88
|
+
fetchNextFiles: secondRowFetchNextFiles
|
|
89
|
+
}, commonProps))]
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
94
|
+
children: renderContent()
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
export default SearchGridView;
|
|
@@ -0,0 +1,196 @@
|
|
|
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 = ["foldersUuids", "filesUuids", "hasFolders", "hasFiles", "isFoldersLoading", "isFilesLoading", "handleNavigatingThroughArrows", "containerWidth", "handleContextMenuToggle", "noTopMargin", "hideAccordionHeader", "openCurrentFolderContextMenu", "fetchNextFiles", "fetchNextFolders", "scrollableElem"];
|
|
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 _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
9
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
11
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
12
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
14
|
+
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; }
|
|
15
|
+
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; }
|
|
16
|
+
import { useState } from 'react';
|
|
17
|
+
import { useUpdateEffect } from '@scaleflex/widget-common/lib/hooks';
|
|
18
|
+
import { useSelector, useDispatch } from 'react-redux';
|
|
19
|
+
import { NoResult } from '@scaleflex/icons';
|
|
20
|
+
import { Label } from '@scaleflex/ui/core';
|
|
21
|
+
import Styled from '../AssetsList.styled';
|
|
22
|
+
import FoldersSection from './FoldersSection';
|
|
23
|
+
import SearchGridView from './SearchGridView';
|
|
24
|
+
import InfiniteScroll from '../../InfiniteScroll/InfiniteScroll';
|
|
25
|
+
import { useExplorer, useToLocaleNumber } from '../../../hooks';
|
|
26
|
+
import { selectFoldersStats, selectIsFolderFilesRecursiveFetch, selectNoMoreFolders } from '../../../slices/folders.slice';
|
|
27
|
+
import { selectIsSimilarSearchActive, selectIsAiSearch } from '../../../slices/search.slice';
|
|
28
|
+
import { selectIsFoldersView, selectIsSearchMode } from '../../../slices/views.slice';
|
|
29
|
+
import { selectIsNoMoreFiles, selectFilesStats } from '../../../slices/files.slice';
|
|
30
|
+
import { selectIsFiltersActive } from '../../../slices/filters.slice';
|
|
31
|
+
import { scrollToTopButtonToggled, topSectionElevated } from '../../../slices/topSection.slice';
|
|
32
|
+
import GridLayoutFoldersSkeleton from './FoldersSkeleton';
|
|
33
|
+
import GridLayoutFilesSkeleton from './FilesSkeleton';
|
|
34
|
+
import FilesAccordion from './FilesAccordion';
|
|
35
|
+
import Placeholder from '../../Filters/Placeholder';
|
|
36
|
+
|
|
37
|
+
// TODO: This component needs to be refactored, to split FoldersSection with its skeleton/selectors/functions into a component
|
|
38
|
+
// and another for FilesSection and avoid the usage of isAssetsView, isFoldersView....etc. if possible. or maybe compose it with ListView as they are almost similar?
|
|
39
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
40
|
+
var GridView = function GridView(_ref) {
|
|
41
|
+
var foldersUuids = _ref.foldersUuids,
|
|
42
|
+
filesUuids = _ref.filesUuids,
|
|
43
|
+
hasFolders = _ref.hasFolders,
|
|
44
|
+
hasFiles = _ref.hasFiles,
|
|
45
|
+
isFoldersLoading = _ref.isFoldersLoading,
|
|
46
|
+
isFilesLoading = _ref.isFilesLoading,
|
|
47
|
+
handleNavigatingThroughArrows = _ref.handleNavigatingThroughArrows,
|
|
48
|
+
containerWidth = _ref.containerWidth,
|
|
49
|
+
handleContextMenuToggle = _ref.handleContextMenuToggle,
|
|
50
|
+
noTopMargin = _ref.noTopMargin,
|
|
51
|
+
hideAccordionHeader = _ref.hideAccordionHeader,
|
|
52
|
+
openCurrentFolderContextMenu = _ref.openCurrentFolderContextMenu,
|
|
53
|
+
fetchNextFiles = _ref.fetchNextFiles,
|
|
54
|
+
fetchNextFolders = _ref.fetchNextFolders,
|
|
55
|
+
scrollableElem = _ref.scrollableElem,
|
|
56
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
57
|
+
var dispatch = useDispatch();
|
|
58
|
+
var _useExplorer = useExplorer(),
|
|
59
|
+
i18n = _useExplorer.i18n;
|
|
60
|
+
var toLocaleNumber = useToLocaleNumber();
|
|
61
|
+
var _useSelector = useSelector(selectFoldersStats),
|
|
62
|
+
foldersStatsLoading = _useSelector.loading,
|
|
63
|
+
totalFoldersCount = _useSelector.totalFoldersCount,
|
|
64
|
+
totalFilesCount = _useSelector.totalFilesCount;
|
|
65
|
+
var _useSelector2 = useSelector(selectFilesStats),
|
|
66
|
+
filesStatsLoading = _useSelector2.loading,
|
|
67
|
+
filesCount = _useSelector2.filesCount;
|
|
68
|
+
var isSearchMode = useSelector(selectIsSearchMode);
|
|
69
|
+
var isFiltersActive = useSelector(selectIsFiltersActive);
|
|
70
|
+
var isFoldersView = useSelector(selectIsFoldersView);
|
|
71
|
+
var noMoreFiles = useSelector(selectIsNoMoreFiles);
|
|
72
|
+
var noMoreFolders = useSelector(selectNoMoreFolders);
|
|
73
|
+
var isAiSearch = useSelector(selectIsAiSearch);
|
|
74
|
+
var isSimilarSearchActive = useSelector(selectIsSimilarSearchActive);
|
|
75
|
+
var isFolderFilesFetchedRecursively = useSelector(selectIsFolderFilesRecursiveFetch);
|
|
76
|
+
var isFiltersOrSearchActive = isFiltersActive || isSearchMode;
|
|
77
|
+
var _useState = useState(!isFiltersOrSearchActive),
|
|
78
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
79
|
+
showFolders = _useState2[0],
|
|
80
|
+
setShowFolders = _useState2[1];
|
|
81
|
+
var foldersLength = (foldersUuids === null || foldersUuids === void 0 ? void 0 : foldersUuids.length) || 0;
|
|
82
|
+
var filesLength = filesUuids.length;
|
|
83
|
+
var isFoldersSectionVisible = isFoldersView && !isFolderFilesFetchedRecursively;
|
|
84
|
+
useUpdateEffect(function () {
|
|
85
|
+
// Auto Collapse/Fold the folders accordion on applying the first filter.
|
|
86
|
+
setShowFolders(!isFiltersActive);
|
|
87
|
+
}, [isFiltersActive]);
|
|
88
|
+
useUpdateEffect(function () {
|
|
89
|
+
// Auto Collapse/Fold the folders accordion on applying the first search.
|
|
90
|
+
setShowFolders(!isSearchMode);
|
|
91
|
+
}, [isSearchMode]);
|
|
92
|
+
var handleToggleFolders = function handleToggleFolders() {
|
|
93
|
+
setShowFolders(!showFolders);
|
|
94
|
+
};
|
|
95
|
+
var onScroll = function onScroll(e) {
|
|
96
|
+
if ((e === null || e === void 0 ? void 0 : e.target.scrollTop) > 0) {
|
|
97
|
+
dispatch(topSectionElevated(true));
|
|
98
|
+
}
|
|
99
|
+
if ((e === null || e === void 0 ? void 0 : e.target.scrollTop) >= 500) {
|
|
100
|
+
dispatch(scrollToTopButtonToggled(true));
|
|
101
|
+
}
|
|
102
|
+
if ((e === null || e === void 0 ? void 0 : e.target.scrollTop) === 0) {
|
|
103
|
+
dispatch(topSectionElevated(false));
|
|
104
|
+
dispatch(scrollToTopButtonToggled(false));
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
var getFilesCount = function getFilesCount() {
|
|
108
|
+
var isFilesLoading = (!isFoldersView || typeof foldersStatsLoading === 'undefined') && filesStatsLoading;
|
|
109
|
+
var isLoadingState = filesStatsLoading && foldersStatsLoading;
|
|
110
|
+
if (isFilesLoading || isLoadingState) return '...';
|
|
111
|
+
return toLocaleNumber(filesCount || totalFilesCount || filesLength);
|
|
112
|
+
};
|
|
113
|
+
var foldersSection = isFoldersSectionVisible && /*#__PURE__*/_jsxs(_Fragment, {
|
|
114
|
+
children: [isFoldersLoading && /*#__PURE__*/_jsx(GridLayoutFoldersSkeleton, {}), hasFolders && !isFoldersLoading && /*#__PURE__*/_jsxs(_Fragment, {
|
|
115
|
+
children: [/*#__PURE__*/_jsx(Styled.Accordion, {
|
|
116
|
+
expanded: showFolders,
|
|
117
|
+
hideHeader: hideAccordionHeader,
|
|
118
|
+
noTopMargin: noTopMargin,
|
|
119
|
+
label: i18n(isFiltersOrSearchActive ? 'foldersViewSubFoldersWithCountLabel' : 'foldersViewFoldersWithCountLabel', {
|
|
120
|
+
folders_count: foldersStatsLoading ? '...' : toLocaleNumber(totalFoldersCount || foldersLength)
|
|
121
|
+
}),
|
|
122
|
+
onClick: handleToggleFolders,
|
|
123
|
+
detailStyle: {
|
|
124
|
+
margin: '0px'
|
|
125
|
+
},
|
|
126
|
+
onContextMenu: function onContextMenu(e) {
|
|
127
|
+
return e.stopPropagation();
|
|
128
|
+
},
|
|
129
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
130
|
+
className: "filerobot-Provider-ItemCategory-wrapper",
|
|
131
|
+
onContextMenu: openCurrentFolderContextMenu,
|
|
132
|
+
id: "foldersScrollableElement",
|
|
133
|
+
children: showFolders && /*#__PURE__*/_jsx(InfiniteScroll, {
|
|
134
|
+
dataLength: foldersUuids.length,
|
|
135
|
+
next: fetchNextFolders,
|
|
136
|
+
hasMore: !noMoreFolders,
|
|
137
|
+
scrollableTarget: scrollableElem,
|
|
138
|
+
targetedScrollElement: "foldersScrollableElement",
|
|
139
|
+
onScroll: onScroll,
|
|
140
|
+
children: /*#__PURE__*/_jsx(FoldersSection, _objectSpread({
|
|
141
|
+
foldersUuids: foldersUuids,
|
|
142
|
+
handleContextMenuToggle: handleContextMenuToggle,
|
|
143
|
+
handleNavigatingThroughArrows: handleNavigatingThroughArrows
|
|
144
|
+
}, props))
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
}), isSearchMode && !hasFiles && /*#__PURE__*/_jsx(Placeholder, {
|
|
148
|
+
"data-placeholder": true,
|
|
149
|
+
className: "filerobot-Provider-Filters-noResults-placeholder",
|
|
150
|
+
icon: /*#__PURE__*/_jsx(NoResult, {
|
|
151
|
+
size: 120
|
|
152
|
+
}),
|
|
153
|
+
title: /*#__PURE__*/_jsx(Label, {
|
|
154
|
+
size: "xl",
|
|
155
|
+
children: i18n('filtersNoResult')
|
|
156
|
+
}),
|
|
157
|
+
desc: i18n('explorerAssetsListEmptyLocalSearchHint')
|
|
158
|
+
})]
|
|
159
|
+
})]
|
|
160
|
+
});
|
|
161
|
+
if (isSearchMode && !isAiSearch) {
|
|
162
|
+
return /*#__PURE__*/_jsx(SearchGridView, {
|
|
163
|
+
openCurrentFolderContextMenu: openCurrentFolderContextMenu,
|
|
164
|
+
containerWidth: containerWidth,
|
|
165
|
+
handleContextMenuToggle: handleContextMenuToggle,
|
|
166
|
+
handleNavigatingThroughArrows: handleNavigatingThroughArrows,
|
|
167
|
+
noTopMargin: noTopMargin,
|
|
168
|
+
filesSectionProps: props,
|
|
169
|
+
children: foldersSection
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
173
|
+
children: [foldersSection, isFilesLoading && /*#__PURE__*/_jsx(GridLayoutFilesSkeleton, {
|
|
174
|
+
hideAccordionHeader: hideAccordionHeader
|
|
175
|
+
}), hasFiles && !isFilesLoading && /*#__PURE__*/_jsx(FilesAccordion, {
|
|
176
|
+
containerWidth: containerWidth,
|
|
177
|
+
fetchNextFiles: fetchNextFiles,
|
|
178
|
+
filesUuids: filesUuids,
|
|
179
|
+
handleContextMenuToggle: handleContextMenuToggle,
|
|
180
|
+
handleNavigatingThroughArrows: handleNavigatingThroughArrows,
|
|
181
|
+
hideAccordionHeader: hideAccordionHeader,
|
|
182
|
+
label: i18n(isFiltersActive ? 'explorerFilesAccordionSearchResults' : 'mutualizedFilesWithCountLabel', {
|
|
183
|
+
files_count: getFilesCount()
|
|
184
|
+
}),
|
|
185
|
+
noMoreFiles: noMoreFiles,
|
|
186
|
+
noTopMargin: noTopMargin,
|
|
187
|
+
onScroll: onScroll,
|
|
188
|
+
openCurrentFolderContextMenu: openCurrentFolderContextMenu,
|
|
189
|
+
filesSectionProps: props,
|
|
190
|
+
scrollableElem: scrollableElem,
|
|
191
|
+
isAiSearch: isAiSearch,
|
|
192
|
+
isSimilarSearchActive: isSimilarSearchActive
|
|
193
|
+
})]
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
export default GridView;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
3
|
+
import { LIST_VIEW_COLS_OBJECTS, LIST_VIEW_COLS_IDS } from '@scaleflex/widget-utils/lib/constants';
|
|
4
|
+
import { MAIN_SORT_OPTIONS, SORT_ORDER } from '../../../common/Sort/Sort.constants';
|
|
5
|
+
import { useExplorer } from '../../../../hooks';
|
|
6
|
+
import { filesSelected, selectAllFiles, selectIsAllFilesSelected, selectIsAllItemsSelected, selectIsFileSelected } from '../../../../slices/selections.slice';
|
|
7
|
+
import Styled from '../ListView.styled';
|
|
8
|
+
import ListViewColumnsMenu from '../ColumnsMenu';
|
|
9
|
+
import { searchOrListViewFiles } from '../../../../slices/views.slice';
|
|
10
|
+
import { selectFilesSortOrder, selectFilesSortedBy } from '../../../../slices/files.slice';
|
|
11
|
+
import { selectIsSearchFetchType } from '../../../../slices/search.slice';
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
var checkboxOnChange = function checkboxOnChange() {};
|
|
14
|
+
var getColumns = function getColumns(_ref) {
|
|
15
|
+
var isFastToken = _ref.isFastToken;
|
|
16
|
+
return [{
|
|
17
|
+
labelI18n: LIST_VIEW_COLS_OBJECTS.TYPE.i18nStr,
|
|
18
|
+
id: LIST_VIEW_COLS_IDS.TYPE,
|
|
19
|
+
order: 1
|
|
20
|
+
}, {
|
|
21
|
+
labelI18n: LIST_VIEW_COLS_OBJECTS.VISIBILITY.i18nStr,
|
|
22
|
+
id: LIST_VIEW_COLS_IDS.VISIBILITY,
|
|
23
|
+
order: 2
|
|
24
|
+
}, {
|
|
25
|
+
labelI18n: LIST_VIEW_COLS_OBJECTS.TAGS.i18nStr,
|
|
26
|
+
id: LIST_VIEW_COLS_IDS.TAGS,
|
|
27
|
+
order: 3
|
|
28
|
+
}, {
|
|
29
|
+
labelI18n: LIST_VIEW_COLS_OBJECTS.LABELS.i18nStr,
|
|
30
|
+
id: LIST_VIEW_COLS_IDS.LABELS,
|
|
31
|
+
order: 4,
|
|
32
|
+
hide: function hide(_ref2) {
|
|
33
|
+
var isFastToken = _ref2.isFastToken;
|
|
34
|
+
return isFastToken;
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
labelI18n: LIST_VIEW_COLS_OBJECTS.LAST_MODIFY.i18nStr,
|
|
38
|
+
id: LIST_VIEW_COLS_IDS.LAST_MODIFY,
|
|
39
|
+
order: 5
|
|
40
|
+
}].filter(function (column) {
|
|
41
|
+
var _column$hide;
|
|
42
|
+
return !((_column$hide = column.hide) !== null && _column$hide !== void 0 && _column$hide.call(column, {
|
|
43
|
+
isFastToken: isFastToken
|
|
44
|
+
}));
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
var AssetsSectionTableHeader = function AssetsSectionTableHeader(_ref3) {
|
|
48
|
+
var visibleColumns = _ref3.visibleColumns,
|
|
49
|
+
setVisibleColumns = _ref3.setVisibleColumns,
|
|
50
|
+
columnId = _ref3.columnId,
|
|
51
|
+
sortProps = _ref3.sortProps;
|
|
52
|
+
var dispatch = useDispatch();
|
|
53
|
+
var _useExplorer = useExplorer(),
|
|
54
|
+
i18n = _useExplorer.i18n,
|
|
55
|
+
_useExplorer$opts = _useExplorer.opts,
|
|
56
|
+
disableMultipleSelect = _useExplorer$opts.disableMultipleSelect,
|
|
57
|
+
isFastToken = _useExplorer$opts.isFastToken;
|
|
58
|
+
var isFileSelected = useSelector(selectIsFileSelected);
|
|
59
|
+
var isAllSelected = useSelector(selectIsAllItemsSelected);
|
|
60
|
+
var isAllFilesSelected = useSelector(selectIsAllFilesSelected);
|
|
61
|
+
var internalSortBy = useSelector(selectFilesSortedBy);
|
|
62
|
+
var internalSortOrder = useSelector(selectFilesSortOrder);
|
|
63
|
+
var _ref4 = sortProps || {},
|
|
64
|
+
_ref4$options = _ref4.options,
|
|
65
|
+
sortOptions = _ref4$options === void 0 ? MAIN_SORT_OPTIONS : _ref4$options,
|
|
66
|
+
_ref4$sortBy = _ref4.sortBy,
|
|
67
|
+
sortBy = _ref4$sortBy === void 0 ? internalSortBy : _ref4$sortBy,
|
|
68
|
+
_ref4$sortOrder = _ref4.sortOrder,
|
|
69
|
+
sortOrder = _ref4$sortOrder === void 0 ? internalSortOrder : _ref4$sortOrder,
|
|
70
|
+
onSortChange = _ref4.onChange,
|
|
71
|
+
sortDisabled = _ref4.disabled,
|
|
72
|
+
useFilesSort = _ref4.useFilesSort;
|
|
73
|
+
var isSearchViewSorting = useSelector(selectIsSearchFetchType);
|
|
74
|
+
var isUseInternalSort = typeof onSortChange !== 'function' || useFilesSort;
|
|
75
|
+
var isAscOrder = (isUseInternalSort ? internalSortOrder : sortOrder) === SORT_ORDER.ASC;
|
|
76
|
+
var _LIST_VIEW_COLS_OBJEC = LIST_VIEW_COLS_OBJECTS[columnId],
|
|
77
|
+
i18nStr = _LIST_VIEW_COLS_OBJEC.i18nStr,
|
|
78
|
+
sortValue = _LIST_VIEW_COLS_OBJEC.sortValue;
|
|
79
|
+
var isNotAllowedViewSort = useMemo(function () {
|
|
80
|
+
return sortDisabled || !sortOptions.find(function () {
|
|
81
|
+
var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
82
|
+
value = _ref5.value;
|
|
83
|
+
return value === sortValue;
|
|
84
|
+
});
|
|
85
|
+
}, [sortOptions, isSearchViewSorting, sortValue, sortDisabled]);
|
|
86
|
+
var columns = useMemo(function () {
|
|
87
|
+
return getColumns({
|
|
88
|
+
isFastToken: isFastToken
|
|
89
|
+
});
|
|
90
|
+
}, [isFastToken]);
|
|
91
|
+
var isFirstColumn = columnId === LIST_VIEW_COLS_IDS.NAME;
|
|
92
|
+
var isSortActive = (isUseInternalSort ? internalSortBy : sortBy) === sortValue;
|
|
93
|
+
var isAllAssetsSelected = isAllFilesSelected || isAllSelected;
|
|
94
|
+
var showIntermediateCheckbox = !isAllAssetsSelected && isFileSelected;
|
|
95
|
+
var handleChangeSort = function handleChangeSort() {
|
|
96
|
+
if (sortDisabled) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
var nextSortOrder = isAscOrder ? SORT_ORDER.DSC : SORT_ORDER.ASC;
|
|
100
|
+
|
|
101
|
+
// if there is sorting's onChange function is provided, then use it instead of internal sorting, otherwise use files internal sorting.
|
|
102
|
+
if (typeof onSortChange === 'function') {
|
|
103
|
+
var isSortValueChanged = sortValue !== sortBy;
|
|
104
|
+
if (isSortValueChanged) nextSortOrder = SORT_ORDER.ASC;
|
|
105
|
+
onSortChange(sortValue, nextSortOrder);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (sortValue !== internalSortBy) nextSortOrder = SORT_ORDER.ASC;
|
|
109
|
+
dispatch(searchOrListViewFiles({
|
|
110
|
+
withStats: false,
|
|
111
|
+
sorting: [sortValue, nextSortOrder]
|
|
112
|
+
}));
|
|
113
|
+
};
|
|
114
|
+
var toggleSelectAllHandler = function toggleSelectAllHandler(event) {
|
|
115
|
+
event.stopPropagation();
|
|
116
|
+
if (isFileSelected) {
|
|
117
|
+
dispatch(filesSelected([]));
|
|
118
|
+
} else {
|
|
119
|
+
dispatch(selectAllFiles());
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
return /*#__PURE__*/_jsxs(Styled.InnerHeaderTableCell, {
|
|
123
|
+
children: [isFirstColumn && !disableMultipleSelect && /*#__PURE__*/_jsxs(_Fragment, {
|
|
124
|
+
children: [/*#__PURE__*/_jsx(Styled.CheckBox, {
|
|
125
|
+
// TODO: fix
|
|
126
|
+
// we use onClick instead of onChange as onChange causes multiple rerenders
|
|
127
|
+
// we add onChnage as emty function to avoid type warning
|
|
128
|
+
onClick: toggleSelectAllHandler,
|
|
129
|
+
onChange: checkboxOnChange,
|
|
130
|
+
checked: isFileSelected,
|
|
131
|
+
type: showIntermediateCheckbox ? 'intermediate' : 'checkbox'
|
|
132
|
+
}), /*#__PURE__*/_jsx(ListViewColumnsMenu, {
|
|
133
|
+
visibleColumns: visibleColumns,
|
|
134
|
+
setVisibleColumns: setVisibleColumns,
|
|
135
|
+
allColumns: columns
|
|
136
|
+
})]
|
|
137
|
+
}), !isNotAllowedViewSort ? /*#__PURE__*/_jsxs(Styled.SortLabel, {
|
|
138
|
+
onClick: handleChangeSort,
|
|
139
|
+
name: columnId,
|
|
140
|
+
sortable: !!sortValue,
|
|
141
|
+
color: "link-secondary",
|
|
142
|
+
size: "sm",
|
|
143
|
+
children: [i18n(i18nStr), /*#__PURE__*/_jsx(Styled.SortArrowIcon, {
|
|
144
|
+
name: "name",
|
|
145
|
+
$isAscOrder: isAscOrder,
|
|
146
|
+
$isActive: isSortActive,
|
|
147
|
+
size: 12
|
|
148
|
+
})]
|
|
149
|
+
}) : i18n(i18nStr)]
|
|
150
|
+
}, columnId);
|
|
151
|
+
};
|
|
152
|
+
export default AssetsSectionTableHeader;
|