Skip to content
Permalink
Browse files
refactor: removes ActionModule dependency (#523)
  • Loading branch information
mdelez committed Sep 7, 2021
1 parent 269be23 commit bd60f00a77baef4909f30cc869b31ab849665ee0
Show file tree
Hide file tree
Showing 77 changed files with 206 additions and 144 deletions.
@@ -1,12 +1,14 @@
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { waitForAsync, TestBed } from '@angular/core/testing';
import { MatDialogModule } from '@angular/material/dialog';
import { MatIconModule } from '@angular/material/icon';
import { MatListModule } from '@angular/material/list';
import { MatMenuModule } from '@angular/material/menu';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { MatToolbarModule } from '@angular/material/toolbar';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { AppInitService } from '@dasch-swiss/dsp-ui';
import { TranslateModule } from '@ngx-translate/core';
import { TestConfig } from 'test.config';
import { AppComponent } from './app.component';
@@ -27,11 +29,12 @@ describe('AppComponent', () => {
],
imports: [
HttpClientTestingModule,
MatDialogModule,
MatIconModule,
MatListModule,
MatMenuModule,
MatSnackBarModule,
MatToolbarModule,
DspActionModule,
RouterTestingModule,
TranslateModule.forRoot()
],
@@ -7,7 +7,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { DspActionModule, DspViewerModule } from '@dasch-swiss/dsp-ui';
import { DspViewerModule } from '@dasch-swiss/dsp-ui';
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { AngularSplitModule } from 'angular-split';
@@ -319,7 +319,6 @@ export function httpLoaderFactory(httpClient: HttpClient) {
ClipboardModule,
ColorPickerModule,
CommonModule,
DspActionModule,
DspViewerModule,
FormsModule,
HttpClientModule,
@@ -42,7 +42,7 @@ <h2 class="login-form-title mat-title">{{formLabel.title}}</h2>
class="full-width submit-button"
[class.mat-primary]="!isError"
[class.mat-warn]="isError">
<dsp-progress-indicator [color]="'white'" [status]="0" *ngIf="loading" class="login-progress"></dsp-progress-indicator>
<app-progress-indicator [color]="'white'" [status]="0" *ngIf="loading" class="login-progress"></app-progress-indicator>
<mat-icon *ngIf="isError && !loading">close</mat-icon>
{{isError ? formLabel.retry : formLabel.submit}}
</button>
@@ -61,7 +61,7 @@ <h2 class="login-form-title mat-title">{{formLabel.title}}</h2>
<br>
<p>Please log out if it's not you.</p>
<button mat-raised-button (click)="logout()" class="full-width mat-warn logout-button">
<dsp-progress-indicator [color]="'white'" [status]="0" *ngIf="loading" class="login-progress"></dsp-progress-indicator>
<app-progress-indicator [color]="'white'" [status]="0" *ngIf="loading" class="login-progress"></app-progress-indicator>
{{formLabel.logout}}
</button>
</div>
@@ -2,7 +2,6 @@ import { TestBed } from '@angular/core/testing';
import { MatDialogModule } from '@angular/material/dialog';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { DspActionModule } from '@dasch-swiss/dsp-ui';
import { DspApiConnectionToken } from '../declarations/dsp-api-tokens';
import { CacheService } from './cache.service';

@@ -18,7 +17,6 @@ describe('CacheService', () => {
TestBed.configureTestingModule({
imports: [
BrowserAnimationsModule,
DspActionModule,
MatDialogModule,
MatSnackBarModule
],
@@ -15,7 +15,6 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { MatTooltipModule } from '@angular/material/tooltip';
import { MatTreeModule } from '@angular/material/tree';
import { RouterTestingModule } from '@angular/router/testing';
import { DspActionModule } from '@dasch-swiss/dsp-ui';
import { TranslateModule } from '@ngx-translate/core';
import { ListInfoFormComponent } from 'src/app/project/list/list-info-form/list-info-form.component';
import { ListItemFormComponent } from 'src/app/project/list/list-item-form/list-item-form.component';
@@ -54,7 +53,6 @@ describe('DialogComponent', () => {
],
imports: [
CommonModule,
DspActionModule,
MatAutocompleteModule,
MatButtonModule,
MatChipsModule,
@@ -2,7 +2,6 @@ import { TestBed } from '@angular/core/testing';
import { MatDialogModule } from '@angular/material/dialog';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { DspActionModule } from '@dasch-swiss/dsp-ui';
import { DspApiConnectionToken } from '../declarations/dsp-api-tokens';
import { ErrorHandlerService } from './error-handler.service';

@@ -20,7 +19,6 @@ describe('ErrorHandlerService', () => {
TestBed.configureTestingModule({
imports: [
BrowserAnimationsModule,
DspActionModule,
MatDialogModule,
MatSnackBarModule
],
@@ -1,15 +1,16 @@
import { HttpClientModule } from '@angular/common/http';
import { Component, Input, OnInit, ViewChild } from '@angular/core';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MatDialogModule } from '@angular/material/dialog';
import { MatIconModule } from '@angular/material/icon';
import { MatListModule } from '@angular/material/list';
import { MatMenuModule } from '@angular/material/menu';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { MatToolbarModule } from '@angular/material/toolbar';
import { By } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { DspActionModule } from '@dasch-swiss/dsp-ui';
import { TranslateModule } from '@ngx-translate/core';
import { AppInitService } from 'src/app/app-init.service';
import { ComponentCommunicationEventService, EmitEvent, Events } from 'src/app/main/services/component-communication-event.service';
@@ -64,10 +65,11 @@ describe('HeaderComponent', () => {
imports: [
BrowserAnimationsModule,
HttpClientModule,
DspActionModule,
MatDialogModule,
MatIconModule,
MatListModule,
MatMenuModule,
MatSnackBarModule,
MatToolbarModule,
RouterTestingModule,
TranslateModule.forRoot()
@@ -3,7 +3,6 @@ import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { DspActionModule } from '@dasch-swiss/dsp-ui';
import { AppInitService } from 'src/app/app-init.service';
import { TestConfig } from 'test.config';
import { DspApiConfigToken, DspApiConnectionToken } from '../declarations/dsp-api-tokens';
@@ -40,7 +39,6 @@ describe('LoginComponent', () => {
TestLoginFormComponent
],
imports: [
DspActionModule,
RouterTestingModule
],
providers: [
@@ -76,7 +76,7 @@ <h4 class="mat-subheading-2">Another tool based on DSP-API and designed to work
<section class="projects">
<div class="content large middle">
<h2 class="mat-title">The following projects have already stored their data in DSP-API</h2>
<dsp-progress-indicator [color]="'primary'" *ngIf="loading"></dsp-progress-indicator>
<app-progress-indicator [color]="'primary'" *ngIf="loading"></app-progress-indicator>
<div *ngIf="!loading">
<app-grid class="project-list" [list]="projects"></app-grid>
</div>
@@ -1,5 +1,6 @@
import { waitForAsync, ComponentFixture, inject, TestBed } from '@angular/core/testing';
import { MatButtonModule } from '@angular/material/button';
import { MatDialogModule } from '@angular/material/dialog';
import { MatDividerModule } from '@angular/material/divider';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
@@ -9,7 +10,7 @@ import { By } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { AppInitService } from '@dasch-swiss/dsp-ui';
import { of } from 'rxjs';
import { TestConfig } from 'test.config';
import { DspApiConfigToken, DspApiConnectionToken } from './declarations/dsp-api-tokens';
@@ -37,8 +38,8 @@ describe('MainComponent', () => {
],
imports: [
BrowserAnimationsModule,
DspActionModule,
MatButtonModule,
MatDialogModule,
MatDividerModule,
MatFormFieldModule,
MatIconModule,
@@ -1,4 +1,4 @@
<dsp-progress-indicator *ngIf="metadataLoading && !projectsMetadata"></dsp-progress-indicator>
<app-progress-indicator *ngIf="metadataLoading && !projectsMetadata"></app-progress-indicator>

<div *ngIf="!loading && project">
<div class="content large middle">
@@ -3,11 +3,12 @@ import { MatChipsModule } from '@angular/material/chips';
import { MatDialogModule } from '@angular/material/dialog';
import { MatDividerModule } from '@angular/material/divider';
import { MatIconModule } from '@angular/material/icon';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ActivatedRoute } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { AppInitService } from '@dasch-swiss/dsp-ui';
import { of } from 'rxjs';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
import { DialogComponent } from 'src/app/main/dialog/dialog.component';
@@ -38,11 +39,11 @@ describe('BoardComponent', () => {
],
imports: [
BrowserAnimationsModule,
DspActionModule,
MatChipsModule,
MatDialogModule,
MatDividerModule,
MatIconModule,
MatSnackBarModule,
RouterTestingModule
],
providers: [
@@ -59,4 +59,4 @@ <h2 class="mat-title">
</div>
</div>

<dsp-progress-indicator *ngIf="loading"></dsp-progress-indicator>
<app-progress-indicator *ngIf="loading"></app-progress-indicator>
@@ -4,10 +4,11 @@ import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatDialogModule } from '@angular/material/dialog';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { AppInitService } from '@dasch-swiss/dsp-ui';
import { TranslateModule } from '@ngx-translate/core';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
import { DialogComponent } from 'src/app/main/dialog/dialog.component';
@@ -28,11 +29,11 @@ describe('AddUserComponent', () => {
],
imports: [
BrowserAnimationsModule,
DspActionModule,
MatAutocompleteModule,
MatDialogModule,
MatIconModule,
MatInputModule,
MatSnackBarModule,
ReactiveFormsModule,
RouterTestingModule,
TranslateModule.forRoot()
@@ -4,7 +4,7 @@
(refreshParent)="refresh()" #addUserComponent></app-add-user>

<!-- main content: list of project members -->
<dsp-progress-indicator *ngIf="loading"></dsp-progress-indicator>
<app-progress-indicator *ngIf="loading"></app-progress-indicator>

<div *ngIf="!loading" class="users-list">
<!-- list of active users -->
@@ -3,15 +3,17 @@ import { ReactiveFormsModule } from '@angular/forms';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatButtonModule } from '@angular/material/button';
import { MatChipsModule } from '@angular/material/chips';
import { MatDialogModule } from '@angular/material/dialog';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatMenuModule } from '@angular/material/menu';
import { MatSelectModule } from '@angular/material/select';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ActivatedRoute } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { AppInitService, DspActionModule } from '@dasch-swiss/dsp-ui';
import { AppInitService } from '@dasch-swiss/dsp-ui';
import { TranslateModule } from '@ngx-translate/core';
import { of } from 'rxjs';
import { DspApiConfigToken, DspApiConnectionToken } from 'src/app/main/declarations/dsp-api-tokens';
@@ -39,14 +41,15 @@ describe('CollaborationComponent', () => {
],
imports: [
BrowserAnimationsModule,
DspActionModule,
MatAutocompleteModule,
MatButtonModule,
MatChipsModule,
MatDialogModule,
MatIconModule,
MatInputModule,
MatMenuModule,
MatSelectModule,
MatSnackBarModule,
ReactiveFormsModule,
RouterTestingModule,
TranslateModule.forRoot()
@@ -5,13 +5,13 @@ import { Component, ViewChild } from '@angular/core';
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonHarness } from '@angular/material/button/testing';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatDialogModule, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { ApiResponseData, CreateListRequest, ListInfoResponse, ListResponse, ListsEndpointAdmin, UpdateListInfoRequest } from '@dasch-swiss/dsp-js';
import { DspActionModule } from '@dasch-swiss/dsp-ui';
import { TranslateModule } from '@ngx-translate/core';
import { of } from 'rxjs';
import { AjaxResponse } from 'rxjs/ajax';
@@ -85,9 +85,10 @@ describe('ListInfoFormComponent', () => {
imports: [
BrowserAnimationsModule,
HttpClientModule,
DspActionModule,
MatDialogModule,
MatIconModule,
MatInputModule,
MatSnackBarModule,
ReactiveFormsModule,
RouterTestingModule,
TranslateModule.forRoot()
@@ -1,9 +1,11 @@
import { Component, DebugElement, ViewChild } from '@angular/core';
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { MatDialogModule } from '@angular/material/dialog';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { By } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ApiResponseData, CreateChildNodeRequest, ListNodeInfoResponse, ListsEndpointAdmin, UpdateChildNodeRequest } from '@dasch-swiss/dsp-js';
import { DspActionModule, ProgressIndicatorComponent } from '@dasch-swiss/dsp-ui';
import { ProgressIndicatorComponent } from '@dasch-swiss/dsp-ui';
import { TranslateModule } from '@ngx-translate/core';
import { of } from 'rxjs';
import { AjaxResponse } from 'rxjs/ajax';
@@ -77,7 +79,8 @@ describe('EditListItemComponent', () => {
],
imports: [
BrowserAnimationsModule,
DspActionModule,
MatDialogModule,
MatSnackBarModule,
TranslateModule.forRoot()
],
providers: [
@@ -8,9 +8,9 @@ import { MatButtonHarness } from '@angular/material/button/testing';
import { MatDialogModule, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatDialogHarness } from '@angular/material/dialog/testing';
import { MatIconModule } from '@angular/material/icon';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ApiResponseData, DeleteListNodeResponse, ListsEndpointAdmin, StringLiteral } from '@dasch-swiss/dsp-js';
import { DspActionModule } from '@dasch-swiss/dsp-ui';
import { TranslateModule } from '@ngx-translate/core';
import { of } from 'rxjs';
import { AjaxResponse } from 'rxjs/ajax';
@@ -88,10 +88,10 @@ describe('ListItemFormComponent', () => {
],
imports: [
BrowserAnimationsModule,
DspActionModule,
MatIconModule,
MatDialogModule,
MatButtonModule,
MatSnackBarModule,
TranslateModule.forRoot()
],
providers: [

0 comments on commit bd60f00

Please sign in to comment.