@scaleflex/widget-explorer 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/package.json +8 -8
- package/dist/style.css +0 -2197
- package/dist/style.min.css +0 -1
- package/lib/Explorer.styled.js +0 -48
- package/lib/components/ActionBar/ActionBar.styled.js +0 -103
- package/lib/components/ActionBar/DownloadWithExportButton.js +0 -203
- package/lib/components/ActionBar/SelectionMenu.js +0 -111
- package/lib/components/ActionBar/index.js +0 -105
- package/lib/components/AddFilesPanel/AddFiles.js +0 -183
- package/lib/components/AddFilesPanel/AddFiles.styled.js +0 -137
- package/lib/components/AddFilesPanel/index.js +0 -59
- package/lib/components/AiSwitcher/AiSwitcher.constants.js +0 -1
- package/lib/components/AiSwitcher/AiSwitcher.styled.js +0 -24
- package/lib/components/AiSwitcher/index.js +0 -81
- package/lib/components/AssetsList/AssetsList.styled.js +0 -217
- package/lib/components/AssetsList/GridView/FilesAccordion.js +0 -76
- package/lib/components/AssetsList/GridView/FilesSection/FileCell.js +0 -260
- package/lib/components/AssetsList/GridView/FilesSection/FileOverlayOptions.js +0 -140
- package/lib/components/AssetsList/GridView/FilesSection/FilesSection.styled.js +0 -15
- package/lib/components/AssetsList/GridView/FilesSection/index.js +0 -31
- package/lib/components/AssetsList/GridView/FilesSkeleton.js +0 -47
- package/lib/components/AssetsList/GridView/FoldersSection/FolderCell.js +0 -239
- package/lib/components/AssetsList/GridView/FoldersSection/FolderPreviewGrid.js +0 -106
- package/lib/components/AssetsList/GridView/FoldersSection/FolderTopOptions.js +0 -70
- package/lib/components/AssetsList/GridView/FoldersSection/index.js +0 -23
- package/lib/components/AssetsList/GridView/FoldersSkeleton.js +0 -77
- package/lib/components/AssetsList/GridView/GridView.styled.js +0 -11
- package/lib/components/AssetsList/GridView/SearchGridView/SearchGridView.styled.js +0 -15
- package/lib/components/AssetsList/GridView/SearchGridView/SearchGridViewSkeleton.js +0 -30
- package/lib/components/AssetsList/GridView/SearchGridView/index.js +0 -97
- package/lib/components/AssetsList/GridView/index.js +0 -196
- package/lib/components/AssetsList/ListView/AssetsSection/AssetsSectionTableHeader.js +0 -152
- package/lib/components/AssetsList/ListView/AssetsSection/AssetsSectionTableRow.js +0 -333
- package/lib/components/AssetsList/ListView/AssetsSection/index.js +0 -99
- package/lib/components/AssetsList/ListView/ColumnsMenu.js +0 -89
- package/lib/components/AssetsList/ListView/FilesAccordion.js +0 -74
- package/lib/components/AssetsList/ListView/FilesSkeleton.js +0 -68
- package/lib/components/AssetsList/ListView/FoldersSection/FoldersSectionTableHeader.js +0 -98
- package/lib/components/AssetsList/ListView/FoldersSection/FoldersSectionTableRow.js +0 -156
- package/lib/components/AssetsList/ListView/FoldersSection/index.js +0 -54
- package/lib/components/AssetsList/ListView/FoldersSkeleton.js +0 -67
- package/lib/components/AssetsList/ListView/ListView.styled.js +0 -181
- package/lib/components/AssetsList/ListView/ListView.utils.js +0 -30
- package/lib/components/AssetsList/ListView/SearchListView/index.js +0 -109
- package/lib/components/AssetsList/ListView/index.js +0 -203
- package/lib/components/AssetsList/ScrollToTop.js +0 -70
- package/lib/components/AssetsList/SearchView.hook.js +0 -241
- package/lib/components/AssetsList/__SearchTestPannel.js +0 -238
- package/lib/components/AssetsList/__SearchTestPannel.mock.js +0 -1
- package/lib/components/AssetsList/index.js +0 -266
- package/lib/components/AssetsList/relevanceBadge.js +0 -15
- package/lib/components/AssetsView/AssetsView.styled.js +0 -25
- package/lib/components/AssetsView/AssetsView.thunks.js +0 -64
- package/lib/components/AssetsView/index.js +0 -142
- package/lib/components/AuthExplorerView.js +0 -79
- package/lib/components/Breadcrumbs/BreadCrumbViews/BreadCrumbsViews.styled.js +0 -30
- package/lib/components/Breadcrumbs/BreadCrumbViews/index.js +0 -32
- package/lib/components/Breadcrumbs/Breadcrumb.js +0 -52
- package/lib/components/Breadcrumbs/Breadcrumbs.styled.js +0 -81
- package/lib/components/Breadcrumbs/BreadcrumbsSkeleton.js +0 -12
- package/lib/components/Breadcrumbs/index.js +0 -187
- package/lib/components/BulkEditPanel/BulkEdit.js +0 -330
- package/lib/components/BulkEditPanel/BulkEditPanel.styled.js +0 -62
- package/lib/components/BulkEditPanel/BulkEditPanel.utils.js +0 -55
- package/lib/components/BulkEditPanel/components/AssetsList/AssetsList.constants.js +0 -29
- package/lib/components/BulkEditPanel/components/AssetsList/AssetsList.js +0 -148
- package/lib/components/BulkEditPanel/components/AssetsList/AssetsList.styled.js +0 -81
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/Columns.styled.js +0 -99
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/FileMetadataField.js +0 -263
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/FileTagField.js +0 -228
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/FileTextField.js +0 -107
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/MetadataColumn.js +0 -142
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/TableRow.js +0 -139
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/TagsColumn.js +0 -58
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/TagsField.js +0 -80
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/TextColumn.js +0 -53
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/columns.utils.js +0 -272
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/getActiveColumn.js +0 -23
- package/lib/components/BulkEditPanel/components/AssetsList/FloatyPreview.js +0 -55
- package/lib/components/BulkEditPanel/components/AssetsList/FloatyPreview.styled.js +0 -21
- package/lib/components/BulkEditPanel/components/AssetsList/TableBody.js +0 -64
- package/lib/components/BulkEditPanel/components/AssetsList/TableHeader.js +0 -67
- package/lib/components/BulkEditPanel/components/BulkEditFooter.js +0 -33
- package/lib/components/BulkEditPanel/components/ConfirmationModal/ConfirmationModal.js +0 -47
- package/lib/components/BulkEditPanel/components/ConfirmationModal/ConfirmationModal.styled.js +0 -25
- package/lib/components/BulkEditPanel/components/MainContent/MainContent.js +0 -110
- package/lib/components/BulkEditPanel/components/MainContent/MainContent.styled.js +0 -12
- package/lib/components/BulkEditPanel/components/MainContent/index.js +0 -2
- package/lib/components/BulkEditPanel/components/Sidebar/Sidebar.styled.js +0 -53
- package/lib/components/BulkEditPanel/components/Sidebar/Sidebar.utils.js +0 -28
- package/lib/components/BulkEditPanel/components/Sidebar/index.js +0 -158
- package/lib/components/BulkEditPanel/components/Tabs/Metadata/Metadata.js +0 -246
- package/lib/components/BulkEditPanel/components/Tabs/Metadata/Metadata.styled.js +0 -17
- package/lib/components/BulkEditPanel/components/Tabs/Tags/Tags.js +0 -222
- package/lib/components/BulkEditPanel/components/Tabs/Tags/Tags.mixin.js +0 -20
- package/lib/components/BulkEditPanel/components/Tabs/Tags/Tags.styled.js +0 -123
- package/lib/components/BulkEditPanel/components/Tabs/Tags/TagsContianer.js +0 -31
- package/lib/components/BulkEditPanel/components/Tabs/Tags/TagsPaper.js +0 -95
- package/lib/components/BulkEditPanel/components/Tabs/Text/Text.js +0 -167
- package/lib/components/BulkEditPanel/components/Tabs/Text/Text.styled.js +0 -15
- package/lib/components/BulkEditPanel/components/Tabs/tabs.constants.js +0 -113
- package/lib/components/BulkEditPanel/components/Tabs/tabs.js +0 -43
- package/lib/components/BulkEditPanel/components/Tabs/tabs.utils.js +0 -239
- package/lib/components/BulkEditPanel/index.js +0 -28
- package/lib/components/ContextMenu/BeforeUploadMenu/index.js +0 -51
- package/lib/components/ContextMenu/ContextMenu.constants.js +0 -64
- package/lib/components/ContextMenu/ContextMenu.hooks.js +0 -35
- package/lib/components/ContextMenu/ContextMenu.styled.js +0 -107
- package/lib/components/ContextMenu/ContextMenuContent.js +0 -202
- package/lib/components/ContextMenu/ContextMenuItem.js +0 -142
- package/lib/components/ContextMenu/FileMenu/CollaborateSection/index.js +0 -33
- package/lib/components/ContextMenu/FileMenu/DeleteSection/index.js +0 -25
- package/lib/components/ContextMenu/FileMenu/EditSection/index.js +0 -42
- package/lib/components/ContextMenu/FileMenu/FindSection/index.js +0 -29
- package/lib/components/ContextMenu/FileMenu/index.js +0 -15
- package/lib/components/ContextMenu/FolderMenu/CollaborateSection/index.js +0 -17
- package/lib/components/ContextMenu/FolderMenu/DeleteSection/index.js +0 -41
- package/lib/components/ContextMenu/FolderMenu/EditSection/index.js +0 -49
- package/lib/components/ContextMenu/FolderMenu/FindSection/index.js +0 -49
- package/lib/components/ContextMenu/FolderMenu/FolderMenu.utils.js +0 -31
- package/lib/components/ContextMenu/FolderMenu/index.js +0 -14
- package/lib/components/ContextMenu/MenuOptions/AddVariationOption.js +0 -59
- package/lib/components/ContextMenu/MenuOptions/BulkEditOption.js +0 -47
- package/lib/components/ContextMenu/MenuOptions/CdnLinkOption.js +0 -54
- package/lib/components/ContextMenu/MenuOptions/DeleteOption.js +0 -70
- package/lib/components/ContextMenu/MenuOptions/DownloadOption.js +0 -88
- package/lib/components/ContextMenu/MenuOptions/EditImageOption.js +0 -63
- package/lib/components/ContextMenu/MenuOptions/EditVideoOption.js +0 -87
- package/lib/components/ContextMenu/MenuOptions/LocateFileOption.js +0 -45
- package/lib/components/ContextMenu/MenuOptions/ManagaAccessOption.js +0 -67
- package/lib/components/ContextMenu/MenuOptions/ManageDetailsOption.js +0 -52
- package/lib/components/ContextMenu/MenuOptions/MoveOption.js +0 -54
- package/lib/components/ContextMenu/MenuOptions/PreviewOption.js +0 -35
- package/lib/components/ContextMenu/MenuOptions/RenameOption.js +0 -66
- package/lib/components/ContextMenu/MenuOptions/TransformationOption.js +0 -63
- package/lib/components/ContextMenu/MultipleMenu/CollaborateSection/index.js +0 -31
- package/lib/components/ContextMenu/MultipleMenu/DeleteSection/index.js +0 -6
- package/lib/components/ContextMenu/MultipleMenu/EditSection/index.js +0 -14
- package/lib/components/ContextMenu/MultipleMenu/FindSection/index.js +0 -14
- package/lib/components/ContextMenu/MultipleMenu/index.js +0 -14
- package/lib/components/ContextMenu/SharedMenus/DownloadFolderSubMenu.js +0 -36
- package/lib/components/ContextMenu/SharedMenus/DownloadSubMenu.js +0 -70
- package/lib/components/ContextMenu/index.js +0 -34
- package/lib/components/ContextMenu/utils/calculateMenuHeight.js +0 -20
- package/lib/components/ContextMenu/utils/calculateMenuPosition.js +0 -42
- package/lib/components/ContextMenu/utils/createSeparator.js +0 -14
- package/lib/components/ContextMenu/utils/editMedia.js +0 -17
- package/lib/components/ContextMenu/utils/getFileLocation.js +0 -8
- package/lib/components/ContextMenu/utils/getFilteredOptions.js +0 -20
- package/lib/components/ContextMenu/utils/getProperFolderSelections.js +0 -7
- package/lib/components/ContextMenu/utils/isEmptyFolderSelection.js +0 -5
- package/lib/components/ContextMenu/utils/isFileContextMenu.js +0 -5
- package/lib/components/ContextMenu/utils/isFirstFileVisibilityPublic.js +0 -9
- package/lib/components/ContextMenu/utils/isMenuItemVisible.js +0 -5
- package/lib/components/ContextMenu/utils/isMixedFiles.js +0 -9
- package/lib/components/ContextMenu/utils/isMultipleSelection.js +0 -6
- package/lib/components/ContextMenu/utils/isSeparatorHidden.js +0 -7
- package/lib/components/ContextMenu/utils/triggerDownload.js +0 -45
- package/lib/components/CropPanel/CropOptions.js +0 -155
- package/lib/components/CropPanel/CropPanel.constants.js +0 -44
- package/lib/components/CropPanel/CropPanel.styled.js +0 -107
- package/lib/components/CropPanel/CropPanel.utils.js +0 -48
- package/lib/components/CropPanel/CropPanelContent.js +0 -209
- package/lib/components/CropPanel/ImageOptions.js +0 -326
- package/lib/components/CropPanel/ImageResize.js +0 -207
- package/lib/components/CropPanel/Option.js +0 -113
- package/lib/components/CropPanel/index.js +0 -22
- package/lib/components/Details/Details.constants.js +0 -75
- package/lib/components/Details/Details.utils.js +0 -232
- package/lib/components/Details/DetailsSideBar.styled.js +0 -139
- package/lib/components/Details/EditActionButtons/EditActionButtons.styled.js +0 -27
- package/lib/components/Details/EditActionButtons/index.js +0 -38
- package/lib/components/Details/FileDetails.js +0 -31
- package/lib/components/Details/FileItem/CustomMetadataTab.js +0 -50
- package/lib/components/Details/FileItem/FileItem.styled.js +0 -47
- package/lib/components/Details/FileItem/GeneralTab.js +0 -113
- package/lib/components/Details/FileItem/SharedFileEditData.js +0 -97
- package/lib/components/Details/FileItem/index.js +0 -2
- package/lib/components/Details/FolderDetails.js +0 -138
- package/lib/components/Details/FolderItemList/FolderListItem.js +0 -77
- package/lib/components/Details/FolderItemList/index.js +0 -62
- package/lib/components/Details/MultiItemsDetails.js +0 -69
- package/lib/components/Details/MultipleItems.js +0 -71
- package/lib/components/Details/TabChips.js +0 -51
- package/lib/components/Details/TabPanels.js +0 -42
- package/lib/components/Details/Title.js +0 -52
- package/lib/components/Details/index.js +0 -53
- package/lib/components/DnD/Dnd.styled.js +0 -11
- package/lib/components/DnD/DragImage.js +0 -61
- package/lib/components/DnD/index.js +0 -219
- package/lib/components/Drawer/Drawer.styled.js +0 -45
- package/lib/components/Drawer/Drawer.utils.js +0 -163
- package/lib/components/Drawer/Resizer.js +0 -141
- package/lib/components/Drawer/ResizerCore.js +0 -213
- package/lib/components/Drawer/index.js +0 -68
- package/lib/components/EmptyViewPlaceholder/EmptyViewPlaceholder.styled.js +0 -39
- package/lib/components/EmptyViewPlaceholder/index.js +0 -58
- package/lib/components/ExploreView.js +0 -46
- package/lib/components/ExplorerUI.js +0 -17
- package/lib/components/ExplorerWrapper.js +0 -114
- package/lib/components/FacetedSearch/DrawerBody/index.js +0 -42
- package/lib/components/FacetedSearch/DrawerWrapper/index.js +0 -83
- package/lib/components/FacetedSearch/FacetedSearch.constants.js +0 -27
- package/lib/components/FacetedSearch/FacetedSearch.styled.js +0 -101
- package/lib/components/FacetedSearch/FacetedSearch.utils.js +0 -3
- package/lib/components/FacetedSearch/Field/Date.js +0 -69
- package/lib/components/FacetedSearch/Field/Placeholder.js +0 -20
- package/lib/components/FacetedSearch/Field/Select.js +0 -136
- package/lib/components/FacetedSearch/Field/Switch.js +0 -59
- package/lib/components/FacetedSearch/Field/index.js +0 -27
- package/lib/components/FacetedSearch/GroupWrapper/index.js +0 -129
- package/lib/components/FacetedSearch/StaticFields/Date.js +0 -152
- package/lib/components/FacetedSearch/index.js +0 -12
- package/lib/components/FileItem/FileInfo/FileInfo.styled.js +0 -126
- package/lib/components/FileItem/FileInfo/FileInfo.utils.js +0 -13
- package/lib/components/FileItem/FileInfo/FileMetadata.js +0 -37
- package/lib/components/FileItem/FileInfo/FileName.js +0 -197
- package/lib/components/FileItem/FileInfo/index.js +0 -194
- package/lib/components/FileItem/FileItem.mixin.js +0 -22
- package/lib/components/FileItem/FileItem.styled.js +0 -54
- package/lib/components/FileItem/FileUploadTopOptions.js +0 -87
- package/lib/components/FileItem/PreUploadFileThumbnail/FileThumbnail.js +0 -61
- package/lib/components/FileItem/PreUploadFileThumbnail/PreUploadFileThumbnail.styled.js +0 -8
- package/lib/components/FileItem/PreUploadFileThumbnail/index.js +0 -27
- package/lib/components/FileItem/index.js +0 -164
- package/lib/components/FileWindowPanel/Body/ActionButtons.js +0 -70
- package/lib/components/FileWindowPanel/Body/Body.constants.js +0 -5
- package/lib/components/FileWindowPanel/Body/Body.styled.js +0 -196
- package/lib/components/FileWindowPanel/Body/BodyFile.js +0 -165
- package/lib/components/FileWindowPanel/Body/Footer.js +0 -60
- package/lib/components/FileWindowPanel/Body/Preview.js +0 -232
- package/lib/components/FileWindowPanel/Body/PreviewPlaceholder.js +0 -20
- package/lib/components/FileWindowPanel/Body/VideoEmbed.js +0 -80
- package/lib/components/FileWindowPanel/Body/index.js +0 -108
- package/lib/components/FileWindowPanel/FileTabs/FileTabButtons.js +0 -98
- package/lib/components/FileWindowPanel/FileTabs/FileTabs.constants.js +0 -50
- package/lib/components/FileWindowPanel/FileTabs/FileTabs.styled.js +0 -99
- package/lib/components/FileWindowPanel/FileTabs/FileTabsList.js +0 -91
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/EditableField.js +0 -78
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldLabel.js +0 -40
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldRow.js +0 -57
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldValue.js +0 -20
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldWithTooltip.js +0 -29
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralSection.js +0 -183
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralTab.constants.js +0 -2
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralTab.styled.js +0 -112
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralTabSkeleton.js +0 -70
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/TableSeparator.js +0 -10
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/index.js +0 -100
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/CustomMetadataSection.js +0 -247
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/EmbeddedMetadataSection.js +0 -31
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/MetadataTab.constants.js +0 -2
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/MetadataTab.styled.js +0 -134
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/MetadataTabSkeleton.js +0 -70
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/index.js +0 -181
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationItem.js +0 -78
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.constants.js +0 -26
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.styled.js +0 -177
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.thunks.js +0 -99
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.utils.js +0 -23
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsContent.js +0 -92
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsEditModalContent.js +0 -57
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsSearch.js +0 -44
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsSkeleton.js +0 -35
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTabNavigator.js +0 -38
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTabs.js +0 -40
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTopOptions.js +0 -204
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/index.js +0 -603
- package/lib/components/FileWindowPanel/FileTabs/index.js +0 -83
- package/lib/components/FileWindowPanel/FileWindow.js +0 -221
- package/lib/components/FileWindowPanel/FileWindow.styled.js +0 -19
- package/lib/components/FileWindowPanel/FileWindow.utils.js +0 -38
- package/lib/components/FileWindowPanel/Header/AfterUploadActionBtns.js +0 -69
- package/lib/components/FileWindowPanel/Header/BeforeUploadActionBtns.js +0 -100
- package/lib/components/FileWindowPanel/Header/FileWindowHeader.styled.js +0 -56
- package/lib/components/FileWindowPanel/Header/MutualActionBtns.js +0 -92
- package/lib/components/FileWindowPanel/Header/index.js +0 -109
- package/lib/components/FileWindowPanel/index.js +0 -60
- package/lib/components/Filters/Filters.constants.js +0 -358
- package/lib/components/Filters/Filters.styled.js +0 -235
- package/lib/components/Filters/Filters.utils.js +0 -536
- package/lib/components/Filters/FiltersContext.js +0 -59
- package/lib/components/Filters/FiltersSkeleton.js +0 -14
- package/lib/components/Filters/Groups/Date/index.js +0 -201
- package/lib/components/Filters/Groups/Folders/FoldersSkeleton.js +0 -43
- package/lib/components/Filters/Groups/Folders/index.js +0 -109
- package/lib/components/Filters/Groups/Image/Colors.js +0 -73
- package/lib/components/Filters/Groups/Image/Faces.js +0 -64
- package/lib/components/Filters/Groups/Image/Orientations.js +0 -64
- package/lib/components/Filters/Groups/Image/Resolutions.js +0 -65
- package/lib/components/Filters/Groups/Image/Tooltip.js +0 -14
- package/lib/components/Filters/Groups/Image/index.js +0 -104
- package/lib/components/Filters/Groups/LicenseExpiry/LicenseExpiry.styled.js +0 -17
- package/lib/components/Filters/Groups/LicenseExpiry/index.js +0 -97
- package/lib/components/Filters/Groups/Metadata/Advanced/ConditionSelector.js +0 -40
- package/lib/components/Filters/Groups/Metadata/Advanced/ExtraRow/ConditionSelector.js +0 -35
- package/lib/components/Filters/Groups/Metadata/Advanced/ExtraRow/ValueSelector.js +0 -33
- package/lib/components/Filters/Groups/Metadata/Advanced/ExtraRow/index.js +0 -18
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/AutoComplete.js +0 -56
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Boolean.js +0 -35
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Date.js +0 -36
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/GeoPointField.js +0 -30
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Numeric.js +0 -32
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Select.js +0 -55
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Tags.js +0 -21
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Text.js +0 -39
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/index.js +0 -52
- package/lib/components/Filters/Groups/Metadata/Advanced/KeySelector.js +0 -34
- package/lib/components/Filters/Groups/Metadata/Advanced/Row.js +0 -53
- package/lib/components/Filters/Groups/Metadata/Advanced/index.js +0 -48
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Date.js +0 -45
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Field.utils.js +0 -58
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Numeric.js +0 -51
- package/lib/components/Filters/Groups/Metadata/Basic/Field/OptionsPopup.js +0 -87
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Select.js +0 -168
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Switch.js +0 -41
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Tags.js +0 -38
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Text.js +0 -57
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Uri.js +0 -54
- package/lib/components/Filters/Groups/Metadata/Basic/Field/index.js +0 -46
- package/lib/components/Filters/Groups/Metadata/Basic/GroupWrapper.js +0 -79
- package/lib/components/Filters/Groups/Metadata/Basic/index.js +0 -80
- package/lib/components/Filters/Groups/Metadata/Metadata.constants.js +0 -42
- package/lib/components/Filters/Groups/Metadata/Metadata.styled.js +0 -150
- package/lib/components/Filters/Groups/Metadata/Metadata.utils.js +0 -160
- package/lib/components/Filters/Groups/Metadata/MetadataFiltersContext.js +0 -329
- package/lib/components/Filters/Groups/Metadata/Placeholder.js +0 -25
- package/lib/components/Filters/Groups/Metadata/common/TagsField/TagsMenu.js +0 -81
- package/lib/components/Filters/Groups/Metadata/common/TagsField/TagsSearchPlaceholder.js +0 -18
- package/lib/components/Filters/Groups/Metadata/common/TagsField/index.js +0 -142
- package/lib/components/Filters/Groups/Metadata/index.js +0 -111
- package/lib/components/Filters/Groups/Size/index.js +0 -125
- package/lib/components/Filters/Groups/Tags/FilteredTags.js +0 -62
- package/lib/components/Filters/Groups/Tags/SelectedTags.js +0 -51
- package/lib/components/Filters/Groups/Tags/SuggestedTags.js +0 -43
- package/lib/components/Filters/Groups/Tags/index.js +0 -146
- package/lib/components/Filters/Groups/TypeAndFormat/Format.js +0 -65
- package/lib/components/Filters/Groups/TypeAndFormat/Type.js +0 -85
- package/lib/components/Filters/Groups/TypeAndFormat/index.js +0 -114
- package/lib/components/Filters/Groups/common/DateRangeField/DateRangeField.styled.js +0 -10
- package/lib/components/Filters/Groups/common/DateRangeField/index.js +0 -72
- package/lib/components/Filters/Groups/common/FilterFooter.js +0 -67
- package/lib/components/Filters/Groups/common/FilterOptions.js +0 -29
- package/lib/components/Filters/Groups/common/FilterSearch.js +0 -22
- package/lib/components/Filters/Groups/common/FilterSearch.styled.js +0 -15
- package/lib/components/Filters/Groups/common/FilterSkeleton.js +0 -44
- package/lib/components/Filters/Groups/common/TimeFrames.js +0 -35
- package/lib/components/Filters/Groups/index.js +0 -55
- package/lib/components/Filters/Placeholder.js +0 -29
- package/lib/components/Filters/hooks/useDateTypeFilterValues.js +0 -182
- package/lib/components/Filters/hooks/useFilters.js +0 -78
- package/lib/components/Filters/index.js +0 -78
- package/lib/components/FoldersView/FoldersTree/FoldersTree.styled.js +0 -193
- package/lib/components/FoldersView/FoldersTree/FoldersTree.utils.js +0 -78
- package/lib/components/FoldersView/FoldersTree/FoldersTreeHeader.js +0 -52
- package/lib/components/FoldersView/FoldersTree/FoldersTreeList.js +0 -64
- package/lib/components/FoldersView/FoldersTree/FoldersTreeListItem.js +0 -270
- package/lib/components/FoldersView/FoldersTree/FoldersTreeSearch.js +0 -70
- package/lib/components/FoldersView/FoldersTree/FoldersTreeSkeleton.js +0 -23
- package/lib/components/FoldersView/FoldersTree/NoFoldersResult.js +0 -19
- package/lib/components/FoldersView/FoldersTree/SearchedFoldersItem.js +0 -113
- package/lib/components/FoldersView/FoldersTree/index.js +0 -163
- package/lib/components/FoldersView/hooks/useAddFolder.js +0 -60
- package/lib/components/FoldersView/index.js +0 -282
- package/lib/components/GalleryRoleSelect/CustomRolesTab.js +0 -47
- package/lib/components/GalleryRoleSelect/CustomRolesTab.styled.js +0 -10
- package/lib/components/GalleryRoleSelect/GalleryRoleSelect.constants.js +0 -11
- package/lib/components/GalleryRoleSelect/GalleryRoleSelect.styled.js +0 -132
- package/lib/components/GalleryRoleSelect/GalleryRoleSelect.utils.js +0 -87
- package/lib/components/GalleryRoleSelect/StandardRolesTab.js +0 -58
- package/lib/components/GalleryRoleSelect/index.js +0 -234
- package/lib/components/HeaderBar/FacetedSearchToggleButton.js +0 -28
- package/lib/components/HeaderBar/HeaderBar.styled.js +0 -25
- package/lib/components/HeaderBar/RightSide.js +0 -127
- package/lib/components/HeaderBar/index.js +0 -77
- package/lib/components/ImageEditorPanel/index.js +0 -33
- package/lib/components/InfiniteScroll/InfiniteScroll.js +0 -97
- package/lib/components/InfiniteScroll/InfiniteScroll.styled.js +0 -11
- package/lib/components/Informer/index.js +0 -9
- package/lib/components/LoginScreen/LoginScreen.styled.js +0 -39
- package/lib/components/LoginScreen/index.js +0 -133
- package/lib/components/MainMenu/MainMenu.styled.js +0 -12
- package/lib/components/MainMenu/index.js +0 -77
- package/lib/components/Modals/AddNewFolder/AddNewFolder.hooks.js +0 -99
- package/lib/components/Modals/AddNewFolder/index.js +0 -1
- package/lib/components/Modals/ConfirmationModal/ConfirmationModal.hooks.js +0 -101
- package/lib/components/Modals/ConfirmationModal/index.js +0 -1
- package/lib/components/Modals/DeleteItems/DeleteItems.hooks.js +0 -233
- package/lib/components/Modals/DeleteItems/index.js +0 -1
- package/lib/components/Modals/DeleteModal/DeleteModal.hooks.js +0 -87
- package/lib/components/Modals/DeleteModal/index.js +0 -1
- package/lib/components/Modals/DownloadConsent/DownlaodConsent.styled.js +0 -8
- package/lib/components/Modals/DownloadConsent/DownloadConsent.hooks.js +0 -90
- package/lib/components/Modals/DownloadConsent/DownloadConsentContent.js +0 -52
- package/lib/components/Modals/DownloadConsent/index.js +0 -2
- package/lib/components/Modals/Modals.js +0 -386
- package/lib/components/Modals/Modals.styled.js +0 -80
- package/lib/components/Modals/MoveItems/MoveItems.hooks.js +0 -88
- package/lib/components/Modals/MoveItems/index.js +0 -1
- package/lib/components/Modals/TransformedDownload/PdfModalContent.js +0 -109
- package/lib/components/Modals/TransformedDownload/TransformedDownload.hooks.js +0 -188
- package/lib/components/Modals/TransformedDownload/TransformedDownload.styled.js +0 -29
- package/lib/components/Modals/TransformedDownload/TransformedDownload.utils.js +0 -46
- package/lib/components/Modals/TransformedDownload/index.js +0 -2
- package/lib/components/Modals/index.js +0 -8
- package/lib/components/NoItems/NoItems.styled.js +0 -54
- package/lib/components/NoItems/index.js +0 -50
- package/lib/components/PdftronPanel/index.js +0 -31
- package/lib/components/PickerPanel/PickerPanel.styled.js +0 -41
- package/lib/components/PickerPanel/PickerPanelContent.js +0 -100
- package/lib/components/PickerPanel/index.js +0 -21
- package/lib/components/ProgressPanel/ProgressPanel.utils.js +0 -29
- package/lib/components/ProgressPanel/index.js +0 -37
- package/lib/components/TopBar/AppliedFilterChips/AppliedFilterChips.styled.js +0 -11
- package/lib/components/TopBar/AppliedFilterChips/index.js +0 -77
- package/lib/components/TopBar/Search/ContextDropdown/ContextDropdown.styled.js +0 -59
- package/lib/components/TopBar/Search/ContextDropdown/ContextDropdown.utils.js +0 -67
- package/lib/components/TopBar/Search/ContextDropdown/index.js +0 -170
- package/lib/components/TopBar/Search/PrependedOptions/TempFilterRegexInput.js +0 -133
- package/lib/components/TopBar/Search/Search.utils.js +0 -88
- package/lib/components/TopBar/Search/SimilarSearchTag.js +0 -60
- package/lib/components/TopBar/Search/index.js +0 -251
- package/lib/components/TopBar/TopBar.styled.js +0 -37
- package/lib/components/TopBar/index.js +0 -61
- package/lib/components/TopSection/TopSection.styled.js +0 -22
- package/lib/components/TopSection/index.js +0 -58
- package/lib/components/UploadBar/UploadBar.styled.js +0 -84
- package/lib/components/UploadBar/index.js +0 -222
- package/lib/components/UploadStatus/index.js +0 -20
- package/lib/components/UploadsPanel/UploadsList/Header.js +0 -19
- package/lib/components/UploadsPanel/UploadsList/List.js +0 -29
- package/lib/components/UploadsPanel/UploadsList/PreUploadPlugins.js +0 -22
- package/lib/components/UploadsPanel/UploadsList/UploadsList.styled.js +0 -64
- package/lib/components/UploadsPanel/UploadsList/UploadsList.utils.js +0 -17
- package/lib/components/UploadsPanel/UploadsList/UploadsVirtualGrid.js +0 -29
- package/lib/components/UploadsPanel/UploadsList/index.js +0 -55
- package/lib/components/UploadsPanel/UploadsPanel.styled.js +0 -24
- package/lib/components/UploadsPanel/UploadsPanelTopBar.js +0 -16
- package/lib/components/UploadsPanel/index.js +0 -36
- package/lib/components/UrlBuilderModal/UrlBuilderModal.styled.js +0 -9
- package/lib/components/UrlBuilderModal/index.js +0 -97
- package/lib/components/Views/ErroredViewPlaceholder.js +0 -48
- package/lib/components/Views/Views.constants.js +0 -29
- package/lib/components/Views/Views.styled.js +0 -87
- package/lib/components/Views/index.js +0 -100
- package/lib/components/common/DeleteModalItemText/DeleteModalItemText.styled.js +0 -8
- package/lib/components/common/DeleteModalItemText/index.js +0 -24
- package/lib/components/common/EditDetailsButton/EditDetailsButton.styled.js +0 -35
- package/lib/components/common/EditDetailsButton/index.js +0 -28
- package/lib/components/common/ExpiryDateTooltipContent/ExpiryDateTooltipContent.styled.js +0 -16
- package/lib/components/common/ExpiryDateTooltipContent/index.js +0 -29
- package/lib/components/common/FileApprovalsInfoPopup/index.js +0 -46
- package/lib/components/common/FileMetadataFieldValue/CustomMetadataFieldValue.js +0 -48
- package/lib/components/common/FileMetadataFieldValue/FileMetadataFieldValue.styled.js +0 -66
- package/lib/components/common/FileMetadataFieldValue/FileMetadataFieldValue.utils.js +0 -315
- package/lib/components/common/FileMetadataFieldValue/GeneralMetadataFieldValue.js +0 -120
- package/lib/components/common/FileMetadataFieldValue/index.js +0 -26
- package/lib/components/common/FileMetadataFieldValue/utils/getFontInfo.js +0 -78
- package/lib/components/common/FolderSelector/BrowseFoldersMenu.js +0 -114
- package/lib/components/common/FolderSelector/FolderSearchMenu.js +0 -45
- package/lib/components/common/FolderSelector/FolderSelector.styled.js +0 -41
- package/lib/components/common/FolderSelector/index.js +0 -186
- package/lib/components/common/FormattedUriLink/FormattedUriLink.styled.js +0 -15
- package/lib/components/common/FormattedUriLink/index.js +0 -21
- package/lib/components/common/OriginalBadge/OriginalBadge.styled.js +0 -17
- package/lib/components/common/OriginalBadge/index.js +0 -14
- package/lib/components/common/SanitizedHtmlElement/index.js +0 -11
- package/lib/components/common/Sort/Sort.constants.js +0 -61
- package/lib/components/common/Sort/Sort.styled.js +0 -47
- package/lib/components/common/Sort/Sort.utils.js +0 -14
- package/lib/components/common/Sort/index.js +0 -183
- package/lib/components/common/TextWithCopyIcon/TextWithCopyIcon.styled.js +0 -44
- package/lib/components/common/TextWithCopyIcon/index.js +0 -71
- package/lib/components/common/TopBarUploadButton/index.js +0 -40
- package/lib/components/common/TrimmedFilePathWithLocate/TrimmedFilePathWithLocate.utils.js +0 -3
- package/lib/components/common/TrimmedFilePathWithLocate/index.js +0 -34
- package/lib/components/common/TrimmedFolderPathWithLocate/index.js +0 -13
- package/lib/components/common/TrimmedPathWithLocate/TrimmedPathWithLocate.styled.js +0 -30
- package/lib/components/common/TrimmedPathWithLocate/index.js +0 -40
- package/lib/components/metadata.adapter.js +0 -365
- package/lib/defaultLocale.js +0 -1361
- package/lib/hooks/index.js +0 -16
- package/lib/hooks/useAssetsPicker.js +0 -274
- package/lib/hooks/useDownloadFilesCsv.js +0 -20
- package/lib/hooks/useEditFileDetails.js +0 -505
- package/lib/hooks/useExplorer.js +0 -6
- package/lib/hooks/useExplorerI18n.js +0 -10
- package/lib/hooks/useExplorerInformer.js +0 -10
- package/lib/hooks/useFetchFileFolderPermissions.js +0 -31
- package/lib/hooks/useFetchMetadataTagsBySearchQuery.js +0 -38
- package/lib/hooks/useFileMetadata.js +0 -117
- package/lib/hooks/useFilterSearch.js +0 -37
- package/lib/hooks/useForcedFilters.js +0 -39
- package/lib/hooks/useIsOverflow.js +0 -25
- package/lib/hooks/useIsSmallScreen.js +0 -20
- package/lib/hooks/useLocateFile.js +0 -231
- package/lib/hooks/usePrevious.js +0 -9
- package/lib/hooks/useSearchSuggestions.js +0 -168
- package/lib/hooks/useStartUpload.js +0 -43
- package/lib/hooks/useToLocaleNumber.js +0 -14
- package/lib/hooks/useValidateFileName.js +0 -324
- package/lib/index.js +0 -1587
- package/lib/slices/common.slice.js +0 -254
- package/lib/slices/drag.slice.js +0 -75
- package/lib/slices/files.slice.js +0 -1307
- package/lib/slices/filters.slice.js +0 -382
- package/lib/slices/folders.slice.js +0 -964
- package/lib/slices/foldersTree.slice.js +0 -501
- package/lib/slices/index.js +0 -32
- package/lib/slices/metadata.slice.js +0 -494
- package/lib/slices/panels.slice.js +0 -351
- package/lib/slices/search.slice.js +0 -995
- package/lib/slices/selections.slice.js +0 -315
- package/lib/slices/targets.slice.js +0 -44
- package/lib/slices/topSection.slice.js +0 -71
- package/lib/slices/views.slice.js +0 -345
- package/lib/thunks/archive.thunks.js +0 -175
- package/lib/thunks/downloads.thunks.js +0 -415
- package/lib/thunks/items.thunks.js +0 -274
- package/lib/thunks/permissions.thunks.js +0 -66
- package/lib/thunks/uploads.thunks.js +0 -235
- package/lib/utils/SearchSuggestions/SearchSuggestionsMenu.js +0 -95
- package/lib/utils/SearchSuggestions/SuggestionMode.js +0 -70
- package/lib/utils/SearchSuggestions/SuggestionModeAttribute.js +0 -87
- package/lib/utils/SearchSuggestions/SuggestionModeExpression.js +0 -121
- package/lib/utils/SearchSuggestions/SuggestionModeTag.js +0 -87
- package/lib/utils/SearchSuggestions/SuggestionsManager.js +0 -242
- package/lib/utils/SearchSuggestions/constants.js +0 -14
- package/lib/utils/SearchSuggestions/index.js +0 -4
- package/lib/utils/SearchSuggestions/styled.js +0 -12
- package/lib/utils/availableScreenSizes.js +0 -4
- package/lib/utils/constants.js +0 -14
- package/lib/utils/convertItemsToFilesFoldersUuids.js +0 -12
- package/lib/utils/convertItemstoFoldersParentUuids.js +0 -12
- package/lib/utils/createPromise.js +0 -9
- package/lib/utils/createSuperFocus.js +0 -43
- package/lib/utils/decodeB64ToStr.js +0 -11
- package/lib/utils/filters.js +0 -333
- package/lib/utils/formatFolderPath.js +0 -10
- package/lib/utils/formatPinSubTitle.js +0 -17
- package/lib/utils/getAcquirerTitle.js +0 -10
- package/lib/utils/getActiveOverlayEl.js +0 -11
- package/lib/utils/getApiPathtype.js +0 -10
- package/lib/utils/getClosestStr.js +0 -22
- package/lib/utils/getItemUuids.js +0 -12
- package/lib/utils/getLabelsTotalAssetsCount.js +0 -6
- package/lib/utils/getMoveAndDeleteData.js +0 -15
- package/lib/utils/getParentFolderPath.js +0 -4
- package/lib/utils/getQueryStringFromUrl.js +0 -6
- package/lib/utils/getScrollableParent.js +0 -15
- package/lib/utils/getStringValueExistedInObj.js +0 -9
- package/lib/utils/isEmbeddableAsset.js +0 -6
- package/lib/utils/isFileVersion.js +0 -9
- package/lib/utils/mapArrayKeysToObjValues.js +0 -33
- package/lib/utils/mapFiltersToShownFormat.js +0 -252
- package/lib/utils/prepareExportedFilesLinks.js +0 -12
- package/lib/utils/prepareSearchUrl.js +0 -65
- package/lib/utils/removeBackground.js +0 -60
- package/lib/utils/removeExtraUrlParams.js +0 -13
- package/lib/utils/scrollToAndFocusItemElement.js +0 -16
- package/lib/utils/toggleFolderNotFoundModal.js +0 -25
- package/lib/utils/trapFocus.js +0 -59
- package/lib/utils/truncateString.js +0 -28
|
@@ -1,386 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
|
-
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."); }
|
|
9
|
-
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; } }
|
|
10
|
-
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; }
|
|
11
|
-
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; } }
|
|
12
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
|
-
import { useEffect, useState, useRef, createRef } from 'react';
|
|
14
|
-
import ignoreEvent from '@scaleflex/widget-utils/lib/ignoreEvent';
|
|
15
|
-
import { useModal, useModalData } from '@scaleflex/widget-core/lib/hooks';
|
|
16
|
-
import { useExplorerI18n } from '../../hooks';
|
|
17
|
-
import Styled from './Modals.styled';
|
|
18
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
|
-
var transitionTimeout = 100; // 100ms = 0.1s (max. transition of modal's styles).
|
|
20
|
-
|
|
21
|
-
var _isMounted = false;
|
|
22
|
-
var initialHigherLvlModalProps = {
|
|
23
|
-
isOpen: false
|
|
24
|
-
};
|
|
25
|
-
var _Modals = function Modals(_ref) {
|
|
26
|
-
var _ref$upperLvlModal = _ref.upperLvlModal,
|
|
27
|
-
upperLvlModal = _ref$upperLvlModal === void 0 ? initialHigherLvlModalProps : _ref$upperLvlModal;
|
|
28
|
-
var toggleModal = useModal();
|
|
29
|
-
var toggleSubModal = useModal({
|
|
30
|
-
isGlobalHigherLvlModal: true
|
|
31
|
-
});
|
|
32
|
-
var modalContentRef = useRef();
|
|
33
|
-
var firstLevelModal = useModalData();
|
|
34
|
-
var currentModalData = upperLvlModal !== null && upperLvlModal !== void 0 && upperLvlModal.isOpen ? upperLvlModal : firstLevelModal;
|
|
35
|
-
var isOpen = currentModalData.isOpen,
|
|
36
|
-
content = currentModalData.content,
|
|
37
|
-
originalPrimaryButtonLabel = currentModalData.buttonPrimaryLabel,
|
|
38
|
-
secondaryPrimaryButtonLabel = currentModalData.buttonSecondaryLabel,
|
|
39
|
-
onCancel = currentModalData.onCancel,
|
|
40
|
-
onButtonSecondaryClick = currentModalData.onButtonSecondaryClick,
|
|
41
|
-
onButtonPrimaryClick = currentModalData.onButtonPrimaryClick,
|
|
42
|
-
icon = currentModalData.icon,
|
|
43
|
-
title = currentModalData.title,
|
|
44
|
-
inputIdToFocus = currentModalData.inputIdToFocus,
|
|
45
|
-
_currentModalData$ent = currentModalData.enterKeySubmits,
|
|
46
|
-
enterKeySubmits = _currentModalData$ent === void 0 ? false : _currentModalData$ent,
|
|
47
|
-
hideSecondaryButton = currentModalData.hideSecondaryButton,
|
|
48
|
-
buttonPrimaryIcon = currentModalData.buttonPrimaryIcon,
|
|
49
|
-
buttonSecondaryIcon = currentModalData.buttonSecondaryIcon,
|
|
50
|
-
modalStyle = currentModalData.modalStyle,
|
|
51
|
-
modalCrossButtonStyle = currentModalData.modalCrossButtonStyle,
|
|
52
|
-
modalHeaderStyle = currentModalData.modalHeaderStyle,
|
|
53
|
-
modalHeaderBottomBorder = currentModalData.modalHeaderBottomBorder,
|
|
54
|
-
modalBodyStyle = currentModalData.modalBodyStyle,
|
|
55
|
-
modalFooterStyle = currentModalData.modalFooterStyle,
|
|
56
|
-
modalFooterTopBorder = currentModalData.modalFooterTopBorder,
|
|
57
|
-
modalPrimaryButton = currentModalData.modalPrimaryButton,
|
|
58
|
-
modalSecondaryButton = currentModalData.modalSecondaryButton,
|
|
59
|
-
_currentModalData$dis = currentModalData.disableOverlayClick,
|
|
60
|
-
disableOverlayClick = _currentModalData$dis === void 0 ? false : _currentModalData$dis,
|
|
61
|
-
_currentModalData$mod = currentModalData.modalSecondaryButtonColor,
|
|
62
|
-
modalSecondaryButtonColor = _currentModalData$mod === void 0 ? 'secondary' : _currentModalData$mod,
|
|
63
|
-
_currentModalData$con = currentModalData.contentStyle,
|
|
64
|
-
contentStyle = _currentModalData$con === void 0 ? {} : _currentModalData$con,
|
|
65
|
-
_currentModalData$mod2 = currentModalData.modalPrimaryButtonColor,
|
|
66
|
-
modalPrimaryButtonColor = _currentModalData$mod2 === void 0 ? 'primary' : _currentModalData$mod2,
|
|
67
|
-
modalIconStyle = currentModalData.modalIconStyle,
|
|
68
|
-
secondaryTitle = currentModalData.secondaryTitle,
|
|
69
|
-
primaryTitleStyle = currentModalData.primaryTitleStyle,
|
|
70
|
-
warningPrimaryButton = currentModalData.warningPrimaryButton,
|
|
71
|
-
fullWidthButtons = currentModalData.fullWidthButtons,
|
|
72
|
-
inlineActionButtons = currentModalData.inlineActionButtons,
|
|
73
|
-
disableAutoClose = currentModalData.disableAutoClose,
|
|
74
|
-
hidePrimaryButton = currentModalData.hidePrimaryButton,
|
|
75
|
-
disablePrimaryButton = currentModalData.disablePrimaryButton,
|
|
76
|
-
_currentModalData$ful = currentModalData.fullWidth,
|
|
77
|
-
fullWidth = _currentModalData$ful === void 0 ? false : _currentModalData$ful,
|
|
78
|
-
showExtraButton = currentModalData.showExtraButton,
|
|
79
|
-
extraButtonLabel = currentModalData.extraButtonLabel,
|
|
80
|
-
onExtraButtonClick = currentModalData.onExtraButtonClick,
|
|
81
|
-
_currentModalData$dis2 = currentModalData.disableExtraButton,
|
|
82
|
-
disableExtraButton = _currentModalData$dis2 === void 0 ? false : _currentModalData$dis2,
|
|
83
|
-
_currentModalData$ext = currentModalData.extraButtonColor,
|
|
84
|
-
extraButtonColor = _currentModalData$ext === void 0 ? 'secondary' : _currentModalData$ext,
|
|
85
|
-
modalExtraButtonStyle = currentModalData.modalExtraButtonStyle,
|
|
86
|
-
higherLevelModalData = currentModalData.higherLevelModalData,
|
|
87
|
-
fullScreenMediaQuery = currentModalData.fullScreenMediaQuery,
|
|
88
|
-
rootModalStyles = currentModalData.rootModalStyles;
|
|
89
|
-
var higherLvlModal = higherLevelModalData || upperLvlModal;
|
|
90
|
-
var i18n = useExplorerI18n();
|
|
91
|
-
// [data, updateData] Will be passed to the content of the modal's body and used as data prop there (e.g. for passing the folder name...etc).
|
|
92
|
-
// And the data will be passed in both buttons callbacks (primary and secondary).
|
|
93
|
-
var _useState = useState({}),
|
|
94
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
95
|
-
data = _useState2[0],
|
|
96
|
-
updateData = _useState2[1];
|
|
97
|
-
// Used in-case we would need to open another modal, from the current opened one without closing it.
|
|
98
|
-
var _useState3 = useState(initialHigherLvlModalProps),
|
|
99
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
100
|
-
higherLvlModalProps = _useState4[0],
|
|
101
|
-
setHigherLvlModalProps = _useState4[1];
|
|
102
|
-
var _useState5 = useState({
|
|
103
|
-
"default": null,
|
|
104
|
-
contentChanged: null
|
|
105
|
-
}),
|
|
106
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
107
|
-
transition = _useState6[0],
|
|
108
|
-
updateTransition = _useState6[1];
|
|
109
|
-
var _useState7 = useState(false),
|
|
110
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
111
|
-
isModalLoading = _useState8[0],
|
|
112
|
-
setIsModalLoading = _useState8[1];
|
|
113
|
-
var _useState9 = useState(disablePrimaryButton),
|
|
114
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
115
|
-
isPrimaryButtonDisabled = _useState10[0],
|
|
116
|
-
setPrimaryButtonDisabled = _useState10[1];
|
|
117
|
-
var _useState11 = useState(disableExtraButton),
|
|
118
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
119
|
-
isExtraButtonDisabled = _useState12[0],
|
|
120
|
-
setExtraButtonDisabled = _useState12[1];
|
|
121
|
-
var _useState13 = useState(false),
|
|
122
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
123
|
-
isSecondaryButtonDisabled = _useState14[0],
|
|
124
|
-
setSecondaryButtonDisabled = _useState14[1];
|
|
125
|
-
var _useState15 = useState(false),
|
|
126
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
127
|
-
isModalHidden = _useState16[0],
|
|
128
|
-
setIsModalHidden = _useState16[1]; // Could be used for tmp hide modal (for ex. when we need to open child modal, so we can hide main modal and show it again when child modal closed)
|
|
129
|
-
var _useState17 = useState(showExtraButton),
|
|
130
|
-
_useState18 = _slicedToArray(_useState17, 2),
|
|
131
|
-
isShowExtraButton = _useState18[0],
|
|
132
|
-
setShowExtraButton = _useState18[1];
|
|
133
|
-
var _useState19 = useState(originalPrimaryButtonLabel),
|
|
134
|
-
_useState20 = _slicedToArray(_useState19, 2),
|
|
135
|
-
primaryButtonLabel = _useState20[0],
|
|
136
|
-
setPrimaryButtonLabel = _useState20[1];
|
|
137
|
-
var _useState21 = useState(secondaryPrimaryButtonLabel),
|
|
138
|
-
_useState22 = _slicedToArray(_useState21, 2),
|
|
139
|
-
secondaryButtonLabel = _useState22[0],
|
|
140
|
-
setSecondaryButtonLabel = _useState22[1];
|
|
141
|
-
var _useState23 = useState(hideSecondaryButton),
|
|
142
|
-
_useState24 = _slicedToArray(_useState23, 2),
|
|
143
|
-
isHiddenSecondaryButton = _useState24[0],
|
|
144
|
-
setIsHiddenSecondaryButton = _useState24[1];
|
|
145
|
-
var _useState25 = useState(false),
|
|
146
|
-
_useState26 = _slicedToArray(_useState25, 2),
|
|
147
|
-
stopEnterKeySubmits = _useState26[0],
|
|
148
|
-
setStopEnterKeySubmits = _useState26[1]; // Could be used to temporary skip enter press handler (for ex. when child modal is opened)
|
|
149
|
-
var _useState27 = useState(false),
|
|
150
|
-
_useState28 = _slicedToArray(_useState27, 2),
|
|
151
|
-
stopEscapeKeyCancelation = _useState28[0],
|
|
152
|
-
setStopEscapeKeyCancelation = _useState28[1]; // Could be used to temporary skip enter press handler (for ex. when child modal is opened)
|
|
153
|
-
var onDoneBtnRef = /*#__PURE__*/createRef();
|
|
154
|
-
var isPrimaryBtnDisabled = isPrimaryButtonDisabled || isModalLoading;
|
|
155
|
-
var isExtraBtnDisabled = isExtraButtonDisabled || isModalLoading;
|
|
156
|
-
var handleCancellation = function handleCancellation() {
|
|
157
|
-
if (isModalLoading) {
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
if (transition["default"] && transition.contentChanged === false) {
|
|
161
|
-
updateTransition({
|
|
162
|
-
"default": true,
|
|
163
|
-
contentChanged: null
|
|
164
|
-
});
|
|
165
|
-
} else {
|
|
166
|
-
_isMounted = false;
|
|
167
|
-
updateTransition({
|
|
168
|
-
"default": null,
|
|
169
|
-
contentChanged: null
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
if (higherLvlModal.isOpen && typeof higherLvlModal.cancelSubModal === 'function') {
|
|
173
|
-
higherLvlModal.cancelSubModal();
|
|
174
|
-
} else {
|
|
175
|
-
toggleModal(null);
|
|
176
|
-
}
|
|
177
|
-
setTimeout(onCancel, transitionTimeout);
|
|
178
|
-
};
|
|
179
|
-
var commonDataPassed = {
|
|
180
|
-
setIsModalLoading: setIsModalLoading,
|
|
181
|
-
setIsModalHidden: setIsModalHidden,
|
|
182
|
-
isModalLoading: isModalLoading,
|
|
183
|
-
setPrimaryButtonDisabled: setPrimaryButtonDisabled,
|
|
184
|
-
setSecondaryButtonDisabled: setSecondaryButtonDisabled,
|
|
185
|
-
setStopEnterKeySubmits: setStopEnterKeySubmits,
|
|
186
|
-
setStopEscapeKeyCancelation: setStopEscapeKeyCancelation,
|
|
187
|
-
updateData: updateData,
|
|
188
|
-
data: data,
|
|
189
|
-
setHigherLvlModal: setHigherLvlModalProps,
|
|
190
|
-
closeModal: handleCancellation,
|
|
191
|
-
setShowExtraButton: setShowExtraButton,
|
|
192
|
-
setPrimaryButtonLabel: setPrimaryButtonLabel,
|
|
193
|
-
setSecondaryButtonLabel: setSecondaryButtonLabel,
|
|
194
|
-
setIsHiddenSecondaryButton: setIsHiddenSecondaryButton,
|
|
195
|
-
modalContentRef: modalContentRef
|
|
196
|
-
};
|
|
197
|
-
var handleButtonPrimaryClick = function handleButtonPrimaryClick() {
|
|
198
|
-
if (isPrimaryBtnDisabled) {
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
if (typeof onButtonPrimaryClick === 'function') {
|
|
202
|
-
// OLD => onButtonPrimaryClick(handleCancellation, setIsLoading, folderName)
|
|
203
|
-
onButtonPrimaryClick(commonDataPassed);
|
|
204
|
-
}
|
|
205
|
-
if (!disableAutoClose) {
|
|
206
|
-
handleCancellation();
|
|
207
|
-
}
|
|
208
|
-
};
|
|
209
|
-
var handleExtraButtonClick = function handleExtraButtonClick() {
|
|
210
|
-
if (isExtraBtnDisabled) {
|
|
211
|
-
return;
|
|
212
|
-
}
|
|
213
|
-
onExtraButtonClick(commonDataPassed);
|
|
214
|
-
};
|
|
215
|
-
var handleKeyUp = function handleKeyUp(e) {
|
|
216
|
-
if (enterKeySubmits && !stopEnterKeySubmits && e.keyCode === 13 && !isModalLoading) {
|
|
217
|
-
ignoreEvent(e);
|
|
218
|
-
handleButtonPrimaryClick();
|
|
219
|
-
} else if (e.keyCode === 27 && !stopEscapeKeyCancelation) {
|
|
220
|
-
ignoreEvent(e);
|
|
221
|
-
handleCancellation();
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
var cancelSubModal = function cancelSubModal() {
|
|
225
|
-
if (higherLevelModalData !== null && higherLevelModalData !== void 0 && higherLevelModalData.isOpen) {
|
|
226
|
-
toggleSubModal();
|
|
227
|
-
}
|
|
228
|
-
if (upperLvlModal !== null && upperLvlModal !== void 0 && upperLvlModal.isOpen) {
|
|
229
|
-
setHigherLvlModalProps(initialHigherLvlModalProps);
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
useEffect(function () {
|
|
233
|
-
_isMounted = true;
|
|
234
|
-
return function () {
|
|
235
|
-
_isMounted = false;
|
|
236
|
-
};
|
|
237
|
-
}, []);
|
|
238
|
-
var handleButtonSecondaryClick = function handleButtonSecondaryClick() {
|
|
239
|
-
if (isModalLoading || isSecondaryButtonDisabled) {
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
if (typeof onButtonSecondaryClick === 'function') {
|
|
243
|
-
onButtonSecondaryClick(commonDataPassed);
|
|
244
|
-
return;
|
|
245
|
-
}
|
|
246
|
-
handleCancellation();
|
|
247
|
-
};
|
|
248
|
-
useEffect(function () {
|
|
249
|
-
var inputToFocus = document.querySelector("#".concat(inputIdToFocus));
|
|
250
|
-
if (inputToFocus) {
|
|
251
|
-
inputToFocus.focus();
|
|
252
|
-
} else if (onDoneBtnRef !== null && onDoneBtnRef !== void 0 && onDoneBtnRef.current) {
|
|
253
|
-
onDoneBtnRef.current.focus();
|
|
254
|
-
}
|
|
255
|
-
}, [onDoneBtnRef, inputIdToFocus]);
|
|
256
|
-
|
|
257
|
-
// Reset the state of the modal once isOpen changes as it will be changed only on opening/closing.
|
|
258
|
-
// Or on changing content as we might open a modal after closing another one directly that isOpen state might not changed
|
|
259
|
-
// hence content would be reset the state if the content changed to use some of thew new modal's state options.
|
|
260
|
-
useEffect(function () {
|
|
261
|
-
if (isOpen === false) updateData({});
|
|
262
|
-
setHigherLvlModalProps(initialHigherLvlModalProps);
|
|
263
|
-
updateTransition({
|
|
264
|
-
"default": null,
|
|
265
|
-
contentChanged: null
|
|
266
|
-
});
|
|
267
|
-
setIsModalLoading(false);
|
|
268
|
-
setIsModalHidden(false);
|
|
269
|
-
setPrimaryButtonDisabled(disablePrimaryButton);
|
|
270
|
-
setSecondaryButtonDisabled(false);
|
|
271
|
-
setExtraButtonDisabled(disableExtraButton);
|
|
272
|
-
setPrimaryButtonLabel(originalPrimaryButtonLabel || '');
|
|
273
|
-
setSecondaryButtonLabel(secondaryPrimaryButtonLabel || '');
|
|
274
|
-
setShowExtraButton(showExtraButton);
|
|
275
|
-
setIsHiddenSecondaryButton(hideSecondaryButton);
|
|
276
|
-
}, [isOpen, content]);
|
|
277
|
-
useEffect(function () {
|
|
278
|
-
if (_isMounted && transition["default"] && !transition.contentChanged) {
|
|
279
|
-
updateTransition({
|
|
280
|
-
"default": true,
|
|
281
|
-
contentChanged: true
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
}, [content]);
|
|
285
|
-
useEffect(function () {
|
|
286
|
-
if (_isMounted) {
|
|
287
|
-
if (!transition["default"]) {
|
|
288
|
-
updateTransition({
|
|
289
|
-
"default": true,
|
|
290
|
-
contentChanged: null
|
|
291
|
-
});
|
|
292
|
-
} else if (transition.contentChanged) {
|
|
293
|
-
setTimeout(function () {
|
|
294
|
-
updateTransition({
|
|
295
|
-
"default": true,
|
|
296
|
-
contentChanged: false
|
|
297
|
-
});
|
|
298
|
-
}, transitionTimeout);
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
}, [transition]);
|
|
302
|
-
var nextHigherLvlModal = higherLvlModalProps !== null && higherLvlModalProps !== void 0 && higherLvlModalProps.isOpen ? higherLvlModalProps : higherLevelModalData;
|
|
303
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
304
|
-
children: [/*#__PURE__*/_jsx(Styled.ExplorerModal, {
|
|
305
|
-
tabIndex: -1,
|
|
306
|
-
fullWidth: fullWidth
|
|
307
|
-
// TODO: If `isOpen` works, then we should drop the transition code.
|
|
308
|
-
,
|
|
309
|
-
showModal: transition["default"]
|
|
310
|
-
// open={transition.default}
|
|
311
|
-
,
|
|
312
|
-
open: isOpen && !isModalHidden,
|
|
313
|
-
onKeyUp: handleKeyUp,
|
|
314
|
-
onClose: handleCancellation,
|
|
315
|
-
style: modalStyle,
|
|
316
|
-
disableOverlayClick: disableOverlayClick,
|
|
317
|
-
fullScreenMediaQuery: fullScreenMediaQuery,
|
|
318
|
-
modalStyles: _objectSpread({
|
|
319
|
-
zIndex: 1111111
|
|
320
|
-
}, rootModalStyles),
|
|
321
|
-
children: isOpen ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
322
|
-
children: [/*#__PURE__*/_jsx(Styled.ExplorerModalHeader, {
|
|
323
|
-
icon: icon,
|
|
324
|
-
iconShadow: true,
|
|
325
|
-
primary: title,
|
|
326
|
-
secondary: secondaryTitle,
|
|
327
|
-
variant: "with-icon",
|
|
328
|
-
modalIconStyle: modalIconStyle,
|
|
329
|
-
modalCrossButtonStyle: modalCrossButtonStyle,
|
|
330
|
-
primaryTitleStyle: primaryTitleStyle,
|
|
331
|
-
onClose: handleCancellation,
|
|
332
|
-
style: modalHeaderStyle,
|
|
333
|
-
bottomBorder: modalHeaderBottomBorder
|
|
334
|
-
}), /*#__PURE__*/_jsx(Styled.ModalBody, {
|
|
335
|
-
showModal: transition["default"],
|
|
336
|
-
isTransitionChanged: transition.contentChanged,
|
|
337
|
-
style: modalBodyStyle,
|
|
338
|
-
ref: modalContentRef,
|
|
339
|
-
children: content && /*#__PURE__*/_jsx(Styled.ModalBodyContent, {
|
|
340
|
-
style: contentStyle,
|
|
341
|
-
children: typeof content === 'function' ? content(commonDataPassed) : content
|
|
342
|
-
})
|
|
343
|
-
}), /*#__PURE__*/_jsxs(Styled.ModalFooter, {
|
|
344
|
-
$inlineActionButtons: inlineActionButtons,
|
|
345
|
-
style: modalFooterStyle,
|
|
346
|
-
borderTop: modalFooterTopBorder,
|
|
347
|
-
children: [isShowExtraButton && /*#__PURE__*/_jsx(Styled.ModalButtons, {
|
|
348
|
-
style: modalExtraButtonStyle,
|
|
349
|
-
color: extraButtonColor,
|
|
350
|
-
onClick: handleExtraButtonClick,
|
|
351
|
-
$fullWidth: fullWidthButtons,
|
|
352
|
-
disabled: isExtraBtnDisabled,
|
|
353
|
-
children: extraButtonLabel
|
|
354
|
-
}), !isHiddenSecondaryButton && /*#__PURE__*/_jsx(Styled.ModalButtons, {
|
|
355
|
-
style: modalSecondaryButton,
|
|
356
|
-
color: modalSecondaryButtonColor,
|
|
357
|
-
onClick: handleButtonSecondaryClick,
|
|
358
|
-
$fullWidth: fullWidthButtons,
|
|
359
|
-
startIcon: buttonSecondaryIcon,
|
|
360
|
-
disabled: isExtraButtonDisabled || isModalLoading,
|
|
361
|
-
"data-testid": "modal-secondary-button",
|
|
362
|
-
children: secondaryButtonLabel || i18n('mutualizedCancelButtonLabel')
|
|
363
|
-
}), !hidePrimaryButton && /*#__PURE__*/_jsx(Styled.ModalButtons, {
|
|
364
|
-
color: modalPrimaryButtonColor,
|
|
365
|
-
style: modalPrimaryButton,
|
|
366
|
-
onClick: handleButtonPrimaryClick,
|
|
367
|
-
loading: isModalLoading,
|
|
368
|
-
$warningPrimaryButton: warningPrimaryButton,
|
|
369
|
-
$fullWidth: fullWidthButtons,
|
|
370
|
-
disabled: isPrimaryBtnDisabled,
|
|
371
|
-
startIcon: buttonPrimaryIcon,
|
|
372
|
-
"data-testid": "modal-primary-button",
|
|
373
|
-
children: primaryButtonLabel || i18n('mutualizedConfirmButtonLabel')
|
|
374
|
-
})]
|
|
375
|
-
})]
|
|
376
|
-
})
|
|
377
|
-
// : '' for avoiding issue in console that children of the lib's modal is required.
|
|
378
|
-
: ''
|
|
379
|
-
}), (nextHigherLvlModal === null || nextHigherLvlModal === void 0 ? void 0 : nextHigherLvlModal.isOpen) && /*#__PURE__*/_jsx(_Modals, {
|
|
380
|
-
upperLvlModal: _objectSpread({
|
|
381
|
-
cancelSubModal: cancelSubModal
|
|
382
|
-
}, nextHigherLvlModal)
|
|
383
|
-
})]
|
|
384
|
-
});
|
|
385
|
-
};
|
|
386
|
-
export default _Modals;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
|
3
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
9
|
-
import { FV, PC } from '@scaleflex/widget-common';
|
|
10
|
-
import { Button, Modal, ModalActions, ModalContent, ModalTitle } from '@scaleflex/ui/core';
|
|
11
|
-
import styled, { css } from 'styled-components';
|
|
12
|
-
var ExplorerModal = styled(Modal)(function (_ref) {
|
|
13
|
-
var palette = _ref.theme.palette,
|
|
14
|
-
fullScreenMediaQuery = _ref.fullScreenMediaQuery;
|
|
15
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n max-width: 350px;\n border-radius: 4px;\n\n .SfxModal-root {\n height: 100%;\n }\n\n ", "\n"])), fullScreenMediaQuery && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n @media (max-width: ", "px) {\n width: 100vw !important;\n height: 100vh !important;\n }\n "])), fullScreenMediaQuery));
|
|
16
|
-
});
|
|
17
|
-
var ExplorerModalHeader = styled(ModalTitle)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex-shrink: 0;\n\n ", "\n\n .SfxModalTitle-Icon {\n padding: 14.5px;\n ", ";\n }\n\n .SfxCrossButton-root{\n ", ";\n }\n\n .SfxModalTitle-LabelSecondary {\n color: ", ";\n ", ";\n text-align: center;\n }\n\n .SfxModalTitle-LabelPrimary {\n ", ";\n border: none;\n }\n"])), function (_ref2) {
|
|
18
|
-
var bottomBorder = _ref2.bottomBorder;
|
|
19
|
-
return bottomBorder && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-bottom: 1px solid ", ";\n "])), function (_ref3) {
|
|
20
|
-
var palette = _ref3.theme.palette;
|
|
21
|
-
return palette[PC.BordersSecondary];
|
|
22
|
-
});
|
|
23
|
-
}, function (_ref4) {
|
|
24
|
-
var _ref4$modalIconStyle = _ref4.modalIconStyle,
|
|
25
|
-
modalIconStyle = _ref4$modalIconStyle === void 0 ? {} : _ref4$modalIconStyle;
|
|
26
|
-
return _objectSpread({}, modalIconStyle);
|
|
27
|
-
}, function (_ref5) {
|
|
28
|
-
var _ref5$modalCrossButto = _ref5.modalCrossButtonStyle,
|
|
29
|
-
modalCrossButtonStyle = _ref5$modalCrossButto === void 0 ? {} : _ref5$modalCrossButto;
|
|
30
|
-
return _objectSpread({}, modalCrossButtonStyle);
|
|
31
|
-
}, function (_ref6) {
|
|
32
|
-
var palette = _ref6.theme.palette;
|
|
33
|
-
return palette[PC.TextSecondary];
|
|
34
|
-
}, function (_ref7) {
|
|
35
|
-
var typography = _ref7.theme.typography;
|
|
36
|
-
return typography.font[FV.LabelMedium];
|
|
37
|
-
}, function (_ref8) {
|
|
38
|
-
var _ref8$primaryTitleSty = _ref8.primaryTitleStyle,
|
|
39
|
-
primaryTitleStyle = _ref8$primaryTitleSty === void 0 ? {} : _ref8$primaryTitleSty;
|
|
40
|
-
return _objectSpread({}, primaryTitleStyle);
|
|
41
|
-
});
|
|
42
|
-
var ModalBody = styled(ModalContent)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding: 12px 24px;\n overflow-y: auto;\n"])));
|
|
43
|
-
var ModalFooter = styled(ModalActions)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n\n display: flex;\n flex-direction: ", ";\n padding: 12px 24px 24px 24px;\n gap: 12px;\n flex-shrink: 0;\n width: 100%;\n\n & *:not(:first-child) {\n margin-left: 0;\n }\n"])), function (_ref9) {
|
|
44
|
-
var borderTop = _ref9.borderTop;
|
|
45
|
-
return borderTop && css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n border-top: 1px solid ", ";\n "])), function (_ref10) {
|
|
46
|
-
var palette = _ref10.theme.palette;
|
|
47
|
-
return palette[PC.BordersSecondary];
|
|
48
|
-
});
|
|
49
|
-
}, function (_ref11) {
|
|
50
|
-
var $inlineActionButtons = _ref11.$inlineActionButtons;
|
|
51
|
-
return $inlineActionButtons ? 'row' : 'column';
|
|
52
|
-
});
|
|
53
|
-
var ModalButtons = styled(Button)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n justify-content: center;\n padding: 10px 16px;\n height: 40px;\n white-space: nowrap;\n width: ", ";\n\n ", "\n"])), function (_ref12) {
|
|
54
|
-
var $fullWidth = _ref12.$fullWidth;
|
|
55
|
-
return $fullWidth ? '100%' : 'auto';
|
|
56
|
-
}, function (_ref13) {
|
|
57
|
-
var $warningPrimaryButton = _ref13.$warningPrimaryButton;
|
|
58
|
-
return $warningPrimaryButton && css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n background-color: ", ";\n\n &:hover, &:active {\n background-color: ", ";\n }\n "])), function (_ref14) {
|
|
59
|
-
var palette = _ref14.theme.palette;
|
|
60
|
-
return palette[PC.Warning];
|
|
61
|
-
}, function (_ref15) {
|
|
62
|
-
var palette = _ref15.theme.palette;
|
|
63
|
-
return palette[PC.Warning];
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
var OptionsWrapper = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n text-align: left;\n"])));
|
|
67
|
-
var ModalBodyContent = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n word-break: break-word;\n ", ";\n"])), function (_ref16) {
|
|
68
|
-
var typography = _ref16.theme.typography;
|
|
69
|
-
return typography.font[FV.TextLarge];
|
|
70
|
-
});
|
|
71
|
-
var Styled = {
|
|
72
|
-
ExplorerModal: ExplorerModal,
|
|
73
|
-
ExplorerModalHeader: ExplorerModalHeader,
|
|
74
|
-
ModalBody: ModalBody,
|
|
75
|
-
ModalBodyContent: ModalBodyContent,
|
|
76
|
-
ModalFooter: ModalFooter,
|
|
77
|
-
ModalButtons: ModalButtons,
|
|
78
|
-
OptionsWrapper: OptionsWrapper
|
|
79
|
-
};
|
|
80
|
-
export default Styled;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { useCallback } from 'react';
|
|
2
|
-
import { useDispatch } from 'react-redux';
|
|
3
|
-
import { FolderMoveTo } from '@scaleflex/icons';
|
|
4
|
-
import { useModal } from '@scaleflex/widget-core/lib/hooks';
|
|
5
|
-
import { useTheme } from '@scaleflex/ui/theme/hooks';
|
|
6
|
-
import { PC } from '@scaleflex/widget-common';
|
|
7
|
-
import handlePromise from '@scaleflex/widget-utils/lib/handlePromise';
|
|
8
|
-
import FolderSelector from '../../common/FolderSelector';
|
|
9
|
-
import { useExplorerI18n, useExplorerInformer } from '../../../hooks';
|
|
10
|
-
import { moveItems } from '../../../thunks/items.thunks';
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
export var useMoveItemsModal = function useMoveItemsModal() {
|
|
13
|
-
var dispatch = useDispatch();
|
|
14
|
-
var toggleModal = useModal();
|
|
15
|
-
var i18n = useExplorerI18n();
|
|
16
|
-
var info = useExplorerInformer();
|
|
17
|
-
var theme = useTheme();
|
|
18
|
-
var triggerMoveItemsModal = useCallback(function (_ref) {
|
|
19
|
-
var _ref$foldersUuids = _ref.foldersUuids,
|
|
20
|
-
foldersUuids = _ref$foldersUuids === void 0 ? [] : _ref$foldersUuids,
|
|
21
|
-
_ref$filesUuids = _ref.filesUuids,
|
|
22
|
-
filesUuids = _ref$filesUuids === void 0 ? [] : _ref$filesUuids;
|
|
23
|
-
var moveItemsHandler = function moveItemsHandler(_ref2) {
|
|
24
|
-
var closeModal = _ref2.closeModal,
|
|
25
|
-
setIsModalLoading = _ref2.setIsModalLoading,
|
|
26
|
-
selectedFolder = _ref2.data;
|
|
27
|
-
setIsModalLoading(true);
|
|
28
|
-
handlePromise(dispatch(moveItems({
|
|
29
|
-
foldersUuids: foldersUuids,
|
|
30
|
-
filesUuids: filesUuids,
|
|
31
|
-
toFolder: selectedFolder
|
|
32
|
-
})), function () {
|
|
33
|
-
setIsModalLoading(false);
|
|
34
|
-
closeModal();
|
|
35
|
-
info(i18n('explorerMovedSuccessfullyInfo'), 'success');
|
|
36
|
-
}, function (error) {
|
|
37
|
-
setIsModalLoading(false);
|
|
38
|
-
closeModal();
|
|
39
|
-
if (error === 'SAME_PATH') {
|
|
40
|
-
info(i18n('explorerMovedAlreadyExistsInfo', {
|
|
41
|
-
smart_count: 0
|
|
42
|
-
}), 'warning');
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
toggleModal({
|
|
47
|
-
icon: /*#__PURE__*/_jsx(FolderMoveTo, {
|
|
48
|
-
size: 29,
|
|
49
|
-
color: theme.palette[PC.AccentPrimary]
|
|
50
|
-
}),
|
|
51
|
-
title: i18n('explorerMoveItemsToTitle'),
|
|
52
|
-
showTitleLabel: true,
|
|
53
|
-
disableAutoClose: true,
|
|
54
|
-
content: function content(_ref3) {
|
|
55
|
-
var setPrimaryButtonDisabled = _ref3.setPrimaryButtonDisabled,
|
|
56
|
-
data = _ref3.data,
|
|
57
|
-
updateData = _ref3.updateData;
|
|
58
|
-
return /*#__PURE__*/_jsx(FolderSelector, {
|
|
59
|
-
notSelectableFolderUuids: foldersUuids,
|
|
60
|
-
setPrimaryButtonDisabled: setPrimaryButtonDisabled,
|
|
61
|
-
selectedFolder: data,
|
|
62
|
-
onSelect: updateData,
|
|
63
|
-
onRemoveSelectedFolder: function onRemoveSelectedFolder() {
|
|
64
|
-
return updateData(null);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
},
|
|
68
|
-
buttonPrimaryLabel: i18n('explorerMoveLabel'),
|
|
69
|
-
onButtonPrimaryClick: moveItemsHandler,
|
|
70
|
-
enterKeySubmits: true,
|
|
71
|
-
modalStyle: {
|
|
72
|
-
maxWidth: 400
|
|
73
|
-
},
|
|
74
|
-
modalFooterStyle: {
|
|
75
|
-
flexDirection: 'row'
|
|
76
|
-
},
|
|
77
|
-
modalPrimaryButton: {
|
|
78
|
-
width: 170
|
|
79
|
-
},
|
|
80
|
-
modalSecondaryButton: {
|
|
81
|
-
width: 170
|
|
82
|
-
},
|
|
83
|
-
modalSecondaryButtonColor: 'basic',
|
|
84
|
-
disablePrimaryButton: true
|
|
85
|
-
});
|
|
86
|
-
}, [i18n]);
|
|
87
|
-
return triggerMoveItemsModal;
|
|
88
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useMoveItemsModal } from './MoveItems.hooks';
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
|
-
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."); }
|
|
3
|
-
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; } }
|
|
4
|
-
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; }
|
|
5
|
-
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; } }
|
|
6
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
-
import { useState, useEffect } from 'react';
|
|
8
|
-
import { NoPage } from '@scaleflex/icons';
|
|
9
|
-
import { Popper } from '@scaleflex/ui/core';
|
|
10
|
-
import { useExplorer } from '../../../hooks';
|
|
11
|
-
import Styled from './TransformedDownload.styled';
|
|
12
|
-
import ImageOptions from '../../CropPanel/ImageOptions';
|
|
13
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
-
function PdfModalContent(_ref) {
|
|
15
|
-
var _modalContentRef$curr;
|
|
16
|
-
var selections = _ref.selections,
|
|
17
|
-
hideResize = _ref.hideResize,
|
|
18
|
-
setPrimaryButtonDisabled = _ref.setPrimaryButtonDisabled,
|
|
19
|
-
onDownloadConsentChange = _ref.onDownloadConsentChange,
|
|
20
|
-
updateTransformations = _ref.updateTransformations,
|
|
21
|
-
modalContentRef = _ref.modalContentRef;
|
|
22
|
-
var defaultPage = 1;
|
|
23
|
-
var _useExplorer = useExplorer(),
|
|
24
|
-
i18n = _useExplorer.i18n;
|
|
25
|
-
var _useState = useState(false),
|
|
26
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
-
error = _useState2[0],
|
|
28
|
-
setError = _useState2[1];
|
|
29
|
-
var _useState3 = useState(),
|
|
30
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
31
|
-
notFoundPage = _useState4[0],
|
|
32
|
-
setNotFoundPage = _useState4[1];
|
|
33
|
-
var _useState5 = useState('pdf'),
|
|
34
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
35
|
-
pdfOptionsFormat = _useState6[0],
|
|
36
|
-
setPdfOptionsFormat = _useState6[1];
|
|
37
|
-
var _useState7 = useState(false),
|
|
38
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
39
|
-
isPdfModalPageError = _useState8[0],
|
|
40
|
-
setIsPdfModalPageError = _useState8[1];
|
|
41
|
-
var _useState9 = useState(true),
|
|
42
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
43
|
-
isPdfPageLoaded = _useState10[0],
|
|
44
|
-
setIsPdfPageLoaded = _useState10[1];
|
|
45
|
-
var _useState11 = useState(defaultPage),
|
|
46
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
47
|
-
currentPdfPage = _useState12[0],
|
|
48
|
-
setCurrentPdfPage = _useState12[1];
|
|
49
|
-
var isError = error || +currentPdfPage >= +notFoundPage;
|
|
50
|
-
var imageClass = isError ? 'filerobot-Explorer-pdf-Modal-error-image' : '';
|
|
51
|
-
var isNotPdfFormatSelected = pdfOptionsFormat !== 'pdf';
|
|
52
|
-
var imageSrc = selections[0].url.cdn.replace('proxy', "&force_format=webp,jpeg&doc_page=".concat(currentPdfPage, "&bypass_process_proxy=1"));
|
|
53
|
-
var handleError = function handleError() {
|
|
54
|
-
setIsPdfModalPageError(true);
|
|
55
|
-
setPrimaryButtonDisabled(true);
|
|
56
|
-
setNotFoundPage(currentPdfPage);
|
|
57
|
-
setError(true);
|
|
58
|
-
};
|
|
59
|
-
var handleLoadedImage = function handleLoadedImage() {
|
|
60
|
-
setIsPdfPageLoaded(true);
|
|
61
|
-
};
|
|
62
|
-
useEffect(function () {
|
|
63
|
-
if (+currentPdfPage >= +notFoundPage) {
|
|
64
|
-
setIsPdfModalPageError(true);
|
|
65
|
-
setError(true);
|
|
66
|
-
setPrimaryButtonDisabled(true);
|
|
67
|
-
} else {
|
|
68
|
-
setIsPdfModalPageError(false);
|
|
69
|
-
setError(false);
|
|
70
|
-
setPrimaryButtonDisabled(false);
|
|
71
|
-
}
|
|
72
|
-
}, [currentPdfPage]);
|
|
73
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
74
|
-
children: [/*#__PURE__*/_jsx(Popper, {
|
|
75
|
-
anchorEl: (_modalContentRef$curr = modalContentRef.current) === null || _modalContentRef$curr === void 0 ? void 0 : _modalContentRef$curr.parentNode,
|
|
76
|
-
position: "right-start",
|
|
77
|
-
open: isNotPdfFormatSelected,
|
|
78
|
-
children: /*#__PURE__*/_jsxs(Styled.PreviewWrapper, {
|
|
79
|
-
children: [isError ? /*#__PURE__*/_jsxs(Styled.PreviewError, {
|
|
80
|
-
children: [/*#__PURE__*/_jsx(NoPage, {
|
|
81
|
-
color: "#DFE7ED",
|
|
82
|
-
size: 80
|
|
83
|
-
}), /*#__PURE__*/_jsx(Styled.PreviewErrorLabel, {
|
|
84
|
-
children: i18n('pdfModelContentPageNotFoundText')
|
|
85
|
-
})]
|
|
86
|
-
}) : /*#__PURE__*/_jsx(Styled.PreviewImage, {
|
|
87
|
-
isPdfPageLoaded: isPdfPageLoaded,
|
|
88
|
-
className: imageClass,
|
|
89
|
-
src: imageSrc,
|
|
90
|
-
alt: "Pdf image",
|
|
91
|
-
onLoad: handleLoadedImage,
|
|
92
|
-
onError: handleError
|
|
93
|
-
}), !isPdfPageLoaded && !isError && /*#__PURE__*/_jsx(Styled.PreviewSkeleton, {})]
|
|
94
|
-
})
|
|
95
|
-
}), /*#__PURE__*/_jsx(ImageOptions, {
|
|
96
|
-
hideResize: hideResize,
|
|
97
|
-
selections: selections,
|
|
98
|
-
setPdfOptionsFormat: setPdfOptionsFormat,
|
|
99
|
-
setPrimaryButtonDisabled: setPrimaryButtonDisabled,
|
|
100
|
-
isPdfModalPageError: isPdfModalPageError,
|
|
101
|
-
setCurrentPdfPage: setCurrentPdfPage,
|
|
102
|
-
setIsPdfPageLoaded: setIsPdfPageLoaded,
|
|
103
|
-
onDownloadConsentChange: onDownloadConsentChange,
|
|
104
|
-
updateTransformations: updateTransformations,
|
|
105
|
-
noImageSizeLabel: true
|
|
106
|
-
})]
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
export default PdfModalContent;
|