Skip to content

Commit

Permalink
Merge pull request #303 from JeanMeche/ng15
Browse files Browse the repository at this point in the history
feat: Update to Angular 15
  • Loading branch information
daileytj authored Mar 2, 2023
2 parents fc88344 + 6937246 commit 2cf7ea4
Show file tree
Hide file tree
Showing 10 changed files with 2,445 additions and 2,599 deletions.
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
"prettier": "@brightlayer-ui/prettier-config",
"private": true,
"dependencies": {
"@angular/animations": "^14.2.10",
"@angular/cdk": "^14.2.7",
"@angular/common": "^14.2.10",
"@angular/compiler": "^14.2.10",
"@angular/core": "^14.2.10",
"@angular/forms": "^14.2.10",
"@angular/material": "^14.2.7",
"@angular/platform-browser": "^14.2.10",
"@angular/platform-browser-dynamic": "^14.2.10",
"@angular/router": "^14.2.10",
"@brightlayer-ui/angular-components": "^8.0.0",
"@brightlayer-ui/angular-themes": "^8.0.0",
"@angular/animations": "^15.2.0",
"@angular/cdk": "^15.2.0",
"@angular/common": "^15.2.0",
"@angular/compiler": "^15.2.0",
"@angular/core": "^15.2.0",
"@angular/forms": "^15.2.0",
"@angular/material": "^15.2.0",
"@angular/platform-browser": "^15.2.0",
"@angular/platform-browser-dynamic": "^15.2.0",
"@angular/router": "^15.2.0",
"@brightlayer-ui/angular-components": "9.0.0-alpha.0",
"@brightlayer-ui/angular-themes": "9.0.0-alpha.0",
"@brightlayer-ui/colors": "^3.1.1",
"@brightlayer-ui/icons": "^1.11.0",
"@brightlayer-ui/icons-svg": "^1.11.0",
Expand All @@ -40,10 +40,10 @@
"zone.js": "~0.12.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.2.9",
"@angular/cli": "^14.2.9",
"@angular/compiler-cli": "^14.2.10",
"@angular/language-service": "^14.2.10",
"@angular-devkit/build-angular": "^15.2.0",
"@angular/cli": "^15.2.0",
"@angular/compiler-cli": "^15.2.0",
"@angular/language-service": "^15.2.0",
"@brightlayer-ui/eslint-config": "^3.0.1",
"@brightlayer-ui/prettier-config": "^1.0.3",
"@types/jasmine": "~3.10.6",
Expand All @@ -65,4 +65,4 @@
"prettier": "^2.8.3",
"typescript": "4.8.4"
}
}
}
34 changes: 17 additions & 17 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,35 @@ import {
import { MatDividerModule } from '@angular/material/divider';
import { MatIconModule } from '@angular/material/icon';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatListModule } from '@angular/material/list';
import { MatCardModule } from '@angular/material/card';
import { MatButtonModule } from '@angular/material/button';
import { MatLegacyListModule as MatListModule } from '@angular/material/legacy-list';
import { MatLegacyCardModule as MatCardModule } from '@angular/material/legacy-card';
import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button';
import { DrawerComponent } from './drawer/drawer.component';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatMenuModule } from '@angular/material/menu';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-menu';
import { MatLegacyCheckboxModule as MatCheckboxModule } from '@angular/material/legacy-checkbox';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatNativeDateModule, MatRippleModule } from '@angular/material/core';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatRadioModule } from '@angular/material/radio';
import { MatSelectModule } from '@angular/material/select';
import { MatSliderModule } from '@angular/material/slider';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { MatLegacyFormFieldModule as MatFormFieldModule } from '@angular/material/legacy-form-field';
import { MatLegacyInputModule as MatInputModule } from '@angular/material/legacy-input';
import { MatLegacyRadioModule as MatRadioModule } from '@angular/material/legacy-radio';
import { MatLegacySelectModule as MatSelectModule } from '@angular/material/legacy-select';
import { MatLegacySliderModule as MatSliderModule } from '@angular/material/legacy-slider';
import { MatLegacySlideToggleModule as MatSlideToggleModule } from '@angular/material/legacy-slide-toggle';
import { MatStepperModule } from '@angular/material/stepper';
import { MatTabsModule } from '@angular/material/tabs';
import { MatLegacyTabsModule as MatTabsModule } from '@angular/material/legacy-tabs';
import { MatBadgeModule } from '@angular/material/badge';
import { MatChipsModule } from '@angular/material/chips';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatLegacyChipsModule as MatChipsModule } from '@angular/material/legacy-chips';
import { MatLegacyProgressSpinnerModule as MatProgressSpinnerModule } from '@angular/material/legacy-progress-spinner';
import { MatLegacyProgressBarModule as MatProgressBarModule } from '@angular/material/legacy-progress-bar';
import { DashboardComponent } from './pages/templates/dashboard/dashboard.component';
import { RouterModule } from '@angular/router';
import { AppRoutingModule } from './app.routing';
import { AlarmsComponent } from './pages/templates/alarms/alarms.component';
import { MatExpansionModule } from '@angular/material/expansion';
import { MatButtonToggleModule } from '@angular/material/button-toggle';
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';
import { BluiModule } from './pages/blui/blui.module';
import { MatModule } from './pages/mat/mat.module';
import { SettingsComponent } from './pages/templates/settings/settings.component';
Expand Down
6 changes: 3 additions & 3 deletions src/app/pages/blui/blui.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NgModule } from '@angular/core';
import { BluiSurfacesComponent } from './surfaces/surfaces.component';
import { BluiDisplayComponent } from './data-display/display.component';
import { MatCardModule } from '@angular/material/card';
import { MatLegacyCardModule as MatCardModule } from '@angular/material/legacy-card';
import {
AppBarModule,
ChannelValueModule,
Expand All @@ -16,10 +16,10 @@ import {
ToolbarMenuModule,
} from '@brightlayer-ui/angular-components';
import { MatIconModule } from '@angular/material/icon';
import { MatButtonModule } from '@angular/material/button';
import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button';
import { CommonModule } from '@angular/common';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatMenuModule } from '@angular/material/menu';
import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-menu';
import { BluiNavigationComponent } from './navigation/navigation.component';
import { BluiTypographyComponent } from './typography.component';

