From a23400ec75996c058a42ee126816196f6c12c155 Mon Sep 17 00:00:00 2001 From: MishaZhem Date: Tue, 16 Jul 2024 14:43:33 +0300 Subject: [PATCH] chore: remove tui_e2e --- .../navigation/navigation.component.html | 1 - .../components/Cleaning/cleaning.component.ts | 16 +++++++--------- .../iot/components/Electro/electro.component.ts | 14 ++++---------- .../components/SmallCard/small-card.component.ts | 4 ++-- 4 files changed, 13 insertions(+), 22 deletions(-) diff --git a/apps/taiga-lumbermill/src/components/navigation/navigation.component.html b/apps/taiga-lumbermill/src/components/navigation/navigation.component.html index 516b2d2a0..c6252c281 100644 --- a/apps/taiga-lumbermill/src/components/navigation/navigation.component.html +++ b/apps/taiga-lumbermill/src/components/navigation/navigation.component.html @@ -149,7 +149,6 @@ tuiNavigationMain class="show" > - diff --git a/apps/taiga-lumbermill/src/dashboards/iot/components/Cleaning/cleaning.component.ts b/apps/taiga-lumbermill/src/dashboards/iot/components/Cleaning/cleaning.component.ts index 804a90d29..b4d92b3aa 100644 --- a/apps/taiga-lumbermill/src/dashboards/iot/components/Cleaning/cleaning.component.ts +++ b/apps/taiga-lumbermill/src/dashboards/iot/components/Cleaning/cleaning.component.ts @@ -1,7 +1,6 @@ import {AsyncPipe, CommonModule, isPlatformServer, NgIf} from '@angular/common'; import {ChangeDetectionStrategy, Component, inject, PLATFORM_ID} from '@angular/core'; import {FormControl, ReactiveFormsModule} from '@angular/forms'; -import {TUI_IS_E2E} from '@taiga-ui/cdk'; import {TuiButton, TuiDateFormat} from '@taiga-ui/core'; import {TuiProgress} from '@taiga-ui/kit'; import {TuiInputDateModule} from '@taiga-ui/legacy'; @@ -28,14 +27,13 @@ export class CleaningComponent { protected readonly control = new FormControl('20-01-2024'); protected readonly control2 = new FormControl(); protected readonly max = 100; - protected readonly value$ = - inject(TUI_IS_E2E) || isPlatformServer(inject(PLATFORM_ID)) - ? of(30) - : timer(300, 200).pipe( - map((i) => i + 30), - startWith(30), - takeWhile((value) => value <= this.max), - ); + protected readonly value$ = isPlatformServer(inject(PLATFORM_ID)) + ? of(30) + : timer(300, 200).pipe( + map((i) => i + 30), + startWith(30), + takeWhile((value) => value <= this.max), + ); protected readonly color$ = this.value$.pipe( map((value) => { diff --git a/apps/taiga-lumbermill/src/dashboards/iot/components/Electro/electro.component.ts b/apps/taiga-lumbermill/src/dashboards/iot/components/Electro/electro.component.ts index 845e21783..bcdbcee99 100644 --- a/apps/taiga-lumbermill/src/dashboards/iot/components/Electro/electro.component.ts +++ b/apps/taiga-lumbermill/src/dashboards/iot/components/Electro/electro.component.ts @@ -9,7 +9,6 @@ import { } from '@taiga-ui/addon-charts'; import type {TuiDayLike, TuiMapper, TuiMatcher} from '@taiga-ui/cdk'; import { - TUI_IS_E2E, TuiDay, TuiDayRange, TuiFilterPipe, @@ -45,7 +44,6 @@ import {map, of} from 'rxjs'; changeDetection: ChangeDetectionStrategy.OnPush, }) export class LineChartComponent { - private readonly isE2E = inject(TUI_IS_E2E); private readonly months$ = inject(TUI_MONTHS); protected data = new TuiDayRange( @@ -162,14 +160,10 @@ export class LineChartComponent { ...array, [ from.append({day: i}), - this.isE2E - ? initial - : Math.max( - (i ? array[i - 1][1] : initial) + - Math.random() * 10 - - 5, - 0, - ), + Math.max( + (i ? array[i - 1][1] : initial) + Math.random() * 10 - 5, + 0, + ), ], ], [], diff --git a/apps/taiga-lumbermill/src/dashboards/iot/components/SmallCard/small-card.component.ts b/apps/taiga-lumbermill/src/dashboards/iot/components/SmallCard/small-card.component.ts index a835c0638..c3da37c73 100644 --- a/apps/taiga-lumbermill/src/dashboards/iot/components/SmallCard/small-card.component.ts +++ b/apps/taiga-lumbermill/src/dashboards/iot/components/SmallCard/small-card.component.ts @@ -25,8 +25,8 @@ import {TuiCardLarge, TuiCell} from '@taiga-ui/layout'; }) export class SmallCardComponent { @Input() - public img!: string; + public img = ''; @Input() - public name!: string; + public name = ''; }