@etsoo/appscript 1.3.33 → 1.3.34

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.
Files changed (94) hide show
  1. package/__tests__/app/CoreApp.ts +27 -4
  2. package/lib/cjs/address/AddressContinent.d.ts +1 -1
  3. package/lib/cjs/address/AddressRegion.d.ts +7 -1
  4. package/lib/cjs/address/AddressRegion.js +21 -20
  5. package/lib/cjs/address/AddressState.d.ts +1 -1
  6. package/lib/cjs/app/CoreApp.js +45 -45
  7. package/lib/cjs/app/IApp.d.ts +2 -2
  8. package/lib/cjs/bridges/FlutterHost.d.ts +2 -1
  9. package/lib/cjs/bridges/FlutterHost.js +1 -0
  10. package/lib/cjs/bridges/IBridgeHost.d.ts +5 -0
  11. package/lib/cjs/business/BusinessTax.js +6 -6
  12. package/lib/cjs/business/Currency.d.ts +1 -1
  13. package/lib/cjs/business/ProductUnit.d.ts +1 -1
  14. package/lib/cjs/def/ListItem.d.ts +1 -1
  15. package/lib/cjs/erp/AddressApi.d.ts +16 -2
  16. package/lib/cjs/erp/AddressApi.js +43 -12
  17. package/lib/cjs/erp/BaseApi.js +6 -6
  18. package/lib/cjs/erp/dto/AuditLineDto.d.ts +3 -3
  19. package/lib/cjs/erp/dto/CurrencyDto.d.ts +1 -1
  20. package/lib/cjs/erp/dto/ExchangeRateDto.d.ts +1 -1
  21. package/lib/cjs/erp/dto/ExchangeRateHistoryDto.d.ts +1 -1
  22. package/lib/cjs/erp/dto/IdLabelDto.d.ts +1 -1
  23. package/lib/cjs/erp/dto/IdLabelPrimaryDto.d.ts +1 -1
  24. package/lib/cjs/erp/dto/InitCallDto.d.ts +1 -1
  25. package/lib/cjs/erp/dto/OrgDto.d.ts +1 -1
  26. package/lib/cjs/erp/dto/OrgQueryDto.d.ts +1 -1
  27. package/lib/cjs/erp/dto/PublicProductDto.d.ts +2 -2
  28. package/lib/cjs/erp/dto/ResultPayload.d.ts +3 -3
  29. package/lib/cjs/erp/rq/MemberListRQ.d.ts +1 -1
  30. package/lib/cjs/erp/rq/OrgListRQ.d.ts +1 -1
  31. package/lib/cjs/erp/rq/OrgQueryRQ.d.ts +1 -1
  32. package/lib/cjs/erp/rq/QueryRQ.d.ts +1 -1
  33. package/lib/cjs/erp/rq/RefreshTokenRQ.d.ts +1 -1
  34. package/lib/cjs/erp/rq/RegionsRQ.d.ts +14 -0
  35. package/lib/cjs/erp/rq/RegionsRQ.js +2 -0
  36. package/lib/cjs/erp/rq/TiplistRQ.d.ts +1 -1
  37. package/lib/cjs/i18n/en-US.json +1 -0
  38. package/lib/cjs/i18n/zh-CN.json +1 -0
  39. package/lib/cjs/i18n/zh-HK.json +1 -0
  40. package/lib/cjs/result/ActionResultError.js +12 -12
  41. package/lib/cjs/result/IActionResult.d.ts +2 -2
  42. package/lib/cjs/result/InitCallResult.d.ts +1 -1
  43. package/lib/cjs/state/User.d.ts +1 -1
  44. package/lib/mjs/address/AddressContinent.d.ts +1 -1
  45. package/lib/mjs/address/AddressRegion.d.ts +7 -1
  46. package/lib/mjs/address/AddressRegion.js +21 -20
  47. package/lib/mjs/address/AddressState.d.ts +1 -1
  48. package/lib/mjs/app/CoreApp.js +45 -45
  49. package/lib/mjs/app/IApp.d.ts +2 -2
  50. package/lib/mjs/bridges/FlutterHost.d.ts +2 -1
  51. package/lib/mjs/bridges/FlutterHost.js +1 -0
  52. package/lib/mjs/bridges/IBridgeHost.d.ts +5 -0
  53. package/lib/mjs/business/BusinessTax.js +6 -6
  54. package/lib/mjs/business/Currency.d.ts +1 -1
  55. package/lib/mjs/business/ProductUnit.d.ts +1 -1
  56. package/lib/mjs/def/ListItem.d.ts +1 -1
  57. package/lib/mjs/erp/AddressApi.d.ts +16 -2
  58. package/lib/mjs/erp/AddressApi.js +43 -12
  59. package/lib/mjs/erp/BaseApi.js +6 -6
  60. package/lib/mjs/erp/dto/AuditLineDto.d.ts +3 -3
  61. package/lib/mjs/erp/dto/CurrencyDto.d.ts +1 -1
  62. package/lib/mjs/erp/dto/ExchangeRateDto.d.ts +1 -1
  63. package/lib/mjs/erp/dto/ExchangeRateHistoryDto.d.ts +1 -1
  64. package/lib/mjs/erp/dto/IdLabelDto.d.ts +1 -1
  65. package/lib/mjs/erp/dto/IdLabelPrimaryDto.d.ts +1 -1
  66. package/lib/mjs/erp/dto/InitCallDto.d.ts +1 -1
  67. package/lib/mjs/erp/dto/OrgDto.d.ts +1 -1
  68. package/lib/mjs/erp/dto/OrgQueryDto.d.ts +1 -1
  69. package/lib/mjs/erp/dto/PublicProductDto.d.ts +2 -2
  70. package/lib/mjs/erp/dto/ResultPayload.d.ts +3 -3
  71. package/lib/mjs/erp/rq/MemberListRQ.d.ts +1 -1
  72. package/lib/mjs/erp/rq/OrgListRQ.d.ts +1 -1
  73. package/lib/mjs/erp/rq/OrgQueryRQ.d.ts +1 -1
  74. package/lib/mjs/erp/rq/QueryRQ.d.ts +1 -1
  75. package/lib/mjs/erp/rq/RefreshTokenRQ.d.ts +1 -1
  76. package/lib/mjs/erp/rq/RegionsRQ.d.ts +14 -0
  77. package/lib/mjs/erp/rq/RegionsRQ.js +1 -0
  78. package/lib/mjs/erp/rq/TiplistRQ.d.ts +1 -1
  79. package/lib/mjs/i18n/en-US.json +1 -0
  80. package/lib/mjs/i18n/zh-CN.json +1 -0
  81. package/lib/mjs/i18n/zh-HK.json +1 -0
  82. package/lib/mjs/result/ActionResultError.js +12 -12
  83. package/lib/mjs/result/IActionResult.d.ts +2 -2
  84. package/lib/mjs/result/InitCallResult.d.ts +1 -1
  85. package/lib/mjs/state/User.d.ts +1 -1
  86. package/package.json +8 -8
  87. package/src/address/AddressRegion.ts +29 -10
  88. package/src/bridges/FlutterHost.ts +2 -0
  89. package/src/bridges/IBridgeHost.ts +6 -0
  90. package/src/erp/AddressApi.ts +72 -25
  91. package/src/erp/rq/RegionsRQ.ts +16 -0
  92. package/src/i18n/en-US.json +1 -0
  93. package/src/i18n/zh-CN.json +1 -0
  94. 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