Expand Down
4 changes: 2 additions & 2 deletions src/app/pages/mat/feedback/feedback.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MatFeedackComponent } from './feedback.component';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MatSnackBarRef } from '@angular/material/snack-bar';
import { MatDialogRef } from '@angular/material/dialog';
import { MatLegacySnackBarRef as MatSnackBarRef } from '@angular/material/legacy-snack-bar';
import { MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
import { MatBottomSheetRef } from '@angular/material/bottom-sheet';
import { AppModule } from '../../../app.module';

Expand Down
4 changes: 2 additions & 2 deletions src/app/pages/mat/feedback/feedback.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChangeDetectorRef, Component, OnInit, ViewEncapsulation } from '@angular/core';
import { MatSnackBar } from '@angular/material/snack-bar';
import { MatDialog } from '@angular/material/dialog';
import { MatLegacySnackBar as MatSnackBar } from '@angular/material/legacy-snack-bar';
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
import { MatBottomSheet, MatBottomSheetRef } from '@angular/material/bottom-sheet';

@Component({
Expand Down
36 changes: 18 additions & 18 deletions src/app/pages/mat/mat.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@ import { FeedbackBottomSheetExample, FeedbackDialogExample, MatFeedackComponent
import { MatInputsComponent } from './inputs/inputs.component';
import { MatNavigationComponent } from './navigation/navigation.component';
import { CommonModule } from '@angular/common';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button';
import { MatLegacyCardModule as MatCardModule } from '@angular/material/legacy-card';
import { MatIconModule } from '@angular/material/icon';
import { MatBadgeModule } from '@angular/material/badge';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatExpansionModule } from '@angular/material/expansion';
import { MatMenuModule } from '@angular/material/menu';
import { MatLegacyMenuModule as MatMenuModule } from '@angular/material/legacy-menu';
import { MatStepperModule } from '@angular/material/stepper';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatLegacyFormFieldModule as MatFormFieldModule } from '@angular/material/legacy-form-field';
import { ReactiveFormsModule } from '@angular/forms';
import { MatInputModule } from '@angular/material/input';
import { MatTabsModule } from '@angular/material/tabs';
import { MatLegacyInputModule as MatInputModule } from '@angular/material/legacy-input';
import { MatLegacyTabsModule as MatTabsModule } from '@angular/material/legacy-tabs';
import { MatButtonToggleModule } from '@angular/material/button-toggle';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatRadioModule } from '@angular/material/radio';
import { MatLegacyCheckboxModule as MatCheckboxModule } from '@angular/material/legacy-checkbox';
import { MatLegacyRadioModule as MatRadioModule } from '@angular/material/legacy-radio';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatSelectModule } from '@angular/material/select';
import { MatSliderModule } from '@angular/material/slider';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MatDialogModule } from '@angular/material/dialog';
import { MatListModule } from '@angular/material/list';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { MatChipsModule } from '@angular/material/chips';
import { MatTableModule } from '@angular/material/table';
import { MatTooltipModule } from '@angular/material/tooltip';
import { MatLegacySelectModule as MatSelectModule } from '@angular/material/legacy-select';
import { MatLegacySliderModule as MatSliderModule } from '@angular/material/legacy-slider';
import { MatLegacyProgressBarModule as MatProgressBarModule } from '@angular/material/legacy-progress-bar';
import { MatLegacyProgressSpinnerModule as MatProgressSpinnerModule } from '@angular/material/legacy-progress-spinner';
import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/legacy-dialog';
import { MatLegacyListModule as MatListModule } from '@angular/material/legacy-list';
import { MatLegacySlideToggleModule as MatSlideToggleModule } from '@angular/material/legacy-slide-toggle';
import { MatLegacyChipsModule as MatChipsModule } from '@angular/material/legacy-chips';
import { MatLegacyTableModule as MatTableModule } from '@angular/material/legacy-table';
import { MatLegacyTooltipModule as MatTooltipModule } from '@angular/material/legacy-tooltip';

