@scaleflex/widget-explorer 4.1.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 +34 -0
- package/README.md +7 -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 -256
- 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/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 -7
- 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 -1360
- 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 -1586
- 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,995 +0,0 @@
|
|
|
1
|
-
var _excluded = ["searchQuery"],
|
|
2
|
-
_excluded2 = ["searchQuery", "offset", "replaceOldFiles", "skipPendingDispatch"],
|
|
3
|
-
_excluded3 = ["searchQuery", "offset", "replaceOldFiles", "skipPendingDispatch"],
|
|
4
|
-
_excluded4 = ["searchQuery", "id", "moreQueries", "offset", "limit", "withStats", "skipDispatch"];
|
|
5
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
6
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
8
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
9
|
-
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); }
|
|
10
|
-
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
11
|
-
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."); }
|
|
12
|
-
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; } }
|
|
13
|
-
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; }
|
|
14
|
-
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; } }
|
|
15
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
16
|
-
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; }
|
|
17
|
-
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; }
|
|
18
|
-
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; }
|
|
19
|
-
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; }
|
|
20
|
-
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; }
|
|
21
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
|
-
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); }
|
|
23
|
-
import { createSelector, createSlice, isAnyOf } from '@reduxjs/toolkit';
|
|
24
|
-
import { FMAW_URL_QUERY_PARAMS, PLUGINS_IDS, SEARCH_METHODS } from '@scaleflex/widget-utils/lib/constants';
|
|
25
|
-
import createThunk from '@scaleflex/widget-utils/lib/createThunk';
|
|
26
|
-
import getJsonParsedValue from '@scaleflex/widget-utils/lib/getJsonParsedValue';
|
|
27
|
-
import getDecodedUriComponent from '@scaleflex/widget-utils/lib/getDecodedUriComponent';
|
|
28
|
-
import getActionErrorState from '@scaleflex/widget-utils/lib/getActionErrorState';
|
|
29
|
-
import { resetSearchAndFiltersMode, searchOrListViewFiles, selectActiveViewItem, selectIsAssetsView, selectIsSearchMode, viewChanged } from './views.slice';
|
|
30
|
-
import { fetchFiles, sliceName as filesSliceName, deleteFiles, filesLoadingSet, fetchFileByUuid, fileUpdated } from './files.slice';
|
|
31
|
-
import { downloadOneFile } from '../thunks/downloads.thunks';
|
|
32
|
-
import { activateAssetsView } from '../components/AssetsView/AssetsView.thunks';
|
|
33
|
-
import { MODE_ID } from '../utils/SearchSuggestions';
|
|
34
|
-
import { selectionsCleared } from './selections.slice';
|
|
35
|
-
import decodeB64ToStr from '../utils/decodeB64ToStr';
|
|
36
|
-
var slicePropName = 'search';
|
|
37
|
-
var sliceName = "".concat(PLUGINS_IDS.EXPLORER, "/").concat(slicePropName);
|
|
38
|
-
var FETCH_TYPES = {
|
|
39
|
-
LIST: 'LIST',
|
|
40
|
-
SEARCH: 'SEARCH'
|
|
41
|
-
};
|
|
42
|
-
var initialState = {
|
|
43
|
-
files: [],
|
|
44
|
-
folders: [],
|
|
45
|
-
defaultQuery: '',
|
|
46
|
-
query: '',
|
|
47
|
-
method: SEARCH_METHODS.QUICK,
|
|
48
|
-
fetchType: FETCH_TYPES.LIST,
|
|
49
|
-
isQuickFetching: true,
|
|
50
|
-
isExtendFetching: true,
|
|
51
|
-
isSending: false,
|
|
52
|
-
isAiSearch: false,
|
|
53
|
-
extendError: null,
|
|
54
|
-
quickError: null,
|
|
55
|
-
similar: {
|
|
56
|
-
originalFile: {},
|
|
57
|
-
active: false
|
|
58
|
-
},
|
|
59
|
-
stats: {
|
|
60
|
-
filesCount: 0,
|
|
61
|
-
filesCountMethod: null,
|
|
62
|
-
filesSize: 0
|
|
63
|
-
},
|
|
64
|
-
exactMatch: {
|
|
65
|
-
entities: {},
|
|
66
|
-
uuids: [],
|
|
67
|
-
offset: 0,
|
|
68
|
-
noMoreFiles: false
|
|
69
|
-
},
|
|
70
|
-
extended: {
|
|
71
|
-
entities: {},
|
|
72
|
-
uuids: [],
|
|
73
|
-
offset: 0,
|
|
74
|
-
noMoreFiles: false
|
|
75
|
-
},
|
|
76
|
-
suggestions: {
|
|
77
|
-
filters: [],
|
|
78
|
-
tags: [],
|
|
79
|
-
attributesKeys: [],
|
|
80
|
-
attributesKeysLoading: false,
|
|
81
|
-
attributesKeysLoadingFinished: false,
|
|
82
|
-
// Finished state necessary to mark that request was already sent. Otherwise there are issues with empty keys & tags
|
|
83
|
-
attributesTags: [],
|
|
84
|
-
attributesTagsLoading: false,
|
|
85
|
-
attributesTagsLoadingFinished: false
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
var SEARCH_PARAM_KEYS = {
|
|
89
|
-
QUERY: 'query',
|
|
90
|
-
TAGS: 'tags',
|
|
91
|
-
FILTERS: 'filters',
|
|
92
|
-
SIMILAR: 'similar',
|
|
93
|
-
AI: 'ai'
|
|
94
|
-
};
|
|
95
|
-
var setSearchParamsInUrl = createThunk(function (_, thunkApi) {
|
|
96
|
-
var _thunkApi$extra$filer = thunkApi.extra.filerobot.getPlugin(PLUGINS_IDS.EXPLORER),
|
|
97
|
-
replaceUrlQueryParams = _thunkApi$extra$filer.replaceUrlQueryParams;
|
|
98
|
-
var state = thunkApi.getState();
|
|
99
|
-
var searchSuggestionsTags = selectSearchSuggestionsTags(state);
|
|
100
|
-
var searchSuggestionsFilters = selectSearchSuggestionsFilters(state);
|
|
101
|
-
var searchQuery = selectSearchQuery(state);
|
|
102
|
-
var similarSearchOriginalFile = selectSimilarSearchOriginalFile(state);
|
|
103
|
-
var isAiSearch = selectIsAiSearch(state);
|
|
104
|
-
var newSearch = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, SEARCH_PARAM_KEYS.QUERY, searchQuery), SEARCH_PARAM_KEYS.FILTERS, (searchSuggestionsFilters === null || searchSuggestionsFilters === void 0 ? void 0 : searchSuggestionsFilters.length) > 0 ? encodeURIComponent(JSON.stringify(searchSuggestionsFilters.map(function (filter) {
|
|
105
|
-
return [filter.key, filter.value];
|
|
106
|
-
}))) : undefined), SEARCH_PARAM_KEYS.TAGS, (searchSuggestionsTags === null || searchSuggestionsTags === void 0 ? void 0 : searchSuggestionsTags.length) > 0 ? searchSuggestionsTags.map(function (tag) {
|
|
107
|
-
return tag.input;
|
|
108
|
-
}) : undefined), SEARCH_PARAM_KEYS.SIMILAR, similarSearchOriginalFile !== null && similarSearchOriginalFile !== void 0 && similarSearchOriginalFile.uuid ? btoa(similarSearchOriginalFile.uuid) : undefined), SEARCH_PARAM_KEYS.AI, isAiSearch);
|
|
109
|
-
replaceUrlQueryParams({
|
|
110
|
-
params: newSearch,
|
|
111
|
-
keyPrefix: FMAW_URL_QUERY_PARAMS.SEARCH_PREFIX,
|
|
112
|
-
keysToDelete: [FMAW_URL_QUERY_PARAMS.SEARCH_PREFIX]
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
export var updateSearchQuery = createThunk(function (_ref, thunkApi) {
|
|
116
|
-
var query = _ref.query,
|
|
117
|
-
defaultQuery = _ref.defaultQuery,
|
|
118
|
-
_ref$noUrlUpdate = _ref.noUrlUpdate,
|
|
119
|
-
noUrlUpdate = _ref$noUrlUpdate === void 0 ? false : _ref$noUrlUpdate,
|
|
120
|
-
_ref$noInformer = _ref.noInformer,
|
|
121
|
-
noInformer = _ref$noInformer === void 0 ? false : _ref$noInformer;
|
|
122
|
-
var _thunkApi$extra$filer2 = thunkApi.extra.filerobot.getPlugin(PLUGINS_IDS.EXPLORER),
|
|
123
|
-
info = _thunkApi$extra$filer2.info,
|
|
124
|
-
i18n = _thunkApi$extra$filer2.i18n,
|
|
125
|
-
opts = _thunkApi$extra$filer2.opts;
|
|
126
|
-
var disableFiltersAndSearch = opts.disableFiltersAndSearch,
|
|
127
|
-
search = opts.search;
|
|
128
|
-
if (disableFiltersAndSearch && typeof (search === null || search === void 0 ? void 0 : search.query) !== 'undefined') {
|
|
129
|
-
if (!noInformer) {
|
|
130
|
-
info(i18n('explorerFiltersAndSearchDisabledWarning'), 'warning');
|
|
131
|
-
}
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
thunkApi.dispatch(searchQueryUpdated({
|
|
135
|
-
query: query,
|
|
136
|
-
defaultQuery: defaultQuery
|
|
137
|
-
}));
|
|
138
|
-
if (!noUrlUpdate) {
|
|
139
|
-
thunkApi.dispatch(setSearchParamsInUrl());
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
export var searchByTag = createThunk(function (_ref2, thunkApi) {
|
|
143
|
-
var _tag$label;
|
|
144
|
-
var tag = _ref2.tag;
|
|
145
|
-
var tagLabel = (_tag$label = tag.label) !== null && _tag$label !== void 0 ? _tag$label : tag;
|
|
146
|
-
return thunkApi.dispatch(updateSearchSuggestions({
|
|
147
|
-
tags: [_objectSpread(_objectSpread({}, tag), {}, {
|
|
148
|
-
category: MODE_ID.TAG,
|
|
149
|
-
input: "\"#".concat(tagLabel, "\""),
|
|
150
|
-
name: tagLabel
|
|
151
|
-
})]
|
|
152
|
-
}));
|
|
153
|
-
});
|
|
154
|
-
export var submitSearch = createThunk(async function () {
|
|
155
|
-
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
156
|
-
searchQuery = _ref3.searchQuery,
|
|
157
|
-
rest = _objectWithoutProperties(_ref3, _excluded);
|
|
158
|
-
var thunkApi = arguments.length > 1 ? arguments[1] : undefined;
|
|
159
|
-
var dispatch = thunkApi.dispatch,
|
|
160
|
-
getState = thunkApi.getState;
|
|
161
|
-
var state = getState();
|
|
162
|
-
var isNotSearchableViews = !selectActiveViewItem(state);
|
|
163
|
-
if (isNotSearchableViews) {
|
|
164
|
-
dispatch(filesLoadingSet(false)); // for making sure that no loading will be shown from files as we will use the loading from search
|
|
165
|
-
return dispatch(activateAssetsView({
|
|
166
|
-
keepFiltersAndSearch: true
|
|
167
|
-
}));
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// exact and extended search
|
|
171
|
-
var searchArgs = _objectSpread(_objectSpread({}, rest), {}, {
|
|
172
|
-
searchQuery: searchQuery,
|
|
173
|
-
offset: 0
|
|
174
|
-
});
|
|
175
|
-
if (searchQuery) {
|
|
176
|
-
dispatch(updateSearchQuery({
|
|
177
|
-
query: searchQuery,
|
|
178
|
-
noInformer: true
|
|
179
|
-
}));
|
|
180
|
-
}
|
|
181
|
-
var _await$Promise$all = await Promise.all([dispatch(fetchQuickSearch(searchArgs)), dispatch(fetchExtendedFiles(searchArgs))]),
|
|
182
|
-
_await$Promise$all2 = _slicedToArray(_await$Promise$all, 2),
|
|
183
|
-
quickResult = _await$Promise$all2[0],
|
|
184
|
-
extendResult = _await$Promise$all2[1];
|
|
185
|
-
return {
|
|
186
|
-
quickResult: quickResult,
|
|
187
|
-
extendResult: extendResult
|
|
188
|
-
};
|
|
189
|
-
});
|
|
190
|
-
export var fetchQuickSearch = createThunk(async function (_ref4, thunkApi) {
|
|
191
|
-
var searchQuery = _ref4.searchQuery,
|
|
192
|
-
offset = _ref4.offset,
|
|
193
|
-
replaceOldFiles = _ref4.replaceOldFiles,
|
|
194
|
-
skipPendingDispatch = _ref4.skipPendingDispatch,
|
|
195
|
-
rest = _objectWithoutProperties(_ref4, _excluded2);
|
|
196
|
-
if (skipPendingDispatch) {
|
|
197
|
-
thunkApi.skipPendingDispatch();
|
|
198
|
-
}
|
|
199
|
-
return thunkApi.dispatch(triggerSearch(_objectSpread({
|
|
200
|
-
dispatchFn: thunkApi.dispatch,
|
|
201
|
-
searchQuery: searchQuery,
|
|
202
|
-
id: 'searchFilesQuick',
|
|
203
|
-
offset: offset !== null && offset !== void 0 ? offset : selectExactSearchOffset(thunkApi.getState()),
|
|
204
|
-
withStats: false,
|
|
205
|
-
replaceOldFiles: replaceOldFiles
|
|
206
|
-
}, rest)));
|
|
207
|
-
}, {
|
|
208
|
-
actionType: "".concat(sliceName, "/quickSearch")
|
|
209
|
-
});
|
|
210
|
-
export var fetchExtendedFiles = createThunk(async function (_ref5, thunkApi) {
|
|
211
|
-
var searchQuery = _ref5.searchQuery,
|
|
212
|
-
offset = _ref5.offset,
|
|
213
|
-
replaceOldFiles = _ref5.replaceOldFiles,
|
|
214
|
-
skipPendingDispatch = _ref5.skipPendingDispatch,
|
|
215
|
-
rest = _objectWithoutProperties(_ref5, _excluded3);
|
|
216
|
-
if (skipPendingDispatch) {
|
|
217
|
-
thunkApi.skipPendingDispatch();
|
|
218
|
-
}
|
|
219
|
-
return thunkApi.dispatch(triggerSearch(_objectSpread({
|
|
220
|
-
dispatchFn: thunkApi.dispatch,
|
|
221
|
-
searchQuery: searchQuery,
|
|
222
|
-
id: 'searchFilesExtended',
|
|
223
|
-
offset: offset !== null && offset !== void 0 ? offset : selectExtendedSearchOffset(thunkApi.getState()),
|
|
224
|
-
limit: 2000,
|
|
225
|
-
moreQueries: {
|
|
226
|
-
method: SEARCH_METHODS.EXTENDED
|
|
227
|
-
},
|
|
228
|
-
replaceOldFiles: replaceOldFiles
|
|
229
|
-
}, rest)));
|
|
230
|
-
}, {
|
|
231
|
-
actionType: "".concat(sliceName, "/fetchExtended")
|
|
232
|
-
});
|
|
233
|
-
var triggerSearch = function triggerSearch(_ref6) {
|
|
234
|
-
var searchQuery = _ref6.searchQuery,
|
|
235
|
-
id = _ref6.id,
|
|
236
|
-
moreQueries = _ref6.moreQueries,
|
|
237
|
-
offset = _ref6.offset,
|
|
238
|
-
limit = _ref6.limit,
|
|
239
|
-
_ref6$withStats = _ref6.withStats,
|
|
240
|
-
withStats = _ref6$withStats === void 0 ? true : _ref6$withStats,
|
|
241
|
-
_ref6$skipDispatch = _ref6.skipDispatch,
|
|
242
|
-
skipDispatch = _ref6$skipDispatch === void 0 ? true : _ref6$skipDispatch,
|
|
243
|
-
rest = _objectWithoutProperties(_ref6, _excluded4);
|
|
244
|
-
return fetchFiles(_objectSpread({
|
|
245
|
-
id: id,
|
|
246
|
-
queries: moreQueries,
|
|
247
|
-
offset: offset,
|
|
248
|
-
limit: limit,
|
|
249
|
-
recursive: true,
|
|
250
|
-
withStats: withStats,
|
|
251
|
-
debugSearch: localStorage.getItem('debug_search'),
|
|
252
|
-
skipDispatch: skipDispatch
|
|
253
|
-
}, rest));
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
// Used in infinite scrolling for search
|
|
257
|
-
export var fetchNextQuickSearch = createThunk(function (_, thunkApi) {
|
|
258
|
-
var defaultSearchQuery = thunkApi.extra.filerobot.getPlugin(PLUGINS_IDS.EXPLORER).opts.defaultSearchQuery;
|
|
259
|
-
var searchQuery = selectSearchQuery(thunkApi.getState());
|
|
260
|
-
return thunkApi.dispatch(fetchQuickSearch({
|
|
261
|
-
searchQuery: searchQuery || defaultSearchQuery,
|
|
262
|
-
replaceOldFiles: false,
|
|
263
|
-
skipPendingDispatch: true
|
|
264
|
-
}));
|
|
265
|
-
});
|
|
266
|
-
|
|
267
|
-
// Used in infinite scrolling for search
|
|
268
|
-
export var fetchNextExtendedSearch = createThunk(function (_, thunkApi) {
|
|
269
|
-
var defaultSearchQuery = thunkApi.extra.filerobot.getPlugin(PLUGINS_IDS.EXPLORER).opts.defaultSearchQuery;
|
|
270
|
-
var searchQuery = selectSearchQuery(thunkApi.getState());
|
|
271
|
-
return thunkApi.dispatch(fetchExtendedFiles({
|
|
272
|
-
searchQuery: searchQuery || defaultSearchQuery,
|
|
273
|
-
replaceOldFiles: false,
|
|
274
|
-
skipPendingDispatch: true
|
|
275
|
-
}));
|
|
276
|
-
});
|
|
277
|
-
export var getAttributesKeys = createThunk(async function (_, thunkApi) {
|
|
278
|
-
var extra = thunkApi.extra;
|
|
279
|
-
var _await$extra$apiClien = await extra.apiClient.get('attributes/keys'),
|
|
280
|
-
attributes = _await$extra$apiClien.attributes;
|
|
281
|
-
return attributes;
|
|
282
|
-
}, {
|
|
283
|
-
actionType: "".concat(sliceName, "/getAttributesKeys")
|
|
284
|
-
});
|
|
285
|
-
export var getAttributesTags = createThunk(async function (_, thunkApi) {
|
|
286
|
-
var extra = thunkApi.extra;
|
|
287
|
-
var _await$extra$apiClien2 = await extra.apiClient.get('attributes/tags'),
|
|
288
|
-
attributes = _await$extra$apiClien2.attributes;
|
|
289
|
-
return attributes;
|
|
290
|
-
}, {
|
|
291
|
-
actionType: "".concat(sliceName, "/getAttributesTags")
|
|
292
|
-
});
|
|
293
|
-
export var updateSearchSuggestions = createThunk(function (_ref7, thunkApi) {
|
|
294
|
-
var filters = _ref7.filters,
|
|
295
|
-
tags = _ref7.tags,
|
|
296
|
-
_ref7$dismissApiCall = _ref7.dismissApiCall,
|
|
297
|
-
dismissApiCall = _ref7$dismissApiCall === void 0 ? false : _ref7$dismissApiCall,
|
|
298
|
-
_ref7$noUrlUpdate = _ref7.noUrlUpdate,
|
|
299
|
-
noUrlUpdate = _ref7$noUrlUpdate === void 0 ? false : _ref7$noUrlUpdate;
|
|
300
|
-
var _thunkApi$extra$filer3 = thunkApi.extra.filerobot.getPlugin(PLUGINS_IDS.EXPLORER).opts,
|
|
301
|
-
disableFiltersAndSearch = _thunkApi$extra$filer3.disableFiltersAndSearch,
|
|
302
|
-
search = _thunkApi$extra$filer3.search;
|
|
303
|
-
if (disableFiltersAndSearch && search !== null && search !== void 0 && search.filters && search !== null && search !== void 0 && search.tags) {
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
|
-
thunkApi.dispatch(searchSuggestionsUpdated({
|
|
307
|
-
filters: disableFiltersAndSearch && search.filters || filters,
|
|
308
|
-
tags: disableFiltersAndSearch && search.tags || tags
|
|
309
|
-
}));
|
|
310
|
-
if (!dismissApiCall) {
|
|
311
|
-
thunkApi.dispatch(searchOrListViewFiles({
|
|
312
|
-
withStats: true
|
|
313
|
-
}));
|
|
314
|
-
}
|
|
315
|
-
if (!noUrlUpdate) {
|
|
316
|
-
thunkApi.dispatch(setSearchParamsInUrl());
|
|
317
|
-
}
|
|
318
|
-
});
|
|
319
|
-
export var applyDefaultSearchQuery = createThunk(function (_, thunkApi) {
|
|
320
|
-
var dispatch = thunkApi.dispatch;
|
|
321
|
-
var _thunkApi$extra$filer4 = thunkApi.extra.filerobot.getPlugin(PLUGINS_IDS.EXPLORER).opts,
|
|
322
|
-
defaultSearchQuery = _thunkApi$extra$filer4.defaultSearchQuery,
|
|
323
|
-
onDefaultSearchQueryApplied = _thunkApi$extra$filer4.onDefaultSearchQueryApplied;
|
|
324
|
-
var trimmedValue = (defaultSearchQuery || '').trim();
|
|
325
|
-
dispatch(updateSearchQuery({
|
|
326
|
-
query: trimmedValue
|
|
327
|
-
}));
|
|
328
|
-
dispatch(submitSearch());
|
|
329
|
-
if (typeof onDefaultSearchQueryApplied === 'function') {
|
|
330
|
-
onDefaultSearchQueryApplied();
|
|
331
|
-
}
|
|
332
|
-
});
|
|
333
|
-
export var listSearchedAssetsAsCSV = createThunk(async function () {
|
|
334
|
-
var _ref8 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
335
|
-
_ref8$includeMeta = _ref8.includeMeta,
|
|
336
|
-
includeMeta = _ref8$includeMeta === void 0 ? 1 : _ref8$includeMeta;
|
|
337
|
-
var thunkApi = arguments.length > 1 ? arguments[1] : undefined;
|
|
338
|
-
var dispatch = thunkApi.dispatch,
|
|
339
|
-
getState = thunkApi.getState;
|
|
340
|
-
var state = getState();
|
|
341
|
-
var searchQuery = selectSearchQuery(state);
|
|
342
|
-
dispatch(downloadOneFile({
|
|
343
|
-
downloadedFileName: "".concat(searchQuery || 'Filtered results', ".csv"),
|
|
344
|
-
dismissUsageRights: true,
|
|
345
|
-
request: dispatch(fetchFiles({
|
|
346
|
-
offset: 0,
|
|
347
|
-
recursive: Boolean(searchQuery),
|
|
348
|
-
queries: {
|
|
349
|
-
method: SEARCH_METHODS.EXTENDED,
|
|
350
|
-
include_meta: includeMeta
|
|
351
|
-
},
|
|
352
|
-
limit: 2000,
|
|
353
|
-
format: 'csv',
|
|
354
|
-
withStats: false,
|
|
355
|
-
returnBlob: true,
|
|
356
|
-
skipDispatch: true,
|
|
357
|
-
xhrOptions: {
|
|
358
|
-
headers: {
|
|
359
|
-
'Content-Type': 'text/csv'
|
|
360
|
-
},
|
|
361
|
-
responseType: 'blob'
|
|
362
|
-
},
|
|
363
|
-
applyActiveViewItemCheck: false
|
|
364
|
-
}))
|
|
365
|
-
}));
|
|
366
|
-
});
|
|
367
|
-
|
|
368
|
-
// extracts the file/files uuids/objects from the extra reducer action (payload/meta)
|
|
369
|
-
var getFilesFromExtraReducerAction = function getFilesFromExtraReducerAction(filesWrapper) {
|
|
370
|
-
var moreProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
371
|
-
var files = _typeof(filesWrapper) === 'object' && !Array.isArray(filesWrapper) ? filesWrapper.uuid || filesWrapper.fileUuid || filesWrapper.uuids || filesWrapper.filesUuids || filesWrapper.files : filesWrapper;
|
|
372
|
-
var isMultipleFiles = Array.isArray(files);
|
|
373
|
-
if (!isMultipleFiles) {
|
|
374
|
-
files = _objectSpread({
|
|
375
|
-
uuid: files
|
|
376
|
-
}, _typeof(moreProps) === 'object' && moreProps); // filesWrapper should be
|
|
377
|
-
}
|
|
378
|
-
return isMultipleFiles ? files : [files];
|
|
379
|
-
};
|
|
380
|
-
var getTagAttributeFromTagInput = function getTagAttributeFromTagInput(tagInput) {
|
|
381
|
-
return {
|
|
382
|
-
category: MODE_ID.TAG,
|
|
383
|
-
input: tagInput,
|
|
384
|
-
name: tagInput.replace(/[#"]/g, '')
|
|
385
|
-
};
|
|
386
|
-
};
|
|
387
|
-
var loadFiltersAndSearchFromUrl = createThunk(async function (_ref9, thunkApi) {
|
|
388
|
-
var _searchQueryObject$SE;
|
|
389
|
-
var searchQueryObject = _ref9.searchQueryObject,
|
|
390
|
-
triggerApi = _ref9.triggerApi;
|
|
391
|
-
var searchFilters = searchQueryObject[SEARCH_PARAM_KEYS.FILTERS];
|
|
392
|
-
var parsedSearchFilters = Array.isArray(searchFilters) && typeof searchFilters[0] === 'string' ? getJsonParsedValue(getDecodedUriComponent(searchFilters[0])) : searchFilters;
|
|
393
|
-
var similarSearch = searchQueryObject[SEARCH_PARAM_KEYS.SIMILAR];
|
|
394
|
-
var aiSearch = searchQueryObject[SEARCH_PARAM_KEYS.AI];
|
|
395
|
-
var query = searchQueryObject[SEARCH_PARAM_KEYS.QUERY];
|
|
396
|
-
var mappedSearch = {
|
|
397
|
-
query: Array.isArray(query) && query[0] || query || '',
|
|
398
|
-
similar: !similarSearch && {
|
|
399
|
-
originalFile: {},
|
|
400
|
-
active: false
|
|
401
|
-
},
|
|
402
|
-
isAiSearch: aiSearch,
|
|
403
|
-
suggestions: _objectSpread(_objectSpread({}, selectSearchSuggestions(thunkApi.getState())), {}, {
|
|
404
|
-
tags: ((_searchQueryObject$SE = searchQueryObject[SEARCH_PARAM_KEYS.TAGS]) === null || _searchQueryObject$SE === void 0 ? void 0 : _searchQueryObject$SE.map(getTagAttributeFromTagInput)) || [],
|
|
405
|
-
filters: parsedSearchFilters ? (parsedSearchFilters === null || parsedSearchFilters === void 0 ? void 0 : parsedSearchFilters.map(function (_ref10) {
|
|
406
|
-
var _ref11 = _slicedToArray(_ref10, 2),
|
|
407
|
-
key = _ref11[0],
|
|
408
|
-
value = _ref11[1];
|
|
409
|
-
return {
|
|
410
|
-
key: key,
|
|
411
|
-
value: value
|
|
412
|
-
};
|
|
413
|
-
})) || [] : []
|
|
414
|
-
})
|
|
415
|
-
};
|
|
416
|
-
thunkApi.dispatch(searchStateUpdated(mappedSearch));
|
|
417
|
-
if (triggerApi) {
|
|
418
|
-
thunkApi.dispatch(searchOrListViewFiles({
|
|
419
|
-
withStats: true
|
|
420
|
-
}));
|
|
421
|
-
}
|
|
422
|
-
thunkApi.dispatch(setSearchParamsInUrl());
|
|
423
|
-
});
|
|
424
|
-
export var loadSearchFromOutside = createThunk(function () {
|
|
425
|
-
var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
426
|
-
_ref12$fromUrl = _ref12.fromUrl,
|
|
427
|
-
fromUrl = _ref12$fromUrl === void 0 ? false : _ref12$fromUrl,
|
|
428
|
-
_ref12$triggerApi = _ref12.triggerApi,
|
|
429
|
-
triggerApi = _ref12$triggerApi === void 0 ? false : _ref12$triggerApi;
|
|
430
|
-
var thunkApi = arguments.length > 1 ? arguments[1] : undefined;
|
|
431
|
-
var _thunkApi$extra$filer5 = thunkApi.extra.filerobot.getPlugin(PLUGINS_IDS.EXPLORER),
|
|
432
|
-
opts = _thunkApi$extra$filer5.opts,
|
|
433
|
-
getQueryParamsAsObject = _thunkApi$extra$filer5.getQueryParamsAsObject;
|
|
434
|
-
var disableFiltersAndSearch = opts.disableFiltersAndSearch,
|
|
435
|
-
search = opts.search;
|
|
436
|
-
var newSearch = disableFiltersAndSearch && search || !fromUrl ? search : _objectSpread(_objectSpread({}, search), getQueryParamsAsObject({
|
|
437
|
-
keyPrefix: FMAW_URL_QUERY_PARAMS.SEARCH_PREFIX,
|
|
438
|
-
returnValueOnly: true
|
|
439
|
-
}));
|
|
440
|
-
if (newSearch) {
|
|
441
|
-
var similarSearch = newSearch[SEARCH_PARAM_KEYS.SIMILAR];
|
|
442
|
-
if (similarSearch) {
|
|
443
|
-
var fileUuid = decodeB64ToStr(similarSearch[0]);
|
|
444
|
-
return thunkApi.dispatch(searchSimilarFiles({
|
|
445
|
-
fileUuid: fileUuid,
|
|
446
|
-
fromUrl: fromUrl
|
|
447
|
-
}));
|
|
448
|
-
}
|
|
449
|
-
thunkApi.dispatch(loadFiltersAndSearchFromUrl({
|
|
450
|
-
searchQueryObject: newSearch,
|
|
451
|
-
triggerApi: triggerApi
|
|
452
|
-
}));
|
|
453
|
-
}
|
|
454
|
-
});
|
|
455
|
-
export var searchFilesWithAiText = createThunk(async function (_ref13, thunkApi) {
|
|
456
|
-
var _thunkApi$extra$filer6;
|
|
457
|
-
var _ref13$searchQuery = _ref13.searchQuery,
|
|
458
|
-
searchQuery = _ref13$searchQuery === void 0 ? '' : _ref13$searchQuery;
|
|
459
|
-
var sourceLanguage = ((_thunkApi$extra$filer6 = thunkApi.extra.filerobot.opts) === null || _thunkApi$extra$filer6 === void 0 ? void 0 : _thunkApi$extra$filer6.language) || 'en';
|
|
460
|
-
var response = await thunkApi.extra.apiClient.post("ml/images/embedding/text?source_lang=".concat(sourceLanguage), {
|
|
461
|
-
data: {
|
|
462
|
-
text: searchQuery,
|
|
463
|
-
ref_key: 'uuid'
|
|
464
|
-
}
|
|
465
|
-
});
|
|
466
|
-
var files = (response === null || response === void 0 ? void 0 : response.files) || [];
|
|
467
|
-
return {
|
|
468
|
-
files: files,
|
|
469
|
-
stats: {
|
|
470
|
-
filesCount: files.length
|
|
471
|
-
}
|
|
472
|
-
};
|
|
473
|
-
}, {
|
|
474
|
-
actionType: "".concat(sliceName, "/searchFilesWithAiText")
|
|
475
|
-
});
|
|
476
|
-
export var searchSimilarFiles = createThunk(async function (_ref14, thunkApi) {
|
|
477
|
-
var file = _ref14.file,
|
|
478
|
-
fileUuid = _ref14.fileUuid,
|
|
479
|
-
fromUrl = _ref14.fromUrl;
|
|
480
|
-
var originalFile = fileUuid ? {
|
|
481
|
-
uuid: fileUuid,
|
|
482
|
-
loading: true
|
|
483
|
-
} : file;
|
|
484
|
-
if (fileUuid) {
|
|
485
|
-
thunkApi.dispatch(searchSimilarToggled(true));
|
|
486
|
-
thunkApi.dispatch(fetchFileByUuid({
|
|
487
|
-
uuid: fileUuid
|
|
488
|
-
})).then(function (res) {
|
|
489
|
-
originalFile = res;
|
|
490
|
-
thunkApi.dispatch(fileUpdated(_objectSpread(_objectSpread({}, res), {}, {
|
|
491
|
-
loading: false
|
|
492
|
-
})));
|
|
493
|
-
thunkApi.dispatch(searchSimilarOriginalFileUpdated(res));
|
|
494
|
-
})["catch"](function (error) {
|
|
495
|
-
thunkApi.dispatch(searchSimilarOriginalFileUpdated({
|
|
496
|
-
uuid: fileUuid,
|
|
497
|
-
error: error
|
|
498
|
-
}));
|
|
499
|
-
});
|
|
500
|
-
}
|
|
501
|
-
thunkApi.dispatch(selectionsCleared());
|
|
502
|
-
thunkApi.dispatch(resetSearchAndFiltersMode());
|
|
503
|
-
var isAssetView = selectIsAssetsView(thunkApi.getState());
|
|
504
|
-
if (!isAssetView) {
|
|
505
|
-
thunkApi.dispatch(activateAssetsView({
|
|
506
|
-
keepFiltersAndSearch: true,
|
|
507
|
-
disableApiCall: true,
|
|
508
|
-
fromUrl: fromUrl
|
|
509
|
-
}));
|
|
510
|
-
}
|
|
511
|
-
thunkApi.dispatch(searchSimilarOriginalFileUpdated(originalFile));
|
|
512
|
-
thunkApi.dispatch(setSearchParamsInUrl());
|
|
513
|
-
var response = await thunkApi.extra.apiClient.post('ml/images/embedding/image', {
|
|
514
|
-
data: {
|
|
515
|
-
ref_key: 'uuid',
|
|
516
|
-
ref: originalFile.uuid
|
|
517
|
-
},
|
|
518
|
-
abortSignal: thunkApi.signal
|
|
519
|
-
});
|
|
520
|
-
var newFiles = [originalFile].concat(_toConsumableArray(response === null || response === void 0 ? void 0 : response.files));
|
|
521
|
-
return {
|
|
522
|
-
files: newFiles,
|
|
523
|
-
replaceOldFiles: true,
|
|
524
|
-
stats: {
|
|
525
|
-
filesCount: newFiles.length
|
|
526
|
-
},
|
|
527
|
-
overrideLoading: true
|
|
528
|
-
};
|
|
529
|
-
}, {
|
|
530
|
-
actionType: "".concat(sliceName, "/searchSimilarFiles")
|
|
531
|
-
});
|
|
532
|
-
export var toggleAiSearch = createThunk(function (_, thunkApi) {
|
|
533
|
-
var state = thunkApi.getState();
|
|
534
|
-
var isAiSearch = selectIsAiSearch(state);
|
|
535
|
-
thunkApi.dispatch(aiSearchToggled(!isAiSearch));
|
|
536
|
-
thunkApi.dispatch(setSearchParamsInUrl());
|
|
537
|
-
});
|
|
538
|
-
var searchSlice = createSlice({
|
|
539
|
-
name: sliceName,
|
|
540
|
-
initialState: initialState,
|
|
541
|
-
reducers: {
|
|
542
|
-
searchQueryUpdated: function searchQueryUpdated(state, action) {
|
|
543
|
-
var _action$payload$query, _action$payload$defau;
|
|
544
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
545
|
-
query: (_action$payload$query = action.payload.query) !== null && _action$payload$query !== void 0 ? _action$payload$query : state.query,
|
|
546
|
-
defaultQuery: (_action$payload$defau = action.payload.defaultQuery) !== null && _action$payload$defau !== void 0 ? _action$payload$defau : state.defaultQuery
|
|
547
|
-
});
|
|
548
|
-
},
|
|
549
|
-
exactAndExtendedFilesAdded: function exactAndExtendedFilesAdded(state, action) {
|
|
550
|
-
var _ref15 = action.payload || {},
|
|
551
|
-
_ref15$files = _ref15.files,
|
|
552
|
-
files = _ref15$files === void 0 ? [] : _ref15$files,
|
|
553
|
-
noMoreFiles = _ref15.noMoreFiles,
|
|
554
|
-
newOffset = _ref15.newOffset,
|
|
555
|
-
isExtendedSearch = _ref15.isExtendedSearch,
|
|
556
|
-
_ref15$replaceOldFile = _ref15.replaceOldFiles,
|
|
557
|
-
replaceOldFiles = _ref15$replaceOldFile === void 0 ? true : _ref15$replaceOldFile;
|
|
558
|
-
var newExactMatchFiles = _objectSpread({}, state.isQuickFetching && replaceOldFiles ? {} : state.exactMatch.entities);
|
|
559
|
-
var newExtendedFiles = _objectSpread({}, state.isExtendFetching && replaceOldFiles ? {} : state.extended.entities);
|
|
560
|
-
files.forEach(function (file) {
|
|
561
|
-
(file.relevance === 1 ? newExactMatchFiles : newExtendedFiles)[file.uuid] = file;
|
|
562
|
-
});
|
|
563
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
564
|
-
exactMatch: _objectSpread(_objectSpread({}, state.exactMatch), {}, {
|
|
565
|
-
entities: newExactMatchFiles,
|
|
566
|
-
uuids: Object.keys(newExactMatchFiles)
|
|
567
|
-
}, !isExtendedSearch && {
|
|
568
|
-
offset: newOffset,
|
|
569
|
-
noMoreFiles: noMoreFiles
|
|
570
|
-
}),
|
|
571
|
-
extended: _objectSpread(_objectSpread({}, state.extended), {}, {
|
|
572
|
-
entities: newExtendedFiles,
|
|
573
|
-
uuids: Object.keys(newExtendedFiles)
|
|
574
|
-
}, isExtendedSearch && {
|
|
575
|
-
offset: newOffset,
|
|
576
|
-
noMoreFiles: noMoreFiles
|
|
577
|
-
})
|
|
578
|
-
});
|
|
579
|
-
},
|
|
580
|
-
exactAndExtendedFilesUpdated: function exactAndExtendedFilesUpdated(state, action) {
|
|
581
|
-
var _action$payload = action.payload,
|
|
582
|
-
files = _action$payload.files,
|
|
583
|
-
mutualUpdates = _action$payload.mutualUpdates;
|
|
584
|
-
var newExactMatchFiles = state.exactMatch.entities;
|
|
585
|
-
var newExtendedFiles = state.extended.entities;
|
|
586
|
-
var getUpdatedFilesSection = function getUpdatedFilesSection(filesSection, fileUuid, file) {
|
|
587
|
-
return _objectSpread(_objectSpread({}, filesSection), {}, _defineProperty({}, fileUuid, _objectSpread(_objectSpread(_objectSpread({}, filesSection[fileUuid]), _typeof(file) === 'object' && file), mutualUpdates)));
|
|
588
|
-
};
|
|
589
|
-
var filesArray = Array.isArray(files) ? files : [files];
|
|
590
|
-
var isAnyFileFound = false;
|
|
591
|
-
filesArray.forEach(function (file) {
|
|
592
|
-
var fileUuid = _typeof(file) === 'object' ? file.uuid : file;
|
|
593
|
-
if (newExactMatchFiles[fileUuid]) {
|
|
594
|
-
newExactMatchFiles = getUpdatedFilesSection(newExactMatchFiles, fileUuid, file);
|
|
595
|
-
isAnyFileFound = true;
|
|
596
|
-
}
|
|
597
|
-
if (newExtendedFiles[fileUuid]) {
|
|
598
|
-
newExtendedFiles = getUpdatedFilesSection(newExtendedFiles, fileUuid, file);
|
|
599
|
-
isAnyFileFound = true;
|
|
600
|
-
}
|
|
601
|
-
});
|
|
602
|
-
|
|
603
|
-
// Don't update the state if no file was found
|
|
604
|
-
if (!isAnyFileFound) {
|
|
605
|
-
return state;
|
|
606
|
-
}
|
|
607
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
608
|
-
exactMatch: _objectSpread(_objectSpread({}, state.exactMatch), {}, {
|
|
609
|
-
entities: newExactMatchFiles
|
|
610
|
-
}),
|
|
611
|
-
extended: _objectSpread(_objectSpread({}, state.extended), {}, {
|
|
612
|
-
entities: newExtendedFiles
|
|
613
|
-
})
|
|
614
|
-
});
|
|
615
|
-
},
|
|
616
|
-
exactAndExtendedFilesRemoved: function exactAndExtendedFilesRemoved(state, action) {
|
|
617
|
-
var removedFileUuids = action.payload;
|
|
618
|
-
if (!removedFileUuids) {
|
|
619
|
-
return state;
|
|
620
|
-
}
|
|
621
|
-
if (Array.isArray(removedFileUuids) && removedFileUuids.length === 0) {
|
|
622
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
623
|
-
exactMatch: initialState.exactMatch,
|
|
624
|
-
extended: initialState.extended,
|
|
625
|
-
stats: initialState.stats
|
|
626
|
-
});
|
|
627
|
-
}
|
|
628
|
-
var removeFileFromFilesSection = function removeFileFromFilesSection(filesSection, fileUuid) {
|
|
629
|
-
var newFilesSection = _objectSpread(_objectSpread({}, filesSection), {}, {
|
|
630
|
-
entities: _objectSpread({}, filesSection.entities),
|
|
631
|
-
uuids: filesSection.uuids.filter(function (uuid) {
|
|
632
|
-
return fileUuid !== uuid;
|
|
633
|
-
})
|
|
634
|
-
});
|
|
635
|
-
delete newFilesSection.entities[fileUuid];
|
|
636
|
-
return newFilesSection;
|
|
637
|
-
};
|
|
638
|
-
var exactMatch = state.exactMatch,
|
|
639
|
-
extended = state.extended;
|
|
640
|
-
removedFileUuids.forEach(function (fileUuid) {
|
|
641
|
-
if (exactMatch.entities[fileUuid]) {
|
|
642
|
-
exactMatch = removeFileFromFilesSection(exactMatch, fileUuid);
|
|
643
|
-
} else if (extended.entities[fileUuid]) {
|
|
644
|
-
extended = removeFileFromFilesSection(extended, fileUuid);
|
|
645
|
-
}
|
|
646
|
-
});
|
|
647
|
-
|
|
648
|
-
// Don't change the state as long as no changes in the object reference which means no files have been deleted.
|
|
649
|
-
if (exactMatch === state.exactMatch && extended === state.extended) {
|
|
650
|
-
return state;
|
|
651
|
-
}
|
|
652
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
653
|
-
exactMatch: exactMatch,
|
|
654
|
-
extended: extended,
|
|
655
|
-
stats: _objectSpread(_objectSpread({}, state.stats), {}, {
|
|
656
|
-
filesCount: Math.max(0, state.stats.filesCount - removedFileUuids.length)
|
|
657
|
-
})
|
|
658
|
-
});
|
|
659
|
-
},
|
|
660
|
-
suggestionsAttributeKeysUpdated: function suggestionsAttributeKeysUpdated(state, action) {
|
|
661
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
662
|
-
suggestions: _objectSpread(_objectSpread({}, state.suggestions), {}, {
|
|
663
|
-
attributesKeys: action.payload || initialState.suggestions.attributesKeys,
|
|
664
|
-
attributesKeysLoading: false
|
|
665
|
-
})
|
|
666
|
-
});
|
|
667
|
-
},
|
|
668
|
-
suggestionsAttributeTagsUpdated: function suggestionsAttributeTagsUpdated(state, action) {
|
|
669
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
670
|
-
suggestions: _objectSpread(_objectSpread({}, state.suggestions), {}, {
|
|
671
|
-
attributesTags: action.payload || initialState.suggestions.attributesKeys,
|
|
672
|
-
attributesTagsLoading: false
|
|
673
|
-
})
|
|
674
|
-
});
|
|
675
|
-
},
|
|
676
|
-
searchSuggestionsUpdated: function searchSuggestionsUpdated(state, action) {
|
|
677
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
678
|
-
suggestions: _objectSpread(_objectSpread({}, state.suggestions), {}, {
|
|
679
|
-
filters: action.payload.filters || state.suggestions.filters,
|
|
680
|
-
tags: action.payload.tags || state.suggestions.tags
|
|
681
|
-
})
|
|
682
|
-
});
|
|
683
|
-
},
|
|
684
|
-
searchSending: function searchSending(state, action) {
|
|
685
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
686
|
-
isSending: action.payload
|
|
687
|
-
});
|
|
688
|
-
},
|
|
689
|
-
searchStateUpdated: function searchStateUpdated(state, action) {
|
|
690
|
-
return _objectSpread(_objectSpread({}, state), action.payload);
|
|
691
|
-
},
|
|
692
|
-
aiSearchToggled: function aiSearchToggled(state, action) {
|
|
693
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
694
|
-
isAiSearch: action.payload
|
|
695
|
-
});
|
|
696
|
-
},
|
|
697
|
-
searchSimilarOriginalFileUpdated: function searchSimilarOriginalFileUpdated(state, action) {
|
|
698
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
699
|
-
similar: _objectSpread(_objectSpread({}, state.similar), {}, {
|
|
700
|
-
originalFile: action.payload,
|
|
701
|
-
active: true
|
|
702
|
-
})
|
|
703
|
-
});
|
|
704
|
-
},
|
|
705
|
-
searchSimilarToggled: function searchSimilarToggled(state, action) {
|
|
706
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
707
|
-
similar: _objectSpread(_objectSpread({}, state.similar), {}, {
|
|
708
|
-
active: action.payload
|
|
709
|
-
})
|
|
710
|
-
});
|
|
711
|
-
}
|
|
712
|
-
},
|
|
713
|
-
extraReducers: function extraReducers(builder) {
|
|
714
|
-
builder.addCase(viewChanged.type, function (state, action) {
|
|
715
|
-
if (!action.payload.keepFiltersAndSearch) {
|
|
716
|
-
return searchSlice.caseReducers.searchStateUpdated(state, {
|
|
717
|
-
payload: {
|
|
718
|
-
query: '',
|
|
719
|
-
defaultQuery: '',
|
|
720
|
-
similar: {
|
|
721
|
-
originalFile: {},
|
|
722
|
-
active: false
|
|
723
|
-
},
|
|
724
|
-
isAiSearch: false,
|
|
725
|
-
suggestions: _objectSpread(_objectSpread({}, state.suggestions), {}, {
|
|
726
|
-
tags: [],
|
|
727
|
-
filters: []
|
|
728
|
-
})
|
|
729
|
-
}
|
|
730
|
-
});
|
|
731
|
-
}
|
|
732
|
-
}).addCase(fetchExtendedFiles.pending, function (state) {
|
|
733
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
734
|
-
isExtendFetching: true,
|
|
735
|
-
extendError: null
|
|
736
|
-
});
|
|
737
|
-
}).addCase(fetchExtendedFiles.fulfilled, function (state, action) {
|
|
738
|
-
return _objectSpread(_objectSpread({}, searchSlice.caseReducers.exactAndExtendedFilesAdded(state, {
|
|
739
|
-
payload: _objectSpread(_objectSpread({}, action.payload), {}, {
|
|
740
|
-
isExtendedSearch: true
|
|
741
|
-
})
|
|
742
|
-
})), {}, {
|
|
743
|
-
isExtendFetching: false,
|
|
744
|
-
extendError: null
|
|
745
|
-
});
|
|
746
|
-
}).addCase(fetchExtendedFiles.rejected, function (state, action) {
|
|
747
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
748
|
-
isExtendFetching: false,
|
|
749
|
-
extendError: getActionErrorState(state, action, true)
|
|
750
|
-
});
|
|
751
|
-
}).addCase(fetchQuickSearch.pending, function (state) {
|
|
752
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
753
|
-
isQuickFetching: true,
|
|
754
|
-
quickError: null
|
|
755
|
-
});
|
|
756
|
-
}).addCase(fetchQuickSearch.fulfilled, function (state, action) {
|
|
757
|
-
return _objectSpread(_objectSpread({}, searchSlice.caseReducers.exactAndExtendedFilesAdded(state, action)), {}, {
|
|
758
|
-
isQuickFetching: false,
|
|
759
|
-
quickError: null,
|
|
760
|
-
method: SEARCH_METHODS.QUICK
|
|
761
|
-
});
|
|
762
|
-
}).addCase(fetchQuickSearch.rejected, function (state, action) {
|
|
763
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
764
|
-
isQuickFetching: false,
|
|
765
|
-
quickError: getActionErrorState(state, action, true)
|
|
766
|
-
});
|
|
767
|
-
}).addCase(deleteFiles.fulfilled, function (state, action) {
|
|
768
|
-
return searchSlice.caseReducers.exactAndExtendedFilesRemoved(state, action);
|
|
769
|
-
}).addCase(getAttributesKeys.pending, function (state) {
|
|
770
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
771
|
-
suggestions: _objectSpread(_objectSpread({}, state.suggestions), {}, {
|
|
772
|
-
attributesKeysLoading: true
|
|
773
|
-
}),
|
|
774
|
-
error: null
|
|
775
|
-
});
|
|
776
|
-
}).addCase(getAttributesKeys.fulfilled, function (state, action) {
|
|
777
|
-
return searchSlice.caseReducers.suggestionsAttributeKeysUpdated(state, action);
|
|
778
|
-
}).addCase(getAttributesKeys.rejected, function (state, action) {
|
|
779
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
780
|
-
suggestions: _objectSpread(_objectSpread({}, state.suggestions), {}, {
|
|
781
|
-
attributesKeysLoading: false
|
|
782
|
-
}),
|
|
783
|
-
error: getActionErrorState(state, action, true)
|
|
784
|
-
});
|
|
785
|
-
}).addCase(getAttributesKeys["final"], function (state) {
|
|
786
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
787
|
-
suggestions: _objectSpread(_objectSpread({}, state.suggestions), {}, {
|
|
788
|
-
attributesKeysLoadingFinished: true
|
|
789
|
-
})
|
|
790
|
-
});
|
|
791
|
-
}).addCase(getAttributesTags.pending, function (state) {
|
|
792
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
793
|
-
suggestions: _objectSpread(_objectSpread({}, state.suggestions), {}, {
|
|
794
|
-
attributesTagsLoading: true
|
|
795
|
-
}),
|
|
796
|
-
error: null
|
|
797
|
-
});
|
|
798
|
-
}).addCase(getAttributesTags.fulfilled, function (state, action) {
|
|
799
|
-
return searchSlice.caseReducers.suggestionsAttributeTagsUpdated(state, action);
|
|
800
|
-
}).addCase(getAttributesTags.rejected, function (state, action) {
|
|
801
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
802
|
-
suggestions: _objectSpread(_objectSpread({}, state.suggestions), {}, {
|
|
803
|
-
attributesTagsLoading: false
|
|
804
|
-
}),
|
|
805
|
-
error: getActionErrorState(state, action, true)
|
|
806
|
-
});
|
|
807
|
-
}).addCase(getAttributesTags["final"], function (state) {
|
|
808
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
809
|
-
suggestions: _objectSpread(_objectSpread({}, state.suggestions), {}, {
|
|
810
|
-
attributesTagsLoadingFinished: true
|
|
811
|
-
})
|
|
812
|
-
});
|
|
813
|
-
}).addMatcher(isAnyOf(fetchFiles.fulfilled, fetchQuickSearch.fulfilled, fetchExtendedFiles.fulfilled), function (state, action) {
|
|
814
|
-
var _action$payload2;
|
|
815
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
816
|
-
fetchType: (_action$payload2 = action.payload) === null || _action$payload2 === void 0 ? void 0 : _action$payload2.fetchType
|
|
817
|
-
});
|
|
818
|
-
})
|
|
819
|
-
// We are using filesSliceName as the actions triggered are mainly using its slice name, as it's the main one.
|
|
820
|
-
.addMatcher(function (_ref16) {
|
|
821
|
-
var type = _ref16.type;
|
|
822
|
-
return type.startsWith(filesSliceName) && Boolean(type.match(/\/updateFile(s?).*\/pending/));
|
|
823
|
-
}, function (state, action) {
|
|
824
|
-
return searchSlice.caseReducers.exactAndExtendedFilesUpdated(state, {
|
|
825
|
-
payload: {
|
|
826
|
-
files: getFilesFromExtraReducerAction(action.meta.arg),
|
|
827
|
-
mutualUpdates: {
|
|
828
|
-
loading: true,
|
|
829
|
-
error: null
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
});
|
|
833
|
-
})
|
|
834
|
-
// We are using filesSliceName as the actions triggered are mainly using its slice name, as it's the main one.
|
|
835
|
-
.addMatcher(function (_ref17) {
|
|
836
|
-
var type = _ref17.type;
|
|
837
|
-
return type.startsWith(filesSliceName) && Boolean(type.match(/\/updateFile(s?).*\/fulfilled/));
|
|
838
|
-
}, function (state, action) {
|
|
839
|
-
return searchSlice.caseReducers.exactAndExtendedFilesUpdated(state, {
|
|
840
|
-
payload: {
|
|
841
|
-
files: getFilesFromExtraReducerAction(action.payload, action.payload),
|
|
842
|
-
mutualUpdates: {
|
|
843
|
-
loading: false,
|
|
844
|
-
error: null
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
});
|
|
848
|
-
})
|
|
849
|
-
// We are using filesSliceName as the actions triggered are mainly using its slice name, as it's the main one.
|
|
850
|
-
.addMatcher(function (_ref18) {
|
|
851
|
-
var type = _ref18.type;
|
|
852
|
-
return type.startsWith(filesSliceName) && Boolean(type.match(/\/updateFile(s?).*\/rejected/));
|
|
853
|
-
}, function (state, action) {
|
|
854
|
-
return searchSlice.caseReducers.exactAndExtendedFilesUpdated(state, {
|
|
855
|
-
payload: {
|
|
856
|
-
files: getFilesFromExtraReducerAction(action.meta.arg),
|
|
857
|
-
mutualUpdates: {
|
|
858
|
-
loading: false,
|
|
859
|
-
error: getActionErrorState(state, action, true)
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
});
|
|
863
|
-
});
|
|
864
|
-
}
|
|
865
|
-
});
|
|
866
|
-
var _searchSlice$actions = searchSlice.actions,
|
|
867
|
-
searchQueryUpdated = _searchSlice$actions.searchQueryUpdated,
|
|
868
|
-
exactAndExtendedFilesAdded = _searchSlice$actions.exactAndExtendedFilesAdded,
|
|
869
|
-
exactAndExtendedFilesUpdated = _searchSlice$actions.exactAndExtendedFilesUpdated,
|
|
870
|
-
exactAndExtendedFilesRemoved = _searchSlice$actions.exactAndExtendedFilesRemoved,
|
|
871
|
-
searchSuggestionsUpdated = _searchSlice$actions.searchSuggestionsUpdated,
|
|
872
|
-
searchSending = _searchSlice$actions.searchSending,
|
|
873
|
-
searchStateUpdated = _searchSlice$actions.searchStateUpdated,
|
|
874
|
-
aiSearchToggled = _searchSlice$actions.aiSearchToggled,
|
|
875
|
-
searchSimilarOriginalFileUpdated = _searchSlice$actions.searchSimilarOriginalFileUpdated,
|
|
876
|
-
searchSimilarToggled = _searchSlice$actions.searchSimilarToggled;
|
|
877
|
-
export { searchQueryUpdated, exactAndExtendedFilesAdded, exactAndExtendedFilesUpdated, exactAndExtendedFilesRemoved, searchSuggestionsUpdated, searchSending, searchStateUpdated, aiSearchToggled, searchSimilarOriginalFileUpdated, searchSimilarToggled };
|
|
878
|
-
export var selectSearchState = function selectSearchState(state) {
|
|
879
|
-
var _state$PLUGINS_IDS$EX;
|
|
880
|
-
return ((_state$PLUGINS_IDS$EX = state[PLUGINS_IDS.EXPLORER]) === null || _state$PLUGINS_IDS$EX === void 0 ? void 0 : _state$PLUGINS_IDS$EX[slicePropName]) || initialState || initialState;
|
|
881
|
-
};
|
|
882
|
-
export var selectSearchQuery = function selectSearchQuery(state) {
|
|
883
|
-
return selectSearchState(state).query;
|
|
884
|
-
};
|
|
885
|
-
export var selectExactSearchFiles = function selectExactSearchFiles(state) {
|
|
886
|
-
return selectSearchState(state).exactMatch.entities;
|
|
887
|
-
};
|
|
888
|
-
export var selectExactSearchOffset = function selectExactSearchOffset(state) {
|
|
889
|
-
return selectSearchState(state).exactMatch.offset;
|
|
890
|
-
};
|
|
891
|
-
export var selectIsNoMoreExactSearch = function selectIsNoMoreExactSearch(state) {
|
|
892
|
-
return selectSearchState(state).exactMatch.noMoreFiles;
|
|
893
|
-
};
|
|
894
|
-
export var selectExtendedSearchFiles = function selectExtendedSearchFiles(state) {
|
|
895
|
-
return selectSearchState(state).extended.entities;
|
|
896
|
-
};
|
|
897
|
-
export var selectExtendedSearchOffset = function selectExtendedSearchOffset(state) {
|
|
898
|
-
return selectSearchState(state).extended.offset;
|
|
899
|
-
};
|
|
900
|
-
export var selectIsNoMoreExtendedSearch = function selectIsNoMoreExtendedSearch(state) {
|
|
901
|
-
return selectSearchState(state).extended.noMoreFiles;
|
|
902
|
-
};
|
|
903
|
-
export var selectExactSearchUuids = function selectExactSearchUuids(state) {
|
|
904
|
-
return selectSearchState(state).exactMatch.uuids;
|
|
905
|
-
};
|
|
906
|
-
export var selectExtendedSearchUuids = function selectExtendedSearchUuids(state) {
|
|
907
|
-
return selectSearchState(state).extended.uuids;
|
|
908
|
-
};
|
|
909
|
-
export var selectExactSearchFileByUuid = function selectExactSearchFileByUuid(state, fileUuid) {
|
|
910
|
-
return selectExactSearchFiles(state)[fileUuid];
|
|
911
|
-
};
|
|
912
|
-
export var selectExtendedSearchFileByUuid = function selectExtendedSearchFileByUuid(state, fileUuid) {
|
|
913
|
-
return selectExtendedSearchFiles(state)[fileUuid];
|
|
914
|
-
};
|
|
915
|
-
export var selectExactSearchFilesByUuids = createSelector([selectExactSearchFiles, function (_state, fileUuids) {
|
|
916
|
-
return fileUuids;
|
|
917
|
-
}], function (files, fileUuids) {
|
|
918
|
-
return fileUuids.map(function (fileUuid) {
|
|
919
|
-
return files[fileUuid];
|
|
920
|
-
});
|
|
921
|
-
});
|
|
922
|
-
export var selectExtendedSearchFilesByUuids = createSelector([selectExtendedSearchFiles, function (_state, fileUuids) {
|
|
923
|
-
return fileUuids;
|
|
924
|
-
}], function (files, fileUuids) {
|
|
925
|
-
return fileUuids.map(function (fileUuid) {
|
|
926
|
-
return files[fileUuid];
|
|
927
|
-
});
|
|
928
|
-
});
|
|
929
|
-
export var selectExactSearchFilesArray = function selectExactSearchFilesArray(state) {
|
|
930
|
-
return Object.values(selectExactSearchFiles(state));
|
|
931
|
-
};
|
|
932
|
-
export var selectExtendedSearchFilesArray = function selectExtendedSearchFilesArray(state) {
|
|
933
|
-
return Object.values(selectExtendedSearchFiles(state));
|
|
934
|
-
};
|
|
935
|
-
export var selectAllSearchFiles = createSelector([selectExactSearchFiles, selectExtendedSearchFiles], function (exactFiles, extendedFiles) {
|
|
936
|
-
return _objectSpread(_objectSpread({}, exactFiles), extendedFiles);
|
|
937
|
-
});
|
|
938
|
-
export var selectAllSearchFilesArray = createSelector(selectAllSearchFiles, function (allSearchFiles) {
|
|
939
|
-
return Object.values(allSearchFiles);
|
|
940
|
-
});
|
|
941
|
-
export var selectAllSearchFilesUuids = createSelector(selectExactSearchUuids, selectExtendedSearchUuids, function (exactSearchUuids, extendedSearchUuids) {
|
|
942
|
-
return [].concat(_toConsumableArray(exactSearchUuids), _toConsumableArray(extendedSearchUuids));
|
|
943
|
-
});
|
|
944
|
-
export var selectIsQuickFetching = function selectIsQuickFetching(state) {
|
|
945
|
-
return selectSearchState(state).isQuickFetching;
|
|
946
|
-
};
|
|
947
|
-
export var selectIsExtendFetching = function selectIsExtendFetching(state) {
|
|
948
|
-
return selectSearchState(state).isExtendFetching;
|
|
949
|
-
};
|
|
950
|
-
export var selectIsSendingSearch = function selectIsSendingSearch(state) {
|
|
951
|
-
return selectSearchState(state).isSending;
|
|
952
|
-
};
|
|
953
|
-
export var selectSearchSuggestions = function selectSearchSuggestions(state) {
|
|
954
|
-
return selectSearchState(state).suggestions;
|
|
955
|
-
};
|
|
956
|
-
export var selectSearchSuggestionsFilters = function selectSearchSuggestionsFilters(state) {
|
|
957
|
-
return selectSearchState(state).suggestions.filters;
|
|
958
|
-
};
|
|
959
|
-
export var selectSearchSuggestionsTags = function selectSearchSuggestionsTags(state) {
|
|
960
|
-
return selectSearchState(state).suggestions.tags;
|
|
961
|
-
};
|
|
962
|
-
export var selectDefaultSearchQuery = function selectDefaultSearchQuery(state) {
|
|
963
|
-
return selectSearchState(state).defaultQuery;
|
|
964
|
-
};
|
|
965
|
-
export var selectSearchSuggestionsAttributesKeys = function selectSearchSuggestionsAttributesKeys(state) {
|
|
966
|
-
return selectSearchState(state).suggestions.attributesKeys;
|
|
967
|
-
};
|
|
968
|
-
export var selectSearchSuggestionsAttributesKeysLoading = function selectSearchSuggestionsAttributesKeysLoading(state) {
|
|
969
|
-
return selectSearchState(state).suggestions.attributesKeysLoading;
|
|
970
|
-
};
|
|
971
|
-
export var selectSearchSuggestionsAttributesKeysLoadingFinished = function selectSearchSuggestionsAttributesKeysLoadingFinished(state) {
|
|
972
|
-
return selectSearchState(state).suggestions.attributesKeysLoadingFinished;
|
|
973
|
-
};
|
|
974
|
-
export var selectSearchSuggestionsAttributesTags = function selectSearchSuggestionsAttributesTags(state) {
|
|
975
|
-
return selectSearchState(state).suggestions.attributesTags;
|
|
976
|
-
};
|
|
977
|
-
export var selectSearchSuggestionsAttributesTagsLoading = function selectSearchSuggestionsAttributesTagsLoading(state) {
|
|
978
|
-
return selectSearchState(state).suggestions.attributesTagsLoading;
|
|
979
|
-
};
|
|
980
|
-
export var selectIsSearchFetchType = function selectIsSearchFetchType(state) {
|
|
981
|
-
return selectIsSearchMode(state) && selectSearchState(state).fetchType === FETCH_TYPES.SEARCH;
|
|
982
|
-
};
|
|
983
|
-
export var selectSearchSuggestionsAttributesTagsLoadingFinished = function selectSearchSuggestionsAttributesTagsLoadingFinished(state) {
|
|
984
|
-
return selectSearchState(state).suggestions.attributesTagsLoadingFinished;
|
|
985
|
-
};
|
|
986
|
-
export var selectIsAiSearch = function selectIsAiSearch(state) {
|
|
987
|
-
return selectSearchState(state).isAiSearch;
|
|
988
|
-
};
|
|
989
|
-
export var selectSimilarSearchOriginalFile = function selectSimilarSearchOriginalFile(state) {
|
|
990
|
-
return selectSearchState(state).similar.originalFile;
|
|
991
|
-
};
|
|
992
|
-
export var selectIsSimilarSearchActive = function selectIsSimilarSearchActive(state) {
|
|
993
|
-
return selectSearchState(state).similar.active;
|
|
994
|
-
};
|
|
995
|
-
export default searchSlice.reducer;
|