dash-core-components 2.6.2 → 2.7.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 (83) hide show
  1. package/dash_core_components/async-datepicker.js +1 -1
  2. package/dash_core_components/async-datepicker.js.map +1 -1
  3. package/dash_core_components/async-dropdown.js +1 -1
  4. package/dash_core_components/async-dropdown.js.map +1 -1
  5. package/dash_core_components/async-graph.js +1 -1
  6. package/dash_core_components/async-graph.js.map +1 -1
  7. package/dash_core_components/async-highlight.js +1 -1
  8. package/dash_core_components/async-highlight.js.map +1 -1
  9. package/dash_core_components/async-markdown.js +1 -1
  10. package/dash_core_components/async-markdown.js.map +1 -1
  11. package/dash_core_components/async-mathjax.js +1 -1
  12. package/dash_core_components/async-plotlyjs.js +1 -1
  13. package/dash_core_components/async-slider.js +2 -1
  14. package/dash_core_components/async-slider.js.map +1 -1
  15. package/dash_core_components/async-upload.js +1 -1
  16. package/dash_core_components/async-upload.js.map +1 -1
  17. package/dash_core_components/dash_core_components-shared.js +1 -1
  18. package/dash_core_components/dash_core_components-shared.js.map +1 -1
  19. package/dash_core_components/dash_core_components.js +1 -1
  20. package/dash_core_components/dash_core_components.js.map +1 -1
  21. package/dash_core_components/plotly.min.js +7 -7
  22. package/lib/components/Checklist.react.js +14 -61
  23. package/lib/components/Clipboard.react.js +12 -82
  24. package/lib/components/ConfirmDialog.react.js +5 -35
  25. package/lib/components/ConfirmDialogProvider.react.js +7 -45
  26. package/lib/components/DatePickerRange.react.js +3 -64
  27. package/lib/components/DatePickerSingle.react.js +3 -58
  28. package/lib/components/Download.react.js +8 -41
  29. package/lib/components/Dropdown.react.js +3 -51
  30. package/lib/components/Graph.react.js +17 -121
  31. package/lib/components/Input.react.js +9 -80
  32. package/lib/components/Interval.react.js +10 -42
  33. package/lib/components/Link.react.js +18 -62
  34. package/lib/components/Loading.react.js +12 -59
  35. package/lib/components/Location.react.js +18 -56
  36. package/lib/components/LogoutButton.react.js +8 -42
  37. package/lib/components/Markdown.react.js +3 -52
  38. package/lib/components/RadioItems.react.js +15 -63
  39. package/lib/components/RangeSlider.react.js +3 -53
  40. package/lib/components/Slider.react.js +3 -50
  41. package/lib/components/Store.react.js +17 -69
  42. package/lib/components/Tab.react.js +1 -23
  43. package/lib/components/Tabs.react.js +26 -92
  44. package/lib/components/Textarea.react.js +9 -70
  45. package/lib/components/Tooltip.react.js +4 -25
  46. package/lib/components/Upload.react.js +3 -50
  47. package/lib/fragments/DatePickerRange.react.js +36 -83
  48. package/lib/fragments/DatePickerSingle.react.js +27 -67
  49. package/lib/fragments/Dropdown.react.js +50 -86
  50. package/lib/fragments/Graph.privateprops.js +0 -3
  51. package/lib/fragments/Graph.react.js +51 -153
  52. package/lib/fragments/Loading/spinners/CircleSpinner.js +5 -14
  53. package/lib/fragments/Loading/spinners/CubeSpinner.js +5 -16
  54. package/lib/fragments/Loading/spinners/DefaultSpinner.js +5 -14
  55. package/lib/fragments/Loading/spinners/DotSpinner.js +5 -14
  56. package/lib/fragments/Loading/spinners/GraphSpinner.js +4 -13
  57. package/lib/fragments/Markdown.react.js +13 -60
  58. package/lib/fragments/Math.react.js +2 -28
  59. package/lib/fragments/RangeSlider.react.js +20 -60
  60. package/lib/fragments/Slider.react.js +20 -60
  61. package/lib/fragments/Upload.react.js +23 -52
  62. package/lib/index.js +0 -28
  63. package/lib/third-party/highlight.js +0 -40
  64. package/lib/utils/DatePickerPersistence.js +0 -5
  65. package/lib/utils/LazyLoader/datePickerRange.js +1 -5
  66. package/lib/utils/LazyLoader/datePickerSingle.js +1 -5
  67. package/lib/utils/LazyLoader/dropdown.js +1 -5
  68. package/lib/utils/LazyLoader/graph.js +1 -5
  69. package/lib/utils/LazyLoader/hljs.js +1 -5
  70. package/lib/utils/LazyLoader/markdown.js +1 -5
  71. package/lib/utils/LazyLoader/mathjax.js +1 -5
  72. package/lib/utils/LazyLoader/plotly.js +1 -5
  73. package/lib/utils/LazyLoader/rangeSlider.js +1 -5
  74. package/lib/utils/LazyLoader/slider.js +1 -5
  75. package/lib/utils/LazyLoader/upload.js +1 -5
  76. package/lib/utils/MarkdownHighlighter.js +0 -6
  77. package/lib/utils/computeSliderMarkers.js +17 -68
  78. package/lib/utils/computeSliderStyle.js +0 -6
  79. package/lib/utils/convertToMoment.js +0 -8
  80. package/lib/utils/mathjax.js +0 -1
  81. package/lib/utils/optionTypes.js +3 -18
  82. package/package.json +17 -17
  83. package/lib/components/css/react-virtualized-select@3.1.0.css +0 -22
