@etsoo/appscript 1.2.22 → 1.2.26

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 (41) hide show
  1. package/__tests__/app/CoreApp.ts +15 -0
  2. package/lib/cjs/app/CoreApp.d.ts +15 -2
  3. package/lib/cjs/app/CoreApp.js +10 -0
  4. package/lib/cjs/business/BusinessUtils.d.ts +21 -2
  5. package/lib/cjs/business/BusinessUtils.js +32 -6
  6. package/lib/cjs/business/EntityStatus.d.ts +12 -0
  7. package/lib/cjs/business/EntityStatus.js +12 -0
  8. package/lib/cjs/business/ProductUnit.d.ts +47 -45
  9. package/lib/cjs/business/ProductUnit.js +36 -48
  10. package/lib/cjs/business/RepeatOption.d.ts +56 -0
  11. package/lib/cjs/business/RepeatOption.js +60 -0
  12. package/lib/cjs/i18n/en-US.json +22 -0
  13. package/lib/cjs/i18n/zh-CN.json +23 -0
  14. package/lib/cjs/i18n/zh-HK.json +22 -0
  15. package/lib/cjs/index.d.ts +1 -0
  16. package/lib/cjs/index.js +1 -0
  17. package/lib/mjs/app/CoreApp.d.ts +15 -2
  18. package/lib/mjs/app/CoreApp.js +10 -0
  19. package/lib/mjs/business/BusinessUtils.d.ts +21 -2
  20. package/lib/mjs/business/BusinessUtils.js +32 -6
  21. package/lib/mjs/business/EntityStatus.d.ts +12 -0
  22. package/lib/mjs/business/EntityStatus.js +12 -0
  23. package/lib/mjs/business/ProductUnit.d.ts +47 -45
  24. package/lib/mjs/business/ProductUnit.js +35 -47
  25. package/lib/mjs/business/RepeatOption.d.ts +56 -0
  26. package/lib/mjs/business/RepeatOption.js +57 -0
  27. package/lib/mjs/i18n/en-US.json +22 -0
  28. package/lib/mjs/i18n/zh-CN.json +23 -0
  29. package/lib/mjs/i18n/zh-HK.json +22 -0
  30. package/lib/mjs/index.d.ts +1 -0
  31. package/lib/mjs/index.js +1 -0
  32. package/package.json +6 -6
  33. package/src/app/CoreApp.ts +20 -2
  34. package/src/business/BusinessUtils.ts +66 -7
  35. package/src/business/EntityStatus.ts +15 -0
  36. package/src/business/ProductUnit.ts +35 -51
  37. package/src/business/RepeatOption.ts +65 -0
  38. package/src/i18n/en-US.json +22 -0
  39. package/src/i18n/zh-CN.json +23 -0
  40. package/src/i18n/zh-HK.json +22 -0
  41. package/src/index.ts +1 -0
@@ -12,6 +12,7 @@
12
12
  "creation": "登记时间",
13
13
  "currency": "币种",
14
14
  "delete": "删除",
15
+ "deleteConfirm": "确定要永久删除此{0}吗?",
15
16
  "description": "描述",
16
17
  "done": "完成",
17
18
  "edit": "修改",
@@ -43,6 +44,7 @@
43
44
  "pageNotFound": "找不到页面",
44
45
  "prompt": "输入",
45
46
  "pullToRefresh": "下拉刷新",
47
+ "record": "记录",
46
48
  "refresh": "刷新",
47
49
  "refreshing": "正在刷新",
48
50
  "releaseToRefresh": "释放刷新",
@@ -63,8 +65,12 @@
63
65
  "showIt": "显示",
64
66
  "signout": "退出",
65
67
  "smartERP": "司友云ERP",
68
+ "sortTip": "拖拽项目进行排序",
66
69
  "status": "状态",
70
+ "statusApproved": "已批准",
67
71
  "statusArchived": "已归档",
72
+ "statusAudited": "已审核",
73
+ "statusCompleted": "已完成",
68
74
  "statusDeleted": "已删除",
