@etsoo/appscript 1.6.51 → 1.6.53

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.
@@ -1,6 +1,7 @@
1
1
  import { DataTypes, IdType, ListType } from "@etsoo/shared";
2
2
  import { CustomCultureData } from "../def/CustomCulture";
3
3
  import { QueryRQ } from "../api/rq/QueryRQ";
4
+ import { AssetUnits, ProductUnit } from "./ProductUnit";
4
5
  /**
5
6
  * Business utils
6
7
  */
@@ -32,6 +33,12 @@ export declare namespace BusinessUtils {
32
33
  * @returns 12 months
33
34
  */
34
35
  function getMonths(monthLabels: string[], startMonth?: number): ListType[];
36
+ /**
37
+ * Is asset unit
38
+ * @param unit Product unit
39
+ * @returns Result
40
+ */
41
+ function isAssetUnit(unit: ProductUnit): unit is AssetUnits;
35
42
  /**
36
43
  * Check if the item is a custom culture data
37
44
  * @param item Item to check
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BusinessUtils = void 0;
4
+ const ProductUnit_1 = require("./ProductUnit");
4
5
  /**
5
6
  * Business utils
6
7
  */
@@ -69,6 +70,17 @@ var BusinessUtils;
69
70
  return months;
70
71
  }
71
72
  BusinessUtils.getMonths = getMonths;
73
+ /**
74
+ * Is asset unit
75
+ * @param unit Product unit
76
+ * @returns Result
77
+ */
78
+ function isAssetUnit(unit) {
79
+ return (unit === ProductUnit_1.AssetUnits.TIME ||
80
+ unit === ProductUnit_1.AssetUnits.MONEY ||
81
+ (unit >= ProductUnit_1.AssetUnits.HOUR && unit <= ProductUnit_1.AssetUnits.HALFYEAR));
82
+ }
83
+ BusinessUtils.isAssetUnit = isAssetUnit;
72
84
  /**
73
85
  * Check if the item is a custom culture data
74
86
  * @param item Item to check
@@ -66,7 +66,7 @@ export declare enum ProductOtherUnit {
66
66
  /**
67
67
  * Product units enum
68
68
  * Repeat options take range 10 - 39
69
- * @see com.etsoo.CoreFramework.Business.ProductUnit
69
+ * C#, com.etsoo.CoreFramework.Business.ProductUnit
70
70
  */
