diff --git a/package.json b/package.json
index 9585b9849..6e0f6b595 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "react-chart-editor",
"description": "plotly.js chart editor react component UI",
- "version": "0.46.0",
+ "version": "0.46.1",
"author": "Plotly, Inc.",
"bugs": {
"url": "https://github.com/plotly/react-chart-editor/issues"
@@ -49,14 +49,14 @@
"tinycolor2": "^1.6.0"
},
"devDependencies": {
- "@babel/cli": "7.22.15",
- "@babel/core": "7.22.15",
+ "@babel/cli": "7.23.0",
+ "@babel/core": "7.23.2",
"@babel/eslint-parser": "7.22.15",
- "@babel/node": "7.22.15",
+ "@babel/node": "7.22.19",
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
- "@babel/preset-env": "7.22.15",
+ "@babel/preset-env": "7.23.2",
"@babel/preset-react": "7.22.15",
- "@babel/traverse": "7.22.15",
+ "@babel/traverse": "7.23.2",
"@hot-loader/react-dom": "16.14.0",
"@percy/cli": "1.26.3",
"@percy/storybook": "4.3.6",
@@ -64,7 +64,7 @@
"@storybook/react": "7.4.1",
"@storybook/react-webpack5": "7.4.1",
"@storybook/source-loader": "^7.4.1",
- "autoprefixer": "10.4.15",
+ "autoprefixer": "10.4.16",
"babel-jest": "26.6.3",
"babel-loader": "9.1.3",
"babel-plugin-module-resolver": "5.0.0",
@@ -72,9 +72,9 @@
"cssnano": "6.0.1",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.7",
- "eslint": "8.48.0",
- "eslint-config-prettier": "8.6.0",
- "eslint-plugin-import": "2.28.1",
+ "eslint": "8.53.0",
+ "eslint-config-prettier": "9.0.0",
+ "eslint-plugin-import": "2.29.0",
"eslint-plugin-jsx": "0.1.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-percy": "0.2.4",
@@ -83,12 +83,12 @@
"jest": "26.6.3",
"jest-cli": "26.6.3",
"mkdirp": "3.0.1",
- "plotly.js": "2.26.0",
- "postcss": "8.4.29",
+ "plotly.js": "2.27.0",
+ "postcss": "8.4.31",
"postcss-cli": "10.1.0",
"postcss-combine-duplicated-selectors": "10.0.3",
"postcss-import": "15.1.0",
- "postcss-preset-env": "9.1.3",
+ "postcss-preset-env": "9.3.0",
"prettier": "2.8.4",
"react": "16.14.0",
"react-ace": "7.0.5",
@@ -97,12 +97,12 @@
"react-inspector": "5.1.1",
"react-test-renderer": "16.14.0",
"request": "2.88.2",
- "rimraf": "5.0.1",
- "sass": "1.66.1",
+ "rimraf": "5.0.5",
+ "sass": "1.69.5",
"sass-loader": "13.3.2",
"storybook": "7.4.1",
"style-loader": "3.3.3",
- "webpack": "5.88.2",
+ "webpack": "5.89.0",
"webpack-cli": "5.1.4",
"webpack-dev-server": "4.15.1"
},
diff --git a/renovate.json b/renovate.json
deleted file mode 100644
index 4777b3ffd..000000000
--- a/renovate.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "extends": ["config:base"],
- "packageRules": [
- {
- "updateTypes": "minor",
- "depTypeList": ["dependencies"],
- "groupName": "minor deps",
- "schedule": ["before 2am on monday"],
- "enabled": false
- },
- {
- "updateTypes": "minor",
- "depTypeList": ["devDependencies"],
- "groupName": "minor devDeps",
- "schedule": ["before 2am on monday"],
- "enabled": false
- },
- {
- "packageNames": ["plotly.js"],
- "groupName": "plotly.js",
- "enabled": false
- },
- {
- "packagePatterns": ["^sass-loader"],
- "enabled": false
- }
- ]
-}
diff --git a/scripts/translationKeys/combined-translation-keys.txt b/scripts/translationKeys/combined-translation-keys.txt
index 0642f3ec0..b11696dbd 100644
--- a/scripts/translationKeys/combined-translation-keys.txt
+++ b/scripts/translationKeys/combined-translation-keys.txt
@@ -47,7 +47,7 @@ Anchor to
Angle // react-chart-editor: /default_panels/StyleAxesPanel.js:203
Angled Down // react-chart-editor: /default_panels/StyleTracesPanel.js:688
Angled Up // react-chart-editor: /default_panels/StyleTracesPanel.js:689
-Annotate // react-chart-editor: /DefaultEditor.js:97
+Annotate // react-chart-editor: /DefaultEditor.js:98
Annotation // react-chart-editor: /components/containers/AnnotationAccordion.js:34
AnnotationArrowRef must be given either "axref" or "ayref" as attrs. Instead was given // react-chart-editor: /components/fields/derived.js:369
AnnotationRef must be given either "xref" or "yref" as attrs. Instead was given // react-chart-editor: /components/fields/derived.js:416
@@ -68,7 +68,7 @@ Auto
Auto margins // react-chart-editor: /default_panels/StyleAxesPanel.js:184
Autoscale // plotly.js: components/modebar/buttons.js:208
Average // react-chart-editor: /default_panels/GraphTransformsPanel.js:40 && react-chart-editor: /components/fields/derived.js:144
-Axes // react-chart-editor: /DefaultEditor.js:93
+Axes // react-chart-editor: /DefaultEditor.js:94
Axes to Use // react-chart-editor: /components/fields/AxesCreator.js:158
AxesSelector must be nested within a connectAxesToPlot component // react-chart-editor: /components/fields/AxesSelector.js:14
Axis // react-chart-editor: /components/fields/AxesCreator.js:150
@@ -175,7 +175,7 @@ Collapse All
Color // react-chart-editor: /components/fields/ErrorBars.js:108
Color Bar // react-chart-editor: /components/fields/MarkerColor.js:191
Color Bar Container // react-chart-editor: /default_panels/StyleColorbarsPanel.js:260
-Color Bars // react-chart-editor: /DefaultEditor.js:96
+Color Bars // react-chart-editor: /DefaultEditor.js:97
Coloring // react-chart-editor: /default_panels/StyleTracesPanel.js:516
Colors // react-chart-editor: /default_panels/StyleTracesPanel.js:106
Colorscale // react-chart-editor: /default_panels/StyleTracesPanel.js:618
@@ -210,7 +210,7 @@ Contour Labels
Contour Lines // react-chart-editor: /default_panels/StyleTracesPanel.js:527
Contour Width // react-chart-editor: /default_panels/StyleTracesPanel.js:941
Contours // react-chart-editor: /default_panels/StyleTracesPanel.js:506
-Control // react-chart-editor: /DefaultEditor.js:100
+Control // react-chart-editor: /DefaultEditor.js:101
Copy Y Style // react-chart-editor: /components/fields/ErrorBars.js:93
Copy Z Style // react-chart-editor: /components/fields/ErrorBars.js:101
Count // react-chart-editor: /default_panels/GraphTransformsPanel.js:38 && react-chart-editor: /components/fields/derived.js:142
@@ -328,7 +328,7 @@ Gap Between Groups
Gaps // react-chart-editor: /default_panels/StyleTracesPanel.js:559
Gaps Between Cells // react-chart-editor: /default_panels/StyleTracesPanel.js:767
Gaps in Data // react-chart-editor: /default_panels/StyleTracesPanel.js:776
-General // react-chart-editor: /DefaultEditor.js:91
+General // react-chart-editor: /DefaultEditor.js:92
GeoJSON // react-chart-editor: /default_panels/StyleMapsPanel.js:44
GeoJSON Location Field // react-chart-editor: /default_panels/GraphCreatePanel.js:79
GeoJSON feature // react-chart-editor: /components/fields/LocationSelector.js:31
@@ -376,7 +376,7 @@ IDs
IE only supports svg. Changing format to svg. // plotly.js: components/modebar/buttons.js:55
Icon Color // react-chart-editor: /default_panels/StyleLayoutPanel.js:101
Image // react-chart-editor: /components/containers/ImageAccordion.js:21
-Images // react-chart-editor: /DefaultEditor.js:99
+Images // react-chart-editor: /DefaultEditor.js:100
Include // react-chart-editor: /components/fields/FilterOperation.js:29
Include Range // react-chart-editor: /components/fields/FilterOperation.js:75
Include Values // react-chart-editor: /components/fields/FilterOperation.js:83
@@ -463,7 +463,7 @@ Mapbox Light
Mapbox Outdoors // react-chart-editor: /components/fields/derived.js:720
Mapbox Satellite // react-chart-editor: /components/fields/derived.js:723
Mapbox Satellite with Streets // react-chart-editor: /components/fields/derived.js:724
-Maps // react-chart-editor: /DefaultEditor.js:94
+Maps // react-chart-editor: /DefaultEditor.js:95
March // react-chart-editor: /components/widgets/DateTimePicker.js:77
Margin Color // react-chart-editor: /default_panels/StyleLayoutPanel.js:27
Marker Color // react-chart-editor: /default_panels/StyleTracesPanel.js:466
@@ -487,7 +487,7 @@ Meanline Color
Meanline Width // react-chart-editor: /default_panels/StyleTracesPanel.js:865
Measure // react-chart-editor: /default_panels/GraphCreatePanel.js:90
Median // react-chart-editor: /default_panels/GraphTransformsPanel.js:41
-Menus // react-chart-editor: /DefaultEditor.js:101
+Menus // react-chart-editor: /DefaultEditor.js:102
Mercator // react-chart-editor: /default_panels/StyleMapsPanel.js:71
Meta Text // react-chart-editor: /default_panels/StyleLayoutPanel.js:197
Middle // react-chart-editor: /default_panels/StyleAxesPanel.js:458
@@ -653,7 +653,7 @@ Separate Thousands
September // react-chart-editor: /components/widgets/DateTimePicker.js:83
Sequential // react-chart-editor: /default_panels/StyleLayoutPanel.js:36
Shape // react-chart-editor: /components/containers/ShapeAccordion.js:22
-Shapes // react-chart-editor: /DefaultEditor.js:98
+Shapes // react-chart-editor: /DefaultEditor.js:99
Show // react-chart-editor: /components/fields/MarkerColor.js:194
Show All // react-chart-editor: /default_panels/StyleTracesPanel.js:392
Show Contour // react-chart-editor: /default_panels/StyleTracesPanel.js:932
@@ -673,7 +673,7 @@ Size Scale
Size and Margins // react-chart-editor: /default_panels/StyleLayoutPanel.js:105
Size and Positioning // react-chart-editor: /default_panels/StyleColorbarsPanel.js:60
Slider // react-chart-editor: /components/containers/SliderAccordion.js:20
-Sliders // react-chart-editor: /DefaultEditor.js:100
+Sliders // react-chart-editor: /DefaultEditor.js:101
Smoothing // react-chart-editor: /default_panels/StyleTracesPanel.js:621
Snap // react-chart-editor: /default_panels/StyleTracesPanel.js:878
Snap to Grid // react-chart-editor: /components/fields/RectanglePositioner.js:82
@@ -709,7 +709,7 @@ Stereographic
Streamtube // react-chart-editor: /lib/computeTraceOptionsFromSchema.js:71
Stretch // react-chart-editor: /default_panels/StyleImagesPanel.js:31
Strict Sum Stacked // react-chart-editor: /default_panels/StyleTracesPanel.js:280
-Structure // react-chart-editor: /DefaultEditor.js:86
+Structure // react-chart-editor: /DefaultEditor.js:87
Style // react-chart-editor: /default_panels/StyleAxesPanel.js:430
Sub-Country Unit Borders // react-chart-editor: /default_panels/StyleMapsPanel.js:132
Subplot Title // react-chart-editor: /default_panels/StyleTracesPanel.js:155
@@ -783,7 +783,7 @@ Trace your data.
Traces // react-chart-editor: /components/containers/TraceRequiredPanel.js:25
Traces of various types like bar and line are the building blocks of your figure. // react-chart-editor: /components/containers/TraceAccordion.js:120
Transform // react-chart-editor: /components/containers/TransformAccordion.js:67
-Transforms // react-chart-editor: /DefaultEditor.js:89
+Transforms // react-chart-editor: /DefaultEditor.js:90
Transpose // react-chart-editor: /default_panels/GraphCreatePanel.js:198
Transverse Mercator // react-chart-editor: /default_panels/StyleMapsPanel.js:92
Treemap // react-chart-editor: /lib/traceTypes.js:195
diff --git a/scripts/translationKeys/translation-keys.txt b/scripts/translationKeys/translation-keys.txt
index b840a3e14..c39aad73a 100644
--- a/scripts/translationKeys/translation-keys.txt
+++ b/scripts/translationKeys/translation-keys.txt
@@ -59,7 +59,7 @@ Anchor to
Angle // /default_panels/StyleAxesPanel.js:203
Angled Down // /default_panels/StyleTracesPanel.js:688
Angled Up // /default_panels/StyleTracesPanel.js:689
-Annotate // /DefaultEditor.js:97
+Annotate // /DefaultEditor.js:98
Annotation // /components/containers/AnnotationAccordion.js:34
AnnotationArrowRef must be given either "axref" or "ayref" as attrs. Instead was given // /components/fields/derived.js:369
AnnotationRef must be given either "xref" or "yref" as attrs. Instead was given // /components/fields/derived.js:416
@@ -80,7 +80,7 @@ Auto
Auto margins // /default_panels/StyleAxesPanel.js:184
Average // /default_panels/GraphTransformsPanel.js:40
Average // /components/fields/derived.js:144
-Axes // /DefaultEditor.js:93
+Axes // /DefaultEditor.js:94
Axes to Use // /components/fields/AxesCreator.js:158
AxesSelector must be nested within a connectAxesToPlot component // /components/fields/AxesSelector.js:14
Axis Background // /default_panels/StyleAxesPanel.js:159
@@ -177,7 +177,7 @@ Collapse All
Color // /components/fields/ErrorBars.js:108
Color Bar // /components/fields/MarkerColor.js:191
Color Bar Container // /default_panels/StyleColorbarsPanel.js:260
-Color Bars // /DefaultEditor.js:96
+Color Bars // /DefaultEditor.js:97
Coloring // /default_panels/StyleTracesPanel.js:516
Colors // /default_panels/StyleTracesPanel.js:106
Colorscale // /default_panels/StyleTracesPanel.js:618
@@ -211,7 +211,7 @@ Contour Labels
Contour Lines // /default_panels/StyleTracesPanel.js:527
Contour Width // /default_panels/StyleTracesPanel.js:941
Contours // /default_panels/StyleTracesPanel.js:506
-Control // /DefaultEditor.js:100
+Control // /DefaultEditor.js:101
Copy Y Style // /components/fields/ErrorBars.js:93
Copy Z Style // /components/fields/ErrorBars.js:101
Count // /default_panels/GraphTransformsPanel.js:38
@@ -319,7 +319,7 @@ Gap Between Groups
Gaps // /default_panels/StyleTracesPanel.js:559
Gaps Between Cells // /default_panels/StyleTracesPanel.js:767
Gaps in Data // /default_panels/StyleTracesPanel.js:776
-General // /DefaultEditor.js:91
+General // /DefaultEditor.js:92
GeoJSON // /default_panels/StyleMapsPanel.js:44
GeoJSON Location Field // /default_panels/GraphCreatePanel.js:79
GeoJSON feature // /components/fields/LocationSelector.js:31
@@ -366,7 +366,7 @@ I (Optional)
IDs // /default_panels/GraphCreatePanel.js:42
Icon Color // /default_panels/StyleLayoutPanel.js:101
Image // /components/containers/ImageAccordion.js:21
-Images // /DefaultEditor.js:99
+Images // /DefaultEditor.js:100
Include // /components/fields/FilterOperation.js:29
Include Range // /components/fields/FilterOperation.js:75
Include Values // /components/fields/FilterOperation.js:83
@@ -452,7 +452,7 @@ Mapbox Light
Mapbox Outdoors // /components/fields/derived.js:720
Mapbox Satellite // /components/fields/derived.js:723
Mapbox Satellite with Streets // /components/fields/derived.js:724
-Maps // /DefaultEditor.js:94
+Maps // /DefaultEditor.js:95
March // /components/widgets/DateTimePicker.js:77
Margin Color // /default_panels/StyleLayoutPanel.js:27
Marker Color // /default_panels/StyleTracesPanel.js:466
@@ -476,7 +476,7 @@ Meanline Color
Meanline Width // /default_panels/StyleTracesPanel.js:865
Measure // /default_panels/GraphCreatePanel.js:90
Median // /default_panels/GraphTransformsPanel.js:41
-Menus // /DefaultEditor.js:101
+Menus // /DefaultEditor.js:102
Mercator // /default_panels/StyleMapsPanel.js:71
Meta Text // /default_panels/StyleLayoutPanel.js:197
Middle // /default_panels/StyleAxesPanel.js:458
@@ -634,7 +634,7 @@ Separate Thousands
September // /components/widgets/DateTimePicker.js:83
Sequential // /default_panels/StyleLayoutPanel.js:36
Shape // /components/containers/ShapeAccordion.js:22
-Shapes // /DefaultEditor.js:98
+Shapes // /DefaultEditor.js:99
Show // /components/fields/MarkerColor.js:194
Show All // /default_panels/StyleTracesPanel.js:392
Show Contour // /default_panels/StyleTracesPanel.js:932
@@ -653,7 +653,7 @@ Size Scale
Size and Margins // /default_panels/StyleLayoutPanel.js:105
Size and Positioning // /default_panels/StyleColorbarsPanel.js:60
Slider // /components/containers/SliderAccordion.js:20
-Sliders // /DefaultEditor.js:100
+Sliders // /DefaultEditor.js:101
Smoothing // /default_panels/StyleTracesPanel.js:621
Snap // /default_panels/StyleTracesPanel.js:878
Snap to Grid // /components/fields/RectanglePositioner.js:82
@@ -687,7 +687,7 @@ Stereographic
Streamtube // /lib/computeTraceOptionsFromSchema.js:71
Stretch // /default_panels/StyleImagesPanel.js:31
Strict Sum Stacked // /default_panels/StyleTracesPanel.js:280
-Structure // /DefaultEditor.js:86
+Structure // /DefaultEditor.js:87
Style // /default_panels/StyleAxesPanel.js:430
Sub-Country Unit Borders // /default_panels/StyleMapsPanel.js:132
Subplot Title // /default_panels/StyleTracesPanel.js:155
@@ -759,7 +759,7 @@ Trace your data.
Traces // /components/containers/TraceRequiredPanel.js:25
Traces of various types like bar and line are the building blocks of your figure. // /components/containers/TraceAccordion.js:120
Transform // /components/containers/TransformAccordion.js:67
-Transforms // /DefaultEditor.js:89
+Transforms // /DefaultEditor.js:90
Transpose // /default_panels/GraphCreatePanel.js:198
Transverse Mercator // /default_panels/StyleMapsPanel.js:92
Treemap // /lib/traceTypes.js:195
diff --git a/src/DefaultEditor.js b/src/DefaultEditor.js
index f3ac9be18..b5e14e6be 100644
--- a/src/DefaultEditor.js
+++ b/src/DefaultEditor.js
@@ -78,19 +78,20 @@ class DefaultEditor extends Component {
render() {
const _ = this.context.localize;
- const logo = this.props.logoSrc && ;
+ const {logoSrc, logoLinkUrl, menuPanelOrder, children} = this.props;
+ const logo = logoSrc && ;
return (
-
- {logo ? logo : null}
+
+ {logo || null}
{this.hasTransforms() && (
)}
-
+
- {this.hasAxes() && }
+ {this.hasAxes() && }
{this.hasMaps() && }
{this.hasLegend() && }
{this.hasColorbars() && }
@@ -99,7 +100,7 @@ class DefaultEditor extends Component {
{this.hasSliders() && }
{this.hasMenus() && }
- {this.props.children ? this.props.children : null}
+ {children || null}
);
}
@@ -108,6 +109,7 @@ class DefaultEditor extends Component {
DefaultEditor.propTypes = {
children: PropTypes.node,
logoSrc: PropTypes.string,
+ logoLinkUrl: PropTypes.string,
menuPanelOrder: PropTypes.array,
};
diff --git a/src/components/containers/PlotlyPanel.js b/src/components/containers/PlotlyPanel.js
index 2466ce1cd..39c4d88a7 100644
--- a/src/components/containers/PlotlyPanel.js
+++ b/src/components/containers/PlotlyPanel.js
@@ -68,7 +68,7 @@ export class Panel extends Component {
});
if (this.state.individualFoldStates.length !== numFolds) {
- const newFoldStates = new Array(numFolds).fill(false);
+ const newFoldStates = new Array(numFolds).fill(this.props.collapsedOnStart);
this.setState({
individualFoldStates: this.props.addAction
? newFoldStates.map((e, i) => i !== numFolds - 1)
@@ -129,10 +129,12 @@ Panel.propTypes = {
noPadding: PropTypes.bool,
showExpandCollapse: PropTypes.bool,
canReorder: PropTypes.bool,
+ collapsedOnStart: PropTypes.bool,
};
Panel.defaultProps = {
showExpandCollapse: true,
+ collapsedOnStart: false,
};
Panel.contextTypes = {
diff --git a/src/components/widgets/Logo.js b/src/components/widgets/Logo.js
index c2a9ed401..1d63dd533 100644
--- a/src/components/widgets/Logo.js
+++ b/src/components/widgets/Logo.js
@@ -3,7 +3,9 @@ import React, {Component} from 'react';
export default class Logo extends Component {
render() {
- return
;
+ const {link, src} = this.props;
+ const image =
;
+ return link ? {image} : image;
}
}
@@ -11,4 +13,5 @@ Logo.plotly_editor_traits = {sidebar_element: true};
Logo.propTypes = {
src: PropTypes.string,
+ link: PropTypes.string,
};
diff --git a/src/default_panels/StyleAxesPanel.js b/src/default_panels/StyleAxesPanel.js
index 4c744a1a8..1b9a39c95 100644
--- a/src/default_panels/StyleAxesPanel.js
+++ b/src/default_panels/StyleAxesPanel.js
@@ -27,7 +27,7 @@ class StyleAxesPanel extends Component {
render() {
const {localize: _} = this.context;
return (
-
+
!(axis._name.includes('angular') || axis._subplot.includes('geo'))}
diff --git a/src/default_panels/StyleLayoutPanel.js b/src/default_panels/StyleLayoutPanel.js
index 9fbaeadfc..7c06a52fb 100644
--- a/src/default_panels/StyleLayoutPanel.js
+++ b/src/default_panels/StyleLayoutPanel.js
@@ -21,7 +21,7 @@ import {HoverColor} from '../components/fields/derived';
import DataSelector from '../components/fields/DataSelector';
const StyleLayoutPanel = (props, {localize: _}) => (
-
+