@@ -1,38 +1,22 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.default = void 0;
9
-
10
7
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
8
  var _react = require("react");
13
-
14
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
10
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
17
-
18
11
  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); } }
19
-
20
12
  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
-
22
13
  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
-
24
14
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
25
-
26
15
  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); }; }
27
-
28
- 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); }
29
-
16
+ 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); }
30
17
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
31
-
32
18
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
33
-
34
19
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
35
-
36
20
  /**
37
21
  * ConfirmDialog is used to display the browser's native "confirm" modal,
38
22
  * with an optional message and two buttons ("OK" and "Cancel").
@@ -41,15 +25,11 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
41
25
  */
42
26
  var ConfirmDialog = /*#__PURE__*/function (_Component) {
43
27
  _inherits(ConfirmDialog, _Component);
44
-
45
28
  var _super = _createSuper(ConfirmDialog);
46
-
47
29
  function ConfirmDialog() {
48
30
  _classCallCheck(this, ConfirmDialog);
49
-
50
31
  return _super.apply(this, arguments);
51
32
  }
52
-
53
33
  _createClass(ConfirmDialog, [{
54
34
  key: "componentDidUpdate",
55
35
  value: function componentDidUpdate(prevProps) {
@@ -64,11 +44,10 @@ var ConfirmDialog = /*#__PURE__*/function (_Component) {
64
44
  key: "_update",
65
45
  value: function _update(shouldTriggerDisplay) {
66
46
  var _this$props = this.props,
67
- message = _this$props.message,
68
- setProps = _this$props.setProps,
69
- cancel_n_clicks = _this$props.cancel_n_clicks,
70
- submit_n_clicks = _this$props.submit_n_clicks;
71
-
47
+ message = _this$props.message,
48
+ setProps = _this$props.setProps,
49
+ cancel_n_clicks = _this$props.cancel_n_clicks,
50
+ submit_n_clicks = _this$props.submit_n_clicks;
72
51
  if (shouldTriggerDisplay) {
73
52
  new Promise(function (resolve) {
74
53
  return resolve(window.confirm(message));
@@ -95,10 +74,8 @@ var ConfirmDialog = /*#__PURE__*/function (_Component) {
95
74
  return null;
96
75
  }
97
76
  }]);
98
-
99
77
  return ConfirmDialog;
100
78
  }(_react.Component);
101
-
102
79
  exports.default = ConfirmDialog;
103
80
  ConfirmDialog.defaultProps = {
104
81
  submit_n_clicks: 0,
@@ -113,37 +90,30 @@ ConfirmDialog.propTypes = {
113
90
  * components in an app.
114
91
  */
115
92
  id: _propTypes.default.string,
116
-
117
93
  /**
118
94
  * Message to show in the popup.
119
95
  */
120
96
  message: _propTypes.default.string,
121
-
122
97
  /**
123
98
  * Number of times the submit button was clicked
124
99
  */
125
100
  submit_n_clicks: _propTypes.default.number,
126
-
127
101
  /**
128
102
  * Last time the submit button was clicked.
129
103
  */
130
104
  submit_n_clicks_timestamp: _propTypes.default.number,
131
-
132
105
  /**
133
106
  * Number of times the popup was canceled.
134
107
  */
135
108
  cancel_n_clicks: _propTypes.default.number,
136
-
137
109
  /**
138
110
  * Last time the cancel button was clicked.
139
111
  */
140
112
  cancel_n_clicks_timestamp: _propTypes.default.number,
141
-
142
113
  /**
143
114
  * Set to true to send the ConfirmDialog.
144
115
  */
145
116
  displayed: _propTypes.default.bool,
146
-
147
117
  /**
148
118
  * Dash-assigned callback that gets fired when the value changes.
149
119
  */
@@ -1,44 +1,25 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.default = void 0;
9
-
10
7
  var _ramda = require("ramda");
11
-
12
8
  var _react = _interopRequireDefault(require("react"));
13
-
14
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
15
-
16
10
  var _ConfirmDialog = _interopRequireDefault(require("./ConfirmDialog.react"));
17
-
18
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
12
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
-
22
13
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23
-
24
14
  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
-
26
15
  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
-
28
16
  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
-
30
17
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
-
32
18
  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
-
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
-
19
+ 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); }
36
20
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
37
-
38
21
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
39
-
40
22
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
41
-
42
23
  /**
43
24
  * A wrapper component that will display a confirmation dialog
44
25
  * when its child component has been clicked on.
@@ -53,37 +34,31 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
53
34
  */
54
35
  var ConfirmDialogProvider = /*#__PURE__*/function (_React$Component) {
55
36
  _inherits(ConfirmDialogProvider, _React$Component);
56
-
57
37
  var _super = _createSuper(ConfirmDialogProvider);
58
-
59
38
  function ConfirmDialogProvider() {
60
39
  _classCallCheck(this, ConfirmDialogProvider);
61
-
62
40
  return _super.apply(this, arguments);
63
41
  }
64
-
65
42
  _createClass(ConfirmDialogProvider, [{
66
43
  key: "render",
67
44
  value: function render() {
68
45
  var _this$props = this.props,
69
- displayed = _this$props.displayed,
70
- id = _this$props.id,
71
- setProps = _this$props.setProps,
72
- children = _this$props.children,
73
- loading_state = _this$props.loading_state; // Will lose the previous onClick of the child
46
+ displayed = _this$props.displayed,
47
+ id = _this$props.id,
48
+ setProps = _this$props.setProps,
49
+ children = _this$props.children,
50
+ loading_state = _this$props.loading_state;
74
51
 
52
+ // Will lose the previous onClick of the child
75
53
  var wrapClick = function wrapClick(child) {
76
54
  var props = (0, _ramda.clone)(child.props);
77
-
78
55
  props._dashprivate_layout.props.onClick = function () {
79
56
  setProps({
80
57
  displayed: true
81
58
  });
82
59
  };
83
-
84
60
  return /*#__PURE__*/_react.default.cloneElement(child, props);
85
61
  };
86
-
87
62
  return /*#__PURE__*/_react.default.createElement("div", {
88
63
  id: id,
89
64
  "data-dash-is-loading": loading_state && loading_state.is_loading || undefined
@@ -92,10 +67,8 @@ var ConfirmDialogProvider = /*#__PURE__*/function (_React$Component) {
92
67
  })));
93
68
  }
94
69
  }]);
95
-
96
70
  return ConfirmDialogProvider;
97
71
  }(_react.default.Component);
98
-
99
72
  exports.default = ConfirmDialogProvider;
100
73
  ConfirmDialogProvider.defaultProps = {
101
74
  submit_n_clicks: 0,
@@ -110,47 +83,38 @@ ConfirmDialogProvider.propTypes = {
110
83
  * components in an app.
111
84
  */
112
85
  id: _propTypes.default.string,
113
-
114
86
  /**
115
87
  * Message to show in the popup.
116
88
  */
117
89
  message: _propTypes.default.string,
118
-
119
90
  /**
120
91
  * Number of times the submit was clicked
121
92
  */
122
93
  submit_n_clicks: _propTypes.default.number,
123
-
124
94
  /**
125
95
  * Last time the submit button was clicked.
126
96
  */
127
97
  submit_n_clicks_timestamp: _propTypes.default.number,
128
-
129
98
  /**
130
99
  * Number of times the popup was canceled.
131
100
  */
132
101
  cancel_n_clicks: _propTypes.default.number,
133
-
134
102
  /**
135
103
  * Last time the cancel button was clicked.
136
104
  */
137
105
  cancel_n_clicks_timestamp: _propTypes.default.number,
138
-
139
106
  /**
140
107
  * Is the modal currently displayed.
141
108
  */
142
109
  displayed: _propTypes.default.bool,
143
-
144
110
  /**
145
111
  * Dash-assigned callback that gets fired when the value changes.
146
112
  */
147
113
  setProps: _propTypes.default.func,
148
-
149
114
  /**
150
115
  * The children to hijack clicks from and display the popup.
151
116
  */
152
117
  children: _propTypes.default.any,
153
-
154
118
  /**
155
119
  * Object that holds the loading state object coming from dash-renderer
156
120
  */
@@ -159,12 +123,10 @@ ConfirmDialogProvider.propTypes = {
159
123
  * Determines if the component is loading or not
160
124
  */
161
125
  is_loading: _propTypes.default.bool,
162
-
163
126
  /**
164
127
  * Holds which property is loading
165
128
  */
166
129
  prop_name: _propTypes.default.string,
167
-
168
130
  /**
169
131
  * Holds the name of the component that is loading
170
132
  */
@@ -1,47 +1,28 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.propTypes = exports.defaultProps = exports.default = void 0;
9
-
10
7
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
8
  var _react = _interopRequireWildcard(require("react"));
13
-
14
9
  var _datePickerRange = _interopRequireDefault(require("../utils/LazyLoader/datePickerRange"));
15
-
16
10
  var _DatePickerPersistence = _interopRequireDefault(require("../utils/DatePickerPersistence"));
17
-
18
11
  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); }
19
-
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; }
21
-
12
+ 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; }
22
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
-
24
14
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
25
-
26
15
  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
-
28
16
  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
-
30
17
  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
-
32
18
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
-
34
19
  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
-
36
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
37
-
20
+ 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); }
38
21
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
39
-
40
22
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
41
-
42
23
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
43
-
44
24
  var RealDatePickerRange = /*#__PURE__*/(0, _react.lazy)(_datePickerRange.default);
25
+
45
26
  /**
46
27
  * DatePickerRange is a tailor made component designed for selecting
47
28
  * timespan across multiple days off of a calendar.
@@ -53,18 +34,13 @@ var RealDatePickerRange = /*#__PURE__*/(0, _react.lazy)(_datePickerRange.default
53
34
  * This component is based off of Airbnb's react-dates react component
54
35
  * which can be found here: https://github.com/airbnb/react-dates
55
36
  */
56
-
57
37
  var DatePickerRange = /*#__PURE__*/function (_Component) {
58
38
  _inherits(DatePickerRange, _Component);
59
-
60
39
  var _super = _createSuper(DatePickerRange);
61
-
62
40
  function DatePickerRange() {
63
41
  _classCallCheck(this, DatePickerRange);
64
-
65
42
  return _super.apply(this, arguments);
66
43
  }
67
-
68
44
  _createClass(DatePickerRange, [{
69
45
  key: "render",
70
46
  value: function render() {
@@ -73,10 +49,8 @@ var DatePickerRange = /*#__PURE__*/function (_Component) {
73
49
  }, /*#__PURE__*/_react.default.createElement(RealDatePickerRange, this.props));
74
50
  }
75
51
  }]);
76
-
77
52
  return DatePickerRange;
78
53
  }(_react.Component);
79
-
80
54
  exports.default = DatePickerRange;
81
55
  DatePickerRange.propTypes = {
82
56
  /**
@@ -85,41 +59,35 @@ DatePickerRange.propTypes = {
85
59
  * in the format 'YYYY-MM-DD'
86
60
  */
87
61
  start_date: _propTypes.default.string,
88
-
89
62
  /**
90
63
  * Specifies the ending date for the component.
91
64
  * Accepts datetime.datetime objects or strings
92
65
  * in the format 'YYYY-MM-DD'
93
66
  */
94
67
  end_date: _propTypes.default.string,
95
-
96
68
  /**
97
69
  * Specifies the lowest selectable date for the component.
98
70
  * Accepts datetime.datetime objects or strings
99
71
  * in the format 'YYYY-MM-DD'
100
72
  */
101
73
  min_date_allowed: _propTypes.default.string,
102
-
103
74
  /**
104
75
  * Specifies the highest selectable date for the component.
105
76
  * Accepts datetime.datetime objects or strings
106
77
  * in the format 'YYYY-MM-DD'
107
78
  */
108
79
  max_date_allowed: _propTypes.default.string,
109
-
110
80
  /**
111
81
  * Specifies additional days between min_date_allowed and max_date_allowed
112
82
  * that should be disabled. Accepted datetime.datetime objects or strings
113
83
  * in the format 'YYYY-MM-DD'
114
84
  */
115
85
  disabled_days: _propTypes.default.arrayOf(_propTypes.default.string),
116
-
117
86
  /**
118
87
  * Specifies a minimum number of nights that must be selected between
119
88
  * the startDate and the endDate
120
89
  */
121
90
  minimum_nights: _propTypes.default.number,
122
-
123
91
  /**
124
92
  * Determines when the component should update
125
93
  * its value. If `bothdates`, then the DatePicker
@@ -129,19 +97,16 @@ DatePickerRange.propTypes = {
129
97
  * as one date is picked.
130
98
  */
131
99
  updatemode: _propTypes.default.oneOf(['singledate', 'bothdates']),
132
-
133
100
  /**
134
101
  * Text that will be displayed in the first input
135
102
  * box of the date picker when no date is selected. Default value is 'Start Date'
136
103
  */
137
104
  start_date_placeholder_text: _propTypes.default.string,
138
-
139
105
  /**
140
106
  * Text that will be displayed in the second input
141
107
  * box of the date picker when no date is selected. Default value is 'End Date'
142
108
  */
143
109
  end_date_placeholder_text: _propTypes.default.string,
144
-
145
110
  /**
146
111
  * Specifies the month that is initially presented when the user
147
112
  * opens the calendar. Accepts datetime.datetime objects or strings
@@ -149,19 +114,16 @@ DatePickerRange.propTypes = {
149
114
  *
150
115
  */
151
116
  initial_visible_month: _propTypes.default.string,
152
-
153
117
  /**
154
118
  * Whether or not the dropdown is "clearable", that is, whether or
155
119
  * not a small "x" appears on the right of the dropdown that removes
156
120
  * the selected value.
157
121
  */
158
122
  clearable: _propTypes.default.bool,
159
-
160
123
  /**
161
124
  * If True, the calendar will automatically open when cleared
162
125
  */
163
126
  reopen_calendar_on_clear: _propTypes.default.bool,
164
-
165
127
  /**
166
128
  * Specifies the format that the selected dates will be displayed
167
129
  * valid formats are variations of "MM YY DD". For example:
@@ -171,7 +133,6 @@ DatePickerRange.propTypes = {
171
133
  * "MMMM" renders as 'May' for May 10 1997
172
134
  */
173
135
  display_format: _propTypes.default.string,
174
-
175
136
  /**
176
137
  * Specifies the format that the month will be displayed in the calendar,
177
138
  * valid formats are variations of "MM YY". For example:
@@ -180,100 +141,83 @@ DatePickerRange.propTypes = {
180
141
  * "MMM, YY" renders as 'Sep, 97' for September 1997
181
142
  */
182
143
  month_format: _propTypes.default.string,
183
-
184
144
  /**
185
145
  * Specifies what day is the first day of the week, values must be
186
146
  * from [0, ..., 6] with 0 denoting Sunday and 6 denoting Saturday
187
147
  */
188
148
  first_day_of_week: _propTypes.default.oneOf([0, 1, 2, 3, 4, 5, 6]),
189
-
190
149
  /**
191
150
  * If True the calendar will display days that rollover into
192
151
  * the next month
193
152
  */
194
153
  show_outside_days: _propTypes.default.bool,
195
-
196
154
  /**
197
155
  * If True the calendar will not close when the user has selected a value
198
156
  * and will wait until the user clicks off the calendar
199
157
  */
200
158
  stay_open_on_select: _propTypes.default.bool,
201
-
202
159
  /**
203
160
  * Orientation of calendar, either vertical or horizontal.
204
161
  * Valid options are 'vertical' or 'horizontal'.
205
162
  */
206
163
  calendar_orientation: _propTypes.default.oneOf(['vertical', 'horizontal']),
207
-
208
164
  /**
209
165
  * Number of calendar months that are shown when calendar is opened
210
166
  */
211
167
  number_of_months_shown: _propTypes.default.number,
212
-
213
168
  /**
214
169
  * If True, calendar will open in a screen overlay portal,
215
170
  * not supported on vertical calendar
216
171
  */
217
172
  with_portal: _propTypes.default.bool,
218
-
219
173
  /**
220
174
  * If True, calendar will open in a full screen overlay portal, will
221
175
  * take precedent over 'withPortal' if both are set to true,
222
176
  * not supported on vertical calendar
223
177
  */
224
178
  with_full_screen_portal: _propTypes.default.bool,
225
-
226
179
  /**
227
180
  * Size of rendered calendar days, higher number
228
181
  * means bigger day size and larger calendar overall
229
182
  */
230
183
  day_size: _propTypes.default.number,
231
-
232
184
  /**
233
185
  * Determines whether the calendar and days operate
234
186
  * from left to right or from right to left
235
187
  */
236
188
  is_RTL: _propTypes.default.bool,
237
-
238
189
  /**
239
190
  * If True, no dates can be selected.
240
191
  */
241
192
  disabled: _propTypes.default.bool,
242
-
243
193
  /**
244
194
  * The HTML element ID of the start date input field.
245
195
  * Not used by Dash, only by CSS.
246
196
  */
247
197
  start_date_id: _propTypes.default.string,
248
-
249
198
  /**
250
199
  * The HTML element ID of the end date input field.
251
200
  * Not used by Dash, only by CSS.
252
201
  */
253
202
  end_date_id: _propTypes.default.string,
254
-
255
203
  /**
256
204
  * CSS styles appended to wrapper div
257
205
  */
258
206
  style: _propTypes.default.object,
259
-
260
207
  /**
261
208
  * Appends a CSS class to the wrapper div component.
262
209
  */
263
210
  className: _propTypes.default.string,
264
-
265
211
  /**
266
212
  * The ID of this component, used to identify dash components
267
213
  * in callbacks. The ID needs to be unique across all of the
268
214
  * components in an app.
269
215
  */
270
216
  id: _propTypes.default.string,
271
-
272
217
  /**
273
218
  * Dash-assigned callback that gets fired when the value changes.
274
219
  */
275
220
  setProps: _propTypes.default.func,
276
-
277
221
  /**
278
222
  * Object that holds the loading state object coming from dash-renderer
279
223
  */
@@ -282,18 +226,15 @@ DatePickerRange.propTypes = {
282
226
  * Determines if the component is loading or not
283
227
  */
284
228
  is_loading: _propTypes.default.bool,
285
-
286
229
  /**
287
230
  * Holds which property is loading
288
231
  */
289
232
  prop_name: _propTypes.default.string,
290
-
291
233
  /**
292
234
  * Holds the name of the component that is loading
293
235
  */
294
236
  component_name: _propTypes.default.string
295
237
  }),
296
-
297
238
  /**
298
239
  * Used to allow user interactions in this component to be persisted when
299
240
  * the component - or the page - is refreshed. If `persisted` is truthy and
@@ -303,13 +244,11 @@ DatePickerRange.propTypes = {
303
244
  * Used in conjunction with `persistence_type` and `persisted_props`.
304
245
  */
305
246
  persistence: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.string, _propTypes.default.number]),
306
-
307
247
  /**
308
248
  * Properties whose user interactions will persist after refreshing the
309
249
  * component or the page.
310
250
  */
311
251
  persisted_props: _propTypes.default.arrayOf(_propTypes.default.oneOf(['start_date', 'end_date'])),
312
-
313
252
  /**
314
253
  * Where persisted user changes will be stored:
315
254
  * memory: only kept in memory, reset on page refresh.