Skip to content

Commit fed4ede

Browse files
authored
Merge pull request #309 from plotly/v0.8.0
V0.8.0
2 parents 6567f65 + b62f03d commit fed4ede

File tree

10 files changed

+768
-382
lines changed

10 files changed

+768
-382
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-plotly.js-editor",
33
"description": "plotly.js chart editor react component UI",
4-
"version": "0.7.0",
4+
"version": "0.8.0",
55
"author": "Plotly, Inc.",
66
"bugs": {
77
"url": "https://github.com/plotly/react-plotly.js-editor/issues"

scripts/translationKeys/combined-translation-keys.txt

Lines changed: 379 additions & 206 deletions
Large diffs are not rendered by default.

scripts/translationKeys/translation-keys.txt

Lines changed: 321 additions & 150 deletions
Large diffs are not rendered by default.

src/components/containers/AnnotationAccordion.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import Fold from './Fold';
22
import TraceRequiredPanel from './TraceRequiredPanel';
33
import PropTypes from 'prop-types';
44
import React, {Component} from 'react';
5-
import {connectAnnotationToLayout} from 'lib';
5+
import {connectAnnotationToLayout, localize} from 'lib';
66

77
const AnnotationFold = connectAnnotationToLayout(Fold);
88

99
class AnnotationAccordion extends Component {
1010
render() {
1111
const {layout: {annotations = []}} = this.context;
12-
const {canAdd, children} = this.props;
12+
const {canAdd, children, localize: _} = this.props;
1313

1414
const content =
1515
annotations.length &&
@@ -25,7 +25,7 @@ class AnnotationAccordion extends Component {
2525
));
2626

2727
const addAction = {
28-
label: 'Annotation',
28+
label: _('Annotation'),
2929
handler: ({layout, updateContainer}) => {
3030
let annotationIndex;
3131
if (Array.isArray(layout.annotations)) {
@@ -58,6 +58,7 @@ AnnotationAccordion.contextTypes = {
5858
AnnotationAccordion.propTypes = {
5959
children: PropTypes.node,
6060
canAdd: PropTypes.bool,
61+
localize: PropTypes.func,
6162
};
6263

63-
export default AnnotationAccordion;
64+
export default localize(AnnotationAccordion);

src/components/containers/PanelHeader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class PanelHeader extends Component {
4545
className="js-add-button"
4646
onClick={() => addAction.handler(this.context)}
4747
icon={icon}
48-
label={_(addAction.label)}
48+
label={addAction.label}
4949
/>{' '}
5050
</div>
5151
) : null}

src/components/containers/TraceAccordion.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const TraceFold = connectTraceToPlot(Fold);
1111
class TraceAccordion extends Component {
1212
render() {
1313
const {data = []} = this.context;
14-
const {canAdd, children, messageIfEmptyFold} = this.props;
14+
const {canAdd, children, messageIfEmptyFold, localize: _} = this.props;
1515

1616
const content =
1717
data.length &&
@@ -30,7 +30,7 @@ class TraceAccordion extends Component {
3030

3131
if (canAdd) {
3232
const addAction = {
33-
label: 'Trace',
33+
label: _('Trace'),
3434
handler: ({onUpdate}) => {
3535
if (onUpdate) {
3636
onUpdate({

src/components/fields/TraceSelector.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,30 @@ function computeTraceOptionsFromSchema(schema, _, context) {
2222
{value: 'box', label: _('Box')},
2323
{value: 'bar', label: _('Bar')},
2424
{value: 'heatmap', label: _('Heatmap')},
25-
{value: 'histogram', label: _('Histogram')},
26-
{value: 'histogram2d', label: _('2D Histogram')},
27-
{value: 'histogram2dcontour', label: _('2D Contour Histogram')},
25+
// {value: 'histogram', label: _('Histogram')},
26+
// {value: 'histogram2d', label: _('2D Histogram')},
27+
// {value: 'histogram2dcontour', label: _('2D Contour Histogram')},
2828
{value: 'pie', label: _('Pie')},
2929
{value: 'contour', label: _('Contour')},
3030
{value: 'scatterternary', label: _('Ternary Scatter')},
31-
{value: 'violin', label: _('Violin')},
31+
// {value: 'violin', label: _('Violin')},
3232
{value: 'scatter3d', label: _('3D Scatter')},
3333
{value: 'surface', label: _('Surface')},
3434
{value: 'mesh3d', label: _('3D Mesh')},
3535
{value: 'scattergeo', label: _('Atlas Map')},
3636
{value: 'choropleth', label: _('Choropleth')},
37-
{value: 'scattergl', label: _('Scatter GL')},
38-
{value: 'pointcloud', label: _('Point Cloud')},
39-
{value: 'heatmapgl', label: _('Heatmap GL')},
40-
{value: 'parcoords', label: _('Parallel Coordinates')},
41-
{value: 'sankey', label: _('Sankey')},
42-
{value: 'table', label: _('Table')},
43-
{value: 'carpet', label: _('Carpet')},
44-
{value: 'scattercarpet', label: _('Carpet Scatter')},
45-
{value: 'contourcarpet', label: _('Carpet Contour')},
37+
// {value: 'scattergl', label: _('Scatter GL')},
38+
// {value: 'pointcloud', label: _('Point Cloud')},
39+
// {value: 'heatmapgl', label: _('Heatmap GL')},
40+
// {value: 'parcoords', label: _('Parallel Coordinates')},
41+
// {value: 'sankey', label: _('Sankey')},
42+
// {value: 'table', label: _('Table')},
43+
// {value: 'carpet', label: _('Carpet')},
44+
// {value: 'scattercarpet', label: _('Carpet Scatter')},
45+
// {value: 'contourcarpet', label: _('Carpet Contour')},
4646
{value: 'ohlc', label: _('OHLC')},
4747
{value: 'candlestick', label: _('Candlestick')},
48-
{value: 'scatterpolar', label: _('Polar Scatter')},
48+
// {value: 'scatterpolar', label: _('Polar Scatter')},
4949
].filter(obj => traceTypes.indexOf(obj.value) !== -1);
5050

5151
const traceIndex = traceType =>

src/default_panels/StyleTracesPanel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const StyleTracesPanel = ({localize: _}) => (
6565
/>
6666
<Radio
6767
attr="flatshading"
68-
label={_('flatshading')}
68+
label={_('Flatshading')}
6969
options={[
7070
{label: _('Enable'), value: true},
7171
{label: _('Disable'), value: false},

yarn.lock

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2604,6 +2604,10 @@ dom-serializer@0, dom-serializer@~0.1.0:
26042604
domelementtype "~1.1.1"
26052605
entities "~1.1.1"
26062606

2607+
dom-walk@^0.1.0:
2608+
version "0.1.1"
2609+
resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018"
2610+
26072611
domain-browser@^1.1.1:
26082612
version "1.1.7"
26092613
resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc"
@@ -3355,7 +3359,7 @@ fast-json-stable-stringify@^2.0.0:
33553359
version "2.0.0"
33563360
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
33573361

3358-
fast-levenshtein@~2.0.4:
3362+
fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.4:
33593363
version "2.0.6"
33603364
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
33613365

@@ -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
40754079
once "^1.3.0"
40764080
path-is-absolute "^1.0.0"
40774081

4082+
global@^4.3.0:
4083+
version "4.3.2"
4084+
resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f"
4085+
dependencies:
4086+
min-document "^2.19.0"
4087+
process "~0.5.1"
4088+
40784089
globals@^10.0.0:
40794090
version "10.4.0"
40804091
resolved "https://registry.yarnpkg.com/globals/-/globals-10.4.0.tgz#5c477388b128a9e4c5c5d01c7a2aca68c68b2da7"
@@ -4485,6 +4496,10 @@ [email protected]:
44854496
version "4.2.0"
44864497
resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d"
44874498

4499+
hoist-non-react-statics@^2.3.1:
4500+
version "2.3.1"
4501+
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz#343db84c6018c650778898240135a1420ee22ce0"
4502+
44884503
home-or-tmp@^2.0.0:
44894504
version "2.0.0"
44904505
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
@@ -6223,6 +6238,12 @@ mimic-fn@^1.0.0:
62236238
version "1.1.0"
62246239
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18"
62256240

6241+
min-document@^2.19.0:
6242+
version "2.19.0"
6243+
resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685"
6244+
dependencies:
6245+
dom-walk "^0.1.0"
6246+
62266247
minify-stream@^1.1.0:
62276248
version "1.1.0"
62286249
resolved "https://registry.yarnpkg.com/minify-stream/-/minify-stream-1.1.0.tgz#3ca3d226e0e53b98c8aa4d45e7aefc11fb925bbe"
@@ -7580,6 +7601,10 @@ process@^0.11.10:
75807601
version "0.11.10"
75817602
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
75827603

7604+
process@~0.5.1:
7605+
version "0.5.2"
7606+
resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf"
7607+
75837608
progress@^2.0.0:
75847609
version "2.0.0"
75857610
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f"
@@ -7863,6 +7888,16 @@ react-dom@^16.2.0:
78637888
object-assign "^4.1.1"
78647889
prop-types "^15.6.0"
78657890

7891+
react-hot-loader@^4.0.0-beta.21:
7892+
version "4.0.0-beta.21"
7893+
resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.0.0-beta.21.tgz#46a0345621f1a03cb3c1c6dc130f153fa66e5bae"
7894+
dependencies:
7895+
fast-levenshtein "^2.0.6"
7896+
global "^4.3.0"
7897+
hoist-non-react-statics "^2.3.1"
7898+
prop-types "^15.6.0"
7899+
react-stand-in "^4.0.0-beta.21"
7900+
78667901
react-input-autosize@^2.1.0:
78677902
version "2.1.2"
78687903
resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-2.1.2.tgz#a3dc11a5517c434db25229925541309de3f7a8f5"
@@ -7894,6 +7929,12 @@ react-select@^1.0.0-rc.10:
78947929
prop-types "^15.5.8"
78957930
react-input-autosize "^2.1.0"
78967931

7932+
react-stand-in@^4.0.0-beta.21:
7933+
version "4.0.0-beta.21"
7934+
resolved "https://registry.yarnpkg.com/react-stand-in/-/react-stand-in-4.0.0-beta.21.tgz#fb694e465cb20fab7f36d3284f82b68bbd7a657e"
7935+
dependencies:
7936+
shallowequal "^1.0.2"
7937+
78977938
react-test-renderer@^16.0.0-0, react-test-renderer@^16.2.0:
78987939
version "16.2.0"
78997940
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.2.0.tgz#bddf259a6b8fcd8555f012afc8eacc238872a211"
@@ -8632,7 +8673,7 @@ shallowequal@^0.2.2:
86328673
dependencies:
86338674
lodash.keys "^3.1.2"
86348675

8635-
shallowequal@^1.0.1:
8676+
shallowequal@^1.0.1, shallowequal@^1.0.2:
86368677
version "1.0.2"
86378678
resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.0.2.tgz#1561dbdefb8c01408100319085764da3fcf83f8f"
86388679

0 commit comments

Comments
 (0)