@NgModule({
declarations: [
Expand Down
14 changes: 6 additions & 8 deletions src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ $warn: (
),
);

@include theme-bases.coreTypography();

.blui-blue {
$blui-blue-primary: theme-bases.$blui-blue-primary;
$blui-blue-accent: theme-bases.$blui-blue-accent;
Expand All @@ -95,13 +93,13 @@ $warn: (
@include theme-bases.light-theme($blui-blue-primary, $blui-blue-accent, $blui-blue-warn);
}

.blui-blue-dark {
$blui-blue-dark-primary: theme-bases.$blui-blue-dark-primary;
$blui-blue-dark-accent: theme-bases.$blui-blue-dark-accent;
$blui-blue-dark-warn: theme-bases.$blui-blue-dark-warn;
// .blui-blue-dark {
// $blui-blue-dark-primary: theme-bases.$blui-blue-dark-primary;
// $blui-blue-dark-accent: theme-bases.$blui-blue-dark-accent;
// $blui-blue-dark-warn: theme-bases.$blui-blue-dark-warn;

@include theme-bases.dark-theme($blui-blue-dark-primary, $blui-blue-dark-accent, $blui-blue-dark-warn);
}
// @include theme-bases.dark-theme($blui-blue-dark-primary, $blui-blue-dark-accent, $blui-blue-dark-warn);
// }

body {
margin: 0;
Expand Down
6 changes: 0 additions & 6 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';

declare const require: any;

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});
// Then we find all the tests.
const context = require.context('app', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2020",
"target": "ES2022",
"module": "es2020",
"lib": [
"es2018",
"dom"
]
],
"useDefineForClassFields": false
}
}
Loading

0 comments on commit 2cf7ea4

Please sign in to comment.