Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix and new components added. #160

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
export(daqBooleanSwitch)
export(daqColorPicker)
export(daqDarkThemeProvider)
export(daqDirectionCompass)
export(daqGauge)
export(daqGraduatedBar)
export(daqIndicator)
Expand Down
18 changes: 18 additions & 0 deletions R/daqDirectionCompass.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# AUTO GENERATED FILE - DO NOT EDIT

daqDirectionCompass <- function(id=NULL, direction=NULL, label=NULL, labelPosition=NULL, showCurrentValue=NULL, size=NULL, theme=NULL) {

props <- list(id=id, direction=direction, label=label, labelPosition=labelPosition, showCurrentValue=showCurrentValue, size=size, theme=theme)
if (length(props) > 0) {
props <- props[!vapply(props, is.null, logical(1))]
}
component <- list(
props = props,
type = 'DirectionCompass',
namespace = 'dash_daq',
propNames = c('id', 'direction', 'label', 'labelPosition', 'showCurrentValue', 'size', 'theme'),
package = 'dashDaq'
)

structure(component, class = c('dash_component', 'list'))
}
6 changes: 3 additions & 3 deletions R/daqJoystick.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# AUTO GENERATED FILE - DO NOT EDIT

daqJoystick <- function(id=NULL, angle=NULL, className=NULL, force=NULL, label=NULL, labelPosition=NULL, size=NULL, style=NULL, theme=NULL) {
daqJoystick <- function(id=NULL, angle=NULL, className=NULL, force=NULL, label=NULL, labelPosition=NULL, lockX=NULL, lockY=NULL, size=NULL, style=NULL, theme=NULL) {

props <- list(id=id, angle=angle, className=className, force=force, label=label, labelPosition=labelPosition, size=size, style=style, theme=theme)
props <- list(id=id, angle=angle, className=className, force=force, label=label, labelPosition=labelPosition, lockX=lockX, lockY=lockY, size=size, style=style, theme=theme)
if (length(props) > 0) {
props <- props[!vapply(props, is.null, logical(1))]
}
component <- list(
props = props,
type = 'Joystick',
namespace = 'dash_daq',
propNames = c('id', 'angle', 'className', 'force', 'label', 'labelPosition', 'size', 'style', 'theme'),
propNames = c('id', 'angle', 'className', 'force', 'label', 'labelPosition', 'lockX', 'lockY', 'size', 'style', 'theme'),
package = 'dashDaq'
)

Expand Down
68 changes: 68 additions & 0 deletions dash_daq/DirectionCompass.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# AUTO GENERATED FILE - DO NOT EDIT

from dash.development.base_component import Component, _explicitize_args


class DirectionCompass(Component):
"""A DirectionCompass component.


Keyword arguments:

- id (string; optional):
id of root element.

- direction (number; default 0):
angle(degrees) of needle of compass.

- label (dict; default ''):
label text.

`label` is a string | dict with keys:

- label (string; optional)

- style (dict; optional)

- labelPosition (a value equal to: 'top', 'bottom'; default 'bottom'):
position of label either top or bottom.

- showCurrentValue (boolean; optional):
show current value.

- size (number; default 150):
size of compass.

- theme (dict; default light):
theme provider.

`theme` is a dict with keys:

- dark (boolean; optional):
True for Dark mode, False for Light.

- detail (string; optional):
Color used for UI details, like borders.

- primary (string; optional):
Highlight color.

- secondary (string; optional):
Supporting color."""
@_explicitize_args
def __init__(self, id=Component.UNDEFINED, size=Component.UNDEFINED, labelPosition=Component.UNDEFINED, label=Component.UNDEFINED, direction=Component.UNDEFINED, theme=Component.UNDEFINED, showCurrentValue=Component.UNDEFINED, **kwargs):
self._prop_names = ['id', 'direction', 'label', 'labelPosition', 'showCurrentValue', 'size', 'theme']
self._type = 'DirectionCompass'
self._namespace = 'dash_daq'
self._valid_wildcard_attributes = []
self.available_properties = ['id', 'direction', 'label', 'labelPosition', 'showCurrentValue', 'size', 'theme']
self.available_wildcard_properties = []
_explicit_args = kwargs.pop('_explicit_args')
_locals = locals()
_locals.update(kwargs) # For wildcard attrs
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
for k in []:
if k not in args:
raise TypeError(
'Required argument `' + k + '` was not specified.')
super(DirectionCompass, self).__init__(**args)
12 changes: 9 additions & 3 deletions dash_daq/Joystick.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ class Joystick(Component):
- labelPosition (a value equal to: 'top', 'bottom'; default 'top'):
Where the indicator label is positioned.

- lockX (boolean; optional):
Joystick only move on X axis Its value will either True or False.

- lockY (boolean; optional):
Joystick only move on Y axis Its value will either True or False.

- size (number; default 100):
Size (width) of the component in pixels.

Expand All @@ -45,12 +51,12 @@ class Joystick(Component):
- theme (dict; default light):
Theme configuration to be set by a ThemeProvider."""
@_explicitize_args
def __init__(self, id=Component.UNDEFINED, angle=Component.UNDEFINED, force=Component.UNDEFINED, size=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, **kwargs):
self._prop_names = ['id', 'angle', 'className', 'force', 'label', 'labelPosition', 'size', 'style', 'theme']
def __init__(self, id=Component.UNDEFINED, angle=Component.UNDEFINED, force=Component.UNDEFINED, size=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, lockX=Component.UNDEFINED, lockY=Component.UNDEFINED, **kwargs):
self._prop_names = ['id', 'angle', 'className', 'force', 'label', 'labelPosition', 'lockX', 'lockY', 'size', 'style', 'theme']
self._type = 'Joystick'
self._namespace = 'dash_daq'
self._valid_wildcard_attributes = []
self.available_properties = ['id', 'angle', 'className', 'force', 'label', 'labelPosition', 'size', 'style', 'theme']
self.available_properties = ['id', 'angle', 'className', 'force', 'label', 'labelPosition', 'lockX', 'lockY', 'size', 'style', 'theme']
self.available_wildcard_properties = []
_explicit_args = kwargs.pop('_explicit_args')
_locals = locals()
Expand Down
2 changes: 2 additions & 0 deletions dash_daq/_imports_.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from .BooleanSwitch import BooleanSwitch
from .ColorPicker import ColorPicker
from .DarkThemeProvider import DarkThemeProvider
from .DirectionCompass import DirectionCompass
from .Gauge import Gauge
from .GraduatedBar import GraduatedBar
from .Indicator import Indicator
Expand All @@ -20,6 +21,7 @@
"BooleanSwitch",
"ColorPicker",
"DarkThemeProvider",
"DirectionCompass",
"Gauge",
"GraduatedBar",
"Indicator",
Expand Down
2 changes: 1 addition & 1 deletion dash_daq/async-colorpicker.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dash_daq/async-colorpicker.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dash_daq/dash_daq.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dash_daq/dash_daq.min.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dash_daq/package-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"build:dev": "npm run build:js-dev && npm run build:py",
"build-tarball": "npm run build && python setup.py sdist",
"test": "jest src/components/__tests__",
"test-gauge": "jest src/components/__tests__/Gauge.test.js",
"test:frontend-cov": "jest --coverage --silent",
"test:watch": "jest --watch",
"uninstall-local": "pip uninstall dash_daq -y",
Expand Down
Loading