dash-core-components 1.15.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 +8 -44
- 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 +2 -2
- 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 +2 -2
- package/dash_core_components/async-markdown.js.map +1 -1
- package/dash_core_components/async-plotlyjs.js +2 -2
- package/dash_core_components/async-slider.js +1 -2
- 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 +2 -2
- package/dash_core_components/dash_core_components-shared.js.map +1 -1
- package/dash_core_components/dash_core_components.js +3 -0
- package/dash_core_components/dash_core_components.js.map +1 -0
- package/dash_core_components/plotly.min.js +30 -26
- package/lib/components/Checklist.react.js +77 -35
- package/lib/components/Clipboard.react.js +354 -0
- package/lib/components/ConfirmDialog.react.js +16 -12
- package/lib/components/ConfirmDialogProvider.react.js +19 -15
- package/lib/components/DatePickerRange.react.js +111 -97
- package/lib/components/DatePickerSingle.react.js +95 -81
- package/lib/components/Download.react.js +138 -0
- package/lib/components/Dropdown.react.js +69 -47
- package/lib/components/Graph.react.js +36 -24
- package/lib/components/Input.react.js +98 -92
- package/lib/components/Interval.react.js +18 -12
- package/lib/components/Link.react.js +36 -30
- package/lib/components/Loading.react.js +21 -15
- package/lib/components/Location.react.js +15 -13
- package/lib/components/LogoutButton.react.js +18 -14
- package/lib/components/Markdown.react.js +23 -17
- package/lib/components/RadioItems.react.js +77 -35
- package/lib/components/RangeSlider.react.js +61 -55
- package/lib/components/Slider.react.js +52 -46
- package/lib/components/Store.react.js +16 -16
- package/lib/components/Tab.react.js +6 -2
- package/lib/components/Tabs.react.js +32 -23
- package/lib/components/Textarea.react.js +19 -13
- package/lib/components/Tooltip.react.js +152 -0
- package/lib/components/Upload.react.js +25 -19
- package/lib/components/css/Dropdown.css +1 -1
- package/lib/fragments/DatePickerRange.react.js +63 -51
- package/lib/fragments/DatePickerSingle.react.js +28 -17
- package/lib/fragments/Dropdown.react.js +33 -22
- package/lib/fragments/Graph.privateprops.js +1 -1
- package/lib/fragments/Graph.react.js +44 -28
- package/lib/fragments/Loading/spinners/CircleSpinner.js +16 -16
- package/lib/fragments/Loading/spinners/CubeSpinner.js +11 -11
- package/lib/fragments/Loading/spinners/DefaultSpinner.js +9 -9
- package/lib/fragments/Loading/spinners/DotSpinner.js +7 -7
- package/lib/fragments/Loading/spinners/GraphSpinner.js +18 -18
- package/lib/fragments/Markdown.react.js +35 -32
- package/lib/fragments/RangeSlider.react.js +57 -22
- package/lib/fragments/Slider.react.js +40 -21
- package/lib/fragments/Upload.react.js +19 -13
- package/lib/index.js +77 -53
- package/lib/third-party/highlight.js +12 -0
- package/lib/utils/LazyLoader/datePickerRange.js +9 -3
- package/lib/utils/LazyLoader/datePickerSingle.js +9 -3
- package/lib/utils/LazyLoader/dropdown.js +9 -3
- package/lib/utils/LazyLoader/graph.js +9 -3
- package/lib/utils/LazyLoader/hljs.js +9 -3
- package/lib/utils/LazyLoader/markdown.js +9 -3
- package/lib/utils/LazyLoader/plotly.js +9 -3
- package/lib/utils/LazyLoader/rangeSlider.js +9 -3
- package/lib/utils/LazyLoader/slider.js +9 -3
- package/lib/utils/LazyLoader/upload.js +9 -3
- package/lib/utils/computeSliderMarkers.js +230 -0
- package/lib/utils/convertToMoment.js +4 -0
- package/lib/utils/optionTypes.js +52 -0
- package/package.json +68 -75
- package/CHANGELOG.md +0 -1034
- package/dash_core_components/dash_core_components.min.js +0 -2
- package/dash_core_components/dash_core_components.min.js.map +0 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
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
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
|
-
exports.
|
|
8
|
+
exports.propTypes = exports.defaultProps = exports.default = void 0;
|
|
7
9
|
|
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
|
|
@@ -13,49 +15,53 @@ var _rangeSlider = _interopRequireDefault(require("../utils/LazyLoader/rangeSlid
|
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
17
|
|
|
16
|
-
function
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
19
|
|
|
18
|
-
function
|
|
20
|
+
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; }
|
|
19
21
|
|
|
20
22
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
23
|
|
|
22
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); } }
|
|
23
25
|
|
|
24
|
-
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; }
|
|
25
27
|
|
|
26
|
-
function
|
|
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); }
|
|
27
29
|
|
|
28
|
-
function
|
|
30
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
31
|
|
|
30
|
-
function
|
|
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); }; }
|
|
31
33
|
|
|
32
|
-
function
|
|
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); }
|
|
33
35
|
|
|
34
|
-
function
|
|
36
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
|
+
|
|
40
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
41
|
+
|
|
42
|
+
var RealRangeSlider = /*#__PURE__*/(0, _react.lazy)(_rangeSlider.default);
|
|
37
43
|
/**
|
|
38
44
|
* A double slider with two handles.
|
|
39
45
|
* Used for specifying a range of numerical values.
|
|
40
46
|
*/
|
|
41
47
|
|
|
42
|
-
var RangeSlider =
|
|
43
|
-
/*#__PURE__*/
|
|
44
|
-
function (_Component) {
|
|
48
|
+
var RangeSlider = /*#__PURE__*/function (_Component) {
|
|
45
49
|
_inherits(RangeSlider, _Component);
|
|
46
50
|
|
|
51
|
+
var _super = _createSuper(RangeSlider);
|
|
52
|
+
|
|
47
53
|
function RangeSlider() {
|
|
48
54
|
_classCallCheck(this, RangeSlider);
|
|
49
55
|
|
|
50
|
-
return
|
|
56
|
+
return _super.apply(this, arguments);
|
|
51
57
|
}
|
|
52
58
|
|
|
53
59
|
_createClass(RangeSlider, [{
|
|
54
60
|
key: "render",
|
|
55
61
|
value: function render() {
|
|
56
|
-
return _react.default.createElement(_react.Suspense, {
|
|
62
|
+
return /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
57
63
|
fallback: null
|
|
58
|
-
}, _react.default.createElement(RealRangeSlider, this.props));
|
|
64
|
+
}, /*#__PURE__*/_react.default.createElement(RealRangeSlider, this.props));
|
|
59
65
|
}
|
|
60
66
|
}]);
|
|
61
67
|
|
|
@@ -65,11 +71,19 @@ function (_Component) {
|
|
|
65
71
|
exports.default = RangeSlider;
|
|
66
72
|
RangeSlider.propTypes = {
|
|
67
73
|
/**
|
|
68
|
-
*
|
|
69
|
-
* in callbacks. The ID needs to be unique across all of the
|
|
70
|
-
* components in an app.
|
|
74
|
+
* Minimum allowed value of the slider
|
|
71
75
|
*/
|
|
72
|
-
|
|
76
|
+
min: _propTypes.default.number,
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Maximum allowed value of the slider
|
|
80
|
+
*/
|
|
81
|
+
max: _propTypes.default.number,
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Value by which increments or decrements are made
|
|
85
|
+
*/
|
|
86
|
+
step: _propTypes.default.number,
|
|
73
87
|
|
|
74
88
|
/**
|
|
75
89
|
* Marks on the slider.
|
|
@@ -100,20 +114,23 @@ RangeSlider.propTypes = {
|
|
|
100
114
|
allowCross: _propTypes.default.bool,
|
|
101
115
|
|
|
102
116
|
/**
|
|
103
|
-
*
|
|
117
|
+
* pushable could be set as true to allow pushing of
|
|
118
|
+
* surrounding handles when moving an handle.
|
|
119
|
+
* When set to a number, the number will be the
|
|
120
|
+
* minimum ensured distance between handles.
|
|
104
121
|
*/
|
|
105
|
-
|
|
122
|
+
pushable: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.number]),
|
|
106
123
|
|
|
107
124
|
/**
|
|
108
|
-
*
|
|
109
|
-
* will be rendered (number + 1).
|
|
125
|
+
* If true, the handles can't be moved.
|
|
110
126
|
*/
|
|
111
|
-
|
|
127
|
+
disabled: _propTypes.default.bool,
|
|
112
128
|
|
|
113
129
|
/**
|
|
114
|
-
*
|
|
130
|
+
* Determine how many ranges to render, and multiple handles
|
|
131
|
+
* will be rendered (number + 1).
|
|
115
132
|
*/
|
|
116
|
-
|
|
133
|
+
count: _propTypes.default.number,
|
|
117
134
|
|
|
118
135
|
/**
|
|
119
136
|
* When the step value is greater than 1,
|
|
@@ -128,24 +145,6 @@ RangeSlider.propTypes = {
|
|
|
128
145
|
*/
|
|
129
146
|
included: _propTypes.default.bool,
|
|
130
147
|
|
|
131
|
-
/**
|
|
132
|
-
* Minimum allowed value of the slider
|
|
133
|
-
*/
|
|
134
|
-
min: _propTypes.default.number,
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Maximum allowed value of the slider
|
|
138
|
-
*/
|
|
139
|
-
max: _propTypes.default.number,
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* pushable could be set as true to allow pushing of
|
|
143
|
-
* surrounding handles when moving an handle.
|
|
144
|
-
* When set to a number, the number will be the
|
|
145
|
-
* minimum ensured distance between handles.
|
|
146
|
-
*/
|
|
147
|
-
pushable: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.number]),
|
|
148
|
-
|
|
149
148
|
/**
|
|
150
149
|
* Configuration for tooltips describing the current slider values
|
|
151
150
|
*/
|
|
@@ -166,9 +165,15 @@ RangeSlider.propTypes = {
|
|
|
166
165
|
}),
|
|
167
166
|
|
|
168
167
|
/**
|
|
169
|
-
*
|
|
168
|
+
* Determines when the component should update its `value`
|
|
169
|
+
* property. If `mouseup` (the default) then the slider
|
|
170
|
+
* will only trigger its value when the user has finished
|
|
171
|
+
* dragging the slider. If `drag`, then the slider will
|
|
172
|
+
* update its value continuously as it is being dragged.
|
|
173
|
+
* Note that for the latter case, the `drag_value`
|
|
174
|
+
* property could be used instead.
|
|
170
175
|
*/
|
|
171
|
-
|
|
176
|
+
updatemode: _propTypes.default.oneOf(['mouseup', 'drag']),
|
|
172
177
|
|
|
173
178
|
/**
|
|
174
179
|
* If true, the slider will be vertical
|
|
@@ -181,15 +186,16 @@ RangeSlider.propTypes = {
|
|
|
181
186
|
verticalHeight: _propTypes.default.number,
|
|
182
187
|
|
|
183
188
|
/**
|
|
184
|
-
*
|
|
185
|
-
* property. If `mouseup` (the default) then the slider
|
|
186
|
-
* will only trigger its value when the user has finished
|
|
187
|
-
* dragging the slider. If `drag`, then the slider will
|
|
188
|
-
* update its value continuously as it is being dragged.
|
|
189
|
-
* Note that for the latter case, the `drag_value`
|
|
190
|
-
* property could be used instead.
|
|
189
|
+
* Additional CSS class for the root DOM node
|
|
191
190
|
*/
|
|
192
|
-
|
|
191
|
+
className: _propTypes.default.string,
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The ID of this component, used to identify dash components
|
|
195
|
+
* in callbacks. The ID needs to be unique across all of the
|
|
196
|
+
* components in an app.
|
|
197
|
+
*/
|
|
198
|
+
id: _propTypes.default.string,
|
|
193
199
|
|
|
194
200
|
/**
|
|
195
201
|
* Dash-assigned callback that gets fired when the value or drag_value changes.
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
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
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
|
-
exports.
|
|
8
|
+
exports.propTypes = exports.defaultProps = exports.default = void 0;
|
|
7
9
|
|
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
|
|
@@ -13,48 +15,52 @@ var _slider = _interopRequireDefault(require("../utils/LazyLoader/slider"));
|
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
17
|
|
|
16
|
-
function
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
19
|
|
|
18
|
-
function
|
|
20
|
+
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; }
|
|
19
21
|
|
|
20
22
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
23
|
|
|
22
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); } }
|
|
23
25
|
|
|
24
|
-
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; }
|
|
25
27
|
|
|
26
|
-
function
|
|
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); }
|
|
27
29
|
|
|
28
|
-
function
|
|
30
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
31
|
|
|
30
|
-
function
|
|
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); }; }
|
|
31
33
|
|
|
32
|
-
function
|
|
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); }
|
|
33
35
|
|
|
34
|
-
function
|
|
36
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
37
|
+
|
|
38
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
|
+
|
|
40
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
35
41
|
|
|
36
|
-
var RealSlider = (0, _react.lazy)(_slider.default);
|
|
42
|
+
var RealSlider = /*#__PURE__*/(0, _react.lazy)(_slider.default);
|
|
37
43
|
/**
|
|
38
44
|
* A slider component with a single handle.
|
|
39
45
|
*/
|
|
40
46
|
|
|
41
|
-
var Slider =
|
|
42
|
-
/*#__PURE__*/
|
|
43
|
-
function (_Component) {
|
|
47
|
+
var Slider = /*#__PURE__*/function (_Component) {
|
|
44
48
|
_inherits(Slider, _Component);
|
|
45
49
|
|
|
50
|
+
var _super = _createSuper(Slider);
|
|
51
|
+
|
|
46
52
|
function Slider() {
|
|
47
53
|
_classCallCheck(this, Slider);
|
|
48
54
|
|
|
49
|
-
return
|
|
55
|
+
return _super.apply(this, arguments);
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
_createClass(Slider, [{
|
|
53
59
|
key: "render",
|
|
54
60
|
value: function render() {
|
|
55
|
-
return _react.default.createElement(_react.Suspense, {
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
56
62
|
fallback: null
|
|
57
|
-
}, _react.default.createElement(RealSlider, this.props));
|
|
63
|
+
}, /*#__PURE__*/_react.default.createElement(RealSlider, this.props));
|
|
58
64
|
}
|
|
59
65
|
}]);
|
|
60
66
|
|
|
@@ -64,11 +70,19 @@ function (_Component) {
|
|
|
64
70
|
exports.default = Slider;
|
|
65
71
|
Slider.propTypes = {
|
|
66
72
|
/**
|
|
67
|
-
*
|
|
68
|
-
* in callbacks. The ID needs to be unique across all of the
|
|
69
|
-
* components in an app.
|
|
73
|
+
* Minimum allowed value of the slider
|
|
70
74
|
*/
|
|
71
|
-
|
|
75
|
+
min: _propTypes.default.number,
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Maximum allowed value of the slider
|
|
79
|
+
*/
|
|
80
|
+
max: _propTypes.default.number,
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Value by which increments or decrements are made
|
|
84
|
+
*/
|
|
85
|
+
step: _propTypes.default.number,
|
|
72
86
|
|
|
73
87
|
/**
|
|
74
88
|
* Marks on the slider.
|
|
@@ -93,11 +107,6 @@ Slider.propTypes = {
|
|
|
93
107
|
*/
|
|
94
108
|
drag_value: _propTypes.default.number,
|
|
95
109
|
|
|
96
|
-
/**
|
|
97
|
-
* Additional CSS class for the root DOM node
|
|
98
|
-
*/
|
|
99
|
-
className: _propTypes.default.string,
|
|
100
|
-
|
|
101
110
|
/**
|
|
102
111
|
* If true, the handles can't be moved.
|
|
103
112
|
*/
|
|
@@ -116,16 +125,6 @@ Slider.propTypes = {
|
|
|
116
125
|
*/
|
|
117
126
|
included: _propTypes.default.bool,
|
|
118
127
|
|
|
119
|
-
/**
|
|
120
|
-
* Minimum allowed value of the slider
|
|
121
|
-
*/
|
|
122
|
-
min: _propTypes.default.number,
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Maximum allowed value of the slider
|
|
126
|
-
*/
|
|
127
|
-
max: _propTypes.default.number,
|
|
128
|
-
|
|
129
128
|
/**
|
|
130
129
|
* Configuration for tooltips describing the current slider value
|
|
131
130
|
*/
|
|
@@ -146,9 +145,16 @@ Slider.propTypes = {
|
|
|
146
145
|
}),
|
|
147
146
|
|
|
148
147
|
/**
|
|
149
|
-
*
|
|
148
|
+
* Determines when the component should update its `value`
|
|
149
|
+
* property. If `mouseup` (the default) then the slider
|
|
150
|
+
* will only trigger its value when the user has finished
|
|
151
|
+
* dragging the slider. If `drag`, then the slider will
|
|
152
|
+
* update its value continuously as it is being dragged.
|
|
153
|
+
* If you want different actions during and after drag,
|
|
154
|
+
* leave `updatemode` as `mouseup` and use `drag_value`
|
|
155
|
+
* for the continuously updating value.
|
|
150
156
|
*/
|
|
151
|
-
|
|
157
|
+
updatemode: _propTypes.default.oneOf(['mouseup', 'drag']),
|
|
152
158
|
|
|
153
159
|
/**
|
|
154
160
|
* If true, the slider will be vertical
|
|
@@ -161,16 +167,16 @@ Slider.propTypes = {
|
|
|
161
167
|
verticalHeight: _propTypes.default.number,
|
|
162
168
|
|
|
163
169
|
/**
|
|
164
|
-
*
|
|
165
|
-
* property. If `mouseup` (the default) then the slider
|
|
166
|
-
* will only trigger its value when the user has finished
|
|
167
|
-
* dragging the slider. If `drag`, then the slider will
|
|
168
|
-
* update its value continuously as it is being dragged.
|
|
169
|
-
* If you want different actions during and after drag,
|
|
170
|
-
* leave `updatemode` as `mouseup` and use `drag_value`
|
|
171
|
-
* for the continuously updating value.
|
|
170
|
+
* Additional CSS class for the root DOM node
|
|
172
171
|
*/
|
|
173
|
-
|
|
172
|
+
className: _propTypes.default.string,
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* The ID of this component, used to identify dash components
|
|
176
|
+
* in callbacks. The ID needs to be unique across all of the
|
|
177
|
+
* components in an app.
|
|
178
|
+
*/
|
|
179
|
+
id: _propTypes.default.string,
|
|
174
180
|
|
|
175
181
|
/**
|
|
176
182
|
* Dash-assigned callback that gets fired when the value or drag_value changes.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
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
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -13,32 +15,32 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
17
|
|
|
16
|
-
function
|
|
18
|
+
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); }
|
|
19
|
+
|
|
20
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
17
21
|
|
|
18
|
-
function
|
|
22
|
+
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); }; }
|
|
19
23
|
|
|
20
|
-
function
|
|
24
|
+
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); }
|
|
21
25
|
|
|
22
26
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23
27
|
|
|
24
|
-
function
|
|
28
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
25
29
|
|
|
26
|
-
function
|
|
30
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
27
31
|
|
|
28
32
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
33
|
|
|
30
34
|
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); } }
|
|
31
35
|
|
|
32
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
36
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
33
37
|
|
|
34
38
|
/**
|
|
35
39
|
* Abstraction for the memory storage_type to work the same way as local/session
|
|
36
40
|
*
|
|
37
41
|
* Each memory Store component get it's own MemStore.
|
|
38
42
|
*/
|
|
39
|
-
var MemStore =
|
|
40
|
-
/*#__PURE__*/
|
|
41
|
-
function () {
|
|
43
|
+
var MemStore = /*#__PURE__*/function () {
|
|
42
44
|
function MemStore() {
|
|
43
45
|
_classCallCheck(this, MemStore);
|
|
44
46
|
|
|
@@ -86,9 +88,7 @@ function () {
|
|
|
86
88
|
*/
|
|
87
89
|
|
|
88
90
|
|
|
89
|
-
var WebStore =
|
|
90
|
-
/*#__PURE__*/
|
|
91
|
-
function () {
|
|
91
|
+
var WebStore = /*#__PURE__*/function () {
|
|
92
92
|
function WebStore(storage) {
|
|
93
93
|
_classCallCheck(this, WebStore);
|
|
94
94
|
|
|
@@ -142,17 +142,17 @@ function () {
|
|
|
142
142
|
*/
|
|
143
143
|
|
|
144
144
|
|
|
145
|
-
var Store =
|
|
146
|
-
/*#__PURE__*/
|
|
147
|
-
function (_React$Component) {
|
|
145
|
+
var Store = /*#__PURE__*/function (_React$Component) {
|
|
148
146
|
_inherits(Store, _React$Component);
|
|
149
147
|
|
|
148
|
+
var _super = _createSuper(Store);
|
|
149
|
+
|
|
150
150
|
function Store(props) {
|
|
151
151
|
var _this;
|
|
152
152
|
|
|
153
153
|
_classCallCheck(this, Store);
|
|
154
154
|
|
|
155
|
-
_this =
|
|
155
|
+
_this = _super.call(this, props);
|
|
156
156
|
|
|
157
157
|
if (props.storage_type === 'local') {
|
|
158
158
|
_this._backstore = new WebStore(window.localStorage);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
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
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -11,7 +13,9 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
13
|
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
15
|
|
|
14
|
-
function
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
15
19
|
|
|
16
20
|
/**
|
|
17
21
|
* Part of dcc.Tabs - this is the child Tab component used to render a tabbed page.
|
|
@@ -19,7 +23,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
19
23
|
*/
|
|
20
24
|
var Tab = function Tab(_ref) {
|
|
21
25
|
var children = _ref.children;
|
|
22
|
-
return _react.default.createElement(_react.Fragment, null, children);
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, children);
|
|
23
27
|
};
|
|
24
28
|
|
|
25
29
|
Tab.propTypes = {
|