Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit dd8e2d4

Browse files
committed
Merge branch 'master' into validation
2 parents 9fea394 + 8171a52 commit dd8e2d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+13333
-4937
lines changed

.circleci/config.yml

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
version: 2
2+
3+
jobs:
4+
"python-2.7": &test-template
5+
docker:
6+
- image: circleci/python:2.7-stretch-node-browsers
7+
environment:
8+
PYTHON_VERSION: py27
9+
10+
steps:
11+
- checkout
12+
13+
- run:
14+
name: Create virtual env
15+
command: python -m venv || virtualenv venv
16+
17+
- run:
18+
name: Write job name
19+
command: echo $CIRCLE_JOB > circlejob.txt
20+
21+
- restore_cache:
22+
key: deps1-{{ .Branch }}-{{ checksum "requirements-dev.txt" }}-{{ checksum "package.json" }}-{{ checksum "package-lock.json" }}-{{ checksum ".circleci/config.yml" }}-{{ checksum "circlejob.txt" }}
23+
24+
- run:
25+
name: Install dependencies
26+
command: |
27+
sudo pip install virtualenv --upgrade
28+
. venv/bin/activate
29+
pip install -r requirements-dev.txt
30+
npm install --ignore-scripts
31+
32+
- save_cache:
33+
key: deps1-{{ .Branch }}-{{ checksum "requirements-dev.txt" }}-{{ checksum "package.json" }}-{{ checksum "package-lock.json" }}-{{ checksum ".circleci/config.yml" }}-{{ checksum "circlejob.txt" }}
34+
paths:
35+
- "venv"
36+
- "node_modules"
37+
- run:
38+
name: Build
39+
command: |
40+
. venv/bin/activate
41+
npm run build:js
42+
npm run build:py
43+
44+
- run:
45+
name: npm test
46+
command: npm test
47+
48+
- run:
49+
name: Run tests
50+
command: |
51+
. venv/bin/activate
52+
python --version
53+
python -m unittest test.test_integration
54+
python -m unittest test.test_dash_import
55+
56+
"python-3.6":
57+
<<: *test-template
58+
docker:
59+
- image: circleci/python:3.6-stretch-node-browsers
60+
environment:
61+
PYTHON_VERSION: py36
62+
63+
"python-3.7":
64+
<<: *test-template
65+
docker:
66+
- image: circleci/python:3.7-stretch-node-browsers
67+
environment:
68+
PYTHON_VERSION: py37
69+
70+
71+
workflows:
72+
version: 2
73+
build:
74+
jobs:
75+
- "python-2.7"
76+
- "python-3.6"
77+
- "python-3.7"

.eslintrc

