heartraite 1.0.46 → 1.0.48

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,3 +1,6 @@
1
+ export declare enum AssessmentVersion {
2
+ V1_0 = "1.0"
3
+ }
1
4
  export declare enum PLSAgeInterval {
2
5
  EIGHTEEN_TO_TWENTY_FOUR = "18-24",
3
6
  TWENTY_FIVE_TO_THIRTY_ONE = "25-31",
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PLSRelationshipStatus = exports.PLSRelationshipDuration = exports.PLSAgeInterval = void 0;
3
+ exports.PLSRelationshipStatus = exports.PLSRelationshipDuration = exports.PLSAgeInterval = exports.AssessmentVersion = void 0;
4
+ var AssessmentVersion;
5
+ (function (AssessmentVersion) {
6
+ AssessmentVersion["V1_0"] = "1.0";
7
+ })(AssessmentVersion || (exports.AssessmentVersion = AssessmentVersion = {}));
4
8
  var PLSAgeInterval;
5
9
  (function (PLSAgeInterval) {
6
10
  PLSAgeInterval["EIGHTEEN_TO_TWENTY_FOUR"] = "18-24";
@@ -1,4 +1,5 @@
1
- import { PLSAgeInterval, PLSRelationshipDuration, PLSRelationshipStatus } from "../enum";
1
+ import { Gender, PLSAgeInterval, PLSRelationshipDuration, PLSRelationshipStatus } from "../enum";
2
+ export declare function translateGender(gender: Gender): string;
2
3
  export declare function translateAgeInterval(ageInterval: PLSAgeInterval): string;
3
4
  export declare function translateRelationshipDuration(duration: PLSRelationshipDuration): string;
4
5
  export declare function translateRelationshipStatus(status: PLSRelationshipStatus): string;
@@ -1,9 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.translateGender = translateGender;
3
4
  exports.translateAgeInterval = translateAgeInterval;
4
5
  exports.translateRelationshipDuration = translateRelationshipDuration;
5
6
  exports.translateRelationshipStatus = translateRelationshipStatus;
6
7
  const enum_1 = require("../enum");
8
+ function translateGender(gender) {
9
+ switch (gender) {
10
+ case enum_1.Gender.MALE:
11
+ return "Man";
12
+ case enum_1.Gender.FEMALE:
13
+ return "Kvinna";
14
+ default:
15
+ return "Okänd";
16
+ }
17
+ }
7
18
  function translateAgeInterval(ageInterval) {
8
19
  switch (ageInterval) {
9
20
  case enum_1.PLSAgeInterval.EIGHTEEN_TO_TWENTY_FOUR:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartraite",
3
- "version": "1.0.46",
3
+ "version": "1.0.48",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,3 +1,7 @@
1
+ export enum AssessmentVersion {
2
+ V1_0 = "1.0",
3
+ }
4
+
1
5
  export enum PLSAgeInterval {
2
6
  EIGHTEEN_TO_TWENTY_FOUR = "18-24",
3
7
  TWENTY_FIVE_TO_THIRTY_ONE = "25-31",
@@ -1,9 +1,21 @@
1
1
  import {
2
+ Gender,
2
3
  PLSAgeInterval,
3
4
  PLSRelationshipDuration,
4
5
  PLSRelationshipStatus,
5
6
  } from "../enum";
6
7
 
8
+ export function translateGender(gender: Gender): string {
9
+ switch (gender) {
10
+ case Gender.MALE:
11
+ return "Man";
12
+ case Gender.FEMALE:
13
+ return "Kvinna";
14
+ default:
15
+ return "Okänd";
16
+ }
17
+ }
18
+
7
19
  export function translateAgeInterval(ageInterval: PLSAgeInterval): string {
8
20
  switch (ageInterval) {
9
21
  case PLSAgeInterval.EIGHTEEN_TO_TWENTY_FOUR: