dash-core-components 2.0.0 → 2.3.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 (74) hide show
  1. package/README.md +7 -28
  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 +1 -1
  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 +1 -1
  11. package/dash_core_components/async-markdown.js.map +1 -1
  12. package/dash_core_components/async-mathjax.js +1 -0
  13. package/dash_core_components/async-plotlyjs.js +1 -1
  14. package/dash_core_components/async-slider.js +1 -1
  15. package/dash_core_components/async-slider.js.map +1 -1
  16. package/dash_core_components/async-upload.js +1 -1
  17. package/dash_core_components/async-upload.js.map +1 -1
  18. package/dash_core_components/dash_core_components-shared.js +1 -1
  19. package/dash_core_components/dash_core_components-shared.js.map +1 -1
  20. package/dash_core_components/dash_core_components.js +1 -1
  21. package/dash_core_components/dash_core_components.js.map +1 -1
  22. package/dash_core_components/mathjax.js +1 -0
  23. package/dash_core_components/plotly.min.js +29 -22
  24. package/lib/components/Checklist.react.js +59 -23
  25. package/lib/components/Clipboard.react.js +4 -4
  26. package/lib/components/ConfirmDialog.react.js +4 -4
  27. package/lib/components/ConfirmDialogProvider.react.js +4 -4
  28. package/lib/components/DatePickerRange.react.js +85 -85
  29. package/lib/components/DatePickerSingle.react.js +68 -68
  30. package/lib/components/Download.react.js +4 -4
  31. package/lib/components/Dropdown.react.js +51 -35
  32. package/lib/components/Graph.react.js +23 -10
  33. package/lib/components/Input.react.js +83 -83
  34. package/lib/components/Interval.react.js +4 -4
  35. package/lib/components/Link.react.js +21 -21
  36. package/lib/components/Loading.react.js +4 -4
  37. package/lib/components/Location.react.js +4 -4
  38. package/lib/components/LogoutButton.react.js +4 -4
  39. package/lib/components/Markdown.react.js +46 -9
  40. package/lib/components/RadioItems.react.js +59 -23
  41. package/lib/components/RangeSlider.react.js +44 -44
  42. package/lib/components/Slider.react.js +35 -35
  43. package/lib/components/Store.react.js +4 -4
  44. package/lib/components/Tab.react.js +1 -1
  45. package/lib/components/Tabs.react.js +10 -10
  46. package/lib/components/Textarea.react.js +4 -4
  47. package/lib/components/Tooltip.react.js +2 -2
  48. package/lib/components/Upload.react.js +5 -5
  49. package/lib/components/css/Dropdown.css +1 -1
  50. package/lib/fragments/DatePickerRange.react.js +6 -6
  51. package/lib/fragments/DatePickerSingle.react.js +6 -6
  52. package/lib/fragments/Dropdown.react.js +13 -11
  53. package/lib/fragments/Graph.privateprops.js +1 -1
  54. package/lib/fragments/Graph.react.js +125 -68
  55. package/lib/fragments/Markdown.react.js +22 -4
  56. package/lib/fragments/Math.react.js +101 -0
  57. package/lib/fragments/RangeSlider.react.js +24 -13
  58. package/lib/fragments/Slider.react.js +22 -11
  59. package/lib/fragments/Upload.react.js +4 -4
  60. package/lib/utils/LazyLoader/datePickerRange.js +1 -1
  61. package/lib/utils/LazyLoader/datePickerSingle.js +1 -1
  62. package/lib/utils/LazyLoader/dropdown.js +1 -1
  63. package/lib/utils/LazyLoader/graph.js +1 -1
  64. package/lib/utils/LazyLoader/hljs.js +1 -1
  65. package/lib/utils/LazyLoader/markdown.js +1 -1
  66. package/lib/utils/LazyLoader/mathjax.js +22 -0
  67. package/lib/utils/LazyLoader/plotly.js +2 -2
  68. package/lib/utils/LazyLoader/rangeSlider.js +1 -1
  69. package/lib/utils/LazyLoader/slider.js +1 -1
  70. package/lib/utils/LazyLoader/upload.js +1 -1
  71. package/lib/utils/computeSliderMarkers.js +230 -0
  72. package/lib/utils/mathjax.js +5 -0
  73. package/lib/utils/optionTypes.js +52 -0
  74. package/package.json +36 -34
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; 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); }
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.defaultProps = exports.propTypes = exports.default = void 0;
8
+ exports.propTypes = exports.defaultProps = exports.default = void 0;
9
+
10
+ var _dashComponentPlugins = require("@plotly/dash-component-plugins");
9
11
 
