@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.
Files changed (564) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/style.css +2197 -0
  3. package/dist/style.min.css +1 -0
  4. package/lib/Explorer.styled.js +48 -0
  5. package/lib/components/ActionBar/ActionBar.styled.js +103 -0
  6. package/lib/components/ActionBar/DownloadWithExportButton.js +203 -0
  7. package/lib/components/ActionBar/SelectionMenu.js +111 -0
  8. package/lib/components/ActionBar/index.js +105 -0
  9. package/lib/components/AddFilesPanel/AddFiles.js +183 -0
  10. package/lib/components/AddFilesPanel/AddFiles.styled.js +137 -0
  11. package/lib/components/AddFilesPanel/index.js +59 -0
  12. package/lib/components/AiSwitcher/AiSwitcher.constants.js +1 -0
  13. package/lib/components/AiSwitcher/AiSwitcher.styled.js +24 -0
  14. package/lib/components/AiSwitcher/index.js +81 -0
  15. package/lib/components/AssetsList/AssetsList.styled.js +217 -0
  16. package/lib/components/AssetsList/GridView/FilesAccordion.js +76 -0
  17. package/lib/components/AssetsList/GridView/FilesSection/FileCell.js +260 -0
  18. package/lib/components/AssetsList/GridView/FilesSection/FileOverlayOptions.js +140 -0
  19. package/lib/components/AssetsList/GridView/FilesSection/FilesSection.styled.js +15 -0
  20. package/lib/components/AssetsList/GridView/FilesSection/index.js +31 -0
  21. package/lib/components/AssetsList/GridView/FilesSkeleton.js +47 -0
  22. package/lib/components/AssetsList/GridView/FoldersSection/FolderCell.js +239 -0
  23. package/lib/components/AssetsList/GridView/FoldersSection/FolderPreviewGrid.js +106 -0
  24. package/lib/components/AssetsList/GridView/FoldersSection/FolderTopOptions.js +70 -0
  25. package/lib/components/AssetsList/GridView/FoldersSection/index.js +23 -0
  26. package/lib/components/AssetsList/GridView/FoldersSkeleton.js +77 -0
  27. package/lib/components/AssetsList/GridView/GridView.styled.js +11 -0
  28. package/lib/components/AssetsList/GridView/SearchGridView/SearchGridView.styled.js +15 -0
  29. package/lib/components/AssetsList/GridView/SearchGridView/SearchGridViewSkeleton.js +30 -0
  30. package/lib/components/AssetsList/GridView/SearchGridView/index.js +97 -0
  31. package/lib/components/AssetsList/GridView/index.js +196 -0
  32. package/lib/components/AssetsList/ListView/AssetsSection/AssetsSectionTableHeader.js +152 -0
  33. package/lib/components/AssetsList/ListView/AssetsSection/AssetsSectionTableRow.js +333 -0
  34. package/lib/components/AssetsList/ListView/AssetsSection/index.js +99 -0
  35. package/lib/components/AssetsList/ListView/ColumnsMenu.js +89 -0
  36. package/lib/components/AssetsList/ListView/FilesAccordion.js +74 -0
  37. package/lib/components/AssetsList/ListView/FilesSkeleton.js +68 -0
  38. package/lib/components/AssetsList/ListView/FoldersSection/FoldersSectionTableHeader.js +98 -0
  39. package/lib/components/AssetsList/ListView/FoldersSection/FoldersSectionTableRow.js +156 -0
  40. package/lib/components/AssetsList/ListView/FoldersSection/index.js +54 -0
  41. package/lib/components/AssetsList/ListView/FoldersSkeleton.js +67 -0
  42. package/lib/components/AssetsList/ListView/ListView.styled.js +181 -0
  43. package/lib/components/AssetsList/ListView/ListView.utils.js +30 -0
  44. package/lib/components/AssetsList/ListView/SearchListView/index.js +109 -0
  45. package/lib/components/AssetsList/ListView/index.js +203 -0
  46. package/lib/components/AssetsList/ScrollToTop.js +70 -0
  47. package/lib/components/AssetsList/SearchView.hook.js +241 -0
  48. package/lib/components/AssetsList/__SearchTestPannel.js +238 -0
  49. package/lib/components/AssetsList/__SearchTestPannel.mock.js +1 -0
  50. package/lib/components/AssetsList/index.js +266 -0
  51. package/lib/components/AssetsList/relevanceBadge.js +15 -0
  52. package/lib/components/AssetsView/AssetsView.styled.js +25 -0
  53. package/lib/components/AssetsView/AssetsView.thunks.js +64 -0
  54. package/lib/components/AssetsView/index.js +142 -0
  55. package/lib/components/AuthExplorerView.js +79 -0
  56. package/lib/components/Breadcrumbs/BreadCrumbViews/BreadCrumbsViews.styled.js +30 -0
  57. package/lib/components/Breadcrumbs/BreadCrumbViews/index.js +32 -0
  58. package/lib/components/Breadcrumbs/Breadcrumb.js +52 -0
  59. package/lib/components/Breadcrumbs/Breadcrumbs.styled.js +81 -0
  60. package/lib/components/Breadcrumbs/BreadcrumbsSkeleton.js +12 -0
  61. package/lib/components/Breadcrumbs/index.js +187 -0
  62. package/lib/components/BulkEditPanel/BulkEdit.js +330 -0
  63. package/lib/components/BulkEditPanel/BulkEditPanel.styled.js +62 -0
  64. package/lib/components/BulkEditPanel/BulkEditPanel.utils.js +55 -0
  65. package/lib/components/BulkEditPanel/components/AssetsList/AssetsList.constants.js +29 -0
  66. package/lib/components/BulkEditPanel/components/AssetsList/AssetsList.js +148 -0
  67. package/lib/components/BulkEditPanel/components/AssetsList/AssetsList.styled.js +81 -0
  68. package/lib/components/BulkEditPanel/components/AssetsList/Columns/Columns.styled.js +99 -0
  69. package/lib/components/BulkEditPanel/components/AssetsList/Columns/FileMetadataField.js +263 -0
  70. package/lib/components/BulkEditPanel/components/AssetsList/Columns/FileTagField.js +228 -0
  71. package/lib/components/BulkEditPanel/components/AssetsList/Columns/FileTextField.js +107 -0
  72. package/lib/components/BulkEditPanel/components/AssetsList/Columns/MetadataColumn.js +142 -0
  73. package/lib/components/BulkEditPanel/components/AssetsList/Columns/TableRow.js +139 -0
  74. package/lib/components/BulkEditPanel/components/AssetsList/Columns/TagsColumn.js +58 -0
  75. package/lib/components/BulkEditPanel/components/AssetsList/Columns/TagsField.js +80 -0
  76. package/lib/components/BulkEditPanel/components/AssetsList/Columns/TextColumn.js +53 -0
  77. package/lib/components/BulkEditPanel/components/AssetsList/Columns/columns.utils.js +272 -0
  78. package/lib/components/BulkEditPanel/components/AssetsList/Columns/getActiveColumn.js +23 -0
  79. package/lib/components/BulkEditPanel/components/AssetsList/FloatyPreview.js +55 -0
  80. package/lib/components/BulkEditPanel/components/AssetsList/FloatyPreview.styled.js +21 -0
  81. package/lib/components/BulkEditPanel/components/AssetsList/TableBody.js +64 -0
  82. package/lib/components/BulkEditPanel/components/AssetsList/TableHeader.js +67 -0
  83. package/lib/components/BulkEditPanel/components/BulkEditFooter.js +33 -0
  84. package/lib/components/BulkEditPanel/components/ConfirmationModal/ConfirmationModal.js +47 -0
  85. package/lib/components/BulkEditPanel/components/ConfirmationModal/ConfirmationModal.styled.js +25 -0
  86. package/lib/components/BulkEditPanel/components/MainContent/MainContent.js +110 -0
  87. package/lib/components/BulkEditPanel/components/MainContent/MainContent.styled.js +12 -0
  88. package/lib/components/BulkEditPanel/components/MainContent/index.js +2 -0
  89. package/lib/components/BulkEditPanel/components/Sidebar/Sidebar.styled.js +53 -0
  90. package/lib/components/BulkEditPanel/components/Sidebar/Sidebar.utils.js +28 -0
  91. package/lib/components/BulkEditPanel/components/Sidebar/index.js +158 -0
  92. package/lib/components/BulkEditPanel/components/Tabs/Metadata/Metadata.js +246 -0
  93. package/lib/components/BulkEditPanel/components/Tabs/Metadata/Metadata.styled.js +17 -0
  94. package/lib/components/BulkEditPanel/components/Tabs/Tags/Tags.js +222 -0
  95. package/lib/components/BulkEditPanel/components/Tabs/Tags/Tags.mixin.js +20 -0
  96. package/lib/components/BulkEditPanel/components/Tabs/Tags/Tags.styled.js +123 -0
  97. package/lib/components/BulkEditPanel/components/Tabs/Tags/TagsContianer.js +31 -0
  98. package/lib/components/BulkEditPanel/components/Tabs/Tags/TagsPaper.js +95 -0
  99. package/lib/components/BulkEditPanel/components/Tabs/Text/Text.js +167 -0
  100. package/lib/components/BulkEditPanel/components/Tabs/Text/Text.styled.js +15 -0
  101. package/lib/components/BulkEditPanel/components/Tabs/tabs.constants.js +113 -0
  102. package/lib/components/BulkEditPanel/components/Tabs/tabs.js +43 -0
  103. package/lib/components/BulkEditPanel/components/Tabs/tabs.utils.js +239 -0
  104. package/lib/components/BulkEditPanel/index.js +28 -0
  105. package/lib/components/ContextMenu/BeforeUploadMenu/index.js +51 -0
  106. package/lib/components/ContextMenu/ContextMenu.constants.js +64 -0
  107. package/lib/components/ContextMenu/ContextMenu.hooks.js +35 -0
  108. package/lib/components/ContextMenu/ContextMenu.styled.js +107 -0
  109. package/lib/components/ContextMenu/ContextMenuContent.js +202 -0
  110. package/lib/components/ContextMenu/ContextMenuItem.js +142 -0
  111. package/lib/components/ContextMenu/FileMenu/CollaborateSection/index.js +33 -0
  112. package/lib/components/ContextMenu/FileMenu/DeleteSection/index.js +25 -0
  113. package/lib/components/ContextMenu/FileMenu/EditSection/index.js +42 -0
  114. package/lib/components/ContextMenu/FileMenu/FindSection/index.js +29 -0
  115. package/lib/components/ContextMenu/FileMenu/index.js +15 -0
  116. package/lib/components/ContextMenu/FolderMenu/CollaborateSection/index.js +17 -0
  117. package/lib/components/ContextMenu/FolderMenu/DeleteSection/index.js +41 -0
  118. package/lib/components/ContextMenu/FolderMenu/EditSection/index.js +49 -0
  119. package/lib/components/ContextMenu/FolderMenu/FindSection/index.js +49 -0
  120. package/lib/components/ContextMenu/FolderMenu/FolderMenu.utils.js +31 -0
  121. package/lib/components/ContextMenu/FolderMenu/index.js +14 -0
  122. package/lib/components/ContextMenu/MenuOptions/AddVariationOption.js +59 -0
  123. package/lib/components/ContextMenu/MenuOptions/BulkEditOption.js +47 -0
  124. package/lib/components/ContextMenu/MenuOptions/CdnLinkOption.js +54 -0
  125. package/lib/components/ContextMenu/MenuOptions/DeleteOption.js +70 -0
  126. package/lib/components/ContextMenu/MenuOptions/DownloadOption.js +88 -0
  127. package/lib/components/ContextMenu/MenuOptions/EditImageOption.js +63 -0
  128. package/lib/components/ContextMenu/MenuOptions/EditVideoOption.js +87 -0
  129. package/lib/components/ContextMenu/MenuOptions/LocateFileOption.js +45 -0
  130. package/lib/components/ContextMenu/MenuOptions/ManagaAccessOption.js +67 -0
  131. package/lib/components/ContextMenu/MenuOptions/ManageDetailsOption.js +52 -0
  132. package/lib/components/ContextMenu/MenuOptions/MoveOption.js +54 -0
  133. package/lib/components/ContextMenu/MenuOptions/PreviewOption.js +35 -0
  134. package/lib/components/ContextMenu/MenuOptions/RenameOption.js +66 -0
  135. package/lib/components/ContextMenu/MenuOptions/TransformationOption.js +63 -0
  136. package/lib/components/ContextMenu/MultipleMenu/CollaborateSection/index.js +31 -0
  137. package/lib/components/ContextMenu/MultipleMenu/DeleteSection/index.js +6 -0
  138. package/lib/components/ContextMenu/MultipleMenu/EditSection/index.js +14 -0
  139. package/lib/components/ContextMenu/MultipleMenu/FindSection/index.js +14 -0
  140. package/lib/components/ContextMenu/MultipleMenu/index.js +14 -0
  141. package/lib/components/ContextMenu/SharedMenus/DownloadFolderSubMenu.js +36 -0
  142. package/lib/components/ContextMenu/SharedMenus/DownloadSubMenu.js +70 -0
  143. package/lib/components/ContextMenu/index.js +34 -0
  144. package/lib/components/ContextMenu/utils/calculateMenuHeight.js +20 -0
  145. package/lib/components/ContextMenu/utils/calculateMenuPosition.js +42 -0
  146. package/lib/components/ContextMenu/utils/createSeparator.js +14 -0
  147. package/lib/components/ContextMenu/utils/editMedia.js +17 -0
  148. package/lib/components/ContextMenu/utils/getFileLocation.js +8 -0
  149. package/lib/components/ContextMenu/utils/getFilteredOptions.js +20 -0
  150. package/lib/components/ContextMenu/utils/getProperFolderSelections.js +7 -0
  151. package/lib/components/ContextMenu/utils/isEmptyFolderSelection.js +5 -0
  152. package/lib/components/ContextMenu/utils/isFileContextMenu.js +5 -0
  153. package/lib/components/ContextMenu/utils/isFirstFileVisibilityPublic.js +9 -0
  154. package/lib/components/ContextMenu/utils/isMenuItemVisible.js +5 -0
  155. package/lib/components/ContextMenu/utils/isMixedFiles.js +9 -0
  156. package/lib/components/ContextMenu/utils/isMultipleSelection.js +6 -0
  157. package/lib/components/ContextMenu/utils/isSeparatorHidden.js +7 -0
  158. package/lib/components/ContextMenu/utils/triggerDownload.js +45 -0
  159. package/lib/components/CropPanel/CropOptions.js +155 -0
  160. package/lib/components/CropPanel/CropPanel.constants.js +44 -0
  161. package/lib/components/CropPanel/CropPanel.styled.js +107 -0
  162. package/lib/components/CropPanel/CropPanel.utils.js +48 -0
  163. package/lib/components/CropPanel/CropPanelContent.js +209 -0
  164. package/lib/components/CropPanel/ImageOptions.js +326 -0
  165. package/lib/components/CropPanel/ImageResize.js +207 -0
  166. package/lib/components/CropPanel/Option.js +113 -0
  167. package/lib/components/CropPanel/index.js +22 -0
  168. package/lib/components/Details/Details.constants.js +75 -0
  169. package/lib/components/Details/Details.utils.js +232 -0
  170. package/lib/components/Details/DetailsSideBar.styled.js +139 -0
  171. package/lib/components/Details/EditActionButtons/EditActionButtons.styled.js +27 -0
  172. package/lib/components/Details/EditActionButtons/index.js +38 -0
  173. package/lib/components/Details/FileDetails.js +31 -0
  174. package/lib/components/Details/FileItem/CustomMetadataTab.js +50 -0
  175. package/lib/components/Details/FileItem/FileItem.styled.js +47 -0
  176. package/lib/components/Details/FileItem/GeneralTab.js +113 -0
  177. package/lib/components/Details/FileItem/SharedFileEditData.js +97 -0
  178. package/lib/components/Details/FileItem/index.js +2 -0
  179. package/lib/components/Details/FolderDetails.js +138 -0
  180. package/lib/components/Details/FolderItemList/FolderListItem.js +77 -0
  181. package/lib/components/Details/FolderItemList/index.js +62 -0
  182. package/lib/components/Details/MultiItemsDetails.js +69 -0
  183. package/lib/components/Details/MultipleItems.js +71 -0
  184. package/lib/components/Details/TabChips.js +51 -0
  185. package/lib/components/Details/TabPanels.js +42 -0
  186. package/lib/components/Details/Title.js +52 -0
  187. package/lib/components/Details/index.js +53 -0
  188. package/lib/components/DnD/Dnd.styled.js +11 -0
  189. package/lib/components/DnD/DragImage.js +61 -0
  190. package/lib/components/DnD/index.js +219 -0
  191. package/lib/components/Drawer/Drawer.styled.js +45 -0
  192. package/lib/components/Drawer/Drawer.utils.js +163 -0
  193. package/lib/components/Drawer/Resizer.js +141 -0
  194. package/lib/components/Drawer/ResizerCore.js +213 -0
  195. package/lib/components/Drawer/index.js +68 -0
  196. package/lib/components/EmptyViewPlaceholder/EmptyViewPlaceholder.styled.js +39 -0
  197. package/lib/components/EmptyViewPlaceholder/index.js +58 -0
  198. package/lib/components/ExploreView.js +46 -0
  199. package/lib/components/ExplorerUI.js +17 -0
  200. package/lib/components/ExplorerWrapper.js +114 -0
  201. package/lib/components/FacetedSearch/DrawerBody/index.js +42 -0
  202. package/lib/components/FacetedSearch/DrawerWrapper/index.js +83 -0
  203. package/lib/components/FacetedSearch/FacetedSearch.constants.js +27 -0
  204. package/lib/components/FacetedSearch/FacetedSearch.styled.js +101 -0
  205. package/lib/components/FacetedSearch/FacetedSearch.utils.js +3 -0
  206. package/lib/components/FacetedSearch/Field/Date.js +69 -0
  207. package/lib/components/FacetedSearch/Field/Placeholder.js +20 -0
  208. package/lib/components/FacetedSearch/Field/Select.js +136 -0
  209. package/lib/components/FacetedSearch/Field/Switch.js +59 -0
  210. package/lib/components/FacetedSearch/Field/index.js +27 -0
  211. package/lib/components/FacetedSearch/GroupWrapper/index.js +129 -0
  212. package/lib/components/FacetedSearch/StaticFields/Date.js +152 -0
  213. package/lib/components/FacetedSearch/index.js +12 -0
  214. package/lib/components/FileItem/FileInfo/FileInfo.styled.js +126 -0
  215. package/lib/components/FileItem/FileInfo/FileInfo.utils.js +13 -0
  216. package/lib/components/FileItem/FileInfo/FileMetadata.js +37 -0
  217. package/lib/components/FileItem/FileInfo/FileName.js +197 -0
  218. package/lib/components/FileItem/FileInfo/index.js +194 -0
  219. package/lib/components/FileItem/FileItem.mixin.js +22 -0
  220. package/lib/components/FileItem/FileItem.styled.js +54 -0
  221. package/lib/components/FileItem/FileUploadTopOptions.js +87 -0
  222. package/lib/components/FileItem/PreUploadFileThumbnail/FileThumbnail.js +61 -0
  223. package/lib/components/FileItem/PreUploadFileThumbnail/PreUploadFileThumbnail.styled.js +8 -0
  224. package/lib/components/FileItem/PreUploadFileThumbnail/index.js +27 -0
  225. package/lib/components/FileItem/index.js +164 -0
  226. package/lib/components/FileWindowPanel/Body/ActionButtons.js +70 -0
  227. package/lib/components/FileWindowPanel/Body/Body.constants.js +5 -0
  228. package/lib/components/FileWindowPanel/Body/Body.styled.js +196 -0
  229. package/lib/components/FileWindowPanel/Body/BodyFile.js +165 -0
  230. package/lib/components/FileWindowPanel/Body/Footer.js +60 -0
  231. package/lib/components/FileWindowPanel/Body/Preview.js +232 -0
  232. package/lib/components/FileWindowPanel/Body/PreviewPlaceholder.js +20 -0
  233. package/lib/components/FileWindowPanel/Body/VideoEmbed.js +80 -0
  234. package/lib/components/FileWindowPanel/Body/index.js +108 -0
  235. package/lib/components/FileWindowPanel/FileTabs/FileTabButtons.js +98 -0
  236. package/lib/components/FileWindowPanel/FileTabs/FileTabs.constants.js +50 -0
  237. package/lib/components/FileWindowPanel/FileTabs/FileTabs.styled.js +99 -0
  238. package/lib/components/FileWindowPanel/FileTabs/FileTabsList.js +91 -0
  239. package/lib/components/FileWindowPanel/FileTabs/GeneralTab/EditableField.js +78 -0
  240. package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldLabel.js +40 -0
  241. package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldRow.js +57 -0
  242. package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldValue.js +20 -0
  243. package/lib/components/FileWindowPanel/FileTabs/GeneralTab/FieldWithTooltip.js +29 -0
  244. package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralSection.js +183 -0
  245. package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralTab.constants.js +2 -0
  246. package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralTab.styled.js +112 -0
  247. package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralTabSkeleton.js +70 -0
  248. package/lib/components/FileWindowPanel/FileTabs/GeneralTab/TableSeparator.js +10 -0
  249. package/lib/components/FileWindowPanel/FileTabs/GeneralTab/index.js +100 -0
  250. package/lib/components/FileWindowPanel/FileTabs/MetadataTab/CustomMetadataSection.js +247 -0
  251. package/lib/components/FileWindowPanel/FileTabs/MetadataTab/EmbeddedMetadataSection.js +31 -0
  252. package/lib/components/FileWindowPanel/FileTabs/MetadataTab/MetadataTab.constants.js +2 -0
  253. package/lib/components/FileWindowPanel/FileTabs/MetadataTab/MetadataTab.styled.js +134 -0
  254. package/lib/components/FileWindowPanel/FileTabs/MetadataTab/MetadataTabSkeleton.js +70 -0
  255. package/lib/components/FileWindowPanel/FileTabs/MetadataTab/index.js +181 -0
  256. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationItem.js +78 -0
  257. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.constants.js +26 -0
  258. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.styled.js +177 -0
  259. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.thunks.js +99 -0
  260. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.utils.js +23 -0
  261. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsContent.js +92 -0
  262. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsEditModalContent.js +57 -0
  263. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsSearch.js +44 -0
  264. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsSkeleton.js +35 -0
  265. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTabNavigator.js +41 -0
  266. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTabs.js +40 -0
  267. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTopOptions.js +204 -0
  268. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/index.js +603 -0
  269. package/lib/components/FileWindowPanel/FileTabs/index.js +83 -0
  270. package/lib/components/FileWindowPanel/FileWindow.js +221 -0
  271. package/lib/components/FileWindowPanel/FileWindow.styled.js +19 -0
  272. package/lib/components/FileWindowPanel/FileWindow.utils.js +38 -0
  273. package/lib/components/FileWindowPanel/Header/AfterUploadActionBtns.js +69 -0
  274. package/lib/components/FileWindowPanel/Header/BeforeUploadActionBtns.js +100 -0
  275. package/lib/components/FileWindowPanel/Header/FileWindowHeader.styled.js +56 -0
  276. package/lib/components/FileWindowPanel/Header/MutualActionBtns.js +92 -0
  277. package/lib/components/FileWindowPanel/Header/index.js +109 -0
  278. package/lib/components/FileWindowPanel/index.js +60 -0
  279. package/lib/components/Filters/Filters.constants.js +358 -0
  280. package/lib/components/Filters/Filters.styled.js +235 -0
  281. package/lib/components/Filters/Filters.utils.js +536 -0
  282. package/lib/components/Filters/FiltersContext.js +59 -0
  283. package/lib/components/Filters/FiltersSkeleton.js +14 -0
  284. package/lib/components/Filters/Groups/Date/index.js +201 -0
  285. package/lib/components/Filters/Groups/Folders/FoldersSkeleton.js +43 -0
  286. package/lib/components/Filters/Groups/Folders/index.js +109 -0
  287. package/lib/components/Filters/Groups/Image/Colors.js +73 -0
  288. package/lib/components/Filters/Groups/Image/Faces.js +64 -0
  289. package/lib/components/Filters/Groups/Image/Orientations.js +64 -0
  290. package/lib/components/Filters/Groups/Image/Resolutions.js +65 -0
  291. package/lib/components/Filters/Groups/Image/Tooltip.js +14 -0
  292. package/lib/components/Filters/Groups/Image/index.js +104 -0
  293. package/lib/components/Filters/Groups/LicenseExpiry/LicenseExpiry.styled.js +17 -0
  294. package/lib/components/Filters/Groups/LicenseExpiry/index.js +97 -0
  295. package/lib/components/Filters/Groups/Metadata/Advanced/ConditionSelector.js +40 -0
  296. package/lib/components/Filters/Groups/Metadata/Advanced/ExtraRow/ConditionSelector.js +35 -0
  297. package/lib/components/Filters/Groups/Metadata/Advanced/ExtraRow/ValueSelector.js +33 -0
  298. package/lib/components/Filters/Groups/Metadata/Advanced/ExtraRow/index.js +18 -0
  299. package/lib/components/Filters/Groups/Metadata/Advanced/Field/AutoComplete.js +56 -0
  300. package/lib/components/Filters/Groups/Metadata/Advanced/Field/Boolean.js +35 -0
  301. package/lib/components/Filters/Groups/Metadata/Advanced/Field/Date.js +36 -0
  302. package/lib/components/Filters/Groups/Metadata/Advanced/Field/GeoPointField.js +30 -0
  303. package/lib/components/Filters/Groups/Metadata/Advanced/Field/Numeric.js +32 -0
  304. package/lib/components/Filters/Groups/Metadata/Advanced/Field/Select.js +55 -0
  305. package/lib/components/Filters/Groups/Metadata/Advanced/Field/Tags.js +21 -0
  306. package/lib/components/Filters/Groups/Metadata/Advanced/Field/Text.js +39 -0
  307. package/lib/components/Filters/Groups/Metadata/Advanced/Field/index.js +52 -0
  308. package/lib/components/Filters/Groups/Metadata/Advanced/KeySelector.js +34 -0
  309. package/lib/components/Filters/Groups/Metadata/Advanced/Row.js +53 -0
  310. package/lib/components/Filters/Groups/Metadata/Advanced/index.js +48 -0
  311. package/lib/components/Filters/Groups/Metadata/Basic/Field/Date.js +45 -0
  312. package/lib/components/Filters/Groups/Metadata/Basic/Field/Field.utils.js +58 -0
  313. package/lib/components/Filters/Groups/Metadata/Basic/Field/Numeric.js +51 -0
  314. package/lib/components/Filters/Groups/Metadata/Basic/Field/OptionsPopup.js +87 -0
  315. package/lib/components/Filters/Groups/Metadata/Basic/Field/Select.js +168 -0
  316. package/lib/components/Filters/Groups/Metadata/Basic/Field/Switch.js +41 -0
  317. package/lib/components/Filters/Groups/Metadata/Basic/Field/Tags.js +38 -0
  318. package/lib/components/Filters/Groups/Metadata/Basic/Field/Text.js +57 -0
  319. package/lib/components/Filters/Groups/Metadata/Basic/Field/Uri.js +54 -0
  320. package/lib/components/Filters/Groups/Metadata/Basic/Field/index.js +46 -0
  321. package/lib/components/Filters/Groups/Metadata/Basic/GroupWrapper.js +79 -0
  322. package/lib/components/Filters/Groups/Metadata/Basic/index.js +80 -0
  323. package/lib/components/Filters/Groups/Metadata/Metadata.constants.js +42 -0
  324. package/lib/components/Filters/Groups/Metadata/Metadata.styled.js +150 -0
  325. package/lib/components/Filters/Groups/Metadata/Metadata.utils.js +160 -0
  326. package/lib/components/Filters/Groups/Metadata/MetadataFiltersContext.js +329 -0
  327. package/lib/components/Filters/Groups/Metadata/Placeholder.js +25 -0
  328. package/lib/components/Filters/Groups/Metadata/common/TagsField/TagsMenu.js +81 -0
  329. package/lib/components/Filters/Groups/Metadata/common/TagsField/TagsSearchPlaceholder.js +18 -0
  330. package/lib/components/Filters/Groups/Metadata/common/TagsField/index.js +142 -0
  331. package/lib/components/Filters/Groups/Metadata/index.js +111 -0
  332. package/lib/components/Filters/Groups/Size/index.js +125 -0
  333. package/lib/components/Filters/Groups/Tags/FilteredTags.js +62 -0
  334. package/lib/components/Filters/Groups/Tags/SelectedTags.js +51 -0
  335. package/lib/components/Filters/Groups/Tags/SuggestedTags.js +43 -0
  336. package/lib/components/Filters/Groups/Tags/index.js +146 -0
  337. package/lib/components/Filters/Groups/TypeAndFormat/Format.js +65 -0
  338. package/lib/components/Filters/Groups/TypeAndFormat/Type.js +85 -0
  339. package/lib/components/Filters/Groups/TypeAndFormat/index.js +114 -0
  340. package/lib/components/Filters/Groups/common/DateRangeField/DateRangeField.styled.js +10 -0
  341. package/lib/components/Filters/Groups/common/DateRangeField/index.js +72 -0
  342. package/lib/components/Filters/Groups/common/FilterFooter.js +67 -0
  343. package/lib/components/Filters/Groups/common/FilterOptions.js +29 -0
  344. package/lib/components/Filters/Groups/common/FilterSearch.js +22 -0
  345. package/lib/components/Filters/Groups/common/FilterSearch.styled.js +15 -0
  346. package/lib/components/Filters/Groups/common/FilterSkeleton.js +44 -0
  347. package/lib/components/Filters/Groups/common/TimeFrames.js +35 -0
  348. package/lib/components/Filters/Groups/index.js +55 -0
  349. package/lib/components/Filters/Placeholder.js +29 -0
  350. package/lib/components/Filters/hooks/useDateTypeFilterValues.js +182 -0
  351. package/lib/components/Filters/hooks/useFilters.js +78 -0
  352. package/lib/components/Filters/index.js +78 -0
  353. package/lib/components/FoldersView/FoldersTree/FoldersTree.styled.js +193 -0
  354. package/lib/components/FoldersView/FoldersTree/FoldersTree.utils.js +78 -0
  355. package/lib/components/FoldersView/FoldersTree/FoldersTreeHeader.js +52 -0
  356. package/lib/components/FoldersView/FoldersTree/FoldersTreeList.js +64 -0
  357. package/lib/components/FoldersView/FoldersTree/FoldersTreeListItem.js +270 -0
  358. package/lib/components/FoldersView/FoldersTree/FoldersTreeSearch.js +70 -0
  359. package/lib/components/FoldersView/FoldersTree/FoldersTreeSkeleton.js +23 -0
  360. package/lib/components/FoldersView/FoldersTree/NoFoldersResult.js +19 -0
  361. package/lib/components/FoldersView/FoldersTree/SearchedFoldersItem.js +113 -0
  362. package/lib/components/FoldersView/FoldersTree/index.js +163 -0
  363. package/lib/components/FoldersView/hooks/useAddFolder.js +60 -0
  364. package/lib/components/FoldersView/index.js +282 -0
  365. package/lib/components/GalleryRoleSelect/CustomRolesTab.js +47 -0
  366. package/lib/components/GalleryRoleSelect/CustomRolesTab.styled.js +10 -0
  367. package/lib/components/GalleryRoleSelect/GalleryRoleSelect.constants.js +11 -0
  368. package/lib/components/GalleryRoleSelect/GalleryRoleSelect.styled.js +132 -0
  369. package/lib/components/GalleryRoleSelect/GalleryRoleSelect.utils.js +87 -0
  370. package/lib/components/GalleryRoleSelect/StandardRolesTab.js +58 -0
  371. package/lib/components/GalleryRoleSelect/index.js +234 -0
  372. package/lib/components/HeaderBar/FacetedSearchToggleButton.js +28 -0
  373. package/lib/components/HeaderBar/HeaderBar.styled.js +25 -0
  374. package/lib/components/HeaderBar/RightSide.js +127 -0
  375. package/lib/components/HeaderBar/index.js +77 -0
  376. package/lib/components/ImageEditorPanel/index.js +33 -0
  377. package/lib/components/InfiniteScroll/InfiniteScroll.js +97 -0
  378. package/lib/components/InfiniteScroll/InfiniteScroll.styled.js +11 -0
  379. package/lib/components/Informer/index.js +9 -0
  380. package/lib/components/LoginScreen/LoginScreen.styled.js +39 -0
  381. package/lib/components/LoginScreen/index.js +133 -0
  382. package/lib/components/MainMenu/MainMenu.styled.js +12 -0
  383. package/lib/components/MainMenu/index.js +77 -0
  384. package/lib/components/Modals/AddNewFolder/AddNewFolder.hooks.js +99 -0
  385. package/lib/components/Modals/AddNewFolder/index.js +1 -0
  386. package/lib/components/Modals/ConfirmationModal/ConfirmationModal.hooks.js +101 -0
  387. package/lib/components/Modals/ConfirmationModal/index.js +1 -0
  388. package/lib/components/Modals/DeleteItems/DeleteItems.hooks.js +233 -0
  389. package/lib/components/Modals/DeleteItems/index.js +1 -0
  390. package/lib/components/Modals/DeleteModal/DeleteModal.hooks.js +87 -0
  391. package/lib/components/Modals/DeleteModal/index.js +1 -0
  392. package/lib/components/Modals/DownloadConsent/DownlaodConsent.styled.js +8 -0
  393. package/lib/components/Modals/DownloadConsent/DownloadConsent.hooks.js +90 -0
  394. package/lib/components/Modals/DownloadConsent/DownloadConsentContent.js +52 -0
  395. package/lib/components/Modals/DownloadConsent/index.js +2 -0
  396. package/lib/components/Modals/Modals.js +386 -0
  397. package/lib/components/Modals/Modals.styled.js +80 -0
  398. package/lib/components/Modals/MoveItems/MoveItems.hooks.js +88 -0
  399. package/lib/components/Modals/MoveItems/index.js +1 -0
  400. package/lib/components/Modals/TransformedDownload/PdfModalContent.js +109 -0
  401. package/lib/components/Modals/TransformedDownload/TransformedDownload.hooks.js +188 -0
  402. package/lib/components/Modals/TransformedDownload/TransformedDownload.styled.js +29 -0
  403. package/lib/components/Modals/TransformedDownload/TransformedDownload.utils.js +46 -0
  404. package/lib/components/Modals/TransformedDownload/index.js +2 -0
  405. package/lib/components/Modals/index.js +8 -0
  406. package/lib/components/NoItems/NoItems.styled.js +54 -0
  407. package/lib/components/NoItems/index.js +50 -0
  408. package/lib/components/PdftronPanel/index.js +31 -0
  409. package/lib/components/PickerPanel/PickerPanel.styled.js +41 -0
  410. package/lib/components/PickerPanel/PickerPanelContent.js +100 -0
  411. package/lib/components/PickerPanel/index.js +21 -0
  412. package/lib/components/ProgressPanel/ProgressPanel.utils.js +29 -0
  413. package/lib/components/ProgressPanel/index.js +37 -0
  414. package/lib/components/TopBar/AppliedFilterChips/AppliedFilterChips.styled.js +11 -0
  415. package/lib/components/TopBar/AppliedFilterChips/index.js +77 -0
  416. package/lib/components/TopBar/Search/ContextDropdown/ContextDropdown.styled.js +59 -0
  417. package/lib/components/TopBar/Search/ContextDropdown/ContextDropdown.utils.js +67 -0
  418. package/lib/components/TopBar/Search/ContextDropdown/index.js +170 -0
  419. package/lib/components/TopBar/Search/PrependedOptions/TempFilterRegexInput.js +133 -0
  420. package/lib/components/TopBar/Search/Search.utils.js +88 -0
  421. package/lib/components/TopBar/Search/SimilarSearchTag.js +60 -0
  422. package/lib/components/TopBar/Search/index.js +251 -0
  423. package/lib/components/TopBar/TopBar.styled.js +37 -0
  424. package/lib/components/TopBar/index.js +61 -0
  425. package/lib/components/TopSection/TopSection.styled.js +22 -0
  426. package/lib/components/TopSection/index.js +58 -0
  427. package/lib/components/UploadBar/UploadBar.styled.js +84 -0
  428. package/lib/components/UploadBar/index.js +222 -0
  429. package/lib/components/UploadStatus/index.js +20 -0
  430. package/lib/components/UploadsPanel/UploadsList/Header.js +19 -0
  431. package/lib/components/UploadsPanel/UploadsList/List.js +29 -0
  432. package/lib/components/UploadsPanel/UploadsList/PreUploadPlugins.js +22 -0
  433. package/lib/components/UploadsPanel/UploadsList/UploadsList.styled.js +64 -0
  434. package/lib/components/UploadsPanel/UploadsList/UploadsList.utils.js +17 -0
  435. package/lib/components/UploadsPanel/UploadsList/UploadsVirtualGrid.js +29 -0
  436. package/lib/components/UploadsPanel/UploadsList/index.js +55 -0
  437. package/lib/components/UploadsPanel/UploadsPanel.styled.js +24 -0
  438. package/lib/components/UploadsPanel/UploadsPanelTopBar.js +16 -0
  439. package/lib/components/UploadsPanel/index.js +36 -0
  440. package/lib/components/UrlBuilderModal/UrlBuilderModal.styled.js +9 -0
  441. package/lib/components/UrlBuilderModal/index.js +97 -0
  442. package/lib/components/Views/ErroredViewPlaceholder.js +48 -0
  443. package/lib/components/Views/Views.constants.js +29 -0
  444. package/lib/components/Views/Views.styled.js +87 -0
  445. package/lib/components/Views/index.js +100 -0
  446. package/lib/components/common/DeleteModalItemText/DeleteModalItemText.styled.js +8 -0
  447. package/lib/components/common/DeleteModalItemText/index.js +29 -0
  448. package/lib/components/common/EditDetailsButton/EditDetailsButton.styled.js +35 -0
  449. package/lib/components/common/EditDetailsButton/index.js +28 -0
  450. package/lib/components/common/ExpiryDateTooltipContent/ExpiryDateTooltipContent.styled.js +16 -0
  451. package/lib/components/common/ExpiryDateTooltipContent/index.js +29 -0
  452. package/lib/components/common/FileApprovalsInfoPopup/index.js +46 -0
  453. package/lib/components/common/FileMetadataFieldValue/CustomMetadataFieldValue.js +48 -0
  454. package/lib/components/common/FileMetadataFieldValue/FileMetadataFieldValue.styled.js +66 -0
  455. package/lib/components/common/FileMetadataFieldValue/FileMetadataFieldValue.utils.js +315 -0
  456. package/lib/components/common/FileMetadataFieldValue/GeneralMetadataFieldValue.js +120 -0
  457. package/lib/components/common/FileMetadataFieldValue/index.js +26 -0
  458. package/lib/components/common/FileMetadataFieldValue/utils/getFontInfo.js +78 -0
  459. package/lib/components/common/FolderSelector/BrowseFoldersMenu.js +114 -0
  460. package/lib/components/common/FolderSelector/FolderSearchMenu.js +45 -0
  461. package/lib/components/common/FolderSelector/FolderSelector.styled.js +41 -0
  462. package/lib/components/common/FolderSelector/index.js +186 -0
  463. package/lib/components/common/FormattedUriLink/FormattedUriLink.styled.js +15 -0
  464. package/lib/components/common/FormattedUriLink/index.js +21 -0
  465. package/lib/components/common/OriginalBadge/OriginalBadge.styled.js +17 -0
  466. package/lib/components/common/OriginalBadge/index.js +14 -0
  467. package/lib/components/common/SanitizedHtmlElement/index.js +11 -0
  468. package/lib/components/common/Sort/Sort.constants.js +61 -0
  469. package/lib/components/common/Sort/Sort.styled.js +47 -0
  470. package/lib/components/common/Sort/Sort.utils.js +14 -0
  471. package/lib/components/common/Sort/index.js +183 -0
  472. package/lib/components/common/TextWithCopyIcon/TextWithCopyIcon.styled.js +44 -0
  473. package/lib/components/common/TextWithCopyIcon/index.js +71 -0
  474. package/lib/components/common/TopBarUploadButton/index.js +40 -0
  475. package/lib/components/common/TrimmedFilePathWithLocate/TrimmedFilePathWithLocate.utils.js +3 -0
  476. package/lib/components/common/TrimmedFilePathWithLocate/index.js +34 -0
  477. package/lib/components/common/TrimmedFolderPathWithLocate/index.js +13 -0
  478. package/lib/components/common/TrimmedPathWithLocate/TrimmedPathWithLocate.styled.js +30 -0
  479. package/lib/components/common/TrimmedPathWithLocate/index.js +40 -0
  480. package/lib/components/metadata.adapter.js +365 -0
  481. package/lib/defaultLocale.js +1361 -0
  482. package/lib/hooks/index.js +16 -0
  483. package/lib/hooks/useAssetsPicker.js +274 -0
  484. package/lib/hooks/useDownloadFilesCsv.js +20 -0
  485. package/lib/hooks/useEditFileDetails.js +505 -0
  486. package/lib/hooks/useExplorer.js +6 -0
  487. package/lib/hooks/useExplorerI18n.js +10 -0
  488. package/lib/hooks/useExplorerInformer.js +10 -0
  489. package/lib/hooks/useFetchFileFolderPermissions.js +31 -0
  490. package/lib/hooks/useFetchMetadataTagsBySearchQuery.js +38 -0
  491. package/lib/hooks/useFileMetadata.js +117 -0
  492. package/lib/hooks/useFilterSearch.js +37 -0
  493. package/lib/hooks/useForcedFilters.js +39 -0
  494. package/lib/hooks/useIsOverflow.js +25 -0
  495. package/lib/hooks/useIsSmallScreen.js +20 -0
  496. package/lib/hooks/useLocateFile.js +231 -0
  497. package/lib/hooks/usePrevious.js +9 -0
  498. package/lib/hooks/useSearchSuggestions.js +168 -0
  499. package/lib/hooks/useStartUpload.js +43 -0
  500. package/lib/hooks/useToLocaleNumber.js +14 -0
  501. package/lib/hooks/useValidateFileName.js +324 -0
  502. package/lib/index.js +1616 -0
  503. package/lib/slices/common.slice.js +254 -0
  504. package/lib/slices/drag.slice.js +75 -0
  505. package/lib/slices/files.slice.js +1307 -0
  506. package/lib/slices/filters.slice.js +382 -0
  507. package/lib/slices/folders.slice.js +978 -0
  508. package/lib/slices/foldersTree.slice.js +501 -0
  509. package/lib/slices/index.js +32 -0
  510. package/lib/slices/metadata.slice.js +494 -0
  511. package/lib/slices/panels.slice.js +351 -0
  512. package/lib/slices/search.slice.js +995 -0
  513. package/lib/slices/selections.slice.js +315 -0
  514. package/lib/slices/targets.slice.js +44 -0
  515. package/lib/slices/topSection.slice.js +71 -0
  516. package/lib/slices/views.slice.js +345 -0
  517. package/lib/thunks/archive.thunks.js +175 -0
  518. package/lib/thunks/downloads.thunks.js +415 -0
  519. package/lib/thunks/items.thunks.js +274 -0
  520. package/lib/thunks/permissions.thunks.js +66 -0
  521. package/lib/thunks/uploads.thunks.js +235 -0
  522. package/lib/utils/SearchSuggestions/SearchSuggestionsMenu.js +95 -0
  523. package/lib/utils/SearchSuggestions/SuggestionMode.js +70 -0
  524. package/lib/utils/SearchSuggestions/SuggestionModeAttribute.js +87 -0
  525. package/lib/utils/SearchSuggestions/SuggestionModeExpression.js +121 -0
  526. package/lib/utils/SearchSuggestions/SuggestionModeTag.js +87 -0
  527. package/lib/utils/SearchSuggestions/SuggestionsManager.js +242 -0
  528. package/lib/utils/SearchSuggestions/constants.js +14 -0
  529. package/lib/utils/SearchSuggestions/index.js +4 -0
  530. package/lib/utils/SearchSuggestions/styled.js +12 -0
  531. package/lib/utils/availableScreenSizes.js +4 -0
  532. package/lib/utils/constants.js +14 -0
  533. package/lib/utils/convertItemsToFilesFoldersUuids.js +12 -0
  534. package/lib/utils/convertItemstoFoldersParentUuids.js +12 -0
  535. package/lib/utils/createPromise.js +9 -0
  536. package/lib/utils/createSuperFocus.js +43 -0
  537. package/lib/utils/decodeB64ToStr.js +11 -0
  538. package/lib/utils/filters.js +333 -0
  539. package/lib/utils/formatFolderPath.js +10 -0
  540. package/lib/utils/formatPinSubTitle.js +17 -0
  541. package/lib/utils/getAcquirerTitle.js +10 -0
  542. package/lib/utils/getActiveOverlayEl.js +11 -0
  543. package/lib/utils/getApiPathtype.js +10 -0
  544. package/lib/utils/getClosestStr.js +22 -0
  545. package/lib/utils/getItemUuids.js +12 -0
  546. package/lib/utils/getLabelsTotalAssetsCount.js +6 -0
  547. package/lib/utils/getMoveAndDeleteData.js +15 -0
  548. package/lib/utils/getParentFolderPath.js +4 -0
  549. package/lib/utils/getQueryStringFromUrl.js +6 -0
  550. package/lib/utils/getScrollableParent.js +15 -0
  551. package/lib/utils/getStringValueExistedInObj.js +9 -0
  552. package/lib/utils/isEmbeddableAsset.js +6 -0
  553. package/lib/utils/isFileVersion.js +9 -0
  554. package/lib/utils/mapArrayKeysToObjValues.js +33 -0
  555. package/lib/utils/mapFiltersToShownFormat.js +252 -0
  556. package/lib/utils/prepareExportedFilesLinks.js +12 -0
  557. package/lib/utils/prepareSearchUrl.js +65 -0
  558. package/lib/utils/removeBackground.js +60 -0
  559. package/lib/utils/removeExtraUrlParams.js +13 -0
  560. package/lib/utils/scrollToAndFocusItemElement.js +16 -0
  561. package/lib/utils/toggleFolderNotFoundModal.js +25 -0
  562. package/lib/utils/trapFocus.js +59 -0
  563. package/lib/utils/truncateString.js +28 -0
  564. package/package.json +8 -8
