@flourish/legend
Advanced tools
Comparing version 6.6.0 to 6.6.1
{ | ||
"extends": "../../.eslintrc.cjs" | ||
"extends": "../../.eslintrc.cjs", | ||
"ignorePatterns": [ | ||
"legend.js", | ||
"legend.min.js" | ||
] | ||
} |
const { defineConfig } = require("cypress"); | ||
const flourishConfig = require("@flourish/cypress/config.js"); | ||
@@ -8,2 +9,3 @@ module.exports = defineConfig({ | ||
setupNodeEvents(on, config) { | ||
flourishConfig(on, config); | ||
return require("./cypress/plugins/index.js")(on, config); | ||
@@ -10,0 +12,0 @@ }, |
@@ -66,2 +66,3 @@ /* eslint-disable no-undef */ | ||
cy.get(rems).each(font_size_rem => { | ||
// eslint-disable-next-line cypress/no-unnecessary-waiting | ||
cy.wait(100).then(function() { | ||
@@ -94,2 +95,3 @@ var font_size_px = font_size_rem * base; | ||
cy.get(swatch_sizes).each(swatch_size => { | ||
// eslint-disable-next-line cypress/no-unnecessary-waiting | ||
cy.wait(1).then(function () { | ||
@@ -128,2 +130,3 @@ state.legend_container.text_size = font_size; | ||
cy.get(circle_sizes).each(circle_size => { | ||
// eslint-disable-next-line cypress/no-unnecessary-waiting | ||
cy.wait(100).then(function () { | ||
@@ -130,0 +133,0 @@ state.legend_container.text_size = font_size; |
@@ -19,5 +19,5 @@ /* eslint-disable */ | ||
// Import commands.js using ES2015 syntax: | ||
import './commands' | ||
import "./commands.js" | ||
// Alternatively you can use CommonJS syntax: | ||
// require('./commands') |
{ | ||
"name": "@flourish/legend", | ||
"version": "6.6.0", | ||
"version": "6.6.1", | ||
"private": false, | ||
@@ -18,9 +18,12 @@ "description": "Flourish module for making legend", | ||
"devDependencies": { | ||
"@flourish/cypress": "^8.0.0", | ||
"@babel/core": "^7.23.6", | ||
"@babel/preset-env": "^7.23.6", | ||
"@flourish/eslint-plugin-flourish": "^0.7.2", | ||
"@rollup/plugin-babel": "^6.0.4", | ||
"cypress": "12.17.4", | ||
"eslint": "^8.35.0", | ||
"rollup": "^1.1.2", | ||
"rollup-plugin-node-resolve": "^4.0.0", | ||
"terser": "^5.7.1" | ||
"rollup": "^4.6.1", | ||
"@rollup/plugin-node-resolve": "^15.2.3", | ||
"terser": "^5.7.1", | ||
"@flourish/cypress": "^8.0.0" | ||
}, | ||
@@ -27,0 +30,0 @@ "repository": { |
@@ -0,1 +1,4 @@ | ||
# 6.6.1 | ||
* Fix error where state referenced instead of _state | ||
# 6.6.0 | ||
@@ -2,0 +5,0 @@ * Make interactive legend items keyboard accessible |
@@ -100,3 +100,2 @@ import { select } from "d3-selection"; | ||
// ============================ // | ||
@@ -103,0 +102,0 @@ // DISCRETE COLOR LEGEND STYLES // |
import { createScreenshotSVG } from "@flourish/pocket-knife"; | ||
import { select } from "d3-selection"; | ||
import { scaleLinear } from "d3-scale"; | ||
import { appendTo, format, getContainer, visible, autoTitle, _updateTitle, getDomain, small_gap } from "../common"; | ||
import { remToPx } from "../utils"; | ||
import { appendTo, format, getContainer, visible, autoTitle, _updateTitle, getDomain, small_gap } from "../common.js"; | ||
import { remToPx } from "../utils.js"; | ||
@@ -53,3 +53,2 @@ var legend_count = 0; | ||
legend_count++; | ||
@@ -56,0 +55,0 @@ |
import { createScreenshotSVG } from "@flourish/pocket-knife"; | ||
import { select } from "d3-selection"; | ||
import { appendTo, format, getContainer, visible, autoTitle, _updateTitle, small_gap } from "../common"; | ||
import { remToPx, roundDown } from "../utils"; | ||
import { appendTo, format, getContainer, visible, autoTitle, _updateTitle, small_gap } from "../common.js"; | ||
import { remToPx, roundDown } from "../utils.js"; | ||
@@ -70,3 +70,2 @@ var legend_count = 0; | ||
ContinuousSizeLegend.prototype.scale = function(scaleFunction_) { | ||
@@ -73,0 +72,0 @@ // domain and range are assumed to be [0, max] where max is a number > 0 |
import { createScreenshotSVG } from "@flourish/pocket-knife"; | ||
import { select, event as d3_event } from "d3-selection"; | ||
import { appendTo, format, getContainer, visible, autoTitle, _updateTitle, small_gap } from "../common"; | ||
import { remToPx } from "../utils"; | ||
import { appendTo, format, getContainer, visible, autoTitle, _updateTitle, small_gap } from "../common.js"; | ||
import { remToPx } from "../utils.js"; | ||
@@ -59,3 +59,2 @@ var legend_count = 0; | ||
DiscreteColorLegend.prototype.data = function(items_, colorFunction_) { | ||
@@ -294,3 +293,3 @@ this._colorFunction = colorFunction_; | ||
if (!d.outline && !d.stroke_opacity) return 0; | ||
return d.stroke_opacity || _this.state.icon_stroke_opacity; | ||
return d.stroke_opacity || _this._state.icon_stroke_opacity; | ||
}); | ||
@@ -297,0 +296,0 @@ |
@@ -1,5 +0,5 @@ | ||
import DiscreteColorLegend from "./discrete-color"; | ||
import ContinuousColorLegend from "./continuous-color"; | ||
import ContinuousSizeLegend from "./continuous-size"; | ||
import legendContainer from "./container"; | ||
import DiscreteColorLegend from "./discrete-color/index.js"; | ||
import ContinuousColorLegend from "./continuous-color/index.js"; | ||
import ContinuousSizeLegend from "./continuous-size/index.js"; | ||
import legendContainer from "./container/index.js"; | ||
@@ -6,0 +6,0 @@ function createLegendContainer(state) { |
Sorry, the diff of this file is too big to display
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
186952
10
4349
2