Socket
Socket
Sign inDemoInstall

basicprimitives

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basicprimitives - npm Package Compare versions

Comparing version 6.4.0 to 6.4.1

src/templates/html/CustomRenderTemplate.js

2

.vscode/launch.json

@@ -31,3 +31,3 @@ {

"name": "Launch Chrome against localhost",
"url": "http://localhost:8080/samples/javascript.controls/CaseSkippedLevels.html",
"url": "http://localhost:8080/samples/javascript.controls/CasePERTChart.html",
"webRoot": "${workspaceFolder}"

@@ -34,0 +34,0 @@ }

@@ -0,1 +1,3 @@

#### Version 6.4.1
* Added `onGroupTitleRender`, `onLevelTitleRender` and `onLevelBackgroundRender` options to `OrgConfig` and `FamConfig`
#### Version 6.4.0

@@ -2,0 +4,0 @@ * Added `minimumVisibleLevels` option to `OrgConfig` and `FamConfig`

@@ -5,3 +5,3 @@ {

"homepage": "https://www.basicprimitives.com/",
"version": "6.4.0",
"version": "6.4.1",
"author": "Basic Primitives Inc. <support@basicprimitives.com> (https://www.basicprimitives.com)",

@@ -21,4 +21,6 @@ "description": "Basic Primitives Diagrams for JavaScript - data visualization components library that implements organizational chart and multi-parent dependency diagrams, contains implementations of JavaScript Controls and PDF rendering plugins.",

"babel-loader": "^8.2.2",
"blob-stream": "^0.1.3",
"clean-webpack-plugin": "^3.0.0",
"css-loader": "^5.0.1",
"file-saver": "^2.0.5",
"html-webpack-plugin": "^4.5.0",

@@ -28,11 +30,9 @@ "jest": "^26.6.3",

"jest-puppeteer": "^4.4.0",
"pdfkit-nodejs-webpack": "^0.0.2",
"puppeteer": "^5.5.0",
"style-loader": "^2.0.0",
"url-loader": "^4.1.1",
"webpack": "^4.44.2",
"webpack-cli": "^4.2.0",
"webpack-dev-server": "^3.11.0",
"blob-stream": "^0.1.3",
"file-saver": "^2.0.5",
"pdfkit-nodejs-webpack": "^0.0.2"
"webpack": "^4.46.0",
"webpack-cli": "^4.7.2",
"webpack-dev-server": "^3.11.1"
},

