@etsoo/appscript 1.2.24 → 1.2.28

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 (44) hide show
  1. package/__tests__/app/CoreApp.ts +15 -0
  2. package/lib/cjs/address/AddressRegion.js +2 -2
  3. package/lib/cjs/app/CoreApp.d.ts +15 -2
  4. package/lib/cjs/app/CoreApp.js +10 -0
  5. package/lib/cjs/business/BusinessUtils.d.ts +28 -2
  6. package/lib/cjs/business/BusinessUtils.js +48 -6
  7. package/lib/cjs/business/EntityStatus.d.ts +12 -0
  8. package/lib/cjs/business/EntityStatus.js +12 -0
  9. package/lib/cjs/business/ProductUnit.d.ts +47 -45
  10. package/lib/cjs/business/ProductUnit.js +36 -48
  11. package/lib/cjs/business/RepeatOption.d.ts +56 -0
  12. package/lib/cjs/business/RepeatOption.js +60 -0
  13. package/lib/cjs/i18n/en-US.json +43 -0
  14. package/lib/cjs/i18n/zh-CN.json +44 -0
  15. package/lib/cjs/i18n/zh-HK.json +43 -0
  16. package/lib/cjs/index.d.ts +1 -0
  17. package/lib/cjs/index.js +1 -0
  18. package/lib/mjs/address/AddressRegion.js +2 -2
  19. package/lib/mjs/app/CoreApp.d.ts +15 -2
  20. package/lib/mjs/app/CoreApp.js +10 -0
  21. package/lib/mjs/business/BusinessUtils.d.ts +28 -2
  22. package/lib/mjs/business/BusinessUtils.js +48 -6
  23. package/lib/mjs/business/EntityStatus.d.ts +12 -0
  24. package/lib/mjs/business/EntityStatus.js +12 -0
  25. package/lib/mjs/business/ProductUnit.d.ts +47 -45
  26. package/lib/mjs/business/ProductUnit.js +35 -47
  27. package/lib/mjs/business/RepeatOption.d.ts +56 -0
  28. package/lib/mjs/business/RepeatOption.js +57 -0
  29. package/lib/mjs/i18n/en-US.json +43 -0
  30. package/lib/mjs/i18n/zh-CN.json +44 -0
  31. package/lib/mjs/i18n/zh-HK.json +43 -0
  32. package/lib/mjs/index.d.ts +1 -0
  33. package/lib/mjs/index.js +1 -0
  34. package/package.json +10 -10
  35. package/src/address/AddressRegion.ts +2 -2
  36. package/src/app/CoreApp.ts +20 -2
  37. package/src/business/BusinessUtils.ts +82 -7
  38. package/src/business/EntityStatus.ts +15 -0
  39. package/src/business/ProductUnit.ts +35 -51
  40. package/src/business/RepeatOption.ts +65 -0
  41. package/src/i18n/en-US.json +43 -0
  42. package/src/i18n/zh-CN.json +44 -0
  43. package/src/i18n/zh-HK.json +43 -0
  44. package/src/index.ts +1 -0
@@ -8,6 +8,7 @@ import {
8
8
  } from '@etsoo/notificationbase';
9
9
  import { ApiAuthorizationScheme, createClient } from '@etsoo/restclient';
10
10
  import { DataTypes, DomUtils, Utils, WindowStorage } from '@etsoo/shared';
11
+ import { BusinessUtils } from '../../src';
11
12
  import { AddressUtils } from '../../src/address/AddressUtils';
12
13
  import { IAppSettings } from '../../src/app/AppSettings';
13
14
  import { CoreApp } from '../../src/app/CoreApp';
@@ -154,3 +155,17 @@ test('Tests for initCallUpdateLocal', () => {
154
155
  );
155
156
  expect(passphrase).not.toBeNull();
156
157
  });
