diff --git a/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetUploadActions.d.ts b/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetUploadActions.d.ts deleted file mode 100644 index ebf47af1ee..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetUploadActions.d.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { InferAction } from '@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils'; -import { FormSubmission } from '../Components/UploadForm'; -import { UserDatasetUpload } from '../Utils/types'; -export declare const submitUploadForm: { - ( - formSubmission: FormSubmission, - redirectTo?: string | undefined - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/submit-form', - { - formSubmission: FormSubmission; - redirectTo: string | undefined; - } - >; - readonly type: 'user-dataset-upload/submit-form'; -} & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/submit-form', - { - formSubmission: FormSubmission; - redirectTo: string | undefined; - } - > ->; -export declare const receiveBadUpload: { - ( - message: string - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/receive-bad-upload', - { - message: string; - timestamp: number; - } - >; - readonly type: 'user-dataset-upload/receive-bad-upload'; -} & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/receive-bad-upload', - { - message: string; - timestamp: number; - } - > ->; -export declare const clearBadUpload: { - (): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/clear-bad-upload', - {} - >; - readonly type: 'user-dataset-upload/clear-bad-upload'; -} & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/clear-bad-upload', - {} - > ->; -export declare const cancelCurrentUpload: { - ( - id: string - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/cancel-upload', - { - id: string; - } - >; - readonly type: 'user-dataset-upload/cancel-upload'; -} & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/cancel-upload', - { - id: string; - } - > ->; -export declare const clearMessages: { - ( - ids: string[] - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/clear-messages', - { - ids: string[]; - } - >; - readonly type: 'user-dataset-upload/clear-messages'; -} & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/clear-messages', - { - ids: string[]; - } - > ->; -export declare const requestUploadMessages: { - (): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/load-upload-messages', - void - >; - readonly type: 'user-dataset-upload/load-upload-messages'; -} & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/load-upload-messages', - void - > ->; -export declare const receiveUploadMessages: { - ( - uploads: UserDatasetUpload[] - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/receive-upload-messages', - { - uploads: UserDatasetUpload[]; - } - >; - readonly type: 'user-dataset-upload/receive-upload-messages'; -} & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/receive-upload-messages', - { - uploads: UserDatasetUpload[]; - } - > ->; -export declare const receiveBadUploadHistoryAction: { - ( - message: string - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/receive-bad-upload-history-action', - { - message: string; - timestamp: number; - } - >; - readonly type: 'user-dataset-upload/receive-bad-upload-history-action'; -} & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/receive-bad-upload-history-action', - { - message: string; - timestamp: number; - } - > ->; -export type Action = - | InferAction - | InferAction - | InferAction - | InferAction - | InferAction - | InferAction - | InferAction - | InferAction; -//# sourceMappingURL=UserDatasetUploadActions.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetUploadActions.d.ts.map b/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetUploadActions.d.ts.map deleted file mode 100644 index 2fdb24992e..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetUploadActions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetUploadActions.d.ts","sourceRoot":"","sources":["../../src/lib/Actions/UserDatasetUploadActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,EACZ,MAAM,oDAAoD,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,eAAO,MAAM,gBAAgB;;;;;;;;;GAM5B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;GAG5B,CAAC;AAEF,eAAO,MAAM,cAAc;;;0MAG1B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;GAG/B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;GAGzB,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;gNAGjC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;GAGjC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;GAGzC,CAAC;AAEF,MAAM,MAAM,MAAM,GACd,WAAW,CAAC,OAAO,gBAAgB,CAAC,GACpC,WAAW,CAAC,OAAO,gBAAgB,CAAC,GACpC,WAAW,CAAC,OAAO,cAAc,CAAC,GAClC,WAAW,CAAC,OAAO,mBAAmB,CAAC,GACvC,WAAW,CAAC,OAAO,aAAa,CAAC,GACjC,WAAW,CAAC,OAAO,qBAAqB,CAAC,GACzC,WAAW,CAAC,OAAO,qBAAqB,CAAC,GACzC,WAAW,CAAC,OAAO,6BAA6B,CAAC,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetUploadActions.js b/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetUploadActions.js deleted file mode 100644 index 1f223c09ef..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetUploadActions.js +++ /dev/null @@ -1,37 +0,0 @@ -import { makeActionCreator } from '@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils'; -export const submitUploadForm = makeActionCreator( - 'user-dataset-upload/submit-form', - (formSubmission, redirectTo) => ({ - formSubmission, - redirectTo, - }) -); -export const receiveBadUpload = makeActionCreator( - 'user-dataset-upload/receive-bad-upload', - (message) => ({ message, timestamp: Date.now() }) -); -export const clearBadUpload = makeActionCreator( - 'user-dataset-upload/clear-bad-upload', - () => ({}) -); -export const cancelCurrentUpload = makeActionCreator( - 'user-dataset-upload/cancel-upload', - (id) => ({ id }) -); -export const clearMessages = makeActionCreator( - 'user-dataset-upload/clear-messages', - (ids) => ({ ids }) -); -export const requestUploadMessages = makeActionCreator( - 'user-dataset-upload/load-upload-messages', - () => {} -); -export const receiveUploadMessages = makeActionCreator( - 'user-dataset-upload/receive-upload-messages', - (uploads) => ({ uploads }) -); -export const receiveBadUploadHistoryAction = makeActionCreator( - 'user-dataset-upload/receive-bad-upload-history-action', - (message) => ({ message, timestamp: Date.now() }) -); -//# sourceMappingURL=UserDatasetUploadActions.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetUploadActions.js.map b/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetUploadActions.js.map deleted file mode 100644 index fb779278f5..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetUploadActions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetUploadActions.js","sourceRoot":"","sources":["../../src/lib/Actions/UserDatasetUploadActions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,GAElB,MAAM,oDAAoD,CAAC;AAK5D,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAC/C,iCAAiC,EACjC,CAAC,cAA8B,EAAE,UAAmB,EAAE,EAAE,CAAC,CAAC;IACxD,cAAc;IACd,UAAU;CACX,CAAC,CACH,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAC/C,wCAAwC,EACxC,CAAC,OAAe,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAC1D,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,iBAAiB,CAC7C,sCAAsC,EACtC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CACX,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAClD,mCAAmC,EACnC,CAAC,EAAU,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,iBAAiB,CAC5C,oCAAoC,EACpC,CAAC,GAAa,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAAiB,CACpD,0CAA0C,EAC1C,GAAG,EAAE,GAAE,CAAC,CACT,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAAiB,CACpD,6CAA6C,EAC7C,CAAC,OAAiC,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CACrD,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,iBAAiB,CAC5D,uDAAuD,EACvD,CAAC,OAAe,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAC1D,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetsActions.d.ts b/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetsActions.d.ts deleted file mode 100644 index 7f26ffeae0..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetsActions.d.ts +++ /dev/null @@ -1,236 +0,0 @@ -import { Action as RouteAction } from '@veupathdb/wdk-client/lib/Actions/RouterActions'; -import { PreferenceUpdateAction } from '@veupathdb/wdk-client/lib/Actions/UserActions'; -import { EmptyAction } from '@veupathdb/wdk-client/lib/Core/WdkMiddleware'; -import { ServiceError } from '@veupathdb/wdk-client/lib/Service/ServiceError'; -import { UserDatasetShareResponse } from '../Service/UserDatasetWrappers'; -import { UserDataset, UserDatasetMeta } from '../Utils/types'; -export type Action = - | DetailErrorAction - | DetailLoadingAction - | DetailReceivedAction - | DetailRemoveErrorAction - | DetailRemoveSuccessAction - | DetailRemovingAction - | DetailUpdateErrorAction - | DetailUpdateSuccessAction - | DetailUpdatingAction - | ListLoadingAction - | ListErrorReceivedAction - | ListReceivedAction - | ProjectFilterAction - | SharingDatasetAction - | SharingSuccessAction; -export declare const LIST_LOADING = 'user-datasets/list-loading'; -export type ListLoadingAction = { - type: typeof LIST_LOADING; -}; -export declare function listLoading(): ListLoadingAction; -export declare const LIST_RECEIVED = 'user-dataset/list-received'; -export type ListReceivedAction = { - type: typeof LIST_RECEIVED; - payload: { - userDatasets: UserDataset[]; - filterByProject: boolean; - }; -}; -export declare function listReceived( - userDatasets: UserDataset[], - filterByProject: boolean -): ListReceivedAction; -export declare const LIST_ERROR_RECEIVED = 'user-dataset/list-error'; -export type ListErrorReceivedAction = { - type: typeof LIST_ERROR_RECEIVED; - payload: { - error: ServiceError; - }; -}; -export declare function listErrorReceived( - error: ServiceError -): ListErrorReceivedAction; -export declare const DETAIL_LOADING = 'user-datasets/detail-loading'; -export type DetailLoadingAction = { - type: typeof DETAIL_LOADING; - payload: { - id: number; - }; -}; -export declare function detailLoading(id: number): DetailLoadingAction; -export declare const DETAIL_RECEIVED = 'user-datasets/detail-received'; -export type DetailReceivedAction = { - type: typeof DETAIL_RECEIVED; - payload: { - id: number; - userDataset?: UserDataset; - }; -}; -export declare function detailReceived( - id: number, - userDataset?: UserDataset -): DetailReceivedAction; -export declare const DETAIL_ERROR = 'user-datasets/detail-error'; -export type DetailErrorAction = { - type: typeof DETAIL_ERROR; - payload: { - error: ServiceError; - }; -}; -export declare function detailError(error: ServiceError): DetailErrorAction; -export declare const DETAIL_UPDATING = 'user-dataests/detail-updating'; -export type DetailUpdatingAction = { - type: typeof DETAIL_UPDATING; -}; -export declare function detailUpdating(): DetailUpdatingAction; -export declare const DETAIL_UPDATE_SUCCESS = - 'user-datasets/detail-update-success'; -export type DetailUpdateSuccessAction = { - type: typeof DETAIL_UPDATE_SUCCESS; - payload: { - userDataset: UserDataset; - }; -}; -export declare function detailUpdateSuccess( - userDataset: UserDataset -): DetailUpdateSuccessAction; -export declare const DETAIL_UPDATE_ERROR = 'user-datasets/detail-update-error'; -export type DetailUpdateErrorAction = { - type: typeof DETAIL_UPDATE_ERROR; - payload: { - error: ServiceError; - }; -}; -export declare function detailUpdateError( - error: ServiceError -): DetailUpdateErrorAction; -export declare const DETAIL_REMOVING = 'user-datasets/detail-removing'; -export type DetailRemovingAction = { - type: typeof DETAIL_REMOVING; -}; -export declare function detailRemoving(): DetailRemovingAction; -export declare const DETAIL_REMOVE_SUCCESS = - 'user-datasets/detail-remove-success'; -export type DetailRemoveSuccessAction = { - type: typeof DETAIL_REMOVE_SUCCESS; - payload: { - userDataset: UserDataset; - }; -}; -export declare function detailRemoveSuccess( - userDataset: UserDataset -): DetailRemoveSuccessAction; -export declare const DETAIL_REMOVE_ERROR = 'user-datasets/detail-remove-error'; -export type DetailRemoveErrorAction = { - type: typeof DETAIL_REMOVE_ERROR; - payload: { - error: ServiceError; - }; -}; -export declare function detailRemoveError( - error: ServiceError -): DetailRemoveErrorAction; -export declare const SHARING_DATASET = 'user-datasets/sharing-dataset'; -export type SharingDatasetAction = { - type: typeof SHARING_DATASET; - payload: { - userDataset: UserDataset; - recipients: string[]; - }; -}; -export declare function sharingDataset( - userDataset: UserDataset, - recipients: string[] -): SharingDatasetAction; -export declare const SHARING_SUCCESS = 'user-datasets/sharing-success'; -export type SharingSuccessAction = { - type: typeof SHARING_SUCCESS; - payload: { - response: UserDatasetShareResponse; - }; -}; -export declare function sharingSuccess( - response: UserDatasetShareResponse -): SharingSuccessAction; -export declare const SHARING_ERROR = 'user-datasets/sharing-error'; -export type SharingErrorAction = { - type: typeof SHARING_ERROR; - payload: { - error: Error; - }; -}; -export declare function sharingError(error: Error): SharingErrorAction; -export declare const PROJECT_FILTER = - 'user-datasets/project-filter-preference-received'; -export type ProjectFilterAction = { - type: typeof PROJECT_FILTER; - payload: { - filterByProject: boolean; - }; -}; -export declare function projectFilter( - filterByProject: boolean -): ProjectFilterAction; -type ListAction = - | ListLoadingAction - | ListReceivedAction - | ListErrorReceivedAction; -type DetailAction = - | DetailLoadingAction - | DetailReceivedAction - | DetailErrorAction; -type UpdateAction = - | DetailUpdatingAction - | DetailUpdateSuccessAction - | DetailUpdateErrorAction; -type RemovalAction = - | DetailRemovingAction - | DetailRemoveSuccessAction - | DetailRemoveErrorAction; -type SharingAction = - | SharingDatasetAction - | SharingSuccessAction - | SharingErrorAction; -export declare function loadUserDatasetList(): import('@veupathdb/wdk-client/lib/Core/WdkMiddleware').ActionThunk< - ListAction, - import('../Service/UserDatasetWrappers').UserDatasetCompatibleEpicDependencies ->; -export declare function loadUserDatasetDetail( - id: number -): import('@veupathdb/wdk-client/lib/Core/WdkMiddleware').ActionThunk< - DetailAction, - import('../Service/UserDatasetWrappers').UserDatasetCompatibleEpicDependencies ->; -export declare function shareUserDatasets( - userDatasetIds: number[], - recipientUserIds: number[] -): import('@veupathdb/wdk-client/lib/Core/WdkMiddleware').ActionThunk< - SharingAction, - import('../Service/UserDatasetWrappers').UserDatasetCompatibleEpicDependencies ->; -export declare function unshareUserDatasets( - userDatasetIds: number[], - recipientUserIds: number[] -): import('@veupathdb/wdk-client/lib/Core/WdkMiddleware').ActionThunk< - SharingAction, - import('../Service/UserDatasetWrappers').UserDatasetCompatibleEpicDependencies ->; -export declare function updateUserDatasetDetail( - userDataset: UserDataset, - meta: UserDatasetMeta -): import('@veupathdb/wdk-client/lib/Core/WdkMiddleware').ActionThunk< - UpdateAction, - import('../Service/UserDatasetWrappers').UserDatasetCompatibleEpicDependencies ->; -export declare function removeUserDataset( - userDataset: UserDataset, - redirectTo?: string -): import('@veupathdb/wdk-client/lib/Core/WdkMiddleware').ActionThunk< - RemovalAction | EmptyAction | RouteAction, - import('../Service/UserDatasetWrappers').UserDatasetCompatibleEpicDependencies ->; -export declare function updateProjectFilter( - filterByProject: boolean -): import('@veupathdb/wdk-client/lib/Core/WdkMiddleware').ActionThunk< - ProjectFilterAction | PreferenceUpdateAction, - import('../Service/UserDatasetWrappers').UserDatasetCompatibleEpicDependencies ->; -export {}; -//# sourceMappingURL=UserDatasetsActions.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetsActions.d.ts.map b/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetsActions.d.ts.map deleted file mode 100644 index 23148821cc..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetsActions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetsActions.d.ts","sourceRoot":"","sources":["../../src/lib/Actions/UserDatasetsActions.ts"],"names":[],"mappings":"AAEA,OAAO,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CAC/B,cAAc,EAAE,MAAM,EAAE,EACxB,gBAAgB,EAAE,MAAM,EAAE,qKAO3B;AAED,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,MAAM,EAAE,EACxB,gBAAgB,EAAE,MAAM,EAAE,qKAO3B;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,eAAe,oKAWtB;AAED,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,WAAW,EACxB,UAAU,CAAC,EAAE,MAAM,iMAkBpB;AAED,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,OAAO,oMAW3D"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetsActions.js b/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetsActions.js deleted file mode 100644 index 3a2c724eb4..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetsActions.js +++ /dev/null @@ -1,244 +0,0 @@ -import { get } from 'lodash'; -import { transitionToInternalPage } from '@veupathdb/wdk-client/lib/Actions/RouterActions'; -import { updateUserPreference } from '@veupathdb/wdk-client/lib/Actions/UserActions'; -import { emptyAction } from '@veupathdb/wdk-client/lib/Core/WdkMiddleware'; -import { validateUserDatasetCompatibleThunk } from '../Service/UserDatasetWrappers'; -import { FILTER_BY_PROJECT_PREF } from '../Utils/project-filter'; -//============================================================================== -export const LIST_LOADING = 'user-datasets/list-loading'; -export function listLoading() { - return { - type: LIST_LOADING, - }; -} -//============================================================================== -export const LIST_RECEIVED = 'user-dataset/list-received'; -export function listReceived(userDatasets, filterByProject) { - return { - type: LIST_RECEIVED, - payload: { - userDatasets, - filterByProject, - }, - }; -} -//============================================================================== -export const LIST_ERROR_RECEIVED = 'user-dataset/list-error'; -export function listErrorReceived(error) { - return { - type: LIST_ERROR_RECEIVED, - payload: { - error, - }, - }; -} -//============================================================================== -export const DETAIL_LOADING = 'user-datasets/detail-loading'; -export function detailLoading(id) { - return { - type: DETAIL_LOADING, - payload: { - id, - }, - }; -} -//============================================================================== -export const DETAIL_RECEIVED = 'user-datasets/detail-received'; -export function detailReceived(id, userDataset) { - return { - type: DETAIL_RECEIVED, - payload: { - id, - userDataset, - }, - }; -} -//============================================================================== -export const DETAIL_ERROR = 'user-datasets/detail-error'; -export function detailError(error) { - return { - type: DETAIL_ERROR, - payload: { - error, - }, - }; -} -//============================================================================== -export const DETAIL_UPDATING = 'user-dataests/detail-updating'; -export function detailUpdating() { - return { - type: DETAIL_UPDATING, - }; -} -//============================================================================== -export const DETAIL_UPDATE_SUCCESS = 'user-datasets/detail-update-success'; -export function detailUpdateSuccess(userDataset) { - return { - type: DETAIL_UPDATE_SUCCESS, - payload: { - userDataset, - }, - }; -} -//============================================================================== -export const DETAIL_UPDATE_ERROR = 'user-datasets/detail-update-error'; -export function detailUpdateError(error) { - return { - type: DETAIL_UPDATE_ERROR, - payload: { - error, - }, - }; -} -//============================================================================== -export const DETAIL_REMOVING = 'user-datasets/detail-removing'; -export function detailRemoving() { - return { - type: DETAIL_REMOVING, - }; -} -//============================================================================== -export const DETAIL_REMOVE_SUCCESS = 'user-datasets/detail-remove-success'; -export function detailRemoveSuccess(userDataset) { - return { - type: DETAIL_REMOVE_SUCCESS, - payload: { - userDataset, - }, - }; -} -//============================================================================== -export const DETAIL_REMOVE_ERROR = 'user-datasets/detail-remove-error'; -export function detailRemoveError(error) { - return { - type: DETAIL_REMOVE_ERROR, - payload: { - error, - }, - }; -} -//============================================================================== -export const SHARING_DATASET = 'user-datasets/sharing-dataset'; -export function sharingDataset(userDataset, recipients) { - return { - type: SHARING_DATASET, - payload: { - userDataset, - recipients, - }, - }; -} -//============================================================================== -export const SHARING_SUCCESS = 'user-datasets/sharing-success'; -export function sharingSuccess(response) { - return { - type: SHARING_SUCCESS, - payload: { - response, - }, - }; -} -//============================================================================== -export const SHARING_ERROR = 'user-datasets/sharing-error'; -export function sharingError(error) { - return { - type: SHARING_ERROR, - payload: { - error, - }, - }; -} -//============================================================================== -export const PROJECT_FILTER = - 'user-datasets/project-filter-preference-received'; -export function projectFilter(filterByProject) { - return { - type: PROJECT_FILTER, - payload: { - filterByProject, - }, - }; -} -export function loadUserDatasetList() { - return validateUserDatasetCompatibleThunk(({ wdkService }) => [ - listLoading(), - Promise.all([ - wdkService.getCurrentUserPreferences().then( - (preferences) => - get(preferences.global, FILTER_BY_PROJECT_PREF, 'false') !== 'false', - // ignore error and default to false - () => false - ), - wdkService.getCurrentUserDatasets(), - ]).then( - ([filterByProject, userDatasets]) => - listReceived(userDatasets, filterByProject), - listErrorReceived - ), - ]); -} -export function loadUserDatasetDetail(id) { - return validateUserDatasetCompatibleThunk(({ wdkService }) => [ - detailLoading(id), - wdkService.getUserDataset(id).then( - (userDataset) => detailReceived(id, userDataset), - (error) => - error.status === 404 ? detailReceived(id) : detailError(error) - ), - ]); -} -export function shareUserDatasets(userDatasetIds, recipientUserIds) { - return validateUserDatasetCompatibleThunk(({ wdkService }) => { - return wdkService - .editUserDatasetSharing('add', userDatasetIds, recipientUserIds) - .then(sharingSuccess, sharingError); - }); -} -export function unshareUserDatasets(userDatasetIds, recipientUserIds) { - return validateUserDatasetCompatibleThunk(({ wdkService }) => { - return wdkService - .editUserDatasetSharing('delete', userDatasetIds, recipientUserIds) - .then(sharingSuccess, sharingError); - }); -} -export function updateUserDatasetDetail(userDataset, meta) { - return validateUserDatasetCompatibleThunk(({ wdkService }) => [ - detailUpdating(), - wdkService - .updateUserDataset(userDataset.id, meta) - .then( - () => - detailUpdateSuccess( - Object.assign(Object.assign({}, userDataset), { meta }) - ), - detailUpdateError - ), - ]); -} -export function removeUserDataset(userDataset, redirectTo) { - return validateUserDatasetCompatibleThunk(({ wdkService }) => [ - detailRemoving(), - wdkService - .removeUserDataset(userDataset.id) - .then( - () => [ - detailRemoveSuccess(userDataset), - typeof redirectTo === 'string' - ? transitionToInternalPage(redirectTo) - : emptyAction, - ], - detailRemoveError - ), - ]); -} -export function updateProjectFilter(filterByProject) { - return validateUserDatasetCompatibleThunk(() => [ - updateUserPreference( - 'global', - FILTER_BY_PROJECT_PREF, - JSON.stringify(filterByProject) - ), - projectFilter(filterByProject), - ]); -} -//# sourceMappingURL=UserDatasetsActions.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetsActions.js.map b/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetsActions.js.map deleted file mode 100644 index 44fca9b6f1..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Actions/UserDatasetsActions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetsActions.js","sourceRoot":"","sources":["../../src/lib/Actions/UserDatasetsActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAE7B,OAAO,EACL,wBAAwB,GAEzB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,oBAAoB,GAErB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAEL,WAAW,GACZ,MAAM,8CAA8C,CAAC;AAGtD,OAAO,EAEL,kCAAkC,GACnC,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAoBjE,gFAAgF;AAEhF,MAAM,CAAC,MAAM,YAAY,GAAG,4BAA4B,CAAC;AAMzD,MAAM,UAAU,WAAW;IACzB,OAAO;QACL,IAAI,EAAE,YAAY;KACnB,CAAC;AACJ,CAAC;AAED,gFAAgF;AAEhF,MAAM,CAAC,MAAM,aAAa,GAAG,4BAA4B,CAAC;AAU1D,MAAM,UAAU,YAAY,CAC1B,YAA2B,EAC3B,eAAwB;IAExB,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE;YACP,YAAY;YACZ,eAAe;SAChB;KACF,CAAC;AACJ,CAAC;AAED,gFAAgF;AAEhF,MAAM,CAAC,MAAM,mBAAmB,GAAG,yBAAyB,CAAC;AAS7D,MAAM,UAAU,iBAAiB,CAC/B,KAAmB;IAEnB,OAAO;QACL,I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UAAU,mBAAmB,CAAC,eAAwB;IAC1D,OAAO,kCAAkC,CAEvC,GAAG,EAAE,CAAC;QACN,oBAAoB,CAClB,QAAQ,EACR,sBAAsB,EACtB,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,CAChC;QACD,aAAa,CAAC,eAAe,CAAC;KAC/B,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/AllUploads.d.ts b/packages/libs/user-datasets-legacy/lib/Components/AllUploads.d.ts deleted file mode 100644 index 614c7cdbe2..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/AllUploads.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/// -import { UserDatasetUpload } from '../Utils/types'; -interface Props { - baseUrl: string; - uploadList?: Array; - errorMessage?: string; - actions: { - clearMessages: (ids: string[]) => void; - cancelCurrentUpload: (id: string) => void; - }; -} -declare const AllUploads: (props: Props) => JSX.Element; -export default AllUploads; -//# sourceMappingURL=AllUploads.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/AllUploads.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/AllUploads.d.ts.map deleted file mode 100644 index 818c69b761..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/AllUploads.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AllUploads.d.ts","sourceRoot":"","sources":["../../src/lib/Components/AllUploads.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE;QACP,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;QACvC,mBAAmB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;KAC3C,CAAC;CACH;AAkKD,QAAA,MAAM,UAAU,UAAW,KAAK,gBAiG/B,CAAC;AACF,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/AllUploads.js b/packages/libs/user-datasets-legacy/lib/Components/AllUploads.js deleted file mode 100644 index b42c9e8b33..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/AllUploads.js +++ /dev/null @@ -1,372 +0,0 @@ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator['throw'](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime'; -import { useCallback, useMemo } from 'react'; -import { Checkbox, Link } from '@veupathdb/wdk-client/lib/Components'; -import Icon from '@veupathdb/wdk-client/lib/Components/Icon/IconAlt'; -import { useWdkService } from '@veupathdb/wdk-client/lib/Hooks/WdkServiceHook'; -import UserDatasetEmptyState from './EmptyState'; -import { useProjectFilter } from '../Hooks/project-filter'; -const ClearAllMessagesButton = (onClickCallback, buttonContent) => - _jsx( - 'button', - Object.assign( - { type: 'submit', className: 'btn', onClick: onClickCallback }, - { children: buttonContent } - ) - ); -const UploadHeader = ({ color, iconType, date }) => - _jsxs( - 'div', - Object.assign( - { style: { color } }, - { - children: [ - _jsx(Icon, { fa: iconType }), - _jsx( - 'span', - Object.assign( - { style: { marginLeft: '0.5em' } }, - { children: new Date(date).toLocaleString() } - ) - ), - ], - } - ) - ); -const OngoingUpload = (upload, onClickCancel) => - _jsxs('div', { - children: [ - _jsx(UploadHeader, { - color: 'orange', - iconType: 'cogs', - date: upload.finished || upload.started, - }), - _jsxs('div', { - children: [ - 'Currently uploading: ', - _jsx('code', { children: upload.datasetName }), - ], - }), - _jsxs('div', { - children: [ - 'Status:', - ' ', - upload.status + - (upload.stepPercent ? ' ... ' + upload.stepPercent + '%' : ''), - ], - }), - upload.isCancellable && - _jsx( - 'button', - Object.assign( - { className: 'btn', onClick: () => onClickCancel() }, - { children: 'Cancel upload' } - ) - ), - ], - }); -const SuccessfulUpload = (upload, baseUrl) => - _jsxs('div', { - children: [ - _jsx(UploadHeader, { - color: 'green', - iconType: 'check-circle', - date: upload.finished || upload.started, - }), - 'Successfully uploaded: \u00A0', - _jsx( - Link, - Object.assign( - { - to: - upload.datasetId != null - ? `${baseUrl}/${upload.datasetId}` - : baseUrl, - }, - { children: _jsx('code', { children: upload.datasetName }) } - ) - ), - ], - }); -const InvalidatedUpload = (upload) => { - return _jsxs('div', { - children: [ - _jsx(UploadHeader, { - color: 'red', - iconType: 'exclamation-triangle', - date: upload.finished || upload.started, - }), - _jsxs('div', { - children: [ - _jsx('code', { children: upload.datasetName }), - ' was rejected as it is invalid', - upload.errors - ? _jsxs('span', { - children: [ - ':', - _jsx('code', { - children: upload.errors.map((line, ix) => - _jsx('div', { children: line }, ix) - ), - }), - ], - }) - : _jsx('span', { children: '.' }), - ], - }), - ], - }); -}; -const FailedUpload = (upload) => - _jsxs('div', { - children: [ - _jsx(UploadHeader, { - color: 'red', - iconType: 'exclamation-triangle', - date: upload.finished || upload.started, - }), - _jsxs('div', { - children: [ - _jsx('code', { children: upload.datasetName }), - ' could not be uploaded.', - ], - }), - _jsxs('div', { - children: [ - 'Please try again. If the problem persists, please let us know through our \u00A0', - _jsx( - Link, - Object.assign( - { to: '/contact-us', target: '_blank' }, - { children: 'support form' } - ) - ), - '.', - ], - }), - ], - }); -const UploadsTable = (props) => { - const { baseUrl, uploads, cancelCurrentUpload } = props; - return _jsx( - 'table', - Object.assign( - { style: { margin: '1em 0' } }, - { - children: _jsx('tbody', { - children: uploads.map((upload, ix) => - _jsx( - 'tr', - { - children: _jsx( - 'td', - Object.assign( - { style: { fontSize: 'larger', paddingBottom: '1em' } }, - { - children: upload.isOngoing - ? OngoingUpload(upload, () => - cancelCurrentUpload(upload.id) - ) - : upload.isSuccessful - ? SuccessfulUpload(upload, baseUrl) - : upload.isUserError - ? InvalidatedUpload(upload) - : FailedUpload(upload), - } - ) - ), - }, - ix + '-' + upload.datasetName - ) - ), - }), - } - ) - ); -}; -const RefreshButton = () => - _jsx( - 'button', - Object.assign( - { - type: 'submit', - className: 'btn', - onClick: () => { - window.location.reload(); - }, - }, - { children: 'Refresh page' } - ) - ); -const ErrorMessage = (message) => - _jsx( - 'div', - Object.assign( - { className: 'ui-state-error', style: { fontSize: 'large' } }, - { - children: message - .split('\n') - .map((line, ix) => - _jsxs( - 'div', - Object.assign( - { className: 'ui-state-error-text' }, - { - children: [ - ix === 0 && _jsx(Icon, { fa: 'exclamation-triangle' }), - line, - ], - } - ), - ix - ) - ), - } - ) - ); -const AllUploads = (props) => { - const uploads = useMemo(() => { - var _a; - return (_a = props.uploadList) !== null && _a !== void 0 ? _a : []; - }, [props.uploadList]); - const ongoingUploads = useMemo( - () => uploads.filter((u) => u.isOngoing), - [uploads] - ); - const finishedUploads = useMemo( - () => uploads.filter((u) => !u.isOngoing), - [uploads] - ); - const projectInfo = useWdkService( - (wdkService) => - __awaiter(void 0, void 0, void 0, function* () { - const config = yield wdkService.getConfig(); - return { - id: config.projectId, - name: config.displayName, - }; - }), - [] - ); - const [projectFilter, setProjectFilter] = useProjectFilter(); - const hasUploadFromAnotherProject = useMemo( - () => - uploads.some((upload) => - upload.projects.some( - (project) => - project !== - (projectInfo === null || projectInfo === void 0 - ? void 0 - : projectInfo.id) - ) - ), - [projectInfo, uploads] - ); - const projectFilterApplied = projectFilter !== false; - const uploadFilterPredicate = useCallback( - (upload) => - projectInfo == null || - !projectFilterApplied || - upload.projects.includes(projectInfo.id), - [projectInfo, projectFilterApplied] - ); - const filteredUploads = useMemo( - () => uploads.filter(uploadFilterPredicate), - [uploads, uploadFilterPredicate] - ); - const filteredFinishedUploads = useMemo( - () => finishedUploads.filter(uploadFilterPredicate), - [finishedUploads, uploadFilterPredicate] - ); - return _jsxs('div', { - children: [ - props.errorMessage != null && ErrorMessage(props.errorMessage), - ongoingUploads.length > 0 && RefreshButton(), - projectInfo != null && - hasUploadFromAnotherProject && - _jsxs( - 'div', - Object.assign( - { style: { display: 'flex', gap: '0.25em', margin: '0.5em' } }, - { - children: [ - _jsx(Checkbox, { - id: 'recent-uploads-project-filter', - value: projectFilterApplied, - onChange: () => { - setProjectFilter((projectFilter) => !projectFilter); - }, - }), - _jsxs( - 'label', - Object.assign( - { htmlFor: 'recent-uploads-project-filter' }, - { children: ['Only show uploads to ', projectInfo.name] } - ) - ), - ], - } - ) - ), - filteredUploads.length > 0 && - _jsx(UploadsTable, { - baseUrl: props.baseUrl, - uploads: filteredUploads, - cancelCurrentUpload: props.actions.cancelCurrentUpload, - }), - filteredFinishedUploads.length > 0 && - ClearAllMessagesButton( - () => - props.actions.clearMessages( - filteredFinishedUploads.map((u) => u.id) - ), - projectFilterApplied && hasUploadFromAnotherProject - ? 'Clear These Messages' - : 'Clear All Messages' - ), - props.errorMessage == null && - projectInfo != null && - filteredUploads.length === 0 && - _jsx(UserDatasetEmptyState, { - message: - uploads.length === 0 - ? 'There are no recent uploads to be displayed.' - : `There are no recent ${projectInfo.name} uploads to be displayed. Uncheck "Only show uploads to ${projectInfo.name}" to see all your recent uploads.`, - }), - ], - }); -}; -export default AllUploads; -//# sourceMappingURL=AllUploads.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/AllUploads.js.map b/packages/libs/user-datasets-legacy/lib/Components/AllUploads.js.map deleted file mode 100644 index 1baf97a925..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/AllUploads.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AllUploads.js","sourceRoot":"","sources":["../../src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AAG,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,iBAC7D,KAAC,QAAQ,IACP,EAAE,EAAC,+BAA+B,EAClC,KAAK,EAAE,oBAAoB,EAC3B,QAAQ,EAAE,GAAG,EAAE;4BACb,gBAAgB,CAAC,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC;wBACtD,CAAC,GACD,EACF,+BAAO,OAAO,EAAC,+BAA+B,0CACtB,WAAW,CAAC,IAAI,KAChC,KACJ,CACP,EACA,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,CAC7B,KAAC,YAAY,IACX,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,OAAO,EAAE,eAAe,EACxB,mBAAmB,EAAE,KAAK,CAAC,OAAO,CAAC,mBAAmB,GACtD,CACH,EACA,uBAAuB,CAAC,MAAM,GAAG,CAAC;gBACjC,sBAAsB,CACpB,GAAG,EAAE,CACH,KAAK,CAAC,OAAO,CAAC,aAAa,CACzB,uBAAuB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CACzC,EACH,oBAAoB,IAAI,2BAA2B;oBACjD,CAAC,CAAC,sBAAsB;oBACxB,CAAC,CAAC,oBAAoB,CACzB,EACF,KAAK,CAAC,YAAY,IAAI,IAAI;gBACzB,WAAW,IAAI,IAAI;gBACnB,eAAe,CAAC,MAAM,KAAK,CAAC,IAAI,CAC9B,KAAC,qBAAqB,IACpB,OAAO,EACL,OAAO,CAAC,MAAM,KAAK,CAAC;oBAClB,CAAC,CAAC,8CAA8C;oBAChD,CAAC,CAAC,uBAAuB,WAAW,CAAC,IAAI,2DAA2D,WAAW,CAAC,IAAI,mCAAmC,GAE3J,CACH,IACC,CACP,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/DateTime.d.ts b/packages/libs/user-datasets-legacy/lib/Components/DateTime.d.ts deleted file mode 100644 index 127f58464e..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/DateTime.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/// -type Value = string | number | Date; -interface Props { - datetime: Value; -} -export declare function DateTime(props: Props): JSX.Element; -export {}; -//# sourceMappingURL=DateTime.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/DateTime.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/DateTime.d.ts.map deleted file mode 100644 index 60231b573d..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/DateTime.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../../src/lib/Components/DateTime.tsx"],"names":[],"mappings":";AAEA,KAAK,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAEpC,UAAU,KAAK;IACb,QAAQ,EAAE,KAAK,CAAC;CACjB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,eAcpC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/DateTime.js b/packages/libs/user-datasets-legacy/lib/Components/DateTime.js deleted file mode 100644 index 79ac09b6ab..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/DateTime.js +++ /dev/null @@ -1,21 +0,0 @@ -import { jsxs as _jsxs, jsx as _jsx } from 'react/jsx-runtime'; -export function DateTime(props) { - var _a; - try { - const dateObj = new Date(props.datetime); - const isoString = dateObj.toISOString(); - const [_, date = 'Unknown', time = ''] = - (_a = dateObj - .toISOString() - .match(/(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}).*/)) !== null && _a !== void 0 - ? _a - : []; - return _jsxs( - 'div', - Object.assign({ title: isoString }, { children: [date, ' ', time] }) - ); - } catch (_b) { - return _jsx('div', { children: 'Unknown' }); - } -} -//# sourceMappingURL=DateTime.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/DateTime.js.map b/packages/libs/user-datasets-legacy/lib/Components/DateTime.js.map deleted file mode 100644 index 6c09baea9e..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/DateTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DateTime.js","sourceRoot":"","sources":["../../src/lib/Components/DateTime.tsx"],"names":[],"mappings":";AAQA,MAAM,UAAU,QAAQ,CAAC,KAAY;;IACnC,IAAI;QACF,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACzC,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;QACxC,MAAM,CAAC,CAAC,EAAE,IAAI,GAAG,SAAS,EAAE,IAAI,GAAG,EAAE,CAAC,GACpC,MAAA,OAAO,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,qCAAqC,CAAC,mCAAI,EAAE,CAAC;QAC3E,OAAO,CACL,6BAAK,KAAK,EAAE,SAAS,iBAClB,IAAI,OAAG,IAAI,KACR,CACP,CAAC;KACH;IAAC,WAAM;QACN,OAAO,oCAAkB,CAAC;KAC3B;AACH,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigDatasetDetail.d.ts b/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigDatasetDetail.d.ts deleted file mode 100644 index 54c4811e14..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigDatasetDetail.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default BigwigDatasetDetail; -declare class BigwigDatasetDetail extends UserDatasetDetail { - renderTracksSection(): JSX.Element | null; - getTracksTableColumns(): { - key: string; - name: string; - renderCell: ({ row }: { row: any }) => JSX.Element; - }[]; -} -import UserDatasetDetail from './UserDatasetDetail'; -//# sourceMappingURL=BigwigDatasetDetail.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigDatasetDetail.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigDatasetDetail.d.ts.map deleted file mode 100644 index 7cc7c0f701..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigDatasetDetail.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BigwigDatasetDetail.d.ts","sourceRoot":"","sources":["../../../src/lib/Components/Detail/BigwigDatasetDetail.jsx"],"names":[],"mappings":";AAWA;IAiDE,0CAyBC;IAnED;;;;;;QAwCC;CAsCF"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigDatasetDetail.js b/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigDatasetDetail.js deleted file mode 100644 index 1e30560ad6..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigDatasetDetail.js +++ /dev/null @@ -1,106 +0,0 @@ -import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime'; -import React from 'react'; -import Icon from '@veupathdb/wdk-client/lib/Components/Icon/IconAlt'; -import { Mesa, MesaState } from '@veupathdb/coreui/lib/components/Mesa'; -import { makeClassifier } from '../UserDatasetUtils'; -import UserDatasetDetail from './UserDatasetDetail'; -import BigwigGBrowseUploader from './BigwigGBrowseUploader'; -const classify = makeClassifier('UserDatasetDetail', 'BigwigDatasetDetail'); -class BigwigDatasetDetail extends UserDatasetDetail { - constructor(props) { - super(props); - this.renderTracksSection = this.renderTracksSection.bind(this); - this.getTracksTableColumns = this.getTracksTableColumns.bind(this); - } - getTracksTableColumns() { - const { userDataset, appUrl, config } = this.props; - const { id, type, meta, dependencies } = userDataset; - const name = meta.name; - const { projectId } = config; - const { seqId } = type && type.data ? type.data : { seqId: null }; - var genome; - dependencies.forEach(function (dependency) { - if (dependency.resourceIdentifier.endsWith('_Genome')) { - var regex = new RegExp( - '-' + dependency.resourceVersion + '_(.*)_Genome' - ); - var genomeList = dependency.resourceIdentifier.match(regex); - genome = genomeList[1]; - } - }); - return [ - { - key: 'datafileName', - name: 'Filename', - renderCell: ({ row }) => _jsx('code', { children: row.datafileName }), - }, - { - key: 'main', - name: 'Genome Browser Link', - renderCell: ({ row }) => - _jsx( - BigwigGBrowseUploader, - Object.assign({ sequenceId: seqId }, row, { - datasetId: id, - appUrl: appUrl, - projectId: projectId, - genome: genome, - datasetName: name, - }) - ), - }, - ]; - } - renderTracksSection() { - const { userDataset, appUrl, projectName } = this.props; - const { type } = userDataset; - const { data } = type; - const rows = data && Array.isArray(data.tracks) ? data.tracks : []; - const columns = this.getTracksTableColumns({ userDataset, appUrl }); - const tracksTableState = MesaState.create({ rows, columns }); - return !rows.length - ? null - : userDataset.isInstalled - ? _jsxs('section', { - children: [ - _jsxs( - 'h3', - Object.assign( - { className: classify('SectionTitle') }, - { - children: [ - _jsx(Icon, { fa: 'bar-chart' }), - 'Genome Browser Tracks', - ], - } - ) - ), - _jsx( - 'div', - Object.assign( - { className: 'TracksTable' }, - { children: _jsx(Mesa, { state: tracksTableState }) } - ) - ), - ], - }) - : _jsxs('section', { - children: [ - "This data set isn't installed to ", - projectName, - ' or contains no files.', - ], - }); - } - getPageSections() { - const [headerSection, compatSection, fileSection] = super.getPageSections(); - return [ - headerSection, - compatSection, - this.renderTracksSection, - fileSection, - ]; - } -} -export default BigwigDatasetDetail; -//# sourceMappingURL=BigwigDatasetDetail.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigDatasetDetail.js.map b/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigDatasetDetail.js.map deleted file mode 100644 index 7eaac84aa3..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigDatasetDetail.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BigwigDatasetDetail.js","sourceRoot":"","sources":["../../../src/lib/Components/Detail/BigwigDatasetDetail.jsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,IAAI,MAAM,mDAAmD,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,uCAAuC,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rD,8BACE,4BAAI,SAAS,EAAE,QAAQ,CAAC,cAAc,CAAC,iBACrC,KAAC,IAAI,IAAC,EAAE,EAAC,WAAW,GAAG,8BAEpB,EACL,4BAAK,SAAS,EAAC,aAAa,gBAC1B,KAAC,IAAI,IAAC,KAAK,EAAE,gBAAgB,GAAI,IAC7B,IACE,CACX,CAAC,CAAC,CAAC,CACF,mEACoC,WAAW,8BACrC,CACX,CAAC;IACJ,CAAC;IAED,eAAe;QACb,MAAM,CAAC,aAAa,EAAE,aAAa,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,eAAe,EAAE,CAAC;QAC5E,OAAO;YACL,aAAa;YACb,aAAa;YACb,IAAI,CAAC,mBAAmB;YACxB,WAAW;SACZ,CAAC;IACJ,CAAC;CACF;AAED,eAAe,mBAAmB,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigGBrowseUploader.d.ts b/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigGBrowseUploader.d.ts deleted file mode 100644 index 8b6a5f5eff..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigGBrowseUploader.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default BigwigGBrowseUploader; -declare class BigwigGBrowseUploader extends React.Component { - constructor(props: any); - getGBrowseUrl(): string; - getButtons(): JSX.Element; - render(): JSX.Element; -} -import React from 'react'; -//# sourceMappingURL=BigwigGBrowseUploader.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigGBrowseUploader.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigGBrowseUploader.d.ts.map deleted file mode 100644 index de1463c638..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigGBrowseUploader.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BigwigGBrowseUploader.d.ts","sourceRoot":"","sources":["../../../src/lib/Components/Detail/BigwigGBrowseUploader.jsx"],"names":[],"mappings":";AAKA;IACE,wBAGC;IAeD,wBAMC;IAnBD,0BAWC;IAUD,sBAOC;CACF"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigGBrowseUploader.js b/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigGBrowseUploader.js deleted file mode 100644 index 180142df88..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigGBrowseUploader.js +++ /dev/null @@ -1,62 +0,0 @@ -import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime'; -import React from 'react'; -import Icon from '@veupathdb/wdk-client/lib/Components/Icon/IconAlt'; -import './BigwigGBrowseUploader.scss'; -class BigwigGBrowseUploader extends React.Component { - constructor(props) { - super(props); - this.getGBrowseUrl = this.getGBrowseUrl.bind(this); - } - getButtons() { - const GBrowseUrl = this.getGBrowseUrl(); - return _jsx(React.Fragment, { - children: _jsx( - 'a', - Object.assign( - { href: GBrowseUrl, target: '_blank', rel: 'noreferrer' }, - { - children: _jsxs( - 'button', - Object.assign( - { className: 'btn btn-slim' }, - { - children: [ - 'View in Genome Browser ', - _jsx(Icon, { fa: 'chevron-circle-right right-side' }), - ], - } - ) - ), - } - ) - ), - }); - } - getGBrowseUrl() { - const { sequenceId, genome, datasetName, datafileName } = this.props; - var jbrowseTrackName = datasetName + ' ' + datafileName; - return `/a/jbrowse/index.html?data=/a/service/jbrowse/tracks/${genome}&tracks=gene,${ - jbrowseTrackName || '' - }&highlight=&loc=${sequenceId || ''}`; - } - render() { - const buttons = this.getButtons(); - return _jsx( - 'div', - Object.assign( - { className: 'BigwigGBrowseUploader' }, - { - children: _jsx( - 'div', - Object.assign( - { className: 'BigwigGBrowseUploader-Buttons' }, - { children: buttons } - ) - ), - } - ) - ); - } -} -export default BigwigGBrowseUploader; -//# sourceMappingURL=BigwigGBrowseUploader.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigGBrowseUploader.js.map b/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigGBrowseUploader.js.map deleted file mode 100644 index 150b7b6a6f..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigGBrowseUploader.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BigwigGBrowseUploader.js","sourceRoot":"","sources":["../../../src/lib/Components/Detail/BigwigGBrowseUploader.jsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,mDAAmD,CAAC;AAErE,OAAO,8BAA8B,CAAC;AAEtC,MAAM,qBAAsB,SAAQ,KAAK,CAAC,SAAS;IACjD,YAAY,KAAK;QACf,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;IAED,UAAU;QACR,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QACxC,OAAO,CACL,KAAC,KAAK,CAAC,QAAQ,cACb,0BAAG,IAAI,EAAE,UAAU,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,YAAY,gBACnD,gCAAQ,SAAS,EAAC,cAAc,4CACP,KAAC,IAAI,IAAC,EAAE,EAAC,iCAAiC,GAAG,KAC7D,IACP,GACW,CAClB,CAAC;IACJ,CAAC;IAED,aAAa;QACX,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACrE,IAAI,gBAAgB,GAAG,WAAW,GAAG,GAAG,GAAG,YAAY,CAAC;QACxD,OAAO,wDAAwD,MAAM,gBACnE,gBAAgB,IAAI,EACtB,mBAAmB,UAAU,IAAI,EAAE,EAAE,CAAC;IACxC,CAAC;IAED,MAAM;QACJ,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAClC,OAAO,CACL,4BAAK,SAAS,EAAC,uBAAuB,gBACpC,4BAAK,SAAS,EAAC,+BAA+B,gBAAE,OAAO,IAAO,IAC1D,CACP,CAAC;IACJ,CAAC;CACF;AAED,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigGBrowseUploader.scss b/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigGBrowseUploader.scss deleted file mode 100644 index 447b00e2e1..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/BigwigGBrowseUploader.scss +++ /dev/null @@ -1,37 +0,0 @@ -@import '@veupathdb/wdk-client/lib/Core/Style/palette'; - -.BigwigGBrowseUploader { - display: flex; - width: 100%; - align-items: center; - flex-flow: row nowrap; - - .BigwigGBrowseUploader-Message { - flex: 1; - } - - .BigwigGBrowseUploader-Buttons { - flex: 0 0 auto; - margin-left: 20px; - button[disabled] { - opacity: 0.5; - cursor: not-allowed; - } - } - - .BigwigGBrowseUploader-Icon { - flex: 0 0 auto; - margin-right: 10px; - .wdk-Icon { - font-size: 20px; - transition: all 0.3s; - color: #bbb; - &.fa-check-circle-o { - color: $green; - } - &.fa-spin { - color: $blue; - } - } - } -} diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/BiomDatasetDetail.d.ts b/packages/libs/user-datasets-legacy/lib/Components/Detail/BiomDatasetDetail.d.ts deleted file mode 100644 index d3993eafe4..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/BiomDatasetDetail.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default BiomDatasetDetail; -declare class BiomDatasetDetail extends UserDatasetDetail { - renderEdaLinkout(): JSX.Element | null; -} -import UserDatasetDetail from './UserDatasetDetail'; -//# sourceMappingURL=BiomDatasetDetail.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/BiomDatasetDetail.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/Detail/BiomDatasetDetail.d.ts.map deleted file mode 100644 index 0932f4d8c7..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/BiomDatasetDetail.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BiomDatasetDetail.d.ts","sourceRoot":"","sources":["../../../src/lib/Components/Detail/BiomDatasetDetail.jsx"],"names":[],"mappings":";AAIA;IAME,uCAgBC;CAOF"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/BiomDatasetDetail.js b/packages/libs/user-datasets-legacy/lib/Components/Detail/BiomDatasetDetail.js deleted file mode 100644 index 5e9d5eec78..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/BiomDatasetDetail.js +++ /dev/null @@ -1,47 +0,0 @@ -import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime'; -import { Link } from 'react-router-dom'; -import UserDatasetDetail from './UserDatasetDetail'; -class BiomDatasetDetail extends UserDatasetDetail { - constructor(props) { - super(props); - this.renderEdaLinkout = this.renderEdaLinkout.bind(this); - } - renderEdaLinkout() { - const { - config: { displayName }, - userDataset: { isInstalled }, - edaWorkspaceUrl, - } = this.props; - return !isInstalled || !edaWorkspaceUrl - ? null - : _jsx( - 'section', - Object.assign( - { id: 'eda-linkout' }, - { - children: _jsx('h2', { - children: _jsxs( - Link, - Object.assign( - { to: edaWorkspaceUrl }, - { - children: [ - _jsx('i', { className: 'ebrc-icon-edaIcon' }), - ' Explore in ', - displayName, - ], - } - ) - ), - }), - } - ) - ); - } - getPageSections() { - const [headerSection, , fileSection] = super.getPageSections(); - return [headerSection, this.renderEdaLinkout, fileSection]; - } -} -export default BiomDatasetDetail; -//# sourceMappingURL=BiomDatasetDetail.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/BiomDatasetDetail.js.map b/packages/libs/user-datasets-legacy/lib/Components/Detail/BiomDatasetDetail.js.map deleted file mode 100644 index 40ae6e2e4e..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/BiomDatasetDetail.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BiomDatasetDetail.js","sourceRoot":"","sources":["../../../src/lib/Components/Detail/BiomDatasetDetail.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAEpD,MAAM,iBAAkB,SAAQ,iBAAiB;IAC/C,YAAY,KAAK;QACf,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D,CAAC;IAED,gBAAgB;QACd,MAAM,EACJ,MAAM,EAAE,EAAE,WAAW,EAAE,EACvB,WAAW,EAAE,EAAE,WAAW,EAAE,EAC5B,eAAe,GAChB,GAAG,IAAI,CAAC,KAAK,CAAC;QAEf,OAAO,CAAC,WAAW,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC/C,gCAAS,EAAE,EAAC,aAAa,gBACvB,uBACE,MAAC,IAAI,kBAAC,EAAE,EAAE,eAAe,iBACvB,YAAG,SAAS,EAAC,mBAAmB,GAAK,kBAAa,WAAW,KACxD,GACJ,IACG,CACX,CAAC;IACJ,CAAC;IAED,eAAe;QACb,MAAM,CAAC,aAAa,EAAE,AAAD,EAAG,WAAW,CAAC,GAAG,KAAK,CAAC,eAAe,EAAE,CAAC;QAE/D,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;IAC7D,CAAC;CACF;AAED,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/IsaDatasetDetail.d.ts b/packages/libs/user-datasets-legacy/lib/Components/Detail/IsaDatasetDetail.d.ts deleted file mode 100644 index eb866f9423..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/IsaDatasetDetail.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default IsaDatasetDetail; -declare class IsaDatasetDetail extends UserDatasetDetail { - renderEdaLinkout(): JSX.Element | null; -} -import UserDatasetDetail from './UserDatasetDetail'; -//# sourceMappingURL=IsaDatasetDetail.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/IsaDatasetDetail.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/Detail/IsaDatasetDetail.d.ts.map deleted file mode 100644 index 46b8f82e5d..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/IsaDatasetDetail.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IsaDatasetDetail.d.ts","sourceRoot":"","sources":["../../../src/lib/Components/Detail/IsaDatasetDetail.jsx"],"names":[],"mappings":";AAIA;IAME,uCAgCC;CAOF"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/IsaDatasetDetail.js b/packages/libs/user-datasets-legacy/lib/Components/Detail/IsaDatasetDetail.js deleted file mode 100644 index bab9b35392..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/IsaDatasetDetail.js +++ /dev/null @@ -1,81 +0,0 @@ -import { - jsx as _jsx, - jsxs as _jsxs, - Fragment as _Fragment, -} from 'react/jsx-runtime'; -import { Link } from 'react-router-dom'; -import UserDatasetDetail from './UserDatasetDetail'; -class IsaDatasetDetail extends UserDatasetDetail { - constructor(props) { - super(props); - this.renderEdaLinkout = this.renderEdaLinkout.bind(this); - } - renderEdaLinkout() { - const { - config: { displayName }, - userDataset: { isInstalled }, - edaWorkspaceUrl, - edaMapUrl, - } = this.props; - if (!isInstalled) return null; - return _jsxs(_Fragment, { - children: [ - !edaWorkspaceUrl - ? null - : _jsx( - 'section', - Object.assign( - { id: 'eda-linkout' }, - { - children: _jsx('h2', { - children: _jsxs( - Link, - Object.assign( - { to: edaWorkspaceUrl }, - { - children: [ - _jsx('i', { className: 'ebrc-icon-edaIcon' }), - ' Explore in ', - displayName, - ], - } - ) - ), - }), - } - ) - ), - !edaMapUrl - ? null - : _jsx( - 'section', - Object.assign( - { id: 'eda-linkout' }, - { - children: _jsx('h2', { - children: _jsxs( - Link, - Object.assign( - { to: edaMapUrl }, - { - children: [ - _jsx('i', { className: 'ebrc-icon-edaIcon' }), - ' Explore in MapVEu', - ], - } - ) - ), - }), - } - ) - ), - ], - }); - } - getPageSections() { - const [headerSection, , fileSection] = super.getPageSections(); - return [headerSection, this.renderEdaLinkout, fileSection]; - } -} -export default IsaDatasetDetail; -//# sourceMappingURL=IsaDatasetDetail.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/IsaDatasetDetail.js.map b/packages/libs/user-datasets-legacy/lib/Components/Detail/IsaDatasetDetail.js.map deleted file mode 100644 index 61ce75b842..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/IsaDatasetDetail.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IsaDatasetDetail.js","sourceRoot":"","sources":["../../../src/lib/Components/Detail/IsaDatasetDetail.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAEpD,MAAM,gBAAiB,SAAQ,iBAAiB;IAC9C,YAAY,KAAK;QACf,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D,CAAC;IAED,gBAAgB;QACd,MAAM,EACJ,MAAM,EAAE,EAAE,WAAW,EAAE,EACvB,WAAW,EAAE,EAAE,WAAW,EAAE,EAC5B,eAAe,EACf,SAAS,GACV,GAAG,IAAI,CAAC,KAAK,CAAC;QAEf,IAAI,CAAC,WAAW;YAAE,OAAO,IAAI,CAAC;QAE9B,OAAO,CACL,8BACG,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACzB,gCAAS,EAAE,EAAC,aAAa,gBACvB,uBACE,MAAC,IAAI,kBAAC,EAAE,EAAE,eAAe,iBACvB,YAAG,SAAS,EAAC,mBAAmB,GAAK,kBAAa,WAAW,KACxD,GACJ,IACG,CACX,EACA,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACnB,gCAAS,EAAE,EAAC,aAAa,gBACvB,uBACE,MAAC,IAAI,kBAAC,EAAE,EAAE,SAAS,iBACjB,YAAG,SAAS,EAAC,mBAAmB,GAAK,2BAChC,GACJ,IACG,CACX,IACA,CACJ,CAAC;IACJ,CAAC;IAED,eAAe;QACb,MAAM,CAAC,aAAa,EAAE,AAAD,EAAG,WAAW,CAAC,GAAG,KAAK,CAAC,eAAe,EAAE,CAAC;QAE/D,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;IAC7D,CAAC;CACF;AAED,eAAe,gBAAgB,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/RnaSeqDatasetDetail.d.ts b/packages/libs/user-datasets-legacy/lib/Components/Detail/RnaSeqDatasetDetail.d.ts deleted file mode 100644 index 900f2e09e3..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/RnaSeqDatasetDetail.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default RnaSeqDatasetDetail; -declare class RnaSeqDatasetDetail extends BigwigDatasetDetail {} -import BigwigDatasetDetail from './BigwigDatasetDetail'; -//# sourceMappingURL=RnaSeqDatasetDetail.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/RnaSeqDatasetDetail.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/Detail/RnaSeqDatasetDetail.d.ts.map deleted file mode 100644 index ba7d5f94a4..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/RnaSeqDatasetDetail.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RnaSeqDatasetDetail.d.ts","sourceRoot":"","sources":["../../../src/lib/Components/Detail/RnaSeqDatasetDetail.jsx"],"names":[],"mappings":";AAEA;CAMC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/RnaSeqDatasetDetail.js b/packages/libs/user-datasets-legacy/lib/Components/Detail/RnaSeqDatasetDetail.js deleted file mode 100644 index 7a7457add8..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/RnaSeqDatasetDetail.js +++ /dev/null @@ -1,10 +0,0 @@ -import BigwigDatasetDetail from './BigwigDatasetDetail'; -class RnaSeqDatasetDetail extends BigwigDatasetDetail { - constructor(props) { - super(props); - this.renderTracksSection = this.renderTracksSection.bind(this); - this.getTracksTableColumns = this.getTracksTableColumns.bind(this); - } -} -export default RnaSeqDatasetDetail; -//# sourceMappingURL=RnaSeqDatasetDetail.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/RnaSeqDatasetDetail.js.map b/packages/libs/user-datasets-legacy/lib/Components/Detail/RnaSeqDatasetDetail.js.map deleted file mode 100644 index ff3f080f35..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/RnaSeqDatasetDetail.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RnaSeqDatasetDetail.js","sourceRoot":"","sources":["../../../src/lib/Components/Detail/RnaSeqDatasetDetail.jsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AAExD,MAAM,mBAAoB,SAAQ,mBAAmB;IACnD,YAAY,KAAK;QACf,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/D,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrE,CAAC;CACF;AAED,eAAe,mBAAmB,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/UserDatasetDetail.d.ts b/packages/libs/user-datasets-legacy/lib/Components/Detail/UserDatasetDetail.d.ts deleted file mode 100644 index 95fdb19547..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/UserDatasetDetail.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -export default UserDatasetDetail; -declare class UserDatasetDetail extends React.Component { - constructor(props: any); - state: { - sharingModalOpen: boolean; - }; - onMetaSave(key: any): (value: any) => any; - isMyDataset(): any; - validateKey(key: any): void; - handleDelete(): void; - getAttributes(): ( - | { - className: string; - attribute: any; - value: JSX.Element; - } - | { - attribute: string; - value: any; - className?: undefined; - } - | null - )[]; - renderAttributeList(): JSX.Element; - renderHeaderSection(): JSX.Element; - renderDatasetActions(): JSX.Element; - renderCompatibilitySection(): JSX.Element; - getCompatibilityTableColumns(): ( - | { - key: string; - name: string; - renderCell({ row }: { row: any }): any; - } - | { - key: string; - name: string; - } - )[]; - openSharingModal(): void; - renderFileSection(): JSX.Element; - closeSharingModal(): void; - getFileTableColumns(): ( - | { - key: string; - name: string; - renderCell({ row }: { row: any }): JSX.Element; - width?: undefined; - headingStyle?: undefined; - } - | { - key: string; - name: string; - renderCell({ row }: { row: any }): string; - width?: undefined; - headingStyle?: undefined; - } - | { - key: string; - name: string; - width: string; - headingStyle: { - textAlign: string; - }; - renderCell({ row }: { row: any }): JSX.Element; - } - )[]; - renderDetailsSection(): JSX.Element; - renderAllDatasetsLink(): JSX.Element; - /** @return {import("react").ReactNode[]} */ - getPageSections(): import('react').ReactNode[]; - render(): JSX.Element; -} -declare namespace UserDatasetDetail { - export { WdkDependenciesContext as contextType }; -} -import React from 'react'; -import { WdkDependenciesContext } from '@veupathdb/wdk-client/lib/Hooks/WdkDependenciesEffect'; -//# sourceMappingURL=UserDatasetDetail.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/UserDatasetDetail.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/Detail/UserDatasetDetail.d.ts.map deleted file mode 100644 index 188adfc408..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/UserDatasetDetail.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetDetail.d.ts","sourceRoot":"","sources":["../../../src/lib/Components/Detail/UserDatasetDetail.jsx"],"names":[],"mappings":";AA6BA;IACE,wBAyBC;IAvBC;;MAAwC;IAgD1C,0CAWC;IAlCD,mBAKC;IAUD,4BAMC;IAeD,qBAkBC;IAWD;;;;;;;;gBA4IC;IAsBD,mCAuBC;IA3CD,mCAkBC;IA2BD,oCAaC;IA2GD,0CA+CC;IAED;;;;;;;;;SAmCC;IAjcD,yBAEC;IAqRD,iCAiBC;IApSD,0BAEC;IAoSD;;;;;;;;;;;;;;;;;;;;;;;;;;SA2DC;IAjGD,oCAWC;IA9ND,qCAOC;IAqZD,4CAA4C;IAC5C,mBADa,OAAO,OAAO,EAAE,SAAS,EAAE,CAOvC;IAED,sBAmCC;CACF"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/UserDatasetDetail.js b/packages/libs/user-datasets-legacy/lib/Components/Detail/UserDatasetDetail.js deleted file mode 100644 index 86657eab71..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/UserDatasetDetail.js +++ /dev/null @@ -1,674 +0,0 @@ -import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime'; -import React from 'react'; -import Icon from '@veupathdb/wdk-client/lib/Components/Icon/IconAlt'; -import SaveableTextEditor from '@veupathdb/wdk-client/lib/Components/InputControls/SaveableTextEditor'; -import Link from '@veupathdb/wdk-client/lib/Components/Link'; -import { - AnchoredTooltip, - Mesa, - MesaState, -} from '@veupathdb/coreui/lib/components/Mesa'; -import { WdkDependenciesContext } from '@veupathdb/wdk-client/lib/Hooks/WdkDependenciesEffect'; -import { bytesToHuman } from '@veupathdb/wdk-client/lib/Utils/Converters'; -import NotFound from '@veupathdb/wdk-client/lib/Views/NotFound/NotFound'; -import { isUserDatasetsCompatibleWdkService } from '../../Service/UserDatasetWrappers'; -import SharingModal from '../Sharing/UserDatasetSharingModal'; -import UserDatasetStatus from '../UserDatasetStatus'; -import { makeClassifier, normalizePercentage } from '../UserDatasetUtils'; -import { ThemedGrantAccessButton } from '../ThemedGrantAccessButton'; -import { ThemedDeleteButton } from '../ThemedDeleteButton'; -import { DateTime } from '../DateTime'; -import './UserDatasetDetail.scss'; -const classify = makeClassifier('UserDatasetDetail'); -class UserDatasetDetail extends React.Component { - constructor(props) { - super(props); - this.state = { sharingModalOpen: false }; - this.onMetaSave = this.onMetaSave.bind(this); - this.isMyDataset = this.isMyDataset.bind(this); - this.validateKey = this.validateKey.bind(this); - this.handleDelete = this.handleDelete.bind(this); - this.getAttributes = this.getAttributes.bind(this); - this.renderAttributeList = this.renderAttributeList.bind(this); - this.renderHeaderSection = this.renderHeaderSection.bind(this); - this.renderDatasetActions = this.renderDatasetActions.bind(this); - this.renderCompatibilitySection = - this.renderCompatibilitySection.bind(this); - this.getCompatibilityTableColumns = - this.getCompatibilityTableColumns.bind(this); - this.openSharingModal = this.openSharingModal.bind(this); - this.renderFileSection = this.renderFileSection.bind(this); - this.closeSharingModal = this.closeSharingModal.bind(this); - this.getFileTableColumns = this.getFileTableColumns.bind(this); - this.renderDetailsSection = this.renderDetailsSection.bind(this); - this.renderAllDatasetsLink = this.renderAllDatasetsLink.bind(this); - } - isMyDataset() { - const { user, userDataset } = this.props; - return ( - user && userDataset && user.id && user.id === userDataset.ownerUserId - ); - } - openSharingModal() { - this.setState({ sharingModalOpen: true }); - } - closeSharingModal() { - this.setState({ sharingModalOpen: false }); - } - validateKey(key) { - const META_KEYS = ['name', 'summary', 'description']; - if (typeof key !== 'string' || !META_KEYS.includes(key)) - throw new TypeError( - `Can't edit meta for invalid key: ${JSON.stringify(key)}` - ); - } - onMetaSave(key) { - this.validateKey(key); - return (value) => { - if (typeof value !== 'string') - throw new TypeError( - `onMetaSave: expected input value to be string; got ${typeof value}` - ); - const { userDataset, updateUserDatasetDetail } = this.props; - const meta = Object.assign(Object.assign({}, userDataset.meta), { - [key]: value, - }); - return updateUserDatasetDetail(userDataset, meta); - }; - } - handleDelete() { - const { baseUrl, isOwner, userDataset, removeUserDataset, dataNoun } = - this.props; - const { sharedWith } = userDataset; - const shareCount = !Array.isArray(sharedWith) ? null : sharedWith.length; - const message = - `Are you sure you want to ${ - isOwner ? 'delete' : 'remove' - } this ${dataNoun.singular.toLowerCase()}? ` + - (!isOwner || !shareCount - ? '' - : `${shareCount} collaborator${ - shareCount === 1 ? '' : 's' - } you've shared with will lose access.`); - if (window.confirm(message)) { - removeUserDataset(userDataset, baseUrl); - } - } - renderAllDatasetsLink() { - return _jsxs( - Link, - Object.assign( - { className: 'AllDatasetsLink', to: this.props.baseUrl }, - { - children: [ - _jsx(Icon, { fa: 'chevron-left' }), - '\u00A0 All ', - this.props.workspaceTitle, - ], - } - ) - ); - } - getAttributes() { - const { userDataset, quotaSize, questionMap } = this.props; - const { onMetaSave } = this; - const { - id, - type, - meta, - size, - percentQuotaUsed, - owner, - created, - sharedWith, - questions, - isInstalled, - } = userDataset; - const { display, name, version } = type; - const isOwner = this.isMyDataset(); - return [ - { - className: classify('Name'), - attribute: this.props.detailsPageTitle, - value: _jsx(SaveableTextEditor, { - value: meta.name, - readOnly: !isOwner, - onSave: this.onMetaSave('name'), - }), - }, - { - attribute: 'Status', - value: _jsx(UserDatasetStatus, { - linkToDataset: false, - useTooltip: false, - userDataset: userDataset, - projectId: this.props.config.projectId, - displayName: this.props.config.displayName, - }), - }, - { - attribute: 'Owner', - value: isOwner ? 'Me' : owner, - }, - { - attribute: 'Description', - value: _jsx(SaveableTextEditor, { - value: meta.description, - multiLine: true, - readOnly: !isOwner, - onSave: this.onMetaSave('description'), - emptyText: 'No Description', - }), - }, - { attribute: 'ID', value: id }, - { - attribute: 'Data type', - value: _jsxs('span', { - children: [display, ' (', name, ' ', version, ')'], - }), - }, - { - attribute: 'Summary', - value: _jsx(SaveableTextEditor, { - multiLine: true, - value: meta.summary, - readOnly: !isOwner, - onSave: onMetaSave('summary'), - emptyText: 'No Summary', - }), - }, - { - attribute: 'Created', - value: _jsx(DateTime, { datetime: created }), - }, - { attribute: 'Data set size', value: bytesToHuman(size) }, - !isOwner - ? null - : { - attribute: 'Quota usage', - value: `${normalizePercentage(percentQuotaUsed)}% of ${bytesToHuman( - quotaSize - )}`, - }, - !isOwner || !sharedWith || !sharedWith.length - ? null - : { - attribute: 'Shared with', - value: _jsx('ul', { - children: sharedWith.map((share) => - _jsxs( - 'li', - { - children: [ - share.userDisplayName, - ' <', - share.email, - '>', - ' ', - _jsx(DateTime, { datetime: share.time }), - ], - }, - share.email - ) - ), - }), - }, - !questions || !questions.length || !isInstalled - ? null - : { - attribute: 'Available searches', - value: _jsx('ul', { - children: questions.map((questionName) => { - const q = questionMap[questionName]; - // User dataset searches typically offer changing the dataset through a dropdown - // Ths dropdown is a param, "biom_dataset" on MicrobiomeDB and "rna_seq_dataset" on genomic sites - // Hence the regex: /dataset/ - const ps = q.paramNames.filter((paramName) => - paramName.match(/dataset/) - ); - const urlPath = [ - '', - 'search', - q.outputRecordClassName, - q.urlSegment, - ].join('/'); - const url = - urlPath + - (ps.length === 1 ? '?param.' + ps[0] + '=' + id : ''); - return _jsx( - 'li', - { - children: _jsx( - Link, - Object.assign({ to: url }, { children: q.displayName }) - ), - }, - questionName - ); - }), - }), - }, - ].filter((attr) => attr); - } - renderHeaderSection() { - const AllLink = this.renderAllDatasetsLink; - const AttributeList = this.renderAttributeList; - const DatasetActions = this.renderDatasetActions; - return _jsxs( - 'section', - Object.assign( - { id: 'dataset-header' }, - { - children: [ - _jsx(AllLink, {}), - _jsxs( - 'div', - Object.assign( - { className: classify('Header') }, - { - children: [ - _jsx( - 'div', - Object.assign( - { className: classify('Header-Attributes') }, - { children: _jsx(AttributeList, {}) } - ) - ), - _jsx( - 'div', - Object.assign( - { className: classify('Header-Actions') }, - { children: _jsx(DatasetActions, {}) } - ) - ), - ], - } - ) - ), - ], - } - ) - ); - } - renderAttributeList() { - const attributes = this.getAttributes(); - return _jsx( - 'div', - Object.assign( - { className: classify('AttributeList') }, - { - children: attributes.map(({ attribute, value, className }, index) => - _jsxs( - 'div', - Object.assign( - { - className: - classify('AttributeRow') + - (className ? ' ' + className : ''), - }, - { - children: [ - _jsx( - 'div', - Object.assign( - { className: classify('AttributeName') }, - { - children: - typeof attribute === 'string' - ? _jsxs('strong', { children: [attribute, ':'] }) - : attribute, - } - ) - ), - _jsx( - 'div', - Object.assign( - { className: classify('AttributeValue') }, - { children: value } - ) - ), - ], - } - ), - index - ) - ), - } - ) - ); - } - renderDatasetActions() { - const isOwner = this.isMyDataset(); - return _jsxs( - 'div', - Object.assign( - { className: classify('Actions') }, - { - children: [ - !isOwner - ? null - : _jsx(ThemedGrantAccessButton, { - buttonText: `Grant Access to ${this.props.dataNoun.singular}`, - onPress: this.openSharingModal, - }), - _jsx(ThemedDeleteButton, { - buttonText: 'Delete', - onPress: this.handleDelete, - }), - ], - } - ) - ); - } - renderDetailsSection() { - const { userDataset } = this.props; - return _jsx('section', { - children: _jsx('details', { - children: _jsx('pre', { - children: _jsx('code', { - children: JSON.stringify(userDataset, null, ' '), - }), - }), - }), - }); - } - /* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - - Files Table - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */ - renderFileSection() { - const { userDataset, appUrl, dataNoun } = this.props; - const fileTableState = MesaState.create({ - columns: this.getFileTableColumns({ userDataset, appUrl }), - rows: userDataset.datafiles, - }); - return _jsxs( - 'section', - Object.assign( - { id: 'dataset-files' }, - { - children: [ - _jsx('h2', { children: 'Data Files' }), - _jsxs( - 'h3', - Object.assign( - { className: classify('SectionTitle') }, - { - children: [ - _jsx(Icon, { fa: 'files-o' }), - 'Files in ', - dataNoun.singular, - ], - } - ) - ), - _jsx(Mesa, { state: fileTableState }), - ], - } - ) - ); - } - getFileTableColumns() { - const { userDataset } = this.props; - const { id } = userDataset; - const { wdkService } = this.context; - return [ - { - key: 'name', - name: 'File Name', - renderCell({ row }) { - const { name } = row; - return _jsx('code', { children: name }); - }, - }, - { - key: 'size', - name: 'File Size', - renderCell({ row }) { - const { size } = row; - return bytesToHuman(size); - }, - }, - { - key: 'download', - name: 'Download', - width: '130px', - headingStyle: { textAlign: 'center' }, - renderCell({ row }) { - const { name } = row; - const downloadUrl = !isUserDatasetsCompatibleWdkService(wdkService) - ? undefined - : wdkService.getUserDatasetDownloadUrl(id, name); - const downloadAvailable = downloadUrl != null; - return _jsx( - 'a', - Object.assign( - { - href: downloadUrl, - target: '_blank', - rel: 'noreferrer', - title: 'Download this file', - }, - { - children: _jsxs( - 'button', - Object.assign( - { - className: 'btn btn-info', - disabled: !downloadAvailable, - title: downloadAvailable - ? undefined - : 'This download is unavailable. Please contact us if this problem persists.', - }, - { - children: [ - _jsx(Icon, { fa: 'save', className: 'left-side' }), - ' Download', - ], - } - ) - ), - } - ) - ); - }, - }, - ].filter((column) => column); - } - /* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - - Compatible Table - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */ - renderCompatibilitySection() { - const { userDataset, config, dataNoun } = this.props; - const { projectId, displayName } = config; - const compatibilityTableState = MesaState.create({ - columns: this.getCompatibilityTableColumns(userDataset), - rows: userDataset.dependencies, - }); - const { buildNumber } = config; - const { isCompatible } = userDataset; - const isCompatibleProject = userDataset.projects.includes(projectId); - return _jsxs( - 'section', - Object.assign( - { id: 'dataset-compatibility' }, - { - children: [ - _jsxs('h2', { - children: ['Use This ', dataNoun.singular, ' in ', displayName], - }), - _jsxs( - 'h3', - Object.assign( - { className: classify('SectionTitle') }, - { - children: [ - _jsx(Icon, { fa: 'puzzle-piece' }), - 'Compatibility Information \u00A0', - _jsx( - AnchoredTooltip, - Object.assign( - { - content: `The data and genomes listed here are requisite for using the data in this user ${dataNoun.singular.toLowerCase()}.`, - }, - { - children: _jsx( - 'div', - Object.assign( - { className: 'HelpTrigger' }, - { - children: _jsx(Icon, { fa: 'question-circle' }), - } - ) - ), - } - ) - ), - ], - } - ) - ), - _jsx( - 'div', - Object.assign( - { style: { maxWidth: '600px' } }, - { children: _jsx(Mesa, { state: compatibilityTableState }) } - ) - ), - isCompatibleProject && isCompatible - ? _jsxs( - 'p', - Object.assign( - { className: 'success' }, - { - children: [ - 'This ', - dataNoun.singular.toLowerCase(), - ' is compatible with the current release, build ', - buildNumber, - ', of ', - _jsx('b', { children: projectId }), - '. It is installed for use.', - ], - } - ) - ) - : _jsxs( - 'p', - Object.assign( - { className: 'danger' }, - { - children: [ - 'This ', - dataNoun.singular.toLowerCase(), - ' is not compatible with the current release, build ', - buildNumber, - ', of ', - _jsx('b', { children: projectId }), - '. It is not installed for use.', - ], - } - ) - ), - ], - } - ) - ); - } - getCompatibilityTableColumns() { - const { userDataset } = this.props; - const { projects } = userDataset; - return [ - { - key: 'project', - name: 'VEuPathDB Website', - renderCell() { - return projects.join(', '); - }, - }, - { - key: 'resourceDisplayName', - name: 'Required Resource', - renderCell({ row }) { - const { resourceDisplayName } = row; - return resourceDisplayName; - }, - }, - { - key: 'resourceVersion', - name: 'Required Resource Release', - }, - { - key: 'installedVersion', - name: 'Installed Resource Release', - renderCell({ row }) { - const { compatibilityInfo } = row; - const { currentBuild } = compatibilityInfo ? compatibilityInfo : {}; - return compatibilityInfo === null || currentBuild === null - ? 'N/A' - : currentBuild; - }, - }, - ]; - } - /* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - - General Rendering - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */ - // This is needed to resolve downstream typescript errors. - // TypeScript infers that this method returns JSX.Element[]. - // Some classes extending this will return (JSX.Element | null)[]. - // The ReactNode type is better suited, here, since it allows for null values. - /** @return {import("react").ReactNode[]} */ - getPageSections() { - return [ - this.renderHeaderSection, - this.renderCompatibilitySection, - this.renderFileSection, - ]; - } - render() { - const { - user, - userDataset, - shareUserDatasets, - unshareUserDatasets, - dataNoun, - } = this.props; - const AllDatasetsLink = this.renderAllDatasetsLink; - if (!userDataset) - return _jsx(NotFound, { children: _jsx(AllDatasetsLink, {}) }); - const isOwner = this.isMyDataset(); - const { sharingModalOpen } = this.state; - return _jsxs( - 'div', - Object.assign( - { className: classify() }, - { - children: [ - this.getPageSections().map((Section, key) => - _jsx(Section, {}, key) - ), - !isOwner || !sharingModalOpen - ? null - : _jsx(SharingModal, { - user: user, - datasets: [userDataset], - onClose: this.closeSharingModal, - shareUserDatasets: shareUserDatasets, - unshareUserDatasets: unshareUserDatasets, - dataNoun: dataNoun, - }), - ], - } - ) - ); - } -} -UserDatasetDetail.contextType = WdkDependenciesContext; -export default UserDatasetDetail; -//# sourceMappingURL=UserDatasetDetail.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/UserDatasetDetail.js.map b/packages/libs/user-datasets-legacy/lib/Components/Detail/UserDatasetDetail.js.map deleted file mode 100644 index 40ff0c26f1..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/UserDatasetDetail.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetDetail.js","sourceRoot":"","sources":["../../../src/lib/Components/Detail/UserDatasetDetail.jsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,IAAI,MAAM,mDAAmD,CAAC;AACrE,OAAO,kBAAkB,MAAM,uEAAuE,CAAC;AACvG,OAAO,IAAI,MAA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C,KAAK,CAAC;QAExC,OAAO,CACL,6BAAK,SAAS,EAAE,QAAQ,EAAE,iBACvB,IAAI,CAAC,eAAe,EAAE,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC,CAC5C,KAAC,OAAO,MAAM,GAAG,CAAI,CACtB,CAAC,EACD,CAAC,OAAO,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACtC,KAAC,YAAY,IACX,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,CAAC,WAAW,CAAC,EACvB,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAC/B,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,EAAE,mBAAmB,EACxC,QAAQ,EAAE,QAAQ,GAClB,CACH,KACG,CACP,CAAC;IACJ,CAAC;CACF;AAED,iBAAiB,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAEvD,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/Detail/UserDatasetDetail.scss b/packages/libs/user-datasets-legacy/lib/Components/Detail/UserDatasetDetail.scss deleted file mode 100644 index e144ccefb0..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Detail/UserDatasetDetail.scss +++ /dev/null @@ -1,106 +0,0 @@ -@import '@veupathdb/wdk-client/lib/Core/Style/palette'; - -.UserDatasetDetail { - details { - margin: 30px 0; - } - hr { - height: 0; - width: 100%; - border: none; - margin: 20px 0 0; - border-bottom: 1px solid rgba(0, 0, 0, 0.15); - } - .MesaComponent { - .DataTable { - table { - width: auto; - } - } - } - - .AllDatasetsLink { - display: block; - padding: 20px 0; - } - - .UserDatasetDetail-SectionTitle { - margin-bottom: 10px; - .wdk-Icon { - color: $blue; - margin-right: 10px; - } - } - - .UserDatasetDetail-Actions { - flex: 0 0 auto; - display: flex; - flex-flow: row nowrap; - justify-content: flex-end; - gap: 1em; - } - - .UserDatasetDetail-Header { - display: flex; - flex-flow: row nowrap; - align-items: flex-start; - - .UserDatasetDetail-Header-Attributes { - flex: 1 1 auto; - } - .UserDatasetDetail-Header-Actions { - flex: 0 0 auto; - } - } - - .wdk-SaveableTextEditor { - fieldset { - padding: 0 3px; - } - fieldset.wdk-SaveableTextEditor-Field { - flex: 0 1 auto; - transition: all 0.5s; - &.wdk-SaveableTextEditor-Field--Editing { - flex: 1 1 auto; - } - } - fieldset.wdk-SaveableTextEditor-Buttons { - min-height: 0; - } - } - - .UserDatasetDetail-AttributeList { - display: flex; - flex-direction: column; - .UserDatasetDetail-AttributeRow { - flex: 0 0 auto; - display: flex; - flex-direction: row; - align-items: baseline; - margin: 0.2em 0; - font-size: 1.4em; - font-weight: 300; - - &.UserDatasetDetail-Name { - font-weight: 400; - font-size: 2.8em; - strong, - b { - font-weight: 400; - } - - .wdk-SaveableTextEditor { - font-style: italic; - } - } - - .UserDatasetDetail-AttributeName { - flex: 0 0 auto; - padding-right: 10px; - } - .UserDatasetDetail-AttributeValue { - flex: 1 1 auto; - } - } - } -} diff --git a/packages/libs/user-datasets-legacy/lib/Components/EmptyState.d.ts b/packages/libs/user-datasets-legacy/lib/Components/EmptyState.d.ts deleted file mode 100644 index 99e377e91e..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/EmptyState.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default UserDatasetEmptyState; -declare class UserDatasetEmptyState extends React.Component { - constructor(props: any); - constructor(props: any, context: any); - render(): JSX.Element; -} -import React from 'react'; -//# sourceMappingURL=EmptyState.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/EmptyState.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/EmptyState.d.ts.map deleted file mode 100644 index 7acc3f9002..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/EmptyState.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../src/lib/Components/EmptyState.jsx"],"names":[],"mappings":";AAGA;IAa4/lB,wBAA8C;IAAA,sCAAyJ;IAZjsmB,sBAQC;CACF"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/EmptyState.js b/packages/libs/user-datasets-legacy/lib/Components/EmptyState.js deleted file mode 100644 index a64d123f24..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/EmptyState.js +++ /dev/null @@ -1,24 +0,0 @@ -import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime'; -import React from 'react'; -import { IconAlt as Icon } from '@veupathdb/wdk-client/lib/Components'; -class UserDatasetEmptyState extends React.Component { - render() { - const { message } = this.props; - return _jsxs( - 'div', - Object.assign( - { className: 'UserDatasetList-EmptyState' }, - { - children: [ - _jsx(Icon, { fa: 'table', className: 'EmptyState-Icon' }), - typeof message === 'string' - ? _jsx('p', { children: message }) - : message, - ], - } - ) - ); - } -} -export default UserDatasetEmptyState; -//# sourceMappingURL=EmptyState.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/EmptyState.js.map b/packages/libs/user-datasets-legacy/lib/Components/EmptyState.js.map deleted file mode 100644 index c5a048a8b5..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/EmptyState.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EmptyState.js","sourceRoot":"","sources":["../../src/lib/Components/EmptyState.jsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAEvE,MAAM,qBAAsB,SAAQ,KAAK,CAAC,SAAS;IACjD,MAAM;QACJ,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC/B,OAAO,CACL,6BAAK,SAAS,EAAC,4BAA4B,iBACzC,KAAC,IAAI,IAAC,EAAE,EAAC,OAAO,EAAC,SAAS,EAAC,iBAAiB,GAAG,EAC9C,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,sBAAI,OAAO,GAAK,CAAC,CAAC,CAAC,OAAO,KACrD,CACP,CAAC;IACJ,CAAC;CACF;AAED,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/List/UserDatasetList.d.ts b/packages/libs/user-datasets-legacy/lib/Components/List/UserDatasetList.d.ts deleted file mode 100644 index 25c1d26e0b..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/List/UserDatasetList.d.ts +++ /dev/null @@ -1,134 +0,0 @@ -import React from 'react'; -import { - MesaColumn, - MesaSortObject, -} from '@veupathdb/coreui/lib/components/Mesa/types'; -import { User } from '@veupathdb/wdk-client/lib/Utils/WdkUser'; -import { - DataNoun, - UserDataset, - UserDatasetMeta, - UserDatasetShare, -} from '../../Utils/types'; -import './UserDatasetList.scss'; -interface Props { - baseUrl: string; - user: User; - location: any; - projectId: string; - projectName: string; - userDatasets: UserDataset[]; - filterByProject: boolean; - shareUserDatasets: ( - userDatasetIds: number[], - recipientUserIds: number[] - ) => any; - unshareUserDatasets: ( - userDatasetIds: number[], - recipientUserIds: number[] - ) => any; - removeUserDataset: (dataset: UserDataset) => any; - updateUserDatasetDetail: ( - userDataset: UserDataset, - meta: UserDatasetMeta - ) => any; - updateProjectFilter: (filterByProject: boolean) => any; - quotaSize: number; - dataNoun: DataNoun; -} -interface State { - selectedRows: number[]; - uiState: { - sort: MesaSortObject; - }; - searchTerm: string; - sharingModalOpen: boolean; - editingCache: any; -} -interface MesaDataCellProps { - row: UserDataset; - column: MesaColumn; - rowIndex: number; - columnIndex: number; - inline?: boolean; -} -declare class UserDatasetList extends React.Component { - constructor(props: Props); - isRowSelected(row: UserDataset): boolean; - isMyDataset(dataset: UserDataset): boolean; - onSearchTermChange(searchTerm: string): void; - onMetaAttributeSaveFactory( - dataset: UserDataset, - attrKey: string - ): (value: string) => any; - renderSharedWithCell(cellProps: MesaDataCellProps): string | null; - renderStatusCell(cellProps: MesaDataCellProps): JSX.Element; - renderOwnerCell(cellProps: MesaDataCellProps): JSX.Element; - getColumns(): any[]; - onRowSelect(row: UserDataset): void; - onRowDeselect(row: UserDataset): void; - onMultipleRowSelect(rows: UserDataset[]): void; - onMultipleRowDeselect(rows: UserDataset[]): void; - onSort(column: MesaColumn, direction: string): void; - getEventHandlers(): { - onSort: ( - column: MesaColumn< - UserDataset, - keyof UserDataset, - | string - | number - | boolean - | UserDatasetMeta - | { - resourceDisplayName: string; - resourceIdentifier: string; - resourceVersion: string; - }[] - | { - name: string; - size: number; - }[] - | string[] - | UserDatasetShare[] - | { - name: string; - display: string; - version: string; - } - | undefined - >, - direction: string - ) => void; - onRowSelect: (row: UserDataset) => void; - onRowDeselect: (row: UserDataset) => void; - onMultipleRowSelect: (rows: UserDataset[]) => void; - onMultipleRowDeselect: (rows: UserDataset[]) => void; - }; - getTableActions(): { - callback: (rows: UserDataset[]) => void; - element: JSX.Element; - selectionRequired: boolean; - }[]; - getTableOptions(): { - isRowSelected: (row: UserDataset) => boolean; - showToolbar: boolean; - renderEmptyState(): JSX.Element; - }; - filterAndSortRows(rows: UserDataset[]): UserDataset[]; - filterRowsBySearchTerm( - rows: UserDataset[], - searchTerm?: string - ): UserDataset[]; - getColumnSortValueMapper( - columnKey: string | null - ): - | ((data: UserDataset, index: number) => string) - | ((data: any, index: number) => any); - sortRowsByColumnKey(rows: UserDataset[], sort: MesaSortObject): UserDataset[]; - closeSharingModal(): void; - openSharingModal(): void; - toggleProjectScope(newValue: boolean): void; - render(): JSX.Element; -} -export default UserDatasetList; -//# sourceMappingURL=UserDatasetList.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/List/UserDatasetList.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/List/UserDatasetList.d.ts.map deleted file mode 100644 index 78ab7226dc..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/List/UserDatasetList.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetList.d.ts","sourceRoot":"","sources":["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AQhB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,WAI7B,WAAW,SAAS,MAAM,KAAG,MAAM,YAKnC,GAAG,SAAS,MAAM;IAQtC,mBAAmB,CACjB,IAAI,EAAE,WAAW,EAAE,EACnB,IAAI,EAAE,cAAc,GACnB,WAAW,EAAE;IAQhB,iBAAiB;IAKjB,gBAAgB;IAKhB,kBAAkB,CAAC,QAAQ,EAAE,OAAO;IAIpC,MAAM;CAyGP;AAED,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/List/UserDatasetList.js b/packages/libs/user-datasets-legacy/lib/Components/List/UserDatasetList.js deleted file mode 100644 index 3eb279f122..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/List/UserDatasetList.js +++ /dev/null @@ -1,679 +0,0 @@ -import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime'; -import React from 'react'; -import { add } from 'lodash'; -import { - Checkbox, - IconAlt as Icon, - Link, - RealTimeSearchBox as SearchBox, - SaveableTextEditor, -} from '@veupathdb/wdk-client/lib/Components'; -import { - Mesa, - MesaState, - Utils as MesaUtils, -} from '@veupathdb/coreui/lib/components/Mesa'; -import { bytesToHuman } from '@veupathdb/wdk-client/lib/Utils/Converters'; -import UserDatasetEmptyState from '../EmptyState'; -import SharingModal from '../Sharing/UserDatasetSharingModal'; -import UserDatasetStatus from '../UserDatasetStatus'; -import { normalizePercentage, textCell } from '../UserDatasetUtils'; -import './UserDatasetList.scss'; -import { DateTime } from '../DateTime'; -import { ThemedGrantAccessButton } from '../ThemedGrantAccessButton'; -import { ThemedDeleteButton } from '../ThemedDeleteButton'; -class UserDatasetList extends React.Component { - constructor(props) { - super(props); - this.state = { - selectedRows: [], - uiState: { - sort: { - columnKey: 'created', - direction: 'asc', - }, - }, - editingCache: {}, - sharingModalOpen: false, - searchTerm: '', - }; - this.onRowSelect = this.onRowSelect.bind(this); - this.onRowDeselect = this.onRowDeselect.bind(this); - this.isRowSelected = this.isRowSelected.bind(this); - this.onMultipleRowSelect = this.onMultipleRowSelect.bind(this); - this.onMultipleRowDeselect = this.onMultipleRowDeselect.bind(this); - this.onSort = this.onSort.bind(this); - this.getColumns = this.getColumns.bind(this); - this.isMyDataset = this.isMyDataset.bind(this); - this.getEventHandlers = this.getEventHandlers.bind(this); - this.filterAndSortRows = this.filterAndSortRows.bind(this); - this.onSearchTermChange = this.onSearchTermChange.bind(this); - this.onMetaAttributeSaveFactory = - this.onMetaAttributeSaveFactory.bind(this); - this.renderOwnerCell = this.renderOwnerCell.bind(this); - this.renderStatusCell = this.renderStatusCell.bind(this); - this.openSharingModal = this.openSharingModal.bind(this); - this.closeSharingModal = this.closeSharingModal.bind(this); - this.toggleProjectScope = this.toggleProjectScope.bind(this); - } - isRowSelected(row) { - const id = row.id; - const { selectedRows } = this.state; - return selectedRows.includes(id); - } - isMyDataset(dataset) { - const { user } = this.props; - return user.id === dataset.ownerUserId; - } - onSearchTermChange(searchTerm) { - this.setState({ searchTerm }); - } - onMetaAttributeSaveFactory(dataset, attrKey) { - const { meta } = dataset; - const { updateUserDatasetDetail } = this.props; - return (value) => - updateUserDatasetDetail( - dataset, - Object.assign(Object.assign({}, meta), { [attrKey]: value }) - ); - } - renderSharedWithCell(cellProps) { - const dataset = cellProps.row; - return !dataset.sharedWith || !dataset.sharedWith.length - ? null - : dataset.sharedWith.map((share) => share.userDisplayName).join(', '); - } - renderStatusCell(cellProps) { - const userDataset = cellProps.row; - const { baseUrl, projectId, projectName } = this.props; - return _jsx(UserDatasetStatus, { - baseUrl: baseUrl, - linkToDataset: true, - useTooltip: true, - userDataset: userDataset, - projectId: projectId, - displayName: projectName, - }); - } - renderOwnerCell(cellProps) { - const row = cellProps.row; - const { owner } = row; - return this.isMyDataset(row) - ? _jsx('span', Object.assign({ className: 'faded' }, { children: 'Me' })) - : _jsx('span', { children: owner }); - } - getColumns() { - const { baseUrl, user } = this.props; - function isOwner(ownerId) { - return user.id === ownerId; - } - return [ - { - key: 'meta.name', - sortable: true, - name: 'Name / ID', - helpText: '', - renderCell: (cellProps) => { - const dataset = cellProps.row; - const saveName = this.onMetaAttributeSaveFactory(dataset, 'name'); - return _jsx(SaveableTextEditor, { - value: dataset.meta.name, - multiLine: true, - rows: 2, - onSave: saveName, - readOnly: !isOwner(dataset.ownerUserId), - displayValue: (value) => - _jsxs(React.Fragment, { - children: [ - _jsx( - Link, - Object.assign( - { to: `${baseUrl}/${dataset.id}` }, - { children: value } - ) - ), - _jsx('br', {}), - _jsxs( - 'span', - Object.assign( - { className: 'faded' }, - { children: ['(', dataset.id, ')'] } - ) - ), - ], - }), - }); - }, - }, - { - key: 'summary', - name: 'Summary', - style: { maxWidth: '300px' }, - renderCell: (cellProps) => { - const dataset = cellProps.row; - const saveSummary = this.onMetaAttributeSaveFactory( - dataset, - 'summary' - ); - return _jsx( - 'div', - Object.assign( - { style: { display: 'block', maxWidth: '100%' } }, - { - children: _jsx(SaveableTextEditor, { - rows: Math.max( - 2, - Math.floor(dataset.meta.summary.length / 22) - ), - multiLine: true, - onSave: saveSummary, - value: dataset.meta.summary, - readOnly: !isOwner(dataset.ownerUserId), - }), - } - ) - ); - }, - }, - { - key: 'type', - name: 'Type', - sortable: true, - renderCell: textCell('type', (datasetType) => { - const display = datasetType.display; - const version = datasetType.version; - return _jsxs('span', { - children: [ - display, - ' ', - _jsxs( - 'span', - Object.assign( - { className: 'faded' }, - { children: ['(', version, ')'] } - ) - ), - ], - }); - }), - }, - { - key: 'projects', - sortable: true, - name: 'VEuPathDB Websites', - renderCell(cellProps) { - const userDataset = cellProps.row; - const { projects } = userDataset; - return projects.join(', '); - }, - }, - { - key: 'status', - className: 'StatusColumn', - name: 'Status', - style: { textAlign: 'center' }, - renderCell: this.renderStatusCell, - }, - { - key: 'owner', - name: 'Owner', - sortable: true, - renderCell: this.renderOwnerCell, - }, - { - key: 'sharedWith', - name: 'Shared With', - sortable: true, - renderCell: this.renderSharedWithCell, - }, - { - key: 'created', - name: 'Created', - sortable: true, - renderCell: textCell('created', (created) => - _jsx(DateTime, { datetime: created }) - ), - }, - { - key: 'datafiles', - name: 'File Count', - renderCell: textCell('datafiles', (files) => files.length), - }, - { - key: 'size', - name: 'Size', - sortable: true, - renderCell: textCell('size', (size) => bytesToHuman(size)), - }, - { - key: 'percentQuotaUsed', - name: 'Quota Usage', - sortable: true, - renderCell: textCell('percentQuotaUsed', (percent) => - percent ? `${normalizePercentage(percent)}%` : null - ), - }, - ].filter((column) => column); - } - onRowSelect(row) { - const id = row.id; - const { selectedRows } = this.state; - if (selectedRows.includes(id)) return; - const newSelection = [...selectedRows, id]; - this.setState({ selectedRows: newSelection }); - } - onRowDeselect(row) { - const id = row.id; - const { selectedRows } = this.state; - if (!selectedRows.includes(id)) return; - const newSelection = selectedRows.filter((selectedId) => selectedId !== id); - this.setState({ selectedRows: newSelection }); - } - onMultipleRowSelect(rows) { - if (!rows.length) return; - const { selectedRows } = this.state; - const unselectedRows = rows - .filter((dataset) => !selectedRows.includes(dataset.id)) - .map((dataset) => dataset.id); - if (!unselectedRows.length) return; - const newSelection = [...selectedRows, ...unselectedRows]; - this.setState({ selectedRows: newSelection }); - } - onMultipleRowDeselect(rows) { - if (!rows.length) return; - const { selectedRows } = this.state; - const deselectedIds = rows.map((row) => row.id); - const newSelection = selectedRows.filter( - (id) => !deselectedIds.includes(id) - ); - this.setState({ selectedRows: newSelection }); - } - onSort(column, direction) { - const key = column.key; - const { state } = this; - const { setSortColumnKey, setSortDirection } = MesaState; - const updatedState = setSortDirection( - setSortColumnKey(state, key), - direction - ); - this.setState(updatedState); - } - getEventHandlers() { - return { - onSort: this.onSort, - onRowSelect: this.onRowSelect, - onRowDeselect: this.onRowDeselect, - onMultipleRowSelect: this.onMultipleRowSelect, - onMultipleRowDeselect: this.onMultipleRowDeselect, - }; - } - getTableActions() { - const { isMyDataset } = this; - const { removeUserDataset, dataNoun } = this.props; - return [ - { - callback: (rows) => { - this.openSharingModal(); - }, - element: _jsx(ThemedGrantAccessButton, { - buttonText: `Grant Access to ${dataNoun.plural}`, - onPress: () => null, - }), - selectionRequired: true, - }, - { - callback: (userDatasets) => { - const [noun, pronoun] = - userDatasets.length === 1 - ? [`this ${this.props.dataNoun.singular.toLowerCase()}`, 'it'] - : [`these ${this.props.dataNoun.plural.toLowerCase()}`, 'them']; - const affectedUsers = userDatasets.reduce( - (affectedUserList, userDataset) => { - if (!isMyDataset(userDataset)) return affectedUserList; - if (!userDataset.sharedWith || userDataset.sharedWith.length) - return affectedUserList; - const newlyAffectedUsers = userDataset.sharedWith.filter( - (sharedWithUser) => { - return ( - affectedUserList.find( - (affectedUser) => - affectedUser.user === sharedWithUser.user - ) != null - ); - } - ); - return [...affectedUserList, ...newlyAffectedUsers]; - }, - [] - ); - if ( - !window.confirm( - `Are you sure you want to delete ${noun}? ` + - (affectedUsers.length - ? `You have shared ${pronoun} with ${affectedUsers} users.` - : '') - ) - ) - return; - userDatasets.forEach((userDataset) => removeUserDataset(userDataset)); - }, - element: _jsx(ThemedDeleteButton, { - buttonText: 'Delete', - onPress: () => null, - }), - selectionRequired: true, - }, - ]; - } - getTableOptions() { - const { isRowSelected, toggleProjectScope } = this; - const { userDatasets, projectName, filterByProject, dataNoun } = this.props; - const emptyMessage = !userDatasets.length - ? _jsxs( - 'p', - Object.assign( - { style: { textAlign: 'center' } }, - { - children: [ - 'This page is empty because you do not have any', - ' ', - dataNoun.plural.toLowerCase(), - '.', - ], - } - ) - ) - : filterByProject - ? _jsxs(React.Fragment, { - children: [ - _jsxs('p', { - children: [ - 'You have no ', - _jsx('b', { children: projectName }), - ' data sets.', - ], - }), - _jsx('br', {}), - _jsxs( - 'button', - Object.assign( - { - className: 'btn btn-info', - onClick: () => toggleProjectScope(false), - }, - { children: ['Show All User ', dataNoun.plural] } - ) - ), - ], - }) - : _jsxs(React.Fragment, { - children: [ - _jsx('p', { children: 'Your search returned no results.' }), - _jsx('br', {}), - _jsx( - 'button', - Object.assign( - { - type: 'button', - className: 'btn', - onClick: () => this.setState({ searchTerm: '' }), - }, - { children: 'Clear Search Query' } - ) - ), - ], - }); - return { - isRowSelected, - showToolbar: true, - renderEmptyState() { - return _jsx(React.Fragment, { - children: _jsx(UserDatasetEmptyState, { message: emptyMessage }), - }); - }, - }; - } - filterAndSortRows(rows) { - const { searchTerm, uiState } = this.state; - const { projectName, filterByProject } = this.props; - const sort = uiState.sort; - if (filterByProject) - rows = rows.filter((dataset) => dataset.projects.includes(projectName)); - if (searchTerm && searchTerm.length) - rows = this.filterRowsBySearchTerm([...rows], searchTerm); - if (sort.columnKey.length) rows = this.sortRowsByColumnKey([...rows], sort); - return [...rows]; - } - filterRowsBySearchTerm(rows, searchTerm) { - if (!searchTerm || !searchTerm.length) return rows; - return rows.filter((dataset) => { - const searchableRow = JSON.stringify(dataset).toLowerCase(); - return searchableRow.indexOf(searchTerm.toLowerCase()) !== -1; - }); - } - getColumnSortValueMapper(columnKey) { - if (columnKey === null) return (data) => data; - switch (columnKey) { - case 'type': - return (data, index) => data.type.display.toLowerCase(); - case 'meta.name': - return (data) => data.meta.name.toLowerCase(); - default: - return (data, index) => { - return typeof data[columnKey] !== 'undefined' - ? data[columnKey] - : null; - }; - } - } - sortRowsByColumnKey(rows, sort) { - const direction = sort.direction; - const columnKey = sort.columnKey; - const mappedValue = this.getColumnSortValueMapper(columnKey); - const sorted = [...rows].sort(MesaUtils.sortFactory(mappedValue)); - return direction === 'asc' ? sorted : sorted.reverse(); - } - closeSharingModal() { - const sharingModalOpen = false; - this.setState({ sharingModalOpen }); - } - openSharingModal() { - const sharingModalOpen = true; - this.setState({ sharingModalOpen }); - } - toggleProjectScope(newValue) { - this.props.updateProjectFilter(newValue); - } - render() { - const { isRowSelected, toggleProjectScope } = this; - const { - userDatasets, - user, - projectName, - shareUserDatasets, - unshareUserDatasets, - filterByProject, - quotaSize, - dataNoun, - } = this.props; - const { uiState, selectedRows, searchTerm, sharingModalOpen } = this.state; - const rows = userDatasets; - const selectedDatasets = rows.filter(isRowSelected); - const columns = this.getColumns(); - const actions = this.getTableActions(); - const options = this.getTableOptions(); - const eventHandlers = this.getEventHandlers(); - const filteredRows = this.filterAndSortRows(rows); - const tableState = { - rows, - columns, - options, - actions, - filteredRows, - selectedRows, - eventHandlers, - uiState: Object.assign(Object.assign({}, uiState), { - emptinessCulprit: userDatasets.length ? 'search' : null, - }), - }; - const totalSize = userDatasets - .filter((ud) => ud.ownerUserId === user.id) - .map((ud) => ud.size) - .reduce(add, 0); - const totalPercent = totalSize / quotaSize; - const offerProjectToggle = userDatasets.some(({ projects }) => - projects.some((project) => project !== projectName) - ); - return _jsx( - 'div', - Object.assign( - { className: 'UserDatasetList' }, - { - children: _jsx( - Mesa, - Object.assign( - { state: MesaState.create(tableState) }, - { - children: _jsx( - 'div', - Object.assign( - { className: 'stack' }, - { - children: - userDatasets.length > 0 && - _jsxs( - 'div', - Object.assign( - { - style: { display: 'flex', alignItems: 'center' }, - }, - { - children: [ - sharingModalOpen && selectedDatasets.length - ? _jsx(SharingModal, { - user: user, - datasets: selectedDatasets, - deselectDataset: this.onRowDeselect, - shareUserDatasets: shareUserDatasets, - unshareUserDatasets: unshareUserDatasets, - onClose: this.closeSharingModal, - dataNoun: dataNoun, - }) - : null, - _jsx(SearchBox, { - placeholderText: 'Search ' + dataNoun.plural, - searchTerm: searchTerm, - onSearchTermChange: this.onSearchTermChange, - }), - _jsxs( - 'div', - Object.assign( - { - style: { - flex: '0 0 auto', - padding: '0 10px', - }, - }, - { - children: [ - 'Showing ', - filteredRows.length, - ' of ', - rows.length, - ' ', - rows.length === 1 - ? dataNoun.singular.toLowerCase() - : dataNoun.plural.toLowerCase(), - ], - } - ) - ), - offerProjectToggle && - _jsxs( - 'div', - Object.assign( - { - className: - 'UserDatasetList-ProjectToggle', - style: { - flex: '0 0 auto', - padding: '0 10px', - }, - }, - { - children: [ - _jsx(Checkbox, { - value: filterByProject, - onChange: toggleProjectScope, - }), - ' ', - _jsxs( - 'div', - Object.assign( - { - onClick: () => - toggleProjectScope( - !filterByProject - ), - style: { - display: 'inline-block', - }, - }, - { - children: [ - 'Only show ', - dataNoun.plural.toLowerCase(), - ' related to', - ' ', - _jsx('b', { - children: projectName, - }), - ], - } - ) - ), - ], - } - ) - ), - _jsxs( - 'div', - Object.assign( - { - style: { - flex: '0 0 auto', - padding: '0 10px', - }, - }, - { - children: [ - _jsx(Icon, { fa: 'info-circle' }), - ' ', - bytesToHuman(totalSize), - ' (', - normalizePercentage(totalPercent), - '%) of', - ' ', - bytesToHuman(quotaSize), - ' used', - ], - } - ) - ), - ], - } - ) - ), - } - ) - ), - } - ) - ), - } - ) - ); - } -} -export default UserDatasetList; -//# sourceMappingURL=UserDatasetList.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/List/UserDatasetList.js.map b/packages/libs/user-datasets-legacy/lib/Components/List/UserDatasetList.js.map deleted file mode 100644 index 555ac1b8ff..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/List/UserDatasetList.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetList.js","sourceRoot":"","sources":["../../../src/lib/Components/List/UserDatasetList.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAE7B,OAAO,EACL,QAAQ,EACR,OAAO,IAAI,IAAI,EACf,IAAI,EACJ,iBAAiB,IAAI,SAAS,EAC9B,kBAAkB,GACnB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,IAAI,EACJ,SAAS,EACT,KAAK,IAAI,SAAS,GACnB,MAAM,uCAAuC,CAAC;AAK/C,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAW1E,OAAO,qBAAqB,MAAM,eAAe,CAAC;AAClD,OAAO,YAAY,MAAM,oCAAoC,CAAC;AAC9D,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,QA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AAS,CAAC,cACpB,KACF,CACP,IACG,IACD,IACH,CACP,CAAC;IACJ,CAAC;CACF;AAED,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/List/UserDatasetList.scss b/packages/libs/user-datasets-legacy/lib/Components/List/UserDatasetList.scss deleted file mode 100644 index 4602fec090..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/List/UserDatasetList.scss +++ /dev/null @@ -1,19 +0,0 @@ -.UserDatasetList { - margin-bottom: 30px; -} -.UserDatasetList-EmptyState { - width: 100%; - display: flex; - align-items: center; - flex-direction: column; - justify-content: center; - p { - font-size: 1.3em; - font-weight: 300; - } - .wdk-Icon.EmptyState-Icon { - opacity: 0.1; - font-size: 60px; - margin: 5px auto 20px; - } -} diff --git a/packages/libs/user-datasets-legacy/lib/Components/NoDatasetsMessage.d.ts b/packages/libs/user-datasets-legacy/lib/Components/NoDatasetsMessage.d.ts deleted file mode 100644 index 25ef81f857..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/NoDatasetsMessage.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// -interface Props { - baseUrl: string; - hasDirectUpload: boolean; - helpRoute: string; -} -declare function NoDatasetsMessage({ - baseUrl, - hasDirectUpload, - helpRoute, -}: Props): JSX.Element; -export default NoDatasetsMessage; -//# sourceMappingURL=NoDatasetsMessage.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/NoDatasetsMessage.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/NoDatasetsMessage.d.ts.map deleted file mode 100644 index 4e39eca2c4..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/NoDatasetsMessage.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NoDatasetsMessage.d.ts","sourceRoot":"","sources":["../../src/lib/Components/NoDatasetsMessage.tsx"],"names":[],"mappings":";AAEA,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,iBAAS,iBAAiB,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,EAAE,KAAK,eAyBxE;AAED,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/NoDatasetsMessage.js b/packages/libs/user-datasets-legacy/lib/Components/NoDatasetsMessage.js deleted file mode 100644 index 5d4b50b74f..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/NoDatasetsMessage.js +++ /dev/null @@ -1,67 +0,0 @@ -import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime'; -import { Link } from '@veupathdb/wdk-client/lib/Components'; -function NoDatasetsMessage({ baseUrl, hasDirectUpload, helpRoute }) { - return _jsxs( - 'div', - Object.assign( - { className: 'UserDataset-NoDatasets' }, - { - children: [ - _jsx( - 'div', - Object.assign( - { className: 'UserDataset-NoDatasets__lead' }, - { children: 'You do not have any data sets.' } - ) - ), - _jsxs('ul', { - children: [ - hasDirectUpload - ? _jsxs('li', { - children: [ - 'Try adding a data set using the', - ' ', - _jsx( - Link, - Object.assign( - { to: `${baseUrl}/new` }, - { children: 'New upload' } - ) - ), - ' section above.', - ], - }) - : _jsxs('li', { - children: [ - 'To add a data set, go to', - ' ', - _jsx( - 'a', - Object.assign( - { href: 'https://veupathdb.globusgenomics.org' }, - { children: 'VEuPathDB Galaxy' } - ) - ), - '.', - ], - }), - _jsxs('li', { - children: [ - 'For an overview of the functionality, see the', - ' ', - _jsx( - Link, - Object.assign({ to: `${helpRoute}` }, { children: 'Help' }) - ), - ' page.', - ], - }), - ], - }), - ], - } - ) - ); -} -export default NoDatasetsMessage; -//# sourceMappingURL=NoDatasetsMessage.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/NoDatasetsMessage.js.map b/packages/libs/user-datasets-legacy/lib/Components/NoDatasetsMessage.js.map deleted file mode 100644 index 1518d46c56..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/NoDatasetsMessage.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NoDatasetsMessage.js","sourceRoot":"","sources":["../../src/lib/Components/NoDatasetsMessage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAQ5D,SAAS,iBAAiB,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAS;IACvE,OAAO,CACL,6BAAK,SAAS,EAAC,wBAAwB,iBACrC,4BAAK,SAAS,EAAC,8BAA8B,oDAEvC,EACN,yBACG,eAAe,CAAC,CAAC,CAAC,CACjB,4DACkC,GAAG,EACnC,KAAC,IAAI,kBAAC,EAAE,EAAE,GAAG,OAAO,MAAM,gCAAmB,uBAC1C,CACN,CAAC,CAAC,CAAC,CACF,qDAC2B,GAAG,EAC5B,0BAAG,IAAI,EAAC,sCAAsC,sCAAqB,SAChE,CACN,EACD,0EACgD,GAAG,EACjD,KAAC,IAAI,kBAAC,EAAE,EAAE,GAAG,SAAS,EAAE,0BAAa,cAClC,IACF,KACD,CACP,CAAC;AACJ,CAAC;AAED,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingModal.d.ts b/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingModal.d.ts deleted file mode 100644 index 437aca867c..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingModal.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -export default UserDatasetSharingModal; -declare class UserDatasetSharingModal extends React.Component { - constructor(props: any); - state: { - recipients: never[]; - recipientInput: null; - processing: boolean; - succeeded: null; - }; - renderShareItem(share: any, index: any, userDataset: any): JSX.Element; - renderShareList({ userDataset }: { userDataset: any }): JSX.Element[] | null; - renderDatasetList({ datasets }: { datasets: any }): JSX.Element[] | null; - renderDatasetItem(userDataset: any): JSX.Element; - renderRecipientItem(recipient: any, index: any): JSX.Element; - renderRecipientList({ - recipients, - }: { - recipients: any; - }): JSX.Element | JSX.Element[]; - renderRecipientForm(): JSX.Element; - handleTextChange(recipientInput?: null): void; - handleRecipientAdd(): void; - isMyDataset(dataset: any): any; - verifyRecipient(recipientEmail: any): Promise; - removeRecipient(recipient: any): any; - getDatasetNoun(): string; - disqualifyRecipient(recipientEmail: any, reason: any): void; - submitShare(): void; - renderEmptyState(): JSX.Element; - unshareWithUser(datasetId: any, userId: any): void; - isRecipientValid(recipient?: {}): any; - renderViewContent(): JSX.Element; - isDatasetShareable(dataset?: {}): boolean; - getValidRecipients(): never[]; - getShareableDatasets(): any; - renderSharingButtons(): JSX.Element; - acceptRecipient(recipientEmail: any, id: any): void; - unselectDataset(dataset: any): void; - render(): JSX.Element; -} -declare namespace UserDatasetSharingModal { - export { WdkDependenciesContext as contextType }; -} -import React from 'react'; -import { WdkDependenciesContext } from '@veupathdb/wdk-client/lib/Hooks/WdkDependenciesEffect'; -//# sourceMappingURL=UserDatasetSharingModal.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingModal.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingModal.d.ts.map deleted file mode 100644 index 2169eb5152..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingModal.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetSharingModal.d.ts","sourceRoot":"","sources":["../../../src/lib/Components/Sharing/UserDatasetSharingModal.jsx"],"names":[],"mappings":";AAiBA;IACE,wBAiCC;IA/BC;;;;;MAKC;IAkMH,uEAeC;IA0GD;;6BAOC;IAED;;6BAIC;IA/GD,iDA8CC;IAED,6DAsCC;IAED;;oCAQC;IA+CD,mCAwBC;IA/VD,8CAEC;IA2GD,2BAyBC;IA3ID,+BAGC;IAYD,oDAuDC;IAED,qCAOC;IAtED,yBAIC;IAqFD,4DAcC;IAsMD,oBAoBC;IA7LD,gCAOC;IAED,mDAcC;IA0ID,sCAEC;IAqFD,iCAwDC;IA3ID,0CAEC;IAkDD,8BAGC;IAED,4BAGC;IAED,oCAmBC;IAlTD,oDAeC;IAuFD,oCAIC;IAoQD,sBAoBC;CACF"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingModal.js b/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingModal.js deleted file mode 100644 index 283cf3ff59..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingModal.js +++ /dev/null @@ -1,678 +0,0 @@ -import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime'; -import React from 'react'; -import { - IconAlt as Icon, - Loading, - Modal, - TextBox, -} from '@veupathdb/wdk-client/lib/Components'; -import { WdkDependenciesContext } from '@veupathdb/wdk-client/lib/Hooks/WdkDependenciesEffect'; -import { isUserDatasetsCompatibleWdkService } from '../../Service/UserDatasetWrappers'; -import { DateTime } from '../DateTime'; -import './UserDatasetSharingModal.scss'; -const isValidEmail = (email) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email); -class UserDatasetSharingModal extends React.Component { - constructor(props) { - super(props); - this.state = { - recipients: [], - recipientInput: null, - processing: false, - succeeded: null, - }; - this.renderShareItem = this.renderShareItem.bind(this); - this.renderShareList = this.renderShareList.bind(this); - this.renderDatasetList = this.renderDatasetList.bind(this); - this.renderDatasetItem = this.renderDatasetItem.bind(this); - this.renderRecipientItem = this.renderRecipientItem.bind(this); - this.renderRecipientList = this.renderRecipientList.bind(this); - this.renderRecipientForm = this.renderRecipientForm.bind(this); - this.handleTextChange = this.handleTextChange.bind(this); - this.handleRecipientAdd = this.handleRecipientAdd.bind(this); - this.isMyDataset = this.isMyDataset.bind(this); - this.verifyRecipient = this.verifyRecipient.bind(this); - this.removeRecipient = this.removeRecipient.bind(this); - this.getDatasetNoun = this.getDatasetNoun.bind(this); - this.disqualifyRecipient = this.disqualifyRecipient.bind(this); - this.submitShare = this.submitShare.bind(this); - this.renderEmptyState = this.renderEmptyState.bind(this); - this.unshareWithUser = this.unshareWithUser.bind(this); - this.isRecipientValid = this.isRecipientValid.bind(this); - this.renderViewContent = this.renderViewContent.bind(this); - this.isDatasetShareable = this.isDatasetShareable.bind(this); - this.getValidRecipients = this.getValidRecipients.bind(this); - this.getShareableDatasets = this.getShareableDatasets.bind(this); - this.renderSharingButtons = this.renderSharingButtons.bind(this); - } - isMyDataset(dataset) { - const { user } = this.props; - return dataset && dataset.ownerUserId && dataset.ownerUserId === user.id; - } - handleTextChange(recipientInput = null) { - this.setState({ recipientInput }); - } - getDatasetNoun() { - return this.props.datasets.length === 1 - ? `this ${this.props.dataNoun.singular.toLowerCase()}` - : `these ${this.props.dataNoun.plural.toLowerCase()}`; - } - verifyRecipient(recipientEmail) { - if (typeof recipientEmail !== 'string' || !recipientEmail.length) - throw new TypeError( - `verifyRecipient: bad email received (${recipientEmail})` - ); - const { wdkService } = this.context; - if (!isUserDatasetsCompatibleWdkService(wdkService)) { - throw new Error( - `verifyRecipient: must have a properly configured UserDatasetsCompatibleWdkService` - ); - } - return wdkService - .getUserIdsByEmail([recipientEmail]) - .then(({ results }) => { - const foundUsers = results.find((result) => - Object.keys(result).includes(recipientEmail) - ); - if (!results.length || !foundUsers) { - return this.disqualifyRecipient( - recipientEmail, - _jsxs('span', { - children: [ - 'This email is not associated with a VEuPathDB account. ', - _jsx('br', {}), - ' ', - _jsx('b', { children: recipientEmail }), - ' will not receive ', - this.getDatasetNoun(), - '.', - ], - }) - ); - } - const uid = foundUsers[recipientEmail]; - if (uid === this.props.user.id) { - return this.disqualifyRecipient( - recipientEmail, - _jsxs('span', { - children: [ - 'Sorry, you cannot share a', - ' ', - this.props.dataNoun.singular.toLowerCase(), - ' with yourself.', - ], - }) - ); - } else { - return this.acceptRecipient(recipientEmail, uid); - } - }) - .catch((err) => { - console.error( - `verifyRecipient: error checking if '${recipientEmail}' exists.`, - err - ); - return this.disqualifyRecipient( - recipientEmail, - _jsx('span', { children: 'An unknown error occurred.' }) - ); - }); - } - removeRecipient(recipient) { - const { email } = recipient; - const { onClose } = this.props; - const recipients = [ - ...this.state.recipients.filter((user) => user.email !== email), - ]; - return recipients.length ? this.setState({ recipients }) : onClose(); - } - acceptRecipient(recipientEmail, id) { - const { recipients } = this.state; - const acceptedRecipient = { - id, - verified: true, - email: recipientEmail, - error: null, - }; - this.setState({ - recipients: recipients.map((recipient) => { - return recipient.email === recipientEmail - ? acceptedRecipient - : recipient; - }), - }); - } - disqualifyRecipient(recipientEmail, reason) { - const { recipients } = this.state; - const disqualifiedRecipient = { - email: recipientEmail, - verified: false, - error: reason, - }; - this.setState({ - recipients: recipients.map((recipient) => { - return recipient.email === recipientEmail - ? disqualifiedRecipient - : recipient; - }), - }); - } - handleRecipientAdd() { - const { recipientInput, recipients } = this.state; - if (!isValidEmail(recipientInput)) - return alert('Please enter a valid email to share with.'); - if ( - recipients.find( - (recipient) => - recipient.email.toLowerCase() === recipientInput.toLowerCase() - ) - ) - return alert('This email has already been entered.'); - this.setState( - { - recipientInput: null, - recipients: [ - ...recipients, - { - email: recipientInput, - verified: null, - id: null, - }, - ], - }, - () => this.verifyRecipient(recipientInput) - ); - } - renderEmptyState() { - return _jsxs( - 'i', - Object.assign( - { className: 'faded' }, - { - children: [ - 'This ', - this.props.dataNoun.singular.toLowerCase(), - " hasn't been shared yet.", - ], - } - ) - ); - } - unshareWithUser(datasetId, userId) { - if ( - !window.confirm( - `Are you sure you want to stop sharing ${this.getDatasetNoun()} with this user?` - ) - ) - return; - const { unshareUserDatasets } = this.props; - if (typeof unshareUserDatasets !== 'function') - throw new TypeError( - 'UserDatasetSharingModal:unshareWithUser: expected unshareUserDatasets to be function. Got: ' + - typeof unshareUserDatasets - ); - unshareUserDatasets([datasetId], [userId]); - } - renderShareItem(share, index, userDataset) { - const { user, time, userDisplayName } = share; - return _jsxs( - 'div', - { - children: [ - _jsx( - 'span', - Object.assign({ className: 'faded' }, { children: 'Shared with' }) - ), - ' ', - _jsx('b', { children: userDisplayName }), - ' ', - _jsx(DateTime, { datetime: time }), - _jsx( - 'button', - Object.assign( - { - type: 'button', - onClick: () => this.unshareWithUser(userDataset.id, user), - className: 'link', - }, - { children: _jsx(Icon, { fa: 'times-circle unshareRecipient' }) } - ) - ), - ], - }, - index - ); - } - unselectDataset(dataset) { - const { deselectDataset } = this.props; - if (typeof deselectDataset !== 'function') return; - deselectDataset(dataset); - } - renderDatasetItem(userDataset) { - const { sharedWith, id, meta } = userDataset; - const { name } = meta; - const isOwner = this.isMyDataset(userDataset); - const { deselectDataset, dataNoun } = this.props; - const EmptyState = this.renderEmptyState; - const ShareList = this.renderShareList; - return _jsxs( - 'div', - Object.assign( - { - className: 'UserDatasetSharing-Dataset' + (isOwner ? '' : ' invalid'), - }, - { - children: [ - _jsx( - 'div', - Object.assign( - { className: 'UserDatasetSharing-Dataset-Icon' }, - { - children: _jsx(Icon, { - fa: isOwner ? 'table' : 'exclamation-circle danger', - }), - } - ) - ), - _jsxs( - 'div', - Object.assign( - { className: 'UserDatasetSharing-Dataset-Details' }, - { - children: [ - _jsx('h3', { children: name }), - !isOwner - ? _jsxs( - 'i', - Object.assign( - { className: 'faded danger' }, - { - children: [ - 'This ', - dataNoun.singular.toLowerCase(), - ' has been shared with you. Only the owner can share it.', - ], - } - ) - ) - : Array.isArray(sharedWith) && sharedWith.length - ? _jsx(ShareList, { userDataset: userDataset }) - : _jsx(EmptyState, {}), - ], - } - ) - ), - _jsx( - 'div', - Object.assign( - { className: 'UserDatasetSharing-Dataset-Actions' }, - { - children: - typeof deselectDataset !== 'function' - ? null - : _jsx( - 'button', - Object.assign( - { - type: 'button', - title: `Unselect this ${dataNoun.singular.toLowerCase()} for sharing`, - onClick: () => this.unselectDataset(userDataset), - className: 'link removalLink', - }, - { children: _jsx(Icon, { fa: 'close' }) } - ) - ), - } - ) - ), - ], - } - ), - id - ); - } - renderRecipientItem(recipient, index) { - const { email, verified, error } = recipient; - const invalid = verified === false; - const userIcon = - verified === null - ? 'circle-o-notch fa-spin' - : verified - ? 'user-circle' - : 'user-times danger'; - return _jsxs( - 'div', - Object.assign( - { - className: - 'UserDatasetSharing-Recipient' + (invalid ? ' invalid' : ''), - }, - { - children: [ - _jsx( - 'div', - Object.assign( - { className: 'UserDatasetSharing-Recipient-Icon' }, - { children: _jsx(Icon, { fa: userIcon }) } - ) - ), - _jsxs( - 'div', - Object.assign( - { className: 'UserDatasetSharing-Recipient-Details' }, - { - children: [ - _jsx('h3', { children: email }), - invalid - ? _jsx( - 'span', - Object.assign( - { className: 'danger' }, - { children: error } - ) - ) - : `will receive ${this.getDatasetNoun()}`, - ], - } - ) - ), - _jsx( - 'div', - Object.assign( - { className: 'UserDatasetSharing-Recipient-Actions' }, - { - children: _jsx( - 'button', - Object.assign( - { - type: 'button', - onClick: () => this.removeRecipient(recipient), - title: 'Remove this recipient.', - className: 'link removalLink', - }, - { children: _jsx(Icon, { fa: 'close' }) } - ) - ), - } - ) - ), - ], - } - ), - index - ); - } - renderRecipientList({ recipients }) { - return !Array.isArray(recipients) || !recipients.length - ? _jsxs( - 'p', - Object.assign( - { className: 'NoRecipients' }, - { - children: [ - _jsx(Icon, { fa: 'user-o' }), - ' \u00A0 No recipients.', - ], - } - ) - ) - : recipients.map(this.renderRecipientItem); - } - renderShareList({ userDataset }) { - const { sharedWith } = userDataset; - return !Array.isArray(sharedWith) || !sharedWith.length - ? null - : sharedWith.map((share, index) => - this.renderShareItem(share, index, userDataset) - ); - } - renderDatasetList({ datasets }) { - return !Array.isArray(datasets) || !datasets.length - ? null - : datasets.map(this.renderDatasetItem); - } - isRecipientValid(recipient = {}) { - return recipient.verified && recipient.id !== this.props.user.id; - } - isDatasetShareable(dataset = {}) { - return dataset.ownerUserId === this.props.user.id; - } - submitShare() { - const recipients = this.getValidRecipients(); - const datasets = this.getShareableDatasets(); - if (!datasets.length) return; - const { shareUserDatasets } = this.props; - this.setState({ processing: true }, () => { - shareUserDatasets( - datasets.map(({ id }) => id), - recipients.map(({ id }) => id) - ) - .then((response) => { - if (response.type !== 'user-datasets/sharing-success') throw response; - this.setState({ processing: false, succeeded: true }); - }) - .catch((err) => { - console.error('submitShare: rejected', err); - this.setState({ processing: false, succeeded: false }); - }); - }); - } - renderRecipientForm() { - const { recipientInput } = this.state; - const { handleTextChange, handleRecipientAdd } = this; - return _jsxs( - 'form', - Object.assign( - { - className: 'UserDatasetSharing-RecipientForm', - onSubmit: (e) => e.preventDefault(), - }, - { - children: [ - _jsx(TextBox, { - placeholder: 'name@example.com', - onChange: handleTextChange, - value: recipientInput ? recipientInput : '', - }), - _jsx( - 'button', - Object.assign( - { - className: 'btn slim btn-slim', - title: 'Share with this email address', - onClick: handleRecipientAdd, - type: 'submit', - }, - { children: _jsx(Icon, { fa: 'user-plus' }) } - ) - ), - ], - } - ) - ); - } - getValidRecipients() { - const { recipients } = this.state; - return recipients.filter(this.isRecipientValid); - } - getShareableDatasets() { - const { datasets } = this.props; - return datasets.filter(this.isDatasetShareable); - } - renderSharingButtons() { - const datasets = this.getShareableDatasets(); - const recipients = this.getValidRecipients(); - const { dataNoun } = this.props; - return _jsx( - 'div', - Object.assign( - { className: 'UserDatasetSharing-Buttons' }, - { - children: _jsxs( - 'button', - Object.assign( - { - className: 'btn btn-info', - disabled: !recipients.length || !datasets.length, - onClick: this.submitShare, - }, - { - children: [ - _jsx(Icon, { fa: 'share left-side' }), - 'Grant ', - recipients.length, - ' Recipient', - recipients.length === 1 ? '' : 's', - ' Access to', - ' ', - datasets.length === 1 ? dataNoun.singular : dataNoun.plural, - ], - } - ) - ), - } - ) - ); - } - renderViewContent() { - const { recipients, succeeded } = this.state; - const { datasets, onClose, dataNoun } = this.props; - const datasetNoun = this.getDatasetNoun(); - const DatasetList = this.renderDatasetList; - const RecipientList = this.renderRecipientList; - const RecipientForm = this.renderRecipientForm; - const SharingButtons = this.renderSharingButtons; - const CloseButton = () => - _jsx( - 'button', - Object.assign( - { className: 'btn', onClick: () => onClose() }, - { children: 'Close this window.' } - ) - ); - switch (succeeded) { - case true: - return _jsxs( - 'div', - Object.assign( - { className: 'UserDataset-SharingModal-StatusView' }, - { - children: [ - _jsx(Icon, { fa: 'check-circle success' }), - _jsx('h2', { children: 'Shared successfully.' }), - _jsx(CloseButton, {}), - ], - } - ) - ); - case false: - return _jsxs( - 'div', - Object.assign( - { className: 'UserDataset-SharingModal-StatusView' }, - { - children: [ - _jsx(Icon, { fa: 'times-circle danger' }), - _jsxs('h2', { - children: ['Error Sharing ', dataNoun.plural, '.'], - }), - _jsxs('p', { - children: [ - 'An error occurred while sharing your', - ' ', - dataNoun.plural.toLowerCase(), - '. Please try again.', - ], - }), - _jsx(CloseButton, {}), - ], - } - ) - ); - default: - return _jsxs( - 'div', - Object.assign( - { className: 'UserDataset-SharingModal-FormView' }, - { - children: [ - _jsxs( - 'div', - Object.assign( - { className: 'UserDataset-SharingModal-DatasetSection' }, - { - children: [ - _jsxs( - 'h2', - Object.assign( - { className: 'UserDatasetSharing-SectionName' }, - { children: ['Share ', datasetNoun, ':'] } - ) - ), - _jsx(DatasetList, { datasets: datasets }), - ], - } - ) - ), - _jsxs( - 'div', - Object.assign( - { className: 'UserDataset-SharingModal-RecipientSection' }, - { - children: [ - _jsx( - 'h2', - Object.assign( - { className: 'UserDatasetSharing-SectionName' }, - { children: 'With the following recipients:' } - ) - ), - _jsx(RecipientForm, {}), - _jsx(RecipientList, { recipients: recipients }), - _jsx(SharingButtons, {}), - ], - } - ) - ), - ], - } - ) - ); - } - } - render() { - const { onClose } = this.props; - const { processing } = this.state; - const ViewContent = this.renderViewContent; - return _jsxs( - Modal, - Object.assign( - { className: 'UserDataset-SharingModal' }, - { - children: [ - _jsx( - 'div', - Object.assign( - { - className: 'UserDataset-SharingModal-CloseBar', - title: 'Close this window', - }, - { - children: _jsx(Icon, { - fa: 'window-close', - className: 'SharingModal-Close', - onClick: () => - typeof onClose === 'function' ? onClose() : null, - }), - } - ) - ), - processing ? _jsx(Loading, {}) : _jsx(ViewContent, {}), - ], - } - ) - ); - } -} -UserDatasetSharingModal.contextType = WdkDependenciesContext; -export default UserDatasetSharingModal; -//# sourceMappingURL=UserDatasetSharingModal.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingModal.js.map b/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingModal.js.map deleted file mode 100644 index b9d5f6aa95..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingModal.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetSharingModal.js","sourceRoot":"","sources":["../../../src/lib/Components/Sharing/UserDatasetSharingModal.jsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,OAAO,IAAI,IAAI,EACf,OAAO,EACP,KAAK,EACL,OAAO,GACR,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AAE/F,OAAO,EAAE,kCAAkC,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,gCAAgC,CAAC;AAExC,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,4BAA4B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAEzE,MAAM,uBAAwB,SAAQ,KAAK,CAAC,SAAS;IACnD,YAAY,KAAK;QACf,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACX,UAAU,EAAE,EAAE;YACd,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,KAAK;YACjB,SAAS,EAAE,IAAI;SAChB,CAAC;QACF,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvD,IAAI,CAAC,eAAe,GAAG,IAA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DAEzC,EACL,KAAC,aAAa,KAAG,EACjB,KAAC,aAAa,IAAC,UAAU,EAAE,UAAU,GAAI,EACzC,KAAC,cAAc,KAAG,KACd,KACF,CACP,CAAC;SACL;IACH,CAAC;IAED,MAAM;QACJ,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC/B,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAClC,MAAM,WAAW,GAAG,IAAI,CAAC,iBAAiB,CAAC;QAE3C,OAAO,CACL,MAAC,KAAK,kBAAC,SAAS,EAAC,0BAA0B,iBACzC,4BACE,SAAS,EAAC,mCAAmC,EAC7C,KAAK,EAAC,mBAAmB,gBAEzB,KAAC,IAAI,IACH,EAAE,EAAC,cAAc,EACjB,SAAS,EAAC,oBAAoB,EAC9B,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,OAAO,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GACjE,IACE,EACL,UAAU,CAAC,CAAC,CAAC,KAAC,OAAO,KAAG,CAAC,CAAC,CAAC,KAAC,WAAW,KAAG,KACrC,CACT,CAAC;IACJ,CAAC;CACF;AAED,uBAAuB,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAE7D,eAAe,uBAAuB,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingModal.scss b/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingModal.scss deleted file mode 100644 index ace63c4364..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingModal.scss +++ /dev/null @@ -1,192 +0,0 @@ -@import '@veupathdb/wdk-client/lib/Core/Style/palette'; - -.UserDataset-SharingModal { - background-color: white; - color: black; - padding: 30px 20px; - display: flex; - flex-flow: column nowrap; - border-radius: 10px; - box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); - max-height: 95vh; - overflow-y: auto; - min-width: 650px; - max-width: 100%; - - .UserDataset-SharingModal-CloseBar { - text-align: right; - } - .UserDataset-SharingModal-FormView { - margin-top: -50px; - display: flex; - flex-direction: column; - min-height: 250px; - } - - .UserDataset-SharingModal-RecipientSection, - .UserDataset-SharingModal-DatasetSection { - flex: 1; - } - - .NoRecipients { - font-size: 1.1em; - text-align: center; - font-style: italic; - opacity: 0.5; - } - .fa, - button .fa { - margin-right: 0; - } - - .UserDatasetSharing-SectionName { - margin: 10px 0 -5px; - font-weight: 200; - } - - fieldset { - margin: 0; - padding: 0; - border: 0; - display: flex; - align-items: center; - flex-flow: row nowrap; - input { - flex: 1; - border-radius: 4px; - padding: 0 5px !important; - height: 30px; - border-color: rgba(0, 0, 0, 0.2) !important; - } - } - hr { - margin: 20px 0 0; - border: none; - border-bottom: 1px solid rgba(0, 0, 0, 0.3); - } - - .UserDatasetSharing-RecipientForm { - display: flex; - margin: 0; - align-items: center; - input { - flex: 1; - box-sizing: border-box; - height: 35px; - border-color: rgba(0, 0, 0, 0.3) !important; - border-radius: 5px; - background: none; - padding: 10px !important; - background: none; - } - } - - .UserDatasetSharing-Dataset, - .UserDatasetSharing-Recipient { - border: 1px solid rgba(0, 0, 0, 0.1); - border-radius: 5px; - display: flex; - margin-top: 5px; - align-items: center; - flex-flow: row nowrap; - - .removalLink { - cursor: pointer; - position: relative; - &:hover { - color: $red; - } - z-index: 20; - .wdk-Icon { - padding-right: 5px; - } - } - - &.invalid { - opacity: 0.4; - transition: opacity 0.3s; - &:hover { - opacity: 1; - } - } - - .wdk-Icon { - font-size: 1.5em; - margin-left: 10px; - &.fa-times-circle:hover { - color: $red; - } - &.unshareRecipient { - font-size: 15px; - margin-left: 5px; - } - } - .UserDatasetSharing-Dataset-Details, - .UserDatasetSharing-Recipient-Details { - flex: 1 1 auto; - h3 { - line-height: 1em; - margin-top: -5px; - } - .fa-times { - font-size: 0.8em; - } - } - .UserDatasetSharing-Dataset-Actions, - .UserDatasetSharing-Recipient-Actions { - margin-right: 10px; - } - .UserDatasetSharing-Dataset-Icon, - .UserDatasetSharing-Recipient-Icon { - flex: 0 0 auto; - } - .UserDatasetSharing-Dataset-Details, - .UserDatasetSharing-Dataset-Icon, - .UserDatasetSharing-Recipient-Details, - .UserDatasetSharing-Recipient-Icon { - padding: 10px; - } - } - - h3 { - padding: 5px 0; - } - - .UserDatasetSharing-Buttons { - display: flex; - margin: 30px 0 0; - flex-direction: row-reverse; - button { - flex: 0 0 auto; - } - } -} - -.UserDataset-SharingModal-StatusView { - width: 100%; - text-align: center; - padding: 20px 5px; - h2 { - font-weight: 200; - text-align: center; - } - button { - margin-top: 15px; - } - .wdk-Icon { - font-size: 50px; - margin-bottom: 20px; - } -} - -.SharingModal-Close { - font-size: 1.2em; - position: relative; - top: -10px; - z-index: 100; - margin-bottom: -50px; - cursor: pointer; - &:hover { - color: $red; - } -} diff --git a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingReducer.d.ts b/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingReducer.d.ts deleted file mode 100644 index 80207fccd0..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingReducer.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Action } from '../../Actions/UserDatasetsActions'; -import { UserDataset } from '../../Utils/types'; -type State = Record< - string, - { - isLoading: boolean; - resource?: UserDataset; - } ->; -export default function reduce(state: State | undefined, action: Action): State; -export {}; -//# sourceMappingURL=UserDatasetSharingReducer.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingReducer.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingReducer.d.ts.map deleted file mode 100644 index e504a91474..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingReducer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetSharingReducer.d.ts","sourceRoot":"","sources":["../../../src/lib/Components/Sharing/UserDatasetSharingReducer.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EAGP,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAoB,MAAM,mBAAmB,CAAC;AAKlE,KAAK,KAAK,GAAG,MAAM,CACjB,MAAM,EACN;IACE,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,WAAW,CAAC;CACxB,CACF,CAAC;AAOF,MAAM,CAAC,OAAO,UAAU,MAAM,CAC5B,KAAK,mBAAsB,EAC3B,MAAM,EAAE,MAAM,GACb,KAAK,CAOP"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingReducer.js b/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingReducer.js deleted file mode 100644 index 350e6ded9d..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingReducer.js +++ /dev/null @@ -1,48 +0,0 @@ -import { differenceWith, unionWith } from 'lodash'; -import { SHARING_SUCCESS } from '../../Actions/UserDatasetsActions'; -const initialState = {}; -const handleAdd = handleOperation('add'); -const handleDelete = handleOperation('delete'); -export default function reduce(state = initialState, action) { - switch (action.type) { - case SHARING_SUCCESS: - return handleAdd(handleDelete(state, action.payload), action.payload); - default: - return state; - } -} -function handleOperation(operation) { - return function (state, payload) { - const sharesByTargetId = payload.response[operation]; - if (sharesByTargetId == null) return state; - return Object.entries(sharesByTargetId).reduce( - (state, [userDatasetId, shares]) => { - const entry = state[userDatasetId]; - // entry can be undefined - if (entry == null || entry.resource == null || shares == null) { - return state; - } - const sharedWith = - operation === 'add' - ? unionWith(entry.resource.sharedWith, shares, shareComparator) - : differenceWith( - entry.resource.sharedWith, - shares, - shareComparator - ); - return Object.assign(Object.assign({}, state), { - [userDatasetId]: Object.assign(Object.assign({}, entry), { - resource: Object.assign(Object.assign({}, entry.resource), { - sharedWith, - }), - }), - }); - }, - state - ); - }; -} -function shareComparator(share1, share2) { - return share1.user === share2.user; -} -//# sourceMappingURL=UserDatasetSharingReducer.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingReducer.js.map b/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingReducer.js.map deleted file mode 100644 index 55272882b5..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/Sharing/UserDatasetSharingReducer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetSharingReducer.js","sourceRoot":"","sources":["../../../src/lib/Components/Sharing/UserDatasetSharingReducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnD,OAAO,EAGL,eAAe,GAChB,MAAM,mCAAmC,CAAC;AAe3C,MAAM,YAAY,GAAU,EAAE,CAAC;AAE/B,MAAM,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;AACzC,MAAM,YAAY,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;AAE/C,MAAM,CAAC,OAAO,UAAU,MAAM,CAC5B,QAAe,YAAY,EAC3B,MAAc;IAEd,QAAQ,MAAM,CAAC,IAAI,EAAE;QACnB,KAAK,eAAe;YAClB,OAAO,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QACxE;YACE,OAAO,KAAK,CAAC;KAChB;AACH,CAAC;AAED,SAAS,eAAe,CAAC,SAAyB;IAChD,OAAO,UACL,KAAY,EACZ,OAAwC;QAExC,MAAM,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAErD,IAAI,gBAAgB,IAAI,IAAI;YAAE,OAAO,KAAK,CAAC;QAE3C,OAAO,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAC5C,CAAC,KAAK,EAAE,CAAC,aAAa,EAAE,MAAM,CAAC,EAAE,EAAE;YACjC,MAAM,KAAK,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC;YACnC,yBAAyB;YACzB,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,QAAQ,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI,EAAE;gBAC7D,OAAO,KAAK,CAAC;aACd;YACD,MAAM,UAAU,GACd,SAAS,KAAK,KAAK;gBACjB,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,CAAC;gBAC/D,CAAC,CAAC,cAAc,CACZ,KAAK,CAAC,QAAQ,CAAC,UAAU,EACzB,MAAM,EACN,eAAe,CAChB,CAAC;YAER,uCACK,KAAK,KACR,CAAC,aAAa,CAAC,kCACV,KAAK,KACR,QAAQ,kCACH,KAAK,CAAC,QAAQ,KACjB,UAAU,UAGd;QACJ,CAAC,EACD,KAAK,CACN,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,MAAwB,EAAE,MAAwB;IACzE,OAAO,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/ThemedDeleteButton.d.ts b/packages/libs/user-datasets-legacy/lib/Components/ThemedDeleteButton.d.ts deleted file mode 100644 index 4d06435bd7..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/ThemedDeleteButton.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/// -import { ThemedButtonProps } from './ThemedGrantAccessButton'; -export declare function ThemedDeleteButton({ - buttonText, - onPress, -}: ThemedButtonProps): JSX.Element; -//# sourceMappingURL=ThemedDeleteButton.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/ThemedDeleteButton.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/ThemedDeleteButton.d.ts.map deleted file mode 100644 index bcd618aeb0..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/ThemedDeleteButton.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ThemedDeleteButton.d.ts","sourceRoot":"","sources":["../../src/lib/Components/ThemedDeleteButton.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,wBAAgB,kBAAkB,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,iBAAiB,eAgD5E"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/ThemedDeleteButton.js b/packages/libs/user-datasets-legacy/lib/Components/ThemedDeleteButton.js deleted file mode 100644 index fffd1a5c35..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/ThemedDeleteButton.js +++ /dev/null @@ -1,52 +0,0 @@ -import { jsx as _jsx } from 'react/jsx-runtime'; -import { useUITheme } from '@veupathdb/coreui/lib/components/theming'; -import { MesaButton, Trash } from '@veupathdb/coreui'; -import { gray, mutedRed } from '@veupathdb/coreui/lib/definitions/colors'; -export function ThemedDeleteButton({ buttonText, onPress }) { - const theme = useUITheme(); - return _jsx(MesaButton, { - text: buttonText, - textTransform: 'none', - onPress: onPress, - themeRole: undefined, - icon: Trash, - styleOverrides: { - default: { - color: gray[100], - textColor: '#4D4D4D', - dropShadow: { - color: gray[200], - blurRadius: '0px', - offsetX: '0px', - offsetY: '3px', - }, - border: { - color: gray[200], - style: 'solid', - width: 1, - }, - }, - hover: { - color: mutedRed[500], - textColor: 'white', - dropShadow: { - color: mutedRed[700], - blurRadius: '0px', - offsetX: '0px', - offsetY: '4px', - }, - }, - pressed: { - color: mutedRed[600], - textColor: 'white', - dropShadow: { - color: mutedRed[700], - blurRadius: '0px', - offsetX: '0px', - offsetY: '4px', - }, - }, - }, - }); -} -//# sourceMappingURL=ThemedDeleteButton.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/ThemedDeleteButton.js.map b/packages/libs/user-datasets-legacy/lib/Components/ThemedDeleteButton.js.map deleted file mode 100644 index 9582eab651..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/ThemedDeleteButton.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ThemedDeleteButton.js","sourceRoot":"","sources":["../../src/lib/Components/ThemedDeleteButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAG1E,MAAM,UAAU,kBAAkB,CAAC,EAAE,UAAU,EAAE,OAAO,EAAqB;IAC3E,MAAM,KAAK,GAAG,UAAU,EAAE,CAAC;IAC3B,OAAO,CACL,KAAC,UAAU,IACT,IAAI,EAAE,UAAU,EAChB,aAAa,EAAC,MAAM,EACpB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,KAAK,EACX,cAAc,EAAE;YACd,OAAO,EAAE;gBACP,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC;gBAChB,SAAS,EAAE,SAAS;gBACpB,UAAU,EAAE;oBACV,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC;oBAChB,UAAU,EAAE,KAAK;oBACjB,OAAO,EAAE,KAAK;oBACd,OAAO,EAAE,KAAK;iBACf;gBACD,MAAM,EAAE;oBACN,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC;oBAChB,KAAK,EAAE,OAAO;oBACd,KAAK,EAAE,CAAC;iBACT;aACF;YACD,KAAK,EAAE;gBACL,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC;gBACpB,SAAS,EAAE,OAAO;gBAClB,UAAU,EAAE;oBACV,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC;oBACpB,UAAU,EAAE,KAAK;oBACjB,OAAO,EAAE,KAAK;oBACd,OAAO,EAAE,KAAK;iBACf;aACF;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC;gBACpB,SAAS,EAAE,OAAO;gBAClB,UAAU,EAAE;oBACV,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC;oBACpB,UAAU,EAAE,KAAK;oBACjB,OAAO,EAAE,KAAK;oBACd,OAAO,EAAE,KAAK;iBACf;aACF;SACF,GACD,CACH,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/ThemedGrantAccessButton.d.ts b/packages/libs/user-datasets-legacy/lib/Components/ThemedGrantAccessButton.d.ts deleted file mode 100644 index b8ef247ce4..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/ThemedGrantAccessButton.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/// -export type ThemedButtonProps = { - buttonText: string; - onPress: () => null; -}; -export declare function ThemedGrantAccessButton({ - buttonText, - onPress, -}: ThemedButtonProps): JSX.Element; -//# sourceMappingURL=ThemedGrantAccessButton.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/ThemedGrantAccessButton.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/ThemedGrantAccessButton.d.ts.map deleted file mode 100644 index f6e9cdfb4d..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/ThemedGrantAccessButton.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ThemedGrantAccessButton.d.ts","sourceRoot":"","sources":["../../src/lib/Components/ThemedGrantAccessButton.tsx"],"names":[],"mappings":";AAGA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,EACtC,UAAU,EACV,OAAO,GACR,EAAE,iBAAiB,eAyCnB"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/ThemedGrantAccessButton.js b/packages/libs/user-datasets-legacy/lib/Components/ThemedGrantAccessButton.js deleted file mode 100644 index 2a6230a7b9..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/ThemedGrantAccessButton.js +++ /dev/null @@ -1,56 +0,0 @@ -import { jsx as _jsx } from 'react/jsx-runtime'; -import { useUITheme } from '@veupathdb/coreui/lib/components/theming'; -import { MesaButton, Share } from '@veupathdb/coreui'; -export function ThemedGrantAccessButton({ buttonText, onPress }) { - const theme = useUITheme(); - return _jsx(MesaButton, { - text: buttonText, - textTransform: 'none', - onPress: onPress, - themeRole: 'primary', - icon: Share, - styleOverrides: { - default: { - border: { - color: - theme === null || theme === void 0 - ? void 0 - : theme.palette.primary.hue[theme.palette.primary.level + 100], - style: 'solid', - width: 1, - }, - }, - hover: { - color: - theme === null || theme === void 0 - ? void 0 - : theme.palette.primary.hue[theme.palette.primary.level + 100], - dropShadow: { - color: - theme === null || theme === void 0 - ? void 0 - : theme.palette.primary.hue[theme.palette.primary.level + 300], - blurRadius: '0px', - offsetX: '0px', - offsetY: '4px', - }, - }, - pressed: { - color: - theme === null || theme === void 0 - ? void 0 - : theme.palette.primary.hue[theme.palette.primary.level + 200], - dropShadow: { - color: - theme === null || theme === void 0 - ? void 0 - : theme.palette.primary.hue[theme.palette.primary.level + 400], - blurRadius: '0px', - offsetX: '0px', - offsetY: '4px', - }, - }, - }, - }); -} -//# sourceMappingURL=ThemedGrantAccessButton.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/ThemedGrantAccessButton.js.map b/packages/libs/user-datasets-legacy/lib/Components/ThemedGrantAccessButton.js.map deleted file mode 100644 index accf09d6ed..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/ThemedGrantAccessButton.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ThemedGrantAccessButton.js","sourceRoot":"","sources":["../../src/lib/Components/ThemedGrantAccessButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EA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AAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC;oBAC/D,UAAU,EAAE,KAAK;oBACjB,OAAO,EAAE,KAAK;oBACd,OAAO,EAAE,KAAK;iBACf;aACF;SACF,GACD,CACH,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/UploadForm.d.ts b/packages/libs/user-datasets-legacy/lib/Components/UploadForm.d.ts deleted file mode 100644 index a9d4319864..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UploadForm.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -/// -import { StrategySummary } from '@veupathdb/wdk-client/lib/Utils/WdkUser'; -import { State } from '../StoreModules/UserDatasetUploadStoreModule'; -import { - CompatibleRecordTypes, - DatasetUploadTypeConfigEntry, - NewUserDataset, - ResultUploadConfig, -} from '../Utils/types'; -import './UploadForm.scss'; -interface Props { - baseUrl: string; - datasetUploadType: DatasetUploadTypeConfigEntry; - projectId: string; - badUploadMessage: State['badUploadMessage']; - urlParams: Record; - strategyOptions: StrategySummary[]; - resultUploadConfig?: ResultUploadConfig; - clearBadUpload: () => void; - submitForm: (newUserDataset: FormSubmission, redirectTo?: string) => void; - supportedFileUploadTypes: string[]; - maxSizeBytes?: number; -} -type DataUploadSelection = - | { - type: 'file'; - file?: File; - } - | { - type: 'url'; - url?: string; - } - | { - type: 'result'; - stepId?: number; - compatibleRecordTypes?: CompatibleRecordTypes; - }; -type CompleteDataUploadSelection = Required; -export type FormValidation = InvalidForm | ValidForm; -export interface InvalidForm { - valid: false; - errors: string[]; -} -export interface ValidForm { - valid: true; - submission: FormSubmission; -} -export interface FormSubmission extends Omit { - dataUploadSelection: CompleteDataUploadSelection; -} -declare function UploadForm({ - badUploadMessage, - baseUrl, - datasetUploadType, - projectId, - urlParams, - strategyOptions, - resultUploadConfig, - clearBadUpload, - submitForm, - supportedFileUploadTypes, - maxSizeBytes, -}: Props): JSX.Element; -export default UploadForm; -//# sourceMappingURL=UploadForm.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/UploadForm.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/UploadForm.d.ts.map deleted file mode 100644 index 4ede45c9b4..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UploadForm.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UploadForm.d.ts","sourceRoot":"","sources":["../../src/lib/Components/UploadForm.tsx"],"names":[],"mappings":";AAqBA,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAE1E,OAAO,EAAE,KAAK,EAAE,MAAM,8CAA8C,CAAC;AACrE,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,cAAc,EACd,kBAAkB,EACnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,mBAAmB,CAAC;AAI3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,4BAA4B,CAAC,CAAC,CAAC,CAAC;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAC5C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,UAAU,EAAE,CAAC,cAAc,EAAE,cAAc,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1E,wBAAwB,EAAE,MAAM,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAID,KAAK,mBAAmB,GACpB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,GAC7B;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7B;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;CAC/C,CAAC;AAEN,KAAK,2BAA2B,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AASjE,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,SAAS,CAAC;AAErD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,IAAI,CAAC;IACZ,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC;IAC1E,mBAAmB,EAAE,2BAA2B,CAAC;CAClD;AAED,iBAAS,UAAU,CAAC,EAClB,gBAAgB,EAChB,OAAO,EACP,iBAAiB,EACjB,SAAS,EACT,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,wBAAwB,EACxB,YAAY,GACb,EAAE,KAAK,eAwWP;AA4FD,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/UploadForm.js b/packages/libs/user-datasets-legacy/lib/Components/UploadForm.js deleted file mode 100644 index 18f53acc9a..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UploadForm.js +++ /dev/null @@ -1,620 +0,0 @@ -var __rest = - (this && this.__rest) || - function (s, e) { - var t = {}; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === 'function') - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if ( - e.indexOf(p[i]) < 0 && - Object.prototype.propertyIsEnumerable.call(s, p[i]) - ) - t[p[i]] = s[p[i]]; - } - return t; - }; -import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime'; -import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import { keyBy } from 'lodash'; -import Icon from '@veupathdb/wdk-client/lib/Components/Icon/IconAlt'; -import { - TextBox, - TextArea, - FileInput, - RadioList, - SingleSelect, -} from '@veupathdb/wdk-client/lib/Components'; -import { makeClassNameHelper } from '@veupathdb/wdk-client/lib/Utils/ComponentUtils'; -import './UploadForm.scss'; -const cx = makeClassNameHelper('UploadForm'); -function UploadForm({ - badUploadMessage, - baseUrl, - datasetUploadType, - projectId, - urlParams, - strategyOptions, - resultUploadConfig, - clearBadUpload, - submitForm, - supportedFileUploadTypes, - maxSizeBytes, -}) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; - const strategyOptionsByStrategyId = useMemo( - () => keyBy(strategyOptions, (option) => option.strategyId), - [strategyOptions] - ); - const { useFixedUploadMethod: useFixedUploadMethodStr } = urlParams; - const useFixedUploadMethod = useMemo( - () => useFixedUploadMethodStr === 'true', - [useFixedUploadMethodStr] - ); - const displayUrlUploadMethod = - ((_a = datasetUploadType.formConfig.uploadMethodConfig.url) === null || - _a === void 0 - ? void 0 - : _a.offer) !== false; - const displayStrategyUploadMethod = - (_b = datasetUploadType.formConfig.uploadMethodConfig.result) === null || - _b === void 0 - ? void 0 - : _b.offerStrategyUpload; - const enableStrategyUploadMethod = - Boolean(displayStrategyUploadMethod) && strategyOptions.length > 0; - const [name, setName] = useState( - (_c = urlParams.datasetName) !== null && _c !== void 0 ? _c : '' - ); - const [summary, setSummary] = useState( - (_d = urlParams.datasetSummary) !== null && _d !== void 0 ? _d : '' - ); - const [description, setDescription] = useState( - (_e = urlParams.datasetDescription) !== null && _e !== void 0 ? _e : '' - ); - const [dataUploadMode, setDataUploadMode] = useState( - urlParams.datasetStepId - ? 'step' - : urlParams.datasetStrategyRootStepId && enableStrategyUploadMethod - ? 'strategy' - : urlParams.datasetUrl && displayUrlUploadMethod - ? 'url' - : 'file' - ); - const [file, setFile] = useState(); - const [url, setUrl] = useState( - (_f = urlParams.datasetUrl) !== null && _f !== void 0 ? _f : '' - ); - const initialStepId = useMemo(() => { - var _a, _b; - const parsedStepIdParam = Number(urlParams.datasetStepId); - if (isFinite(parsedStepIdParam)) { - return parsedStepIdParam; - } - const parsedStrategyIdParam = Number(urlParams.datasetStrategyId); - return !enableStrategyUploadMethod || !isFinite(parsedStrategyIdParam) - ? (_a = strategyOptions[0]) === null || _a === void 0 - ? void 0 - : _a.rootStepId - : (_b = strategyOptionsByStrategyId[parsedStrategyIdParam]) === null || - _b === void 0 - ? void 0 - : _b.rootStepId; - }, [ - urlParams.datasetStepId, - urlParams.datasetStrategyId, - strategyOptions, - strategyOptionsByStrategyId, - enableStrategyUploadMethod, - ]); - const [stepId, setStepId] = useState(initialStepId); - useEffect(() => { - setStepId(initialStepId); - }, [initialStepId]); - const [errorMessages, setErrorMessages] = useState([]); - const [submitting, setSubmitting] = useState(false); - const dataUploadSelection = useMemo(() => { - if (dataUploadMode === 'file') { - return { type: 'file', file }; - } - if (dataUploadMode === 'url') { - return { type: 'url', url }; - } - if (resultUploadConfig == null) { - throw new Error('This data set type does not support result uploads.'); - } - if (stepId == null) { - return { type: 'result' }; - } - return { - type: 'result', - stepId, - compatibleRecordTypes: resultUploadConfig.compatibleRecordTypes, - }; - }, [dataUploadMode, file, url, resultUploadConfig, stepId]); - const onSubmit = useCallback( - (event) => { - event.preventDefault(); - const formValidation = validateForm( - projectId, - datasetUploadType, - enableStrategyUploadMethod, - { - name, - summary, - description, - dataUploadSelection, - } - ); - if (!formValidation.valid) { - setErrorMessages(formValidation.errors); - } else { - setSubmitting(true); - submitForm(formValidation.submission, `${baseUrl}/recent`); - } - }, - [ - baseUrl, - projectId, - datasetUploadType, - enableStrategyUploadMethod, - name, - summary, - description, - dataUploadSelection, - submitForm, - ] - ); - useEffect(() => { - if (badUploadMessage != null) { - setErrorMessages([badUploadMessage.message]); - setSubmitting(false); - } - }, [badUploadMessage]); - useEffect(() => { - return () => { - clearBadUpload(); - }; - }, [clearBadUpload]); - const nameInputProps = - (_g = datasetUploadType.formConfig.name) === null || _g === void 0 - ? void 0 - : _g.inputProps; - const summaryInputProps = - (_h = datasetUploadType.formConfig.summary) === null || _h === void 0 - ? void 0 - : _h.inputProps; - const descriptionInputProps = - (_j = datasetUploadType.formConfig.description) === null || _j === void 0 - ? void 0 - : _j.inputProps; - const summaryRequired = - (_k = - summaryInputProps === null || summaryInputProps === void 0 - ? void 0 - : summaryInputProps.required) !== null && _k !== void 0 - ? _k - : true; - const descriptionRequired = - (_l = - descriptionInputProps === null || descriptionInputProps === void 0 - ? void 0 - : descriptionInputProps.required) !== null && _l !== void 0 - ? _l - : true; - const defaultFileInputField = _jsx(FileInput, { - accept: supportedFileUploadTypes - .map((fileUploadType) => `.${fileUploadType}`) - .join(','), - required: dataUploadMode === 'file', - disabled: dataUploadMode !== 'file' || useFixedUploadMethod, - maxSizeBytes: maxSizeBytes, - onChange: (file) => { - const fileWithSpacedRemovedFromName = - file && - new File( - [file], - file === null || file === void 0 - ? void 0 - : file.name.replace(/\s+/g, '_'), - file - ); - setFile( - fileWithSpacedRemovedFromName !== null && - fileWithSpacedRemovedFromName !== void 0 - ? fileWithSpacedRemovedFromName - : undefined - ); - }, - }); - const renderFileInput = - (_m = datasetUploadType.formConfig.uploadMethodConfig.file) === null || - _m === void 0 - ? void 0 - : _m.render; - const fileInputField = - renderFileInput == null - ? defaultFileInputField - : renderFileInput({ fieldNode: defaultFileInputField }); - const uploadMethodItems = [ - { - value: 'file', - disabled: useFixedUploadMethod, - display: _jsxs(React.Fragment, { - children: [ - _jsx( - FieldLabel, - Object.assign( - { htmlFor: 'data-set-file', required: dataUploadMode === 'file' }, - { children: 'Upload File' } - ) - ), - _jsx( - 'div', - Object.assign( - { - id: 'data-set-file', - className: cx( - '--UploadMethodField', - dataUploadMode !== 'file' && 'disabled' - ), - }, - { children: fileInputField } - ) - ), - ], - }), - }, - ] - .concat( - !displayUrlUploadMethod - ? [] - : [ - { - value: 'url', - disabled: useFixedUploadMethod, - display: _jsxs(React.Fragment, { - children: [ - _jsx( - FieldLabel, - Object.assign( - { - htmlFor: 'data-set-url', - required: dataUploadMode === 'url', - }, - { children: 'Upload URL' } - ) - ), - _jsx(TextBox, { - type: 'input', - className: cx( - '--UploadMethodField', - dataUploadMode !== 'url' && 'disabled' - ), - id: 'data-set-url', - placeholder: 'Address of a data file from the Web', - value: url, - required: dataUploadMode === 'url', - disabled: dataUploadMode !== 'url' || useFixedUploadMethod, - onChange: setUrl, - }), - ], - }), - }, - ] - ) - .concat( - !displayStrategyUploadMethod - ? [] - : [ - { - value: 'strategy', - disabled: !enableStrategyUploadMethod || useFixedUploadMethod, - display: _jsxs(React.Fragment, { - children: [ - _jsx( - FieldLabel, - Object.assign( - { - htmlFor: 'data-set-strategy', - required: dataUploadMode === 'strategy', - }, - { children: 'Upload Strategy' } - ) - ), - _jsx( - 'div', - Object.assign( - { - id: 'data-set-strategy', - className: cx( - '--UploadMethodField', - dataUploadMode !== 'strategy' && 'disabled' - ), - }, - { - children: _jsx(SingleSelect, { - value: `${stepId}`, - items: strategyOptions.map((option) => ({ - value: `${option.rootStepId}`, - display: `${option.name}${ - !option.isSaved ? '*' : '' - }`, - })), - required: dataUploadMode === 'strategy', - onChange: (value) => { - setStepId(Number(value)); - }, - }), - } - ) - ), - ], - }), - }, - ] - ); - return _jsxs( - 'form', - Object.assign( - { - className: cx(), - style: submitting ? { opacity: '0.5' } : {}, - onSubmit: onSubmit, - }, - { - children: [ - errorMessages.length > 0 && - _jsx(ErrorMessage, { errors: errorMessages }), - _jsxs('div', { - children: [ - _jsx('h2', { children: datasetUploadType.uploadTitle }), - _jsxs( - 'div', - Object.assign( - { className: 'formSection' }, - { - children: [ - _jsx( - FieldLabel, - Object.assign( - { required: true, htmlFor: 'data-set-name' }, - { children: 'Name' } - ) - ), - _jsx('br', {}), - _jsx( - TextBox, - Object.assign( - { - type: 'input', - id: 'data-set-name', - placeholder: 'name of the data set', - }, - nameInputProps, - { required: true, value: name, onChange: setName } - ) - ), - ], - } - ) - ), - _jsxs( - 'div', - Object.assign( - { className: 'formSection' }, - { - children: [ - _jsx( - FieldLabel, - Object.assign( - { - htmlFor: 'data-set-summary', - required: summaryRequired, - }, - { children: 'Summary' } - ) - ), - _jsx( - TextBox, - Object.assign( - { - type: 'input', - id: 'data-set-summary', - placeholder: - 'brief summary of the data set contents', - required: summaryRequired, - }, - summaryInputProps, - { value: summary, onChange: setSummary } - ) - ), - ], - } - ) - ), - _jsxs( - 'div', - Object.assign( - { className: 'formSection' }, - { - children: [ - _jsx( - FieldLabel, - Object.assign( - { - htmlFor: 'data-set-description', - required: descriptionRequired, - }, - { children: 'Description' } - ) - ), - _jsx( - TextArea, - Object.assign( - { - id: 'data-set-description', - placeholder: - 'brief description of the data set contents', - required: descriptionRequired, - }, - descriptionInputProps, - { value: description, onChange: setDescription } - ) - ), - ], - } - ) - ), - _jsx( - 'div', - Object.assign( - { className: 'formSection' }, - { - children: - uploadMethodItems.length === 1 - ? _jsx( - 'div', - Object.assign( - { className: cx('--UploadMethodSelector') }, - { - children: _jsx( - 'div', - Object.assign( - { className: cx('--FixedUploadItem') }, - { children: uploadMethodItems[0].display } - ) - ), - } - ) - ) - : _jsx(RadioList, { - name: 'data-set-radio', - className: cx('--UploadMethodSelector'), - value: dataUploadMode, - onChange: (value) => { - if ( - value !== 'url' && - value !== 'file' && - value !== 'strategy' - ) { - throw new Error( - `Unrecognized upload method '${value}' encountered.` - ); - } - setDataUploadMode(value); - }, - items: uploadMethodItems, - }), - } - ) - ), - ], - }), - _jsx( - 'button', - Object.assign( - { type: 'submit', className: 'btn', disabled: submitting }, - { children: 'Upload Data Set' } - ) - ), - (_p = - (_o = datasetUploadType.formConfig) === null || _o === void 0 - ? void 0 - : _o.renderInfo) === null || _p === void 0 - ? void 0 - : _p.call(_o), - ], - } - ) - ); -} -function FieldLabel(_a) { - var { children, required } = _a, - labelProps = __rest(_a, ['children', 'required']); - return _jsxs( - 'label', - Object.assign({}, labelProps, { - children: [children, required ? '*' : null], - }) - ); -} -function ErrorMessage({ errors }) { - return _jsxs( - 'div', - Object.assign( - { className: 'ui-state-error', style: { fontSize: 'large' } }, - { - children: [ - _jsxs('div', { - children: [ - _jsx(Icon, { fa: 'exclamation-triangle' }), - '\u00A0 Could not upload data set', - ], - }), - errors.map((error, ix) => - _jsx( - 'div', - Object.assign( - { className: 'ui-state-error-text' }, - { children: error } - ), - ix - ) - ), - ], - } - ) - ); -} -function validateForm( - projectId, - datasetUploadType, - enableResultUploadMethod, - formContent -) { - const { name, summary, description, dataUploadSelection } = formContent; - if (!isCompleteDataUploadSelection(dataUploadSelection)) { - return { - valid: false, - errors: !enableResultUploadMethod - ? ['Required: data file or URL'] - : ['Required: data file, URL, or strategy'], - }; - } - if ( - dataUploadSelection.type === 'url' && - !isValidUrl(dataUploadSelection.url) - ) { - return { - valid: false, - errors: ['The provided data URL does not seem valid'], - }; - } - return { - valid: true, - submission: { - name, - summary, - description, - datasetType: datasetUploadType.type, - projects: [projectId], - dataUploadSelection, - }, - }; -} -function isCompleteDataUploadSelection(dataUploadSelection) { - return Object.values(dataUploadSelection).every((value) => value != null); -} -// https://stackoverflow.com/a/43467144 -function isValidUrl(string) { - try { - new URL(string); - } catch (_) { - return false; - } - return true; -} -export default UploadForm; -//# sourceMappingURL=UploadForm.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/UploadForm.js.map b/packages/libs/user-datasets-legacy/lib/Components/UploadForm.js.map deleted file mode 100644 index 9e8be418c0..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UploadForm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UploadForm.js","sourceRoot":"","sources":["../../src/lib/Components/UploadForm.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EA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K,EAAE,IAAI;QACX,UAAU,EAAE;YACV,IAAI;YACJ,OAAO;YACP,WAAW;YACX,WAAW,EAAE,iBAAiB,CAAC,IAAI;YACnC,QAAQ,EAAE,CAAC,SAAS,CAAC;YACrB,mBAAmB;SACpB;KACF,CAAC;AACJ,CAAC;AAED,SAAS,6BAA6B,CACpC,mBAAwC;IAExC,OAAO,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC;AAC5E,CAAC;AAED,uCAAuC;AACvC,SAAS,UAAU,CAAC,MAAc;IAChC,IAAI;QACF,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;KACjB;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,KAAK,CAAC;KACd;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/UploadForm.scss b/packages/libs/user-datasets-legacy/lib/Components/UploadForm.scss deleted file mode 100644 index cfdd8f1b2c..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UploadForm.scss +++ /dev/null @@ -1,68 +0,0 @@ -.UploadForm { - h2 { - color: #222; - font-size: 1.5em; - font-weight: 500; - margin: 0; - padding: 22px 0 8px 0; - } - .formSection > label { - font-size: medium; - } - #data-set-name { - min-width: 300px; - } - #data-set-summary { - width: 100%; - } - #data-set-description { - width: 100%; - height: 8em; - } - #data-set-url { - width: 100%; - max-width: 51em; - } - .formInfo { - width: 80%; - text-align: justify; - } - .formSection { - margin: 1em 0; - } - select { - max-width: 450px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - & &--UploadMethodSelector { - margin-top: 2em; - margin-bottom: 3.5em; - - li > label { - display: grid; - grid-template-columns: auto 10em 1fr; - - label { - font-size: medium; - margin-left: 0.25em; - } - } - } - & &--UploadMethodSelector &--FixedUploadItem { - display: grid; - grid-template-columns: 10em 1fr; - - label { - font-size: medium; - margin-left: 0.25em; - } - } - & &--UploadMethodField { - &__disabled { - opacity: 0.3; - pointer-events: none; - } - } -} diff --git a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetHelp.d.ts b/packages/libs/user-datasets-legacy/lib/Components/UserDatasetHelp.d.ts deleted file mode 100644 index 38b8d259f4..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetHelp.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/// -interface Props { - hasDirectUpload: boolean; - projectName: string; - quotaSize: number; - workspaceTitle: string; -} -declare function UserDatasetHelp({ - hasDirectUpload, - projectName, - quotaSize, - workspaceTitle, -}: Props): JSX.Element; -export default UserDatasetHelp; -//# sourceMappingURL=UserDatasetHelp.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetHelp.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/UserDatasetHelp.d.ts.map deleted file mode 100644 index 6019c9b876..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetHelp.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetHelp.d.ts","sourceRoot":"","sources":["../../src/lib/Components/UserDatasetHelp.tsx"],"names":[],"mappings":";AAMA,UAAU,KAAK;IACb,eAAe,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,iBAAS,eAAe,CAAC,EACvB,eAAe,EACf,WAAW,EACX,SAAS,EACT,cAAc,GACf,EAAE,KAAK,eAqIP;AAED,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetHelp.js b/packages/libs/user-datasets-legacy/lib/Components/UserDatasetHelp.js deleted file mode 100644 index 5bfbdf5b8f..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetHelp.js +++ /dev/null @@ -1,288 +0,0 @@ -import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime'; -import { bytesToHuman } from '@veupathdb/wdk-client/lib/Utils/Converters'; -import { Link } from '@veupathdb/wdk-client/lib/Components'; -import tutStep2 from './images/tut-step-2.jpg'; -import tutStep3 from './images/tut-step-3.jpg'; -function UserDatasetHelp({ - hasDirectUpload, - projectName, - quotaSize, - workspaceTitle, -}) { - // FIXME: Perhaps this should be provided via static content? - return hasDirectUpload - ? _jsxs( - 'div', - Object.assign( - { className: 'UserDataset-Help' }, - { - children: [ - _jsxs('section', { - children: [ - _jsx('h2', { children: 'Preparing data for upload' }), - _jsx('h4', { - children: 'Processing amplicon sequencing reads ', - }), - 'Taxon counts can be obtained from metagenome sequences through commonly available tools. Three of the most common ones (', - _jsx( - 'a', - Object.assign( - { href: 'https://benjjneb.github.io/dada2' }, - { children: 'DADA2' } - ) - ), - ',', - ' ', - _jsx( - 'a', - Object.assign( - { href: 'www.qiime.org' }, - { children: 'QIIME' } - ) - ), - ', and', - ' ', - _jsx( - 'a', - Object.assign( - { href: 'www.mothur.org/wiki/Make.biom' }, - { children: 'Mothur' } - ) - ), - ") have been integrated into workflows, and are available as a free online service, through NIAID's ", - _jsx( - 'a', - Object.assign( - { href: 'https://nephele.niaid.nih.gov/' }, - { children: 'Nephele' } - ) - ), - ' project.', - _jsx('h4', { children: 'Formatting the input ' }), - 'You can upload any file that contains processed taxonomic reads in a valid BIOM format. See ', - _jsx( - 'a', - Object.assign( - { href: 'http://biom-format.org/' }, - { children: 'this page' } - ) - ), - ' ', - 'for examples. If your data is in a different format - for example TSV - you can use', - ' ', - _jsx( - 'a', - Object.assign( - { - href: 'http://biom-format.org/documentation/biom_conversion.html', - }, - { children: 'conversion tools' } - ) - ), - ' ', - 'from the Python package ', - _jsx('code', { children: 'biom-format' }), - '.', - _jsx('h4', { children: 'Sample Details' }), - 'Annotations for samples are not required, but they can be useful for subsetting and grouping samples.', - _jsx('br', {}), - _jsx('br', {}), - 'If possible, try to include rich sample details in your uploaded file, to obtain full benefits from our suite of visualisation and analysis tools.', - _jsx('br', {}), - _jsx('br', {}), - 'This', - ' ', - _jsx( - 'a', - Object.assign( - { - href: 'http://biom-format.org/documentation/adding_metadata.html', - }, - { children: 'documentation page' } - ) - ), - ' ', - 'shows how to add sample details to a BIOM file using a tool', - ' ', - _jsx('code', { children: 'biom-add-metadata' }), - '.', - ], - }), - _jsxs('section', { - children: [ - _jsx('h2', { children: 'Tips for analysis' }), - 'Queries for user data sets work like they do for MicrobiomeDB data sets, allowing you to either proceed with the whole data set for analysis, or selecting a subset based on sample details or by taxon abundance. You can access them from each data set page.', - _jsx('br', {}), - 'You can extend and modify those searches using the strategies panel on the results page. This allows comparing uploaded data sets with each other, or with public MicrobiomeDB data sets.', - _jsx('br', {}), - _jsx('br', {}), - 'All analyses and visualisations available for MicrobiomeDB data sets can also be used on the uploaded data set, for example:', - _jsx('br', {}), - _jsxs('ul', { - children: [ - _jsxs('li', { - children: [ - 'Box and Whisker plot showing most abundant taxa, split by sample groups', - ' ', - ], - }), - _jsxs('li', { - children: [ - 'Alpha diversity trends for samples annotated by continuous variables like patient height or age', - ' ', - ], - }), - _jsx('li', { - children: - 'Beta diversity plots annotated by sample groups', - }), - _jsxs('li', { - children: [ - ' ', - 'Report of differentially abundant samples between groups of samples', - ' ', - ], - }), - ], - }), - ], - }), - ], - } - ) - ) - : _jsx('div', { - children: _jsxs( - 'div', - Object.assign( - { className: 'row UserDataset-Help' }, - { - children: [ - _jsxs( - 'div', - Object.assign( - { className: 'box xs-12' }, - { - children: [ - _jsx('h2', { children: 'Introduction' }), - _jsx('iframe', { - title: 'Introduction to User Datasets', - src: 'https://www.youtube-nocookie.com/embed/igQZHjRBqV0', - frameBorder: '0', - allow: - 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture', - allowFullScreen: true, - width: '560', - height: '315', - }), - ], - } - ) - ), - _jsxs( - 'div', - Object.assign( - { className: 'box xs-12 md-6' }, - { - children: [ - _jsx('h2', { children: 'VEuPathDB Galaxy' }), - _jsx('img', { - alt: 'Screenshoot for step 2 of tutorial', - src: tutStep2, - }), - _jsxs('ul', { - children: [ - _jsxs('li', { - children: [ - 'Use the ', - _jsx('b', { - children: 'VEuPathDB Export Tools', - }), - ' on the left-side navigation, at ', - _jsx( - Link, - Object.assign( - { to: '/galaxy-orientation' }, - { children: 'VEuPathDB Galaxy' } - ) - ), - '.', - ], - }), - _jsxs('li', { - children: [ - 'Prepare your export data set by selecting the files (galaxy data sets) in your history.', - ' ', - ], - }), - _jsxs('li', { - children: [ - 'The data set name, summary and description can be edited later in the ', - _jsx('i', { children: workspaceTitle }), - ' page.', - ], - }), - _jsxs('li', { - children: [ - "When you're ready, ", - _jsx('code', { children: 'Execute' }), - ' the export. The process of exporting to VEuPathDB may take some time. Progress can be monitored from the right-side history panel in Galaxy.', - ], - }), - ], - }), - ], - } - ) - ), - _jsxs( - 'div', - Object.assign( - { className: 'box xs-12 md-6' }, - { - children: [ - _jsxs('h2', { children: [workspaceTitle, ' page'] }), - _jsx('img', { - alt: 'Screenshoot for step 3 of tutorial', - src: tutStep3, - }), - _jsxs('ul', { - children: [ - _jsxs('li', { - children: [ - 'You can now view, manage, share, and utilize your data set in', - ' ', - _jsx('b', { children: projectName }), - '.', - ], - }), - _jsxs('li', { - children: [ - workspaceTitle, - " you've created contribute to a per-user upload limit/quota of ", - _jsx('b', { - children: bytesToHuman(quotaSize), - }), - '.', - ], - }), - _jsxs('li', { - children: [ - ' ', - "Bigwig files can be sent to JBrowse in the data set's detail page. Click the data set name or status icon to see this page.", - ], - }), - ], - }), - ], - } - ) - ), - ], - } - ) - ), - }); -} -export default UserDatasetHelp; -//# sourceMappingURL=UserDatasetHelp.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetHelp.js.map b/packages/libs/user-datasets-legacy/lib/Components/UserDatasetHelp.js.map deleted file mode 100644 index ff8ca16c60..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetHelp.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetHelp.js","sourceRoot":"","sources":["../../src/lib/Components/UserDatasetHelp.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAE5D,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAS/C,SAAS,eAAe,CAAC,EACvB,eAAe,EACf,WAAW,EACX,SAAS,EACT,cAAc,GACR;IACN,6DAA6D;IAC7D,OAAO,eAAe,CAAC,CAAC,CAAC,CACvB,6BAAK,SAAS,EAAC,kBAAkB,iBAC/B,8BACE,qDAAkC,EAClC,iEAA8C,8HAG9C,0BAAG,IAAI,EAAC,kCAAkC,2BAAU,OAAE,GAAG,EACzD,0BAAG,IAAI,EAAC,eAAe,2BAAU,WAAM,GAAG,EAC1C,0BAAG,IAAI,EAAC,+BAA+B,4BAAW,yGAE1C,0BAAG,IAAI,EAAC,gCAAgC,6BAAY,eAC5D,iDAA8B,kGAEP,0BAAG,IAAI,EAAC,yBAAyB,+BAEpD,EAAC,GAAG,yFAEI,GAAG,EACf,0BAAG,IAAI,EAAC,2DAA2D,sCAE/D,EAAC,GAAG,8BACgB,yCAAwB,OAAC,0CAAuB,2GAGxE,cAAM,EACN,cAAM,wJAIN,cAAM,EACN,cAAM,UACD,GAAG,EACR,0BAAG,IAAI,EAAC,2DAA2D,wCAE/D,EAAC,GAAG,iEACoD,GAAG,EAC/D,+CAA8B,SACtB,EACV,8BACE,6CAA0B,qQAK1B,cAAM,+LAIN,cAAM,EACN,cAAM,kIAGN,cAAM,EACN,yBACE,oGAES,GAAG,IACP,EACL,4HAE6B,GAAG,IAC3B,EACL,2EAAwD,EACxD,yBACG,GAAG,yEACgE,GAAG,IACpE,IACF,IACG,KACN,CACP,CAAC,CAAC,CAAC,CACF,wBACE,6BAAK,SAAS,EAAC,sBAAsB,iBACnC,6BAAK,SAAS,EAAC,WAAW,iBACxB,wCAAqB,EACrB,iBACE,KAAK,EAAC,+BAA+B,EACrC,GAAG,EAAC,oDAAoD,EACxD,WAAW,EAAC,GAAG,EACf,KAAK,EAAC,0FAA0F,EAChG,eAAe,QACf,KAAK,EAAC,KAAK,EACX,MAAM,EAAC,KAAK,GACJ,KACN,EACN,6BAAK,SAAS,EAAC,gBAAgB,iBAC7B,4CAAyB,EACzB,cAAK,GAAG,EAAC,oCAAoC,EAAC,GAAG,EAAE,QAAQ,GAAI,EAC/D,yBACE,qCACU,iDAA6B,uCAClC,KAAC,IAAI,kBAAC,EAAE,EAAC,qBAAqB,sCAAwB,SACtD,EACL,oHAEyB,GAAG,IACvB,EACL,mGAEM,sBAAI,cAAc,GAAK,cACxB,EACL,gDACqB,qCAAoB,qJAGpC,IACF,KACD,EACN,6BAAK,SAAS,EAAC,gBAAgB,iBAC7B,yBAAK,cAAc,aAAW,EAC9B,cAAK,GAAG,EAAC,oCAAoC,EAAC,GAAG,EAAE,QAAQ,GAAI,EAC/D,yBACE,0FACgE,GAAG,EACjE,sBAAI,WAAW,GAAK,SACjB,EACL,yBACG,cAAc,qEACA,sBAAI,YAAY,CAAC,SAAS,CAAC,GAAK,SAC5C,EACL,yBACG,GAAG,mIAGD,IACF,KACD,KACF,GACF,CACP,CAAC;AACJ,CAAC;AAED,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetStatus.d.ts b/packages/libs/user-datasets-legacy/lib/Components/UserDatasetStatus.d.ts deleted file mode 100644 index bdd2e78aef..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetStatus.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// -import { UserDataset } from '../Utils/types'; -interface Props { - baseUrl: string; - userDataset: UserDataset; - projectId: string; - displayName: string; - linkToDataset: boolean; - useTooltip: boolean; -} -export default function UserDatasetStatus(props: Props): JSX.Element; -export {}; -//# sourceMappingURL=UserDatasetStatus.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetStatus.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/UserDatasetStatus.d.ts.map deleted file mode 100644 index 53bb76fd2d..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetStatus.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetStatus.d.ts","sourceRoot":"","sources":["../../src/lib/Components/UserDatasetStatus.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB;AAID,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,KAAK,eAiDrD"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetStatus.js b/packages/libs/user-datasets-legacy/lib/Components/UserDatasetStatus.js deleted file mode 100644 index 26d9d4233f..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetStatus.js +++ /dev/null @@ -1,68 +0,0 @@ -import { jsxs as _jsxs, jsx as _jsx } from 'react/jsx-runtime'; -import * as React from 'react'; -import { - IconAlt as Icon, - Link, - Tooltip, -} from '@veupathdb/wdk-client/lib/Components'; -const FOUR_HOURS = 4 * (1000 * 60 * 60); -export default function UserDatasetStatus(props) { - const { baseUrl, userDataset, projectId, displayName } = props; - const { isInstalled, isCompatible, projects, age } = userDataset; - const isInstallable = projects.includes(projectId); - const isPending = isCompatible && age < FOUR_HOURS; - const isError = isCompatible && !isPending; - const link = `${baseUrl}/${userDataset.id}`; - const content = !isInstallable - ? _jsxs('span', { - children: ['This data set is not compatible with ', displayName, '.'], - }) - : isInstalled - ? _jsxs('span', { - children: [ - 'This data set is installed and ready for use in ', - displayName, - '.', - ], - }) - : isPending - ? _jsxs('span', { - children: [ - 'This data set is currently being installed in ', - displayName, - '. Please check again soon.', - ], - }) - : isError - ? _jsxs('span', { - children: [ - 'This data set could not be installed in ', - displayName, - ' due to a server error.', - ], - }) - : _jsxs('span', { - children: [ - 'This data set was uploaded but could not be installed, as it is not compatible with resources in this release of ', - displayName, - '.', - ], - }); - const faIcon = !isInstallable - ? 'minus-circle' - : isInstalled - ? 'check-circle' - : isPending - ? 'clock-o' - : isError - ? 'minus-circle' - : 'exclamation-circle'; - const children = _jsx(Icon, { className: 'StatusIcon', fa: faIcon }); - const visibleContent = props.useTooltip - ? _jsx(Tooltip, Object.assign({ content: content }, { children: children })) - : _jsxs(React.Fragment, { children: [children, ' ', content] }); - return props.linkToDataset - ? _jsx(Link, Object.assign({ to: link }, { children: visibleContent })) - : visibleContent; -} -//# sourceMappingURL=UserDatasetStatus.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetStatus.js.map b/packages/libs/user-datasets-legacy/lib/Components/UserDatasetStatus.js.map deleted file mode 100644 index 70ca7f0a90..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetStatus.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetStatus.js","sourceRoot":"","sources":["../../src/lib/Components/UserDatasetStatus.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,OAAO,IAAI,IAAI,EACf,IAAI,EACJ,OAAO,GACR,MAAM,sCAAsC,CAAC;AAa9C,MAAM,UAAU,GAAG,CAAC,GAAG,CAAC,IAAI,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;AAExC,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAY;IACpD,MAA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AAQ,IAAW,CAChD,CAAC,CAAC,CAAC,CACF,MAAC,KAAK,CAAC,QAAQ,eACZ,QAAQ,OAAG,OAAO,IACJ,CAClB,CAAC;IACF,OAAO,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAC3B,KAAC,IAAI,kBAAC,EAAE,EAAE,IAAI,gBAAG,cAAc,IAAQ,CACxC,CAAC,CAAC,CAAC,CACF,cAAc,CACf,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetUtils.d.ts b/packages/libs/user-datasets-legacy/lib/Components/UserDatasetUtils.d.ts deleted file mode 100644 index 3be170b633..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetUtils.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export function makeClassifier( - ...classNames: any[] -): (substyle?: null) => string; -export function normalizePercentage(value: any): number; -export function textCell( - prop: any, - transform: any -): ({ row }: { row: any }) => JSX.Element | null; -export const quotaSize: 10737418240; -//# sourceMappingURL=UserDatasetUtils.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetUtils.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/UserDatasetUtils.d.ts.map deleted file mode 100644 index f829396d78..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetUtils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetUtils.d.ts","sourceRoot":"","sources":["../../src/lib/Components/UserDatasetUtils.jsx"],"names":[],"mappings":"AAAA,kFAKC;AAID,wDAEC;AAED;;yBAIC;AAVD,oCAAqC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetUtils.js b/packages/libs/user-datasets-legacy/lib/Components/UserDatasetUtils.js deleted file mode 100644 index a0a6b5b523..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetUtils.js +++ /dev/null @@ -1,18 +0,0 @@ -import { jsx as _jsx } from 'react/jsx-runtime'; -export function makeClassifier(...classNames) { - return (substyle = null) => - classNames - .map((className) => `${className}${substyle ? '-' + substyle : ''}`) - .join(' '); -} -export const quotaSize = 10737418240; // 10 G -export function normalizePercentage(value) { - return Math.floor(value * 100) / 100; -} -export function textCell(prop, transform) { - const getValue = - typeof transform === 'function' ? transform : (value) => value; - return ({ row }) => - prop in row ? _jsx('span', { children: getValue(row[prop]) }) : null; -} -//# sourceMappingURL=UserDatasetUtils.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetUtils.js.map b/packages/libs/user-datasets-legacy/lib/Components/UserDatasetUtils.js.map deleted file mode 100644 index cba85d04c3..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetUtils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetUtils.js","sourceRoot":"","sources":["../../src/lib/Components/UserDatasetUtils.jsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,cAAc,CAAC,GAAG,UAAU;IAC1C,OAAO,CAAC,QAAQ,GAAG,IAAI,EAAE,EAAE,CACzB,UAAU;SACP,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,GAAG,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;SACnE,IAAI,CAAC,GAAG,CAAC,CAAC;AACjB,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,OAAO;AAE7C,MAAM,UAAU,mBAAmB,CAAC,KAAK;IACvC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAI,EAAE,SAAS;IACtC,MAAM,QAAQ,GACZ,OAAO,SAAS,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC;IACjE,OAAO,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,yBAAO,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAChF,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/UserDatasets.scss b/packages/libs/user-datasets-legacy/lib/Components/UserDatasets.scss deleted file mode 100644 index 34d8f0f42f..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UserDatasets.scss +++ /dev/null @@ -1,101 +0,0 @@ -@import '@veupathdb/wdk-client/lib/Core/Style/palette'; - -.UserDatasetList, -.UserDatasetDetail, -.UserDataset-SharingModal { - .success { - color: $green; - } - .danger { - color: $red; - } - .faded { - opacity: 0.5; - } - - input, - input[type='text'], - textarea { - background-color: none; - } - - section { - width: 100%; - margin-bottom: 30px; - } - - .MesaComponent { - .DataTable { - button { - .wdk-Icon { - font-size: 1em; - } - } - } - td, - th { - vertical-align: middle; - } - } - - .ActionToolbar-Children { - display: flex; - flex: 1 0 auto; - align-items: center; - } - .StatusIcon { - font-size: 20px; - &.fa-clock-o { - color: $blue; - } - &.fa-minus-circle { - color: #bbb; - } - &.fa-times-circle { - color: $red; - } - &.fa-check-circle { - color: $green; - } - &.fa-exclamation-circle { - color: $gold; - } - } -} - -.UserDataset-NoDatasets { - font-size: 1.4em; - text-align: center; - line-height: 1.5; - margin: 2em; - - &__lead { - font-size: 1.2em; - font-weight: 500; - } - ul { - list-style: none; - } -} - -.UserDataset-Help { - font-size: 1.2em; - /* text-align: center;*/ - - ul { - display: block; - max-width: 90%; - text-align: left; - } - .box { - padding: 10px; - } - iframe { - margin-bottom: 20px; - } - img { - display: block; - width: 100%; - margin-bottom: 20px; - } -} diff --git a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetsWorkspace.d.ts b/packages/libs/user-datasets-legacy/lib/Components/UserDatasetsWorkspace.d.ts deleted file mode 100644 index 7932b8d088..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetsWorkspace.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { ReactNode } from 'react'; -import { DatasetUploadPageConfig, DataNoun } from '../Utils/types'; -interface Props { - baseUrl: string; - helpRoute: string; - uploadPageConfig: DatasetUploadPageConfig; - urlParams: Record; - workspaceTitle: string; - helpTabContents?: ReactNode; - dataNoun: DataNoun; -} -declare function UserDatasetsWorkspace(props: Props): JSX.Element; -export default UserDatasetsWorkspace; -//# sourceMappingURL=UserDatasetsWorkspace.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetsWorkspace.d.ts.map b/packages/libs/user-datasets-legacy/lib/Components/UserDatasetsWorkspace.d.ts.map deleted file mode 100644 index 72d1fca1fe..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetsWorkspace.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetsWorkspace.d.ts","sourceRoot":"","sources":["../../src/lib/Components/UserDatasetsWorkspace.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWlC,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAEnE,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,iBAAS,qBAAqB,CAAC,KAAK,EAAE,KAAK,eA0H1C;AAED,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetsWorkspace.js b/packages/libs/user-datasets-legacy/lib/Components/UserDatasetsWorkspace.js deleted file mode 100644 index 6224f8ce10..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetsWorkspace.js +++ /dev/null @@ -1,146 +0,0 @@ -import { - jsx as _jsx, - jsxs as _jsxs, - Fragment as _Fragment, -} from 'react/jsx-runtime'; -import { Switch, Redirect } from 'react-router-dom'; -import WorkspaceNavigation from '@veupathdb/wdk-client/lib/Components/Workspace/WorkspaceNavigation'; -import WdkRoute from '@veupathdb/wdk-client/lib/Core/WdkRoute'; -import UserDatasetAllUploadsController from '../Controllers/UserDatasetAllUploadsController'; -import UserDatasetListController from '../Controllers/UserDatasetListController'; -import UserDatasetNewUploadController from '../Controllers/UserDatasetNewUploadController'; -function UserDatasetsWorkspace(props) { - const { - baseUrl, - helpRoute, - uploadPageConfig, - workspaceTitle, - helpTabContents, - dataNoun, - } = props; - return _jsxs('div', { - children: [ - _jsx(WorkspaceNavigation, { - heading: workspaceTitle, - routeBase: baseUrl, - items: [ - [ - { - display: 'All', - route: '', - }, - ], - uploadPageConfig.hasDirectUpload - ? [ - { - display: 'New upload', - route: '/new', - }, - { - display: 'Recent uploads', - route: '/recent', - }, - ] - : [], - helpTabContents != null - ? [ - { - display: 'Help', - route: '/help', - }, - ] - : [], - ].flat(), - }), - _jsxs(Switch, { - children: [ - _jsx(WdkRoute, { - exact: true, - requiresLogin: true, - path: baseUrl, - component: () => - _jsx(UserDatasetListController, { - baseUrl: baseUrl, - hasDirectUpload: uploadPageConfig.hasDirectUpload, - helpRoute: helpRoute, - workspaceTitle: workspaceTitle, - dataNoun: dataNoun, - }), - disclaimerProps: { toDoWhatMessage: 'To view your datasets' }, - }), - uploadPageConfig.hasDirectUpload && - _jsx(WdkRoute, { - requiresLogin: true, - exact: true, - path: `${baseUrl}/new`, - component: () => - _jsx(UserDatasetNewUploadController, { - baseUrl: baseUrl, - // TODO When more than one type is available, offer a data type selector - datasetUploadType: - uploadPageConfig.uploadTypeConfig[ - uploadPageConfig.availableUploadTypes[0] - ], - urlParams: props.urlParams, - }), - disclaimerProps: { - toDoWhatMessage: `To upload your dataset`, - extraParagraphContent: - Object.entries(props.urlParams).length === 0 - ? undefined - : _jsxs('div', { - children: [ - 'Afterwards, you will be taken back to an upload page with these details:', - _jsx( - 'ul', - Object.assign( - { style: { listStyle: 'none' } }, - { - children: Object.entries(props.urlParams).map( - (e) => - _jsxs( - 'li', - { - children: [ - e[0].charAt(0).toUpperCase() + - e[0].slice(1).replace('_', ' ') + - ': ', - _jsx('code', { children: e[1] }), - ], - }, - e.join(' ') - ) - ), - } - ) - ), - ], - }), - }, - }), - uploadPageConfig.hasDirectUpload && - _jsx(WdkRoute, { - requiresLogin: true, - exact: true, - path: `${baseUrl}/recent`, - component: () => - _jsx(UserDatasetAllUploadsController, { baseUrl: baseUrl }), - disclaimerProps: { - toDoWhatMessage: 'To view your recent uploads', - }, - }), - helpTabContents != null && - _jsx(WdkRoute, { - requiresLogin: false, - exact: true, - path: `${baseUrl}/help`, - component: () => _jsx(_Fragment, { children: helpTabContents }), - }), - _jsx(Redirect, { to: baseUrl }), - ], - }), - ], - }); -} -export default UserDatasetsWorkspace; -//# sourceMappingURL=UserDatasetsWorkspace.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetsWorkspace.js.map b/packages/libs/user-datasets-legacy/lib/Components/UserDatasetsWorkspace.js.map deleted file mode 100644 index 1830eb8b50..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Components/UserDatasetsWorkspace.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetsWorkspace.js","sourceRoot":"","sources":["../../src/lib/Components/UserDatasetsWorkspace.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,mBAAmB,MAAM,oEAAoE,CAAC;AACrG,OAAO,QAAQ,MAAM,yCAAyC,CAAC;AAE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CAC1B,KAAC,QAAQ,IACP,aAAa,EAAE,KAAK,EACpB,KAAK,QACL,IAAI,EAAE,GAAG,OAAO,OAAO,EACvB,SAAS,EAAE,GAAG,EAAE,CAAC,4BAAG,eAAe,GAAI,GACvC,CACH,EACD,KAAC,QAAQ,IAAC,EAAE,EAAE,OAAO,GAAI,IAClB,IACL,CACP,CAAC;AACJ,CAAC;AAED,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Components/images/tut-step-1.jpg b/packages/libs/user-datasets-legacy/lib/Components/images/tut-step-1.jpg deleted file mode 100644 index 2e6a3df905..0000000000 Binary files a/packages/libs/user-datasets-legacy/lib/Components/images/tut-step-1.jpg and /dev/null differ diff --git a/packages/libs/user-datasets-legacy/lib/Components/images/tut-step-2.jpg b/packages/libs/user-datasets-legacy/lib/Components/images/tut-step-2.jpg deleted file mode 100644 index 80949cd45b..0000000000 Binary files a/packages/libs/user-datasets-legacy/lib/Components/images/tut-step-2.jpg and /dev/null differ diff --git a/packages/libs/user-datasets-legacy/lib/Components/images/tut-step-3.jpg b/packages/libs/user-datasets-legacy/lib/Components/images/tut-step-3.jpg deleted file mode 100644 index 3791fdab15..0000000000 Binary files a/packages/libs/user-datasets-legacy/lib/Components/images/tut-step-3.jpg and /dev/null differ diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetAllUploadsController.d.ts b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetAllUploadsController.d.ts deleted file mode 100644 index 0060da8e6f..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetAllUploadsController.d.ts +++ /dev/null @@ -1,257 +0,0 @@ -/// -import PageController from '@veupathdb/wdk-client/lib/Core/Controllers/PageController'; -import { StateSlice } from '../StoreModules/types'; -declare const actionCreators: { - showLoginForm: { - ( - destination?: string | undefined - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-session/show-login-form', - { - destination: string | undefined; - } - >; - readonly type: 'user-session/show-login-form'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-session/show-login-form', - { - destination: string | undefined; - } - > - >; - requestUploadMessages: { - (): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/load-upload-messages', - void - >; - readonly type: 'user-dataset-upload/load-upload-messages'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/load-upload-messages', - void - > - >; - cancelCurrentUpload: { - ( - id: string - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/cancel-upload', - { - id: string; - } - >; - readonly type: 'user-dataset-upload/cancel-upload'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/cancel-upload', - { - id: string; - } - > - >; - clearMessages: { - ( - ids: string[] - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/clear-messages', - { - ids: string[]; - } - >; - readonly type: 'user-dataset-upload/clear-messages'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/clear-messages', - { - ids: string[]; - } - > - >; -}; -type StateProps = StateSlice['userDatasetUpload'] & - Pick; -type DispatchProps = typeof actionCreators; -type OwnProps = { - baseUrl: string; -}; -type Props = StateProps & { - actions: DispatchProps; -} & OwnProps; -declare class UserDatasetAllUploadsController extends PageController { - loadData(prevProps?: Props): void; - getActionCreators(): { - showLoginForm: { - ( - destination?: string | undefined - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-session/show-login-form', - { - destination: string | undefined; - } - >; - readonly type: 'user-session/show-login-form'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-session/show-login-form', - { - destination: string | undefined; - } - > - >; - requestUploadMessages: { - (): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/load-upload-messages', - void - >; - readonly type: 'user-dataset-upload/load-upload-messages'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/load-upload-messages', - void - > - >; - cancelCurrentUpload: { - ( - id: string - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/cancel-upload', - { - id: string; - } - >; - readonly type: 'user-dataset-upload/cancel-upload'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/cancel-upload', - { - id: string; - } - > - >; - clearMessages: { - ( - ids: string[] - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/clear-messages', - { - ids: string[]; - } - >; - readonly type: 'user-dataset-upload/clear-messages'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/clear-messages', - { - ids: string[]; - } - > - >; - }; - isRenderDataLoaded(): boolean; - getTitle(): string; - renderView(): JSX.Element; -} -declare const _default: import('react-redux').ConnectedComponent< - typeof UserDatasetAllUploadsController, - import('react-redux').Omit< - import('react').ClassAttributes & - import('../StoreModules/UserDatasetUploadStoreModule').State & - Pick< - Partial<{ - config: import('@veupathdb/wdk-client/lib/Service/ServiceBase').ServiceConfig; - ontology: import('@veupathdb/wdk-client/lib/Utils/CategoryUtils').CategoryOntology; - questions: import('@veupathdb/wdk-client/lib/Utils/WdkModel').Question[]; - recordClasses: import('@veupathdb/wdk-client/lib/Utils/WdkModel').RecordClass[]; - user: import('@veupathdb/wdk-client/lib/Utils/WdkUser').User; - preferences: import('@veupathdb/wdk-client/lib/Utils/WdkUser').UserPreferences; - siteConfig?: any; - location: import('history').Location; - loginForm: { - isOpen: boolean; - message?: string | undefined; - destination?: string | undefined; - }; - }>, - 'user' - > & { - actions: { - showLoginForm: { - ( - destination?: string | undefined - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-session/show-login-form', - { - destination: string | undefined; - } - >; - readonly type: 'user-session/show-login-form'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-session/show-login-form', - { - destination: string | undefined; - } - > - >; - requestUploadMessages: { - (): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/load-upload-messages', - void - >; - readonly type: 'user-dataset-upload/load-upload-messages'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/load-upload-messages', - void - > - >; - cancelCurrentUpload: { - ( - id: string - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/cancel-upload', - { - id: string; - } - >; - readonly type: 'user-dataset-upload/cancel-upload'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/cancel-upload', - { - id: string; - } - > - >; - clearMessages: { - ( - ids: string[] - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/clear-messages', - { - ids: string[]; - } - >; - readonly type: 'user-dataset-upload/clear-messages'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/clear-messages', - { - ids: string[]; - } - > - >; - }; - } & OwnProps, - | 'badUploadMessage' - | 'baseUrl' - | 'user' - | 'uploads' - | 'badAllUploadsActionMessage' - | 'actions' - > & - OwnProps ->; -export default _default; -//# sourceMappingURL=UserDatasetAllUploadsController.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetAllUploadsController.d.ts.map b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetAllUploadsController.d.ts.map deleted file mode 100644 index e246244e32..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetAllUploadsController.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetAllUploadsController.d.ts","sourceRoot":"","sources":["../../src/lib/Controllers/UserDatasetAllUploadsController.tsx"],"names":[],"mappings":";AAEA,OAAO,cAAc,MAAM,2DAA2D,CAAC;AAWvF,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKnB,CAAC;AAEF,KAAK,UAAU,GAAG,UAAU,CAAC,mBAAmB,CAAC,GAC/C,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC;AAEzC,KAAK,aAAa,GAAG,OAAO,cAAc,CAAC;AAC3C,KAAK,QAAQ,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AACpC,KAAK,KAAK,GAAG,UAAU,GAAG;IAAE,OAAO,EAAE,aAAa,CAAA;CAAE,GAAG,QAAQ,CAAC;AAEhE,cAAM,+BAAgC,SAAQ,cAAc,CAAC,KAAK,CAAC;IACjE,QAAQ,CAAC,SAAS,CAAC,EAAE,KAAK;IAO1B,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIjB,kBAAkB;IAQlB,QAAQ;IAIR,UAAU;CAYX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBD,wBAAwD"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetAllUploadsController.js b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetAllUploadsController.js deleted file mode 100644 index a5435cbf83..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetAllUploadsController.js +++ /dev/null @@ -1,74 +0,0 @@ -import { jsx as _jsx } from 'react/jsx-runtime'; -import { connect } from 'react-redux'; -import PageController from '@veupathdb/wdk-client/lib/Core/Controllers/PageController'; -import { showLoginForm } from '@veupathdb/wdk-client/lib/Actions/UserSessionActions'; -import { - requestUploadMessages, - cancelCurrentUpload, - clearMessages, -} from '../Actions/UserDatasetUploadActions'; -import AllUploads from '../Components/AllUploads'; -const actionCreators = { - showLoginForm, - requestUploadMessages, - cancelCurrentUpload, - clearMessages, -}; -class UserDatasetAllUploadsController extends PageController { - loadData(prevProps) { - if (prevProps != null) { - return; - } - this.props.actions.requestUploadMessages(); - } - getActionCreators() { - return actionCreators; - } - isRenderDataLoaded() { - return ( - this.props.user != null && - (this.props.uploads != null || - this.props.badAllUploadsActionMessage != null) - ); - } - getTitle() { - return 'Recent Uploads'; - } - renderView() { - var _a; - return _jsx( - 'div', - Object.assign( - { className: 'stack' }, - { - children: _jsx(AllUploads, { - baseUrl: this.props.baseUrl, - errorMessage: - (_a = this.props.badAllUploadsActionMessage) === null || - _a === void 0 - ? void 0 - : _a.message, - uploadList: this.props.uploads, - actions: this.props.actions, - }), - } - ) - ); - } -} -const enhance = connect( - (state) => ({ - badAllUploadsActionMessage: - state.userDatasetUpload.badAllUploadsActionMessage, - uploads: state.userDatasetUpload.uploads, - user: state.globalData.user, - }), - actionCreators, - (stateProps, dispatchProps, ownProps) => - Object.assign( - Object.assign(Object.assign({}, stateProps), { actions: dispatchProps }), - ownProps - ) -); -export default enhance(UserDatasetAllUploadsController); -//# sourceMappingURL=UserDatasetAllUploadsController.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetAllUploadsController.js.map b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetAllUploadsController.js.map deleted file mode 100644 index 901ea67e3d..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetAllUploadsController.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetAllUploadsController.js","sourceRoot":"","sources":["../../src/lib/Controllers/UserDatasetAllUploadsController.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,cAAc,MAAM,2DAA2D,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AAErF,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,GACd,MAAM,qCAAqC,CAAC;AAE7C,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAIlD,MAAM,cAAc,GAAG;IACrB,aAAa;IACb,qBAAqB;IACrB,mBAAmB;IACnB,aAAa;CACd,CAAC;AASF,MAAM,+BAAgC,SAAQ,cAAqB;IACjE,QAAQ,CAAC,SAAiB;QACxB,IAAI,SAAS,IAAI,IAAI,EAAE;YACrB,OAAO;SACR;QACD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAC7C,CAAC;IAED,iBAAiB;QACf,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,kBAAkB;QAChB,OAAO,CACL,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI;YACvB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,IAAI;gBACzB,IAAI,CAAC,KAAK,CAAC,0BAA0B,IAAI,IAAI,CAAC,CACjD,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,UAAU;;QACR,OAAO,CACL,4BAAK,SAAS,EAAC,OAAO,gBACpB,KAAC,UAAU,IACT,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAC3B,YAAY,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,0BAA0B,0CAAE,OAAO,EAC5D,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAC9B,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAC3B,IACE,CACP,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,GAAG,OAAO,CACrB,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACV,0BAA0B,EACxB,KAAK,CAAC,iBAAiB,CAAC,0BAA0B;IACpD,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,OAAO;IACxC,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,IAAI;CAC5B,CAAC,EACF,cAAc,EACd,CAAC,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,CAAC,+CACpC,UAAU,KACb,OAAO,EAAE,aAAa,KACnB,QAAQ,EACX,CACH,CAAC;AAEF,eAAe,OAAO,CAAC,+BAA+B,CAAC,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetDetailController.d.ts b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetDetailController.d.ts deleted file mode 100644 index 32a4417e9d..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetDetailController.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { ComponentType } from 'react'; -import PageController from '@veupathdb/wdk-client/lib/Core/Controllers/PageController'; -import { Question } from '@veupathdb/wdk-client/lib/Utils/WdkModel'; -import { - loadUserDatasetDetail, - removeUserDataset, - shareUserDatasets, - unshareUserDatasets, - updateUserDatasetDetail, -} from '../Actions/UserDatasetsActions'; -import UserDatasetDetail from '../Components/Detail/UserDatasetDetail'; -import { StateSlice } from '../StoreModules/types'; -import { DataNoun } from '../Utils/types'; -declare const ActionCreators: { - showLoginForm: { - ( - destination?: string | undefined - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-session/show-login-form', - { - destination: string | undefined; - } - >; - readonly type: 'user-session/show-login-form'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-session/show-login-form', - { - destination: string | undefined; - } - > - >; - loadUserDatasetDetail: typeof loadUserDatasetDetail; - updateUserDatasetDetail: typeof updateUserDatasetDetail; - removeUserDataset: typeof removeUserDataset; - shareUserDatasets: typeof shareUserDatasets; - unshareUserDatasets: typeof unshareUserDatasets; -}; -export type UserDatasetDetailProps = any; -type StateProps = StateSlice['userDatasetDetail'] & StateSlice['globalData']; -type DispatchProps = typeof ActionCreators; -type OwnProps = { - baseUrl: string; - detailsPageTitle: string; - workspaceTitle: string; - id: string; - detailComponentsByTypeName?: Record< - string, - ComponentType - >; - dataNoun: DataNoun; -}; -type MergedProps = { - ownProps: OwnProps; - dispatchProps: DispatchProps; - stateProps: StateProps; -}; -/** - * View Controller for a userDataset record. - * - * Note that we are accessing the userDataset from an object keyed by the - * userDataset's id. This avoids race conditions that arise when ajax requests - * complete in a different order than they were invoked. - */ -declare class UserDatasetDetailController extends PageController { - getQuestionUrl: (question: Question) => string; - getTitle(): string; - getActionCreators(): { - showLoginForm: { - ( - destination?: string | undefined - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-session/show-login-form', - { - destination: string | undefined; - } - >; - readonly type: 'user-session/show-login-form'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-session/show-login-form', - { - destination: string | undefined; - } - > - >; - loadUserDatasetDetail: typeof loadUserDatasetDetail; - updateUserDatasetDetail: typeof updateUserDatasetDetail; - removeUserDataset: typeof removeUserDataset; - shareUserDatasets: typeof shareUserDatasets; - unshareUserDatasets: typeof unshareUserDatasets; - }; - loadData(prevProps?: this['props']): void; - isRenderDataLoadError(): boolean; - isRenderDataLoaded(): boolean; - getDetailView(type: any): ComponentType | typeof UserDatasetDetail; - renderGuestView(): JSX.Element; - renderView(): JSX.Element; -} -declare const _default: import('react-redux').ConnectedComponent< - typeof UserDatasetDetailController, - import('react-redux').Omit< - import('react').ClassAttributes & MergedProps, - 'ownProps' | 'dispatchProps' | 'stateProps' - > & - OwnProps ->; -export default _default; -//# sourceMappingURL=UserDatasetDetailController.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetDetailController.d.ts.map b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetDetailController.d.ts.map deleted file mode 100644 index 8d850f1560..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetDetailController.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetDetailController.d.ts","sourceRoot":"","sources":["../../src/lib/Controllers/UserDatasetDetailController.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAOtC,OAAO,cAAc,MAAM,2DAA2D,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAEpE,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,gCAAgC,CAAC;AAKxC,OAAO,iBAAiB,MAAM,wCAAwC,CAAC;AAIvE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,QAAA,MAAM,cAAc;;;;;;;;;;;;;;CAOnB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAEzC,KAAK,UAAU,GAAG,UAAU,CAAC,mBAAmB,CAAC,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;AAC7E,KAAK,aAAa,GAAG,OAAO,cAAc,CAAC;AAC3C,KAAK,QAAQ,GAAG;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,0BAA0B,CAAC,EAAE,MAAM,CACjC,MAAM,EACN,aAAa,CAAC,sBAAsB,CAAC,CACtC,CAAC;IACF,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AACF,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,aAAa,EAAE,aAAa,CAAC;IAC7B,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF;;;;;;GAMG;AACH,cAAM,2BAA4B,SAAQ,cAAc,CAAC,WAAW,CAAC;IACnE,cAAc,aAAc,QAAQ,KAAG,MAAM,CAE3C;IAEF,QAAQ;IAYR,iBAAiB;;;;;;;;;;;;;;;IAIjB,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC;IAUlC,qBAAqB;IAOrB,kBAAkB;IAUlB,aAAa,CAAC,IAAI,EAAE,GAAG;IAoBvB,eAAe;IAgBf,UAAU;CAsDX;;AAqBD,wBAAoD"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetDetailController.js b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetDetailController.js deleted file mode 100644 index f090bd6ce8..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetDetailController.js +++ /dev/null @@ -1,185 +0,0 @@ -import { jsxs as _jsxs, jsx as _jsx } from 'react/jsx-runtime'; -import { connect } from 'react-redux'; -import { keyBy } from 'lodash'; -import { showLoginForm } from '@veupathdb/wdk-client/lib/Actions/UserSessionActions'; -import PageController from '@veupathdb/wdk-client/lib/Core/Controllers/PageController'; -import { - loadUserDatasetDetail, - removeUserDataset, - shareUserDatasets, - unshareUserDatasets, - updateUserDatasetDetail, -} from '../Actions/UserDatasetsActions'; -import BigwigDatasetDetail from '../Components/Detail/BigwigDatasetDetail'; -import BiomDatasetDetail from '../Components/Detail/BiomDatasetDetail'; -import RnaSeqDatasetDetail from '../Components/Detail/RnaSeqDatasetDetail'; -import UserDatasetDetail from '../Components/Detail/UserDatasetDetail'; -import EmptyState from '../Components/EmptyState'; -import { quotaSize } from '../Components/UserDatasetUtils'; -const ActionCreators = { - showLoginForm, - loadUserDatasetDetail, - updateUserDatasetDetail, - removeUserDataset, - shareUserDatasets, - unshareUserDatasets, -}; -/** - * View Controller for a userDataset record. - * - * Note that we are accessing the userDataset from an object keyed by the - * userDataset's id. This avoids race conditions that arise when ajax requests - * complete in a different order than they were invoked. - */ -class UserDatasetDetailController extends PageController { - constructor() { - super(...arguments); - this.getQuestionUrl = (question) => { - return `#${question.urlSegment}`; - }; - } - getTitle() { - const entry = - this.props.stateProps.userDatasetsById[this.props.ownProps.id]; - if (entry && entry.resource) { - return `${this.props.ownProps.detailsPageTitle} ${entry.resource.meta.name}`; - } - if (entry && !entry.resource) { - return `${this.props.ownProps.detailsPageTitle} not found`; - } - return `${this.props.ownProps.detailsPageTitle} ...`; - } - getActionCreators() { - return ActionCreators; - } - loadData(prevProps) { - const idChanged = - prevProps == null || prevProps.ownProps.id !== this.props.ownProps.id; - if (idChanged) { - this.props.dispatchProps.loadUserDatasetDetail( - Number(this.props.ownProps.id) - ); - } - } - isRenderDataLoadError() { - return ( - this.props.stateProps.loadError != null && - this.props.stateProps.loadError.status >= 500 - ); - } - isRenderDataLoaded() { - const { id } = this.props.ownProps; - const { userDatasetsById, user, questions, config } = this.props.stateProps; - const entry = userDatasetsById[id]; - if (user && user.isGuest) return true; - return entry && !entry.isLoading && user && questions && config - ? true - : false; - } - getDetailView(type) { - var _a; - const name = type && typeof type === 'object' ? type.name : null; - if ( - ((_a = this.props.ownProps.detailComponentsByTypeName) === null || - _a === void 0 - ? void 0 - : _a[name]) != null - ) { - return this.props.ownProps.detailComponentsByTypeName[name]; - } - switch (name) { - case 'Bigwigs': - case 'BigwigFiles': - return BigwigDatasetDetail; - case 'RnaSeq': - return RnaSeqDatasetDetail; - case 'BIOM': - return BiomDatasetDetail; - default: - return UserDatasetDetail; - } - } - renderGuestView() { - return _jsx(EmptyState, { - message: _jsxs( - 'button', - Object.assign( - { - type: 'button', - className: 'btn', - onClick: () => this.props.dispatchProps.showLoginForm(), - }, - { - children: [ - 'Please log in to access ', - this.props.ownProps.workspaceTitle, - '.', - ], - } - ) - ), - }); - } - renderView() { - const { baseUrl, detailsPageTitle, id, workspaceTitle, dataNoun } = - this.props.ownProps; - const { - updateUserDatasetDetail, - shareUserDatasets, - removeUserDataset, - unshareUserDatasets, - } = this.props.dispatchProps; - const { - userDatasetsById, - user, - updateError, - questions, - config, - userDatasetUpdating, - } = this.props.stateProps; - const entry = userDatasetsById[id]; - const isOwner = !!( - user && - entry.resource && - entry.resource.ownerUserId === user.id - ); - const props = { - baseUrl, - user, - config, - isOwner, - location: window.location, - updateError, - removeUserDataset, - quotaSize, - userDatasetUpdating, - shareUserDatasets, - unshareUserDatasets, - updateUserDatasetDetail, - userDataset: entry.resource, - getQuestionUrl: this.getQuestionUrl, - questionMap: keyBy(questions, 'fullName'), - workspaceTitle, - detailsPageTitle, - dataNoun, - }; - const DetailView = this.getDetailView( - typeof entry.resource === 'object' ? entry.resource.type : null - ); - return user && user.isGuest - ? this.renderGuestView() - : _jsx(DetailView, Object.assign({}, props)); - } -} -const enhance = connect( - (state) => - Object.assign(Object.assign({}, state.globalData), state.userDatasetDetail), - ActionCreators, - (stateProps, dispatchProps, ownProps) => ({ - stateProps, - dispatchProps, - ownProps, - }) -); -export default enhance(UserDatasetDetailController); -//# sourceMappingURL=UserDatasetDetailController.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetDetailController.js.map b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetDetailController.js.map deleted file mode 100644 index a9268a1fa6..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetDetailController.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetDetailController.js","sourceRoot":"","sources":["../../src/lib/Controllers/UserDatasetDetailController.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,OAAO,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AACrF,OAAO,cAAc,MAAM,2DAA2D,CAAC;AAGvF,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AAExC,OAAO,mBAAmB,MAAM,0CAA0C,CAAC;AAC3E,OAAO,iBAAiB,MAAM,wCAAwC,CAAC;AACvE,OAAO,mBAAmB,MAAM,0CAA0C,CAAC;AAC3E,OAAO,iBAAiB,MAAM,wCAAwC,CAAC;AACvE,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAK3D,MAAM,cAAc,GAAG;IACrB,aAAa;IACb,qBAAqB;IACrB,uBAAuB;IACvB,iBAAiB;IACjB,iBAAiB;IACjB,mBAAmB;CACpB,CAAC;AAuBF;;;;;;GAMG;AACH,MAAM,2BAA4B,SAAQ,cAA2B;IAArE;;QACE,mBAAc,GAAG,CAAC,QAAkB,EAAU,EAAE;YAC9C,OAAO,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC;QACnC,CAAC,CAAC;IAuIJ,CAAC;IArIC,QAAQ;QACN,MAAM,KAAK,GACT,IAAI,CAAC,KAAK,C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CAAC;CACF;AAED,MAAM,OAAO,GAAG,OAAO,CAOrB,CAAC,KAAK,EAAE,EAAE,CAAC,iCACN,KAAK,CAAC,UAAU,GAChB,KAAK,CAAC,iBAAiB,EAC1B,EACF,cAAc,EACd,CAAC,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;IACxC,UAAU;IACV,aAAa;IACb,QAAQ;CACT,CAAC,CACH,CAAC;AAEF,eAAe,OAAO,CAAC,2BAA2B,CAAC,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetListController.d.ts b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetListController.d.ts deleted file mode 100644 index be906bc0f4..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetListController.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -/// -import { RouteComponentProps } from 'react-router-dom'; -import PageController from '@veupathdb/wdk-client/lib/Core/Controllers/PageController'; -import { - loadUserDatasetList, - removeUserDataset, - shareUserDatasets, - unshareUserDatasets, - updateProjectFilter, - updateUserDatasetDetail, -} from '../Actions/UserDatasetsActions'; -import { StateSlice } from '../StoreModules/types'; -import { DataNoun } from '../Utils/types'; -import '../Components/UserDatasets.scss'; -declare const ActionCreators: { - showLoginForm: { - ( - destination?: string | undefined - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-session/show-login-form', - { - destination: string | undefined; - } - >; - readonly type: 'user-session/show-login-form'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-session/show-login-form', - { - destination: string | undefined; - } - > - >; - loadUserDatasetList: typeof loadUserDatasetList; - updateUserDatasetDetail: typeof updateUserDatasetDetail; - removeUserDataset: typeof removeUserDataset; - shareUserDatasets: typeof shareUserDatasets; - unshareUserDatasets: typeof unshareUserDatasets; - updateProjectFilter: typeof updateProjectFilter; - requestUploadMessages: { - (): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/load-upload-messages', - void - >; - readonly type: 'user-dataset-upload/load-upload-messages'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/load-upload-messages', - void - > - >; -}; -type StateProps = Pick< - StateSlice, - 'userDatasetList' | 'userDatasetUpload' | 'globalData' ->; -type DispatchProps = typeof ActionCreators; -interface OwnProps extends RouteComponentProps<{}> { - baseUrl: string; - hasDirectUpload: boolean; - helpRoute: string; - workspaceTitle: string; - dataNoun: DataNoun; -} -type Props = { - ownProps: OwnProps; - dispatchProps: DispatchProps; - stateProps: StateProps; -}; -declare class UserDatasetListController extends PageController { - constructor(props: Props); - getTitle(): string; - getActionCreators(): { - showLoginForm: { - ( - destination?: string | undefined - ): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-session/show-login-form', - { - destination: string | undefined; - } - >; - readonly type: 'user-session/show-login-form'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-session/show-login-form', - { - destination: string | undefined; - } - > - >; - loadUserDatasetList: typeof loadUserDatasetList; - updateUserDatasetDetail: typeof updateUserDatasetDetail; - removeUserDataset: typeof removeUserDataset; - shareUserDatasets: typeof shareUserDatasets; - unshareUserDatasets: typeof unshareUserDatasets; - updateProjectFilter: typeof updateProjectFilter; - requestUploadMessages: { - (): import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/load-upload-messages', - void - >; - readonly type: 'user-dataset-upload/load-upload-messages'; - } & import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').ActionTypeGuardContainer< - import('@veupathdb/wdk-client/lib/Utils/ActionCreatorUtils').Action< - 'user-dataset-upload/load-upload-messages', - void - > - >; - }; - needsUploadMessages(): boolean; - loadData(prevProps?: Props): void; - isRenderDataLoaded(): boolean; - isRenderDataLoadError(): boolean; - renderView(): JSX.Element | null; -} -declare const _default: import('react').ComponentClass< - Pick< - import('react-redux').Omit< - import('react').ClassAttributes & Props, - 'ownProps' | 'dispatchProps' | 'stateProps' - > & - OwnProps, - | 'baseUrl' - | 'hasDirectUpload' - | 'helpRoute' - | 'workspaceTitle' - | 'dataNoun' - | keyof import('react').ClassAttributes - >, - any -> & - import('react-router').WithRouterStatics< - import('react-redux').ConnectedComponent< - typeof UserDatasetListController, - import('react-redux').Omit< - import('react').ClassAttributes & Props, - 'ownProps' | 'dispatchProps' | 'stateProps' - > & - OwnProps - > - >; -export default _default; -//# sourceMappingURL=UserDatasetListController.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetListController.d.ts.map b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetListController.d.ts.map deleted file mode 100644 index faa7da31d6..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetListController.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetListController.d.ts","sourceRoot":"","sources":["../../src/lib/Controllers/UserDatasetListController.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,mBAAmB,EAAc,MAAM,kBAAkB,CAAC;AAGnE,OAAO,cAAc,MAAM,2DAA2D,CAAC;AAEvF,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,gCAAgC,CAAC;AAOxC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAe,MAAM,gBAAgB,CAAC;AAEvD,OAAO,iCAAiC,CAAC;AAEzC,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;CASnB,CAAC;AAEF,KAAK,UAAU,GAAG,IAAI,CACpB,UAAU,EACV,iBAAiB,GAAG,mBAAmB,GAAG,YAAY,CACvD,CAAC;AACF,KAAK,aAAa,GAAG,OAAO,cAAc,CAAC;AAC3C,UAAU,QAAS,SAAQ,mBAAmB,CAAC,EAAE,CAAC;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AACD,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,QAAQ,CAAC;IACnB,aAAa,EAAE,aAAa,CAAC;IAC7B,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,cAAM,yBAA0B,SAAQ,cAAc,CAAC,KAAK,CAAC;gBAC/C,KAAK,EAAE,KAAK;IAIxB,QAAQ;IAIR,iBAAiB;;;;;;;;;;;;;;;;;;;;IAGjB,mBAAmB;IAanB,QAAQ,CAAC,SAAS,CAAC,EAAE,KAAK;IAiB1B,kBAAkB;IAUlB,qBAAqB;IAIrB,UAAU;CAsEX;;AAgBD,wBAA8D"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetListController.js b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetListController.js deleted file mode 100644 index 79be347449..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetListController.js +++ /dev/null @@ -1,161 +0,0 @@ -import { jsx as _jsx } from 'react/jsx-runtime'; -import { connect } from 'react-redux'; -import { withRouter } from 'react-router-dom'; -import { showLoginForm } from '@veupathdb/wdk-client/lib/Actions/UserSessionActions'; -import PageController from '@veupathdb/wdk-client/lib/Core/Controllers/PageController'; -import { - loadUserDatasetList, - removeUserDataset, - shareUserDatasets, - unshareUserDatasets, - updateProjectFilter, - updateUserDatasetDetail, -} from '../Actions/UserDatasetsActions'; -import { requestUploadMessages } from '../Actions/UserDatasetUploadActions'; -import UserDatasetList from '../Components/List/UserDatasetList'; -import NoDatasetsMessage from '../Components/NoDatasetsMessage'; -import { quotaSize } from '../Components/UserDatasetUtils'; -import '../Components/UserDatasets.scss'; -const ActionCreators = { - showLoginForm, - loadUserDatasetList, - updateUserDatasetDetail, - removeUserDataset, - shareUserDatasets, - unshareUserDatasets, - updateProjectFilter, - requestUploadMessages, -}; -class UserDatasetListController extends PageController { - constructor(props) { - super(props); - this.needsUploadMessages = this.needsUploadMessages.bind(this); - } - getTitle() { - return this.props.ownProps.workspaceTitle; - } - getActionCreators() { - return ActionCreators; - } - needsUploadMessages() { - const { config } = this.props.stateProps.globalData; - const { hasDirectUpload } = this.props.ownProps; - if (config == null) { - return true; - } - const { uploads, badAllUploadsActionMessage } = - this.props.stateProps.userDatasetUpload; - return ( - hasDirectUpload && uploads == null && badAllUploadsActionMessage == null - ); - } - loadData(prevProps) { - if (prevProps == null) { - this.props.dispatchProps.loadUserDatasetList(); - return; - } - const { config } = this.props.stateProps.globalData; - if ( - config != null && - prevProps.stateProps.userDatasetList.status !== - this.props.stateProps.userDatasetList.status && - this.needsUploadMessages() - ) { - this.props.dispatchProps.requestUploadMessages(); - } - } - isRenderDataLoaded() { - return ( - this.props.stateProps.userDatasetList.status !== 'not-requested' && - this.props.stateProps.userDatasetList.status !== 'loading' && - this.props.stateProps.globalData.config != null && - this.props.stateProps.globalData.user != null && - !this.needsUploadMessages() - ); - } - isRenderDataLoadError() { - return this.props.stateProps.userDatasetList.status === 'error'; - } - renderView() { - const { config, user } = this.props.stateProps.globalData; - if (user == null || config == null) return this.renderDataLoading(); - if (this.props.stateProps.userDatasetList.status !== 'complete') - return null; - const { projectId, displayName: projectName } = config; - const { baseUrl, hasDirectUpload, helpRoute, location, dataNoun } = - this.props.ownProps; - const { - userDatasetList: { userDatasets, userDatasetsById, filterByProject }, - userDatasetUpload: { uploads }, - } = this.props.stateProps; - const numOngoingUploads = - uploads != null ? uploads.filter((upload) => upload.isOngoing).length : 0; - const { - shareUserDatasets, - unshareUserDatasets, - removeUserDataset, - updateUserDatasetDetail, - updateProjectFilter, - } = this.props.dispatchProps; - const listProps = { - baseUrl, - user, - location, - dataNoun, - projectId, - projectName, - numOngoingUploads, - quotaSize, - userDatasets: userDatasets.map((id) => userDatasetsById[id].resource), - filterByProject, - shareUserDatasets, - unshareUserDatasets, - removeUserDataset, - updateUserDatasetDetail, - updateProjectFilter, - }; - const noDatasetsForThisProject = - userDatasets - .map((id) => userDatasetsById[id].resource.projects) - .flat() - .indexOf(projectId) === -1; - return _jsx( - 'div', - Object.assign( - { className: 'UserDatasetList-Controller' }, - { - children: _jsx( - 'div', - Object.assign( - { className: 'UserDatasetList-Content' }, - { - children: noDatasetsForThisProject - ? _jsx(NoDatasetsMessage, { - baseUrl: baseUrl, - hasDirectUpload: hasDirectUpload, - helpRoute: helpRoute, - }) - : _jsx(UserDatasetList, Object.assign({}, listProps)), - } - ) - ), - } - ) - ); - } -} -const enhance = connect( - (state) => ({ - globalData: state.globalData, - userDatasetList: state.userDatasetList, - userDatasetUpload: state.userDatasetUpload, - }), - ActionCreators, - (stateProps, dispatchProps, ownProps) => ({ - stateProps, - dispatchProps, - ownProps, - }) -); -export default withRouter(enhance(UserDatasetListController)); -//# sourceMappingURL=UserDatasetListController.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetListController.js.map b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetListController.js.map deleted file mode 100644 index 0409769d5e..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetListController.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetListController.js","sourceRoot":"","sources":["../../src/lib/Controllers/UserDatasetListController.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAuB,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AACrF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AC,QAAQ,CAAC;aACnD,IAAI,EAAE;aACN,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QAE/B,OAAO,CACL,4BAAK,SAAS,EAAC,4BAA4B,gBACzC,4BAAK,SAAS,EAAC,yBAAyB,gBACrC,wBAAwB,CAAC,CAAC,CAAC,CAC1B,KAAC,iBAAiB,IAChB,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,GACpB,CACH,CAAC,CAAC,CAAC,CACF,KAAC,eAAe,oBAAK,SAAS,EAAI,CACnC,IACG,IACF,CACP,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,GAAG,OAAO,CACrB,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACV,UAAU,EAAE,KAAK,CAAC,UAAU;IAC5B,eAAe,EAAE,KAAK,CAAC,eAAe;IACtC,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;CAC3C,CAAC,EACF,cAAc,EACd,CAAC,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;IACxC,UAAU;IACV,aAAa;IACb,QAAQ;CACT,CAAC,CACH,CAAC;AAEF,eAAe,UAAU,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetNewUploadController.d.ts b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetNewUploadController.d.ts deleted file mode 100644 index bb41a42048..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetNewUploadController.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/// -import { DatasetUploadTypeConfigEntry } from '../Utils/types'; -interface Props { - baseUrl: string; - datasetUploadType: DatasetUploadTypeConfigEntry; - urlParams: Record; -} -export default function UserDatasetUploadController({ - baseUrl, - datasetUploadType, - urlParams, -}: Props): JSX.Element; -export {}; -//# sourceMappingURL=UserDatasetNewUploadController.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetNewUploadController.d.ts.map b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetNewUploadController.d.ts.map deleted file mode 100644 index 0a4168b77d..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetNewUploadController.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetNewUploadController.d.ts","sourceRoot":"","sources":["../../src/lib/Controllers/UserDatasetNewUploadController.tsx"],"names":[],"mappings":";AAoBA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAE9D,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,4BAA4B,CAAC,CAAC,CAAC,CAAC;IACnD,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,2BAA2B,CAAC,EAClD,OAAO,EACP,iBAAiB,EACjB,SAAS,GACV,EAAE,KAAK,eA+FP"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetNewUploadController.js b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetNewUploadController.js deleted file mode 100644 index 698a59f4d9..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetNewUploadController.js +++ /dev/null @@ -1,147 +0,0 @@ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator['throw'](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -import { jsx as _jsx } from 'react/jsx-runtime'; -import { useCallback } from 'react'; -import { useDispatch, useSelector } from 'react-redux'; -import { Loading } from '@veupathdb/wdk-client/lib/Components'; -import { useWdkService } from '@veupathdb/wdk-client/lib/Hooks/WdkServiceHook'; -import { useSetDocumentTitle } from '@veupathdb/wdk-client/lib/Utils/ComponentUtils'; -import { - clearBadUpload, - submitUploadForm, -} from '../Actions/UserDatasetUploadActions'; -import UploadForm from '../Components/UploadForm'; -import { assertIsUserDatasetUploadCompatibleWdkService } from '../Service/UserDatasetUploadWrappers'; -export default function UserDatasetUploadController({ - baseUrl, - datasetUploadType, - urlParams, -}) { - var _a, _b; - useSetDocumentTitle(datasetUploadType.uploadTitle); - const projectId = useWdkService( - (wdkService) => wdkService.getConfig().then((config) => config.projectId), - [] - ); - const supportedFileUploadTypes = useWdkService( - (wdkService) => - __awaiter(this, void 0, void 0, function* () { - assertIsUserDatasetUploadCompatibleWdkService(wdkService); - if (projectId == null) { - return undefined; - } - return wdkService.getSupportedFileUploadTypes( - projectId, - datasetUploadType.type - ); - }), - [projectId, datasetUploadType.type] - ); - const strategyOptions = useWdkService( - (wdkService) => - __awaiter(this, void 0, void 0, function* () { - var _c; - if ( - !((_c = datasetUploadType.formConfig.uploadMethodConfig.result) === - null || _c === void 0 - ? void 0 - : _c.offerStrategyUpload) - ) { - return []; - } - const strategies = yield wdkService.getStrategies(); - const compatibleRecordTypeNames = new Set( - Object.keys( - datasetUploadType.formConfig.uploadMethodConfig.result - .compatibleRecordTypes - ) - ); - return strategies.filter( - (strategy) => - strategy.recordClassName != null && - compatibleRecordTypeNames.has(strategy.recordClassName) - ); - }), - [ - (_a = datasetUploadType.formConfig.uploadMethodConfig.result) === null || - _a === void 0 - ? void 0 - : _a.offerStrategyUpload, - ] - ); - const badUploadMessage = useSelector( - (stateSlice) => stateSlice.userDatasetUpload.badUploadMessage - ); - const dispatch = useDispatch(); - const clearBadUploadMessage = useCallback(() => { - dispatch(clearBadUpload); - }, [dispatch]); - const submitForm = useCallback( - (formSubmission, redirectTo) => { - dispatch(submitUploadForm(formSubmission, redirectTo)); - }, - [dispatch] - ); - return projectId == null || - supportedFileUploadTypes == null || - strategyOptions == null - ? _jsx(Loading, {}) - : _jsx( - 'div', - Object.assign( - { className: 'stack' }, - { - children: _jsx(UploadForm, { - baseUrl: baseUrl, - datasetUploadType: datasetUploadType, - projectId: projectId, - badUploadMessage: badUploadMessage, - clearBadUpload: clearBadUploadMessage, - submitForm: submitForm, - urlParams: urlParams, - strategyOptions: strategyOptions, - resultUploadConfig: - datasetUploadType.formConfig.uploadMethodConfig.result, - supportedFileUploadTypes: supportedFileUploadTypes, - maxSizeBytes: - (_b = datasetUploadType.formConfig.uploadMethodConfig.file) === - null || _b === void 0 - ? void 0 - : _b.maxSizeBytes, - }), - } - ) - ); -} -//# sourceMappingURL=UserDatasetNewUploadController.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetNewUploadController.js.map b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetNewUploadController.js.map deleted file mode 100644 index 209e64125b..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetNewUploadController.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetNewUploadController.js","sourceRoot":"","sources":["../../src/lib/Controllers/UserDatasetNewUploadController.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAGrF,OAAO,EACL,cAAc,EACd,gBAAgB,GACjB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,UAA8B,MA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AC,IAAI,0CAAE,YAAY,GAEpE,IACE,CACP,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetRouter.d.ts b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetRouter.d.ts deleted file mode 100644 index 98f9a27bff..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetRouter.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { ComponentType, ReactNode } from 'react'; -import { DatasetUploadTypeConfig, DataNoun } from '../Utils/types'; -import { UserDatasetDetailProps } from './UserDatasetDetailController'; -interface Props { - availableUploadTypes?: T1[]; - detailsPageTitle: string; - helpRoute: string; - uploadTypeConfig: DatasetUploadTypeConfig; - workspaceTitle: string; - helpTabContents?: ReactNode; - detailComponentsByTypeName?: Record< - string, - ComponentType - >; - dataNoun: DataNoun; -} -export declare function UserDatasetRouter< - T1 extends string, - T2 extends string ->({ - availableUploadTypes, - detailsPageTitle, - helpRoute, - uploadTypeConfig, - workspaceTitle, - helpTabContents, - detailComponentsByTypeName, - dataNoun, -}: Props): JSX.Element; -export {}; -//# sourceMappingURL=UserDatasetRouter.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetRouter.d.ts.map b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetRouter.d.ts.map deleted file mode 100644 index bec9398430..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetRouter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetRouter.d.ts","sourceRoot":"","sources":["../../src/lib/Controllers/UserDatasetRouter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAS1D,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAEnE,OAAoC,EAClC,sBAAsB,EACvB,MAAM,+BAA+B,CAAC;AAEvC,UAAU,KAAK,CAAC,EAAE,SAAS,MAAM,GAAG,MAAM,EAAE,EAAE,SAAS,MAAM,GAAG,MAAM;IACpE,oBAAoB,CAAC,EAAE,EAAE,EAAE,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,uBAAuB,CAAC,EAAE,CAAC,CAAC;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,0BAA0B,CAAC,EAAE,MAAM,CACjC,MAAM,EACN,aAAa,CAAC,sBAAsB,CAAC,CACtC,CAAC;IACF,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,EAAE,SAAS,MAAM,EAAE,EACtE,oBAAoB,EACpB,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,0BAA0B,EAC1B,QAAQ,GACT,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,eAwDf"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetRouter.js b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetRouter.js deleted file mode 100644 index 0399e41d63..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetRouter.js +++ /dev/null @@ -1,69 +0,0 @@ -import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime'; -import { useMemo } from 'react'; -import { Switch, useRouteMatch } from 'react-router-dom'; -import WdkRoute from '@veupathdb/wdk-client/lib/Core/WdkRoute'; -import UserDatasetsWorkspace from '../Components/UserDatasetsWorkspace'; -import { makeDatasetUploadPageConfig } from '../Utils/upload-config'; -import UserDatasetDetailController from './UserDatasetDetailController'; -export function UserDatasetRouter({ - availableUploadTypes, - detailsPageTitle, - helpRoute, - uploadTypeConfig, - workspaceTitle, - helpTabContents, - detailComponentsByTypeName, - dataNoun, -}) { - const { path, url } = useRouteMatch(); - const uploadPageConfig = useMemo( - () => makeDatasetUploadPageConfig(availableUploadTypes, uploadTypeConfig), - [availableUploadTypes, uploadTypeConfig] - ); - return _jsxs(Switch, { - children: [ - _jsx(WdkRoute, { - path: `${path}/:id(\\d+)`, - requiresLogin: true, - component: (props) => { - return _jsx( - UserDatasetDetailController, - Object.assign( - { - baseUrl: url, - detailsPageTitle: detailsPageTitle, - workspaceTitle: workspaceTitle, - detailComponentsByTypeName: detailComponentsByTypeName, - dataNoun: dataNoun, - }, - props.match.params - ) - ); - }, - }), - _jsx(WdkRoute, { - path: path, - exact: false, - requiresLogin: false, - component: function UserDatasetsWorkspaceRoute(props) { - const urlParams = useMemo(() => { - const searchParamEntries = new URLSearchParams( - props.location.search - ).entries(); - return Object.fromEntries(searchParamEntries); - }, [props.location.search]); - return _jsx(UserDatasetsWorkspace, { - baseUrl: url, - helpRoute: helpRoute, - uploadPageConfig: uploadPageConfig, - urlParams: urlParams, - workspaceTitle: workspaceTitle, - helpTabContents: helpTabContents, - dataNoun: dataNoun, - }); - }, - }), - ], - }); -} -//# sourceMappingURL=UserDatasetRouter.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetRouter.js.map b/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetRouter.js.map deleted file mode 100644 index 035cb57b69..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Controllers/UserDatasetRouter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetRouter.js","sourceRoot":"","sources":["../../src/lib/Controllers/UserDatasetRouter.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA4B,OAAO,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAuB,MAAM,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE9E,OAAO,QAAQ,MAAM,yCAAyC,CAAC;AAE/D,OAAO,qBAAqB,MAAM,qCAAqC,CAAC;AAExE,OAAO,EAAE,2BAA2B,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AC;oBAE5B,OAAO,CACL,KAAC,qBAAqB,IACpB,OAAO,EAAE,GAAG,EACZ,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;gBACJ,CAAC,GACD,IACK,CACV,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Hooks/project-filter.d.ts b/packages/libs/user-datasets-legacy/lib/Hooks/project-filter.d.ts deleted file mode 100644 index dea2d4c18b..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Hooks/project-filter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/// -export declare function useProjectFilter(): readonly [ - boolean | undefined, - import('react').Dispatch> -]; -//# sourceMappingURL=project-filter.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Hooks/project-filter.d.ts.map b/packages/libs/user-datasets-legacy/lib/Hooks/project-filter.d.ts.map deleted file mode 100644 index 69cf46d5eb..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Hooks/project-filter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"project-filter.d.ts","sourceRoot":"","sources":["../../src/lib/Hooks/project-filter.ts"],"names":[],"mappings":";AAOA,wBAAgB,gBAAgB,kHAmC/B"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Hooks/project-filter.js b/packages/libs/user-datasets-legacy/lib/Hooks/project-filter.js deleted file mode 100644 index 5360ae0bf7..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Hooks/project-filter.js +++ /dev/null @@ -1,71 +0,0 @@ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator['throw'](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -import { useState } from 'react'; -import { useWdkEffect } from '@veupathdb/wdk-client/lib/Service/WdkService'; -import { Task } from '@veupathdb/wdk-client/lib/Utils/Task'; -import { FILTER_BY_PROJECT_PREF } from '../Utils/project-filter'; -export function useProjectFilter() { - const [projectFilter, setProjectFilter] = useState(undefined); - useWdkEffect( - (wdkService) => - Task.fromPromise(() => - __awaiter(this, void 0, void 0, function* () { - try { - const currentUserPreferences = - yield wdkService.getCurrentUserPreferences(); - return ( - currentUserPreferences.global[FILTER_BY_PROJECT_PREF] !== 'false' - ); - } catch (_a) { - return false; - } - }) - ).run(setProjectFilter), - [] - ); - useWdkEffect( - (wdkService) => { - if (projectFilter != null) { - wdkService.patchSingleUserPreference( - 'global', - FILTER_BY_PROJECT_PREF, - String(projectFilter) - ); - } - }, - [projectFilter] - ); - return [projectFilter, setProjectFilter]; -} -//# sourceMappingURL=project-filter.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Hooks/project-filter.js.map b/packages/libs/user-datasets-legacy/lib/Hooks/project-filter.js.map deleted file mode 100644 index bfbbffd020..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Hooks/project-filter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"project-filter.js","sourceRoot":"","sources":["../../src/lib/Hooks/project-filter.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAE5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,MAAM,UAAU,gBAAgB;IAC9B,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GACrC,QAAQ,CAAsB,SAAS,CAAC,CAAC;IAE3C,YAAY,CACV,CAAC,UAAU,EAAE,EAAE,CACb,IAAI,CAAC,WAAW,CAAC,GAAS,EAAE;QAC1B,IAAI;YACF,MAAM,sBAAsB,GAC1B,MAAM,UAAU,CAAC,yBAAyB,EAAE,CAAC;YAE/C,OAAO,CACL,sBAAsB,CAAC,MAAM,CAAC,sBAAsB,CAAC,KAAK,OAAO,CAClE,CAAC;SACH;QAAC,WAAM;YACN,OAAO,KAAK,CAAC;SACd;IACH,CAAC,CAAA,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAC1B,EAAE,CACH,CAAC;IAEF,YAAY,CACV,CAAC,UAAU,EAAE,EAAE;QACb,IAAI,aAAa,IAAI,IAAI,EAAE;YACzB,UAAU,CAAC,yBAAyB,CAClC,QAAQ,EACR,sBAAsB,EACtB,MAAM,CAAC,aAAa,CAAC,CACtB,CAAC;SACH;IACH,CAAC,EACD,CAAC,aAAa,CAAC,CAChB,CAAC;IAEF,OAAO,CAAC,aAAa,EAAE,gBAAgB,CAAU,CAAC;AACpD,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/README.adoc b/packages/libs/user-datasets-legacy/lib/README.adoc deleted file mode 100644 index 6c0ed6ad62..0000000000 --- a/packages/libs/user-datasets-legacy/lib/README.adoc +++ /dev/null @@ -1 +0,0 @@ -Your package-specific code goes here. By default, code in this directory will be accessible in the top-level `lib` directory when you publish to npm. diff --git a/packages/libs/user-datasets-legacy/lib/Service/UserDatasetUploadWrappers.d.ts b/packages/libs/user-datasets-legacy/lib/Service/UserDatasetUploadWrappers.d.ts deleted file mode 100644 index 6dadba44e5..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Service/UserDatasetUploadWrappers.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { WdkService } from '@veupathdb/wdk-client/lib/Core'; -import { NewUserDataset, UserDatasetUpload } from '../Utils/types'; -export interface ServiceConfig { - datasetImportUrl: string; - fullWdkServiceUrl: string; -} -export type UserDatasetUploadCompatibleWdkService = WdkService & - { - [Key in keyof UserDatasetUploadServiceWrappers]: ReturnType< - UserDatasetUploadServiceWrappers[Key] - >; - }; -type UserDatasetUploadServiceWrappers = ReturnType< - typeof makeUserDatasetUploadServiceWrappers ->; -export declare const makeUserDatasetUploadServiceWrappers: ({ - datasetImportUrl, - fullWdkServiceUrl, -}: ServiceConfig) => { - datasetImportUrl: (wdkService: WdkService) => string; - addDataset: ( - wdkService: WdkService - ) => (newUserDataset: NewUserDataset) => Promise; - listStatusDetails: () => () => Promise; - cancelOngoingUpload: () => (jobId: string) => Promise; - clearMessages: () => (jobIds: string[]) => Promise; - getSupportedDatasetTypes: () => (projectId: string) => Promise; - getSupportedFileUploadTypes: () => ( - projectId: string, - datasetType: string - ) => Promise; -}; -export declare function isUserDatasetUploadCompatibleWdkService( - wdkService: WdkService -): wdkService is UserDatasetUploadCompatibleWdkService; -export declare function assertIsUserDatasetUploadCompatibleWdkService( - wdkService: WdkService -): asserts wdkService is UserDatasetUploadCompatibleWdkService; -export declare const MISCONFIGURED_USER_DATASET_UPLOAD_SERVICE_ERROR_MESSAGE = - 'In order to use this feature, a UserDatasetUploadCompatibleWdkService must be configured.'; -export {}; -//# sourceMappingURL=UserDatasetUploadWrappers.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Service/UserDatasetUploadWrappers.d.ts.map b/packages/libs/user-datasets-legacy/lib/Service/UserDatasetUploadWrappers.d.ts.map deleted file mode 100644 index b5583a9147..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Service/UserDatasetUploadWrappers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetUploadWrappers.d.ts","sourceRoot":"","sources":["../../src/lib/Service/UserDatasetUploadWrappers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAI5D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnE,MAAM,WAAW,aAAa;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,MAAM,qCAAqC,GAAG,UAAU,GAC5D;KACG,GAAG,IAAI,MAAM,gCAAgC,GAAG,UAAU,CACzD,gCAAgC,CAAC,GAAG,CAAC,CACtC;CACF,CAAC;AAEJ,KAAK,gCAAgC,GAAG,UAAU,CAChD,OAAO,oCAAoC,CAC5C,CAAC;AA0LF,eAAO,MAAM,oCAAoC,6CAG9C,aAAa;mCACyB,UAAU;6BAElC,UAAU,sBACA,cAAc,KAAG,QAAQ,IAAI,CAAC;mCA8D1B,QAAQ,iBAAiB,EAAE,CAAC;uCAa/C,MAAM,KAAG,QAAQ,IAAI,CAAC;kCAKrB,MAAM,EAAE,KAAG,QAAQ,IAAI,CAAC;gDAKS,MAAM;mDAW9B,MAAM,eAAe,MAAM;CAU/C,CAAC;AAEH,wBAAgB,uCAAuC,CACrD,UAAU,EAAE,UAAU,GACrB,UAAU,IAAI,qCAAqC,CAErD;AAED,wBAAgB,6CAA6C,CAC3D,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,UAAU,IAAI,qCAAqC,CAI7D;AAED,eAAO,MAAM,uDAAuD,8FACyB,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Service/UserDatasetUploadWrappers.js b/packages/libs/user-datasets-legacy/lib/Service/UserDatasetUploadWrappers.js deleted file mode 100644 index cb4738fc04..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Service/UserDatasetUploadWrappers.js +++ /dev/null @@ -1,324 +0,0 @@ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator['throw'](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __rest = - (this && this.__rest) || - function (s, e) { - var t = {}; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === 'function') - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if ( - e.indexOf(p[i]) < 0 && - Object.prototype.propertyIsEnumerable.call(s, p[i]) - ) - t[p[i]] = s[p[i]]; - } - return t; - }; -import { partial } from 'lodash'; -import * as Decode from '@veupathdb/wdk-client/lib/Utils/Json'; -import { appendUrlAndRethrow } from '@veupathdb/wdk-client/lib/Service/ServiceUtils'; -/* - * The authentication method uses a header, not a cookie like in WDK - */ -function fetchWithCredentials(serviceUrl, path, method, body, contentType) { - return __awaiter(this, void 0, void 0, function* () { - const cookies = Object.fromEntries( - document.cookie - .split('; ') - .map((entry) => entry.split(/=(.*)/).slice(0, 2)) - ); - let authO; - if ('Authorization' in cookies) { - authO = { - Authorization: 'Bearer ' + cookies.Authorization, - }; - } else { - const authKeyValue = cookies.wdk_check_auth; - if (authKeyValue == null) { - throw new Error( - `Tried to retrieve a non-existent WDK auth key for user.` - ); - } - authO = { - 'Auth-Key': authKeyValue, - }; - } - const contentTypeO = - contentType != null ? { 'Content-Type': contentType } : {}; - return fetch(serviceUrl + path, { - method: method.toUpperCase(), - body: body, - credentials: 'include', - headers: new Headers(Object.assign({}, authO, contentTypeO)), - }).catch(appendUrlAndRethrow(serviceUrl + path)); - }); -} -/* - * The successful payload is decoded as a , failure is a text that is acceptable to display - * - * The service communicates failures in JSON, - * with 'message' and 'status' as keys - * See doc: /api#type:err.ErrorResponse - */ -function fetchDecodedJsonOrThrowMessage(serviceUrl, decoder, options) { - let { method, path, body } = options; - return fetchWithCredentials( - serviceUrl, - path, - method, - body, - 'application/json; charset=utf-8' - ) - .then((response) => - __awaiter(this, void 0, void 0, function* () { - const responseBody = yield response.json(); - if (response.ok) { - return responseBody; - } - const message = responseBody.message; - if (!message) { - throw new Error('Unexpected error: ' + response.status); - } - if (response.status !== 422) { - throw new Error( - 'Error type ' + responseBody.status + ': ' + responseBody.message - ); - } - let errorLines = []; - errorLines.push('Validation failed:'); - if (responseBody.errors.general && responseBody.errors.general.length) { - errorLines.push(...responseBody.errors.general); - } - errorLines.push( - Object.entries(responseBody.errors.byKey).map( - (p) => p[0] + ': ' + p[1] - ) - ); - throw errorLines.join('\n
\n'); - }) - ) - .then((responseBody) => { - const result = decoder(responseBody); - if (result.status === 'ok') return result.value; - let errorMessage = `Could not decode resource from ${options.path}:`; - if (result.context) { - errorMessage += `\n\n Problem at _${result.context}:`; - } - errorMessage += `\n\n Expected ${ - result.expected - }, but got ${JSON.stringify(result.value)}.`; - throw errorMessage; - }); -} -const statusDetailDecoder = Decode.combine( - Decode.field('id', Decode.string), - Decode.field('datasetId', Decode.optional(Decode.number)), - Decode.field('datasetName', Decode.string), - Decode.field('summary', Decode.string), - Decode.field('projects', Decode.arrayOf(Decode.string)), - Decode.field('status', Decode.string), - Decode.field( - 'statusDetails', - Decode.optional( - Decode.combine( - Decode.field( - 'errors', - Decode.optional( - Decode.combine( - Decode.field('general', Decode.arrayOf(Decode.string)), - Decode.field( - 'byKey', - Decode.objectOf(Decode.arrayOf(Decode.string)) - ) - ) - ) - ) - ) - ) - ), - Decode.field('stepPercent', Decode.optional(Decode.number)), - Decode.field('started', Decode.string), - Decode.field('finished', Decode.optional(Decode.string)) -); -function getErrorsFromStatusDetails(statusDetails) { - let errorLines = []; - if (statusDetails && statusDetails.errors && statusDetails.errors.general) { - for (let line of statusDetails.errors.general) { - errorLines.push(line); - } - } - if (statusDetails && statusDetails.errors && statusDetails.errors.byKey) { - for (let p of Object.entries(statusDetails.errors.byKey)) { - errorLines.push(p[0] + ': ' + p[1].join('; ')); - } - } - return errorLines; -} -function userDatasetUploadFromStatusDetail(upload) { - const { statusDetails } = upload, - restUpload = __rest(upload, ['statusDetails']); - return Object.assign(Object.assign({}, restUpload), { - errors: getErrorsFromStatusDetails(statusDetails), - // Could instead use utility functions and an enum for status values? - isOngoing: !upload.status.match(/success|rejected|errored/), - isCancellable: !!upload.status.match(/awaiting-upload/), - isSuccessful: !!upload.status.match(/success/), - isUserError: !!upload.status.match(/rejected/), - }); -} -function issueDeleteCommand(datasetImportUrl, jobId) { - return fetchWithCredentials( - datasetImportUrl, - '/user-datasets/' + jobId, - 'DELETE', - undefined, - 'text/plain;' - ).then((x) => {}); -} -const DATASET_IMPORT_URL_KEY = 'datasetImportUrl'; -export const makeUserDatasetUploadServiceWrappers = ({ - datasetImportUrl, - fullWdkServiceUrl, -}) => ({ - [DATASET_IMPORT_URL_KEY]: (wdkService) => datasetImportUrl, - addDataset: (wdkService) => (newUserDataset) => - __awaiter(void 0, void 0, void 0, function* () { - const metaBody = JSON.stringify({ - datasetName: newUserDataset.name, - datasetType: newUserDataset.datasetType, - description: newUserDataset.description, - summary: newUserDataset.summary, - projects: newUserDataset.projects, - origin: 'direct-upload', - }); - const fileBody = new FormData(); - const { uploadMethod } = newUserDataset; - if (uploadMethod.type === 'file') { - fileBody.append('uploadMethod', 'file'); - fileBody.append('file', uploadMethod.file); - } else if (uploadMethod.type === 'url') { - fileBody.append('uploadMethod', 'url'); - fileBody.append('url', uploadMethod.url); - } else if (newUserDataset.uploadMethod.type === 'result') { - const temporaryResultPath = yield wdkService.getTemporaryResultPath( - uploadMethod.stepId, - uploadMethod.reportName, - uploadMethod.reportConfig - ); - const temporaryResultUrl = `${fullWdkServiceUrl}${temporaryResultPath}`; - fileBody.append('uploadMethod', 'url'); - fileBody.append('url', temporaryResultUrl); - } else { - throw new Error( - `Tried to upload a dataset via an unrecognized upload method '${uploadMethod.type}'` - ); - } - return fetchDecodedJsonOrThrowMessage( - datasetImportUrl, - Decode.field('jobId', Decode.string), - { - path: '/user-datasets', - method: 'POST', - body: metaBody, - } - ).then(({ jobId }) => - fetchWithCredentials( - datasetImportUrl, - '/user-datasets/' + jobId, - 'POST', - fileBody - ).then((response) => { - if (!response.ok) { - return response.text().then((error) => { - throw error; - }); - } - return; - }) - ); - }), - listStatusDetails: () => () => { - return fetchDecodedJsonOrThrowMessage( - datasetImportUrl, - Decode.arrayOf(statusDetailDecoder), - { - path: '/user-datasets', - method: 'GET', - } - ).then((uploads) => uploads.map(userDatasetUploadFromStatusDetail)); - }, - // Currently only works for jobs whose status is awaiting-upload - cancelOngoingUpload: () => (jobId) => { - return issueDeleteCommand(datasetImportUrl, jobId); - }, - clearMessages: () => (jobIds) => { - return Promise.all( - jobIds.map(partial(issueDeleteCommand, datasetImportUrl)) - ).then((x) => {}); - }, - getSupportedDatasetTypes: () => (projectId) => { - return fetchDecodedJsonOrThrowMessage( - datasetImportUrl, - Decode.arrayOf(Decode.string), - { - path: `/projects/${projectId}/datasetTypes`, - method: 'GET', - } - ); - }, - getSupportedFileUploadTypes: () => (projectId, datasetType) => { - return fetchDecodedJsonOrThrowMessage( - datasetImportUrl, - Decode.arrayOf(Decode.string), - { - path: `/projects/${projectId}/datasetTypes/${datasetType}/fileTypes`, - method: 'GET', - } - ); - }, -}); -export function isUserDatasetUploadCompatibleWdkService(wdkService) { - return DATASET_IMPORT_URL_KEY in wdkService; -} -export function assertIsUserDatasetUploadCompatibleWdkService(wdkService) { - if (!isUserDatasetUploadCompatibleWdkService(wdkService)) { - throw new Error(MISCONFIGURED_USER_DATASET_UPLOAD_SERVICE_ERROR_MESSAGE); - } -} -export const MISCONFIGURED_USER_DATASET_UPLOAD_SERVICE_ERROR_MESSAGE = - 'In order to use this feature, a UserDatasetUploadCompatibleWdkService must be configured.'; -//# sourceMappingURL=UserDatasetUploadWrappers.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Service/UserDatasetUploadWrappers.js.map b/packages/libs/user-datasets-legacy/lib/Service/UserDatasetUploadWrappers.js.map deleted file mode 100644 index 30b87897f3..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Service/UserDatasetUploadWrappers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetUploadWrappers.js","sourceRoot":"","sources":["../../src/lib/Service/UserDatasetUploadWrappers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGjC,OAAO,KAAK,MAAM,MAAM,sCAAsC,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAoBrF;;GAEG;AACH,SAAe,oBAAoB,CACjC,UAAkB,EAClB,IAAY,EACZ,MAAc,EACd,IAAS,EACT,WAAoB;;QAEpB,MAAM,OAAO,GAAG,MAAM,CAAC,WAAW,CAChC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAC7E,CAAC;QAEF,IAAI,KAA6B,CAAC;QAElC,IAAI,eAAe,IAAI,OAAO,EAAE;YAC9B,KAAK,GAAG;gBACN,aAAa,EAAE,SAAS,GAAG,OAAO,CAAC,aAAa;aACjD,CAAC;SACH;aAAM;YACL,MAAM,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC;YAC5C,IAAI,YAAY,IAAI,IAAI,EAAE;gBACxB,MAAM,IAAI,KAAK,CACb,yDAAyD,CAC1D,CAAC;aACH;YACD,KAAK,GAAG;gBACN,UAAU,EAAE,YAAY;aACzB,CAAC;SACH;QAED,MAAM,YAAY,GAChB,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAE7D,OAAO,K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AG,CAChB,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAC,CAC1D,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,GAAE,CAAC,CAAC,CAAC;IACpB,CAAC;IACH,wBAAwB,EAAE,GAAG,EAAE,CAAC,CAAC,SAAiB,EAAE,EAAE;QACpD,OAAO,8BAA8B,CACnC,gBAAgB,EAChB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAC7B;YACE,IAAI,EAAE,aAAa,SAAS,eAAe;YAC3C,MAAM,EAAE,KAAK;SACd,CACF,CAAC;IACJ,CAAC;IACD,2BAA2B,EACzB,GAAG,EAAE,CAAC,CAAC,SAAiB,EAAE,WAAmB,EAAE,EAAE;QAC/C,OAAO,8BAA8B,CACnC,gBAAgB,EAChB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAC7B;YACE,IAAI,EAAE,aAAa,SAAS,iBAAiB,WAAW,YAAY;YACpE,MAAM,EAAE,KAAK;SACd,CACF,CAAC;IACJ,CAAC;CACJ,CAAC,CAAC;AAEH,MAAM,UAAU,uCAAuC,CACrD,UAAsB;IAEtB,OAAO,sBAAsB,IAAI,UAAU,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,6CAA6C,CAC3D,UAAsB;IAEtB,IAAI,CAAC,uCAAuC,CAAC,UAAU,CAAC,EAAE;QACxD,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;KAC1E;AACH,CAAC;AAED,MAAM,CAAC,MAAM,uDAAuD,GAClE,2FAA2F,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Service/UserDatasetWrappers.d.ts b/packages/libs/user-datasets-legacy/lib/Service/UserDatasetWrappers.d.ts deleted file mode 100644 index a418b6944d..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Service/UserDatasetWrappers.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { WdkService } from '@veupathdb/wdk-client/lib/Core'; -import { EpicDependencies } from '@veupathdb/wdk-client/lib/Core/Store'; -import { ActionThunk } from '@veupathdb/wdk-client/lib/Core/WdkMiddleware'; -import { UserDataset, UserDatasetMeta } from '../Utils/types'; -export type UserDatasetsCompatibleWdkService = WdkService & - { - [Key in keyof UserDatasetsServiceWrappers]: ReturnType< - UserDatasetsServiceWrappers[Key] - >; - }; -export type UserDatasetShareResponse = { - [Key in 'add' | 'delete']: { - [Key in string]: UserDataset['sharedWith']; - }; -}; -type UserDatasetsServiceWrappers = typeof userDatasetsServiceWrappers; -export declare const userDatasetsServiceWrappers: { - getCurrentUserDatasets: ( - wdkService: WdkService - ) => () => Promise; - getUserDataset: ( - wdkService: WdkService - ) => (id: number) => Promise; - updateUserDataset: ( - wdkService: WdkService - ) => (id: number, meta: UserDatasetMeta) => Promise; - removeUserDataset: (wdkService: WdkService) => (id: number) => Promise; - editUserDatasetSharing: ( - wdkService: WdkService - ) => ( - actionName: string, - userDatasetIds: number[], - recipientUserIds: number[] - ) => Promise; - getUserDatasetDownloadUrl: ( - wdkService: WdkService - ) => (datasetId: number, filename: string) => string; - getUserIdsByEmail: (wdkService: WdkService) => (emails: string[]) => Promise<{ - results: Record[]; - }>; -}; -export declare function isUserDatasetsCompatibleWdkService( - wdkService: WdkService -): wdkService is UserDatasetsCompatibleWdkService; -export declare function assertIsUserDatasetCompatibleWdkService( - wdkService: WdkService -): asserts wdkService is UserDatasetsCompatibleWdkService; -export declare const MISCONFIGURED_USER_DATASET_SERVICE_ERROR_MESSAGE = - 'In order to use this feature, a UserDatasetsCompatibleWdkService must be configured.'; -export interface UserDatasetCompatibleEpicDependencies - extends EpicDependencies { - wdkService: UserDatasetsCompatibleWdkService; -} -export declare function validateUserDatasetCompatibleThunk( - thunk: ActionThunk -): ActionThunk; -export {}; -//# sourceMappingURL=UserDatasetWrappers.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Service/UserDatasetWrappers.d.ts.map b/packages/libs/user-datasets-legacy/lib/Service/UserDatasetWrappers.d.ts.map deleted file mode 100644 index 8656ad879f..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Service/UserDatasetWrappers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetWrappers.d.ts","sourceRoot":"","sources":["../../src/lib/Service/UserDatasetWrappers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAO5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE9D,MAAM,MAAM,gCAAgC,GAAG,UAAU,GACvD;KACG,GAAG,IAAI,MAAM,2BAA2B,GAAG,UAAU,CACpD,2BAA2B,CAAC,GAAG,CAAC,CACjC;CACF,CAAC;AAEJ,MAAM,MAAM,wBAAwB,GAAG;KACpC,GAAG,IAAI,KAAK,GAAG,QAAQ,GAAG;SACxB,GAAG,IAAI,MAAM,GAAG,WAAW,CAAC,YAAY,CAAC;KAC3C;CACF,CAAC;AAEF,KAAK,2BAA2B,GAAG,OAAO,2BAA2B,CAAC;AAMtE,eAAO,MAAM,2BAA2B;yCACD,UAAU;iCAKlB,UAAU,UAAU,MAAM;oCAMxC,UAAU,UAAU,MAAM,QAAQ,eAAe;oCAMhC,UAAU,UAAU,MAAM;yCAG3C,UAAU,kBAET,MAAM,kBACF,MAAM,EAAE,oBACN,MAAM,EAAE;4CAyBf,UAAU,iBAAiB,MAAM,YAAY,MAAM;oCAYlC,UAAU,cAAc,MAAM,EAAE;;;CASjE,CAAC;AAEF,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,UAAU,GACrB,UAAU,IAAI,gCAAgC,CAKhD;AAED,wBAAgB,uCAAuC,CACrD,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,UAAU,IAAI,gCAAgC,CAIxD;AAED,eAAO,MAAM,gDAAgD,yFAC2B,CAAC;AAEzF,MAAM,WAAW,qCACf,SAAQ,gBAAgB;IACxB,UAAU,EAAE,gCAAgC,CAAC;CAC9C;AAED,wBAAgB,kCAAkC,CAAC,CAAC,EAClD,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,qCAAqC,CAAC,GAC3D,WAAW,CAAC,CAAC,EAAE,qCAAqC,CAAC,CAMvD"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Service/UserDatasetWrappers.js b/packages/libs/user-datasets-legacy/lib/Service/UserDatasetWrappers.js deleted file mode 100644 index ae5944db1e..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Service/UserDatasetWrappers.js +++ /dev/null @@ -1,90 +0,0 @@ -import { - arrayOf, - number, - objectOf, - record, -} from '@veupathdb/wdk-client/lib/Utils/Json'; -const userIdsByEmailDecoder = record({ - results: arrayOf(objectOf(number)), -}); -export const userDatasetsServiceWrappers = { - getCurrentUserDatasets: (wdkService) => () => - wdkService._fetchJson( - 'get', - '/users/current/user-datasets?expandDetails=true' - ), - getUserDataset: (wdkService) => (id) => - wdkService._fetchJson('get', `/users/current/user-datasets/${id}`), - updateUserDataset: (wdkService) => (id, meta) => - wdkService._fetchJson( - 'put', - `/users/current/user-datasets/${id}/meta`, - JSON.stringify(meta) - ), - removeUserDataset: (wdkService) => (id) => - wdkService._fetchJson('delete', `/users/current/user-datasets/${id}`), - editUserDatasetSharing: - (wdkService) => (actionName, userDatasetIds, recipientUserIds) => { - const acceptableActions = ['add', 'delete']; - if (!actionName || !acceptableActions.includes(actionName)) - throw new TypeError( - `editUserDatasetSharing: invalid action name given: "${actionName}"` - ); - const delta = JSON.stringify({ - [actionName]: userDatasetIds - .map((id) => `${id}`) - .reduce((output, datasetId) => { - Object.defineProperty(output, datasetId, { - value: recipientUserIds.map((id) => `${id}`), - enumerable: true, - }); - return output; - }, {}), - }); - return wdkService._fetchJson( - 'patch', - '/users/current/user-dataset-sharing', - delta - ); - }, - getUserDatasetDownloadUrl: (wdkService) => (datasetId, filename) => { - if (typeof datasetId !== 'number') - throw new TypeError( - `Can't build downloadUrl; invalid datasetId given (${datasetId}) [${typeof datasetId}]` - ); - if (typeof filename !== 'string') - throw new TypeError( - `Can't build downloadUrl; invalid filename given (${filename}) [${typeof filename}]` - ); - return `${wdkService.serviceUrl}/users/current/user-datasets/${datasetId}/user-datafiles/${filename}`; - }, - getUserIdsByEmail: (wdkService) => (emails) => { - return wdkService.sendRequest(userIdsByEmailDecoder, { - path: '/user-id-query', - method: 'POST', - body: JSON.stringify({ - emails, - }), - }); - }, -}; -export function isUserDatasetsCompatibleWdkService(wdkService) { - return Object.keys(userDatasetsServiceWrappers).every( - (userDatasetsServiceWrapperKey) => - userDatasetsServiceWrapperKey in wdkService - ); -} -export function assertIsUserDatasetCompatibleWdkService(wdkService) { - if (!isUserDatasetsCompatibleWdkService(wdkService)) { - throw new Error(MISCONFIGURED_USER_DATASET_SERVICE_ERROR_MESSAGE); - } -} -export const MISCONFIGURED_USER_DATASET_SERVICE_ERROR_MESSAGE = - 'In order to use this feature, a UserDatasetsCompatibleWdkService must be configured.'; -export function validateUserDatasetCompatibleThunk(thunk) { - return (wdkDependencies) => { - assertIsUserDatasetCompatibleWdkService(wdkDependencies.wdkService); - return thunk(wdkDependencies); - }; -} -//# sourceMappingURL=UserDatasetWrappers.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Service/UserDatasetWrappers.js.map b/packages/libs/user-datasets-legacy/lib/Service/UserDatasetWrappers.js.map deleted file mode 100644 index b3828d697b..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Service/UserDatasetWrappers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetWrappers.js","sourceRoot":"","sources":["../../src/lib/Service/UserDatasetWrappers.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,MAAM,GACP,MAAM,sCAAs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nD,CAAC,6BAA6B,EAAE,EAAE,CAChC,6BAA6B,IAAI,UAAU,CAC9C,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uCAAuC,CACrD,UAAsB;IAEtB,IAAI,CAAC,kCAAkC,CAAC,UAAU,CAAC,EAAE;QACnD,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;KACnE;AACH,CAAC;AAED,MAAM,CAAC,MAAM,gDAAgD,GAC3D,sFAAsF,CAAC;AAOzF,MAAM,UAAU,kCAAkC,CAChD,KAA4D;IAE5D,OAAO,CAAC,eAAe,EAAE,EAAE;QACzB,uCAAuC,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAEpE,OAAO,KAAK,CAAC,eAAe,CAAC,CAAC;IAChC,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Service/index.d.ts b/packages/libs/user-datasets-legacy/lib/Service/index.d.ts deleted file mode 100644 index bbcd562e6e..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Service/index.d.ts +++ /dev/null @@ -1,594 +0,0 @@ -/// -/// -import { WdkService } from '@veupathdb/wdk-client/lib/Core'; -import { ServiceConfig as UserDatasetUploadServiceConfig } from './UserDatasetUploadWrappers'; -export declare function wrapWdkService( - serviceConfig: UserDatasetUploadServiceConfig | undefined, - wdkService: WdkService -): { - getCurrentUserDatasets: - | (() => Promise) - | ((id: number) => Promise) - | (( - id: number, - meta: import('../Utils/types').UserDatasetMeta - ) => Promise) - | (( - actionName: string, - userDatasetIds: number[], - recipientUserIds: number[] - ) => Promise) - | ((datasetId: number, filename: string) => string) - | ((emails: string[]) => Promise<{ - results: Record[]; - }>); - getUserDataset: - | (() => Promise) - | ((id: number) => Promise) - | (( - id: number, - meta: import('../Utils/types').UserDatasetMeta - ) => Promise) - | (( - actionName: string, - userDatasetIds: number[], - recipientUserIds: number[] - ) => Promise) - | ((datasetId: number, filename: string) => string) - | ((emails: string[]) => Promise<{ - results: Record[]; - }>); - updateUserDataset: - | (() => Promise) - | ((id: number) => Promise) - | (( - id: number, - meta: import('../Utils/types').UserDatasetMeta - ) => Promise) - | (( - actionName: string, - userDatasetIds: number[], - recipientUserIds: number[] - ) => Promise) - | ((datasetId: number, filename: string) => string) - | ((emails: string[]) => Promise<{ - results: Record[]; - }>); - removeUserDataset: - | (() => Promise) - | ((id: number) => Promise) - | (( - id: number, - meta: import('../Utils/types').UserDatasetMeta - ) => Promise) - | (( - actionName: string, - userDatasetIds: number[], - recipientUserIds: number[] - ) => Promise) - | ((datasetId: number, filename: string) => string) - | ((emails: string[]) => Promise<{ - results: Record[]; - }>); - editUserDatasetSharing: - | (() => Promise) - | ((id: number) => Promise) - | (( - id: number, - meta: import('../Utils/types').UserDatasetMeta - ) => Promise) - | (( - actionName: string, - userDatasetIds: number[], - recipientUserIds: number[] - ) => Promise) - | ((datasetId: number, filename: string) => string) - | ((emails: string[]) => Promise<{ - results: Record[]; - }>); - getUserDatasetDownloadUrl: - | (() => Promise) - | ((id: number) => Promise) - | (( - id: number, - meta: import('../Utils/types').UserDatasetMeta - ) => Promise) - | (( - actionName: string, - userDatasetIds: number[], - recipientUserIds: number[] - ) => Promise) - | ((datasetId: number, filename: string) => string) - | ((emails: string[]) => Promise<{ - results: Record[]; - }>); - getUserIdsByEmail: - | (() => Promise) - | ((id: number) => Promise) - | (( - id: number, - meta: import('../Utils/types').UserDatasetMeta - ) => Promise) - | (( - actionName: string, - userDatasetIds: number[], - recipientUserIds: number[] - ) => Promise) - | ((datasetId: number, filename: string) => string) - | ((emails: string[]) => Promise<{ - results: Record[]; - }>); - _version: number | undefined; - _fetchJson: ( - method: string, - url: string, - body?: string | undefined, - isBaseUrl?: boolean | undefined - ) => Promise; - _getFromCache: ( - key: string, - onCacheMiss: () => Promise, - checkCachedValue?: ((cachedValue: T_1) => boolean) | undefined - ) => Promise; - _clearCache: () => Promise; - serviceUrl: string; - sendRequest: ( - decoder: import('@veupathdb/wdk-client/lib/Utils/Json').Decoder, - options: { - method: string; - path: string; - params?: - | { - [key: string]: any; - } - | undefined; - body?: string | undefined; - useCache?: boolean | undefined; - cacheId?: string | undefined; - checkCachedValue?: ((resource: Resource) => boolean) | undefined; - } - ) => Promise; - submitError: (error: Error, extra?: any) => Promise; - submitErrorIfNot500: (error: Error, extra?: any) => Promise; - submitErrorIfUndelayedAndNot500: (error: Error, extra?: any) => Promise; - getConfig: () => Promise< - import('@veupathdb/wdk-client/lib/Service/ServiceBase').ServiceConfig - >; - getVersion: () => Promise; - getRecordClasses: (() => Promise< - ({ - description: string; - iconName?: string | undefined; - displayName: string; - properties?: Record | undefined; - fullName: string; - urlSegment: string; - displayNamePlural: string; - shortDisplayName: string; - shortDisplayNamePlural: string; - recordIdAttributeName: string; - primaryKeyColumnRefs: string[]; - attributes: import('@veupathdb/wdk-client/lib/Utils/WdkModel').AttributeField[]; - tables: import('@veupathdb/wdk-client/lib/Utils/WdkModel').TableField[]; - formats: import('@veupathdb/wdk-client/lib/Utils/WdkModel').Reporter[]; - useBasket: boolean; - searches: import('@veupathdb/wdk-client/lib/Utils/WdkModel').Question[]; - } & { - attributesMap: import('lodash').Dictionary< - import('@veupathdb/wdk-client/lib/Utils/WdkModel').AttributeField - >; - tablesMap: import('lodash').Dictionary< - import('@veupathdb/wdk-client/lib/Utils/WdkModel').TableField - >; - })[] - >) & - import('lodash').MemoizedFunction; - findRecordClass: (urlSegment: string) => Promise< - { - description: string; - iconName?: string | undefined; - displayName: string; - properties?: Record | undefined; - fullName: string; - urlSegment: string; - displayNamePlural: string; - shortDisplayName: string; - shortDisplayNamePlural: string; - recordIdAttributeName: string; - primaryKeyColumnRefs: string[]; - attributes: import('@veupathdb/wdk-client/lib/Utils/WdkModel').AttributeField[]; - tables: import('@veupathdb/wdk-client/lib/Utils/WdkModel').TableField[]; - formats: import('@veupathdb/wdk-client/lib/Utils/WdkModel').Reporter[]; - useBasket: boolean; - searches: import('@veupathdb/wdk-client/lib/Utils/WdkModel').Question[]; - } & { - attributesMap: import('lodash').Dictionary< - import('@veupathdb/wdk-client/lib/Utils/WdkModel').AttributeField - >; - tablesMap: import('lodash').Dictionary< - import('@veupathdb/wdk-client/lib/Utils/WdkModel').TableField - >; - } - >; - getQuestions: () => Promise< - import('@veupathdb/wdk-client/lib/Utils/WdkModel').Question[] - >; - findQuestion: ( - urlSegment: string - ) => Promise; - getRecordTypePath: (recordClassUrlSegment: string) => string; - getRecordTypesPath: () => string; - getReportsEndpoint: ( - recordClassUrlSegment: string, - questionUrlSegment: string - ) => string; - getReportsPath: ( - recordClassUrlSegment: string, - questionUrlSegment: string - ) => string; - getSearchesPath: (recordClassUrlSegment: string) => string; - getSearchPath: ( - recordClassUrlSegment: string, - questionUrlSegment: string - ) => string; - getStandardSearchReportEndpoint: ( - recordClassUrlSegment: string, - questionUrlSegment: string - ) => string; - getCustomSearchReportEndpoint: ( - recordClassUrlSegment: string, - questionUrlSegment: string, - reportName: string - ) => string; - getXmlAnswerJson: (xmlQuestionName: string) => Promise; - getCurrentUser: ( - options?: - | { - force?: boolean | undefined; - } - | undefined - ) => Promise; - createNewUser: ( - userWithPrefs: import('@veupathdb/wdk-client/lib/Utils/WdkUser').UserWithPrefs - ) => Promise; - updateCurrentUser: ( - user: import('@veupathdb/wdk-client/lib/Utils/WdkUser').User - ) => Promise; - updateCurrentUserPassword: ( - oldPassword: string, - newPassword: string - ) => Promise; - resetUserPassword: (email: string) => Promise; - getCurrentUserPreferences: () => Promise< - import('@veupathdb/wdk-client/lib/Utils/WdkUser').UserPreferences - >; - patchSingleUserPreference: ( - scope: import('@veupathdb/wdk-client/lib/Utils/WdkUser').PreferenceScope, - key: string, - value: string | null - ) => Promise< - import('@veupathdb/wdk-client/lib/Utils/WdkUser').UserPreferences - >; - patchScopedUserPreferences: ( - scope: import('@veupathdb/wdk-client/lib/Utils/WdkUser').PreferenceScope, - updates: Record - ) => Promise< - import('@veupathdb/wdk-client/lib/Utils/WdkUser').UserPreferences - >; - patchUserPreferences: ( - updates: import('@veupathdb/wdk-client/lib/Utils/WdkUser').UserPreferences - ) => Promise< - import('@veupathdb/wdk-client/lib/Utils/WdkUser').UserPreferences - >; - createTemporaryFile: (file: File) => Promise; - getPublicStrategies: ( - queryParams?: - | { - userEmail: string | string[] | undefined; - } - | undefined - ) => Promise< - import('@veupathdb/wdk-client/lib/Utils/WdkUser').StrategySummary[] - >; - getStrategies: () => Promise< - import('@veupathdb/wdk-client/lib/Utils/WdkUser').StrategySummary[] - >; - createStrategy: ( - newStrategySpec: import('@veupathdb/wdk-client/lib/Utils/WdkUser').NewStrategySpec, - userId?: string | undefined - ) => Promise; - duplicateStrategy: ( - copyStepSpec: import('@veupathdb/wdk-client/lib/Utils/WdkUser').DuplicateStrategySpec, - userId?: string | undefined - ) => Promise; - deleteStrategies: ( - deleteStrategiesSpecs: import('@veupathdb/wdk-client/lib/Utils/WdkUser').DeleteStrategySpec[], - userId?: string | undefined - ) => Promise; - getStrategy: ( - strategyId: number, - userId?: string | undefined - ) => Promise< - import('@veupathdb/wdk-client/lib/Utils/WdkUser').StrategyDetails - >; - deleteStrategy: ( - strategyId: number, - userId?: string | undefined - ) => Promise; - patchStrategyProperties: ( - strategyId: number, - strategyProperties: Partial< - import('@veupathdb/wdk-client/lib/Service/Mixins/StrategiesService').PatchOptions - >, - userId?: string | undefined - ) => Promise; - putStrategyStepTree: ( - strategyId: number, - newStepTree: import('@veupathdb/wdk-client/lib/Utils/WdkUser').StepTree, - userId?: string | undefined - ) => Promise; - getDuplicatedStrategyStepTree: ( - strategyId: number, - userId?: string | undefined - ) => Promise; - findStep: ( - stepId: number, - userId?: string | undefined - ) => Promise; - updateStepProperties: ( - stepId: number, - stepSpec: import('@veupathdb/wdk-client/lib/Utils/WdkUser').PatchStepSpec, - userId?: string | undefined - ) => Promise; - createStep: ( - newStepSpec: import('@veupathdb/wdk-client/lib/Utils/WdkUser').NewStepSpec, - userId?: string | undefined - ) => Promise; - getStepCustomReport: ( - stepId: number, - formatting: import('@veupathdb/wdk-client/lib/Service/Mixins/SearchReportsService').AnswerFormatting, - userId?: string | undefined - ) => Promise; - getStepStandardReport: ( - stepId: number, - reportConfig: import('@veupathdb/wdk-client/lib/Utils/WdkModel').StandardReportConfig, - viewFilters: - | import('@veupathdb/wdk-client/lib/Utils/WdkModel').FilterValueArray - | undefined, - userId?: string | undefined - ) => Promise; - getStepColumnReport: ( - stepId: number, - columnName: string, - toolName: string, - reportConfig: object, - userId?: string | undefined - ) => Promise; - getStepFilterSummary: ( - decoder: import('@veupathdb/wdk-client/lib/Utils/Json').Decoder, - stepId: number, - filterName: string, - userId?: string | undefined - ) => Promise; - deleteStep: (stepId: number, userId?: string | undefined) => void; - updateStepSearchConfig: ( - stepId: number, - answerSpec: import('@veupathdb/wdk-client/lib/Utils/WdkModel').SearchConfig, - userId?: string | undefined - ) => Promise; - downloadStepReport: ( - stepId: number, - formatting: import('@veupathdb/wdk-client/lib/Service/Mixins/SearchReportsService').AnswerFormatting, - target?: string | undefined, - userId?: string | undefined - ) => Promise; - createStepAnalysis: ( - stepId: number, - baseAnalysisConfig: { - analysisName: string; - displayName?: string | undefined; - parameters: import('@veupathdb/wdk-client/lib/Utils/WdkModel').ParameterValues; - } - ) => Promise< - import('@veupathdb/wdk-client/lib/Utils/StepAnalysisUtils').StepAnalysisConfig - >; - deleteStepAnalysis: (stepId: number, analysisId: number) => Promise; - getAppliedStepAnalyses: ( - stepId: number - ) => Promise< - import('@veupathdb/wdk-client/lib/Utils/StepAnalysisUtils').StepAnalysis[] - >; - getStepAnalysis: ( - stepId: number, - analysisId: number - ) => Promise< - import('@veupathdb/wdk-client/lib/Service/Mixins/StepAnalysisService').StepAnalysisConfigWithDisplayParams - >; - getStepAnalysisResult: (stepId: number, analysisId: number) => Promise; - getStepAnalysisStatus: ( - stepId: number, - analysisId: number - ) => Promise<{ - status: import('@veupathdb/wdk-client/lib/Utils/StepAnalysisUtils').StepAnalysisStatus; - }>; - getStepAnalysisTypeParamSpecs: ( - stepId: number, - analysisTypeName: string - ) => Promise; - getStepAnalysisTypes: ( - stepId: number - ) => Promise< - import('@veupathdb/wdk-client/lib/Utils/StepAnalysisUtils').StepAnalysisType[] - >; - renameStepAnalysis: ( - stepId: number, - analysisId: number, - displayName: string - ) => Promise; - runStepAnalysis: ( - stepId: number, - analysisId: number - ) => Promise<{ - status: import('@veupathdb/wdk-client/lib/Utils/StepAnalysisUtils').StepAnalysisStatus; - }>; - updateStepAnalysisForm: ( - stepId: number, - analysisId: number, - formParams: import('@veupathdb/wdk-client/lib/Utils/WdkModel').ParameterValues - ) => Promise; - getCustomSearchReportRequestInfo: ( - answerSpec: import('@veupathdb/wdk-client/lib/Utils/WdkModel').AnswerSpec, - formatting: import('@veupathdb/wdk-client/lib/Service/Mixins/SearchReportsService').AnswerFormatting - ) => Promise< - import('@veupathdb/wdk-client/lib/Service/Mixins/SearchReportsService').CustomSearchReportRequestInfo - >; - getAnswer: ( - answerSpec: import('@veupathdb/wdk-client/lib/Utils/WdkModel').AnswerSpec, - formatting: import('@veupathdb/wdk-client/lib/Service/Mixins/SearchReportsService').AnswerFormatting - ) => Promise; - getAnswerJson: ( - answerSpec: import('@veupathdb/wdk-client/lib/Utils/WdkModel').AnswerSpec, - reportConfig: import('@veupathdb/wdk-client/lib/Utils/WdkModel').StandardReportConfig, - viewFilters?: - | import('@veupathdb/wdk-client/lib/Utils/WdkModel').FilterValueArray - | undefined - ) => Promise; - getTemporaryResultPath: ( - answerSpecOrStepId: - | number - | import('@veupathdb/wdk-client/lib/Utils/WdkModel').AnswerSpec, - reportName: string, - reportConfig: unknown - ) => Promise; - downloadAnswer: ( - answerRequest: import('@veupathdb/wdk-client/lib/Service/Mixins/SearchReportsService').AnswerRequest, - target?: string | undefined - ) => Promise; - getQuestionAndParameters: ( - questionUrlSegment: string - ) => Promise< - import('@veupathdb/wdk-client/lib/Utils/WdkModel').QuestionWithParameters - >; - getQuestionGivenParameters: ( - questionUrlSegment: string, - paramValues: import('@veupathdb/wdk-client/lib/Utils/WdkModel').ParameterValues - ) => Promise< - import('@veupathdb/wdk-client/lib/Utils/WdkModel').QuestionWithParameters - >; - getRefreshedDependentParams: ( - questionUrlSegment: string, - paramName: string, - paramValue: string, - paramValues: import('@veupathdb/wdk-client/lib/Utils/WdkModel').ParameterValues - ) => Promise; - getOntologyTermSummary: ( - questionUrlSegment: string, - paramName: string, - filters: any, - ontologyId: string, - paramValues: import('@veupathdb/wdk-client/lib/Utils/WdkModel').ParameterValues - ) => Promise< - import('@veupathdb/wdk-client/lib/Components/AttributeFilter/Types').OntologyTermSummary - >; - getFilterParamSummaryCounts: ( - questionUrlSegment: string, - paramName: string, - filters: any, - paramValues: import('@veupathdb/wdk-client/lib/Utils/WdkModel').ParameterValues - ) => Promise<{ - filtered: number; - unfiltered: number; - nativeFiltered: number; - nativeUnfiltered: number; - }>; - getOntology: ( - name: string - ) => Promise< - import('@veupathdb/wdk-client/lib/Utils/CategoryUtils').CategoryOntology - >; - getCategoriesOntology: () => Promise< - import('@veupathdb/wdk-client/lib/Utils/CategoryUtils').CategoryOntology - >; - tryLogin: ( - email: string, - password: string, - redirectUrl: string - ) => Promise< - import('@veupathdb/wdk-client/lib/Service/Mixins/LoginService').TryLoginResponse - >; - logout: () => Promise; - getOauthStateToken: () => Promise<{ - oauthStateToken: string; - }>; - getFavoriteId: ( - recordId: import('@veupathdb/wdk-client/lib/Utils/WdkModel').PrimaryKey, - recordClassUrlSegment: string - ) => Promise; - addFavorite: ( - recordId: import('@veupathdb/wdk-client/lib/Utils/WdkModel').PrimaryKey, - recordClassUrlSegment: string - ) => Promise; - deleteFavorite: (id: number) => Promise; - deleteFavorites: (ids: number[]) => Promise; - getCurrentFavorites: () => Promise< - import('@veupathdb/wdk-client/lib/Utils/WdkModel').Favorite[] - >; - saveFavorite: ( - favorite: import('@veupathdb/wdk-client/lib/Utils/WdkModel').Favorite - ) => Promise; - undeleteFavorites: (ids: number[]) => Promise; - getRecord: ( - recordClassUrlSegment: string, - primaryKey: import('@veupathdb/wdk-client/lib/Utils/WdkModel').PrimaryKey, - options?: - | { - attributes?: string[] | undefined; - tables?: string[] | undefined; - } - | undefined - ) => Promise< - import('@veupathdb/wdk-client/lib/Utils/WdkModel').RecordInstance - >; - createDataset: ( - config: import('@veupathdb/wdk-client/lib/Service/Mixins/DatasetsService').DatasetConfig - ) => Promise; - getDataset: (id: number) => Promise<(string | null)[][]>; - getBasketCounts: () => Promise<{ - [recordClassName: string]: number; - }>; - getBasketStatus: ( - recordClassUrlSegment: string, - records: import('@veupathdb/wdk-client/lib/Utils/WdkModel').RecordInstance[] - ) => Promise; - getBasketStatusPk: ( - recordClassUrlSegment: string, - records: import('@veupathdb/wdk-client/lib/Utils/WdkModel').PrimaryKey[] - ) => Promise; - updateRecordsBasketStatus: ( - operation: import('@veupathdb/wdk-client/lib/Service/Mixins/BasketsService').BasketPatchIdsOperation, - recordClassUrlSegment: string, - primaryKey: import('@veupathdb/wdk-client/lib/Utils/WdkModel').PrimaryKey[] - ) => Promise; - clearBasket: (recordClassUrlSegment: string) => Promise; - addStepToBasket: ( - recordClassUrlSegment: string, - stepId: number - ) => Promise; - getBasketCustomReport: ( - basketName: string, - formatting: import('@veupathdb/wdk-client/lib/Service/Mixins/SearchReportsService').AnswerFormatting - ) => Promise; - getBasketStandardReport: ( - basketName: string, - reportConfig: import('@veupathdb/wdk-client/lib/Utils/WdkModel').StandardReportConfig, - viewFilters?: - | import('@veupathdb/wdk-client/lib/Utils/WdkModel').FilterValueArray - | undefined - ) => Promise; - downloadBasketReport: ( - basketName: string, - formatting: import('@veupathdb/wdk-client/lib/Service/Mixins/SearchReportsService').AnswerFormatting, - target?: string | undefined - ) => Promise; -}; -//# sourceMappingURL=index.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Service/index.d.ts.map b/packages/libs/user-datasets-legacy/lib/Service/index.d.ts.map deleted file mode 100644 index 1d59dbaa9d..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Service/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/Service/index.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAG5D,OAAO,EACL,aAAa,IAAI,8BAA8B,EAEhD,MAAM,6BAA6B,CAAC;AAErC,wBAAgB,cAAc,CAC5B,aAAa,EAAE,8BAA8B,GAAG,SAAS,EACzD,UAAU,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBvB"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Service/index.js b/packages/libs/user-datasets-legacy/lib/Service/index.js deleted file mode 100644 index 64c9a62580..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Service/index.js +++ /dev/null @@ -1,19 +0,0 @@ -import { mapValues } from 'lodash'; -import { userDatasetsServiceWrappers } from './UserDatasetWrappers'; -import { makeUserDatasetUploadServiceWrappers } from './UserDatasetUploadWrappers'; -export function wrapWdkService(serviceConfig, wdkService) { - const wrappersToInclude = - serviceConfig == null - ? userDatasetsServiceWrappers - : Object.assign( - Object.assign({}, userDatasetsServiceWrappers), - makeUserDatasetUploadServiceWrappers(serviceConfig) - ); - return Object.assign( - Object.assign({}, wdkService), - mapValues(wrappersToInclude, (wdkServiceWrapper) => - wdkServiceWrapper(wdkService) - ) - ); -} -//# sourceMappingURL=index.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Service/index.js.map b/packages/libs/user-datasets-legacy/lib/Service/index.js.map deleted file mode 100644 index 160b8370db..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Service/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/Service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAInC,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAEL,oCAAoC,GACrC,MAAM,6BAA6B,CAAC;AAErC,MAAM,UAAU,cAAc,CAC5B,aAAyD,EACzD,UAAsB;IAEtB,MAAM,iBAAiB,GACrB,aAAa,IAAI,IAAI;QACnB,CAAC,CAAC,2BAA2B;QAC7B,CAAC,iCACM,2BAA2B,GAC3B,oCAAoC,CAAC,aAAa,CAAC,CACvD,CAAC;IAER,uCACK,UAAU,GACV,SAAS,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE,EAAE,CACpD,iBAAiB,CAAC,UAAU,CAAC,CAC9B,EACD;AACJ,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetDetailStoreModule.d.ts b/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetDetailStoreModule.d.ts deleted file mode 100644 index 8c942242ae..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetDetailStoreModule.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { ServiceError } from '@veupathdb/wdk-client/lib/Service/ServiceError'; -import { Action } from '../Actions/UserDatasetsActions'; -import { UserDataset } from '../Utils/types'; -export declare const key = 'userDatasetDetail'; -/** - * If isLoading is false, and resource is undefined, - * then assume the user dataset does not exist - */ -export type UserDatasetEntry = { - isLoading: boolean; - resource?: UserDataset; -}; -export interface State { - userDatasetsById: { - [key: string]: UserDatasetEntry; - }; - userDatasetUpdating: boolean; - userDatasetLoading: boolean; - userDatasetRemoving: boolean; - loadError?: ServiceError; - updateError?: ServiceError; - removalError?: ServiceError; -} -/** - * Stores a map of userDatasets by id. By not storing the current userDataset, - * we avoid race conditions where the DATASET_DETAIL_RECEIVED actions are - * dispatched in a different order than the corresponding action creators are - * invoked. - */ -export declare function reduce(state: State | undefined, action: Action): State; -//# sourceMappingURL=UserDatasetDetailStoreModule.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetDetailStoreModule.d.ts.map b/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetDetailStoreModule.d.ts.map deleted file mode 100644 index db8f7df850..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetDetailStoreModule.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetDetailStoreModule.d.ts","sourceRoot":"","sources":["../../src/lib/StoreModules/UserDatasetDetailStoreModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EACL,MAAM,EAWP,MAAM,gCAAgC,CAAC;AAIxC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,eAAO,MAAM,GAAG,sBAAsB,CAAC;AAEvC;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,WAAW,CAAC;CACxB,CAAC;AAEF,MAAM,WAAW,KAAK;IACpB,gBAAgB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAA;KAAE,CAAC;IACtD,mBAAmB,EAAE,OAAO,CAAC;IAC7B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AASD;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,KAAK,mBAAsB,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAyFzE"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetDetailStoreModule.js b/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetDetailStoreModule.js deleted file mode 100644 index b270ca2380..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetDetailStoreModule.js +++ /dev/null @@ -1,103 +0,0 @@ -import { - DETAIL_LOADING, - DETAIL_RECEIVED, - DETAIL_ERROR, - DETAIL_UPDATING, - DETAIL_UPDATE_SUCCESS, - DETAIL_UPDATE_ERROR, - DETAIL_REMOVING, - DETAIL_REMOVE_SUCCESS, - DETAIL_REMOVE_ERROR, - SHARING_SUCCESS, -} from '../Actions/UserDatasetsActions'; -import sharingReducer from '../Components/Sharing/UserDatasetSharingReducer'; -export const key = 'userDatasetDetail'; -const initialState = { - userDatasetsById: {}, - userDatasetLoading: false, - userDatasetUpdating: false, - userDatasetRemoving: false, -}; -/** - * Stores a map of userDatasets by id. By not storing the current userDataset, - * we avoid race conditions where the DATASET_DETAIL_RECEIVED actions are - * dispatched in a different order than the corresponding action creators are - * invoked. - */ -export function reduce(state = initialState, action) { - switch (action.type) { - case DETAIL_LOADING: - return Object.assign(Object.assign({}, state), { - userDatasetsById: Object.assign( - Object.assign({}, state.userDatasetsById), - { - [action.payload.id]: { - isLoading: true, - }, - } - ), - }); - case DETAIL_RECEIVED: - return Object.assign(Object.assign({}, state), { - userDatasetLoading: false, - userDatasetsById: Object.assign( - Object.assign({}, state.userDatasetsById), - { - [action.payload.id]: { - isLoading: false, - resource: action.payload.userDataset, - }, - } - ), - }); - case DETAIL_ERROR: - return Object.assign(Object.assign({}, state), { - userDatasetLoading: false, - loadError: action.payload.error, - }); - case DETAIL_UPDATING: - return Object.assign(Object.assign({}, state), { - userDatasetUpdating: true, - updateError: undefined, - }); - case DETAIL_UPDATE_SUCCESS: - return Object.assign(Object.assign({}, state), { - userDatasetUpdating: false, - userDatasetsById: Object.assign( - Object.assign({}, state.userDatasetsById), - { - [action.payload.userDataset.id]: { - isLoading: false, - resource: action.payload.userDataset, - }, - } - ), - }); - case DETAIL_UPDATE_ERROR: - return Object.assign(Object.assign({}, state), { - userDatasetUpdating: false, - updateError: action.payload.error, - }); - case DETAIL_REMOVING: - return Object.assign(Object.assign({}, state), { - userDatasetRemoving: true, - }); - case DETAIL_REMOVE_SUCCESS: - return Object.assign(Object.assign({}, state), { - userDatasetRemoving: false, - removalError: undefined, - }); - case DETAIL_REMOVE_ERROR: - return Object.assign(Object.assign({}, state), { - userDatasetRemoving: false, - removalError: action.payload.error, - }); - case SHARING_SUCCESS: - return Object.assign(Object.assign({}, state), { - userDatasetsById: sharingReducer(state.userDatasetsById, action), - }); - default: - return state; - } -} -//# sourceMappingURL=UserDatasetDetailStoreModule.js.map diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetDetailStoreModule.js.map b/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetDetailStoreModule.js.map deleted file mode 100644 index 32f3555cbf..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetDetailStoreModule.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetDetailStoreModule.js","sourceRoot":"","sources":["../../src/lib/StoreModules/UserDatasetDetailStoreModule.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,cAAc,EACd,eAAe,EACf,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,GAChB,MAAM,gCAAgC,CAAC;AAExC,OAAO,cAAc,MAAM,iDAAiD,CAAC;AAI7E,MAAM,CAAC,MAAM,GAAG,GAAG,mBAAmB,CAAC;AAqBvC,MAAM,YAAY,GAAU;IAC1B,gBAAgB,EAAE,EAAE;IACpB,kBAAkB,EAAE,KAAK;IACzB,mBAAmB,EAAE,KAAK;IAC1B,mBAAmB,EAAE,KAAK;CAC3B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAAC,QAAe,YAAY,EAAE,MAAc;IAChE,QAAQ,M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AK,KACR,mBAAmB,EAAE,KAAK,EAC1B,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,IAClC;QAEJ,KAAK,eAAe;YAClB,uCACK,KAAK,KACR,gBAAgB,EAAE,cAAc,CAAC,KAAK,CAAC,gBAAgB,EAAE,MAAM,CAAC,IAChE;QAEJ;YACE,OAAO,KAAK,CAAC;KAChB;AACH,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetListStoreModule.d.ts b/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetListStoreModule.d.ts deleted file mode 100644 index d85baefcca..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetListStoreModule.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Action } from '../Actions/UserDatasetsActions'; -import { UserDataset } from '../Utils/types'; -export declare const key = 'userDatasetList'; -type InitialState = { - status: 'not-requested'; -}; -type LoadingState = { - status: 'loading'; -}; -type ErrorState = { - status: 'error'; - loadError: Error; -}; -type ForbiddenState = { - status: 'forbidden'; - loadError: Error; -}; -type CompleteState = { - status: 'complete'; - userDatasets: number[]; - userDatasetsById: Record< - string, - { - isLoading: false; - resource: UserDataset; - } - >; - filterByProject: boolean; -}; -export type State = - | InitialState - | LoadingState - | ErrorState - | ForbiddenState - | CompleteState; -export declare function reduce(state: State | undefined, action: Action): State; -export {}; -//# sourceMappingURL=UserDatasetListStoreModule.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetListStoreModule.d.ts.map b/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetListStoreModule.d.ts.map deleted file mode 100644 index c7636c9db8..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetListStoreModule.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetListStoreModule.d.ts","sourceRoot":"","sources":["../../src/lib/StoreModules/UserDatasetListStoreModule.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EAQP,MAAM,gCAAgC,CAAC;AAIxC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,eAAO,MAAM,GAAG,oBAAoB,CAAC;AAErC,KAAK,YAAY,GAAG;IAClB,MAAM,EAAE,eAAe,CAAC;CACzB,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,MAAM,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,KAAK,CAAC;CAClB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,KAAK,CAAC;CAClB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,UAAU,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,KAAK,CAAC;QAAC,QAAQ,EAAE,WAAW,CAAA;KAAE,CAAC,CAAC;IAC9E,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,KAAK,GACb,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,cAAc,GACd,aAAa,CAAC;AAMlB,wBAAgB,MAAM,CAAC,KAAK,mBAAsB,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAqFzE"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetListStoreModule.js b/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetListStoreModule.js deleted file mode 100644 index be4cfae316..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetListStoreModule.js +++ /dev/null @@ -1,88 +0,0 @@ -import { difference } from 'lodash'; -import { - LIST_LOADING, - LIST_RECEIVED, - LIST_ERROR_RECEIVED, - DETAIL_UPDATE_SUCCESS, - DETAIL_REMOVE_SUCCESS, - SHARING_SUCCESS, - PROJECT_FILTER, -} from '../Actions/UserDatasetsActions'; -import sharingReducer from '../Components/Sharing/UserDatasetSharingReducer'; -export const key = 'userDatasetList'; -const initialState = { - status: 'not-requested', -}; -export function reduce(state = initialState, action) { - switch (action.type) { - case LIST_LOADING: - return { - status: 'loading', - }; - case LIST_RECEIVED: - return { - status: 'complete', - filterByProject: action.payload.filterByProject, - userDatasets: action.payload.userDatasets.map((ud) => ud.id), - userDatasetsById: action.payload.userDatasets.reduce( - (uds, ud) => - Object.assign(uds, { [ud.id]: { loading: false, resource: ud } }), - {} - ), - }; - case LIST_ERROR_RECEIVED: - return action.payload.error.status === 403 - ? { - status: 'forbidden', - loadError: action.payload.error, - } - : { - status: 'error', - loadError: action.payload.error, - }; - case DETAIL_UPDATE_SUCCESS: - return state.status === 'complete' - ? Object.assign(Object.assign({}, state), { - userDatasetsById: Object.assign( - Object.assign({}, state.userDatasetsById), - { - [action.payload.userDataset.id]: { - isLoading: false, - resource: action.payload.userDataset, - }, - } - ), - }) - : state; - case DETAIL_REMOVE_SUCCESS: - return state.status === 'complete' - ? Object.assign(Object.assign({}, state), { - userDatasets: difference(state.userDatasets, [ - action.payload.userDataset.id, - ]), - userDatasetsById: Object.assign( - Object.assign({}, state.userDatasetsById), - { [action.payload.userDataset.id]: undefined } - ), - }) - : state; - case SHARING_SUCCESS: { - if (state.status === 'complete') { - const userDatasetsById = sharingReducer(state.userDatasetsById, action); - return Object.assign(Object.assign({}, state), { userDatasetsById }); - } - return state; - } - case PROJECT_FILTER: { - if (state.status === 'complete') { - return Object.assign(Object.assign({}, state), { - filterByProject: action.payload.filterByProject, - }); - } - return state; - } - default: - return state; - } -} -//# sourceMappingURL=UserDatasetListStoreModule.js.map diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetListStoreModule.js.map b/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetListStoreModule.js.map deleted file mode 100644 index 9c59df221d..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetListStoreModule.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetListStoreModule.js","sourceRoot":"","sources":["../../src/lib/StoreModules/UserDatasetListStoreModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAEL,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,cAAc,GACf,MAAM,gCAAgC,CAAC;AAExC,OAAO,cAAc,MAAM,iDAAiD,CAAC;AAI7E,MAAM,CAAC,MAAM,GAAG,GAAG,iBAAiB,CAAC;AAkCrC,MAAM,YAAY,GAAU;IAC1B,MAAM,EAAE,eAAe;CACxB,CAAC;AAEF,MAAM,UAAU,MAAM,CAAC,QAAe,YAAY,EAAE,MAAc;IAChE,QAAQ,MAAM,CAAC,IAAI,EAAE;QACnB,KAAK,YAAY;YACf,OAAO;gBACL,MAAM,EAAE,SAAS;aAClB,CAAC;QAEJ,KAAK,aAAa;YAChB,OAAO;gBACL,MAAM,EAAE,UAAU;gBAClB,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,eAAe;gBAC/C,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;gBAC5D,gBAAgB,EAAE,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,CAClD,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,CACV,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC,EACnE,EAAuC,CACxC;aACF,CAAC;QAEJ,KAAK,mBAAmB;YACtB,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MA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,MAAM,CAAC,OAAO,CAAC,eAAe,GAC/B,CAAC;aACpB;YACD,OAAO,KAAK,CAAC;SACd;QAED;YACE,OAAO,KAAK,CAAC;KAChB;AACH,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetUploadStoreModule.d.ts b/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetUploadStoreModule.d.ts deleted file mode 100644 index 6cc9d46577..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetUploadStoreModule.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { EpicDependencies } from '@veupathdb/wdk-client/lib/Core/Store'; -import { Action } from '../Actions/UserDatasetUploadActions'; -import { StateSlice } from './types'; -import { UserDatasetUpload } from '../Utils/types'; -export declare const key = 'userDatasetUpload'; -export type State = { - uploads?: Array; - badUploadMessage?: { - message: string; - timestamp: number; - }; - badAllUploadsActionMessage?: { - message: string; - timestamp: number; - }; -}; -export declare function reduce(state: State | undefined, action: Action): State; -export declare const observe: import('redux-observable').Epic< - Action, - Action, - StateSlice, - EpicDependencies ->; -//# sourceMappingURL=UserDatasetUploadStoreModule.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetUploadStoreModule.d.ts.map b/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetUploadStoreModule.d.ts.map deleted file mode 100644 index eacd2419bf..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetUploadStoreModule.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetUploadStoreModule.d.ts","sourceRoot":"","sources":["../../src/lib/StoreModules/UserDatasetUploadStoreModule.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EACL,MAAM,EASP,MAAM,qCAAqC,CAAC;AAI7C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGnD,eAAO,MAAM,GAAG,sBAAsB,CAAC;AAEvC,MAAM,MAAM,KAAK,GAAG;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1D,0BAA0B,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;CACrE,CAAC;AACF,wBAAgB,MAAM,CAAC,KAAK,mBAAY,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAa/D;AAED,eAAO,MAAM,OAAO,+EAKnB,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetUploadStoreModule.js b/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetUploadStoreModule.js deleted file mode 100644 index e9f0c6db92..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetUploadStoreModule.js +++ /dev/null @@ -1,159 +0,0 @@ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator['throw'](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -import { combineEpics } from 'redux-observable'; -import { filter, mergeMap } from 'rxjs/operators'; -import { - submitUploadForm, - receiveBadUpload, - requestUploadMessages, - receiveUploadMessages, - cancelCurrentUpload, - clearMessages, - receiveBadUploadHistoryAction, - clearBadUpload, -} from '../Actions/UserDatasetUploadActions'; -import { assertIsUserDatasetUploadCompatibleWdkService } from '../Service/UserDatasetUploadWrappers'; -import { uploadUserDataset } from '../Utils/upload-user-dataset'; -export const key = 'userDatasetUpload'; -export function reduce(state = {}, action) { - switch (action.type) { - case receiveBadUpload.type: - return Object.assign(Object.assign({}, state), { - badUploadMessage: action.payload, - }); - case clearBadUpload.type: - return Object.assign(Object.assign({}, state), { - badUploadMessage: undefined, - }); - case receiveUploadMessages.type: - return Object.assign(Object.assign({}, state), { - uploads: action.payload.uploads, - }); - case receiveBadUploadHistoryAction.type: - return Object.assign(Object.assign({}, state), { - badAllUploadsActionMessage: action.payload, - }); - default: - return state; - } -} -export const observe = combineEpics( - observeSubmitUploadForm, - observeRequestUploadMessages, - observeCancelCurrentUpload, - observeClearMessages -); -function observeSubmitUploadForm(action$, state$, dependencies) { - return action$.pipe( - filter(submitUploadForm.isOfType), - mergeMap((action) => - __awaiter(this, void 0, void 0, function* () { - var _a; - try { - yield uploadUserDataset( - dependencies.wdkService, - action.payload.formSubmission - ); - if (action.payload.redirectTo != null) { - dependencies.transitioner.transitionToInternalPage( - action.payload.redirectTo - ); - } - return requestUploadMessages(); - } catch (err) { - return receiveBadUpload( - (_a = String(err)) !== null && _a !== void 0 - ? _a - : 'Failed to upload dataset' - ); - } - }) - ) - ); -} -function observeRequestUploadMessages(action$, state$, dependencies) { - return action$.pipe( - filter(requestUploadMessages.isOfType), - mergeMap((action) => - __awaiter(this, void 0, void 0, function* () { - assertIsUserDatasetUploadCompatibleWdkService(dependencies.wdkService); - try { - const uploads = yield dependencies.wdkService.listStatusDetails(); - return receiveUploadMessages(uploads); - } catch (err) { - return receiveBadUploadHistoryAction( - 'Could not retrieve upload history\n' + err - ); - } - }) - ) - ); -} -function observeCancelCurrentUpload(action$, state$, dependencies) { - return action$.pipe( - filter(cancelCurrentUpload.isOfType), - mergeMap((action) => - __awaiter(this, void 0, void 0, function* () { - assertIsUserDatasetUploadCompatibleWdkService(dependencies.wdkService); - try { - yield dependencies.wdkService.cancelOngoingUpload(action.payload.id); - return requestUploadMessages(); - } catch (err) { - return receiveBadUploadHistoryAction( - 'Could not cancel current upload\n' + err - ); - } - }) - ) - ); -} -function observeClearMessages(action$, state$, dependencies) { - return action$.pipe( - filter(clearMessages.isOfType), - mergeMap((action) => - __awaiter(this, void 0, void 0, function* () { - assertIsUserDatasetUploadCompatibleWdkService(dependencies.wdkService); - try { - yield dependencies.wdkService.clearMessages(action.payload.ids); - return requestUploadMessages(); - } catch (err) { - return receiveBadUploadHistoryAction( - 'Could not clear messages\n' + err - ); - } - }) - ) - ); -} -//# sourceMappingURL=UserDatasetUploadStoreModule.js.map diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetUploadStoreModule.js.map b/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetUploadStoreModule.js.map deleted file mode 100644 index db532fd9d4..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/UserDatasetUploadStoreModule.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDatasetUploadStoreModule.js","sourceRoot":"","sources":["../../src/lib/StoreModules/UserDatasetUploadStoreModule.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAEL,YAAY,GAEb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAIlD,OAAO,EAEL,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,6BAA6B,EAC7B,cAAc,GACf,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,6CAA6C,EAAE,MAAM,sCAAsC,CAAC;AAKrG,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,MAAM,CAAC,MAAM,GAAG,GAAG,mBAAmB,CAAC;AAOvC,MAAM,UAAU,MAAM,CAAC,QAAe,EAAE,EAAE,MAAc;IACtD,QAAQ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AAM,YAAY,CAAC,UAAU,CAAC,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAChE,OAAO,qBAAqB,EAAE,CAAC;SAChC;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,6BAA6B,CAClC,4BAA4B,GAAG,GAAG,CACnC,CAAC;SACH;IACH,CAAC,CAAA,CAAC,CACH,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/index.d.ts b/packages/libs/user-datasets-legacy/lib/StoreModules/index.d.ts deleted file mode 100644 index 362e5aff99..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/index.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import * as userDatasetDetail from './UserDatasetDetailStoreModule'; -import * as userDatasetList from './UserDatasetListStoreModule'; -import * as userDatasetUpload from './UserDatasetUploadStoreModule'; -type WdkStoreModules = - typeof import('@veupathdb/wdk-client/lib/StoreModules').default; -export declare function wrapStoreModules(storeModules: WdkStoreModules): { - userDatasetDetail: typeof userDatasetDetail; - userDatasetList: typeof userDatasetList; - userDatasetUpload: typeof userDatasetUpload; - answerView: typeof import('@veupathdb/wdk-client/lib/StoreModules/AnswerViewStoreModule'); - attributeAnalysis: typeof import('@veupathdb/wdk-client/lib/StoreModules/AttributeAnalysisStoreModule'); - downloadForm: typeof import('@veupathdb/wdk-client/lib/StoreModules/DownloadFormStoreModule'); - favorites: typeof import('@veupathdb/wdk-client/lib/StoreModules/FavoritesListStoreModule'); - globalData: typeof import('@veupathdb/wdk-client/lib/StoreModules/GlobalData'); - passwordChange: typeof import('@veupathdb/wdk-client/lib/StoreModules/UserPasswordChangeStoreModule'); - passwordReset: typeof import('@veupathdb/wdk-client/lib/StoreModules/UserPasswordResetStoreModule'); - question: typeof import('@veupathdb/wdk-client/lib/StoreModules/QuestionStoreModule'); - questionsWithParameters: typeof import('@veupathdb/wdk-client/lib/StoreModules/QuestionsWithParametersStoreModule'); - record: typeof import('@veupathdb/wdk-client/lib/StoreModules/RecordStoreModule'); - resultTableSummaryView: typeof import('@veupathdb/wdk-client/lib/StoreModules/ResultTableSummaryViewStoreModule'); - siteMap: typeof import('@veupathdb/wdk-client/lib/StoreModules/SiteMapStoreModule'); - importStrategy: typeof import('@veupathdb/wdk-client/lib/StoreModules/ImportStrategyStoreModule'); - stepAnalysis: typeof import('@veupathdb/wdk-client/lib/StoreModules/StepAnalysisStoreModule'); - strategies: typeof import('@veupathdb/wdk-client/lib/StoreModules/StrategyStoreModule'); - strategyPanel: typeof import('@veupathdb/wdk-client/lib/StoreModules/StrategyPanelStoreModule'); - strategyWorkspace: typeof import('@veupathdb/wdk-client/lib/StoreModules/StrategyWorkspaceStoreModule'); - strategyList: typeof import('@veupathdb/wdk-client/lib/StoreModules/StrategyListStoreModule'); - publicStrategies: typeof import('@veupathdb/wdk-client/lib/StoreModules/PublicStrategyStoreModule'); - router: typeof import('@veupathdb/wdk-client/lib/StoreModules/RouterStoreModule'); - userProfile: typeof import('@veupathdb/wdk-client/lib/StoreModules/UserProfileStoreModule'); - userRegistration: typeof import('@veupathdb/wdk-client/lib/StoreModules/UserRegistrationStoreModule'); - wordCloudAnalysis: typeof import('@veupathdb/wdk-client/lib/StoreModules/WordCloudAnalysisStoreModule'); - histogramAnalysis: typeof import('@veupathdb/wdk-client/lib/StoreModules/HistogramAnalysisStoreModule'); - basket: typeof import('@veupathdb/wdk-client/lib/StoreModules/BasketStoreModule'); - resultPanel: typeof import('@veupathdb/wdk-client/lib/StoreModules/ResultPanelStoreModule'); - unhandledErrors: typeof import('@veupathdb/wdk-client/lib/StoreModules/UnhandledErrorStoreModule'); - matchedTranscriptsFilter: typeof import('@veupathdb/wdk-client/lib/StoreModules/MatchedTranscriptsFilterStoreModule'); - userSession: typeof import('@veupathdb/wdk-client/lib/StoreModules/UserSessionStoreModule'); - notification: typeof import('@veupathdb/wdk-client/lib/StoreModules/NotificationStoreModule'); -}; -export {}; -//# sourceMappingURL=index.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/index.d.ts.map b/packages/libs/user-datasets-legacy/lib/StoreModules/index.d.ts.map deleted file mode 100644 index c9d3641070..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/StoreModules/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,eAAe,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,iBAAiB,MAAM,gCAAgC,CAAC;AAEpE,KAAK,eAAe,GAClB,cAAc,wCAAwC,EAAE,OAAO,CAAC;AAElE,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO7D"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/index.js b/packages/libs/user-datasets-legacy/lib/StoreModules/index.js deleted file mode 100644 index 94f7c4bbf4..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/index.js +++ /dev/null @@ -1,11 +0,0 @@ -import * as userDatasetDetail from './UserDatasetDetailStoreModule'; -import * as userDatasetList from './UserDatasetListStoreModule'; -import * as userDatasetUpload from './UserDatasetUploadStoreModule'; -export function wrapStoreModules(storeModules) { - return Object.assign(Object.assign({}, storeModules), { - userDatasetDetail, - userDatasetList, - userDatasetUpload, - }); -} -//# sourceMappingURL=index.js.map diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/index.js.map b/packages/libs/user-datasets-legacy/lib/StoreModules/index.js.map deleted file mode 100644 index c537de7baa..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/StoreModules/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,eAAe,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,iBAAiB,MAAM,gCAAgC,CAAC;AAKpE,MAAM,UAAU,gBAAgB,CAAC,YAA6B;IAC5D,uCACK,YAAY,KACf,iBAAiB;QACjB,eAAe;QACf,iBAAiB,IACjB;AACJ,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/types.d.ts b/packages/libs/user-datasets-legacy/lib/StoreModules/types.d.ts deleted file mode 100644 index 9c95d06dff..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/types.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { RootState } from '@veupathdb/wdk-client/lib/Core/State/Types'; -import { State as UserDatasetDetailState } from './UserDatasetDetailStoreModule'; -import { State as UserDatasetListState } from './UserDatasetListStoreModule'; -import { State as UserDatasetUploadState } from './UserDatasetUploadStoreModule'; -export interface StateSlice extends Pick { - userDatasetDetail: UserDatasetDetailState; - userDatasetList: UserDatasetListState; - userDatasetUpload: UserDatasetUploadState; -} -//# sourceMappingURL=types.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/types.d.ts.map b/packages/libs/user-datasets-legacy/lib/StoreModules/types.d.ts.map deleted file mode 100644 index 82e690376c..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/StoreModules/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AAEvE,OAAO,EAAE,KAAK,IAAI,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAE,KAAK,IAAI,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,KAAK,IAAI,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAEjF,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC;IAC/D,iBAAiB,EAAE,sBAAsB,CAAC;IAC1C,eAAe,EAAE,oBAAoB,CAAC;IACtC,iBAAiB,EAAE,sBAAsB,CAAC;CAC3C"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/types.js b/packages/libs/user-datasets-legacy/lib/StoreModules/types.js deleted file mode 100644 index cd268e9bde..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/types.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=types.js.map diff --git a/packages/libs/user-datasets-legacy/lib/StoreModules/types.js.map b/packages/libs/user-datasets-legacy/lib/StoreModules/types.js.map deleted file mode 100644 index aea5dffd12..0000000000 --- a/packages/libs/user-datasets-legacy/lib/StoreModules/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/lib/StoreModules/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Utils/project-filter.d.ts b/packages/libs/user-datasets-legacy/lib/Utils/project-filter.d.ts deleted file mode 100644 index 3eb4cca864..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Utils/project-filter.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const FILTER_BY_PROJECT_PREF = 'userDatasets.filterByProject'; -//# sourceMappingURL=project-filter.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Utils/project-filter.d.ts.map b/packages/libs/user-datasets-legacy/lib/Utils/project-filter.d.ts.map deleted file mode 100644 index a3a69259b2..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Utils/project-filter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"project-filter.d.ts","sourceRoot":"","sources":["../../src/lib/Utils/project-filter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,iCAAiC,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Utils/project-filter.js b/packages/libs/user-datasets-legacy/lib/Utils/project-filter.js deleted file mode 100644 index aed1ed85b7..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Utils/project-filter.js +++ /dev/null @@ -1,2 +0,0 @@ -export const FILTER_BY_PROJECT_PREF = 'userDatasets.filterByProject'; -//# sourceMappingURL=project-filter.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Utils/project-filter.js.map b/packages/libs/user-datasets-legacy/lib/Utils/project-filter.js.map deleted file mode 100644 index 482eb2c0f6..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Utils/project-filter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"project-filter.js","sourceRoot":"","sources":["../../src/lib/Utils/project-filter.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG,8BAA8B,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Utils/types.d.ts b/packages/libs/user-datasets-legacy/lib/Utils/types.d.ts deleted file mode 100644 index 4109337a87..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Utils/types.d.ts +++ /dev/null @@ -1,142 +0,0 @@ -import React, { ReactNode } from 'react'; -export interface UserDatasetMeta { - description: string; - name: string; - summary: string; -} -export interface UserDatasetShare { - time: number; - user: number; - email: string; - userDisplayName: string; -} -export interface UserDataset { - created: number; - age: number; - isInstalled: boolean; - isCompatible: boolean; - dependencies: Array<{ - resourceDisplayName: string; - resourceIdentifier: string; - resourceVersion: string; - }>; - datafiles: Array<{ - name: string; - size: number; - }>; - projects: string[]; - id: number; - meta: UserDatasetMeta; - modified: number; - owner: string; - ownerUserId: number; - percentQuotaUsed: number; - sharedWith: UserDatasetShare[] | undefined; - questions: string[]; - size: number; - type: { - name: string; - display: string; - version: string; - }; - uploaded: number; -} -export interface UserDatasetUpload { - id: string; - datasetId?: number; - datasetName: string; - summary?: string; - description?: string; - projects: string[]; - status: string; - errors: string[]; - stepPercent?: number; - started: string; - finished?: string; - isOngoing: boolean; - isCancellable: boolean; - isSuccessful: boolean; - isUserError: boolean; -} -export type DatasetUploadTypeConfig = { - [K in T]: DatasetUploadTypeConfigEntry; -}; -export interface DatasetUploadTypeConfigEntry { - type: T; - uploadTitle: string; - formConfig: { - name?: { - inputProps: Partial>; - }; - summary?: { - inputProps: Partial>; - }; - description?: { - inputProps: Partial>; - }; - uploadMethodConfig: { - file?: FileUploadConfig; - url?: UrlUploadConfig; - result?: ResultUploadConfig; - }; - renderInfo?: () => ReactNode; - }; -} -export interface FileUploadConfig { - render?: (props: { fieldNode: ReactNode }) => ReactNode; - maxSizeBytes?: number; -} -export interface UrlUploadConfig { - offer: boolean; -} -export interface ResultUploadConfig { - offerStrategyUpload: boolean; - compatibleRecordTypes: CompatibleRecordTypes; -} -export type CompatibleRecordTypes = Record< - string, - { - reportName: string; - reportConfig: unknown; - } ->; -export type DatasetUploadPageConfig< - T1 extends string = string, - T2 extends string = string -> = - | { - hasDirectUpload: false; - } - | { - hasDirectUpload: true; - availableUploadTypes: T1[]; - uploadTypeConfig: DatasetUploadTypeConfig; - }; -export interface NewUserDataset extends UserDatasetMeta { - datasetType: string; - projects: string[]; - uploadMethod: - | { - type: 'file'; - file: File; - } - | { - type: 'url'; - url: string; - } - | { - type: 'result'; - stepId: number; - reportName: string; - reportConfig: unknown; - }; -} -/** - * In EDA, data is referred to as "Study" or "Studies" - * In genomics, data is referred to as "Data Set" or "Data Sets" - */ -export type DataNoun = { - singular: string; - plural: string; -}; -//# sourceMappingURL=types.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Utils/types.d.ts.map b/packages/libs/user-datasets-legacy/lib/Utils/types.d.ts.map deleted file mode 100644 index 232a4089f8..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Utils/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/Utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EA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GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Utils/types.js b/packages/libs/user-datasets-legacy/lib/Utils/types.js deleted file mode 100644 index cd268e9bde..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Utils/types.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=types.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Utils/types.js.map b/packages/libs/user-datasets-legacy/lib/Utils/types.js.map deleted file mode 100644 index c4dacc1999..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Utils/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/lib/Utils/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Utils/upload-config.d.ts b/packages/libs/user-datasets-legacy/lib/Utils/upload-config.d.ts deleted file mode 100644 index 56b392d89b..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Utils/upload-config.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { DatasetUploadPageConfig, DatasetUploadTypeConfig } from './types'; -type ImplementedUploadTypes = 'biom' | 'gene-list' | 'isasimple'; -export declare const uploadTypeConfig: DatasetUploadTypeConfig; -export declare function makeDatasetUploadPageConfig< - T1 extends string, - T2 extends string ->( - availableUploadTypes: T1[] | undefined, - uploadTypeConfig: DatasetUploadTypeConfig -): DatasetUploadPageConfig; -export {}; -//# sourceMappingURL=upload-config.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Utils/upload-config.d.ts.map b/packages/libs/user-datasets-legacy/lib/Utils/upload-config.d.ts.map deleted file mode 100644 index 9192af888a..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Utils/upload-config.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"upload-config.d.ts","sourceRoot":"","sources":["../../src/lib/Utils/upload-config.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAE3E,KAAK,sBAAsB,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,CAAC;AAEjE,eAAO,MAAM,gBAAgB,EAAE,uBAAuB,CAAC,sBAAsB,CA0F1E,CAAC;AAEJ,wBAAgB,2BAA2B,CACzC,EAAE,SAAS,MAAM,EACjB,EAAE,SAAS,MAAM,EAEjB,oBAAoB,kBAAW,EAC/B,gBAAgB,EAAE,uBAAuB,CAAC,EAAE,CAAC,GAC5C,uBAAuB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAatC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Utils/upload-config.js b/packages/libs/user-datasets-legacy/lib/Utils/upload-config.js deleted file mode 100644 index 1aaa6aafbc..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Utils/upload-config.js +++ /dev/null @@ -1,136 +0,0 @@ -import { - jsx as _jsx, - jsxs as _jsxs, - Fragment as _Fragment, -} from 'react/jsx-runtime'; -import { intersection } from 'lodash'; -export const uploadTypeConfig = { - biom: { - type: 'biom', - uploadTitle: 'Upload My Data Set', - formConfig: { - renderInfo: () => - _jsxs( - 'p', - Object.assign( - { className: 'formInfo' }, - { - children: [ - 'We accept any file in the', - ' ', - _jsx( - 'a', - Object.assign( - { href: 'http://biom-format.org' }, - { children: 'BIOM format' } - ) - ), - ', either JSON-based (BIOM 1.0) or HDF5 (BIOM 2.0+). The maximum allowed file size is 1GB.', - _jsx('br', {}), - _jsx('br', {}), - 'If possible, try including taxonomic information and rich sample details in your file. This will allow you to select groups of samples and create meaningful comparisons at a desired aggregation level, using our filtering and visualisation tools.', - ], - } - ) - ), - uploadMethodConfig: { - file: { - maxSizeBytes: 1e7, - render: ({ fieldNode }) => - _jsxs(_Fragment, { - children: [ - fieldNode, - _jsx( - 'div', - Object.assign( - { style: { marginTop: '0.25em' } }, - { children: 'File must be 10 MB or smaller.' } - ) - ), - ], - }), - }, - }, - }, - }, - 'gene-list': { - type: 'gene-list', - uploadTitle: 'Upload My Gene List', - formConfig: { - uploadMethodConfig: { - result: { - offerStrategyUpload: false, - compatibleRecordTypes: { - transcript: { - reportName: 'attributesTabular', - reportConfig: { - attributes: ['primary_key'], - includeHeader: false, - attachmentType: 'plain', - applyFilter: true, - }, - }, - }, - }, - }, - }, - }, - isasimple: { - type: 'isasimple', - uploadTitle: 'Upload My Study', - formConfig: { - summary: { - inputProps: { - placeholder: 'brief summary of the data set in 1-2 sentences', - }, - }, - description: { - inputProps: { - required: false, - placeholder: - 'optional longer description of the data set including background, study objectives, methodology, etc.', - }, - }, - uploadMethodConfig: { - file: { - render: ({ fieldNode }) => - _jsxs(_Fragment, { - children: [ - fieldNode, - _jsx( - 'div', - Object.assign( - { style: { marginTop: '0.25em' } }, - { - children: - 'File must be a .csv, .tsv, or tab-delimited .txt file', - } - ) - ), - ], - }), - }, - url: { - offer: false, - }, - }, - }, - }, -}; -export function makeDatasetUploadPageConfig( - availableUploadTypes = [], - uploadTypeConfig -) { - const restrictedUploadTypes = intersection( - availableUploadTypes, - Object.keys(uploadTypeConfig) - ); - return restrictedUploadTypes.length === 0 - ? { hasDirectUpload: false } - : { - hasDirectUpload: true, - availableUploadTypes: restrictedUploadTypes, - uploadTypeConfig, - }; -} -//# sourceMappingURL=upload-config.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Utils/upload-config.js.map b/packages/libs/user-datasets-legacy/lib/Utils/upload-config.js.map deleted file mode 100644 index 4d99bb45ef..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Utils/upload-config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"upload-config.js","sourceRoot":"","sources":["../../src/lib/Utils/upload-config.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAMtC,MAAM,CAAC,MAAM,gBAAgB,GAC3B;IACE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ACzB,8BACG,SAAS,EACV,4BAAK,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,2EAE7B,IACL,CACJ;iBACF;gBACD,GAAG,EAAE;oBACH,KAAK,EAAE,KAAK;iBACb;aACF;SACF;KACF;CACF,CAAC;AAEJ,MAAM,UAAU,2BAA2B,CAIzC,uBAA6B,EAAE,EAC/B,gBAA6C;IAE7C,MAAM,qBAAqB,GAAG,YAAY,CACxC,oBAAoB,EACpB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CACf,CAAC;IAEjB,OAAO,qBAAqB,CAAC,MAAM,KAAK,CAAC;QACvC,CAAC,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE;QAC5B,CAAC,CAAC;YACE,eAAe,EAAE,IAAI;YACrB,oBAAoB,EAAE,qBAAqB;YAC3C,gBAAgB;SACjB,CAAC;AACR,CAAC"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Utils/upload-user-dataset.d.ts b/packages/libs/user-datasets-legacy/lib/Utils/upload-user-dataset.d.ts deleted file mode 100644 index 4445363ce1..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Utils/upload-user-dataset.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { WdkService } from '@veupathdb/wdk-client/lib/Core'; -import { FormSubmission } from '../Components/UploadForm'; -import { NewUserDataset } from './types'; -export declare function uploadUserDataset( - wdkService: WdkService, - formSubmission: FormSubmission -): Promise; -export declare function makeNewUserDatasetConfig( - wdkService: WdkService, - formSubmission: FormSubmission -): Promise; -//# sourceMappingURL=upload-user-dataset.d.ts.map diff --git a/packages/libs/user-datasets-legacy/lib/Utils/upload-user-dataset.d.ts.map b/packages/libs/user-datasets-legacy/lib/Utils/upload-user-dataset.d.ts.map deleted file mode 100644 index 5ee93c50eb..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Utils/upload-user-dataset.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"upload-user-dataset.d.ts","sourceRoot":"","sources":["../../src/lib/Utils/upload-user-dataset.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG1D,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,iBAU/B;AAED,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,GAC7B,OAAO,CAAC,cAAc,CAAC,CA4BzB"} \ No newline at end of file diff --git a/packages/libs/user-datasets-legacy/lib/Utils/upload-user-dataset.js b/packages/libs/user-datasets-legacy/lib/Utils/upload-user-dataset.js deleted file mode 100644 index 5c4b70e958..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Utils/upload-user-dataset.js +++ /dev/null @@ -1,69 +0,0 @@ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator['throw'](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done - ? resolve(result.value) - : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -import { assertIsUserDatasetUploadCompatibleWdkService } from '../Service/UserDatasetUploadWrappers'; -export function uploadUserDataset(wdkService, formSubmission) { - return __awaiter(this, void 0, void 0, function* () { - assertIsUserDatasetUploadCompatibleWdkService(wdkService); - const newUserDatasetConfig = yield makeNewUserDatasetConfig( - wdkService, - formSubmission - ); - return yield wdkService.addDataset(newUserDatasetConfig); - }); -} -export function makeNewUserDatasetConfig(wdkService, formSubmission) { - return __awaiter(this, void 0, void 0, function* () { - if (formSubmission.dataUploadSelection.type !== 'result') { - return Object.assign(Object.assign({}, formSubmission), { - uploadMethod: formSubmission.dataUploadSelection, - }); - } - const { compatibleRecordTypes, stepId } = - formSubmission.dataUploadSelection; - const { recordClassName } = yield wdkService.findStep(stepId); - const resultReportSettings = compatibleRecordTypes[recordClassName]; - if (resultReportSettings == null) { - throw new Error( - `Tried to upload a result (step id ${stepId}) with an incompatible record type ${recordClassName}.` - ); - } - return Object.assign(Object.assign({}, formSubmission), { - uploadMethod: Object.assign( - { type: 'result', stepId }, - resultReportSettings - ), - }); - }); -} -//# sourceMappingURL=upload-user-dataset.js.map diff --git a/packages/libs/user-datasets-legacy/lib/Utils/upload-user-dataset.js.map b/packages/libs/user-datasets-legacy/lib/Utils/upload-user-dataset.js.map deleted file mode 100644 index bf34c13bf5..0000000000 --- a/packages/libs/user-datasets-legacy/lib/Utils/upload-user-dataset.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"upload-user-dataset.js","sourceRoot":"","sources":["../../src/lib/Utils/upload-user-dataset.tsx"],"names":[],"mappings":";;;;;;;;;AAGA,OAAO,EAAE,6CAA6C,EAAE,MAAM,sCAAsC,CAAC;AAIrG,MAAM,UAAgB,iBAAiB,CACrC,UAAsB,EACtB,cAA8B;;QAE9B,6CAA6C,CAAC,UAAU,CAAC,CAAC;QAE1D,MAAM,oBAAoB,GAAG,MAAM,wBAAwB,CACzD,UAAU,EACV,cAAc,CACf,CAAC;QAEF,OAAO,MAAM,UAAU,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC3D,CAAC;CAAA;AAED,MAAM,UAAgB,wBAAwB,CAC5C,UAAsB,EACtB,cAA8B;;QAE9B,IAAI,cAAc,CAAC,mBAAmB,CAAC,IAAI,KAAK,QAAQ,EAAE;YACxD,uCACK,cAAc,KACjB,YAAY,EAAE,cAAc,CAAC,mBAAmB,IAChD;SACH;QAED,MAAM,EAAE,qBAAqB,EAAE,MAAM,EAAE,GAAG,cAAc,CAAC,mBAAmB,CAAC;QAE7E,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAE9D,MAAM,oBAAoB,GAAG,qBAAqB,CAAC,eAAe,CAAC,CAAC;QAEpE,IAAI,oBAAoB,IAAI,IAAI,EAAE;YAChC,MAAM,IAAI,KAAK,CACb,qCAAqC,MAAM,sCAAsC,eAAe,GAAG,CACpG,CAAC;SACH;QAED,uCACK,cAAc,KACjB,YAAY,kBACV,IAAI,EAAE,QAAQ,EACd,MAAM,IACH,oBAAoB,KAEzB;IACJ,CAAC;CAAA"} \ No newline at end of file diff --git a/packages/libs/user-datasets/src/lib/Controllers/UserDatasetDetailController.tsx b/packages/libs/user-datasets/src/lib/Controllers/UserDatasetDetailController.tsx index da02091b16..ff505731aa 100644 --- a/packages/libs/user-datasets/src/lib/Controllers/UserDatasetDetailController.tsx +++ b/packages/libs/user-datasets/src/lib/Controllers/UserDatasetDetailController.tsx @@ -29,6 +29,7 @@ import { quotaSize } from '../Components/UserDatasetUtils'; import { StateSlice } from '../StoreModules/types'; import { DataNoun } from '../Utils/types'; +import { Loading } from '@veupathdb/wdk-client/lib/Components'; const ActionCreators = { showLoginForm, @@ -254,10 +255,10 @@ class UserDatasetDetailController extends PageController { updateDatasetCommunityVisibilitySuccess, }; - const DetailView = this.getDetailView( - typeof entry?.resource === 'object' ? entry.resource.type : null - ); - return entry?.resource?.meta.visibility !== 'public' && + if (entry?.resource == null) return ; + + const DetailView = this.getDetailView(typeof entry.resource.type); + return entry.resource.meta.visibility !== 'public' && user && user.isGuest ? ( this.renderGuestView()