dash-core-components 1.15.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/README.md +8 -44
  2. package/dash_core_components/async-datepicker.js +1 -1
  3. package/dash_core_components/async-datepicker.js.map +1 -1
  4. package/dash_core_components/async-dropdown.js +2 -2
  5. package/dash_core_components/async-dropdown.js.map +1 -1
  6. package/dash_core_components/async-graph.js +1 -1
  7. package/dash_core_components/async-graph.js.map +1 -1
  8. package/dash_core_components/async-highlight.js +1 -1
  9. package/dash_core_components/async-highlight.js.map +1 -1
  10. package/dash_core_components/async-markdown.js +2 -2
  11. package/dash_core_components/async-markdown.js.map +1 -1
  12. package/dash_core_components/async-plotlyjs.js +2 -2
  13. package/dash_core_components/async-slider.js +1 -2
  14. package/dash_core_components/async-slider.js.map +1 -1
  15. package/dash_core_components/async-upload.js +1 -1
  16. package/dash_core_components/async-upload.js.map +1 -1
  17. package/dash_core_components/dash_core_components-shared.js +2 -2
  18. package/dash_core_components/dash_core_components-shared.js.map +1 -1
  19. package/dash_core_components/dash_core_components.js +3 -0
  20. package/dash_core_components/dash_core_components.js.map +1 -0
  21. package/dash_core_components/plotly.min.js +30 -26
  22. package/lib/components/Checklist.react.js +77 -35
  23. package/lib/components/Clipboard.react.js +354 -0
  24. package/lib/components/ConfirmDialog.react.js +16 -12
  25. package/lib/components/ConfirmDialogProvider.react.js +19 -15
  26. package/lib/components/DatePickerRange.react.js +111 -97
  27. package/lib/components/DatePickerSingle.react.js +95 -81
  28. package/lib/components/Download.react.js +138 -0
  29. package/lib/components/Dropdown.react.js +69 -47
  30. package/lib/components/Graph.react.js +36 -24
  31. package/lib/components/Input.react.js +98 -92
  32. package/lib/components/Interval.react.js +18 -12
  33. package/lib/components/Link.react.js +36 -30
  34. package/lib/components/Loading.react.js +21 -15
  35. package/lib/components/Location.react.js +15 -13
  36. package/lib/components/LogoutButton.react.js +18 -14
  37. package/lib/components/Markdown.react.js +23 -17
  38. package/lib/components/RadioItems.react.js +77 -35
  39. package/lib/components/RangeSlider.react.js +61 -55
  40. package/lib/components/Slider.react.js +52 -46
  41. package/lib/components/Store.react.js +16 -16
  42. package/lib/components/Tab.react.js +6 -2
  43. package/lib/components/Tabs.react.js +32 -23
  44. package/lib/components/Textarea.react.js +19 -13
  45. package/lib/components/Tooltip.react.js +152 -0
  46. package/lib/components/Upload.react.js +25 -19
  47. package/lib/components/css/Dropdown.css +1 -1
  48. package/lib/fragments/DatePickerRange.react.js +63 -51
  49. package/lib/fragments/DatePickerSingle.react.js +28 -17
  50. package/lib/fragments/Dropdown.react.js +33 -22
  51. package/lib/fragments/Graph.privateprops.js +1 -1
  52. package/lib/fragments/Graph.react.js +44 -28
  53. package/lib/fragments/Loading/spinners/CircleSpinner.js +16 -16
  54. package/lib/fragments/Loading/spinners/CubeSpinner.js +11 -11
  55. package/lib/fragments/Loading/spinners/DefaultSpinner.js +9 -9
  56. package/lib/fragments/Loading/spinners/DotSpinner.js +7 -7
  57. package/lib/fragments/Loading/spinners/GraphSpinner.js +18 -18
  58. package/lib/fragments/Markdown.react.js +35 -32
  59. package/lib/fragments/RangeSlider.react.js +57 -22
  60. package/lib/fragments/Slider.react.js +40 -21
  61. package/lib/fragments/Upload.react.js +19 -13
  62. package/lib/index.js +77 -53
  63. package/lib/third-party/highlight.js +12 -0
  64. package/lib/utils/LazyLoader/datePickerRange.js +9 -3
  65. package/lib/utils/LazyLoader/datePickerSingle.js +9 -3
  66. package/lib/utils/LazyLoader/dropdown.js +9 -3
  67. package/lib/utils/LazyLoader/graph.js +9 -3
  68. package/lib/utils/LazyLoader/hljs.js +9 -3
  69. package/lib/utils/LazyLoader/markdown.js +9 -3
  70. package/lib/utils/LazyLoader/plotly.js +9 -3
  71. package/lib/utils/LazyLoader/rangeSlider.js +9 -3
  72. package/lib/utils/LazyLoader/slider.js +9 -3
  73. package/lib/utils/LazyLoader/upload.js +9 -3
  74. package/lib/utils/computeSliderMarkers.js +230 -0
  75. package/lib/utils/convertToMoment.js +4 -0
  76. package/lib/utils/optionTypes.js +52 -0
  77. package/package.json +68 -75
  78. package/CHANGELOG.md +0 -1034
  79. package/dash_core_components/dash_core_components.min.js +0 -2
  80. package/dash_core_components/dash_core_components.min.js.map +0 -1
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -15,25 +17,27 @@ var _ConfirmDialog = _interopRequireDefault(require("./ConfirmDialog.react"));
15
17
 
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
19
 
