Update docs.

This commit is contained in:
Spencer Ofwiti
2021-06-14 14:28:53 +03:00
parent 7923c63aa8
commit 4ed3d108cb
94 changed files with 10372 additions and 2785 deletions

View File

@@ -146,6 +146,9 @@
<li>
<a href="#sort">sort</a>
</li>
<li>
<a href="#tokenSymbol">tokenSymbol</a>
</li>
<li>
<a href="#transaction">transaction</a>
</li>
@@ -189,6 +192,7 @@
<a href="#ngAfterViewInit">ngAfterViewInit</a>
</li>
<li>
<span class="modifier">Async</span>
<a href="#ngOnInit">ngOnInit</a>
</li>
<li>
@@ -212,12 +216,12 @@
<tbody>
<tr>
<td class="col-md-4">
<code>constructor(blockSyncService: <a href="../injectables/BlockSyncService.html">BlockSyncService</a>, transactionService: <a href="../injectables/TransactionService.html">TransactionService</a>, userService: <a href="../injectables/UserService.html">UserService</a>)</code>
<code>constructor(blockSyncService: <a href="../injectables/BlockSyncService.html">BlockSyncService</a>, transactionService: <a href="../injectables/TransactionService.html">TransactionService</a>, userService: <a href="../injectables/UserService.html">UserService</a>, tokenService: <a href="../injectables/TokenService.html">TokenService</a>)</code>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="33" class="link-to-prism">src/app/pages/transactions/transactions.component.ts:33</a></div>
<div class="io-line">Defined in <a href="" data-line="34" class="link-to-prism">src/app/pages/transactions/transactions.component.ts:34</a></div>
</td>
</tr>
@@ -270,6 +274,18 @@
</td>
</tr>
<tr>
<td>tokenService</td>
<td>
<code><a href="../injectables/TokenService.html" target="_self" >TokenService</a></code>
</td>
<td>
No
</td>
</tr>
</tbody>
</table>
</div>
@@ -310,8 +326,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="60"
class="link-to-prism">src/app/pages/transactions/transactions.component.ts:60</a></div>
<div class="io-line">Defined in <a href="" data-line="70"
class="link-to-prism">src/app/pages/transactions/transactions.component.ts:70</a></div>
</td>
</tr>
@@ -391,8 +407,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="82"
class="link-to-prism">src/app/pages/transactions/transactions.component.ts:82</a></div>
<div class="io-line">Defined in <a href="" data-line="92"
class="link-to-prism">src/app/pages/transactions/transactions.component.ts:92</a></div>
</td>
</tr>
@@ -430,8 +446,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="64"
class="link-to-prism">src/app/pages/transactions/transactions.component.ts:64</a></div>
<div class="io-line">Defined in <a href="" data-line="74"
class="link-to-prism">src/app/pages/transactions/transactions.component.ts:74</a></div>
</td>
</tr>
@@ -469,8 +485,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="77"
class="link-to-prism">src/app/pages/transactions/transactions.component.ts:77</a></div>
<div class="io-line">Defined in <a href="" data-line="87"
class="link-to-prism">src/app/pages/transactions/transactions.component.ts:87</a></div>
</td>
</tr>
@@ -493,6 +509,7 @@
<a name="ngOnInit"></a>
<span class="name">
<b>
<span class="modifier">Async</span>
ngOnInit
</b>
<a href="#ngOnInit"><span class="icon ion-ios-link"></span></a>
@@ -501,7 +518,8 @@
</tr>
<tr>
<td class="col-md-4">
<code>ngOnInit()</code>
<span class="modifier-icon icon ion-ios-reset"></span>
<code>ngOnInit()</code>
</td>
</tr>
@@ -518,7 +536,7 @@
<td class="col-md-4">
<div class="io-description">
<b>Returns : </b> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >void</a></code>
<b>Returns : </b> <code>Promise&lt;void&gt;</code>
</div>
</td>
@@ -547,8 +565,8 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="56"
class="link-to-prism">src/app/pages/transactions/transactions.component.ts:56</a></div>
<div class="io-line">Defined in <a href="" data-line="66"
class="link-to-prism">src/app/pages/transactions/transactions.component.ts:66</a></div>
</td>
</tr>
@@ -690,7 +708,7 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="32" class="link-to-prism">src/app/pages/transactions/transactions.component.ts:32</a></div>
<div class="io-line">Defined in <a href="" data-line="33" class="link-to-prism">src/app/pages/transactions/transactions.component.ts:33</a></div>
</td>
</tr>
@@ -726,7 +744,34 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="33" class="link-to-prism">src/app/pages/transactions/transactions.component.ts:33</a></div>
<div class="io-line">Defined in <a href="" data-line="34" class="link-to-prism">src/app/pages/transactions/transactions.component.ts:34</a></div>
</td>
</tr>
</tbody>
</table>
<table class="table table-sm table-bordered">
<tbody>
<tr>
<td class="col-md-4">
<a name="tokenSymbol"></a>
<span class="name">
<b>
tokenSymbol</b>
<a href="#tokenSymbol"><span class="icon ion-ios-link"></span></a>
</span>
</td>
</tr>
<tr>
<td class="col-md-4">
<i>Type : </i> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="31" class="link-to-prism">src/app/pages/transactions/transactions.component.ts:31</a></div>
</td>
</tr>
@@ -918,7 +963,7 @@
OnInit,
ViewChild,
} from &#x27;@angular/core&#x27;;
import { BlockSyncService, TransactionService, UserService } from &#x27;@app/_services&#x27;;
import { BlockSyncService, TokenService, TransactionService, UserService } from &#x27;@app/_services&#x27;;
import { MatTableDataSource } from &#x27;@angular/material/table&#x27;;
import { MatPaginator } from &#x27;@angular/material/paginator&#x27;;
import { MatSort } from &#x27;@angular/material/sort&#x27;;
@@ -941,6 +986,7 @@ export class TransactionsComponent implements OnInit, AfterViewInit {
transaction: Transaction;
transactionsType: string &#x3D; &#x27;all&#x27;;
transactionsTypes: Array&lt;string&gt;;
tokenSymbol: string;
@ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort;
@@ -948,22 +994,31 @@ export class TransactionsComponent implements OnInit, AfterViewInit {
constructor(
private blockSyncService: BlockSyncService,
private transactionService: TransactionService,
private userService: UserService
) {
this.blockSyncService.blockSync();
}
private userService: UserService,
private tokenService: TokenService
) {}
ngOnInit(): void {
async ngOnInit(): Promise&lt;void&gt; {
this.transactionService.transactionsSubject.subscribe((transactions) &#x3D;&gt; {
this.transactionDataSource &#x3D; new MatTableDataSource&lt;any&gt;(transactions);
this.transactionDataSource.paginator &#x3D; this.paginator;
this.transactionDataSource.sort &#x3D; this.sort;
this.transactions &#x3D; transactions;
});
await this.blockSyncService.init();
await this.tokenService.init();
await this.transactionService.init();
await this.userService.init();
await this.blockSyncService.blockSync();
this.userService
.getTransactionTypes()
.pipe(first())
.subscribe((res) &#x3D;&gt; (this.transactionsTypes &#x3D; res));
this.tokenService.load.subscribe(async (status: boolean) &#x3D;&gt; {
if (status) {
this.tokenSymbol &#x3D; await this.tokenService.getTokenSymbol();
}
});
}
viewTransaction(transaction): void {
@@ -1024,7 +1079,7 @@ export class TransactionsComponent implements OnInit, AfterViewInit {
&lt;/mat-card-title&gt;
&lt;div class&#x3D;&quot;card-body&quot;&gt;
&lt;app-transaction-details [transaction]&#x3D;&quot;transaction&quot;&gt;&lt;/app-transaction-details&gt;
&lt;app-transaction-details [transaction]&#x3D;&quot;transaction&quot; (closeWindow)&#x3D;&quot;transaction &#x3D; $event&quot;&gt;&lt;/app-transaction-details&gt;
&lt;div class&#x3D;&quot;row card-header&quot;&gt;
&lt;mat-form-field appearance&#x3D;&quot;outline&quot;&gt;
@@ -1050,25 +1105,25 @@ export class TransactionsComponent implements OnInit, AfterViewInit {
&lt;ng-container matColumnDef&#x3D;&quot;sender&quot;&gt;
&lt;th mat-header-cell *matHeaderCellDef mat-sort-header&gt; Sender &lt;/th&gt;
&lt;td mat-cell *matCellDef&#x3D;&quot;let transaction&quot;&gt; {{transaction?.sender?.vcard.fn[0].value}} &lt;/td&gt;
&lt;td mat-cell *matCellDef&#x3D;&quot;let transaction&quot;&gt; {{transaction?.sender?.vcard.fn[0].value || transaction.from}} &lt;/td&gt;
&lt;/ng-container&gt;
&lt;ng-container matColumnDef&#x3D;&quot;recipient&quot;&gt;
&lt;th mat-header-cell *matHeaderCellDef mat-sort-header&gt; Recipient &lt;/th&gt;
&lt;td mat-cell *matCellDef&#x3D;&quot;let transaction&quot;&gt; {{transaction?.recipient?.vcard.fn[0].value}} &lt;/td&gt;
&lt;td mat-cell *matCellDef&#x3D;&quot;let transaction&quot;&gt; {{transaction?.recipient?.vcard.fn[0].value || transaction.to}} &lt;/td&gt;
&lt;/ng-container&gt;
&lt;ng-container matColumnDef&#x3D;&quot;value&quot;&gt;
&lt;th mat-header-cell *matHeaderCellDef mat-sort-header&gt; Value &lt;/th&gt;
&lt;td mat-cell *matCellDef&#x3D;&quot;let transaction&quot;&gt;
&lt;span *ngIf&#x3D;&quot;transaction.type &#x3D;&#x3D; &#x27;transaction&#x27;&quot;&gt;{{transaction?.value | tokenRatio}}&lt;/span&gt;
&lt;span *ngIf&#x3D;&quot;transaction.type &#x3D;&#x3D; &#x27;conversion&#x27;&quot;&gt;{{transaction?.toValue | tokenRatio}}&lt;/span&gt;
&lt;span *ngIf&#x3D;&quot;transaction.type &#x3D;&#x3D; &#x27;transaction&#x27;&quot;&gt;{{transaction?.value | tokenRatio}} {{ tokenSymbol | uppercase }}&lt;/span&gt;
&lt;span *ngIf&#x3D;&quot;transaction.type &#x3D;&#x3D; &#x27;conversion&#x27;&quot;&gt;{{transaction?.toValue | tokenRatio}} {{ tokenSymbol | uppercase }}&lt;/span&gt;
&lt;/td&gt;
&lt;/ng-container&gt;
&lt;ng-container matColumnDef&#x3D;&quot;created&quot;&gt;
&lt;th mat-header-cell *matHeaderCellDef mat-sort-header&gt; Created &lt;/th&gt;
&lt;td mat-cell *matCellDef&#x3D;&quot;let transaction&quot;&gt; {{transaction?.tx.timestamp | date}} &lt;/td&gt;
&lt;td mat-cell *matCellDef&#x3D;&quot;let transaction&quot;&gt; {{transaction?.tx.timestamp | unixDate}} &lt;/td&gt;
&lt;/ng-container&gt;
&lt;ng-container matColumnDef&#x3D;&quot;type&quot;&gt;
@@ -1130,7 +1185,7 @@ export class TransactionsComponent implements OnInit, AfterViewInit {
<script src="../js/libs/htmlparser.js"></script>
<script src="../js/libs/deep-iterator.js"></script>
<script>
var COMPONENT_TEMPLATE = '<div><!-- Begin page --><div class="wrapper"> <app-sidebar></app-sidebar> <!-- ============================================================== --> <!-- Start Page Content here --> <!-- ============================================================== --> <div id="content"> <app-topbar></app-topbar> <!-- Start Content--> <div class="container-fluid" appMenuSelection> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a routerLink="/home">Home</a></li> <li class="breadcrumb-item active" aria-current="page">Transactions</li> </ol> </nav> <div class="card"> <mat-card-title class="card-header"> Transfers </mat-card-title> <div class="card-body"> <app-transaction-details [transaction]="transaction"></app-transaction-details> <div class="row card-header"> <mat-form-field appearance="outline"> <mat-label> TRANSFER TYPE </mat-label> <mat-select id="typeSelect" [(value)]="transactionsType" (selectionChange)="filterTransactions()"> <mat-option value="all">ALL TRANSFERS</mat-option> <mat-option *ngFor="let transactionType of transactionsTypes" [value]="transactionType"> {{transactionType | uppercase}} </mat-option> </mat-select> </mat-form-field> <button mat-raised-button color="primary" type="button" class="btn btn-outline-primary ml-auto mr-2" (click)="downloadCsv()"> EXPORT </button> </div> <mat-form-field appearance="outline"> <mat-label> Filter </mat-label> <input matInput type="text" (keyup)="doFilter($event.target.value, transactionDataSource)" placeholder="Filter"> <mat-icon matSuffix>search</mat-icon> </mat-form-field> <table mat-table class="mat-elevation-z10" [dataSource]="transactionDataSource" matSort matSortActive="created" matSortDirection="desc" matSortDisableClear> <ng-container matColumnDef="sender"> <th mat-header-cell *matHeaderCellDef mat-sort-header> Sender </th> <td mat-cell *matCellDef="let transaction"> {{transaction?.sender?.vcard.fn[0].value}} </td> </ng-container> <ng-container matColumnDef="recipient"> <th mat-header-cell *matHeaderCellDef mat-sort-header> Recipient </th> <td mat-cell *matCellDef="let transaction"> {{transaction?.recipient?.vcard.fn[0].value}} </td> </ng-container> <ng-container matColumnDef="value"> <th mat-header-cell *matHeaderCellDef mat-sort-header> Value </th> <td mat-cell *matCellDef="let transaction"> <span *ngIf="transaction.type == \'transaction\'">{{transaction?.value | tokenRatio}}</span> <span *ngIf="transaction.type == \'conversion\'">{{transaction?.toValue | tokenRatio}}</span> </td> </ng-container> <ng-container matColumnDef="created"> <th mat-header-cell *matHeaderCellDef mat-sort-header> Created </th> <td mat-cell *matCellDef="let transaction"> {{transaction?.tx.timestamp | date}} </td> </ng-container> <ng-container matColumnDef="type"> <th mat-header-cell *matHeaderCellDef mat-sort-header> TYPE </th> <td mat-cell *matCellDef="let transaction"> <span class="badge badge-success badge-pill"> {{transaction?.type}} </span> </td> </ng-container> <tr mat-header-row *matHeaderRowDef="transactionDisplayedColumns"></tr> <tr mat-row *matRowDef="let transaction; columns: transactionDisplayedColumns;" (click)="viewTransaction(transaction)"></tr> </table> <mat-paginator [pageSize]="defaultPageSize" [pageSizeOptions]="pageSizeOptions" showFirstLastButtons></mat-paginator> </div> </div> </div> <app-footer appMenuSelection></app-footer> </div> <!-- ============================================================== --> <!-- End Page content --> <!-- ============================================================== --></div></div>'
var COMPONENT_TEMPLATE = '<div><!-- Begin page --><div class="wrapper"> <app-sidebar></app-sidebar> <!-- ============================================================== --> <!-- Start Page Content here --> <!-- ============================================================== --> <div id="content"> <app-topbar></app-topbar> <!-- Start Content--> <div class="container-fluid" appMenuSelection> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a routerLink="/home">Home</a></li> <li class="breadcrumb-item active" aria-current="page">Transactions</li> </ol> </nav> <div class="card"> <mat-card-title class="card-header"> Transfers </mat-card-title> <div class="card-body"> <app-transaction-details [transaction]="transaction" (closeWindow)="transaction = $event"></app-transaction-details> <div class="row card-header"> <mat-form-field appearance="outline"> <mat-label> TRANSFER TYPE </mat-label> <mat-select id="typeSelect" [(value)]="transactionsType" (selectionChange)="filterTransactions()"> <mat-option value="all">ALL TRANSFERS</mat-option> <mat-option *ngFor="let transactionType of transactionsTypes" [value]="transactionType"> {{transactionType | uppercase}} </mat-option> </mat-select> </mat-form-field> <button mat-raised-button color="primary" type="button" class="btn btn-outline-primary ml-auto mr-2" (click)="downloadCsv()"> EXPORT </button> </div> <mat-form-field appearance="outline"> <mat-label> Filter </mat-label> <input matInput type="text" (keyup)="doFilter($event.target.value, transactionDataSource)" placeholder="Filter"> <mat-icon matSuffix>search</mat-icon> </mat-form-field> <table mat-table class="mat-elevation-z10" [dataSource]="transactionDataSource" matSort matSortActive="created" matSortDirection="desc" matSortDisableClear> <ng-container matColumnDef="sender"> <th mat-header-cell *matHeaderCellDef mat-sort-header> Sender </th> <td mat-cell *matCellDef="let transaction"> {{transaction?.sender?.vcard.fn[0].value || transaction.from}} </td> </ng-container> <ng-container matColumnDef="recipient"> <th mat-header-cell *matHeaderCellDef mat-sort-header> Recipient </th> <td mat-cell *matCellDef="let transaction"> {{transaction?.recipient?.vcard.fn[0].value || transaction.to}} </td> </ng-container> <ng-container matColumnDef="value"> <th mat-header-cell *matHeaderCellDef mat-sort-header> Value </th> <td mat-cell *matCellDef="let transaction"> <span *ngIf="transaction.type == \'transaction\'">{{transaction?.value | tokenRatio}} {{ tokenSymbol | uppercase }}</span> <span *ngIf="transaction.type == \'conversion\'">{{transaction?.toValue | tokenRatio}} {{ tokenSymbol | uppercase }}</span> </td> </ng-container> <ng-container matColumnDef="created"> <th mat-header-cell *matHeaderCellDef mat-sort-header> Created </th> <td mat-cell *matCellDef="let transaction"> {{transaction?.tx.timestamp | unixDate}} </td> </ng-container> <ng-container matColumnDef="type"> <th mat-header-cell *matHeaderCellDef mat-sort-header> TYPE </th> <td mat-cell *matCellDef="let transaction"> <span class="badge badge-success badge-pill"> {{transaction?.type}} </span> </td> </ng-container> <tr mat-header-row *matHeaderRowDef="transactionDisplayedColumns"></tr> <tr mat-row *matRowDef="let transaction; columns: transactionDisplayedColumns;" (click)="viewTransaction(transaction)"></tr> </table> <mat-paginator [pageSize]="defaultPageSize" [pageSizeOptions]="pageSizeOptions" showFirstLastButtons></mat-paginator> </div> </div> </div> <app-footer appMenuSelection></app-footer> </div> <!-- ============================================================== --> <!-- End Page content --> <!-- ============================================================== --></div></div>'
var COMPONENTS = [{'name': 'AccountDetailsComponent', 'selector': 'app-account-details'},{'name': 'AccountsComponent', 'selector': 'app-accounts'},{'name': 'AccountSearchComponent', 'selector': 'app-account-search'},{'name': 'AdminComponent', 'selector': 'app-admin'},{'name': 'AppComponent', 'selector': 'app-root'},{'name': 'AuthComponent', 'selector': 'app-auth'},{'name': 'CreateAccountComponent', 'selector': 'app-create-account'},{'name': 'ErrorDialogComponent', 'selector': 'app-error-dialog'},{'name': 'FooterComponent', 'selector': 'app-footer'},{'name': 'FooterStubComponent', 'selector': 'app-footer'},{'name': 'NetworkStatusComponent', 'selector': 'app-network-status'},{'name': 'OrganizationComponent', 'selector': 'app-organization'},{'name': 'PagesComponent', 'selector': 'app-pages'},{'name': 'SettingsComponent', 'selector': 'app-settings'},{'name': 'SidebarComponent', 'selector': 'app-sidebar'},{'name': 'SidebarStubComponent', 'selector': 'app-sidebar'},{'name': 'TokenDetailsComponent', 'selector': 'app-token-details'},{'name': 'TokensComponent', 'selector': 'app-tokens'},{'name': 'TopbarComponent', 'selector': 'app-topbar'},{'name': 'TopbarStubComponent', 'selector': 'app-topbar'},{'name': 'TransactionDetailsComponent', 'selector': 'app-transaction-details'},{'name': 'TransactionsComponent', 'selector': 'app-transactions'}];
var DIRECTIVES = [{'name': 'MenuSelectionDirective', 'selector': '[appMenuSelection]'},{'name': 'MenuToggleDirective', 'selector': '[appMenuToggle]'},{'name': 'PasswordToggleDirective', 'selector': '[appPasswordToggle]'},{'name': 'RouterLinkDirectiveStub', 'selector': '[appRouterLink]'}];
var ACTUAL_COMPONENT = {'name': 'TransactionsComponent'};