@raytio/decrypt-helper 3.0.0 → 3.0.1

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/CHANGELOG.md CHANGED
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## 3.0.1 (2022-02-15)
11
+
12
+ - fix bug with PDF generation
13
+
10
14
  ## 3.0.0 (2022-02-04)
11
15
 
12
16
  - 💥 BREAKING CHANGE: renamed the `USERNAME` & `PASSWORD` environment variables to `RAYTIO_USERNAME` & `RAYTIO_PASSWORD`
@@ -19,13 +19,13 @@ const Table = ({ POs, files, config, }) => {
19
19
  const fileNIds = POs.filter(helpers_1.isPOFile).map((x) => x.$nId);
20
20
  if (fileNIds.length)
21
21
  return jsx_pdf_1.default.createElement(Images_1.Images, { nIds: fileNIds, files: files });
22
- const imageFieldNames = fieldNames.filter((fieldName) => POs.map((PO) => PO.$properties[fieldName].value).some(helpers_1.isFieldValueFile));
22
+ const imageFieldNames = fieldNames.filter((fieldName) => POs.map((PO) => { var _a; return (_a = PO.$properties[fieldName]) === null || _a === void 0 ? void 0 : _a.value; }).some(helpers_1.isFieldValueFile));
23
23
  return (jsx_pdf_1.default.createElement("table", { layout: "noBorders" }, fieldNames.map((fieldName) => {
24
24
  var _a;
25
25
  return (jsx_pdf_1.default.createElement("row", null,
26
26
  jsx_pdf_1.default.createElement("cell", null,
27
27
  jsx_pdf_1.default.createElement("text", { color: "#12130e" }, ((_a = POs.find((PO) => PO.$properties[fieldName])) === null || _a === void 0 ? void 0 : _a.$properties[fieldName].title) || fieldName)),
28
- POs.flatMap((PO) => {
28
+ POs.filter((PO) => PO.$properties[fieldName]).flatMap((PO) => {
29
29
  (0, helpers_1.assertSafeProperty)(fieldName);
30
30
  const { value, verification } = PO.$properties[fieldName];
31
31
  const color = (0, general_1.verifyColour)(verification);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raytio/decrypt-helper",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "author": "Raytio",
5
5
  "description": "A helper to decrypt data shared by Raytio users",
6
6
  "main": "dist",