dash-core-components 2.0.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -28
- package/dash_core_components/async-datepicker.js +1 -1
- package/dash_core_components/async-datepicker.js.map +1 -1
- package/dash_core_components/async-dropdown.js +1 -1
- package/dash_core_components/async-dropdown.js.map +1 -1
- package/dash_core_components/async-graph.js +1 -1
- package/dash_core_components/async-graph.js.map +1 -1
- package/dash_core_components/async-highlight.js +1 -1
- package/dash_core_components/async-highlight.js.map +1 -1
- package/dash_core_components/async-markdown.js +1 -1
- package/dash_core_components/async-markdown.js.map +1 -1
- package/dash_core_components/async-mathjax.js +1 -0
- package/dash_core_components/async-plotlyjs.js +1 -1
- package/dash_core_components/async-slider.js +1 -1
- package/dash_core_components/async-slider.js.map +1 -1
- package/dash_core_components/async-upload.js +1 -1
- package/dash_core_components/async-upload.js.map +1 -1
- package/dash_core_components/dash_core_components-shared.js +1 -1
- package/dash_core_components/dash_core_components-shared.js.map +1 -1
- package/dash_core_components/dash_core_components.js +1 -1
- package/dash_core_components/dash_core_components.js.map +1 -1
- package/dash_core_components/mathjax.js +1 -0
- package/dash_core_components/plotly.min.js +29 -22
- package/lib/components/Checklist.react.js +59 -23
- package/lib/components/Clipboard.react.js +4 -4
- package/lib/components/ConfirmDialog.react.js +4 -4
- package/lib/components/ConfirmDialogProvider.react.js +4 -4
- package/lib/components/DatePickerRange.react.js +85 -85
- package/lib/components/DatePickerSingle.react.js +68 -68
- package/lib/components/Download.react.js +4 -4
- package/lib/components/Dropdown.react.js +51 -35
- package/lib/components/Graph.react.js +23 -10
- package/lib/components/Input.react.js +83 -83
- package/lib/components/Interval.react.js +4 -4
- package/lib/components/Link.react.js +21 -21
- package/lib/components/Loading.react.js +4 -4
- package/lib/components/Location.react.js +4 -4
- package/lib/components/LogoutButton.react.js +4 -4
- package/lib/components/Markdown.react.js +46 -9
- package/lib/components/RadioItems.react.js +59 -23
- package/lib/components/RangeSlider.react.js +44 -44
- package/lib/components/Slider.react.js +35 -35
- package/lib/components/Store.react.js +4 -4
- package/lib/components/Tab.react.js +1 -1
- package/lib/components/Tabs.react.js +10 -10
- package/lib/components/Textarea.react.js +4 -4
- package/lib/components/Tooltip.react.js +2 -2
- package/lib/components/Upload.react.js +5 -5
- package/lib/components/css/Dropdown.css +1 -1
- package/lib/fragments/DatePickerRange.react.js +6 -6
- package/lib/fragments/DatePickerSingle.react.js +6 -6
- package/lib/fragments/Dropdown.react.js +13 -11
- package/lib/fragments/Graph.privateprops.js +1 -1
- package/lib/fragments/Graph.react.js +125 -68
- package/lib/fragments/Markdown.react.js +22 -4
- package/lib/fragments/Math.react.js +101 -0
- package/lib/fragments/RangeSlider.react.js +24 -13
- package/lib/fragments/Slider.react.js +22 -11
- package/lib/fragments/Upload.react.js +4 -4
- package/lib/utils/LazyLoader/datePickerRange.js +1 -1
- package/lib/utils/LazyLoader/datePickerSingle.js +1 -1
- package/lib/utils/LazyLoader/dropdown.js +1 -1
- package/lib/utils/LazyLoader/graph.js +1 -1
- package/lib/utils/LazyLoader/hljs.js +1 -1
- package/lib/utils/LazyLoader/markdown.js +1 -1
- package/lib/utils/LazyLoader/mathjax.js +22 -0
- package/lib/utils/LazyLoader/plotly.js +2 -2
- package/lib/utils/LazyLoader/rangeSlider.js +1 -1
- package/lib/utils/LazyLoader/slider.js +1 -1
- package/lib/utils/LazyLoader/upload.js +1 -1
- package/lib/utils/computeSliderMarkers.js +230 -0
- package/lib/utils/mathjax.js +5 -0
- package/lib/utils/optionTypes.js +52 -0
- package/package.json +36 -34
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -13,6 +13,8 @@ var _ramda = require("ramda");
|
|
|
13
13
|
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
15
|
|
|
16
|
+
var _optionTypes = require("../utils/optionTypes");
|
|
17
|
+
|
|
16
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
19
|
|
|
18
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -23,15 +25,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
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 _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); }
|
|
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); }
|
|
29
31
|
|
|
30
32
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
33
|
|
|
32
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 _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
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
38
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
37
39
|
|
|
@@ -70,16 +72,19 @@ var Checklist = /*#__PURE__*/function (_Component) {
|
|
|
70
72
|
setProps = _this$props.setProps,
|
|
71
73
|
style = _this$props.style,
|
|
72
74
|
loading_state = _this$props.loading_state,
|
|
73
|
-
value = _this$props.value
|
|
75
|
+
value = _this$props.value,
|
|
76
|
+
inline = _this$props.inline;
|
|
74
77
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
75
78
|
"data-dash-is-loading": loading_state && loading_state.is_loading || undefined,
|
|
76
79
|
id: id,
|
|
77
80
|
style: style,
|
|
78
81
|
className: className
|
|
79
|
-
}, options.map(function (option) {
|
|
82
|
+
}, (0, _optionTypes.sanitizeOptions)(options).map(function (option) {
|
|
80
83
|
return /*#__PURE__*/_react.default.createElement("label", {
|
|
81
84
|
key: option.value,
|
|
82
|
-
style: labelStyle,
|
|
85
|
+
style: Object.assign({}, labelStyle, inline ? {
|
|
86
|
+
display: 'inline-block'
|
|
87
|
+
} : {}),
|
|
83
88
|
className: labelClassName
|
|
84
89
|
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
85
90
|
checked: (0, _ramda.includes)(option.value, value),
|
|
@@ -111,38 +116,61 @@ var Checklist = /*#__PURE__*/function (_Component) {
|
|
|
111
116
|
exports.default = Checklist;
|
|
112
117
|
Checklist.propTypes = {
|
|
113
118
|
/**
|
|
114
|
-
*
|
|
115
|
-
* in callbacks. The ID needs to be unique across all of the
|
|
116
|
-
* components in an app.
|
|
119
|
+
* An array of options
|
|
117
120
|
*/
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
options: _propTypes.default.oneOfType([
|
|
120
122
|
/**
|
|
121
|
-
*
|
|
123
|
+
* Array of options where the label and the value are the same thing - [string|number|bool]
|
|
124
|
+
*/
|
|
125
|
+
_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool])),
|
|
126
|
+
/**
|
|
127
|
+
* Simpler `options` representation in dictionary format. The order is not guaranteed.
|
|
128
|
+
* {`value1`: `label1`, `value2`: `label2`, ... }
|
|
129
|
+
* which is equal to
|
|
130
|
+
* [{label: `label1`, value: `value1`}, {label: `label2`, value: `value2`}, ...]
|
|
122
131
|
*/
|
|
123
|
-
|
|
132
|
+
_propTypes.default.object,
|
|
133
|
+
/**
|
|
134
|
+
* An array of options {label: [string|number], value: [string|number]},
|
|
135
|
+
* an optional disabled field can be used for each option
|
|
136
|
+
*/
|
|
137
|
+
_propTypes.default.arrayOf(_propTypes.default.exact({
|
|
124
138
|
/**
|
|
125
|
-
* The
|
|
139
|
+
* The option's label
|
|
126
140
|
*/
|
|
127
|
-
label: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]).isRequired,
|
|
141
|
+
label: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool]).isRequired,
|
|
128
142
|
|
|
129
143
|
/**
|
|
130
|
-
* The value of the
|
|
144
|
+
* The value of the option. This value
|
|
131
145
|
* corresponds to the items specified in the
|
|
132
146
|
* `value` property.
|
|
133
147
|
*/
|
|
134
|
-
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]).isRequired,
|
|
148
|
+
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool]).isRequired,
|
|
135
149
|
|
|
136
150
|
/**
|
|
137
|
-
* If true, this
|
|
151
|
+
* If true, this option is disabled and cannot be selected.
|
|
138
152
|
*/
|
|
139
|
-
disabled: _propTypes.default.bool
|
|
140
|
-
|
|
153
|
+
disabled: _propTypes.default.bool,
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* The HTML 'title' attribute for the option. Allows for
|
|
157
|
+
* information on hover. For more information on this attribute,
|
|
158
|
+
* see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title
|
|
159
|
+
*/
|
|
160
|
+
title: _propTypes.default.string
|
|
161
|
+
}))]),
|
|
141
162
|
|
|
142
163
|
/**
|
|
143
164
|
* The currently selected value
|
|
144
165
|
*/
|
|
145
|
-
value: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number])),
|
|
166
|
+
value: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool])),
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Indicates whether labelStyle should be inline or not
|
|
170
|
+
* True: Automatically set { 'display': 'inline-block' } to labelStyle
|
|
171
|
+
* False: No additional styles are passed into labelStyle.
|
|
172
|
+
*/
|
|
173
|
+
inline: _propTypes.default.bool,
|
|
146
174
|
|
|
147
175
|
/**
|
|
148
176
|
* The class of the container (div)
|
|
@@ -176,6 +204,13 @@ Checklist.propTypes = {
|
|
|
176
204
|
*/
|
|
177
205
|
labelClassName: _propTypes.default.string,
|
|
178
206
|
|
|
207
|
+
/**
|
|
208
|
+
* The ID of this component, used to identify dash components
|
|
209
|
+
* in callbacks. The ID needs to be unique across all of the
|
|
210
|
+
* components in an app.
|
|
211
|
+
*/
|
|
212
|
+
id: _propTypes.default.string,
|
|
213
|
+
|
|
179
214
|
/**
|
|
180
215
|
* Dash-assigned callback that gets fired when the value changes.
|
|
181
216
|
*/
|
|
@@ -234,5 +269,6 @@ Checklist.defaultProps = {
|
|
|
234
269
|
options: [],
|
|
235
270
|
value: [],
|
|
236
271
|
persisted_props: ['value'],
|
|
237
|
-
persistence_type: 'local'
|
|
272
|
+
persistence_type: 'local',
|
|
273
|
+
inline: false
|
|
238
274
|
};
|
|
@@ -23,21 +23,21 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
23
23
|
|
|
24
24
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
25
25
|
|
|
26
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
26
|
+
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); }
|
|
27
27
|
|
|
28
28
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
29
|
|
|
30
30
|
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); } }
|
|
31
31
|
|
|
32
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
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"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); 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
|
|
|
38
38
|
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); }; }
|
|
39
39
|
|
|
40
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
40
|
+
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); }
|
|
41
41
|
|
|
42
42
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
43
43
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -17,15 +17,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
17
17
|
|
|
18
18
|
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
19
|
|
|
20
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
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"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); 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
|
|
|
26
26
|
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
27
|
|
|
28
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
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
29
|
|
|
30
30
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
31
31
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -23,15 +23,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
23
23
|
|
|
24
24
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
25
25
|
|
|
26
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
26
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
27
|
|
|
28
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
28
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
29
29
|
|
|
30
30
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
31
|
|
|
32
32
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
33
33
|
|
|
34
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
34
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
35
35
|
|
|
36
36
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
37
37
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.propTypes = exports.defaultProps = exports.default = void 0;
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -25,15 +25,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
25
25
|
|
|
26
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); } }
|
|
27
27
|
|
|
28
|
-
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; }
|
|
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"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); 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
|
|
|
34
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); }; }
|
|
35
35
|
|
|
36
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
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
37
|
|
|
38
38
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
39
39
|
|
|
@@ -79,13 +79,6 @@ var DatePickerRange = /*#__PURE__*/function (_Component) {
|
|
|
79
79
|
|
|
80
80
|
exports.default = DatePickerRange;
|
|
81
81
|
DatePickerRange.propTypes = {
|
|
82
|
-
/**
|
|
83
|
-
* The ID of this component, used to identify dash components
|
|
84
|
-
* in callbacks. The ID needs to be unique across all of the
|
|
85
|
-
* components in an app.
|
|
86
|
-
*/
|
|
87
|
-
id: _propTypes.default.string,
|
|
88
|
-
|
|
89
82
|
/**
|
|
90
83
|
* Specifies the starting date for the component.
|
|
91
84
|
* Accepts datetime.datetime objects or strings
|
|
@@ -93,18 +86,6 @@ DatePickerRange.propTypes = {
|
|
|
93
86
|
*/
|
|
94
87
|
start_date: _propTypes.default.string,
|
|
95
88
|
|
|
96
|
-
/**
|
|
97
|
-
* The HTML element ID of the start date input field.
|
|
98
|
-
* Not used by Dash, only by CSS.
|
|
99
|
-
*/
|
|
100
|
-
start_date_id: _propTypes.default.string,
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* The HTML element ID of the end date input field.
|
|
104
|
-
* Not used by Dash, only by CSS.
|
|
105
|
-
*/
|
|
106
|
-
end_date_id: _propTypes.default.string,
|
|
107
|
-
|
|
108
89
|
/**
|
|
109
90
|
* Specifies the ending date for the component.
|
|
110
91
|
* Accepts datetime.datetime objects or strings
|
|
@@ -134,12 +115,20 @@ DatePickerRange.propTypes = {
|
|
|
134
115
|
disabled_days: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
135
116
|
|
|
136
117
|
/**
|
|
137
|
-
* Specifies
|
|
138
|
-
*
|
|
139
|
-
* in the format 'YYYY-MM-DD'
|
|
140
|
-
*
|
|
118
|
+
* Specifies a minimum number of nights that must be selected between
|
|
119
|
+
* the startDate and the endDate
|
|
141
120
|
*/
|
|
142
|
-
|
|
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']),
|
|
143
132
|
|
|
144
133
|
/**
|
|
145
134
|
* Text that will be displayed in the first input
|
|
@@ -154,22 +143,19 @@ DatePickerRange.propTypes = {
|
|
|
154
143
|
end_date_placeholder_text: _propTypes.default.string,
|
|
155
144
|
|
|
156
145
|
/**
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Orientation of calendar, either vertical or horizontal.
|
|
164
|
-
* 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
|
+
*
|
|
165
150
|
*/
|
|
166
|
-
|
|
151
|
+
initial_visible_month: _propTypes.default.string,
|
|
167
152
|
|
|
168
153
|
/**
|
|
169
|
-
*
|
|
170
|
-
*
|
|
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.
|
|
171
157
|
*/
|
|
172
|
-
|
|
158
|
+
clearable: _propTypes.default.bool,
|
|
173
159
|
|
|
174
160
|
/**
|
|
175
161
|
* If True, the calendar will automatically open when cleared
|
|
@@ -177,22 +163,23 @@ DatePickerRange.propTypes = {
|
|
|
177
163
|
reopen_calendar_on_clear: _propTypes.default.bool,
|
|
178
164
|
|
|
179
165
|
/**
|
|
180
|
-
*
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
*
|
|
186
|
-
* 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
|
|
187
172
|
*/
|
|
188
|
-
|
|
173
|
+
display_format: _propTypes.default.string,
|
|
189
174
|
|
|
190
175
|
/**
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
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
|
|
194
181
|
*/
|
|
195
|
-
|
|
182
|
+
month_format: _propTypes.default.string,
|
|
196
183
|
|
|
197
184
|
/**
|
|
198
185
|
* Specifies what day is the first day of the week, values must be
|
|
@@ -201,10 +188,10 @@ DatePickerRange.propTypes = {
|
|
|
201
188
|
first_day_of_week: _propTypes.default.oneOf([0, 1, 2, 3, 4, 5, 6]),
|
|
202
189
|
|
|
203
190
|
/**
|
|
204
|
-
*
|
|
205
|
-
* the
|
|
191
|
+
* If True the calendar will display days that rollover into
|
|
192
|
+
* the next month
|
|
206
193
|
*/
|
|
207
|
-
|
|
194
|
+
show_outside_days: _propTypes.default.bool,
|
|
208
195
|
|
|
209
196
|
/**
|
|
210
197
|
* If True the calendar will not close when the user has selected a value
|
|
@@ -213,29 +200,40 @@ DatePickerRange.propTypes = {
|
|
|
213
200
|
stay_open_on_select: _propTypes.default.bool,
|
|
214
201
|
|
|
215
202
|
/**
|
|
216
|
-
*
|
|
217
|
-
*
|
|
203
|
+
* Orientation of calendar, either vertical or horizontal.
|
|
204
|
+
* Valid options are 'vertical' or 'horizontal'.
|
|
218
205
|
*/
|
|
219
|
-
|
|
206
|
+
calendar_orientation: _propTypes.default.oneOf(['vertical', 'horizontal']),
|
|
220
207
|
|
|
221
208
|
/**
|
|
222
|
-
*
|
|
223
|
-
* valid formats are variations of "MM YY". For example:
|
|
224
|
-
* "MM YY" renders as '05 97' for May 1997
|
|
225
|
-
* "MMMM, YYYY" renders as 'May, 1997' for May 1997
|
|
226
|
-
* "MMM, YY" renders as 'Sep, 97' for September 1997
|
|
209
|
+
* Number of calendar months that are shown when calendar is opened
|
|
227
210
|
*/
|
|
228
|
-
|
|
211
|
+
number_of_months_shown: _propTypes.default.number,
|
|
229
212
|
|
|
230
213
|
/**
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
* "MM YY DD" renders as '05 10 97' for May 10th 1997
|
|
234
|
-
* "MMMM, YY" renders as 'May, 1997' for May 10th 1997
|
|
235
|
-
* "M, D, YYYY" renders as '07, 10, 1997' for September 10th 1997
|
|
236
|
-
* "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
|
|
237
216
|
*/
|
|
238
|
-
|
|
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,
|
|
239
237
|
|
|
240
238
|
/**
|
|
241
239
|
* If True, no dates can be selected.
|
|
@@ -243,16 +241,16 @@ DatePickerRange.propTypes = {
|
|
|
243
241
|
disabled: _propTypes.default.bool,
|
|
244
242
|
|
|
245
243
|
/**
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
* the selected value.
|
|
244
|
+
* The HTML element ID of the start date input field.
|
|
245
|
+
* Not used by Dash, only by CSS.
|
|
249
246
|
*/
|
|
250
|
-
|
|
247
|
+
start_date_id: _propTypes.default.string,
|
|
251
248
|
|
|
252
249
|
/**
|
|
253
|
-
*
|
|
250
|
+
* The HTML element ID of the end date input field.
|
|
251
|
+
* Not used by Dash, only by CSS.
|
|
254
252
|
*/
|
|
255
|
-
|
|
253
|
+
end_date_id: _propTypes.default.string,
|
|
256
254
|
|
|
257
255
|
/**
|
|
258
256
|
* CSS styles appended to wrapper div
|
|
@@ -265,14 +263,16 @@ DatePickerRange.propTypes = {
|
|
|
265
263
|
className: _propTypes.default.string,
|
|
266
264
|
|
|
267
265
|
/**
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
* finished picking both dates. If `singledate`, then
|
|
272
|
-
* the DatePicker will update its value
|
|
273
|
-
* 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.
|
|
274
269
|
*/
|
|
275
|
-
|
|
270
|
+
id: _propTypes.default.string,
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Dash-assigned callback that gets fired when the value changes.
|
|
274
|
+
*/
|
|
275
|
+
setProps: _propTypes.default.func,
|
|
276
276
|
|
|
277
277
|
/**
|
|
278
278
|
* Object that holds the loading state object coming from dash-renderer
|