71
71
  export declare const ProductUnit: {
72
72
  [x: number]: string;
@@ -73,7 +73,7 @@ var ProductOtherUnit;
73
73
  /**
74
74
  * Product units enum
75
75
  * Repeat options take range 10 - 39
76
- * @see com.etsoo.CoreFramework.Business.ProductUnit
76
+ * C#, com.etsoo.CoreFramework.Business.ProductUnit
77
77
  */
78
78
  exports.ProductUnit = {
79
79
  ...ProductBaseUnit,
@@ -124,6 +124,8 @@
124
124
  "more": "More",
125
125
  "more1": "More...",
126
126
  "moreTag": "{0} more",
127
+ "moveDown": "Down",
128
+ "moveUp": "Up",
127
129
  "name": "Name",
128
130
  "nameB": "Name",
129
131
  "networkError": "The local network is faulty and cannot connect to the remote server",
@@ -124,6 +124,8 @@
124
124
  "more": "更多",
125
125
  "more1": "更多...",
126
126
  "moreTag": "({0}+)",
127
+ "moveDown": "下移",
128
+ "moveUp": "上移",
127
129
  "name": "姓名",
128
130
  "nameB": "名称",
129
131
  "networkError": "本地网络故障,无法链接到远程服务器",
@@ -124,6 +124,8 @@
124
124
  "more": "更多",
125
125
  "more1": "更多...",
126
126
  "moreTag": "({0}+)",
127
+ "moveDown": "下移",
128
+ "moveUp": "上移",
127
129
  "name": "姓名",
128
130
  "nameB": "名稱",
129
131
  "networkError": "本地網路故障,無法連結到遠端伺服器",
@@ -1,6 +1,7 @@
1
1
  import { DataTypes, IdType, ListType } from "@etsoo/shared";
2
2
  import { CustomCultureData } from "../def/CustomCulture";
3
3
  import { QueryRQ } from "../api/rq/QueryRQ";
4
+ import { AssetUnits, ProductUnit } from "./ProductUnit";
4
5
  /**
5
6
  * Business utils
6
7
  */
@@ -32,6 +33,12 @@ export declare namespace BusinessUtils {
32
33
  * @returns 12 months
33
34
  */
34
35
  function getMonths(monthLabels: string[], startMonth?: number): ListType[];
36
+ /**
37
+ * Is asset unit
38
+ * @param unit Product unit
39
+ * @returns Result
40
+ */
41
+ function isAssetUnit(unit: ProductUnit): unit is AssetUnits;
35
42
  /**
36
43
  * Check if the item is a custom culture data
37
44
  * @param item Item to check
@@ -1,3 +1,4 @@
1
+ import { AssetUnits } from "./ProductUnit";
1
2
  /**
2
3
  * Business utils
3
4
  */
@@ -66,6 +67,17 @@ export var BusinessUtils;
66
67
  return months;
67
68
  }
68
69
  BusinessUtils.getMonths = getMonths;
70
+ /**
71
+ * Is asset unit
72
+ * @param unit Product unit
73
+ * @returns Result
74
+ */
75
+ function isAssetUnit(unit) {
76
+ return (unit === AssetUnits.TIME ||
77
+ unit === AssetUnits.MONEY ||
78
+ (unit >= AssetUnits.HOUR && unit <= AssetUnits.HALFYEAR));
79
+ }
80
+ BusinessUtils.isAssetUnit = isAssetUnit;
69
81
  /**
70
82
  * Check if the item is a custom culture data
71
83
  * @param item Item to check
@@ -66,7 +66,7 @@ export declare enum ProductOtherUnit {
66
66
  /**
67
67
  * Product units enum
68
68
  * Repeat options take range 10 - 39
69
- * @see com.etsoo.CoreFramework.Business.ProductUnit
69
+ * C#, com.etsoo.CoreFramework.Business.ProductUnit
70
70
  */
71
71
  export declare const ProductUnit: {
72
72
  [x: number]: string;
@@ -70,7 +70,7 @@ export var ProductOtherUnit;
70
70
  /**
71
71
  * Product units enum
72
72
  * Repeat options take range 10 - 39
73
- * @see com.etsoo.CoreFramework.Business.ProductUnit
73
+ * C#, com.etsoo.CoreFramework.Business.ProductUnit
74
74
  */
75
75
  export const ProductUnit = {
76
76
  ...ProductBaseUnit,
@@ -124,6 +124,8 @@
124
124
  "more": "More",
125
125
  "more1": "More...",
126
126
  "moreTag": "{0} more",
127
+ "moveDown": "Down",
128
+ "moveUp": "Up",
127
129
  "name": "Name",
128
130
  "nameB": "Name",
129
131
  "networkError": "The local network is faulty and cannot connect to the remote server",
@@ -124,6 +124,8 @@
124
124
  "more": "更多",
125
125
  "more1": "更多...",
126
126
  "moreTag": "({0}+)",
127
+ "moveDown": "下移",
128
+ "moveUp": "上移",
127
129
  "name": "姓名",
128
130
  "nameB": "名称",
129
131
  "networkError": "本地网络故障,无法链接到远程服务器",
@@ -124,6 +124,8 @@
124
124
  "more": "更多",
125
125
  "more1": "更多...",
126
126
  "moreTag": "({0}+)",
127
+ "moveDown": "下移",
128
+ "moveUp": "上移",
127
129
  "name": "姓名",
128
130
  "nameB": "名稱",
129
131
  "networkError": "本地網路故障,無法連結到遠端伺服器",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.6.51",
3
+ "version": "1.6.53",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -1,6 +1,7 @@
1
1
  import { DataTypes, IdType, ListType } from "@etsoo/shared";
2
2
  import { CustomCultureData } from "../def/CustomCulture";
3
3
  import { QueryRQ } from "../api/rq/QueryRQ";
4
+ import { AssetUnits, ProductUnit } from "./ProductUnit";
4
5
 
5
6
  /**
6
7
  * Business utils
@@ -80,6 +81,19 @@ export namespace BusinessUtils {
80
81
  return months;
81
82
  }
82
83
 
84
+ /**
85
+ * Is asset unit
86
+ * @param unit Product unit
87
+ * @returns Result
88
+ */
89
+ export function isAssetUnit(unit: ProductUnit): unit is AssetUnits {
90
+ return (
91
+ unit === AssetUnits.TIME ||
92
+ unit === AssetUnits.MONEY ||
93
+ (unit >= AssetUnits.HOUR && unit <= AssetUnits.HALFYEAR)
94
+ );
95
+ }
96
+
83
97
  /**
84
98
  * Check if the item is a custom culture data
85
99
  * @param item Item to check
@@ -76,7 +76,7 @@ export enum ProductOtherUnit {
76
76
  /**
77
77
  * Product units enum
78
78
  * Repeat options take range 10 - 39
79
- * @see com.etsoo.CoreFramework.Business.ProductUnit
79
+ * C#, com.etsoo.CoreFramework.Business.ProductUnit
80
80
  */
81
81
  export const ProductUnit = {
82
82
  ...ProductBaseUnit,
package/src/i18n/en.json CHANGED
@@ -124,6 +124,8 @@
124
124
  "more": "More",
125
125
  "more1": "More...",
126
126
  "moreTag": "{0} more",
127
+ "moveDown": "Down",
128
+ "moveUp": "Up",
127
129
  "name": "Name",
128
130
  "nameB": "Name",
129
131
  "networkError": "The local network is faulty and cannot connect to the remote server",
@@ -124,6 +124,8 @@
124
124
  "more": "更多",
125
125
  "more1": "更多...",
126
126
  "moreTag": "({0}+)",
127
+ "moveDown": "下移",
128
+ "moveUp": "上移",
127
129
  "name": "姓名",
128
130
  "nameB": "名称",
129
131
  "networkError": "本地网络故障,无法链接到远程服务器",
@@ -124,6 +124,8 @@
124
124
  "more": "更多",
125
125
  "more1": "更多...",
126
126
  "moreTag": "({0}+)",
127
+ "moveDown": "下移",
128
+ "moveUp": "上移",
127
129
  "name": "姓名",
128
130
  "nameB": "名稱",
129
131
  "networkError": "本地網路故障,無法連結到遠端伺服器",