@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,345 +0,0 @@
|
|
|
1
|
-
var _excluded = ["searchQuery", "offset", "cachedViewQueries", "sorting"];
|
|
2
|
-
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); }
|
|
3
|
-
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; }
|
|
4
|
-
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; }
|
|
5
|
-
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; }
|
|
6
|
-
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; }
|
|
7
|
-
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; }
|
|
8
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
9
|
-
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); }
|
|
10
|
-
import { VIEW_IDS, PLUGINS_IDS, LAYOUTS_IDS, FMAW_URL_VIEW_QUERY_PARAMS, FMAW_URL_QUERY_PARAMS } from '@scaleflex/widget-utils/lib/constants';
|
|
11
|
-
import { createSlice, isAnyOf } from '@reduxjs/toolkit';
|
|
12
|
-
import { fetchUserAuthState, generateUserKey } from '@scaleflex/widget-core/lib/slices/user.slice';
|
|
13
|
-
import createThunk from '@scaleflex/widget-utils/lib/createThunk';
|
|
14
|
-
import { VIEW_OPTIONS } from '../components/Views/Views.constants';
|
|
15
|
-
import { loadSearchFromOutside, selectIsSimilarSearchActive, selectSearchQuery, submitSearch, updateSearchQuery, updateSearchSuggestions, searchFilesWithAiText, selectIsAiSearch, selectIsSearchFetchType } from './search.slice';
|
|
16
|
-
import { loadFiltersFromOutside, selectIsFiltersActive, updateFilteredFiles } from './filters.slice';
|
|
17
|
-
import { fetchFoldersPreviews, selectFoldersArray, selectFoldersSortOrder, selectFoldersSortedBy } from './folders.slice';
|
|
18
|
-
import { fetchFiles, selectFilesSortOrder, selectFilesSortedBy } from './files.slice';
|
|
19
|
-
import { SORT_BY, SORT_ORDER } from '../components/common/Sort/Sort.constants';
|
|
20
|
-
import { checkIsValidSearchSortBy, checkIsValidSortOrder } from '../components/common/Sort/Sort.utils';
|
|
21
|
-
var slicePropName = 'views';
|
|
22
|
-
var sliceName = "".concat(PLUGINS_IDS.EXPLORER, "/").concat(slicePropName);
|
|
23
|
-
var initialState = {
|
|
24
|
-
layout: LAYOUTS_IDS.GRID,
|
|
25
|
-
activeView: VIEW_IDS.FOLDERS,
|
|
26
|
-
list: Object.values(VIEW_IDS)
|
|
27
|
-
};
|
|
28
|
-
export var viewCachedFetchFilesQueries = null;
|
|
29
|
-
export var changeViewFetchFilesCachedQueries = function changeViewFetchFilesCachedQueries(newCachedQueries) {
|
|
30
|
-
viewCachedFetchFilesQueries = newCachedQueries;
|
|
31
|
-
};
|
|
32
|
-
export var changeView = createThunk(async function (_ref, thunkApi) {
|
|
33
|
-
var _VIEW_OPTIONS$newlyAc;
|
|
34
|
-
var view = _ref.view,
|
|
35
|
-
_ref$triggerActivate = _ref.triggerActivate,
|
|
36
|
-
triggerActivate = _ref$triggerActivate === void 0 ? false : _ref$triggerActivate,
|
|
37
|
-
activateOptions = _ref.activateOptions,
|
|
38
|
-
keepFiltersAndSearch = _ref.keepFiltersAndSearch,
|
|
39
|
-
_ref$fromUrl = _ref.fromUrl,
|
|
40
|
-
fromUrl = _ref$fromUrl === void 0 ? false : _ref$fromUrl,
|
|
41
|
-
forceRemoveFiltersAndSearch = _ref.forceRemoveFiltersAndSearch;
|
|
42
|
-
var state = thunkApi.getState();
|
|
43
|
-
var filerobot = thunkApi.extra.filerobot;
|
|
44
|
-
var viewBeforeChange = selectActiveView(state);
|
|
45
|
-
var newlyActivatedView = viewBeforeChange;
|
|
46
|
-
var isDiffView = viewBeforeChange !== view;
|
|
47
|
-
if (isDiffView) {
|
|
48
|
-
var allViews = selectAllViews(state);
|
|
49
|
-
var _filerobot$getPlugin = filerobot.getPlugin(PLUGINS_IDS.EXPLORER),
|
|
50
|
-
_filerobot$getPlugin$ = _filerobot$getPlugin.opts,
|
|
51
|
-
disableFiltersAndSearch = _filerobot$getPlugin$.disableFiltersAndSearch,
|
|
52
|
-
forceFilters = _filerobot$getPlugin$.forceFilters,
|
|
53
|
-
updateViewQueryInUrl = _filerobot$getPlugin.updateViewQueryInUrl;
|
|
54
|
-
if (!allViews.includes(view)) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// We are almost don't need any running/pending request if we have changed the view to avoid issues with views changing
|
|
59
|
-
// by returning back to some view again due to late request's response that's received after switching to another view..
|
|
60
|
-
thunkApi.abortAllInProgressAsyncThunks();
|
|
61
|
-
changeViewFetchFilesCachedQueries(null);
|
|
62
|
-
var dontRemoveFiltersAndSearch = (disableFiltersAndSearch || forceFilters || keepFiltersAndSearch || fromUrl) && !forceRemoveFiltersAndSearch;
|
|
63
|
-
thunkApi.dispatch(viewChanged({
|
|
64
|
-
view: view,
|
|
65
|
-
keepFiltersAndSearch: dontRemoveFiltersAndSearch
|
|
66
|
-
}));
|
|
67
|
-
newlyActivatedView = selectActiveView(thunkApi.getState());
|
|
68
|
-
var isViewChanged = viewBeforeChange !== newlyActivatedView; // double checking that the view is changed, as there is possibility for otherwise if wrong view id is provided
|
|
69
|
-
|
|
70
|
-
// Triggered here for making sure it's triggered after changing the view, and avoid extrareducers/issues that handled after calling viewChanged.
|
|
71
|
-
filerobot.emit('view-change-request', newlyActivatedView, isDiffView);
|
|
72
|
-
if (isViewChanged) {
|
|
73
|
-
if (!fromUrl) {
|
|
74
|
-
updateViewQueryInUrl({
|
|
75
|
-
view: newlyActivatedView,
|
|
76
|
-
keysToDelete: Object.values(dontRemoveFiltersAndSearch ? FMAW_URL_VIEW_QUERY_PARAMS : FMAW_URL_QUERY_PARAMS)
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
filerobot.emit('view-changed', newlyActivatedView);
|
|
80
|
-
}
|
|
81
|
-
} else {
|
|
82
|
-
filerobot.emit('view-change-request', newlyActivatedView, isDiffView);
|
|
83
|
-
}
|
|
84
|
-
if (triggerActivate && typeof ((_VIEW_OPTIONS$newlyAc = VIEW_OPTIONS[newlyActivatedView]) === null || _VIEW_OPTIONS$newlyAc === void 0 ? void 0 : _VIEW_OPTIONS$newlyAc.activateAction) === 'function') {
|
|
85
|
-
thunkApi.dispatch(loadFiltersFromOutside({
|
|
86
|
-
fromUrl: fromUrl
|
|
87
|
-
}));
|
|
88
|
-
thunkApi.dispatch(loadSearchFromOutside({
|
|
89
|
-
fromUrl: fromUrl
|
|
90
|
-
}));
|
|
91
|
-
thunkApi.dispatch(VIEW_OPTIONS[newlyActivatedView].activateAction(_objectSpread({
|
|
92
|
-
skipViewDispatch: true,
|
|
93
|
-
keepFiltersAndSearch: keepFiltersAndSearch
|
|
94
|
-
}, activateOptions)));
|
|
95
|
-
}
|
|
96
|
-
return newlyActivatedView;
|
|
97
|
-
});
|
|
98
|
-
export var changeLayout = createThunk(function (newLayout, thunkApi) {
|
|
99
|
-
thunkApi.dispatch(layoutChanged(newLayout));
|
|
100
|
-
var state = thunkApi.getState();
|
|
101
|
-
var isFoldersView = selectIsFoldersView(state);
|
|
102
|
-
if (isFoldersView && newLayout === LAYOUTS_IDS.GRID) {
|
|
103
|
-
// If the first folder of current loaded folders doesn't contain value for previews property
|
|
104
|
-
// means no previews request triggered before, so we are triggering it now.
|
|
105
|
-
// Also if the sort of files & folders are not the same, while we are changing the layout from list to grid...
|
|
106
|
-
// then no need to trigger folder previews request cause we're going to refetch the folders with a unified sort with previews.
|
|
107
|
-
var folders = selectFoldersArray(state) || [];
|
|
108
|
-
var isFilesAndFoldersSortDifferent = selectFoldersSortedBy(state) !== selectFilesSortedBy(state) || selectFoldersSortOrder(state) !== selectFilesSortOrder(state);
|
|
109
|
-
if (folders.length > 0 && !folders[0].previews && !isFilesAndFoldersSortDifferent) {
|
|
110
|
-
thunkApi.dispatch(fetchFoldersPreviews({
|
|
111
|
-
abortSignal: thunkApi.signal
|
|
112
|
-
}));
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
export var activateViewFromOutside = createThunk(function (_ref2, thunkApi) {
|
|
117
|
-
var _currentView$checkVis;
|
|
118
|
-
var _ref2$fromUrl = _ref2.fromUrl,
|
|
119
|
-
fromUrl = _ref2$fromUrl === void 0 ? false : _ref2$fromUrl;
|
|
120
|
-
var dispatch = thunkApi.dispatch,
|
|
121
|
-
getState = thunkApi.getState,
|
|
122
|
-
filerobot = thunkApi.extra.filerobot;
|
|
123
|
-
var _filerobot$getPlugin2 = filerobot.getPlugin(PLUGINS_IDS.EXPLORER),
|
|
124
|
-
getUrlQueryParam = _filerobot$getPlugin2.getUrlQueryParam,
|
|
125
|
-
opts = _filerobot$getPlugin2.opts,
|
|
126
|
-
checkUserPermissions = _filerobot$getPlugin2.checkUserPermissions,
|
|
127
|
-
i18n = _filerobot$getPlugin2.i18n,
|
|
128
|
-
info = _filerobot$getPlugin2.info;
|
|
129
|
-
var view = opts.view,
|
|
130
|
-
viewItem = opts.viewItem,
|
|
131
|
-
viewSubItem = opts.viewSubItem,
|
|
132
|
-
views = opts.views,
|
|
133
|
-
_opts$isRecursiveFetc = opts.isRecursiveFetch,
|
|
134
|
-
isRecursiveFetch = _opts$isRecursiveFetc === void 0 ? false : _opts$isRecursiveFetc;
|
|
135
|
-
var activeView = selectActiveView(getState());
|
|
136
|
-
var viewOptions = {
|
|
137
|
-
id: view || activeView,
|
|
138
|
-
itemToOpen: viewItem,
|
|
139
|
-
subItemToOpen: viewSubItem,
|
|
140
|
-
isRecursive: isRecursiveFetch
|
|
141
|
-
};
|
|
142
|
-
if (fromUrl) {
|
|
143
|
-
var _getUrlQueryParam;
|
|
144
|
-
var viewId = ((_getUrlQueryParam = getUrlQueryParam(FMAW_URL_QUERY_PARAMS.VIEW)) === null || _getUrlQueryParam === void 0 ? void 0 : _getUrlQueryParam.toUpperCase()) || viewOptions.id;
|
|
145
|
-
viewOptions = {
|
|
146
|
-
id: viewId,
|
|
147
|
-
itemToOpen: getUrlQueryParam(FMAW_URL_QUERY_PARAMS.VIEW_ITEM) || viewId === viewOptions.id && viewOptions.itemToOpen,
|
|
148
|
-
subItemToOpen: getUrlQueryParam(FMAW_URL_QUERY_PARAMS.VIEW_SUB_ITEM) || viewId === viewOptions.id && viewOptions.subItemToOpen,
|
|
149
|
-
fromUrl: true,
|
|
150
|
-
isRecursive: parseInt(getUrlQueryParam(FMAW_URL_QUERY_PARAMS.VIEW_RECURSIVE), 10) === 1
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
if (viewOptions.itemToOpen && (viewOptions.itemToOpen === '/.internal' || viewOptions.itemToOpen.startsWith('/.internal/'))) {
|
|
154
|
-
info(i18n('explorerInvalidPathInfo'), 'warning');
|
|
155
|
-
viewOptions.itemToOpen = '/';
|
|
156
|
-
}
|
|
157
|
-
var currentView = VIEW_OPTIONS[viewOptions.id];
|
|
158
|
-
var isVisibleView = currentView && views.includes(viewOptions.id.toUpperCase()) && (!fromUrl || !currentView.checkVisibility || ((_currentView$checkVis = currentView.checkVisibility) === null || _currentView$checkVis === void 0 ? void 0 : _currentView$checkVis.call(currentView, {
|
|
159
|
-
checkUserPermissions: checkUserPermissions
|
|
160
|
-
})));
|
|
161
|
-
if (isVisibleView) {
|
|
162
|
-
return dispatch(changeView({
|
|
163
|
-
triggerActivate: true,
|
|
164
|
-
view: viewOptions.id,
|
|
165
|
-
activateOptions: viewOptions,
|
|
166
|
-
fromUrl: fromUrl
|
|
167
|
-
}));
|
|
168
|
-
}
|
|
169
|
-
info(i18n('explorerInvalidViewProvided'), 'warning');
|
|
170
|
-
var activeViewId = selectActiveView(thunkApi.getState());
|
|
171
|
-
return dispatch(changeView({
|
|
172
|
-
triggerActivate: true,
|
|
173
|
-
view: activeViewId,
|
|
174
|
-
fromUrl: fromUrl
|
|
175
|
-
}));
|
|
176
|
-
});
|
|
177
|
-
export var searchOrListViewFiles = createThunk(function () {
|
|
178
|
-
var _extra$filerobot$getP, _extra$filerobot$getP2, _defaultSearchSort$te, _defaultSearchSort$te2;
|
|
179
|
-
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
180
|
-
searchQuery = _ref3.searchQuery,
|
|
181
|
-
offset = _ref3.offset,
|
|
182
|
-
cachedViewQueries = _ref3.cachedViewQueries,
|
|
183
|
-
sorting = _ref3.sorting,
|
|
184
|
-
rest = _objectWithoutProperties(_ref3, _excluded);
|
|
185
|
-
var thunkApi = arguments.length > 1 ? arguments[1] : undefined;
|
|
186
|
-
var _rest$applyActiveView = rest.applyActiveViewItemCheck,
|
|
187
|
-
applyActiveViewItemCheck = _rest$applyActiveView === void 0 ? true : _rest$applyActiveView;
|
|
188
|
-
var dispatch = thunkApi.dispatch,
|
|
189
|
-
getState = thunkApi.getState,
|
|
190
|
-
extra = thunkApi.extra;
|
|
191
|
-
var state = getState();
|
|
192
|
-
if (applyActiveViewItemCheck && !selectActiveViewItem(state)) {
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
var currentSearchQuery = selectSearchQuery(state);
|
|
196
|
-
var isAiSearch = selectIsAiSearch(state);
|
|
197
|
-
var isAssetsView = selectIsAssetsView(state);
|
|
198
|
-
if (isAiSearch && isAssetsView) {
|
|
199
|
-
return dispatch(searchFilesWithAiText({
|
|
200
|
-
searchQuery: currentSearchQuery
|
|
201
|
-
}));
|
|
202
|
-
}
|
|
203
|
-
var isSimilarSearchActive = selectIsSimilarSearchActive(state);
|
|
204
|
-
if (isSimilarSearchActive) {
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// If no search query at all then no need to trigger search request instead trigger fetchFiles for listing.
|
|
209
|
-
var isNoSearchAtAll = !searchQuery && !currentSearchQuery;
|
|
210
|
-
if (isNoSearchAtAll) {
|
|
211
|
-
var defaultOffset = rest.replaceOldFiles === false ? undefined : 0;
|
|
212
|
-
return dispatch(fetchFiles(_objectSpread({
|
|
213
|
-
offset: offset !== null && offset !== void 0 ? offset : defaultOffset,
|
|
214
|
-
cachedViewQueries: cachedViewQueries,
|
|
215
|
-
sorting: sorting
|
|
216
|
-
}, rest)));
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
// exact and extended search
|
|
220
|
-
var _ref4 = (extra === null || extra === void 0 ? void 0 : (_extra$filerobot$getP = extra.filerobot.getPlugin(PLUGINS_IDS.EXPLORER)) === null || _extra$filerobot$getP === void 0 ? void 0 : (_extra$filerobot$getP2 = _extra$filerobot$getP.opts) === null || _extra$filerobot$getP2 === void 0 ? void 0 : _extra$filerobot$getP2.config) || {},
|
|
221
|
-
defaultSearchSort = _ref4.defaultSearchSort;
|
|
222
|
-
var defaultSearchSortBy = checkIsValidSearchSortBy(defaultSearchSort === null || defaultSearchSort === void 0 ? void 0 : (_defaultSearchSort$te = defaultSearchSort.text) === null || _defaultSearchSort$te === void 0 ? void 0 : _defaultSearchSort$te.by) ? defaultSearchSort.text.by : SORT_BY.RELEVANCE;
|
|
223
|
-
var defaultSearchSortOrder = checkIsValidSortOrder(defaultSearchSort === null || defaultSearchSort === void 0 ? void 0 : (_defaultSearchSort$te2 = defaultSearchSort.text) === null || _defaultSearchSort$te2 === void 0 ? void 0 : _defaultSearchSort$te2.order) ? defaultSearchSort.text.order : SORT_ORDER.DSC;
|
|
224
|
-
var isSearchedBefore = selectIsSearchFetchType(state);
|
|
225
|
-
var searchArgs = {
|
|
226
|
-
searchQuery: searchQuery || currentSearchQuery,
|
|
227
|
-
cachedViewQueries: cachedViewQueries,
|
|
228
|
-
sorting: isSearchedBefore ? sorting : "".concat(defaultSearchSortBy, ":").concat(defaultSearchSortOrder)
|
|
229
|
-
};
|
|
230
|
-
return dispatch(submitSearch(searchArgs));
|
|
231
|
-
});
|
|
232
|
-
export var resetSearchAndFiltersMode = createThunk(function (_, thunkApi) {
|
|
233
|
-
thunkApi.dispatch(updateFilteredFiles({
|
|
234
|
-
filters: {},
|
|
235
|
-
dismissApiCall: true,
|
|
236
|
-
noInformer: true
|
|
237
|
-
}));
|
|
238
|
-
thunkApi.dispatch(updateSearchQuery({
|
|
239
|
-
query: '',
|
|
240
|
-
noInformer: true
|
|
241
|
-
}));
|
|
242
|
-
thunkApi.dispatch(updateSearchSuggestions({
|
|
243
|
-
filters: [],
|
|
244
|
-
tags: [],
|
|
245
|
-
dismissApiCall: true,
|
|
246
|
-
noInformer: true
|
|
247
|
-
}));
|
|
248
|
-
});
|
|
249
|
-
var viewsSlice = createSlice({
|
|
250
|
-
name: sliceName,
|
|
251
|
-
initialState: initialState,
|
|
252
|
-
reducers: {
|
|
253
|
-
viewChanged: function viewChanged(state, action) {
|
|
254
|
-
var newView = action.payload.view;
|
|
255
|
-
if (newView === state.activeView) {
|
|
256
|
-
return state;
|
|
257
|
-
}
|
|
258
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
259
|
-
activeView: newView
|
|
260
|
-
});
|
|
261
|
-
},
|
|
262
|
-
viewsChanged: function viewsChanged(state, action) {
|
|
263
|
-
var newViews = action.payload.views || state.list;
|
|
264
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
265
|
-
list: newViews
|
|
266
|
-
});
|
|
267
|
-
},
|
|
268
|
-
layoutChanged: function layoutChanged(state, action) {
|
|
269
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
270
|
-
layout: action.payload
|
|
271
|
-
});
|
|
272
|
-
},
|
|
273
|
-
viewsStateUpdated: function viewsStateUpdated(state, action) {
|
|
274
|
-
return _objectSpread(_objectSpread({}, state), action.payload);
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
extraReducers: function extraReducers(builder) {
|
|
278
|
-
builder.addMatcher(isAnyOf(generateUserKey.fulfilled, fetchUserAuthState.fulfilled), viewsSlice.caseReducers.viewsChanged);
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
var _viewsSlice$actions = viewsSlice.actions,
|
|
282
|
-
viewChanged = _viewsSlice$actions.viewChanged,
|
|
283
|
-
viewsChanged = _viewsSlice$actions.viewsChanged,
|
|
284
|
-
layoutChanged = _viewsSlice$actions.layoutChanged,
|
|
285
|
-
viewsStateUpdated = _viewsSlice$actions.viewsStateUpdated;
|
|
286
|
-
export { viewChanged, viewsChanged, layoutChanged, viewsStateUpdated };
|
|
287
|
-
export var selectViewsState = function selectViewsState(state) {
|
|
288
|
-
var _state$PLUGINS_IDS$EX;
|
|
289
|
-
return ((_state$PLUGINS_IDS$EX = state[PLUGINS_IDS.EXPLORER]) === null || _state$PLUGINS_IDS$EX === void 0 ? void 0 : _state$PLUGINS_IDS$EX[slicePropName]) || initialState;
|
|
290
|
-
};
|
|
291
|
-
export var selectActiveView = function selectActiveView(state) {
|
|
292
|
-
return selectViewsState(state).activeView;
|
|
293
|
-
};
|
|
294
|
-
var checkViewActivation = function checkViewActivation(state, viewId) {
|
|
295
|
-
return selectActiveView(state) === viewId;
|
|
296
|
-
};
|
|
297
|
-
var checkViewLayoutActivation = function checkViewLayoutActivation(state, layout) {
|
|
298
|
-
return selectViewLayout(state) === layout;
|
|
299
|
-
};
|
|
300
|
-
export var selectAllViews = function selectAllViews(state) {
|
|
301
|
-
return selectViewsState(state).list;
|
|
302
|
-
};
|
|
303
|
-
var checkViewAvailability = function checkViewAvailability(state, viewId) {
|
|
304
|
-
return selectAllViews(state).includes(viewId);
|
|
305
|
-
};
|
|
306
|
-
export var selectIsAssetsViewAvailable = function selectIsAssetsViewAvailable(state) {
|
|
307
|
-
return checkViewAvailability(state, VIEW_IDS.ASSETS);
|
|
308
|
-
};
|
|
309
|
-
export var selectIsFoldersViewAvailable = function selectIsFoldersViewAvailable(state) {
|
|
310
|
-
return checkViewAvailability(state, VIEW_IDS.FOLDERS);
|
|
311
|
-
};
|
|
312
|
-
export var selectIsSearchMode = function selectIsSearchMode(state) {
|
|
313
|
-
return Boolean(selectSearchQuery(state));
|
|
314
|
-
};
|
|
315
|
-
export var selectIsSearchOrFiltersMode = function selectIsSearchOrFiltersMode(state) {
|
|
316
|
-
return selectIsSearchMode(state) || selectIsFiltersActive(state);
|
|
317
|
-
};
|
|
318
|
-
export var selectIsAssetsView = function selectIsAssetsView(state) {
|
|
319
|
-
return checkViewActivation(state, VIEW_IDS.ASSETS);
|
|
320
|
-
};
|
|
321
|
-
export var selectIsFoldersView = function selectIsFoldersView(state) {
|
|
322
|
-
return checkViewActivation(state, VIEW_IDS.FOLDERS);
|
|
323
|
-
};
|
|
324
|
-
export var selectViewLayout = function selectViewLayout(state) {
|
|
325
|
-
return selectViewsState(state).layout;
|
|
326
|
-
};
|
|
327
|
-
export var selectIsListLayout = function selectIsListLayout(state) {
|
|
328
|
-
return checkViewLayoutActivation(state, LAYOUTS_IDS.LIST);
|
|
329
|
-
};
|
|
330
|
-
export var selectIsGridLayout = function selectIsGridLayout(state) {
|
|
331
|
-
return checkViewLayoutActivation(state, LAYOUTS_IDS.GRID);
|
|
332
|
-
};
|
|
333
|
-
export var selectIsTilesLayout = function selectIsTilesLayout(state) {
|
|
334
|
-
return checkViewLayoutActivation(state, LAYOUTS_IDS.TILES);
|
|
335
|
-
};
|
|
336
|
-
export var selectActiveViewItem = function selectActiveViewItem(state) {
|
|
337
|
-
var _VIEW_OPTIONS$activeV, _VIEW_OPTIONS$activeV2;
|
|
338
|
-
var activeView = selectActiveView(state);
|
|
339
|
-
if (!activeView) {
|
|
340
|
-
return null;
|
|
341
|
-
}
|
|
342
|
-
var activeViewItem = (_VIEW_OPTIONS$activeV = VIEW_OPTIONS[activeView]) === null || _VIEW_OPTIONS$activeV === void 0 ? void 0 : (_VIEW_OPTIONS$activeV2 = _VIEW_OPTIONS$activeV.activeItemSelector) === null || _VIEW_OPTIONS$activeV2 === void 0 ? void 0 : _VIEW_OPTIONS$activeV2.call(_VIEW_OPTIONS$activeV, state);
|
|
343
|
-
return activeViewItem || null;
|
|
344
|
-
};
|
|
345
|
-
export default viewsSlice.reducer;
|
|
@@ -1,175 +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 _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; }
|
|
3
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
4
|
-
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); }
|
|
5
|
-
import cuid from 'cuid';
|
|
6
|
-
import { PROGRESS_PANEL_ACTIVITY, PROGRESS_PANEL_STATUS, PLUGINS_IDS } from '@scaleflex/widget-utils/lib/constants';
|
|
7
|
-
import createThunk from '@scaleflex/widget-utils/lib/createThunk';
|
|
8
|
-
import { PC } from '@scaleflex/widget-common';
|
|
9
|
-
var archiveItems = createThunk(async function (_ref, thunkApi) {
|
|
10
|
-
var folderIdentifiers = _ref.folderIdentifiers,
|
|
11
|
-
fileIdentifiers = _ref.fileIdentifiers,
|
|
12
|
-
urls = _ref.urls,
|
|
13
|
-
signal = _ref.signal;
|
|
14
|
-
var extra = thunkApi.extra;
|
|
15
|
-
var _await$extra$apiClien = await extra.apiClient.post('file-archive', {
|
|
16
|
-
data: {
|
|
17
|
-
folders_uuids: folderIdentifiers,
|
|
18
|
-
files_uuids: fileIdentifiers,
|
|
19
|
-
urls: urls
|
|
20
|
-
},
|
|
21
|
-
abortSignal: signal
|
|
22
|
-
}),
|
|
23
|
-
taskId = _await$extra$apiClien.task_id;
|
|
24
|
-
if (taskId) {
|
|
25
|
-
return {
|
|
26
|
-
taskId: taskId,
|
|
27
|
-
taskUrl: "file-archive/".concat(taskId)
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
}, {
|
|
31
|
-
dismissGlobalAbort: true
|
|
32
|
-
});
|
|
33
|
-
var cancelArchive = createThunk(function (_ref2, thunkApi) {
|
|
34
|
-
var taskId = _ref2.taskId;
|
|
35
|
-
return thunkApi.extra.apiClient.patch("file-archive/".concat(taskId, "/cancel"));
|
|
36
|
-
});
|
|
37
|
-
var checkArchiveStatus = createThunk(async function (_ref3, thunkApi) {
|
|
38
|
-
var taskId = _ref3.taskId,
|
|
39
|
-
taskUrl = _ref3.taskUrl,
|
|
40
|
-
signal = _ref3.signal;
|
|
41
|
-
var extra = thunkApi.extra,
|
|
42
|
-
rejectWithValue = thunkApi.rejectWithValue;
|
|
43
|
-
if (!taskId) {
|
|
44
|
-
return rejectWithValue(extra.filerobot.i18n('mutualizedUnknownErrorMessage'));
|
|
45
|
-
}
|
|
46
|
-
var _await$extra$apiClien2 = await extra.apiClient.get("".concat(taskUrl, "?status_only=1"), {
|
|
47
|
-
abortSignal: signal
|
|
48
|
-
}),
|
|
49
|
-
status = _await$extra$apiClien2.task_status,
|
|
50
|
-
progress = _await$extra$apiClien2.task_percent;
|
|
51
|
-
if (['PENDING', 'RUNNING', 'PROCESSING'].includes(status)) {
|
|
52
|
-
return {
|
|
53
|
-
retrigger: true,
|
|
54
|
-
progress: progress
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
if (status === 'DONE') {
|
|
58
|
-
return {
|
|
59
|
-
retrigger: false,
|
|
60
|
-
taskId: taskId,
|
|
61
|
-
taskUrl: taskUrl,
|
|
62
|
-
headers: {
|
|
63
|
-
'Content-Type': 'application/zip'
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
return rejectWithValue(extra.filerobot.i18n('mutualizedUnknownErrorMessage'));
|
|
68
|
-
}, {
|
|
69
|
-
dismissGlobalAbort: true
|
|
70
|
-
});
|
|
71
|
-
var addArchiveActivity = createThunk(function (_ref4, thunkApi) {
|
|
72
|
-
var activityId = _ref4.id,
|
|
73
|
-
items = _ref4.items,
|
|
74
|
-
itemsSize = _ref4.itemsSize,
|
|
75
|
-
urls = _ref4.urls,
|
|
76
|
-
avoidExportEvent = _ref4.avoidExportEvent,
|
|
77
|
-
onRetry = _ref4.onRetry,
|
|
78
|
-
_onStart = _ref4.onStart,
|
|
79
|
-
preparingStatusI18nKey = _ref4.preparingStatusI18nKey,
|
|
80
|
-
folderIdentifiers = _ref4.folderIdentifiers,
|
|
81
|
-
fileIdentifiers = _ref4.fileIdentifiers;
|
|
82
|
-
var dispatch = thunkApi.dispatch,
|
|
83
|
-
extra = thunkApi.extra;
|
|
84
|
-
var progressPanelPlugin = extra.filerobot.getPlugin(PLUGINS_IDS.PROGRESS_PANEL);
|
|
85
|
-
var id = activityId || cuid();
|
|
86
|
-
var archiveTaskId;
|
|
87
|
-
var useRetryAction = id && items && itemsSize && (urls || folderIdentifiers || fileIdentifiers);
|
|
88
|
-
return progressPanelPlugin.addActivity({
|
|
89
|
-
isSaveableActivity: true,
|
|
90
|
-
activity: {
|
|
91
|
-
id: id,
|
|
92
|
-
type: PROGRESS_PANEL_ACTIVITY.ARCHIVE,
|
|
93
|
-
hideRetryButton: !useRetryAction,
|
|
94
|
-
progress: {
|
|
95
|
-
percentage: 0,
|
|
96
|
-
startedAt: Date.now(),
|
|
97
|
-
status: PROGRESS_PANEL_STATUS.PREPARING
|
|
98
|
-
},
|
|
99
|
-
icon: {
|
|
100
|
-
name: 'Archive',
|
|
101
|
-
color: PC.BorderPrimaryStateless
|
|
102
|
-
},
|
|
103
|
-
statusData: _defineProperty(_defineProperty(_defineProperty({}, PROGRESS_PANEL_STATUS.PREPARING, {
|
|
104
|
-
labelI18nKey: preparingStatusI18nKey || 'progressPanelPreparingArchiveLabel'
|
|
105
|
-
}), PROGRESS_PANEL_STATUS.PROGRESSING, {
|
|
106
|
-
labelI18nKey: 'progressPanelPreparingArchiveLabel'
|
|
107
|
-
}), PROGRESS_PANEL_STATUS.ERROR, {
|
|
108
|
-
labelI18nKey: 'progressPanelArchiveFailedLabel'
|
|
109
|
-
})
|
|
110
|
-
},
|
|
111
|
-
onStart: async function onStart(_ref5) {
|
|
112
|
-
var activitySignal = _ref5.activitySignal;
|
|
113
|
-
var archiveItemsTask = typeof _onStart === 'function' ? _onStart() : await dispatch(archiveItems({
|
|
114
|
-
folderIdentifiers: folderIdentifiers,
|
|
115
|
-
fileIdentifiers: fileIdentifiers,
|
|
116
|
-
urls: urls,
|
|
117
|
-
signal: activitySignal
|
|
118
|
-
})).throwRejection();
|
|
119
|
-
archiveTaskId = archiveItemsTask === null || archiveItemsTask === void 0 ? void 0 : archiveItemsTask.taskId;
|
|
120
|
-
return archiveItemsTask;
|
|
121
|
-
},
|
|
122
|
-
onProgress: function onProgress(_ref6) {
|
|
123
|
-
var onStartData = _ref6.onStartData,
|
|
124
|
-
activitySignal = _ref6.activitySignal;
|
|
125
|
-
return dispatch(checkArchiveStatus({
|
|
126
|
-
taskId: onStartData.taskId,
|
|
127
|
-
taskUrl: onStartData.taskUrl,
|
|
128
|
-
signal: activitySignal
|
|
129
|
-
})).throwRejection();
|
|
130
|
-
},
|
|
131
|
-
onRetry: useRetryAction && function (_ref7) {
|
|
132
|
-
var id = _ref7.id;
|
|
133
|
-
if (typeof onRetry === 'function') {
|
|
134
|
-
return onRetry({
|
|
135
|
-
id: id
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
return dispatch(addArchiveActivity({
|
|
139
|
-
id: id,
|
|
140
|
-
items: items,
|
|
141
|
-
itemsSize: itemsSize,
|
|
142
|
-
urls: urls,
|
|
143
|
-
avoidExportEvent: avoidExportEvent,
|
|
144
|
-
folderIdentifiers: folderIdentifiers,
|
|
145
|
-
fileIdentifiers: fileIdentifiers,
|
|
146
|
-
preparingStatusI18nKey: preparingStatusI18nKey,
|
|
147
|
-
onStart: _onStart
|
|
148
|
-
}));
|
|
149
|
-
},
|
|
150
|
-
onCancel: function onCancel() {
|
|
151
|
-
if (archiveTaskId) {
|
|
152
|
-
dispatch(cancelArchive({
|
|
153
|
-
taskId: archiveTaskId
|
|
154
|
-
}));
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
export var addArchive = createThunk(async function (params, thunkApi) {
|
|
160
|
-
var urls = params.urls,
|
|
161
|
-
folderIdentifiers = params.folderIdentifiers,
|
|
162
|
-
fileIdentifiers = params.fileIdentifiers;
|
|
163
|
-
var dispatch = thunkApi.dispatch,
|
|
164
|
-
extra = thunkApi.extra;
|
|
165
|
-
var progressPanelPlugin = extra.filerobot.getPlugin(PLUGINS_IDS.PROGRESS_PANEL);
|
|
166
|
-
if (progressPanelPlugin) {
|
|
167
|
-
return dispatch(addArchiveActivity(params));
|
|
168
|
-
} else {
|
|
169
|
-
return dispatch(archiveItems({
|
|
170
|
-
folderIdentifiers: folderIdentifiers,
|
|
171
|
-
fileIdentifiers: fileIdentifiers,
|
|
172
|
-
urls: urls
|
|
173
|
-
})).throwRejection();
|
|
174
|
-
}
|
|
175
|
-
});
|