dash-core-components 2.1.0 → 2.4.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 (61) hide show
  1. package/README.md +1 -1
  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 +5 -5
  24. package/lib/components/Checklist.react.js +1 -1
  25. package/lib/components/Clipboard.react.js +1 -1
  26. package/lib/components/ConfirmDialog.react.js +1 -1
  27. package/lib/components/ConfirmDialogProvider.react.js +1 -1
  28. package/lib/components/DatePickerRange.react.js +1 -1
  29. package/lib/components/DatePickerSingle.react.js +1 -1
  30. package/lib/components/Download.react.js +1 -1
  31. package/lib/components/Dropdown.react.js +1 -1
  32. package/lib/components/Graph.react.js +18 -4
  33. package/lib/components/Input.react.js +1 -1
  34. package/lib/components/Interval.react.js +1 -1
  35. package/lib/components/Link.react.js +1 -1
  36. package/lib/components/Loading.react.js +1 -1
  37. package/lib/components/Location.react.js +1 -1
  38. package/lib/components/LogoutButton.react.js +1 -1
  39. package/lib/components/Markdown.react.js +47 -5
  40. package/lib/components/RadioItems.react.js +1 -1
  41. package/lib/components/RangeSlider.react.js +1 -1
  42. package/lib/components/Slider.react.js +1 -1
  43. package/lib/components/Store.react.js +1 -1
  44. package/lib/components/Tabs.react.js +1 -1
  45. package/lib/components/Textarea.react.js +1 -1
  46. package/lib/components/Tooltip.react.js +7 -5
  47. package/lib/components/Upload.react.js +1 -1
  48. package/lib/fragments/DatePickerRange.react.js +21 -14
  49. package/lib/fragments/DatePickerSingle.react.js +39 -11
  50. package/lib/fragments/Dropdown.react.js +106 -115
  51. package/lib/fragments/Graph.react.js +121 -64
  52. package/lib/fragments/Markdown.react.js +21 -1
  53. package/lib/fragments/Math.react.js +101 -0
  54. package/lib/fragments/RangeSlider.react.js +1 -1
  55. package/lib/fragments/Slider.react.js +1 -1
  56. package/lib/fragments/Upload.react.js +1 -1
  57. package/lib/utils/LazyLoader/mathjax.js +22 -0
  58. package/lib/utils/LazyLoader/plotly.js +1 -1
  59. package/lib/utils/computeSliderStyle.js +2 -2
  60. package/lib/utils/mathjax.js +5 -0
  61. package/package.json +30 -28
@@ -27,7 +27,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
27
27
 
28
28
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
29
29
 
30
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
31
31
 
32
32
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
33
 
@@ -31,7 +31,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
31
31
 
32
32
  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
33
 
34
- 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); }
34
+ 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); }
35
35
 
36
36
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
37
37
 
@@ -19,7 +19,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
19
19
 
20
20
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
21
21
 
22
- 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); }
22
+ 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); }
23
23
 
24
24
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
25
25
 
@@ -25,7 +25,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
25
25
 
26
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"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); 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
 
@@ -27,7 +27,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
27
27
 
28
28
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
29
29
 
30
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
31
31
 
32
32
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
33
 
@@ -27,7 +27,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
27
27
 
28
28
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
29
29
 
30
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
31
31
 
32
32
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
33
 
@@ -23,7 +23,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
23
23
 
24
24
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
25
 
26
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
26
+ 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); }
27
27
 
28
28
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
29
 
@@ -25,7 +25,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
25
25
 
26
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"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); 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
 
@@ -17,6 +17,8 @@ var _graph = _interopRequireDefault(require("../utils/LazyLoader/graph"));
17
17
 
18
18
  var _plotly = _interopRequireDefault(require("../utils/LazyLoader/plotly"));
19
19
 
20
+ var _mathjax = _interopRequireDefault(require("../utils/LazyLoader/mathjax"));
21
+
20
22
  var _Graph = require("../fragments/Graph.privateprops");
21
23
 
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -51,7 +53,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
51
53
 
52
54
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
53
55
 
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); }
56
+ 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); }
55
57
 
56
58
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
57
59
 