@@ -0,0 +1,97 @@
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 } from 'react';
8
+ import { ModalContent } from '@scaleflex/ui/core';
9
+ import { UrlBuilder } from '@scaleflex/react-url-builder';
10
+ import getFileLink from '@scaleflex/widget-utils/lib/getFileLink';
11
+ import { useConfirmationModal } from '../Modals';
12
+ import { removeExtraUrlParams } from '../../utils/removeExtraUrlParams';
13
+ import Styled from './UrlBuilderModal.styled';
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ var modalStyles = {
16
+ zIndex: 1300
17
+ };
18
+ var UrlBuilderModal = function UrlBuilderModal(_ref) {
19
+ var showUrlBuilderModal = _ref.showUrlBuilderModal,
20
+ setShowUrlBuilderModal = _ref.setShowUrlBuilderModal,
21
+ originalFile = _ref.originalFile,
22
+ urlTitle = _ref.urlTitle,
23
+ headerTitle = _ref.headerTitle,
24
+ actionButtonLabel = _ref.actionButtonLabel,
25
+ onNewSave = _ref.onNewSave,
26
+ i18n = _ref.i18n,
27
+ selectedVariant = _ref.selectedVariant,
28
+ submitVariantEdit = _ref.submitVariantEdit,
29
+ queryString = _ref.queryString,
30
+ info = _ref.info,
31
+ extractVariantQuery = _ref.extractVariantQuery;
32
+ var triggerConfirmationModal = useConfirmationModal();
33
+ var _useState = useState(false),
34
+ _useState2 = _slicedToArray(_useState, 2),
35
+ isValueChanged = _useState2[0],
36
+ setIsValueChanged = _useState2[1];
37
+ if (!showUrlBuilderModal || !originalFile) return null;
38
+ var imageInfo = originalFile.info;
39
+ var url = getFileLink(originalFile, 'cdn');
40
+ var originalUrl = removeExtraUrlParams(url);
41
+ var urlWithParams = queryString ? "".concat(originalUrl, "?").concat(queryString) : originalUrl;
42
+ var triggerVariantEdit = function triggerVariantEdit(newUrl) {
43
+ info(i18n('explorerFileWindowVariationSavedInfo'));
44
+ submitVariantEdit({
45
+ uuid: selectedVariant.uuid,
46
+ url: newUrl,
47
+ query: extractVariantQuery(newUrl)
48
+ });
49
+ };
50
+ var handleClose = function handleClose() {
51
+ if (isValueChanged) {
52
+ triggerConfirmationModal({
53
+ title: i18n('fileWindowDiscardChangesModalTitle'),
54
+ description: i18n('fileWindowDiscardUrlBuilderModalDesc'),
55
+ rootModalStyles: {
56
+ zIndex: 1500
57
+ },
58
+ onConfirm: function onConfirm() {
59
+ return setShowUrlBuilderModal(false);
60
+ }
61
+ });
62
+ } else {
63
+ setShowUrlBuilderModal(false);
64
+ }
65
+ };
66
+ var handleSave = function handleSave(nextUrl) {
67
+ if (queryString) {
68
+ triggerVariantEdit(nextUrl);
69
+ setShowUrlBuilderModal(false);
70
+ } else {
71
+ onNewSave(nextUrl);
72
+ }
73
+ };
74
+ return /*#__PURE__*/_jsx(Styled.Modal, {
75
+ fullWidth: true,
76
+ open: showUrlBuilderModal,
77
+ onClose: handleClose,
78
+ modalStyles: modalStyles,
79
+ children: /*#__PURE__*/_jsx(ModalContent, {
80
+ children: /*#__PURE__*/_jsx(UrlBuilder, {
81
+ url: urlWithParams,
82
+ onSave: function onSave(_, nextUrl) {
83
+ return handleSave(nextUrl);
84
+ },
85
+ headerTitle: headerTitle,
86
+ urlTitle: urlTitle,
87
+ onClose: handleClose,
88
+ imageInfo: imageInfo,
89
+ actionButtonLabel: actionButtonLabel,
90
+ checkValueChanged: setIsValueChanged,
91
+ withExtraParams: true,
92
+ withWatermark: true
93
+ })
94
+ })
95
+ });
96
+ };
97
+ export default UrlBuilderModal;
@@ -0,0 +1,48 @@
1
+ import { useMemo } from 'react';
2
+ import { Button } from '@scaleflex/ui/core';
3
+ import { RESPONSE_CODES } from '@scaleflex/widget-utils/lib/constants';
4
+ import { useExplorerI18n, useIsSmallScreen } from '../../hooks';
5
+ import Styled from './Views.styled';
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ var ErroredViewPlaceholder = function ErroredViewPlaceholder(_ref) {
8
+ var icon = _ref.icon,
9
+ title = _ref.title,
10
+ description = _ref.description,
11
+ backTo = _ref.backTo,
12
+ backToLabel = _ref.backToLabel,
13
+ error = _ref.error;
14
+ var i18n = useExplorerI18n();
15
+ var isSmallScreen = useIsSmallScreen();
16
+ var adaptedProps = useMemo(function () {
17
+ var nextAdaptedProps = {
18
+ icon: icon,
19
+ title: title,
20
+ description: description,
21
+ backTo: backTo,
22
+ backToLabel: backToLabel
23
+ };
24
+ if ((error === null || error === void 0 ? void 0 : error.codeLabel) === RESPONSE_CODES.KEY_EXPIRED) {
25
+ nextAdaptedProps.description = i18n('sassKeyExpiredErrorMessage');
26
+ nextAdaptedProps.backToLabel = null;
27
+ nextAdaptedProps.backTo = null;
28
+ }
29
+ return nextAdaptedProps;
30
+ }, [icon, title, description, backTo, backToLabel, error]);
31
+ return /*#__PURE__*/_jsxs(Styled.ViewErrorPlaceholder, {
32
+ isSmallScreen: isSmallScreen,
33
+ children: [adaptedProps.icon || /*#__PURE__*/_jsx(Styled.ViewErrorIcon, {
34
+ size: 150
35
+ }), /*#__PURE__*/_jsx(Styled.ViewErrorTitle, {
36
+ children: adaptedProps.title
37
+ }), (adaptedProps.description || adaptedProps.backTo && adaptedProps.backToLabel) && /*#__PURE__*/_jsxs(Styled.ViewDescriptionWrapper, {
38
+ children: [adaptedProps.description && /*#__PURE__*/_jsxs(Styled.ViewErrorDescription, {
39
+ children: [adaptedProps.description, adaptedProps.description[adaptedProps.description.length - 1] !== '.' && '.']
40
+ }), adaptedProps.backTo && adaptedProps.backToLabel && /*#__PURE__*/_jsx(Button, {
41
+ onClick: adaptedProps.backTo,
42
+ color: "link-primary",
43
+ children: adaptedProps.backToLabel
44
+ })]
45
+ })]
46
+ });
47
+ };
48
+ export default ErroredViewPlaceholder;
@@ -0,0 +1,29 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
4
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
+ import { VIEW_IDS } from '@scaleflex/widget-utils/lib/constants';
6
+ import { Assets, Folders } from '@scaleflex/icons';
7
+ import AssetsView from '../AssetsView';
8
+ import FoldersView from '../FoldersView';
9
+ import { activateFoldersView, selectCurrentFolder, toggleFoldersTree } from '../../slices/folders.slice';
10
+ import { activateAssetsView } from '../AssetsView/AssetsView.thunks';
11
+
12
+ // VIEW_IDS not in this file but inside @scaleflex/widget-utils/lib/constants
13
+ // so it's easier to be imported from external project to be re-used in opts.
14
+
15
+ export var VIEW_COMPONENTS = _defineProperty(_defineProperty({}, VIEW_IDS.ASSETS, AssetsView), VIEW_IDS.FOLDERS, FoldersView);
16
+ export var VIEW_OPTIONS = _defineProperty(_defineProperty({}, VIEW_IDS.ASSETS, {
17
+ id: VIEW_IDS.ASSETS,
18
+ i18nKey: 'viewModeAllAssetsLabel',
19
+ icon: Assets,
20
+ activateAction: activateAssetsView,
21
+ activeItemSelector: selectCurrentFolder
22
+ }), VIEW_IDS.FOLDERS, {
23
+ id: VIEW_IDS.FOLDERS,
24
+ i18nKey: 'viewModeFoldersLabel',
25
+ icon: Folders,
26
+ activateAction: activateFoldersView,
27
+ toggleTreeAction: toggleFoldersTree,
28
+ activeItemSelector: selectCurrentFolder
29
+ });
@@ -0,0 +1,87 @@
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, { css } from 'styled-components';
4
+ import { LAYOUTS_IDS } from '@scaleflex/widget-utils/lib/constants';
5
+ import { FV, PC } from '@scaleflex/widget-common';
6
+ import { NoResult } from '@scaleflex/icons';
7
+ var listLayoutMixin = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n\n [data-filerobot-theme=\"dark\"] & {\n /* TODO: TO be checked about this static color? */\n background-color: #1f1f1f;\n }\n\n .filerobot-Provider-list-cell {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n white-space: nowrap;\n text-align: left;\n cursor: pointer;\n font-size: 14px;\n flex: 0.5 0;\n\n &-cursor-default {\n cursor: default !important;\n }\n }\n\n .filerobot-Provider-list-cell-icon {\n max-width: 24px;\n min-width: 20px;\n }\n\n .filerobot-Provider-list-firstColumn {\n display: flex;\n align-items: center;\n flex: 1 0;\n\n input, label {\n width: 80%;\n }\n\n label {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n }\n\n .filerobot-ProviderBrowser-list { outline: none; }\n\n li.filerobot-ProviderBrowserItem {\n outline: none;\n display: flex;\n align-items: center;\n padding: 11px 12px;\n margin: 0;\n border-bottom: 1px solid rgba(0, 0, 0, 0.05);\n\n [data-filerobot-theme=\"dark\"] & {\n /* TODO: TO be checked about this static color? */\n color: #eaeaea;\n }\n }\n\n .filerobot-ProviderBrowser-body {\n width: 100%;\n overflow-x: auto;\n }\n\n .filerobot-Provider-ItemCategory {\n &-header {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n display: flex;\n align-items: center;\n text-align: left;\n padding: 12px;\n font-weight: 400;\n font-size: 14px;\n line-height: 16px;\n border-bottom: 1.5px solid rgba(0, 0, 0, 0.07);\n position: sticky;\n top: -1px;\n background-color: #fff;\n z-index: 11;\n\n &:last-child { margin-right: 0; }\n\n .filerobot-c-icon { vertical-align: middle; }\n }\n\n &-wrapper-list { padding: 0; }\n }\n\n\n // Checkbox\n .filerobot-ProviderBrowserItem-fakeCheckbox {\n margin-right: 8px;\n vertical-align: middle;\n }\n\n // Either a <label/> for a file,\n // or a <button/> we can click on for a folder\n .filerobot-ProviderBrowserItem {\n /* TODO: TO be checked about this static color? */\n color: #4D4E4E;\n\n &-inner {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n display: flex;\n align-items: center;\n width: 100%;\n line-height: 1.3;\n outline: none;\n\n input { height: 17px; }\n\n img,\n svg {\n max-width: 20px;\n max-height: 20px;\n }\n }\n\n &--selected {\n background: ", ";\n color: ", ";\n border-bottom: 1px solid ", " !important;\n\n svg path {\n fill: ", ";\n }\n }\n }\n\n .filerobot-Provider-listHead-checkbox {\n min-width: 16px;\n }\n"])), function (_ref) {
8
+ var theme = _ref.theme;
9
+ return theme.palette[PC.BackgroundStateless];
10
+ }, function (_ref2) {
11
+ var theme = _ref2.theme;
12
+ return theme.palette[PC.BackgroundPrimaryActive];
13
+ }, function (_ref3) {
14
+ var theme = _ref3.theme;
15
+ return theme.palette[PC.BackgroundStateless];
16
+ }, function (_ref4) {
17
+ var theme = _ref4.theme;
18
+ return theme.palette[PC.IconsPlaceholder];
19
+ }, function (_ref5) {
20
+ var theme = _ref5.theme;
21
+ return theme.palette[PC.IconsPlaceholder];
22
+ });
23
+ var gridLayoutMixin = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ul.filerobot-ProviderBrowser-list {\n &::after {\n content: '';\n flex: auto;\n }\n\n &:focus { outline: none; }\n }\n\n .filerobot-Provider-ItemCategory {\n &-header {\n display: flex;\n align-items: center;\n font-weight: 400;\n width: 100%;\n max-width: 130px;\n padding: 0 12px;\n margin-top: 12px;\n cursor: pointer;\n font-size: 12px;\n }\n\n &-wrapper {\n padding: 12px 24px 24px;\n\n &-list {\n list-style: none;\n padding: 0;\n width: 100%;\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n }\n }\n }\n\n li.filerobot-ProviderBrowserItem {\n min-width: 200px;\n position: relative;\n margin: 0;\n\n &::before {\n content: '';\n padding-top: 88%;\n display: block;\n }\n\n &--selected.item-folder,\n &.item-folder:hover {\n .filerobot-ProviderBrowserItem-folderSelectBox {\n display: flex;\n }\n }\n\n &:not(.filerobot-ProviderBrowserItem--beingRenamed):hover {\n .filerobot-Explorer-dots-menu-icon {\n display: block;\n }\n }\n\n &:not(.item-folder) {\n outline: none;\n border: 4px solid transparent;\n\n [data-filerobot-theme=\"dark\"] & {\n /* TODO: TO be checked about this static color? */\n border: 4px solid #000000;\n /* TODO: TO be checked about this static color? */\n background-color: #4D4E4E;\n\n &:hover *,\n &:focus * {\n /* TODO: TO be checked about this static color? */\n color: #000000;\n }\n }\n\n &.no-selection {\n .filerobot-ProviderBrowserItem-inner {\n cursor: auto;\n }\n }\n\n &:not(.no-selection) {\n .filerobot-ProviderBrowserItem-inner:hover {\n background-color: ", ";\n }\n }\n }\n }\n\n .filerobot-ProviderBrowserItem-videoDuration {\n position: absolute;\n bottom: 33%;\n z-index: 2;\n background: rgba(79, 98, 118, 0.7);\n border-radius: 2px;\n left: 16px;\n padding: 2px 4px;\n text-align: center;\n font-weight: 500;\n line-height: 12px;\n font-size: 11px;\n box-shadow: 0px 1px 2px 0px rgba(77, 78, 78, 0.15);\n color: #fff !important;\n }\n\n li.filerobot-ProviderBrowserItem--selected {\n .filerobot-ProviderBrowserItem-inner {\n background-color: ", " !important;\n\n * {\n fill: ", ";\n color: ", ";\n }\n }\n\n // As with-meta is related to the explorer only so that the styles would be applied to the explorer cards only.\n &.with-meta {\n input {\n text-align: center;\n color: #000 !important;\n margin-top: 4px;\n margin-bottom: -1px;\n }\n\n button.filerobot-ProviderBrowserItem-inner {\n &:focus {\n box-shadow: none !important;\n }\n }\n }\n\n .filerobot-Explorer-Item-fileInfoAndButtons {\n background-color: inherit;\n }\n }\n\n li.filerobot-ProviderBrowserItem--noPreview {\n .filerobot-ProviderBrowserItem-inner {\n /* TODO: TO be checked about this static color? */\n background-color: rgba(147, 147, 147, 0.2);\n\n [data-filerobot-theme=\"dark\"] & {\n /* TODO: TO be checked about this static color? */\n background-color: rgba(234, 234, 234, 0.2);\n }\n }\n\n svg {\n /* TODO: TO be checked about this static color? */\n fill: rgba(0, 0, 0, 0.7);\n width: 30%;\n height: 30%;\n\n [data-filerobot-theme=\"dark\"] & {\n fill: rgba(", ", 0.8);\n }\n }\n }\n\n // button with a large picture\n button.filerobot-ProviderBrowserItem-inner {\n overflow: hidden;\n position: absolute;\n text-align: center;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border-radius: 2px;\n box-shadow: 0px 1px 2px 0px rgba(77, 78, 78, 0.15);\n background-color: ", ";\n\n &:focus {\n outline: none;\n }\n\n &.with-meta {\n display: flex;\n flex-direction: column-reverse;\n align-items: center;\n justify-content: flex-end;\n\n &:focus {\n box-shadow: none;\n }\n\n img {\n object-fit: contain;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n }\n }\n }\n\n // Checkbox\n .filerobot-ProviderBrowserItem-fakeCheckbox {\n display: none;\n position: absolute;\n z-index: 3;\n top: 8px;\n left: 8px;\n }\n\n .filerobot-ProviderBrowserItem-folderSelectBox {\n top: 26px;\n left: 14px;\n position: absolute;\n display: none;\n }\n\n .filerobot-ProviderBrowserItem--selected {\n .filerobot-ProviderBrowserItem-fakeCheckbox {\n display: block;\n }\n }\n\n .filerobot-ProviderBrowserItem-fakeCheckbox {\n *:hover > & {\n display: block;\n }\n }\n\n\n .filerobot-Dragging-folders,\n .filerobot-Dragging-files {\n & > * {\n pointer-events: none;\n }\n }\n"])), function (_ref6) {
24
+ var theme = _ref6.theme;
25
+ return theme.palette[PC.BackgroundPrimaryHover];
26
+ }, function (_ref7) {
27
+ var theme = _ref7.theme;
28
+ return theme.palette[PC.BackgroundPrimaryActive];
29
+ }, function (_ref8) {
30
+ var theme = _ref8.theme;
31
+ return theme.palette[PC.BackgroundStateless];
32
+ }, function (_ref9) {
33
+ var theme = _ref9.theme;
34
+ return theme.palette[PC.BackgroundStateless];
35
+ }, function (_ref10) {
36
+ var theme = _ref10.theme;
37
+ return theme.palette[PC.BackgroundStateless];
38
+ }, function (_ref11) {
39
+ var theme = _ref11.theme;
40
+ return theme.palette[PC.BackgroundPrimaryHover];
41
+ });
42
+ var getLayoutMixin = function getLayoutMixin(_ref12) {
43
+ var viewLayout = _ref12.viewLayout;
44
+ switch (viewLayout) {
45
+ case LAYOUTS_IDS.LAYOUT:
46
+ return listLayoutMixin;
47
+ case LAYOUTS_IDS.GRID:
48
+ default:
49
+ return gridLayoutMixin;
50
+ }
51
+ };
52
+ var ViewWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n flex: 1;\n font-size: 14px;\n font-weight: 400;\n height: 100%;\n position: relative;\n background-color: ", ";\n\n ", "\n"])), function (_ref13) {
53
+ var theme = _ref13.theme;
54
+ return theme.palette[PC.BackgroundStateless];
55
+ }, getLayoutMixin);
56
+ var ViewErrorPlaceholder = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 16px;\n ", "\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n svg {\n color: ", ";\n }\n"])), function (_ref14) {
57
+ var isSmallScreen = _ref14.isSmallScreen;
58
+ return isSmallScreen ? 'height: 100%;' : 'padding-top: 150px;';
59
+ }, function (_ref15) {
60
+ var theme = _ref15.theme;
61
+ return theme.palette[PC.IconsPlaceholder];
62
+ });
63
+ var ViewErrorTitle = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin: 8px 0;\n ", ";\n color: ", ";\n"])), function (_ref16) {
64
+ var theme = _ref16.theme;
65
+ return theme.typography.font[FV.TitleH4];
66
+ }, function (_ref17) {
67
+ var theme = _ref17.theme;
68
+ return theme.palette[PC.TextSecondary];
69
+ });
70
+ var ViewDescriptionWrapper = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n text-align: center;\n"])));
71
+ var ViewErrorDescription = styled.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin: 8px 4px 8px 0;\n color: ", ";\n"])), function (_ref18) {
72
+ var theme = _ref18.theme;
73
+ return theme.palette[PC.TextSecondary];
74
+ });
75
+ var ViewErrorIcon = styled(NoResult)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n color: ", ";\n"])), function (_ref19) {
76
+ var theme = _ref19.theme;
77
+ return theme.palette[PC.IconsPlaceholder];
78
+ });
79
+ var Styled = {
80
+ ViewWrapper: ViewWrapper,
81
+ ViewErrorPlaceholder: ViewErrorPlaceholder,
82
+ ViewErrorIcon: ViewErrorIcon,
83
+ ViewErrorTitle: ViewErrorTitle,
84
+ ViewDescriptionWrapper: ViewDescriptionWrapper,
85
+ ViewErrorDescription: ViewErrorDescription
86
+ };
87
+ export default Styled;
@@ -0,0 +1,100 @@
1
+ import { memo, useEffect } from 'react';
2
+ import { useSelector, useDispatch } from 'react-redux';
3
+ import { FMAW_URL_QUERY_PARAMS, PERMISSIONS } from '@scaleflex/widget-utils/lib/constants';
4
+ import { useUpdateEffect } from '@scaleflex/widget-common/lib/hooks';
5
+ import { useContextMenu, useCore } from '@scaleflex/widget-core/lib/hooks';
6
+ import { useExplorer, useLocateFile } from '../../hooks';
7
+ import { VIEW_COMPONENTS } from './Views.constants';
8
+ import { activateViewFromOutside, searchOrListViewFiles, selectActiveView, selectViewLayout } from '../../slices/views.slice';
9
+ import { fetchLabels } from '../../slices/common.slice';
10
+ import Styled from './Views.styled';
11
+ import { loadSearchFromOutside } from '../../slices/search.slice';
12
+ import { loadFiltersFromOutside } from '../../slices/filters.slice';
13
+ import decodeB64ToStr from '../../utils/decodeB64ToStr';
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ var Views = function Views() {
16
+ var dispatch = useDispatch();
17
+ var _useExplorer = useExplorer(),
18
+ checkUserPermissions = _useExplorer.checkUserPermissions,
19
+ opts = _useExplorer.opts,
20
+ getUrlQueryParam = _useExplorer.getUrlQueryParam,
21
+ isUrlPathUpdateDismissed = _useExplorer.isUrlPathUpdateDismissed;
22
+ var viewLayout = useSelector(selectViewLayout);
23
+ var activeViewId = useSelector(selectActiveView);
24
+ var locateFile = useLocateFile();
25
+ var toggleContextMenu = useContextMenu();
26
+ var _useCore = useCore(),
27
+ emit = _useCore.emit;
28
+ var locateOrEmbedFileFromUrl = function locateOrEmbedFileFromUrl() {
29
+ var fileUuidToLocate = decodeB64ToStr(getUrlQueryParam(FMAW_URL_QUERY_PARAMS.LOCATE_FILE));
30
+ if (fileUuidToLocate) {
31
+ locateFile({
32
+ uuid: fileUuidToLocate,
33
+ disableUrlUpdate: true
34
+ });
35
+ }
36
+ return Boolean(fileUuidToLocate);
37
+ };
38
+ var activateViewFromUrl = function activateViewFromUrl() {
39
+ toggleContextMenu();
40
+ if (!locateOrEmbedFileFromUrl()) {
41
+ dispatch(activateViewFromOutside({
42
+ fromUrl: true
43
+ }));
44
+ }
45
+ };
46
+ useEffect(function () {
47
+ activateViewFromUrl();
48
+ if (checkUserPermissions([PERMISSIONS.LABELS_LIST])) {
49
+ dispatch(fetchLabels());
50
+ }
51
+ emit('view-loaded');
52
+ if (!isUrlPathUpdateDismissed()) {
53
+ // Applying navigation for the browser's back & forward
54
+ window.addEventListener('popstate', activateViewFromUrl);
55
+ window.addEventListener('replacestate', locateOrEmbedFileFromUrl);
56
+ }
57
+ return function () {
58
+ if (!isUrlPathUpdateDismissed()) {
59
+ window.removeEventListener('popstate', activateViewFromUrl);
60
+ window.removeEventListener('replacestate', locateOrEmbedFileFromUrl);
61
+ }
62
+ };
63
+ }, []);
64
+ useUpdateEffect(function () {
65
+ toggleContextMenu();
66
+ dispatch(activateViewFromOutside({
67
+ fromUrl: false
68
+ }));
69
+ }, [opts.views, opts.view, opts.viewItem, opts.viewSubItem]);
70
+ useUpdateEffect(function () {
71
+ dispatch(loadFiltersFromOutside({
72
+ triggerApi: false
73
+ }));
74
+ }, [opts.filters]);
75
+ useUpdateEffect(function () {
76
+ dispatch(loadSearchFromOutside({
77
+ triggerApi: false
78
+ }));
79
+ }, [opts.search]);
80
+ useUpdateEffect(function () {
81
+ toggleContextMenu();
82
+ dispatch(searchOrListViewFiles({
83
+ withStats: true
84
+ }));
85
+ }, [opts.search, opts.filters]);
86
+ var ActiveView = VIEW_COMPONENTS[activeViewId];
87
+ if (!ActiveView) {
88
+ // TODO: Add proper error component for this.
89
+ return 'Wrong view provided...';
90
+ }
91
+
92
+ // TODO: Rename the class name and refactor the classes applied there, also we should apply layoutType to state instead of opts?.
93
+ return /*#__PURE__*/_jsx(Styled.ViewWrapper, {
94
+ className: "filerobot-ProviderBrowser" // we are keeping this till we support all the related (parent/child ) classes
95
+ ,
96
+ viewLayout: viewLayout,
97
+ children: /*#__PURE__*/_jsx(ActiveView, {})
98
+ });
99
+ };
100
+ export default /*#__PURE__*/memo(Views);
@@ -0,0 +1,8 @@
1
+ var _templateObject;
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
+ var EllipsedTextWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .SfxEllipsed-ellipsed-text-wrapper {\n word-break: break-all;\n } \n"])));
5
+ var Styled = {
6
+ EllipsedTextWrapper: EllipsedTextWrapper
7
+ };
8
+ export default Styled;
@@ -0,0 +1,29 @@
1
+ import { Fragment } from 'react';
2
+ import { EllipsedText } from '@scaleflex/ui/core';
3
+ import Styled from './DeleteModalItemText.styled';
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ var TOOLTIP_PROPS = {
6
+ size: 'md',
7
+ zIndex: 500000
8
+ };
9
+ var DeleteModalItemText = function DeleteModalItemText(_ref) {
10
+ var itemText = _ref.itemText,
11
+ itemTitle = _ref.itemTitle,
12
+ _ref$forceTooltip = _ref.forceTooltip,
13
+ forceTooltip = _ref$forceTooltip === void 0 ? false : _ref$forceTooltip;
14
+ return /*#__PURE__*/_jsx(Styled.EllipsedTextWrapper, {
15
+ children: /*#__PURE__*/_jsx(EllipsedText, {
16
+ maxLinesCount: 2,
17
+ forceTooltip: forceTooltip,
18
+ tooltipProps: TOOLTIP_PROPS,
19
+ tooltipTitle: "\"".concat(itemTitle, "\""),
20
+ textSuffix: "\"?",
21
+ children: Array.isArray(itemText) ? itemText.map(function (text, index) {
22
+ return /*#__PURE__*/_jsx(Fragment, {
23
+ children: text
24
+ }, index);
25
+ }) : itemText
26
+ })
27
+ });
28
+ };
29
+ export default DeleteModalItemText;
@@ -0,0 +1,35 @@
1
+ var _templateObject;
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 { IconButton } from '@scaleflex/ui/core';
5
+ import { PC, PSH } from '@scaleflex/widget-common';
6
+ var EditBtn = styled(IconButton)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 40px;\n height: 40px;\n border: 1px solid ", ";\n background-color: ", ";\n box-shadow: ", ";\n position: sticky;\n z-index: 1;\n bottom: ", ";\n left: ", ";\n margin-top: ", ";\n margin-right: ", ";\n"])), function (_ref) {
7
+ var theme = _ref.theme;
8
+ return theme.palette[PC.IconsPrimary];
9
+ }, function (_ref2) {
10
+ var theme = _ref2.theme;
11
+ return theme.palette[PC.BackgroundStateless];
12
+ }, function (_ref3) {
13
+ var theme = _ref3.theme;
14
+ return theme.shadows[PSH.ShadowMd];
15
+ }, function (_ref4) {
16
+ var _ref4$bottom = _ref4.bottom,
17
+ bottom = _ref4$bottom === void 0 ? '100%' : _ref4$bottom;
18
+ return bottom;
19
+ }, function (_ref5) {
20
+ var _ref5$left = _ref5.left,
21
+ left = _ref5$left === void 0 ? '100%' : _ref5$left;
22
+ return left;
23
+ }, function (_ref6) {
24
+ var _ref6$mt = _ref6.mt,
25
+ mt = _ref6$mt === void 0 ? '0' : _ref6$mt;
26
+ return mt;
27
+ }, function (_ref7) {
28
+ var _ref7$mr = _ref7.mr,
29
+ mr = _ref7$mr === void 0 ? '0' : _ref7$mr;
30
+ return mr;
31
+ });
32
+ var Styled = {
33
+ EditBtn: EditBtn
34
+ };
35
+ export default Styled;
@@ -0,0 +1,28 @@
1
+ import { Rename } from '@scaleflex/icons';
2
+ import Styled from './EditDetailsButton.styled';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ var EditDetailsButton = function EditDetailsButton(_ref) {
5
+ var _ref$isUserNotAllowed = _ref.isUserNotAllowedToEdit,
6
+ isUserNotAllowedToEdit = _ref$isUserNotAllowed === void 0 ? true : _ref$isUserNotAllowed,
7
+ _ref$enableEditing = _ref.enableEditing,
8
+ enableEditing = _ref$enableEditing === void 0 ? function () {} : _ref$enableEditing,
9
+ _ref$mt = _ref.mt,
10
+ mt = _ref$mt === void 0 ? '0' : _ref$mt,
11
+ _ref$mr = _ref.mr,
12
+ mr = _ref$mr === void 0 ? '0' : _ref$mr,
13
+ bottom = _ref.bottom;
14
+ return !isUserNotAllowedToEdit && /*#__PURE__*/_jsx(Styled.EditBtn, {
15
+ color: "basic",
16
+ size: "sm",
17
+ onClick: function onClick() {
18
+ return enableEditing();
19
+ },
20
+ mt: mt,
21
+ mr: mr,
22
+ bottom: bottom,
23
+ children: /*#__PURE__*/_jsx(Rename, {
24
+ size: 16
25
+ })
26
+ });
27
+ };
28
+ export default EditDetailsButton;
@@ -0,0 +1,16 @@
1
+ var _templateObject;
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 { Button as SfxButton } from '@scaleflex/ui/core';
5
+ import { FV, PC } from '@scaleflex/widget-common';
6
+ var Button = styled(SfxButton)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .SfxButton-Label {\n ", ";\n color: ", ";\n }\n"])), function (_ref) {
7
+ var theme = _ref.theme;
8
+ return theme.typography.font[FV.TextSmall];
9
+ }, function (_ref2) {
10
+ var theme = _ref2.theme;
11
+ return theme.palette[PC.AccentStateless];
12
+ });
13
+ var Styled = {
14
+ Button: Button
15
+ };
16
+ export default Styled;
@@ -0,0 +1,29 @@
1
+ import Styled from './ExpiryDateTooltipContent.styled';
2
+
3
+ // This is a utility function not component, but separated it into a diff. file as it contains JSX, avoiding to rename the utility file with .jsx instead of .js
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ var ExpiryDateTooltipContent = function ExpiryDateTooltipContent(_ref) {
6
+ var expireDateMappedField = _ref.expireDateMappedField,
7
+ scrollToMetaField = _ref.scrollToMetaField,
8
+ i18nArray = _ref.i18nArray;
9
+ if (!expireDateMappedField) {
10
+ return;
11
+ }
12
+ var scrollToMappedField = function scrollToMappedField() {
13
+ if (typeof scrollToMetaField === 'function') {
14
+ scrollToMetaField(expireDateMappedField.key);
15
+ }
16
+ };
17
+ var openMappedFieldButton = /*#__PURE__*/_jsx(Styled.Button, {
18
+ color: "link-primary",
19
+ size: "sm",
20
+ onClick: scrollToMappedField,
21
+ children: expireDateMappedField.title
22
+ }, expireDateMappedField.title);
23
+ return /*#__PURE__*/_jsx("span", {
24
+ children: i18nArray('explorerGeneralFileDetailsExpiryDateHint', {
25
+ mapped_expiry_date_field: openMappedFieldButton
26
+ })
27
+ });
28
+ };
29
+ export default ExpiryDateTooltipContent;
@@ -0,0 +1,46 @@
1
+ import { useMemo } from 'react';
2
+ import { useSelector, useDispatch } from 'react-redux';
3
+ import { useCore } from '@scaleflex/widget-core/lib/hooks';
4
+ import { PLUGINS_IDS, FILE_WINDOW_TAB_IDS } from '@scaleflex/widget-utils/lib/constants';
5
+ import { useExplorerI18n } from '../../../hooks';
6
+ import { fileWindowUpdated, selectFileWindowFor } from '../../../slices/panels.slice';
7
+ import { selectSelectedFiles } from '../../../slices/selections.slice';
8
+ import { selectCurrentFileByIdOrUuid } from '../../../slices/files.slice';
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ var FileApprovalsInfoPopup = function FileApprovalsInfoPopup(_ref) {
11
+ var _approvalPlugin$isEna;
12
+ var smallerFont = _ref.smallerFont;
13
+ var dispatch = useDispatch();
14
+ var _useCore = useCore(),
15
+ getPlugin = _useCore.getPlugin;
16
+ var i18n = useExplorerI18n();
17
+ var originalFile = useSelector(function (state) {
18
+ return selectCurrentFileByIdOrUuid(state, selectFileWindowFor(state));
19
+ });
20
+ var selectedFiles = useSelector(selectSelectedFiles);
21
+ var file = originalFile || selectedFiles[0];
22
+ var approvalPlugin = getPlugin(PLUGINS_IDS.APPROVALS);
23
+ var isApprovalsEnabled = approvalPlugin === null || approvalPlugin === void 0 ? void 0 : (_approvalPlugin$isEna = approvalPlugin.isEnabled) === null || _approvalPlugin$isEna === void 0 ? void 0 : _approvalPlugin$isEna.call(approvalPlugin);
24
+ var openFileWindowAndUpdateTab = function openFileWindowAndUpdateTab(newTabId) {
25
+ dispatch(fileWindowUpdated({
26
+ "for": file.uuid,
27
+ tabId: newTabId
28
+ }));
29
+ };
30
+ var ApprovalInfoPopupComponent = useMemo(function () {
31
+ return approvalPlugin === null || approvalPlugin === void 0 ? void 0 : approvalPlugin.renderApprovalInfoPopup();
32
+ }, []);
33
+ if (!approvalPlugin || !isApprovalsEnabled) {
34
+ return null;
35
+ }
36
+ return /*#__PURE__*/_jsx(ApprovalInfoPopupComponent, {
37
+ i18n: i18n,
38
+ file: file,
39
+ navigateToApprovalsTab: function navigateToApprovalsTab() {
40
+ return openFileWindowAndUpdateTab(FILE_WINDOW_TAB_IDS.APPROVALS);
41
+ },
42
+ smallerFont: smallerFont,
43
+ selectedFile: selectedFiles[0]
44
+ });
45
+ };
46
+ export default FileApprovalsInfoPopup;
@@ -0,0 +1,48 @@
1
+ import { useSelector } from 'react-redux';
2
+ import { useTheme } from '@scaleflex/ui/theme/hooks';
3
+ import { Cross, Tick } from '@scaleflex/icons';
4
+ import { PC } from '@scaleflex/widget-common';
5
+ import { EllipsedText } from '@scaleflex/ui/core';
6
+ import getMetadataFieldVariantValue from '@scaleflex/widget-utils/lib/metadata/getMetadataFieldVariantValue';
7
+ import { selectMetadataRegionalFilters } from '../../../slices/metadata.slice';
8
+ import FormattedUriLink from '../FormattedUriLink';
9
+ import Styled from './FileMetadataFieldValue.styled';
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ var CustomMetadataFieldValue = function CustomMetadataFieldValue(_ref) {
12
+ var field = _ref.field,
13
+ value = _ref.value,
14
+ multiTooltipMaxLines = _ref.multiTooltipMaxLines;
15
+ var theme = useTheme();
16
+ var metaRegionalFilters = useSelector(selectMetadataRegionalFilters);
17
+ var fieldValue = value || field.value;
18
+ var iconPrimaryColor = theme.palette[PC.IconsPrimary];
19
+ var renderNoValue = function renderNoValue() {
20
+ return /*#__PURE__*/_jsx(Styled.NoValueWrapper, {
21
+ children: "\u2014"
22
+ });
23
+ };
24
+ if (!fieldValue) return renderNoValue();
25
+ var variantValue = getMetadataFieldVariantValue({
26
+ value: fieldValue,
27
+ possibleValues: field.possible_values,
28
+ regionalVariantsGroupUuid: field.regional_variants_group_uuid,
29
+ metaRegionalFilters: metaRegionalFilters
30
+ });
31
+ if (typeof variantValue === 'boolean') {
32
+ return variantValue ? /*#__PURE__*/_jsx(Tick, {
33
+ color: iconPrimaryColor
34
+ }) : /*#__PURE__*/_jsx(Cross, {
35
+ color: iconPrimaryColor
36
+ });
37
+ }
38
+ if (field.type === 'attachment-uri') {
39
+ return /*#__PURE__*/_jsx(FormattedUriLink, {
40
+ uri: variantValue
41
+ });
42
+ }
43
+ return /*#__PURE__*/_jsx(EllipsedText, {
44
+ maxLinesCount: multiTooltipMaxLines,
45
+ children: Array.isArray(variantValue) ? variantValue.join(', ') : variantValue || renderNoValue()
46
+ });
47
+ };
48
+ export default CustomMetadataFieldValue;