taxtank-core 0.28.36 → 0.28.37
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 +310 -115
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/forms/address/address.form.js +149 -0
- package/esm2015/lib/forms/address/index.js +2 -0
- package/esm2015/lib/forms/index.js +3 -1
- package/esm2015/lib/forms/phone/index.js +2 -0
- package/esm2015/lib/forms/phone/phone.form.js +15 -0
- package/esm2015/lib/forms/sole/sole-contact.form.js +7 -5
- package/esm2015/lib/interceptors/corelogic-interceptor.js +19 -20
- package/esm2015/lib/models/address/address.js +2 -2
- package/esm2015/lib/models/address/country.js +3 -1
- package/esm2015/lib/models/endpoint/endpoints.const.js +2 -1
- package/esm2015/lib/models/phone/phone.js +8 -1
- package/esm2015/lib/validators/address-corelogic.validator.js +17 -0
- package/esm2015/lib/validators/phone-number.validator.js +11 -0
- package/fesm2015/taxtank-core.js +285 -107
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/forms/address/address.form.d.ts +58 -0
- package/lib/forms/address/index.d.ts +1 -0
- package/lib/forms/index.d.ts +2 -0
- package/lib/forms/phone/index.d.ts +1 -0
- package/lib/forms/phone/phone.form.d.ts +5 -0
- package/lib/interceptors/corelogic-interceptor.d.ts +1 -5
- package/lib/models/address/country.d.ts +1 -0
- package/lib/models/phone/phone.d.ts +2 -0
- package/lib/validators/address-corelogic.validator.d.ts +5 -0
- package/lib/validators/phone-number.validator.d.ts +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { AbstractForm } from '../abstract.form';
|
|
2
|
+
import { Address } from '../../models/address/address';
|
|
3
|
+
import { EventEmitter } from '@angular/core';
|
|
4
|
+
import { IEventListener } from '../../interfaces/event-listener.interface';
|
|
5
|
+
import { CorelogicSuggestion } from '../../models/property/corelogic-suggestion';
|
|
6
|
+
/**
|
|
7
|
+
* Address form. Works with corelogic or manual address
|
|
8
|
+
*/
|
|
9
|
+
export declare class AddressForm extends AbstractForm<Address> implements IEventListener {
|
|
10
|
+
isCorelogicRequired: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Min search query required length
|
|
13
|
+
*/
|
|
14
|
+
static minSearchLength: number;
|
|
15
|
+
/**
|
|
16
|
+
* Delay before corelogic request
|
|
17
|
+
*/
|
|
18
|
+
static searchDelay: number;
|
|
19
|
+
/**
|
|
20
|
+
* Manual mode flag
|
|
21
|
+
*/
|
|
22
|
+
isManual: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Emit event to search address in corelogic when user filled enough data for corelogic
|
|
25
|
+
*/
|
|
26
|
+
onSearch: EventEmitter<string>;
|
|
27
|
+
/**
|
|
28
|
+
* @param address instance which should be created/edited
|
|
29
|
+
* @param isCorelogicRequired for example, for property we need corelogic location even for manual address,
|
|
30
|
+
* so we have to search corelogic location based on manual fields values
|
|
31
|
+
*/
|
|
32
|
+
constructor(address?: Address, isCorelogicRequired?: boolean);
|
|
33
|
+
/**
|
|
34
|
+
* Get search query for corelogic location search based on manual fields values
|
|
35
|
+
*/
|
|
36
|
+
get manualSearchQuery(): string;
|
|
37
|
+
listenEvents(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Handle corelogic suggestion select
|
|
40
|
+
*/
|
|
41
|
+
onSelectSuggestion(suggestion?: CorelogicSuggestion): void;
|
|
42
|
+
/**
|
|
43
|
+
* Enable manual mode
|
|
44
|
+
*/
|
|
45
|
+
private switchToManual;
|
|
46
|
+
/**
|
|
47
|
+
* Emit event to search address in corelogic when search field changes
|
|
48
|
+
*/
|
|
49
|
+
private listenSearchQueryChanges;
|
|
50
|
+
/**
|
|
51
|
+
* Check if all fields required for manual corelogic search are filled before request sending
|
|
52
|
+
*/
|
|
53
|
+
private isManualSearchAvailable;
|
|
54
|
+
/**
|
|
55
|
+
* When corelogic is required we have to search address even for manual address
|
|
56
|
+
*/
|
|
57
|
+
private listenManualFieldsChanges;
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './address.form';
|
package/lib/forms/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './abstract.form';
|
|
2
|
+
export * from './address';
|
|
2
3
|
export * from './loan';
|
|
3
4
|
export * from './bank/bank-account/bank-account-allocation.form';
|
|
4
5
|
export * from './bank/bank-account/bank-account-import.form';
|
|
@@ -8,6 +9,7 @@ export * from './bank/bank-account/bank-accounts-import.form';
|
|
|
8
9
|
export * from './bank/bank-login.form';
|
|
9
10
|
export * from './client/client-income-types.form';
|
|
10
11
|
export * from './login/login.form';
|
|
12
|
+
export * from './phone';
|
|
11
13
|
export * from './register/register-client.form';
|
|
12
14
|
export * from './register/register-firm.form';
|
|
13
15
|
export * from './user';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './phone.form';
|
|
@@ -9,12 +9,8 @@ export declare class CorelogicInterceptor implements HttpInterceptor {
|
|
|
9
9
|
private corelogicService;
|
|
10
10
|
private environment;
|
|
11
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
12
|
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
13
|
+
private addToken;
|
|
18
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<CorelogicInterceptor, never>;
|
|
19
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<CorelogicInterceptor>;
|
|
20
16
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Phone as PhoneBase } from '../../db/Models/phone';
|
|
2
2
|
import { PhoneTypeEnum } from '../../db/Enums/phone-type.enum';
|
|
3
|
+
import { Country } from '../address/country';
|
|
3
4
|
export declare class Phone extends PhoneBase {
|
|
5
|
+
country: Country;
|
|
4
6
|
type: PhoneTypeEnum;
|
|
5
7
|
toString(): string;
|
|
6
8
|
}
|