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

Commit fface5b

Browse files
authored
Build Dash 1.0.0 version of dash-core-components for R (#574)
* 👔 fix up LFs issue in pkg info * .Rbuildignore updated * ✨ initial draft of dash-info.yaml * 🔪 \n from yaml * update internal.R after bug fix
1 parent 38bf34a commit fface5b

Some content is hidden

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

52 files changed

+398
-191
lines changed

.Rbuildignore

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ lib/
77
.builderrc
88
.eslintrc
99
.npmignore
10+
.editorconfig
11+
.eslintignore
12+
.prettierrc
13+
.circleci
14+
.github
1015

1116
# demo folder has special meaning in R
1217
# this should hopefully make it still

DESCRIPTION

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
Package: dashCoreComponents
22
Title: Core component suite for Dash
3-
Version: 0.48.0
3+
Version: 1.0.0
44
Authors @R: as.person(c(Chris Parmer <[email protected]>))
55
Description: Core component suite for Dash
66
Depends: R (>= 3.0.2)
7-
Imports: dash
7+
Imports:
88
Suggests:
99
License: MIT + file LICENSE
1010
URL: https://github.com/plotly/dash-core-components
1111
BugReports: https://github.com/plotly/dash-core-components/issues
1212
Encoding: UTF-8
1313
LazyData: true
1414
Author: Chris Parmer [aut]
15-
Maintainer: Ryan Patrick Kyle <ryan@plot.ly>
15+
Maintainer: Chris Parmer <chris@plot.ly>

R/dccChecklist.R

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
dccChecklist <- function(id=NULL, options=NULL, value=NULL, className=NULL, style=NULL, inputStyle=NULL, inputClassName=NULL, labelStyle=NULL, labelClassName=NULL, loading_state=NULL) {
44

5+
props <- list(id=id, options=options, value=value, className=className, style=style, inputStyle=inputStyle, inputClassName=inputClassName, labelStyle=labelStyle, labelClassName=labelClassName, loading_state=loading_state)
6+
if (length(props) > 0) {
7+
props <- props[!vapply(props, is.null, logical(1))]
8+
}
59
component <- list(
6-
props = list(id=id, options=options, value=value, className=className, style=style, inputStyle=inputStyle, inputClassName=inputClassName, labelStyle=labelStyle, labelClassName=labelClassName, loading_state=loading_state),
10+
props = props,
711
type = 'Checklist',
812
namespace = 'dash_core_components',
913
propNames = c('id', 'options', 'value', 'className', 'style', 'inputStyle', 'inputClassName', 'labelStyle', 'labelClassName', 'loading_state'),
1014
package = 'dashCoreComponents'
1115
)
1216

13-
component$props <- filter_null(component$props)
14-
1517
structure(component, class = c('dash_component', 'list'))
1618
}

R/dccConfirmDialog.R

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
dccConfirmDialog <- function(id=NULL, message=NULL, submit_n_clicks=NULL, submit_n_clicks_timestamp=NULL, cancel_n_clicks=NULL, cancel_n_clicks_timestamp=NULL, displayed=NULL) {
44

5+
props <- list(id=id, message=message, submit_n_clicks=submit_n_clicks, submit_n_clicks_timestamp=submit_n_clicks_timestamp, cancel_n_clicks=cancel_n_clicks, cancel_n_clicks_timestamp=cancel_n_clicks_timestamp, displayed=displayed)
6+
if (length(props) > 0) {
7+
props <- props[!vapply(props, is.null, logical(1))]
8+
}
59
component <- list(
6-
props = list(id=id, message=message, submit_n_clicks=submit_n_clicks, submit_n_clicks_timestamp=submit_n_clicks_timestamp, cancel_n_clicks=cancel_n_clicks, cancel_n_clicks_timestamp=cancel_n_clicks_timestamp, displayed=displayed),
10+
props = props,
711
type = 'ConfirmDialog',
812
namespace = 'dash_core_components',
913
propNames = c('id', 'message', 'submit_n_clicks', 'submit_n_clicks_timestamp', 'cancel_n_clicks', 'cancel_n_clicks_timestamp', 'displayed'),
1014
package = 'dashCoreComponents'
1115
)
1216

13-
component$props <- filter_null(component$props)
14-
1517
structure(component, class = c('dash_component', 'list'))
1618
}

R/dccConfirmDialogProvider.R

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
dccConfirmDialogProvider <- function(children=NULL, id=NULL, message=NULL, submit_n_clicks=NULL, submit_n_clicks_timestamp=NULL, cancel_n_clicks=NULL, cancel_n_clicks_timestamp=NULL, displayed=NULL, loading_state=NULL) {
44

5+
props <- list(children=children, id=id, message=message, submit_n_clicks=submit_n_clicks, submit_n_clicks_timestamp=submit_n_clicks_timestamp, cancel_n_clicks=cancel_n_clicks, cancel_n_clicks_timestamp=cancel_n_clicks_timestamp, displayed=displayed, loading_state=loading_state)
6+
if (length(props) > 0) {
7+
props <- props[!vapply(props, is.null, logical(1))]
8+
}
59
component <- list(
6-
props = list(children=children, id=id, message=message, submit_n_clicks=submit_n_clicks, submit_n_clicks_timestamp=submit_n_clicks_timestamp, cancel_n_clicks=cancel_n_clicks, cancel_n_clicks_timestamp=cancel_n_clicks_timestamp, displayed=displayed, loading_state=loading_state),
10+
props = props,
711
type = 'ConfirmDialogProvider',
812
namespace = 'dash_core_components',
913
propNames = c('children', 'id', 'message', 'submit_n_clicks', 'submit_n_clicks_timestamp', 'cancel_n_clicks', 'cancel_n_clicks_timestamp', 'displayed', 'loading_state'),
1014
package = 'dashCoreComponents'
1115
)
1216

13-
component$props <- filter_null(component$props)
14-
1517
structure(component, class = c('dash_component', 'list'))
1618
}

R/dccDatePickerRange.R

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
dccDatePickerRange <- function(id=NULL, start_date=NULL, start_date_id=NULL, end_date_id=NULL, end_date=NULL, min_date_allowed=NULL, max_date_allowed=NULL, initial_visible_month=NULL, start_date_placeholder_text=NULL, end_date_placeholder_text=NULL, day_size=NULL, calendar_orientation=NULL, is_RTL=NULL, reopen_calendar_on_clear=NULL, number_of_months_shown=NULL, with_portal=NULL, with_full_screen_portal=NULL, first_day_of_week=NULL, minimum_nights=NULL, stay_open_on_select=NULL, show_outside_days=NULL, month_format=NULL, display_format=NULL, disabled=NULL, clearable=NULL, style=NULL, className=NULL, updatemode=NULL, loading_state=NULL) {
44

5+
props <- list(id=id, start_date=start_date, start_date_id=start_date_id, end_date_id=end_date_id, end_date=end_date, min_date_allowed=min_date_allowed, max_date_allowed=max_date_allowed, initial_visible_month=initial_visible_month, start_date_placeholder_text=start_date_placeholder_text, end_date_placeholder_text=end_date_placeholder_text, day_size=day_size, calendar_orientation=calendar_orientation, is_RTL=is_RTL, reopen_calendar_on_clear=reopen_calendar_on_clear, number_of_months_shown=number_of_months_shown, with_portal=with_portal, with_full_screen_portal=with_full_screen_portal, first_day_of_week=first_day_of_week, minimum_nights=minimum_nights, stay_open_on_select=stay_open_on_select, show_outside_days=show_outside_days, month_format=month_format, display_format=display_format, disabled=disabled, clearable=clearable, style=style, className=className, updatemode=updatemode, loading_state=loading_state)
6+
if (length(props) > 0) {
7+
props <- props[!vapply(props, is.null, logical(1))]
8+
}
59
component <- list(
6-
props = list(id=id, start_date=start_date, start_date_id=start_date_id, end_date_id=end_date_id, end_date=end_date, min_date_allowed=min_date_allowed, max_date_allowed=max_date_allowed, initial_visible_month=initial_visible_month, start_date_placeholder_text=start_date_placeholder_text, end_date_placeholder_text=end_date_placeholder_text, day_size=day_size, calendar_orientation=calendar_orientation, is_RTL=is_RTL, reopen_calendar_on_clear=reopen_calendar_on_clear, number_of_months_shown=number_of_months_shown, with_portal=with_portal, with_full_screen_portal=with_full_screen_portal, first_day_of_week=first_day_of_week, minimum_nights=minimum_nights, stay_open_on_select=stay_open_on_select, show_outside_days=show_outside_days, month_format=month_format, display_format=display_format, disabled=disabled, clearable=clearable, style=style, className=className, updatemode=updatemode, loading_state=loading_state),
10+
props = props,
711
type = 'DatePickerRange',
812
namespace = 'dash_core_components',
913
propNames = c('id', 'start_date', 'start_date_id', 'end_date_id', 'end_date', 'min_date_allowed', 'max_date_allowed', 'initial_visible_month', 'start_date_placeholder_text', 'end_date_placeholder_text', 'day_size', 'calendar_orientation', 'is_RTL', 'reopen_calendar_on_clear', 'number_of_months_shown', 'with_portal', 'with_full_screen_portal', 'first_day_of_week', 'minimum_nights', 'stay_open_on_select', 'show_outside_days', 'month_format', 'display_format', 'disabled', 'clearable', 'style', 'className', 'updatemode', 'loading_state'),
1014
package = 'dashCoreComponents'
1115
)
1216

13-
component$props <- filter_null(component$props)
14-
1517
structure(component, class = c('dash_component', 'list'))
1618
}

R/dccDatePickerSingle.R

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
dccDatePickerSingle <- function(id=NULL, date=NULL, min_date_allowed=NULL, max_date_allowed=NULL, initial_visible_month=NULL, day_size=NULL, calendar_orientation=NULL, is_RTL=NULL, placeholder=NULL, reopen_calendar_on_clear=NULL, number_of_months_shown=NULL, with_portal=NULL, with_full_screen_portal=NULL, first_day_of_week=NULL, stay_open_on_select=NULL, show_outside_days=NULL, month_format=NULL, display_format=NULL, disabled=NULL, clearable=NULL, style=NULL, className=NULL, loading_state=NULL) {
44

5+
props <- list(id=id, date=date, min_date_allowed=min_date_allowed, max_date_allowed=max_date_allowed, initial_visible_month=initial_visible_month, day_size=day_size, calendar_orientation=calendar_orientation, is_RTL=is_RTL, placeholder=placeholder, reopen_calendar_on_clear=reopen_calendar_on_clear, number_of_months_shown=number_of_months_shown, with_portal=with_portal, with_full_screen_portal=with_full_screen_portal, first_day_of_week=first_day_of_week, stay_open_on_select=stay_open_on_select, show_outside_days=show_outside_days, month_format=month_format, display_format=display_format, disabled=disabled, clearable=clearable, style=style, className=className, loading_state=loading_state)
6+
if (length(props) > 0) {
7+
props <- props[!vapply(props, is.null, logical(1))]
8+
}
59
component <- list(
6-
props = list(id=id, date=date, min_date_allowed=min_date_allowed, max_date_allowed=max_date_allowed, initial_visible_month=initial_visible_month, day_size=day_size, calendar_orientation=calendar_orientation, is_RTL=is_RTL, placeholder=placeholder, reopen_calendar_on_clear=reopen_calendar_on_clear, number_of_months_shown=number_of_months_shown, with_portal=with_portal, with_full_screen_portal=with_full_screen_portal, first_day_of_week=first_day_of_week, stay_open_on_select=stay_open_on_select, show_outside_days=show_outside_days, month_format=month_format, display_format=display_format, disabled=disabled, clearable=clearable, style=style, className=className, loading_state=loading_state),
10+
props = props,
711
type = 'DatePickerSingle',
812
namespace = 'dash_core_components',
913
propNames = c('id', 'date', 'min_date_allowed', 'max_date_allowed', 'initial_visible_month', 'day_size', 'calendar_orientation', 'is_RTL', 'placeholder', 'reopen_calendar_on_clear', 'number_of_months_shown', 'with_portal', 'with_full_screen_portal', 'first_day_of_week', 'stay_open_on_select', 'show_outside_days', 'month_format', 'display_format', 'disabled', 'clearable', 'style', 'className', 'loading_state'),
1014
package = 'dashCoreComponents'
1115
)
1216

13-
component$props <- filter_null(component$props)
14-
1517
structure(component, class = c('dash_component', 'list'))
1618
}

R/dccDropdown.R

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
dccDropdown <- function(id=NULL, options=NULL, value=NULL, optionHeight=NULL, className=NULL, clearable=NULL, disabled=NULL, multi=NULL, placeholder=NULL, searchable=NULL, style=NULL, loading_state=NULL) {
44

5+
props <- list(id=id, options=options, value=value, optionHeight=optionHeight, className=className, clearable=clearable, disabled=disabled, multi=multi, placeholder=placeholder, searchable=searchable, style=style, loading_state=loading_state)
6+
if (length(props) > 0) {
7+
props <- props[!vapply(props, is.null, logical(1))]
8+
}
59
component <- list(
6-
props = list(id=id, options=options, value=value, optionHeight=optionHeight, className=className, clearable=clearable, disabled=disabled, multi=multi, placeholder=placeholder, searchable=searchable, style=style, loading_state=loading_state),
10+
props = props,
711
type = 'Dropdown',
812
namespace = 'dash_core_components',
913
propNames = c('id', 'options', 'value', 'optionHeight', 'className', 'clearable', 'disabled', 'multi', 'placeholder', 'searchable', 'style', 'loading_state'),
1014
package = 'dashCoreComponents'
1115
)
1216

13-
component$props <- filter_null(component$props)
14-
1517
structure(component, class = c('dash_component', 'list'))
1618
}

R/dccGraph.R

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
dccGraph <- function(id=NULL, clickData=NULL, clickAnnotationData=NULL, hoverData=NULL, clear_on_unhover=NULL, selectedData=NULL, relayoutData=NULL, extendData=NULL, restyleData=NULL, figure=NULL, style=NULL, className=NULL, animate=NULL, animation_options=NULL, config=NULL, loading_state=NULL) {
44

5+
props <- list(id=id, clickData=clickData, clickAnnotationData=clickAnnotationData, hoverData=hoverData, clear_on_unhover=clear_on_unhover, selectedData=selectedData, relayoutData=relayoutData, extendData=extendData, restyleData=restyleData, figure=figure, style=style, className=className, animate=animate, animation_options=animation_options, config=config, loading_state=loading_state)
6+
if (length(props) > 0) {
7+
props <- props[!vapply(props, is.null, logical(1))]
8+
}
59
component <- list(
6-
props = list(id=id, clickData=clickData, clickAnnotationData=clickAnnotationData, hoverData=hoverData, clear_on_unhover=clear_on_unhover, selectedData=selectedData, relayoutData=relayoutData, extendData=extendData, restyleData=restyleData, figure=figure, style=style, className=className, animate=animate, animation_options=animation_options, config=config, loading_state=loading_state),
10+
props = props,
711
type = 'Graph',
812
namespace = 'dash_core_components',
913
propNames = c('id', 'clickData', 'clickAnnotationData', 'hoverData', 'clear_on_unhover', 'selectedData', 'relayoutData', 'extendData', 'restyleData', 'figure', 'style', 'className', 'animate', 'animation_options', 'config', 'loading_state'),
1014
package = 'dashCoreComponents'
1115
)
1216

13-
component$props <- filter_null(component$props)
14-
1517
structure(component, class = c('dash_component', 'list'))
1618
}

R/dccInput.R

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
dccInput <- function(id=NULL, value=NULL, style=NULL, className=NULL, debounce=NULL, type=NULL, autoComplete=NULL, autoFocus=NULL, disabled=NULL, inputMode=NULL, list=NULL, max=NULL, maxLength=NULL, min=NULL, minLength=NULL, multiple=NULL, name=NULL, pattern=NULL, placeholder=NULL, readOnly=NULL, required=NULL, selectionDirection=NULL, selectionEnd=NULL, selectionStart=NULL, size=NULL, spellCheck=NULL, step=NULL, n_submit=NULL, n_submit_timestamp=NULL, n_blur=NULL, n_blur_timestamp=NULL, loading_state=NULL) {
44

5+
props <- list(id=id, value=value, style=style, className=className, debounce=debounce, type=type, autoComplete=autoComplete, autoFocus=autoFocus, disabled=disabled, inputMode=inputMode, list=list, max=max, maxLength=maxLength, min=min, minLength=minLength, multiple=multiple, name=name, pattern=pattern, placeholder=placeholder, readOnly=readOnly, required=required, selectionDirection=selectionDirection, selectionEnd=selectionEnd, selectionStart=selectionStart, size=size, spellCheck=spellCheck, step=step, n_submit=n_submit, n_submit_timestamp=n_submit_timestamp, n_blur=n_blur, n_blur_timestamp=n_blur_timestamp, loading_state=loading_state)
6+
if (length(props) > 0) {
7+
props <- props[!vapply(props, is.null, logical(1))]
8+
}
59
component <- list(
6-
props = list(id=id, value=value, style=style, className=className, debounce=debounce, type=type, autoComplete=autoComplete, autoFocus=autoFocus, disabled=disabled, inputMode=inputMode, list=list, max=max, maxLength=maxLength, min=min, minLength=minLength, multiple=multiple, name=name, pattern=pattern, placeholder=placeholder, readOnly=readOnly, required=required, selectionDirection=selectionDirection, selectionEnd=selectionEnd, selectionStart=selectionStart, size=size, spellCheck=spellCheck, step=step, n_submit=n_submit, n_submit_timestamp=n_submit_timestamp, n_blur=n_blur, n_blur_timestamp=n_blur_timestamp, loading_state=loading_state),
10+
props = props,
711
type = 'Input',
812
namespace = 'dash_core_components',
913
propNames = c('id', 'value', 'style', 'className', 'debounce', 'type', 'autoComplete', 'autoFocus', 'disabled', 'inputMode', 'list', 'max', 'maxLength', 'min', 'minLength', 'multiple', 'name', 'pattern', 'placeholder', 'readOnly', 'required', 'selectionDirection', 'selectionEnd', 'selectionStart', 'size', 'spellCheck', 'step', 'n_submit', 'n_submit_timestamp', 'n_blur', 'n_blur_timestamp', 'loading_state'),
1014
package = 'dashCoreComponents'
1115
)
1216

13-
component$props <- filter_null(component$props)
14-
1517
structure(component, class = c('dash_component', 'list'))
1618
}

R/dccInterval.R

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
dccInterval <- function(id=NULL, interval=NULL, disabled=NULL, n_intervals=NULL, max_intervals=NULL) {
44

5+
props <- list(id=id, interval=interval, disabled=disabled, n_intervals=n_intervals, max_intervals=max_intervals)
6+
if (length(props) > 0) {
7+
props <- props[!vapply(props, is.null, logical(1))]
8+
}
59
component <- list(
6-
props = list(id=id, interval=interval, disabled=disabled, n_intervals=n_intervals, max_intervals=max_intervals),
10+
props = props,
711
type = 'Interval',
812
namespace = 'dash_core_components',
913
propNames = c('id', 'interval', 'disabled', 'n_intervals', 'max_intervals'),
1014
package = 'dashCoreComponents'
1115
)
1216

13-
component$props <- filter_null(component$props)
14-
1517
structure(component, class = c('dash_component', 'list'))
1618
}

R/dccLink.R

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
dccLink <- function(children=NULL, id=NULL, href=NULL, refresh=NULL, className=NULL, style=NULL, loading_state=NULL) {
44

5+
props <- list(children=children, id=id, href=href, refresh=refresh, className=className, style=style, loading_state=loading_state)
6+
if (length(props) > 0) {
7+
props <- props[!vapply(props, is.null, logical(1))]
8+
}
59
component <- list(
6-
props = list(children=children, id=id, href=href, refresh=refresh, className=className, style=style, loading_state=loading_state),
10+
props = props,
711
type = 'Link',
812
namespace = 'dash_core_components',
913
propNames = c('children', 'id', 'href', 'refresh', 'className', 'style', 'loading_state'),
1014
package = 'dashCoreComponents'
1115
)
1216

13-
component$props <- filter_null(component$props)
14-
1517
structure(component, class = c('dash_component', 'list'))
1618
}

R/dccLoading.R

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
dccLoading <- function(children=NULL, id=NULL, type=NULL, fullscreen=NULL, debug=NULL, className=NULL, style=NULL, color=NULL, loading_state=NULL) {
44

5+
props <- list(children=children, id=id, type=type, fullscreen=fullscreen, debug=debug, className=className, style=style, color=color, loading_state=loading_state)
6+
if (length(props) > 0) {
7+
props <- props[!vapply(props, is.null, logical(1))]
8+
}
59
component <- list(
6-
props = list(children=children, id=id, type=type, fullscreen=fullscreen, debug=debug, className=className, style=style, color=color, loading_state=loading_state),
10+
props = props,
711
type = 'Loading',
812
namespace = 'dash_core_components',
913
propNames = c('children', 'id', 'type', 'fullscreen', 'debug', 'className', 'style', 'color', 'loading_state'),
1014
package = 'dashCoreComponents'
1115
)
1216

13-
component$props <- filter_null(component$props)
14-
1517
structure(component, class = c('dash_component', 'list'))
1618
}

R/dccLocation.R

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
dccLocation <- function(id=NULL, pathname=NULL, search=NULL, hash=NULL, href=NULL, refresh=NULL) {
44

5+
props <- list(id=id, pathname=pathname, search=search, hash=hash, href=href, refresh=refresh)
6+
if (length(props) > 0) {
7+
props <- props[!vapply(props, is.null, logical(1))]
8+
}
59
component <- list(
6-
props = list(id=id, pathname=pathname, search=search, hash=hash, href=href, refresh=refresh),
10+
props = props,
711
type = 'Location',
812
namespace = 'dash_core_components',
913
propNames = c('id', 'pathname', 'search', 'hash', 'href', 'refresh'),
1014
package = 'dashCoreComponents'
1115
)
1216

13-
component$props <- filter_null(component$props)
14-
1517
structure(component, class = c('dash_component', 'list'))
1618
}

0 commit comments

Comments
 (0)