@etsoo/appscript 1.5.64 → 1.5.65

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 (182) hide show
  1. package/.github/workflows/main.yml +6 -5
  2. package/__tests__/app/CoreApp.ts +141 -143
  3. package/__tests__/app/Culture.ts +23 -23
  4. package/__tests__/app/TestApp.ts +107 -105
  5. package/__tests__/business/BusinessUtils.ts +37 -37
  6. package/__tests__/result/ActionResult.ts +14 -14
  7. package/__tests__/tsconfig.json +16 -16
  8. package/lib/cjs/address/AddressAutocomplete.d.ts +1 -1
  9. package/lib/cjs/address/AddressPlace.d.ts +3 -3
  10. package/lib/cjs/address/AddressPlaceBase.d.ts +1 -1
  11. package/lib/cjs/address/AddressRegion.d.ts +2 -2
  12. package/lib/cjs/address/AddressRegion.js +12 -12
  13. package/lib/cjs/address/AddressUtils.d.ts +1 -1
  14. package/lib/cjs/api/AuthApi.d.ts +14 -14
  15. package/lib/cjs/api/AuthApi.js +17 -17
  16. package/lib/cjs/api/BaseApi.d.ts +1 -1
  17. package/lib/cjs/api/EntityApi.d.ts +8 -8
  18. package/lib/cjs/api/EntityApi.js +4 -4
  19. package/lib/cjs/api/dto/IdLabelDto.d.ts +1 -1
  20. package/lib/cjs/api/dto/IdLabelPrimaryDto.d.ts +1 -1
  21. package/lib/cjs/api/dto/ResultPayload.d.ts +2 -2
  22. package/lib/cjs/api/rq/AuthRequest.d.ts +1 -1
  23. package/lib/cjs/api/rq/LoginRQ.d.ts +2 -2
  24. package/lib/cjs/api/rq/MergeRQ.d.ts +1 -1
  25. package/lib/cjs/api/rq/QueryRQ.d.ts +2 -2
  26. package/lib/cjs/api/rq/StatusQueryRQ.d.ts +3 -3
  27. package/lib/cjs/api/rq/UpdateModel.d.ts +2 -2
  28. package/lib/cjs/api/rq/UpdateStatusRQ.d.ts +2 -2
  29. package/lib/cjs/app/AppSettings.d.ts +3 -3
  30. package/lib/cjs/bridges/FlutterHost.d.ts +2 -2
  31. package/lib/cjs/bridges/FlutterHost.js +11 -11
  32. package/lib/cjs/business/BusinessTax.js +6 -6
  33. package/lib/cjs/business/BusinessUtils.d.ts +2 -2
  34. package/lib/cjs/business/BusinessUtils.js +5 -5
  35. package/lib/cjs/business/Currency.d.ts +1 -1
  36. package/lib/cjs/business/Currency.js +10 -10
  37. package/lib/cjs/business/ProductUnit.d.ts +1 -1
  38. package/lib/cjs/business/ShoppingCart.d.ts +9 -9
  39. package/lib/cjs/business/ShoppingCart.js +11 -11
  40. package/lib/cjs/custom/CustomField.d.ts +1 -1
  41. package/lib/cjs/custom/CustomFieldData.d.ts +2 -2
  42. package/lib/cjs/i18n/Culture.d.ts +31 -0
  43. package/lib/cjs/i18n/Culture.js +51 -0
  44. package/lib/cjs/index.d.ts +1 -4
  45. package/lib/cjs/index.js +1 -4
  46. package/lib/cjs/result/ActionResult.d.ts +1 -1
  47. package/lib/cjs/result/ActionResultError.d.ts +1 -1
  48. package/lib/cjs/result/ActionResultError.js +3 -3
  49. package/lib/cjs/result/InitCallResult.d.ts +1 -1
  50. package/lib/cjs/state/Culture.d.ts +2 -2
  51. package/lib/cjs/state/User.d.ts +1 -1
  52. package/lib/mjs/address/AddressAutocomplete.d.ts +1 -1
  53. package/lib/mjs/address/AddressPlace.d.ts +3 -3
  54. package/lib/mjs/address/AddressPlaceBase.d.ts +1 -1
  55. package/lib/mjs/address/AddressRegion.d.ts +2 -2
  56. package/lib/mjs/address/AddressRegion.js +13 -13
  57. package/lib/mjs/address/AddressUtils.d.ts +1 -1
  58. package/lib/mjs/address/AddressUtils.js +1 -1
  59. package/lib/mjs/api/AuthApi.d.ts +14 -14
  60. package/lib/mjs/api/AuthApi.js +19 -19
  61. package/lib/mjs/api/BaseApi.d.ts +1 -1
  62. package/lib/mjs/api/EntityApi.d.ts +8 -8
  63. package/lib/mjs/api/EntityApi.js +5 -5
  64. package/lib/mjs/api/dto/IdLabelDto.d.ts +1 -1
  65. package/lib/mjs/api/dto/IdLabelPrimaryDto.d.ts +1 -1
  66. package/lib/mjs/api/dto/ResultPayload.d.ts +2 -2
  67. package/lib/mjs/api/rq/AuthRequest.d.ts +1 -1
  68. package/lib/mjs/api/rq/LoginRQ.d.ts +2 -2
  69. package/lib/mjs/api/rq/MergeRQ.d.ts +1 -1
  70. package/lib/mjs/api/rq/QueryRQ.d.ts +2 -2
  71. package/lib/mjs/api/rq/StatusQueryRQ.d.ts +3 -3
  72. package/lib/mjs/api/rq/UpdateModel.d.ts +2 -2
  73. package/lib/mjs/api/rq/UpdateStatusRQ.d.ts +2 -2
  74. package/lib/mjs/app/AppSettings.d.ts +3 -3
  75. package/lib/mjs/bridges/FlutterHost.d.ts +2 -2
  76. package/lib/mjs/bridges/FlutterHost.js +13 -13
  77. package/lib/mjs/business/BusinessTax.js +6 -6
  78. package/lib/mjs/business/BusinessUtils.d.ts +2 -2
  79. package/lib/mjs/business/BusinessUtils.js +5 -5
  80. package/lib/mjs/business/Currency.d.ts +1 -1
  81. package/lib/mjs/business/Currency.js +10 -10
  82. package/lib/mjs/business/ProductUnit.d.ts +1 -1
  83. package/lib/mjs/business/ProductUnit.js +1 -1
  84. package/lib/mjs/business/ShoppingCart.d.ts +9 -9
  85. package/lib/mjs/business/ShoppingCart.js +12 -12
  86. package/lib/mjs/custom/CustomField.d.ts +1 -1
  87. package/lib/mjs/custom/CustomFieldData.d.ts +2 -2
  88. package/lib/mjs/i18n/Culture.d.ts +31 -0
  89. package/lib/mjs/i18n/Culture.js +48 -0
  90. package/lib/mjs/index.d.ts +1 -4
  91. package/lib/mjs/index.js +1 -4
  92. package/lib/mjs/result/ActionResult.d.ts +1 -1
  93. package/lib/mjs/result/ActionResult.js +1 -1
  94. package/lib/mjs/result/ActionResultError.d.ts +1 -1
  95. package/lib/mjs/result/ActionResultError.js +3 -3
  96. package/lib/mjs/result/InitCallResult.d.ts +1 -1
  97. package/lib/mjs/state/Culture.d.ts +2 -2
  98. package/lib/mjs/state/User.d.ts +1 -1
  99. package/package.json +1 -1
  100. package/src/address/AddressAutocomplete.ts +16 -16
  101. package/src/address/AddressCity.ts +12 -12
  102. package/src/address/AddressContinent.ts +35 -35
  103. package/src/address/AddressDistrict.ts +12 -12
  104. package/src/address/AddressLocation.ts +8 -8
  105. package/src/address/AddressPlace.ts +23 -23
  106. package/src/address/AddressPlaceBase.ts +31 -31
  107. package/src/address/AddressRegion.ts +286 -286
  108. package/src/address/AddressState.ts +12 -12
  109. package/src/address/AddressUtils.ts +27 -27
  110. package/src/api/AuthApi.ts +194 -194
  111. package/src/api/BaseApi.ts +13 -13
  112. package/src/api/EntityApi.ts +181 -194
  113. package/src/api/dto/AntiforgeryRequestToken.ts +15 -15
  114. package/src/api/dto/ApiRefreshTokenDto.ts +16 -16
  115. package/src/api/dto/IdLabelDto.ts +3 -3
  116. package/src/api/dto/IdLabelPrimaryDto.ts +7 -7
  117. package/src/api/dto/InitCallDto.ts +12 -12
  118. package/src/api/dto/ResultPayload.ts +6 -6
  119. package/src/api/rq/ApiRefreshTokenRQ.ts +8 -8
  120. package/src/api/rq/AuthRequest.ts +40 -40
  121. package/src/api/rq/GetLogInUrlRQ.ts +8 -8
  122. package/src/api/rq/LoginIdRQ.ts +12 -12
  123. package/src/api/rq/LoginRQ.ts +18 -18
  124. package/src/api/rq/MergeRQ.ts +13 -13
  125. package/src/api/rq/QueryPagingData.ts +16 -16
  126. package/src/api/rq/QueryRQ.ts +22 -22
  127. package/src/api/rq/RefreshTokenRQ.ts +4 -4
  128. package/src/api/rq/ResetPasswordRQ.ts +20 -20
  129. package/src/api/rq/SignoutRQ.ts +8 -8
  130. package/src/api/rq/StatusQueryRQ.ts +11 -11
  131. package/src/api/rq/SwitchOrgRQ.ts +8 -8
  132. package/src/api/rq/TokenRQ.ts +4 -4
  133. package/src/api/rq/UpdateModel.ts +12 -12
  134. package/src/api/rq/UpdateStatusRQ.ts +10 -10
  135. package/src/app/AppSettings.ts +27 -27
  136. package/src/app/UserRole.ts +44 -44
  137. package/src/bridges/FlutterHost.ts +92 -97
  138. package/src/bridges/IBridgeHost.ts +49 -51
  139. package/src/business/ApiService.ts +25 -25
  140. package/src/business/BusinessTax.ts +63 -63
  141. package/src/business/BusinessUtils.ts +75 -75
  142. package/src/business/CultureItem.ts +43 -43
  143. package/src/business/Currency.ts +11 -11
  144. package/src/business/DataPrivacy.ts +35 -35
  145. package/src/business/EntityStatus.ts +44 -44
  146. package/src/business/ProductUnit.ts +58 -58
  147. package/src/business/RepeatOption.ts +50 -50
  148. package/src/business/ShoppingCart.ts +696 -706
  149. package/src/custom/CustomField.ts +20 -20
  150. package/src/custom/CustomFieldData.ts +43 -43
  151. package/src/def/ListItem.ts +12 -12
  152. package/src/i18n/Culture.ts +60 -0
  153. package/src/i18n/en.json +244 -244
  154. package/src/i18n/zh-Hans.json +244 -244
  155. package/src/i18n/zh-Hant.json +244 -244
  156. package/src/index.ts +1 -4
  157. package/src/result/ActionResult.ts +19 -19
  158. package/src/result/ActionResultError.ts +30 -30
  159. package/src/result/InitCallResult.ts +21 -21
  160. package/src/state/Culture.ts +3 -3
  161. package/src/state/State.ts +5 -5
  162. package/src/state/User.ts +92 -92
  163. package/lib/cjs/i18n/CultureUtils.d.ts +0 -13
  164. package/lib/cjs/i18n/CultureUtils.js +0 -32
  165. package/lib/cjs/i18n/en.d.ts +0 -6
  166. package/lib/cjs/i18n/en.js +0 -12
  167. package/lib/cjs/i18n/zhHans.d.ts +0 -6
  168. package/lib/cjs/i18n/zhHans.js +0 -12
  169. package/lib/cjs/i18n/zhHant.d.ts +0 -6
  170. package/lib/cjs/i18n/zhHant.js +0 -12
  171. package/lib/mjs/i18n/CultureUtils.d.ts +0 -13
  172. package/lib/mjs/i18n/CultureUtils.js +0 -29
  173. package/lib/mjs/i18n/en.d.ts +0 -6
  174. package/lib/mjs/i18n/en.js +0 -8
  175. package/lib/mjs/i18n/zhHans.d.ts +0 -6
  176. package/lib/mjs/i18n/zhHans.js +0 -8
  177. package/lib/mjs/i18n/zhHant.d.ts +0 -6
  178. package/lib/mjs/i18n/zhHant.js +0 -8
  179. package/src/i18n/CultureUtils.ts +0 -36
  180. package/src/i18n/en.ts +0 -10
  181. package/src/i18n/zhHans.ts +0 -10
  182. package/src/i18n/zhHant.ts +0 -10
