From e62f156eb267a5df9bddf55a66bdb4b23f68a4c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Fri, 16 Feb 2024 18:35:27 +0100 Subject: [PATCH] Make ProductGamesystemEditor, ProductState and ProductTransitionEditor not standalone --- src/app/app.module.ts | 14 +++++++-- .../product-gamesystem-editor.component.ts | 5 ---- .../product-state-editor.component.ts | 29 ------------------- .../product-transition-editor.component.ts | 22 -------------- 4 files changed, 11 insertions(+), 59 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 9a9cb35..2c095d0 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -54,6 +54,12 @@ import {MatOption, MatSelect} from "@angular/material/select"; import { ProductGamesystemEditorComponent } from "./editor/gamesystem-editor/product-gamesystem-editor/product-gamesystem-editor.component"; +import { + ProductTransitionEditorComponent +} from "./editor/gamesystem-editor/transition-editor/product-transition-editor/product-transition-editor.component"; +import { + ProductStateEditorComponent +} from "./editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component"; // AoT requires an exported function for factories const httpLoaderFactory = (http: HttpClient): TranslateHttpLoader => new TranslateHttpLoader(http, './assets/i18n/', '.json'); @@ -70,7 +76,10 @@ const httpLoaderFactory = (http: HttpClient): TranslateHttpLoader => new Transl GamesystemEditorComponent, SimpleGamesystemEditorComponent, SimpleStateEditorComponent, - SimpleTransitionEditorComponent + SimpleTransitionEditorComponent, + ProductTransitionEditorComponent, + ProductStateEditorComponent, + ProductGamesystemEditorComponent ], imports: [ BrowserModule, @@ -124,8 +133,7 @@ const httpLoaderFactory = (http: HttpClient): TranslateHttpLoader => new Transl MatCheckbox, MatSelect, MatOption, - MatHint, - ProductGamesystemEditorComponent + MatHint ], providers: [], bootstrap: [AppComponent] diff --git a/src/app/editor/gamesystem-editor/product-gamesystem-editor/product-gamesystem-editor.component.ts b/src/app/editor/gamesystem-editor/product-gamesystem-editor/product-gamesystem-editor.component.ts index 1a90798..eebcefd 100644 --- a/src/app/editor/gamesystem-editor/product-gamesystem-editor/product-gamesystem-editor.component.ts +++ b/src/app/editor/gamesystem-editor/product-gamesystem-editor/product-gamesystem-editor.component.ts @@ -10,11 +10,6 @@ import { @Component({ selector: 'app-product-gamesystem-editor', - standalone: true, - imports: [ - ProductStateEditorComponent, - ProductTransitionEditorComponent - ], templateUrl: './product-gamesystem-editor.component.html', styleUrl: './product-gamesystem-editor.component.scss' }) diff --git a/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.ts b/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.ts index 8e4b02b..8f8ad77 100644 --- a/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.ts +++ b/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.ts @@ -2,43 +2,14 @@ import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; import {ProductGamesystem} from "../../../../game-model/gamesystems/ProductGamesystem"; import {SimpleGamesystem} from "../../../../game-model/gamesystems/SimpleGamesystem"; import { - MatCell, MatCellDef, - MatColumnDef, MatHeaderCell, MatHeaderCellDef, - MatHeaderRow, - MatHeaderRowDef, - MatRow, - MatRowDef, - MatTable, MatTableDataSource } from "@angular/material/table"; import {SimpleState} from "../../../../game-model/gamesystems/SimpleState"; import {State} from "../../../../game-model/gamesystems/State"; -import {NgForOf, NgIf} from "@angular/common"; -import {ProductState} from "../../../../game-model/gamesystems/ProductState"; -import {MatIcon} from "@angular/material/icon"; -import {Gamesystem} from "../../../../game-model/gamesystems/Gamesystem"; import {LeafGamesystemCalculator} from "../../product-gamesystem-editor/LeafGamesystemCalculator"; -import {MatTooltip} from "@angular/material/tooltip"; @Component({ selector: 'app-product-state-editor', - standalone: true, - imports: [ - MatTable, - MatRow, - MatRowDef, - MatHeaderRow, - MatHeaderRowDef, - MatColumnDef, - MatHeaderCell, - MatHeaderCellDef, - MatCell, - MatCellDef, - NgForOf, - NgIf, - MatIcon, - MatTooltip - ], templateUrl: './product-state-editor.component.html', styleUrl: './product-state-editor.component.scss' }) diff --git a/src/app/editor/gamesystem-editor/transition-editor/product-transition-editor/product-transition-editor.component.ts b/src/app/editor/gamesystem-editor/transition-editor/product-transition-editor/product-transition-editor.component.ts index f3edf0c..79c485a 100644 --- a/src/app/editor/gamesystem-editor/transition-editor/product-transition-editor/product-transition-editor.component.ts +++ b/src/app/editor/gamesystem-editor/transition-editor/product-transition-editor/product-transition-editor.component.ts @@ -31,28 +31,6 @@ class DisplayedColumnName { } @Component({ selector: 'app-product-transition-editor', - standalone: true, - imports: [ - MatTable, - NgForOf, - MatColumnDef, - MatHeaderCell, - MatHeaderCellDef, - MatCell, - MatCellDef, - NgIf, - MatHeaderRow, - MatRow, - MatHeaderRowDef, - MatRowDef, - MatTooltip, - MatFormField, - MatInput, - MatNoDataRow, - MatCard, - MatCardContent, - MatCardTitle - ], templateUrl: './product-transition-editor.component.html', styleUrl: './product-transition-editor.component.scss' })