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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^19.2.0",
"@angular/cdk": "^19.2.1",
"@angular/cli": "^19.2.0",
"@angular/common": "^19.2.0",
Expand Down
9 changes: 8 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ import { AuthState } from '@core/store/auth';
import { HomeState } from 'src/app/features/home/store';
import { TokensState } from '@core/store/settings';
import { AddonsState } from '@core/store/settings/addons';
import { SearchState } from '@osf/features/search/store';

@NgModule({
imports: [
NgxsModule.forRoot([AuthState, TokensState, AddonsState, HomeState]),
NgxsModule.forRoot([
AuthState,
TokensState,
AddonsState,
HomeState,
SearchState,
]),
],
})
export class AppModule {}
5 changes: 4 additions & 1 deletion src/app/app.routes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Routes } from '@angular/router';
import { provideStates } from '@ngxs/store';
import { ResourceFiltersState } from '@shared/components/resources/resource-filters/store/resource-filters.state';
import { ResourceFiltersOptionsState } from '@shared/components/resources/resource-filters/filters/store/resource-filters-options.state';

export const routes: Routes = [
{
Expand Down Expand Up @@ -140,7 +141,9 @@ export const routes: Routes = [
import('./features/search/search.component').then(
(mod) => mod.SearchComponent,
),
providers: [provideStates([ResourceFiltersState])],
providers: [
provideStates([ResourceFiltersState, ResourceFiltersOptionsState]),
],
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/components/header/header.component.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<osf-breadcrumb />
<!--<osf-breadcrumb />-->
<a [routerLink]="authButtonLink()" class="p-button">{{ authButtonText() }}</a>
2 changes: 2 additions & 0 deletions src/app/core/helpers/ngxs-states.constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import { TokensState } from '@core/store/settings';
import { AddonsState } from '@core/store/settings/addons';
import { UserState } from '@core/store/user';
import { HomeState } from 'src/app/features/home/store';
import { SearchState } from '@osf/features/search/store';

export const STATES = [
AuthState,
TokensState,
AddonsState,
UserState,
HomeState,
SearchState,
];
4 changes: 3 additions & 1 deletion src/app/core/services/json-api/json-api.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ export interface JsonApiResponse<Data, Included> {
included?: Included;
}

export interface ApiData<Attributes, Embeds> {
export interface ApiData<Attributes, Embeds, Relationships> {
id: string;
attributes: Attributes;
embeds: Embeds;
type: string;
relationships: Relationships;
}
4 changes: 2 additions & 2 deletions src/app/features/home/dashboard.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class DashboardService {
getNoteworthy(): Observable<Project[]> {
const projectId = 'pf5z9';
const params = {
embed: 'bibliographic_contributors',
'embed[]': 'bibliographic_contributors',
'page[size]': 5,
};

Expand All @@ -45,7 +45,7 @@ export class DashboardService {
getMostPopular(): Observable<Project[]> {
const projectId = 'kvw3y';
const params = {
embed: 'bibliographic_contributors',
'embed[]': 'bibliographic_contributors',
'page[size]': 5,
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { LoggedOutComponent } from './home-logged-out.component';
import { HomeLoggedOutComponent } from './home-logged-out.component';

describe('LoggedOutComponent', () => {
let component: LoggedOutComponent;
let fixture: ComponentFixture<LoggedOutComponent>;
let component: HomeLoggedOutComponent;
let fixture: ComponentFixture<HomeLoggedOutComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [LoggedOutComponent],
imports: [HomeLoggedOutComponent],
}).compileComponents();

fixture = TestBed.createComponent(LoggedOutComponent);
fixture = TestBed.createComponent(HomeLoggedOutComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
Expand Down
8 changes: 5 additions & 3 deletions src/app/features/home/models/raw-models/ProjectItem.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ export type ProjectItem = ApiData<
ApiData<
BibliographicContributorUS,
{
users: JsonApiResponse<ApiData<UserUS, null>, null>;
}
users: JsonApiResponse<ApiData<UserUS, null, null>, null>;
},
null
>[],
null
>;
}
},
null
>;
Loading