@@ -1,329 +1,329 @@
1
- import { Currency } from '../business/Currency';
2
- import { AddressContinent, AddressContinentId } from './AddressContinent';
1
+ import { Currency } from "../business/Currency";
2
+ import { AddressContinent, AddressContinentId } from "./AddressContinent";
3
3
 
4
4
  /**
5
5
  * Address region in database
6
6
  */
7
7
  export interface AddressRegionDb {
8
- /**
9
- * Id, like CN for China
10
- * https://www.iban.com/country-codes
11
- * 国家编号
12
- */
13
- readonly id: string;
8
+ /**
9
+ * Id, like CN for China
10
+ * https://www.iban.com/country-codes
11
+ * 国家编号
12
+ */
13
+ readonly id: string;
14
14
 
15
- /**
16
- * 3-code id like CHN for China
17
- * 三个字母国家编号
18
- */
19
- readonly id3: string;
15
+ /**
16
+ * 3-code id like CHN for China
17
+ * 三个字母国家编号
18
+ */
19
+ readonly id3: string;
20
20
 
21
- /**
22
- * Number id, like 156 for China
23
- * 数字编号
24
- */
25
- readonly nid: string;
21
+ /**
22
+ * Number id, like 156 for China
23
+ * 数字编号
24
+ */
25
+ readonly nid: string;
26
26
 
27
- /**
28
- * Continent id
29
- * 洲编号
30
- */
31
- readonly continentId: AddressContinentId;
27
+ /**
28
+ * Continent id
29
+ * 洲编号
30
+ */
31
+ readonly continentId: AddressContinentId;
32
32
 
33
- /**
34
- * Phone exit code for international dial, like 00 in China
35
- * 国际拨号的电话退出代码
36
- */
37
- readonly exitCode: string;
33
+ /**
34
+ * Phone exit code for international dial, like 00 in China
35
+ * 国际拨号的电话退出代码
36
+ */
37
+ readonly exitCode: string;
38
38
 
39
- /**
40
- * National (truck) prefix
41
- * 国内呼叫的拨号
42
- */
43
- readonly nationalPrefix?: string;
39
+ /**
40
+ * National (truck) prefix
41
+ * 国内呼叫的拨号
42
+ */
43
+ readonly nationalPrefix?: string;
44
44
 
45
- /**
46
- * Area code for international dial, like 86 for China
47
- * 国际电话区号
48
- */
49
- readonly idd: string;
45
+ /**
46
+ * Area code for international dial, like 86 for China
47
+ * 国际电话区号
48
+ */
49
+ readonly idd: string;
50
50
 
51
- /**
52
- * Currency, like CNY for China's currency
53
- * 币种
54
- */
55
- readonly currency: Currency;
51
+ /**
52
+ * Currency, like CNY for China's currency
53
+ * 币种
54
+ */
55
+ readonly currency: Currency;
56
56
 
57
- /**
58
- * Name
59
- * 名称
60
- */
61
- label: string;
57
+ /**
58
+ * Name
59
+ * 名称
60
+ */
61
+ label: string;
62
62
 
63
- /**
64
- * Pinyin or other query assistant data
65
- * 拼音或其他辅助查询字符串
66
- */
67
- py?: string;
63
+ /**
64
+ * Pinyin or other query assistant data
65
+ * 拼音或其他辅助查询字符串
66
+ */
67
+ py?: string;
68
68
  }