10
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
13
 
@@ -13,25 +15,39 @@ var _react = _interopRequireWildcard(require("react"));
13
15
 
14
16
  var _markdown = _interopRequireDefault(require("../utils/LazyLoader/markdown"));
15
17
 
18
+ var _mathjax = _interopRequireDefault(require("../utils/LazyLoader/mathjax"));
19
+
16
20
  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
21
 
18
22
  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
23
 
20
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
25
 
26
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
+
28
+ 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."); }
29
+
30
+ 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); }
31
+
32
+ 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
+
34
+ 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; }
35
+
36
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
+
22
38
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23
39
 
24
40
  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
41
 
26
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
42
+ 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
43
 
28
- 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); }
44
+ 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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
29
45
 
30
46
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
47
 
32
48
  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
49
 
34
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
50
+ 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
51
 
36
52
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
37
53
 
@@ -39,23 +55,30 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
39
55
 
40
56
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
41
57
 
42
- var RealDashMarkdown = /*#__PURE__*/(0, _react.lazy)(_markdown.default); // eslint-disable-next-line valid-jsdoc
58
+ // eslint-disable-next-line valid-jsdoc
43
59
 
44
60
  /**
45
61
  * A component that renders Markdown text as specified by the
46
62
  * GitHub Markdown spec. These component uses
47
63
  * [react-markdown](https://rexxars.github.io/react-markdown/) under the hood.
48
64
  */
