@etsoo/appscript 1.2.23 → 1.2.27
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 +15 -0
- package/lib/cjs/address/AddressRegion.js +2 -2
- package/lib/cjs/app/CoreApp.d.ts +15 -2
- package/lib/cjs/app/CoreApp.js +10 -0
- package/lib/cjs/business/BusinessUtils.d.ts +28 -2
- package/lib/cjs/business/BusinessUtils.js +48 -6
- package/lib/cjs/business/EntityStatus.d.ts +12 -0
- package/lib/cjs/business/EntityStatus.js +12 -0
- package/lib/cjs/business/ProductUnit.d.ts +47 -45
- package/lib/cjs/business/ProductUnit.js +36 -48
- package/lib/cjs/business/RepeatOption.d.ts +56 -0
- package/lib/cjs/business/RepeatOption.js +60 -0
- package/lib/cjs/i18n/en-US.json +40 -0
- package/lib/cjs/i18n/zh-CN.json +41 -0
- package/lib/cjs/i18n/zh-HK.json +40 -0
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +1 -0
- package/lib/mjs/address/AddressRegion.js +2 -2
- package/lib/mjs/app/CoreApp.d.ts +15 -2
- package/lib/mjs/app/CoreApp.js +10 -0
- package/lib/mjs/business/BusinessUtils.d.ts +28 -2
- package/lib/mjs/business/BusinessUtils.js +48 -6
- package/lib/mjs/business/EntityStatus.d.ts +12 -0
- package/lib/mjs/business/EntityStatus.js +12 -0
- package/lib/mjs/business/ProductUnit.d.ts +47 -45
- package/lib/mjs/business/ProductUnit.js +35 -47
- package/lib/mjs/business/RepeatOption.d.ts +56 -0
- package/lib/mjs/business/RepeatOption.js +57 -0
- package/lib/mjs/i18n/en-US.json +40 -0
- package/lib/mjs/i18n/zh-CN.json +41 -0
- package/lib/mjs/i18n/zh-HK.json +40 -0
- package/lib/mjs/index.d.ts +1 -0
- package/lib/mjs/index.js +1 -0
- package/package.json +10 -10
- package/src/address/AddressRegion.ts +2 -2
- package/src/app/CoreApp.ts +20 -2
- package/src/business/BusinessUtils.ts +82 -7
- package/src/business/EntityStatus.ts +15 -0
- package/src/business/ProductUnit.ts +35 -51
- package/src/business/RepeatOption.ts +65 -0
- package/src/i18n/en-US.json +40 -0
- package/src/i18n/zh-CN.json +41 -0
- package/src/i18n/zh-HK.json +40 -0
- package/src/index.ts +1 -0
|
@@ -1,67 +1,55 @@
|
|
|
1
|
+
import { RepeatOption } from './RepeatOption';
|
|
1
2
|
/**
|
|
2
|
-
* Product units
|
|
3
|
-
*
|
|
3
|
+
* Product base units
|
|
4
|
+
* 1 - 9
|
|
4
5
|
*/
|
|
5
|
-
export var
|
|
6
|
-
(function (
|
|
6
|
+
export var ProductBaseUnit;
|
|
7
|
+
(function (ProductBaseUnit) {
|
|
7
8
|
/**
|
|
8
9
|
* Picese
|
|
9
10
|
* 件
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
|
+
ProductBaseUnit[ProductBaseUnit["PC"] = 1] = "PC";
|
|
12
13
|
/**
|
|
13
14
|
* Set
|
|
14
15
|
* 套
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* 季
|
|
25
|
-
*/
|
|
26
|
-
ProductUnit[ProductUnit["QUATER"] = 11] = "QUATER";
|
|
27
|
-
/**
|
|
28
|
-
* Month
|
|
29
|
-
* 月
|
|
30
|
-
*/
|
|
31
|
-
ProductUnit[ProductUnit["MONTH"] = 12] = "MONTH";
|
|
32
|
-
/**
|
|
33
|
-
* Fortnight
|
|
34
|
-
* 两周
|
|
35
|
-
*/
|
|
36
|
-
ProductUnit[ProductUnit["FORNIGHT"] = 13] = "FORNIGHT";
|
|
37
|
-
/**
|
|
38
|
-
* Week
|
|
39
|
-
* 周
|
|
40
|
-
*/
|
|
41
|
-
ProductUnit[ProductUnit["WEEK"] = 14] = "WEEK";
|
|
42
|
-
/**
|
|
43
|
-
* Day
|
|
44
|
-
* 天
|
|
45
|
-
*/
|
|
46
|
-
ProductUnit[ProductUnit["DAY"] = 15] = "DAY";
|
|
17
|
+
ProductBaseUnit[ProductBaseUnit["SET"] = 2] = "SET";
|
|
18
|
+
})(ProductBaseUnit || (ProductBaseUnit = {}));
|
|
19
|
+
/**
|
|
20
|
+
* Product weight units
|
|
21
|
+
* Range 40 - 49
|
|
22
|
+
*/
|
|
23
|
+
export var ProductWeightUnit;
|
|
24
|
+
(function (ProductWeightUnit) {
|
|
47
25
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
26
|
+
* Gram
|
|
27
|
+
* 克
|
|
50
28
|
*/
|
|
51
|
-
|
|
29
|
+
ProductWeightUnit[ProductWeightUnit["GRAM"] = 40] = "GRAM";
|
|
52
30
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
31
|
+
* Half Kg
|
|
32
|
+
* 斤
|
|
55
33
|
*/
|
|
56
|
-
|
|
34
|
+
ProductWeightUnit[ProductWeightUnit["JIN"] = 41] = "JIN";
|
|
57
35
|
/**
|
|
58
36
|
* Kilogram
|
|
59
37
|
* 千克
|
|
60
38
|
*/
|
|
61
|
-
|
|
39
|
+
ProductWeightUnit[ProductWeightUnit["KILOGRAM"] = 42] = "KILOGRAM";
|
|
62
40
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
41
|
+
* Ton
|
|
42
|
+
* 吨
|
|
65
43
|
*/
|
|
66
|
-
|
|
67
|
-
})(
|
|
44
|
+
ProductWeightUnit[ProductWeightUnit["TON"] = 49] = "TON";
|
|
45
|
+
})(ProductWeightUnit || (ProductWeightUnit = {}));
|
|
46
|
+
/**
|
|
47
|
+
* Product units enum
|
|
48
|
+
* Repeat options take range 10 - 39
|
|
49
|
+
* See com.etsoo.CoreFramework.Business.ProductUnit
|
|
50
|
+
*/
|
|
51
|
+
export const ProductUnit = {
|
|
52
|
+
...ProductBaseUnit,
|
|
53
|
+
...RepeatOption,
|
|
54
|
+
...ProductWeightUnit
|
|
55
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repeat options
|
|
3
|
+
* Part of ProductUnit, range 10 - 39
|
|
4
|
+
*/
|
|
5
|
+
export declare enum RepeatOption {
|
|
6
|
+
/**
|
|
7
|
+
* Hour
|
|
8
|
+
* 小时
|
|
9
|
+
*/
|
|
10
|
+
HOUR = 10,
|
|
11
|
+
/**
|
|
12
|
+
* Day
|
|
13
|
+
* 天
|
|
14
|
+
*/
|
|
15
|
+
DAY = 11,
|
|
16
|
+
/**
|
|
17
|
+
* Year
|
|
18
|
+
* 年
|
|
19
|
+
*/
|
|
20
|
+
YEAR = 12,
|
|
21
|
+
/**
|
|
22
|
+
* Week
|
|
23
|
+
* 周
|
|
24
|
+
*/
|
|
25
|
+
WEEK = 21,
|
|
26
|
+
/**
|
|
27
|
+
* Two weeks
|
|
28
|
+
* 两周
|
|
29
|
+
*/
|
|
30
|
+
FORTNIGHT = 22,
|
|
31
|
+
/**
|
|
32
|
+
* Four weeks
|
|
33
|
+
* 四周
|
|
34
|
+
*/
|
|
35
|
+
FOURWEEK = 24,
|
|
36
|
+
/**
|
|
37
|
+
* Month
|
|
38
|
+
* 月
|
|
39
|
+
*/
|
|
40
|
+
MONTH = 31,
|
|
41
|
+
/**
|
|
42
|
+
* Two months
|
|
43
|
+
* 两月
|
|
44
|
+
*/
|
|
45
|
+
BIMONTH = 32,
|
|
46
|
+
/**
|
|
47
|
+
* Quater(3 months)
|
|
48
|
+
* 季(三个月)
|
|
49
|
+
*/
|
|
50
|
+
QUATER = 33,
|
|
51
|
+
/**
|
|
52
|
+
* Half a year
|
|
53
|
+
* 半年
|
|
54
|
+
*/
|
|
55
|
+
HALFYEAR = 36
|
|
56
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repeat options
|
|
3
|
+
* Part of ProductUnit, range 10 - 39
|
|
4
|
+
*/
|
|
5
|
+
export var RepeatOption;
|
|
6
|
+
(function (RepeatOption) {
|
|
7
|
+
/**
|
|
8
|
+
* Hour
|
|
9
|
+
* 小时
|
|
10
|
+
*/
|
|
11
|
+
RepeatOption[RepeatOption["HOUR"] = 10] = "HOUR";
|
|
12
|
+
/**
|
|
13
|
+
* Day
|
|
14
|
+
* 天
|
|
15
|
+
*/
|
|
16
|
+
RepeatOption[RepeatOption["DAY"] = 11] = "DAY";
|
|
17
|
+
/**
|
|
18
|
+
* Year
|
|
19
|
+
* 年
|
|
20
|
+
*/
|
|
21
|
+
RepeatOption[RepeatOption["YEAR"] = 12] = "YEAR";
|
|
22
|
+
/**
|
|
23
|
+
* Week
|
|
24
|
+
* 周
|
|
25
|
+
*/
|
|
26
|
+
RepeatOption[RepeatOption["WEEK"] = 21] = "WEEK";
|
|
27
|
+
/**
|
|
28
|
+
* Two weeks
|
|
29
|
+
* 两周
|
|
30
|
+
*/
|
|
31
|
+
RepeatOption[RepeatOption["FORTNIGHT"] = 22] = "FORTNIGHT";
|
|
32
|
+
/**
|
|
33
|
+
* Four weeks
|
|
34
|
+
* 四周
|
|
35
|
+
*/
|
|
36
|
+
RepeatOption[RepeatOption["FOURWEEK"] = 24] = "FOURWEEK";
|
|
37
|
+
/**
|
|
38
|
+
* Month
|
|
39
|
+
* 月
|
|
40
|
+
*/
|
|
41
|
+
RepeatOption[RepeatOption["MONTH"] = 31] = "MONTH";
|
|
42
|
+
/**
|
|
43
|
+
* Two months
|
|
44
|
+
* 两月
|
|
45
|
+
*/
|
|
46
|
+
RepeatOption[RepeatOption["BIMONTH"] = 32] = "BIMONTH";
|
|
47
|
+
/**
|
|
48
|
+
* Quater(3 months)
|
|
49
|
+
* 季(三个月)
|
|
50
|
+
*/
|
|
51
|
+
RepeatOption[RepeatOption["QUATER"] = 33] = "QUATER";
|
|
52
|
+
/**
|
|
53
|
+
* Half a year
|
|
54
|
+
* 半年
|
|
55
|
+
*/
|
|
56
|
+
RepeatOption[RepeatOption["HALFYEAR"] = 36] = "HALFYEAR";
|
|
57
|
+
})(RepeatOption || (RepeatOption = {}));
|
package/lib/mjs/i18n/en-US.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"actions": "Actions",
|
|
3
3
|
"add": "Add",
|
|
4
|
+
"approve": "Approve it",
|
|
4
5
|
"back": "Back",
|
|
5
6
|
"cancel": "Cancel",
|
|
6
7
|
"clear": "Clear",
|
|
@@ -11,6 +12,16 @@
|
|
|
11
12
|
"copy": "Copy",
|
|
12
13
|
"creation": "Creation",
|
|
13
14
|
"currency": "Currency",
|
|
15
|
+
"currencyAUD": "Australia Dollar $",
|
|
16
|
+
"currencyCAD": "Canada Dollar $",
|
|
17
|
+
"currencyCNY": "Renminbi(RMB) ¥",
|
|
18
|
+
"currencyEUR": "Euro €",
|
|
19
|
+
"currencyGBP": "British Pound £",
|
|
20
|
+
"currencyHKD": "Hong Kong Dollar $",
|
|
21
|
+
"currencyJPY": "Japan Yen ¥",
|
|
22
|
+
"currencyNZD": "New Zealand Dollar $",
|
|
23
|
+
"currencySGD": "Singapore Dollar $",
|
|
24
|
+
"currencyUSD": "U.S. Dollar $",
|
|
14
25
|
"delete": "Delete",
|
|
15
26
|
"deleteConfirm": "Are you sure you want to permanently delete this {0}?",
|
|
16
27
|
"description": "Description",
|
|
@@ -44,6 +55,7 @@
|
|
|
44
55
|
"pageNotFound": "Page Not Found",
|
|
45
56
|
"prompt": "Input",
|
|
46
57
|
"pullToRefresh": "Pull down to refresh",
|
|
58
|
+
"record": "Record",
|
|
47
59
|
"refresh": "Refresh",
|
|
48
60
|
"refreshing": "Refreshing",
|
|
49
61
|
"releaseToRefresh": "Release to refresh",
|
|
@@ -64,18 +76,46 @@
|
|
|
64
76
|
"showIt": "Show it",
|
|
65
77
|
"signout": "Sign out",
|
|
66
78
|
"smartERP": "SmartERP",
|
|
79
|
+
"sortTip": "Drag and drop items to sort",
|
|
67
80
|
"status": "Status",
|
|
81
|
+
"statusApproved": "Approved",
|
|
68
82
|
"statusArchived": "Archived",
|
|
83
|
+
"statusAudited": "Audited",
|
|
84
|
+
"statusCompleted": "Completed",
|
|
69
85
|
"statusDeleted": "Deleted",
|
|
70
86
|
"statusFlaged": "Flaged",
|
|
71
87
|
"statusNormal": "Normla",
|
|
72
88
|
"statusInactivated": "Inactivated",
|
|
73
89
|
"submit": "Submit",
|
|
74
90
|
"success": "Success",
|
|
91
|
+
"taxId": "Tax ID number",
|
|
92
|
+
"taxIdHelp": "Used for real-name authentication and invoicing",
|
|
93
|
+
"taxCABN": "Business number",
|
|
94
|
+
"taxCNUSCC": "Unified social credit code",
|
|
95
|
+
"taxHKBRN": "Business registration number",
|
|
96
|
+
"taxNZIRD": "IRD",
|
|
97
|
+
"taxUSEIN": "Employer identification number",
|
|
75
98
|
"timeDifferenceInvalid": "The time difference between the device and the server is {0}, which exceeds the limit of {1} seconds. Please adjust the device time. If it is abnormal, please inform the administrator",
|
|
76
99
|
"tokenExpiry": "Your session is about to expire. Click the Cancel button to continue",
|
|
77
100
|
"yes": "Yes",
|
|
78
101
|
"unknownError": "Unknown Error",
|
|
102
|
+
"unitJoin": "per {0}",
|
|
103
|
+
"unitPC": "PC",
|
|
104
|
+
"unitSET": "SET",
|
|
105
|
+
"unitHOUR": "Hour",
|
|
106
|
+
"unitDAY": "Day",
|
|
107
|
+
"unitYEAR": "Year",
|
|
108
|
+
"unitWEEK": "Week",
|
|
109
|
+
"unitFORTNIGHT": "Fortnight",
|
|
110
|
+
"unitFOURWEEK": "4-week",
|
|
111
|
+
"unitMONTH": "Month",
|
|
112
|
+
"unitBIMONTH": "2-month",
|
|
113
|
+
"unitQUATER": "Quater",
|
|
114
|
+
"unitHALFYEAR": "6-month",
|
|
115
|
+
"unitGRAM": "g",
|
|
116
|
+
"unitJIN": "½Kg",
|
|
117
|
+
"unitKILOGRAM": "Kg",
|
|
118
|
+
"view": "View",
|
|
79
119
|
"warning": "Warning",
|
|
80
120
|
"welcome": "{0}, welcome!"
|
|
81
121
|
}
|
package/lib/mjs/i18n/zh-CN.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"actions": "操作",
|
|
3
3
|
"add": "添加",
|
|
4
|
+
"approve": "批准",
|
|
4
5
|
"back": "后退",
|
|
5
6
|
"cancel": "取消",
|
|
6
7
|
"clear": "清除",
|
|
@@ -11,6 +12,16 @@
|
|
|
11
12
|
"copy": "复制",
|
|
12
13
|
"creation": "登记时间",
|
|
13
14
|
"currency": "币种",
|
|
15
|
+
"currencyAUD": "澳元$",
|
|
16
|
+
"currencyCAD": "加元$",
|
|
17
|
+
"currencyCNY": "人民币¥",
|
|
18
|
+
"currencyEUR": "欧元€",
|
|
19
|
+
"currencyGBP": "英镑£",
|
|
20
|
+
"currencyHKD": "港币$",
|
|
21
|
+
"currencyJPY": "日元¥",
|
|
22
|
+
"currencyNZD": "纽币$",
|
|
23
|
+
"currencySGD": "新币$",
|
|
24
|
+
"currencyUSD": "美元$",
|
|
14
25
|
"delete": "删除",
|
|
15
26
|
"deleteConfirm": "确定要永久删除此{0}吗?",
|
|
16
27
|
"description": "描述",
|
|
@@ -44,6 +55,7 @@
|
|
|
44
55
|
"pageNotFound": "找不到页面",
|
|
45
56
|
"prompt": "输入",
|
|
46
57
|
"pullToRefresh": "下拉刷新",
|
|
58
|
+
"record": "记录",
|
|
47
59
|
"refresh": "刷新",
|
|
48
60
|
"refreshing": "正在刷新",
|
|
49
61
|
"releaseToRefresh": "释放刷新",
|
|
@@ -64,18 +76,47 @@
|
|
|
64
76
|
"showIt": "显示",
|
|
65
77
|
"signout": "退出",
|
|
66
78
|
"smartERP": "司友云ERP",
|
|
79
|
+
"sortTip": "拖拽项目进行排序",
|
|
67
80
|
"status": "状态",
|
|
81
|
+
"statusApproved": "已批准",
|
|
68
82
|
"statusArchived": "已归档",
|
|
83
|
+
"statusAudited": "已审核",
|
|
84
|
+
"statusCompleted": "已完成",
|
|
69
85
|
"statusDeleted": "已删除",
|
|
70
86
|
"statusFlaged": "已标记",
|
|
71
87
|
"statusNormal": "正常",
|
|
72
88
|
"statusInactivated": "已停用",
|
|
73
89
|
"submit": "提交",
|
|
74
90
|
"success": "成功",
|
|
91
|
+
"taxId": "税号",
|
|
92
|
+
"taxIdHelp": "用于实名认证和开具发票",
|
|
93
|
+
"taxCABN": "营业编号(BN)",
|
|
94
|
+
"taxCNUSCC": "统一信用代码",
|
|
95
|
+
"taxHKBRN": "商业登记号码(BRN)",
|
|
96
|
+
"taxNZIRD": "IRD",
|
|
97
|
+
"taxUSEIN": "雇主识别号码(EIN)",
|
|
75
98
|
"timeDifferenceInvalid": "设备时间和服务器时间差为{0},超过{1}秒的限制,请调整设备时间,如果异常请告知管理员",
|
|
76
99
|
"tokenExpiry": "您的会话即将过期。点击 取消 按钮继续使用",
|
|
77
100
|
"yes": "是",
|
|
78
101
|
"unknownError": "未知错误",
|
|
102
|
+
"unitJoin": "每{0}",
|
|
103
|
+
"unitPC": "件",
|
|
104
|
+
"unitSET": "套",
|
|
105
|
+
"unitHOUR": "小时",
|
|
106
|
+
"unitDAY": "天",
|
|
107
|
+
"unitYEAR": "年",
|
|
108
|
+
"unitWEEK": "周",
|
|
109
|
+
"unitFORTNIGHT": "两周",
|
|
110
|
+
"unitFOURWEEK": "四周",
|
|
111
|
+
"unitMONTH": "月",
|
|
112
|
+
"unitBIMONTH": "两月",
|
|
113
|
+
"unitQUATER": "季度",
|
|
114
|
+
"unitHALFYEAR": "半年",
|
|
115
|
+
"unitGRAM": "克",
|
|
116
|
+
"unitJIN": "斤",
|
|
117
|
+
"unitKILOGRAM": "公斤",
|
|
118
|
+
"unitTON": "吨",
|
|
119
|
+
"view": "查看",
|
|
79
120
|
"warning": "警告",
|
|
80
121
|
"welcome": "{0}, 欢迎光临!"
|
|
81
122
|
}
|
package/lib/mjs/i18n/zh-HK.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"actions": "操作",
|
|
3
3
|
"add": "添加",
|
|
4
|
+
"approve": "批准",
|
|
4
5
|
"back": "後退",
|
|
5
6
|
"cancel": "取消",
|
|
6
7
|
"clear": "清除",
|
|
@@ -11,6 +12,16 @@
|
|
|
11
12
|
"copy": "複製",
|
|
12
13
|
"creation": "登記時間",
|
|
13
14
|
"currency": "幣種",
|
|
15
|
+
"currencyAUD": "澳元$",
|
|
16
|
+
"currencyCAD": "加元$",
|
|
17
|
+
"currencyCNY": "人民幣¥",
|
|
18
|
+
"currencyEUR": "歐元€",
|
|
19
|
+
"currencyGBP": "英鎊£",
|
|
20
|
+
"currencyHKD": "港幣$",
|
|
21
|
+
"currencyJPY": "日元¥",
|
|
22
|
+
"currencyNZD": "紐幣$",
|
|
23
|
+
"currencySGD": "新幣$",
|
|
24
|
+
"currencyUSD": "美元$",
|
|
14
25
|
"delete": "刪除",
|
|
15
26
|
"deleteConfirm": "確定要永久刪除此{0}嗎?",
|
|
16
27
|
"description": "描述",
|
|
@@ -44,6 +55,7 @@
|
|
|
44
55
|
"pageNotFound": "找不到頁面",
|
|
45
56
|
"prompt": "輸入",
|
|
46
57
|
"pullToRefresh": "下拉刷新",
|
|
58
|
+
"record": "記錄",
|
|
47
59
|
"refresh": "刷新",
|
|
48
60
|
"refreshing": "正在刷新",
|
|
49
61
|
"releaseToRefresh": "釋放刷新",
|
|
@@ -64,18 +76,46 @@
|
|
|
64
76
|
"showIt": "顯示",
|
|
65
77
|
"signout": "退出",
|
|
66
78
|
"smartERP": "司友雲ERP",
|
|
79
|
+
"sortTip": "拖拽項目進行排序",
|
|
67
80
|
"status": "狀態",
|
|
81
|
+
"statusApproved": "已批准",
|
|
68
82
|
"statusArchived": "已歸檔",
|
|
83
|
+
"statusAudited": "已審核",
|
|
84
|
+
"statusCompleted": "已完成",
|
|
69
85
|
"statusDeleted": "已刪除",
|
|
70
86
|
"statusFlaged": "已標記",
|
|
71
87
|
"statusNormal": "正常",
|
|
72
88
|
"statusInactivated": "已停用",
|
|
73
89
|
"submit": "提交",
|
|
74
90
|
"success": "成功",
|
|
91
|
+
"taxId": "稅號",
|
|
92
|
+
"taxIdHelp": "用於實名認證和開具發票",
|
|
93
|
+
"taxCABN": "營業編號(BN)",
|
|
94
|
+
"taxCNUSCC": "統一信用代碼",
|
|
95
|
+
"taxHKBRN": "商業登記號碼(BRN)",
|
|
96
|
+
"taxNZIRD": "IRD",
|
|
97
|
+
"taxUSEIN": "雇主識別號碼(EIN)",
|
|
75
98
|
"timeDifferenceInvalid": "設備時間和服務器時間差為{0},超過{1}秒的限制,請調整設備時間,如果異常請告知管理員",
|
|
76
99
|
"tokenExpiry": "您的會話即將過期。點擊 取消 按鈕繼續使用",
|
|
77
100
|
"yes": "是",
|
|
78
101
|
"unknownError": "未知錯誤",
|
|
102
|
+
"unitJoin": "每{0}",
|
|
103
|
+
"unitPC": "件",
|
|
104
|
+
"unitSET": "套",
|
|
105
|
+
"unitHOUR": "小時",
|
|
106
|
+
"unitDAY": "天",
|
|
107
|
+
"unitYEAR": "年",
|
|
108
|
+
"unitWEEK": "週",
|
|
109
|
+
"unitFORTNIGHT": "兩週",
|
|
110
|
+
"unitFOURWEEK": "四周",
|
|
111
|
+
"unitMONTH": "月",
|
|
112
|
+
"unitBIMONTH": "兩月",
|
|
113
|
+
"unitQUATER": "季度",
|
|
114
|
+
"unitHALFYEAR": "半年",
|
|
115
|
+
"unitGRAM": "克",
|
|
116
|
+
"unitJIN": "斤",
|
|
117
|
+
"unitKILOGRAM": "公斤",
|
|
118
|
+
"view": "查看",
|
|
79
119
|
"warning": "警告",
|
|
80
120
|
"welcome": "{0}, 歡迎光臨!"
|
|
81
121
|
}
|
package/lib/mjs/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './business/BusinessTax';
|
|
|
12
12
|
export * from './business/BusinessUtils';
|
|
13
13
|
export * from './business/EntityStatus';
|
|
14
14
|
export * from './business/ProductUnit';
|
|
15
|
+
export * from './business/RepeatOption';
|
|
15
16
|
export * from './def/ListItem';
|
|
16
17
|
export * from './dto/IdDto';
|
|
17
18
|
export * from './dto/IdLabelDto';
|
package/lib/mjs/index.js
CHANGED
|
@@ -16,6 +16,7 @@ export * from './business/BusinessTax';
|
|
|
16
16
|
export * from './business/BusinessUtils';
|
|
17
17
|
export * from './business/EntityStatus';
|
|
18
18
|
export * from './business/ProductUnit';
|
|
19
|
+
export * from './business/RepeatOption';
|
|
19
20
|
// def
|
|
20
21
|
export * from './def/ListItem';
|
|
21
22
|
// dto
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/appscript",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.27",
|
|
4
4
|
"description": "Applications shared TypeScript framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -54,24 +54,24 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@etsoo/notificationbase": "^1.1.0",
|
|
56
56
|
"@etsoo/restclient": "^1.0.64",
|
|
57
|
-
"@etsoo/shared": "^1.1.
|
|
57
|
+
"@etsoo/shared": "^1.1.6",
|
|
58
58
|
"@types/crypto-js": "^4.1.0",
|
|
59
59
|
"crypto-js": "^4.1.1"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@babel/cli": "^7.16.8",
|
|
63
|
-
"@babel/core": "^7.16.
|
|
64
|
-
"@babel/plugin-transform-runtime": "^7.16.
|
|
65
|
-
"@babel/preset-env": "^7.16.
|
|
63
|
+
"@babel/core": "^7.16.10",
|
|
64
|
+
"@babel/plugin-transform-runtime": "^7.16.10",
|
|
65
|
+
"@babel/preset-env": "^7.16.11",
|
|
66
66
|
"@babel/runtime-corejs3": "^7.16.8",
|
|
67
67
|
"@types/jest": "^27.4.0",
|
|
68
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
69
|
-
"@typescript-eslint/parser": "^5.
|
|
70
|
-
"eslint": "^8.
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
|
69
|
+
"@typescript-eslint/parser": "^5.10.0",
|
|
70
|
+
"eslint": "^8.7.0",
|
|
71
71
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
72
72
|
"eslint-plugin-import": "^2.25.4",
|
|
73
73
|
"jest": "^27.4.7",
|
|
74
|
-
"ts-jest": "^27.1.
|
|
75
|
-
"typescript": "^4.5.
|
|
74
|
+
"ts-jest": "^27.1.3",
|
|
75
|
+
"typescript": "^4.5.5"
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -149,7 +149,7 @@ export class AddressRegion implements IAddressRegion {
|
|
|
149
149
|
AddressContinent.NA,
|
|
150
150
|
'011',
|
|
151
151
|
'1',
|
|
152
|
-
'
|
|
152
|
+
'CAD',
|
|
153
153
|
['en-CA', 'fr-CA']
|
|
154
154
|
);
|
|
155
155
|
|
|
@@ -209,7 +209,7 @@ export class AddressRegion implements IAddressRegion {
|
|
|
209
209
|
AddressContinent.EU,
|
|
210
210
|
'00',
|
|
211
211
|
'353',
|
|
212
|
-
'
|
|
212
|
+
'EUR',
|
|
213
213
|
['en-IE']
|
|
214
214
|
);
|
|
215
215
|
|
package/src/app/CoreApp.ts
CHANGED
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
import { AddressRegion } from '../address/AddressRegion';
|
|
31
31
|
import { AddressUtils } from '../address/AddressUtils';
|
|
32
32
|
import { BusinessUtils } from '../business/BusinessUtils';
|
|
33
|
+
import { ProductUnit } from '../business/ProductUnit';
|
|
33
34
|
import { IdLabelDto } from '../dto/IdLabelDto';
|
|
34
35
|
import { InitCallDto } from '../dto/InitCallDto';
|
|
35
36
|
import { ActionResultError } from '../result/ActionResultError';
|
|
@@ -335,7 +336,7 @@ export interface ICoreApp<
|
|
|
335
336
|
* Get entity status label
|
|
336
337
|
* @param data Input data
|
|
337
338
|
*/
|
|
338
|
-
getEntityStatusLabel<D extends { entityStatus?: number }>(data
|
|
339
|
+
getEntityStatusLabel<D extends { entityStatus?: number }>(data?: D): string;
|
|
339
340
|
|
|
340
341
|
/**
|
|
341
342
|
* Get all regions
|
|
@@ -356,6 +357,13 @@ export interface ICoreApp<
|
|
|
356
357
|
*/
|
|
357
358
|
getTimeZone(): string | undefined;
|
|
358
359
|
|
|
360
|
+
/**
|
|
361
|
+
* Get product unit and repeat option label
|
|
362
|
+
* @param unit Product unit or repeat option
|
|
363
|
+
* @param isJoined Add the join label like 'per Kg' for Kg
|
|
364
|
+
*/
|
|
365
|
+
getUnitLabel(unit?: ProductUnit, isJoined?: boolean): string;
|
|
366
|
+
|
|
359
367
|
/**
|
|
360
368
|
* Hash message, SHA3 or HmacSHA512, 512 as Base64
|
|
361
369
|
* https://cryptojs.gitbook.io/docs/
|
|
@@ -1397,7 +1405,7 @@ export abstract class CoreApp<
|
|
|
1397
1405
|
* Get entity status label
|
|
1398
1406
|
* @param data Input data
|
|
1399
1407
|
*/
|
|
1400
|
-
getEntityStatusLabel<D extends { entityStatus?: number }>(data
|
|
1408
|
+
getEntityStatusLabel<D extends { entityStatus?: number }>(data?: D) {
|
|
1401
1409
|
if (data == null || data.entityStatus == null) return '';
|
|
1402
1410
|
return BusinessUtils.getEntityStatusLabel(
|
|
1403
1411
|
data.entityStatus,
|
|
@@ -1427,6 +1435,16 @@ export abstract class CoreApp<
|
|
|
1427
1435
|
return this.settings.timeZone ?? this.ipData?.timezone;
|
|
1428
1436
|
}
|
|
1429
1437
|
|
|
1438
|
+
/**
|
|
1439
|
+
* Get product unit and repeat option label
|
|
1440
|
+
* @param unit Product unit or repeat option
|
|
1441
|
+
* @param isJoined Add the join label like 'per Kg' for Kg
|
|
1442
|
+
*/
|
|
1443
|
+
getUnitLabel(unit?: ProductUnit, isJoined?: boolean): string {
|
|
1444
|
+
if (unit == null) return '';
|
|
1445
|
+
return BusinessUtils.getUnitLabel(unit, this.labelDelegate, isJoined);
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1430
1448
|
/**
|
|
1431
1449
|
* Hash message, SHA3 or HmacSHA512, 512 as Base64
|
|
1432
1450
|
* https://cryptojs.gitbook.io/docs/
|