step 1 - convert al lcomponents, directives and pipes to standalone
see https://v17.angular.io/guide/standalone-migration I executed: ng g @angular/core:standalone and selected "Convert all components, directives and pipes to standalone"
This commit is contained in:
@@ -8,8 +8,8 @@ describe('AddPlotDialogComponent', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ AddPlotDialogComponent ]
|
||||
})
|
||||
imports: [AddPlotDialogComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(AddPlotDialogComponent);
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
import { AfterViewInit, Component, ElementRef, Inject, ViewChild } from '@angular/core';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogContent, MatDialogActions, MatDialogClose } from '@angular/material/dialog';
|
||||
import { PlotConfig } from 'src/app/plot.service';
|
||||
import { VisualizationPageComponent } from 'src/app/visualization-page/visualization-page.component';
|
||||
import { VisualizationPageComponent as VisualizationPageComponent_1 } from '../../../visualization-page/visualization-page.component';
|
||||
import { CdkScrollable } from '@angular/cdk/scrolling';
|
||||
import { MatButton } from '@angular/material/button';
|
||||
|
||||
@Component({
|
||||
selector: 'app-add-plot-dialog',
|
||||
templateUrl: './add-plot-dialog.component.html'
|
||||
selector: 'app-add-plot-dialog',
|
||||
templateUrl: './add-plot-dialog.component.html',
|
||||
standalone: true,
|
||||
imports: [VisualizationPageComponent_1, CdkScrollable, MatDialogContent, MatDialogActions, MatButton, MatDialogClose]
|
||||
})
|
||||
export class AddPlotDialogComponent {
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ describe('AddTextDialogComponent', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ AddTextDialogComponent ]
|
||||
})
|
||||
imports: [AddTextDialogComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(AddTextDialogComponent);
|
||||
|
||||
@@ -1,9 +1,18 @@
|
||||
import { Component, ElementRef, Inject, ViewChild } from '@angular/core';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose } from '@angular/material/dialog';
|
||||
import { CdkScrollable } from '@angular/cdk/scrolling';
|
||||
import { MatFormField, MatLabel } from '@angular/material/form-field';
|
||||
import { MatInput } from '@angular/material/input';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { FocusDirective } from '../../../focus.directive';
|
||||
import { MarkdownComponent } from 'ngx-markdown';
|
||||
import { MatButton } from '@angular/material/button';
|
||||
|
||||
@Component({
|
||||
selector: 'app-add-text-dialog',
|
||||
templateUrl: './add-text-dialog.component.html'
|
||||
selector: 'app-add-text-dialog',
|
||||
templateUrl: './add-text-dialog.component.html',
|
||||
standalone: true,
|
||||
imports: [MatDialogTitle, CdkScrollable, MatDialogContent, MatFormField, MatLabel, MatInput, FormsModule, FocusDirective, MarkdownComponent, MatDialogActions, MatButton, MatDialogClose]
|
||||
})
|
||||
export class AddTextDialogComponent {
|
||||
text = "";
|
||||
|
||||
@@ -8,8 +8,8 @@ describe('DashboardComponent', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ DashboardComponent ]
|
||||
})
|
||||
imports: [DashboardComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(DashboardComponent);
|
||||
|
||||
@@ -1,19 +1,27 @@
|
||||
import { CdkDragDrop, moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop';
|
||||
import { CdkDragDrop, moveItemInArray, transferArrayItem, CdkDropListGroup, CdkDropList, CdkDrag, CdkDragHandle } from '@angular/cdk/drag-drop';
|
||||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute, RouterLink } from '@angular/router';
|
||||
import { Dashboard, DashboardCreationData, DashboardService, PlotWidget, PlotWidgetRenderData, TextWidget } from 'src/app/dashboard.service';
|
||||
import { PlotConfig, PlotResponse, PlotService } from 'src/app/plot.service';
|
||||
import { NewDashboardComponent } from '../new-dashboard/new-dashboard.component';
|
||||
import { AddPlotDialogComponent } from './add-plot-dialog/add-plot-dialog.component';
|
||||
import { AddTextDialogComponent } from './add-text-dialog/add-text-dialog.component';
|
||||
import { DatePickerChange, DatePickerComponent } from 'src/app/components/datepicker/date-picker.component';
|
||||
import { NgIf, NgFor } from '@angular/common';
|
||||
import { MatProgressSpinner } from '@angular/material/progress-spinner';
|
||||
import { MatButton, MatIconButton } from '@angular/material/button';
|
||||
import { DatePickerComponent as DatePickerComponent_1 } from '../../components/datepicker/date-picker.component';
|
||||
import { TextWidgetComponent } from './text-widget/text-widget.component';
|
||||
import { PlotWidgetComponent } from './plot-widget/plot-widget.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dashboard',
|
||||
templateUrl: './dashboard.component.html'
|
||||
selector: 'app-dashboard',
|
||||
templateUrl: './dashboard.component.html',
|
||||
standalone: true,
|
||||
imports: [NgIf, MatProgressSpinner, RouterLink, MatButton, DatePickerComponent_1, MatIconButton, CdkDropListGroup, NgFor, CdkDropList, CdkDrag, CdkDragHandle, TextWidgetComponent, PlotWidgetComponent]
|
||||
})
|
||||
export class DashboardComponent implements OnInit{
|
||||
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogClose } from '@angular/material/dialog';
|
||||
import { MatIconButton } from '@angular/material/button';
|
||||
|
||||
@Component({
|
||||
selector: 'app-full-screen-plot-dialog',
|
||||
templateUrl: './full-screen-plot-dialog.component.html'
|
||||
selector: 'app-full-screen-plot-dialog',
|
||||
templateUrl: './full-screen-plot-dialog.component.html',
|
||||
standalone: true,
|
||||
imports: [MatIconButton, MatDialogClose]
|
||||
})
|
||||
export class FullScreenPlotDialogComponent {
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ describe('PlotWidgetComponent', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ PlotWidgetComponent ]
|
||||
})
|
||||
imports: [PlotWidgetComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(PlotWidgetComponent);
|
||||
|
||||
@@ -6,10 +6,14 @@ import { PlotViewComponent } from 'src/app/plot-view/plot-view.component';
|
||||
import { PlotConfig, PlotResponse, PlotService } from 'src/app/plot.service';
|
||||
import { AddPlotDialogComponent } from '../add-plot-dialog/add-plot-dialog.component';
|
||||
import { FullScreenPlotDialogComponent } from '../full-screen-plot-dialog/full-screen-plot-dialog.component';
|
||||
import { NgClass, NgIf } from '@angular/common';
|
||||
import { MatIconButton, MatButton } from '@angular/material/button';
|
||||
|
||||
@Component({
|
||||
selector: 'app-plot-widget',
|
||||
templateUrl: './plot-widget.component.html'
|
||||
selector: 'app-plot-widget',
|
||||
templateUrl: './plot-widget.component.html',
|
||||
standalone: true,
|
||||
imports: [NgClass, MatIconButton, NgIf, MatButton]
|
||||
})
|
||||
export class PlotWidgetComponent {
|
||||
@Input("data")
|
||||
|
||||
@@ -8,8 +8,8 @@ describe('TextWidgetComponent', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ TextWidgetComponent ]
|
||||
})
|
||||
imports: [TextWidgetComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(TextWidgetComponent);
|
||||
|
||||
@@ -3,10 +3,14 @@ import { MatDialog } from '@angular/material/dialog';
|
||||
import { ConfirmationDialogComponent } from 'src/app/confirmation-dialog/confirmation-dialog.component';
|
||||
import { TextWidget } from 'src/app/dashboard.service';
|
||||
import { AddTextDialogComponent } from '../add-text-dialog/add-text-dialog.component';
|
||||
import { MatIconButton } from '@angular/material/button';
|
||||
import { MarkdownComponent } from 'ngx-markdown';
|
||||
|
||||
@Component({
|
||||
selector: 'app-text-widget',
|
||||
templateUrl: './text-widget.component.html'
|
||||
selector: 'app-text-widget',
|
||||
templateUrl: './text-widget.component.html',
|
||||
standalone: true,
|
||||
imports: [MatIconButton, MarkdownComponent]
|
||||
})
|
||||
export class TextWidgetComponent {
|
||||
@Input()
|
||||
|
||||
Reference in New Issue
Block a user