49
-
50
65
  var DashMarkdown = /*#__PURE__*/function (_Component) {
51
66
  _inherits(DashMarkdown, _Component);
52
67
 
53
68
  var _super = _createSuper(DashMarkdown);
54
69
 
55
- function DashMarkdown() {
70
+ function DashMarkdown(props) {
71
+ var _this;
72
+
56
73
  _classCallCheck(this, DashMarkdown);
57
74
 
58
- return _super.apply(this, arguments);
75
+ _this = _super.call(this, props);
76
+
77
+ if (props.mathjax) {
78
+ DashMarkdown._loadMathjax = true;
79
+ }
80
+
81
+ return _this;
59
82
  }
60
83
 
61
84
  _createClass(DashMarkdown, [{
@@ -84,6 +107,11 @@ DashMarkdown.propTypes = {
84
107
  */
85
108
  className: _propTypes.default.string,
86
109
 
110
+ /**
111
+ * If true, loads mathjax v3 (tex-svg) into the page and use it in the markdown
112
+ */
113
+ mathjax: _propTypes.default.bool,
114
+
87
115
  /**
88
116
  * A boolean to control raw HTML escaping.
89
117
  * Setting HTML from code is risky because it's easy to
@@ -141,10 +169,19 @@ DashMarkdown.propTypes = {
141
169
  style: _propTypes.default.object
142
170
  };
143
171
  DashMarkdown.defaultProps = {
172
+ mathjax: false,
144
173
  dangerously_allow_html: false,
145
174
  highlight_config: {},
146
175
  dedent: true
147
176
  };
177
+ var RealDashMarkdown = (0, _dashComponentPlugins.asyncDecorator)(DashMarkdown, function () {
178
+ return Promise.all([(0, _markdown.default)(), DashMarkdown._loadMathjax ? (0, _mathjax.default)() : undefined]).then(function (_ref) {
179
+ var _ref2 = _slicedToArray(_ref, 1),
180
+ md = _ref2[0];
181
+
182
+ return md;
183
+ });
184
+ });
148
185
  var propTypes = DashMarkdown.propTypes;
149
186
  exports.propTypes = propTypes;
150
187
  var defaultProps = DashMarkdown.defaultProps;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; 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); }
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
@@ -13,6 +13,8 @@ var _react = _interopRequireWildcard(require("react"));
13
13
 
14
14
  require("./css/react-select@1.0.0-rc.3.min.css");
15
15
 
16
+ var _optionTypes = require("../utils/optionTypes");
17
+
16
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
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; }
@@ -25,15 +27,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
25
27
 
26
28
  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
29
 
28
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
30
+ 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
31
 
30
- 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); }
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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
31
33
 
32
34
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
35
 
34
36
  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
37
 
36
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
38
+ 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
39
 
38
40
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
39
41
 
@@ -72,7 +74,8 @@ var RadioItems = /*#__PURE__*/function (_Component) {
72
74
  options = _this$props.options,
73
75
  setProps = _this$props.setProps,
74
76
  loading_state = _this$props.loading_state,
75
- value = _this$props.value;
77
+ value = _this$props.value,
78
+ inline = _this$props.inline;
76
79
  var ids = {};
77
80
 
78
81
  if (id) {
@@ -87,9 +90,11 @@ var RadioItems = /*#__PURE__*/function (_Component) {
87
90
  }, ids, {
88
91
  className: className,
89
92
  style: style
90
- }), options.map(function (option) {
93
+ }), (0, _optionTypes.sanitizeOptions)(options).map(function (option) {
91
94
  return /*#__PURE__*/_react.default.createElement("label", {
92
- style: labelStyle,
95
+ style: Object.assign({}, labelStyle, inline ? {
96
+ display: 'inline-block'
97
+ } : {}),
93
98
  className: labelClassName,
94
99
  key: option.value
95
100
  }, /*#__PURE__*/_react.default.createElement("input", {
@@ -114,38 +119,61 @@ var RadioItems = /*#__PURE__*/function (_Component) {
114
119
  exports.default = RadioItems;
115
120
  RadioItems.propTypes = {
116
121
  /**
117
- * The ID of this component, used to identify dash components
118
- * in callbacks. The ID needs to be unique across all of the
119
- * components in an app.
122
+ * An array of options, or inline dictionary of options
120
123
  */
121
- id: _propTypes.default.string,
122
-
124
+ options: _propTypes.default.oneOfType([
123
125
  /**
124
- * An array of options
126
+ * Array of options where the label and the value are the same thing - [string|number|bool]
125
127
  */
126
- options: _propTypes.default.arrayOf(_propTypes.default.exact({
128
+ _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool])),
129
+ /**
130
+ * Simpler `options` representation in dictionary format. The order is not guaranteed.
131
+ * {`value1`: `label1`, `value2`: `label2`, ... }
132
+ * which is equal to
133
+ * [{label: `label1`, value: `value1`}, {label: `label2`, value: `value2`}, ...]
134
+ */
135
+ _propTypes.default.object,
136
+ /**
137
+ * An array of options {label: [string|number], value: [string|number]},
138
+ * an optional disabled field can be used for each option
139
+ */
140
+ _propTypes.default.arrayOf(_propTypes.default.exact({
127
141
  /**
128
- * The radio item's label
142
+ * The option's label
129
143
  */
130
- label: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]).isRequired,
144
+ label: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool]).isRequired,
131
145
 
132
146
  /**
133
- * The value of the radio item. This value
147
+ * The value of the option. This value
134
148
  * corresponds to the items specified in the
135
149
  * `value` property.
136
150
  */
137
- value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]).isRequired,
151
+ value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool]).isRequired,
138
152
 
139
153
  /**
140
- * If true, this radio item is disabled and can't be clicked on.
154
+ * If true, this option is disabled and cannot be selected.
141
155
  */
142
- disabled: _propTypes.default.bool
143
- })),
156
+ disabled: _propTypes.default.bool,
157
+
158
+ /**
159
+ * The HTML 'title' attribute for the option. Allows for
160
+ * information on hover. For more information on this attribute,
161
+ * see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title
162
+ */
163
+ title: _propTypes.default.string
164
+ }))]),
144
165
 
145
166
  /**
146
167
  * The currently selected value
147
168
  */
148
- value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
169
+ value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool]),
170
+
171
+ /**
172
+ * Indicates whether labelStyle should be inline or not
173
+ * True: Automatically set { 'display': 'inline-block' } to labelStyle
174
+ * False: No additional styles are passed into labelStyle.
175
+ */
176
+ inline: _propTypes.default.bool,
149
177
 
150
178
  /**
151
179
  * The style of the container (div)
@@ -179,6 +207,13 @@ RadioItems.propTypes = {
179
207
  */
180
208
  labelClassName: _propTypes.default.string,
181
209
 
210
+ /**
211
+ * The ID of this component, used to identify dash components
212
+ * in callbacks. The ID needs to be unique across all of the
213
+ * components in an app.
214
+ */
215
+ id: _propTypes.default.string,
216
+
182
217
  /**
183
218
  * Dash-assigned callback that gets fired when the value changes.
184
219
  */
@@ -236,5 +271,6 @@ RadioItems.defaultProps = {
236
271
  labelClassName: '',
237
272
  options: [],
238
273
  persisted_props: ['value'],
239
- persistence_type: 'local'
274
+ persistence_type: 'local',
275
+ inline: false
240
276
  };
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; 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); }
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.defaultProps = exports.propTypes = exports.default = void 0;
8
+ exports.propTypes = exports.defaultProps = exports.default = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
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.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
28
+ 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 } }); Object.defineProperty(subClass, "prototype", { 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
 
@@ -71,11 +71,19 @@ var RangeSlider = /*#__PURE__*/function (_Component) {
71
71
  exports.default = RangeSlider;
72
72
  RangeSlider.propTypes = {
73
73
  /**
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.
74
+ * Minimum allowed value of the slider
77
75
  */
78
- id: _propTypes.default.string,
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,
79
87
 
80
88
  /**
81
89
  * Marks on the slider.
@@ -106,20 +114,23 @@ RangeSlider.propTypes = {
106
114
  allowCross: _propTypes.default.bool,
107
115
 
108
116
  /**
109
- * Additional CSS class for the root DOM node
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.
110
121
  */
111
- className: _propTypes.default.string,
122
+ pushable: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.number]),
112
123
 
113
124
  /**
114
- * Determine how many ranges to render, and multiple handles
115
- * will be rendered (number + 1).
125
+ * If true, the handles can't be moved.
116
126
  */
117
- count: _propTypes.default.number,
127
+ disabled: _propTypes.default.bool,
118
128
 
119
129
  /**
120
- * If true, the handles can't be moved.
130
+ * Determine how many ranges to render, and multiple handles
131
+ * will be rendered (number + 1).
121
132
  */
122
- disabled: _propTypes.default.bool,
133
+ count: _propTypes.default.number,
123
134
 
124
135
  /**
125
136
  * When the step value is greater than 1,
@@ -134,24 +145,6 @@ RangeSlider.propTypes = {
134
145
  */
135
146
  included: _propTypes.default.bool,
136
147
 
137
- /**
138
- * Minimum allowed value of the slider
139
- */
140
- min: _propTypes.default.number,
141
-
142
- /**
143
- * Maximum allowed value of the slider
144
- */
145
- max: _propTypes.default.number,
146
-
147
- /**
148
- * pushable could be set as true to allow pushing of
149
- * surrounding handles when moving an handle.
150
- * When set to a number, the number will be the
151
- * minimum ensured distance between handles.
152
- */
153
- pushable: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.number]),
154
-
155
148
  /**
156
149
  * Configuration for tooltips describing the current slider values
157
150
  */
