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

@contrail/documents

Package Overview
Dependencies
Maintainers
0
Versions
121
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

to
1.0.121

28

lib/document-element-factory.js

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

if (((_a = element === null || element === void 0 ? void 0 : element.elements) === null || _a === void 0 ? void 0 : _a.length) > 0) {
element.elements = element.elements.map((e) => {
element.elements = element.elements.map(e => {
e.id = (0, nanoid_1.nanoid)(16);

@@ -59,4 +59,6 @@ return e;

return DocumentElementFactory.createComponent(((_a = model === null || model === void 0 ? void 0 : model.color) === null || _a === void 0 ? void 0 : _a.primaryViewableId) ? 'pattern-view' : 'color-view', model, modelBindings, Object.assign({
size: components_1.COLOR_WIDTH + components_1.COLOR_PADDING * 2,
height: components_1.COLOR_WIDTH + components_1.COLOR_FONT_SIZE + components_1.COLOR_PADDING * 4,
size: {
width: components_1.COLOR_WIDTH + components_1.COLOR_PADDING * 2,
height: components_1.COLOR_WIDTH + components_1.COLOR_FONT_SIZE + components_1.COLOR_PADDING * 4,
},
}, options));

@@ -80,3 +82,3 @@ }

if (((_a = element === null || element === void 0 ? void 0 : element.elements) === null || _a === void 0 ? void 0 : _a.length) > 0) {
element.elements = element.elements.map((e) => {
element.elements = element.elements.map(e => {
e.id = (0, nanoid_1.nanoid)(16);

@@ -113,3 +115,3 @@ return e;

if (newElement.type === 'table') {
const oldChildElements = elements.filter((e) => e.tableId === element.id && ['cell', 'column', 'row'].indexOf(e.type) !== -1);
const oldChildElements = elements.filter(e => e.tableId === element.id && ['cell', 'column', 'row'].indexOf(e.type) !== -1);
let newTableElement, newChildElements = [];

@@ -125,3 +127,3 @@ try {

newElement = newTableElement;
newChildElements.forEach((newChildElement) => {
newChildElements.forEach(newChildElement => {
var _a;

@@ -138,3 +140,3 @@ let oldChildId;

const oldColumnId = element.columnIds[newTableElement.columnIds.indexOf(newChildElement.columnId)];
oldChildId = (_a = elements.find((e) => e.type === 'cell' && e.rowId === oldRowId && e.columnId === oldColumnId)) === null || _a === void 0 ? void 0 : _a.id;
oldChildId = (_a = elements.find(e => e.type === 'cell' && e.rowId === oldRowId && e.columnId === oldColumnId)) === null || _a === void 0 ? void 0 : _a.id;
}

@@ -172,11 +174,11 @@ if (oldChildId) {

}
groupElements.forEach((groupElement) => {
groupElements.forEach(groupElement => {
groupElement.elementIds = groupElement.elementIds
.map((oldElementId) => oldIdToNewId.get(oldElementId))
.filter((id) => !!id);
.map(oldElementId => oldIdToNewId.get(oldElementId))
.filter(id => !!id);
});
maskElements.forEach((maskElement) => {
maskElements.forEach(maskElement => {
const newElementIds = maskElement.elementIds
.map((oldElementId) => oldIdToNewId.get(oldElementId))
.filter((id) => !!id);
.map(oldElementId => oldIdToNewId.get(oldElementId))
.filter(id => !!id);
maskElement.elementIds = (newElementIds === null || newElementIds === void 0 ? void 0 : newElementIds.length) > 0 ? newElementIds : null;

@@ -183,0 +185,0 @@ });

{
"name": "@contrail/documents",
"version": "1.0.120",
"version": "1.0.121",
"description": "Documents library for contrail platform",

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