Skip to content

Commit

Permalink
Update angular to 15
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiDimmel committed Dec 22, 2022
1 parent 1b177bb commit 1b77c96
Show file tree
Hide file tree
Showing 15 changed files with 2,595 additions and 2,273 deletions.
17 changes: 0 additions & 17 deletions docs/assets/stackblitz/.browserslistrc

This file was deleted.

4,739 changes: 2,546 additions & 2,193 deletions package-lock.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^14.2.12",
"@angular/cdk": "^14.2.7",
"@angular/common": "^14.2.12",
"@angular/compiler": "^14.2.12",
"@angular/core": "^14.2.12",
"@angular/forms": "^14.2.12",
"@angular/material": "^14.2.7",
"@angular/platform-browser": "^14.2.12",
"@angular/platform-browser-dynamic": "^14.2.12",
"@angular/router": "^14.2.12",
"@angular/animations": "^15.0.4",
"@angular/cdk": "^15.0.3",
"@angular/common": "^15.0.4",
"@angular/compiler": "^15.0.4",
"@angular/core": "^15.0.4",
"@angular/forms": "^15.0.4",
"@angular/material": "^15.0.3",
"@angular/platform-browser": "^15.0.4",
"@angular/platform-browser-dynamic": "^15.0.4",
"@angular/router": "^15.0.4",
"@stackblitz/sdk": "^1.6.0",
"highlight.js": "^11.5.1",
"ngx-highlightjs": "^6.1.2",
Expand All @@ -56,11 +56,11 @@
"zone.js": "~0.11.5"
},
"devDependencies": {
"@angular-builders/custom-webpack": "^14.1.0",
"@angular-devkit/build-angular": "^14.2.10",
"@angular/cli": "^14.2.10",
"@angular/compiler-cli": "^14.2.12",
"@angular/language-service": "^14.2.12",
"@angular-builders/custom-webpack": "^15.0.0",
"@angular-devkit/build-angular": "^15.0.4",
"@angular/cli": "^15.0.4",
"@angular/compiler-cli": "^15.0.4",
"@angular/language-service": "^15.0.4",
"@types/jasmine": "^4.0.3",
"@types/jasminewd2": "^2.0.10",
"@types/node": "^14.18.1",
Expand All @@ -72,10 +72,10 @@
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.0.1",
"karma-jasmine-html-reporter": "^1.7.0",
"ng-packagr": "^14.2.2",
"ng-packagr": "^15.0.3",
"protractor": "~7.0.0",
"ts-node": "~10.7.0",
"tslint": "~6.1.3",
"typescript": "^4.6.4"
"typescript": "^4.8.4"
}
}
14 changes: 7 additions & 7 deletions projects/demo-page/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { LayoutModule } from '@angular/cdk/layout';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatButtonModule } from '@angular/material/button';
import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatIconModule } from '@angular/material/icon';
import { MatListModule } from '@angular/material/list';
import { MatCardModule } from '@angular/material/card';
import { MatLegacyListModule as MatListModule } from '@angular/material/legacy-list';
import { MatLegacyCardModule as MatCardModule } from '@angular/material/legacy-card';
import { MatExpansionModule } from '@angular/material/expansion';
import { MatTableModule } from '@angular/material/table';
import { MatTabsModule } from '@angular/material/tabs';
import { MatLegacyTableModule as MatTableModule } from '@angular/material/legacy-table';
import { MatLegacyTabsModule as MatTabsModule } from '@angular/material/legacy-tabs';
import { NavbarComponent } from './navbar/navbar.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HttpClientModule } from '@angular/common/http';
Expand All @@ -23,8 +23,8 @@ import { AppRoutingModule } from './app-routing.module';
import { ExamplesPageComponent } from './examples-page/examples-page.component';
import { ExamplesModule } from './examples';
import { APP_BASE_HREF, CommonModule, PlatformLocation } from '@angular/common';
import { MatTooltipModule } from '@angular/material/tooltip';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { MatLegacyTooltipModule as MatTooltipModule } from '@angular/material/legacy-tooltip';
import { MatLegacySnackBarModule as MatSnackBarModule } from '@angular/material/legacy-snack-bar';


@NgModule({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component, ComponentFactoryResolver, Input, OnInit, ViewChild, ViewContainerRef } from '@angular/core';
import { Example } from '../examples';
import { MatSnackBar } from '@angular/material/snack-bar';
import { MatLegacySnackBar as MatSnackBar } from '@angular/material/legacy-snack-bar';
import {Clipboard} from '@angular/cdk/clipboard';
import { StackblitzService } from '../services';

Expand Down
8 changes: 4 additions & 4 deletions projects/demo-page/src/app/examples/examples.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { FilterSortSelectExampleComponent } from './filter-sort-select-example/f
import { StickyExampleComponent } from './sticky-example/sticky-example.component';
import { StickyColumnExampleComponent } from './sticky-column-example/sticky-column-example.component';
import { FooterExampleComponent } from './footer-example/footer-example.component';
import { MatTableModule } from '@angular/material/table';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatLegacyTableModule as MatTableModule } from '@angular/material/legacy-table';
import { MatLegacyCheckboxModule as MatCheckboxModule } from '@angular/material/legacy-checkbox';
import { MatSortModule } from '@angular/material/sort';
import { MatInputModule } from '@angular/material/input';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatLegacyInputModule as MatInputModule } from '@angular/material/legacy-input';
import { MatLegacyFormFieldModule as MatFormFieldModule } from '@angular/material/legacy-form-field';