69
75
  "statusFlaged": "已标记",
70
76
  "statusNormal": "正常",
@@ -75,6 +81,23 @@
75
81
  "tokenExpiry": "您的会话即将过期。点击 取消 按钮继续使用",
76
82
  "yes": "是",
77
83
  "unknownError": "未知错误",
84
+ "unitJoin": "每{0}",
85
+ "unitPC": "件",
86
+ "unitSET": "套",
87
+ "unitHOUR": "小时",
88
+ "unitDAY": "天",
89
+ "unitYEAR": "年",
90
+ "unitWEEK": "周",
91
+ "unitFORTNIGHT": "两周",
92
+ "unitFOURWEEK": "四周",
93
+ "unitMONTH": "月",
94
+ "unitBIMONTH": "两月",
95
+ "unitQUATER": "季度",
96
+ "unitHALFYEAR": "半年",
97
+ "unitGRAM": "克",
98
+ "unitJIN": "斤",
99
+ "unitKILOGRAM": "公斤",
100
+ "unitTON": "吨",
78
101
  "warning": "警告",
79
102
  "welcome": "{0}, 欢迎光临!"
80
103
  }
@@ -12,6 +12,7 @@
12
12
  "creation": "登記時間",
13
13
  "currency": "幣種",
14
14
  "delete": "刪除",
15
+ "deleteConfirm": "確定要永久刪除此{0}嗎?",
15
16
  "description": "描述",
16
17
  "done": "完成",
17
18
  "edit": "修改",
@@ -43,6 +44,7 @@
43
44
  "pageNotFound": "找不到頁面",
44
45
  "prompt": "輸入",
45
46
  "pullToRefresh": "下拉刷新",
47
+ "record": "記錄",
46
48
  "refresh": "刷新",
47
49
  "refreshing": "正在刷新",
48
50
  "releaseToRefresh": "釋放刷新",
@@ -63,8 +65,12 @@
63
65
  "showIt": "顯示",
64
66
  "signout": "退出",
65
67
  "smartERP": "司友雲ERP",
68
+ "sortTip": "拖拽項目進行排序",
66
69
  "status": "狀態",
70
+ "statusApproved": "已批准",
67
71
  "statusArchived": "已歸檔",
72
+ "statusAudited": "已審核",
73
+ "statusCompleted": "已完成",
68
74
  "statusDeleted": "已刪除",
69
75
  "statusFlaged": "已標記",
70
76
  "statusNormal": "正常",
@@ -75,6 +81,22 @@
75
81
  "tokenExpiry": "您的會話即將過期。點擊 取消 按鈕繼續使用",
76
82
  "yes": "是",
77
83
  "unknownError": "未知錯誤",
84
+ "unitJoin": "每{0}",
85
+ "unitPC": "件",
86
+ "unitSET": "套",
87
+ "unitHOUR": "小時",
88
+ "unitDAY": "天",
89
+ "unitYEAR": "年",
90
+ "unitWEEK": "週",
91
+ "unitFORTNIGHT": "兩週",
92
+ "unitFOURWEEK": "四周",
93
+ "unitMONTH": "月",
94
+ "unitBIMONTH": "兩月",
95
+ "unitQUATER": "季度",
96
+ "unitHALFYEAR": "半年",
97
+ "unitGRAM": "克",
98
+ "unitJIN": "斤",
99
+ "unitKILOGRAM": "公斤",
78
100
  "warning": "警告",
79
101
  "welcome": "{0}, 歡迎光臨!"
80
102
  }
@@ -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/cjs/index.js CHANGED
@@ -29,6 +29,7 @@ __exportStar(require("./business/BusinessTax"), exports);
29
29
  __exportStar(require("./business/BusinessUtils"), exports);
30
30
  __exportStar(require("./business/EntityStatus"), exports);
31
31
  __exportStar(require("./business/ProductUnit"), exports);
32
+ __exportStar(require("./business/RepeatOption"), exports);
32
33
  // def
33
34
  __exportStar(require("./def/ListItem"), exports);
34
35
  // dto
