@raytio/decrypt-helper 6.3.1 → 6.3.2

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,38 +1,6 @@
1
- import en from "./translations/en.json";
1
+ declare const en: any;
2
2
  declare const locales: {
3
- readonly en: {
4
- "FieldVerification.Expired": string;
5
- "FieldVerification.NotVerified": string;
6
- "FieldVerification.Verified": string;
7
- "FieldVerification.VerifiedFalse": string;
8
- "Images.file-not-found": string;
9
- "POVerification.Encrypted": string;
10
- "POVerification.Expired": string;
11
- "POVerification.FullyVerified": string;
12
- "POVerification.Loading": string;
13
- "POVerification.NotVerified": string;
14
- "POVerification.PartiallyVerified": string;
15
- "POVerification.VerifiedFalse": string;
16
- "POVerificationBadge.safe-harbour-no": string;
17
- "POVerificationBadge.safe-harbour-yes": string;
18
- "POVerificationBadge.verified-by": string;
19
- "Report.footer-private": string;
20
- "Report.header": string;
21
- "Report.meta.title": string;
22
- "Report.pagecount": string;
23
- "ValidationDisplay.text": string;
24
- "VerifyBox.text": string;
25
- "constants.confirmation_code": string;
26
- "constants.end_date": string;
27
- "constants.i_id": string;
28
- "constants.reference": string;
29
- "constants.score": string;
30
- "constants.score-category": string;
31
- "constants.start_date": string;
32
- "field.boolean.no": string;
33
- "field.boolean.yes": string;
34
- "field.undefined": string;
35
- };
3
+ readonly en: any;
36
4
  };
37
5
  export type I18nKey = keyof typeof en;
38
6
  export type I18nLang = keyof typeof locales;
