Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: update angular #4454

Draft
wants to merge 9 commits into
base: develop
Choose a base branch
from
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions CSETWebNg/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@
"node_modules/bootstrap/dist/js/bootstrap.min.js",
"node_modules/@fortawesome/fontawesome-free/js/all.min.js",
"src/assets/cset.js",
"src/assets/shim.min.js",
"src/assets/zone.js"
"src/assets/shim.min.js"
]
},
"configurations": {
Expand Down
9,098 changes: 4,364 additions & 4,734 deletions CSETWebNg/package-lock.json

Large diffs are not rendered by default.

49 changes: 24 additions & 25 deletions CSETWebNg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@
"setup:electron-build-files": "shx rm -rf temp-electron && shx mkdir -p temp-electron/node_modules && shx cp -r {package.json,main-electron.js,License.txt,NOTICE.txt,dist} temp-electron && shx cp -r node_modules/{electron-log,electron-find-on-page,lodash} temp-electron/node_modules"
},
"dependencies": {
"@angular-devkit/build-webpack": "^0.1901.2",
"@angular-devkit/schematics": "^18.2.10",
"@angular-eslint/schematics": "^18.4.3",
"@angular-slider/ngx-slider": "^18.0.0",
"@angular/animations": "^18.2.11",
"@angular/cdk": "^18.2.11",
"@angular/cli": "^18.2.11",
"@angular/common": "^18.2.11",
"@angular/compiler": "^18.2.11",
"@angular/core": "^18.2.11",
"@angular/elements": "^18.2.11",
"@angular/forms": "^18.2.11",
"@angular/material": "^18.2.11",
"@angular/platform-browser": "^18.2.11",
"@angular/platform-browser-dynamic": "^18.2.11",
"@angular/platform-server": "^18.2.11",
"@angular/router": "^18.2.11",
"@fortawesome/angular-fontawesome": "^0.15.0",
"@angular-devkit/build-webpack": "^0.1901.8",
"@angular-devkit/schematics": "^19.1.8",
"@angular-eslint/schematics": "^19.1.0",
"@angular-slider/ngx-slider": "^19.0.0",
"@angular/animations": "^19.1.7",
"@angular/cdk": "^19.1.5",
"@angular/cli": "^19.1.8",
"@angular/common": "^19.1.7",
"@angular/compiler": "^19.1.7",
"@angular/core": "^19.1.7",
"@angular/elements": "^19.1.7",
"@angular/forms": "^19.1.7",
"@angular/material": "^19.1.5",
"@angular/platform-browser": "^19.1.7",
"@angular/platform-browser-dynamic": "^19.1.7",
"@angular/platform-server": "^19.1.7",
"@angular/router": "^19.1.7",
"@fortawesome/angular-fontawesome": "^1.0.0",
"@fortawesome/fontawesome-free": "^6.6.0",
"@fortawesome/fontawesome-svg-core": "^6.6.0",
"@jsverse/transloco": "^7.5.1",
"@kolkov/angular-editor": "^3.0.0-beta.2",
"@ng-bootstrap/ng-bootstrap": "^17.0.1",
"@ng-bootstrap/ng-bootstrap": "^18.0.0",
"@ngstack/code-editor": "^9.0.0",
"@swimlane/ngx-charts": "^21.1.2",
"@swimlane/ngx-charts": "^22.0.0-alpha.0",
"@types/jquery": "^3.5.32",
"@types/sanitize-html": "^2.13.0",
"angular2-hotkeys": "^16.0.1",
Expand All @@ -60,9 +60,8 @@
"material-design-icons": "^3.0.1",
"monaco-editor": "^0.52.2",
"ng2-currency-mask": "^13.0.3",
"ng2-file-upload": "^7.0.1",
"ng2-file-upload": "^8.0.0",
"ngx-csv": "^0.3.2",
"ngx-ellipsis": "^5.0.1",
"pdfmake": "^0.2.18",
"rxjs": "^7.8.1",
"sanitize-html": "^2.14.0",
Expand All @@ -71,12 +70,12 @@
"style-loader": "^4.0.0",
"swiper": "^8.4.7",
"typescript": "5.5",
"zone.js": "^0.14.10"
"zone.js": "^0.15.0"
},
"devDependencies": {
"@angular-builders/custom-webpack": "^18.0.0",
"@angular-builders/custom-webpack": "^19.0.0",
"@electron/packager": "^18.3.6",
"electron": "^34.0.0",
"shx": "^0.3.4"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ import { Component, Input, OnInit } from '@angular/core';
import { AssessmentService } from '../../services/assessment.service';

@Component({
selector: 'app-inherent-risk-profile',
templateUrl: './inherent-risk-profile.component.html',
styleUrls: ['../../reports/reports.scss']
selector: 'app-inherent-risk-profile',
templateUrl: './inherent-risk-profile.component.html',
styleUrls: ['../../reports/reports.scss'],
standalone: false
})
export class InherentRiskProfileComponent implements OnInit {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ import { NavigationAggregService } from '../../services/navigationAggreg.service
import { AggregationService } from '../../services/aggregation.service';

@Component({
selector: 'app-aggregation-detail',
templateUrl: './aggregation-detail.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' }
selector: 'app-aggregation-detail',
templateUrl: './aggregation-detail.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' },
standalone: false
})
export class AggregationDetailComponent {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ import { MatDialog } from '@angular/material/dialog';
import { Aggregation } from '../../models/aggregation.model';

@Component({
selector: 'app-aggregation-home',
templateUrl: './aggregation-home.component.html',
styleUrls: ['./aggregation-home.component.scss'],
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a trend-table-width' }
selector: 'app-aggregation-home',
templateUrl: './aggregation-home.component.html',
styleUrls: ['./aggregation-home.component.scss'],
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a trend-table-width' },
standalone: false
})
export class AggregationHomeComponent implements OnInit {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ import { NavigationAggregService } from '../../services/navigationAggreg.service
import { ConfirmComponent } from '../../dialogs/confirm/confirm.component';

@Component({
selector: 'app-alias-assessments',
templateUrl: './alias-assessments.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a trend-table-width' }
selector: 'app-alias-assessments',
templateUrl: './alias-assessments.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a trend-table-width' },
standalone: false
})
export class AliasAssessmentsComponent implements OnInit {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ import { NavigationAggregService } from '../../services/navigationAggreg.service
import { ConfigService } from '../../services/config.service';

@Component({
selector: 'app-compare-analytics',
templateUrl: './compare-analytics.component.html',
host: { class: 'd-flex flex-column flex-11a trend-table-width' }
selector: 'app-compare-analytics',
templateUrl: './compare-analytics.component.html',
host: { class: 'd-flex flex-column flex-11a trend-table-width' },
standalone: false
})
export class CompareAnalyticsComponent implements OnInit {
type: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ import { ColorService } from '../../../../services/color.service';
import { QuestionsService } from '../../../../services/questions.service';

@Component({
selector: 'app-compare-bestworst-maturity',
templateUrl: './compare-bestworst.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' }
selector: 'app-compare-bestworst-maturity',
templateUrl: './compare-bestworst.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' },
standalone: false
})
export class CompareMaturityBestworstComponent implements OnInit {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ import { ColorService } from '../../../../services/color.service';
import { QuestionsService } from '../../../../services/questions.service';

@Component({
selector: 'app-compare-individual-maturity',
templateUrl: './compare-individual.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' }
selector: 'app-compare-individual-maturity',
templateUrl: './compare-individual.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' },
standalone: false
})
export class CompareMaturityIndividualComponent implements OnInit {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ import { Component, OnInit } from '@angular/core';
import { AggregationService } from '../../../../services/aggregation.service';

@Component({
selector: 'app-compare-missed-maturity',
templateUrl: './compare-missed.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' }
selector: 'app-compare-missed-maturity',
templateUrl: './compare-missed.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' },
standalone: false
})
export class CompareMaturityMissedComponent implements OnInit {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ import { ChartService } from '../../../../services/chart.service';
import Chart from 'chart.js/auto';

@Component({
selector: 'app-compare-bestworst',
templateUrl: './compare-bestworst.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' }
selector: 'app-compare-bestworst',
templateUrl: './compare-bestworst.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' },
standalone: false
})
export class CompareBestworstComponent implements OnInit {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ import { Chart } from 'chart.js';
import { ColorService } from '../../../../services/color.service';

@Component({
selector: 'app-compare-individual',
templateUrl: './compare-individual.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' }
selector: 'app-compare-individual',
templateUrl: './compare-individual.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' },
standalone: false
})
export class CompareIndividualComponent implements OnInit {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ import { Component, OnInit } from '@angular/core';
import { AggregationService } from '../../../../services/aggregation.service';

@Component({
selector: 'app-compare-missed',
templateUrl: './compare-missed.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' }
selector: 'app-compare-missed',
templateUrl: './compare-missed.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' },
standalone: false
})
export class CompareMissedComponent implements OnInit {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ import { ColorService } from '../../../../services/color.service';
import { AssessmentService } from '../../../../services/assessment.service';

@Component({
selector: 'app-compare-summary',
templateUrl: './compare-summary.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' }
selector: 'app-compare-summary',
templateUrl: './compare-summary.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' },
standalone: false
})
export class CompareSummaryComponent implements OnInit {

Expand Down
5 changes: 3 additions & 2 deletions CSETWebNg/src/app/aggregation/merge/merge.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ import { MergeQuestionDetailComponent } from '../../dialogs/merge-question-detai
import { MatDialogRef, MatDialog } from '@angular/material/dialog';

@Component({
selector: 'app-merge',
templateUrl: './merge.component.html'
selector: 'app-merge',
templateUrl: './merge.component.html',
standalone: false
})
export class MergeComponent implements OnInit {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ import { ConfigService } from '../../services/config.service';
import Chart from 'chart.js/auto';

@Component({
selector: 'app-trend-analytics',
templateUrl: './trend-analytics.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' }
selector: 'app-trend-analytics',
templateUrl: './trend-analytics.component.html',
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a' },
standalone: false
})
export class TrendAnalyticsComponent implements OnInit {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ interface UserAssessment {
}

@Component({
selector: 'app-trend-compare-compatibility',
templateUrl: './trend-compare-compatibility.component.html'
selector: 'app-trend-compare-compatibility',
templateUrl: './trend-compare-compatibility.component.html',
standalone: false
})
export class TrendCompareCompatibilityComponent implements OnInit {

Expand Down
11 changes: 6 additions & 5 deletions CSETWebNg/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ import { translate } from '@jsverse/transloco';
declare var $: any;

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
encapsulation: ViewEncapsulation.None,
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a w-100' }
selector: 'app-root',
templateUrl: './app.component.html',
encapsulation: ViewEncapsulation.None,
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a w-100' },
standalone: false
})
export class AppComponent implements OnInit, AfterViewInit {
docUrl: string;
Expand Down
18 changes: 8 additions & 10 deletions CSETWebNg/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
////////////////////////////////
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { DatePipe } from '@angular/common';
import { APP_INITIALIZER, NgModule } from '@angular/core';
import { NgModule, inject, provideAppInitializer } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';

// import { MatAutocompleteModule } from '@angular/material/autocomplete';
Expand Down Expand Up @@ -337,7 +337,7 @@ import { CisCommentsmarkedComponent } from './reports/cis-commentsmarked/cis-com
import { MaturityQuestionsAcetComponent } from './assessment/questions/maturity-questions/maturity-questions-acet.component';
import { MaturityQuestionsIseComponent } from './assessment/questions/maturity-questions/maturity-questions-ise.component';
import { EdmComponent } from './reports/edm/edm.component';
import { TooltipModule } from './tooltip/tooltip.module';
import { TooltipModule } from './modules/tooltip/tooltip.module';
import { QuestionTextComponent } from './assessment/questions/question-text/question-text.component';
import { QuestionTextCpgComponent } from './assessment/questions/question-text/question-text-cpg/question-text-cpg.component';
import { AcetFilteringService } from './services/filtering/maturity-filtering/acet-filtering.service';
Expand Down Expand Up @@ -486,7 +486,7 @@ import { ExamProfileSummaryComponent } from './assessment/prepare/irp-summary/ir
import { SwiperModule } from 'swiper/angular';
import { NewAssessmentDialogComponent } from './dialogs/new-assessment-dialog/new-assessment-dialog.component';
import { GalleryService } from './services/gallery.service';
import { EllipsisModule } from 'ngx-ellipsis';
import { EllipsisModule } from './modules/ngx-ellipsis/ellipsis.module';
import { CrrReportComponent } from './reports/crr/crr-report/crr-report.component';
import { CrrCoverSheetComponent } from './reports/crr/crr-report/crr-cover-sheet/crr-cover-sheet.component';
import { CrrCoverSheet2Component } from './reports/crr/crr-report/crr-cover-sheet2/crr-cover-sheet2.component';
Expand Down Expand Up @@ -1335,9 +1335,8 @@ import { UpgradeComponent } from './assessment/upgrade/upgrade.component';
provideTranslocoScope('tutorial', 'reports'),
ConfigService,
AuthenticationService,
{
provide: APP_INITIALIZER,
useFactory: (configSvc: ConfigService, authSvc: AuthenticationService, tSvc: TranslocoService) => {
provideAppInitializer(() => {
const initializerFn = ((configSvc: ConfigService, authSvc: AuthenticationService, tSvc: TranslocoService) => {
return () => {
return configSvc.loadConfig().then(() => {
// Load and set the language based on config
Expand All @@ -1350,10 +1349,9 @@ import { UpgradeComponent } from './assessment/upgrade/upgrade.component';
});
});
};
},
deps: [ConfigService, AuthenticationService, TranslocoService],
multi: true
},
})(inject(ConfigService), inject(AuthenticationService), inject(TranslocoService));
return initializerFn();
}),
{
provide: HTTP_INTERCEPTORS,
useClass: JwtInterceptor,
Expand Down
Loading
Loading