69
69
 
70
70
  /**
71
71
  * Country or region interface
72
72
  */
73
73
  export interface IAddressRegion extends AddressRegionDb {
74
- /**
75
- * Continent
76
- * 洲
77
- */
78
- readonly continent: AddressContinent;
74
+ /**
75
+ * Continent
76
+ * 洲
77
+ */
78
+ readonly continent: AddressContinent;
79
79
 
80
- /**
81
- * Languages
82
- * 语言
83
- */
84
- readonly languages: string[];
80
+ /**
81
+ * Languages
82
+ * 语言
83
+ */
84
+ readonly languages: string[];
85
85
  }
86
86
 
87
87
  /**
88
88
  * Address or region
89
89
  */
90
90
  export class AddressRegion implements IAddressRegion {
91
- /**
92
- * CN - China
93
- */
94
- static CN = new AddressRegion(
95
- 'CN',
96
- 'CHN',
97
- '156',
98
- AddressContinent.AS,
99
- '00',
100
- '+86',
101
- '0',
102
- 'CNY',
103
- ['zh-Hans-CN', 'zh-CN']
104
- );
91
+ /**
92
+ * CN - China
93
+ */
94
+ static CN = new AddressRegion(
95
+ "CN",
96
+ "CHN",
97
+ "156",
98
+ AddressContinent.AS,
99
+ "00",
100
+ "+86",
101
+ "0",
102
+ "CNY",
103
+ ["zh-Hans-CN", "zh-CN"]
104
+ );
105
105
 
106
- /**
107
- * HK - HK, China
108
- * 中国香港
109
- */
110
- static HK = new AddressRegion(
111
- 'HK',
112
- 'HKG',
113
- '344',
114
- AddressContinent.AS,
115
- '001',
116
- '+852',
117
- undefined,
118
- 'HKD',
119
- ['zh-Hant-HK', 'zh-HK', 'en-HK']
120
- );
106
+ /**
107
+ * HK - HK, China
108
+ * 中国香港
109
+ */
110
+ static HK = new AddressRegion(
111
+ "HK",
112
+ "HKG",
113
+ "344",
114
+ AddressContinent.AS,
115
+ "001",
116
+ "+852",
117
+ undefined,
118
+ "HKD",
119
+ ["zh-Hant-HK", "zh-HK", "en-HK"]
120
+ );
121
121
 
122
- /**
123
- * SG - Singapore
124
- * 新加坡
125
- */
126
- static SG = new AddressRegion(
127
- 'SG',
128
- 'SGP',
129
- '702',
130
- AddressContinent.AS,
131
- '000',
132
- '+65',
133
- undefined,
134
- 'SGD',
135
- ['zh-Hans-SG', 'zh-SG', 'en-SG']
136
- );
122
+ /**
123
+ * SG - Singapore
124
+ * 新加坡
125
+ */
126
+ static SG = new AddressRegion(
127
+ "SG",
128
+ "SGP",
129
+ "702",
130
+ AddressContinent.AS,
131
+ "000",
132
+ "+65",
133
+ undefined,
134
+ "SGD",
135
+ ["zh-Hans-SG", "zh-SG", "en-SG"]
136
+ );
137
137
 
138
- /**
139
- * JP - Japan
140
- * 日本
141
- */
142
- static JP = new AddressRegion(
143
- 'JP',
144
- 'JPN',
145
- '392',
146
- AddressContinent.AS,
147
- '010',
148
- '+81',
149
- '0',
150
- 'JPY',
151
- ['ja-JP']
152
- );
138
+ /**
139
+ * JP - Japan
140
+ * 日本
141
+ */
142
+ static JP = new AddressRegion(
143
+ "JP",
144
+ "JPN",
145
+ "392",
146
+ AddressContinent.AS,
147
+ "010",
148
+ "+81",
149
+ "0",
150
+ "JPY",
151
+ ["ja-JP"]
152
+ );
153
153
 
154
- /**
155
- * US - United States
156
- * 美国
157
- */
158
- static US = new AddressRegion(
159
- 'US',
160
- 'USA',
161
- '840',
162
- AddressContinent.NA,
163
- '011',
164
- '+1',
165
- '1',
166
- 'USD',
167
- ['en-US']
168
- );
154
+ /**
155
+ * US - United States
156
+ * 美国
157
+ */
158
+ static US = new AddressRegion(
159
+ "US",
160
+ "USA",
161
+ "840",
162
+ AddressContinent.NA,
163
+ "011",
164
+ "+1",
165
+ "1",
166
+ "USD",
167
+ ["en-US"]
168
+ );
169
169
 
170
- /**
171
- * CA - Canada
172
- * 加拿大
173
- */
174
- static CA = new AddressRegion(
175
- 'CA',
176
- 'CAN',
177
- '124',
178
- AddressContinent.NA,
179
- '011',
180
- '+1',
181
- '1',
182
- 'CAD',
183
- ['en-CA', 'fr-CA']
184
- );
170
+ /**
171
+ * CA - Canada
172
+ * 加拿大
173
+ */
174
+ static CA = new AddressRegion(
175
+ "CA",
176
+ "CAN",
177
+ "124",
178
+ AddressContinent.NA,
179
+ "011",
180
+ "+1",
181
+ "1",
182
+ "CAD",
183
+ ["en-CA", "fr-CA"]
184
+ );
185
185
 
186
- /**
187
- * AU - Australia
188
- * 澳大利亚
189
- */
190
- static AU = new AddressRegion(
191
- 'AU',
192
- 'AUS',
193
- '036',
194
- AddressContinent.OC,
195
- '0011',
196
- '+61',
197
- '0',
198
- 'AUD',
199
- ['en-AU']
200
- );
186
+ /**
187
+ * AU - Australia
188
+ * 澳大利亚
189
+ */
190
+ static AU = new AddressRegion(
191
+ "AU",
192
+ "AUS",
193
+ "036",
194
+ AddressContinent.OC,
195
+ "0011",
196
+ "+61",
197
+ "0",
198
+ "AUD",
199
+ ["en-AU"]
200
+ );
201
201
 
202
- /**
203
- * NZ - New Zealand
204
- * 新西兰
205
- */
206
- static NZ = new AddressRegion(
207
- 'NZ',
208
- 'NZL',
209
- '554',
210
- AddressContinent.OC,
211
- '00',
212
- '+64',
213
- '0',
214
- 'NZD',
215
- ['en-NZ', 'mi-NZ']
216
- );
202
+ /**
203
+ * NZ - New Zealand
204
+ * 新西兰
205
+ */
206
+ static NZ = new AddressRegion(
207
+ "NZ",
208
+ "NZL",
209
+ "554",
210
+ AddressContinent.OC,
211
+ "00",
212
+ "+64",
213
+ "0",
214
+ "NZD",
215
+ ["en-NZ", "mi-NZ"]
216
+ );
217
217
 
218
- /**
219
- * GB - Great Britain
220
- * 英国
221
- */
222
- static GB = new AddressRegion(
223
- 'GB',
224
- 'GBR',
225
- '826',
226
- AddressContinent.EU,
227
- '00',
228
- '+44',
229
- '0',
230
- 'GBP',
231
- ['en-GB']
232
- );
218
+ /**
219
+ * GB - Great Britain
220
+ * 英国
221
+ */
222
+ static GB = new AddressRegion(
223
+ "GB",
224
+ "GBR",
225
+ "826",
226
+ AddressContinent.EU,
227
+ "00",
228
+ "+44",
229
+ "0",
230
+ "GBP",
231
+ ["en-GB"]
232
+ );
233
233
 
234
- /**
235
- * IE - Ireland
236
- * 爱尔兰
237
- */
238
- static IE = new AddressRegion(
239
- 'IE',
240
- 'IRL',
241
- '372',
242
- AddressContinent.EU,
243
- '00',
244
- '+353',
245
- '0',
246
- 'EUR',
247
- ['en-IE']
248
- );
234
+ /**
235
+ * IE - Ireland
236
+ * 爱尔兰
237
+ */
238
+ static IE = new AddressRegion(
239
+ "IE",
240
+ "IRL",
241
+ "372",
242
+ AddressContinent.EU,
243
+ "00",
244
+ "+353",
245
+ "0",
246
+ "EUR",
247
+ ["en-IE"]
248
+ );
249
249
 
250
- /**
251
- * DE - Germany
252
- * 德国
253
- */
254
- static DE = new AddressRegion(
255
- 'DE',
256
- 'DEU',
257
- '276',
258
- AddressContinent.EU,
259
- '00',
260
- '+49',
261
- '0',
262
- 'EUR',
263
- ['de-DE']
264
- );
250
+ /**
251
+ * DE - Germany
252
+ * 德国
253
+ */
254
+ static DE = new AddressRegion(
255
+ "DE",
256
+ "DEU",
257
+ "276",
258
+ AddressContinent.EU,
259
+ "00",
260
+ "+49",
261
+ "0",
262
+ "EUR",
263
+ ["de-DE"]
264
+ );
265
265
 
266
- /**
267
- * FR - France
268
- * 法国
269
- */
270
- static FR = new AddressRegion(
271
- 'FR',
272
- 'FRA',
273
- '250',
274
- AddressContinent.EU,
275
- '00',
276
- '+33',
277
- '0',
278
- 'EUR',
279
- ['fr-FR']
280
- );
266
+ /**
267
+ * FR - France
268
+ * 法国
269
+ */
270
+ static FR = new AddressRegion(
271
+ "FR",
272
+ "FRA",
273
+ "250",
274
+ AddressContinent.EU,
275
+ "00",
276
+ "+33",
277
+ "0",
278
+ "EUR",
279
+ ["fr-FR"]
280
+ );
281
281
 
282
- /**
283
- * All countries and regions
284
- */
285
- static all = [
286
- AddressRegion.CN,
287
- AddressRegion.HK,
288
- AddressRegion.SG,
289
- AddressRegion.JP,
290
- AddressRegion.US,
291
- AddressRegion.CA,
292
- AddressRegion.AU,
293
- AddressRegion.NZ,
294
- AddressRegion.GB,
295
- AddressRegion.IE,
296
- AddressRegion.DE,
297
- AddressRegion.FR
298
- ];
282
+ /**
283
+ * All countries and regions
284
+ */
285
+ static all = [
286
+ AddressRegion.CN,
287
+ AddressRegion.HK,
288
+ AddressRegion.SG,
289
+ AddressRegion.JP,
290
+ AddressRegion.US,
291
+ AddressRegion.CA,
292
+ AddressRegion.AU,
293
+ AddressRegion.NZ,
294
+ AddressRegion.GB,
295
+ AddressRegion.IE,
296
+ AddressRegion.DE,
297
+ AddressRegion.FR
298
+ ];
299
299
 
300
- /**
301
- * Get country or region by id
302
- * @param id Country id
303
- */
304
- static getById(id: string) {
305
- return AddressRegion.all.find((c) => c.id === id);
306
- }
300
+ /**
301
+ * Get country or region by id
302
+ * @param id Country id
303
+ */
304
+ static getById(id: string) {
305
+ return AddressRegion.all.find((c) => c.id === id);
306
+ }
307
307
 
308
- /**
309
- * Continent id
310
- * 洲编号
311
- */
312
- readonly continentId: AddressContinentId;
308
+ /**
309
+ * Continent id
310
+ * 洲编号
311
+ */
312
+ readonly continentId: AddressContinentId;
313
313
 
314
- // Typescript constructor shorthand
315
- constructor(
316
- public id: string,
317
- public id3: string,
318
- public nid: string,
319
- public continent: AddressContinent,
320
- public exitCode: string,
321
- public idd: string,
322
- public nationalPrefix: string | undefined,
323
- public currency: Currency,
324
- public languages: string[],
325
- public label: string = id
326
- ) {
327
- this.continentId = AddressContinent[continent] as AddressContinentId;
328
- }
314
+ // Typescript constructor shorthand
315
+ constructor(
316
+ public id: string,
317
+ public id3: string,
318
+ public nid: string,
319
+ public continent: AddressContinent,
320
+ public exitCode: string,
321
+ public idd: string,
322
+ public nationalPrefix: string | undefined,
323
+ public currency: Currency,
324
+ public languages: string[],
325
+ public label: string = id
326
+ ) {
327
+ this.continentId = AddressContinent[continent] as AddressContinentId;
328
+ }
329
329
  }
@@ -2,18 +2,18 @@
2
2
  * Address state
3
3
  */
4
4
  export type AddressState = {
5
- /**
6
- * Id
7
- */
8
- id: string;
5
+ /**
6
+ * Id
7
+ */
8
+ id: string;
9
9
 
10
- /**
11
- * Abbreviation
12
- */
13
- abbr?: string;
10
+ /**
11
+ * Abbreviation
12
+ */
13
+ abbr?: string;
14
14
 
15
- /**
16
- * Name
17
- */
18
- label: string;
15
+ /**
16
+ * Name
17
+ */
18
+ label: string;
19
19
  };