Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"@angular/platform-browser": "^19.2.0",
"@angular/platform-browser-dynamic": "^19.2.0",
"@angular/router": "^19.2.0",
"@angular/service-worker": "^19.2.0",
"@fortawesome/fontawesome-free": "^6.7.2",
"@ngx-translate/core": "^16.0.4",
"@ngx-translate/http-loader": "^16.0.1",
Expand Down
8 changes: 4 additions & 4 deletions src/app/core/components/breadcrumb/breadcrumb.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class BreadcrumbComponent {
private readonly router = inject(Router);
private readonly route = inject(ActivatedRoute);

protected readonly url = toSignal(
readonly url = toSignal(
this.router.events.pipe(
filter((event) => event instanceof NavigationEnd),
map(() => this.router.url),
Expand All @@ -26,7 +26,7 @@ export class BreadcrumbComponent {
{ initialValue: this.router.url }
);

protected readonly routeData = toSignal(
readonly routeData = toSignal(
this.router.events.pipe(
filter((event) => event instanceof NavigationEnd),
map(() => this.getCurrentRouteData()),
Expand All @@ -35,9 +35,9 @@ export class BreadcrumbComponent {
{ initialValue: { skipBreadcrumbs: false } as RouteData }
);

protected readonly showBreadcrumb = computed(() => this.routeData()?.skipBreadcrumbs !== true);
readonly showBreadcrumb = computed(() => this.routeData()?.skipBreadcrumbs !== true);

protected readonly parsedUrl = computed(() =>
readonly parsedUrl = computed(() =>
this.url()
.split('?')[0]
.split('/')
Expand Down
8 changes: 4 additions & 4 deletions src/app/core/components/footer/footer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</div>
</div>

<div class="footer-socials flex justify-content-center align-items-center" [class]="isWeb() ? 'm-y-12' : 'm-y-24'">
<div class="footer-socials flex justify-content-center align-items-center" [class]="isWeb() ? 'my-3' : 'my-4'">
@for (icon of socialIcons; track icon.name) {
<a
class="social-link flex align-items-center justify-content-center"
Expand All @@ -21,9 +21,9 @@

<div
class="footer-secondary-nav flex flex-column justify-content-center align-items-center md:flex-row md:justify-content-between"
[class.m-t-24]="!isWeb()"
[class.mt-4]="!isWeb()"
>
<div class="footer-links flex flex-wrap justify-content-center m-t-4">
<div class="footer-links flex flex-wrap justify-content-center mt-1">
<a routerLink="/terms-of-use">{{ 'footer.links.termsOfUse' | translate }}</a>

<span class="separator">|</span>
Expand All @@ -43,6 +43,6 @@
<a href="https://www.cos.io/initiatives/top-guidelines">{{ 'footer.links.topGuidelines' | translate }}</a>
</div>

<div class="flex justify-content-center m-y-12">{{ 'footer.copyright' | translate }}</div>
<div class="flex justify-content-center my-3">{{ 'footer.copyright' | translate }}</div>
</div>
</footer>
2 changes: 1 addition & 1 deletion src/app/core/components/footer/footer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ import { IS_WEB } from '@osf/shared/helpers';
export class FooterComponent {
isWeb = toSignal(inject(IS_WEB));

protected readonly socialIcons = SOCIAL_ICONS;
readonly socialIcons = SOCIAL_ICONS;
}
16 changes: 8 additions & 8 deletions src/app/core/components/nav-menu/nav-menu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class NavMenuComponent {
private readonly isAuthenticated = select(UserSelectors.isAuthenticated);
private readonly currentResource = select(CurrentResourceSelectors.getCurrentResource);

protected readonly mainMenuItems = computed(() => {
readonly mainMenuItems = computed(() => {
const isAuthenticated = this.isAuthenticated();
const filtered = filterMenuItems(MENU_ITEMS, isAuthenticated);

Expand All @@ -63,7 +63,7 @@ export class NavMenuComponent {
return items;
});

protected readonly currentRoute = toSignal(
readonly currentRoute = toSignal(
this.router.events.pipe(
filter((event): event is NavigationEnd => event instanceof NavigationEnd),
map(() => this.getRouteInfo())
Expand All @@ -73,11 +73,11 @@ export class NavMenuComponent {
}
);

protected readonly currentResourceId = computed(() => this.currentRoute().resourceId);
protected readonly currentProviderId = computed(() => this.currentRoute().providerId);
protected readonly isCollectionsRoute = computed(() => this.currentRoute().isCollectionsWithId);
protected readonly isPreprintRoute = computed(() => this.currentRoute().isPreprintRoute);
protected readonly canUserViewReviews = select(UserSelectors.getCanViewReviews);
readonly currentResourceId = computed(() => this.currentRoute().resourceId);
readonly currentProviderId = computed(() => this.currentRoute().providerId);
readonly isCollectionsRoute = computed(() => this.currentRoute().isCollectionsWithId);
readonly isPreprintRoute = computed(() => this.currentRoute().isPreprintRoute);
readonly canUserViewReviews = select(UserSelectors.getCanViewReviews);

private getRouteInfo() {
const urlSegments = this.router.url.split('/').filter((segment) => segment);
Expand Down Expand Up @@ -115,6 +115,6 @@ export class NavMenuComponent {
}
}

protected readonly hasVisibleChildren = (item: MenuItem): boolean =>
readonly hasVisibleChildren = (item: MenuItem): boolean =>
Array.isArray(item.items) && item.items.some((child) => !!child.visible);
}
2 changes: 1 addition & 1 deletion src/app/core/components/sidenav/sidenav.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<aside class="custom-scrollbar flex flex-column p-4 h-full">
<img ngSrc="assets/images/logo.svg" alt="OSF Logo" height="36" width="106" />
<osf-nav-menu class="m-t-36" />
<osf-nav-menu class="mt-5" />
</aside>
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,26 @@ export class InstitutionsSummaryComponent implements OnInit {
rightsSearch = select(InstitutionsAdminSelectors.getSearchResults);
rightsLoading = select(InstitutionsAdminSelectors.getSearchResultsLoading);

protected departmentLabels: string[] = [];
protected departmentDataset: DatasetInput[] = [];
departmentLabels: string[] = [];
departmentDataset: DatasetInput[] = [];

protected projectsLabels: string[] = [];
protected projectDataset: DatasetInput[] = [];
projectsLabels: string[] = [];
projectDataset: DatasetInput[] = [];

protected registrationsLabels: string[] = [];
protected registrationsDataset: DatasetInput[] = [];
registrationsLabels: string[] = [];
registrationsDataset: DatasetInput[] = [];

protected osfProjectsLabels: string[] = [];
protected osfProjectsDataset: DatasetInput[] = [];
osfProjectsLabels: string[] = [];
osfProjectsDataset: DatasetInput[] = [];

protected storageLabels: string[] = [];
protected storageDataset: DatasetInput[] = [];
storageLabels: string[] = [];
storageDataset: DatasetInput[] = [];

protected licenceLabels: string[] = [];
protected licenceDataset: DatasetInput[] = [];
licenceLabels: string[] = [];
licenceDataset: DatasetInput[] = [];

protected addonLabels: string[] = [];
protected addonDataset: DatasetInput[] = [];
addonLabels: string[] = [];
addonDataset: DatasetInput[] = [];

private readonly actions = createDispatchMap({
fetchDepartments: FetchInstitutionDepartments,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ import { ToastService } from '@shared/services';
})
export class AddToCollectionConfirmationDialogComponent {
private toastService = inject(ToastService);
protected dialogRef = inject(DynamicDialogRef);
protected config = inject(DynamicDialogConfig);
protected destroyRef = inject(DestroyRef);
protected isSubmitting = signal<boolean>(false);
protected actions = createDispatchMap({
dialogRef = inject(DynamicDialogRef);
config = inject(DynamicDialogConfig);
destroyRef = inject(DestroyRef);
isSubmitting = signal<boolean>(false);
actions = createDispatchMap({
createCollectionSubmission: CreateCollectionSubmission,
updateProjectPublicStatus: UpdateProjectPublicStatus,
});

protected handleAddToCollectionConfirm(): void {
handleAddToCollectionConfirm(): void {
const payload = this.config.data.payload;
const project = this.config.data.project;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,27 +67,27 @@ export class AddToCollectionComponent implements CanDeactivateComponent {
private readonly dialogService = inject(DialogService);
private readonly translateService = inject(TranslateService);

protected readonly AddToCollectionSteps = AddToCollectionSteps;

protected collectionMetadataForm = new FormGroup({});
protected isProviderLoading = select(CollectionsSelectors.getCollectionProviderLoading);
protected collectionProvider = select(CollectionsSelectors.getCollectionProvider);
protected selectedProject = select(ProjectsSelectors.getSelectedProject);
protected currentUser = select(UserSelectors.getCurrentUser);
protected providerId = signal<string>('');
protected allowNavigation = signal<boolean>(false);
protected projectMetadataSaved = signal<boolean>(false);
protected projectContributorsSaved = signal<boolean>(false);
protected collectionMetadataSaved = signal<boolean>(false);
protected stepperActiveValue = signal<number>(AddToCollectionSteps.SelectProject);
protected primaryCollectionId = computed(() => this.collectionProvider()?.primaryCollection?.id);
protected isProjectMetadataDisabled = computed(() => !this.selectedProject());
protected isProjectContributorsDisabled = computed(() => !this.selectedProject() || !this.projectMetadataSaved());
protected isCollectionMetadataDisabled = computed(
readonly AddToCollectionSteps = AddToCollectionSteps;

collectionMetadataForm = new FormGroup({});
isProviderLoading = select(CollectionsSelectors.getCollectionProviderLoading);
collectionProvider = select(CollectionsSelectors.getCollectionProvider);
selectedProject = select(ProjectsSelectors.getSelectedProject);
currentUser = select(UserSelectors.getCurrentUser);
providerId = signal<string>('');
allowNavigation = signal<boolean>(false);
projectMetadataSaved = signal<boolean>(false);
projectContributorsSaved = signal<boolean>(false);
collectionMetadataSaved = signal<boolean>(false);
stepperActiveValue = signal<number>(AddToCollectionSteps.SelectProject);
primaryCollectionId = computed(() => this.collectionProvider()?.primaryCollection?.id);
isProjectMetadataDisabled = computed(() => !this.selectedProject());
isProjectContributorsDisabled = computed(() => !this.selectedProject() || !this.projectMetadataSaved());
isCollectionMetadataDisabled = computed(
() => !this.selectedProject() || !this.projectMetadataSaved() || !this.projectContributorsSaved()
);

protected actions = createDispatchMap({
actions = createDispatchMap({
getCollectionProvider: GetCollectionProvider,
clearAddToCollectionState: ClearAddToCollectionState,
createCollectionSubmission: CreateCollectionSubmission,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import { CollectionsSelectors, GetCollectionDetails } from '@shared/stores';
})
export class CollectionMetadataStepComponent {
private readonly filterTypes = collectionFilterTypes;
protected readonly collectionFilterOptions = select(CollectionsSelectors.getAllFiltersOptions);
protected readonly availableFilterEntries = computed(() => {
readonly collectionFilterOptions = select(CollectionsSelectors.getAllFiltersOptions);
readonly availableFilterEntries = computed(() => {
const options = this.collectionFilterOptions();

return this.filterTypes
Expand All @@ -46,10 +46,10 @@ export class CollectionMetadataStepComponent {
stepChange = output<number>();
metadataSaved = output<FormGroup>();

protected collectionMetadataForm = signal<FormGroup>(new FormGroup({}));
protected collectionMetadataSaved = signal<boolean>(false);
collectionMetadataForm = signal<FormGroup>(new FormGroup({}));
collectionMetadataSaved = signal<boolean>(false);

protected actions = createDispatchMap({
actions = createDispatchMap({
getCollectionDetails: GetCollectionDetails,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class ProjectContributorsStepComponent {
stepChange = output<number>();
contributorsSaved = output<void>();

protected actions = createDispatchMap({
actions = createDispatchMap({
addContributor: AddContributor,
updateContributor: UpdateContributor,
deleteContributor: DeleteContributor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import { ProjectsSelectors } from '@shared/stores/projects/projects.selectors';
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class SelectProjectStepComponent {
protected selectedProject = select(ProjectsSelectors.getSelectedProject);
protected currentUserSubmissions = select(CollectionsSelectors.getUserCollectionSubmissions);
selectedProject = select(ProjectsSelectors.getSelectedProject);
currentUserSubmissions = select(CollectionsSelectors.getUserCollectionSubmissions);

stepperActiveValue = input.required<number>();
targetStepValue = input.required<number>();
Expand All @@ -34,12 +34,12 @@ export class SelectProjectStepComponent {

currentSelectedProject = signal<Project | null>(null);

protected excludedProjectIds = computed(() => {
excludedProjectIds = computed(() => {
const submissions = this.currentUserSubmissions();
return submissions.map((submission) => submission.nodeId);
});

protected actions = createDispatchMap({
actions = createDispatchMap({
setSelectedProject: SetSelectedProject,
getUserCollectionSubmissions: GetUserCollectionSubmissions,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ export class CollectionsDiscoverComponent {
private querySyncService = inject(CollectionsQuerySyncService);
private destroyRef = inject(DestroyRef);

protected searchControl = new FormControl('');
protected providerId = signal<string>('');

protected collectionProvider = select(CollectionsSelectors.getCollectionProvider);
protected collectionDetails = select(CollectionsSelectors.getCollectionDetails);
protected selectedFilters = select(CollectionsSelectors.getAllSelectedFilters);
protected sortBy = select(CollectionsSelectors.getSortBy);
protected searchText = select(CollectionsSelectors.getSearchText);
protected pageNumber = select(CollectionsSelectors.getPageNumber);
protected isProviderLoading = select(CollectionsSelectors.getCollectionProviderLoading);
protected primaryCollectionId = computed(() => this.collectionProvider()?.primaryCollection?.id);

protected actions = createDispatchMap({
searchControl = new FormControl('');
providerId = signal<string>('');

collectionProvider = select(CollectionsSelectors.getCollectionProvider);
collectionDetails = select(CollectionsSelectors.getCollectionDetails);
selectedFilters = select(CollectionsSelectors.getAllSelectedFilters);
sortBy = select(CollectionsSelectors.getSortBy);
searchText = select(CollectionsSelectors.getSearchText);
pageNumber = select(CollectionsSelectors.getPageNumber);
isProviderLoading = select(CollectionsSelectors.getCollectionProviderLoading);
primaryCollectionId = computed(() => this.collectionProvider()?.primaryCollection?.id);

actions = createDispatchMap({
getCollectionProvider: GetCollectionProvider,
getCollectionDetails: GetCollectionDetails,
setSearchValue: SetSearchValue,
Expand All @@ -80,7 +80,7 @@ export class CollectionsDiscoverComponent {
this.setupSearchBinding();
}

protected openHelpDialog(): void {
openHelpDialog(): void {
this.dialogService.open(CollectionsHelpDialogComponent, {
focusOnShow: false,
header: this.translateService.instant('collections.helpDialog.header'),
Expand All @@ -90,7 +90,7 @@ export class CollectionsDiscoverComponent {
});
}

protected onSearchTriggered(searchValue: string): void {
onSearchTriggered(searchValue: string): void {
this.actions.setSearchValue(searchValue);
this.actions.setPageNumber('1');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import {
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class CollectionsFilterChipsComponent {
protected activeFilters = select(CollectionsSelectors.getAllSelectedFilters);
activeFilters = select(CollectionsSelectors.getAllSelectedFilters);

private readonly filterTypes = collectionFilterTypes;

protected actions = createDispatchMap({
actions = createDispatchMap({
programArea: SetProgramAreaFilters,
collectedType: SetCollectedTypeFilters,
status: SetStatusFilters,
Expand All @@ -45,7 +45,7 @@ export class CollectionsFilterChipsComponent {
volume: SetVolumeFilters,
});

protected activeFilterEntries = computed(() => {
activeFilterEntries = computed(() => {
const filters = this.activeFilters();
return this.filterTypes
.map((key) => ({
Expand All @@ -55,7 +55,7 @@ export class CollectionsFilterChipsComponent {
.filter((entry) => entry.filters.length);
});

protected onRemoveFilter(filterType: CollectionFilterType, removedFilter: string): void {
onRemoveFilter(filterType: CollectionFilterType, removedFilter: string): void {
const currentFilters = this.activeFilters()[filterType].filter((filter: string) => filter !== removedFilter);

switch (filterType) {
Expand Down
Loading
Loading