Socket
Socket
Sign inDemoInstall

@lighthouse/common

Package Overview
Dependencies
Maintainers
15
Versions
461
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lighthouse/common - npm Package Compare versions

Comparing version 4.25.0 to 4.25.1-canary.1464

13

dist/pdf/helpers/fields/index.js

@@ -232,3 +232,4 @@ "use strict";

const is24HourTimeField = fieldtype === 'time' && options.format === 'HH:mm';
const isDisplayImageField = fieldtype === 'image-display' && showOnRead; // NOTE: only show field when show on read is true
const isDisplayImageField = fieldtype === 'image-display' && showOnRead;
const isReferenceField = fieldtype === 'reference'; // NOTE: only show field when show on read is true

@@ -323,2 +324,12 @@ if (!showOnRead) return null;

if (isReferenceField) {
const parsedValue = (0, _.parseValue)(value.label);
const displayValue = (0, _lodash.isArray)(parsedValue) ? {
text: (0, _lodash.join)(parsedValue, ', ')
} : {
text: parsedValue
};
return [labelText, displayValue];
}
if (isStarField) {

@@ -325,0 +336,0 @@ if (!value) return [labelText, ''];

23

lib/pdf/helpers/fields/index.js

@@ -214,3 +214,4 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";

var is24HourTimeField = fieldtype === 'time' && options.format === 'HH:mm';
var isDisplayImageField = fieldtype === 'image-display' && showOnRead; // NOTE: only show field when show on read is true
var isDisplayImageField = fieldtype === 'image-display' && showOnRead;
var isReferenceField = fieldtype === 'reference'; // NOTE: only show field when show on read is true

@@ -327,8 +328,20 @@ if (!showOnRead) return null;

if (isReferenceField) {
var _parsedValue = parseValue(value.label);
var _displayValue3 = isArray(_parsedValue) ? {
text: join(_parsedValue, ', ')
} : {
text: _parsedValue
};
return [labelText, _displayValue3];
}
if (isStarField) {
if (!value) return [labelText, ''];
var _displayValue3 = value === '1' ? "".concat(value, " star") : "".concat(value, " stars");
var _displayValue4 = value === '1' ? "".concat(value, " star") : "".concat(value, " stars");
return [labelText, _displayValue3];
return [labelText, _displayValue4];
}

@@ -339,5 +352,5 @@

var _displayValue4 = value ? moment(value).tz(timezone).format(format) : '';
var _displayValue5 = value ? moment(value).tz(timezone).format(format) : '';
return [labelText, _displayValue4];
return [labelText, _displayValue5];
} // NOTE: if no match above null values will be stripped within calling fn

@@ -344,0 +357,0 @@

{
"name": "@lighthouse/common",
"version": "4.25.0",
"version": "4.25.1-canary.1464",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc