diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html
index fbe03b4fbec..ed9027b891e 100644
--- a/src/app/home/home.component.html
+++ b/src/app/home/home.component.html
@@ -93,7 +93,11 @@
>
Curriculum Offerings
-
+ @defer (on viewport) {
+
+ } @placeholder {
+
Curriculum Offerings
+ }
-
+ />
-
+ />
{
let fixture: ComponentFixture;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
- imports: [],
- declarations: [HomePageProjectLibraryComponent],
- providers: [{ provide: LibraryService, useClass: MockLibraryService }],
- schemas: [NO_ERRORS_SCHEMA]
+ imports: [
+ HomePageProjectLibraryComponent,
+ MockComponents(OfficialLibraryComponent, LibraryFiltersComponent)
+ ],
+ providers: [{ provide: LibraryService, useClass: MockLibraryService }, provideRouter([])]
}).compileComponents();
}));
diff --git a/src/app/modules/library/home-page-project-library/home-page-project-library.component.ts b/src/app/modules/library/home-page-project-library/home-page-project-library.component.ts
index d28ed1d068b..33fba287af0 100644
--- a/src/app/modules/library/home-page-project-library/home-page-project-library.component.ts
+++ b/src/app/modules/library/home-page-project-library/home-page-project-library.component.ts
@@ -1,11 +1,14 @@
import { Component } from '@angular/core';
import { LibraryService } from '../../../services/library.service';
import { ProjectFilterValues } from '../../../domain/projectFilterValues';
+import { LibraryFiltersComponent } from '../library-filters/library-filters.component';
+import { RouterLink } from '@angular/router';
+import { OfficialLibraryComponent } from '../official-library/official-library.component';
@Component({
+ imports: [LibraryFiltersComponent, RouterLink, OfficialLibraryComponent],
providers: [ProjectFilterValues],
selector: 'app-home-page-project-library',
- standalone: false,
styleUrls: ['./home-page-project-library.component.scss', '../library/library.component.scss'],
templateUrl: './home-page-project-library.component.html'
})
diff --git a/src/app/modules/library/library-project-details/library-project-details.component.spec.ts b/src/app/modules/library/library-project-details/library-project-details.component.spec.ts
index 7700f618866..6c46fa1247c 100644
--- a/src/app/modules/library/library-project-details/library-project-details.component.spec.ts
+++ b/src/app/modules/library/library-project-details/library-project-details.component.spec.ts
@@ -35,8 +35,7 @@ describe('LibraryProjectDetailsComponent', () => {
resources: [{ name: 'Resource 1', uri: 'http://example.com/resource1' }]
};
TestBed.configureTestingModule({
- declarations: [MockComponent(LibraryProjectMenuComponent)],
- imports: [LibraryProjectDetailsComponent],
+ imports: [LibraryProjectDetailsComponent, MockComponent(LibraryProjectMenuComponent)],
providers: [
MockProviders(ConfigService, MatDialog, MatDialogRef, UserService),
{ provide: MAT_DIALOG_DATA, useValue: { project: project } }
diff --git a/src/app/modules/library/library.module.ts b/src/app/modules/library/library.module.ts
index 31e12cc0da4..c43ad393933 100644
--- a/src/app/modules/library/library.module.ts
+++ b/src/app/modules/library/library.module.ts
@@ -85,9 +85,10 @@ const materialModules = [
SelectMenuComponent,
SelectTagsComponent,
SharedModule,
- UnitTagsComponent
+ UnitTagsComponent,
+ HomePageProjectLibraryComponent,
+ ShareProjectDialogComponent
],
- declarations: [HomePageProjectLibraryComponent, ShareProjectDialogComponent],
exports: [
CurriculumComponent,
HomePageProjectLibraryComponent,
diff --git a/src/app/modules/library/share-project-dialog/share-project-dialog.component.spec.ts b/src/app/modules/library/share-project-dialog/share-project-dialog.component.spec.ts
index 791ddab9231..8549687783e 100644
--- a/src/app/modules/library/share-project-dialog/share-project-dialog.component.spec.ts
+++ b/src/app/modules/library/share-project-dialog/share-project-dialog.component.spec.ts
@@ -1,5 +1,4 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
-import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ShareProjectDialogComponent } from './share-project-dialog.component';
import { TeacherService } from '../../../teacher/teacher.service';
import { Observable } from 'rxjs';
@@ -52,8 +51,12 @@ describe('ShareProjectDialogComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
- declarations: [ShareProjectDialogComponent],
- imports: [BrowserAnimationsModule, MatAutocompleteModule, MatSnackBarModule, MatTableModule],
+ imports: [
+ MatAutocompleteModule,
+ MatSnackBarModule,
+ MatTableModule,
+ ShareProjectDialogComponent
+ ],
providers: [
{ provide: TeacherService, useClass: MockTeacherService },
{ provide: LibraryService, useClass: MockLibraryService },
diff --git a/src/app/modules/library/share-project-dialog/share-project-dialog.component.ts b/src/app/modules/library/share-project-dialog/share-project-dialog.component.ts
index 5ac0f6024b7..74ebb46c2b8 100644
--- a/src/app/modules/library/share-project-dialog/share-project-dialog.component.ts
+++ b/src/app/modules/library/share-project-dialog/share-project-dialog.component.ts
@@ -1,17 +1,88 @@
import { Component, Inject } from '@angular/core';
-import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
+import {
+ MAT_DIALOG_DATA,
+ MatDialogRef,
+ MatDialogTitle,
+ MatDialogContent,
+ MatDialogActions,
+ MatDialogClose
+} from '@angular/material/dialog';
import { MatSnackBar } from '@angular/material/snack-bar';
-import { MatTableDataSource } from '@angular/material/table';
+import {
+ MatTableDataSource,
+ MatTable,
+ MatColumnDef,
+ MatHeaderCellDef,
+ MatHeaderCell,
+ MatCellDef,
+ MatCell,
+ MatHeaderRowDef,
+ MatHeaderRow,
+ MatRowDef,
+ MatRow
+} from '@angular/material/table';
import { TeacherService } from '../../../teacher/teacher.service';
import { LibraryService } from '../../../services/library.service';
import { ShareItemDialogComponent } from '../share-item-dialog/share-item-dialog.component';
import { Project } from '../../../domain/project';
+import { CdkScrollable } from '@angular/cdk/scrolling';
+import { MatDivider } from '@angular/material/divider';
+import {
+ MatFormField,
+ MatLabel,
+ MatPrefix,
+ MatSuffix,
+ MatHint
+} from '@angular/material/form-field';
+import { MatIcon } from '@angular/material/icon';
+import { MatInput } from '@angular/material/input';
+import { FormsModule, ReactiveFormsModule } from '@angular/forms';
+import { MatAutocompleteTrigger, MatAutocomplete, MatOption } from '@angular/material/autocomplete';
+import { MatIconButton, MatButton } from '@angular/material/button';
+import { NgClass, AsyncPipe } from '@angular/common';
+import { RouterLink } from '@angular/router';
+import { MatCheckbox } from '@angular/material/checkbox';
@Component({
selector: 'app-share-project-dialog',
- standalone: false,
styleUrl: './share-project-dialog.component.scss',
- templateUrl: './share-project-dialog.component.html'
+ templateUrl: './share-project-dialog.component.html',
+ imports: [
+ MatDialogTitle,
+ CdkScrollable,
+ MatDialogContent,
+ MatDivider,
+ MatFormField,
+ MatLabel,
+ MatIcon,
+ MatPrefix,
+ MatInput,
+ FormsModule,
+ MatAutocompleteTrigger,
+ ReactiveFormsModule,
+ MatIconButton,
+ MatSuffix,
+ NgClass,
+ MatHint,
+ MatAutocomplete,
+ MatOption,
+ MatTable,
+ MatColumnDef,
+ MatHeaderCellDef,
+ MatHeaderCell,
+ MatCellDef,
+ MatCell,
+ RouterLink,
+ MatCheckbox,
+ MatHeaderRowDef,
+ MatHeaderRow,
+ MatRowDef,
+ MatRow,
+ MatDialogActions,
+ MatButton,
+ MatDialogClose,
+ AsyncPipe
+ ]
})
export class ShareProjectDialogComponent extends ShareItemDialogComponent {
dataSource: MatTableDataSource = new MatTableDataSource();
diff --git a/src/messages.xlf b/src/messages.xlf
index b994a2e9001..901984115a4 100644
--- a/src/messages.xlf
+++ b/src/messages.xlf
@@ -5159,35 +5159,42 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. Curriculum Offerings
src/app/home/home.component.html
- 94,96
+ 94,97
+
+
+
+ Curriculum Offerings
+
+ src/app/home/home.component.html
+ 99,103
Ready to try WISE in the Classroom?
src/app/home/home.component.html
- 101,102
+ 105,106
Sign up for free!
src/app/home/home.component.html
- 102,108
+ 106,112
Connect
src/app/home/home.component.html
- 115,118
+ 119,122
WISE on Facebook
src/app/home/home.component.html
- 121,124
+ 125,128
src/app/modules/footer/footer.component.html
@@ -5198,7 +5205,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.WISE on Twitter
src/app/home/home.component.html
- 130,133
+ 134,137
src/app/modules/footer/footer.component.html
@@ -5209,7 +5216,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.WISE on Github
src/app/home/home.component.html
- 139,142
+ 143,146
src/app/modules/footer/footer.component.html
@@ -5220,7 +5227,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Community
src/app/home/home.component.html
- 149,151
+ 153,155
src/app/modules/footer/footer.component.html
@@ -5239,14 +5246,14 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Join us! Discuss all things WISE.
src/app/home/home.component.html
- 151,153
+ 155,157
Help + FAQs
src/app/home/home.component.html
- 161,163
+ 164,166
src/app/modules/footer/footer.component.html
@@ -5257,14 +5264,14 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.View tutorials and common questions.
src/app/home/home.component.html
- 163,166
+ 166,169
Contact Us
src/app/home/home.component.html
- 171,173
+ 173,175
src/app/modules/footer/footer.component.html
@@ -5275,7 +5282,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Want to get in touch? Send us a message.
src/app/home/home.component.html
- 173,177
+ 175,179