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

reportbro-designer

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reportbro-designer - npm Package Compare versions

Comparing version 1.3.2 to 1.3.3

8

CHANGELOG.md
# Changelog
## [1.3.3] - 2019-11-08
### Bug Fixes
* do not show resize mouse cursor in corners when table is selected
* fix setting transparent color
* fix parameter type drop down options in Safari
* fix content area and ReportBro logo alignment when sidebar is active
## [1.3.2] - 2019-09-03

@@ -4,0 +12,0 @@

2

package.json
{
"name": "reportbro-designer",
"version": "1.3.2",
"version": "1.3.3",
"description": "Designer to create pdf and excel report layouts. The reports can be generated with reportbro-lib (a Python package) on the server.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -233,3 +233,3 @@ import DocElement from './DocElement';

for (let sizer of ['NE', 'SE', 'SW', 'NW']) {
elSizerContainer.append($(`<div class="rbroSizer rbroSizer${sizer} rbroSizerInactive"></div>`));
elSizerContainer.append($(`<div class="rbroSizer rbroSizer${sizer} rbroSizerMove"></div>`));
}

@@ -236,0 +236,0 @@ }

@@ -138,4 +138,9 @@ import MainPanelItem from './MainPanelItem';

$('#rbro_detail_panel').css({ left: mainPanelWidth + this.mainPanelSizerWidth });
let docPanelLeft = mainPanelWidth + this.mainPanelSizerWidth + 390;
$('#rbro_document_panel').css({ width: `calc(100% - ${docPanelLeft}px)` });
// calculate width of main panel, detail panel and sidebar (if available)
let totalPanelWidth = mainPanelWidth + this.mainPanelSizerWidth + 390;
if (this.rb.getProperty('menuSidebar')) {
totalPanelWidth += 104;
$('#reportbro .rbroLogo').css({ width: mainPanelWidth });
}
$('#rbro_document_panel').css({ width: `calc(100% - ${totalPanelWidth}px)` });
}

@@ -142,0 +147,0 @@

@@ -17,2 +17,3 @@ import Command from '../commands/Command';

this.selectedObjId = null;
this.parameterTypeOptions = [];
}

@@ -61,14 +62,3 @@

elFormField = $('<div class="rbroFormField"></div>');
let elType = $(`<select id="rbro_parameter_type">
<option value="string">${this.rb.getLabel('parameterTypeString')}</option>
<option value="number">${this.rb.getLabel('parameterTypeNumber')}</option>
<option value="boolean">${this.rb.getLabel('parameterTypeBoolean')}</option>
<option value="date">${this.rb.getLabel('parameterTypeDate')}</option>
<option value="image">${this.rb.getLabel('parameterTypeImage')}</option>
<option value="array">${this.rb.getLabel('parameterTypeArray')}</option>
<option value="simple_array">${this.rb.getLabel('parameterTypeSimpleArray')}</option>
<option value="map">${this.rb.getLabel('parameterTypeMap')}</option>
<option value="sum">${this.rb.getLabel('parameterTypeSum')}</option>
<option value="average">${this.rb.getLabel('parameterTypeAverage')}</option>
</select>`)
let elType = $('<select id="rbro_parameter_type"></select>')
.change(event => {

@@ -402,20 +392,52 @@ let parameter = this.rb.getDataObject(this.selectedObjId);

}
// do not allow nested array/map
if (obj.getPanelItem() !== null && obj.getPanelItem().getParent() === this.rb.getMainPanel().getParametersItem()) {
$('#rbro_parameter_type option[value="array"]').removeClass('rbroHidden');
$('#rbro_parameter_type option[value="map"]').removeClass('rbroHidden');
} else {
$('#rbro_parameter_type option[value="array"]').addClass('rbroHidden');
$('#rbro_parameter_type option[value="map"]').addClass('rbroHidden');
let parameterTypeOptions = [];
// do not allow nested array/map (only for top-level parameters)
let topLevelParameter = (obj.getPanelItem() !== null &&
obj.getPanelItem().getParent() === this.rb.getMainPanel().getParametersItem());
// do not allow image and sum/average parameter in list
let listFieldParameter = (parentParameter !== null &&
parentParameter.getValue('type') === Parameter.type.array);
parameterTypeOptions.push({ value: 'string', label: this.rb.getLabel('parameterTypeString') });
parameterTypeOptions.push({ value: 'number', label: this.rb.getLabel('parameterTypeNumber') });
parameterTypeOptions.push({ value: 'boolean', label: this.rb.getLabel('parameterTypeBoolean') });
parameterTypeOptions.push({ value: 'date', label: this.rb.getLabel('parameterTypeDate') });
if (!listFieldParameter) {
parameterTypeOptions.push({ value: 'image', label: this.rb.getLabel('parameterTypeImage') });
}
// do not allow image and sum/average parameter in list
if (parentParameter !== null && parentParameter.getValue('type') === Parameter.type.array) {
$('#rbro_parameter_type option[value="image"]').addClass('rbroHidden');
$('#rbro_parameter_type option[value="sum"]').addClass('rbroHidden');
$('#rbro_parameter_type option[value="average"]').addClass('rbroHidden');
if (topLevelParameter) {
parameterTypeOptions.push({ value: 'array', label: this.rb.getLabel('parameterTypeArray') });
}
parameterTypeOptions.push({ value: 'simple_array', label: this.rb.getLabel('parameterTypeSimpleArray') });
if (topLevelParameter) {
parameterTypeOptions.push({ value: 'map', label: this.rb.getLabel('parameterTypeMap') });
}
if (!listFieldParameter) {
parameterTypeOptions.push({ value: 'sum', label: this.rb.getLabel('parameterTypeSum') });
parameterTypeOptions.push({ value: 'average', label: this.rb.getLabel('parameterTypeAverage') });
}
let parameterTypeOptionsChanged = false;
if (parameterTypeOptions.length !== this.parameterTypeOptions.length) {
parameterTypeOptionsChanged = true;
} else {
$('#rbro_parameter_type option[value="image"]').removeClass('rbroHidden');
$('#rbro_parameter_type option[value="sum"]').removeClass('rbroHidden');
$('#rbro_parameter_type option[value="average"]').removeClass('rbroHidden');
for (let i=0; i < parameterTypeOptions.length; i++) {
if (parameterTypeOptions[i].value !== this.parameterTypeOptions[i].value) {
parameterTypeOptionsChanged = true;
break;
}
}
}
if (parameterTypeOptionsChanged) {
// add dom elements for changed options
let elParameterType = $('#rbro_parameter_type');
elParameterType.empty();
for (let i=0; i < parameterTypeOptions.length; i++) {
let parameterTypeOption = parameterTypeOptions[i];
elParameterType.append(
`<option value="${parameterTypeOption.value}">${parameterTypeOption.label}</option>`);
}
this.parameterTypeOptions = parameterTypeOptions;
}
}

@@ -422,0 +444,0 @@

@@ -135,3 +135,4 @@ String.prototype.reverse = function () { return this.split('').reverse().join(''); };

export function isValidColor(color) {
return /^#[0-9A-F]{6}$/i.test(color);
// test for empty value (transparent) or # and 6 hex digits
return !color || /^#[0-9A-F]{6}$/i.test(color);
}

@@ -138,0 +139,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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