- async continents(isNumberKey = false) {
15
- return DataTypes.getEnumKeys(AddressContinent).map((key) => ({
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 region list
33
- * @param isRemote Is Remote version
34
- * @returns Result
36
+ * Get all regions
37
+ * @param rq Rquest data
35
38
  */
36
- regions(isRemote) {
37
- if (isRemote) {
38
- return this.api.get(`Address/RegionList?language=${this.app.culture}`, undefined, { defaultValue: [], showLoading: false });
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
- else {
41
- return AddressRegion.all.map((region) => {
42
- region.label = this.app.getRegionLabel(region.id);
43
- return { ...region };
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
@@ -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
  }
@@ -2,7 +2,7 @@ import { IApiPayload } from '@etsoo/restclient';
2
2
  /**
3
3
  * Audit line data
4
4
  */
5
- export declare type AuditLineDto = {
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 declare type AuditLineChangesDto = {
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 declare type AuditLinePayload = IApiPayload<AuditLineDto[]>;
24
+ export type AuditLinePayload = IApiPayload<AuditLineDto[]>;
@@ -3,4 +3,4 @@ import { ExchangeRateDto } from './ExchangeRateDto';
3
3
  /**
4
4
  * Currency data
5
5
  */
6
- export declare type CurrencyDto = ListType1 & ExchangeRateDto;
6
+ export type CurrencyDto = ListType1 & ExchangeRateDto;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Exchange rate data
3
3
  */
4
- export declare type ExchangeRateDto = {
4
+ export type ExchangeRateDto = {
5
5
  /**
6
6
  * Exchange rate
7
7
  */
@@ -3,6 +3,6 @@ import { ExchangeRateDto } from './ExchangeRateDto';
3
3
  /**
4
4
  * Exchange rate history data
5
5
  */
6
- export declare type ExchangeRateHistoryDto = ExchangeRateDto & {
6
+ export type ExchangeRateHistoryDto = ExchangeRateDto & {
7
7
  id: Currency;
8
8
  };
@@ -2,4 +2,4 @@ import { ListType, ListType1 } from '@etsoo/shared';
2
2
  /**
3
3
  * Conditional IdLabel type
4
4
  */
5
- export declare type IdLabelConditional<T extends boolean> = T extends true ? ListType[] : ListType1[];
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 declare type IdLabelPrimaryDto<T extends DataTypes.IdType = number> = DataTypes.IdLabelItem<T> & {
5
+ export type IdLabelPrimaryDto<T extends DataTypes.IdType = number> = DataTypes.IdLabelItem<T> & {
6
6
  /**
7
7
  * Is primary
8
8
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Init call dto
3
3
  */
4
- export declare type InitCallDto = {
4
+ export type InitCallDto = {
5
5
  /**
6
6
  * Device id
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Organization data
3
3
  */
4
- export declare type OrgDto = {
4
+ export type OrgDto = {
5
5
  /**
6
6
  * Id
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Organization query data
3
3
  */
4
- export declare type OrgQueryDto = {
4
+ export type OrgQueryDto = {
5
5
  /**
6
6
  * Id
7
7
  */
@@ -3,7 +3,7 @@ import { EntityStatus } from '../../business/EntityStatus';
3
3
  /**
4
4
  * Public product data
5
5
  */
6
- export declare type PublicProductDto = {
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 declare type PublicOrgProductDto = PublicProductDto & {
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 declare type ResultPayload = IApiPayload<IActionResult>;
6
+ export type ResultPayload = IApiPayload<IActionResult>;
7
7
  /**
8
8
  * Number id action result payload
9
9
  */
10
- export declare type IdResultPayload = IApiPayload<IdActionResult>;
10
+ export type IdResultPayload = IApiPayload<IdActionResult>;
11
11
  /**
12
12
  * String id action result payload
13
13
  */
14
- export declare type StringIdResultPayload = IApiPayload<IdActionResult<string>>;
14
+ export type StringIdResultPayload = IApiPayload<IdActionResult<string>>;
@@ -2,4 +2,4 @@ import { TiplistRQ } from './TiplistRQ';
2
2
  /**
3
3
  * Member list request data
4
4
  */
5
- export declare type MemberListRQ = TiplistRQ<string> & {};
5
+ export type MemberListRQ = TiplistRQ<string> & {};
@@ -2,7 +2,7 @@ import { TiplistRQ } from './TiplistRQ';
2
2
  /**
3
3
  * Organization list request data
4
4
  */
5
- export declare type OrgListRQ = TiplistRQ & {
5
+ export type OrgListRQ = TiplistRQ & {
6
6
  /**
7
7
  * Service id
8
8
  */
@@ -2,7 +2,7 @@ import { QueryRQ } from './QueryRQ';
2
2
  /**
3
3
  * Organization query request data
4
4
  */
5
- export declare type OrgQueryRQ = QueryRQ & {
5
+ export type OrgQueryRQ = QueryRQ & {
6
6
  /**
7
7
  * Name
8
8
  */
@@ -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 declare type QueryRQ<T extends DataTypes.IdType = number> = {
6
+ export type QueryRQ<T extends DataTypes.IdType = number> = {
7
7
  /**
8
8
  * Number id
9
9
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Refresh token request data
3
3
  */
4
- export declare type RefreshTokenRQ = {
4
+ export type RefreshTokenRQ = {
5
5
  /**
6
6
  * Device id
7
7
  */
@@ -0,0 +1,14 @@
1
+ export type RegionsRQ = {
2
+ /**
3
+ * Favored country ids from top to bottom
4
+ */
5
+ favoredIds?: string[];
6
+ /**
7
+ * Items count to query
8
+ */
9
+ items?: number;
10
+ /**
11
+ * Filter keyword
12
+ */
13
+ keyword?: string;
14
+ };
@@ -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 declare type TiplistRQ<T extends DataTypes.IdType = number> = {
6
+ export type TiplistRQ<T extends DataTypes.IdType = number> = {
7
7
  /**
8
8
  * number id
9
9
  */
@@ -2,6 +2,7 @@
2
2
  "accountant": "Accountant",
3
3
  "actions": "Actions",
4
4
  "add": "Add",
5
+ "assignedId": "Assigned ID",
5
6
  "audits": "Audits",
6
7
  "author": "Author",
7
8
  "authorizer": "Authorizer",
@@ -2,6 +2,7 @@
2
2
  "accountant": "会计",
3
3
  "actions": "操作",
4
4
  "add": "添加",
5
+ "assignedId": "分配的编号",
5
6
  "audits": "操作历史",
6
7
  "author": "作者",
7
8
  "authorizer": "授权人",
@@ -2,6 +2,7 @@
2
2
  "accountant": "會計",
3
3
  "actions": "操作",
4
4
  "add": "添加",
5
+ "assignedId": "分配的編號",
5
6
  "audits": "操作歷史",
6
7
  "author": "作者",
7
8
  "authorizer": "授權人",
@@ -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 declare type IdActionResult<T extends DataTypes.IdType = number> = IActionResult<{
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 declare type DynamicActionResult = IActionResult<Record<string, any>>;
59
+ export type DynamicActionResult = IActionResult<Record<string, any>>;
@@ -27,4 +27,4 @@ export interface InitCallResultData {
27
27
  /**
28
28
  * Init call result
29
29
  */
30
- export declare type InitCallResult = IActionResult<InitCallResultData>;
30
+ export type InitCallResult = IActionResult<InitCallResultData>;
@@ -35,7 +35,7 @@ export interface IUserData {
35
35
  /**
36
36
  * User data property keys
37
37
  */
38
- export declare type UserKey = keyof IUserData;
38
+ export type UserKey = keyof IUserData;
39
39
  /**
40
40
  * User interface
41
41
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.3.33",
3
+ "version": "1.3.34",
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.16",
56
- "@etsoo/restclient": "^1.0.78",
57
- "@etsoo/shared": "^1.1.77",
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.2",
68
- "@typescript-eslint/eslint-plugin": "^5.42.1",
69
- "@typescript-eslint/parser": "^5.42.1",
67
+ "@types/jest": "^29.2.3",
68
+ "@typescript-eslint/eslint-plugin": "^5.43.0",
69
+ "@typescript-eslint/parser": "^5.43.0",
70
70
  "eslint": "^8.27.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.8.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
@@ -108,4 +108,6 @@ export class FlutterHost implements IBridgeHost {
108
108
  }
109
109
 
110
110
  onUpdate(func: (app: string, version: string) => void) {}
111
+
112
+ setTitle(title: string) {}
111
113
  }
@@ -49,4 +49,10 @@ export interface IBridgeHost {
49
49
  * @param func Callback function
50
50
  */
51
51
  onUpdate(func: (app: string, version: string) => void): void;
52
+
53
+ /**
54
+ * Set window title
55
+ * @param title Title
56
+ */
57
+ setTitle(title: string): void;
52
58
  }