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.
Files changed (80) hide show
  1. package/README.md +8 -44
  2. package/dash_core_components/async-datepicker.js +1 -1
  3. package/dash_core_components/async-datepicker.js.map +1 -1
  4. package/dash_core_components/async-dropdown.js +2 -2
  5. package/dash_core_components/async-dropdown.js.map +1 -1
  6. package/dash_core_components/async-graph.js +1 -1
  7. package/dash_core_components/async-graph.js.map +1 -1
  8. package/dash_core_components/async-highlight.js +1 -1
  9. package/dash_core_components/async-highlight.js.map +1 -1
  10. package/dash_core_components/async-markdown.js +2 -2
  11. package/dash_core_components/async-markdown.js.map +1 -1
  12. package/dash_core_components/async-plotlyjs.js +2 -2
  13. package/dash_core_components/async-slider.js +1 -2
  14. package/dash_core_components/async-slider.js.map +1 -1
  15. package/dash_core_components/async-upload.js +1 -1
  16. package/dash_core_components/async-upload.js.map +1 -1
  17. package/dash_core_components/dash_core_components-shared.js +2 -2
  18. package/dash_core_components/dash_core_components-shared.js.map +1 -1
  19. package/dash_core_components/dash_core_components.js +3 -0
  20. package/dash_core_components/dash_core_components.js.map +1 -0
  21. package/dash_core_components/plotly.min.js +30 -26
  22. package/lib/components/Checklist.react.js +77 -35
  23. package/lib/components/Clipboard.react.js +354 -0
  24. package/lib/components/ConfirmDialog.react.js +16 -12
  25. package/lib/components/ConfirmDialogProvider.react.js +19 -15
  26. package/lib/components/DatePickerRange.react.js +111 -97
  27. package/lib/components/DatePickerSingle.react.js +95 -81
  28. package/lib/components/Download.react.js +138 -0
  29. package/lib/components/Dropdown.react.js +69 -47
  30. package/lib/components/Graph.react.js +36 -24
  31. package/lib/components/Input.react.js +98 -92
  32. package/lib/components/Interval.react.js +18 -12
  33. package/lib/components/Link.react.js +36 -30
  34. package/lib/components/Loading.react.js +21 -15
  35. package/lib/components/Location.react.js +15 -13
  36. package/lib/components/LogoutButton.react.js +18 -14
  37. package/lib/components/Markdown.react.js +23 -17
  38. package/lib/components/RadioItems.react.js +77 -35
  39. package/lib/components/RangeSlider.react.js +61 -55
  40. package/lib/components/Slider.react.js +52 -46
  41. package/lib/components/Store.react.js +16 -16
  42. package/lib/components/Tab.react.js +6 -2
  43. package/lib/components/Tabs.react.js +32 -23
  44. package/lib/components/Textarea.react.js +19 -13
  45. package/lib/components/Tooltip.react.js +152 -0
  46. package/lib/components/Upload.react.js +25 -19
  47. package/lib/components/css/Dropdown.css +1 -1
  48. package/lib/fragments/DatePickerRange.react.js +63 -51
  49. package/lib/fragments/DatePickerSingle.react.js +28 -17
  50. package/lib/fragments/Dropdown.react.js +33 -22
  51. package/lib/fragments/Graph.privateprops.js +1 -1
  52. package/lib/fragments/Graph.react.js +44 -28
  53. package/lib/fragments/Loading/spinners/CircleSpinner.js +16 -16
  54. package/lib/fragments/Loading/spinners/CubeSpinner.js +11 -11
  55. package/lib/fragments/Loading/spinners/DefaultSpinner.js +9 -9
  56. package/lib/fragments/Loading/spinners/DotSpinner.js +7 -7
  57. package/lib/fragments/Loading/spinners/GraphSpinner.js +18 -18
  58. package/lib/fragments/Markdown.react.js +35 -32
  59. package/lib/fragments/RangeSlider.react.js +57 -22
  60. package/lib/fragments/Slider.react.js +40 -21
  61. package/lib/fragments/Upload.react.js +19 -13
  62. package/lib/index.js +77 -53
  63. package/lib/third-party/highlight.js +12 -0
  64. package/lib/utils/LazyLoader/datePickerRange.js +9 -3
  65. package/lib/utils/LazyLoader/datePickerSingle.js +9 -3
  66. package/lib/utils/LazyLoader/dropdown.js +9 -3
  67. package/lib/utils/LazyLoader/graph.js +9 -3
  68. package/lib/utils/LazyLoader/hljs.js +9 -3
  69. package/lib/utils/LazyLoader/markdown.js +9 -3
  70. package/lib/utils/LazyLoader/plotly.js +9 -3
  71. package/lib/utils/LazyLoader/rangeSlider.js +9 -3
  72. package/lib/utils/LazyLoader/slider.js +9 -3
  73. package/lib/utils/LazyLoader/upload.js +9 -3
  74. package/lib/utils/computeSliderMarkers.js +230 -0
  75. package/lib/utils/convertToMoment.js +4 -0
  76. package/lib/utils/optionTypes.js +52 -0
  77. package/package.json +68 -75
  78. package/CHANGELOG.md +0 -1034
  79. package/dash_core_components/dash_core_components.min.js +0 -2
  80. 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.defaultProps = exports.propTypes = exports.default = void 0;
8
+ exports.propTypes = exports.defaultProps = exports.default = void 0;
7
9
 
8
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
11
 
@@ -11,29 +13,33 @@ var _react = _interopRequireWildcard(require("react"));
11
13
 
12
14
  var _dropdown = _interopRequireDefault(require("../utils/LazyLoader/dropdown"));
13
15
 
14
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
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); }
15
17
 
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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; }
17
19
 
18
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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 _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
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 _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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 _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
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 _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
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; } }
35
39
 
36
- var RealDropdown = (0, _react.lazy)(_dropdown.default);
40
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
41
+
42
+ var RealDropdown = /*#__PURE__*/(0, _react.lazy)(_dropdown.default);
37
43
  /**
38
44
  * Dropdown is an interactive dropdown element for selecting one or more
39
45
  * items.
@@ -45,23 +51,23 @@ var RealDropdown = (0, _react.lazy)(_dropdown.default);
45
51
  * which have the benefit of showing the users all of the items at once.
46
52
  */
47
53
 
48
- var Dropdown =
49
- /*#__PURE__*/
50
- function (_Component) {
54
+ var Dropdown = /*#__PURE__*/function (_Component) {
51
55
  _inherits(Dropdown, _Component);
52
56
 
57
+ var _super = _createSuper(Dropdown);
58
+
53
59
  function Dropdown() {
54
60
  _classCallCheck(this, Dropdown);
55
61
 
56
- return _possibleConstructorReturn(this, _getPrototypeOf(Dropdown).apply(this, arguments));
62
+ return _super.apply(this, arguments);
57
63
  }
58
64
 
59
65
  _createClass(Dropdown, [{
60
66
  key: "render",
61
67
  value: function render() {
62
- return _react.default.createElement(_react.Suspense, {
68
+ return /*#__PURE__*/_react.default.createElement(_react.Suspense, {
63
69
  fallback: null
64
- }, _react.default.createElement(RealDropdown, this.props));
70
+ }, /*#__PURE__*/_react.default.createElement(RealDropdown, this.props));
65
71
  }
66
72
  }]);
67
73
 
@@ -71,28 +77,37 @@ function (_Component) {
71
77
  exports.default = Dropdown;
72
78
  Dropdown.propTypes = {
73
79
  /**
74
- * The ID of this component, used to identify dash components
75
- * in callbacks. The ID needs to be unique across all of the
76
- * 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
77
82
  */
78
- id: _propTypes.default.string,
79
-
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,
80
95
  /**
81
96
  * An array of options {label: [string|number], value: [string|number]},
82
97
  * an optional disabled field can be used for each option
83
98
  */
84
- options: _propTypes.default.arrayOf(_propTypes.default.exact({
99
+ _propTypes.default.arrayOf(_propTypes.default.exact({
85
100
  /**
86
- * The dropdown's label
101
+ * The option's label
87
102
  */
88
103
  label: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]).isRequired,
89
104
 
90
105
  /**
91
- * The value of the dropdown. This value
106
+ * The value of the option. This value
92
107
  * corresponds to the items specified in the
93
108
  * `value` property.
94
109
  */
95
- 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,
96
111
 
97
112
  /**
98
113
  * If true, this option is disabled and cannot be selected.
@@ -105,7 +120,7 @@ Dropdown.propTypes = {
105
120
  * see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title
106
121
  */
107
122
  title: _propTypes.default.string
108
- })),
123
+ }))]),
109
124
 
