taxtank-core 0.16.3 → 0.16.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/taxtank-core.umd.js +161 -16
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/interfaces/table-exportable.interface.js +2 -0
- package/esm2015/lib/models/endpoint/endpoints.const.js +3 -2
- package/esm2015/lib/models/export/export-data-table.js +4 -1
- package/esm2015/lib/models/export/export-row-data-type.enum.js +10 -0
- package/esm2015/lib/models/export/export-row.js +6 -0
- package/esm2015/lib/models/loan/loan-payment.js +24 -2
- package/esm2015/lib/services/data-table/data-table.service.js +47 -0
- package/esm2015/lib/services/http/bank/basiq/basiq.service.js +60 -3
- package/esm2015/lib/services/pdf/pdf.service.js +2 -2
- package/esm2015/public-api.js +3 -1
- package/fesm2015/taxtank-core.js +150 -12
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/interfaces/table-exportable.interface.d.ts +7 -0
- package/lib/models/export/export-row-data-type.enum.d.ts +8 -0
- package/lib/models/export/export-row.d.ts +8 -0
- package/lib/models/loan/loan-payment.d.ts +6 -1
- package/lib/services/data-table/data-table.service.d.ts +19 -0
- package/lib/services/http/bank/basiq/basiq.service.d.ts +19 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { DataTableExportable } from '../../interfaces/table-exportable.interface';
|
|
2
|
+
import { ExportRow } from '../export/export-row';
|
|
3
|
+
export declare const EXPORT_DATA_TABLE_COLUMNS: string[];
|
|
1
4
|
/**
|
|
2
5
|
* Loan payment class
|
|
3
6
|
*/
|
|
4
|
-
export declare class LoanPayment {
|
|
7
|
+
export declare class LoanPayment implements DataTableExportable {
|
|
5
8
|
date: Date;
|
|
6
9
|
interestAccrued: number;
|
|
7
10
|
interestBalance: number;
|
|
@@ -9,5 +12,7 @@ export declare class LoanPayment {
|
|
|
9
12
|
paymentDue: number;
|
|
10
13
|
principalBalance: number;
|
|
11
14
|
principalPaid: number;
|
|
15
|
+
payout: number;
|
|
12
16
|
totalOwed: number;
|
|
17
|
+
toDataTableRows(): ExportRow[];
|
|
13
18
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ExportDataTable } from '../../models/export/export-data-table';
|
|
2
|
+
import { DataTableExportable } from '../../interfaces/table-exportable.interface';
|
|
3
|
+
import { CurrencyPipe, DatePipe } from '@angular/common';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Service to handle array-like data table logic
|
|
7
|
+
*/
|
|
8
|
+
export declare class DataTableService {
|
|
9
|
+
private currencyPipe;
|
|
10
|
+
private datePipe;
|
|
11
|
+
constructor(currencyPipe: CurrencyPipe, datePipe: DatePipe);
|
|
12
|
+
initDataTable(exportableModels: DataTableExportable[], headerColumns: string[]): ExportDataTable;
|
|
13
|
+
/**
|
|
14
|
+
* Get data for the exporting table rows
|
|
15
|
+
*/
|
|
16
|
+
private getDataTableRows;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataTableService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DataTableService>;
|
|
19
|
+
}
|
|
@@ -5,6 +5,7 @@ import { BankAccount } from '../../../../models/bank/bank-account';
|
|
|
5
5
|
import { BasiqToken } from '../../../../models/bank/basiq-token';
|
|
6
6
|
import { BankConnection } from '../../../../models/bank/bank-connection';
|
|
7
7
|
import { IEventListener } from '../../../../interfaces/event-listener.interface';
|
|
8
|
+
import { User } from '../../../../models/user/user';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
/**
|
|
10
11
|
* basiq is a middleman between bank and user
|
|
@@ -22,7 +23,7 @@ export declare class BasiqService extends RestService<BankAccountBase, BankAccou
|
|
|
22
23
|
/**
|
|
23
24
|
* Update user's basiq consents data on backend
|
|
24
25
|
*/
|
|
25
|
-
confirmConsents(): Observable<
|
|
26
|
+
confirmConsents(): Observable<void>;
|
|
26
27
|
/**
|
|
27
28
|
* Notify backend to update connections
|
|
28
29
|
*/
|
|
@@ -31,7 +32,20 @@ export declare class BasiqService extends RestService<BankAccountBase, BankAccou
|
|
|
31
32
|
* access token to use basiq connect ui iframe
|
|
32
33
|
*/
|
|
33
34
|
getToken(): Observable<BasiqToken>;
|
|
35
|
+
/**
|
|
36
|
+
* Get list of user's bank conections
|
|
37
|
+
*/
|
|
34
38
|
getConnections(): Observable<BankConnection[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Listen response from basiq UI to handle result.
|
|
41
|
+
* @param isBasiqConsentExist flag from User.ClientDetails - true if user confirmed basiq consent
|
|
42
|
+
* @param callback function we run after basiq UI work is finished
|
|
43
|
+
*/
|
|
44
|
+
listenBasiqResponse(isBasiqConsentExist: boolean, callback: () => any): void;
|
|
45
|
+
/**
|
|
46
|
+
* Get URL with filled params to run basiq UI iframe
|
|
47
|
+
*/
|
|
48
|
+
generateBasiqConsentUrl(user: User): Observable<string>;
|
|
35
49
|
/**
|
|
36
50
|
* Listen to EventDispatcherService event related to added Bank connection
|
|
37
51
|
*/
|
|
@@ -40,6 +54,10 @@ export declare class BasiqService extends RestService<BankAccountBase, BankAccou
|
|
|
40
54
|
* listen to notifications to update basiq accounts list
|
|
41
55
|
*/
|
|
42
56
|
private listenNotifications;
|
|
57
|
+
/**
|
|
58
|
+
* Update user's basiq connections when user confirmed basiq consent
|
|
59
|
+
*/
|
|
60
|
+
private listenBasiqConcentUpdated;
|
|
43
61
|
static ɵfac: i0.ɵɵFactoryDeclaration<BasiqService, never>;
|
|
44
62
|
static ɵprov: i0.ɵɵInjectableDeclaration<BasiqService>;
|
|
45
63
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -310,6 +310,7 @@ export * from './lib/services/http/firm/client-income/client-income-types.servic
|
|
|
310
310
|
export * from './lib/services/event/event-dispatcher.service';
|
|
311
311
|
export * from './lib/services/event/sse.service';
|
|
312
312
|
export * from './lib/services/http/firm/firm.service';
|
|
313
|
+
export * from './lib/services/data-table/data-table.service';
|
|
313
314
|
export * from './lib/services/header-title/header-title.service';
|
|
314
315
|
export * from './lib/services/http/income-source/income-source.service';
|
|
315
316
|
export * from './lib/services/http/income-source/income-source-forecast/income-source-forecast.service';
|
|
@@ -369,6 +370,7 @@ export * from './lib/interfaces/photoable';
|
|
|
369
370
|
export * from './lib/interfaces/exportable.interface';
|
|
370
371
|
export * from './lib/interfaces/receipt.interface';
|
|
371
372
|
export * from './lib/interfaces/tank.interface';
|
|
373
|
+
export * from './lib/interfaces/table-exportable.interface';
|
|
372
374
|
export * from './lib/interfaces/updatable.interface';
|
|
373
375
|
export * from './lib/interfaces/expense.interface';
|
|
374
376
|
/**
|