@@ -2,6 +2,7 @@ import { INotifier, NotificationAlign, NotificationCallProps, NotificationConten
2
2
  import { ApiDataError, IApi, IPData } from '@etsoo/restclient';
3
3
  import { DataTypes, DateUtils, IStorage } from '@etsoo/shared';
4
4
  import { AddressRegion } from '../address/AddressRegion';
5
+ import { ProductUnit } from '../business/ProductUnit';
5
6
  import { IdLabelDto } from '../dto/IdLabelDto';
6
7
  import { InitCallDto } from '../dto/InitCallDto';
7
8
  import { IActionResult } from '../result/IActionResult';
@@ -238,7 +239,7 @@ export interface ICoreApp<S extends IAppSettings, N, C extends NotificationCallP
238
239
  */
239
240
  getEntityStatusLabel<D extends {
240
241
  entityStatus?: number;
241
- }>(data: D): string;
242
+ }>(data?: D): string;
242
243
  /**
243
244
  * Get all regions
244
245
  * @returns Regions
@@ -255,6 +256,12 @@ export interface ICoreApp<S extends IAppSettings, N, C extends NotificationCallP
255
256
  * @returns Time zone
256
257
  */
257
258
  getTimeZone(): string | undefined;
259
+ /**
260
+ * Get product unit and repeat option label
261
+ * @param unit Product unit or repeat option
262
+ * @param isJoined Add the join label like 'per Kg' for Kg
263
+ */
264
+ getUnitLabel(unit?: ProductUnit, isJoined?: boolean): string;
258
265
  /**
259
266
  * Hash message, SHA3 or HmacSHA512, 512 as Base64
260
267
  * https://cryptojs.gitbook.io/docs/
@@ -634,7 +641,7 @@ export declare abstract class CoreApp<S extends IAppSettings, N, C extends Notif
634
641
  */
635
642
  getEntityStatusLabel<D extends {
636
643
  entityStatus?: number;
637
- }>(data: D): string;
644
+ }>(data?: D): string;
638
645
  /**
639
646
  * Get refresh token from response headers
640
647
  * @param rawResponse Raw response from API call
@@ -646,6 +653,12 @@ export declare abstract class CoreApp<S extends IAppSettings, N, C extends Notif
646
653
  * @returns Time zone
647
654
  */
648
655
  getTimeZone(): string | undefined;
656
+ /**
657
+ * Get product unit and repeat option label
658
+ * @param unit Product unit or repeat option
659
+ * @param isJoined Add the join label like 'per Kg' for Kg
660
+ */
661
+ getUnitLabel(unit?: ProductUnit, isJoined?: boolean): string;
649
662
  /**
650
663
  * Hash message, SHA3 or HmacSHA512, 512 as Base64
651
664
  * https://cryptojs.gitbook.io/docs/
@@ -740,6 +740,16 @@ export class CoreApp {
740
740
  // settings.timeZone = Utils.getTimeZone()
741
741
  return (_a = this.settings.timeZone) !== null && _a !== void 0 ? _a : (_b = this.ipData) === null || _b === void 0 ? void 0 : _b.timezone;
742
742
  }
743
+ /**
744
+ * Get product unit and repeat option label
745
+ * @param unit Product unit or repeat option
746
+ * @param isJoined Add the join label like 'per Kg' for Kg
747
+ */
748
+ getUnitLabel(unit, isJoined) {
749
+ if (unit == null)
750
+ return '';
751
+ return BusinessUtils.getUnitLabel(unit, this.labelDelegate, isJoined);
752
+ }
743
753
  /**
744
754
  * Hash message, SHA3 or HmacSHA512, 512 as Base64
745
755
  * https://cryptojs.gitbook.io/docs/
@@ -16,7 +16,7 @@ export declare namespace BusinessUtils {
16
16
  function addIdLabelBlankItem<T extends DataTypes.IdType = number>(input: IdLabelDto<T>[], copy?: boolean): IdLabelDto<T>[];
17
17
  /**
18
18
  * Get product unit's label
19
- * Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
19
+ * Please define the label in culture with key 'statusNormal' for Normal status
20
20
  * @param unit Unit
21
21
  * @param func Label delegate
22
22
  * @returns Label
@@ -38,13 +38,32 @@ export declare namespace BusinessUtils {
38
38
  * Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
39
39
  * @param unit Unit
40
40
  * @param func Label delegate
41
+ * @param isJoined Add the join label like 'per Kg' for Kg
41
42
  * @returns Label
42
43
  */