const examples = [
BaseExampleComponent,
Expand Down
17 changes: 0 additions & 17 deletions projects/demo-page/src/assets/stackblitz/.browserslistrc

This file was deleted.

15 changes: 12 additions & 3 deletions projects/demo-page/src/styles.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
@use '@angular/material' as mat;
@import 'helpers';

@include mat.core();

@include mat.all-component-themes($mat-app-theme);
// TODO(v15): As of v15 mat.legacy-core no longer includes default typography styles.
// The following line adds:
// 1. Default typography styles for all components
// 2. Styles for typography hierarchy classes (e.g. .mat-headline-1)
// If you specify typography styles for the components you use elsewhere, you should delete this line.
// If you don't need the default component typographies but still want the hierarchy styles,
// you can delete this line and instead use:
// `@include mat.legacy-typography-hierarchy(mat.define-legacy-typography-config());`
@include mat.all-legacy-component-typographies();
@include mat.legacy-core();

@include mat.all-legacy-component-themes($mat-app-theme);

@import 'highlight';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TestBed } from '@angular/core/testing';
import { TableVirtualScrollDataSource } from './table-data-source';
import { MatTableDataSource } from '@angular/material/table';
import { MatLegacyTableDataSource as MatTableDataSource } from '@angular/material/legacy-table';
import { Subject } from 'rxjs';
import { ListRange } from '@angular/cdk/collections';
import { map, switchMap } from 'rxjs/operators';
Expand Down
4 changes: 2 additions & 2 deletions projects/ng-table-virtual-scroll/src/lib/table-data-source.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { BehaviorSubject, combineLatest, merge, Observable, of, ReplaySubject, Subject, Subscription } from 'rxjs';
import { map } from 'rxjs/operators';
import { MatTableDataSource } from '@angular/material/table';
import { MatLegacyTableDataSource as MatTableDataSource } from '@angular/material/legacy-table';
import { MatSort, Sort } from '@angular/material/sort';
import { MatPaginator, PageEvent } from '@angular/material/paginator';
import { MatLegacyPaginator as MatPaginator, LegacyPageEvent as PageEvent } from '@angular/material/legacy-paginator';

export class TableVirtualScrollDataSource<T> extends MatTableDataSource<T> {
public dataToRender$: Subject<T[]>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
import { TableVirtualScrollDataSource } from './table-data-source';
import { CdkVirtualScrollViewport, ScrollingModule } from '@angular/cdk/scrolling';
import { async, ComponentFixture, fakeAsync, flush, TestBed } from '@angular/core/testing';
import { MatTableModule } from '@angular/material/table';
import { MatLegacyTableModule as MatTableModule } from '@angular/material/legacy-table';
import { TableVirtualScrollModule } from './table-virtual-scroll.module';
import { FixedSizeTableVirtualScrollStrategy } from './fixed-size-table-virtual-scroll-strategy';
import { animationFrameScheduler } from 'rxjs';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
tap
} from 'rxjs/operators';
import { TableVirtualScrollDataSource } from './table-data-source';
import { MatTable } from '@angular/material/table';
import { MatLegacyTable as MatTable } from '@angular/material/legacy-table';
import { FixedSizeTableVirtualScrollStrategy } from './fixed-size-table-virtual-scroll-strategy';
import { CdkHeaderRowDef } from '@angular/cdk/table';
import { combineLatest, from, Subject } from 'rxjs';
Expand Down
6 changes: 0 additions & 6 deletions projects/ng-table-virtual-scroll/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import {
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';

declare const require: any;

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
Expand All @@ -18,7 +16,3 @@ getTestBed().initTestEnvironment(
teardown: {destroyAfterEach: false}
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
1 change: 0 additions & 1 deletion projects/ng-table-virtual-scroll/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"declarationMap": true,
"target": "es2020",
"declaration": true,
"inlineSources": true,
"types": [],
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"module": "es2020",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2020",
"target": "ES2022",
"typeRoots": [
"node_modules/@types"
],
Expand All @@ -22,7 +22,8 @@
"ng-table-virtual-scroll": [
"projects/ng-table-virtual-scroll/src/public-api.ts"
]
}
},
"useDefineForClassFields": false
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
Expand Down

0 comments on commit 1b77c96

Please sign in to comment.