@scaleflex/widget-explorer 4.3.0 → 4.4.0
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 +12 -0
- package/package.json +8 -8
- package/dist/style.css +0 -2197
- package/dist/style.min.css +0 -1
- package/lib/Explorer.styled.js +0 -48
- package/lib/components/ActionBar/ActionBar.styled.js +0 -103
- package/lib/components/ActionBar/DownloadWithExportButton.js +0 -203
- package/lib/components/ActionBar/SelectionMenu.js +0 -111
- package/lib/components/ActionBar/index.js +0 -105
- package/lib/components/AddFilesPanel/AddFiles.js +0 -183
- package/lib/components/AddFilesPanel/AddFiles.styled.js +0 -137
- package/lib/components/AddFilesPanel/index.js +0 -59
- package/lib/components/AiSwitcher/AiSwitcher.constants.js +0 -1
- package/lib/components/AiSwitcher/AiSwitcher.styled.js +0 -24
- package/lib/components/AiSwitcher/index.js +0 -81
- package/lib/components/AssetsList/AssetsList.styled.js +0 -217
- package/lib/components/AssetsList/GridView/FilesAccordion.js +0 -76
- package/lib/components/AssetsList/GridView/FilesSection/FileCell.js +0 -260
- package/lib/components/AssetsList/GridView/FilesSection/FileOverlayOptions.js +0 -140
- package/lib/components/AssetsList/GridView/FilesSection/FilesSection.styled.js +0 -15
- package/lib/components/AssetsList/GridView/FilesSection/index.js +0 -31
- package/lib/components/AssetsList/GridView/FilesSkeleton.js +0 -47
- package/lib/components/AssetsList/GridView/FoldersSection/FolderCell.js +0 -239
- package/lib/components/AssetsList/GridView/FoldersSection/FolderPreviewGrid.js +0 -106
- package/lib/components/AssetsList/GridView/FoldersSection/FolderTopOptions.js +0 -70
- package/lib/components/AssetsList/GridView/FoldersSection/index.js +0 -23
- package/lib/components/AssetsList/GridView/FoldersSkeleton.js +0 -77
- package/lib/components/AssetsList/GridView/GridView.styled.js +0 -11
- package/lib/components/AssetsList/GridView/SearchGridView/SearchGridView.styled.js +0 -15
- package/lib/components/AssetsList/GridView/SearchGridView/SearchGridViewSkeleton.js +0 -30
- package/lib/components/AssetsList/GridView/SearchGridView/index.js +0 -97
- package/lib/components/AssetsList/GridView/index.js +0 -196
- package/lib/components/AssetsList/ListView/AssetsSection/AssetsSectionTableHeader.js +0 -152
- package/lib/components/AssetsList/ListView/AssetsSection/AssetsSectionTableRow.js +0 -333
- package/lib/components/AssetsList/ListView/AssetsSection/index.js +0 -99
- package/lib/components/AssetsList/ListView/ColumnsMenu.js +0 -89
- package/lib/components/AssetsList/ListView/FilesAccordion.js +0 -74
- package/lib/components/AssetsList/ListView/FilesSkeleton.js +0 -68
- package/lib/components/AssetsList/ListView/FoldersSection/FoldersSectionTableHeader.js +0 -98
- package/lib/components/AssetsList/ListView/FoldersSection/FoldersSectionTableRow.js +0 -156
- package/lib/components/AssetsList/ListView/FoldersSection/index.js +0 -54
- package/lib/components/AssetsList/ListView/FoldersSkeleton.js +0 -67
- package/lib/components/AssetsList/ListView/ListView.styled.js +0 -181
- package/lib/components/AssetsList/ListView/ListView.utils.js +0 -30
- package/lib/components/AssetsList/ListView/SearchListView/index.js +0 -109
- package/lib/components/AssetsList/ListView/index.js +0 -203
- package/lib/components/AssetsList/ScrollToTop.js +0 -70
- package/lib/components/AssetsList/SearchView.hook.js +0 -241
- package/lib/components/AssetsList/__SearchTestPannel.js +0 -238
- package/lib/components/AssetsList/__SearchTestPannel.mock.js +0 -1
- package/lib/components/AssetsList/index.js +0 -266
- package/lib/components/AssetsList/relevanceBadge.js +0 -15
- package/lib/components/AssetsView/AssetsView.styled.js +0 -25
- package/lib/components/AssetsView/AssetsView.thunks.js +0 -64
- package/lib/components/AssetsView/index.js +0 -142
- package/lib/components/AuthExplorerView.js +0 -79
- package/lib/components/Breadcrumbs/BreadCrumbViews/BreadCrumbsViews.styled.js +0 -30
- package/lib/components/Breadcrumbs/BreadCrumbViews/index.js +0 -32
- package/lib/components/Breadcrumbs/Breadcrumb.js +0 -52
- package/lib/components/Breadcrumbs/Breadcrumbs.styled.js +0 -81
- package/lib/components/Breadcrumbs/BreadcrumbsSkeleton.js +0 -12
- package/lib/components/Breadcrumbs/index.js +0 -187
- package/lib/components/BulkEditPanel/BulkEdit.js +0 -330
- package/lib/components/BulkEditPanel/BulkEditPanel.styled.js +0 -62
- package/lib/components/BulkEditPanel/BulkEditPanel.utils.js +0 -55
- package/lib/components/BulkEditPanel/components/AssetsList/AssetsList.constants.js +0 -29
- package/lib/components/BulkEditPanel/components/AssetsList/AssetsList.js +0 -148
- package/lib/components/BulkEditPanel/components/AssetsList/AssetsList.styled.js +0 -81
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/Columns.styled.js +0 -99
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/FileMetadataField.js +0 -263
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/FileTagField.js +0 -228
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/FileTextField.js +0 -107
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/MetadataColumn.js +0 -142
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/TableRow.js +0 -139
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/TagsColumn.js +0 -58
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/TagsField.js +0 -80
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/TextColumn.js +0 -53
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/columns.utils.js +0 -272
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/getActiveColumn.js +0 -23
- package/lib/components/BulkEditPanel/components/AssetsList/FloatyPreview.js +0 -55
- package/lib/components/BulkEditPanel/components/AssetsList/FloatyPreview.styled.js +0 -21
- package/lib/components/BulkEditPanel/components/AssetsList/TableBody.js +0 -64
- package/lib/components/BulkEditPanel/components/AssetsList/TableHeader.js +0 -67
- package/lib/components/BulkEditPanel/components/BulkEditFooter.js +0 -33
- package/lib/components/BulkEditPanel/components/ConfirmationModal/ConfirmationModal.js +0 -47
- package/lib/components/BulkEditPanel/components/ConfirmationModal/ConfirmationModal.styled.js +0 -25
- package/lib/components/BulkEditPanel/components/MainContent/MainContent.js +0 -110
- package/lib/components/BulkEditPanel/components/MainContent/MainContent.styled.js +0 -12
- package/lib/components/BulkEditPanel/components/MainContent/index.js +0 -2
- package/lib/components/BulkEditPanel/components/Sidebar/Sidebar.styled.js +0 -53
- package/lib/components/BulkEditPanel/components/Sidebar/Sidebar.utils.js +0 -28
- package/lib/components/BulkEditPanel/components/Sidebar/index.js +0 -158
- package/lib/components/BulkEditPanel/components/Tabs/Metadata/Metadata.js +0 -246
- package/lib/components/BulkEditPanel/components/Tabs/Metadata/Metadata.styled.js +0 -17
- package/lib/components/BulkEditPanel/components/Tabs/Tags/Tags.js +0 -222
- package/lib/components/BulkEditPanel/components/Tabs/Tags/Tags.mixin.js +0 -20
- package/lib/components/BulkEditPanel/components/Tabs/Tags/Tags.styled.js +0 -123
- package/lib/components/BulkEditPanel/components/Tabs/Tags/TagsContianer.js +0 -31
- package/lib/components/BulkEditPanel/components/Tabs/Tags/TagsPaper.js +0 -95
- package/lib/components/BulkEditPanel/components/Tabs/Text/Text.js +0 -167
- package/lib/components/BulkEditPanel/components/Tabs/Text/Text.styled.js +0 -15
- package/lib/components/BulkEditPanel/components/Tabs/tabs.constants.js +0 -113
- package/lib/components/BulkEditPanel/components/Tabs/tabs.js +0 -43
- package/lib/components/BulkEditPanel/components/Tabs/tabs.utils.js +0 -239
- package/lib/components/BulkEditPanel/index.js +0 -28
- package/lib/components/ContextMenu/BeforeUploadMenu/index.js +0 -51
- package/lib/components/ContextMenu/ContextMenu.constants.js +0 -64
- package/lib/components/ContextMenu/ContextMenu.hooks.js +0 -35
- package/lib/components/ContextMenu/ContextMenu.styled.js +0 -107
- package/lib/components/ContextMenu/ContextMenuContent.js +0 -202
- package/lib/components/ContextMenu/ContextMenuItem.js +0 -142
- package/lib/components/ContextMenu/FileMenu/CollaborateSection/index.js +0 -33
- package/lib/components/ContextMenu/FileMenu/DeleteSection/index.js +0 -25
- package/lib/components/ContextMenu/FileMenu/EditSection/index.js +0 -42
- package/lib/components/ContextMenu/FileMenu/FindSection/index.js +0 -29
- package/lib/components/ContextMenu/FileMenu/index.js +0 -15
- package/lib/components/ContextMenu/FolderMenu/CollaborateSection/index.js +0 -17
- package/lib/components/ContextMenu/FolderMenu/DeleteSection/index.js +0 -41
- package/lib/components/ContextMenu/FolderMenu/EditSection/index.js +0 -49
- package/lib/components/ContextMenu/FolderMenu/FindSection/index.js +0 -49
- package/lib/components/ContextMenu/FolderMenu/FolderMenu.utils.js +0 -31
- package/lib/components/ContextMenu/FolderMenu/index.js +0 -14
- package/lib/components/ContextMenu/MenuOptions/AddVariationOption.js +0 -59
- package/lib/components/ContextMenu/MenuOptions/BulkEditOption.js +0 -47
- package/lib/components/ContextMenu/MenuOptions/CdnLinkOption.js +0 -54
- package/lib/components/ContextMenu/MenuOptions/DeleteOption.js +0 -70
- package/lib/components/ContextMenu/MenuOptions/DownloadOption.js +0 -88
- package/lib/components/ContextMenu/MenuOptions/EditImageOption.js +0 -63
- package/lib/components/ContextMenu/MenuOptions/EditVideoOption.js +0 -87
- package/lib/components/ContextMenu/MenuOptions/LocateFileOption.js +0 -45
- package/lib/components/ContextMenu/MenuOptions/ManagaAccessOption.js +0 -67
- package/lib/components/ContextMenu/MenuOptions/ManageDetailsOption.js +0 -52
- package/lib/components/ContextMenu/MenuOptions/MoveOption.js +0 -54
- package/lib/components/ContextMenu/MenuOptions/PreviewOption.js +0 -35
- package/lib/components/ContextMenu/MenuOptions/RenameOption.js +0 -66
- package/lib/components/ContextMenu/MenuOptions/TransformationOption.js +0 -63
- package/lib/components/ContextMenu/MultipleMenu/CollaborateSection/index.js +0 -31
- package/lib/components/ContextMenu/MultipleMenu/DeleteSection/index.js +0 -6
- package/lib/components/ContextMenu/MultipleMenu/EditSection/index.js +0 -14
- package/lib/components/ContextMenu/MultipleMenu/FindSection/index.js +0 -14
- package/lib/components/ContextMenu/MultipleMenu/index.js +0 -14
- package/lib/components/ContextMenu/SharedMenus/DownloadFolderSubMenu.js +0 -36
- package/lib/components/ContextMenu/SharedMenus/DownloadSubMenu.js +0 -70
- package/lib/components/ContextMenu/index.js +0 -34
- package/lib/components/ContextMenu/utils/calculateMenuHeight.js +0 -20
- package/lib/components/ContextMenu/utils/calculateMenuPosition.js +0 -42
- package/lib/components/ContextMenu/utils/createSeparator.js +0 -14
- package/lib/components/ContextMenu/utils/editMedia.js +0 -17
- package/lib/components/ContextMenu/utils/getFileLocation.js +0 -8
- package/lib/components/ContextMenu/utils/getFilteredOptions.js +0 -20
- package/lib/components/ContextMenu/utils/getProperFolderSelections.js +0 -7
- package/lib/components/ContextMenu/utils/isEmptyFolderSelection.js +0 -5
- package/lib/components/ContextMenu/utils/isFileContextMenu.js +0 -5
- package/lib/components/ContextMenu/utils/isFirstFileVisibilityPublic.js +0 -9
- package/lib/components/ContextMenu/utils/isMenuItemVisible.js +0 -5
- package/lib/components/ContextMenu/utils/isMixedFiles.js +0 -9
- package/lib/components/ContextMenu/utils/isMultipleSelection.js +0 -6
- package/lib/components/ContextMenu/utils/isSeparatorHidden.js +0 -7
- package/lib/components/ContextMenu/utils/triggerDownload.js +0 -45
- package/lib/components/CropPanel/CropOptions.js +0 -155
- package/lib/components/CropPanel/CropPanel.constants.js +0 -44
- package/lib/components/CropPanel/CropPanel.styled.js +0 -107
- package/lib/components/CropPanel/CropPanel.utils.js +0 -48
- package/lib/components/CropPanel/CropPanelContent.js +0 -209
- package/lib/components/CropPanel/ImageOptions.js +0 -326
- package/lib/components/CropPanel/ImageResize.js +0 -207
- package/lib/components/CropPanel/Option.js +0 -113
- package/lib/components/CropPanel/index.js +0 -22
- package/lib/components/Details/Details.constants.js +0 -75
- package/lib/components/Details/Details.utils.js +0 -232
- package/lib/components/Details/DetailsSideBar.styled.js +0 -139
- package/lib/components/Details/EditActionButtons/EditActionButtons.styled.js +0 -27
- package/lib/components/Details/EditActionButtons/index.js +0 -38
- package/lib/components/Details/FileDetails.js +0 -31
- package/lib/components/Details/FileItem/CustomMetadataTab.js +0 -50
- package/lib/components/Details/FileItem/FileItem.styled.js +0 -47
- package/lib/components/Details/FileItem/GeneralTab.js +0 -113
- package/lib/components/Details/FileItem/SharedFileEditData.js +0 -97
- package/lib/components/Details/FileItem/index.js +0 -2
- package/lib/components/Details/FolderDetails.js +0 -138
- package/lib/components/Details/FolderItemList/FolderListItem.js +0 -77
- package/lib/components/Details/FolderItemList/index.js +0 -62
- package/lib/components/Details/MultiItemsDetails.js +0 -69
- package/lib/components/Details/MultipleItems.js +0 -71
- package/lib/components/Details/TabChips.js +0 -51
- package/lib/components/Details/TabPanels.js +0 -42
- package/lib/components/Details/Title.js +0 -52
- package/lib/components/Details/index.js +0 -53
- package/lib/components/DnD/Dnd.styled.js +0 -11
- package/lib/components/DnD/DragImage.js +0 -61
- package/lib/components/DnD/index.js +0 -219
- package/lib/components/Drawer/Drawer.styled.js +0 -45
- package/lib/components/Drawer/Drawer.utils.js +0 -163
- package/lib/components/Drawer/Resizer.js +0 -141
- package/lib/components/Drawer/ResizerCore.js +0 -213
- package/lib/components/Drawer/index.js +0 -68
- package/lib/components/EmptyViewPlaceholder/EmptyViewPlaceholder.styled.js +0 -39
- package/lib/components/EmptyViewPlaceholder/index.js +0 -58
- package/lib/components/ExploreView.js +0 -46
- package/lib/components/ExplorerUI.js +0 -17
- package/lib/components/ExplorerWrapper.js +0 -114
- package/lib/components/FacetedSearch/DrawerBody/index.js +0 -42
- package/lib/components/FacetedSearch/DrawerWrapper/index.js +0 -83
- package/lib/components/FacetedSearch/FacetedSearch.constants.js +0 -27
- package/lib/components/FacetedSearch/FacetedSearch.styled.js +0 -101
- package/lib/components/FacetedSearch/FacetedSearch.utils.js +0 -3
- package/lib/components/FacetedSearch/Field/Date.js +0 -69
- package/lib/components/FacetedSearch/Field/Placeholder.js +0 -20
- package/lib/components/FacetedSearch/Field/Select.js +0 -136
- package/lib/components/FacetedSearch/Field/Switch.js +0 -59
- package/lib/components/FacetedSearch/Field/index.js +0 -27
- package/lib/components/FacetedSearch/GroupWrapper/index.js +0 -129
- package/lib/components/FacetedSearch/StaticFields/Date.js +0 -152
- package/lib/components/FacetedSearch/index.js +0 -12
- package/lib/components/FileItem/FileInfo/FileInfo.styled.js +0 -126
- package/lib/components/FileItem/FileInfo/FileInfo.utils.js +0 -13
- package/lib/components/FileItem/FileInfo/FileMetadata.js +0 -37
- package/lib/components/FileItem/FileInfo/FileName.js +0 -197
- package/lib/components/FileItem/FileInfo/index.js +0 -194
- package/lib/components/FileItem/FileItem.mixin.js +0 -22
- package/lib/components/FileItem/FileItem.styled.js +0 -54
- package/lib/components/FileItem/FileUploadTopOptions.js +0 -87
- package/lib/components/FileItem/PreUploadFileThumbnail/FileThumbnail.js +0 -61
- package/lib/components/FileItem/PreUploadFileThumbnail/PreUploadFileThumbnail.styled.js +0 -8
- package/lib/components/FileItem/PreUploadFileThumbnail/index.js +0 -27
- package/lib/components/FileItem/index.js +0 -164
- package/lib/components/FileWindowPanel/Body/ActionButtons.js +0 -70
- package/lib/components/FileWindowPanel/Body/Body.constants.js +0 -5
- package/lib/components/FileWindowPanel/Body/Body.styled.js +0 -196
- package/lib/components/FileWindowPanel/Body/BodyFile.js +0 -165
- package/lib/components/FileWindowPanel/Body/Footer.js +0 -60
- package/lib/components/FileWindowPanel/Body/Preview.js +0 -232
- package/lib/components/FileWindowPanel/Body/PreviewPlaceholder.js +0 -20
- package/lib/components/FileWindowPanel/Body/VideoEmbed.js +0 -80
- package/lib/components/FileWindowPanel/Body/index.js +0 -108
- package/lib/components/FileWindowPanel/FileTabs/FileTabButtons.js +0 -98
- package/lib/components/FileWindowPanel/FileTabs/FileTabs.constants.js +0 -50
- package/lib/components/FileWindowPanel/FileTabs/FileTabs.styled.js +0 -99
- package/lib/components/FileWindowPanel/FileTabs/FileTabsList.js +0 -91
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/EditableField.js +0 -78
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldLabel.js +0 -40
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldRow.js +0 -57
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldValue.js +0 -20
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldWithTooltip.js +0 -29
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralSection.js +0 -183
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralTab.constants.js +0 -2
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralTab.styled.js +0 -112
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralTabSkeleton.js +0 -70
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/TableSeparator.js +0 -10
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/index.js +0 -100
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/CustomMetadataSection.js +0 -247
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/EmbeddedMetadataSection.js +0 -31
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/MetadataTab.constants.js +0 -2
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/MetadataTab.styled.js +0 -134
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/MetadataTabSkeleton.js +0 -70
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/index.js +0 -181
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationItem.js +0 -78
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.constants.js +0 -26
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.styled.js +0 -177
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.thunks.js +0 -99
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.utils.js +0 -23
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsContent.js +0 -92
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsEditModalContent.js +0 -57
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsSearch.js +0 -44
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsSkeleton.js +0 -35
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTabNavigator.js +0 -38
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTabs.js +0 -40
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTopOptions.js +0 -204
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/index.js +0 -603
- package/lib/components/FileWindowPanel/FileTabs/index.js +0 -83
- package/lib/components/FileWindowPanel/FileWindow.js +0 -221
- package/lib/components/FileWindowPanel/FileWindow.styled.js +0 -19
- package/lib/components/FileWindowPanel/FileWindow.utils.js +0 -38
- package/lib/components/FileWindowPanel/Header/AfterUploadActionBtns.js +0 -69
- package/lib/components/FileWindowPanel/Header/BeforeUploadActionBtns.js +0 -100
- package/lib/components/FileWindowPanel/Header/FileWindowHeader.styled.js +0 -56
- package/lib/components/FileWindowPanel/Header/MutualActionBtns.js +0 -92
- package/lib/components/FileWindowPanel/Header/index.js +0 -109
- package/lib/components/FileWindowPanel/index.js +0 -60
- package/lib/components/Filters/Filters.constants.js +0 -358
- package/lib/components/Filters/Filters.styled.js +0 -235
- package/lib/components/Filters/Filters.utils.js +0 -536
- package/lib/components/Filters/FiltersContext.js +0 -59
- package/lib/components/Filters/FiltersSkeleton.js +0 -14
- package/lib/components/Filters/Groups/Date/index.js +0 -201
- package/lib/components/Filters/Groups/Folders/FoldersSkeleton.js +0 -43
- package/lib/components/Filters/Groups/Folders/index.js +0 -109
- package/lib/components/Filters/Groups/Image/Colors.js +0 -73
- package/lib/components/Filters/Groups/Image/Faces.js +0 -64
- package/lib/components/Filters/Groups/Image/Orientations.js +0 -64
- package/lib/components/Filters/Groups/Image/Resolutions.js +0 -65
- package/lib/components/Filters/Groups/Image/Tooltip.js +0 -14
- package/lib/components/Filters/Groups/Image/index.js +0 -104
- package/lib/components/Filters/Groups/LicenseExpiry/LicenseExpiry.styled.js +0 -17
- package/lib/components/Filters/Groups/LicenseExpiry/index.js +0 -97
- package/lib/components/Filters/Groups/Metadata/Advanced/ConditionSelector.js +0 -40
- package/lib/components/Filters/Groups/Metadata/Advanced/ExtraRow/ConditionSelector.js +0 -35
- package/lib/components/Filters/Groups/Metadata/Advanced/ExtraRow/ValueSelector.js +0 -33
- package/lib/components/Filters/Groups/Metadata/Advanced/ExtraRow/index.js +0 -18
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/AutoComplete.js +0 -56
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Boolean.js +0 -35
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Date.js +0 -36
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/GeoPointField.js +0 -30
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Numeric.js +0 -32
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Select.js +0 -55
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Tags.js +0 -21
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Text.js +0 -39
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/index.js +0 -52
- package/lib/components/Filters/Groups/Metadata/Advanced/KeySelector.js +0 -34
- package/lib/components/Filters/Groups/Metadata/Advanced/Row.js +0 -53
- package/lib/components/Filters/Groups/Metadata/Advanced/index.js +0 -48
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Date.js +0 -45
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Field.utils.js +0 -58
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Numeric.js +0 -51
- package/lib/components/Filters/Groups/Metadata/Basic/Field/OptionsPopup.js +0 -87
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Select.js +0 -168
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Switch.js +0 -41
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Tags.js +0 -38
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Text.js +0 -57
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Uri.js +0 -54
- package/lib/components/Filters/Groups/Metadata/Basic/Field/index.js +0 -46
- package/lib/components/Filters/Groups/Metadata/Basic/GroupWrapper.js +0 -79
- package/lib/components/Filters/Groups/Metadata/Basic/index.js +0 -80
- package/lib/components/Filters/Groups/Metadata/Metadata.constants.js +0 -42
- package/lib/components/Filters/Groups/Metadata/Metadata.styled.js +0 -150
- package/lib/components/Filters/Groups/Metadata/Metadata.utils.js +0 -160
- package/lib/components/Filters/Groups/Metadata/MetadataFiltersContext.js +0 -329
- package/lib/components/Filters/Groups/Metadata/Placeholder.js +0 -25
- package/lib/components/Filters/Groups/Metadata/common/TagsField/TagsMenu.js +0 -81
- package/lib/components/Filters/Groups/Metadata/common/TagsField/TagsSearchPlaceholder.js +0 -18
- package/lib/components/Filters/Groups/Metadata/common/TagsField/index.js +0 -142
- package/lib/components/Filters/Groups/Metadata/index.js +0 -111
- package/lib/components/Filters/Groups/Size/index.js +0 -125
- package/lib/components/Filters/Groups/Tags/FilteredTags.js +0 -62
- package/lib/components/Filters/Groups/Tags/SelectedTags.js +0 -51
- package/lib/components/Filters/Groups/Tags/SuggestedTags.js +0 -43
- package/lib/components/Filters/Groups/Tags/index.js +0 -146
- package/lib/components/Filters/Groups/TypeAndFormat/Format.js +0 -65
- package/lib/components/Filters/Groups/TypeAndFormat/Type.js +0 -85
- package/lib/components/Filters/Groups/TypeAndFormat/index.js +0 -114
- package/lib/components/Filters/Groups/common/DateRangeField/DateRangeField.styled.js +0 -10
- package/lib/components/Filters/Groups/common/DateRangeField/index.js +0 -72
- package/lib/components/Filters/Groups/common/FilterFooter.js +0 -67
- package/lib/components/Filters/Groups/common/FilterOptions.js +0 -29
- package/lib/components/Filters/Groups/common/FilterSearch.js +0 -22
- package/lib/components/Filters/Groups/common/FilterSearch.styled.js +0 -15
- package/lib/components/Filters/Groups/common/FilterSkeleton.js +0 -44
- package/lib/components/Filters/Groups/common/TimeFrames.js +0 -35
- package/lib/components/Filters/Groups/index.js +0 -55
- package/lib/components/Filters/Placeholder.js +0 -29
- package/lib/components/Filters/hooks/useDateTypeFilterValues.js +0 -182
- package/lib/components/Filters/hooks/useFilters.js +0 -78
- package/lib/components/Filters/index.js +0 -78
- package/lib/components/FoldersView/FoldersTree/FoldersTree.styled.js +0 -193
- package/lib/components/FoldersView/FoldersTree/FoldersTree.utils.js +0 -78
- package/lib/components/FoldersView/FoldersTree/FoldersTreeHeader.js +0 -52
- package/lib/components/FoldersView/FoldersTree/FoldersTreeList.js +0 -64
- package/lib/components/FoldersView/FoldersTree/FoldersTreeListItem.js +0 -270
- package/lib/components/FoldersView/FoldersTree/FoldersTreeSearch.js +0 -70
- package/lib/components/FoldersView/FoldersTree/FoldersTreeSkeleton.js +0 -23
- package/lib/components/FoldersView/FoldersTree/NoFoldersResult.js +0 -19
- package/lib/components/FoldersView/FoldersTree/SearchedFoldersItem.js +0 -113
- package/lib/components/FoldersView/FoldersTree/index.js +0 -163
- package/lib/components/FoldersView/hooks/useAddFolder.js +0 -60
- package/lib/components/FoldersView/index.js +0 -282
- package/lib/components/GalleryRoleSelect/CustomRolesTab.js +0 -47
- package/lib/components/GalleryRoleSelect/CustomRolesTab.styled.js +0 -10
- package/lib/components/GalleryRoleSelect/GalleryRoleSelect.constants.js +0 -11
- package/lib/components/GalleryRoleSelect/GalleryRoleSelect.styled.js +0 -132
- package/lib/components/GalleryRoleSelect/GalleryRoleSelect.utils.js +0 -87
- package/lib/components/GalleryRoleSelect/StandardRolesTab.js +0 -58
- package/lib/components/GalleryRoleSelect/index.js +0 -234
- package/lib/components/HeaderBar/FacetedSearchToggleButton.js +0 -28
- package/lib/components/HeaderBar/HeaderBar.styled.js +0 -25
- package/lib/components/HeaderBar/RightSide.js +0 -127
- package/lib/components/HeaderBar/index.js +0 -77
- package/lib/components/ImageEditorPanel/index.js +0 -33
- package/lib/components/InfiniteScroll/InfiniteScroll.js +0 -97
- package/lib/components/InfiniteScroll/InfiniteScroll.styled.js +0 -11
- package/lib/components/Informer/index.js +0 -9
- package/lib/components/LoginScreen/LoginScreen.styled.js +0 -39
- package/lib/components/LoginScreen/index.js +0 -133
- package/lib/components/MainMenu/MainMenu.styled.js +0 -12
- package/lib/components/MainMenu/index.js +0 -77
- package/lib/components/Modals/AddNewFolder/AddNewFolder.hooks.js +0 -99
- package/lib/components/Modals/AddNewFolder/index.js +0 -1
- package/lib/components/Modals/ConfirmationModal/ConfirmationModal.hooks.js +0 -101
- package/lib/components/Modals/ConfirmationModal/index.js +0 -1
- package/lib/components/Modals/DeleteItems/DeleteItems.hooks.js +0 -233
- package/lib/components/Modals/DeleteItems/index.js +0 -1
- package/lib/components/Modals/DeleteModal/DeleteModal.hooks.js +0 -87
- package/lib/components/Modals/DeleteModal/index.js +0 -1
- package/lib/components/Modals/DownloadConsent/DownlaodConsent.styled.js +0 -8
- package/lib/components/Modals/DownloadConsent/DownloadConsent.hooks.js +0 -90
- package/lib/components/Modals/DownloadConsent/DownloadConsentContent.js +0 -52
- package/lib/components/Modals/DownloadConsent/index.js +0 -2
- package/lib/components/Modals/Modals.js +0 -386
- package/lib/components/Modals/Modals.styled.js +0 -80
- package/lib/components/Modals/MoveItems/MoveItems.hooks.js +0 -88
- package/lib/components/Modals/MoveItems/index.js +0 -1
- package/lib/components/Modals/TransformedDownload/PdfModalContent.js +0 -109
- package/lib/components/Modals/TransformedDownload/TransformedDownload.hooks.js +0 -188
- package/lib/components/Modals/TransformedDownload/TransformedDownload.styled.js +0 -29
- package/lib/components/Modals/TransformedDownload/TransformedDownload.utils.js +0 -46
- package/lib/components/Modals/TransformedDownload/index.js +0 -2
- package/lib/components/Modals/index.js +0 -8
- package/lib/components/NoItems/NoItems.styled.js +0 -54
- package/lib/components/NoItems/index.js +0 -50
- package/lib/components/PdftronPanel/index.js +0 -31
- package/lib/components/PickerPanel/PickerPanel.styled.js +0 -41
- package/lib/components/PickerPanel/PickerPanelContent.js +0 -100
- package/lib/components/PickerPanel/index.js +0 -21
- package/lib/components/ProgressPanel/ProgressPanel.utils.js +0 -29
- package/lib/components/ProgressPanel/index.js +0 -37
- package/lib/components/TopBar/AppliedFilterChips/AppliedFilterChips.styled.js +0 -11
- package/lib/components/TopBar/AppliedFilterChips/index.js +0 -77
- package/lib/components/TopBar/Search/ContextDropdown/ContextDropdown.styled.js +0 -59
- package/lib/components/TopBar/Search/ContextDropdown/ContextDropdown.utils.js +0 -67
- package/lib/components/TopBar/Search/ContextDropdown/index.js +0 -170
- package/lib/components/TopBar/Search/PrependedOptions/TempFilterRegexInput.js +0 -133
- package/lib/components/TopBar/Search/Search.utils.js +0 -88
- package/lib/components/TopBar/Search/SimilarSearchTag.js +0 -60
- package/lib/components/TopBar/Search/index.js +0 -251
- package/lib/components/TopBar/TopBar.styled.js +0 -37
- package/lib/components/TopBar/index.js +0 -61
- package/lib/components/TopSection/TopSection.styled.js +0 -22
- package/lib/components/TopSection/index.js +0 -58
- package/lib/components/UploadBar/UploadBar.styled.js +0 -84
- package/lib/components/UploadBar/index.js +0 -222
- package/lib/components/UploadStatus/index.js +0 -20
- package/lib/components/UploadsPanel/UploadsList/Header.js +0 -19
- package/lib/components/UploadsPanel/UploadsList/List.js +0 -29
- package/lib/components/UploadsPanel/UploadsList/PreUploadPlugins.js +0 -22
- package/lib/components/UploadsPanel/UploadsList/UploadsList.styled.js +0 -64
- package/lib/components/UploadsPanel/UploadsList/UploadsList.utils.js +0 -17
- package/lib/components/UploadsPanel/UploadsList/UploadsVirtualGrid.js +0 -29
- package/lib/components/UploadsPanel/UploadsList/index.js +0 -55
- package/lib/components/UploadsPanel/UploadsPanel.styled.js +0 -24
- package/lib/components/UploadsPanel/UploadsPanelTopBar.js +0 -16
- package/lib/components/UploadsPanel/index.js +0 -36
- package/lib/components/UrlBuilderModal/UrlBuilderModal.styled.js +0 -9
- package/lib/components/UrlBuilderModal/index.js +0 -97
- package/lib/components/Views/ErroredViewPlaceholder.js +0 -48
- package/lib/components/Views/Views.constants.js +0 -29
- package/lib/components/Views/Views.styled.js +0 -87
- package/lib/components/Views/index.js +0 -100
- package/lib/components/common/DeleteModalItemText/DeleteModalItemText.styled.js +0 -8
- package/lib/components/common/DeleteModalItemText/index.js +0 -24
- package/lib/components/common/EditDetailsButton/EditDetailsButton.styled.js +0 -35
- package/lib/components/common/EditDetailsButton/index.js +0 -28
- package/lib/components/common/ExpiryDateTooltipContent/ExpiryDateTooltipContent.styled.js +0 -16
- package/lib/components/common/ExpiryDateTooltipContent/index.js +0 -29
- package/lib/components/common/FileApprovalsInfoPopup/index.js +0 -46
- package/lib/components/common/FileMetadataFieldValue/CustomMetadataFieldValue.js +0 -48
- package/lib/components/common/FileMetadataFieldValue/FileMetadataFieldValue.styled.js +0 -66
- package/lib/components/common/FileMetadataFieldValue/FileMetadataFieldValue.utils.js +0 -315
- package/lib/components/common/FileMetadataFieldValue/GeneralMetadataFieldValue.js +0 -120
- package/lib/components/common/FileMetadataFieldValue/index.js +0 -26
- package/lib/components/common/FileMetadataFieldValue/utils/getFontInfo.js +0 -78
- package/lib/components/common/FolderSelector/BrowseFoldersMenu.js +0 -114
- package/lib/components/common/FolderSelector/FolderSearchMenu.js +0 -45
- package/lib/components/common/FolderSelector/FolderSelector.styled.js +0 -41
- package/lib/components/common/FolderSelector/index.js +0 -186
- package/lib/components/common/FormattedUriLink/FormattedUriLink.styled.js +0 -15
- package/lib/components/common/FormattedUriLink/index.js +0 -21
- package/lib/components/common/OriginalBadge/OriginalBadge.styled.js +0 -17
- package/lib/components/common/OriginalBadge/index.js +0 -14
- package/lib/components/common/SanitizedHtmlElement/index.js +0 -11
- package/lib/components/common/Sort/Sort.constants.js +0 -61
- package/lib/components/common/Sort/Sort.styled.js +0 -47
- package/lib/components/common/Sort/Sort.utils.js +0 -14
- package/lib/components/common/Sort/index.js +0 -183
- package/lib/components/common/TextWithCopyIcon/TextWithCopyIcon.styled.js +0 -44
- package/lib/components/common/TextWithCopyIcon/index.js +0 -71
- package/lib/components/common/TopBarUploadButton/index.js +0 -40
- package/lib/components/common/TrimmedFilePathWithLocate/TrimmedFilePathWithLocate.utils.js +0 -3
- package/lib/components/common/TrimmedFilePathWithLocate/index.js +0 -34
- package/lib/components/common/TrimmedFolderPathWithLocate/index.js +0 -13
- package/lib/components/common/TrimmedPathWithLocate/TrimmedPathWithLocate.styled.js +0 -30
- package/lib/components/common/TrimmedPathWithLocate/index.js +0 -40
- package/lib/components/metadata.adapter.js +0 -365
- package/lib/defaultLocale.js +0 -1361
- package/lib/hooks/index.js +0 -16
- package/lib/hooks/useAssetsPicker.js +0 -274
- package/lib/hooks/useDownloadFilesCsv.js +0 -20
- package/lib/hooks/useEditFileDetails.js +0 -505
- package/lib/hooks/useExplorer.js +0 -6
- package/lib/hooks/useExplorerI18n.js +0 -10
- package/lib/hooks/useExplorerInformer.js +0 -10
- package/lib/hooks/useFetchFileFolderPermissions.js +0 -31
- package/lib/hooks/useFetchMetadataTagsBySearchQuery.js +0 -38
- package/lib/hooks/useFileMetadata.js +0 -117
- package/lib/hooks/useFilterSearch.js +0 -37
- package/lib/hooks/useForcedFilters.js +0 -39
- package/lib/hooks/useIsOverflow.js +0 -25
- package/lib/hooks/useIsSmallScreen.js +0 -20
- package/lib/hooks/useLocateFile.js +0 -231
- package/lib/hooks/usePrevious.js +0 -9
- package/lib/hooks/useSearchSuggestions.js +0 -168
- package/lib/hooks/useStartUpload.js +0 -43
- package/lib/hooks/useToLocaleNumber.js +0 -14
- package/lib/hooks/useValidateFileName.js +0 -324
- package/lib/index.js +0 -1587
- package/lib/slices/common.slice.js +0 -254
- package/lib/slices/drag.slice.js +0 -75
- package/lib/slices/files.slice.js +0 -1307
- package/lib/slices/filters.slice.js +0 -382
- package/lib/slices/folders.slice.js +0 -964
- package/lib/slices/foldersTree.slice.js +0 -501
- package/lib/slices/index.js +0 -32
- package/lib/slices/metadata.slice.js +0 -494
- package/lib/slices/panels.slice.js +0 -351
- package/lib/slices/search.slice.js +0 -995
- package/lib/slices/selections.slice.js +0 -315
- package/lib/slices/targets.slice.js +0 -44
- package/lib/slices/topSection.slice.js +0 -71
- package/lib/slices/views.slice.js +0 -345
- package/lib/thunks/archive.thunks.js +0 -175
- package/lib/thunks/downloads.thunks.js +0 -415
- package/lib/thunks/items.thunks.js +0 -274
- package/lib/thunks/permissions.thunks.js +0 -66
- package/lib/thunks/uploads.thunks.js +0 -235
- package/lib/utils/SearchSuggestions/SearchSuggestionsMenu.js +0 -95
- package/lib/utils/SearchSuggestions/SuggestionMode.js +0 -70
- package/lib/utils/SearchSuggestions/SuggestionModeAttribute.js +0 -87
- package/lib/utils/SearchSuggestions/SuggestionModeExpression.js +0 -121
- package/lib/utils/SearchSuggestions/SuggestionModeTag.js +0 -87
- package/lib/utils/SearchSuggestions/SuggestionsManager.js +0 -242
- package/lib/utils/SearchSuggestions/constants.js +0 -14
- package/lib/utils/SearchSuggestions/index.js +0 -4
- package/lib/utils/SearchSuggestions/styled.js +0 -12
- package/lib/utils/availableScreenSizes.js +0 -4
- package/lib/utils/constants.js +0 -14
- package/lib/utils/convertItemsToFilesFoldersUuids.js +0 -12
- package/lib/utils/convertItemstoFoldersParentUuids.js +0 -12
- package/lib/utils/createPromise.js +0 -9
- package/lib/utils/createSuperFocus.js +0 -43
- package/lib/utils/decodeB64ToStr.js +0 -11
- package/lib/utils/filters.js +0 -333
- package/lib/utils/formatFolderPath.js +0 -10
- package/lib/utils/formatPinSubTitle.js +0 -17
- package/lib/utils/getAcquirerTitle.js +0 -10
- package/lib/utils/getActiveOverlayEl.js +0 -11
- package/lib/utils/getApiPathtype.js +0 -10
- package/lib/utils/getClosestStr.js +0 -22
- package/lib/utils/getItemUuids.js +0 -12
- package/lib/utils/getLabelsTotalAssetsCount.js +0 -6
- package/lib/utils/getMoveAndDeleteData.js +0 -15
- package/lib/utils/getParentFolderPath.js +0 -4
- package/lib/utils/getQueryStringFromUrl.js +0 -6
- package/lib/utils/getScrollableParent.js +0 -15
- package/lib/utils/getStringValueExistedInObj.js +0 -9
- package/lib/utils/isEmbeddableAsset.js +0 -6
- package/lib/utils/isFileVersion.js +0 -9
- package/lib/utils/mapArrayKeysToObjValues.js +0 -33
- package/lib/utils/mapFiltersToShownFormat.js +0 -252
- package/lib/utils/prepareExportedFilesLinks.js +0 -12
- package/lib/utils/prepareSearchUrl.js +0 -65
- package/lib/utils/removeBackground.js +0 -60
- package/lib/utils/removeExtraUrlParams.js +0 -13
- package/lib/utils/scrollToAndFocusItemElement.js +0 -16
- package/lib/utils/toggleFolderNotFoundModal.js +0 -25
- package/lib/utils/trapFocus.js +0 -59
- package/lib/utils/truncateString.js +0 -28
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Skeleton } from '@scaleflex/ui/core';
|
|
2
|
-
import Styled from '../../Filters.styled';
|
|
3
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
-
var FilterSkeleton = function FilterSkeleton() {
|
|
5
|
-
return /*#__PURE__*/_jsxs(Styled.Filter, {
|
|
6
|
-
$width: 550,
|
|
7
|
-
children: [/*#__PURE__*/_jsxs(Styled.FilterHeader, {
|
|
8
|
-
children: [/*#__PURE__*/_jsx(Skeleton, {
|
|
9
|
-
width: 414,
|
|
10
|
-
height: 32
|
|
11
|
-
}), /*#__PURE__*/_jsx(Skeleton, {
|
|
12
|
-
width: 92,
|
|
13
|
-
height: 32
|
|
14
|
-
})]
|
|
15
|
-
}), /*#__PURE__*/_jsxs(Styled.FilterBody, {
|
|
16
|
-
className: "filerobot-Explorer-Filters-filterBody",
|
|
17
|
-
withoutTopPadding: true,
|
|
18
|
-
children: [/*#__PURE__*/_jsx(Skeleton, {
|
|
19
|
-
width: 139,
|
|
20
|
-
height: 16,
|
|
21
|
-
style: {
|
|
22
|
-
marginBottom: 8
|
|
23
|
-
}
|
|
24
|
-
}), /*#__PURE__*/_jsx(Styled.FilterOptions, {
|
|
25
|
-
className: "filerobot-Explorer-Filters-filterOptionsWrapper",
|
|
26
|
-
col: 3,
|
|
27
|
-
children: Array(21).fill().map(function (_, index) {
|
|
28
|
-
return /*#__PURE__*/_jsx(Skeleton, {
|
|
29
|
-
width: 164,
|
|
30
|
-
height: 40
|
|
31
|
-
}, index);
|
|
32
|
-
})
|
|
33
|
-
})]
|
|
34
|
-
}), /*#__PURE__*/_jsx(Styled.FilterFooter, {
|
|
35
|
-
className: "filerobot-Provider-Filters-FilterFooter",
|
|
36
|
-
withTopBorder: true,
|
|
37
|
-
children: /*#__PURE__*/_jsx(Skeleton, {
|
|
38
|
-
width: 100,
|
|
39
|
-
height: 32
|
|
40
|
-
})
|
|
41
|
-
})]
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
export default FilterSkeleton;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { useExplorerI18n } from '../../../../hooks';
|
|
2
|
-
import Styled from '../../Filters.styled';
|
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
var TimeFrames = function TimeFrames(_ref) {
|
|
5
|
-
var _ref$options = _ref.options,
|
|
6
|
-
options = _ref$options === void 0 ? [] : _ref$options,
|
|
7
|
-
_ref$frameWidth = _ref.frameWidth,
|
|
8
|
-
frameWidth = _ref$frameWidth === void 0 ? 153 : _ref$frameWidth,
|
|
9
|
-
selectedValue = _ref.selectedValue,
|
|
10
|
-
onClick = _ref.onClick,
|
|
11
|
-
_ref$checkIsOptionDis = _ref.checkIsOptionDisabled,
|
|
12
|
-
checkIsOptionDisabled = _ref$checkIsOptionDis === void 0 ? function () {
|
|
13
|
-
return false;
|
|
14
|
-
} : _ref$checkIsOptionDis;
|
|
15
|
-
var i18n = useExplorerI18n();
|
|
16
|
-
return options.map(function (_ref2) {
|
|
17
|
-
var value = _ref2.value,
|
|
18
|
-
i18nStr = _ref2.i18nStr,
|
|
19
|
-
hidden = _ref2.hidden;
|
|
20
|
-
var isDisabled = checkIsOptionDisabled(value);
|
|
21
|
-
return /*#__PURE__*/_jsx(Styled.FilterOption, {
|
|
22
|
-
onClick: isDisabled ? undefined : function () {
|
|
23
|
-
return onClick(value, i18nStr);
|
|
24
|
-
},
|
|
25
|
-
hidden: hidden,
|
|
26
|
-
isSelected: value === selectedValue,
|
|
27
|
-
width: frameWidth,
|
|
28
|
-
disabled: isDisabled,
|
|
29
|
-
children: /*#__PURE__*/_jsx(Styled.FilterOptionLabel, {
|
|
30
|
-
children: i18n(i18nStr)
|
|
31
|
-
})
|
|
32
|
-
}, i18nStr);
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
export default TimeFrames;
|
|
@@ -1,55 +0,0 @@
|
|
|
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 { useContext } from 'react';
|
|
8
|
-
import Date from './Date';
|
|
9
|
-
import Metadata from './Metadata';
|
|
10
|
-
import Size from './Size';
|
|
11
|
-
import Tags from './Tags';
|
|
12
|
-
import TypeAndFormat from './TypeAndFormat';
|
|
13
|
-
import Image from './Image';
|
|
14
|
-
import Folders from './Folders';
|
|
15
|
-
import { FILTER_SECTION_KEYS } from '../Filters.constants';
|
|
16
|
-
import { MetadataFiltersProvider } from './Metadata/MetadataFiltersContext';
|
|
17
|
-
import { FiltersContext } from '../FiltersContext';
|
|
18
|
-
import LicenseExpiry from './LicenseExpiry';
|
|
19
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
-
var FilterGroup = function FilterGroup() {
|
|
21
|
-
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
22
|
-
appliedFilters = _ref.appliedFilters,
|
|
23
|
-
updateFilters = _ref.updateFilters;
|
|
24
|
-
var _useContext = useContext(FiltersContext),
|
|
25
|
-
openedFilter = _useContext.openedFilter;
|
|
26
|
-
var commonProps = {
|
|
27
|
-
appliedFilters: appliedFilters,
|
|
28
|
-
updateFilters: updateFilters
|
|
29
|
-
};
|
|
30
|
-
switch (openedFilter) {
|
|
31
|
-
case FILTER_SECTION_KEYS.DATE:
|
|
32
|
-
return /*#__PURE__*/_jsx(Date, _objectSpread({}, commonProps));
|
|
33
|
-
case FILTER_SECTION_KEYS.MIME_TYPES:
|
|
34
|
-
return /*#__PURE__*/_jsx(TypeAndFormat, _objectSpread({}, commonProps));
|
|
35
|
-
case FILTER_SECTION_KEYS.SIZE:
|
|
36
|
-
return /*#__PURE__*/_jsx(Size, _objectSpread({}, commonProps));
|
|
37
|
-
case FILTER_SECTION_KEYS.TAGS:
|
|
38
|
-
return /*#__PURE__*/_jsx(Tags, _objectSpread({}, commonProps));
|
|
39
|
-
case FILTER_SECTION_KEYS.METADATA:
|
|
40
|
-
return /*#__PURE__*/_jsx(MetadataFiltersProvider, _objectSpread(_objectSpread({}, commonProps), {}, {
|
|
41
|
-
children: /*#__PURE__*/_jsx(Metadata, {})
|
|
42
|
-
}));
|
|
43
|
-
case FILTER_SECTION_KEYS.LICENSE_EXPIRY:
|
|
44
|
-
return /*#__PURE__*/_jsx(MetadataFiltersProvider, _objectSpread(_objectSpread({}, commonProps), {}, {
|
|
45
|
-
children: /*#__PURE__*/_jsx(LicenseExpiry, _objectSpread({}, commonProps))
|
|
46
|
-
}));
|
|
47
|
-
case FILTER_SECTION_KEYS.IMAGE:
|
|
48
|
-
return /*#__PURE__*/_jsx(Image, _objectSpread({}, commonProps));
|
|
49
|
-
case FILTER_SECTION_KEYS.FOLDERS:
|
|
50
|
-
return /*#__PURE__*/_jsx(Folders, _objectSpread({}, commonProps));
|
|
51
|
-
default:
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
export default FilterGroup;
|
|
@@ -1,29 +0,0 @@
|
|
|
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 = ["icon", "title", "desc"];
|
|
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 Styled from './Filters.styled';
|
|
11
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
var Placeholder = function Placeholder(_ref) {
|
|
13
|
-
var icon = _ref.icon,
|
|
14
|
-
title = _ref.title,
|
|
15
|
-
_ref$desc = _ref.desc,
|
|
16
|
-
desc = _ref$desc === void 0 ? '' : _ref$desc,
|
|
17
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
-
return /*#__PURE__*/_jsxs(Styled.PlaceholderWrapper, _objectSpread(_objectSpread({}, rest), {}, {
|
|
19
|
-
children: [icon && /*#__PURE__*/_jsx(Styled.PlaceholderIconWrapper, {
|
|
20
|
-
children: icon
|
|
21
|
-
}), title && /*#__PURE__*/_jsx(Styled.PlaceholderTitle, {
|
|
22
|
-
hasDesciption: desc.length > 0,
|
|
23
|
-
children: title
|
|
24
|
-
}), desc && /*#__PURE__*/_jsx(Styled.PlaceholderDesc, {
|
|
25
|
-
children: desc
|
|
26
|
-
})]
|
|
27
|
-
}));
|
|
28
|
-
};
|
|
29
|
-
export default Placeholder;
|
|
@@ -1,182 +0,0 @@
|
|
|
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 _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
5
|
-
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."); }
|
|
6
|
-
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; } }
|
|
7
|
-
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; }
|
|
8
|
-
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; } }
|
|
9
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
10
|
-
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; }
|
|
11
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
|
-
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); }
|
|
13
|
-
import { useMemo, useState } from 'react';
|
|
14
|
-
import isFunction from '@scaleflex/widget-utils/lib/isFunction';
|
|
15
|
-
import { useUpdateEffect } from '@scaleflex/widget-common/lib/hooks';
|
|
16
|
-
import { DIVIDER, FILTER_OPERATORS, STATIC_OPTIONS_DATA } from '../Filters.constants';
|
|
17
|
-
var SPECIFIC_DATE = 'specific';
|
|
18
|
-
var DATES_RANGE = 'range';
|
|
19
|
-
|
|
20
|
-
// the values are being passed to getDateRange and transformed to literal date string.
|
|
21
|
-
export var DATE_OPTIONS = _defineProperty(_defineProperty({
|
|
22
|
-
EMPTY: {
|
|
23
|
-
i18nLabel: STATIC_OPTIONS_DATA.EMPTY.i18nLabel,
|
|
24
|
-
value: STATIC_OPTIONS_DATA.EMPTY.api_value
|
|
25
|
-
},
|
|
26
|
-
NOT_EMPTY: {
|
|
27
|
-
i18nLabel: STATIC_OPTIONS_DATA.NOT_EMPTY.i18nLabel,
|
|
28
|
-
value: STATIC_OPTIONS_DATA.NOT_EMPTY.api_value
|
|
29
|
-
},
|
|
30
|
-
DIVIDER: DIVIDER,
|
|
31
|
-
YESTERDAY: {
|
|
32
|
-
i18nLabel: 'explorerFilterGroupDateOptionYesterday',
|
|
33
|
-
value: ['', -1]
|
|
34
|
-
},
|
|
35
|
-
TODAY: {
|
|
36
|
-
i18nLabel: 'explorerFilterGroupDateOptionToday',
|
|
37
|
-
value: [0]
|
|
38
|
-
},
|
|
39
|
-
TOMORROW: {
|
|
40
|
-
i18nLabel: 'explorerFilterGroupDateOptionTomorrow',
|
|
41
|
-
value: [1, '']
|
|
42
|
-
},
|
|
43
|
-
WEEK: {
|
|
44
|
-
i18nLabel: 'explorerFilterGroupDateOptionWeek',
|
|
45
|
-
value: [0, 2]
|
|
46
|
-
},
|
|
47
|
-
MONTH: {
|
|
48
|
-
i18nLabel: 'explorerFilterGroupDateOptionMonth',
|
|
49
|
-
value: [0, 3]
|
|
50
|
-
}
|
|
51
|
-
}, SPECIFIC_DATE, {
|
|
52
|
-
i18nLabel: 'explorerFilterGroupDateOptionsSpecificDate',
|
|
53
|
-
value: SPECIFIC_DATE,
|
|
54
|
-
isCustom: true
|
|
55
|
-
}), DATES_RANGE, {
|
|
56
|
-
i18nLabel: 'explorerFilterGroupDateOptionsCustomDates',
|
|
57
|
-
value: DATES_RANGE,
|
|
58
|
-
isCustom: true,
|
|
59
|
-
isRange: true
|
|
60
|
-
});
|
|
61
|
-
var DATE_OPTION_IDS = Object.keys(DATE_OPTIONS);
|
|
62
|
-
var customDateIds = [SPECIFIC_DATE, DATES_RANGE];
|
|
63
|
-
var isCustomDate = function isCustomDate(dateId) {
|
|
64
|
-
return customDateIds.includes(dateId);
|
|
65
|
-
};
|
|
66
|
-
var toDateRangeSyntax = function toDateRangeSyntax(fromDate, toDate) {
|
|
67
|
-
return "".concat(fromDate || '').concat(FILTER_OPERATORS.RANGE).concat(toDate || '');
|
|
68
|
-
};
|
|
69
|
-
var isStaticOption = function isStaticOption(value) {
|
|
70
|
-
return [DATE_OPTIONS.EMPTY.value, DATE_OPTIONS.NOT_EMPTY.value].includes(value);
|
|
71
|
-
};
|
|
72
|
-
var getInitialActiveOption = function getInitialActiveOption(activeOptionValue) {
|
|
73
|
-
if (!activeOptionValue) {
|
|
74
|
-
return '';
|
|
75
|
-
}
|
|
76
|
-
if (typeof activeOptionValue === 'string' && !isStaticOption(activeOptionValue)) {
|
|
77
|
-
var _activeOptionValue$sp;
|
|
78
|
-
return (activeOptionValue === null || activeOptionValue === void 0 ? void 0 : (_activeOptionValue$sp = activeOptionValue.split(FILTER_OPERATORS.RANGE)) === null || _activeOptionValue$sp === void 0 ? void 0 : _activeOptionValue$sp.length) === 2 ? DATES_RANGE : SPECIFIC_DATE;
|
|
79
|
-
}
|
|
80
|
-
return Object.keys(DATE_OPTIONS).find(function (optionId) {
|
|
81
|
-
var _DATE_OPTIONS$optionI;
|
|
82
|
-
return JSON.stringify((_DATE_OPTIONS$optionI = DATE_OPTIONS[optionId]) === null || _DATE_OPTIONS$optionI === void 0 ? void 0 : _DATE_OPTIONS$optionI.value) === JSON.stringify(activeOptionValue);
|
|
83
|
-
}) || activeOptionValue;
|
|
84
|
-
};
|
|
85
|
-
var getInitialDateRange = function getInitialDateRange(_ref) {
|
|
86
|
-
var activeOptionValue = _ref.activeOptionValue,
|
|
87
|
-
activeOptionId = _ref.activeOptionId;
|
|
88
|
-
var dateRange = {
|
|
89
|
-
from: '',
|
|
90
|
-
to: ''
|
|
91
|
-
};
|
|
92
|
-
if (isCustomDate(activeOptionId) && activeOptionValue) {
|
|
93
|
-
var splittedDate = (activeOptionValue === null || activeOptionValue === void 0 ? void 0 : activeOptionValue.split(FILTER_OPERATORS.RANGE)) || [];
|
|
94
|
-
dateRange.from = splittedDate[0] || dateRange.from;
|
|
95
|
-
dateRange.to = splittedDate[1] || dateRange.to;
|
|
96
|
-
}
|
|
97
|
-
return dateRange;
|
|
98
|
-
};
|
|
99
|
-
var useDateTypeFilterValues = function useDateTypeFilterValues(_ref2) {
|
|
100
|
-
var onChange = _ref2.onChange,
|
|
101
|
-
activeOptionValue = _ref2.activeOptionValue;
|
|
102
|
-
var _useState = useState(function () {
|
|
103
|
-
return getInitialActiveOption(activeOptionValue);
|
|
104
|
-
}),
|
|
105
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
106
|
-
activeOptionId = _useState2[0],
|
|
107
|
-
setActiveOptionId = _useState2[1];
|
|
108
|
-
var _useState3 = useState(function () {
|
|
109
|
-
return getInitialDateRange({
|
|
110
|
-
activeOptionId: activeOptionId,
|
|
111
|
-
activeOptionValue: activeOptionValue
|
|
112
|
-
});
|
|
113
|
-
}),
|
|
114
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
115
|
-
dateRange = _useState4[0],
|
|
116
|
-
setDateRange = _useState4[1];
|
|
117
|
-
var dateOptionIds = useMemo(function () {
|
|
118
|
-
return !activeOptionId || DATE_OPTION_IDS.includes(activeOptionId) ? DATE_OPTION_IDS : [activeOptionId].concat(DATE_OPTION_IDS);
|
|
119
|
-
}, [activeOptionId]);
|
|
120
|
-
var applyChanges = function applyChanges(changes, customOnChange) {
|
|
121
|
-
var applyFn = customOnChange || onChange;
|
|
122
|
-
if (changes && isFunction(applyFn)) {
|
|
123
|
-
applyFn(changes);
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
var onOptionChange = function onOptionChange(dateId, customOnChange) {
|
|
127
|
-
setActiveOptionId(dateId);
|
|
128
|
-
var newDateRange = {
|
|
129
|
-
from: '',
|
|
130
|
-
to: ''
|
|
131
|
-
};
|
|
132
|
-
setDateRange(newDateRange);
|
|
133
|
-
var option = DATE_OPTIONS[dateId] || {};
|
|
134
|
-
applyChanges({
|
|
135
|
-
operator: option.operator || FILTER_OPERATORS.IS,
|
|
136
|
-
value: !isCustomDate(dateId) && option.value || ''
|
|
137
|
-
}, customOnChange);
|
|
138
|
-
};
|
|
139
|
-
var onFromDateChange = function onFromDateChange(newFromDate, customOnChange) {
|
|
140
|
-
setDateRange(function (latestDateRange) {
|
|
141
|
-
return _objectSpread(_objectSpread({}, latestDateRange), {}, {
|
|
142
|
-
from: newFromDate
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
var filterValue = activeOptionId === SPECIFIC_DATE ? newFromDate : toDateRangeSyntax(newFromDate, dateRange.to);
|
|
146
|
-
onChange({
|
|
147
|
-
value: filterValue
|
|
148
|
-
}, customOnChange);
|
|
149
|
-
};
|
|
150
|
-
var onToDateChange = function onToDateChange(newToDate, customOnChange) {
|
|
151
|
-
setDateRange(function (latestDateRange) {
|
|
152
|
-
return _objectSpread(_objectSpread({}, latestDateRange), {}, {
|
|
153
|
-
to: newToDate
|
|
154
|
-
});
|
|
155
|
-
});
|
|
156
|
-
onChange({
|
|
157
|
-
value: toDateRangeSyntax(dateRange.from, newToDate)
|
|
158
|
-
}, customOnChange);
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
// Reset if cleared the active option value
|
|
162
|
-
useUpdateEffect(function () {
|
|
163
|
-
if (!activeOptionValue && (!isCustomDate(activeOptionId) || dateRange.from || dateRange.to)) {
|
|
164
|
-
setActiveOptionId(function () {
|
|
165
|
-
return getInitialActiveOption(activeOptionValue);
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
}, [activeOptionValue]);
|
|
169
|
-
var activeDateOption = DATE_OPTIONS[activeOptionId] || {};
|
|
170
|
-
return {
|
|
171
|
-
activeOptionId: activeOptionId,
|
|
172
|
-
dateOptionIds: dateOptionIds,
|
|
173
|
-
dateOptions: DATE_OPTIONS,
|
|
174
|
-
onOptionChange: onOptionChange,
|
|
175
|
-
onFromDateChange: onFromDateChange,
|
|
176
|
-
onToDateChange: onToDateChange,
|
|
177
|
-
dateRange: dateRange,
|
|
178
|
-
isCustomDate: activeDateOption.isCustom,
|
|
179
|
-
isRangeDate: activeDateOption.isRange
|
|
180
|
-
};
|
|
181
|
-
};
|
|
182
|
-
export default useDateTypeFilterValues;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { useEffect, useMemo } from 'react';
|
|
2
|
-
import { useSelector, useDispatch } from 'react-redux';
|
|
3
|
-
import { useUpdateEffect } from '@scaleflex/widget-common/lib/hooks';
|
|
4
|
-
import { DATE_OPTIONS_RANGE, FILTER_SECTION_KEYS } from '../Filters.constants';
|
|
5
|
-
import { selectIsFoldersView, selectIsAssetsView } from '../../../slices/views.slice';
|
|
6
|
-
import { getFilters, selectAppliedFilters, selectIsFiltersLoaded } from '../../../slices/filters.slice';
|
|
7
|
-
import { selectActiveRegionalLang, selectIsM0LegacyMeta, selectMetaMappedLicenseExpireDateField } from '../../../slices/metadata.slice';
|
|
8
|
-
var useFilters = function useFilters() {
|
|
9
|
-
var dispatch = useDispatch();
|
|
10
|
-
var appliedFilters = useSelector(selectAppliedFilters);
|
|
11
|
-
var isM0LegacyMeta = useSelector(selectIsM0LegacyMeta);
|
|
12
|
-
var activeRegionalLang = useSelector(selectActiveRegionalLang);
|
|
13
|
-
var isFiltersLoaded = useSelector(selectIsFiltersLoaded);
|
|
14
|
-
var isFiltersAvailableView = useSelector(function (state) {
|
|
15
|
-
return selectIsAssetsView(state) || selectIsFoldersView(state);
|
|
16
|
-
});
|
|
17
|
-
var isFoldersFilterShown = useSelector(function (state) {
|
|
18
|
-
return !selectIsFoldersView(state);
|
|
19
|
-
});
|
|
20
|
-
var isLicenseExpiryFieldAvailable = useSelector(function (state) {
|
|
21
|
-
return Boolean(selectMetaMappedLicenseExpireDateField(state));
|
|
22
|
-
});
|
|
23
|
-
var date = appliedFilters[FILTER_SECTION_KEYS.DATE];
|
|
24
|
-
var dateValue = date === null || date === void 0 ? void 0 : date.value;
|
|
25
|
-
var dateFilterI18nLabel = useMemo(function () {
|
|
26
|
-
var _DATE_OPTIONS_RANGE$f, _DATE_OPTIONS_RANGE$f2;
|
|
27
|
-
return Array.isArray(dateValue) ? 'filterGroupDateOptionsCustomRange' : (_DATE_OPTIONS_RANGE$f = (_DATE_OPTIONS_RANGE$f2 = DATE_OPTIONS_RANGE.find(function (_ref) {
|
|
28
|
-
var value = _ref.value;
|
|
29
|
-
return value === dateValue;
|
|
30
|
-
})) === null || _DATE_OPTIONS_RANGE$f2 === void 0 ? void 0 : _DATE_OPTIONS_RANGE$f2.i18nStr) !== null && _DATE_OPTIONS_RANGE$f !== void 0 ? _DATE_OPTIONS_RANGE$f : 'filtersDate';
|
|
31
|
-
}, [dateValue]);
|
|
32
|
-
var filterGroups = useMemo(function () {
|
|
33
|
-
return [{
|
|
34
|
-
filterKey: FILTER_SECTION_KEYS.DATE,
|
|
35
|
-
i18nKey: dateFilterI18nLabel
|
|
36
|
-
}, {
|
|
37
|
-
filterKey: FILTER_SECTION_KEYS.MIME_TYPES,
|
|
38
|
-
i18nKey: 'filtersFormats'
|
|
39
|
-
}, {
|
|
40
|
-
filterKey: FILTER_SECTION_KEYS.SIZE,
|
|
41
|
-
i18nKey: 'filtersSize'
|
|
42
|
-
}, {
|
|
43
|
-
filterKey: FILTER_SECTION_KEYS.TAGS,
|
|
44
|
-
i18nKey: 'filtersTag'
|
|
45
|
-
}, isM0LegacyMeta ? null : {
|
|
46
|
-
filterKey: FILTER_SECTION_KEYS.METADATA,
|
|
47
|
-
i18nKey: 'filtersMetadata'
|
|
48
|
-
}, {
|
|
49
|
-
filterKey: FILTER_SECTION_KEYS.IMAGE,
|
|
50
|
-
i18nKey: 'filtersImage'
|
|
51
|
-
}, isLicenseExpiryFieldAvailable && {
|
|
52
|
-
filterKey: FILTER_SECTION_KEYS.LICENSE_EXPIRY,
|
|
53
|
-
i18nKey: 'explorerFiltersLicenseExpiryTitle'
|
|
54
|
-
}, isFoldersFilterShown && {
|
|
55
|
-
filterKey: FILTER_SECTION_KEYS.FOLDERS,
|
|
56
|
-
i18nKey: 'explorerFiltersFoldersTitle'
|
|
57
|
-
}].filter(Boolean);
|
|
58
|
-
}, [dateFilterI18nLabel, isM0LegacyMeta, isFoldersFilterShown]);
|
|
59
|
-
useEffect(function () {
|
|
60
|
-
if (isFiltersAvailableView && !isFiltersLoaded) {
|
|
61
|
-
dispatch(getFilters({
|
|
62
|
-
language: activeRegionalLang
|
|
63
|
-
}));
|
|
64
|
-
}
|
|
65
|
-
}, []);
|
|
66
|
-
useUpdateEffect(function () {
|
|
67
|
-
if (isFiltersAvailableView) {
|
|
68
|
-
dispatch(getFilters({
|
|
69
|
-
language: activeRegionalLang
|
|
70
|
-
}));
|
|
71
|
-
}
|
|
72
|
-
}, [activeRegionalLang]);
|
|
73
|
-
return {
|
|
74
|
-
filterGroups: filterGroups,
|
|
75
|
-
filtersCount: filterGroups.length
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
export default useFilters;
|
|
@@ -1,78 +0,0 @@
|
|
|
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 { useContext, useCallback } from 'react';
|
|
8
|
-
import { useSelector, useDispatch } from 'react-redux';
|
|
9
|
-
import FilterItem from '@scaleflex/widget-common/lib/FilterItem';
|
|
10
|
-
import FilterPopup from '@scaleflex/widget-common/lib/FilterPopup';
|
|
11
|
-
import FiltersSkeleton from './FiltersSkeleton';
|
|
12
|
-
import FilterGroup from './Groups';
|
|
13
|
-
import { selectAppliedFilters, selectIsFiltersLoading, updateFilteredFiles } from '../../slices/filters.slice';
|
|
14
|
-
import useFilters from './hooks/useFilters';
|
|
15
|
-
import { useExplorer } from '../../hooks';
|
|
16
|
-
import { FiltersContext } from './FiltersContext';
|
|
17
|
-
import { getFilterSuffix, isActiveFilter } from './Filters.utils';
|
|
18
|
-
import Styled from './Filters.styled';
|
|
19
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
-
var Filters = function Filters() {
|
|
21
|
-
var dispatch = useDispatch();
|
|
22
|
-
var _useExplorer = useExplorer(),
|
|
23
|
-
i18n = _useExplorer.i18n,
|
|
24
|
-
opts = _useExplorer.opts;
|
|
25
|
-
var isLoading = useSelector(selectIsFiltersLoading);
|
|
26
|
-
var appliedFilters = useSelector(selectAppliedFilters);
|
|
27
|
-
var _useFilters = useFilters(),
|
|
28
|
-
filterGroups = _useFilters.filterGroups,
|
|
29
|
-
filtersCount = _useFilters.filtersCount;
|
|
30
|
-
var _useContext = useContext(FiltersContext),
|
|
31
|
-
openedFilter = _useContext.openedFilter,
|
|
32
|
-
anchorEl = _useContext.anchorEl,
|
|
33
|
-
toggleFilterMenu = _useContext.toggleFilterMenu,
|
|
34
|
-
requestClose = _useContext.requestClose;
|
|
35
|
-
var useAssetsPicker = opts.useAssetsPicker;
|
|
36
|
-
var updateFilters = useCallback(function (newFilters, options) {
|
|
37
|
-
dispatch(updateFilteredFiles(_objectSpread(_objectSpread({}, options), {}, {
|
|
38
|
-
filters: newFilters
|
|
39
|
-
})));
|
|
40
|
-
}, []);
|
|
41
|
-
if (isLoading) {
|
|
42
|
-
return /*#__PURE__*/_jsx(Styled.FiltersWrapper, {
|
|
43
|
-
className: "filerobot-Provider-Filters-wrapper",
|
|
44
|
-
children: /*#__PURE__*/_jsx(FiltersSkeleton, {
|
|
45
|
-
count: filtersCount
|
|
46
|
-
})
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
return /*#__PURE__*/_jsxs(Styled.FiltersWrapper, {
|
|
50
|
-
className: "filerobot-Provider-Filters-wrapper",
|
|
51
|
-
children: [filterGroups.map(function (_ref) {
|
|
52
|
-
var filterKey = _ref.filterKey,
|
|
53
|
-
i18nKey = _ref.i18nKey;
|
|
54
|
-
return /*#__PURE__*/_jsx(FilterItem, {
|
|
55
|
-
open: openedFilter === filterKey,
|
|
56
|
-
name: filterKey,
|
|
57
|
-
active: isActiveFilter(filterKey, appliedFilters),
|
|
58
|
-
count: getFilterSuffix(filterKey, appliedFilters, {
|
|
59
|
-
i18n: i18n
|
|
60
|
-
}),
|
|
61
|
-
label: i18n(i18nKey),
|
|
62
|
-
onClick: function onClick(event) {
|
|
63
|
-
toggleFilterMenu(event, filterKey);
|
|
64
|
-
}
|
|
65
|
-
}, filterKey);
|
|
66
|
-
}), /*#__PURE__*/_jsx(FilterPopup, {
|
|
67
|
-
open: !!openedFilter,
|
|
68
|
-
anchor: anchorEl,
|
|
69
|
-
onRequestClose: requestClose,
|
|
70
|
-
zIndex: useAssetsPicker ? 100001 : undefined,
|
|
71
|
-
children: /*#__PURE__*/_jsx(FilterGroup, {
|
|
72
|
-
appliedFilters: appliedFilters,
|
|
73
|
-
updateFilters: updateFilters
|
|
74
|
-
})
|
|
75
|
-
})]
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
export default Filters;
|