Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-plotly.js-editor",
"description": "plotly.js chart editor react component UI",
"version": "0.7.0",
"version": "0.8.0",
"author": "Plotly, Inc.",
"bugs": {
"url": "https://github.com/plotly/react-plotly.js-editor/issues"
Expand Down
585 changes: 379 additions & 206 deletions scripts/translationKeys/combined-translation-keys.txt

Large diffs are not rendered by default.

471 changes: 321 additions & 150 deletions scripts/translationKeys/translation-keys.txt

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions src/components/containers/AnnotationAccordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import Fold from './Fold';
import TraceRequiredPanel from './TraceRequiredPanel';
import PropTypes from 'prop-types';
import React, {Component} from 'react';
import {connectAnnotationToLayout} from 'lib';
import {connectAnnotationToLayout, localize} from 'lib';

const AnnotationFold = connectAnnotationToLayout(Fold);

class AnnotationAccordion extends Component {
render() {
const {layout: {annotations = []}} = this.context;
const {canAdd, children} = this.props;
const {canAdd, children, localize: _} = this.props;

const content =
annotations.length &&
Expand All @@ -25,7 +25,7 @@ class AnnotationAccordion extends Component {
));

const addAction = {
label: 'Annotation',
label: _('Annotation'),
handler: ({layout, updateContainer}) => {
let annotationIndex;
if (Array.isArray(layout.annotations)) {
Expand Down Expand Up @@ -58,6 +58,7 @@ AnnotationAccordion.contextTypes = {
AnnotationAccordion.propTypes = {
children: PropTypes.node,
canAdd: PropTypes.bool,
localize: PropTypes.func,
};

export default AnnotationAccordion;
export default localize(AnnotationAccordion);
2 changes: 1 addition & 1 deletion src/components/containers/PanelHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class PanelHeader extends Component {
className="js-add-button"
onClick={() => addAction.handler(this.context)}
icon={icon}
label={_(addAction.label)}
label={addAction.label}
/>{' '}
</div>
) : null}
Expand Down
4 changes: 2 additions & 2 deletions src/components/containers/TraceAccordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const TraceFold = connectTraceToPlot(Fold);
class TraceAccordion extends Component {
render() {
const {data = []} = this.context;
const {canAdd, children, messageIfEmptyFold} = this.props;
const {canAdd, children, messageIfEmptyFold, localize: _} = this.props;

const content =
data.length &&
Expand All @@ -30,7 +30,7 @@ class TraceAccordion extends Component {

if (canAdd) {
const addAction = {
label: 'Trace',
label: _('Trace'),
handler: ({onUpdate}) => {
if (onUpdate) {
onUpdate({
Expand Down
28 changes: 14 additions & 14 deletions src/components/fields/TraceSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,30 @@ function computeTraceOptionsFromSchema(schema, _, context) {
{value: 'box', label: _('Box')},
{value: 'bar', label: _('Bar')},
{value: 'heatmap', label: _('Heatmap')},
{value: 'histogram', label: _('Histogram')},
{value: 'histogram2d', label: _('2D Histogram')},
{value: 'histogram2dcontour', label: _('2D Contour Histogram')},
// {value: 'histogram', label: _('Histogram')},
// {value: 'histogram2d', label: _('2D Histogram')},
// {value: 'histogram2dcontour', label: _('2D Contour Histogram')},
{value: 'pie', label: _('Pie')},
{value: 'contour', label: _('Contour')},
{value: 'scatterternary', label: _('Ternary Scatter')},
{value: 'violin', label: _('Violin')},
// {value: 'violin', label: _('Violin')},
{value: 'scatter3d', label: _('3D Scatter')},
{value: 'surface', label: _('Surface')},
{value: 'mesh3d', label: _('3D Mesh')},
{value: 'scattergeo', label: _('Atlas Map')},
{value: 'choropleth', label: _('Choropleth')},
{value: 'scattergl', label: _('Scatter GL')},
{value: 'pointcloud', label: _('Point Cloud')},
{value: 'heatmapgl', label: _('Heatmap GL')},
{value: 'parcoords', label: _('Parallel Coordinates')},
{value: 'sankey', label: _('Sankey')},
{value: 'table', label: _('Table')},
{value: 'carpet', label: _('Carpet')},
{value: 'scattercarpet', label: _('Carpet Scatter')},
{value: 'contourcarpet', label: _('Carpet Contour')},
// {value: 'scattergl', label: _('Scatter GL')},
// {value: 'pointcloud', label: _('Point Cloud')},
// {value: 'heatmapgl', label: _('Heatmap GL')},
// {value: 'parcoords', label: _('Parallel Coordinates')},
// {value: 'sankey', label: _('Sankey')},
// {value: 'table', label: _('Table')},
// {value: 'carpet', label: _('Carpet')},
// {value: 'scattercarpet', label: _('Carpet Scatter')},
// {value: 'contourcarpet', label: _('Carpet Contour')},
{value: 'ohlc', label: _('OHLC')},
{value: 'candlestick', label: _('Candlestick')},
{value: 'scatterpolar', label: _('Polar Scatter')},
// {value: 'scatterpolar', label: _('Polar Scatter')},
].filter(obj => traceTypes.indexOf(obj.value) !== -1);

const traceIndex = traceType =>
Expand Down
2 changes: 1 addition & 1 deletion src/default_panels/StyleTracesPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const StyleTracesPanel = ({localize: _}) => (
/>
<Radio
attr="flatshading"
label={_('flatshading')}
label={_('Flatshading')}
options={[
{label: _('Enable'), value: true},
{label: _('Disable'), value: false},
Expand Down
45 changes: 43 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2604,6 +2604,10 @@ dom-serializer@0, dom-serializer@~0.1.0:
domelementtype "~1.1.1"
entities "~1.1.1"

dom-walk@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018"

domain-browser@^1.1.1:
version "1.1.7"
resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc"
Expand Down Expand Up @@ -3355,7 +3359,7 @@ fast-json-stable-stringify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"

fast-levenshtein@~2.0.4:
fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.4:
version "2.0.6"
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"

Expand Down Expand Up @@ -4075,6 +4079,13 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1, gl
once "^1.3.0"
path-is-absolute "^1.0.0"

global@^4.3.0:
version "4.3.2"
resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f"
dependencies:
min-document "^2.19.0"
process "~0.5.1"

globals@^10.0.0:
version "10.4.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-10.4.0.tgz#5c477388b128a9e4c5c5d01c7a2aca68c68b2da7"
Expand Down Expand Up @@ -4485,6 +4496,10 @@ hoek@4.x.x:
version "4.2.0"
resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d"

hoist-non-react-statics@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz#343db84c6018c650778898240135a1420ee22ce0"

home-or-tmp@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
Expand Down Expand Up @@ -6223,6 +6238,12 @@ mimic-fn@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18"

min-document@^2.19.0:
version "2.19.0"
resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685"
dependencies:
dom-walk "^0.1.0"

minify-stream@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/minify-stream/-/minify-stream-1.1.0.tgz#3ca3d226e0e53b98c8aa4d45e7aefc11fb925bbe"
Expand Down Expand Up @@ -7580,6 +7601,10 @@ process@^0.11.10:
version "0.11.10"
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"

process@~0.5.1:
version "0.5.2"
resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf"

progress@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f"
Expand Down Expand Up @@ -7863,6 +7888,16 @@ react-dom@^16.2.0:
object-assign "^4.1.1"
prop-types "^15.6.0"

react-hot-loader@^4.0.0-beta.21:
version "4.0.0-beta.21"
resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.0.0-beta.21.tgz#46a0345621f1a03cb3c1c6dc130f153fa66e5bae"
dependencies:
fast-levenshtein "^2.0.6"
global "^4.3.0"
hoist-non-react-statics "^2.3.1"
prop-types "^15.6.0"
react-stand-in "^4.0.0-beta.21"

react-input-autosize@^2.1.0:
version "2.1.2"
resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-2.1.2.tgz#a3dc11a5517c434db25229925541309de3f7a8f5"
Expand Down Expand Up @@ -7894,6 +7929,12 @@ react-select@^1.0.0-rc.10:
prop-types "^15.5.8"
react-input-autosize "^2.1.0"

react-stand-in@^4.0.0-beta.21:
version "4.0.0-beta.21"
resolved "https://registry.yarnpkg.com/react-stand-in/-/react-stand-in-4.0.0-beta.21.tgz#fb694e465cb20fab7f36d3284f82b68bbd7a657e"
dependencies:
shallowequal "^1.0.2"

react-test-renderer@^16.0.0-0, react-test-renderer@^16.2.0:
version "16.2.0"
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.2.0.tgz#bddf259a6b8fcd8555f012afc8eacc238872a211"
Expand Down Expand Up @@ -8632,7 +8673,7 @@ shallowequal@^0.2.2:
dependencies:
lodash.keys "^3.1.2"

shallowequal@^1.0.1:
shallowequal@^1.0.1, shallowequal@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.0.2.tgz#1561dbdefb8c01408100319085764da3fcf83f8f"

Expand Down