+127-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,127 @@
1-
---
2-
extends: ./node_modules/dash-components-archetype/config/eslint/eslintrc-react.json
1+
{
2+
"extends": ["eslint:recommended", "prettier"],
3+
"parser": "babel-eslint",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module",
7+
"ecmaFeatures": {
8+
"arrowFunctions": true,
9+
"blockBindings": true,
10+
"classes": true,
11+
"defaultParams": true,
12+
"destructuring": true,
13+
"forOf": true,
14+
"generators": true,
15+
"modules": true,
16+
"templateStrings": true,
17+
"jsx": true
18+
}
19+
},
20+
"env": {
21+
"browser": true,
22+
"es6": true,
23+
"jasmine": true,
24+
"jest": true,
25+
"node": true
26+
},
27+
"globals": {
28+
"jest": true
29+
},
30+
"plugins": [
31+
"react",
32+
"import"
33+
],
34+
"rules": {
35+
"accessor-pairs": ["error"],
36+
"block-scoped-var": ["error"],
37+
"consistent-return": ["error"],
38+
"curly": ["error", "all"],
39+
"default-case": ["error"],
40+
"dot-location": ["off"],
41+
"dot-notation": ["error"],
42+
"eqeqeq": ["error"],
43+
"guard-for-in": ["off"],
44+
"import/export": "error",
45+
"import/named": ["off"],
46+
"import/namespace": ["off"],
47+
"import/no-duplicates": ["error"],
48+
"import/no-named-as-default": ["error"],
49+
"import/no-unresolved": ["off"],
50+
"new-cap": ["error", {
51+
"capIsNewExceptionPattern": "Immutable\\.*"
52+
}],
53+
"no-alert": ["off"],
54+
"no-caller": ["error"],
55+
"no-case-declarations": ["error"],
56+
"no-console": ["error"],
57+
"no-div-regex": ["error"],
58+
"no-dupe-keys": ["error"],
59+
"no-else-return": ["error"],
60+
"no-empty-pattern": ["error"],
61+
"no-eq-null": ["error"],
62+
"no-eval": ["error"],
63+
"no-extend-native": ["error"],
64+
"no-extra-bind": ["error"],
65+
"no-extra-boolean-cast": ["error"],
66+
"no-inline-comments": ["error"],
67+
"no-implicit-coercion": ["error"],
68+
"no-implied-eval": ["error"],
69+
"no-inner-declarations": ["off"],
70+
"no-invalid-this": ["error"],
71+
"no-iterator": ["error"],
72+
"no-labels": ["error"],
73+
"no-lone-blocks": ["error"],
74+
"no-loop-func": ["error"],
75+
"no-multi-str": ["error"],
76+
"no-native-reassign": ["error"],
77+
"no-new": ["error"],
78+
"no-new-func": ["error"],
79+
"no-new-wrappers": ["error"],
80+
"no-param-reassign": ["error"],
81+
"no-process-env": ["warn"],
82+
"no-proto": ["error"],
83+
"no-redeclare": ["error"],
84+
"no-return-assign": ["error"],
85+
"no-script-url": ["error"],
86+
"no-self-compare": ["error"],
87+
"no-sequences": ["error"],
88+
"no-shadow": ["off"],
89+
"no-throw-literal": ["error"],
90+
"no-undefined": ["error"],
91+
"no-unused-expressions": ["error"],
92+
"no-use-before-define": ["error", "nofunc"],
93+
"no-useless-call": ["error"],
94+
"no-useless-concat": ["error"],
95+
"no-with": ["error"],
96+
"prefer-const": ["error"],
97+
"radix": ["error"],
98+
"react/jsx-no-duplicate-props": ["error"],
99+
"react/jsx-no-undef": ["error"],
100+
"react/jsx-uses-react": ["error"],
101+
"react/jsx-uses-vars": ["error"],
102+
"react/no-did-update-set-state": ["error"],
103+
"react/no-direct-mutation-state": ["error"],
104+
"react/no-is-mounted": ["error"],
105+
"react/no-unknown-property": ["error"],
106+
"react/prefer-es6-class": ["error", "always"],
107+
"react/prop-types": "error",
108+
"valid-jsdoc": ["error"],
109+
"yoda": ["error"],
110+
"spaced-comment": ["error", "always", {
111+
"block": {
112+
"exceptions": ["*"]
113+
}
114+
}],
115+
"no-unused-vars": ["error", {
116+
"args": "after-used",
117+
"argsIgnorePattern": "^_",
118+
"caughtErrorsIgnorePattern": "^e$"
119+
}],
120+
"no-magic-numbers": ["error", {
121+
"ignoreArrayIndexes": true,
122+
"ignore": [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 100, 10, 16, 0.5, 25]
123+
}],
124+
"no-underscore-dangle": ["off"],
125+
"no-useless-escape": ["off"]
126+
}
127+
}

.prettierrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"tabWidth": 4,
3+
"singleQuote": true,
4+
"bracketSpacing": false,
5+
"trailingComma": "es5"
6+
}

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [0.28.2] - 2018-09-06
6+
### Fixed
7+
- Fixed bug in Tabs component where initial tab content wasn't rendering, [#282](https://github.com/plotly/dash-core-components/issues/282)
8+
- Fixed bug in Tabs component where no default Tab is selected if Tabs.value is empty
9+
10+
## [0.28.1] - 2018-08-29
11+
### Changed
12+
- `candlestick` and `OHLC` charts are now plotted using the `Plotly.react` method instead of the `Plotly.newPlot` method.
13+
### Fixed
14+
- Fix bug where front-end error was thrown when setting `Graph.figure = {}` (fixes [#260]).
15+
516
## [0.28.0]
617
- Upgraded Plotly.js, the underlying library behind the
718
`dash_core_components.Graph` component, to [version 1.40.1](https://github.com/plotly/plotly.js/releases/tag/v1.40.1).

circle.yml

-21
This file was deleted.

dash_core_components/Dropdown.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,18 @@ class Dropdown(Component):
3434
- multi (boolean; optional): If true, the user can select multiple values
3535
- placeholder (string; optional): The grey, default text shown when no option is selected
3636
- searchable (boolean; optional): Whether to enable the searching feature or not
37+
- style (dict; optional)
3738
3839
Available events: 'change'"""
3940
_schema = schema
4041
@_explicitize_args
41-
def __init__(self, id=Component.UNDEFINED, options=Component.UNDEFINED, value=Component.UNDEFINED, className=Component.UNDEFINED, clearable=Component.UNDEFINED, disabled=Component.UNDEFINED, multi=Component.UNDEFINED, placeholder=Component.UNDEFINED, searchable=Component.UNDEFINED, **kwargs):
42-
self._prop_names = ['id', 'options', 'value', 'className', 'clearable', 'disabled', 'multi', 'placeholder', 'searchable']
42+
def __init__(self, id=Component.UNDEFINED, options=Component.UNDEFINED, value=Component.UNDEFINED, className=Component.UNDEFINED, clearable=Component.UNDEFINED, disabled=Component.UNDEFINED, multi=Component.UNDEFINED, placeholder=Component.UNDEFINED, searchable=Component.UNDEFINED, style=Component.UNDEFINED, **kwargs):
43+
self._prop_names = ['id', 'options', 'value', 'className', 'clearable', 'disabled', 'multi', 'placeholder', 'searchable', 'style']
4344
self._type = 'Dropdown'
4445
self._namespace = 'dash_core_components'
4546
self._valid_wildcard_attributes = []
4647
self.available_events = ['change']
47-
self.available_properties = ['id', 'options', 'value', 'className', 'clearable', 'disabled', 'multi', 'placeholder', 'searchable']
48+
self.available_properties = ['id', 'options', 'value', 'className', 'clearable', 'disabled', 'multi', 'placeholder', 'searchable', 'style']
4849
self.available_wildcard_properties = []
4950

5051
_explicit_args = kwargs.pop('_explicit_args')

dash_core_components/bundle.js

+37-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash_core_components/metadata.json

+43-1
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,13 @@
755755
"value": "'singledate'",
756756
"computed": false
757757
}
758+
},
759+
"fireEvent": {
760+
"type": {
761+
"name": "func"
762+
},
763+
"required": false,
764+
"description": ""
758765
}
759766
}
760767
},
@@ -1083,6 +1090,13 @@
10831090
},
10841091
"required": false,
10851092
"description": "Dash-assigned callback that gets fired when the value changes."
1093+
},
1094+
"fireEvent": {
1095+
"type": {
1096+
"name": "func"
1097+
},
1098+
"required": false,
1099+
"description": ""
10861100
}
10871101
}
10881102
},
@@ -1208,6 +1222,13 @@
12081222
"required": false,
12091223
"description": "Dash-assigned callback that gets fired when the input changes"
12101224
},
1225+
"style": {
1226+
"type": {
1227+
"name": "object"
1228+
},
1229+
"required": false,
1230+
"description": ""
1231+
},
12111232
"dashEvents": {
12121233
"type": {
12131234
"name": "enum",
@@ -1220,6 +1241,13 @@
12201241
},
12211242
"required": false,
12221243
"description": ""
1244+
},
1245+
"fireEvent": {
1246+
"type": {
1247+
"name": "func"
1248+
},
1249+
"required": false,
1250+
"description": ""
12231251
}
12241252
}
12251253
},
@@ -2149,6 +2177,13 @@
21492177
"value": "true",
21502178
"computed": false
21512179
}
2180+
},
2181+
"setProps": {
2182+
"type": {
2183+
"name": "func"
2184+
},
2185+
"required": false,
2186+
"description": ""
21522187
}
21532188
}
21542189
},
@@ -2923,6 +2958,13 @@
29232958
"description": "A Dash component that lets you render pages with tabs - the Tabs component's children\ncan be dcc.Tab components, which can hold a label that will be displayed as a tab, and can in turn hold\nchildren components that will be that tab's content.",
29242959
"displayName": "Tabs",
29252960
"methods": [
2961+
{
2962+
"name": "parseChildrenToArray",
2963+
"docblock": null,
2964+
"modifiers": [],
2965+
"params": [],
2966+
"returns": null
2967+
},
29262968
{
29272969
"name": "selectHandler",
29282970
"docblock": null,
@@ -3529,4 +3571,4 @@
35293571
}
35303572
}
35313573
}
3532-
}
3574+
}

0 commit comments

Comments
 (0)