110
125
  /**
111
126
  * The value of the input. If `multi` is false (the default)
@@ -115,17 +130,12 @@ Dropdown.propTypes = {
115
130
  * array of items with values corresponding to those in the
116
131
  * `options` prop.
117
132
  */
118
- value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _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]))]),
119
134
 
120
135
  /**
121
- * height of each option. Can be increased when label lengths would wrap around
122
- */
123
- optionHeight: _propTypes.default.number,
124
-
125
- /**
126
- * className of the dropdown element
136
+ * If true, the user can select multiple values
127
137
  */
128
- className: _propTypes.default.string,
138
+ multi: _propTypes.default.bool,
129
139
 
130
140
  /**
131
141
  * Whether or not the dropdown is "clearable", that is, whether or
@@ -135,14 +145,14 @@ Dropdown.propTypes = {
135
145
  clearable: _propTypes.default.bool,
136
146
 
137
147
  /**
138
- * If true, this dropdown is disabled and the selection cannot be changed.
148
+ * Whether to enable the searching feature or not
139
149
  */
140
- disabled: _propTypes.default.bool,
150
+ searchable: _propTypes.default.bool,
141
151
 
142
152
  /**
143
- * If true, the user can select multiple values
153
+ * The value typed in the DropDown for searching.
144
154
  */
145
- multi: _propTypes.default.bool,
155
+ search_value: _propTypes.default.string,
146
156
 
147
157
  /**
148
158
  * The grey, default text shown when no option is selected
@@ -150,24 +160,36 @@ Dropdown.propTypes = {
150
160
  placeholder: _propTypes.default.string,
151
161
 
152
162
  /**
153
- * Whether to enable the searching feature or not
163
+ * If true, this dropdown is disabled and the selection cannot be changed.
154
164
  */
155
- searchable: _propTypes.default.bool,
165
+ disabled: _propTypes.default.bool,
156
166
 
157
167
  /**
158
- * The value typed in the DropDown for searching.
168
+ * height of each option. Can be increased when label lengths would wrap around
159
169
  */
160
- search_value: _propTypes.default.string,
170
+ optionHeight: _propTypes.default.number,
161
171
 
162
172
  /**
163
- * Dash-assigned callback that gets fired when the input changes
173
+ * Defines CSS styles which will override styles previously set.
164
174
  */
165
- setProps: _propTypes.default.func,
175
+ style: _propTypes.default.object,
166
176
 
167
177
  /**
168
- * Defines CSS styles which will override styles previously set.
178
+ * className of the dropdown element
169
179
  */
170
- style: _propTypes.default.object,
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,
171
193
 
172
194
  /**
173
195
  * Object that holds the loading state object coming from dash-renderer
@@ -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.default = exports.graphDefaultProps = exports.graphPropTypes = void 0;
8
+ exports.graphPropTypes = exports.graphDefaultProps = exports.default = void 0;
7
9
 
8
10
  var _react = _interopRequireWildcard(require("react"));
9
11
 
@@ -19,19 +21,25 @@ var _Graph = require("../fragments/Graph.privateprops");
19
21
 
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
23
 
22
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
24
+ 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); }
23
25
 
24
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
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; }
25
27
 
26
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
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; }
27
29
 
28
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
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; }
29
31
 
30
- function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
32
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
31
33
 
32
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
34
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
35
+
36
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
37
+
38
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
33
39
 
34
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
40
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
41
+
42
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
35
43
 
36
44
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
37
45
 
@@ -41,17 +49,21 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
41
49
 
42
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); } }
43
51
 
44
- 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; }
45
53
 
46
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
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); }
47
55
 
48
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
56
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
57
+
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
+
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); }
49
61
 
50
62
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
51
63
 
52
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
64
+ 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; } }
53
65
 
54
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
66
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
55
67
 
56
68
  var EMPTY_DATA = [];
57
69
  /**
@@ -61,17 +73,17 @@ var EMPTY_DATA = [];
61
73
  * hovering, clicking or selecting
62
74
  */
