@we-scrum/enums 1.0.42 → 1.0.44

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.
@@ -0,0 +1,14 @@
1
+ import { EnumHelper } from '@my-devkit/core';
2
+ export declare enum EnvironmentCategory {
3
+ Development = "Development",
4
+ Staging = "Staging",
5
+ Production = "Production"
6
+ }
7
+ declare class EnvironmentCategoryHelper extends EnumHelper<EnvironmentCategory> {
8
+ getPriority(category: EnvironmentCategory): number;
9
+ getIcon(category: EnvironmentCategory): string;
10
+ }
11
+ export declare namespace EnvironmentCategory {
12
+ const helper: EnvironmentCategoryHelper;
13
+ }
14
+ export {};
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.EnvironmentCategory = void 0;
19
+ var core_1 = require("@my-devkit/core");
20
+ var EnvironmentCategory;
21
+ (function (EnvironmentCategory) {
22
+ EnvironmentCategory["Development"] = "Development";
23
+ EnvironmentCategory["Staging"] = "Staging";
24
+ EnvironmentCategory["Production"] = "Production";
25
+ })(EnvironmentCategory = exports.EnvironmentCategory || (exports.EnvironmentCategory = {}));
26
+ var EnvironmentCategoryHelper = /** @class */ (function (_super) {
27
+ __extends(EnvironmentCategoryHelper, _super);
28
+ function EnvironmentCategoryHelper() {
29
+ return _super !== null && _super.apply(this, arguments) || this;
30
+ }
31
+ EnvironmentCategoryHelper.prototype.getPriority = function (category) {
32
+ switch (category) {
33
+ case EnvironmentCategory.Production:
34
+ return 1;
35
+ case EnvironmentCategory.Staging:
36
+ return 2;
37
+ case EnvironmentCategory.Development:
38
+ return 3;
39
+ default:
40
+ throw new Error("category ".concat(category, " not handled"));
41
+ }
42
+ };
43
+ EnvironmentCategoryHelper.prototype.getIcon = function (category) {
44
+ switch (category) {
45
+ case EnvironmentCategory.Production:
46
+ return 'shield-star-outline';
47
+ case EnvironmentCategory.Staging:
48
+ return 'code-tags-check';
49
+ case EnvironmentCategory.Development:
50
+ return 'code-tags';
51
+ default:
52
+ throw new Error("category ".concat(category, " not handled"));
53
+ }
54
+ };
55
+ return EnvironmentCategoryHelper;
56
+ }(core_1.EnumHelper));
57
+ (function (EnvironmentCategory) {
58
+ EnvironmentCategory.helper = new EnvironmentCategoryHelper('EnvironmentCategory', [
59
+ EnvironmentCategory.Development,
60
+ EnvironmentCategory.Staging,
61
+ EnvironmentCategory.Production
62
+ ]);
63
+ })(EnvironmentCategory = exports.EnvironmentCategory || (exports.EnvironmentCategory = {}));
64
+ //# sourceMappingURL=environment-category-enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment-category-enum.js","sourceRoot":"","sources":["../src/environment-category-enum.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,wCAA6C;AAE7C,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC3B,kDAA2B,CAAA;IAC3B,0CAAmB,CAAA;IACnB,gDAAyB,CAAA;AAC7B,CAAC,EAJW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAI9B;AAED;IAAwC,6CAA+B;IAAvE;;IA6BA,CAAC;IA3BU,+CAAW,GAAlB,UAAmB,QAA6B;QAC5C,QAAQ,QAAQ,EAAE;YACd,KAAK,mBAAmB,CAAC,UAAU;gBAC/B,OAAO,CAAC,CAAC;YACb,KAAK,mBAAmB,CAAC,OAAO;gBAC5B,OAAO,CAAC,CAAC;YACb,KAAK,mBAAmB,CAAC,WAAW;gBAChC,OAAO,CAAC,CAAC;YAEb;gBACI,MAAM,IAAI,KAAK,CAAC,mBAAY,QAAQ,iBAAc,CAAC,CAAC;SAC3D;IACL,CAAC;IAEM,2CAAO,GAAd,UAAe,QAA6B;QACxC,QAAQ,QAAQ,EAAE;YACd,KAAK,mBAAmB,CAAC,UAAU;gBAC/B,OAAO,qBAAqB,CAAC;YACjC,KAAK,mBAAmB,CAAC,OAAO;gBAC5B,OAAO,iBAAiB,CAAC;YAC7B,KAAK,mBAAmB,CAAC,WAAW;gBAChC,OAAO,WAAW,CAAC;YAEvB;gBACI,MAAM,IAAI,KAAK,CAAC,mBAAY,QAAQ,iBAAc,CAAC,CAAC;SAC3D;IACL,CAAC;IACL,gCAAC;AAAD,CAAC,AA7BD,CAAwC,iBAAU,GA6BjD;AAED,WAAiB,mBAAmB;IACnB,0BAAM,GAAG,IAAI,yBAAyB,CAAC,qBAAqB,EAAE;QACvE,mBAAmB,CAAC,WAAW;QAC/B,mBAAmB,CAAC,OAAO;QAC3B,mBAAmB,CAAC,UAAU;KACjC,CAAC,CAAC;AACP,CAAC,EANgB,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAMnC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './content-type-enum';
2
2
  export * from './crafting-master-enum';
