From 05d833c83c4eee7dca2614599334f0a339154c37 Mon Sep 17 00:00:00 2001 From: nsemets Date: Wed, 26 Nov 2025 14:12:42 +0200 Subject: [PATCH 1/2] fix(duplicates): updated duplicates and fixed imports --- src/app/app.routes.ts | 5 +- .../confirm-move-file-dialog.component.ts | 2 +- .../move-file-dialog.component.ts | 4 +- .../files/pages/files/files.component.ts | 8 +-- src/app/features/files/store/files.actions.ts | 6 +- src/app/features/files/store/files.state.ts | 10 +-- .../general-information.component.ts | 4 +- .../preprint-tombstone.component.ts | 4 +- .../stepper/file-step/file-step.component.ts | 4 +- .../create-new-version.component.ts | 11 +-- .../preprint-details.component.ts | 8 +-- .../select-preprint-service.component.html | 2 +- .../submit-preprint-stepper.component.ts | 10 ++- .../update-preprint-stepper.component.ts | 13 ++-- .../preprint-stepper.actions.ts | 8 +-- .../preprint-stepper.model.ts | 63 ++++++++++++++-- .../preprint-stepper.state.ts | 71 +++---------------- .../store/preprint/preprint.actions.ts | 6 +- .../store/preprint/preprint.state.ts | 10 +-- .../files-widget/files-widget.component.ts | 8 +-- .../files-control/files-control.component.ts | 4 +- src/app/features/registries/pages/index.ts | 2 - .../features/registries/registries.routes.ts | 9 ++- src/app/features/registries/services/index.ts | 3 - ...e.ts => registrations-licenses.service.ts} | 2 +- .../store/handlers/licenses.handlers.ts | 8 +-- .../store/handlers/providers.handlers.ts | 3 +- .../registries/store/registries.actions.ts | 4 +- .../registries/store/registries.state.ts | 8 +-- .../shared/stores/licenses/licenses.state.ts | 14 +--- 30 files changed, 157 insertions(+), 157 deletions(-) delete mode 100644 src/app/features/registries/pages/index.ts delete mode 100644 src/app/features/registries/services/index.ts rename src/app/features/registries/services/{licenses.service.ts => registrations-licenses.service.ts} (98%) diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index e66d321f2..b33808b45 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -74,7 +74,10 @@ export const routes: Routes = [ { path: 'my-registrations', canActivate: [authGuard], - loadComponent: () => import('@osf/features/registries/pages').then((c) => c.MyRegistrationsComponent), + loadComponent: () => + import('@osf/features/registries/pages/my-registrations/my-registrations.component').then( + (c) => c.MyRegistrationsComponent + ), providers: [ provideStates([RegistriesState]), ProvidersHandlers, diff --git a/src/app/features/files/components/confirm-move-file-dialog/confirm-move-file-dialog.component.ts b/src/app/features/files/components/confirm-move-file-dialog/confirm-move-file-dialog.component.ts index 82667ec46..a57e288d9 100644 --- a/src/app/features/files/components/confirm-move-file-dialog/confirm-move-file-dialog.component.ts +++ b/src/app/features/files/components/confirm-move-file-dialog/confirm-move-file-dialog.component.ts @@ -19,7 +19,7 @@ import { FileMenuType } from '@shared/enums/file-menu-type.enum'; import { FileModel } from '@shared/models/files/file.model'; @Component({ - selector: 'osf-move-file-dialog', + selector: 'osf-confirm-move-file-dialog', imports: [Button, TranslatePipe], templateUrl: './confirm-move-file-dialog.component.html', styleUrl: './confirm-move-file-dialog.component.scss', diff --git a/src/app/features/files/components/move-file-dialog/move-file-dialog.component.ts b/src/app/features/files/components/move-file-dialog/move-file-dialog.component.ts index 4374dade2..b9d5863bb 100644 --- a/src/app/features/files/components/move-file-dialog/move-file-dialog.component.ts +++ b/src/app/features/files/components/move-file-dialog/move-file-dialog.component.ts @@ -17,7 +17,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { FilesSelectors, GetMoveDialogFiles, - SetCurrentFolder, + SetFilesCurrentFolder, SetMoveDialogCurrentFolder, } from '@osf/features/files/store'; import { FileSelectDestinationComponent } from '@osf/shared/components/file-select-destination/file-select-destination.component'; @@ -80,7 +80,7 @@ export class MoveFileDialogComponent { readonly actions = createDispatchMap({ getMoveDialogFiles: GetMoveDialogFiles, setMoveDialogCurrentFolder: SetMoveDialogCurrentFolder, - setCurrentFolder: SetCurrentFolder, + setCurrentFolder: SetFilesCurrentFolder, getResourceDetails: GetResourceDetails, getComponentsTree: GetResourceWithChildren, }); diff --git a/src/app/features/files/pages/files/files.component.ts b/src/app/features/files/pages/files/files.component.ts index 3653caa67..728831377 100644 --- a/src/app/features/files/pages/files/files.component.ts +++ b/src/app/features/files/pages/files/files.component.ts @@ -46,9 +46,9 @@ import { GetRootFolders, GetStorageSupportedFeatures, RenameEntry, - ResetState, - SetCurrentFolder, + ResetFilesState, SetCurrentProvider, + SetFilesCurrentFolder, SetMoveDialogCurrentFolder, SetSearch, SetSort, @@ -138,14 +138,14 @@ export class FilesComponent { getFiles: GetFiles, deleteEntry: DeleteEntry, renameEntry: RenameEntry, - setCurrentFolder: SetCurrentFolder, + setCurrentFolder: SetFilesCurrentFolder, setMoveDialogCurrentFolder: SetMoveDialogCurrentFolder, setSearch: SetSearch, setSort: SetSort, getRootFolders: GetRootFolders, getConfiguredStorageAddons: GetConfiguredStorageAddons, setCurrentProvider: SetCurrentProvider, - resetState: ResetState, + resetState: ResetFilesState, getResourceDetails: GetResourceDetails, getStorageSupportedFeatures: GetStorageSupportedFeatures, }); diff --git a/src/app/features/files/store/files.actions.ts b/src/app/features/files/store/files.actions.ts index effb868b5..999863b71 100644 --- a/src/app/features/files/store/files.actions.ts +++ b/src/app/features/files/store/files.actions.ts @@ -32,8 +32,8 @@ export class SetSort { constructor(public sort: string) {} } -export class SetCurrentFolder { - static readonly type = '[Files] Set Current Folder'; +export class SetFilesCurrentFolder { + static readonly type = '[Files] Set Files Current Folder'; constructor(public folder: FileFolderModel | null) {} } @@ -161,6 +161,6 @@ export class GetStorageSupportedFeatures { ) {} } -export class ResetState { +export class ResetFilesState { static readonly type = '[Files] Reset State'; } diff --git a/src/app/features/files/store/files.state.ts b/src/app/features/files/store/files.state.ts index b9d718298..aee3c7015 100644 --- a/src/app/features/files/store/files.state.ts +++ b/src/app/features/files/store/files.state.ts @@ -27,10 +27,10 @@ import { GetRootFolders, GetStorageSupportedFeatures, RenameEntry, - ResetState, - SetCurrentFolder, + ResetFilesState, SetCurrentProvider, SetFileMetadata, + SetFilesCurrentFolder, SetMoveDialogCurrentFolder, SetSearch, SetSort, @@ -91,8 +91,8 @@ export class FilesState { ); } - @Action(SetCurrentFolder) - setSelectedFolder(ctx: StateContext, action: SetCurrentFolder) { + @Action(SetFilesCurrentFolder) + setSelectedFolder(ctx: StateContext, action: SetFilesCurrentFolder) { ctx.patchState({ currentFolder: action.folder }); } @@ -357,7 +357,7 @@ export class FilesState { ); } - @Action(ResetState) + @Action(ResetFilesState) resetState(ctx: StateContext) { ctx.patchState(FILES_STATE_DEFAULTS); } diff --git a/src/app/features/preprints/components/preprint-details/general-information/general-information.component.ts b/src/app/features/preprints/components/preprint-details/general-information/general-information.component.ts index 608628a48..29eb2571b 100644 --- a/src/app/features/preprints/components/preprint-details/general-information/general-information.component.ts +++ b/src/app/features/preprints/components/preprint-details/general-information/general-information.component.ts @@ -11,7 +11,7 @@ import { FormsModule } from '@angular/forms'; import { ENVIRONMENT } from '@core/provider/environment.provider'; import { ApplicabilityStatus, PreregLinkInfo } from '@osf/features/preprints/enums'; import { PreprintProviderDetails } from '@osf/features/preprints/models'; -import { FetchPreprintById, PreprintSelectors } from '@osf/features/preprints/store/preprint'; +import { FetchPreprintDetails, PreprintSelectors } from '@osf/features/preprints/store/preprint'; import { AffiliatedInstitutionsViewComponent } from '@osf/shared/components/affiliated-institutions-view/affiliated-institutions-view.component'; import { ContributorsListComponent } from '@osf/shared/components/contributors-list/contributors-list.component'; import { IconComponent } from '@osf/shared/components/icon/icon.component'; @@ -55,7 +55,7 @@ export class GeneralInformationComponent implements OnDestroy { private actions = createDispatchMap({ getBibliographicContributors: GetBibliographicContributors, resetContributorsState: ResetContributorsState, - fetchPreprintById: FetchPreprintById, + fetchPreprintById: FetchPreprintDetails, fetchResourceInstitutions: FetchResourceInstitutions, loadMoreBibliographicContributors: LoadMoreBibliographicContributors, }); diff --git a/src/app/features/preprints/components/preprint-details/preprint-tombstone/preprint-tombstone.component.ts b/src/app/features/preprints/components/preprint-details/preprint-tombstone/preprint-tombstone.component.ts index 341290d97..2023c666e 100644 --- a/src/app/features/preprints/components/preprint-details/preprint-tombstone/preprint-tombstone.component.ts +++ b/src/app/features/preprints/components/preprint-details/preprint-tombstone/preprint-tombstone.component.ts @@ -12,7 +12,7 @@ import { Router } from '@angular/router'; import { ApplicabilityStatus, PreregLinkInfo } from '@osf/features/preprints/enums'; import { PreprintProviderDetails } from '@osf/features/preprints/models'; -import { FetchPreprintById, PreprintSelectors } from '@osf/features/preprints/store/preprint'; +import { FetchPreprintDetails, PreprintSelectors } from '@osf/features/preprints/store/preprint'; import { ContributorsListComponent } from '@osf/shared/components/contributors-list/contributors-list.component'; import { LicenseDisplayComponent } from '@osf/shared/components/license-display/license-display.component'; import { TruncatedTextComponent } from '@osf/shared/components/truncated-text/truncated-text.component'; @@ -51,7 +51,7 @@ export class PreprintTombstoneComponent implements OnDestroy { private actions = createDispatchMap({ getBibliographicContributors: GetBibliographicContributors, resetContributorsState: ResetContributorsState, - fetchPreprintById: FetchPreprintById, + fetchPreprintById: FetchPreprintDetails, fetchSubjects: FetchSelectedSubjects, loadMoreBibliographicContributors: LoadMoreBibliographicContributors, }); diff --git a/src/app/features/preprints/components/stepper/file-step/file-step.component.ts b/src/app/features/preprints/components/stepper/file-step/file-step.component.ts index ed7803353..99b5601fd 100644 --- a/src/app/features/preprints/components/stepper/file-step/file-step.component.ts +++ b/src/app/features/preprints/components/stepper/file-step/file-step.component.ts @@ -35,7 +35,7 @@ import { FetchProjectFilesByLink, PreprintStepperSelectors, ReuploadFile, - SetCurrentFolder, + SetPreprintStepperCurrentFolder, SetProjectRootFolder, SetSelectedPreprintFileSource, UploadFile, @@ -80,7 +80,7 @@ export class FileStepComponent implements OnInit { setProjectRootFolder: SetProjectRootFolder, getProjectFilesByLink: FetchProjectFilesByLink, copyFileFromProject: CopyFileFromProject, - setCurrentFolder: SetCurrentFolder, + setCurrentFolder: SetPreprintStepperCurrentFolder, }); private destroyRef = inject(DestroyRef); diff --git a/src/app/features/preprints/pages/create-new-version/create-new-version.component.ts b/src/app/features/preprints/pages/create-new-version/create-new-version.component.ts index d59bfa609..c3d69bbde 100644 --- a/src/app/features/preprints/pages/create-new-version/create-new-version.component.ts +++ b/src/app/features/preprints/pages/create-new-version/create-new-version.component.ts @@ -20,7 +20,6 @@ import { import { toSignal } from '@angular/core/rxjs-interop'; import { ActivatedRoute, Router } from '@angular/router'; -import { ResetState } from '@osf/features/files/store'; import { StepperComponent } from '@osf/shared/components/stepper/stepper.component'; import { IS_WEB } from '@osf/shared/helpers/breakpoints.tokens'; import { BrowserTabHelper } from '@osf/shared/helpers/browser-tab.helper'; @@ -32,9 +31,13 @@ import { BrandService } from '@osf/shared/services/brand.service'; import { FileStepComponent, ReviewStepComponent } from '../../components'; import { createNewVersionStepsConst } from '../../constants'; import { PreprintSteps } from '../../enums'; -import { FetchPreprintById } from '../../store/preprint'; import { GetPreprintProviderById, PreprintProvidersSelectors } from '../../store/preprint-providers'; -import { PreprintStepperSelectors, SetSelectedPreprintProviderId } from '../../store/preprint-stepper'; +import { + FetchPreprintById, + PreprintStepperSelectors, + ResetPreprintStepperState, + SetSelectedPreprintProviderId, +} from '../../store/preprint-stepper'; @Component({ selector: 'osf-create-new-version', @@ -55,7 +58,7 @@ export class CreateNewVersionComponent implements OnInit, OnDestroy, CanDeactiva private actions = createDispatchMap({ getPreprintProviderById: GetPreprintProviderById, setSelectedPreprintProviderId: SetSelectedPreprintProviderId, - resetState: ResetState, + resetState: ResetPreprintStepperState, fetchPreprint: FetchPreprintById, }); diff --git a/src/app/features/preprints/pages/preprint-details/preprint-details.component.ts b/src/app/features/preprints/pages/preprint-details/preprint-details.component.ts index 31d8ecb41..990cb4c32 100644 --- a/src/app/features/preprints/pages/preprint-details/preprint-details.component.ts +++ b/src/app/features/preprints/pages/preprint-details/preprint-details.component.ts @@ -28,7 +28,6 @@ import { HelpScoutService } from '@core/services/help-scout.service'; import { PrerenderReadyService } from '@core/services/prerender-ready.service'; import { ClearCurrentProvider } from '@core/store/provider'; import { UserSelectors } from '@core/store/user'; -import { ResetState } from '@osf/features/files/store'; import { ReviewPermissions } from '@osf/shared/enums/review-permissions.enum'; import { pathJoin } from '@osf/shared/helpers/path-join.helper'; import { FixSpecialCharPipe } from '@osf/shared/pipes/fix-special-char.pipe'; @@ -54,11 +53,12 @@ import { } from '../../components'; import { PreprintRequestMachineState, ProviderReviewsWorkflow, ReviewsState } from '../../enums'; import { - FetchPreprintById, + FetchPreprintDetails, FetchPreprintRequestActions, FetchPreprintRequests, FetchPreprintReviewActions, PreprintSelectors, + ResetPreprintState, } from '../../store/preprint'; import { GetPreprintProviderById, PreprintProvidersSelectors } from '../../store/preprint-providers'; import { CreateNewVersion, PreprintStepperSelectors } from '../../store/preprint-stepper'; @@ -110,8 +110,8 @@ export class PreprintDetailsComponent implements OnInit, OnDestroy { private actions = createDispatchMap({ getPreprintProviderById: GetPreprintProviderById, - resetState: ResetState, - fetchPreprintById: FetchPreprintById, + resetState: ResetPreprintState, + fetchPreprintById: FetchPreprintDetails, createNewVersion: CreateNewVersion, fetchPreprintRequests: FetchPreprintRequests, fetchPreprintReviewActions: FetchPreprintReviewActions, diff --git a/src/app/features/preprints/pages/select-preprint-service/select-preprint-service.component.html b/src/app/features/preprints/pages/select-preprint-service/select-preprint-service.component.html index 3bc727057..7db2cdfb8 100644 --- a/src/app/features/preprints/pages/select-preprint-service/select-preprint-service.component.html +++ b/src/app/features/preprints/pages/select-preprint-service/select-preprint-service.component.html @@ -41,7 +41,7 @@

{{ 'preprints.selectService.sectionTitle' | translate }}

[alt]="'preprints.selectService.providerLogoImageAlt' | translate" /> -

{{ provider.name }}

+

{{ provider.name }}