@@ -84,6 +86,11 @@ var PlotlyGraph = /*#__PURE__*/function (_Component) {
84
86
  _classCallCheck(this, PlotlyGraph);
85
87
 
86
88
  _this = _super.call(this, props);
89
+
90
+ if (props.mathjax) {
91
+ PlotlyGraph._loadMathjax = true;
92
+ }
93
+
87
94
  _this.state = {
88
95
  prependData: [],
89
96
  extendData: []
@@ -178,9 +185,9 @@ var PlotlyGraph = /*#__PURE__*/function (_Component) {
178
185
  }(_react.Component);
179
186
 
180
187
  var RealPlotlyGraph = (0, _dashComponentPlugins.asyncDecorator)(PlotlyGraph, function () {
181
- return Promise.all([(0, _plotly.default)(), (0, _graph.default)()]).then(function (_ref2) {
182
- var _ref3 = _slicedToArray(_ref2, 2),
183
- graph = _ref3[1];
188
+ return Promise.all([(0, _graph.default)(), (0, _plotly.default)(), PlotlyGraph._loadMathjax ? (0, _mathjax.default)() : undefined]).then(function (_ref2) {
189
+ var _ref3 = _slicedToArray(_ref2, 1),
190
+ graph = _ref3[0];
184
191
 
185
192
  return graph;
186
193
  });
@@ -199,6 +206,7 @@ var ControlledPlotlyGraph = /*#__PURE__*/(0, _react.memo)(function (props) {
199
206
  className: extendedClassName
200
207
  })));
201
208
  });
209
+ ControlledPlotlyGraph.displayName = 'ControlledPlotlyGraph';
202
210
  PlotlyGraph.propTypes = _objectSpread(_objectSpread({}, _Graph.privatePropTypes), {}, {
203
211
  /**
204
212
  * The ID of this component, used to identify dash components
@@ -318,6 +326,11 @@ PlotlyGraph.propTypes = _objectSpread(_objectSpread({}, _Graph.privatePropTypes)
318
326
  */
319
327
  className: _propTypes.default.string,
320
328
 
329
+ /**
330
+ * If true, loads mathjax v3 (tex-svg) into the page and use it in the graph
331
+ */
332
+ mathjax: _propTypes.default.bool,
333
+
321
334
  /**
322
335
  * Beta: If true, animate between updates using
323
336
  * plotly.js's `animate` function
@@ -617,6 +630,7 @@ PlotlyGraph.defaultProps = _objectSpread(_objectSpread({}, _Graph.privateDefault
617
630
  frames: []
618
631
  },
619
632
  responsive: 'auto',
633
+ mathjax: false,
620
634
  animate: false,
621
635
  animation_options: {
622
636
  frame: {
@@ -31,7 +31,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
31
31
 
32
32
  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
33
 
34
- 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); }
34
+ 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); }
35
35
 
36
36
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
37
37
 
@@ -23,7 +23,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
23
23
 
24
24
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
25
 
26
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
26
+ 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); }
27
27
 
28
28
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
29
 
@@ -25,7 +25,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
25
25
 
26
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"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); 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
 
@@ -35,7 +35,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
35
35
 
36
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
- 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); }
38
+ 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); }
39
39
 
40
40
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
41
41
 
@@ -23,7 +23,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
23
23
 
24
24
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
25
 
26
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
26
+ 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); }
27
27
 
28
28
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
29
 
@@ -21,7 +21,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
21
21
 
22
22
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
23
23
 
24
- 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); }
24
+ 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); }
25
25
 
26
26
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
27
 
@@ -7,25 +7,41 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.propTypes = exports.defaultProps = exports.default = void 0;
9
9
 
10
+ var _dashComponentPlugins = require("@plotly/dash-component-plugins");
11
+
10
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
13
 
12
14
  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
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"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); 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
 
@@ -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
@@ -92,6 +120,11 @@ DashMarkdown.propTypes = {
92
120
  */
93
121
  dangerously_allow_html: _propTypes.default.bool,
94
122
 
123
+ /**
124
+ * A string for the target attribute to use on links (such as "_blank")
125
+ */
126
+ link_target: _propTypes.default.string,
127
+
95
128
  /**
96
129
  * A markdown string (or array of strings) that adhreres to the CommonMark spec
97
130
  */
@@ -141,10 +174,19 @@ DashMarkdown.propTypes = {
141
174
  style: _propTypes.default.object
142
175
  };
143
176
  DashMarkdown.defaultProps = {
177
+ mathjax: false,
144
178
  dangerously_allow_html: false,
145
179
  highlight_config: {},
146
180
  dedent: true
147
181
  };
182
+ var RealDashMarkdown = (0, _dashComponentPlugins.asyncDecorator)(DashMarkdown, function () {
183
+ return Promise.all([(0, _markdown.default)(), DashMarkdown._loadMathjax ? (0, _mathjax.default)() : undefined]).then(function (_ref) {
184
+ var _ref2 = _slicedToArray(_ref, 1),
185
+ md = _ref2[0];
186
+
187
+ return md;
188
+ });
189
+ });
148
190
  var propTypes = DashMarkdown.propTypes;
149
191
  exports.propTypes = propTypes;
150
192
  var defaultProps = DashMarkdown.defaultProps;
@@ -29,7 +29,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
29
29
 
30
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; }
31
31
 
32
- 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); }
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); }
33
33
 