43
- function getUnitLabel(unit: ProductUnit, func: ICultureGet): string;
44
+ function getUnitLabel(unit: ProductUnit, func: ICultureGet, isJoined?: boolean): string;
44
45
  /**
45
46
  * Get all product units
46
47
  * @param func Label delegate
47
48
  * @returns Units
48
49
  */
49
50
  function getUnits(func: ICultureGet): IdLabelDto[];
51
+ /**
52
+ *
53
+ * Get all product units
54
+ * @param func Label delegate
55
+ * @param options Define the order and limit the items
56
+ * @param isJoined Add the join label like 'per Kg' for Kg
57
+ * @returns Units
58
+ */
59
+ function getUnits(func: ICultureGet, options?: string[], isJoined?: boolean): IdLabelDto[];
60
+ /**
61
+ *
62
+ * Get all repeat options
63
+ * @param func Label delegate
64
+ * @param options Define the order and limit the items
65
+ * @param isJoined Add the join label like 'per Kg' for Kg
66
+ * @returns Units
67
+ */
68
+ function getRepeatOptions(func: ICultureGet, options?: string[], isJoined?: boolean): IdLabelDto[];
50
69
  }
@@ -1,4 +1,5 @@
1
1
  import { DataTypes } from '@etsoo/shared';
2
+ import { RepeatOption } from '..';
2
3
  import { EntityStatus } from './EntityStatus';
3
4
  import { ProductUnit } from './ProductUnit';
4
5
  /**
@@ -22,7 +23,7 @@ export var BusinessUtils;
22
23
  BusinessUtils.addIdLabelBlankItem = addIdLabelBlankItem;
23
24
  /**
24
25
  * Get product unit's label
25
- * Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
26
+ * Please define the label in culture with key 'statusNormal' for Normal status
26
27
  * @param unit Unit
27
28
  * @param func Label delegate
28
29
  * @returns Label
@@ -55,27 +56,52 @@ export var BusinessUtils;
55
56
  * Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
56
57
  * @param unit Unit
57
58
  * @param func Label delegate
59
+ * @param isJoined Add the join label like 'per Kg' for Kg
58
60
  * @returns Label
59
61
  */
