New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@contrail/document-generation

Package Overview
Dependencies
Maintainers
9
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrail/document-generation - npm Package Compare versions

Comparing version 1.0.13 to 1.0.14

lib/util/document-text-element-util.d.ts

1

lib/util/document-property-util.d.ts

@@ -7,3 +7,2 @@ import { DocumentPropertyDefinition } from "../interfaces";

static generatePropertyTextElement(model: any, property: DocumentPropertyDefinition, options: DocumentElement, formatter: PropertyValueFormatter, position: PositionDefinition, isComponent: boolean): DocumentElement;
private static generateTextElement;
}

@@ -5,4 +5,4 @@ "use strict";

const util_1 = require("@contrail/util");
const documents_1 = require("@contrail/documents");
const types_1 = require("@contrail/types");
const document_text_element_util_1 = require("./document-text-element-util");
class DocumentPropertyUtil {

@@ -32,3 +32,4 @@ static generatePropertyTextElements(data, properties, options, startingPosition, isComponent) {

const mergedOptions = util_1.ObjectUtil.mergeDeep(util_1.ObjectUtil.cloneDeep(options), { style: property.style || {} });
let element = this.generateTextElement(display, mergedOptions, position);
mergedOptions.position = position;
let element = document_text_element_util_1.DocumentTextElementUtil.generateTextElement(display, mergedOptions, !isComponent);
if (isComponent && property.includeLabel) {

@@ -44,27 +45,3 @@ element.label = (_a = property.propertyDefinition) === null || _a === void 0 ? void 0 : _a.label;

}
static generateTextElement(textValue, options, position) {
var _a, _b, _c;
const yPosition = position.y || 0;
const xPosition = position.x || 0;
const defaultStyle = {
font: {
size: 8,
},
color: 'rgba(0,0,0,.5)',
};
let style = options.style || defaultStyle;
if ((_a = options === null || options === void 0 ? void 0 : options.style) === null || _a === void 0 ? void 0 : _a.text) {
style.text = options.style.text;
}
let element = documents_1.DocumentElementFactory.createTextElement(textValue);
const height = ((_b = options.size) === null || _b === void 0 ? void 0 : _b.height) || 25;
const width = ((_c = options === null || options === void 0 ? void 0 : options.size) === null || _c === void 0 ? void 0 : _c.width) || 125;
element = Object.assign(element, {
position: { x: xPosition, y: yPosition },
size: { height, width },
style,
});
return element;
}
}
exports.DocumentPropertyUtil = DocumentPropertyUtil;
{
"name": "@contrail/document-generation",
"version": "1.0.13",
"version": "1.0.14",
"description": "Utilities for automatic generation of documents.",

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

Sorry, the diff of this file is too big to display

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