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.
- package/README.md +8 -44
- 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 +2 -2
- 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 +2 -2
- package/dash_core_components/async-markdown.js.map +1 -1
- package/dash_core_components/async-plotlyjs.js +2 -2
- package/dash_core_components/async-slider.js +1 -2
- 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 +2 -2
- package/dash_core_components/dash_core_components-shared.js.map +1 -1
- package/dash_core_components/dash_core_components.js +3 -0
- package/dash_core_components/dash_core_components.js.map +1 -0
- package/dash_core_components/plotly.min.js +30 -26
- package/lib/components/Checklist.react.js +77 -35
- package/lib/components/Clipboard.react.js +354 -0
- package/lib/components/ConfirmDialog.react.js +16 -12
- package/lib/components/ConfirmDialogProvider.react.js +19 -15
- package/lib/components/DatePickerRange.react.js +111 -97
- package/lib/components/DatePickerSingle.react.js +95 -81
- package/lib/components/Download.react.js +138 -0
- package/lib/components/Dropdown.react.js +69 -47
- package/lib/components/Graph.react.js +36 -24
- package/lib/components/Input.react.js +98 -92
- package/lib/components/Interval.react.js +18 -12
- package/lib/components/Link.react.js +36 -30
- package/lib/components/Loading.react.js +21 -15
- package/lib/components/Location.react.js +15 -13
- package/lib/components/LogoutButton.react.js +18 -14
- package/lib/components/Markdown.react.js +23 -17
- package/lib/components/RadioItems.react.js +77 -35
- package/lib/components/RangeSlider.react.js +61 -55
- package/lib/components/Slider.react.js +52 -46
- package/lib/components/Store.react.js +16 -16
- package/lib/components/Tab.react.js +6 -2
- package/lib/components/Tabs.react.js +32 -23
- package/lib/components/Textarea.react.js +19 -13
- package/lib/components/Tooltip.react.js +152 -0
- package/lib/components/Upload.react.js +25 -19
- package/lib/components/css/Dropdown.css +1 -1
- package/lib/fragments/DatePickerRange.react.js +63 -51
- package/lib/fragments/DatePickerSingle.react.js +28 -17
- package/lib/fragments/Dropdown.react.js +33 -22
- package/lib/fragments/Graph.privateprops.js +1 -1
- package/lib/fragments/Graph.react.js +44 -28
- package/lib/fragments/Loading/spinners/CircleSpinner.js +16 -16
- package/lib/fragments/Loading/spinners/CubeSpinner.js +11 -11
- package/lib/fragments/Loading/spinners/DefaultSpinner.js +9 -9
- package/lib/fragments/Loading/spinners/DotSpinner.js +7 -7
- package/lib/fragments/Loading/spinners/GraphSpinner.js +18 -18
- package/lib/fragments/Markdown.react.js +35 -32
- package/lib/fragments/RangeSlider.react.js +57 -22
- package/lib/fragments/Slider.react.js +40 -21
- package/lib/fragments/Upload.react.js +19 -13
- package/lib/index.js +77 -53
- package/lib/third-party/highlight.js +12 -0
- package/lib/utils/LazyLoader/datePickerRange.js +9 -3
- package/lib/utils/LazyLoader/datePickerSingle.js +9 -3
- package/lib/utils/LazyLoader/dropdown.js +9 -3
- package/lib/utils/LazyLoader/graph.js +9 -3
- package/lib/utils/LazyLoader/hljs.js +9 -3
- package/lib/utils/LazyLoader/markdown.js +9 -3
- package/lib/utils/LazyLoader/plotly.js +9 -3
- package/lib/utils/LazyLoader/rangeSlider.js +9 -3
- package/lib/utils/LazyLoader/slider.js +9 -3
- package/lib/utils/LazyLoader/upload.js +9 -3
- package/lib/utils/computeSliderMarkers.js +230 -0
- package/lib/utils/convertToMoment.js +4 -0
- package/lib/utils/optionTypes.js +52 -0
- package/package.json +68 -75
- package/CHANGELOG.md +0 -1034
- package/dash_core_components/dash_core_components.min.js +0 -2
- 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
|
});
|
|
@@ -17,9 +19,9 @@ require("./css/input.css");
|
|
|
17
19
|
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
21
|
|
|
20
|
-
function
|
|
22
|
+
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); }
|
|
21
23
|
|
|
22
|
-
function
|
|
24
|
+
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
25
|
|
|
24
26
|
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); }
|
|
25
27
|
|
|
@@ -27,17 +29,21 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
27
29
|
|
|
28
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); } }
|
|
29
31
|
|
|
30
|
-
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; }
|
|
31
33
|
|
|
32
|
-
function
|
|
34
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
33
35
|
|
|
34
|
-
function
|
|
36
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
37
|
+
|
|
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
|
+
|
|
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); }
|
|
35
41
|
|
|
36
42
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
37
43
|
|
|
38
|
-
function
|
|
44
|
+
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
45
|
|
|
40
|
-
function
|
|
46
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
41
47
|
|
|
42
48
|
// eslint-disable-next-line no-implicit-coercion
|
|
43
49
|
var convert = function convert(val) {
|
|
@@ -56,18 +62,18 @@ var isEquivalent = function isEquivalent(v1, v2) {
|
|
|
56
62
|
*/
|
|
57
63
|
|
|
58
64
|
|
|
59
|
-
var Input =
|
|
60
|
-
/*#__PURE__*/
|
|
61
|
-
function (_PureComponent) {
|
|
65
|
+
var Input = /*#__PURE__*/function (_PureComponent) {
|
|
62
66
|
_inherits(Input, _PureComponent);
|
|
63
67
|
|
|
68
|
+
var _super = _createSuper(Input);
|
|
69
|
+
|
|
64
70
|
function Input(props) {
|
|
65
71
|
var _this;
|
|
66
72
|
|
|
67
73
|
_classCallCheck(this, Input);
|
|
68
74
|
|
|
69
|
-
_this =
|
|
70
|
-
_this.input = _react.default.createRef();
|
|
75
|
+
_this = _super.call(this, props);
|
|
76
|
+
_this.input = /*#__PURE__*/_react.default.createRef();
|
|
71
77
|
_this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this));
|
|
72
78
|
_this.onChange = _this.onChange.bind(_assertThisInitialized(_this));
|
|
73
79
|
_this.onEvent = _this.onEvent.bind(_assertThisInitialized(_this));
|
|
@@ -113,7 +119,7 @@ function (_PureComponent) {
|
|
|
113
119
|
value: this.state.value
|
|
114
120
|
};
|
|
115
121
|
var loading_state = this.props.loading_state;
|
|
116
|
-
return _react.default.createElement("input", _extends({
|
|
122
|
+
return /*#__PURE__*/_react.default.createElement("input", _extends({
|
|
117
123
|
"data-dash-is-loading": loading_state && loading_state.is_loading || undefined,
|
|
118
124
|
ref: this.input,
|
|
119
125
|
onBlur: this.onBlur,
|
|
@@ -210,27 +216,16 @@ Input.defaultProps = {
|
|
|
210
216
|
persistence_type: 'local'
|
|
211
217
|
};
|
|
212
218
|
Input.propTypes = {
|
|
213
|
-
/**
|
|
214
|
-
* The ID of this component, used to identify dash components
|
|
215
|
-
* in callbacks. The ID needs to be unique across all of the
|
|
216
|
-
* components in an app.
|
|
217
|
-
*/
|
|
218
|
-
id: _propTypes.default.string,
|
|
219
|
-
|
|
220
219
|
/**
|
|
221
220
|
* The value of the input
|
|
222
221
|
*/
|
|
223
222
|
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
224
223
|
|
|
225
224
|
/**
|
|
226
|
-
* The
|
|
227
|
-
*/
|
|
228
|
-
style: _propTypes.default.object,
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* The class of the input element
|
|
225
|
+
* The type of control to render.
|
|
232
226
|
*/
|
|
233
|
-
|
|
227
|
+
type: _propTypes.default.oneOf([// Only allowing the input types with wide browser compatibility
|
|
228
|
+
'text', 'number', 'password', 'email', 'range', 'search', 'tel', 'url', 'hidden']),
|
|
234
229
|
|
|
235
230
|
/**
|
|
236
231
|
* If true, changes to input will be sent back to the Dash server only on enter or when losing focus.
|
|
@@ -239,30 +234,19 @@ Input.propTypes = {
|
|
|
239
234
|
debounce: _propTypes.default.bool,
|
|
240
235
|
|
|
241
236
|
/**
|
|
242
|
-
*
|
|
243
|
-
*/
|
|
244
|
-
type: _propTypes.default.oneOf([// Only allowing the input types with wide browser compatibility
|
|
245
|
-
'text', 'number', 'password', 'email', 'range', 'search', 'tel', 'url', 'hidden']),
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* This attribute indicates whether the value of the control can be automatically completed by the browser.
|
|
237
|
+
* A hint to the user of what can be entered in the control . The placeholder text must not contain carriage returns or line-feeds. Note: Do not use the placeholder attribute instead of a <label> element, their purposes are different. The <label> attribute describes the role of the form element (i.e. it indicates what kind of information is expected), and the placeholder attribute is a hint about the format that the content should take. There are cases in which the placeholder attribute is never displayed to the user, so the form must be understandable without it.
|
|
249
238
|
*/
|
|
250
|
-
|
|
239
|
+
placeholder: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
251
240
|
|
|
252
241
|
/**
|
|
253
|
-
*
|
|
254
|
-
* autoFocus is an HTML boolean attribute - it is enabled by a boolean or
|
|
255
|
-
* 'autoFocus'. Alternative capitalizations `autofocus` & `AUTOFOCUS`
|
|
256
|
-
* are also acccepted.
|
|
242
|
+
* Number of times the `Enter` key was pressed while the input had focus.
|
|
257
243
|
*/
|
|
258
|
-
|
|
244
|
+
n_submit: _propTypes.default.number,
|
|
259
245
|
|
|
260
246
|
/**
|
|
261
|
-
*
|
|
262
|
-
* disabled is an HTML boolean attribute - it is enabled by a boolean or
|
|
263
|
-
* 'disabled'. Alternative capitalizations `DISABLED`
|
|
247
|
+
* Last time that `Enter` was pressed.
|
|
264
248
|
*/
|
|
265
|
-
|
|
249
|
+
n_submit_timestamp: _propTypes.default.number,
|
|
266
250
|
|
|
267
251
|
/**
|
|
268
252
|
* Provides a hint to the browser as to the type of data that might be
|
|
@@ -315,80 +299,96 @@ Input.propTypes = {
|
|
|
315
299
|
'url']),
|
|
316
300
|
|
|
317
301
|
/**
|
|
318
|
-
*
|
|
319
|
-
* The value must be the id of a <datalist> element in the same document.
|
|
320
|
-
* The browser displays only options that are valid values for this
|
|
321
|
-
* input element.
|
|
322
|
-
* This attribute is ignored when the type attribute's value is
|
|
323
|
-
* hidden, checkbox, radio, file, or a button type.
|
|
302
|
+
* This attribute indicates whether the value of the control can be automatically completed by the browser.
|
|
324
303
|
*/
|
|
325
|
-
|
|
304
|
+
autoComplete: _propTypes.default.string,
|
|
326
305
|
|
|
327
306
|
/**
|
|
328
|
-
* The
|
|
307
|
+
* This attribute indicates that the user cannot modify the value of the control. The value of the attribute is irrelevant. If you need read-write access to the input value, do not add the "readonly" attribute. It is ignored if the value of the type attribute is hidden, range, color, checkbox, radio, file, or a button type (such as button or submit).
|
|
308
|
+
* readOnly is an HTML boolean attribute - it is enabled by a boolean or
|
|
309
|
+
* 'readOnly'. Alternative capitalizations `readonly` & `READONLY`
|
|
310
|
+
* are also acccepted.
|
|
329
311
|
*/
|
|
330
|
-
|
|
312
|
+
readOnly: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.oneOf(['readOnly', 'readonly', 'READONLY'])]),
|
|
331
313
|
|
|
332
314
|
/**
|
|
333
|
-
*
|
|
315
|
+
* This attribute specifies that the user must fill in a value before submitting a form. It cannot be used when the type attribute is hidden, image, or a button type (submit, reset, or button). The :optional and :required CSS pseudo-classes will be applied to the field as appropriate.
|
|
316
|
+
* required is an HTML boolean attribute - it is enabled by a boolean or
|
|
317
|
+
* 'required'. Alternative capitalizations `REQUIRED`
|
|
318
|
+
* are also acccepted.
|
|
334
319
|
*/
|
|
335
|
-
|
|
320
|
+
required: _propTypes.default.oneOfType([_propTypes.default.oneOf(['required', 'REQUIRED']), _propTypes.default.bool]),
|
|
336
321
|
|
|
337
322
|
/**
|
|
338
|
-
* The
|
|
323
|
+
* The element should be automatically focused after the page loaded.
|
|
324
|
+
* autoFocus is an HTML boolean attribute - it is enabled by a boolean or
|
|
325
|
+
* 'autoFocus'. Alternative capitalizations `autofocus` & `AUTOFOCUS`
|
|
326
|
+
* are also acccepted.
|
|
339
327
|
*/
|
|
340
|
-
|
|
328
|
+
autoFocus: _propTypes.default.oneOfType([_propTypes.default.oneOf(['autoFocus', 'autofocus', 'AUTOFOCUS']), _propTypes.default.bool]),
|
|
341
329
|
|
|
342
330
|
/**
|
|
343
|
-
* If
|
|
331
|
+
* If true, the input is disabled and can't be clicked on.
|
|
332
|
+
* disabled is an HTML boolean attribute - it is enabled by a boolean or
|
|
333
|
+
* 'disabled'. Alternative capitalizations `DISABLED`
|
|
344
334
|
*/
|
|
345
|
-
|
|
335
|
+
disabled: _propTypes.default.oneOfType([_propTypes.default.oneOf(['disabled', 'DISABLED']), _propTypes.default.bool]),
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Identifies a list of pre-defined options to suggest to the user.
|
|
339
|
+
* The value must be the id of a <datalist> element in the same document.
|
|
340
|
+
* The browser displays only options that are valid values for this
|
|
341
|
+
* input element.
|
|
342
|
+
* This attribute is ignored when the type attribute's value is
|
|
343
|
+
* hidden, checkbox, radio, file, or a button type.
|
|
344
|
+
*/
|
|
345
|
+
list: _propTypes.default.string,
|
|
346
346
|
|
|
347
347
|
/**
|
|
348
348
|
* This Boolean attribute indicates whether the user can enter more than one value. This attribute applies when the type attribute is set to email or file, otherwise it is ignored.
|
|
349
349
|
*/
|
|
350
350
|
multiple: _propTypes.default.bool,
|
|
351
351
|
|
|
352
|
+
/**
|
|
353
|
+
* Setting the value of this attribute to true indicates that the element needs to have its spelling and grammar checked. The value default indicates that the element is to act according to a default behavior, possibly based on the parent element's own spellcheck value. The value false indicates that the element should not be checked.
|
|
354
|
+
*/
|
|
355
|
+
spellCheck: _propTypes.default.oneOfType([// enumerated property, not a boolean property: https://www.w3.org/TR/html51/editing.html#spelling-and-grammar-checking
|
|
356
|
+
_propTypes.default.oneOf(['true', 'false']), _propTypes.default.bool]),
|
|
357
|
+
|
|
352
358
|
/**
|
|
353
359
|
* The name of the control, which is submitted with the form data.
|
|
354
360
|
*/
|
|
355
361
|
name: _propTypes.default.string,
|
|
356
362
|
|
|
357
363
|
/**
|
|
358
|
-
*
|
|
364
|
+
* The minimum (numeric or date-time) value for this item, which must not be greater than its maximum (max attribute) value.
|
|
359
365
|
*/
|
|
360
|
-
|
|
366
|
+
min: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
361
367
|
|
|
362
368
|
/**
|
|
363
|
-
*
|
|
369
|
+
* The maximum (numeric or date-time) value for this item, which must not be less than its minimum (min attribute) value.
|
|
364
370
|
*/
|
|
365
|
-
|
|
371
|
+
max: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
366
372
|
|
|
367
373
|
/**
|
|
368
|
-
*
|
|
369
|
-
* readOnly is an HTML boolean attribute - it is enabled by a boolean or
|
|
370
|
-
* 'readOnly'. Alternative capitalizations `readonly` & `READONLY`
|
|
371
|
-
* are also acccepted.
|
|
374
|
+
* Works with the min and max attributes to limit the increments at which a numeric or date-time value can be set. It can be the string any or a positive floating point number. If this attribute is not set to any, the control accepts only values at multiples of the step value greater than the minimum.
|
|
372
375
|
*/
|
|
373
|
-
|
|
376
|
+
step: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
374
377
|
|
|
375
378
|
/**
|
|
376
|
-
*
|
|
377
|
-
* required is an HTML boolean attribute - it is enabled by a boolean or
|
|
378
|
-
* 'required'. Alternative capitalizations `REQUIRED`
|
|
379
|
-
* are also acccepted.
|
|
379
|
+
* If the value of the type attribute is text, email, search, password, tel, or url, this attribute specifies the minimum number of characters (in Unicode code points) that the user can enter. For other control types, it is ignored.
|
|
380
380
|
*/
|
|
381
|
-
|
|
381
|
+
minLength: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
382
382
|
|
|
383
383
|
/**
|
|
384
|
-
*
|
|
384
|
+
* If the value of the type attribute is text, email, search, password, tel, or url, this attribute specifies the maximum number of characters (in UTF-16 code units) that the user can enter. For other control types, it is ignored. It can exceed the value of the size attribute. If it is not specified, the user can enter an unlimited number of characters. Specifying a negative number results in the default behavior (i.e. the user can enter an unlimited number of characters). The constraint is evaluated only when the value of the attribute has been changed.
|
|
385
385
|
*/
|
|
386
|
-
|
|
386
|
+
maxLength: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
387
387
|
|
|
388
388
|
/**
|
|
389
|
-
*
|
|
389
|
+
* A regular expression that the control's value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is text, search, tel, url, email, or password, otherwise it is ignored. The regular expression language is the same as JavaScript RegExp algorithm, with the 'u' parameter that makes it treat the pattern as a sequence of unicode code points. The pattern is not surrounded by forward slashes.
|
|
390
390
|
*/
|
|
391
|
-
|
|
391
|
+
pattern: _propTypes.default.string,
|
|
392
392
|
|
|
393
393
|
/**
|
|
394
394
|
* The offset into the element's text content of the first selected character. If there's no selection, this value indicates the offset to the character following the current text input cursor position (that is, the position the next character typed would occupy).
|
|
@@ -396,40 +396,46 @@ Input.propTypes = {
|
|
|
396
396
|
selectionStart: _propTypes.default.string,
|
|
397
397
|
|
|
398
398
|
/**
|
|
399
|
-
* The
|
|
399
|
+
* The offset into the element's text content of the last selected character. If there's no selection, this value indicates the offset to the character following the current text input cursor position (that is, the position the next character typed would occupy).
|
|
400
400
|
*/
|
|
401
|
-
|
|
401
|
+
selectionEnd: _propTypes.default.string,
|
|
402
402
|
|
|
403
403
|
/**
|
|
404
|
-
*
|
|
404
|
+
* The direction in which selection occurred. This is "forward" if the selection was made from left-to-right in an LTR locale or right-to-left in an RTL locale, or "backward" if the selection was made in the opposite direction. On platforms on which it's possible this value isn't known, the value can be "none"; for example, on macOS, the default direction is "none", then as the user begins to modify the selection using the keyboard, this will change to reflect the direction in which the selection is expanding.
|
|
405
405
|
*/
|
|
406
|
-
|
|
407
|
-
_propTypes.default.oneOf(['true', 'false']), _propTypes.default.bool]),
|
|
406
|
+
selectionDirection: _propTypes.default.string,
|
|
408
407
|
|
|
409
408
|
/**
|
|
410
|
-
*
|
|
409
|
+
* Number of times the input lost focus.
|
|
411
410
|
*/
|
|
412
|
-
|
|
411
|
+
n_blur: _propTypes.default.number,
|
|
413
412
|
|
|
414
413
|
/**
|
|
415
|
-
*
|
|
414
|
+
* Last time the input lost focus.
|
|
416
415
|
*/
|
|
417
|
-
|
|
416
|
+
n_blur_timestamp: _propTypes.default.number,
|
|
418
417
|
|
|
419
418
|
/**
|
|
420
|
-
*
|
|
419
|
+
* The initial size of the control. This value is in pixels unless the value of the type attribute is text or password, in which case it is an integer number of characters. Starting in, this attribute applies only when the type attribute is set to text, search, tel, url, email, or password, otherwise it is ignored. In addition, the size must be greater than zero. If you do not specify a size, a default value of 20 is used.' simply states "the user agent should ensure that at least that many characters are visible", but different characters can have different widths in certain fonts. In some browsers, a certain string with x characters will not be entirely visible even if size is defined to at least x.
|
|
421
420
|
*/
|
|
422
|
-
|
|
421
|
+
size: _propTypes.default.string,
|
|
423
422
|
|
|
424
423
|
/**
|
|
425
|
-
*
|
|
424
|
+
* The input's inline styles
|
|
426
425
|
*/
|
|
427
|
-
|
|
426
|
+
style: _propTypes.default.object,
|
|
428
427
|
|
|
429
428
|
/**
|
|
430
|
-
*
|
|
429
|
+
* The class of the input element
|
|
431
430
|
*/
|
|
432
|
-
|
|
431
|
+
className: _propTypes.default.string,
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* The ID of this component, used to identify dash components
|
|
435
|
+
* in callbacks. The ID needs to be unique across all of the
|
|
436
|
+
* components in an app.
|
|
437
|
+
*/
|
|
438
|
+
id: _propTypes.default.string,
|
|
433
439
|
|
|
434
440
|
/**
|
|
435
441
|
* Dash-assigned callback that gets fired when the value changes.
|
|
@@ -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
|
});
|
|
@@ -9,27 +11,31 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
9
11
|
|
|
10
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
13
|
|
|
12
|
-
function
|
|
14
|
+
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); }
|
|
13
15
|
|
|
14
|
-
function
|
|
16
|
+
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; }
|
|
15
17
|
|
|
16
|
-
function
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
18
20
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19
21
|
|
|
20
22
|
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); } }
|
|
21
23
|
|
|
22
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
24
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
23
25
|
|
|
24
|
-
function
|
|
26
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
25
27
|
|
|
26
|
-
function
|
|
28
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
|
+
|
|
30
|
+
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); }; }
|
|
31
|
+
|
|
32
|
+
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); }
|
|
27
33
|
|
|
28
34
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
29
35
|
|
|
30
|
-
function
|
|
36
|
+
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; } }
|
|
31
37
|
|
|
32
|
-
function
|
|
38
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
33
39
|
|
|
34
40
|
// eslint-disable-line no-unused-vars
|
|
35
41
|
|
|
@@ -39,17 +45,17 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
|
39
45
|
* Interval is good for triggering a component on a recurring basis.
|
|
40
46
|
* The time delay is set with the property "interval" in milliseconds.
|
|
41
47
|
*/
|
|
42
|
-
var Interval =
|
|
43
|
-
/*#__PURE__*/
|
|
44
|
-
function (_Component) {
|
|
48
|
+
var Interval = /*#__PURE__*/function (_Component) {
|
|
45
49
|
_inherits(Interval, _Component);
|
|
46
50
|
|
|
51
|
+
var _super = _createSuper(Interval);
|
|
52
|
+
|
|
47
53
|
function Interval(props) {
|
|
48
54
|
var _this;
|
|
49
55
|
|
|
50
56
|
_classCallCheck(this, Interval);
|
|
51
57
|
|
|
52
|
-
_this =
|
|
58
|
+
_this = _super.call(this, props);
|
|
53
59
|
_this.intervalId = null;
|
|
54
60
|
_this.reportInterval = _this.reportInterval.bind(_assertThisInitialized(_this));
|
|
55
61
|
_this.handleTimer = _this.handleTimer.bind(_assertThisInitialized(_this));
|
|
@@ -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
|
});
|
|
@@ -11,27 +13,31 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
13
|
|
|
12
14
|
var _ramda = require("ramda");
|
|
13
15
|
|
|
14
|
-
function
|
|
16
|
+
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); }
|
|
15
17
|
|
|
16
|
-
function
|
|
18
|
+
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; }
|
|
17
19
|
|
|
18
|
-
function
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
21
|
|
|
20
22
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
23
|
|
|
22
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); } }
|
|
23
25
|
|
|
24
|
-
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; }
|
|
25
27
|
|
|
26
|
-
function
|
|
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); }
|
|
27
29
|
|
|
28
|
-
function
|
|
30
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
|
+
|
|
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
|
+
|
|
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); }
|
|
29
35
|
|
|
30
36
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
31
37
|
|
|
32
|
-
function
|
|
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; } }
|
|
33
39
|
|
|
34
|
-
function
|
|
40
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
35
41
|
|
|
36
42
|
/*
|
|
37
43
|
* event polyfill for IE
|
|
@@ -58,17 +64,17 @@ CustomEvent.prototype = window.Event.prototype;
|
|
|
58
64
|
* component to use.
|
|
59
65
|
*/
|
|
60
66
|
|
|
61
|
-
var Link =
|
|
62
|
-
/*#__PURE__*/
|
|
63
|
-
function (_Component) {
|
|
67
|
+
var Link = /*#__PURE__*/function (_Component) {
|
|
64
68
|
_inherits(Link, _Component);
|
|
65
69
|
|
|
70
|
+
var _super = _createSuper(Link);
|
|
71
|
+
|
|
66
72
|
function Link(props) {
|
|
67
73
|
var _this;
|
|
68
74
|
|
|
69
75
|
_classCallCheck(this, Link);
|
|
70
76
|
|
|
71
|
-
_this =
|
|
77
|
+
_this = _super.call(this, props);
|
|
72
78
|
_this.updateLocation = _this.updateLocation.bind(_assertThisInitialized(_this));
|
|
73
79
|
return _this;
|
|
74
80
|
}
|
|
@@ -123,7 +129,7 @@ function (_Component) {
|
|
|
123
129
|
* renderTree implementation for some reason
|
|
124
130
|
*/
|
|
125
131
|
|
|
126
|
-
return _react.default.createElement("a", {
|
|
132
|
+
return /*#__PURE__*/_react.default.createElement("a", {
|
|
127
133
|
"data-dash-is-loading": loading_state && loading_state.is_loading || undefined,
|
|
128
134
|
id: id,
|
|
129
135
|
className: className,
|
|
@@ -144,11 +150,9 @@ function (_Component) {
|
|
|
144
150
|
exports.default = Link;
|
|
145
151
|
Link.propTypes = {
|
|
146
152
|
/**
|
|
147
|
-
* The
|
|
148
|
-
* in callbacks. The ID needs to be unique across all of the
|
|
149
|
-
* components in an app.
|
|
153
|
+
* The children of this component
|
|
150
154
|
*/
|
|
151
|
-
|
|
155
|
+
children: _propTypes.default.node,
|
|
152
156
|
|
|
153
157
|
/**
|
|
154
158
|
* The URL of a linked resource.
|
|
@@ -156,19 +160,14 @@ Link.propTypes = {
|
|
|
156
160
|
href: _propTypes.default.string.isRequired,
|
|
157
161
|
|
|
158
162
|
/**
|
|
159
|
-
*
|
|
160
|
-
*/
|
|
161
|
-
refresh: _propTypes.default.bool,
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Often used with CSS to style elements with common properties.
|
|
163
|
+
* Specifies where to open the link reference.
|
|
165
164
|
*/
|
|
166
|
-
|
|
165
|
+
target: _propTypes.default.string,
|
|
167
166
|
|
|
168
167
|
/**
|
|
169
|
-
*
|
|
168
|
+
* Controls whether or not the page will refresh when the link is clicked
|
|
170
169
|
*/
|
|
171
|
-
|
|
170
|
+
refresh: _propTypes.default.bool,
|
|
172
171
|
|
|
173
172
|
/**
|
|
174
173
|
* Adds the title attribute to your link, which can contain supplementary
|
|
@@ -177,14 +176,21 @@ Link.propTypes = {
|
|
|
177
176
|
title: _propTypes.default.string,
|
|
178
177
|
|
|
179
178
|
/**
|
|
180
|
-
*
|
|
179
|
+
* Often used with CSS to style elements with common properties.
|
|
181
180
|
*/
|
|
182
|
-
|
|
181
|
+
className: _propTypes.default.string,
|
|
183
182
|
|
|
184
183
|
/**
|
|
185
|
-
*
|
|
184
|
+
* Defines CSS styles which will override styles previously set.
|
|
186
185
|
*/
|
|
187
|
-
|
|
186
|
+
style: _propTypes.default.object,
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* The ID of this component, used to identify dash components
|
|
190
|
+
* in callbacks. The ID needs to be unique across all of the
|
|
191
|
+
* components in an app.
|
|
192
|
+
*/
|
|
193
|
+
id: _propTypes.default.string,
|
|
188
194
|
|
|
189
195
|
/**
|
|
190
196
|
* Object that holds the loading state object coming from dash-renderer
|