Skip to content

Commit

Permalink
Rearrange file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
edlu77 committed Feb 14, 2024
1 parent 65d369d commit b503133
Show file tree
Hide file tree
Showing 326 changed files with 2,881 additions and 572 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
File renamed without changes.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
/raw-data
container.sif
website/debug.log
.nx

.nx
node_modules
.angular
dist
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Add files here to ignore them from prettier formatting
/dist
/coverage
/.nx/cache
.angular
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
57 changes: 29 additions & 28 deletions website/project.json → apps/website/project.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"$schema": "node_modules/nx/schemas/project-schema.json",
"name": "a2agc",
"name": "website",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"prefix": "agc",
"sourceRoot": "apps/website/src",
"tags": [],
"generators": {
"@schematics/angular:component": {
"style": "scss"
Expand All @@ -10,27 +13,25 @@
"strict": true
}
},
"sourceRoot": "src",
"prefix": "agc",
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/a2agc",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"outputPath": "dist/apps/website",
"index": "apps/website/src/index.html",
"main": "apps/website/src/main.ts",
"polyfills": ["zone.js"],
"tsConfig": "apps/website/tsconfig.app.json",
"allowedCommonJsDependencies": [
"css-element-queries"
],
"assets": [
"src/favicon.ico",
"src/assets"
"apps/website/src/favicon.ico",
"apps/website/src/assets"
],
"styles": [
"src/styles.scss",
"src/themes.scss",
"apps/website/src/styles.scss",
"apps/website/src/themes.scss",
"node_modules/prismjs/themes/prism-okaidia.css",
"node_modules/prismjs/plugins/line-numbers/prism-line-numbers.css"
],
Expand All @@ -51,8 +52,8 @@
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
"replace": "apps/website/src/environments/environment.ts",
"with": "apps/website/src/environments/environment.prod.ts"
}
],
"optimization": true,
Expand Down Expand Up @@ -87,34 +88,34 @@
"options": {},
"configurations": {
"production": {
"buildTarget": "a2agc:build:production"
"buildTarget": "website:build:production"
},
"development": {
"buildTarget": "a2agc:build:development"
"buildTarget": "website:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"executor": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "a2agc:build"
"buildTarget": "website:build"
}
},
"test": {
"executor": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"main": "apps/website/src/test.ts",
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"codeCoverage": true,
"assets": [
"src/favicon.ico",
"src/assets"
"apps/website/src/favicon.ico",
"apps/website/src/assets"
],
"styles": [
"src/styles.scss"
"apps/website/src/styles.scss"
],
"scripts": []
}
Expand All @@ -123,8 +124,8 @@
"executor": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
"apps/website/src/**/*.ts",
"apps/website/src/**/*.html"
]
},
"outputs": [
Expand All @@ -134,14 +135,14 @@
"e2e": {
"executor": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js"
"protractorConfig": "apps/website/e2e/protractor.conf.js"
},
"configurations": {
"production": {
"devServerTarget": "a2agc:serve:production"
"devServerTarget": "website:serve:production"
},
"development": {
"devServerTarget": "a2agc:serve:development"
"devServerTarget": "website:serve:development"
}
},
"defaultConfiguration": "development"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class DataState extends NgxsImmutableDataRepository<DataStateModel> {
super();
}

ngxsOnInit(): void {
override ngxsOnInit(): void {
super.ngxsOnInit();

this.datasetLoader.load(DATA_CONFIG.datasetsPath).subscribe(result => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ export class DatasetVariablesState extends NgxsDataEntityCollectionsRepository<D
super();
}

selectId(variable: DatasetVariable): string;
selectId(dataset: string | Dataset, variable: string | DatasetVariable): string;
selectId(
override selectId(variable: DatasetVariable): string;
override selectId(dataset: string | Dataset, variable: string | DatasetVariable): string;
override selectId(
dataset: string | Dataset | DatasetVariable,
variable?: string | DatasetVariable
): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type DatasetsStateModel = EntityCollections<Dataset, string>;
})
@Injectable()
export class DatasetsState extends NgxsDataEntityCollectionsRepository<Dataset, string> {
selectId(dataset: string | Dataset): string {
override selectId(dataset: string | Dataset): string {
return typeof dataset === 'string' ? dataset : dataset.name;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class PageState extends NgxsImmutableDataRepository<PageStateModel> {
return this.state$.pipe(pluck('hasShownHelpModal'));
}

ngxsOnInit(): void {
override ngxsOnInit(): void {
super.ngxsOnInit();
const hasShownHelpModal = localStorage.getItem(LOCAL_STORAGE_HELP_MODAL_KEY)?.toLowerCase() === 'true';
this.patchState({ hasShownHelpModal });
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Visualization, visualizations } from './visualizations';
})
@Injectable()
export class VisualizationsState extends NgxsDataEntityCollectionsRepository<Visualization, string>{
ngxsOnInit(): void {
override ngxsOnInit(): void {
this.setAll(visualizations);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createGeoZoomPatch } from '../../../shared/components/visualization-pag
import {
Visualization6DataHandler,
} from '../../../shared/components/visualization-page/shared/visualization-6-data-handler';
import { VisualizationOneView } from './../../../shared/components/visualization-page/shared/visualization1-data-handler';
import { VisualizationOneView } from '../../../shared/components/visualization-page/shared/visualization1-data-handler';


export interface Visualization {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot } from '@angular/router';
import { EMPTY, Observable } from 'rxjs';
import { pluck, take } from 'rxjs/operators';
import { Visualization } from 'src/app/core/state/visualizations/visualizations';
import { Visualization } from '../../core/state/visualizations/visualizations';

import { VisualizationsState } from '../../core/state/visualizations/visualizations.state';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, OnDestroy } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Subscription } from 'rxjs';
import { Visualization } from 'src/app/core/state/visualizations/visualizations';
import { Visualization } from '../../core/state/visualizations/visualizations';


// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
Expand All @@ -17,7 +17,7 @@ export class VisualizationComponent implements OnDestroy {

constructor(route: ActivatedRoute) {
const sub = route.data.subscribe(data => {
this.visualization = data.visualization;
this.visualization = data['visualization'];
});
this.subscriptions.add(sub);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TableDataSelectorComponent } from './table-data-selector.component';
import { MatSelectModule } from '@angular/material/select';
import { SubSelectorModule } from './../sub-selector/sub-selector.module';
import { SubSelectorModule } from '../sub-selector/sub-selector.module';


@NgModule({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class DataHandlerView extends View {
const superHandlerTypes = this.HANDLER_TYPES;

return class extends this {
static readonly HANDLER_TYPES = superHandlerTypes.concat(handlerTypes);
static override readonly HANDLER_TYPES = superHandlerTypes.concat(handlerTypes);
};
}

Expand All @@ -23,7 +23,7 @@ export class DataHandlerView extends View {
this.handlers = handlerTypes.map(type => new type(this));
}

finalize(): this {
override finalize(): this {
this.handlers.forEach(handler => handler.finalize?.());
return super.finalize();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class Visualization6DataHandler implements DataHandler {

static withOptions(options: Visualization6DataHandlerOptions): DataHandlerType {
return class extends this {
static readonly OPTIONS = options;
static override readonly OPTIONS = options;
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class VisualizationOneDataHandler {

Object.entries(dataVariableMapping)
.forEach(([label, dataVariable]) => {
this.subsets[label] = data.filter((row) => row.DATA_VARIABLE === dataVariable);
this.subsets[label] = data.filter((row) => row['DATA_VARIABLE'] === dataVariable);
});

this.updateDataVariable('Age');
Expand All @@ -62,7 +62,7 @@ export class VisualizationOneView extends View {
super(runtime, opt);
this.dataHandler = new VisualizationOneDataHandler(this);
}
finalize(): this {
override finalize(): this {
this.dataHandler.finalize();
return super.finalize();
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit b503133

Please sign in to comment.