Add path shortcuts to all paths in the system.

This commit is contained in:
Spencer Ofwiti 2021-02-17 15:49:04 +03:00
parent 63c5a63d81
commit 0e07e4ccdc
72 changed files with 4169 additions and 874 deletions

View File

@ -1,6 +1,6 @@
# CICADA
Angular web client for managing users and transactions in the CIC network.
An angular admin web client for managing users and transactions in the CIC network.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.2.0.

4647
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
import { AccountRegistry } from '../../assets/js/eth_account_index';
import { AccountRegistry } from '@src/assets/js/eth_account_index';
// @ts-ignore
import * as accountIndex from '../../assets/json/accountIndex.abi.json';
import {environment} from '../../environments/environment';
import * as accountIndex from '@src/assets/json/accountIndex.abi.json';
import {environment} from '@src/environments/environment';
const Web3 = require('web3');
const web3 = new Web3(environment.web3Provider);

View File

@ -2,9 +2,9 @@ export * from '@app/_helpers/custom.validator';
export * from '@app/_helpers/error.interceptor';
export * from '@app/_helpers/custom-error-state-matcher';
export * from '@app/_helpers/pgp-key-store';
export * from './mock-backend';
export * from './array-sum';
export * from './accountIndex';
export * from './http-getter';
export * from './pgp-signer';
export * from '@app/_helpers/mock-backend';
export * from '@app/_helpers/array-sum';
export * from '@app/_helpers/accountIndex';
export * from '@app/_helpers/http-getter';
export * from '@app/_helpers/pgp-signer';

View File