3
+ export * from './environment-category-enum';
3
4
  export * from './object-property-type-enum';
4
5
  export * from './operation-enum';
5
6
  export * from './progress-status-enum';
package/dist/index.js CHANGED
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./content-type-enum"), exports);
18
18
  __exportStar(require("./crafting-master-enum"), exports);
19
+ __exportStar(require("./environment-category-enum"), exports);
19
20
  __exportStar(require("./object-property-type-enum"), exports);
20
21
  __exportStar(require("./operation-enum"), exports);
21
22
  __exportStar(require("./progress-status-enum"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,yDAAuC;AACvC,8DAA4C;AAC5C,mDAAiC;AACjC,yDAAuC;AACvC,sDAAoC;AACpC,gEAA8C;AAC9C,4DAA0C;AAC1C,sDAAoC;AACpC,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,yDAAuC;AACvC,8DAA4C;AAC5C,8DAA4C;AAC5C,mDAAiC;AACjC,yDAAuC;AACvC,sDAAoC;AACpC,gEAA8C;AAC9C,4DAA0C;AAC1C,sDAAoC;AACpC,mDAAiC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@we-scrum/enums",
3
- "version": "1.0.42",
3
+ "version": "1.0.44",
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.84"
18
+ "@my-devkit/core": "1.0.85"
19
19
  },
20
20
  "devDependencies": {
21
- "@my-devkit/cli": "1.0.22",
22
- "@my-devkit/core": "1.0.84",
21
+ "@my-devkit/cli": "1.0.23",
22
+ "@my-devkit/core": "1.0.85",
23
23
  "typescript": "^4.5.2"
24
24
  }
25
25
  }
@@ -0,0 +1,46 @@
1
+ import { EnumHelper } from '@my-devkit/core';
2
+
3
+ export enum EnvironmentCategory {
4
+ Development = 'Development',
5
+ Staging = 'Staging',
6
+ Production = 'Production'
7
+ }
8
+
9
+ class EnvironmentCategoryHelper extends EnumHelper<EnvironmentCategory> {
10
+
11
+ public getPriority(category: EnvironmentCategory): number {
12
+ switch (category) {
13
+ case EnvironmentCategory.Production:
14
+ return 1;
15
+ case EnvironmentCategory.Staging:
16
+ return 2;
17
+ case EnvironmentCategory.Development:
18
+ return 3;
19
+
20
+ default:
21
+ throw new Error(`category ${category} not handled`);
22
+ }
23
+ }
24
+
25
+ public getIcon(category: EnvironmentCategory): string {
26
+ switch (category) {
27
+ case EnvironmentCategory.Production:
28
+ return 'shield-star-outline';
29
+ case EnvironmentCategory.Staging:
30
+ return 'code-tags-check';
31
+ case EnvironmentCategory.Development:
32
+ return 'code-tags';
33
+
34
+ default:
35
+ throw new Error(`category ${category} not handled`);
36
+ }
37
+ }
38
+ }
39
+
40
+ export namespace EnvironmentCategory {
41
+ export const helper = new EnvironmentCategoryHelper('EnvironmentCategory', [
42
+ EnvironmentCategory.Development,
43
+ EnvironmentCategory.Staging,
44
+ EnvironmentCategory.Production
45
+ ]);
46
+ }
package/src/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './content-type-enum';
2
2
  export * from './crafting-master-enum';
3
+ export * from './environment-category-enum';
3
4
  export * from './object-property-type-enum';
4
5
  export * from './operation-enum';
5
6
  export * from './progress-status-enum';
@@ -8,3 +9,4 @@ export * from './route-query-param-type-enum';
8
9
  export * from './search-result-type-enum';
9
10
  export * from './story-status-enum';
10
11
  export * from './user-role-enum';
12
+