Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
e107d87
update react and create context
oprstchn Nov 8, 2018
fbbcfbb
add Provider
oprstchn Nov 8, 2018
f059bf5
remove provider
oprstchn Nov 11, 2018
175ca3e
connect To ContextType
oprstchn Nov 11, 2018
58ca319
fix eslint
oprstchn Nov 11, 2018
abb529c
remove test:jswatch
oprstchn Nov 11, 2018
2d2fb96
Merge branch 'fork_master' into feature/remove_contextTypees
oprstchn Nov 11, 2018
826794b
Merge pull request #3 from oprstchn/feature/remove_contextTypees
oprstchn Nov 11, 2018
a63e234
change peerDependencies
oprstchn Nov 11, 2018
f7239bc
update webpack 4 and webpack-dev-server v3
oprstchn Nov 11, 2018
ff83b6f
make:lib
oprstchn Nov 11, 2018
a529a8e
temporary change main point
oprstchn Nov 11, 2018
5a14605
add make files
oprstchn Nov 11, 2018
eafc0c2
add index.js
oprstchn Nov 11, 2018
3df797c
Remake
oprstchn Nov 11, 2018
ff7d646
remove context
oprstchn Nov 11, 2018
bf76d50
remake
oprstchn Nov 11, 2018
8614ed5
remake
oprstchn Nov 11, 2018
c861c06
add fold__top box-sizing:content-box
oprstchn Nov 12, 2018
8867201
remove Item.contextType
oprstchn Nov 12, 2018
40c5dba
add props updatePayload in PlotlyEditor
oprstchn Nov 12, 2018
45d0e4b
Merge pull request #4 from oprstchn/feature/update_datasource
oprstchn Nov 12, 2018
c9a7cdf
change handleDataSourceUpdate to handleUpdateActions
oprstchn Nov 14, 2018
176ea32
change handleDataSourceUpdate to handleUpdateActions
oprstchn Nov 14, 2018
f7f528a
remake
oprstchn Nov 14, 2018
0098581
remove lib
oprstchn Nov 15, 2018
6fa1ade
remove contextTypes in GraphCreatePanel;
oprstchn Nov 15, 2018
d55fa99
remove contextTypes in connector
oprstchn Nov 15, 2018
d4978c6
remove contextTypes
oprstchn Nov 16, 2018
a4d9b7e
pass to context in props
oprstchn Nov 19, 2018
927a0b8
fix UnconnnectedContainerVisibility-test
oprstchn Nov 19, 2018
1224183
fix tests
oprstchn Nov 20, 2018
83ce0e6
all test pass
oprstchn Nov 20, 2018
7579cae
remove contextTypes
oprstchn Nov 20, 2018
71aadd0
remove contextTypes and getChildContext
oprstchn Nov 20, 2018
ebeb8b3
fix TransformAccordion
oprstchn Nov 21, 2018
b4461ba
remove comment out
oprstchn Nov 21, 2018
1434b26
complete remove contextTypes and getChildContext
oprstchn Nov 21, 2018
d39719a
temporary checkin src in .npmignore
oprstchn Nov 21, 2018
2d5d3c0
remove optionalPanel
oprstchn Nov 21, 2018
b508121
remove unnecessary requireContext
oprstchn Nov 21, 2018
e9016d2
Merge remote-tracking branch 'upstream/master' into fork_master
oprstchn Nov 21, 2018
6fe11d4
Merge branch 'fork_master' into feature/migration_new_context_api
oprstchn Nov 21, 2018
805ef94
fix prop-types error
oprstchn Nov 22, 2018
c505ba6
fix prop-types in aggregationToTransform
oprstchn Nov 22, 2018
27cd1fb
update devDependency
oprstchn Nov 22, 2018
68fe356
update percy
oprstchn Nov 24, 2018
2c8e276
fix UnconnectedVisibilitySelect
oprstchn Nov 25, 2018
97b4117
fix RangeSelectorAccordion
oprstchn Nov 25, 2018
75e9679
fix ImageStyles
oprstchn Nov 25, 2018
7d4ecc1
fix some context pass
oprstchn Nov 25, 2018
0cf1f13
fix colors in processing
oprstchn Nov 25, 2018
f89d10c
remove key
oprstchn Nov 25, 2018
ad1effc
change pacakge.json prop-types
oprstchn Nov 25, 2018
fbdc732
fix StyleTracePanel
oprstchn Nov 25, 2018
18bee1d
remove Field text
oprstchn Nov 25, 2018
c03d55b
add RecursiveComponent
oprstchn Nov 25, 2018
0d12c92
fix UpdateMenuPanel
oprstchn Nov 26, 2018
3c2aeda
fix ColorBars
oprstchn Nov 26, 2018
36b5fa5
move circleci.yml to .circleci/config.yml
oprstchn Nov 26, 2018
17380d3
add sudo
oprstchn Nov 26, 2018
b11f046
apt-get install
oprstchn Nov 26, 2018
b7b7c3b
split apt
oprstchn Nov 26, 2018
4f27c4a
update prettier
oprstchn Nov 26, 2018
1c0f6ab
remove react-percy in package.json
oprstchn Nov 26, 2018
04bee52
update percy
oprstchn Nov 26, 2018
1f61ee6
avoid percy
oprstchn Nov 26, 2018
6f29fd5
Merge pull request #9 from oprstchn/fix/circleci
oprstchn Nov 26, 2018
6ca0995
add @percy/react-percy-ci
oprstchn Nov 26, 2018
70d2381
add percy-test
oprstchn Nov 26, 2018
1fd7113
avoid react-percy in circleci
oprstchn Nov 26, 2018
47dd6bf
fix
oprstchn Nov 27, 2018
dbf7fda
test circleci
oprstchn Nov 27, 2018
d0e1777
fix npm install order
oprstchn Nov 27, 2018
4eaf045
fix
oprstchn Nov 27, 2018
d467d3e
Merge pull request #8 from oprstchn/fix/reac-percy
oprstchn Nov 27, 2018
5171cb8
Merge branch 'master' into feature/migration_new_context_api
oprstchn Dec 3, 2018
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
Prev Previous commit
Next Next commit
fix prop-types error
  • Loading branch information
