Skip to content

Commit

Permalink
Replaced obsolete Moskito module
Browse files Browse the repository at this point in the history
  • Loading branch information
jirkapok committed Feb 29, 2024
1 parent f644e46 commit 4300950
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
10 changes: 6 additions & 4 deletions projects/planner/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ import {ManagedDiveSchedules} from './shared/managedDiveSchedules';
import {WaypointsDifferenceComponent} from './diff/waypoints/diff-waypoints.component';
import {DiveInfoDifferenceComponent} from './diff/diveinfo/diff-diveinfo.component';
import {ProfileDifferenceChartComponent} from './diff/profilechart/diff-profilechart.component';
import {MaskitoModule} from '@maskito/angular';
import {SurfaceIntervalComponent} from './surface-interval/surface-interval.component';
import {TestDataInjector} from './diff/testData/testDataInjector';
import {ProfileComparatorService} from './shared/profileComparatorService';
Expand Down Expand Up @@ -150,7 +149,6 @@ const COMPONENTS = [
RedundanciesComponent,
SacComponent,
SalinityComponent,
SurfaceIntervalComponent,
TankChartComponent,
TanksComplexComponent,
TanksSimpleComponent,
Expand All @@ -162,6 +160,10 @@ const COMPONENTS = [
LoadTestDataComponent
];

const STANDALONE = [
SurfaceIntervalComponent,
];

const SERVICES = [
{ provide: WorkersFactoryCommon, useClass: WorkersFactory },
DatePipe,
Expand Down Expand Up @@ -205,14 +207,14 @@ const SERVICES = [
imports: [
...ANGULAR_MODULES,
...MDB_MODULES,
STANDALONE,
ClipboardModule,
ServiceWorkerModule.register('ngsw-worker.js', {
enabled: environment.production,
// Register the ServiceWorker as soon as the application is stable
// or after 30 seconds (whichever comes first).
registrationStrategy: 'registerWhenStable:30000'
}),
MaskitoModule // TODO replace obsolite MaskitoModule
})
],
exports: [],
providers: SERVICES,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ import { DiveSchedules } from '../shared/dive.schedules';
import { ReloadDispatcher } from '../shared/reloadDispatcher';
import { Time } from 'scuba-physics';
import { SurfaceIntervalComponent } from '../surface-interval/surface-interval.component';
import { MaskitoModule } from '@maskito/angular';
import { DepthComponent } from "../depth/depth.component";
import { DepthComponent } from '../depth/depth.component';

export class SimpleDepthsPage {
constructor(private fixture: ComponentFixture<DepthsSimpleComponent>) { }
Expand Down Expand Up @@ -55,8 +54,8 @@ describe('Depths Simple Component', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ DepthsSimpleComponent, SurfaceIntervalComponent, DepthComponent ],
imports: [ ReactiveFormsModule, MaskitoModule ],
declarations: [ DepthsSimpleComponent, DepthComponent ],
imports: [ ReactiveFormsModule, SurfaceIntervalComponent ],
providers: [
WorkersFactoryCommon, PlannerService,
UnitConversion, InputControls, DiveSchedules,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('SurfaceIntervalComponent', () => {

beforeEach(() => {
TestBed.configureTestingModule({
declarations: [SurfaceIntervalComponent],
imports: [ SurfaceIntervalComponent ],
providers: [
DiveSchedules, UnitConversion, DecimalPipe,
ReloadDispatcher, InputControls, ValidatorGroups
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
import { Component, Input, OnInit } from '@angular/core';
import { AbstractControl, FormControl, FormGroup, NonNullableFormBuilder } from '@angular/forms';
import {
AbstractControl, FormControl, FormGroup,
NonNullableFormBuilder, ReactiveFormsModule
} from '@angular/forms';
import { maskitoTimeOptionsGenerator } from '@maskito/kit';
import { MaskitoDirective } from '@maskito/angular';
import { DiveSchedules } from '../shared/dive.schedules';
import { takeUntil } from 'rxjs';
import { ReloadDispatcher } from '../shared/reloadDispatcher';
import { Streamed } from '../shared/streamed';
import { DateFormats } from '../shared/formaters';
import { InputControls } from '../shared/inputcontrols';
import { ValidatorGroups } from '../shared/ValidatorGroups';
import { MdbDropdownModule } from 'mdb-angular-ui-kit/dropdown';
import { MdbFormsModule } from 'mdb-angular-ui-kit/forms';
import { NgIf } from '@angular/common';

@Component({
selector: 'app-surface-interval',
templateUrl: './surface-interval.component.html',
styleUrls: ['./surface-interval.component.scss']
styleUrls: ['./surface-interval.component.scss'],
standalone: true,
imports: [
MaskitoDirective, ReactiveFormsModule,
MdbDropdownModule, MdbFormsModule, NgIf
]
})
export class SurfaceIntervalComponent extends Streamed implements OnInit {
@Input() public form!: FormGroup;
Expand Down

0 comments on commit 4300950

Please sign in to comment.