@we-scrum/enums 1.0.68 → 1.0.69
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/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/operator-enum.d.ts +27 -0
- package/dist/operator-enum.js +85 -0
- package/dist/operator-enum.js.map +1 -0
- package/dist/sort-direction-enum.d.ts +13 -0
- package/dist/sort-direction-enum.js +24 -0
- package/dist/sort-direction-enum.js.map +1 -0
- package/dist/store-system-enum.d.ts +7 -0
- package/dist/store-system-enum.js +16 -0
- package/dist/store-system-enum.js.map +1 -0
- package/package.json +3 -3
- package/src/index.ts +3 -1
- package/src/operator-enum.ts +87 -0
- package/src/sort-direction-enum.ts +23 -0
- package/src/store-system-enum.ts +13 -0
package/dist/index.d.ts
CHANGED
|
@@ -10,10 +10,13 @@ export * from './monitoring-alert-severity-level-enum';
|
|
|
10
10
|
export * from './monitoring-alert-status-enum';
|
|
11
11
|
export * from './object-property-type-enum';
|
|
12
12
|
export * from './operation-enum';
|
|
13
|
+
export * from './operator-enum';
|
|
13
14
|
export * from './progress-status-enum';
|
|
14
15
|
export * from './queuing-system-enum';
|
|
15
16
|
export * from './route-method-enum';
|
|
16
17
|
export * from './route-query-param-type-enum';
|
|
17
18
|
export * from './search-result-type-enum';
|
|
19
|
+
export * from './sort-direction-enum';
|
|
20
|
+
export * from './store-system-enum';
|
|
18
21
|
export * from './story-status-enum';
|
|
19
22
|
export * from './user-role-enum';
|
package/dist/index.js
CHANGED
|
@@ -26,11 +26,14 @@ __exportStar(require("./monitoring-alert-severity-level-enum"), exports);
|
|
|
26
26
|
__exportStar(require("./monitoring-alert-status-enum"), exports);
|
|
27
27
|
__exportStar(require("./object-property-type-enum"), exports);
|
|
28
28
|
__exportStar(require("./operation-enum"), exports);
|
|
29
|
+
__exportStar(require("./operator-enum"), exports);
|
|
29
30
|
__exportStar(require("./progress-status-enum"), exports);
|
|
30
31
|
__exportStar(require("./queuing-system-enum"), exports);
|
|
31
32
|
__exportStar(require("./route-method-enum"), exports);
|
|
32
33
|
__exportStar(require("./route-query-param-type-enum"), exports);
|
|
33
34
|
__exportStar(require("./search-result-type-enum"), exports);
|
|
35
|
+
__exportStar(require("./sort-direction-enum"), exports);
|
|
36
|
+
__exportStar(require("./store-system-enum"), exports);
|
|
34
37
|
__exportStar(require("./story-status-enum"), exports);
|
|
35
38
|
__exportStar(require("./user-role-enum"), exports);
|
|
36
39
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,sDAAoC;AACpC,yDAAuC;AACvC,+EAA6D;AAC7D,8DAA4C;AAC5C,2DAAyC;AACzC,4DAA0C;AAC1C,wDAAsC;AACtC,yEAAuD;AACvD,iEAA+C;AAC/C,8DAA4C;AAC5C,mDAAiC;AACjC,yDAAuC;AACvC,wDAAsC;AACtC,sDAAoC;AACpC,gEAA8C;AAC9C,4DAA0C;AAC1C,sDAAoC;AACpC,mDAAiC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,sDAAoC;AACpC,yDAAuC;AACvC,+EAA6D;AAC7D,8DAA4C;AAC5C,2DAAyC;AACzC,4DAA0C;AAC1C,wDAAsC;AACtC,yEAAuD;AACvD,iEAA+C;AAC/C,8DAA4C;AAC5C,mDAAiC;AACjC,kDAAgC;AAChC,yDAAuC;AACvC,wDAAsC;AACtC,sDAAoC;AACpC,gEAA8C;AAC9C,4DAA0C;AAC1C,wDAAsC;AACtC,sDAAoC;AACpC,sDAAoC;AACpC,mDAAiC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EnumHelper } from '@my-devkit/core';
|
|
2
|
+
export declare enum Operator {
|
|
3
|
+
Equals = "equals",
|
|
4
|
+
NotEquals = "not-equals",
|
|
5
|
+
In = "in",
|
|
6
|
+
NotIn = "not-in",
|
|
7
|
+
AtLeast = "at-least",
|
|
8
|
+
AtMost = "at-most",
|
|
9
|
+
GreaterThan = "greater-than",
|
|
10
|
+
LowerThan = "lower-than",
|
|
11
|
+
IsDefined = "is-defined",
|
|
12
|
+
IsNotDefined = "is-not-defined",
|
|
13
|
+
IsNull = "is-null",
|
|
14
|
+
IsNotNull = "is-not-null",
|
|
15
|
+
ArrayContains = "array-contains",
|
|
16
|
+
PartialArrayContains = "partial-array-contains"
|
|
17
|
+
}
|
|
18
|
+
declare class OperatorHelper extends EnumHelper<Operator> {
|
|
19
|
+
getLabel(operator: Operator): string;
|
|
20
|
+
hasValue(operator: Operator): boolean;
|
|
21
|
+
hasMultipleValues(operator: Operator): boolean;
|
|
22
|
+
hasObjectValue(operator: Operator): boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare namespace Operator {
|
|
25
|
+
const helper: OperatorHelper;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Operator = void 0;
|
|
4
|
+
const core_1 = require("@my-devkit/core");
|
|
5
|
+
var Operator;
|
|
6
|
+
(function (Operator) {
|
|
7
|
+
Operator["Equals"] = "equals";
|
|
8
|
+
Operator["NotEquals"] = "not-equals";
|
|
9
|
+
Operator["In"] = "in";
|
|
10
|
+
Operator["NotIn"] = "not-in";
|
|
11
|
+
Operator["AtLeast"] = "at-least";
|
|
12
|
+
Operator["AtMost"] = "at-most";
|
|
13
|
+
Operator["GreaterThan"] = "greater-than";
|
|
14
|
+
Operator["LowerThan"] = "lower-than";
|
|
15
|
+
Operator["IsDefined"] = "is-defined";
|
|
16
|
+
Operator["IsNotDefined"] = "is-not-defined";
|
|
17
|
+
Operator["IsNull"] = "is-null";
|
|
18
|
+
Operator["IsNotNull"] = "is-not-null";
|
|
19
|
+
Operator["ArrayContains"] = "array-contains";
|
|
20
|
+
Operator["PartialArrayContains"] = "partial-array-contains";
|
|
21
|
+
})(Operator || (exports.Operator = Operator = {}));
|
|
22
|
+
class OperatorHelper extends core_1.EnumHelper {
|
|
23
|
+
getLabel(operator) {
|
|
24
|
+
switch (operator) {
|
|
25
|
+
case Operator.Equals:
|
|
26
|
+
return '=';
|
|
27
|
+
case Operator.NotEquals:
|
|
28
|
+
return '≠';
|
|
29
|
+
case Operator.In:
|
|
30
|
+
return 'In';
|
|
31
|
+
case Operator.NotIn:
|
|
32
|
+
return 'Not in';
|
|
33
|
+
case Operator.AtLeast:
|
|
34
|
+
return '≥';
|
|
35
|
+
case Operator.AtMost:
|
|
36
|
+
return '≤';
|
|
37
|
+
case Operator.GreaterThan:
|
|
38
|
+
return '>';
|
|
39
|
+
case Operator.LowerThan:
|
|
40
|
+
return '<';
|
|
41
|
+
case Operator.IsDefined:
|
|
42
|
+
return 'Is defined';
|
|
43
|
+
case Operator.IsNotDefined:
|
|
44
|
+
return 'Is not defined';
|
|
45
|
+
case Operator.IsNull:
|
|
46
|
+
return 'Is null';
|
|
47
|
+
case Operator.IsNotNull:
|
|
48
|
+
return 'Is not null';
|
|
49
|
+
case Operator.ArrayContains:
|
|
50
|
+
return 'Array contains';
|
|
51
|
+
case Operator.PartialArrayContains:
|
|
52
|
+
return 'Partial array contains';
|
|
53
|
+
default:
|
|
54
|
+
return operator;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
hasValue(operator) {
|
|
58
|
+
return ![Operator.IsDefined, Operator.IsNotDefined, Operator.IsNull, Operator.IsNotNull].includes(operator);
|
|
59
|
+
}
|
|
60
|
+
hasMultipleValues(operator) {
|
|
61
|
+
return [Operator.In, Operator.NotIn].includes(operator);
|
|
62
|
+
}
|
|
63
|
+
hasObjectValue(operator) {
|
|
64
|
+
return [Operator.PartialArrayContains].includes(operator);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
(function (Operator) {
|
|
68
|
+
Operator.helper = new OperatorHelper('Operator', [
|
|
69
|
+
Operator.Equals,
|
|
70
|
+
Operator.NotEquals,
|
|
71
|
+
Operator.In,
|
|
72
|
+
Operator.NotIn,
|
|
73
|
+
Operator.AtLeast,
|
|
74
|
+
Operator.AtMost,
|
|
75
|
+
Operator.GreaterThan,
|
|
76
|
+
Operator.LowerThan,
|
|
77
|
+
Operator.IsDefined,
|
|
78
|
+
Operator.IsNotDefined,
|
|
79
|
+
Operator.IsNull,
|
|
80
|
+
Operator.IsNotNull,
|
|
81
|
+
Operator.ArrayContains,
|
|
82
|
+
Operator.PartialArrayContains,
|
|
83
|
+
]);
|
|
84
|
+
})(Operator || (exports.Operator = Operator = {}));
|
|
85
|
+
//# sourceMappingURL=operator-enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operator-enum.js","sourceRoot":"","sources":["../src/operator-enum.ts"],"names":[],"mappings":";;;AAAA,0CAA6C;AAE7C,IAAY,QAeX;AAfD,WAAY,QAAQ;IAChB,6BAAiB,CAAA;IACjB,oCAAwB,CAAA;IACxB,qBAAS,CAAA;IACT,4BAAgB,CAAA;IAChB,gCAAoB,CAAA;IACpB,8BAAkB,CAAA;IAClB,wCAA4B,CAAA;IAC5B,oCAAwB,CAAA;IACxB,oCAAwB,CAAA;IACxB,2CAA+B,CAAA;IAC/B,8BAAkB,CAAA;IAClB,qCAAyB,CAAA;IACzB,4CAAgC,CAAA;IAChC,2DAA+C,CAAA;AACnD,CAAC,EAfW,QAAQ,wBAAR,QAAQ,QAenB;AAED,MAAM,cAAe,SAAQ,iBAAoB;IACtC,QAAQ,CAAC,QAAkB;QAC9B,QAAQ,QAAQ,EAAE;YACd,KAAK,QAAQ,CAAC,MAAM;gBAChB,OAAO,GAAG,CAAC;YACf,KAAK,QAAQ,CAAC,SAAS;gBACnB,OAAO,GAAG,CAAC;YACf,KAAK,QAAQ,CAAC,EAAE;gBACZ,OAAO,IAAI,CAAC;YAChB,KAAK,QAAQ,CAAC,KAAK;gBACf,OAAO,QAAQ,CAAC;YACpB,KAAK,QAAQ,CAAC,OAAO;gBACjB,OAAO,GAAG,CAAC;YACf,KAAK,QAAQ,CAAC,MAAM;gBAChB,OAAO,GAAG,CAAC;YACf,KAAK,QAAQ,CAAC,WAAW;gBACrB,OAAO,GAAG,CAAC;YACf,KAAK,QAAQ,CAAC,SAAS;gBACnB,OAAO,GAAG,CAAC;YACf,KAAK,QAAQ,CAAC,SAAS;gBACnB,OAAO,YAAY,CAAC;YACxB,KAAK,QAAQ,CAAC,YAAY;gBACtB,OAAO,gBAAgB,CAAC;YAC5B,KAAK,QAAQ,CAAC,MAAM;gBAChB,OAAO,SAAS,CAAC;YACrB,KAAK,QAAQ,CAAC,SAAS;gBACnB,OAAO,aAAa,CAAC;YACzB,KAAK,QAAQ,CAAC,aAAa;gBACvB,OAAO,gBAAgB,CAAC;YAC5B,KAAK,QAAQ,CAAC,oBAAoB;gBAC9B,OAAO,wBAAwB,CAAC;YAEpC;gBACI,OAAO,QAAQ,CAAC;SACvB;IACL,CAAC;IAEM,QAAQ,CAAC,QAAkB;QAC9B,OAAO,CAAC,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAChH,CAAC;IAEM,iBAAiB,CAAC,QAAkB;QACvC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAEM,cAAc,CAAC,QAAkB;QACpC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC9D,CAAC;CACJ;AAED,WAAiB,QAAQ;IACR,eAAM,GAAG,IAAI,cAAc,CAAC,UAAU,EAAE;QACjD,QAAQ,CAAC,MAAM;QACf,QAAQ,CAAC,SAAS;QAClB,QAAQ,CAAC,EAAE;QACX,QAAQ,CAAC,KAAK;QACd,QAAQ,CAAC,OAAO;QAChB,QAAQ,CAAC,MAAM;QACf,QAAQ,CAAC,WAAW;QACpB,QAAQ,CAAC,SAAS;QAClB,QAAQ,CAAC,SAAS;QAClB,QAAQ,CAAC,YAAY;QACrB,QAAQ,CAAC,MAAM;QACf,QAAQ,CAAC,SAAS;QAClB,QAAQ,CAAC,aAAa;QACtB,QAAQ,CAAC,oBAAoB;KAChC,CAAC,CAAC;AACP,CAAC,EAjBgB,QAAQ,wBAAR,QAAQ,QAiBxB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EnumHelper } from '@my-devkit/core';
|
|
2
|
+
export declare enum SortDirection {
|
|
3
|
+
Ascending = "ASC",
|
|
4
|
+
Descending = "DESC"
|
|
5
|
+
}
|
|
6
|
+
declare class SortDirectionHelper extends EnumHelper<SortDirection> {
|
|
7
|
+
toggle(direction: SortDirection): SortDirection;
|
|
8
|
+
getIcon(direction: SortDirection): string;
|
|
9
|
+
}
|
|
10
|
+
export declare namespace SortDirection {
|
|
11
|
+
const helper: SortDirectionHelper;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SortDirection = void 0;
|
|
4
|
+
const core_1 = require("@my-devkit/core");
|
|
5
|
+
var SortDirection;
|
|
6
|
+
(function (SortDirection) {
|
|
7
|
+
SortDirection["Ascending"] = "ASC";
|
|
8
|
+
SortDirection["Descending"] = "DESC";
|
|
9
|
+
})(SortDirection || (exports.SortDirection = SortDirection = {}));
|
|
10
|
+
class SortDirectionHelper extends core_1.EnumHelper {
|
|
11
|
+
toggle(direction) {
|
|
12
|
+
return direction === SortDirection.Descending ? SortDirection.Ascending : SortDirection.Descending;
|
|
13
|
+
}
|
|
14
|
+
getIcon(direction) {
|
|
15
|
+
return direction === SortDirection.Descending ? 'sort-descending' : 'sort-ascending';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
(function (SortDirection) {
|
|
19
|
+
SortDirection.helper = new SortDirectionHelper('SortDirection', [
|
|
20
|
+
SortDirection.Ascending,
|
|
21
|
+
SortDirection.Descending,
|
|
22
|
+
]);
|
|
23
|
+
})(SortDirection || (exports.SortDirection = SortDirection = {}));
|
|
24
|
+
//# sourceMappingURL=sort-direction-enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sort-direction-enum.js","sourceRoot":"","sources":["../src/sort-direction-enum.ts"],"names":[],"mappings":";;;AAAA,0CAA6C;AAE7C,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;AACvB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED,MAAM,mBAAoB,SAAQ,iBAAyB;IAChD,MAAM,CAAC,SAAwB;QAClC,OAAO,SAAS,KAAK,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC;IACvG,CAAC;IAEM,OAAO,CAAC,SAAwB;QACnC,OAAO,SAAS,KAAK,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,gBAAgB,CAAC;IACzF,CAAC;CACJ;AAED,WAAiB,aAAa;IACb,oBAAM,GAAG,IAAI,mBAAmB,CAAC,eAAe,EAAE;QAC3D,aAAa,CAAC,SAAS;QACvB,aAAa,CAAC,UAAU;KAC3B,CAAC,CAAC;AACP,CAAC,EALgB,aAAa,6BAAb,aAAa,QAK7B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StoreSystem = void 0;
|
|
4
|
+
const core_1 = require("@my-devkit/core");
|
|
5
|
+
var StoreSystem;
|
|
6
|
+
(function (StoreSystem) {
|
|
7
|
+
StoreSystem["None"] = "None";
|
|
8
|
+
StoreSystem["AzureCosmosDB"] = "AzureCosmosDB";
|
|
9
|
+
})(StoreSystem || (exports.StoreSystem = StoreSystem = {}));
|
|
10
|
+
(function (StoreSystem) {
|
|
11
|
+
StoreSystem.helper = new core_1.EnumHelper('StoreSystem', [
|
|
12
|
+
StoreSystem.None,
|
|
13
|
+
StoreSystem.AzureCosmosDB,
|
|
14
|
+
]);
|
|
15
|
+
})(StoreSystem || (exports.StoreSystem = StoreSystem = {}));
|
|
16
|
+
//# sourceMappingURL=store-system-enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-system-enum.js","sourceRoot":"","sources":["../src/store-system-enum.ts"],"names":[],"mappings":";;;AAAA,0CAA6C;AAE7C,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,4BAAa,CAAA;IACb,8CAA+B,CAAA;AACnC,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,WAAiB,WAAW;IACX,kBAAM,GAAG,IAAI,iBAAU,CAAC,aAAa,EAAE;QAChD,WAAW,CAAC,IAAI;QAChB,WAAW,CAAC,aAAa;KAC5B,CAAC,CAAC;AACP,CAAC,EALgB,WAAW,2BAAX,WAAW,QAK3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@we-scrum/enums",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.69",
|
|
4
4
|
"description": "We-Scrum enums",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"author": "",
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@my-devkit/core": "1.0.
|
|
18
|
+
"@my-devkit/core": "1.0.103"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@my-devkit/cli": "2.0.6",
|
|
22
|
-
"@my-devkit/core": "1.0.
|
|
22
|
+
"@my-devkit/core": "1.0.103",
|
|
23
23
|
"typescript": "5.2.2"
|
|
24
24
|
}
|
|
25
25
|
}
|
package/src/index.ts
CHANGED
|
@@ -10,11 +10,13 @@ export * from './monitoring-alert-severity-level-enum';
|
|
|
10
10
|
export * from './monitoring-alert-status-enum';
|
|
11
11
|
export * from './object-property-type-enum';
|
|
12
12
|
export * from './operation-enum';
|
|
13
|
+
export * from './operator-enum';
|
|
13
14
|
export * from './progress-status-enum';
|
|
14
15
|
export * from './queuing-system-enum';
|
|
15
16
|
export * from './route-method-enum';
|
|
16
17
|
export * from './route-query-param-type-enum';
|
|
17
18
|
export * from './search-result-type-enum';
|
|
19
|
+
export * from './sort-direction-enum';
|
|
20
|
+
export * from './store-system-enum';
|
|
18
21
|
export * from './story-status-enum';
|
|
19
22
|
export * from './user-role-enum';
|
|
20
|
-
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { EnumHelper } from '@my-devkit/core';
|
|
2
|
+
|
|
3
|
+
export enum Operator {
|
|
4
|
+
Equals = 'equals',
|
|
5
|
+
NotEquals = 'not-equals',
|
|
6
|
+
In = 'in',
|
|
7
|
+
NotIn = 'not-in',
|
|
8
|
+
AtLeast = 'at-least',
|
|
9
|
+
AtMost = 'at-most',
|
|
10
|
+
GreaterThan = 'greater-than',
|
|
11
|
+
LowerThan = 'lower-than',
|
|
12
|
+
IsDefined = 'is-defined',
|
|
13
|
+
IsNotDefined = 'is-not-defined',
|
|
14
|
+
IsNull = 'is-null',
|
|
15
|
+
IsNotNull = 'is-not-null',
|
|
16
|
+
ArrayContains = 'array-contains',
|
|
17
|
+
PartialArrayContains = 'partial-array-contains',
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
class OperatorHelper extends EnumHelper<Operator> {
|
|
21
|
+
public getLabel(operator: Operator): string {
|
|
22
|
+
switch (operator) {
|
|
23
|
+
case Operator.Equals:
|
|
24
|
+
return '=';
|
|
25
|
+
case Operator.NotEquals:
|
|
26
|
+
return '≠';
|
|
27
|
+
case Operator.In:
|
|
28
|
+
return 'In';
|
|
29
|
+
case Operator.NotIn:
|
|
30
|
+
return 'Not in';
|
|
31
|
+
case Operator.AtLeast:
|
|
32
|
+
return '≥';
|
|
33
|
+
case Operator.AtMost:
|
|
34
|
+
return '≤';
|
|
35
|
+
case Operator.GreaterThan:
|
|
36
|
+
return '>';
|
|
37
|
+
case Operator.LowerThan:
|
|
38
|
+
return '<';
|
|
39
|
+
case Operator.IsDefined:
|
|
40
|
+
return 'Is defined';
|
|
41
|
+
case Operator.IsNotDefined:
|
|
42
|
+
return 'Is not defined';
|
|
43
|
+
case Operator.IsNull:
|
|
44
|
+
return 'Is null';
|
|
45
|
+
case Operator.IsNotNull:
|
|
46
|
+
return 'Is not null';
|
|
47
|
+
case Operator.ArrayContains:
|
|
48
|
+
return 'Array contains';
|
|
49
|
+
case Operator.PartialArrayContains:
|
|
50
|
+
return 'Partial array contains';
|
|
51
|
+
|
|
52
|
+
default:
|
|
53
|
+
return operator;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public hasValue(operator: Operator): boolean {
|
|
58
|
+
return ![Operator.IsDefined, Operator.IsNotDefined, Operator.IsNull, Operator.IsNotNull].includes(operator);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public hasMultipleValues(operator: Operator): boolean {
|
|
62
|
+
return [Operator.In, Operator.NotIn].includes(operator);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
public hasObjectValue(operator: Operator): boolean {
|
|
66
|
+
return [Operator.PartialArrayContains].includes(operator);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export namespace Operator {
|
|
71
|
+
export const helper = new OperatorHelper('Operator', [
|
|
72
|
+
Operator.Equals,
|
|
73
|
+
Operator.NotEquals,
|
|
74
|
+
Operator.In,
|
|
75
|
+
Operator.NotIn,
|
|
76
|
+
Operator.AtLeast,
|
|
77
|
+
Operator.AtMost,
|
|
78
|
+
Operator.GreaterThan,
|
|
79
|
+
Operator.LowerThan,
|
|
80
|
+
Operator.IsDefined,
|
|
81
|
+
Operator.IsNotDefined,
|
|
82
|
+
Operator.IsNull,
|
|
83
|
+
Operator.IsNotNull,
|
|
84
|
+
Operator.ArrayContains,
|
|
85
|
+
Operator.PartialArrayContains,
|
|
86
|
+
]);
|
|
87
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EnumHelper } from '@my-devkit/core';
|
|
2
|
+
|
|
3
|
+
export enum SortDirection {
|
|
4
|
+
Ascending = 'ASC',
|
|
5
|
+
Descending = 'DESC'
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
class SortDirectionHelper extends EnumHelper<SortDirection> {
|
|
9
|
+
public toggle(direction: SortDirection): SortDirection {
|
|
10
|
+
return direction === SortDirection.Descending ? SortDirection.Ascending : SortDirection.Descending;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public getIcon(direction: SortDirection): string {
|
|
14
|
+
return direction === SortDirection.Descending ? 'sort-descending' : 'sort-ascending';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export namespace SortDirection {
|
|
19
|
+
export const helper = new SortDirectionHelper('SortDirection', [
|
|
20
|
+
SortDirection.Ascending,
|
|
21
|
+
SortDirection.Descending,
|
|
22
|
+
]);
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EnumHelper } from '@my-devkit/core';
|
|
2
|
+
|
|
3
|
+
export enum StoreSystem {
|
|
4
|
+
None = 'None',
|
|
5
|
+
AzureCosmosDB = 'AzureCosmosDB',
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export namespace StoreSystem {
|
|
9
|
+
export const helper = new EnumHelper('StoreSystem', [
|
|
10
|
+
StoreSystem.None,
|
|
11
|
+
StoreSystem.AzureCosmosDB,
|
|
12
|
+
]);
|
|
13
|
+
}
|