oprstchn committed Nov 22, 2018
commit 805ef946e8ef6bd82cf7049570030c4ee1a56c40
124 changes: 62 additions & 62 deletions scripts/translationKeys/combined-translation-keys.txt

Large diffs are not rendered by default.

124 changes: 62 additions & 62 deletions scripts/translationKeys/translation-keys.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/containers/AxesFold.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AxesFold extends Component {
AxesFold.propTypes = {
children: PropTypes.any,
options: PropTypes.array,
context: PropTypes.object,
context: PlotlyFold.requireContext,
};

AxesFold.plotly_editor_traits = {foldable: true};
Expand Down
2 changes: 1 addition & 1 deletion src/components/containers/PanelHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ PanelHeader.propTypes = {
children: PropTypes.node,
hasOpen: PropTypes.bool,
toggleFolds: PropTypes.func,
context: PropTypes.object,
context: PropTypes.any,
};

export default PanelHeader;
10 changes: 8 additions & 2 deletions src/components/containers/PlotlyFold.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React, {Component} from 'react';
import classnames from 'classnames';
import {CloseIcon, AngleDownIcon} from 'plotly-icons';
import {unpackPlotProps, containerConnectedContextTypes, striptags} from 'lib';
import {recursiveMap} from '../../lib/recursiveMap';

export class Fold extends Component {
constructor() {
Expand Down Expand Up @@ -85,7 +86,11 @@ export class Fold extends Component {
let foldContent = null;
if (!folded) {
if (this.foldVisible) {
foldContent = <div className={contentClass}>{children}</div>;
foldContent = (
<div className={contentClass}>
{recursiveMap(children, {...this.props.context, ...this.provideValue()})}
</div>
);
} else {
foldContent = (
<div className={contentClass}>
Expand Down Expand Up @@ -119,11 +124,12 @@ Fold.propTypes = {
icon: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
messageIfEmpty: PropTypes.string,
name: PropTypes.string,
context: PropTypes.object,
context: PropTypes.any,
};

Fold.requireContext = {
deleteContainer: PropTypes.func,
...containerConnectedContextTypes,
};

// Fold.childContextTypes = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/containers/PlotlyPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Panel.propTypes = {
deleteAction: PropTypes.func,
noPadding: PropTypes.bool,
showExpandCollapse: PropTypes.bool,
context: PropTypes.object,
context: PropTypes.any,
};

Panel.defaultProps = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/containers/PlotlySection.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Section.propTypes = {
children: PropTypes.node,
name: PropTypes.string,
attr: PropTypes.string,
context: PropTypes.object,
context: PropTypes.any,
};
Section.requireContext = containerConnectedContextTypes;

Expand Down
2 changes: 1 addition & 1 deletion src/components/containers/TransformAccordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ TransformAccordion.contextType = EditorControlsContext;

TransformAccordion.propTypes = {
children: PropTypes.node,
context: PropTypes.object,
context: PropTypes.any,
};

export default TransformAccordion;
1 change: 1 addition & 0 deletions src/components/containers/derived.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ TraceTypeSection.propTypes = {
name: PropTypes.string,
traceTypes: PropTypes.array,
mode: PropTypes.string,
context: PropTypes.any,
};

TraceTypeSection.defaultProps = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/fields/AxesCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ UnconnectedAxisCreator.propTypes = {
container: PropTypes.object,
fullContainer: PropTypes.object,
updateContainer: PropTypes.func,
context: PropTypes.object,
context: PropTypes.any,
};

UnconnectedAxisCreator.contextType = EditorControlsContext;
Expand Down Expand Up @@ -163,7 +163,7 @@ class UnconnectedAxesCreator extends Component {
UnconnectedAxesCreator.propTypes = {
container: PropTypes.object,
fullContainer: PropTypes.object,
context: PropTypes.object,
context: PropTypes.any,
};

UnconnectedAxesCreator.contextType = EditorControlsContext;
Expand Down
2 changes: 1 addition & 1 deletion src/components/fields/AxesSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ AxesSelector.contextType = EditorControlsContext;

AxesSelector.propTypes = {
axesOptions: PropTypes.array,
context: PropTypes.object,
context: PropTypes.any,
};

export default AxesSelector;
2 changes: 1 addition & 1 deletion src/components/fields/DualNumeric.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ UnconnectedDualNumericFraction.propTypes = {
updatePlot: PropTypes.func,
attr2: PropTypes.any,
percentage: PropTypes.bool,
context: PropTypes.object,
context: PropTypes.any,
...Field.propTypes,
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/fields/Field.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Field.propTypes = {
children: PropTypes.node,
extraComponent: PropTypes.any,
fieldContainerClassName: PropTypes.string,
context: PropTypes.object,
context: PropTypes.any,
};

Field.requireContext = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/fields/FilterOperation.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ UnconnectedFilterValue.propTypes = {
defaultValue: PropTypes.string,
fullValue: PropTypes.any,
updatePlot: PropTypes.func,
context: PropTypes.object,
context: PropTypes.any,
...Field.propTypes,
};
UnconnectedFilterValue.contextType = EditorControlsContext;
Expand Down
2 changes: 1 addition & 1 deletion src/components/fields/VisibilitySelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ UnconnectedVisibilitySelect.propTypes = {
defaultOpt: PropTypes.oneOfType([PropTypes.number, PropTypes.bool, PropTypes.string]),
label: PropTypes.string,
attr: PropTypes.string,
context: PropTypes.object,
context: PropTypes.any,
...Field.propTypes,
};

Expand Down
2 changes: 1 addition & 1 deletion src/default_panels/GraphTransformsPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Aggregations.requireContext = {
fullContainer: PropTypes.object,
};
Aggregations.propTypes = {
context: PropTypes.object,
context: PropTypes.any,
};

const GraphTransformsPanel = () => {
Expand Down
5 changes: 5 additions & 0 deletions src/lib/connectAggregationToTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ export default function connectAggregationToTransform(WrappedComponent) {
getValObject: PropTypes.func,
};

AggregationConnectedComponent.propTypes = {
children: PropTypes.node,
context: PropTypes.any,
};

const {plotly_editor_traits} = WrappedComponent;
AggregationConnectedComponent.plotly_editor_traits = plotly_editor_traits;

Expand Down
5 changes: 5 additions & 0 deletions src/lib/connectAnnotationToLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ export default function connectAnnotationToLayout(WrappedComponent) {
getValObject: PropTypes.func,
};

AnnotationConnectedComponent.propTypes = {
children: PropTypes.node,
context: PropTypes.any,
};

const {plotly_editor_traits} = WrappedComponent;
AnnotationConnectedComponent.plotly_editor_traits = plotly_editor_traits;

Expand Down
6 changes: 5 additions & 1 deletion src/lib/connectAxesToLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,14 @@ export default function connectAxesToLayout(WrappedComponent) {
container: PropTypes.object.isRequired,
fullContainer: PropTypes.object.isRequired,
updateContainer: PropTypes.func,
localize: PropTypes.func,
getValObject: PropTypes.func,
};

AxesConnectedComponent.propTypes = {
children: PropTypes.node,
context: PropTypes.any,
};

const {plotly_editor_traits} = WrappedComponent;
AxesConnectedComponent.plotly_editor_traits = plotly_editor_traits;

Expand Down
12 changes: 7 additions & 5 deletions src/lib/connectCartesianSubplotToLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ export default function connectCartesianSubplotToLayout(WrappedComponent) {

SubplotConnectedComponent.displayName = `SubplotConnected${getDisplayName(WrappedComponent)}`;

SubplotConnectedComponent.propTypes = {
xaxis: PropTypes.string.isRequired,
yaxis: PropTypes.string.isRequired,
};

SubplotConnectedComponent.contextType = EditorControlsContext;

SubplotConnectedComponent.requireContext = {
Expand All @@ -95,6 +90,13 @@ export default function connectCartesianSubplotToLayout(WrappedComponent) {
getValObject: PropTypes.func,
};

SubplotConnectedComponent.propTypes = {
xaxis: PropTypes.string.isRequired,
yaxis: PropTypes.string.isRequired,
children: PropTypes.node,
context: PropTypes.any,
};

const {plotly_editor_traits} = WrappedComponent;
SubplotConnectedComponent.plotly_editor_traits = plotly_editor_traits;

Expand Down
10 changes: 6 additions & 4 deletions src/lib/connectImageToLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ export default function connectImageToLayout(WrappedComponent) {

ImageConnectedComponent.displayName = `ImageConnected${getDisplayName(WrappedComponent)}`;

ImageConnectedComponent.propTypes = {
imageIndex: PropTypes.number.isRequired,
};

ImageConnectedComponent.contextType = EditorControlsContext;

ImageConnectedComponent.requireContext = {
Expand All @@ -89,6 +85,12 @@ export default function connectImageToLayout(WrappedComponent) {
getValObject: PropTypes.func,
};

ImageConnectedComponent.propTypes = {
imageIndex: PropTypes.number.isRequired,
children: PropTypes.node,
context: PropTypes.any,
};

const {plotly_editor_traits} = WrappedComponent;
ImageConnectedComponent.plotly_editor_traits = plotly_editor_traits;

Expand Down
12 changes: 4 additions & 8 deletions src/lib/connectLayoutToPlot.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {getDisplayName} from '../lib';
import {EDITOR_ACTIONS} from './constants';
import {EditorControlsContext} from '../context';
import {recursiveMap} from './recursiveMap';
// import PropTypes from "prop-types";
import PropTypes from 'prop-types';

export default function connectLayoutToPlot(WrappedComponent) {
class LayoutConnectedComponent extends Component {
Expand Down Expand Up @@ -67,13 +67,9 @@ export default function connectLayoutToPlot(WrappedComponent) {
LayoutConnectedComponent.displayName = `LayoutConnected${getDisplayName(WrappedComponent)}`;

LayoutConnectedComponent.contextType = EditorControlsContext;

// LayoutConnectedComponent.childContextTypes = {
// getValObject: PropTypes.func,
// updateContainer: PropTypes.func,
// container: PropTypes.object,
// fullContainer: PropTypes.object,
// };
LayoutConnectedComponent.propTypes = {
children: PropTypes.node,
};

const {plotly_editor_traits} = WrappedComponent;
LayoutConnectedComponent.plotly_editor_traits = plotly_editor_traits;
Expand Down
10 changes: 6 additions & 4 deletions src/lib/connectNonCartesianSubplotToLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ export default function connectNonCartesianSubplotToLayout(WrappedComponent) {

SubplotConnectedComponent.displayName = `SubplotConnected${getDisplayName(WrappedComponent)}`;

SubplotConnectedComponent.propTypes = {
subplot: PropTypes.string.isRequired,
};

SubplotConnectedComponent.contextType = EditorControlsContext;

SubplotConnectedComponent.requireContext = {
Expand All @@ -83,6 +79,12 @@ export default function connectNonCartesianSubplotToLayout(WrappedComponent) {
getValObject: PropTypes.func,
};

SubplotConnectedComponent.propTypes = {
subplot: PropTypes.string.isRequired,
children: PropTypes.node,
context: PropTypes.any,
};

const {plotly_editor_traits} = WrappedComponent;
SubplotConnectedComponent.plotly_editor_traits = plotly_editor_traits;

Expand Down
10 changes: 6 additions & 4 deletions src/lib/connectRangeSelectorToAxis.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@ export default function connectRangeSelectorToAxis(WrappedComponent) {
WrappedComponent
)}`;

RangeSelectorConnectedComponent.propTypes = {
rangeselectorIndex: PropTypes.number.isRequired,
};

RangeSelectorConnectedComponent.contextType = EditorControlsContext;

RangeSelectorConnectedComponent.requireContext = {
Expand All @@ -96,6 +92,12 @@ export default function connectRangeSelectorToAxis(WrappedComponent) {
getValObject: PropTypes.func,
};

RangeSelectorConnectedComponent.propTypes = {
rangeselectorIndex: PropTypes.number.isRequired,
children: PropTypes.node,
context: PropTypes.any,
};

const {plotly_editor_traits} = WrappedComponent;
RangeSelectorConnectedComponent.plotly_editor_traits = plotly_editor_traits;

Expand Down
9 changes: 6 additions & 3 deletions src/lib/connectShapeToLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ export default function connectShapeToLayout(WrappedComponent) {

ShapeConnectedComponent.displayName = `ShapeConnected${getDisplayName(WrappedComponent)}`;

ShapeConnectedComponent.propTypes = {
shapeIndex: PropTypes.number.isRequired,
};
ShapeConnectedComponent.contextType = EditorControlsContext;
ShapeConnectedComponent.requireContext = {
container: PropTypes.object,
Expand All @@ -87,6 +84,12 @@ export default function connectShapeToLayout(WrappedComponent) {
getValObject: PropTypes.func,
};

ShapeConnectedComponent.propTypes = {
shapeIndex: PropTypes.number.isRequired,
children: PropTypes.node,
context: PropTypes.any,
};

const {plotly_editor_traits} = WrappedComponent;
ShapeConnectedComponent.plotly_editor_traits = plotly_editor_traits;

Expand Down
9 changes: 5 additions & 4 deletions src/lib/connectSliderToLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ export default function connectSliderToLayout(WrappedComponent) {

SliderConnectedComponent.displayName = `SliderConnected${getDisplayName(WrappedComponent)}`;

SliderConnectedComponent.propTypes = {
sliderIndex: PropTypes.number.isRequired,
};

SliderConnectedComponent.contextType = EditorControlsContext;

SliderConnectedComponent.requireContext = {
Expand All @@ -75,6 +71,11 @@ export default function connectSliderToLayout(WrappedComponent) {
updateContainer: PropTypes.func,
getValObject: PropTypes.func,
};
SliderConnectedComponent.propTypes = {
sliderIndex: PropTypes.number.isRequired,
children: PropTypes.node,
context: PropTypes.any,
};

const {plotly_editor_traits} = WrappedComponent;
SliderConnectedComponent.plotly_editor_traits = plotly_editor_traits;
Expand Down
4 changes: 4 additions & 0 deletions src/lib/connectToContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ export default function connectToContainer(WrappedComponent, config = {}) {
ContainerConnectedComponent.displayName = `ContainerConnected${getDisplayName(WrappedComponent)}`;
ContainerConnectedComponent.requireContext = containerConnectedContextTypes;
ContainerConnectedComponent.contextType = EditorControlsContext;
ContainerConnectedComponent.propTypes = {
children: PropTypes.node,
context: PropTypes.any,
};

const {plotly_editor_traits} = WrappedComponent;
ContainerConnectedComponent.plotly_editor_traits = plotly_editor_traits;
Expand Down
1 change: 1 addition & 0 deletions src/lib/connectTraceToPlot.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ export default function connectTraceToPlot(WrappedComponent) {
TraceConnectedComponent.propTypes = {
traceIndexes: PropTypes.arrayOf(PropTypes.number).isRequired,
fullDataArrayPosition: PropTypes.arrayOf(PropTypes.number),
children: PropTypes.node,
};

TraceConnectedComponent.contextType = EditorControlsContext;
Expand Down
Loading