From 4b211e425d583ea57ec9f0f91a3d3d4a1e59c29e Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Tue, 1 Oct 2024 19:07:34 +0200 Subject: [PATCH] convert limit by to standalone component --- pdb-js/src/app/app.module.ts | 4 ++-- .../add-plot-dialog.component.ts | 2 +- pdb-js/src/app/limit-by/limit-by.component.ts | 21 ++++++++++++++++--- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/pdb-js/src/app/app.module.ts b/pdb-js/src/app/app.module.ts index 034bdf5..c44639f 100644 --- a/pdb-js/src/app/app.module.ts +++ b/pdb-js/src/app/app.module.ts @@ -24,7 +24,6 @@ import { MatTooltipModule } from "@angular/material/tooltip"; import { OverlayModule } from "@angular/cdk/overlay"; import { YAxisDefinitionComponent } from "./y-axis-definition/y-axis-definition.component"; import { QueryAutocompleteComponent } from "./query-autocomplete/query-autocomplete.component"; -import { LimitByComponent } from "./limit-by/limit-by.component"; import { PlotDetailsComponent } from "./plot-details/plot-details.component"; import { PlotViewComponent } from "./plot-view/plot-view.component"; import { @@ -54,13 +53,13 @@ import { ConfirmationDialogComponent } from "./confirmation-dialog/confirmation- import { FocusDirective } from "./focus.directive"; import { MarkdownModule } from "ngx-markdown"; import { MainPageComponent } from "./main-page/main-page.component"; +import { LimitByComponent } from "./limit-by/limit-by.component"; @NgModule({ declarations: [ AppComponent, VisualizationPageComponent, YAxisDefinitionComponent, QueryAutocompleteComponent, - LimitByComponent, PlotDetailsComponent, PlotViewComponent, GalleryViewComponent, @@ -85,6 +84,7 @@ import { MainPageComponent } from "./main-page/main-page.component"; ReactiveFormsModule, DatePickerComponent, DragDropModule, + LimitByComponent, MainPageComponent, MatAutocompleteModule, MatBadgeModule, diff --git a/pdb-js/src/app/dashboard-page/dashboard/add-plot-dialog/add-plot-dialog.component.ts b/pdb-js/src/app/dashboard-page/dashboard/add-plot-dialog/add-plot-dialog.component.ts index 4ef930e..7ee82d7 100644 --- a/pdb-js/src/app/dashboard-page/dashboard/add-plot-dialog/add-plot-dialog.component.ts +++ b/pdb-js/src/app/dashboard-page/dashboard/add-plot-dialog/add-plot-dialog.component.ts @@ -1,4 +1,4 @@ -import { AfterViewInit, Component, ElementRef, Inject, ViewChild } from '@angular/core'; +import { Component, Inject, ViewChild } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { PlotConfig } from 'src/app/plot.service'; import { VisualizationPageComponent } from 'src/app/visualization-page/visualization-page.component'; diff --git a/pdb-js/src/app/limit-by/limit-by.component.ts b/pdb-js/src/app/limit-by/limit-by.component.ts index 2d9d3ba..dd03dda 100644 --- a/pdb-js/src/app/limit-by/limit-by.component.ts +++ b/pdb-js/src/app/limit-by/limit-by.component.ts @@ -1,10 +1,25 @@ -import { Component, Input} from '@angular/core'; -import {FormControl} from '@angular/forms'; +import { Component } from '@angular/core'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { MatFormField, MatLabel } from '@angular/material/form-field'; +import { MatInput } from '@angular/material/input'; +import { MatOption, MatSelect } from '@angular/material/select'; +import { BrowserModule } from '@angular/platform-browser'; @Component({ selector: 'pdb-limit-by', templateUrl: './limit-by.component.html', - styleUrls: ['./limit-by.component.scss'] + styleUrls: ['./limit-by.component.scss'], + standalone: true, + imports: [ + BrowserModule, + FormsModule, + MatFormField, + MatInput, + MatLabel, + MatSelect, + MatOption, + ReactiveFormsModule + ] }) export class LimitByComponent {