158
+
159
+ test('Tests for getUnitLabel', () => {
160
+ expect(app.getUnitLabel(12, true)).toBe('每年');
161
+ });
162
+
163
+ test('Tests for getRepeatOptions', () => {
164
+ const options = BusinessUtils.getRepeatOptions(app.labelDelegate, [
165
+ 'MONTH',
166
+ 'QUATER',
167
+ 'YEAR'
168
+ ]);
169
+
170
+ expect(options[2]).toStrictEqual({ id: 12, label: '每年' });
171
+ });
@@ -55,7 +55,7 @@ AddressRegion.US = new AddressRegion('US', 'USA', '840', AddressContinent_1.Addr
55
55
  * CA - Canada
56
56
  * 加拿大
57
57
  */
58
- AddressRegion.CA = new AddressRegion('CA', 'CAN', '124', AddressContinent_1.AddressContinent.NA, '011', '1', 'USD', ['en-CA', 'fr-CA']);
58
+ AddressRegion.CA = new AddressRegion('CA', 'CAN', '124', AddressContinent_1.AddressContinent.NA, '011', '1', 'CAD', ['en-CA', 'fr-CA']);
59
59
  /**
60
60
  * AU - Australia
61
61
  * 澳大利亚
@@ -75,7 +75,7 @@ AddressRegion.GB = new AddressRegion('GB', 'GBR', '826', AddressContinent_1.Addr
75
75
  * IE - Ireland
76
76
  * 爱尔兰
77
77
  */
78
- AddressRegion.IE = new AddressRegion('IE', 'IRL', '372', AddressContinent_1.AddressContinent.EU, '00', '353', 'IEP', ['en-IE']);
78
+ AddressRegion.IE = new AddressRegion('IE', 'IRL', '372', AddressContinent_1.AddressContinent.EU, '00', '353', 'EUR', ['en-IE']);
79
79
  /**
80
80
  * DE - Germany
81
81
  * 德国
@@ -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/
@@ -743,6 +743,16 @@ class CoreApp {
743
743
  // settings.timeZone = Utils.getTimeZone()
744
744
  return (_a = this.settings.timeZone) !== null && _a !== void 0 ? _a : (_b = this.ipData) === null || _b === void 0 ? void 0 : _b.timezone;
745
745
  }
746
+ /**
747
+ * Get product unit and repeat option label
748
+ * @param unit Product unit or repeat option
749
+ * @param isJoined Add the join label like 'per Kg' for Kg
750
+ */
751
+ getUnitLabel(unit, isJoined) {
752
+ if (unit == null)
753
+ return '';
754
+ return BusinessUtils_1.BusinessUtils.getUnitLabel(unit, this.labelDelegate, isJoined);
755
+ }
746
756
  /**
747
757
  * Hash message, SHA3 or HmacSHA512, 512 as Base64
748
758
  * https://cryptojs.gitbook.io/docs/
@@ -14,9 +14,16 @@ export declare namespace BusinessUtils {
14
14
  * @returns Items with blank item
15
15
  */
16
16
  function addIdLabelBlankItem<T extends DataTypes.IdType = number>(input: IdLabelDto<T>[], copy?: boolean): IdLabelDto<T>[];
17
+ /**
18
+ * Get currency collection
19
+ * @param currencyNames Names like CNY, USD
20
+ * @param func Label delegate
21
+ * @returns Collection
22
+ */
23
+ function getCurrencies(currencyNames: string[], func: ICultureGet): IdLabelDto<string>[];
17
24
  /**
18
25
  * Get product unit's label
19
- * 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
20
27
  * @param unit Unit
21
28
  * @param func Label delegate
22
29
  * @returns Label
@@ -38,13 +45,32 @@ export declare namespace BusinessUtils {
38
45
  * Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
39
46
  * @param unit Unit
40
47
  * @param func Label delegate
48
+ * @param isJoined Add the join label like 'per Kg' for Kg
41
49
  * @returns Label
42
50
  */
43
- function getUnitLabel(unit: ProductUnit, func: ICultureGet): string;
51
+ function getUnitLabel(unit: ProductUnit, func: ICultureGet, isJoined?: boolean): string;
44
52
  /**
45
53
  * Get all product units
46
54
  * @param func Label delegate
47
55
  * @returns Units
48
56
  */
49
57
  function getUnits(func: ICultureGet): IdLabelDto[];
58
+ /**
59
+ *
60
+ * Get all product units
61
+ * @param func Label delegate
62
+ * @param options Define the order and limit the items
63
+ * @param isJoined Add the join label like 'per Kg' for Kg
64
+ * @returns Units
65
+ */
66
+ function getUnits(func: ICultureGet, options?: string[], isJoined?: boolean): IdLabelDto[];
67
+ /**
68
+ *
69
+ * Get all repeat options
70
+ * @param func Label delegate
71
+ * @param options Define the order and limit the items
72
+ * @param isJoined Add the join label like 'per Kg' for Kg
73
+ * @returns Units
74
+ */
75
+ function getRepeatOptions(func: ICultureGet, options?: string[], isJoined?: boolean): IdLabelDto[];
50
76
  }
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BusinessUtils = void 0;
4
4
  const shared_1 = require("@etsoo/shared");
