Эх сурвалжийг харах

[ui-storagebrowser] moves the api and types to storagebrowser folder (#3989)

Ram Prasad Agarwal 9 сар өмнө
parent
commit
e2bc160629
37 өөрчлөгдсөн 55 нэмэгдсэн , 97 устгасан
  1. 2 2
      desktop/core/src/desktop/js/apps/storageBrowser/FileChooserModal/FileChooserModal.tsx
  2. 2 2
      desktop/core/src/desktop/js/apps/storageBrowser/StorageBrowserPage.tsx
  3. 2 2
      desktop/core/src/desktop/js/apps/storageBrowser/StorageBrowserTab/StorageBrowserTab.tsx
  4. 1 4
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/CreateAndUploadAction/CreateAndUploadAction.test.tsx
  5. 2 5
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/CreateAndUploadAction/CreateAndUploadAction.tsx
  6. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ChangeOwnerAndGroupModal/ChangeOwnerAndGroupModal.test.tsx
  7. 2 5
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ChangeOwnerAndGroupModal/ChangeOwnerAndGroupModal.tsx
  8. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ChangePermissionModal/ChangePermissionModal.test.tsx
  9. 2 2
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ChangePermissionModal/ChangePermissionModal.tsx
  10. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ChangePermissionModal/ChangePermissionModal.util.test.ts
  11. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ChangePermissionModal/ChangePermissionModal.util.ts
  12. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/CompressionModal/CompressionModal.test.tsx
  13. 2 2
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/CompressionModal/CompressionModal.tsx
  14. 2 5
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/DeletionModal/DeletionModal.test.tsx
  15. 2 5
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/DeletionModal/DeletionModal.tsx
  16. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ExtractionModal/ExtractionModal.test.tsx
  17. 2 2
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ExtractionModal/ExtractionModal.tsx
  18. 2 5
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/MoveCopyModal/MoveCopyModal.test.tsx
  19. 2 8
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/MoveCopyModal/MoveCopyModal.tsx
  20. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/RenameModal/RenameModal.test.tsx
  21. 2 2
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/RenameModal/RenameModal.tsx
  22. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ReplicationModal/ReplicationModal.test.tsx
  23. 2 2
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ReplicationModal/ReplicationModal.tsx
  24. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/StorageBrowserActions.test.tsx
  25. 2 6
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/StorageBrowserActions.tsx
  26. 1 4
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/StorageBrowserActions.util.ts
  27. 2 5
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/SummaryModal/SummaryModal.tsx
  28. 2 2
      desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageDirectoryPage.tsx
  29. 2 2
      desktop/core/src/desktop/js/apps/storageBrowser/StorageFilePage/StorageFilePage.test.tsx
  30. 2 10
      desktop/core/src/desktop/js/apps/storageBrowser/StorageFilePage/StorageFilePage.tsx
  31. 1 1
      desktop/core/src/desktop/js/apps/storageBrowser/StorageFilePage/StorageFilePage.util.ts
  32. 0 0
      desktop/core/src/desktop/js/apps/storageBrowser/api.ts
  33. 0 0
      desktop/core/src/desktop/js/apps/storageBrowser/types.ts
  34. 2 2
      desktop/core/src/desktop/js/reactComponents/FileChooser/FileChooserModal/FileChooserModal.tsx
  35. 1 1
      desktop/core/src/desktop/js/utils/hooks/useFileUpload/useChunkUpload.ts
  36. 1 1
      desktop/core/src/desktop/js/utils/hooks/useFileUpload/useRegularUpload.ts
  37. 1 1
      desktop/core/src/desktop/js/utils/hooks/useFileUpload/util.ts

+ 2 - 2
desktop/core/src/desktop/js/apps/storageBrowser/FileChooserModal/FileChooserModal.tsx

@@ -27,8 +27,8 @@ import { i18nReact } from '../../../utils/i18nReact';
 import useDebounce from '../../../utils/useDebounce';
 import useLoadData from '../../../utils/hooks/useLoadData/useLoadData';
 
-import { BrowserViewType, ListDirectory } from '../../../reactComponents/FileChooser/types';
-import { LIST_DIRECTORY_API_URL } from '../../../reactComponents/FileChooser/api';
+import { BrowserViewType, ListDirectory } from '../types';
+import { LIST_DIRECTORY_API_URL } from '../api';
 import PathBrowser from '../../../reactComponents/PathBrowser/PathBrowser';
 
 import './FileChooserModal.scss';

+ 2 - 2
desktop/core/src/desktop/js/apps/storageBrowser/StorageBrowserPage.tsx

@@ -22,13 +22,13 @@ import DataBrowserIcon from '@cloudera/cuix-core/icons/react/DataBrowserIcon';
 import { i18nReact } from '../../utils/i18nReact';
 import CommonHeader from '../../reactComponents/CommonHeader/CommonHeader';
 import StorageBrowserTab from './StorageBrowserTab/StorageBrowserTab';
-import { FILESYSTEMS_API_URL } from '../../reactComponents/FileChooser/api';
+import { FILESYSTEMS_API_URL } from './api';
 
 import './StorageBrowserPage.scss';
 import useLoadData from '../../utils/hooks/useLoadData/useLoadData';
 import LoadingErrorWrapper from '../../reactComponents/LoadingErrorWrapper/LoadingErrorWrapper';
 import { getFileSystemAndPath } from '../../reactComponents/PathBrowser/PathBrowser.util';
-import { FileSystem } from '../../reactComponents/FileChooser/types';
+import { FileSystem } from './types';
 
 const StorageBrowserPage = (): JSX.Element => {
   const urlSearchParams = new URLSearchParams(window.location.search);

+ 2 - 2
desktop/core/src/desktop/js/apps/storageBrowser/StorageBrowserTab/StorageBrowserTab.tsx

@@ -21,8 +21,8 @@ import BucketIcon from '@cloudera/cuix-core/icons/react/BucketIcon';
 
 import PathBrowser from '../../../reactComponents/PathBrowser/PathBrowser';
 import StorageDirectoryPage from '../StorageDirectoryPage/StorageDirectoryPage';
-import { FILE_STATS_API_URL } from '../../../reactComponents/FileChooser/api';
-import { BrowserViewType, FileStats, FileSystem } from '../../../reactComponents/FileChooser/types';
+import { FILE_STATS_API_URL } from '../api';
+import { BrowserViewType, FileStats, FileSystem } from '../types';
 import useLoadData from '../../../utils/hooks/useLoadData/useLoadData';
 
 import './StorageBrowserTab.scss';

+ 1 - 4
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/CreateAndUploadAction/CreateAndUploadAction.test.tsx

@@ -2,10 +2,7 @@ import React from 'react';
 import { render, screen, fireEvent, waitFor, act } from '@testing-library/react';
 import '@testing-library/jest-dom';
 import CreateAndUploadAction from './CreateAndUploadAction';
-import {
-  CREATE_DIRECTORY_API_URL,
-  CREATE_FILE_API_URL
-} from '../../../../reactComponents/FileChooser/api';
+import { CREATE_DIRECTORY_API_URL, CREATE_FILE_API_URL } from '../../api';
 
 const mockSave = jest.fn();
 jest.mock('../../../../utils/hooks/useSaveData/useSaveData', () => ({

+ 2 - 5
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/CreateAndUploadAction/CreateAndUploadAction.tsx

@@ -26,11 +26,8 @@ import { PrimaryButton } from 'cuix/dist/components/Button';
 
 import { i18nReact } from '../../../../utils/i18nReact';
 import huePubSub from '../../../../utils/huePubSub';
-import {
-  CREATE_DIRECTORY_API_URL,
-  CREATE_FILE_API_URL
-} from '../../../../reactComponents/FileChooser/api';
-import { FileStats } from '../../../../reactComponents/FileChooser/types';
+import { CREATE_DIRECTORY_API_URL, CREATE_FILE_API_URL } from '../../api';
+import { FileStats } from '../../types';
 import useSaveData from '../../../../utils/hooks/useSaveData/useSaveData';
 import InputModal from '../../../../reactComponents/InputModal/InputModal';
 import './CreateAndUploadAction.scss';

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ChangeOwnerAndGroupModal/ChangeOwnerAndGroupModal.test.tsx

@@ -19,7 +19,7 @@ import { render, fireEvent, waitFor } from '@testing-library/react';
 import '@testing-library/jest-dom';
 import userEvent from '@testing-library/user-event';
 import ChangeOwnerAndGroupModal from './ChangeOwnerAndGroupModal';
-import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
+import { StorageDirectoryTableData } from '../../../types';
 
 const mockFiles: StorageDirectoryTableData[] = [
   {

+ 2 - 5
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ChangeOwnerAndGroupModal/ChangeOwnerAndGroupModal.tsx

@@ -19,11 +19,8 @@ import Modal from 'cuix/dist/components/Modal';
 import { i18nReact } from '../../../../../utils/i18nReact';
 import useSaveData from '../../../../../utils/hooks/useSaveData/useSaveData';
 import { Checkbox, Input, Select } from 'antd';
-import {
-  ListDirectory,
-  StorageDirectoryTableData
-} from '../../../../../reactComponents/FileChooser/types';
-import { BULK_CHANGE_OWNER_API_URL } from '../../../../../reactComponents/FileChooser/api';
+import { ListDirectory, StorageDirectoryTableData } from '../../../types';
+import { BULK_CHANGE_OWNER_API_URL } from '../../../api';
 import './ChangeOwnerAndGroupModal.scss';
 
 interface ChangeOwnerAndGroupModalProps {

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ChangePermissionModal/ChangePermissionModal.test.tsx

@@ -18,7 +18,7 @@ import React from 'react';
 import { render, fireEvent, waitFor } from '@testing-library/react';
 import '@testing-library/jest-dom';
 import ChangePermissionModal from './ChangePermissionModal';
-import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
+import { StorageDirectoryTableData } from '../../../types';
 
 const mockFiles: StorageDirectoryTableData[] = [
   {

+ 2 - 2
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ChangePermissionModal/ChangePermissionModal.tsx

@@ -19,8 +19,8 @@ import Modal from 'cuix/dist/components/Modal';
 import { i18nReact } from '../../../../../utils/i18nReact';
 import useSaveData from '../../../../../utils/hooks/useSaveData/useSaveData';
 import { Checkbox, Table } from 'antd';
-import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
-import { BULK_CHANGE_PERMISSION_API_URL } from '../../../../../reactComponents/FileChooser/api';
+import { StorageDirectoryTableData } from '../../../types';
+import { BULK_CHANGE_PERMISSION_API_URL } from '../../../api';
 import { getInitialPermissions, Permission } from './ChangePermissionModal.util';
 
 import './ChangePermissionModal.scss';

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ChangePermissionModal/ChangePermissionModal.util.test.ts

@@ -15,7 +15,7 @@
 // limitations under the License.
 
 import { getInitialPermissions } from './ChangePermissionModal.util';
-import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
+import { StorageDirectoryTableData } from '../../../types';
 
 describe('getInitialPermissions', () => {
   const mockFiles: StorageDirectoryTableData[] = [

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ChangePermissionModal/ChangePermissionModal.util.ts

@@ -14,7 +14,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
+import { StorageDirectoryTableData } from '../../../types';
 
 interface entityPermission {
   read: boolean;

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/CompressionModal/CompressionModal.test.tsx

@@ -18,7 +18,7 @@ import React from 'react';
 import { render, fireEvent, waitFor } from '@testing-library/react';
 import '@testing-library/jest-dom';
 import CompressionModal from './CompressionModal';
-import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
+import { StorageDirectoryTableData } from '../../../types';
 
 const mockFiles: StorageDirectoryTableData[] = [
   {

+ 2 - 2
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/CompressionModal/CompressionModal.tsx

@@ -18,8 +18,8 @@ import React, { useState } from 'react';
 import Modal from 'cuix/dist/components/Modal';
 import { i18nReact } from '../../../../../utils/i18nReact';
 import useSaveData from '../../../../../utils/hooks/useSaveData/useSaveData';
-import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
-import { COMPRESS_API_URL } from '../../../../../reactComponents/FileChooser/api';
+import { StorageDirectoryTableData } from '../../../types';
+import { COMPRESS_API_URL } from '../../../api';
 import { Input } from 'antd';
 
 import './CompressionModal.scss';

+ 2 - 5
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/DeletionModal/DeletionModal.test.tsx

@@ -2,11 +2,8 @@ import React from 'react';
 import { render, fireEvent } from '@testing-library/react';
 import '@testing-library/jest-dom';
 import DeletionModal from './DeletionModal';
-import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
-import {
-  BULK_DELETION_API_URL,
-  DELETION_API_URL
-} from '../../../../../reactComponents/FileChooser/api';
+import { StorageDirectoryTableData } from '../../../types';
+import { BULK_DELETION_API_URL, DELETION_API_URL } from '../../../api';
 
 const mockFiles: StorageDirectoryTableData[] = [
   {

+ 2 - 5
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/DeletionModal/DeletionModal.tsx

@@ -18,11 +18,8 @@ import React from 'react';
 import Modal from 'cuix/dist/components/Modal';
 import { i18nReact } from '../../../../../utils/i18nReact';
 import useSaveData from '../../../../../utils/hooks/useSaveData/useSaveData';
-import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
-import {
-  BULK_DELETION_API_URL,
-  DELETION_API_URL
-} from '../../../../../reactComponents/FileChooser/api';
+import { StorageDirectoryTableData } from '../../../types';
+import { BULK_DELETION_API_URL, DELETION_API_URL } from '../../../api';
 
 interface DeletionModalProps {
   isOpen?: boolean;

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ExtractionModal/ExtractionModal.test.tsx

@@ -18,7 +18,7 @@ import React from 'react';
 import { render, fireEvent, waitFor } from '@testing-library/react';
 import '@testing-library/jest-dom';
 import ExtractAction from './ExtractionModal';
-import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
+import { StorageDirectoryTableData } from '../../../types';
 
 const mockFile: StorageDirectoryTableData = {
   name: 'archive.zip',

+ 2 - 2
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ExtractionModal/ExtractionModal.tsx

@@ -18,8 +18,8 @@ import React from 'react';
 import Modal from 'cuix/dist/components/Modal';
 import { i18nReact } from '../../../../../utils/i18nReact';
 import useSaveData from '../../../../../utils/hooks/useSaveData/useSaveData';
-import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
-import { EXTRACT_API_URL } from '../../../../../reactComponents/FileChooser/api';
+import { StorageDirectoryTableData } from '../../../types';
+import { EXTRACT_API_URL } from '../../../api';
 
 interface ExtractActionProps {
   currentPath: string;

+ 2 - 5
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/MoveCopyModal/MoveCopyModal.test.tsx

@@ -30,11 +30,8 @@ import { render, fireEvent } from '@testing-library/react';
 import '@testing-library/jest-dom';
 import MoveCopyModal from './MoveCopyModal';
 import { ActionType } from '../StorageBrowserActions.util';
-import {
-  BULK_COPY_API_URL,
-  BULK_MOVE_API_URL
-} from '../../../../../reactComponents/FileChooser/api';
-import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
+import { BULK_COPY_API_URL, BULK_MOVE_API_URL } from '../../../api';
+import { StorageDirectoryTableData } from '../../../types';
 
 const mockFiles: StorageDirectoryTableData[] = [
   {

+ 2 - 8
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/MoveCopyModal/MoveCopyModal.tsx

@@ -18,15 +18,9 @@ import React from 'react';
 import { i18nReact } from '../../../../../utils/i18nReact';
 import useSaveData from '../../../../../utils/hooks/useSaveData/useSaveData';
 import { ActionType } from '../StorageBrowserActions.util';
-import {
-  BULK_COPY_API_URL,
-  BULK_MOVE_API_URL
-} from '../../../../../reactComponents/FileChooser/api';
+import { BULK_COPY_API_URL, BULK_MOVE_API_URL } from '../../../api';
 import FileChooserModal from '../../../FileChooserModal/FileChooserModal';
-import {
-  FileStats,
-  StorageDirectoryTableData
-} from '../../../../../reactComponents/FileChooser/types';
+import { FileStats, StorageDirectoryTableData } from '../../../types';
 
 interface MoveCopyModalProps {
   isOpen?: boolean;

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/RenameModal/RenameModal.test.tsx

@@ -18,7 +18,7 @@ import React from 'react';
 import { render, fireEvent } from '@testing-library/react';
 import '@testing-library/jest-dom';
 import RenameModal from './RenameModal';
-import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
+import { StorageDirectoryTableData } from '../../../types';
 
 const mockSave = jest.fn();
 jest.mock('../../../../../utils/hooks/useSaveData/useSaveData', () => ({

+ 2 - 2
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/RenameModal/RenameModal.tsx

@@ -15,10 +15,10 @@
 // limitations under the License.
 
 import React from 'react';
-import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
+import { StorageDirectoryTableData } from '../../../types';
 import { i18nReact } from '../../../../../utils/i18nReact';
 import useSaveData from '../../../../../utils/hooks/useSaveData/useSaveData';
-import { RENAME_API_URL } from '../../../../../reactComponents/FileChooser/api';
+import { RENAME_API_URL } from '../../../api';
 import InputModal from '../../../../../reactComponents/InputModal/InputModal';
 
 interface RenameModalProps {

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ReplicationModal/ReplicationModal.test.tsx

@@ -18,7 +18,7 @@ import React from 'react';
 import { render, fireEvent } from '@testing-library/react';
 import '@testing-library/jest-dom';
 import ReplicationModal from './ReplicationModal';
-import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
+import { StorageDirectoryTableData } from '../../../types';
 
 const mockSave = jest.fn();
 jest.mock('../../../../../utils/hooks/useSaveData/useSaveData', () => ({

+ 2 - 2
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/ReplicationModal/ReplicationModal.tsx

@@ -15,10 +15,10 @@
 // limitations under the License.
 
 import React from 'react';
-import { StorageDirectoryTableData } from '../../../../../reactComponents/FileChooser/types';
+import { StorageDirectoryTableData } from '../../../types';
 import { i18nReact } from '../../../../../utils/i18nReact';
 import useSaveData from '../../../../../utils/hooks/useSaveData/useSaveData';
-import { SET_REPLICATION_API_URL } from '../../../../../reactComponents/FileChooser/api';
+import { SET_REPLICATION_API_URL } from '../../../api';
 import InputModal from '../../../../../reactComponents/InputModal/InputModal';
 
 interface ReplicationModalProps {

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/StorageBrowserActions.test.tsx

@@ -20,7 +20,7 @@ import userEvent from '@testing-library/user-event';
 import '@testing-library/jest-dom';
 
 import StorageBrowserActions from './StorageBrowserActions';
-import { StorageDirectoryTableData } from '../../../../reactComponents/FileChooser/types';
+import { StorageDirectoryTableData } from '../../types';
 import { get } from '../../../../api/utils';
 import huePubSub from '../../../../utils/huePubSub';
 

+ 2 - 6
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/StorageBrowserActions.tsx

@@ -35,11 +35,7 @@ import ConfigureIcon from '@cloudera/cuix-core/icons/react/ConfigureIcon';
 import { i18nReact } from '../../../../utils/i18nReact';
 import huePubSub from '../../../../utils/huePubSub';
 import './StorageBrowserActions.scss';
-import {
-  FileStats,
-  FileSystem,
-  StorageDirectoryTableData
-} from '../../../../reactComponents/FileChooser/types';
+import { FileStats, FileSystem, StorageDirectoryTableData } from '../../types';
 import { ActionType, getEnabledActions } from './StorageBrowserActions.util';
 import MoveCopyModal from './MoveCopyModal/MoveCopyModal';
 import RenameModal from './RenameModal/RenameModal';
@@ -48,7 +44,7 @@ import SummaryModal from './SummaryModal/SummaryModal';
 import DeletionModal from './DeletionModal/DeletionModal';
 import CompressionModal from './CompressionModal/CompressionModal';
 import ExtractionModal from './ExtractionModal/ExtractionModal';
-import { DOWNLOAD_API_URL } from '../../../../reactComponents/FileChooser/api';
+import { DOWNLOAD_API_URL } from '../../api';
 import ChangeOwnerAndGroupModal from './ChangeOwnerAndGroupModal/ChangeOwnerAndGroupModal';
 import ChangePermissionModal from './ChangePermissionModal/ChangePermissionModal';
 

+ 1 - 4
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/StorageBrowserActions.util.ts

@@ -15,10 +15,7 @@
 // limitations under the License.
 
 import { getLastKnownConfig } from 'config/hueConfig';
-import {
-  BrowserViewType,
-  StorageDirectoryTableData
-} from '../../../../reactComponents/FileChooser/types';
+import { BrowserViewType, StorageDirectoryTableData } from '../../types';
 import {
   isHDFS,
   isOFS,

+ 2 - 5
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageBrowserActions/SummaryModal/SummaryModal.tsx

@@ -22,11 +22,8 @@ import huePubSub from '../../../../../utils/huePubSub';
 import { i18nReact } from '../../../../../utils/i18nReact';
 import formatBytes from '../../../../../utils/formatBytes';
 import useLoadData from '../../../../../utils/hooks/useLoadData/useLoadData';
-import { CONTENT_SUMMARY_API_URL } from '../../../../../reactComponents/FileChooser/api';
-import {
-  ContentSummary,
-  StorageDirectoryTableData
-} from '../../../../../reactComponents/FileChooser/types';
+import { CONTENT_SUMMARY_API_URL } from '../../../api';
+import { ContentSummary, StorageDirectoryTableData } from '../../../types';
 
 import './SummaryModal.scss';
 

+ 2 - 2
desktop/core/src/desktop/js/apps/storageBrowser/StorageDirectoryPage/StorageDirectoryPage.tsx

@@ -28,7 +28,7 @@ import Table from 'cuix/dist/components/Table';
 import { i18nReact } from '../../../utils/i18nReact';
 import useDebounce from '../../../utils/useDebounce';
 
-import { LIST_DIRECTORY_API_URL } from '../../../reactComponents/FileChooser/api';
+import { LIST_DIRECTORY_API_URL } from '../api';
 import {
   SortOrder,
   ListDirectory,
@@ -36,7 +36,7 @@ import {
   BrowserViewType,
   StorageDirectoryTableData,
   FileSystem
-} from '../../../reactComponents/FileChooser/types';
+} from '../types';
 import Pagination from '../../../reactComponents/Pagination/Pagination';
 import StorageBrowserActions from './StorageBrowserActions/StorageBrowserActions';
 import formatBytes from '../../../utils/formatBytes';

+ 2 - 2
desktop/core/src/desktop/js/apps/storageBrowser/StorageFilePage/StorageFilePage.test.tsx

@@ -17,10 +17,10 @@
 import React from 'react';
 import { render, screen, waitFor } from '@testing-library/react';
 import StorageFilePage from './StorageFilePage';
-import { BrowserViewType, FileStats } from '../../../reactComponents/FileChooser/types';
+import { BrowserViewType, FileStats } from '../types';
 import '@testing-library/jest-dom';
 import userEvent from '@testing-library/user-event';
-import { DOWNLOAD_API_URL } from '../../../reactComponents/FileChooser/api';
+import { DOWNLOAD_API_URL } from '../api';
 import huePubSub from '../../../utils/huePubSub';
 
 jest.mock('../../../utils/dateTimeUtils', () => ({

+ 2 - 10
desktop/core/src/desktop/js/apps/storageBrowser/StorageFilePage/StorageFilePage.tsx

@@ -15,20 +15,12 @@
 // limitations under the License.
 
 import React, { useMemo, useState } from 'react';
-import {
-  BrowserViewType,
-  FilePreview,
-  FileStats
-} from '../../../reactComponents/FileChooser/types';
+import { BrowserViewType, FilePreview, FileStats } from '../types';
 import './StorageFilePage.scss';
 import { i18nReact } from '../../../utils/i18nReact';
 import Button, { PrimaryButton } from 'cuix/dist/components/Button';
 import { getFileMetaData, getFileType } from './StorageFilePage.util';
-import {
-  DOWNLOAD_API_URL,
-  FILE_PREVIEW_API_URL,
-  SAVE_FILE_API_URL
-} from '../../../reactComponents/FileChooser/api';
+import { DOWNLOAD_API_URL, FILE_PREVIEW_API_URL, SAVE_FILE_API_URL } from '../api';
 import huePubSub from '../../../utils/huePubSub';
 import useSaveData from '../../../utils/hooks/useSaveData/useSaveData';
 import Pagination from '../../../reactComponents/Pagination/Pagination';

+ 1 - 1
desktop/core/src/desktop/js/apps/storageBrowser/StorageFilePage/StorageFilePage.util.ts

@@ -15,7 +15,7 @@
 // limitations under the License.
 
 import { TFunction } from 'i18next';
-import { FileStats } from '../../../reactComponents/FileChooser/types';
+import { FileStats } from '../types';
 import { formatTimestamp } from '../../../utils/dateTimeUtils';
 import formatBytes from '../../../utils/formatBytes';
 import {

+ 0 - 0
desktop/core/src/desktop/js/reactComponents/FileChooser/api.ts → desktop/core/src/desktop/js/apps/storageBrowser/api.ts


+ 0 - 0
desktop/core/src/desktop/js/reactComponents/FileChooser/types.ts → desktop/core/src/desktop/js/apps/storageBrowser/types.ts


+ 2 - 2
desktop/core/src/desktop/js/reactComponents/FileChooser/FileChooserModal/FileChooserModal.tsx

@@ -22,8 +22,8 @@ import HdfsIcon from '../../../components/icons/HdfsIcon';
 import S3Icon from '../../../components/icons/S3Icon';
 import AdlsIcon from '../../../components/icons/AdlsIcon';
 
-import { FILESYSTEMS_API_URL } from '../api';
-import { FileSystem } from '../types';
+import { FILESYSTEMS_API_URL } from '../../../apps/storageBrowser/api';
+import { FileSystem } from '../../../apps/storageBrowser/types';
 import './FileChooserModal.scss';
 import PathBrowser from '../../PathBrowser/PathBrowser';
 import useLoadData from '../../../utils/hooks/useLoadData/useLoadData';

+ 1 - 1
desktop/core/src/desktop/js/utils/hooks/useFileUpload/useChunkUpload.ts

@@ -36,7 +36,7 @@ import {
   UploadItem
 } from './util';
 import { get } from '../../../api/utils';
-import { UPLOAD_AVAILABLE_SPACE_URL } from '../../../reactComponents/FileChooser/api';
+import { UPLOAD_AVAILABLE_SPACE_URL } from '../../../apps/storageBrowser/api';
 
 interface UseUploadQueueResponse {
   addFiles: (item: UploadItem[]) => void;

+ 1 - 1
desktop/core/src/desktop/js/utils/hooks/useFileUpload/useRegularUpload.ts

@@ -15,7 +15,7 @@
 // limitations under the License.
 
 import useQueueProcessor from '../useQueueProcessor/useQueueProcessor';
-import { UPLOAD_FILE_URL } from '../../../reactComponents/FileChooser/api';
+import { UPLOAD_FILE_URL } from '../../../apps/storageBrowser/api';
 import {
   DEFAULT_CONCURRENT_MAX_CONNECTIONS,
   FileUploadStatus

+ 1 - 1
desktop/core/src/desktop/js/utils/hooks/useFileUpload/util.ts

@@ -16,7 +16,7 @@
 
 import { FileUploadStatus } from 'utils/constants/storageBrowser';
 import { TaskServerResponse, TaskStatus } from '../../../reactComponents/TaskBrowser/TaskBrowser';
-import { CHUNK_UPLOAD_URL, CHUNK_UPLOAD_COMPLETE_URL } from 'reactComponents/FileChooser/api';
+import { CHUNK_UPLOAD_URL, CHUNK_UPLOAD_COMPLETE_URL } from '../../../apps/storageBrowser/api';
 
 export interface UploadItem {
   uuid: string;