Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@contrail/documents

Package Overview
Dependencies
Maintainers
9
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrail/documents - npm Package Compare versions

Comparing version 1.0.58 to 1.0.59

14

lib/document-element-property-binding-handler.js

@@ -12,3 +12,3 @@ "use strict";

static bindPropertiesToElement(element, model) {
var _a, _b, _c, _d, _e, _f, _g;
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
const localModel = Object.assign({}, model);

@@ -29,9 +29,15 @@ if (!element.propertyBindings) {

const content = (_e = model === null || model === void 0 ? void 0 : model.viewable) === null || _e === void 0 ? void 0 : _e.content;
if ((content === null || content === void 0 ? void 0 : content.length) > 0 && content[0].contentType === 'image/svg+xml') {
highResUrl = content[0].primaryFileUrl;
if ((content === null || content === void 0 ? void 0 : content.length) > 0) {
const primaryContent = content.find((c) => { var _a; return (c === null || c === void 0 ? void 0 : c.id) === ((_a = model === null || model === void 0 ? void 0 : model.viewable) === null || _a === void 0 ? void 0 : _a.primaryViewableId); });
if ((primaryContent === null || primaryContent === void 0 ? void 0 : primaryContent.contentType) === 'image/svg+xml') {
highResUrl = primaryContent.primaryFileUrl;
}
}
else if (((_f = model === null || model === void 0 ? void 0 : model.viewable) === null || _f === void 0 ? void 0 : _f.contentType) === 'image/svg+xml') {
highResUrl = (_g = model === null || model === void 0 ? void 0 : model.viewable) === null || _g === void 0 ? void 0 : _g.primaryFileUrl;
}
if (highResUrl) {
element.alternateUrls.highResolution = highResUrl;
}
let lowResUrl = ((_f = model === null || model === void 0 ? void 0 : model.viewable) === null || _f === void 0 ? void 0 : _f.smallViewableDownloadUrl) || ((_g = model === null || model === void 0 ? void 0 : model.viewable) === null || _g === void 0 ? void 0 : _g.smallViewableUrl);
let lowResUrl = ((_h = model === null || model === void 0 ? void 0 : model.viewable) === null || _h === void 0 ? void 0 : _h.smallViewableDownloadUrl) || ((_j = model === null || model === void 0 ? void 0 : model.viewable) === null || _j === void 0 ? void 0 : _j.smallViewableUrl);
if (lowResUrl) {

@@ -38,0 +44,0 @@ element.alternateUrls.lowResolution = lowResUrl;

{
"name": "@contrail/documents",
"version": "1.0.58",
"version": "1.0.59",
"description": "Documents library for contrail platform",

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

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