5
+ const __1 = require("..");
5
6
  const EntityStatus_1 = require("./EntityStatus");
6
7
  const ProductUnit_1 = require("./ProductUnit");
7
8
  /**
@@ -23,9 +24,25 @@ var BusinessUtils;
23
24
  return input;
24
25
  }
25
26
  BusinessUtils.addIdLabelBlankItem = addIdLabelBlankItem;
27
+ /**
28
+ * Get currency collection
29
+ * @param currencyNames Names like CNY, USD
30
+ * @param func Label delegate
31
+ * @returns Collection
32
+ */
33
+ function getCurrencies(currencyNames, func) {
34
+ return currencyNames.map((name) => {
35
+ var _a;
36
+ return ({
37
+ id: name,
38
+ label: (_a = func(`currency${name}`)) !== null && _a !== void 0 ? _a : name
39
+ });
40
+ });
41
+ }
42
+ BusinessUtils.getCurrencies = getCurrencies;
26
43
  /**
27
44
  * Get product unit's label
28
- * Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
45
+ * Please define the label in culture with key 'statusNormal' for Normal status
29
46
  * @param unit Unit
30
47
  * @param func Label delegate
31
48
  * @returns Label
@@ -58,27 +75,52 @@ var BusinessUtils;
58
75
  * Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
59
76
  * @param unit Unit
60
77
  * @param func Label delegate
78
+ * @param isJoined Add the join label like 'per Kg' for Kg
61
79
  * @returns Label
62
80
  */
63
- function getUnitLabel(unit, func) {
81
+ function getUnitLabel(unit, func, isJoined) {
64
82
  var _a;
65
83
  const key = ProductUnit_1.ProductUnit[unit];
66
- return (_a = func('unit' + key)) !== null && _a !== void 0 ? _a : key;
84
+ const label = (_a = func('unit' + key)) !== null && _a !== void 0 ? _a : key;
85
+ if (isJoined) {
86
+ const jLabel = func('unitJoin');
87
+ if (jLabel)
88
+ return jLabel.format(label);
89
+ }
90
+ return label;
67
91
  }
68
92
  BusinessUtils.getUnitLabel = getUnitLabel;
69
93
  /**
94
+ *
70
95
  * Get all product units
71
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
72
99
  * @returns Units
73
100
  */
74
- function getUnits(func) {
75
- return shared_1.DataTypes.getEnumKeys(ProductUnit_1.ProductUnit).map((key) => {
101
+ function getUnits(func, options, isJoined) {
102
+ options !== null && options !== void 0 ? options : (options = shared_1.DataTypes.getEnumKeys(ProductUnit_1.ProductUnit));
103
+ return options.map((key) => {
76
104
  const id = shared_1.DataTypes.getEnumByKey(ProductUnit_1.ProductUnit, key);
77
105
  return {
78
106
  id,
79
- label: getUnitLabel(id, func)
107
+ label: getUnitLabel(id, func, isJoined).formatInitial(true)
80
108
  };
81
109
  });
82
110
  }
83
111
  BusinessUtils.getUnits = getUnits;
112
+ /**
113
+ *
114
+ * Get all repeat options
115
+ * @param func Label delegate
116
+ * @param options Define the order and limit the items
117
+ * @param isJoined Add the join label like 'per Kg' for Kg
118
+ * @returns Units
119
+ */
120
+ function getRepeatOptions(func, options, isJoined = true) {
121
+ options !== null && options !== void 0 ? options : (options = shared_1.DataTypes.getEnumKeys(__1.RepeatOption));
122
+ isJoined !== null && isJoined !== void 0 ? isJoined : (isJoined = true);
123
+ return getUnits(func, options, isJoined);
124
+ }
125
+ BusinessUtils.getRepeatOptions = getRepeatOptions;
84
126
  })(BusinessUtils = exports.BusinessUtils || (exports.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
  */
@@ -16,10 +16,22 @@ var EntityStatus;
16
16
  * Flaged
17
17
  */
18
18
  EntityStatus[EntityStatus["Flaged"] = 9] = "Flaged";
19
+ /**
20
+ * Approved
21
+ */
22
+ EntityStatus[EntityStatus["Approved"] = 100] = "Approved";
23
+ /**
24
+ * Audited
25
+ */
26
+ EntityStatus[EntityStatus["Audited"] = 111] = "Audited";
19
27
  /**
20
28
  * Inactivated
21
29
  */
22
30
  EntityStatus[EntityStatus["Inactivated"] = 200] = "Inactivated";
31
+ /**
32
+ * Completed
33
+ */
34
+ EntityStatus[EntityStatus["Completed"] = 250] = "Completed";
23
35
  /**
24
36
  * Archived
25
37
  */
@@ -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,70 +1,58 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProductUnit = void 0;
3
+ exports.ProductUnit = exports.ProductWeightUnit = exports.ProductBaseUnit = void 0;
4
+ const RepeatOption_1 = require("./RepeatOption");
4
5
  /**
5
- * Product units enum
6
- * See com.etsoo.CoreFramework.Business.ProductUnit
6
+ * Product base units
7
+ * 1 - 9
7
8
  */
8
- var ProductUnit;
9
- (function (ProductUnit) {
9
+ var ProductBaseUnit;
10
+ (function (ProductBaseUnit) {
10
11
  /**
11
12
  * Picese
12
13
  * 件
13
14
  */
14
- ProductUnit[ProductUnit["PC"] = 0] = "PC";
15
+ ProductBaseUnit[ProductBaseUnit["PC"] = 1] = "PC";
15
16
  /**
16
17
  * Set
17
18
  * 套
18
19
  */
19
- ProductUnit[ProductUnit["SET"] = 1] = "SET";
20
- /**
21
- * Year
22
- *
23
- */
24
- ProductUnit[ProductUnit["YEAR"] = 10] = "YEAR";
25
- /**
26
- * Quater
27
- * 季
28
- */
29
- ProductUnit[ProductUnit["QUATER"] = 11] = "QUATER";
30
- /**
31
- * Month
32
- * 月
33
- */
34
- ProductUnit[ProductUnit["MONTH"] = 12] = "MONTH";
35
- /**
36
- * Fortnight
37
- * 两周
38
- */
39
- ProductUnit[ProductUnit["FORNIGHT"] = 13] = "FORNIGHT";
40
- /**
41
- * Week
42
- * 周
43
- */
44
- ProductUnit[ProductUnit["WEEK"] = 14] = "WEEK";
45
- /**
46
- * Day
47
- * 天
48
- */
49
- ProductUnit[ProductUnit["DAY"] = 15] = "DAY";
20
+ ProductBaseUnit[ProductBaseUnit["SET"] = 2] = "SET";
21
+ })(ProductBaseUnit = exports.ProductBaseUnit || (exports.ProductBaseUnit = {}));
22
+ /**
23
+ * Product weight units
24
+ * Range 40 - 49
25
+ */
26
+ var ProductWeightUnit;
27
+ (function (ProductWeightUnit) {
50
28
  /**
51
- * Hour
52
- * 小时
29
+ * Gram
30
+ *
53
31
  */
54
- ProductUnit[ProductUnit["HOUR"] = 16] = "HOUR";
32
+ ProductWeightUnit[ProductWeightUnit["GRAM"] = 40] = "GRAM";
55
33
  /**
56
- * Ton
57
- *
34
+ * Half Kg
35
+ *
58
36
  */
59
- ProductUnit[ProductUnit["TON"] = 31] = "TON";
37
+ ProductWeightUnit[ProductWeightUnit["JIN"] = 41] = "JIN";
60
38
  /**
61
39
  * Kilogram
62
40
  * 千克
63
41
  */
64
- ProductUnit[ProductUnit["KILOGRAM"] = 32] = "KILOGRAM";
42
+ ProductWeightUnit[ProductWeightUnit["KILOGRAM"] = 42] = "KILOGRAM";
65
43
  /**
66
- * Gram
67
- *
44
+ * Ton
45
+ *
68
46
  */
69
- ProductUnit[ProductUnit["GRAM"] = 33] = "GRAM";
70
- })(ProductUnit = exports.ProductUnit || (exports.ProductUnit = {}));
47
+ ProductWeightUnit[ProductWeightUnit["TON"] = 49] = "TON";
48
+ })(ProductWeightUnit = exports.ProductWeightUnit || (exports.ProductWeightUnit = {}));
49
+ /**
50
+ * Product units enum
51
+ * Repeat options take range 10 - 39
52
+ * See com.etsoo.CoreFramework.Business.ProductUnit
53
+ */
54
+ exports.ProductUnit = {
55
+ ...ProductBaseUnit,
56
+ ...RepeatOption_1.RepeatOption,
57
+ ...ProductWeightUnit
58
+ };
@@ -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,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RepeatOption = void 0;
4
+ /**
5
+ * Repeat options
6
+ * Part of ProductUnit, range 10 - 39
7
+ */
8
+ var RepeatOption;
9
+ (function (RepeatOption) {
10
+ /**
11
+ * Hour
12
+ * 小时
13
+ */
14
+ RepeatOption[RepeatOption["HOUR"] = 10] = "HOUR";
15
+ /**
16
+ * Day
17
+ * 天
18
+ */
19
+ RepeatOption[RepeatOption["DAY"] = 11] = "DAY";
20
+ /**
21
+ * Year
22
+ * 年
23
+ */
24
+ RepeatOption[RepeatOption["YEAR"] = 12] = "YEAR";
25
+ /**
26
+ * Week
27
+ * 周
28
+ */
29
+ RepeatOption[RepeatOption["WEEK"] = 21] = "WEEK";
30
+ /**
31
+ * Two weeks
32
+ * 两周
33
+ */
34
+ RepeatOption[RepeatOption["FORTNIGHT"] = 22] = "FORTNIGHT";
35
+ /**
36
+ * Four weeks
37
+ * 四周
38
+ */
39
+ RepeatOption[RepeatOption["FOURWEEK"] = 24] = "FOURWEEK";
40
+ /**
41
+ * Month
42
+ * 月
43
+ */
44
+ RepeatOption[RepeatOption["MONTH"] = 31] = "MONTH";
45
+ /**
46
+ * Two months
47
+ * 两月
48
+ */
49
+ RepeatOption[RepeatOption["BIMONTH"] = 32] = "BIMONTH";
50
+ /**
51
+ * Quater(3 months)
52
+ * 季(三个月)
53
+ */
54
+ RepeatOption[RepeatOption["QUATER"] = 33] = "QUATER";
55
+ /**
56
+ * Half a year
57
+ * 半年
58
+ */
59
+ RepeatOption[RepeatOption["HALFYEAR"] = 36] = "HALFYEAR";
60
+ })(RepeatOption = exports.RepeatOption || (exports.RepeatOption = {}));