@@ -172,9 +165,15 @@ RangeSlider.propTypes = {
172
165
  }),
173
166
 
174
167
  /**
175
- * Value by which increments or decrements are made
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.
176
175
  */
177
- step: _propTypes.default.number,
176
+ updatemode: _propTypes.default.oneOf(['mouseup', 'drag']),
178
177
 
179
178
  /**
180
179
  * If true, the slider will be vertical
@@ -187,15 +186,16 @@ RangeSlider.propTypes = {
187
186
  verticalHeight: _propTypes.default.number,
188
187
 
189
188
  /**
190
- * Determines when the component should update its `value`
191
- * property. If `mouseup` (the default) then the slider
192
- * will only trigger its value when the user has finished
193
- * dragging the slider. If `drag`, then the slider will
194
- * update its value continuously as it is being dragged.
195
- * Note that for the latter case, the `drag_value`
196
- * property could be used instead.
189
+ * Additional CSS class for the root DOM node
197
190
  */
198
- updatemode: _propTypes.default.oneOf(['mouseup', 'drag']),
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,
199
199
 
200
200
  /**
201
201
  * Dash-assigned callback that gets fired when the value or drag_value changes.
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; 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); }
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.defaultProps = exports.propTypes = exports.default = void 0;
8
+ exports.propTypes = exports.defaultProps = exports.default = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
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.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
28
+ 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 } }); Object.defineProperty(subClass, "prototype", { 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
 
@@ -70,11 +70,19 @@ var Slider = /*#__PURE__*/function (_Component) {
70
70
  exports.default = Slider;
71
71
  Slider.propTypes = {
72
72
  /**
73
- * The ID of this component, used to identify dash components
74
- * in callbacks. The ID needs to be unique across all of the
75
- * components in an app.
73
+ * Minimum allowed value of the slider
76
74
  */
77
- id: _propTypes.default.string,
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,
78
86
 
79
87
  /**
80
88
  * Marks on the slider.
@@ -99,11 +107,6 @@ Slider.propTypes = {
99
107
  */
100
108
  drag_value: _propTypes.default.number,
101
109
 
102
- /**
103
- * Additional CSS class for the root DOM node
104
- */
105
- className: _propTypes.default.string,
106
-
107
110
  /**
108
111
  * If true, the handles can't be moved.
109
112
  */
@@ -122,16 +125,6 @@ Slider.propTypes = {
122
125
  */
123
126
  included: _propTypes.default.bool,
124
127
 
125
- /**
126
- * Minimum allowed value of the slider
127
- */
128
- min: _propTypes.default.number,
129
-
130
- /**
131
- * Maximum allowed value of the slider
132
- */
133
- max: _propTypes.default.number,
134
-
135
128
  /**
136
129
  * Configuration for tooltips describing the current slider value
137
130
  */
@@ -152,9 +145,16 @@ Slider.propTypes = {
152
145
  }),
153
146
 
154
147
  /**
155
- * Value by which increments or decrements are made
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.
156
156
  */
157
- step: _propTypes.default.number,
157
+ updatemode: _propTypes.default.oneOf(['mouseup', 'drag']),
158
158
 
159
159
  /**
160
160
  * If true, the slider will be vertical
@@ -167,16 +167,16 @@ Slider.propTypes = {
167
167
  verticalHeight: _propTypes.default.number,
168
168
 
169
169
  /**
170
- * Determines when the component should update its `value`
171
- * property. If `mouseup` (the default) then the slider
172
- * will only trigger its value when the user has finished
173
- * dragging the slider. If `drag`, then the slider will
174
- * update its value continuously as it is being dragged.
175
- * If you want different actions during and after drag,
176
- * leave `updatemode` as `mouseup` and use `drag_value`
177
- * for the continuously updating value.
170
+ * Additional CSS class for the root DOM node
178
171
  */
179
- updatemode: _propTypes.default.oneOf(['mouseup', 'drag']),
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,
180
180
 
181
181
  /**
182
182
  * Dash-assigned callback that gets fired when the value or drag_value changes.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; 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); }
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
@@ -15,13 +15,13 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
18
- 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); }
18
+ 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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
19
19
 
20
20
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
21
21
 
22
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); }; }
23
23
 
24
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
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); }
25
25
 
26
26
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
27
27
 
@@ -33,7 +33,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
33
33
 
34
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); } }
35
35
 
36
- 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; }
37
37
 
38
38
  /**
39
39
  * Abstraction for the memory storage_type to work the same way as local/session
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; 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); }
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