60
- function getUnitLabel(unit, func) {
62
+ function getUnitLabel(unit, func, isJoined) {
61
63
  var _a;
62
64
  const key = ProductUnit[unit];
63
- return (_a = func('unit' + key)) !== null && _a !== void 0 ? _a : key;
65
+ const label = (_a = func('unit' + key)) !== null && _a !== void 0 ? _a : key;
66
+ if (isJoined) {
67
+ const jLabel = func('unitJoin');
68
+ if (jLabel)
69
+ return jLabel.format(label);
70
+ }
71
+ return label;
64
72
  }
65
73
  BusinessUtils.getUnitLabel = getUnitLabel;
66
74
  /**
75
+ *
67
76
  * Get all product units
68
77
  * @param func Label delegate
78
+ * @param options Define the order and limit the items
79
+ * @param isJoined Add the join label like 'per Kg' for Kg
69
80
  * @returns Units
70
81
  */
71
- function getUnits(func) {
72
- return DataTypes.getEnumKeys(ProductUnit).map((key) => {
82
+ function getUnits(func, options, isJoined) {
83
+ options !== null && options !== void 0 ? options : (options = DataTypes.getEnumKeys(ProductUnit));
84
+ return options.map((key) => {
73
85
  const id = DataTypes.getEnumByKey(ProductUnit, key);
74
86
  return {
75
87
  id,
76
- label: getUnitLabel(id, func)
88
+ label: getUnitLabel(id, func, isJoined).formatInitial(true)
77
89
  };
78
90
  });
79
91
  }
80
92
  BusinessUtils.getUnits = getUnits;
93
+ /**
94
+ *
95
+ * Get all repeat options
96
+ * @param func Label delegate
97
+ * @param options Define the order and limit the items
98
+ * @param isJoined Add the join label like 'per Kg' for Kg
99
+ * @returns Units
100
+ */
101
+ function getRepeatOptions(func, options, isJoined = true) {
102
+ options !== null && options !== void 0 ? options : (options = DataTypes.getEnumKeys(RepeatOption));
103
+ isJoined !== null && isJoined !== void 0 ? isJoined : (isJoined = true);
104
+ return getUnits(func, options, isJoined);
105
+ }
106
+ BusinessUtils.getRepeatOptions = getRepeatOptions;
81
107
  })(BusinessUtils || (BusinessUtils = {}));
@@ -12,10 +12,22 @@ export declare enum EntityStatus {
12
12
  * Flaged
13
13
  */
14
14
  Flaged = 9,
15
+ /**
16
+ * Approved
17
+ */
18
+ Approved = 100,
19
+ /**
20
+ * Audited
21
+ */
22
+ Audited = 111,
15
23
  /**
16
24
  * Inactivated
17
25
  */
18
26
  Inactivated = 200,
27
+ /**
28
+ * Completed
29
+ */
30
+ Completed = 250,
19
31
  /**
20
32
  * Archived
21
33
  */
@@ -13,10 +13,22 @@ export var EntityStatus;
13
13
  * Flaged
14
14
  */
15
15
  EntityStatus[EntityStatus["Flaged"] = 9] = "Flaged";
16
+ /**
17
+ * Approved
18
+ */
19
+ EntityStatus[EntityStatus["Approved"] = 100] = "Approved";
20
+ /**
21
+ * Audited
22
+ */
23
+ EntityStatus[EntityStatus["Audited"] = 111] = "Audited";
16
24
  /**
17
25
  * Inactivated
18
26
  */
19
27
  EntityStatus[EntityStatus["Inactivated"] = 200] = "Inactivated";
28
+ /**
29
+ * Completed
30
+ */
31
+ EntityStatus[EntityStatus["Completed"] = 250] = "Completed";
20
32
  /**
21
33
  * Archived
22
34
  */
@@ -1,66 +1,68 @@
1
+ import { RepeatOption } from './RepeatOption';
1
2
  /**
2
- * Product units enum
3
- * See com.etsoo.CoreFramework.Business.ProductUnit
3
+ * Product base units
4
+ * 1 - 9
4
5
  */
5
- export declare enum ProductUnit {
6
+ export declare enum ProductBaseUnit {
6
7
  /**
7
8
  * Picese
8
9
  * 件
9
10
  */
10
- PC = 0,
11
+ PC = 1,
11
12
  /**
12
13
  * Set
13
14
  * 套
14
15
  */
15
- SET = 1,
16
- /**
17
- * Year
18
- *
19
- */
20
- YEAR = 10,
21
- /**
22
- * Quater
23
- * 季
24
- */
25
- QUATER = 11,
26
- /**
27
- * Month
28
- * 月
29
- */
30
- MONTH = 12,
31
- /**
32
- * Fortnight
33
- * 两周
34
- */
35
- FORNIGHT = 13,
36
- /**
37
- * Week
38
- * 周
39
- */
40
- WEEK = 14,
41
- /**
42
- * Day
43
- * 天
44
- */
45
- DAY = 15,
16
+ SET = 2
17
+ }
18
+ /**
19
+ * Product weight units
20
+ * Range 40 - 49
21
+ */
22
+ export declare enum ProductWeightUnit {
46
23
  /**
47
- * Hour
48
- * 小时
24
+ * Gram
25
+ *
49
26
  */
50
- HOUR = 16,
27
+ GRAM = 40,
51
28
  /**
52
- * Ton
53
- *
29
+ * Half Kg
30
+ *
54
31
  */
55
- TON = 31,
32
+ JIN = 41,
56
33
  /**
57
34
  * Kilogram
58
35
  * 千克
59
36
  */
60
- KILOGRAM = 32,
37
+ KILOGRAM = 42,
61
38
  /**
62
- * Gram
63
- *
39
+ * Ton
40
+ *
64
41
  */
65
- GRAM = 33
42
+ TON = 49
66
43
  }
44
+ /**
45
+ * Product units enum
46
+ * Repeat options take range 10 - 39
47
+ * See com.etsoo.CoreFramework.Business.ProductUnit
48
+ */
49
+ export declare const ProductUnit: {
50
+ [x: number]: string;
51
+ GRAM: ProductWeightUnit.GRAM;
52
+ JIN: ProductWeightUnit.JIN;
53
+ KILOGRAM: ProductWeightUnit.KILOGRAM;
54
+ TON: ProductWeightUnit.TON;
55
+ HOUR: RepeatOption.HOUR;
56
+ DAY: RepeatOption.DAY;
57
+ YEAR: RepeatOption.YEAR;
58
+ WEEK: RepeatOption.WEEK;
59
+ FORTNIGHT: RepeatOption.FORTNIGHT;
60
+ FOURWEEK: RepeatOption.FOURWEEK;
61
+ MONTH: RepeatOption.MONTH;
62
+ BIMONTH: RepeatOption.BIMONTH;
63
+ QUATER: RepeatOption.QUATER;
64
+ HALFYEAR: RepeatOption.HALFYEAR;
65
+ PC: ProductBaseUnit.PC;
66
+ SET: ProductBaseUnit.SET;
67
+ };
68
+ export declare type ProductUnit = ProductBaseUnit | RepeatOption | ProductWeightUnit;
@@ -1,67 +1,55 @@
1
+ import { RepeatOption } from './RepeatOption';
1
2
  /**
2
- * Product units enum
3
- * See com.etsoo.CoreFramework.Business.ProductUnit
3
+ * Product base units
4
+ * 1 - 9
4
5
  */
5
- export var ProductUnit;
6
- (function (ProductUnit) {
6
+ export var ProductBaseUnit;
7
+ (function (ProductBaseUnit) {
7
8
  /**
8
9
  * Picese
9
10
  * 件
10
11
  */
11
- ProductUnit[ProductUnit["PC"] = 0] = "PC";
12
+ ProductBaseUnit[ProductBaseUnit["PC"] = 1] = "PC";
12
13
  /**
13
14
  * Set
14
15
  * 套
15
16
  */
16
- ProductUnit[ProductUnit["SET"] = 1] = "SET";
17
- /**
18
- * Year
19
- *
20
- */
21
- ProductUnit[ProductUnit["YEAR"] = 10] = "YEAR";
22
- /**
23
- * Quater
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
- * Hour
49
- * 小时
26
+ * Gram
27
+ *
50
28
  */
51
- ProductUnit[ProductUnit["HOUR"] = 16] = "HOUR";
29
+ ProductWeightUnit[ProductWeightUnit["GRAM"] = 40] = "GRAM";
52
30
  /**
53
- * Ton
54
- *
31
+ * Half Kg
32
+ *
55
33
  */
56
- ProductUnit[ProductUnit["TON"] = 31] = "TON";
34
+ ProductWeightUnit[ProductWeightUnit["JIN"] = 41] = "JIN";
57
35
  /**
58
36
  * Kilogram
59
37
  * 千克
60
38
  */
61
- ProductUnit[ProductUnit["KILOGRAM"] = 32] = "KILOGRAM";
39
+ ProductWeightUnit[ProductWeightUnit["KILOGRAM"] = 42] = "KILOGRAM";
62
40
  /**
63
- * Gram
64
- *
41
+ * Ton
42
+ *
65
43
  */
66
- ProductUnit[ProductUnit["GRAM"] = 33] = "GRAM";
67
- })(ProductUnit || (ProductUnit = {}));
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 = {}));