@scaleflex/widget-explorer 4.4.0 → 4.5.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 +11 -0
- package/dist/style.css +2197 -0
- package/dist/style.min.css +1 -0
- package/lib/Explorer.styled.js +48 -0
- package/lib/components/ActionBar/ActionBar.styled.js +103 -0
- package/lib/components/ActionBar/DownloadWithExportButton.js +203 -0
- package/lib/components/ActionBar/SelectionMenu.js +111 -0
- package/lib/components/ActionBar/index.js +105 -0
- package/lib/components/AddFilesPanel/AddFiles.js +183 -0
- package/lib/components/AddFilesPanel/AddFiles.styled.js +137 -0
- package/lib/components/AddFilesPanel/index.js +59 -0
- package/lib/components/AiSwitcher/AiSwitcher.constants.js +1 -0
- package/lib/components/AiSwitcher/AiSwitcher.styled.js +24 -0
- package/lib/components/AiSwitcher/index.js +81 -0
- package/lib/components/AssetsList/AssetsList.styled.js +217 -0
- package/lib/components/AssetsList/GridView/FilesAccordion.js +76 -0
- package/lib/components/AssetsList/GridView/FilesSection/FileCell.js +260 -0
- package/lib/components/AssetsList/GridView/FilesSection/FileOverlayOptions.js +140 -0
- package/lib/components/AssetsList/GridView/FilesSection/FilesSection.styled.js +15 -0
- package/lib/components/AssetsList/GridView/FilesSection/index.js +31 -0
- package/lib/components/AssetsList/GridView/FilesSkeleton.js +47 -0
- package/lib/components/AssetsList/GridView/FoldersSection/FolderCell.js +239 -0
- package/lib/components/AssetsList/GridView/FoldersSection/FolderPreviewGrid.js +106 -0
- package/lib/components/AssetsList/GridView/FoldersSection/FolderTopOptions.js +70 -0
- package/lib/components/AssetsList/GridView/FoldersSection/index.js +23 -0
- package/lib/components/AssetsList/GridView/FoldersSkeleton.js +77 -0
- package/lib/components/AssetsList/GridView/GridView.styled.js +11 -0
- package/lib/components/AssetsList/GridView/SearchGridView/SearchGridView.styled.js +15 -0
- package/lib/components/AssetsList/GridView/SearchGridView/SearchGridViewSkeleton.js +30 -0
- package/lib/components/AssetsList/GridView/SearchGridView/index.js +97 -0
- package/lib/components/AssetsList/GridView/index.js +196 -0
- package/lib/components/AssetsList/ListView/AssetsSection/AssetsSectionTableHeader.js +152 -0
- package/lib/components/AssetsList/ListView/AssetsSection/AssetsSectionTableRow.js +333 -0
- package/lib/components/AssetsList/ListView/AssetsSection/index.js +99 -0
- package/lib/components/AssetsList/ListView/ColumnsMenu.js +89 -0
- package/lib/components/AssetsList/ListView/FilesAccordion.js +74 -0
- package/lib/components/AssetsList/ListView/FilesSkeleton.js +68 -0
- package/lib/components/AssetsList/ListView/FoldersSection/FoldersSectionTableHeader.js +98 -0
- package/lib/components/AssetsList/ListView/FoldersSection/FoldersSectionTableRow.js +156 -0
- package/lib/components/AssetsList/ListView/FoldersSection/index.js +54 -0
- package/lib/components/AssetsList/ListView/FoldersSkeleton.js +67 -0
- package/lib/components/AssetsList/ListView/ListView.styled.js +181 -0
- package/lib/components/AssetsList/ListView/ListView.utils.js +30 -0
- package/lib/components/AssetsList/ListView/SearchListView/index.js +109 -0
- package/lib/components/AssetsList/ListView/index.js +203 -0
- package/lib/components/AssetsList/ScrollToTop.js +70 -0
- package/lib/components/AssetsList/SearchView.hook.js +241 -0
- package/lib/components/AssetsList/__SearchTestPannel.js +238 -0
- package/lib/components/AssetsList/__SearchTestPannel.mock.js +1 -0
- package/lib/components/AssetsList/index.js +266 -0
- package/lib/components/AssetsList/relevanceBadge.js +15 -0
- package/lib/components/AssetsView/AssetsView.styled.js +25 -0
- package/lib/components/AssetsView/AssetsView.thunks.js +64 -0
- package/lib/components/AssetsView/index.js +142 -0
- package/lib/components/AuthExplorerView.js +79 -0
- package/lib/components/Breadcrumbs/BreadCrumbViews/BreadCrumbsViews.styled.js +30 -0
- package/lib/components/Breadcrumbs/BreadCrumbViews/index.js +32 -0
- package/lib/components/Breadcrumbs/Breadcrumb.js +52 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.styled.js +81 -0
- package/lib/components/Breadcrumbs/BreadcrumbsSkeleton.js +12 -0
- package/lib/components/Breadcrumbs/index.js +187 -0
- package/lib/components/BulkEditPanel/BulkEdit.js +330 -0
- package/lib/components/BulkEditPanel/BulkEditPanel.styled.js +62 -0
- package/lib/components/BulkEditPanel/BulkEditPanel.utils.js +55 -0
- package/lib/components/BulkEditPanel/components/AssetsList/AssetsList.constants.js +29 -0
- package/lib/components/BulkEditPanel/components/AssetsList/AssetsList.js +148 -0
- package/lib/components/BulkEditPanel/components/AssetsList/AssetsList.styled.js +81 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/Columns.styled.js +99 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/FileMetadataField.js +263 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/FileTagField.js +228 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/FileTextField.js +107 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/MetadataColumn.js +142 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/TableRow.js +139 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/TagsColumn.js +58 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/TagsField.js +80 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/TextColumn.js +53 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/columns.utils.js +272 -0
- package/lib/components/BulkEditPanel/components/AssetsList/Columns/getActiveColumn.js +23 -0
- package/lib/components/BulkEditPanel/components/AssetsList/FloatyPreview.js +55 -0
- package/lib/components/BulkEditPanel/components/AssetsList/FloatyPreview.styled.js +21 -0
- package/lib/components/BulkEditPanel/components/AssetsList/TableBody.js +64 -0
- package/lib/components/BulkEditPanel/components/AssetsList/TableHeader.js +67 -0
- package/lib/components/BulkEditPanel/components/BulkEditFooter.js +33 -0
- package/lib/components/BulkEditPanel/components/ConfirmationModal/ConfirmationModal.js +47 -0
- package/lib/components/BulkEditPanel/components/ConfirmationModal/ConfirmationModal.styled.js +25 -0
- package/lib/components/BulkEditPanel/components/MainContent/MainContent.js +110 -0
- package/lib/components/BulkEditPanel/components/MainContent/MainContent.styled.js +12 -0
- package/lib/components/BulkEditPanel/components/MainContent/index.js +2 -0
- package/lib/components/BulkEditPanel/components/Sidebar/Sidebar.styled.js +53 -0
- package/lib/components/BulkEditPanel/components/Sidebar/Sidebar.utils.js +28 -0
- package/lib/components/BulkEditPanel/components/Sidebar/index.js +158 -0
- package/lib/components/BulkEditPanel/components/Tabs/Metadata/Metadata.js +246 -0
- package/lib/components/BulkEditPanel/components/Tabs/Metadata/Metadata.styled.js +17 -0
- package/lib/components/BulkEditPanel/components/Tabs/Tags/Tags.js +222 -0
- package/lib/components/BulkEditPanel/components/Tabs/Tags/Tags.mixin.js +20 -0
- package/lib/components/BulkEditPanel/components/Tabs/Tags/Tags.styled.js +123 -0
- package/lib/components/BulkEditPanel/components/Tabs/Tags/TagsContianer.js +31 -0
- package/lib/components/BulkEditPanel/components/Tabs/Tags/TagsPaper.js +95 -0
- package/lib/components/BulkEditPanel/components/Tabs/Text/Text.js +167 -0
- package/lib/components/BulkEditPanel/components/Tabs/Text/Text.styled.js +15 -0
- package/lib/components/BulkEditPanel/components/Tabs/tabs.constants.js +113 -0
- package/lib/components/BulkEditPanel/components/Tabs/tabs.js +43 -0
- package/lib/components/BulkEditPanel/components/Tabs/tabs.utils.js +239 -0
- package/lib/components/BulkEditPanel/index.js +28 -0
- package/lib/components/ContextMenu/BeforeUploadMenu/index.js +51 -0
- package/lib/components/ContextMenu/ContextMenu.constants.js +64 -0
- package/lib/components/ContextMenu/ContextMenu.hooks.js +35 -0
- package/lib/components/ContextMenu/ContextMenu.styled.js +107 -0
- package/lib/components/ContextMenu/ContextMenuContent.js +202 -0
- package/lib/components/ContextMenu/ContextMenuItem.js +142 -0
- package/lib/components/ContextMenu/FileMenu/CollaborateSection/index.js +33 -0
- package/lib/components/ContextMenu/FileMenu/DeleteSection/index.js +25 -0
- package/lib/components/ContextMenu/FileMenu/EditSection/index.js +42 -0
- package/lib/components/ContextMenu/FileMenu/FindSection/index.js +29 -0
- package/lib/components/ContextMenu/FileMenu/index.js +15 -0
- package/lib/components/ContextMenu/FolderMenu/CollaborateSection/index.js +17 -0
- package/lib/components/ContextMenu/FolderMenu/DeleteSection/index.js +41 -0
- package/lib/components/ContextMenu/FolderMenu/EditSection/index.js +49 -0
- package/lib/components/ContextMenu/FolderMenu/FindSection/index.js +49 -0
- package/lib/components/ContextMenu/FolderMenu/FolderMenu.utils.js +31 -0
- package/lib/components/ContextMenu/FolderMenu/index.js +14 -0
- package/lib/components/ContextMenu/MenuOptions/AddVariationOption.js +59 -0
- package/lib/components/ContextMenu/MenuOptions/BulkEditOption.js +47 -0
- package/lib/components/ContextMenu/MenuOptions/CdnLinkOption.js +54 -0
- package/lib/components/ContextMenu/MenuOptions/DeleteOption.js +70 -0
- package/lib/components/ContextMenu/MenuOptions/DownloadOption.js +88 -0
- package/lib/components/ContextMenu/MenuOptions/EditImageOption.js +63 -0
- package/lib/components/ContextMenu/MenuOptions/EditVideoOption.js +87 -0
- package/lib/components/ContextMenu/MenuOptions/LocateFileOption.js +45 -0
- package/lib/components/ContextMenu/MenuOptions/ManagaAccessOption.js +67 -0
- package/lib/components/ContextMenu/MenuOptions/ManageDetailsOption.js +52 -0
- package/lib/components/ContextMenu/MenuOptions/MoveOption.js +54 -0
- package/lib/components/ContextMenu/MenuOptions/PreviewOption.js +35 -0
- package/lib/components/ContextMenu/MenuOptions/RenameOption.js +66 -0
- package/lib/components/ContextMenu/MenuOptions/TransformationOption.js +63 -0
- package/lib/components/ContextMenu/MultipleMenu/CollaborateSection/index.js +31 -0
- package/lib/components/ContextMenu/MultipleMenu/DeleteSection/index.js +6 -0
- package/lib/components/ContextMenu/MultipleMenu/EditSection/index.js +14 -0
- package/lib/components/ContextMenu/MultipleMenu/FindSection/index.js +14 -0
- package/lib/components/ContextMenu/MultipleMenu/index.js +14 -0
- package/lib/components/ContextMenu/SharedMenus/DownloadFolderSubMenu.js +36 -0
- package/lib/components/ContextMenu/SharedMenus/DownloadSubMenu.js +70 -0
- package/lib/components/ContextMenu/index.js +34 -0
- package/lib/components/ContextMenu/utils/calculateMenuHeight.js +20 -0
- package/lib/components/ContextMenu/utils/calculateMenuPosition.js +42 -0
- package/lib/components/ContextMenu/utils/createSeparator.js +14 -0
- package/lib/components/ContextMenu/utils/editMedia.js +17 -0
- package/lib/components/ContextMenu/utils/getFileLocation.js +8 -0
- package/lib/components/ContextMenu/utils/getFilteredOptions.js +20 -0
- package/lib/components/ContextMenu/utils/getProperFolderSelections.js +7 -0
- package/lib/components/ContextMenu/utils/isEmptyFolderSelection.js +5 -0
- package/lib/components/ContextMenu/utils/isFileContextMenu.js +5 -0
- package/lib/components/ContextMenu/utils/isFirstFileVisibilityPublic.js +9 -0
- package/lib/components/ContextMenu/utils/isMenuItemVisible.js +5 -0
- package/lib/components/ContextMenu/utils/isMixedFiles.js +9 -0
- package/lib/components/ContextMenu/utils/isMultipleSelection.js +6 -0
- package/lib/components/ContextMenu/utils/isSeparatorHidden.js +7 -0
- package/lib/components/ContextMenu/utils/triggerDownload.js +45 -0
- package/lib/components/CropPanel/CropOptions.js +155 -0
- package/lib/components/CropPanel/CropPanel.constants.js +44 -0
- package/lib/components/CropPanel/CropPanel.styled.js +107 -0
- package/lib/components/CropPanel/CropPanel.utils.js +48 -0
- package/lib/components/CropPanel/CropPanelContent.js +209 -0
- package/lib/components/CropPanel/ImageOptions.js +326 -0
- package/lib/components/CropPanel/ImageResize.js +207 -0
- package/lib/components/CropPanel/Option.js +113 -0
- package/lib/components/CropPanel/index.js +22 -0
- package/lib/components/Details/Details.constants.js +75 -0
- package/lib/components/Details/Details.utils.js +232 -0
- package/lib/components/Details/DetailsSideBar.styled.js +139 -0
- package/lib/components/Details/EditActionButtons/EditActionButtons.styled.js +27 -0
- package/lib/components/Details/EditActionButtons/index.js +38 -0
- package/lib/components/Details/FileDetails.js +31 -0
- package/lib/components/Details/FileItem/CustomMetadataTab.js +50 -0
- package/lib/components/Details/FileItem/FileItem.styled.js +47 -0
- package/lib/components/Details/FileItem/GeneralTab.js +113 -0
- package/lib/components/Details/FileItem/SharedFileEditData.js +97 -0
- package/lib/components/Details/FileItem/index.js +2 -0
- package/lib/components/Details/FolderDetails.js +138 -0
- package/lib/components/Details/FolderItemList/FolderListItem.js +77 -0
- package/lib/components/Details/FolderItemList/index.js +62 -0
- package/lib/components/Details/MultiItemsDetails.js +69 -0
- package/lib/components/Details/MultipleItems.js +71 -0
- package/lib/components/Details/TabChips.js +51 -0
- package/lib/components/Details/TabPanels.js +42 -0
- package/lib/components/Details/Title.js +52 -0
- package/lib/components/Details/index.js +53 -0
- package/lib/components/DnD/Dnd.styled.js +11 -0
- package/lib/components/DnD/DragImage.js +61 -0
- package/lib/components/DnD/index.js +219 -0
- package/lib/components/Drawer/Drawer.styled.js +45 -0
- package/lib/components/Drawer/Drawer.utils.js +163 -0
- package/lib/components/Drawer/Resizer.js +141 -0
- package/lib/components/Drawer/ResizerCore.js +213 -0
- package/lib/components/Drawer/index.js +68 -0
- package/lib/components/EmptyViewPlaceholder/EmptyViewPlaceholder.styled.js +39 -0
- package/lib/components/EmptyViewPlaceholder/index.js +58 -0
- package/lib/components/ExploreView.js +46 -0
- package/lib/components/ExplorerUI.js +17 -0
- package/lib/components/ExplorerWrapper.js +114 -0
- package/lib/components/FacetedSearch/DrawerBody/index.js +42 -0
- package/lib/components/FacetedSearch/DrawerWrapper/index.js +83 -0
- package/lib/components/FacetedSearch/FacetedSearch.constants.js +27 -0
- package/lib/components/FacetedSearch/FacetedSearch.styled.js +101 -0
- package/lib/components/FacetedSearch/FacetedSearch.utils.js +3 -0
- package/lib/components/FacetedSearch/Field/Date.js +69 -0
- package/lib/components/FacetedSearch/Field/Placeholder.js +20 -0
- package/lib/components/FacetedSearch/Field/Select.js +136 -0
- package/lib/components/FacetedSearch/Field/Switch.js +59 -0
- package/lib/components/FacetedSearch/Field/index.js +27 -0
- package/lib/components/FacetedSearch/GroupWrapper/index.js +129 -0
- package/lib/components/FacetedSearch/StaticFields/Date.js +152 -0
- package/lib/components/FacetedSearch/index.js +12 -0
- package/lib/components/FileItem/FileInfo/FileInfo.styled.js +126 -0
- package/lib/components/FileItem/FileInfo/FileInfo.utils.js +13 -0
- package/lib/components/FileItem/FileInfo/FileMetadata.js +37 -0
- package/lib/components/FileItem/FileInfo/FileName.js +197 -0
- package/lib/components/FileItem/FileInfo/index.js +194 -0
- package/lib/components/FileItem/FileItem.mixin.js +22 -0
- package/lib/components/FileItem/FileItem.styled.js +54 -0
- package/lib/components/FileItem/FileUploadTopOptions.js +87 -0
- package/lib/components/FileItem/PreUploadFileThumbnail/FileThumbnail.js +61 -0
- package/lib/components/FileItem/PreUploadFileThumbnail/PreUploadFileThumbnail.styled.js +8 -0
- package/lib/components/FileItem/PreUploadFileThumbnail/index.js +27 -0
- package/lib/components/FileItem/index.js +164 -0
- package/lib/components/FileWindowPanel/Body/ActionButtons.js +70 -0
- package/lib/components/FileWindowPanel/Body/Body.constants.js +5 -0
- package/lib/components/FileWindowPanel/Body/Body.styled.js +196 -0
- package/lib/components/FileWindowPanel/Body/BodyFile.js +165 -0
- package/lib/components/FileWindowPanel/Body/Footer.js +60 -0
- package/lib/components/FileWindowPanel/Body/Preview.js +232 -0
- package/lib/components/FileWindowPanel/Body/PreviewPlaceholder.js +20 -0
- package/lib/components/FileWindowPanel/Body/VideoEmbed.js +80 -0
- package/lib/components/FileWindowPanel/Body/index.js +108 -0
- package/lib/components/FileWindowPanel/FileTabs/FileTabButtons.js +98 -0
- package/lib/components/FileWindowPanel/FileTabs/FileTabs.constants.js +50 -0
- package/lib/components/FileWindowPanel/FileTabs/FileTabs.styled.js +99 -0
- package/lib/components/FileWindowPanel/FileTabs/FileTabsList.js +91 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/EditableField.js +78 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldLabel.js +40 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldRow.js +57 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldValue.js +20 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldWithTooltip.js +29 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralSection.js +183 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralTab.constants.js +2 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralTab.styled.js +112 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralTabSkeleton.js +70 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/TableSeparator.js +10 -0
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/index.js +100 -0
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/CustomMetadataSection.js +247 -0
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/EmbeddedMetadataSection.js +31 -0
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/MetadataTab.constants.js +2 -0
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/MetadataTab.styled.js +134 -0
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/MetadataTabSkeleton.js +70 -0
- package/lib/components/FileWindowPanel/FileTabs/MetadataTab/index.js +181 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationItem.js +78 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.constants.js +26 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.styled.js +177 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.thunks.js +99 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.utils.js +23 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsContent.js +92 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsEditModalContent.js +57 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsSearch.js +44 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsSkeleton.js +35 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTabNavigator.js +41 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTabs.js +40 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTopOptions.js +204 -0
- package/lib/components/FileWindowPanel/FileTabs/VariationsTab/index.js +603 -0
- package/lib/components/FileWindowPanel/FileTabs/index.js +83 -0
- package/lib/components/FileWindowPanel/FileWindow.js +221 -0
- package/lib/components/FileWindowPanel/FileWindow.styled.js +19 -0
- package/lib/components/FileWindowPanel/FileWindow.utils.js +38 -0
- package/lib/components/FileWindowPanel/Header/AfterUploadActionBtns.js +69 -0
- package/lib/components/FileWindowPanel/Header/BeforeUploadActionBtns.js +100 -0
- package/lib/components/FileWindowPanel/Header/FileWindowHeader.styled.js +56 -0
- package/lib/components/FileWindowPanel/Header/MutualActionBtns.js +92 -0
- package/lib/components/FileWindowPanel/Header/index.js +109 -0
- package/lib/components/FileWindowPanel/index.js +60 -0
- package/lib/components/Filters/Filters.constants.js +358 -0
- package/lib/components/Filters/Filters.styled.js +235 -0
- package/lib/components/Filters/Filters.utils.js +536 -0
- package/lib/components/Filters/FiltersContext.js +59 -0
- package/lib/components/Filters/FiltersSkeleton.js +14 -0
- package/lib/components/Filters/Groups/Date/index.js +201 -0
- package/lib/components/Filters/Groups/Folders/FoldersSkeleton.js +43 -0
- package/lib/components/Filters/Groups/Folders/index.js +109 -0
- package/lib/components/Filters/Groups/Image/Colors.js +73 -0
- package/lib/components/Filters/Groups/Image/Faces.js +64 -0
- package/lib/components/Filters/Groups/Image/Orientations.js +64 -0
- package/lib/components/Filters/Groups/Image/Resolutions.js +65 -0
- package/lib/components/Filters/Groups/Image/Tooltip.js +14 -0
- package/lib/components/Filters/Groups/Image/index.js +104 -0
- package/lib/components/Filters/Groups/LicenseExpiry/LicenseExpiry.styled.js +17 -0
- package/lib/components/Filters/Groups/LicenseExpiry/index.js +97 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/ConditionSelector.js +40 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/ExtraRow/ConditionSelector.js +35 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/ExtraRow/ValueSelector.js +33 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/ExtraRow/index.js +18 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/AutoComplete.js +56 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Boolean.js +35 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Date.js +36 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/GeoPointField.js +30 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Numeric.js +32 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Select.js +55 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Tags.js +21 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/Text.js +39 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Field/index.js +52 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/KeySelector.js +34 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/Row.js +53 -0
- package/lib/components/Filters/Groups/Metadata/Advanced/index.js +48 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Date.js +45 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Field.utils.js +58 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Numeric.js +51 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/OptionsPopup.js +87 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Select.js +168 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Switch.js +41 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Tags.js +38 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Text.js +57 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/Uri.js +54 -0
- package/lib/components/Filters/Groups/Metadata/Basic/Field/index.js +46 -0
- package/lib/components/Filters/Groups/Metadata/Basic/GroupWrapper.js +79 -0
- package/lib/components/Filters/Groups/Metadata/Basic/index.js +80 -0
- package/lib/components/Filters/Groups/Metadata/Metadata.constants.js +42 -0
- package/lib/components/Filters/Groups/Metadata/Metadata.styled.js +150 -0
- package/lib/components/Filters/Groups/Metadata/Metadata.utils.js +160 -0
- package/lib/components/Filters/Groups/Metadata/MetadataFiltersContext.js +329 -0
- package/lib/components/Filters/Groups/Metadata/Placeholder.js +25 -0
- package/lib/components/Filters/Groups/Metadata/common/TagsField/TagsMenu.js +81 -0
- package/lib/components/Filters/Groups/Metadata/common/TagsField/TagsSearchPlaceholder.js +18 -0
- package/lib/components/Filters/Groups/Metadata/common/TagsField/index.js +142 -0
- package/lib/components/Filters/Groups/Metadata/index.js +111 -0
- package/lib/components/Filters/Groups/Size/index.js +125 -0
- package/lib/components/Filters/Groups/Tags/FilteredTags.js +62 -0
- package/lib/components/Filters/Groups/Tags/SelectedTags.js +51 -0
- package/lib/components/Filters/Groups/Tags/SuggestedTags.js +43 -0
- package/lib/components/Filters/Groups/Tags/index.js +146 -0
- package/lib/components/Filters/Groups/TypeAndFormat/Format.js +65 -0
- package/lib/components/Filters/Groups/TypeAndFormat/Type.js +85 -0
- package/lib/components/Filters/Groups/TypeAndFormat/index.js +114 -0
- package/lib/components/Filters/Groups/common/DateRangeField/DateRangeField.styled.js +10 -0
- package/lib/components/Filters/Groups/common/DateRangeField/index.js +72 -0
- package/lib/components/Filters/Groups/common/FilterFooter.js +67 -0
- package/lib/components/Filters/Groups/common/FilterOptions.js +29 -0
- package/lib/components/Filters/Groups/common/FilterSearch.js +22 -0
- package/lib/components/Filters/Groups/common/FilterSearch.styled.js +15 -0
- package/lib/components/Filters/Groups/common/FilterSkeleton.js +44 -0
- package/lib/components/Filters/Groups/common/TimeFrames.js +35 -0
- package/lib/components/Filters/Groups/index.js +55 -0
- package/lib/components/Filters/Placeholder.js +29 -0
- package/lib/components/Filters/hooks/useDateTypeFilterValues.js +182 -0
- package/lib/components/Filters/hooks/useFilters.js +78 -0
- package/lib/components/Filters/index.js +78 -0
- package/lib/components/FoldersView/FoldersTree/FoldersTree.styled.js +193 -0
- package/lib/components/FoldersView/FoldersTree/FoldersTree.utils.js +78 -0
- package/lib/components/FoldersView/FoldersTree/FoldersTreeHeader.js +52 -0
- package/lib/components/FoldersView/FoldersTree/FoldersTreeList.js +64 -0
- package/lib/components/FoldersView/FoldersTree/FoldersTreeListItem.js +270 -0
- package/lib/components/FoldersView/FoldersTree/FoldersTreeSearch.js +70 -0
- package/lib/components/FoldersView/FoldersTree/FoldersTreeSkeleton.js +23 -0
- package/lib/components/FoldersView/FoldersTree/NoFoldersResult.js +19 -0
- package/lib/components/FoldersView/FoldersTree/SearchedFoldersItem.js +113 -0
- package/lib/components/FoldersView/FoldersTree/index.js +163 -0
- package/lib/components/FoldersView/hooks/useAddFolder.js +60 -0
- package/lib/components/FoldersView/index.js +282 -0
- package/lib/components/GalleryRoleSelect/CustomRolesTab.js +47 -0
- package/lib/components/GalleryRoleSelect/CustomRolesTab.styled.js +10 -0
- package/lib/components/GalleryRoleSelect/GalleryRoleSelect.constants.js +11 -0
- package/lib/components/GalleryRoleSelect/GalleryRoleSelect.styled.js +132 -0
- package/lib/components/GalleryRoleSelect/GalleryRoleSelect.utils.js +87 -0
- package/lib/components/GalleryRoleSelect/StandardRolesTab.js +58 -0
- package/lib/components/GalleryRoleSelect/index.js +234 -0
- package/lib/components/HeaderBar/FacetedSearchToggleButton.js +28 -0
- package/lib/components/HeaderBar/HeaderBar.styled.js +25 -0
- package/lib/components/HeaderBar/RightSide.js +127 -0
- package/lib/components/HeaderBar/index.js +77 -0
- package/lib/components/ImageEditorPanel/index.js +33 -0
- package/lib/components/InfiniteScroll/InfiniteScroll.js +97 -0
- package/lib/components/InfiniteScroll/InfiniteScroll.styled.js +11 -0
- package/lib/components/Informer/index.js +9 -0
- package/lib/components/LoginScreen/LoginScreen.styled.js +39 -0
- package/lib/components/LoginScreen/index.js +133 -0
- package/lib/components/MainMenu/MainMenu.styled.js +12 -0
- package/lib/components/MainMenu/index.js +77 -0
- package/lib/components/Modals/AddNewFolder/AddNewFolder.hooks.js +99 -0
- package/lib/components/Modals/AddNewFolder/index.js +1 -0
- package/lib/components/Modals/ConfirmationModal/ConfirmationModal.hooks.js +101 -0
- package/lib/components/Modals/ConfirmationModal/index.js +1 -0
- package/lib/components/Modals/DeleteItems/DeleteItems.hooks.js +233 -0
- package/lib/components/Modals/DeleteItems/index.js +1 -0
- package/lib/components/Modals/DeleteModal/DeleteModal.hooks.js +87 -0
- package/lib/components/Modals/DeleteModal/index.js +1 -0
- package/lib/components/Modals/DownloadConsent/DownlaodConsent.styled.js +8 -0
- package/lib/components/Modals/DownloadConsent/DownloadConsent.hooks.js +90 -0
- package/lib/components/Modals/DownloadConsent/DownloadConsentContent.js +52 -0
- package/lib/components/Modals/DownloadConsent/index.js +2 -0
- package/lib/components/Modals/Modals.js +386 -0
- package/lib/components/Modals/Modals.styled.js +80 -0
- package/lib/components/Modals/MoveItems/MoveItems.hooks.js +88 -0
- package/lib/components/Modals/MoveItems/index.js +1 -0
- package/lib/components/Modals/TransformedDownload/PdfModalContent.js +109 -0
- package/lib/components/Modals/TransformedDownload/TransformedDownload.hooks.js +188 -0
- package/lib/components/Modals/TransformedDownload/TransformedDownload.styled.js +29 -0
- package/lib/components/Modals/TransformedDownload/TransformedDownload.utils.js +46 -0
- package/lib/components/Modals/TransformedDownload/index.js +2 -0
- package/lib/components/Modals/index.js +8 -0
- package/lib/components/NoItems/NoItems.styled.js +54 -0
- package/lib/components/NoItems/index.js +50 -0
- package/lib/components/PdftronPanel/index.js +31 -0
- package/lib/components/PickerPanel/PickerPanel.styled.js +41 -0
- package/lib/components/PickerPanel/PickerPanelContent.js +100 -0
- package/lib/components/PickerPanel/index.js +21 -0
- package/lib/components/ProgressPanel/ProgressPanel.utils.js +29 -0
- package/lib/components/ProgressPanel/index.js +37 -0
- package/lib/components/TopBar/AppliedFilterChips/AppliedFilterChips.styled.js +11 -0
- package/lib/components/TopBar/AppliedFilterChips/index.js +77 -0
- package/lib/components/TopBar/Search/ContextDropdown/ContextDropdown.styled.js +59 -0
- package/lib/components/TopBar/Search/ContextDropdown/ContextDropdown.utils.js +67 -0
- package/lib/components/TopBar/Search/ContextDropdown/index.js +170 -0
- package/lib/components/TopBar/Search/PrependedOptions/TempFilterRegexInput.js +133 -0
- package/lib/components/TopBar/Search/Search.utils.js +88 -0
- package/lib/components/TopBar/Search/SimilarSearchTag.js +60 -0
- package/lib/components/TopBar/Search/index.js +251 -0
- package/lib/components/TopBar/TopBar.styled.js +37 -0
- package/lib/components/TopBar/index.js +61 -0
- package/lib/components/TopSection/TopSection.styled.js +22 -0
- package/lib/components/TopSection/index.js +58 -0
- package/lib/components/UploadBar/UploadBar.styled.js +84 -0
- package/lib/components/UploadBar/index.js +222 -0
- package/lib/components/UploadStatus/index.js +20 -0
- package/lib/components/UploadsPanel/UploadsList/Header.js +19 -0
- package/lib/components/UploadsPanel/UploadsList/List.js +29 -0
- package/lib/components/UploadsPanel/UploadsList/PreUploadPlugins.js +22 -0
- package/lib/components/UploadsPanel/UploadsList/UploadsList.styled.js +64 -0
- package/lib/components/UploadsPanel/UploadsList/UploadsList.utils.js +17 -0
- package/lib/components/UploadsPanel/UploadsList/UploadsVirtualGrid.js +29 -0
- package/lib/components/UploadsPanel/UploadsList/index.js +55 -0
- package/lib/components/UploadsPanel/UploadsPanel.styled.js +24 -0
- package/lib/components/UploadsPanel/UploadsPanelTopBar.js +16 -0
- package/lib/components/UploadsPanel/index.js +36 -0
- package/lib/components/UrlBuilderModal/UrlBuilderModal.styled.js +9 -0
- package/lib/components/UrlBuilderModal/index.js +97 -0
- package/lib/components/Views/ErroredViewPlaceholder.js +48 -0
- package/lib/components/Views/Views.constants.js +29 -0
- package/lib/components/Views/Views.styled.js +87 -0
- package/lib/components/Views/index.js +100 -0
- package/lib/components/common/DeleteModalItemText/DeleteModalItemText.styled.js +8 -0
- package/lib/components/common/DeleteModalItemText/index.js +29 -0
- package/lib/components/common/EditDetailsButton/EditDetailsButton.styled.js +35 -0
- package/lib/components/common/EditDetailsButton/index.js +28 -0
- package/lib/components/common/ExpiryDateTooltipContent/ExpiryDateTooltipContent.styled.js +16 -0
- package/lib/components/common/ExpiryDateTooltipContent/index.js +29 -0
- package/lib/components/common/FileApprovalsInfoPopup/index.js +46 -0
- package/lib/components/common/FileMetadataFieldValue/CustomMetadataFieldValue.js +48 -0
- package/lib/components/common/FileMetadataFieldValue/FileMetadataFieldValue.styled.js +66 -0
- package/lib/components/common/FileMetadataFieldValue/FileMetadataFieldValue.utils.js +315 -0
- package/lib/components/common/FileMetadataFieldValue/GeneralMetadataFieldValue.js +120 -0
- package/lib/components/common/FileMetadataFieldValue/index.js +26 -0
- package/lib/components/common/FileMetadataFieldValue/utils/getFontInfo.js +78 -0
- package/lib/components/common/FolderSelector/BrowseFoldersMenu.js +114 -0
- package/lib/components/common/FolderSelector/FolderSearchMenu.js +45 -0
- package/lib/components/common/FolderSelector/FolderSelector.styled.js +41 -0
- package/lib/components/common/FolderSelector/index.js +186 -0
- package/lib/components/common/FormattedUriLink/FormattedUriLink.styled.js +15 -0
- package/lib/components/common/FormattedUriLink/index.js +21 -0
- package/lib/components/common/OriginalBadge/OriginalBadge.styled.js +17 -0
- package/lib/components/common/OriginalBadge/index.js +14 -0
- package/lib/components/common/SanitizedHtmlElement/index.js +11 -0
- package/lib/components/common/Sort/Sort.constants.js +61 -0
- package/lib/components/common/Sort/Sort.styled.js +47 -0
- package/lib/components/common/Sort/Sort.utils.js +14 -0
- package/lib/components/common/Sort/index.js +183 -0
- package/lib/components/common/TextWithCopyIcon/TextWithCopyIcon.styled.js +44 -0
- package/lib/components/common/TextWithCopyIcon/index.js +71 -0
- package/lib/components/common/TopBarUploadButton/index.js +40 -0
- package/lib/components/common/TrimmedFilePathWithLocate/TrimmedFilePathWithLocate.utils.js +3 -0
- package/lib/components/common/TrimmedFilePathWithLocate/index.js +34 -0
- package/lib/components/common/TrimmedFolderPathWithLocate/index.js +13 -0
- package/lib/components/common/TrimmedPathWithLocate/TrimmedPathWithLocate.styled.js +30 -0
- package/lib/components/common/TrimmedPathWithLocate/index.js +40 -0
- package/lib/components/metadata.adapter.js +365 -0
- package/lib/defaultLocale.js +1361 -0
- package/lib/hooks/index.js +16 -0
- package/lib/hooks/useAssetsPicker.js +274 -0
- package/lib/hooks/useDownloadFilesCsv.js +20 -0
- package/lib/hooks/useEditFileDetails.js +505 -0
- package/lib/hooks/useExplorer.js +6 -0
- package/lib/hooks/useExplorerI18n.js +10 -0
- package/lib/hooks/useExplorerInformer.js +10 -0
- package/lib/hooks/useFetchFileFolderPermissions.js +31 -0
- package/lib/hooks/useFetchMetadataTagsBySearchQuery.js +38 -0
- package/lib/hooks/useFileMetadata.js +117 -0
- package/lib/hooks/useFilterSearch.js +37 -0
- package/lib/hooks/useForcedFilters.js +39 -0
- package/lib/hooks/useIsOverflow.js +25 -0
- package/lib/hooks/useIsSmallScreen.js +20 -0
- package/lib/hooks/useLocateFile.js +231 -0
- package/lib/hooks/usePrevious.js +9 -0
- package/lib/hooks/useSearchSuggestions.js +168 -0
- package/lib/hooks/useStartUpload.js +43 -0
- package/lib/hooks/useToLocaleNumber.js +14 -0
- package/lib/hooks/useValidateFileName.js +324 -0
- package/lib/index.js +1616 -0
- package/lib/slices/common.slice.js +254 -0
- package/lib/slices/drag.slice.js +75 -0
- package/lib/slices/files.slice.js +1307 -0
- package/lib/slices/filters.slice.js +382 -0
- package/lib/slices/folders.slice.js +978 -0
- package/lib/slices/foldersTree.slice.js +501 -0
- package/lib/slices/index.js +32 -0
- package/lib/slices/metadata.slice.js +494 -0
- package/lib/slices/panels.slice.js +351 -0
- package/lib/slices/search.slice.js +995 -0
- package/lib/slices/selections.slice.js +315 -0
- package/lib/slices/targets.slice.js +44 -0
- package/lib/slices/topSection.slice.js +71 -0
- package/lib/slices/views.slice.js +345 -0
- package/lib/thunks/archive.thunks.js +175 -0
- package/lib/thunks/downloads.thunks.js +415 -0
- package/lib/thunks/items.thunks.js +274 -0
- package/lib/thunks/permissions.thunks.js +66 -0
- package/lib/thunks/uploads.thunks.js +235 -0
- package/lib/utils/SearchSuggestions/SearchSuggestionsMenu.js +95 -0
- package/lib/utils/SearchSuggestions/SuggestionMode.js +70 -0
- package/lib/utils/SearchSuggestions/SuggestionModeAttribute.js +87 -0
- package/lib/utils/SearchSuggestions/SuggestionModeExpression.js +121 -0
- package/lib/utils/SearchSuggestions/SuggestionModeTag.js +87 -0
- package/lib/utils/SearchSuggestions/SuggestionsManager.js +242 -0
- package/lib/utils/SearchSuggestions/constants.js +14 -0
- package/lib/utils/SearchSuggestions/index.js +4 -0
- package/lib/utils/SearchSuggestions/styled.js +12 -0
- package/lib/utils/availableScreenSizes.js +4 -0
- package/lib/utils/constants.js +14 -0
- package/lib/utils/convertItemsToFilesFoldersUuids.js +12 -0
- package/lib/utils/convertItemstoFoldersParentUuids.js +12 -0
- package/lib/utils/createPromise.js +9 -0
- package/lib/utils/createSuperFocus.js +43 -0
- package/lib/utils/decodeB64ToStr.js +11 -0
- package/lib/utils/filters.js +333 -0
- package/lib/utils/formatFolderPath.js +10 -0
- package/lib/utils/formatPinSubTitle.js +17 -0
- package/lib/utils/getAcquirerTitle.js +10 -0
- package/lib/utils/getActiveOverlayEl.js +11 -0
- package/lib/utils/getApiPathtype.js +10 -0
- package/lib/utils/getClosestStr.js +22 -0
- package/lib/utils/getItemUuids.js +12 -0
- package/lib/utils/getLabelsTotalAssetsCount.js +6 -0
- package/lib/utils/getMoveAndDeleteData.js +15 -0
- package/lib/utils/getParentFolderPath.js +4 -0
- package/lib/utils/getQueryStringFromUrl.js +6 -0
- package/lib/utils/getScrollableParent.js +15 -0
- package/lib/utils/getStringValueExistedInObj.js +9 -0
- package/lib/utils/isEmbeddableAsset.js +6 -0
- package/lib/utils/isFileVersion.js +9 -0
- package/lib/utils/mapArrayKeysToObjValues.js +33 -0
- package/lib/utils/mapFiltersToShownFormat.js +252 -0
- package/lib/utils/prepareExportedFilesLinks.js +12 -0
- package/lib/utils/prepareSearchUrl.js +65 -0
- package/lib/utils/removeBackground.js +60 -0
- package/lib/utils/removeExtraUrlParams.js +13 -0
- package/lib/utils/scrollToAndFocusItemElement.js +16 -0
- package/lib/utils/toggleFolderNotFoundModal.js +25 -0
- package/lib/utils/trapFocus.js +59 -0
- package/lib/utils/truncateString.js +28 -0
- package/package.json +8 -8
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
2
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { PC, FV } from '@scaleflex/widget-common';
|
|
5
|
+
import { EllipsedText as SfxEllipsedText } from '@scaleflex/ui/core';
|
|
6
|
+
var getExpiryDateColor = function getExpiryDateColor(theme, daysLeft) {
|
|
7
|
+
if (daysLeft > 0) {
|
|
8
|
+
if (daysLeft <= 1) {
|
|
9
|
+
return theme.palette[PC.TextError];
|
|
10
|
+
}
|
|
11
|
+
if (daysLeft <= 7) {
|
|
12
|
+
return theme.palette[PC.TextWarning];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return theme.palette[PC.TextPrimary];
|
|
16
|
+
};
|
|
17
|
+
var LabelValue = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n color: ", ";\n ", ";\n cursor: pointer;\n"])), function (_ref) {
|
|
18
|
+
var theme = _ref.theme;
|
|
19
|
+
return theme.palette[PC.AccentStateless];
|
|
20
|
+
}, function (_ref2) {
|
|
21
|
+
var theme = _ref2.theme;
|
|
22
|
+
return theme.typography.font[FV.ButtonSm];
|
|
23
|
+
});
|
|
24
|
+
var LabelIconWrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n"])));
|
|
25
|
+
var Uri = styled.a(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n ", ";\n cursor: pointer;\n text-decoration: underline;\n"])), function (_ref3) {
|
|
26
|
+
var theme = _ref3.theme;
|
|
27
|
+
return theme.palette[PC.AccentStateless];
|
|
28
|
+
}, function (_ref4) {
|
|
29
|
+
var theme = _ref4.theme;
|
|
30
|
+
return theme.typography.font[FV.LinkMedium];
|
|
31
|
+
});
|
|
32
|
+
var ClickableText = styled(SfxEllipsedText)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n ", ";\n cursor: pointer;\n text-decoration: underline;\n"])), function (_ref5) {
|
|
33
|
+
var theme = _ref5.theme;
|
|
34
|
+
return theme.palette[PC.AccentStateless];
|
|
35
|
+
}, function (_ref6) {
|
|
36
|
+
var theme = _ref6.theme;
|
|
37
|
+
return theme.typography.font[FV.LinkLarge];
|
|
38
|
+
});
|
|
39
|
+
var ColoredDateText = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n color: ", ";\n"])), function (_ref7) {
|
|
40
|
+
var theme = _ref7.theme,
|
|
41
|
+
daysLeft = _ref7.daysLeft;
|
|
42
|
+
return getExpiryDateColor(theme, daysLeft);
|
|
43
|
+
});
|
|
44
|
+
var NoValueWrapper = styled.span(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: ", ";\n"])), function (_ref8) {
|
|
45
|
+
var theme = _ref8.theme;
|
|
46
|
+
return theme.palette[PC.TextPlaceholder];
|
|
47
|
+
});
|
|
48
|
+
var ColorValue = styled.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: inline-block;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: ", ";\n &:not(:last-child) {\n margin-right: 8px;\n }\n"])), function (_ref9) {
|
|
49
|
+
var colorHexCode = _ref9.colorHexCode;
|
|
50
|
+
return colorHexCode;
|
|
51
|
+
});
|
|
52
|
+
var EllipsedText = styled(SfxEllipsedText)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n color: ", ";\n"])), function (_ref10) {
|
|
53
|
+
var theme = _ref10.theme;
|
|
54
|
+
return theme.palette[PC.TextPrimary];
|
|
55
|
+
});
|
|
56
|
+
var Styled = {
|
|
57
|
+
LabelValue: LabelValue,
|
|
58
|
+
LabelIconWrapper: LabelIconWrapper,
|
|
59
|
+
ColoredDateText: ColoredDateText,
|
|
60
|
+
ClickableText: ClickableText,
|
|
61
|
+
NoValueWrapper: NoValueWrapper,
|
|
62
|
+
ColorValue: ColorValue,
|
|
63
|
+
Uri: Uri,
|
|
64
|
+
EllipsedText: EllipsedText
|
|
65
|
+
};
|
|
66
|
+
export default Styled;
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
var _excluded = ["isPreUpload"];
|
|
2
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
|
+
function _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 _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; } }
|
|
8
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
9
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
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 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; }
|
|
12
|
+
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; }
|
|
13
|
+
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; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
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); }
|
|
16
|
+
import getJsonParsedValue from '@scaleflex/widget-utils/lib/getJsonParsedValue';
|
|
17
|
+
import getFileDetails from '@scaleflex/widget-utils/lib/getFileDetails';
|
|
18
|
+
import formatSeconds from '@scaleflex/widget-utils/lib/formatSeconds';
|
|
19
|
+
import { COLORS_OPTIONS } from '../../Filters/Filters.constants';
|
|
20
|
+
import TrimmedFilePathWithLocate from '../TrimmedFilePathWithLocate';
|
|
21
|
+
import ExpiryDateTooltipContent from '../ExpiryDateTooltipContent';
|
|
22
|
+
import FileApprovalsInfoPopup from '../FileApprovalsInfoPopup';
|
|
23
|
+
import getFontInfo from './utils/getFontInfo';
|
|
24
|
+
import { ORIENTATION_KEY_TO_LABEL_I18N_KEYS } from '../../../utils/constants';
|
|
25
|
+
var getCorrectColor = function getCorrectColor(color) {
|
|
26
|
+
var _COLORS_OPTIONS$find;
|
|
27
|
+
if (!(color !== null && color !== void 0 && color.length) || typeof color !== 'string') return;
|
|
28
|
+
var nextColor = color.startsWith('#') ? color : "#".concat(color);
|
|
29
|
+
return ((_COLORS_OPTIONS$find = COLORS_OPTIONS.find(function (colorOption) {
|
|
30
|
+
return colorOption.value === color;
|
|
31
|
+
})) === null || _COLORS_OPTIONS$find === void 0 ? void 0 : _COLORS_OPTIONS$find.color) || nextColor;
|
|
32
|
+
};
|
|
33
|
+
var getUnknownOrientationLabelI18nKey = function getUnknownOrientationLabelI18nKey(info) {
|
|
34
|
+
return info.img_h > info.img_w && (info.img_h > info.img_w ? ORIENTATION_KEY_TO_LABEL_I18N_KEYS.PT : ORIENTATION_KEY_TO_LABEL_I18N_KEYS.LD) || 'mutualizedUnknownText';
|
|
35
|
+
};
|
|
36
|
+
var getOrderedCommonFields = function getOrderedCommonFields(_ref) {
|
|
37
|
+
var _ref$fileDetails = _ref.fileDetails,
|
|
38
|
+
fileDetails = _ref$fileDetails === void 0 ? {} : _ref$fileDetails,
|
|
39
|
+
i18n = _ref.i18n,
|
|
40
|
+
findAssetLocationEnabled = _ref.findAssetLocationEnabled,
|
|
41
|
+
isPreUpload = _ref.isPreUpload,
|
|
42
|
+
rootFieldsRegionalUuidsByKeys = _ref.rootFieldsRegionalUuidsByKeys,
|
|
43
|
+
smallerFont = _ref.smallerFont;
|
|
44
|
+
var readOnlyFields = [{
|
|
45
|
+
key: 'type',
|
|
46
|
+
placeholder: "".concat(i18n('mutualizedTypeLabel'), "..."),
|
|
47
|
+
title: i18n('mutualizedTypeLabel'),
|
|
48
|
+
type: 'text',
|
|
49
|
+
uuid: 'GENERAL-TYPE',
|
|
50
|
+
value: fileDetails.extension
|
|
51
|
+
}, {
|
|
52
|
+
key: 'size',
|
|
53
|
+
placeholder: "".concat(i18n('mutualizedSizeKey'), "..."),
|
|
54
|
+
title: i18n('mutualizedSizeKey'),
|
|
55
|
+
type: 'text',
|
|
56
|
+
uuid: 'GENERAL-SIZE',
|
|
57
|
+
value: fileDetails.size
|
|
58
|
+
}, {
|
|
59
|
+
key: 'location',
|
|
60
|
+
placeholder: "".concat(i18n('explorerGeneralFileDetailsLocationLabel'), "..."),
|
|
61
|
+
title: i18n('explorerGeneralFileDetailsLocationLabel'),
|
|
62
|
+
type: 'text',
|
|
63
|
+
uuid: 'GENERAL-LOCATION',
|
|
64
|
+
Component: function Component(props) {
|
|
65
|
+
return TrimmedFilePathWithLocate(_objectSpread(_objectSpread({}, props), {}, {
|
|
66
|
+
isClickable: !isPreUpload,
|
|
67
|
+
size: 'md',
|
|
68
|
+
smallerFont: smallerFont
|
|
69
|
+
}));
|
|
70
|
+
},
|
|
71
|
+
hide: !fileDetails.folderPath || !findAssetLocationEnabled
|
|
72
|
+
}];
|
|
73
|
+
var editableFields = [{
|
|
74
|
+
key: 'name',
|
|
75
|
+
placeholder: "".concat(i18n('generalSectionNameLabel'), "..."),
|
|
76
|
+
required: true,
|
|
77
|
+
title: i18n('generalSectionNameLabel'),
|
|
78
|
+
type: 'text',
|
|
79
|
+
uuid: 'GENERAL-NAME',
|
|
80
|
+
value: fileDetails.name
|
|
81
|
+
}, {
|
|
82
|
+
key: 'title',
|
|
83
|
+
placeholder: "".concat(i18n('generalSectionTitleLabel'), "..."),
|
|
84
|
+
regional_variants_group_uuid: rootFieldsRegionalUuidsByKeys === null || rootFieldsRegionalUuidsByKeys === void 0 ? void 0 : rootFieldsRegionalUuidsByKeys.title,
|
|
85
|
+
required: true,
|
|
86
|
+
title: i18n('generalSectionTitleLabel'),
|
|
87
|
+
type: 'text',
|
|
88
|
+
uuid: 'GENERAL-TITLE',
|
|
89
|
+
value: getJsonParsedValue(fileDetails.meta.title)
|
|
90
|
+
}, {
|
|
91
|
+
key: 'description',
|
|
92
|
+
placeholder: "".concat(i18n('generalSectionDescriptionLabel'), "..."),
|
|
93
|
+
regional_variants_group_uuid: rootFieldsRegionalUuidsByKeys === null || rootFieldsRegionalUuidsByKeys === void 0 ? void 0 : rootFieldsRegionalUuidsByKeys.description,
|
|
94
|
+
required: true,
|
|
95
|
+
title: i18n('generalSectionDescriptionLabel'),
|
|
96
|
+
type: 'textarea',
|
|
97
|
+
uuid: 'GENERAL-DESCRIPTION',
|
|
98
|
+
value: getJsonParsedValue(fileDetails.meta.description)
|
|
99
|
+
}];
|
|
100
|
+
return {
|
|
101
|
+
readOnlyFields: readOnlyFields,
|
|
102
|
+
editableFields: editableFields
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
var getPreUploadFields = function getPreUploadFields(_ref2) {
|
|
106
|
+
var file = _ref2.file,
|
|
107
|
+
rootFieldsRegionalUuidsByKeys = _ref2.rootFieldsRegionalUuidsByKeys,
|
|
108
|
+
i18n = _ref2.i18n;
|
|
109
|
+
var fileDetails = getFileDetails(file, i18n);
|
|
110
|
+
return getOrderedCommonFields({
|
|
111
|
+
fileDetails: fileDetails,
|
|
112
|
+
rootFieldsRegionalUuidsByKeys: rootFieldsRegionalUuidsByKeys,
|
|
113
|
+
i18n: i18n,
|
|
114
|
+
isPreUpload: true
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
var getRemoteFields = function getRemoteFields(_ref3) {
|
|
118
|
+
var _ORIENTATION_KEY_TO_L;
|
|
119
|
+
var file = _ref3.file,
|
|
120
|
+
languageRegionalFilterUuid = _ref3.languageRegionalFilterUuid,
|
|
121
|
+
i18n = _ref3.i18n,
|
|
122
|
+
expireDateMappedField = _ref3.expireDateMappedField,
|
|
123
|
+
i18nArray = _ref3.i18nArray,
|
|
124
|
+
isFastToken = _ref3.isFastToken,
|
|
125
|
+
findAssetLocationEnabled = _ref3.findAssetLocationEnabled,
|
|
126
|
+
scrollToMetaField = _ref3.scrollToMetaField,
|
|
127
|
+
isApprovalsEnabled = _ref3.isApprovalsEnabled,
|
|
128
|
+
rootFieldsRegionalUuidsByKeys = _ref3.rootFieldsRegionalUuidsByKeys,
|
|
129
|
+
smallerFont = _ref3.smallerFont,
|
|
130
|
+
hideFileSpecsMetadataFields = _ref3.hideFileSpecsMetadataFields;
|
|
131
|
+
var _file$meta = file.meta,
|
|
132
|
+
meta = _file$meta === void 0 ? {} : _file$meta,
|
|
133
|
+
_file$tags = file.tags,
|
|
134
|
+
tags = _file$tags === void 0 ? [] : _file$tags,
|
|
135
|
+
_file$info = file.info,
|
|
136
|
+
info = _file$info === void 0 ? {} : _file$info,
|
|
137
|
+
_file$labels = file.labels,
|
|
138
|
+
labels = _file$labels === void 0 ? [] : _file$labels;
|
|
139
|
+
var _ref4 = info || {},
|
|
140
|
+
mainColors = _ref4.main_colors,
|
|
141
|
+
mainColorsHex = _ref4.main_colors_hex;
|
|
142
|
+
var currentMainColors = Array.isArray(mainColors) ? mainColors : [];
|
|
143
|
+
var currentMainColorsHex = Array.isArray(mainColorsHex) ? mainColorsHex : [];
|
|
144
|
+
var fileDetails = getFileDetails(file, i18n);
|
|
145
|
+
var _getOrderedCommonFiel = getOrderedCommonFields({
|
|
146
|
+
fileDetails: fileDetails,
|
|
147
|
+
rootFieldsRegionalUuidsByKeys: rootFieldsRegionalUuidsByKeys,
|
|
148
|
+
i18n: i18n,
|
|
149
|
+
findAssetLocationEnabled: findAssetLocationEnabled,
|
|
150
|
+
smallerFont: smallerFont
|
|
151
|
+
}),
|
|
152
|
+
orderedCommonReadOnlyFields = _getOrderedCommonFiel.readOnlyFields,
|
|
153
|
+
orderedCommonEditableFields = _getOrderedCommonFiel.editableFields;
|
|
154
|
+
var readOnlyFields = [].concat(_toConsumableArray(orderedCommonReadOnlyFields), [{
|
|
155
|
+
key: 'duration',
|
|
156
|
+
placeholder: "".concat(i18n('mutualizedDurationLabel'), "..."),
|
|
157
|
+
title: i18n('mutualizedDurationLabel'),
|
|
158
|
+
type: 'text',
|
|
159
|
+
uuid: 'GENERAL-Duration',
|
|
160
|
+
value: formatSeconds(fileDetails.videoDuration),
|
|
161
|
+
hide: !fileDetails.videoDuration
|
|
162
|
+
}, {
|
|
163
|
+
key: 'resolution',
|
|
164
|
+
placeholder: "".concat(i18n('mutualizedResolutionLabel'), "..."),
|
|
165
|
+
title: i18n('mutualizedResolutionLabel'),
|
|
166
|
+
type: 'text',
|
|
167
|
+
uuid: 'GENERAL-RESOLUTION',
|
|
168
|
+
value: fileDetails.resolution,
|
|
169
|
+
hide: !fileDetails.resolution
|
|
170
|
+
}, {
|
|
171
|
+
key: 'labels',
|
|
172
|
+
placeholder: "".concat(i18n('generalSectionLabelsLabel'), "..."),
|
|
173
|
+
title: i18n('generalSectionLabelsLabel'),
|
|
174
|
+
type: 'labels',
|
|
175
|
+
uuid: 'GENERAL-LABELS',
|
|
176
|
+
value: Array.isArray(labels) ? labels : [],
|
|
177
|
+
hide: hideFileSpecsMetadataFields || isFastToken
|
|
178
|
+
}, {
|
|
179
|
+
key: 'orientation',
|
|
180
|
+
placeholder: "".concat(i18n('generalSectionOrientationLabel'), "..."),
|
|
181
|
+
title: i18n('generalSectionOrientationLabel'),
|
|
182
|
+
type: 'text',
|
|
183
|
+
uuid: 'GENERAL-ORIENTATION',
|
|
184
|
+
value: i18n((_ORIENTATION_KEY_TO_L = ORIENTATION_KEY_TO_LABEL_I18N_KEYS[info.img_o]) !== null && _ORIENTATION_KEY_TO_L !== void 0 ? _ORIENTATION_KEY_TO_L : getUnknownOrientationLabelI18nKey(info))
|
|
185
|
+
}, {
|
|
186
|
+
key: 'visibility',
|
|
187
|
+
placeholder: "".concat(i18n('mutualizedVisibilityLabel'), "..."),
|
|
188
|
+
title: i18n('mutualizedVisibilityLabel'),
|
|
189
|
+
type: 'text',
|
|
190
|
+
uuid: 'GENERAL-VISIBILITY',
|
|
191
|
+
value: fileDetails.visibility
|
|
192
|
+
}, {
|
|
193
|
+
key: 'colorMode',
|
|
194
|
+
placeholder: "".concat(i18n('mutualizedColorModeLabel'), "..."),
|
|
195
|
+
title: i18n('mutualizedColorModeLabel'),
|
|
196
|
+
type: 'text',
|
|
197
|
+
uuid: 'GENERAL-COLOR_MODE',
|
|
198
|
+
value: fileDetails.colorMode
|
|
199
|
+
}, {
|
|
200
|
+
key: 'mainColors',
|
|
201
|
+
placeholder: "".concat(i18n('mutualizedMainColorsLabel'), "..."),
|
|
202
|
+
title: i18n('mutualizedMainColorsLabel'),
|
|
203
|
+
type: 'mainColors',
|
|
204
|
+
uuid: 'GENERAL-MAIN_COLORS',
|
|
205
|
+
value: (currentMainColorsHex === null || currentMainColorsHex === void 0 ? void 0 : currentMainColorsHex.map(function (color) {
|
|
206
|
+
return "#".concat(color);
|
|
207
|
+
})) || currentMainColors.map(function (color) {
|
|
208
|
+
return getCorrectColor(color);
|
|
209
|
+
}),
|
|
210
|
+
hide: hideFileSpecsMetadataFields
|
|
211
|
+
}, {
|
|
212
|
+
key: 'dominantColor',
|
|
213
|
+
placeholder: "".concat(i18n('mutualizedDominantColorLabel'), "..."),
|
|
214
|
+
title: i18n('mutualizedDominantColorLabel'),
|
|
215
|
+
type: 'dominantColor',
|
|
216
|
+
uuid: 'GENERAL-DOMINANT_COLOR',
|
|
217
|
+
value: info !== null && info !== void 0 && info.dominant_color_hex ? "#".concat(info === null || info === void 0 ? void 0 : info.dominant_color_hex) : getCorrectColor(info === null || info === void 0 ? void 0 : info.dominant_color),
|
|
218
|
+
hide: hideFileSpecsMetadataFields
|
|
219
|
+
}, {
|
|
220
|
+
key: 'logoAndBrand',
|
|
221
|
+
placeholder: "".concat(i18n('generalSectionLogoAndBrandLabel'), "..."),
|
|
222
|
+
title: i18n('generalSectionLogoAndBrandLabel'),
|
|
223
|
+
type: 'linked-text',
|
|
224
|
+
uuid: 'GENERAL-LOGO_AND_BRAND',
|
|
225
|
+
value: fileDetails.brandAndLogosLabels,
|
|
226
|
+
hide: hideFileSpecsMetadataFields || !fileDetails.brandAndLogosLabels.length
|
|
227
|
+
}, {
|
|
228
|
+
key: 'createdAt',
|
|
229
|
+
placeholder: "".concat(i18n('mutualizedCreatedAtText'), "..."),
|
|
230
|
+
title: i18n('mutualizedCreatedAtText'),
|
|
231
|
+
type: 'text',
|
|
232
|
+
uuid: 'GENERAL-CREATED_AT',
|
|
233
|
+
value: fileDetails.humanReadableCreatedAt,
|
|
234
|
+
valueTooltip: fileDetails.createdAt
|
|
235
|
+
}, {
|
|
236
|
+
key: 'createdBy',
|
|
237
|
+
placeholder: "".concat(i18n('mutualizedCreatedByText'), "..."),
|
|
238
|
+
title: i18n('mutualizedCreatedByText'),
|
|
239
|
+
type: 'text',
|
|
240
|
+
uuid: 'GENERAL-CREATED_BY',
|
|
241
|
+
value: fileDetails.createdBy,
|
|
242
|
+
hide: hideFileSpecsMetadataFields
|
|
243
|
+
}, {
|
|
244
|
+
key: 'modifiedAt',
|
|
245
|
+
placeholder: "".concat(i18n('mutualizedModifiedAtText'), "..."),
|
|
246
|
+
title: i18n('mutualizedModifiedAtText'),
|
|
247
|
+
type: 'text',
|
|
248
|
+
uuid: 'GENERAL-MODIFIED_AT',
|
|
249
|
+
value: fileDetails.humanReadableModifiedAt,
|
|
250
|
+
valueTooltip: fileDetails.modifiedAt
|
|
251
|
+
}, {
|
|
252
|
+
key: 'expiredAt',
|
|
253
|
+
placeholder: "".concat(i18n('explorerGeneralFileDetailsExpiryDateLabel'), "..."),
|
|
254
|
+
title: i18n('explorerGeneralFileDetailsExpiryDateLabel'),
|
|
255
|
+
type: 'expiryDate',
|
|
256
|
+
uuid: 'GENERAL-EXPIRY_DATE',
|
|
257
|
+
value: expireDateMappedField && meta[expireDateMappedField.key],
|
|
258
|
+
hide: hideFileSpecsMetadataFields || !expireDateMappedField,
|
|
259
|
+
labelIconTooltip: ExpiryDateTooltipContent({
|
|
260
|
+
expireDateMappedField: expireDateMappedField,
|
|
261
|
+
i18nArray: i18nArray,
|
|
262
|
+
scrollToMetaField: scrollToMetaField
|
|
263
|
+
})
|
|
264
|
+
}], _toConsumableArray(getFontInfo(fileDetails, i18n)), [{
|
|
265
|
+
key: 'approvalStatus',
|
|
266
|
+
placeholder: "".concat(i18n('explorerGeneralFileDetailsStatusLabel'), "..."),
|
|
267
|
+
title: i18n('explorerGeneralFileDetailsStatusLabel'),
|
|
268
|
+
type: 'custom',
|
|
269
|
+
uuid: 'GENERAL-STATUS',
|
|
270
|
+
hide: hideFileSpecsMetadataFields || !isApprovalsEnabled,
|
|
271
|
+
Component: FileApprovalsInfoPopup
|
|
272
|
+
}, {
|
|
273
|
+
key: 'uuid',
|
|
274
|
+
placeholder: "".concat(i18n('explorerGeneralFileDetailsUuidLabel'), "..."),
|
|
275
|
+
title: i18n('explorerGeneralFileDetailsUuidLabel'),
|
|
276
|
+
type: 'uuid',
|
|
277
|
+
uuid: 'GENERAL-UUID',
|
|
278
|
+
value: fileDetails.uuid,
|
|
279
|
+
hide: !fileDetails.uuid,
|
|
280
|
+
labelIconTooltip: i18n('explorerGeneralFileDetailsUuidHint')
|
|
281
|
+
}]);
|
|
282
|
+
var editableFields = [].concat(_toConsumableArray(orderedCommonEditableFields), [{
|
|
283
|
+
key: 'tags',
|
|
284
|
+
placeholder: "".concat(i18n('generalSectionTagsLabel'), "..."),
|
|
285
|
+
regional_variants_group_uuid: languageRegionalFilterUuid,
|
|
286
|
+
title: i18n('generalSectionTagsLabel'),
|
|
287
|
+
type: 'tags',
|
|
288
|
+
uuid: 'GENERAL-TAGS',
|
|
289
|
+
value: tags
|
|
290
|
+
}]);
|
|
291
|
+
return {
|
|
292
|
+
readOnlyFields: readOnlyFields,
|
|
293
|
+
editableFields: editableFields
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
export var generateGeneralSectionFields = function generateGeneralSectionFields(_ref5) {
|
|
297
|
+
var isPreUpload = _ref5.isPreUpload,
|
|
298
|
+
others = _objectWithoutProperties(_ref5, _excluded);
|
|
299
|
+
if (isPreUpload) {
|
|
300
|
+
var _getPreUploadFields = getPreUploadFields(others),
|
|
301
|
+
_readOnlyFields = _getPreUploadFields.readOnlyFields,
|
|
302
|
+
_editableFields = _getPreUploadFields.editableFields;
|
|
303
|
+
return {
|
|
304
|
+
readOnlyFields: _readOnlyFields,
|
|
305
|
+
editableFields: _editableFields
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
var _getRemoteFields = getRemoteFields(others),
|
|
309
|
+
readOnlyFields = _getRemoteFields.readOnlyFields,
|
|
310
|
+
editableFields = _getRemoteFields.editableFields;
|
|
311
|
+
return {
|
|
312
|
+
readOnlyFields: readOnlyFields,
|
|
313
|
+
editableFields: editableFields
|
|
314
|
+
};
|
|
315
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
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
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
3
|
+
import dateStrToClearDateTime from '@scaleflex/widget-utils/lib/dateStrToClearDateTime';
|
|
4
|
+
import getDaysLeft from '@scaleflex/widget-utils/lib/getDaysLeft';
|
|
5
|
+
import isEmptyObject from '@scaleflex/widget-utils/lib/isEmptyObject';
|
|
6
|
+
import { Label } from '@scaleflex/icons';
|
|
7
|
+
import { EllipsedText } from '@scaleflex/ui/core';
|
|
8
|
+
import getMetadataFieldVariantValue from '@scaleflex/widget-utils/lib/metadata/getMetadataFieldVariantValue';
|
|
9
|
+
import { selectLabelsArray } from '../../../slices/common.slice';
|
|
10
|
+
import { filterFilesByTagOnly } from '../../../slices/filters.slice';
|
|
11
|
+
import { selectMetadataRegionalFilters } from '../../../slices/metadata.slice';
|
|
12
|
+
import Styled from './FileMetadataFieldValue.styled';
|
|
13
|
+
import TextWithCopyIcon from '../TextWithCopyIcon';
|
|
14
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
var GeneralMetadataFieldValue = function GeneralMetadataFieldValue(_ref) {
|
|
16
|
+
var file = _ref.file,
|
|
17
|
+
field = _ref.field,
|
|
18
|
+
_ref$multiTooltipMaxL = _ref.multiTooltipMaxLines,
|
|
19
|
+
multiTooltipMaxLines = _ref$multiTooltipMaxL === void 0 ? 2 : _ref$multiTooltipMaxL,
|
|
20
|
+
smallerFont = _ref.smallerFont;
|
|
21
|
+
var dispatch = useDispatch();
|
|
22
|
+
var metaRegionalFilters = useSelector(selectMetadataRegionalFilters);
|
|
23
|
+
var labels = useSelector(selectLabelsArray);
|
|
24
|
+
if (!field) return;
|
|
25
|
+
if (field.Component) {
|
|
26
|
+
return /*#__PURE__*/_jsx(field.Component, {
|
|
27
|
+
file: file,
|
|
28
|
+
smallerFont: smallerFont,
|
|
29
|
+
size: "sm"
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
var handleTagClick = function handleTagClick() {
|
|
33
|
+
var tag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
34
|
+
dispatch(filterFilesByTagOnly(tag));
|
|
35
|
+
};
|
|
36
|
+
var renderLabelValue = function renderLabelValue(currentLabelSid) {
|
|
37
|
+
var labelObject = labels.filter(function (label) {
|
|
38
|
+
return label.sid === currentLabelSid;
|
|
39
|
+
})[0];
|
|
40
|
+
if (!labelObject) return;
|
|
41
|
+
return /*#__PURE__*/_jsxs(Styled.LabelValue, {
|
|
42
|
+
children: [/*#__PURE__*/_jsx(Styled.LabelIconWrapper, {
|
|
43
|
+
children: /*#__PURE__*/_jsx(Label, {
|
|
44
|
+
color: labelObject.color,
|
|
45
|
+
size: smallerFont ? 14 : 16
|
|
46
|
+
})
|
|
47
|
+
}), /*#__PURE__*/_jsx(Styled.ClickableText, {
|
|
48
|
+
maxLinesCount: multiTooltipMaxLines,
|
|
49
|
+
children: labelObject.name
|
|
50
|
+
})]
|
|
51
|
+
}, labelObject.uuid);
|
|
52
|
+
};
|
|
53
|
+
var renderExpiryDateValue = function renderExpiryDateValue(date) {
|
|
54
|
+
return /*#__PURE__*/_jsx(EllipsedText, {
|
|
55
|
+
maxLinesCount: multiTooltipMaxLines,
|
|
56
|
+
children: /*#__PURE__*/_jsx(Styled.ColoredDateText, {
|
|
57
|
+
daysLeft: getDaysLeft(date),
|
|
58
|
+
children: dateStrToClearDateTime({
|
|
59
|
+
dateStr: date,
|
|
60
|
+
options: {
|
|
61
|
+
month: 'short',
|
|
62
|
+
day: 'numeric',
|
|
63
|
+
year: 'numeric'
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
var renderNoValue = function renderNoValue() {
|
|
70
|
+
return /*#__PURE__*/_jsx(Styled.NoValueWrapper, {
|
|
71
|
+
children: "\u2014"
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
var value = field.value;
|
|
75
|
+
if (!value || _typeof(value) === 'object' && isEmptyObject(value)) return renderNoValue();
|
|
76
|
+
var variantValue = getMetadataFieldVariantValue({
|
|
77
|
+
value: value,
|
|
78
|
+
possibleValues: field.possible_values,
|
|
79
|
+
regionalVariantsGroupUuid: field.regional_variants_group_uuid,
|
|
80
|
+
metaRegionalFilters: metaRegionalFilters
|
|
81
|
+
});
|
|
82
|
+
switch (field.type) {
|
|
83
|
+
case 'tags':
|
|
84
|
+
case 'linked-text':
|
|
85
|
+
return variantValue !== null && variantValue !== void 0 && variantValue.length ? (variantValue || []).map(function (value) {
|
|
86
|
+
var _value$sid, _value$label;
|
|
87
|
+
return /*#__PURE__*/_jsx(Styled.ClickableText, {
|
|
88
|
+
onClick: field.type === 'tags' ? function () {
|
|
89
|
+
return handleTagClick(value);
|
|
90
|
+
} : undefined,
|
|
91
|
+
maxLinesCount: multiTooltipMaxLines,
|
|
92
|
+
children: (_value$label = value.label) !== null && _value$label !== void 0 ? _value$label : value
|
|
93
|
+
}, (_value$sid = value.sid) !== null && _value$sid !== void 0 ? _value$sid : value);
|
|
94
|
+
}) : renderNoValue();
|
|
95
|
+
case 'labels':
|
|
96
|
+
return variantValue !== null && variantValue !== void 0 && variantValue.length ? variantValue.map(renderLabelValue) : renderNoValue();
|
|
97
|
+
case 'mainColors':
|
|
98
|
+
return variantValue !== null && variantValue !== void 0 && variantValue.length ? variantValue.map(function (colorHexCode) {
|
|
99
|
+
return /*#__PURE__*/_jsx(Styled.ColorValue, {
|
|
100
|
+
colorHexCode: colorHexCode
|
|
101
|
+
}, colorHexCode);
|
|
102
|
+
}) : renderNoValue();
|
|
103
|
+
case 'dominantColor':
|
|
104
|
+
return variantValue ? /*#__PURE__*/_jsx(Styled.ColorValue, {
|
|
105
|
+
colorHexCode: variantValue
|
|
106
|
+
}, variantValue) : renderNoValue();
|
|
107
|
+
case 'expiryDate':
|
|
108
|
+
return variantValue ? renderExpiryDateValue(variantValue) : renderNoValue();
|
|
109
|
+
case 'uuid':
|
|
110
|
+
return /*#__PURE__*/_jsx(TextWithCopyIcon, {
|
|
111
|
+
value: value
|
|
112
|
+
});
|
|
113
|
+
default:
|
|
114
|
+
return /*#__PURE__*/_jsx(Styled.EllipsedText, {
|
|
115
|
+
maxLinesCount: multiTooltipMaxLines,
|
|
116
|
+
children: Array.isArray(variantValue) ? variantValue.join(' ') : variantValue || renderNoValue()
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
export default GeneralMetadataFieldValue;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import CustomMetadataFieldValue from './CustomMetadataFieldValue';
|
|
2
|
+
import GeneralMetadataFieldValue from './GeneralMetadataFieldValue';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
var FileMetadataFieldValue = function FileMetadataFieldValue(_ref) {
|
|
5
|
+
var _file$meta;
|
|
6
|
+
var file = _ref.file,
|
|
7
|
+
field = _ref.field,
|
|
8
|
+
_ref$fieldType = _ref.fieldType,
|
|
9
|
+
fieldType = _ref$fieldType === void 0 ? 'general' : _ref$fieldType,
|
|
10
|
+
_ref$smallerFont = _ref.smallerFont,
|
|
11
|
+
smallerFont = _ref$smallerFont === void 0 ? false : _ref$smallerFont;
|
|
12
|
+
if (Object.keys(file).length === 0 || file.loading) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
return fieldType === 'general' ? /*#__PURE__*/_jsx(GeneralMetadataFieldValue, {
|
|
16
|
+
file: file,
|
|
17
|
+
field: field,
|
|
18
|
+
multiTooltipMaxLines: 1,
|
|
19
|
+
smallerFont: smallerFont
|
|
20
|
+
}) : /*#__PURE__*/_jsx(CustomMetadataFieldValue, {
|
|
21
|
+
field: field,
|
|
22
|
+
value: (_file$meta = file.meta) === null || _file$meta === void 0 ? void 0 : _file$meta[field.key],
|
|
23
|
+
multiTooltipMaxLines: 1
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
export default FileMetadataFieldValue;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import capitalizeFirstLetter from '@scaleflex/widget-utils/lib/capitalizeFirstLetter';
|
|
2
|
+
var getFontStyles = function getFontStyles(fontStyles) {
|
|
3
|
+
if (!Array.isArray(fontStyles)) return;
|
|
4
|
+
if (fontStyles.length === 1) {
|
|
5
|
+
return fontStyles[0];
|
|
6
|
+
}
|
|
7
|
+
return fontStyles.join(', ');
|
|
8
|
+
};
|
|
9
|
+
var getFontInfo = function getFontInfo(fileDetails, i18n) {
|
|
10
|
+
var _fileDetails$info, _fileDetailsInfoCusto, _fileDetailsInfoCusto2;
|
|
11
|
+
var fileDetailsInfoCustom = fileDetails === null || fileDetails === void 0 ? void 0 : (_fileDetails$info = fileDetails.info) === null || _fileDetails$info === void 0 ? void 0 : _fileDetails$info.custom;
|
|
12
|
+
if (!fileDetailsInfoCustom) {
|
|
13
|
+
return [];
|
|
14
|
+
}
|
|
15
|
+
return [{
|
|
16
|
+
key: 'Font-family',
|
|
17
|
+
placeholder: "".concat(i18n('explorerGeneralFileDetailsFontFamilyLabel'), "..."),
|
|
18
|
+
title: i18n('explorerGeneralFileDetailsFontFamilyLabel'),
|
|
19
|
+
type: 'text',
|
|
20
|
+
uuid: 'GENERAL-FONT_FAMILY',
|
|
21
|
+
value: fileDetailsInfoCustom === null || fileDetailsInfoCustom === void 0 ? void 0 : fileDetailsInfoCustom.family,
|
|
22
|
+
hide: !(fileDetailsInfoCustom !== null && fileDetailsInfoCustom !== void 0 && fileDetailsInfoCustom.family)
|
|
23
|
+
}, {
|
|
24
|
+
key: 'Font-style',
|
|
25
|
+
placeholder: "".concat(i18n('explorerGeneralFileDetailsFontStylesLabel', {
|
|
26
|
+
smart_count: fileDetailsInfoCustom === null || fileDetailsInfoCustom === void 0 ? void 0 : (_fileDetailsInfoCusto = fileDetailsInfoCustom.style) === null || _fileDetailsInfoCusto === void 0 ? void 0 : _fileDetailsInfoCusto.length
|
|
27
|
+
}), "..."),
|
|
28
|
+
title: i18n('explorerGeneralFileDetailsFontStylesLabel', {
|
|
29
|
+
smart_count: fileDetailsInfoCustom === null || fileDetailsInfoCustom === void 0 ? void 0 : (_fileDetailsInfoCusto2 = fileDetailsInfoCustom.style) === null || _fileDetailsInfoCusto2 === void 0 ? void 0 : _fileDetailsInfoCusto2.length
|
|
30
|
+
}),
|
|
31
|
+
type: 'text',
|
|
32
|
+
uuid: 'GENERAL-FONT_STYLE',
|
|
33
|
+
value: getFontStyles(fileDetailsInfoCustom === null || fileDetailsInfoCustom === void 0 ? void 0 : fileDetailsInfoCustom.style),
|
|
34
|
+
hide: !(fileDetailsInfoCustom !== null && fileDetailsInfoCustom !== void 0 && fileDetailsInfoCustom.style)
|
|
35
|
+
}, {
|
|
36
|
+
key: 'Font-kerning',
|
|
37
|
+
placeholder: "".concat(i18n('explorerGeneralFileDetailsFontKerningLabel'), "..."),
|
|
38
|
+
title: i18n('explorerGeneralFileDetailsFontKerningLabel'),
|
|
39
|
+
type: 'text',
|
|
40
|
+
uuid: 'GENERAL-FONT_KERNING',
|
|
41
|
+
value: fileDetailsInfoCustom === null || fileDetailsInfoCustom === void 0 ? void 0 : fileDetailsInfoCustom.kerning,
|
|
42
|
+
hide: !(fileDetailsInfoCustom !== null && fileDetailsInfoCustom !== void 0 && fileDetailsInfoCustom.kerning)
|
|
43
|
+
}, {
|
|
44
|
+
key: 'Font-stretch',
|
|
45
|
+
placeholder: "".concat(i18n('explorerGeneralFileDetailsFontStretchLabel'), "..."),
|
|
46
|
+
title: i18n('explorerGeneralFileDetailsFontStretchLabel'),
|
|
47
|
+
type: 'text',
|
|
48
|
+
uuid: 'GENERAL-FONT_STRETCH',
|
|
49
|
+
value: fileDetailsInfoCustom === null || fileDetailsInfoCustom === void 0 ? void 0 : fileDetailsInfoCustom.stretch,
|
|
50
|
+
hide: !(fileDetailsInfoCustom !== null && fileDetailsInfoCustom !== void 0 && fileDetailsInfoCustom.stretch)
|
|
51
|
+
}, {
|
|
52
|
+
key: 'Font-variant',
|
|
53
|
+
placeholder: "".concat(i18n('explorerGeneralFileDetailsFontVariantLabel'), "..."),
|
|
54
|
+
title: i18n('explorerGeneralFileDetailsFontVariantLabel'),
|
|
55
|
+
type: 'text',
|
|
56
|
+
uuid: 'GENERAL-FONT_VARIANT',
|
|
57
|
+
value: fileDetailsInfoCustom === null || fileDetailsInfoCustom === void 0 ? void 0 : fileDetailsInfoCustom.variant,
|
|
58
|
+
hide: !(fileDetailsInfoCustom !== null && fileDetailsInfoCustom !== void 0 && fileDetailsInfoCustom.variant)
|
|
59
|
+
}, {
|
|
60
|
+
key: 'Font-weight',
|
|
61
|
+
placeholder: "".concat(i18n('explorerGeneralFileDetailsFontWeightLabel'), "..."),
|
|
62
|
+
title: i18n('explorerGeneralFileDetailsFontWeightLabel'),
|
|
63
|
+
type: 'text',
|
|
64
|
+
uuid: 'GENERAL-FONT_WEIGHT',
|
|
65
|
+
value: fileDetailsInfoCustom === null || fileDetailsInfoCustom === void 0 ? void 0 : fileDetailsInfoCustom.weight,
|
|
66
|
+
hide: !(fileDetailsInfoCustom !== null && fileDetailsInfoCustom !== void 0 && fileDetailsInfoCustom.weight)
|
|
67
|
+
}, {
|
|
68
|
+
key: 'Is-variable',
|
|
69
|
+
placeholder: "".concat(i18n('explorerGeneralFileDetailsIsVariableLabel'), "..."),
|
|
70
|
+
title: i18n('explorerGeneralFileDetailsIsVariableLabel'),
|
|
71
|
+
type: 'text',
|
|
72
|
+
uuid: 'GENERAL-Is-variable',
|
|
73
|
+
value: capitalizeFirstLetter(JSON.stringify(fileDetailsInfoCustom === null || fileDetailsInfoCustom === void 0 ? void 0 : fileDetailsInfoCustom.variable)),
|
|
74
|
+
hide: !JSON.stringify(fileDetailsInfoCustom === null || fileDetailsInfoCustom === void 0 ? void 0 : fileDetailsInfoCustom.variable),
|
|
75
|
+
labelIconTooltip: i18n('explorerGeneralFileDetailsIsVariableHint')
|
|
76
|
+
}];
|
|
77
|
+
};
|
|
78
|
+
export default getFontInfo;
|