Skip to content
Permalink
Browse files
refactor: removes ActionModule dependency (#523)
  • Loading branch information
mdelez committed Sep 7, 2021
1 parent 269be23 commit bd60f00a77baef4909f30cc869b31ab849665ee0
Showing with 206 additions and 144 deletions.
  1. +5 −2 src/app/app.component.spec.ts
  2. +1 −2 src/app/app.module.ts
  3. +2 −2 src/app/main/action/login-form/login-form.component.html
  4. +0 −2 src/app/main/cache/cache.service.spec.ts
  5. +0 −2 src/app/main/dialog/dialog.component.spec.ts
  6. +0 −2 src/app/main/error/error-handler.service.spec.ts
  7. +4 −2 src/app/main/header/header.component.spec.ts
  8. +0 −2 src/app/main/login/login.component.spec.ts
  9. +1 −1 src/app/main/main.component.html
  10. +3 −2 src/app/main/main.component.spec.ts
  11. +1 −1 src/app/project/board/board.component.html
  12. +3 −2 src/app/project/board/board.component.spec.ts
  13. +1 −1 src/app/project/collaboration/add-user/add-user.component.html
  14. +3 −2 src/app/project/collaboration/add-user/add-user.component.spec.ts
  15. +1 −1 src/app/project/collaboration/collaboration.component.html
  16. +5 −2 src/app/project/collaboration/collaboration.component.spec.ts
  17. +4 −3 src/app/project/list/list-info-form/list-info-form.component.spec.ts
  18. +5 −2 src/app/project/list/list-item-form/edit-list-item/edit-list-item.component.spec.ts
  19. +2 −2 src/app/project/list/list-item-form/list-item-form.component.spec.ts
  20. +5 −3 src/app/project/list/list-item/list-item.component.spec.ts
  21. +2 −2 src/app/project/list/list.component.spec.ts
  22. +2 −2 src/app/project/ontology/ontology-form/ontology-form.component.html
  23. +5 −2 src/app/project/ontology/ontology-form/ontology-form.component.spec.ts
  24. +1 −2 src/app/project/ontology/ontology-visualizer/ontology-visualizer.component.spec.ts
  25. +4 −4 src/app/project/ontology/ontology.component.html
  26. +2 −2 src/app/project/ontology/ontology.component.spec.ts
  27. +4 −2 src/app/project/ontology/property-form/property-form.component.spec.ts
  28. +1 −1 src/app/project/ontology/property-info/property-info.component.html
  29. +0 −2 src/app/project/ontology/property-info/property-info.component.spec.ts
  30. +4 −2 src/app/project/ontology/resource-class-form/resource-class-form.component.spec.ts
  31. +1 −1 src/app/project/ontology/resource-class-info/resource-class-info.component.html
  32. +22 −3 src/app/project/ontology/resource-class-info/resource-class-info.component.spec.ts
  33. +1 −1 src/app/project/permission/permission.component.html
  34. +5 −2 src/app/project/permission/permission.component.spec.ts
  35. +5 −2 src/app/project/project-form/project-form.component.spec.ts
  36. +1 −1 src/app/project/project.component.html
  37. +5 −2 src/app/project/project.component.spec.ts
  38. +1 −1 src/app/system/groups/groups-list/groups-list.component.html
  39. +0 −2 src/app/system/groups/groups-list/groups-list.component.spec.ts
  40. +1 −1 src/app/system/groups/groups.component.html
  41. +4 −2 src/app/system/groups/groups.component.spec.ts
  42. +2 −2 src/app/system/projects/projects-list/projects-list.component.html
  43. +3 −2 src/app/system/projects/projects-list/projects-list.component.spec.ts
  44. +2 −2 src/app/system/projects/projects.component.html
  45. +3 −2 src/app/system/projects/projects.component.spec.ts
  46. +0 −2 src/app/system/system.component.spec.ts
  47. +3 −3 src/app/system/users/users-list/users-list.component.html
  48. +3 −2 src/app/system/users/users-list/users-list.component.spec.ts
  49. +1 −1 src/app/system/users/users.component.html
  50. +3 −2 src/app/system/users/users.component.spec.ts
  51. +1 −1 src/app/user/account/account.component.html
  52. +3 −2 src/app/user/account/account.component.spec.ts
  53. +1 −1 src/app/user/collection-list/collection-list.component.html
  54. +4 −2 src/app/user/collection-list/collection-list.component.spec.ts
  55. +1 −1 src/app/user/dashboard/dashboard.component.html
  56. +5 −2 src/app/user/dashboard/dashboard.component.spec.ts
  57. +1 −1 src/app/user/membership/membership.component.html
  58. +5 −2 src/app/user/membership/membership.component.spec.ts
  59. +3 −3 src/app/user/profile/profile.component.html
  60. +3 −2 src/app/user/profile/profile.component.spec.ts
  61. +3 −3 src/app/user/user-form/password-form/password-form.component.html
  62. +5 −2 src/app/user/user-form/password-form/password-form.component.spec.ts
  63. +2 −2 src/app/user/user-form/user-form.component.html
  64. +5 −2 src/app/user/user-form/user-form.component.spec.ts
  65. +1 −1 src/app/user/user-menu/user-menu.component.html
  66. +5 −2 src/app/user/user-menu/user-menu.component.spec.ts
  67. +1 −1 src/app/user/user.component.html
  68. +3 −2 src/app/user/user.component.spec.ts
  69. +5 −3 src/app/workspace/intermediate/intermediate.component.spec.ts
  70. +0 −2 src/app/workspace/resource/project.service.spec.ts
  71. +2 −2 src/app/workspace/resource/properties/properties.component.spec.ts
  72. +1 −1 src/app/workspace/resource/representation/upload/upload.component.html
  73. +2 −2 src/app/workspace/resource/representation/upload/upload.component.spec.ts
  74. +1 −2 src/app/workspace/resource/resource-instance-form/resource-instance-form.component.spec.ts
  75. +2 −2 src/app/workspace/resource/resource-link-form/resource-link-form.component.html
  76. +3 −2 src/app/workspace/resource/resource-link-form/resource-link-form.component.spec.ts
  77. +1 −1 src/app/workspace/resource/resource.component.html
@@ -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: [
Loading

0 comments on commit bd60f00

Please sign in to comment.