@@ -1,4 +1,7 @@
1
- import en from "./translations/en.json";
1
+ import { readFileSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ import { getDirname } from "../helpers/pathUtils.js";
4
+ const en = JSON.parse(readFileSync(join(getDirname(), "../locales/translations/en.json"), "utf8"));
2
5
  const locales = { en };
3
6
  export const isValidLocale = (lang) => lang in locales;
4
7
  export const $$ = (key, variables) => {
@@ -1,33 +1,33 @@
1
1
  {
2
- "FieldVerification.Expired": "Expired",
3
- "FieldVerification.NotVerified": "Not Verified",
4
- "FieldVerification.Verified": "Verified",
5
- "FieldVerification.VerifiedFalse": "Verified False",
6
- "Images.file-not-found": "File not found",
7
- "POVerification.Encrypted": "Encrypted",
8
- "POVerification.Expired": "Expired",
9
- "POVerification.FullyVerified": "Fully Verified",
10
- "POVerification.Loading": "Loading...",
11
- "POVerification.NotVerified": "Not Verified",
12
- "POVerification.PartiallyVerified": "Partially Verified",
13
- "POVerification.VerifiedFalse": "Verified False",
14
- "POVerificationBadge.safe-harbour-no": "Not Safe Harbour Compliant",
15
- "POVerificationBadge.safe-harbour-yes": "Safe Harbour Compliant",
16
- "POVerificationBadge.verified-by": "by {verifiedBy}",
17
- "Report.footer-private": "Private and Confidential",
18
- "Report.header": "{appName} Verification Report",
19
- "Report.meta.title": "{appName} Verification Report - {iId}",
20
- "Report.pagecount": "{currentPage} of {pageCount}",
21
- "ValidationDisplay.text": "Score: {n}/10",
22
- "VerifyBox.text": "To verify this submission, scan the QR Code or click here",
23
- "constants.confirmation_code": "Code",
24
- "constants.end_date": "Expiry Date",
25
- "constants.i_id": "Submission ID",
26
- "constants.reference": "Reference",
27
- "constants.score": "Score",
28
- "constants.score-category": "Score Category",
29
- "constants.start_date": "Date Shared",
30
- "field.boolean.no": "No",
31
- "field.boolean.yes": "Yes",
32
- "field.undefined": "N/A"
2
+ "FieldVerification.Expired": "Expired",
3
+ "FieldVerification.NotVerified": "Not Verified",
4
+ "FieldVerification.Verified": "Verified",
5
+ "FieldVerification.VerifiedFalse": "Verified False",
6
+ "Images.file-not-found": "File not found",
7
+ "POVerification.Encrypted": "Encrypted",
8
+ "POVerification.Expired": "Expired",
9
+ "POVerification.FullyVerified": "Fully Verified",
10
+ "POVerification.Loading": "Loading...",
11
+ "POVerification.NotVerified": "Not Verified",
12
+ "POVerification.PartiallyVerified": "Partially Verified",
13
+ "POVerification.VerifiedFalse": "Verified False",
14
+ "POVerificationBadge.safe-harbour-no": "Not Safe Harbour Compliant",
15
+ "POVerificationBadge.safe-harbour-yes": "Safe Harbour Compliant",
16
+ "POVerificationBadge.verified-by": "by {verifiedBy}",
17
+ "Report.footer-private": "Private and Confidential",
18
+ "Report.header": "{appName} Verification Report",
19
+ "Report.meta.title": "{appName} Verification Report - {iId}",
20
+ "Report.pagecount": "{currentPage} of {pageCount}",
21
+ "ValidationDisplay.text": "Score: {n}/10",
22
+ "VerifyBox.text": "To verify this submission, scan the QR Code or click here",
23
+ "constants.confirmation_code": "Code",
24
+ "constants.end_date": "Expiry Date",
25
+ "constants.i_id": "Submission ID",
26
+ "constants.reference": "Reference",
27
+ "constants.score": "Score",
28
+ "constants.score-category": "Score Category",
29
+ "constants.start_date": "Date Shared",
30
+ "field.boolean.no": "No",
31
+ "field.boolean.yes": "Yes",
32
+ "field.undefined": "N/A"
33
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raytio/decrypt-helper",
3
- "version": "6.3.1",
3
+ "version": "6.3.2",
4
4
  "author": "Raytio",
5
5
  "type": "module",
6
6
  "description": "A helper to decrypt data shared by Raytio users",
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "scripts": {
13
13
  "dev-pdf": "ts-node src/test/pdf",
14
- "build": "tsc && find dist -path \"*/__tests__*\" -delete && rm -rf dist/test",
14
+ "build": "tsc && find dist -path \"*/__tests__*\" -delete && rm -rf dist/test && cp -r src/locales/translations dist/locales/",
15
15
  "i18n": "react-intl-manager",
16
16
  "lint": "eslint --ext .js,.ts,.tsx --color --ignore-path .gitignore .",
17
17
  "test": "vitest"
@@ -30,10 +30,11 @@
30
30
  "jsx-pdf": "^2.3.0",
31
31
  "localstorage-polyfill": "^1.0.1",
32
32
  "mime-types": "^2.1.35",
33
- "pdfmake": "^0.2.10",
33
+ "pdfmake": "^0.1.59",
34
34
  "ramda": "^0.30.0"
35
35
  },
36
36
  "devDependencies": {
37
+ "@babel/plugin-transform-react-jsx": "^7.0.0",
37
38
  "@raytio/react-intl-manager": "^6.4.0",
38
39
  "@types/jest-image-snapshot": "^6.3.0",
39
40
  "@types/jsx-pdf": "^2.2.6",
@@ -44,7 +45,7 @@
44
45
  "@vitest/ui": "^1.2.2",
45
46
  "babel-preset-react-app": "^10.0.1",
46
47
  "dotenv": "^16.3.1",
47
- "eslint": "^8.55.0",
48
+ "eslint": "^8.57.0",
48
49
  "eslint-config-kyle": "^18.0.1",
49
50
  "eslint-plugin-jsx-a11y": "^6.8.0",
50
51
  "jest-image-snapshot": "^6.3.0",
@@ -102,4 +103,4 @@
102
103
  "codeQualityReport": "tmp/codequality.json",
103
104
  "moduleSourceName": false
104
105
  }
105
- }
106
+ }