bpmn-js-color-picker
Advanced tools
Comparing version 0.6.1 to 0.7.0
@@ -46,3 +46,3 @@ const colorImageSvg = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="currentColor"> | ||
className: 'bpmn-icon-color', | ||
title: translate('Set Color'), | ||
title: translate('Set color'), | ||
html: `<div class="entry">${colorImageSvg}</div>`, | ||
@@ -49,0 +49,0 @@ action: { |
@@ -1,5 +0,1 @@ | ||
import { | ||
domify | ||
} from 'min-dom'; | ||
const COLORS = [ { | ||
@@ -57,12 +53,12 @@ label: 'Default', | ||
var colorIcon = domify(` | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="100%"> | ||
var colorIconHtml = ` | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" height="100%" width="100%"> | ||
<rect rx="2" x="1" y="1" width="22" height="22" fill="var(--fill-color)" stroke="var(--stroke-color)" style="stroke-width:2"></rect> | ||
</svg> | ||
`); | ||
`; | ||
var entries = this._colors.map(function(color) { | ||
colorIcon.style.setProperty('--fill-color', color.fill || self._defaultFillColor); | ||
colorIcon.style.setProperty('--stroke-color', color.stroke || self._defaultStrokeColor); | ||
var entryColorIconHtml = colorIconHtml.replace('var(--fill-color)', color.fill || self._defaultFillColor) | ||
.replace('var(--stroke-color)', color.stroke || self._defaultStrokeColor); | ||
@@ -72,3 +68,3 @@ return { | ||
id: color.label.toLowerCase() + '-color', | ||
imageUrl: `data:image/svg+xml;utf8,${ encodeURIComponent(colorIcon.outerHTML) }`, | ||
imageHtml: entryColorIconHtml, | ||
action: createAction(self._modeling, elements, color) | ||
@@ -75,0 +71,0 @@ }; |
{ | ||
"name": "bpmn-js-color-picker", | ||
"version": "0.6.1", | ||
"version": "0.7.0", | ||
"description": "A color picker for bpmn-js", | ||
@@ -18,2 +18,6 @@ "scripts": { | ||
], | ||
"module": "./colors/index.js", | ||
"engines": { | ||
"node": "*" | ||
}, | ||
"author": { | ||
@@ -25,16 +29,13 @@ "name": "Vladimirs Katusenoks", | ||
"devDependencies": { | ||
"bpmn-js": "^11.0.4", | ||
"copy-webpack-plugin": "^9.0.1", | ||
"eslint": "^8.29.0", | ||
"eslint-plugin-bpmn-io": "^0.16.0", | ||
"bpmn-js": "^16.1.0", | ||
"copy-webpack-plugin": "^11.0.0", | ||
"eslint": "^8.56.0", | ||
"eslint-plugin-bpmn-io": "^1.0.0", | ||
"npm-run-all": "^4.1.2", | ||
"webpack": "^5.51.0", | ||
"webpack-cli": "^4.8.0", | ||
"webpack-cli": "^5.1.0", | ||
"webpack-dev-server": "^4.0.0" | ||
}, | ||
"dependencies": { | ||
"min-dom": "^4.0.3" | ||
}, | ||
"peerDependencies": { | ||
"bpmn-js": ">= 11" | ||
"bpmn-js": ">= 14" | ||
}, | ||
@@ -41,0 +42,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1
0
8729
7
144
- Removedmin-dom@^4.0.3