18
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
19
-
20
20
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
21
 
22
22
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23
23
 
24
24
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
25
25
 
26
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
26
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
27
27
 
28
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
28
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
29
29
 
30
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
30
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
31
 
32
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
32
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
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"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
34
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
35
35
 
36
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
36
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
37
+
38
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
39
+
40
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
37
41
 
38
42
  /**
39
43
  * A wrapper component that will display a confirmation dialog
@@ -47,15 +51,15 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
47
51
  * id='confirm')
48
52
  * ```
49
53
  */
50
- var ConfirmDialogProvider =
51
- /*#__PURE__*/
52
- function (_React$Component) {
54
+ var ConfirmDialogProvider = /*#__PURE__*/function (_React$Component) {
53
55
  _inherits(ConfirmDialogProvider, _React$Component);
54
56
 
57
+ var _super = _createSuper(ConfirmDialogProvider);
58
+
55
59
  function ConfirmDialogProvider() {
56
60
  _classCallCheck(this, ConfirmDialogProvider);
57
61
 
58
- return _possibleConstructorReturn(this, _getPrototypeOf(ConfirmDialogProvider).apply(this, arguments));
62
+ return _super.apply(this, arguments);
59
63
  }
60
64
 
61
65
  _createClass(ConfirmDialogProvider, [{
@@ -77,13 +81,13 @@ function (_React$Component) {
77
81
  });
78
82
  };
79
83
 
80
- return _react.default.cloneElement(child, props);
84
+ return /*#__PURE__*/_react.default.cloneElement(child, props);
81
85
  };
82
86
 
83
- return _react.default.createElement("div", {
87
+ return /*#__PURE__*/_react.default.createElement("div", {
84
88
  id: id,
85
89
  "data-dash-is-loading": loading_state && loading_state.is_loading || undefined
86
- }, Array.isArray(children) ? children.map(wrapClick) : wrapClick(children), _react.default.createElement(_ConfirmDialog.default, _extends({}, this.props, {
90
+ }, Array.isArray(children) ? children.map(wrapClick) : wrapClick(children), /*#__PURE__*/_react.default.createElement(_ConfirmDialog.default, _extends({}, this.props, {
87
91
  displayed: displayed
88
92
  })));
89
93
  }
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
- exports.defaultProps = exports.propTypes = exports.default = void 0;
8
+ exports.propTypes = exports.defaultProps = exports.default = void 0;
7
9
 
8
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
11
 
@@ -13,29 +15,33 @@ var _datePickerRange = _interopRequireDefault(require("../utils/LazyLoader/dateP
13
15
 
14
16
  var _DatePickerPersistence = _interopRequireDefault(require("../utils/DatePickerPersistence"));
15
17
 
16
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
18
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
19
 
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
21
 
20
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
22
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
23
 
22
24
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23
25
 
24
26
  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
27
 
26
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
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; }
27
29
 
28
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
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); }
29
31
 
30
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
32
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
33
 
32
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
34
+ 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
35
 
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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
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); }
35
37
 
36
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
38
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
39
+
40
+ 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
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
37
43
 
38
- var RealDatePickerRange = (0, _react.lazy)(_datePickerRange.default);
44
+ var RealDatePickerRange = /*#__PURE__*/(0, _react.lazy)(_datePickerRange.default);
39
45
  /**
40
46
  * DatePickerRange is a tailor made component designed for selecting
41
47
  * timespan across multiple days off of a calendar.
@@ -48,23 +54,23 @@ var RealDatePickerRange = (0, _react.lazy)(_datePickerRange.default);
48
54
  * which can be found here: https://github.com/airbnb/react-dates
49
55
  */
50
56
 
51
- var DatePickerRange =
52
- /*#__PURE__*/
53
- function (_Component) {
57
+ var DatePickerRange = /*#__PURE__*/function (_Component) {
54
58
  _inherits(DatePickerRange, _Component);
55
59
 
60
+ var _super = _createSuper(DatePickerRange);
61
+
56
62
  function DatePickerRange() {
57
63
  _classCallCheck(this, DatePickerRange);
58
64
 
59
- return _possibleConstructorReturn(this, _getPrototypeOf(DatePickerRange).apply(this, arguments));
65
+ return _super.apply(this, arguments);
60
66
  }
61
67
 
62
68
  _createClass(DatePickerRange, [{
63
69
  key: "render",
64
70
  value: function render() {
65
- return _react.default.createElement(_react.Suspense, {
71
+ return /*#__PURE__*/_react.default.createElement(_react.Suspense, {
66
72
  fallback: null
67
- }, _react.default.createElement(RealDatePickerRange, this.props));
73
+ }, /*#__PURE__*/_react.default.createElement(RealDatePickerRange, this.props));
68
74
  }
69
75
  }]);
70
76
 
@@ -73,13 +79,6 @@ function (_Component) {
73
79
 
74
80
  exports.default = DatePickerRange;
75
81
  DatePickerRange.propTypes = {
76
- /**
77
- * The ID of this component, used to identify dash components
78
- * in callbacks. The ID needs to be unique across all of the
79
- * components in an app.
80
- */
81
- id: _propTypes.default.string,
82
-
83
82
  /**
84
83
  * Specifies the starting date for the component.
85
84
  * Accepts datetime.datetime objects or strings
@@ -87,18 +86,6 @@ DatePickerRange.propTypes = {
87
86
  */
88
87
  start_date: _propTypes.default.string,
89
88
 
90
- /**
91
- * The HTML element ID of the start date input field.
92
- * Not used by Dash, only by CSS.
93
- */
94
- start_date_id: _propTypes.default.string,
95
-
96
- /**
97
- * The HTML element ID of the end date input field.
98
- * Not used by Dash, only by CSS.
99
- */
100
- end_date_id: _propTypes.default.string,
101
-
102
89
  /**
103
90
  * Specifies the ending date for the component.
104
91
  * Accepts datetime.datetime objects or strings
@@ -121,12 +108,27 @@ DatePickerRange.propTypes = {
121
108
  max_date_allowed: _propTypes.default.string,
122
109
 
123
110
  /**
124
- * Specifies the month that is initially presented when the user
125
- * opens the calendar. Accepts datetime.datetime objects or strings
111
+ * Specifies additional days between min_date_allowed and max_date_allowed
112
+ * that should be disabled. Accepted datetime.datetime objects or strings
126
113
  * in the format 'YYYY-MM-DD'
127
- *
128
114
  */
129
- initial_visible_month: _propTypes.default.string,
115
+ disabled_days: _propTypes.default.arrayOf(_propTypes.default.string),
116
+
117
+ /**
118
+ * Specifies a minimum number of nights that must be selected between
119
+ * the startDate and the endDate
120
+ */
121
+ minimum_nights: _propTypes.default.number,
122
+
123
+ /**
124
+ * Determines when the component should update
125
+ * its value. If `bothdates`, then the DatePicker
126
+ * will only trigger its value when the user has
127
+ * finished picking both dates. If `singledate`, then
128
+ * the DatePicker will update its value
129
+ * as one date is picked.
130
+ */
131
+ updatemode: _propTypes.default.oneOf(['singledate', 'bothdates']),
130
132
 
131
133
  /**
132
134
  * Text that will be displayed in the first input
@@ -141,22 +143,19 @@ DatePickerRange.propTypes = {
141
143
  end_date_placeholder_text: _propTypes.default.string,
142
144
 
143
145
  /**
144
- * Size of rendered calendar days, higher number
145
- * means bigger day size and larger calendar overall
146
- */
147
- day_size: _propTypes.default.number,
148
-
149
- /**
150
- * Orientation of calendar, either vertical or horizontal.
151
- * Valid options are 'vertical' or 'horizontal'.
146
+ * Specifies the month that is initially presented when the user
147
+ * opens the calendar. Accepts datetime.datetime objects or strings
148
+ * in the format 'YYYY-MM-DD'
149
+ *
152
150
  */
153
- calendar_orientation: _propTypes.default.oneOf(['vertical', 'horizontal']),
151
+ initial_visible_month: _propTypes.default.string,
154
152
 
155
153
  /**
156
- * Determines whether the calendar and days operate
157
- * from left to right or from right to left
154
+ * Whether or not the dropdown is "clearable", that is, whether or
155
+ * not a small "x" appears on the right of the dropdown that removes
156
+ * the selected value.
158
157
  */
159
- is_RTL: _propTypes.default.bool,
158
+ clearable: _propTypes.default.bool,
160
159
 
161
160
  /**
162
161
  * If True, the calendar will automatically open when cleared
@@ -164,22 +163,23 @@ DatePickerRange.propTypes = {
164
163
  reopen_calendar_on_clear: _propTypes.default.bool,
165
164
 
166
165
  /**
167
- * Number of calendar months that are shown when calendar is opened
168
- */
169
- number_of_months_shown: _propTypes.default.number,
170
-
171
- /**
172
- * If True, calendar will open in a screen overlay portal,
173
- * not supported on vertical calendar
166
+ * Specifies the format that the selected dates will be displayed
167
+ * valid formats are variations of "MM YY DD". For example:
168
+ * "MM YY DD" renders as '05 10 97' for May 10th 1997
169
+ * "MMMM, YY" renders as 'May, 1997' for May 10th 1997
170
+ * "M, D, YYYY" renders as '07, 10, 1997' for September 10th 1997
171
+ * "MMMM" renders as 'May' for May 10 1997
174
172
  */
175
- with_portal: _propTypes.default.bool,
173
+ display_format: _propTypes.default.string,
176
174
 
177
175
  /**
178
- * If True, calendar will open in a full screen overlay portal, will
179
- * take precedent over 'withPortal' if both are set to true,
180
- * not supported on vertical calendar
176
+ * Specifies the format that the month will be displayed in the calendar,
177
+ * valid formats are variations of "MM YY". For example:
178
+ * "MM YY" renders as '05 97' for May 1997
179
+ * "MMMM, YYYY" renders as 'May, 1997' for May 1997
180
+ * "MMM, YY" renders as 'Sep, 97' for September 1997
181
181
  */
182
- with_full_screen_portal: _propTypes.default.bool,
182
+ month_format: _propTypes.default.string,
183
183
 
184
184
  /**
185
185
  * Specifies what day is the first day of the week, values must be
@@ -188,10 +188,10 @@ DatePickerRange.propTypes = {
188
188
  first_day_of_week: _propTypes.default.oneOf([0, 1, 2, 3, 4, 5, 6]),
189
189
 
190
190
  /**
191
- * Specifies a minimum number of nights that must be selected between
192
- * the startDate and the endDate
191
+ * If True the calendar will display days that rollover into
192
+ * the next month
193
193
  */
194
- minimum_nights: _propTypes.default.number,
194
+ show_outside_days: _propTypes.default.bool,
195
195
 
196
196
  /**
197
197
  * If True the calendar will not close when the user has selected a value
@@ -200,29 +200,40 @@ DatePickerRange.propTypes = {
200
200
  stay_open_on_select: _propTypes.default.bool,
201
201
 
202
202
  /**
203
- * If True the calendar will display days that rollover into
204
- * the next month
203
+ * Orientation of calendar, either vertical or horizontal.
204
+ * Valid options are 'vertical' or 'horizontal'.
205
205
  */
206
- show_outside_days: _propTypes.default.bool,
206
+ calendar_orientation: _propTypes.default.oneOf(['vertical', 'horizontal']),
207
207
 
208
208
  /**
209
- * Specifies the format that the month will be displayed in the calendar,
210
- * valid formats are variations of "MM YY". For example:
211
- * "MM YY" renders as '05 97' for May 1997
212
- * "MMMM, YYYY" renders as 'May, 1997' for May 1997
213
- * "MMM, YY" renders as 'Sep, 97' for September 1997
209
+ * Number of calendar months that are shown when calendar is opened
214
210
  */
215
- month_format: _propTypes.default.string,
211
+ number_of_months_shown: _propTypes.default.number,
216
212
 
217
213
  /**
218
- * Specifies the format that the selected dates will be displayed
219
- * valid formats are variations of "MM YY DD". For example:
220
- * "MM YY DD" renders as '05 10 97' for May 10th 1997
221
- * "MMMM, YY" renders as 'May, 1997' for May 10th 1997
222
- * "M, D, YYYY" renders as '07, 10, 1997' for September 10th 1997
223
- * "MMMM" renders as 'May' for May 10 1997
214
+ * If True, calendar will open in a screen overlay portal,
215
+ * not supported on vertical calendar
224
216
  */
225
- display_format: _propTypes.default.string,
217
+ with_portal: _propTypes.default.bool,
218
+
219
+ /**
220
+ * If True, calendar will open in a full screen overlay portal, will
221
+ * take precedent over 'withPortal' if both are set to true,
222
+ * not supported on vertical calendar
223
+ */
224
+ with_full_screen_portal: _propTypes.default.bool,
225
+
226
+ /**
227
+ * Size of rendered calendar days, higher number
228
+ * means bigger day size and larger calendar overall
229
+ */
230
+ day_size: _propTypes.default.number,
231
+
232
+ /**
233
+ * Determines whether the calendar and days operate
234
+ * from left to right or from right to left
235
+ */
236
+ is_RTL: _propTypes.default.bool,
226
237
 
227
238
  /**
228
239
  * If True, no dates can be selected.
@@ -230,16 +241,16 @@ DatePickerRange.propTypes = {
230
241
  disabled: _propTypes.default.bool,
231
242
 
232
243
  /**
233
- * Whether or not the dropdown is "clearable", that is, whether or
234
- * not a small "x" appears on the right of the dropdown that removes
235
- * the selected value.
244
+ * The HTML element ID of the start date input field.
245
+ * Not used by Dash, only by CSS.
236
246
  */
237
- clearable: _propTypes.default.bool,
247
+ start_date_id: _propTypes.default.string,
238
248
 
239
249
  /**
240
- * Dash-assigned callback that gets fired when the value changes.
250
+ * The HTML element ID of the end date input field.
251
+ * Not used by Dash, only by CSS.
241
252
  */
242
- setProps: _propTypes.default.func,
253
+ end_date_id: _propTypes.default.string,
243
254
 
244
255
  /**
245
256
  * CSS styles appended to wrapper div
@@ -252,14 +263,16 @@ DatePickerRange.propTypes = {
252
263
  className: _propTypes.default.string,
253
264
 
254
265
  /**
255
- * Determines when the component should update
256
- * its value. If `bothdates`, then the DatePicker
257
- * will only trigger its value when the user has
258
- * finished picking both dates. If `singledate`, then
259
- * the DatePicker will update its value
260
- * as one date is picked.
266
+ * The ID of this component, used to identify dash components
267
+ * in callbacks. The ID needs to be unique across all of the
268
+ * components in an app.
261
269
  */
262
- updatemode: _propTypes.default.oneOf(['singledate', 'bothdates']),
270
+ id: _propTypes.default.string,
271
+
272
+ /**
273
+ * Dash-assigned callback that gets fired when the value changes.
274
+ */
275
+ setProps: _propTypes.default.func,
263
276
 
264
277
  /**
265
278
  * Object that holds the loading state object coming from dash-renderer
@@ -323,7 +336,8 @@ DatePickerRange.defaultProps = {
323
336
  disabled: false,
324
337
  updatemode: 'singledate',
325
338
  persisted_props: ['start_date', 'end_date'],
326
- persistence_type: 'local'
339
+ persistence_type: 'local',
340
+ disabled_days: []
327
341
  };
328
342
  var propTypes = DatePickerRange.propTypes;
329
343
  exports.propTypes = propTypes;