dash-core-components 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -28
- package/dash_core_components/async-datepicker.js +1 -1
- package/dash_core_components/async-datepicker.js.map +1 -1
- package/dash_core_components/async-dropdown.js +1 -1
- package/dash_core_components/async-dropdown.js.map +1 -1
- package/dash_core_components/async-graph.js +1 -1
- package/dash_core_components/async-graph.js.map +1 -1
- package/dash_core_components/async-highlight.js +1 -1
- package/dash_core_components/async-highlight.js.map +1 -1
- package/dash_core_components/async-markdown.js +1 -1
- package/dash_core_components/async-markdown.js.map +1 -1
- package/dash_core_components/async-plotlyjs.js +1 -1
- package/dash_core_components/async-slider.js +1 -1
- package/dash_core_components/async-slider.js.map +1 -1
- package/dash_core_components/async-upload.js +1 -1
- package/dash_core_components/async-upload.js.map +1 -1
- package/dash_core_components/dash_core_components-shared.js +1 -1
- package/dash_core_components/dash_core_components-shared.js.map +1 -1
- package/dash_core_components/dash_core_components.js +1 -1
- package/dash_core_components/dash_core_components.js.map +1 -1
- package/dash_core_components/plotly.min.js +28 -21
- package/lib/components/Checklist.react.js +59 -23
- package/lib/components/Clipboard.react.js +4 -4
- package/lib/components/ConfirmDialog.react.js +4 -4
- package/lib/components/ConfirmDialogProvider.react.js +4 -4
- package/lib/components/DatePickerRange.react.js +85 -85
- package/lib/components/DatePickerSingle.react.js +68 -68
- package/lib/components/Download.react.js +4 -4
- package/lib/components/Dropdown.react.js +51 -35
- package/lib/components/Graph.react.js +7 -7
- package/lib/components/Input.react.js +83 -83
- package/lib/components/Interval.react.js +4 -4
- package/lib/components/Link.react.js +21 -21
- package/lib/components/Loading.react.js +4 -4
- package/lib/components/Location.react.js +4 -4
- package/lib/components/LogoutButton.react.js +4 -4
- package/lib/components/Markdown.react.js +5 -5
- package/lib/components/RadioItems.react.js +59 -23
- package/lib/components/RangeSlider.react.js +44 -44
- package/lib/components/Slider.react.js +35 -35
- package/lib/components/Store.react.js +4 -4
- package/lib/components/Tab.react.js +1 -1
- package/lib/components/Tabs.react.js +10 -10
- package/lib/components/Textarea.react.js +4 -4
- package/lib/components/Tooltip.react.js +2 -2
- package/lib/components/Upload.react.js +5 -5
- package/lib/components/css/Dropdown.css +1 -1
- package/lib/fragments/DatePickerRange.react.js +6 -6
- package/lib/fragments/DatePickerSingle.react.js +6 -6
- package/lib/fragments/Dropdown.react.js +13 -11
- package/lib/fragments/Graph.privateprops.js +1 -1
- package/lib/fragments/Graph.react.js +6 -6
- package/lib/fragments/Markdown.react.js +4 -4
- package/lib/fragments/RangeSlider.react.js +24 -13
- package/lib/fragments/Slider.react.js +22 -11
- package/lib/fragments/Upload.react.js +4 -4
- package/lib/utils/LazyLoader/datePickerRange.js +1 -1
- package/lib/utils/LazyLoader/datePickerSingle.js +1 -1
- package/lib/utils/LazyLoader/dropdown.js +1 -1
- package/lib/utils/LazyLoader/graph.js +1 -1
- package/lib/utils/LazyLoader/hljs.js +1 -1
- package/lib/utils/LazyLoader/markdown.js +1 -1
- package/lib/utils/LazyLoader/plotly.js +1 -1
- package/lib/utils/LazyLoader/rangeSlider.js +1 -1
- package/lib/utils/LazyLoader/slider.js +1 -1
- package/lib/utils/LazyLoader/upload.js +1 -1
- package/lib/utils/computeSliderMarkers.js +230 -0
- package/lib/utils/optionTypes.js +52 -0
- package/package.json +32 -33
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.propTypes = exports.defaultProps = exports.default = void 0;
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -25,15 +25,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
25
25
|
|
|
26
26
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
27
27
|
|
|
28
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
28
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
29
29
|
|
|
30
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass
|
|
30
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
31
31
|
|
|
32
32
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
33
|
|
|
34
34
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
35
35
|
|
|
36
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
36
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
37
37
|
|
|
38
38
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
39
39
|
|
|
@@ -79,13 +79,6 @@ var DatePickerSingle = /*#__PURE__*/function (_Component) {
|
|
|
79
79
|
|
|
80
80
|
exports.default = DatePickerSingle;
|
|
81
81
|
DatePickerSingle.propTypes = {
|
|
82
|
-
/**
|
|
83
|
-
* The ID of this component, used to identify dash components
|
|
84
|
-
* in callbacks. The ID needs to be unique across all of the
|
|
85
|
-
* components in an app.
|
|
86
|
-
*/
|
|
87
|
-
id: _propTypes.default.string,
|
|
88
|
-
|
|
89
82
|
/**
|
|
90
83
|
* Specifies the starting date for the component, best practice is to pass
|
|
91
84
|
* value via datetime object
|
|
@@ -113,6 +106,13 @@ DatePickerSingle.propTypes = {
|
|
|
113
106
|
*/
|
|
114
107
|
disabled_days: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
115
108
|
|
|
109
|
+
/**
|
|
110
|
+
* Text that will be displayed in the input
|
|
111
|
+
* box of the date picker when no date is selected.
|
|
112
|
+
* Default value is 'Start Date'
|
|
113
|
+
*/
|
|
114
|
+
placeholder: _propTypes.default.string,
|
|
115
|
+
|
|
116
116
|
/**
|
|
117
117
|
* Specifies the month that is initially presented when the user
|
|
118
118
|
* opens the calendar. Accepts datetime.datetime objects or strings
|
|
@@ -122,89 +122,89 @@ DatePickerSingle.propTypes = {
|
|
|
122
122
|
initial_visible_month: _propTypes.default.string,
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
|
-
*
|
|
126
|
-
*
|
|
125
|
+
* Whether or not the dropdown is "clearable", that is, whether or
|
|
126
|
+
* not a small "x" appears on the right of the dropdown that removes
|
|
127
|
+
* the selected value.
|
|
127
128
|
*/
|
|
128
|
-
|
|
129
|
+
clearable: _propTypes.default.bool,
|
|
129
130
|
|
|
130
131
|
/**
|
|
131
|
-
*
|
|
132
|
-
* Valid options are 'vertical' or 'horizontal'.
|
|
132
|
+
* If True, the calendar will automatically open when cleared
|
|
133
133
|
*/
|
|
134
|
-
|
|
134
|
+
reopen_calendar_on_clear: _propTypes.default.bool,
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
137
|
+
* Specifies the format that the selected dates will be displayed
|
|
138
|
+
* valid formats are variations of "MM YY DD". For example:
|
|
139
|
+
* "MM YY DD" renders as '05 10 97' for May 10th 1997
|
|
140
|
+
* "MMMM, YY" renders as 'May, 1997' for May 10th 1997
|
|
141
|
+
* "M, D, YYYY" renders as '07, 10, 1997' for September 10th 1997
|
|
142
|
+
* "MMMM" renders as 'May' for May 10 1997
|
|
139
143
|
*/
|
|
140
|
-
|
|
144
|
+
display_format: _propTypes.default.string,
|
|
141
145
|
|
|
142
146
|
/**
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
147
|
+
* Specifies the format that the month will be displayed in the calendar,
|
|
148
|
+
* valid formats are variations of "MM YY". For example:
|
|
149
|
+
* "MM YY" renders as '05 97' for May 1997
|
|
150
|
+
* "MMMM, YYYY" renders as 'May, 1997' for May 1997
|
|
151
|
+
* "MMM, YY" renders as 'Sep, 97' for September 1997
|
|
146
152
|
*/
|
|
147
|
-
|
|
153
|
+
month_format: _propTypes.default.string,
|
|
148
154
|
|
|
149
155
|
/**
|
|
150
|
-
*
|
|
156
|
+
* Specifies what day is the first day of the week, values must be
|
|
157
|
+
* from [0, ..., 6] with 0 denoting Sunday and 6 denoting Saturday
|
|
151
158
|
*/
|
|
152
|
-
|
|
159
|
+
first_day_of_week: _propTypes.default.oneOf([0, 1, 2, 3, 4, 5, 6]),
|
|
153
160
|
|
|
154
161
|
/**
|
|
155
|
-
*
|
|
162
|
+
* If True the calendar will display days that rollover into
|
|
163
|
+
* the next month
|
|
156
164
|
*/
|
|
157
|
-
|
|
165
|
+
show_outside_days: _propTypes.default.bool,
|
|
158
166
|
|
|
159
167
|
/**
|
|
160
|
-
* If True
|
|
161
|
-
*
|
|
168
|
+
* If True the calendar will not close when the user has selected a value
|
|
169
|
+
* and will wait until the user clicks off the calendar
|
|
162
170
|
*/
|
|
163
|
-
|
|
171
|
+
stay_open_on_select: _propTypes.default.bool,
|
|
164
172
|
|
|
165
173
|
/**
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
* not supported on vertical calendar
|
|
174
|
+
* Orientation of calendar, either vertical or horizontal.
|
|
175
|
+
* Valid options are 'vertical' or 'horizontal'.
|
|
169
176
|
*/
|
|
170
|
-
|
|
177
|
+
calendar_orientation: _propTypes.default.oneOf(['vertical', 'horizontal']),
|
|
171
178
|
|
|
172
179
|
/**
|
|
173
|
-
*
|
|
174
|
-
* from [0, ..., 6] with 0 denoting Sunday and 6 denoting Saturday
|
|
180
|
+
* Number of calendar months that are shown when calendar is opened
|
|
175
181
|
*/
|
|
176
|
-
|
|
182
|
+
number_of_months_shown: _propTypes.default.number,
|
|
177
183
|
|
|
178
184
|
/**
|
|
179
|
-
* If True
|
|
180
|
-
*
|
|
185
|
+
* If True, calendar will open in a screen overlay portal,
|
|
186
|
+
* not supported on vertical calendar
|
|
181
187
|
*/
|
|
182
|
-
|
|
188
|
+
with_portal: _propTypes.default.bool,
|
|
183
189
|
|
|
184
190
|
/**
|
|
185
|
-
* If True
|
|
186
|
-
*
|
|
191
|
+
* If True, calendar will open in a full screen overlay portal, will
|
|
192
|
+
* take precedent over 'withPortal' if both are set to True,
|
|
193
|
+
* not supported on vertical calendar
|
|
187
194
|
*/
|
|
188
|
-
|
|
195
|
+
with_full_screen_portal: _propTypes.default.bool,
|
|
189
196
|
|
|
190
197
|
/**
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
* "MM YY" renders as '05 97' for May 1997
|
|
194
|
-
* "MMMM, YYYY" renders as 'May, 1997' for May 1997
|
|
195
|
-
* "MMM, YY" renders as 'Sep, 97' for September 1997
|
|
198
|
+
* Size of rendered calendar days, higher number
|
|
199
|
+
* means bigger day size and larger calendar overall
|
|
196
200
|
*/
|
|
197
|
-
|
|
201
|
+
day_size: _propTypes.default.number,
|
|
198
202
|
|
|
199
203
|
/**
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
* "MM YY DD" renders as '05 10 97' for May 10th 1997
|
|
203
|
-
* "MMMM, YY" renders as 'May, 1997' for May 10th 1997
|
|
204
|
-
* "M, D, YYYY" renders as '07, 10, 1997' for September 10th 1997
|
|
205
|
-
* "MMMM" renders as 'May' for May 10 1997
|
|
204
|
+
* Determines whether the calendar and days operate
|
|
205
|
+
* from left to right or from right to left
|
|
206
206
|
*/
|
|
207
|
-
|
|
207
|
+
is_RTL: _propTypes.default.bool,
|
|
208
208
|
|
|
209
209
|
/**
|
|
210
210
|
* If True, no dates can be selected.
|
|
@@ -212,26 +212,26 @@ DatePickerSingle.propTypes = {
|
|
|
212
212
|
disabled: _propTypes.default.bool,
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
|
-
*
|
|
216
|
-
* not a small "x" appears on the right of the dropdown that removes
|
|
217
|
-
* the selected value.
|
|
215
|
+
* CSS styles appended to wrapper div
|
|
218
216
|
*/
|
|
219
|
-
|
|
217
|
+
style: _propTypes.default.object,
|
|
220
218
|
|
|
221
219
|
/**
|
|
222
|
-
*
|
|
220
|
+
* Appends a CSS class to the wrapper div component.
|
|
223
221
|
*/
|
|
224
|
-
|
|
222
|
+
className: _propTypes.default.string,
|
|
225
223
|
|
|
226
224
|
/**
|
|
227
|
-
*
|
|
225
|
+
* The ID of this component, used to identify dash components
|
|
226
|
+
* in callbacks. The ID needs to be unique across all of the
|
|
227
|
+
* components in an app.
|
|
228
228
|
*/
|
|
229
|
-
|
|
229
|
+
id: _propTypes.default.string,
|
|
230
230
|
|
|
231
231
|
/**
|
|
232
|
-
*
|
|
232
|
+
* Dash-assigned callback that gets fired when the value changes.
|
|
233
233
|
*/
|
|
234
|
-
|
|
234
|
+
setProps: _propTypes.default.func,
|
|
235
235
|
|
|
236
236
|
/**
|
|
237
237
|
* Object that holds the loading state object coming from dash-renderer
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -21,15 +21,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
21
21
|
|
|
22
22
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
23
23
|
|
|
24
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
24
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
25
|
|
|
26
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass
|
|
26
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
27
27
|
|
|
28
28
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
29
|
|
|
30
30
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
31
31
|
|
|
32
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
32
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
33
33
|
|
|
34
34
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
35
35
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.propTypes = exports.defaultProps = exports.default = void 0;
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -23,15 +23,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
23
23
|
|
|
24
24
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
25
25
|
|
|
26
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
26
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
27
|
|
|
28
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass
|
|
28
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
29
29
|
|
|
30
30
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
31
|
|
|
32
32
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
33
33
|
|
|
34
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
34
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
35
35
|
|
|
36
36
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
37
37
|
|
|
@@ -77,28 +77,37 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
77
77
|
exports.default = Dropdown;
|
|
78
78
|
Dropdown.propTypes = {
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* components in an app.
|
|
80
|
+
* An array of options {label: [string|number], value: [string|number]},
|
|
81
|
+
* an optional disabled field can be used for each option
|
|
83
82
|
*/
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
options: _propTypes.default.oneOfType([
|
|
84
|
+
/**
|
|
85
|
+
* Array of options where the label and the value are the same thing - [string|number|bool]
|
|
86
|
+
*/
|
|
87
|
+
_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool])),
|
|
88
|
+
/**
|
|
89
|
+
* Simpler `options` representation in dictionary format. The order is not guaranteed.
|
|
90
|
+
* {`value1`: `label1`, `value2`: `label2`, ... }
|
|
91
|
+
* which is equal to
|
|
92
|
+
* [{label: `label1`, value: `value1`}, {label: `label2`, value: `value2`}, ...]
|
|
93
|
+
*/
|
|
94
|
+
_propTypes.default.object,
|
|
86
95
|
/**
|
|
87
96
|
* An array of options {label: [string|number], value: [string|number]},
|
|
88
97
|
* an optional disabled field can be used for each option
|
|
89
98
|
*/
|
|
90
|
-
|
|
99
|
+
_propTypes.default.arrayOf(_propTypes.default.exact({
|
|
91
100
|
/**
|
|
92
|
-
* The
|
|
101
|
+
* The option's label
|
|
93
102
|
*/
|
|
94
103
|
label: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]).isRequired,
|
|
95
104
|
|
|
96
105
|
/**
|
|
97
|
-
* The value of the
|
|
106
|
+
* The value of the option. This value
|
|
98
107
|
* corresponds to the items specified in the
|
|
99
108
|
* `value` property.
|
|
100
109
|
*/
|
|
101
|
-
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]).isRequired,
|
|
110
|
+
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool]).isRequired,
|
|
102
111
|
|
|
103
112
|
/**
|
|
104
113
|
* If true, this option is disabled and cannot be selected.
|
|
@@ -111,7 +120,7 @@ Dropdown.propTypes = {
|
|
|
111
120
|
* see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title
|
|
112
121
|
*/
|
|
113
122
|
title: _propTypes.default.string
|
|
114
|
-
})),
|
|
123
|
+
}))]),
|
|
115
124
|
|
|
116
125
|
/**
|
|
117
126
|
* The value of the input. If `multi` is false (the default)
|
|
@@ -121,17 +130,12 @@ Dropdown.propTypes = {
|
|
|
121
130
|
* array of items with values corresponding to those in the
|
|
122
131
|
* `options` prop.
|
|
123
132
|
*/
|
|
124
|
-
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]))]),
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* height of each option. Can be increased when label lengths would wrap around
|
|
128
|
-
*/
|
|
129
|
-
optionHeight: _propTypes.default.number,
|
|
133
|
+
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool]))]),
|
|
130
134
|
|
|
131
135
|
/**
|
|
132
|
-
*
|
|
136
|
+
* If true, the user can select multiple values
|
|
133
137
|
*/
|
|
134
|
-
|
|
138
|
+
multi: _propTypes.default.bool,
|
|
135
139
|
|
|
136
140
|
/**
|
|
137
141
|
* Whether or not the dropdown is "clearable", that is, whether or
|
|
@@ -141,14 +145,14 @@ Dropdown.propTypes = {
|
|
|
141
145
|
clearable: _propTypes.default.bool,
|
|
142
146
|
|
|
143
147
|
/**
|
|
144
|
-
*
|
|
148
|
+
* Whether to enable the searching feature or not
|
|
145
149
|
*/
|
|
146
|
-
|
|
150
|
+
searchable: _propTypes.default.bool,
|
|
147
151
|
|
|
148
152
|
/**
|
|
149
|
-
*
|
|
153
|
+
* The value typed in the DropDown for searching.
|
|
150
154
|
*/
|
|
151
|
-
|
|
155
|
+
search_value: _propTypes.default.string,
|
|
152
156
|
|
|
153
157
|
/**
|
|
154
158
|
* The grey, default text shown when no option is selected
|
|
@@ -156,24 +160,36 @@ Dropdown.propTypes = {
|
|
|
156
160
|
placeholder: _propTypes.default.string,
|
|
157
161
|
|
|
158
162
|
/**
|
|
159
|
-
*
|
|
163
|
+
* If true, this dropdown is disabled and the selection cannot be changed.
|
|
160
164
|
*/
|
|
161
|
-
|
|
165
|
+
disabled: _propTypes.default.bool,
|
|
162
166
|
|
|
163
167
|
/**
|
|
164
|
-
*
|
|
168
|
+
* height of each option. Can be increased when label lengths would wrap around
|
|
165
169
|
*/
|
|
166
|
-
|
|
170
|
+
optionHeight: _propTypes.default.number,
|
|
167
171
|
|
|
168
172
|
/**
|
|
169
|
-
*
|
|
173
|
+
* Defines CSS styles which will override styles previously set.
|
|
170
174
|
*/
|
|
171
|
-
|
|
175
|
+
style: _propTypes.default.object,
|
|
172
176
|
|
|
173
177
|
/**
|
|
174
|
-
*
|
|
178
|
+
* className of the dropdown element
|
|
175
179
|
*/
|
|
176
|
-
|
|
180
|
+
className: _propTypes.default.string,
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* The ID of this component, used to identify dash components
|
|
184
|
+
* in callbacks. The ID needs to be unique across all of the
|
|
185
|
+
* components in an app.
|
|
186
|
+
*/
|
|
187
|
+
id: _propTypes.default.string,
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Dash-assigned callback that gets fired when the input changes
|
|
191
|
+
*/
|
|
192
|
+
setProps: _propTypes.default.func,
|
|
177
193
|
|
|
178
194
|
/**
|
|
179
195
|
* Object that holds the loading state object coming from dash-renderer
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.graphPropTypes = exports.graphDefaultProps = exports.default = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -25,9 +25,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
|
|
28
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
28
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
29
|
|
|
30
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
30
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
31
|
|
|
32
32
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
33
33
|
|
|
@@ -49,15 +49,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
49
49
|
|
|
50
50
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
51
51
|
|
|
52
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
52
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
53
53
|
|
|
54
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass
|
|
54
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
55
55
|
|
|
56
56
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
57
57
|
|
|
58
58
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
59
59
|
|
|
60
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
60
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
61
61
|
|
|
62
62
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
63
63
|
|