63
75
 
64
- var PlotlyGraph =
65
- /*#__PURE__*/
66
- function (_Component) {
76
+ var PlotlyGraph = /*#__PURE__*/function (_Component) {
67
77
  _inherits(PlotlyGraph, _Component);
68
78
 
79
+ var _super = _createSuper(PlotlyGraph);
80
+
69
81
  function PlotlyGraph(props) {
70
82
  var _this;
71
83
 
72
84
  _classCallCheck(this, PlotlyGraph);
73
85
 
74
- _this = _possibleConstructorReturn(this, _getPrototypeOf(PlotlyGraph).call(this, props));
86
+ _this = _super.call(this, props);
75
87
  _this.state = {
76
88
  prependData: [],
77
89
  extendData: []
@@ -154,7 +166,7 @@ function (_Component) {
154
166
  }, {
155
167
  key: "render",
156
168
  value: function render() {
157
- return _react.default.createElement(ControlledPlotlyGraph, _extends({}, this.props, {
169
+ return /*#__PURE__*/_react.default.createElement(ControlledPlotlyGraph, _extends({}, this.props, {
158
170
  prependData: this.state.prependData,
159
171
  extendData: this.state.extendData,
160
172
  clearState: this.clearState
@@ -173,21 +185,21 @@ var RealPlotlyGraph = (0, _dashComponentPlugins.asyncDecorator)(PlotlyGraph, fun
173
185
  return graph;
174
186
  });
175
187
  });
176
- var ControlledPlotlyGraph = (0, _react.memo)(function (props) {
188
+ var ControlledPlotlyGraph = /*#__PURE__*/(0, _react.memo)(function (props) {
177
189
  var className = props.className,
178
190
  id = props.id;
179
191
  var extendedClassName = className ? 'dash-graph ' + className : 'dash-graph';
180
- return _react.default.createElement(_react.Suspense, {
181
- fallback: _react.default.createElement("div", {
192
+ return /*#__PURE__*/_react.default.createElement(_react.Suspense, {
193
+ fallback: /*#__PURE__*/_react.default.createElement("div", {
182
194
  id: id,
183
195
  key: id,
184
196
  className: "".concat(extendedClassName, " dash-graph--pending")
185
197
  })
186
- }, _react.default.createElement(RealPlotlyGraph, _extends({}, props, {
198
+ }, /*#__PURE__*/_react.default.createElement(RealPlotlyGraph, _extends({}, props, {
187
199
  className: extendedClassName
188
200
  })));
189
201
  });
190
- PlotlyGraph.propTypes = _objectSpread({}, _Graph.privatePropTypes, {
202
+ PlotlyGraph.propTypes = _objectSpread(_objectSpread({}, _Graph.privatePropTypes), {}, {
191
203
  /**
192
204
  * The ID of this component, used to identify dash components
193
205
  * in callbacks. The ID needs to be unique across all of the
@@ -590,7 +602,7 @@ PlotlyGraph.propTypes = _objectSpread({}, _Graph.privatePropTypes, {
590
602
  })
591
603
  });
592
604
  ControlledPlotlyGraph.propTypes = PlotlyGraph.propTypes;
593
- PlotlyGraph.defaultProps = _objectSpread({}, _Graph.privateDefaultProps, {
605
+ PlotlyGraph.defaultProps = _objectSpread(_objectSpread({}, _Graph.privateDefaultProps), {}, {
594
606
  clickData: null,
595
607
  clickAnnotationData: null,
596
608
  hoverData: null,