@etsoo/appscript 1.2.27 → 1.2.31
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/README.md +4 -1
- package/lib/cjs/business/BusinessUtils.d.ts +3 -12
- package/lib/cjs/business/BusinessUtils.js +3 -18
- package/lib/cjs/i18n/en-US.json +11 -0
- package/lib/cjs/i18n/zh-CN.json +11 -0
- package/lib/cjs/i18n/zh-HK.json +11 -0
- package/lib/mjs/business/BusinessUtils.d.ts +3 -12
- package/lib/mjs/business/BusinessUtils.js +3 -18
- package/lib/mjs/i18n/en-US.json +11 -0
- package/lib/mjs/i18n/zh-CN.json +11 -0
- package/lib/mjs/i18n/zh-HK.json +11 -0
- package/package.json +6 -6
- package/src/business/BusinessUtils.ts +3 -21
- package/src/i18n/en-US.json +11 -0
- package/src/i18n/zh-CN.json +11 -0
- package/src/i18n/zh-HK.json +11 -0
package/README.md
CHANGED
|
@@ -64,9 +64,12 @@ $ yarn add @etsoo/appscript
|
|
|
64
64
|
- BusinessTax - Business tax
|
|
65
65
|
|
|
66
66
|
#### BusinessUtils.ts ####
|
|
67
|
-
-
|
|
67
|
+
- getCurrencies - Get currency collection
|
|
68
|
+
- getEntityStatusLabel - Get entity status's label
|
|
69
|
+
- getEntityStatus - Get entity status collection
|
|
68
70
|
- getUnitLabel - Get product unit's label
|
|
69
71
|
- getUnits - Get all product units
|
|
72
|
+
- getRepeatOptions - Get all repeat options
|
|
70
73
|
|
|
71
74
|
#### ProductUnit.ts ####
|
|
72
75
|
- ProductUnit - Product units enum
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DataTypes } from '@etsoo/shared';
|
|
2
1
|
import { IdLabelDto } from '../dto/IdLabelDto';
|
|
3
2
|
import { ICultureGet } from '../state/Culture';
|
|
4
3
|
import { EntityStatus } from './EntityStatus';
|
|
@@ -7,13 +6,6 @@ import { ProductUnit } from './ProductUnit';
|
|
|
7
6
|
* Business utils
|
|
8
7
|
*/
|
|
9
8
|
export declare namespace BusinessUtils {
|
|
10
|
-
/**
|
|
11
|
-
* Add blank item to id/label data array
|
|
12
|
-
* @param input Input array
|
|
13
|
-
* @param copy Copy or change the current inpu
|
|
14
|
-
* @returns Items with blank item
|
|
15
|
-
*/
|
|
16
|
-
function addIdLabelBlankItem<T extends DataTypes.IdType = number>(input: IdLabelDto<T>[], copy?: boolean): IdLabelDto<T>[];
|
|
17
9
|
/**
|
|
18
10
|
* Get currency collection
|
|
19
11
|
* @param currencyNames Names like CNY, USD
|
|
@@ -22,16 +14,15 @@ export declare namespace BusinessUtils {
|
|
|
22
14
|
*/
|
|
23
15
|
function getCurrencies(currencyNames: string[], func: ICultureGet): IdLabelDto<string>[];
|
|
24
16
|
/**
|
|
25
|
-
* Get
|
|
26
|
-
* Please define the label
|
|
17
|
+
* Get entity status's label
|
|
18
|
+
* Please define the label with key 'statusNormal' for Normal status
|
|
27
19
|
* @param unit Unit
|
|
28
20
|
* @param func Label delegate
|
|
29
21
|
* @returns Label
|
|
30
22
|
*/
|
|
31
23
|
function getEntityStatusLabel(status: EntityStatus, func: ICultureGet): string;
|
|
32
24
|
/**
|
|
33
|
-
* Get
|
|
34
|
-
* Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
|
|
25
|
+
* Get entity status collection
|
|
35
26
|
* @param unit Unit
|
|
36
27
|
* @param func Label delegate
|
|
37
28
|
* @returns Label
|
|
@@ -10,20 +10,6 @@ const ProductUnit_1 = require("./ProductUnit");
|
|
|
10
10
|
*/
|
|
11
11
|
var BusinessUtils;
|
|
12
12
|
(function (BusinessUtils) {
|
|
13
|
-
/**
|
|
14
|
-
* Add blank item to id/label data array
|
|
15
|
-
* @param input Input array
|
|
16
|
-
* @param copy Copy or change the current inpu
|
|
17
|
-
* @returns Items with blank item
|
|
18
|
-
*/
|
|
19
|
-
function addIdLabelBlankItem(input, copy = false) {
|
|
20
|
-
const blankItem = { id: '', label: '---' };
|
|
21
|
-
if (copy)
|
|
22
|
-
return [blankItem, ...input];
|
|
23
|
-
input.unshift(blankItem);
|
|
24
|
-
return input;
|
|
25
|
-
}
|
|
26
|
-
BusinessUtils.addIdLabelBlankItem = addIdLabelBlankItem;
|
|
27
13
|
/**
|
|
28
14
|
* Get currency collection
|
|
29
15
|
* @param currencyNames Names like CNY, USD
|
|
@@ -41,8 +27,8 @@ var BusinessUtils;
|
|
|
41
27
|
}
|
|
42
28
|
BusinessUtils.getCurrencies = getCurrencies;
|
|
43
29
|
/**
|
|
44
|
-
* Get
|
|
45
|
-
* Please define the label
|
|
30
|
+
* Get entity status's label
|
|
31
|
+
* Please define the label with key 'statusNormal' for Normal status
|
|
46
32
|
* @param unit Unit
|
|
47
33
|
* @param func Label delegate
|
|
48
34
|
* @returns Label
|
|
@@ -54,8 +40,7 @@ var BusinessUtils;
|
|
|
54
40
|
}
|
|
55
41
|
BusinessUtils.getEntityStatusLabel = getEntityStatusLabel;
|
|
56
42
|
/**
|
|
57
|
-
* Get
|
|
58
|
-
* Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
|
|
43
|
+
* Get entity status collection
|
|
59
44
|
* @param unit Unit
|
|
60
45
|
* @param func Label delegate
|
|
61
46
|
* @returns Label
|
package/lib/cjs/i18n/en-US.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"accountant": "Accountant",
|
|
2
3
|
"actions": "Actions",
|
|
3
4
|
"add": "Add",
|
|
5
|
+
"audits": "Audits",
|
|
6
|
+
"authorizer": "Authorizer",
|
|
7
|
+
"applicant": "Applicant",
|
|
4
8
|
"approve": "Approve it",
|
|
5
9
|
"back": "Back",
|
|
6
10
|
"cancel": "Cancel",
|
|
@@ -22,6 +26,8 @@
|
|
|
22
26
|
"currencyNZD": "New Zealand Dollar $",
|
|
23
27
|
"currencySGD": "Singapore Dollar $",
|
|
24
28
|
"currencyUSD": "U.S. Dollar $",
|
|
29
|
+
"data": "Data",
|
|
30
|
+
"dataComparison": "Data comparison",
|
|
25
31
|
"delete": "Delete",
|
|
26
32
|
"deleteConfirm": "Are you sure you want to permanently delete this {0}?",
|
|
27
33
|
"description": "Description",
|
|
@@ -33,6 +39,7 @@
|
|
|
33
39
|
"etsoo": "ETSOO",
|
|
34
40
|
"expiry": "Expiry",
|
|
35
41
|
"failed": "Operation failed",
|
|
42
|
+
"field": "Field",
|
|
36
43
|
"id": "Number#",
|
|
37
44
|
"itemExists": "'{0}' already exists",
|
|
38
45
|
"loading": "Loading...",
|
|
@@ -44,11 +51,13 @@
|
|
|
44
51
|
"more": "More",
|
|
45
52
|
"moreTag": "{0} more",
|
|
46
53
|
"name": "Name",
|
|
54
|
+
"newValue": "New value",
|
|
47
55
|
"no": "No",
|
|
48
56
|
"noChanges": "No changes yet",
|
|
49
57
|
"noData": "No valid data",
|
|
50
58
|
"noOptions": "No options",
|
|
51
59
|
"ok": "OK",
|
|
60
|
+
"oldValue": "Old value",
|
|
52
61
|
"open": "Open",
|
|
53
62
|
"openMenu": "Open menu",
|
|
54
63
|
"operationSucceeded": "Operation succeeded",
|
|
@@ -115,6 +124,8 @@
|
|
|
115
124
|
"unitGRAM": "g",
|
|
116
125
|
"unitJIN": "½Kg",
|
|
117
126
|
"unitKILOGRAM": "Kg",
|
|
127
|
+
"update": "Update",
|
|
128
|
+
"user": "User",
|
|
118
129
|
"view": "View",
|
|
119
130
|
"warning": "Warning",
|
|
120
131
|
"welcome": "{0}, welcome!"
|
package/lib/cjs/i18n/zh-CN.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"accountant": "会计",
|
|
2
3
|
"actions": "操作",
|
|
3
4
|
"add": "添加",
|
|
5
|
+
"audits": "稽核历史",
|
|
6
|
+
"authorizer": "授权人",
|
|
7
|
+
"applicant": "申请人",
|
|
4
8
|
"approve": "批准",
|
|
5
9
|
"back": "后退",
|
|
6
10
|
"cancel": "取消",
|
|
@@ -22,6 +26,8 @@
|
|
|
22
26
|
"currencyNZD": "纽币$",
|
|
23
27
|
"currencySGD": "新币$",
|
|
24
28
|
"currencyUSD": "美元$",
|
|
29
|
+
"data": "数据",
|
|
30
|
+
"dataComparison": "数据对比",
|
|
25
31
|
"delete": "删除",
|
|
26
32
|
"deleteConfirm": "确定要永久删除此{0}吗?",
|
|
27
33
|
"description": "描述",
|
|
@@ -33,6 +39,7 @@
|
|
|
33
39
|
"etsoo": "亿速思维",
|
|
34
40
|
"expiry": "到期时间",
|
|
35
41
|
"failed": "操作失败",
|
|
42
|
+
"field": "字段",
|
|
36
43
|
"id": "编号",
|
|
37
44
|
"itemExists": "'{0}'已经存在",
|
|
38
45
|
"loading": "正在加载...",
|
|
@@ -44,11 +51,13 @@
|
|
|
44
51
|
"more": "更多",
|
|
45
52
|
"moreTag": "({0}+)",
|
|
46
53
|
"name": "姓名",
|
|
54
|
+
"newValue": "新值",
|
|
47
55
|
"no": "否",
|
|
48
56
|
"noChanges": "还没有任何修改",
|
|
49
57
|
"noData": "没有有效数据",
|
|
50
58
|
"noOptions": "没有选项",
|
|
51
59
|
"ok": "确定",
|
|
60
|
+
"oldValue": "旧值",
|
|
52
61
|
"open": "打开",
|
|
53
62
|
"openMenu": "打开菜单",
|
|
54
63
|
"operationSucceeded": "操作成功",
|
|
@@ -116,6 +125,8 @@
|
|
|
116
125
|
"unitJIN": "斤",
|
|
117
126
|
"unitKILOGRAM": "公斤",
|
|
118
127
|
"unitTON": "吨",
|
|
128
|
+
"update": "更新",
|
|
129
|
+
"user": "用户",
|
|
119
130
|
"view": "查看",
|
|
120
131
|
"warning": "警告",
|
|
121
132
|
"welcome": "{0}, 欢迎光临!"
|
package/lib/cjs/i18n/zh-HK.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"accountant": "會計",
|
|
2
3
|
"actions": "操作",
|
|
3
4
|
"add": "添加",
|
|
5
|
+
"audits": "稽核歷史",
|
|
6
|
+
"authorizer": "授權人",
|
|
7
|
+
"applicant": "申請人",
|
|
4
8
|
"approve": "批准",
|
|
5
9
|
"back": "後退",
|
|
6
10
|
"cancel": "取消",
|
|
@@ -22,6 +26,8 @@
|
|
|
22
26
|
"currencyNZD": "紐幣$",
|
|
23
27
|
"currencySGD": "新幣$",
|
|
24
28
|
"currencyUSD": "美元$",
|
|
29
|
+
"data": "數據",
|
|
30
|
+
"dataComparison": "數據對比",
|
|
25
31
|
"delete": "刪除",
|
|
26
32
|
"deleteConfirm": "確定要永久刪除此{0}嗎?",
|
|
27
33
|
"description": "描述",
|
|
@@ -33,6 +39,7 @@
|
|
|
33
39
|
"etsoo": "億速思維",
|
|
34
40
|
"expiry": "到期時間",
|
|
35
41
|
"failed": "操作失敗",
|
|
42
|
+
"field": "字段",
|
|
36
43
|
"id": "編號",
|
|
37
44
|
"itemExists": "'{0}'已经存在",
|
|
38
45
|
"loading": "正在加載...",
|
|
@@ -44,11 +51,13 @@
|
|
|
44
51
|
"more": "更多",
|
|
45
52
|
"moreTag": "({0}+)",
|
|
46
53
|
"name": "姓名",
|
|
54
|
+
"newValue": "舊值",
|
|
47
55
|
"no": "否",
|
|
48
56
|
"noChanges": "還沒有任何修改",
|
|
49
57
|
"noData": "沒有有效數據",
|
|
50
58
|
"noOptions": "沒有選項",
|
|
51
59
|
"ok": "確定",
|
|
60
|
+
"oldValue": "舊值",
|
|
52
61
|
"open": "打開",
|
|
53
62
|
"openMenu": "打開菜單",
|
|
54
63
|
"operationSucceeded": "操作成功",
|
|
@@ -115,6 +124,8 @@
|
|
|
115
124
|
"unitGRAM": "克",
|
|
116
125
|
"unitJIN": "斤",
|
|
117
126
|
"unitKILOGRAM": "公斤",
|
|
127
|
+
"update": "更新",
|
|
128
|
+
"user": "用戶",
|
|
118
129
|
"view": "查看",
|
|
119
130
|
"warning": "警告",
|
|
120
131
|
"welcome": "{0}, 歡迎光臨!"
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DataTypes } from '@etsoo/shared';
|
|
2
1
|
import { IdLabelDto } from '../dto/IdLabelDto';
|
|
3
2
|
import { ICultureGet } from '../state/Culture';
|
|
4
3
|
import { EntityStatus } from './EntityStatus';
|
|
@@ -7,13 +6,6 @@ import { ProductUnit } from './ProductUnit';
|
|
|
7
6
|
* Business utils
|
|
8
7
|
*/
|
|
9
8
|
export declare namespace BusinessUtils {
|
|
10
|
-
/**
|
|
11
|
-
* Add blank item to id/label data array
|
|
12
|
-
* @param input Input array
|
|
13
|
-
* @param copy Copy or change the current inpu
|
|
14
|
-
* @returns Items with blank item
|
|
15
|
-
*/
|
|
16
|
-
function addIdLabelBlankItem<T extends DataTypes.IdType = number>(input: IdLabelDto<T>[], copy?: boolean): IdLabelDto<T>[];
|
|
17
9
|
/**
|
|
18
10
|
* Get currency collection
|
|
19
11
|
* @param currencyNames Names like CNY, USD
|
|
@@ -22,16 +14,15 @@ export declare namespace BusinessUtils {
|
|
|
22
14
|
*/
|
|
23
15
|
function getCurrencies(currencyNames: string[], func: ICultureGet): IdLabelDto<string>[];
|
|
24
16
|
/**
|
|
25
|
-
* Get
|
|
26
|
-
* Please define the label
|
|
17
|
+
* Get entity status's label
|
|
18
|
+
* Please define the label with key 'statusNormal' for Normal status
|
|
27
19
|
* @param unit Unit
|
|
28
20
|
* @param func Label delegate
|
|
29
21
|
* @returns Label
|
|
30
22
|
*/
|
|
31
23
|
function getEntityStatusLabel(status: EntityStatus, func: ICultureGet): string;
|
|
32
24
|
/**
|
|
33
|
-
* Get
|
|
34
|
-
* Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
|
|
25
|
+
* Get entity status collection
|
|
35
26
|
* @param unit Unit
|
|
36
27
|
* @param func Label delegate
|
|
37
28
|
* @returns Label
|
|
@@ -7,20 +7,6 @@ import { ProductUnit } from './ProductUnit';
|
|
|
7
7
|
*/
|
|
8
8
|
export var BusinessUtils;
|
|
9
9
|
(function (BusinessUtils) {
|
|
10
|
-
/**
|
|
11
|
-
* Add blank item to id/label data array
|
|
12
|
-
* @param input Input array
|
|
13
|
-
* @param copy Copy or change the current inpu
|
|
14
|
-
* @returns Items with blank item
|
|
15
|
-
*/
|
|
16
|
-
function addIdLabelBlankItem(input, copy = false) {
|
|
17
|
-
const blankItem = { id: '', label: '---' };
|
|
18
|
-
if (copy)
|
|
19
|
-
return [blankItem, ...input];
|
|
20
|
-
input.unshift(blankItem);
|
|
21
|
-
return input;
|
|
22
|
-
}
|
|
23
|
-
BusinessUtils.addIdLabelBlankItem = addIdLabelBlankItem;
|
|
24
10
|
/**
|
|
25
11
|
* Get currency collection
|
|
26
12
|
* @param currencyNames Names like CNY, USD
|
|
@@ -38,8 +24,8 @@ export var BusinessUtils;
|
|
|
38
24
|
}
|
|
39
25
|
BusinessUtils.getCurrencies = getCurrencies;
|
|
40
26
|
/**
|
|
41
|
-
* Get
|
|
42
|
-
* Please define the label
|
|
27
|
+
* Get entity status's label
|
|
28
|
+
* Please define the label with key 'statusNormal' for Normal status
|
|
43
29
|
* @param unit Unit
|
|
44
30
|
* @param func Label delegate
|
|
45
31
|
* @returns Label
|
|
@@ -51,8 +37,7 @@ export var BusinessUtils;
|
|
|
51
37
|
}
|
|
52
38
|
BusinessUtils.getEntityStatusLabel = getEntityStatusLabel;
|
|
53
39
|
/**
|
|
54
|
-
* Get
|
|
55
|
-
* Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
|
|
40
|
+
* Get entity status collection
|
|
56
41
|
* @param unit Unit
|
|
57
42
|
* @param func Label delegate
|
|
58
43
|
* @returns Label
|
package/lib/mjs/i18n/en-US.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"accountant": "Accountant",
|
|
2
3
|
"actions": "Actions",
|
|
3
4
|
"add": "Add",
|
|
5
|
+
"audits": "Audits",
|
|
6
|
+
"authorizer": "Authorizer",
|
|
7
|
+
"applicant": "Applicant",
|
|
4
8
|
"approve": "Approve it",
|
|
5
9
|
"back": "Back",
|
|
6
10
|
"cancel": "Cancel",
|
|
@@ -22,6 +26,8 @@
|
|
|
22
26
|
"currencyNZD": "New Zealand Dollar $",
|
|
23
27
|
"currencySGD": "Singapore Dollar $",
|
|
24
28
|
"currencyUSD": "U.S. Dollar $",
|
|
29
|
+
"data": "Data",
|
|
30
|
+
"dataComparison": "Data comparison",
|
|
25
31
|
"delete": "Delete",
|
|
26
32
|
"deleteConfirm": "Are you sure you want to permanently delete this {0}?",
|
|
27
33
|
"description": "Description",
|
|
@@ -33,6 +39,7 @@
|
|
|
33
39
|
"etsoo": "ETSOO",
|
|
34
40
|
"expiry": "Expiry",
|
|
35
41
|
"failed": "Operation failed",
|
|
42
|
+
"field": "Field",
|
|
36
43
|
"id": "Number#",
|
|
37
44
|
"itemExists": "'{0}' already exists",
|
|
38
45
|
"loading": "Loading...",
|
|
@@ -44,11 +51,13 @@
|
|
|
44
51
|
"more": "More",
|
|
45
52
|
"moreTag": "{0} more",
|
|
46
53
|
"name": "Name",
|
|
54
|
+
"newValue": "New value",
|
|
47
55
|
"no": "No",
|
|
48
56
|
"noChanges": "No changes yet",
|
|
49
57
|
"noData": "No valid data",
|
|
50
58
|
"noOptions": "No options",
|
|
51
59
|
"ok": "OK",
|
|
60
|
+
"oldValue": "Old value",
|
|
52
61
|
"open": "Open",
|
|
53
62
|
"openMenu": "Open menu",
|
|
54
63
|
"operationSucceeded": "Operation succeeded",
|
|
@@ -115,6 +124,8 @@
|
|
|
115
124
|
"unitGRAM": "g",
|
|
116
125
|
"unitJIN": "½Kg",
|
|
117
126
|
"unitKILOGRAM": "Kg",
|
|
127
|
+
"update": "Update",
|
|
128
|
+
"user": "User",
|
|
118
129
|
"view": "View",
|
|
119
130
|
"warning": "Warning",
|
|
120
131
|
"welcome": "{0}, welcome!"
|
package/lib/mjs/i18n/zh-CN.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"accountant": "会计",
|
|
2
3
|
"actions": "操作",
|
|
3
4
|
"add": "添加",
|
|
5
|
+
"audits": "稽核历史",
|
|
6
|
+
"authorizer": "授权人",
|
|
7
|
+
"applicant": "申请人",
|
|
4
8
|
"approve": "批准",
|
|
5
9
|
"back": "后退",
|
|
6
10
|
"cancel": "取消",
|
|
@@ -22,6 +26,8 @@
|
|
|
22
26
|
"currencyNZD": "纽币$",
|
|
23
27
|
"currencySGD": "新币$",
|
|
24
28
|
"currencyUSD": "美元$",
|
|
29
|
+
"data": "数据",
|
|
30
|
+
"dataComparison": "数据对比",
|
|
25
31
|
"delete": "删除",
|
|
26
32
|
"deleteConfirm": "确定要永久删除此{0}吗?",
|
|
27
33
|
"description": "描述",
|
|
@@ -33,6 +39,7 @@
|
|
|
33
39
|
"etsoo": "亿速思维",
|
|
34
40
|
"expiry": "到期时间",
|
|
35
41
|
"failed": "操作失败",
|
|
42
|
+
"field": "字段",
|
|
36
43
|
"id": "编号",
|
|
37
44
|
"itemExists": "'{0}'已经存在",
|
|
38
45
|
"loading": "正在加载...",
|
|
@@ -44,11 +51,13 @@
|
|
|
44
51
|
"more": "更多",
|
|
45
52
|
"moreTag": "({0}+)",
|
|
46
53
|
"name": "姓名",
|
|
54
|
+
"newValue": "新值",
|
|
47
55
|
"no": "否",
|
|
48
56
|
"noChanges": "还没有任何修改",
|
|
49
57
|
"noData": "没有有效数据",
|
|
50
58
|
"noOptions": "没有选项",
|
|
51
59
|
"ok": "确定",
|
|
60
|
+
"oldValue": "旧值",
|
|
52
61
|
"open": "打开",
|
|
53
62
|
"openMenu": "打开菜单",
|
|
54
63
|
"operationSucceeded": "操作成功",
|
|
@@ -116,6 +125,8 @@
|
|
|
116
125
|
"unitJIN": "斤",
|
|
117
126
|
"unitKILOGRAM": "公斤",
|
|
118
127
|
"unitTON": "吨",
|
|
128
|
+
"update": "更新",
|
|
129
|
+
"user": "用户",
|
|
119
130
|
"view": "查看",
|
|
120
131
|
"warning": "警告",
|
|
121
132
|
"welcome": "{0}, 欢迎光临!"
|
package/lib/mjs/i18n/zh-HK.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"accountant": "會計",
|
|
2
3
|
"actions": "操作",
|
|
3
4
|
"add": "添加",
|
|
5
|
+
"audits": "稽核歷史",
|
|
6
|
+
"authorizer": "授權人",
|
|
7
|
+
"applicant": "申請人",
|
|
4
8
|
"approve": "批准",
|
|
5
9
|
"back": "後退",
|
|
6
10
|
"cancel": "取消",
|
|
@@ -22,6 +26,8 @@
|
|
|
22
26
|
"currencyNZD": "紐幣$",
|
|
23
27
|
"currencySGD": "新幣$",
|
|
24
28
|
"currencyUSD": "美元$",
|
|
29
|
+
"data": "數據",
|
|
30
|
+
"dataComparison": "數據對比",
|
|
25
31
|
"delete": "刪除",
|
|
26
32
|
"deleteConfirm": "確定要永久刪除此{0}嗎?",
|
|
27
33
|
"description": "描述",
|
|
@@ -33,6 +39,7 @@
|
|
|
33
39
|
"etsoo": "億速思維",
|
|
34
40
|
"expiry": "到期時間",
|
|
35
41
|
"failed": "操作失敗",
|
|
42
|
+
"field": "字段",
|
|
36
43
|
"id": "編號",
|
|
37
44
|
"itemExists": "'{0}'已经存在",
|
|
38
45
|
"loading": "正在加載...",
|
|
@@ -44,11 +51,13 @@
|
|
|
44
51
|
"more": "更多",
|
|
45
52
|
"moreTag": "({0}+)",
|
|
46
53
|
"name": "姓名",
|
|
54
|
+
"newValue": "舊值",
|
|
47
55
|
"no": "否",
|
|
48
56
|
"noChanges": "還沒有任何修改",
|
|
49
57
|
"noData": "沒有有效數據",
|
|
50
58
|
"noOptions": "沒有選項",
|
|
51
59
|
"ok": "確定",
|
|
60
|
+
"oldValue": "舊值",
|
|
52
61
|
"open": "打開",
|
|
53
62
|
"openMenu": "打開菜單",
|
|
54
63
|
"operationSucceeded": "操作成功",
|
|
@@ -115,6 +124,8 @@
|
|
|
115
124
|
"unitGRAM": "克",
|
|
116
125
|
"unitJIN": "斤",
|
|
117
126
|
"unitKILOGRAM": "公斤",
|
|
127
|
+
"update": "更新",
|
|
128
|
+
"user": "用戶",
|
|
118
129
|
"view": "查看",
|
|
119
130
|
"warning": "警告",
|
|
120
131
|
"welcome": "{0}, 歡迎光臨!"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/appscript",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.31",
|
|
4
4
|
"description": "Applications shared TypeScript framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -54,20 +54,20 @@
|
|
|
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.9",
|
|
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.
|
|
63
|
+
"@babel/core": "^7.16.12",
|
|
64
64
|
"@babel/plugin-transform-runtime": "^7.16.10",
|
|
65
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.10.
|
|
69
|
-
"@typescript-eslint/parser": "^5.10.
|
|
70
|
-
"eslint": "^8.
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^5.10.1",
|
|
69
|
+
"@typescript-eslint/parser": "^5.10.1",
|
|
70
|
+
"eslint": "^8.8.0",
|
|
71
71
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
72
72
|
"eslint-plugin-import": "^2.25.4",
|
|
73
73
|
"jest": "^27.4.7",
|
|
@@ -9,23 +9,6 @@ import { ProductUnit } from './ProductUnit';
|
|
|
9
9
|
* Business utils
|
|
10
10
|
*/
|
|
11
11
|
export namespace BusinessUtils {
|
|
12
|
-
/**
|
|
13
|
-
* Add blank item to id/label data array
|
|
14
|
-
* @param input Input array
|
|
15
|
-
* @param copy Copy or change the current inpu
|
|
16
|
-
* @returns Items with blank item
|
|
17
|
-
*/
|
|
18
|
-
export function addIdLabelBlankItem<T extends DataTypes.IdType = number>(
|
|
19
|
-
input: IdLabelDto<T>[],
|
|
20
|
-
copy: boolean = false
|
|
21
|
-
) {
|
|
22
|
-
const blankItem: IdLabelDto<T> = { id: '' as any, label: '---' };
|
|
23
|
-
if (copy) return [blankItem, ...input];
|
|
24
|
-
|
|
25
|
-
input.unshift(blankItem);
|
|
26
|
-
return input;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
12
|
/**
|
|
30
13
|
* Get currency collection
|
|
31
14
|
* @param currencyNames Names like CNY, USD
|
|
@@ -43,8 +26,8 @@ export namespace BusinessUtils {
|
|
|
43
26
|
}
|
|
44
27
|
|
|
45
28
|
/**
|
|
46
|
-
* Get
|
|
47
|
-
* Please define the label
|
|
29
|
+
* Get entity status's label
|
|
30
|
+
* Please define the label with key 'statusNormal' for Normal status
|
|
48
31
|
* @param unit Unit
|
|
49
32
|
* @param func Label delegate
|
|
50
33
|
* @returns Label
|
|
@@ -58,8 +41,7 @@ export namespace BusinessUtils {
|
|
|
58
41
|
}
|
|
59
42
|
|
|
60
43
|
/**
|
|
61
|
-
* Get
|
|
62
|
-
* Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
|
|
44
|
+
* Get entity status collection
|
|
63
45
|
* @param unit Unit
|
|
64
46
|
* @param func Label delegate
|
|
65
47
|
* @returns Label
|
package/src/i18n/en-US.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"accountant": "Accountant",
|
|
2
3
|
"actions": "Actions",
|
|
3
4
|
"add": "Add",
|
|
5
|
+
"audits": "Audits",
|
|
6
|
+
"authorizer": "Authorizer",
|
|
7
|
+
"applicant": "Applicant",
|
|
4
8
|
"approve": "Approve it",
|
|
5
9
|
"back": "Back",
|
|
6
10
|
"cancel": "Cancel",
|
|
@@ -22,6 +26,8 @@
|
|
|
22
26
|
"currencyNZD": "New Zealand Dollar $",
|
|
23
27
|
"currencySGD": "Singapore Dollar $",
|
|
24
28
|
"currencyUSD": "U.S. Dollar $",
|
|
29
|
+
"data": "Data",
|
|
30
|
+
"dataComparison": "Data comparison",
|
|
25
31
|
"delete": "Delete",
|
|
26
32
|
"deleteConfirm": "Are you sure you want to permanently delete this {0}?",
|
|
27
33
|
"description": "Description",
|
|
@@ -33,6 +39,7 @@
|
|
|
33
39
|
"etsoo": "ETSOO",
|
|
34
40
|
"expiry": "Expiry",
|
|
35
41
|
"failed": "Operation failed",
|
|
42
|
+
"field": "Field",
|
|
36
43
|
"id": "Number#",
|
|
37
44
|
"itemExists": "'{0}' already exists",
|
|
38
45
|
"loading": "Loading...",
|
|
@@ -44,11 +51,13 @@
|
|
|
44
51
|
"more": "More",
|
|
45
52
|
"moreTag": "{0} more",
|
|
46
53
|
"name": "Name",
|
|
54
|
+
"newValue": "New value",
|
|
47
55
|
"no": "No",
|
|
48
56
|
"noChanges": "No changes yet",
|
|
49
57
|
"noData": "No valid data",
|
|
50
58
|
"noOptions": "No options",
|
|
51
59
|
"ok": "OK",
|
|
60
|
+
"oldValue": "Old value",
|
|
52
61
|
"open": "Open",
|
|
53
62
|
"openMenu": "Open menu",
|
|
54
63
|
"operationSucceeded": "Operation succeeded",
|
|
@@ -115,6 +124,8 @@
|
|
|
115
124
|
"unitGRAM": "g",
|
|
116
125
|
"unitJIN": "½Kg",
|
|
117
126
|
"unitKILOGRAM": "Kg",
|
|
127
|
+
"update": "Update",
|
|
128
|
+
"user": "User",
|
|
118
129
|
"view": "View",
|
|
119
130
|
"warning": "Warning",
|
|
120
131
|
"welcome": "{0}, welcome!"
|
package/src/i18n/zh-CN.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"accountant": "会计",
|
|
2
3
|
"actions": "操作",
|
|
3
4
|
"add": "添加",
|
|
5
|
+
"audits": "稽核历史",
|
|
6
|
+
"authorizer": "授权人",
|
|
7
|
+
"applicant": "申请人",
|
|
4
8
|
"approve": "批准",
|
|
5
9
|
"back": "后退",
|
|
6
10
|
"cancel": "取消",
|
|
@@ -22,6 +26,8 @@
|
|
|
22
26
|
"currencyNZD": "纽币$",
|
|
23
27
|
"currencySGD": "新币$",
|
|
24
28
|
"currencyUSD": "美元$",
|
|
29
|
+
"data": "数据",
|
|
30
|
+
"dataComparison": "数据对比",
|
|
25
31
|
"delete": "删除",
|
|
26
32
|
"deleteConfirm": "确定要永久删除此{0}吗?",
|
|
27
33
|
"description": "描述",
|
|
@@ -33,6 +39,7 @@
|
|
|
33
39
|
"etsoo": "亿速思维",
|
|
34
40
|
"expiry": "到期时间",
|
|
35
41
|
"failed": "操作失败",
|
|
42
|
+
"field": "字段",
|
|
36
43
|
"id": "编号",
|
|
37
44
|
"itemExists": "'{0}'已经存在",
|
|
38
45
|
"loading": "正在加载...",
|
|
@@ -44,11 +51,13 @@
|
|
|
44
51
|
"more": "更多",
|
|
45
52
|
"moreTag": "({0}+)",
|
|
46
53
|
"name": "姓名",
|
|
54
|
+
"newValue": "新值",
|
|
47
55
|
"no": "否",
|
|
48
56
|
"noChanges": "还没有任何修改",
|
|
49
57
|
"noData": "没有有效数据",
|
|
50
58
|
"noOptions": "没有选项",
|
|
51
59
|
"ok": "确定",
|
|
60
|
+
"oldValue": "旧值",
|
|
52
61
|
"open": "打开",
|
|
53
62
|
"openMenu": "打开菜单",
|
|
54
63
|
"operationSucceeded": "操作成功",
|
|
@@ -116,6 +125,8 @@
|
|
|
116
125
|
"unitJIN": "斤",
|
|
117
126
|
"unitKILOGRAM": "公斤",
|
|
118
127
|
"unitTON": "吨",
|
|
128
|
+
"update": "更新",
|
|
129
|
+
"user": "用户",
|
|
119
130
|
"view": "查看",
|
|
120
131
|
"warning": "警告",
|
|
121
132
|
"welcome": "{0}, 欢迎光临!"
|
package/src/i18n/zh-HK.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"accountant": "會計",
|
|
2
3
|
"actions": "操作",
|
|
3
4
|
"add": "添加",
|
|
5
|
+
"audits": "稽核歷史",
|
|
6
|
+
"authorizer": "授權人",
|
|
7
|
+
"applicant": "申請人",
|
|
4
8
|
"approve": "批准",
|
|
5
9
|
"back": "後退",
|
|
6
10
|
"cancel": "取消",
|
|
@@ -22,6 +26,8 @@
|
|
|
22
26
|
"currencyNZD": "紐幣$",
|
|
23
27
|
"currencySGD": "新幣$",
|
|
24
28
|
"currencyUSD": "美元$",
|
|
29
|
+
"data": "數據",
|
|
30
|
+
"dataComparison": "數據對比",
|
|
25
31
|
"delete": "刪除",
|
|
26
32
|
"deleteConfirm": "確定要永久刪除此{0}嗎?",
|
|
27
33
|
"description": "描述",
|
|
@@ -33,6 +39,7 @@
|
|
|
33
39
|
"etsoo": "億速思維",
|
|
34
40
|
"expiry": "到期時間",
|
|
35
41
|
"failed": "操作失敗",
|
|
42
|
+
"field": "字段",
|
|
36
43
|
"id": "編號",
|
|
37
44
|
"itemExists": "'{0}'已经存在",
|
|
38
45
|
"loading": "正在加載...",
|
|
@@ -44,11 +51,13 @@
|
|
|
44
51
|
"more": "更多",
|
|
45
52
|
"moreTag": "({0}+)",
|
|
46
53
|
"name": "姓名",
|
|
54
|
+
"newValue": "舊值",
|
|
47
55
|
"no": "否",
|
|
48
56
|
"noChanges": "還沒有任何修改",
|
|
49
57
|
"noData": "沒有有效數據",
|
|
50
58
|
"noOptions": "沒有選項",
|
|
51
59
|
"ok": "確定",
|
|
60
|
+
"oldValue": "舊值",
|
|
52
61
|
"open": "打開",
|
|
53
62
|
"openMenu": "打開菜單",
|
|
54
63
|
"operationSucceeded": "操作成功",
|
|
@@ -115,6 +124,8 @@
|
|
|
115
124
|
"unitGRAM": "克",
|
|
116
125
|
"unitJIN": "斤",
|
|
117
126
|
"unitKILOGRAM": "公斤",
|
|
127
|
+
"update": "更新",
|
|
128
|
+
"user": "用戶",
|
|
118
129
|
"view": "查看",
|
|
119
130
|
"warning": "警告",
|
|
120
131
|
"welcome": "{0}, 歡迎光臨!"
|