@etsoo/appscript 1.3.33 → 1.3.35
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/__tests__/app/CoreApp.ts +27 -4
- package/lib/cjs/address/AddressContinent.d.ts +1 -1
- package/lib/cjs/address/AddressRegion.d.ts +7 -1
- package/lib/cjs/address/AddressRegion.js +21 -20
- package/lib/cjs/address/AddressState.d.ts +1 -1
- package/lib/cjs/app/CoreApp.js +45 -45
- package/lib/cjs/app/IApp.d.ts +2 -2
- package/lib/cjs/bridges/FlutterHost.d.ts +2 -1
- package/lib/cjs/bridges/FlutterHost.js +1 -0
- package/lib/cjs/bridges/IBridgeHost.d.ts +5 -0
- package/lib/cjs/business/BusinessTax.js +6 -6
- package/lib/cjs/business/Currency.d.ts +1 -1
- package/lib/cjs/business/ProductUnit.d.ts +1 -1
- package/lib/cjs/def/ListItem.d.ts +1 -1
- package/lib/cjs/erp/AddressApi.d.ts +16 -2
- package/lib/cjs/erp/AddressApi.js +43 -12
- package/lib/cjs/erp/BaseApi.js +6 -6
- package/lib/cjs/erp/EntityApi.d.ts +5 -0
- package/lib/cjs/erp/EntityApi.js +13 -0
- package/lib/cjs/erp/dto/AuditLineDto.d.ts +3 -3
- package/lib/cjs/erp/dto/CurrencyDto.d.ts +1 -1
- package/lib/cjs/erp/dto/ExchangeRateDto.d.ts +1 -1
- package/lib/cjs/erp/dto/ExchangeRateHistoryDto.d.ts +1 -1
- package/lib/cjs/erp/dto/IdLabelDto.d.ts +1 -1
- package/lib/cjs/erp/dto/IdLabelPrimaryDto.d.ts +1 -1
- package/lib/cjs/erp/dto/InitCallDto.d.ts +1 -1
- package/lib/cjs/erp/dto/OrgDto.d.ts +1 -1
- package/lib/cjs/erp/dto/OrgQueryDto.d.ts +1 -1
- package/lib/cjs/erp/dto/PublicProductDto.d.ts +2 -2
- package/lib/cjs/erp/dto/ResultPayload.d.ts +3 -3
- package/lib/cjs/erp/rq/MemberListRQ.d.ts +1 -1
- package/lib/cjs/erp/rq/OrgListRQ.d.ts +1 -1
- package/lib/cjs/erp/rq/OrgQueryRQ.d.ts +1 -1
- package/lib/cjs/erp/rq/QueryRQ.d.ts +1 -1
- package/lib/cjs/erp/rq/RefreshTokenRQ.d.ts +1 -1
- package/lib/cjs/erp/rq/RegionsRQ.d.ts +14 -0
- package/lib/cjs/erp/rq/RegionsRQ.js +2 -0
- package/lib/cjs/erp/rq/TiplistRQ.d.ts +1 -1
- package/lib/cjs/i18n/en-US.json +1 -0
- package/lib/cjs/i18n/zh-CN.json +1 -0
- package/lib/cjs/i18n/zh-HK.json +1 -0
- package/lib/cjs/result/ActionResultError.js +12 -12
- package/lib/cjs/result/IActionResult.d.ts +2 -2
- package/lib/cjs/result/InitCallResult.d.ts +1 -1
- package/lib/cjs/state/User.d.ts +1 -1
- package/lib/mjs/address/AddressContinent.d.ts +1 -1
- package/lib/mjs/address/AddressRegion.d.ts +7 -1
- package/lib/mjs/address/AddressRegion.js +21 -20
- package/lib/mjs/address/AddressState.d.ts +1 -1
- package/lib/mjs/app/CoreApp.js +45 -45
- package/lib/mjs/app/IApp.d.ts +2 -2
- package/lib/mjs/bridges/FlutterHost.d.ts +2 -1
- package/lib/mjs/bridges/FlutterHost.js +1 -0
- package/lib/mjs/bridges/IBridgeHost.d.ts +5 -0
- package/lib/mjs/business/BusinessTax.js +6 -6
- package/lib/mjs/business/Currency.d.ts +1 -1
- package/lib/mjs/business/ProductUnit.d.ts +1 -1
- package/lib/mjs/def/ListItem.d.ts +1 -1
- package/lib/mjs/erp/AddressApi.d.ts +16 -2
- package/lib/mjs/erp/AddressApi.js +43 -12
- package/lib/mjs/erp/BaseApi.js +6 -6
- package/lib/mjs/erp/EntityApi.d.ts +5 -0
- package/lib/mjs/erp/EntityApi.js +13 -0
- package/lib/mjs/erp/dto/AuditLineDto.d.ts +3 -3
- package/lib/mjs/erp/dto/CurrencyDto.d.ts +1 -1
- package/lib/mjs/erp/dto/ExchangeRateDto.d.ts +1 -1
- package/lib/mjs/erp/dto/ExchangeRateHistoryDto.d.ts +1 -1
- package/lib/mjs/erp/dto/IdLabelDto.d.ts +1 -1
- package/lib/mjs/erp/dto/IdLabelPrimaryDto.d.ts +1 -1
- package/lib/mjs/erp/dto/InitCallDto.d.ts +1 -1
- package/lib/mjs/erp/dto/OrgDto.d.ts +1 -1
- package/lib/mjs/erp/dto/OrgQueryDto.d.ts +1 -1
- package/lib/mjs/erp/dto/PublicProductDto.d.ts +2 -2
- package/lib/mjs/erp/dto/ResultPayload.d.ts +3 -3
- package/lib/mjs/erp/rq/MemberListRQ.d.ts +1 -1
- package/lib/mjs/erp/rq/OrgListRQ.d.ts +1 -1
- package/lib/mjs/erp/rq/OrgQueryRQ.d.ts +1 -1
- package/lib/mjs/erp/rq/QueryRQ.d.ts +1 -1
- package/lib/mjs/erp/rq/RefreshTokenRQ.d.ts +1 -1
- package/lib/mjs/erp/rq/RegionsRQ.d.ts +14 -0
- package/lib/mjs/erp/rq/RegionsRQ.js +1 -0
- package/lib/mjs/erp/rq/TiplistRQ.d.ts +1 -1
- package/lib/mjs/i18n/en-US.json +1 -0
- package/lib/mjs/i18n/zh-CN.json +1 -0
- package/lib/mjs/i18n/zh-HK.json +1 -0
- package/lib/mjs/result/ActionResultError.js +12 -12
- package/lib/mjs/result/IActionResult.d.ts +2 -2
- package/lib/mjs/result/InitCallResult.d.ts +1 -1
- package/lib/mjs/state/User.d.ts +1 -1
- package/package.json +9 -9
- package/src/address/AddressRegion.ts +29 -10
- package/src/bridges/FlutterHost.ts +2 -0
- package/src/bridges/IBridgeHost.ts +6 -0
- package/src/erp/AddressApi.ts +72 -25
- package/src/erp/EntityApi.ts +13 -0
- package/src/erp/rq/RegionsRQ.ts +16 -0
- package/src/i18n/en-US.json +1 -0
- package/src/i18n/zh-CN.json +1 -0
- package/src/i18n/zh-HK.json +1 -0
|
@@ -2,6 +2,7 @@ import { DataTypes } from '@etsoo/shared';
|
|
|
2
2
|
import { AddressContinent } from '../address/AddressContinent';
|
|
3
3
|
import { AddressRegion } from '../address/AddressRegion';
|
|
4
4
|
import { BaseApi } from './BaseApi';
|
|
5
|
+
const cachedRegions = {};
|
|
5
6
|
/**
|
|
6
7
|
* Address Api
|
|
7
8
|
*/
|
|
@@ -9,10 +10,13 @@ export class AddressApi extends BaseApi {
|
|
|
9
10
|
/**
|
|
10
11
|
* Get all continents
|
|
11
12
|
* @param isNumberKey Is number key or key as id
|
|
13
|
+
* @param includeAntarctica Include Antarctica or not
|
|
12
14
|
* @returns Continents
|
|
13
15
|
*/
|
|
14
|
-
|
|
15
|
-
return DataTypes.getEnumKeys(AddressContinent)
|
|
16
|
+
continents(isNumberKey = false, includeAntarctica = false) {
|
|
17
|
+
return DataTypes.getEnumKeys(AddressContinent)
|
|
18
|
+
.filter((item) => includeAntarctica || item !== 'AN')
|
|
19
|
+
.map((key) => ({
|
|
16
20
|
id: isNumberKey
|
|
17
21
|
? DataTypes.getEnumByKey(AddressContinent, key)
|
|
18
22
|
: key.toString(),
|
|
@@ -29,20 +33,47 @@ export class AddressApi extends BaseApi {
|
|
|
29
33
|
return (_a = this.app.get('continent' + id)) !== null && _a !== void 0 ? _a : id;
|
|
30
34
|
}
|
|
31
35
|
/**
|
|
32
|
-
* Get
|
|
33
|
-
* @param
|
|
34
|
-
* @returns Result
|
|
36
|
+
* Get all regions
|
|
37
|
+
* @param rq Rquest data
|
|
35
38
|
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
async getRegions(rq) {
|
|
40
|
+
const culture = this.app.culture;
|
|
41
|
+
let regions = cachedRegions[culture];
|
|
42
|
+
if (regions == null) {
|
|
43
|
+
regions = await this.api.get(`Address/RegionList?language=${culture}`, undefined, { defaultValue: [], showLoading: false });
|
|
44
|
+
if (regions == null)
|
|
45
|
+
return undefined;
|
|
46
|
+
cachedRegions[culture] = regions;
|
|
39
47
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
48
|
+
const { favoredIds = [], items = 8, keyword } = rq !== null && rq !== void 0 ? rq : {};
|
|
49
|
+
// Keyword filter
|
|
50
|
+
if (keyword)
|
|
51
|
+
regions = regions.filter((region) => region.label.includes(keyword) || region.id === keyword);
|
|
52
|
+
// Order by favoredIds
|
|
53
|
+
if (favoredIds.length > 0) {
|
|
54
|
+
regions = [...regions].sort((r1, r2) => {
|
|
55
|
+
const n1 = favoredIds.indexOf(r1.id);
|
|
56
|
+
const n2 = favoredIds.indexOf(r2.id);
|
|
57
|
+
if (n1 === n2)
|
|
58
|
+
return 0;
|
|
59
|
+
if (n1 === -1)
|
|
60
|
+
return 1;
|
|
61
|
+
if (n2 === -1)
|
|
62
|
+
return -1;
|
|
63
|
+
return n1 - n2;
|
|
44
64
|
});
|
|
45
65
|
}
|
|
66
|
+
// Return the top items
|
|
67
|
+
return regions.slice(0, items);
|
|
68
|
+
}
|
|
69
|
+
regions(p) {
|
|
70
|
+
const items = p == null || p.length === 0
|
|
71
|
+
? AddressRegion.all
|
|
72
|
+
: AddressRegion.all.filter((ad) => p.includes(ad.id));
|
|
73
|
+
return items.map((region) => ({
|
|
74
|
+
...region,
|
|
75
|
+
label: this.app.getRegionLabel(region.id)
|
|
76
|
+
}));
|
|
46
77
|
}
|
|
47
78
|
/**
|
|
48
79
|
* Get state list
|
package/lib/mjs/erp/BaseApi.js
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
* SmartERP base API
|
|
3
3
|
*/
|
|
4
4
|
export class BaseApi {
|
|
5
|
+
/**
|
|
6
|
+
* API Last error
|
|
7
|
+
*/
|
|
8
|
+
get lastError() {
|
|
9
|
+
return this.api.lastError;
|
|
10
|
+
}
|
|
5
11
|
/**
|
|
6
12
|
* Constructor
|
|
7
13
|
* @param app Application
|
|
@@ -11,10 +17,4 @@ export class BaseApi {
|
|
|
11
17
|
this.app = app;
|
|
12
18
|
this.api = api;
|
|
13
19
|
}
|
|
14
|
-
/**
|
|
15
|
-
* API Last error
|
|
16
|
-
*/
|
|
17
|
-
get lastError() {
|
|
18
|
-
return this.api.lastError;
|
|
19
|
-
}
|
|
20
20
|
}
|
|
@@ -54,6 +54,11 @@ export declare class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
|
|
|
54
54
|
* @returns Result
|
|
55
55
|
*/
|
|
56
56
|
protected queryAuditBase<T extends DataTypes.IdType, R extends QueryRQ<T>>(rq: R, payload?: AuditLinePayload): Promise<AuditLineDto[] | undefined>;
|
|
57
|
+
/**
|
|
58
|
+
* Query favored country ids
|
|
59
|
+
* @returns Result
|
|
60
|
+
*/
|
|
61
|
+
protected queryFavoredCountryIdsBase(api?: string): Promise<string[]>;
|
|
57
62
|
/**
|
|
58
63
|
* Read
|
|
59
64
|
* @param id Id
|
package/lib/mjs/erp/EntityApi.js
CHANGED
|
@@ -56,6 +56,19 @@ export class EntityApi extends BaseApi {
|
|
|
56
56
|
queryAuditBase(rq, payload) {
|
|
57
57
|
return this.api.post(`${this.flag}/QueryAudit`, rq, payload);
|
|
58
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Query favored country ids
|
|
61
|
+
* @returns Result
|
|
62
|
+
*/
|
|
63
|
+
async queryFavoredCountryIdsBase(api) {
|
|
64
|
+
api !== null && api !== void 0 ? api : (api = `${this.flag}/QueryFavoredCountryIds`);
|
|
65
|
+
const result = await this.api.get(api, undefined, {
|
|
66
|
+
showLoading: false
|
|
67
|
+
});
|
|
68
|
+
if (result == null)
|
|
69
|
+
return [];
|
|
70
|
+
return result.map((item) => item.id);
|
|
71
|
+
}
|
|
59
72
|
/**
|
|
60
73
|
* Read
|
|
61
74
|
* @param id Id
|
|
@@ -2,7 +2,7 @@ import { IApiPayload } from '@etsoo/restclient';
|
|
|
2
2
|
/**
|
|
3
3
|
* Audit line data
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type AuditLineDto = {
|
|
6
6
|
id: number;
|
|
7
7
|
creation: Date;
|
|
8
8
|
user: string;
|
|
@@ -14,11 +14,11 @@ export declare type AuditLineDto = {
|
|
|
14
14
|
/**
|
|
15
15
|
* Audit line changes data
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
17
|
+
export type AuditLineChangesDto = {
|
|
18
18
|
oldData: Record<string, unknown>;
|
|
19
19
|
newData: Record<string, unknown>;
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
22
|
* Audit line API payload
|
|
23
23
|
*/
|
|
24
|
-
export
|
|
24
|
+
export type AuditLinePayload = IApiPayload<AuditLineDto[]>;
|
|
@@ -2,4 +2,4 @@ import { ListType, ListType1 } from '@etsoo/shared';
|
|
|
2
2
|
/**
|
|
3
3
|
* Conditional IdLabel type
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type IdLabelConditional<T extends boolean> = T extends true ? ListType[] : ListType1[];
|
|
@@ -2,7 +2,7 @@ import { DataTypes } from '@etsoo/shared';
|
|
|
2
2
|
/**
|
|
3
3
|
* Dto with id, label and primary field
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type IdLabelPrimaryDto<T extends DataTypes.IdType = number> = DataTypes.IdLabelItem<T> & {
|
|
6
6
|
/**
|
|
7
7
|
* Is primary
|
|
8
8
|
*/
|
|
@@ -3,7 +3,7 @@ import { EntityStatus } from '../../business/EntityStatus';
|
|
|
3
3
|
/**
|
|
4
4
|
* Public product data
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type PublicProductDto = {
|
|
7
7
|
/**
|
|
8
8
|
* Id
|
|
9
9
|
*/
|
|
@@ -28,7 +28,7 @@ export declare type PublicProductDto = {
|
|
|
28
28
|
/**
|
|
29
29
|
* Public product with organization data
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
31
|
+
export type PublicOrgProductDto = PublicProductDto & {
|
|
32
32
|
/**
|
|
33
33
|
* Purchased service status
|
|
34
34
|
*/
|
|
@@ -3,12 +3,12 @@ import { IActionResult, IdActionResult } from '../../result/IActionResult';
|
|
|
3
3
|
/**
|
|
4
4
|
* Action result payload
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type ResultPayload = IApiPayload<IActionResult>;
|
|
7
7
|
/**
|
|
8
8
|
* Number id action result payload
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export type IdResultPayload = IApiPayload<IdActionResult>;
|
|
11
11
|
/**
|
|
12
12
|
* String id action result payload
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export type StringIdResultPayload = IApiPayload<IdActionResult<string>>;
|
|
@@ -3,7 +3,7 @@ import { DataTypes } from '@etsoo/shared';
|
|
|
3
3
|
* Query request data
|
|
4
4
|
* com.etsoo.CoreFramework.Models.QueryRQ
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type QueryRQ<T extends DataTypes.IdType = number> = {
|
|
7
7
|
/**
|
|
8
8
|
* Number id
|
|
9
9
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,7 +3,7 @@ import { DataTypes } from '@etsoo/shared';
|
|
|
3
3
|
* Tiplist request data
|
|
4
4
|
* com.etsoo.CoreFramework.Models.TiplistRQ
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type TiplistRQ<T extends DataTypes.IdType = number> = {
|
|
7
7
|
/**
|
|
8
8
|
* number id
|
|
9
9
|
*/
|
package/lib/mjs/i18n/en-US.json
CHANGED
package/lib/mjs/i18n/zh-CN.json
CHANGED
package/lib/mjs/i18n/zh-HK.json
CHANGED
|
@@ -2,18 +2,6 @@
|
|
|
2
2
|
* Action result error
|
|
3
3
|
*/
|
|
4
4
|
export class ActionResultError extends Error {
|
|
5
|
-
/**
|
|
6
|
-
* Constructor
|
|
7
|
-
* @param result Result
|
|
8
|
-
*/
|
|
9
|
-
constructor(result) {
|
|
10
|
-
// Super
|
|
11
|
-
super(ActionResultError.format(result));
|
|
12
|
-
// Name
|
|
13
|
-
this.name = 'ActionResultError';
|
|
14
|
-
// Hold the result
|
|
15
|
-
this.result = result;
|
|
16
|
-
}
|
|
17
5
|
/**
|
|
18
6
|
* Format the result to a meaningful string
|
|
19
7
|
* @param result Result
|
|
@@ -30,4 +18,16 @@ export class ActionResultError extends Error {
|
|
|
30
18
|
var add = addtions.length > 0 ? ` (${addtions.join(', ')})` : '';
|
|
31
19
|
return `${result.title || 'Error'}${add}`;
|
|
32
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Constructor
|
|
23
|
+
* @param result Result
|
|
24
|
+
*/
|
|
25
|
+
constructor(result) {
|
|
26
|
+
// Super
|
|
27
|
+
super(ActionResultError.format(result));
|
|
28
|
+
// Name
|
|
29
|
+
this.name = 'ActionResultError';
|
|
30
|
+
// Hold the result
|
|
31
|
+
this.result = result;
|
|
32
|
+
}
|
|
33
33
|
}
|
|
@@ -50,10 +50,10 @@ export interface IActionResult<D extends object = {}> {
|
|
|
50
50
|
/**
|
|
51
51
|
* Action result with id data
|
|
52
52
|
*/
|
|
53
|
-
export
|
|
53
|
+
export type IdActionResult<T extends DataTypes.IdType = number> = IActionResult<{
|
|
54
54
|
id: T;
|
|
55
55
|
}>;
|
|
56
56
|
/**
|
|
57
57
|
* Action result with dynamic data
|
|
58
58
|
*/
|
|
59
|
-
export
|
|
59
|
+
export type DynamicActionResult = IActionResult<Record<string, any>>;
|
package/lib/mjs/state/User.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/appscript",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.35",
|
|
4
4
|
"description": "Applications shared TypeScript framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
},
|
|
53
53
|
"homepage": "https://github.com/ETSOO/AppScript#readme",
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@etsoo/notificationbase": "^1.1.
|
|
56
|
-
"@etsoo/restclient": "^1.0.
|
|
57
|
-
"@etsoo/shared": "^1.1.
|
|
55
|
+
"@etsoo/notificationbase": "^1.1.18",
|
|
56
|
+
"@etsoo/restclient": "^1.0.79",
|
|
57
|
+
"@etsoo/shared": "^1.1.78",
|
|
58
58
|
"@types/crypto-js": "^4.1.1",
|
|
59
59
|
"crypto-js": "^4.1.1"
|
|
60
60
|
},
|
|
@@ -64,15 +64,15 @@
|
|
|
64
64
|
"@babel/plugin-transform-runtime": "^7.19.6",
|
|
65
65
|
"@babel/preset-env": "^7.20.2",
|
|
66
66
|
"@babel/runtime-corejs3": "^7.20.1",
|
|
67
|
-
"@types/jest": "^29.2.
|
|
68
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
69
|
-
"@typescript-eslint/parser": "^5.
|
|
70
|
-
"eslint": "^8.
|
|
67
|
+
"@types/jest": "^29.2.3",
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
|
69
|
+
"@typescript-eslint/parser": "^5.43.0",
|
|
70
|
+
"eslint": "^8.28.0",
|
|
71
71
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
72
72
|
"eslint-plugin-import": "^2.26.0",
|
|
73
73
|
"jest": "^29.3.1",
|
|
74
74
|
"jest-environment-jsdom": "^29.3.1",
|
|
75
75
|
"ts-jest": "^29.0.3",
|
|
76
|
-
"typescript": "^4.
|
|
76
|
+
"typescript": "^4.9.3"
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -36,6 +36,12 @@ export interface AddressRegionDb {
|
|
|
36
36
|
*/
|
|
37
37
|
readonly exitCode: string;
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* National (truck) prefix
|
|
41
|
+
* 国内呼叫的拨号
|
|
42
|
+
*/
|
|
43
|
+
readonly nationalPrefix?: string;
|
|
44
|
+
|
|
39
45
|
/**
|
|
40
46
|
* Area code for international dial, like 86 for China
|
|
41
47
|
* 国际电话区号
|
|
@@ -85,7 +91,8 @@ export class AddressRegion implements IAddressRegion {
|
|
|
85
91
|
'156',
|
|
86
92
|
AddressContinent.AS,
|
|
87
93
|
'00',
|
|
88
|
-
'86',
|
|
94
|
+
'+86',
|
|
95
|
+
'0',
|
|
89
96
|
'CNY',
|
|
90
97
|
['zh-CN']
|
|
91
98
|
);
|
|
@@ -100,7 +107,8 @@ export class AddressRegion implements IAddressRegion {
|
|
|
100
107
|
'344',
|
|
101
108
|
AddressContinent.AS,
|
|
102
109
|
'001',
|
|
103
|
-
'852',
|
|
110
|
+
'+852',
|
|
111
|
+
undefined,
|
|
104
112
|
'HKD',
|
|
105
113
|
['zh-HK', 'en-HK']
|
|
106
114
|
);
|
|
@@ -115,7 +123,8 @@ export class AddressRegion implements IAddressRegion {
|
|
|
115
123
|
'702',
|
|
116
124
|
AddressContinent.AS,
|
|
117
125
|
'000',
|
|
118
|
-
'65',
|
|
126
|
+
'+65',
|
|
127
|
+
undefined,
|
|
119
128
|
'SGD',
|
|
120
129
|
['zh-SG', 'en-SG']
|
|
121
130
|
);
|
|
@@ -130,7 +139,8 @@ export class AddressRegion implements IAddressRegion {
|
|
|
130
139
|
'392',
|
|
131
140
|
AddressContinent.AS,
|
|
132
141
|
'010',
|
|
133
|
-
'81',
|
|
142
|
+
'+81',
|
|
143
|
+
'0',
|
|
134
144
|
'JPY',
|
|
135
145
|
['ja-JP']
|
|
136
146
|
);
|
|
@@ -145,6 +155,7 @@ export class AddressRegion implements IAddressRegion {
|
|
|
145
155
|
'840',
|
|
146
156
|
AddressContinent.NA,
|
|
147
157
|
'011',
|
|
158
|
+
'+1',
|
|
148
159
|
'1',
|
|
149
160
|
'USD',
|
|
150
161
|
['en-US']
|
|
@@ -160,6 +171,7 @@ export class AddressRegion implements IAddressRegion {
|
|
|
160
171
|
'124',
|
|
161
172
|
AddressContinent.NA,
|
|
162
173
|
'011',
|
|
174
|
+
'+1',
|
|
163
175
|
'1',
|
|
164
176
|
'CAD',
|
|
165
177
|
['en-CA', 'fr-CA']
|
|
@@ -175,7 +187,8 @@ export class AddressRegion implements IAddressRegion {
|
|
|
175
187
|
'036',
|
|
176
188
|
AddressContinent.OC,
|
|
177
189
|
'0011',
|
|
178
|
-
'61',
|
|
190
|
+
'+61',
|
|
191
|
+
'0',
|
|
179
192
|
'AUD',
|
|
180
193
|
['en-AU']
|
|
181
194
|
);
|
|
@@ -190,7 +203,8 @@ export class AddressRegion implements IAddressRegion {
|
|
|
190
203
|
'554',
|
|
191
204
|
AddressContinent.OC,
|
|
192
205
|
'00',
|
|
193
|
-
'64',
|
|
206
|
+
'+64',
|
|
207
|
+
'0',
|
|
194
208
|
'NZD',
|
|
195
209
|
['en-NZ', 'mi-NZ']
|
|
196
210
|
);
|
|
@@ -205,7 +219,8 @@ export class AddressRegion implements IAddressRegion {
|
|
|
205
219
|
'826',
|
|
206
220
|
AddressContinent.EU,
|
|
207
221
|
'00',
|
|
208
|
-
'44',
|
|
222
|
+
'+44',
|
|
223
|
+
'0',
|
|
209
224
|
'GBP',
|
|
210
225
|
['en-GB']
|
|
211
226
|
);
|
|
@@ -220,7 +235,8 @@ export class AddressRegion implements IAddressRegion {
|
|
|
220
235
|
'372',
|
|
221
236
|
AddressContinent.EU,
|
|
222
237
|
'00',
|
|
223
|
-
'353',
|
|
238
|
+
'+353',
|
|
239
|
+
'0',
|
|
224
240
|
'EUR',
|
|
225
241
|
['en-IE']
|
|
226
242
|
);
|
|
@@ -235,7 +251,8 @@ export class AddressRegion implements IAddressRegion {
|
|
|
235
251
|
'276',
|
|
236
252
|
AddressContinent.EU,
|
|
237
253
|
'00',
|
|
238
|
-
'49',
|
|
254
|
+
'+49',
|
|
255
|
+
'0',
|
|
239
256
|
'EUR',
|
|
240
257
|
['de-DE']
|
|
241
258
|
);
|
|
@@ -250,7 +267,8 @@ export class AddressRegion implements IAddressRegion {
|
|
|
250
267
|
'250',
|
|
251
268
|
AddressContinent.EU,
|
|
252
269
|
'00',
|
|
253
|
-
'33',
|
|
270
|
+
'+33',
|
|
271
|
+
'0',
|
|
254
272
|
'EUR',
|
|
255
273
|
['fr-FR']
|
|
256
274
|
);
|
|
@@ -295,6 +313,7 @@ export class AddressRegion implements IAddressRegion {
|
|
|
295
313
|
public continent: AddressContinent,
|
|
296
314
|
public exitCode: string,
|
|
297
315
|
public idd: string,
|
|
316
|
+
public nationalPrefix: string | undefined,
|
|
298
317
|
public currency: Currency,
|
|
299
318
|
public languages: string[],
|
|
300
319
|
public label: string = id
|