taxtank-core 0.2.2 → 0.3.1
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 +969 -484
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/bank-account.collection.js +3 -3
- package/esm2015/lib/collections/bank-transaction.collection.js +3 -3
- package/esm2015/lib/collections/client-movement.collection.js +3 -3
- package/esm2015/lib/collections/client-portfolio-report.collection.js +3 -3
- package/esm2015/lib/collections/client.collection.js +3 -3
- package/esm2015/lib/collections/collection-dictionary.js +1 -1
- package/esm2015/lib/collections/collection.js +75 -0
- package/esm2015/lib/collections/depreciation-forecast.collection.js +5 -5
- package/esm2015/lib/collections/depreciation.collection.js +3 -3
- package/esm2015/lib/collections/employee.collection.js +3 -3
- package/esm2015/lib/collections/income-source.collection.js +3 -3
- package/esm2015/lib/collections/loan.collection.js +3 -3
- package/esm2015/lib/collections/message-document.collection.js +3 -3
- package/esm2015/lib/collections/message.collection.js +3 -3
- package/esm2015/lib/collections/property.collection.js +10 -3
- package/esm2015/lib/collections/service-price.collection.js +3 -3
- package/esm2015/lib/collections/service-subscription.collection.js +3 -3
- package/esm2015/lib/collections/tax-return-category-item.collection.js +3 -3
- package/esm2015/lib/collections/tax-review.collection.js +3 -3
- package/esm2015/lib/collections/transaction-allocation.collection.js +3 -3
- package/esm2015/lib/collections/transaction.collection.js +3 -3
- package/esm2015/lib/collections/user-event-setting.collection.js +3 -3
- package/esm2015/lib/db/Enums/chart-accounts-metadata-list.enum.js +2 -3
- package/esm2015/lib/interceptors/corelogic-interceptor.js +44 -0
- package/esm2015/lib/interceptors/financial-year-interceptor.js +30 -0
- package/esm2015/lib/interceptors/interceptors.module.js +74 -0
- package/esm2015/lib/interceptors/jwt-interceptor.js +137 -0
- package/esm2015/lib/interceptors/preloader.interceptor.js +32 -0
- package/esm2015/lib/interceptors/user-switcher-interceptor.js +42 -0
- package/esm2015/lib/models/color/alphabet-colors.enum.js +30 -0
- package/esm2015/lib/models/data-table/data-table.js +6 -4
- package/esm2015/lib/models/logbook/vehicle-claim.js +7 -1
- package/esm2015/lib/models/transaction/transaction.js +11 -5
- package/esm2015/lib/services/bank/bank-account.service.js +7 -1
- package/esm2015/lib/services/pdf/pdf.service.js +39 -6
- package/esm2015/lib/services/property/equity-position-chart.service.js +45 -0
- package/esm2015/lib/services/xlsx/xlsx.service.js +1 -1
- package/esm2015/lib/tt-core.module.js +8 -4
- package/esm2015/public-api.js +8 -2
- package/fesm2015/taxtank-core.js +893 -442
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/bank-account.collection.d.ts +2 -2
- package/lib/collections/bank-transaction.collection.d.ts +2 -2
- package/lib/collections/client-movement.collection.d.ts +2 -2
- package/lib/collections/client-portfolio-report.collection.d.ts +2 -2
- package/lib/collections/client.collection.d.ts +2 -2
- package/lib/collections/collection-dictionary.d.ts +2 -2
- package/lib/collections/{abstract.collection.d.ts → collection.d.ts} +3 -9
- package/lib/collections/depreciation-forecast.collection.d.ts +2 -2
- package/lib/collections/depreciation.collection.d.ts +2 -2
- package/lib/collections/employee.collection.d.ts +2 -2
- package/lib/collections/income-source.collection.d.ts +2 -2
- package/lib/collections/loan.collection.d.ts +2 -2
- package/lib/collections/message-document.collection.d.ts +2 -2
- package/lib/collections/message.collection.d.ts +2 -2
- package/lib/collections/property.collection.d.ts +7 -2
- package/lib/collections/service-price.collection.d.ts +2 -2
- package/lib/collections/service-subscription.collection.d.ts +2 -2
- package/lib/collections/tax-return-category-item.collection.d.ts +2 -2
- package/lib/collections/tax-review.collection.d.ts +2 -2
- package/lib/collections/transaction-allocation.collection.d.ts +2 -2
- package/lib/collections/transaction.collection.d.ts +2 -2
- package/lib/collections/user-event-setting.collection.d.ts +2 -2
- package/lib/db/Enums/chart-accounts-metadata-list.enum.d.ts +1 -2
- package/lib/interceptors/corelogic-interceptor.d.ts +20 -0
- package/lib/interceptors/financial-year-interceptor.d.ts +12 -0
- package/lib/interceptors/interceptors.module.d.ts +6 -0
- package/lib/interceptors/jwt-interceptor.d.ts +42 -0
- package/lib/interceptors/preloader.interceptor.d.ts +15 -0
- package/lib/interceptors/user-switcher-interceptor.d.ts +19 -0
- package/lib/models/color/alphabet-colors.enum.d.ts +28 -0
- package/lib/models/data-table/data-table.d.ts +2 -2
- package/lib/models/logbook/vehicle-claim.d.ts +4 -0
- package/lib/models/transaction/transaction.d.ts +3 -3
- package/lib/services/bank/bank-account.service.d.ts +1 -0
- package/lib/services/pdf/pdf.service.d.ts +10 -1
- package/lib/services/property/equity-position-chart.service.d.ts +15 -0
- package/lib/services/xlsx/xlsx.service.d.ts +1 -1
- package/lib/tt-core.module.d.ts +2 -1
- package/package.json +1 -1
- package/public-api.d.ts +7 -1
- package/esm2015/lib/collections/abstract.collection.js +0 -83
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from './collection';
|
|
2
2
|
import { BankAccountTypeEnum } from '../db/Enums/bank-account-type.enum';
|
|
3
3
|
import { TankTypeEnum } from '../db/Enums/tank-type.enum';
|
|
4
4
|
import { BankAccount } from '../models/bank/bank-account';
|
|
@@ -7,7 +7,7 @@ import { Property } from '../models/property/property';
|
|
|
7
7
|
/**
|
|
8
8
|
* Collection of bank accounts.
|
|
9
9
|
*/
|
|
10
|
-
export declare class BankAccountCollection extends
|
|
10
|
+
export declare class BankAccountCollection extends Collection<BankAccount> {
|
|
11
11
|
/**
|
|
12
12
|
* get list of bank accounts with passed types
|
|
13
13
|
*/
|
|
@@ -2,7 +2,7 @@ import { BankTransaction } from '../models/bank/bank-transaction';
|
|
|
2
2
|
import { MonthNumberEnum } from '../models/financial-year/month-number.enum';
|
|
3
3
|
import { IncomeSource } from '../models/income-source/income-source';
|
|
4
4
|
import { BankAccount } from '../models/bank/bank-account';
|
|
5
|
-
import {
|
|
5
|
+
import { Collection } from './collection';
|
|
6
6
|
import { CollectionDictionary } from './collection-dictionary';
|
|
7
7
|
import { TransactionAllocationCollection } from './transaction-allocation.collection';
|
|
8
8
|
/**
|
|
@@ -11,7 +11,7 @@ import { TransactionAllocationCollection } from './transaction-allocation.collec
|
|
|
11
11
|
* @TODO find way to accept interface with allocation instead of bankTransaction to prevent wrong usage
|
|
12
12
|
* because all amounts calculates with allocated amounts but not from bank transactions amounts.
|
|
13
13
|
*/
|
|
14
|
-
export declare class BankTransactionCollection extends
|
|
14
|
+
export declare class BankTransactionCollection extends Collection<BankTransaction> {
|
|
15
15
|
getAmount(): number;
|
|
16
16
|
/**
|
|
17
17
|
* Difference between total bank transactions amount and sum of allocations for passed bank transactions
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from './collection';
|
|
2
2
|
import { ClientMovement } from '../models/client/client-movement';
|
|
3
3
|
import { EmployeeCollection } from './employee.collection';
|
|
4
4
|
import { ClientCollection } from './client.collection';
|
|
@@ -6,7 +6,7 @@ import { FirmTypeEnum } from '../db/Enums/firm-type.enum';
|
|
|
6
6
|
/**
|
|
7
7
|
* Collection of tax review
|
|
8
8
|
*/
|
|
9
|
-
export declare class ClientMovementCollection extends
|
|
9
|
+
export declare class ClientMovementCollection extends Collection<ClientMovement> {
|
|
10
10
|
get active(): ClientMovementCollection;
|
|
11
11
|
get employees(): EmployeeCollection;
|
|
12
12
|
get clients(): ClientCollection;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Collection of employee clients tax summary information
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { Collection } from './collection';
|
|
5
5
|
import { ClientPortfolioReport } from '../models/client/client-portfolio-report';
|
|
6
|
-
export declare class ClientPortfolioReportCollection extends
|
|
6
|
+
export declare class ClientPortfolioReportCollection extends Collection<ClientPortfolioReport> {
|
|
7
7
|
get marketValue(): number;
|
|
8
8
|
get loanBalance(): number;
|
|
9
9
|
get equityPosition(): number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from './collection';
|
|
2
2
|
import { User } from '../models/user/user';
|
|
3
|
-
export declare class ClientCollection extends
|
|
3
|
+
export declare class ClientCollection extends Collection<User> {
|
|
4
4
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection as BaseCollection } from './collection';
|
|
2
2
|
/**
|
|
3
3
|
* List of collections grouped by passed property
|
|
4
4
|
*/
|
|
5
|
-
export declare class CollectionDictionary<Collection extends
|
|
5
|
+
export declare class CollectionDictionary<Collection extends BaseCollection<object>> {
|
|
6
6
|
/**
|
|
7
7
|
* List of grouped collections
|
|
8
8
|
*/
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { CollectionDictionary } from './collection-dictionary';
|
|
2
2
|
/**
|
|
3
|
-
* collection
|
|
3
|
+
* Base collection class. Contains common properties and methods for all collections
|
|
4
4
|
*/
|
|
5
|
-
export declare
|
|
5
|
+
export declare class Collection<Model extends object> implements Iterable<Model> {
|
|
6
6
|
items: Model[];
|
|
7
7
|
constructor(items?: Model[]);
|
|
8
8
|
create(items?: Model[]): this;
|
|
9
9
|
getBy(field: string, value: any): this;
|
|
10
|
-
groupBy(path?: string): CollectionDictionary<
|
|
10
|
+
groupBy(path?: string): CollectionDictionary<Collection<Model>>;
|
|
11
11
|
indexBy(path: string): object;
|
|
12
12
|
/**
|
|
13
13
|
* Iterator that allow to iterate collection items
|
|
@@ -17,12 +17,6 @@ export declare abstract class AbstractCollection<Model extends object> implement
|
|
|
17
17
|
* get collection length
|
|
18
18
|
*/
|
|
19
19
|
get length(): number;
|
|
20
|
-
/**
|
|
21
|
-
* method returns amount of fields from passed items
|
|
22
|
-
* @param field Name of field for calculation
|
|
23
|
-
* @param items (optional) Array of items need to be calculated. All collection's items by default
|
|
24
|
-
*/
|
|
25
|
-
protected getSummary(field: string, items?: Model[]): number;
|
|
26
20
|
/**
|
|
27
21
|
* Get list of items ids
|
|
28
22
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from './collection';
|
|
2
2
|
import { DepreciationForecast } from '../models/depreciation/depreciation-forecast';
|
|
3
3
|
/**
|
|
4
4
|
* Collection of depreciations
|
|
5
5
|
*/
|
|
6
|
-
export declare class DepreciationForecastCollection extends
|
|
6
|
+
export declare class DepreciationForecastCollection extends Collection<DepreciationForecast> {
|
|
7
7
|
filterByYear(financialYear: number): any;
|
|
8
8
|
getClaimAmountByMonth(month: number): number;
|
|
9
9
|
get amount(): number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TankTypeEnum } from '../db/Enums/tank-type.enum';
|
|
2
|
-
import {
|
|
2
|
+
import { Collection } from './collection';
|
|
3
3
|
import { Depreciation } from '../models/depreciation/depreciation';
|
|
4
4
|
import { DepreciationCapitalProject } from '../models/depreciation/depreciation-capital-project';
|
|
5
|
-
export declare class DepreciationCollection extends
|
|
5
|
+
export declare class DepreciationCollection extends Collection<Depreciation> {
|
|
6
6
|
/**
|
|
7
7
|
* Get total amount of all depreciations in the collection
|
|
8
8
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from './collection';
|
|
2
2
|
import { User } from '../models/user/user';
|
|
3
|
-
export declare class EmployeeCollection extends
|
|
3
|
+
export declare class EmployeeCollection extends Collection<User> {
|
|
4
4
|
get accountant(): User;
|
|
5
5
|
get advisors(): User[];
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from './collection';
|
|
2
2
|
import { IncomeSource } from '../models/income-source/income-source';
|
|
3
3
|
import { TankTypeEnum } from '../db/Enums/tank-type.enum';
|
|
4
4
|
import { IncomeSourceTypeEnum } from '../db/Enums/income-source-type.enum';
|
|
@@ -6,7 +6,7 @@ import { ISalaryForecast } from '../interfaces/salary-forecast.interface';
|
|
|
6
6
|
/**
|
|
7
7
|
* Collection of income sources
|
|
8
8
|
*/
|
|
9
|
-
export declare class IncomeSourceCollection extends
|
|
9
|
+
export declare class IncomeSourceCollection extends Collection<IncomeSource> {
|
|
10
10
|
filterByTank(tank: TankTypeEnum): IncomeSource[];
|
|
11
11
|
/**
|
|
12
12
|
* Filter income sources by provided tyoes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from './collection';
|
|
2
2
|
import { Loan } from '../models/loan/loan';
|
|
3
|
-
export declare class LoanCollection extends
|
|
3
|
+
export declare class LoanCollection extends Collection<Loan> {
|
|
4
4
|
/**
|
|
5
5
|
* Get new collection of loans filtered by bank accounts ids
|
|
6
6
|
* @param ids list of bank accounts ids for filter
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from './collection';
|
|
2
2
|
import { MessageDocument } from '../models/chat/message-document';
|
|
3
3
|
/**
|
|
4
4
|
* Collection of MessageDocument instances
|
|
5
5
|
*/
|
|
6
|
-
export declare class MessageDocumentCollection extends
|
|
6
|
+
export declare class MessageDocumentCollection extends Collection<MessageDocument> {
|
|
7
7
|
/**
|
|
8
8
|
* get list of documents which are not attached to any message
|
|
9
9
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from './collection';
|
|
2
2
|
import { Message } from '../models/chat/message';
|
|
3
3
|
import { User } from '../models/user/user';
|
|
4
|
-
export declare class MessageCollection extends
|
|
4
|
+
export declare class MessageCollection extends Collection<Message> {
|
|
5
5
|
getFirstUnreadMessage(user: User): Message;
|
|
6
6
|
/**
|
|
7
7
|
* Get List of unread chats
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from './collection';
|
|
2
2
|
import { Property } from '../models/property/property';
|
|
3
|
-
|
|
3
|
+
import { PropertyCategory } from '../models/property/property-category';
|
|
4
|
+
export declare class PropertyCollection extends Collection<Property> {
|
|
4
5
|
/**
|
|
5
6
|
* Get new property collection filtered by category id
|
|
6
7
|
* @param id id of category for filter
|
|
@@ -30,4 +31,8 @@ export declare class PropertyCollection extends AbstractCollection<Property> {
|
|
|
30
31
|
get marketValueGrowth(): number;
|
|
31
32
|
getOwnerOccupiedProperties(): PropertyCollection;
|
|
32
33
|
get earliestPurchaseDate(): Date;
|
|
34
|
+
/**
|
|
35
|
+
* Get list of unique property categories from collection
|
|
36
|
+
*/
|
|
37
|
+
getCategories(): PropertyCategory[];
|
|
33
38
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from './collection';
|
|
2
2
|
import { ServicePrice } from '../models/service-subscription/service-price';
|
|
3
|
-
export declare class ServicePriceCollection extends
|
|
3
|
+
export declare class ServicePriceCollection extends Collection<ServicePrice> {
|
|
4
4
|
get work(): ServicePrice;
|
|
5
5
|
get property(): ServicePrice;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from './collection';
|
|
2
2
|
import { ServiceSubscription } from '../models/service-subscription/service-subscription';
|
|
3
|
-
export declare class ServiceSubscriptionCollection extends
|
|
3
|
+
export declare class ServiceSubscriptionCollection extends Collection<ServiceSubscription> {
|
|
4
4
|
get individual(): ServiceSubscription;
|
|
5
5
|
get investor(): ServiceSubscription;
|
|
6
6
|
get investorPlus(): ServiceSubscription;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from './collection';
|
|
2
2
|
import { TaxReturnCategoryItem } from '../models/tax-summary/tax-return-category-item';
|
|
3
3
|
import { TaxReturnCategorySectionEnum } from '../db/Enums/tax-return-category-section.enum';
|
|
4
4
|
/**
|
|
5
5
|
* collection for tax return category items
|
|
6
6
|
*/
|
|
7
|
-
export declare class TaxReturnCategoryItemCollection extends
|
|
7
|
+
export declare class TaxReturnCategoryItemCollection extends Collection<TaxReturnCategoryItem> {
|
|
8
8
|
/**
|
|
9
9
|
* Work income
|
|
10
10
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from './collection';
|
|
2
2
|
import { TaxReview } from '../models/tax-review/tax-review';
|
|
3
3
|
import { TaxReviewStatusEnum } from '../db/Enums/tax-review-status.enum';
|
|
4
4
|
import { User } from '../models/user/user';
|
|
5
5
|
/**
|
|
6
6
|
* Collection of tax review
|
|
7
7
|
*/
|
|
8
|
-
export declare class TaxReviewCollection extends
|
|
8
|
+
export declare class TaxReviewCollection extends Collection<TaxReview> {
|
|
9
9
|
/**
|
|
10
10
|
* Get tax reviews items with SENT & COMPLETED statuses
|
|
11
11
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from './collection';
|
|
2
2
|
import { TransactionAllocation } from '../models/transaction/transaction-allocation';
|
|
3
3
|
import { BankTransactionCollection } from './bank-transaction.collection';
|
|
4
4
|
import { CollectionDictionary } from './collection-dictionary';
|
|
5
5
|
import { Transaction } from '../models/transaction/transaction';
|
|
6
6
|
import { BankTransaction } from '../models/bank/bank-transaction';
|
|
7
|
-
export declare class TransactionAllocationCollection extends
|
|
7
|
+
export declare class TransactionAllocationCollection extends Collection<TransactionAllocation> {
|
|
8
8
|
get amount(): number;
|
|
9
9
|
getByTransactionsIds(ids: number[]): TransactionAllocationCollection;
|
|
10
10
|
getByBankTransactionsIds(ids: number[]): TransactionAllocationCollection;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from './collection';
|
|
2
2
|
import { Transaction } from '../models/transaction/transaction';
|
|
3
3
|
import { TransactionAllocationCollection } from './transaction-allocation.collection';
|
|
4
4
|
import { TankTypeEnum } from '../db/Enums/tank-type.enum';
|
|
@@ -6,7 +6,7 @@ import { ChartAccountsCategoryEnum } from '../db/Enums/chart-accounts-category.e
|
|
|
6
6
|
/**
|
|
7
7
|
* Collection of transactions
|
|
8
8
|
*/
|
|
9
|
-
export declare class TransactionCollection extends
|
|
9
|
+
export declare class TransactionCollection extends Collection<Transaction> {
|
|
10
10
|
/**
|
|
11
11
|
* Get total amount of all transactions in the collection
|
|
12
12
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from './collection';
|
|
2
2
|
import { UserEventSetting } from '../models/user-event/user-event-setting';
|
|
3
3
|
/**
|
|
4
4
|
* Collection of user event settings
|
|
5
5
|
*/
|
|
6
|
-
export declare class UserEventSettingCollection extends
|
|
6
|
+
export declare class UserEventSettingCollection extends Collection<UserEventSetting> {
|
|
7
7
|
getConfigurableBy(field: string): UserEventSettingCollection;
|
|
8
8
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
|
|
3
|
+
import { CorelogicService } from '../services/property/corelogic.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Corelogic interceptor add Core Logic access token for each search requests related with Core Logic API
|
|
7
|
+
*/
|
|
8
|
+
export declare class CorelogicInterceptor implements HttpInterceptor {
|
|
9
|
+
private corelogicService;
|
|
10
|
+
private environment;
|
|
11
|
+
constructor(corelogicService: CorelogicService, environment: any);
|
|
12
|
+
/**
|
|
13
|
+
* Check if requested url requested core logic, but not core logic auth api
|
|
14
|
+
* @param req
|
|
15
|
+
*/
|
|
16
|
+
addToken(req: HttpRequest<any>): HttpRequest<any>;
|
|
17
|
+
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CorelogicInterceptor, never>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CorelogicInterceptor>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Financial Year interceptor add financialYear parameter to requests because a lot of POST and GET requests require this parameter
|
|
6
|
+
* @TODO now we can get current fin year from user on backend. So we can remove this interceptor
|
|
7
|
+
*/
|
|
8
|
+
export declare class FinancialYearInterceptor implements HttpInterceptor {
|
|
9
|
+
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FinancialYearInterceptor, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FinancialYearInterceptor>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class InterceptorsModule {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InterceptorsModule, never>;
|
|
4
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<InterceptorsModule, never, never, never>;
|
|
5
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<InterceptorsModule>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
2
|
+
import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
3
|
+
import { JwtService } from '../services/auth/jwt.service';
|
|
4
|
+
import { AuthService } from '../services/auth/auth.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* JWT Interceptor add jwt token to each request related with TaxTank API
|
|
8
|
+
*/
|
|
9
|
+
export declare class JwtInterceptor implements HttpInterceptor {
|
|
10
|
+
jwtService: JwtService;
|
|
11
|
+
private authService;
|
|
12
|
+
private environment;
|
|
13
|
+
isRefreshingToken: boolean;
|
|
14
|
+
tokenSubject: BehaviorSubject<string>;
|
|
15
|
+
constructor(jwtService: JwtService, authService: AuthService, environment: any);
|
|
16
|
+
addToken(req: HttpRequest<any>): HttpRequest<any>;
|
|
17
|
+
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
18
|
+
/**
|
|
19
|
+
* @TODO log
|
|
20
|
+
* @TODO waiting for backend to handle errors in a better way
|
|
21
|
+
*/
|
|
22
|
+
handle400Error(err: HttpErrorResponse): void;
|
|
23
|
+
/**
|
|
24
|
+
* @TODO log
|
|
25
|
+
* @TODO waiting for backend to handle errors in a better way
|
|
26
|
+
*/
|
|
27
|
+
handle403Error(err: HttpErrorResponse): void;
|
|
28
|
+
/**
|
|
29
|
+
* @TODO log
|
|
30
|
+
*/
|
|
31
|
+
handle500Error(): void;
|
|
32
|
+
handle401Error(req: HttpRequest<any>, next: HttpHandler, err: HttpErrorResponse): Observable<HttpEvent<any>>;
|
|
33
|
+
/**
|
|
34
|
+
* Handle error messages
|
|
35
|
+
* @param errorResponse from which messages should be taken
|
|
36
|
+
*
|
|
37
|
+
* @TODO move to separated interceptor
|
|
38
|
+
*/
|
|
39
|
+
private showErrorMessages;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<JwtInterceptor, never>;
|
|
41
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<JwtInterceptor>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { PreloaderService } from '../services/preloader/preloader.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* interceptor for preloader handling
|
|
7
|
+
*/
|
|
8
|
+
export declare class PreloaderInterceptor implements HttpInterceptor {
|
|
9
|
+
private preloaderService;
|
|
10
|
+
constructor(preloaderService: PreloaderService);
|
|
11
|
+
intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>;
|
|
12
|
+
private findEndpoint;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PreloaderInterceptor, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PreloaderInterceptor>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
|
|
3
|
+
import { UserSwitcherService } from '../services/user/user-switcher.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Impersonate current's user (manager) to client experience with help of special header
|
|
7
|
+
*/
|
|
8
|
+
export declare class UserSwitcherInterceptor implements HttpInterceptor {
|
|
9
|
+
userSwitcherService: UserSwitcherService;
|
|
10
|
+
private environment;
|
|
11
|
+
constructor(userSwitcherService: UserSwitcherService, environment: any);
|
|
12
|
+
/**
|
|
13
|
+
* add token header if request url contain TaxTank API URL
|
|
14
|
+
*/
|
|
15
|
+
switch(req: HttpRequest<any>, username: string): HttpRequest<any>;
|
|
16
|
+
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserSwitcherInterceptor, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UserSwitcherInterceptor>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare enum AlphabetColorsEnum {
|
|
2
|
+
A = "#9CC3D5",
|
|
3
|
+
B = "#E69A8D",
|
|
4
|
+
C = "#ED2B33",
|
|
5
|
+
D = "#E3CD81",
|
|
6
|
+
E = "#343148",
|
|
7
|
+
F = "#2C5F2D",
|
|
8
|
+
G = "#FFA177",
|
|
9
|
+
H = "#435E55",
|
|
10
|
+
I = "#2BAE66",
|
|
11
|
+
J = "#3C1053",
|
|
12
|
+
K = "#DD4132",
|
|
13
|
+
L = "#FC766A",
|
|
14
|
+
M = "#ADEFD1",
|
|
15
|
+
N = "#79C000",
|
|
16
|
+
O = "#D198C5",
|
|
17
|
+
P = "#5B84B1",
|
|
18
|
+
Q = "#A13941",
|
|
19
|
+
R = "#D85A7F",
|
|
20
|
+
S = "#00203F",
|
|
21
|
+
T = "#42EADD",
|
|
22
|
+
U = "#5F4B8B",
|
|
23
|
+
V = "#FDDB27",
|
|
24
|
+
W = "#CDB599",
|
|
25
|
+
X = "#4B878B",
|
|
26
|
+
Y = "#B0B8B4",
|
|
27
|
+
Z = "#E3C9CE"
|
|
28
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataTableColumn } from "./data-table-column";
|
|
2
|
-
import {
|
|
2
|
+
import { Collection } from "../../collections/collection";
|
|
3
3
|
/**
|
|
4
4
|
* Class to generate data-table structure based on provided collection.
|
|
5
5
|
* Use to work with HTML/PDF/XLSX tables
|
|
@@ -18,7 +18,7 @@ export declare class DataTable<Model extends object> {
|
|
|
18
18
|
*/
|
|
19
19
|
rows: Array<string>[];
|
|
20
20
|
footerRow: string[];
|
|
21
|
-
constructor(collection:
|
|
21
|
+
constructor(collection: Collection<Model>, columns: DataTableColumn<Model>[], caption: string, footerCaption?: string);
|
|
22
22
|
private setRows;
|
|
23
23
|
private setFooterRow;
|
|
24
24
|
}
|
|
@@ -57,9 +57,7 @@ export declare class Transaction extends TransactionBase implements IReceipt, IT
|
|
|
57
57
|
* Get gross income amount
|
|
58
58
|
*/
|
|
59
59
|
getGrossIncome(): number;
|
|
60
|
-
|
|
61
|
-
* find franking credits metadata and return value
|
|
62
|
-
*/
|
|
60
|
+
get taxFreeComponent(): number;
|
|
63
61
|
get frankingCredit(): number;
|
|
64
62
|
get untaxedElement(): number;
|
|
65
63
|
/**
|
|
@@ -67,6 +65,8 @@ export declare class Transaction extends TransactionBase implements IReceipt, IT
|
|
|
67
65
|
* @TODO bad usage of get (and all is* methods), getter should sound like a noun
|
|
68
66
|
*/
|
|
69
67
|
get isTransfer(): boolean;
|
|
68
|
+
get debit(): number;
|
|
69
|
+
get credit(): number;
|
|
70
70
|
/**
|
|
71
71
|
* Get value of transaction metadata field
|
|
72
72
|
* @param field for which value should be returned
|
|
@@ -38,6 +38,7 @@ export declare class BankAccountService extends BaseRestService<BankAccountBase,
|
|
|
38
38
|
* Update bank account current balance
|
|
39
39
|
*/
|
|
40
40
|
updateCurrentBalance(bankAccount: BankAccount): Observable<BankAccount>;
|
|
41
|
+
getOwn(): Observable<BankAccount[]>;
|
|
41
42
|
/**
|
|
42
43
|
* Listen to EventDispatcherService events
|
|
43
44
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataTable } from
|
|
1
|
+
import { DataTable } from '../../models/data-table/data-table';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class PdfService {
|
|
4
4
|
/**
|
|
@@ -6,6 +6,15 @@ export declare class PdfService {
|
|
|
6
6
|
*/
|
|
7
7
|
download(tables: DataTable<any>[], title: string, fileName: string): void;
|
|
8
8
|
/**
|
|
9
|
+
* @Todo rename when all DataTable dependent methods will be cleared-up
|
|
10
|
+
*/
|
|
11
|
+
exportTables(tables: NodeListOf<HTMLTableElement>, title: string, fileName: string): void;
|
|
12
|
+
/**
|
|
13
|
+
* @Todo rename when all DataTable dependent methods will be cleared-up
|
|
14
|
+
*/
|
|
15
|
+
private generateFromTables;
|
|
16
|
+
/**
|
|
17
|
+
* @Todo remove/refactor when all DataTable dependent methods will be cleared-up
|
|
9
18
|
* Generate PDF file from provided data
|
|
10
19
|
*/
|
|
11
20
|
private generatePdfFile;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { HttpClient } from '@angular/common/http';
|
|
3
|
+
import { ChartData } from '../../models/chart/chart-data';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Service for get property equity position half-year history chart data
|
|
7
|
+
*/
|
|
8
|
+
export declare class EquityPositionChartService {
|
|
9
|
+
private http;
|
|
10
|
+
private environment;
|
|
11
|
+
constructor(http: HttpClient, environment: any);
|
|
12
|
+
get(): Observable<ChartData[]>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EquityPositionChartService, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EquityPositionChartService>;
|
|
15
|
+
}
|
package/lib/tt-core.module.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ModuleWithProviders } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import * as i1 from "@angular/common";
|
|
4
|
+
import * as i2 from "./interceptors/interceptors.module";
|
|
4
5
|
export declare class TtCoreModule {
|
|
5
6
|
static forRoot(environment: object): ModuleWithProviders<TtCoreModule>;
|
|
6
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<TtCoreModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<TtCoreModule, never, [typeof i1.CommonModule], never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TtCoreModule, never, [typeof i1.CommonModule, typeof i2.InterceptorsModule], never>;
|
|
8
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<TtCoreModule>;
|
|
9
10
|
}
|