@@ -45,5 +45,3 @@ "scripts": {

},
"dependencies": {
},
"dependencies": {},
"jest": {

@@ -50,0 +48,0 @@ "testEnvironment": "jsdom"

@@ -388,3 +388,2 @@ import {NavigationMode, PageFitMode, Visibility, OrientationType, VerticalAlignmentType,

* @callback
* @param {Object} event Mouse event
* @param {EventArgs} data Context information

@@ -860,2 +859,12 @@ */

/**
* On group title render event. This callback function renders the group title panel.
* It overwrites the default group title renderer. It is called only when the group title is visible.
* See other group title options for details.
*
* @group Group Titles
* @callback
* @param {EventArgs} data Context information
*/
this.onGroupTitleRender = null;

@@ -959,2 +968,24 @@ /**

/**
* On level annotation title render event. This callback function is called to render level annotation title panel.
* It is used to overwrite default level title template renderer. It is called only when level annotations are visible.
* See other level annotation options for details.
*
* @group Level Titles
* @callback
* @param {EventArgs} data Context information
*/
this.onLevelTitleRender = null;
/**
* On level annotation background render event. This callback function is called to render level annotation background panel.
* It is used to overwrite default level background template renderer. It is called only when level annotations are visible.
* See other level annotation options for details.
*
* @group Level Titles
* @callback
* @param {EventArgs} data Context information
*/
this.onLevelBackgroundRender = null;
/**
* @ignore

@@ -961,0 +992,0 @@ */

@@ -341,3 +341,2 @@ import {NavigationMode, PageFitMode, Visibility, OrientationType, VerticalAlignmentType,

* @callback
* @param {Object} event Mouse event
* @param {EventArgs} data Context information

@@ -839,2 +838,12 @@ */

/**
* On group title render event. This callback function renders the group title panel.
* It overwrites the default group title renderer. It is called only when the group title is visible.
* See other group title options for details.
*
* @group Group Titles
* @callback
* @param {EventArgs} data Context information
*/
this.onGroupTitleRender = null;

@@ -938,2 +947,24 @@ /**

/**
* On level annotation title render event. This callback function is called to render level annotation title panel.
* It is used to overwrite default level title template renderer. It is called only when level annotations are visible.
* See other level annotation options for details.
*
* @group Level Titles
* @callback
* @param {EventArgs} data Context information
*/
this.onLevelTitleRender = null;
/**
* On level annotation background render event. This callback function is called to render level annotation background panel.
* It is used to overwrite default level background template renderer. It is called only when level annotations are visible.
* See other level annotation options for details.
*
* @group Level Titles
* @callback
* @param {EventArgs} data Context information
*/
this.onLevelBackgroundRender = null;
/**
* @ignore

@@ -940,0 +971,0 @@ */

@@ -192,3 +192,2 @@ import Thickness from '../graphics/structs/Thickness';

* @callback
* @param {Object} event Mouse event
* @param {EventArgs} data Context information

@@ -195,0 +194,0 @@ */

import AnnotationLabelTemplate from './templates/html/AnnotationLabelTemplate';
import ButtonsTemplate from './templates/html/ButtonsTemplate';
import CustomRenderTemplate from './templates/html/CustomRenderTemplate';
import CheckBoxTemplate from './templates/html/CheckBoxTemplate';

@@ -31,2 +32,3 @@ import CursorTemplate from './templates/html/CursorTemplate';

ButtonsTemplate,
CustomRenderTemplate,
CheckBoxTemplate,

@@ -33,0 +35,0 @@ CursorTemplate,

import AnnotationLabelTemplate from './templates/pdf/AnnotationLabelTemplate';
import CheckBoxTemplate from './templates/pdf/CheckBoxTemplate';
import CustomRenderTemplate from './templates/pdf/CustomRenderTemplate';
import CursorTemplate from './templates/pdf/CursorTemplate';

@@ -29,2 +30,3 @@ import DummyTemplate from './templates/pdf/DummyTemplate';

CursorTemplate,
CustomRenderTemplate,
DotHighlightTemplate: DummyTemplate,

@@ -31,0 +33,0 @@ GroupTitleTemplate,

import AnnotationLabelTemplate from './templates/html/AnnotationLabelTemplate';
import ButtonsTemplate from './templates/html/ButtonsTemplate';
import CustomRenderTemplate from './templates/html/CustomRenderTemplate';
import CheckBoxTemplate from './templates/html/CheckBoxTemplate';

@@ -31,2 +32,3 @@ import CursorTemplate from './templates/html/CursorTemplate';

ButtonsTemplate,
CustomRenderTemplate,
CheckBoxTemplate,

@@ -33,0 +35,0 @@ CursorTemplate,

import AnnotationLabelTemplate from './templates/pdf/AnnotationLabelTemplate';
import CheckBoxTemplate from './templates/pdf/CheckBoxTemplate';
import CustomRenderTemplate from './templates/pdf/CustomRenderTemplate';
import CursorTemplate from './templates/pdf/CursorTemplate';

@@ -30,2 +31,3 @@ import DummyTemplate from './templates/pdf/DummyTemplate';

CursorTemplate,
CustomRenderTemplate,
DotHighlightTemplate: DummyTemplate,

@@ -32,0 +34,0 @@ GroupTitleTemplate,

import ValueReader from '../../readers/ValueReader';
import ObjectReader from '../../readers/ObjectReader';
import EnumerationReader from '../../readers/EnumerationReader';
import FunctionReader from '../../readers/FunctionReader';
import { HorizontalAlignmentType, VerticalAlignmentType, TextOrientationType } from '../../enums';

@@ -19,3 +20,5 @@

levelTitleFontWeight: new ValueReader(["string"], false, defaultConfig.levelTitleFontWeight),
levelTitleFontStyle: new ValueReader(["string"], false, defaultConfig.levelTitleFontStyle)
levelTitleFontStyle: new ValueReader(["string"], false, defaultConfig.levelTitleFontStyle),
onLevelTitleRender: new FunctionReader(),
onLevelBackgroundRender: new FunctionReader()
});

@@ -22,0 +25,0 @@ function process() {

@@ -28,2 +28,3 @@ import ArrayReader from '../../readers/ArrayReader';

onHighlightRender: new FunctionReader(),
onGroupTitleRender: new FunctionReader(),
templates: new ArrayReader(

@@ -30,0 +31,0 @@ new ObjectReader({

@@ -15,3 +15,8 @@ export default function GroupTitleTemplateTask(templatesOptionTask, templates) {

options = templatesOptionTask.getOptions();
_data.template = new templates.GroupTitleTemplate(options);
var { onGroupTitleRender } = options;
if(onGroupTitleRender != null) {
_data.template = new templates.CustomRenderTemplate(options, onGroupTitleRender);
} else {
_data.template = new templates.GroupTitleTemplate(options);
}
}

@@ -18,0 +23,0 @@ return _data.template;

@@ -17,3 +17,8 @@ export default function LevelAnnotationTemplateTask(orientationOptionTask, levelTitleTemplateOptionTask, templates) {

options = levelTitleTemplateOptionTask.getOptions();
_data.backgroundTemplate = new templates.LevelBackgroundTemplate(options);
var { onLevelBackgroundRender } = options;
if( onLevelBackgroundRender != null ) {
_data.backgroundTemplate = new templates.CustomRenderTemplate(options, onLevelBackgroundRender);
} else {
_data.backgroundTemplate = new templates.LevelBackgroundTemplate(options);
}
}

@@ -28,3 +33,8 @@ return _data.backgroundTemplate;

options = levelTitleTemplateOptionTask.getOptions();
_data.titleTemplate = new templates.LevelTitleTemplate(options, orientation);
var { onLevelTitleRender } = options;
if( onLevelTitleRender != null ) {
_data.titleTemplate = new templates.CustomRenderTemplate(options, onLevelTitleRender);
} else {
_data.titleTemplate = new templates.LevelTitleTemplate(options, orientation);
}
}

@@ -31,0 +41,0 @@ return _data.titleTemplate;

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

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