34
34
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
35
35
 
@@ -25,7 +25,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
25
25
 
26
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"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); 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
 
@@ -25,7 +25,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
25
25
 
26
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"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); 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
 
@@ -15,7 +15,7 @@ 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"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); 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
 
@@ -27,7 +27,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
27
27
 
28
28
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
29
29
 
30
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
31
31
 
32
32
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
33
 
@@ -27,7 +27,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
27
27
 
28
28
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
29
29
 
30
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
31
31
 
32
32
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
33
 
@@ -7,6 +7,8 @@ exports.default = void 0;
7
7
 
8
8
  var _style = _interopRequireDefault(require("styled-jsx/style"));
9
9
 
10
+ var _react = _interopRequireDefault(require("react"));
11
+
10
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
13
 
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -24,18 +26,18 @@ var Tooltip = function Tooltip(props) {
24
26
  loading_state = props.loading_state;
25
27
  var is_loading = loading_state === null || loading_state === void 0 ? void 0 : loading_state.is_loading;
26
28
  var show = props.show && bbox;
27
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
29
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
28
30
  className: _style.default.dynamic([["1224640168", [(bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x1) - (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.y1) - (bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, show ? 'inline-block' : 'none', props.targetable ? 'auto' : 'none', border_color, background_color, props.zindex, props.zindex, border_color, background_color, border_color, background_color, border_color, background_color, border_color, background_color]]]) + " " + "dcc-tooltip-bounding-box"
29
- }, /*#__PURE__*/React.createElement("span", {
31
+ }, /*#__PURE__*/_react.default.createElement("span", {
30
32
  "data-dash-is-loading": is_loading || undefined,
31
33
  className: _style.default.dynamic([["1224640168", [(bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x1) - (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.y1) - (bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, show ? 'inline-block' : 'none', props.targetable ? 'auto' : 'none', border_color, background_color, props.zindex, props.zindex, border_color, background_color, border_color, background_color, border_color, background_color, border_color, background_color]]]) + " " + "hover hover-".concat(props.direction)
32
- }, /*#__PURE__*/React.createElement("span", {
34
+ }, /*#__PURE__*/_react.default.createElement("span", {
33
35
  id: id,
34
36
  style: props.style,
35
37
  className: _style.default.dynamic([["1224640168", [(bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x1) - (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.y1) - (bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, show ? 'inline-block' : 'none', props.targetable ? 'auto' : 'none', border_color, background_color, props.zindex, props.zindex, border_color, background_color, border_color, background_color, border_color, background_color, border_color, background_color]]]) + " " + "hover-content ".concat(props.className)
36
- }, is_loading ? /*#__PURE__*/React.createElement("span", {
38
+ }, is_loading ? /*#__PURE__*/_react.default.createElement("span", {
37
39
  className: _style.default.dynamic([["1224640168", [(bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x1) - (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.y1) - (bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, show ? 'inline-block' : 'none', props.targetable ? 'auto' : 'none', border_color, background_color, props.zindex, props.zindex, border_color, background_color, border_color, background_color, border_color, background_color, border_color, background_color]]])
38
- }, props.loading_text) : props.children))), /*#__PURE__*/React.createElement(_style.default, {
40
+ }, props.loading_text) : props.children))), /*#__PURE__*/_react.default.createElement(_style.default, {
39
41
  id: "1224640168",
40
42
  dynamic: [(bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x1) - (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.y1) - (bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, show ? 'inline-block' : 'none', props.targetable ? 'auto' : 'none', border_color, background_color, props.zindex, props.zindex, border_color, background_color, border_color, background_color, border_color, background_color, border_color, background_color]
41
43
  }, ".dcc-tooltip-bounding-box.__jsx-style-dynamic-selector{position:absolute;top:".concat((bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, "px;left:").concat((bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, "px;width:").concat((bbox === null || bbox === void 0 ? void 0 : bbox.x1) - (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, "px;height:").concat((bbox === null || bbox === void 0 ? void 0 : bbox.y1) - (bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, "px;display:").concat(show ? 'inline-block' : 'none', ";pointer-events:").concat(props.targetable ? 'auto' : 'none', ";}.hover.__jsx-style-dynamic-selector{position:absolute;}.hover-right.__jsx-style-dynamic-selector{-webkit-transform:translate(5px,0);-ms-transform:translate(5px,0);transform:translate(5px,0);top:50%;left:100%;}.hover-left.__jsx-style-dynamic-selector{-webkit-transform:translate(-5px,0);-ms-transform:translate(-5px,0);transform:translate(-5px,0);top:50%;}.hover-bottom.__jsx-style-dynamic-selector{-webkit-transform:translate(0,6px);-ms-transform:translate(0,6px);transform:translate(0,6px);top:100%;left:50%;}.hover-top.__jsx-style-dynamic-selector{-webkit-transform:translate(0,-5px);-ms-transform:translate(0,-5px);transform:translate(0,-5px);left:50%;}.hover-content.__jsx-style-dynamic-selector{position:absolute;border:1px solid ").concat(border_color, ";border-radius:2px;padding:5px 10px;background:").concat(background_color, ";white-space:nowrap;z-index:").concat(props.zindex, ";pointer-events:none;}.hover.__jsx-style-dynamic-selector .hover-content.__jsx-style-dynamic-selector,.hover-right.__jsx-style-dynamic-selector .hover-content.__jsx-style-dynamic-selector{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);}.hover-left.__jsx-style-dynamic-selector .hover-content.__jsx-style-dynamic-selector{-webkit-transform:translate(-100%,-50%);-ms-transform:translate(-100%,-50%);transform:translate(-100%,-50%);}.hover-top.__jsx-style-dynamic-selector .hover-content.__jsx-style-dynamic-selector{-webkit-transform:translate(-50%,-100%);-ms-transform:translate(-50%,-100%);transform:translate(-50%,-100%);}.hover-bottom.__jsx-style-dynamic-selector .hover-content.__jsx-style-dynamic-selector{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);}.hover.__jsx-style-dynamic-selector:before,.hover.__jsx-style-dynamic-selector:after{content:'';width:0;height:0;position:absolute;border-style:solid;top:-6px;z-index:").concat(props.zindex, ";}.hover.__jsx-style-dynamic-selector:before,.hover.__jsx-style-dynamic-selector:after,.hover-right.__jsx-style-dynamic-selector:before,.hover-right.__jsx-style-dynamic-selector:after{border-width:6px 6px 6px 0;}.hover-top.__jsx-style-dynamic-selector:before,.hover-top.__jsx-style-dynamic-selector:after{border-width:6px 6px 0 6px;}.hover-bottom.__jsx-style-dynamic-selector:before,.hover-bottom.__jsx-style-dynamic-selector:after{border-width:0 6px 6px 6px;}.hover-left.__jsx-style-dynamic-selector:before,.hover-left.__jsx-style-dynamic-selector:after{border-width:6px 0 6px 6px;}.hover.__jsx-style-dynamic-selector:before,.hover-right.__jsx-style-dynamic-selector:before{border-color:transparent ").concat(border_color, " transparent transparent;left:-5px;}.hover.__jsx-style-dynamic-selector:after,.hover-right.__jsx-style-dynamic-selector:after{border-color:transparent ").concat(background_color, " transparent transparent;left:-4px;}.hover-left.__jsx-style-dynamic-selector:before{border-color:transparent transparent transparent ").concat(border_color, ";left:-1px;}.hover-left.__jsx-style-dynamic-selector:after{border-color:transparent transparent transparent ").concat(background_color, ";left:-2px;}.hover-top.__jsx-style-dynamic-selector:before,.hover-top.__jsx-style-dynamic-selector:after,.hover-bottom.__jsx-style-dynamic-selector:before,.hover-bottom.__jsx-style-dynamic-selector:after{left:-6px;}.hover-bottom.__jsx-style-dynamic-selector:before{border-color:transparent transparent ").concat(border_color, " transparent;}.hover-bottom.__jsx-style-dynamic-selector:after{border-color:transparent transparent ").concat(background_color, " transparent;top:-5px;}.hover-top.__jsx-style-dynamic-selector:before{border-color:").concat(border_color, " transparent transparent transparent;top:-1px;}.hover-top.__jsx-style-dynamic-selector:after{border-color:").concat(background_color, " transparent transparent transparent;top:-2px;}")));
@@ -25,7 +25,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
25
25
 
26
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"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); 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
 
@@ -17,7 +17,7 @@ var _uniqid = _interopRequireDefault(require("uniqid"));
17
17
 
18
18
  var _DatePickerRange = require("../components/DatePickerRange.react");
19
19
 
20
- var _convertToMoment4 = _interopRequireDefault(require("../utils/convertToMoment"));
20
+ var _convertToMoment3 = _interopRequireDefault(require("../utils/convertToMoment"));
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
@@ -37,7 +37,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
37
37
 
38
38
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
39
39
 
40
- 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); }
40
+ 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); }
41
41
 
42
42
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
43
43
 
@@ -87,6 +87,18 @@ var DatePickerRange = /*#__PURE__*/function (_Component) {
87
87
  state.end_date = newProps.end_date;
88
88
  }
89
89
 
90
+ if (force || newProps.max_date_allowed !== this.props.max_date_allowed) {
91
+ state.max_date_allowed = (0, _convertToMoment3.default)(newProps, ['max_date_allowed']).max_date_allowed;
92
+ }
93
+
94
+ if (force || newProps.min_date_allowed !== this.props.min_date_allowed) {
95
+ state.min_date_allowed = (0, _convertToMoment3.default)(newProps, ['min_date_allowed']).min_date_allowed;
96
+ }
97
+
98
+ if (force || newProps.disabled_days !== this.props.disabled_days) {
99
+ state.disabled_days = (0, _convertToMoment3.default)(newProps, ['disabled_days']).disabled_days;
100
+ }
101
+
90
102
  if (Object.keys(state).length) {
91
103
  this.setState(state);
92
104
  }
@@ -110,7 +122,7 @@ var DatePickerRange = /*#__PURE__*/function (_Component) {
110
122
  setProps = _this$props.setProps,
111
123
  updatemode = _this$props.updatemode,
112
124
  clearable = _this$props.clearable;
113
- var oldMomentDates = (0, _convertToMoment4.default)(this.state, ['start_date', 'end_date']);
125
+ var oldMomentDates = (0, _convertToMoment3.default)(this.state, ['start_date', 'end_date']);
114
126
 
115
127
  if (start_date && !start_date.isSame(oldMomentDates.start_date)) {
116
128
  if (updatemode === 'singledate') {
@@ -147,12 +159,7 @@ var DatePickerRange = /*#__PURE__*/function (_Component) {
147
159
  }, {
148
160
  key: "isOutsideRange",
149
161
  value: function isOutsideRange(date) {
150
- var _convertToMoment = (0, _convertToMoment4.default)(this.props, ['max_date_allowed', 'min_date_allowed', 'disabled_days']),
151
- max_date_allowed = _convertToMoment.max_date_allowed,
152
- min_date_allowed = _convertToMoment.min_date_allowed,
153
- disabled_days = _convertToMoment.disabled_days;
154
-
155
- return min_date_allowed && date.isBefore(min_date_allowed) || max_date_allowed && date.isAfter(max_date_allowed) || disabled_days && disabled_days.some(function (d) {
162
+ return this.state.min_date_allowed && date.isBefore(this.state.min_date_allowed) || this.state.max_date_allowed && date.isAfter(this.state.max_date_allowed) || this.state.disabled_days && this.state.disabled_days.some(function (d) {
156
163
  return date.isSame(d, 'day');
157
164
  });
158
165
  }
@@ -187,12 +194,12 @@ var DatePickerRange = /*#__PURE__*/function (_Component) {
187
194
  start_date_id = _this$props2.start_date_id,
188
195
  end_date_id = _this$props2.end_date_id;
189
196
 
190
- var _convertToMoment2 = (0, _convertToMoment4.default)(this.props, ['initial_visible_month']),
191
- initial_visible_month = _convertToMoment2.initial_visible_month;
197
+ var _convertToMoment = (0, _convertToMoment3.default)(this.props, ['initial_visible_month']),
198
+ initial_visible_month = _convertToMoment.initial_visible_month;
192
199
 
193
- var _convertToMoment3 = (0, _convertToMoment4.default)(this.state, ['start_date', 'end_date']),
194
- start_date = _convertToMoment3.start_date,
195
- end_date = _convertToMoment3.end_date;
200
+ var _convertToMoment2 = (0, _convertToMoment3.default)(this.state, ['start_date', 'end_date']),
201
+ start_date = _convertToMoment2.start_date,
202
+ end_date = _convertToMoment2.end_date;
196
203
 
197
204
  var verticalFlag = calendar_orientation !== 'vertical';
198
205