@ -1,5 +1,6 @@
import { PGPSigner } from './pgp-signer';
let keystore;
import { PGPSigner } from '@app/_helpers/pgp-signer';
import {MutableKeyStore, MutablePgpKeyStore} from '@app/_helpers/pgp-key-store';
const keystore: MutableKeyStore = new MutablePgpKeyStore();
describe('PgpSigner', () => {
it('should create an instance', () => {

View File

@ -1,3 +1,5 @@
import {MutableKeyStore} from '@app/_helpers/pgp-key-store';
const openpgp = require('openpgp');
interface Signable {
@ -26,11 +28,11 @@ class PGPSigner implements Signer {
algo = 'sha256';
dgst: string;
signature: Signature;
keyStore;
keyStore: MutableKeyStore;
onsign: (signature: Signature) => void;
onverify: (flag: boolean) => void;
constructor(keyStore) {
constructor(keyStore: MutableKeyStore) {
this.keyStore = keyStore;
this.onsign = (signature: Signature) => {};
this.onverify = (flag: boolean) => {};

View File

@ -1,3 +1,3 @@
export * from './transaction';
export * from './settings';
export * from './user';
export * from '@app/_models/transaction';
export * from '@app/_models/settings';
export * from '@app/_models/user';

View File

@ -1,4 +1,4 @@
import {User} from './user';
import {User} from '@app/_models/user';
export class BlocksBloom {
low: number;

View File

@ -1,8 +1,8 @@
import { TestBed } from '@angular/core/testing';
import { BlockSyncService } from './block-sync.service';
import {TransactionService} from './transaction.service';
import {TransactionServiceStub} from '../../testing';
import { BlockSyncService } from '@app/_services/block-sync.service';
import {TransactionService} from '@app/_services/transaction.service';
import {TransactionServiceStub} from '@src/testing';
describe('BlockSyncService', () => {
let service: BlockSyncService;

View File

@ -1,11 +1,11 @@
import {Injectable} from '@angular/core';
import {Settings} from '../_models';
import {Settings} from '@app/_models';
import Web3 from 'web3';
import {abi, Registry, TransactionHelper} from 'cic-client';
import {first} from 'rxjs/operators';
import {TransactionService} from './transaction.service';
import {environment} from '../../environments/environment';
const cic = require('../../assets/js/block-sync/cic-client.web');
import {TransactionService} from '@app/_services/transaction.service';
import {environment} from '@src/environments/environment';
const cic = require('@src/assets/js/block-sync/cic-client.web');
@Injectable({
providedIn: 'root'

View File

@ -1,6 +1,6 @@
export * from '@app/_services/auth.service';
export * from './transaction.service';
export * from './user.service';
export * from './token.service';
export * from './block-sync.service';
export * from './location.service';
export * from '@app/_services/transaction.service';
export * from '@app/_services/user.service';
export * from '@app/_services/token.service';
export * from '@app/_services/block-sync.service';
export * from '@app/_services/location.service';

View File

@ -1,6 +1,6 @@
import { TestBed } from '@angular/core/testing';
import { LocationService } from './location.service';
import { LocationService } from '@app/_services/location.service';
describe('LocationService', () => {
let service: LocationService;

View File

@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import {BehaviorSubject} from 'rxjs';
import {HttpClient} from '@angular/common/http';
import {environment} from '../../environments/environment';
import {environment} from '@src/environments/environment';
import {first} from 'rxjs/operators';
@Injectable({

View File

@ -1,6 +1,6 @@
import { TestBed } from '@angular/core/testing';
import { TokenService } from './token.service';
import { TokenService } from '@app/_services/token.service';
describe('TokenService', () => {
let service: TokenService;
@ -15,10 +15,10 @@ describe('TokenService', () => {
});
it('should return token for available token', () => {
expect(service.getBySymbol('RSV')).toEqual({ name: 'Reserve', symbol: 'RSV' });
expect(service.getTokenBySymbol('RSV')).toEqual({ name: 'Reserve', symbol: 'RSV' });
});
it('should not return token for unavailable token', () => {
expect(service.getBySymbol('ABC')).toBeUndefined();
expect(service.getTokenBySymbol('ABC')).toBeUndefined();
});
});

View File

@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {environment} from '../../environments/environment';
import {environment} from '@src/environments/environment';
import {first} from 'rxjs/operators';
import {BehaviorSubject} from 'rxjs';

View File

@ -1,6 +1,6 @@
import {fakeAsync, TestBed, tick} from '@angular/core/testing';
import { TestBed } from '@angular/core/testing';
import { TransactionService } from './transaction.service';
import { TransactionService } from '@app/_services/transaction.service';
import {HttpClient} from '@angular/common/http';
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
@ -21,12 +21,4 @@ describe('TransactionService', () => {
it('should be created', () => {
expect(service).toBeTruthy();
});
// it('#getUser() should fetch userInfo', fakeAsync(() => {
// expect(service.userInfo).toBeUndefined();
// service.getUser('0x9D7c284907acbd4a0cE2dDD0AA69147A921a573D').then(
// );
// tick();
// expect(service.userInfo).toBe('Hey');
// }));
});

View File

@ -2,11 +2,11 @@ import { Injectable } from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {first, map} from 'rxjs/operators';
import {BehaviorSubject, Observable} from 'rxjs';
import {environment} from '../../environments/environment';
import {environment} from '@src/environments/environment';
import {User} from 'cic-client-meta';
import {UserService} from './user.service';
import {parse} from '../../assets/js/parse-vcard';
import { AccountIndex } from '../_helpers';
import {UserService} from '@app/_services/user.service';
import {parse} from '@src/assets/js/parse-vcard';
import { AccountIndex } from '@app/_helpers';
@Injectable({
providedIn: 'root'

View File

@ -1,6 +1,6 @@
import { TestBed } from '@angular/core/testing';
import { UserService } from './user.service';
import { UserService } from '@app/_services/user.service';
import {HttpClient} from '@angular/common/http';
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
@ -23,7 +23,7 @@ describe('UserService', () => {
});
it('should return user for available id', () => {
expect(service.getUserById('1')).toEqual({
expect(service.getAccountById(1)).toEqual({
id: 1,
name: 'John Doe',
phone: '+25412345678',
@ -39,7 +39,7 @@ describe('UserService', () => {
});
it('should not return user for unavailable id', () => {
expect(service.getUserById('9999999999')).toBeUndefined();
expect(service.getAccountById(9999999999)).toBeUndefined();
});
it('should return action for available id', () => {

View File

@ -1,16 +1,16 @@
import { Injectable } from '@angular/core';
import {BehaviorSubject, Observable, of} from 'rxjs';
import {BehaviorSubject, Observable} from 'rxjs';
import {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';
import {environment} from '../../environments/environment';
import {environment} from '@src/environments/environment';
import {first, map} from 'rxjs/operators';
import { ArgPair, Envelope, Syncable } from '../../assets/js/cic-meta/sync.js';
import {PGPSigner, Signer} from '../_helpers';
import { ArgPair, Envelope, Syncable } from '@src/assets/js/cic-meta/sync.js';
import {MutableKeyStore, MutablePgpKeyStore, PGPSigner, Signer} from '@app/_helpers';
@Injectable({
providedIn: 'root'
})
export class UserService {
keystore = '';
keystore: MutableKeyStore = new MutablePgpKeyStore();
syncableAccount: Syncable;
signer: Signer = new PGPSigner(this.keystore);

View File

@ -2,8 +2,8 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [
{ path: '', loadChildren: () => import('./pages/pages.module').then(m => m.PagesModule) },
{ path: 'auth', loadChildren: () => import('@app/auth/auth.module').then(m => m.AuthModule) },
{ path: '', loadChildren: () => import('@pages/pages.module').then(m => m.PagesModule) },
{ path: '**', redirectTo: '', pathMatch: 'full' }
];

View File

@ -1,8 +1,8 @@
import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
import {TransactionService} from './_services';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent, TransactionServiceStub} from '../testing';
import { AppComponent } from '@app/app.component';
import {TransactionService} from '@app/_services';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent, TransactionServiceStub} from '@src/testing';
describe('AppComponent', () => {
beforeEach(async () => {

View File

@ -1,5 +1,5 @@
import {Component, HostListener, OnInit} from '@angular/core';
import {BlockSyncService, TransactionService} from './_services';
import {BlockSyncService, TransactionService} from '@app/_services';
import {AuthService} from '@app/_services';
@Component({

View File

@ -5,11 +5,10 @@ import { AppRoutingModule } from '@app/app-routing.module';
import { AppComponent } from '@app/app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import {HttpClientModule} from '@angular/common/http';
import {MutablePgpKeyStore} from '@app/_helpers';
import {MutablePgpKeyStore, MockBackendProvider} from '@app/_helpers';
import {DataTablesModule} from 'angular-datatables';
import {SharedModule} from './shared/shared.module';
import {SharedModule} from '@app/shared/shared.module';
import {MatTableModule} from '@angular/material/table';
import {MockBackendProvider} from './_helpers';
@NgModule({
declarations: [

View File

@ -1,14 +1,13 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AccountDetailsComponent } from './account-details.component';
import { AccountDetailsComponent } from '@pages/accounts/account-details/account-details.component';
import {HttpClient} from '@angular/common/http';
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
import {ActivatedRoute} from '@angular/router';
import {AccountsModule} from '../accounts.module';
import {UserService} from '../../../_services';
import {AppModule} from '../../../app.module';
import {ActivatedRouteStub, FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '../../../../testing';
import {UserServiceStub} from '../../../../testing';
import {AccountsModule} from '@pages/accounts/accounts.module';
import {UserService} from '@app/_services';
import {AppModule} from '@app/app.module';
import {ActivatedRouteStub, FooterStubComponent, SidebarStubComponent, TopbarStubComponent, UserServiceStub} from '@src/testing';
describe('AccountDetailsComponent', () => {
let component: AccountDetailsComponent;

View File

@ -3,11 +3,11 @@ import {MatTableDataSource} from '@angular/material/table';
import {SelectionModel} from '@angular/cdk/collections';
import {MatPaginator} from '@angular/material/paginator';
import {MatSort} from '@angular/material/sort';
import {LocationService, TransactionService, UserService} from '../../../_services';
import {LocationService, TransactionService, UserService} from '@app/_services';
import {ActivatedRoute, Params, Router} from '@angular/router';
import {first} from 'rxjs/operators';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {CustomErrorStateMatcher} from '../../../_helpers';
import {CustomErrorStateMatcher} from '@app/_helpers';
@Component({
selector: 'app-account-details',

View File

@ -1,10 +1,10 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AccountsComponent } from './accounts.component';
import {CreateAccountComponent} from './create-account/create-account.component';
import {ExportAccountsComponent} from './export-accounts/export-accounts.component';
import {AccountDetailsComponent} from './account-details/account-details.component';
import { AccountsComponent } from '@pages/accounts/accounts.component';
import {CreateAccountComponent} from '@pages/accounts/create-account/create-account.component';
import {ExportAccountsComponent} from '@pages/accounts/export-accounts/export-accounts.component';
import {AccountDetailsComponent} from '@pages/accounts/account-details/account-details.component';
const routes: Routes = [
{ path: '', component: AccountsComponent },

View File

@ -1,12 +1,12 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AccountsComponent } from './accounts.component';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent, UserServiceStub} from '../../../testing';
import {AccountsModule} from './accounts.module';
import {AppModule} from '../../app.module';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent, UserServiceStub} from '@src/testing';
import {AccountsModule} from '@pages/accounts/accounts.module';
import {AppModule} from '@app/app.module';
import {HttpClient} from '@angular/common/http';
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
import {UserService} from '../../_services';
import {UserService} from '@app/_services';
describe('AccountsComponent', () => {
let component: AccountsComponent;

View File

@ -3,7 +3,7 @@ import {MatTableDataSource} from '@angular/material/table';
import {SelectionModel} from '@angular/cdk/collections';
import {MatPaginator} from '@angular/material/paginator';
import {MatSort} from '@angular/material/sort';
import {UserService} from '../../_services';
import {UserService} from '@app/_services';
import {Router} from '@angular/router';
@Component({

View File

@ -1,14 +1,14 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { AccountsRoutingModule } from './accounts-routing.module';
import { AccountsComponent } from './accounts.component';
import {SharedModule} from '../../shared/shared.module';
import { AccountDetailsComponent } from './account-details/account-details.component';
import { AccountsRoutingModule } from '@pages/accounts/accounts-routing.module';
import { AccountsComponent } from '@pages/accounts/accounts.component';
import {SharedModule} from '@app/shared/shared.module';
import { AccountDetailsComponent } from '@pages/accounts/account-details/account-details.component';
import {DataTablesModule} from 'angular-datatables';
import { CreateAccountComponent } from './create-account/create-account.component';
import { DisbursementComponent } from './disbursement/disbursement.component';
import { ExportAccountsComponent } from './export-accounts/export-accounts.component';
import { CreateAccountComponent } from '@pages/accounts/create-account/create-account.component';
import { DisbursementComponent } from '@pages/accounts/disbursement/disbursement.component';
import { ExportAccountsComponent } from '@pages/accounts/export-accounts/export-accounts.component';
import {MatTableModule} from '@angular/material/table';
import {MatSortModule} from '@angular/material/sort';
import {MatCheckboxModule} from '@angular/material/checkbox';
@ -19,7 +19,7 @@ import {MatButtonModule} from '@angular/material/button';
import {MatCardModule} from '@angular/material/card';
import {MatIconModule} from '@angular/material/icon';
import {MatSelectModule} from '@angular/material/select';
import {TransactionsModule} from '../transactions/transactions.module';
import {TransactionsModule} from '@pages/transactions/transactions.module';
import {MatTabsModule} from '@angular/material/tabs';
import {MatRippleModule} from '@angular/material/core';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';

View File

@ -1,9 +1,9 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { CreateAccountComponent } from './create-account.component';
import {AccountsModule} from '../accounts.module';
import {AppModule} from '../../../app.module';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '../../../../testing';
import { CreateAccountComponent } from '@pages/accounts/create-account/create-account.component';
import {AccountsModule} from '@pages/accounts/accounts.module';
import {AppModule} from '@app/app.module';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '@src/testing';
describe('CreateAccountComponent', () => {

View File

@ -1,10 +1,9 @@
import { Component, OnInit } from '@angular/core';
import {Router} from '@angular/router';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {ErrorStateMatcher} from '@angular/material/core';
import {LocationService, UserService} from '../../../_services';
import {LocationService, UserService} from '@app/_services';
import {first} from 'rxjs/operators';
import {CustomErrorStateMatcher} from '../../../_helpers';
import {CustomErrorStateMatcher} from '@app/_helpers';
@Component({
selector: 'app-create-account',

View File

@ -1,9 +1,9 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { DisbursementComponent } from './disbursement.component';
import {AccountsModule} from '../accounts.module';
import {AppModule} from '../../../app.module';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '../../../../testing';
import { DisbursementComponent } from '@pages/accounts/disbursement/disbursement.component';
import {AccountsModule} from '@pages/accounts/accounts.module';
import {AppModule} from '@app/app.module';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '@src/testing';
describe('DisbursementComponent', () => {
let component: DisbursementComponent;

View File

@ -1,7 +1,7 @@
import {Component, OnInit, EventEmitter, Output, Input} from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {CustomErrorStateMatcher} from '../../../_helpers';
import {TransactionService} from '../../../_services';
import {CustomErrorStateMatcher} from '@app/_helpers';
import {TransactionService} from '@app/_services';
import {first} from 'rxjs/operators';
@Component({

View File

@ -1,9 +1,9 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ExportAccountsComponent } from './export-accounts.component';
import {AccountsModule} from '../accounts.module';
import {AppModule} from '../../../app.module';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '../../../../testing';
import { ExportAccountsComponent } from '@pages/accounts/export-accounts/export-accounts.component';
import {AccountsModule} from '@pages/accounts/accounts.module';
import {AppModule} from '@app/app.module';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '@src/testing';
describe('ExportAccountsComponent', () => {
let component: ExportAccountsComponent;

View File

@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {CustomErrorStateMatcher} from '../../../_helpers';
import {CustomErrorStateMatcher} from '@app/_helpers';
@Component({
selector: 'app-export-accounts',

View File

@ -1,7 +1,7 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AdminComponent } from './admin.component';
import { AdminComponent } from '@pages/admin/admin.component';
const routes: Routes = [{ path: '', component: AdminComponent }];

View File

@ -1,12 +1,12 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AdminComponent } from './admin.component';
import { AdminComponent } from '@pages/admin/admin.component';
import {HttpClient} from '@angular/common/http';
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
import {AdminModule} from './admin.module';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent, UserServiceStub} from '../../../testing';
import {AppModule} from '../../app.module';
import {UserService} from '../../_services';
import {AdminModule} from '@pages/admin/admin.module';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent, UserServiceStub} from '@src/testing';
import {AppModule} from '@app/app.module';
import {UserService} from '@app/_services';
describe('AdminComponent', () => {
let component: AdminComponent;

View File

@ -2,7 +2,7 @@ import {Component, OnInit, ViewChild} from '@angular/core';
import {MatTableDataSource} from '@angular/material/table';
import {MatPaginator} from '@angular/material/paginator';
import {MatSort} from '@angular/material/sort';
import {UserService} from '../../_services';
import {UserService} from '@app/_services';
import {animate, state, style, transition, trigger} from '@angular/animations';
import {first} from 'rxjs/operators';

View File

@ -1,9 +1,9 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { AdminRoutingModule } from './admin-routing.module';
import { AdminComponent } from './admin.component';
import {SharedModule} from '../../shared/shared.module';
import { AdminRoutingModule } from '@pages/admin/admin-routing.module';
import { AdminComponent } from '@pages/admin/admin.component';
import {SharedModule} from '@app/shared/shared.module';
import {MatCardModule} from '@angular/material/card';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatInputModule} from '@angular/material/input';

View File

@ -5,11 +5,11 @@ import { PagesComponent } from './pages.component';
const routes: Routes = [
{ path: 'home', component: PagesComponent },
{ path: 'tx', loadChildren: () => import('./transactions/transactions.module').then(m => m.TransactionsModule) },
{ path: 'settings', loadChildren: () => import('./settings/settings.module').then(m => m.SettingsModule) },
{ path: 'accounts', loadChildren: () => import('./accounts/accounts.module').then(m => m.AccountsModule) },
{ path: 'tokens', loadChildren: () => import('./tokens/tokens.module').then(m => m.TokensModule) },
{ path: 'admin', loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule) },
{ path: 'tx', loadChildren: () => import('@pages/transactions/transactions.module').then(m => m.TransactionsModule) },
{ path: 'settings', loadChildren: () => import('@pages/settings/settings.module').then(m => m.SettingsModule) },
{ path: 'accounts', loadChildren: () => import('@pages/accounts/accounts.module').then(m => m.AccountsModule) },
{ path: 'tokens', loadChildren: () => import('@pages/tokens/tokens.module').then(m => m.TokensModule) },
{ path: 'admin', loadChildren: () => import('@pages/admin/admin.module').then(m => m.AdminModule) },
{ path: '**', redirectTo: 'home', pathMatch: 'full'}
];

View File

@ -1,6 +1,6 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { PagesComponent } from './pages.component';
import { PagesComponent } from '@pages/pages.component';
describe('PagesComponent', () => {
let component: PagesComponent;

View File

@ -1,8 +1,8 @@
import { Component, OnInit } from '@angular/core';
import {Color, Label} from 'ng2-charts';
import {ChartDataSets, ChartOptions, ChartType} from 'chart.js';
import {LocationService, UserService} from '../_services';
import { ArraySum } from '../_helpers';
import {LocationService, UserService} from '@app/_services';
import { ArraySum } from '@app/_helpers';
@Component({
selector: 'app-pages',

View File

@ -1,9 +1,9 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { PagesRoutingModule } from './pages-routing.module';
import { PagesComponent } from './pages.component';
import {SharedModule} from '../shared/shared.module';
import { PagesRoutingModule } from '@pages/pages-routing.module';
import { PagesComponent } from '@pages/pages.component';
import {SharedModule} from '@app/shared/shared.module';
import {ChartsModule} from 'ng2-charts';
import {MatButtonModule} from '@angular/material/button';
import {MatFormFieldModule} from '@angular/material/form-field';

View File

@ -1,9 +1,9 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { InviteComponent } from './invite.component';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '../../../../testing';
import {SettingsModule} from '../settings.module';
import {AppModule} from '../../../app.module';
import { InviteComponent } from '@pages/settings/invite/invite.component';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '@src/testing';
import {SettingsModule} from '@pages/settings/settings.module';
import {AppModule} from '@app/app.module';
describe('InviteComponent', () => {
let component: InviteComponent;

View File

@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {CustomErrorStateMatcher} from '../../../_helpers';
import {CustomErrorStateMatcher} from '@app/_helpers';
@Component({
selector: 'app-invite',

View File

@ -1,9 +1,9 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { OrganizationComponent } from './organization.component';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '../../../../testing';
import {SettingsModule} from '../settings.module';
import {AppModule} from '../../../app.module';
import { OrganizationComponent } from '@pages/settings/organization/organization.component';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '@src/testing';
import {SettingsModule} from '@pages/settings/settings.module';
import {AppModule} from '@app/app.module';
describe('OrganizationComponent', () => {
let component: OrganizationComponent;

View File

@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {CustomErrorStateMatcher} from '../../../_helpers';
import {CustomErrorStateMatcher} from '@app/_helpers';
@Component({
selector: 'app-organization',

View File

@ -1,9 +1,9 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { SettingsComponent } from './settings.component';
import {InviteComponent} from './invite/invite.component';
import {OrganizationComponent} from './organization/organization.component';
import { SettingsComponent } from '@pages/settings/settings.component';
import {InviteComponent} from '@pages/settings/invite/invite.component';
import {OrganizationComponent} from '@pages/settings/organization/organization.component';
const routes: Routes = [
{ path: '', component: SettingsComponent },

View File

@ -1,9 +1,9 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { SettingsComponent } from './settings.component';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '../../../testing';
import {SettingsModule} from './settings.module';
import {AppModule} from '../../app.module';
import { SettingsComponent } from '@pages/settings/settings.component';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '@src/testing';
import {SettingsModule} from '@pages/settings/settings.module';
import {AppModule} from '@app/app.module';
describe('SettingsComponent', () => {
let component: SettingsComponent;

View File

@ -2,7 +2,7 @@ import {Component, OnInit, ViewChild} from '@angular/core';
import {MatTableDataSource} from '@angular/material/table';
import {MatPaginator} from '@angular/material/paginator';
import {MatSort} from '@angular/material/sort';
import {UserService} from '../../_services';
import {UserService} from '@app/_services';
import {first} from 'rxjs/operators';
@Component({

View File

@ -1,11 +1,11 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SettingsRoutingModule } from './settings-routing.module';
import { SettingsComponent } from './settings.component';
import {SharedModule} from '../../shared/shared.module';
import { InviteComponent } from './invite/invite.component';
import { OrganizationComponent } from './organization/organization.component';
import { SettingsRoutingModule } from '@pages/settings/settings-routing.module';
import { SettingsComponent } from '@pages/settings/settings.component';
import {SharedModule} from '@app/shared/shared.module';
import { InviteComponent } from '@pages/settings/invite/invite.component';
import { OrganizationComponent } from '@pages/settings/organization/organization.component';
import {MatTableModule} from '@angular/material/table';
import {MatSortModule} from '@angular/material/sort';
import {MatPaginatorModule} from '@angular/material/paginator';

View File

@ -1,11 +1,11 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TokenDetailsComponent } from './token-details.component';
import {ActivatedRouteStub, FooterStubComponent, SidebarStubComponent, TokenServiceStub, TopbarStubComponent} from '../../../../testing';
import { TokenDetailsComponent } from '@pages/tokens/token-details/token-details.component';
import {ActivatedRouteStub, FooterStubComponent, SidebarStubComponent, TokenServiceStub, TopbarStubComponent} from '@src/testing';
import {ActivatedRoute} from '@angular/router';
import {TokenService} from '../../../_services';
import {TokensModule} from '../tokens.module';
import {AppModule} from '../../../app.module';
import {TokenService} from '@app/_services';
import {TokensModule} from '@pages/tokens/tokens.module';
import {AppModule} from '@app/app.module';
describe('TokenDetailsComponent', () => {
let component: TokenDetailsComponent;

View File

@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core';
import {ActivatedRoute, Params} from '@angular/router';
import {TokenService} from '../../../_services';
import {TokenService} from '@app/_services';
import {first} from 'rxjs/operators';
@Component({

View File

@ -1,8 +1,8 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { TokensComponent } from './tokens.component';
import {TokenDetailsComponent} from './token-details/token-details.component';
import { TokensComponent } from '@pages/tokens/tokens.component';
import {TokenDetailsComponent} from '@pages/tokens/token-details/token-details.component';
const routes: Routes = [
{ path: '', component: TokensComponent },

View File

@ -1,9 +1,9 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TokensComponent } from './tokens.component';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '../../../testing';
import {AppModule} from '../../app.module';
import {TokensModule} from './tokens.module';
import { TokensComponent } from '@pages/tokens/tokens.component';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '@src/testing';
import {AppModule} from '@app/app.module';
import {TokensModule} from '@pages/tokens/tokens.module';
describe('TokensComponent', () => {
let component: TokensComponent;

View File

@ -1,7 +1,7 @@
import {Component, OnInit, ViewChild} from '@angular/core';
import {MatPaginator} from '@angular/material/paginator';
import {MatSort} from '@angular/material/sort';
import {TokenService} from '../../_services';
import {TokenService} from '@app/_services';
import {MatTableDataSource} from '@angular/material/table';
import {Router} from '@angular/router';

View File

@ -1,10 +1,10 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TokensRoutingModule } from './tokens-routing.module';
import { TokensComponent } from './tokens.component';
import { TokenDetailsComponent } from './token-details/token-details.component';
import {SharedModule} from '../../shared/shared.module';
import { TokensRoutingModule } from '@pages/tokens/tokens-routing.module';
import { TokensComponent } from '@pages/tokens/tokens.component';
import { TokenDetailsComponent } from '@pages/tokens/token-details/token-details.component';
import {SharedModule} from '@app/shared/shared.module';
import {MatTableModule} from '@angular/material/table';
import {MatPaginatorModule} from '@angular/material/paginator';
import {MatSortModule} from '@angular/material/sort';

View File

@ -1,6 +1,6 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TransactionDetailsComponent } from './transaction-details.component';
import { TransactionDetailsComponent } from '@pages/transactions/transaction-details/transaction-details.component';
describe('TransactionDetailsComponent', () => {
let component: TransactionDetailsComponent;

View File

@ -1,5 +1,4 @@
import {Component, Input, OnInit, Output} from '@angular/core';
import {Transaction} from '../../../_models';
import {Component, Input, OnInit} from '@angular/core';
@Component({
selector: 'app-transaction-details',

View File

@ -1,7 +1,7 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { TransactionsComponent } from './transactions.component';
import { TransactionsComponent } from '@pages/transactions/transactions.component';
const routes: Routes = [{ path: '', component: TransactionsComponent }];

View File

@ -1,11 +1,11 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TransactionsComponent } from './transactions.component';
import { TransactionsComponent } from '@pages/transactions/transactions.component';
import {HttpClient} from '@angular/common/http';
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '../../../testing';
import {TransactionsModule} from './transactions.module';
import {AppModule} from '../../app.module';
import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '@src/testing';
import {TransactionsModule} from '@pages/transactions/transactions.module';
import {AppModule} from '@app/app.module';
describe('TransactionsComponent', () => {
let component: TransactionsComponent;

View File

@ -1,5 +1,5 @@
import {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';
import {BlockSyncService, TransactionService} from '../../_services';
import {BlockSyncService, TransactionService} from '@app/_services';
import {MatTableDataSource} from '@angular/material/table';
import {SelectionModel} from '@angular/cdk/collections';
import {MatPaginator} from '@angular/material/paginator';

View File

@ -1,11 +1,11 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TransactionsRoutingModule } from './transactions-routing.module';
import { TransactionsComponent } from './transactions.component';
import { TransactionDetailsComponent } from './transaction-details/transaction-details.component';
import { TransactionsRoutingModule } from '@pages/transactions/transactions-routing.module';
import { TransactionsComponent } from '@pages/transactions/transactions.component';
import { TransactionDetailsComponent } from '@pages/transactions/transaction-details/transaction-details.component';
import {DataTablesModule} from 'angular-datatables';
import {SharedModule} from '../../shared/shared.module';
import {SharedModule} from '@app/shared/shared.module';
import {MatTableModule} from '@angular/material/table';
import {MatCheckboxModule} from '@angular/material/checkbox';
import {MatPaginatorModule} from '@angular/material/paginator';

View File

@ -1,4 +1,4 @@
import { MenuSelectionDirective } from './menu-selection.directive';
import { MenuSelectionDirective } from '@app/shared/_directives/menu-selection.directive';
import {ElementRef, Renderer2} from '@angular/core';
describe('MenuSelectionDirective', () => {

View File

@ -1,4 +1,4 @@
import { MenuToggleDirective } from './menu-toggle.directive';
import { MenuToggleDirective } from '@app/shared/_directives/menu-toggle.directive';
import {ElementRef, Renderer2} from '@angular/core';
describe('MenuToggleDirective', () => {

View File

@ -1,6 +1,6 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FooterComponent } from './footer.component';
import { FooterComponent } from '@app/shared/footer/footer.component';
describe('FooterComponent', () => {
let component: FooterComponent;

View File

@ -1,13 +1,13 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TopbarComponent } from './topbar/topbar.component';
import { FooterComponent } from './footer/footer.component';
import { SidebarComponent } from './sidebar/sidebar.component';
import { MenuSelectionDirective } from './_directives/menu-selection.directive';
import { MenuToggleDirective } from './_directives/menu-toggle.directive';
import { TopbarComponent } from '@app/shared/topbar/topbar.component';
import { FooterComponent } from '@app/shared/footer/footer.component';
import { SidebarComponent } from '@app/shared/sidebar/sidebar.component';
import { MenuSelectionDirective } from '@app/shared/_directives/menu-selection.directive';
import { MenuToggleDirective } from '@app/shared/_directives/menu-toggle.directive';
import {RouterModule} from '@angular/router';
import {MatIconModule} from '@angular/material/icon';
import {TokenRatioPipe} from './_pipes/token-ratio.pipe';
import {TokenRatioPipe} from '@app/shared/_pipes/token-ratio.pipe';

View File

@ -1,6 +1,6 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { SidebarComponent } from './sidebar.component';
import { SidebarComponent } from '@app/shared/sidebar/sidebar.component';
describe('SidebarComponent', () => {
let component: SidebarComponent;

View File

@ -1,6 +1,6 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TopbarComponent } from './topbar.component';
import { TopbarComponent } from '@app/shared/topbar/topbar.component';
describe('TopbarComponent', () => {
let component: TopbarComponent;

View File

@ -1,8 +1,8 @@
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
import { AppModule } from '@app/app.module';
import { environment } from '@src/environments/environment';
if (environment.production) {
enableProdMode();

View File

@ -1,6 +1,6 @@
export * from './activated-route-stub';
export * from './router-link-directive-stub';
export * from './shared-module-stub';
export * from './user-service-stub';
export * from './token-service-stub';
export * from './transaction-service-stub';
export * from '@src/testing/activated-route-stub';
export * from '@src/testing/router-link-directive-stub';
export * from '@src/testing/shared-module-stub';
export * from '@src/testing/user-service-stub';
export * from '@src/testing/token-service-stub';
export * from '@src/testing/transaction-service-stub';

View File

@ -5,7 +5,8 @@
"baseUrl": "./",
"paths": {
"@src/*": ["src/*"],
"@app/*": ["src/app/*"]
"@app/*": ["src/app/*"],
"@pages/*": ["src/app/pages/*"]
},
"outDir": "./dist/out-tsc",
"sourceMap": true,