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
|
});
|
|
@@ -23,25 +25,29 @@ var _ramda = require("ramda");
|
|
|
23
25
|
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
26
|
-
function
|
|
28
|
+
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); }
|
|
27
29
|
|
|
28
|
-
function
|
|
30
|
+
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; }
|
|
29
31
|
|
|
30
32
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
31
33
|
|
|
32
34
|
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); } }
|
|
33
35
|
|
|
34
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
36
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
35
37
|
|
|
36
|
-
function
|
|
38
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
37
39
|
|
|
38
|
-
function
|
|
40
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
39
41
|
|
|
40
|
-
function
|
|
42
|
+
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); }; }
|
|
41
43
|
|
|
42
|
-
function
|
|
44
|
+
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); }
|
|
43
45
|
|
|
44
|
-
function
|
|
46
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
47
|
+
|
|
48
|
+
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; } }
|
|
49
|
+
|
|
50
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
45
51
|
|
|
46
52
|
function getSpinner(spinnerType) {
|
|
47
53
|
switch (spinnerType) {
|
|
@@ -80,15 +86,15 @@ var coveringSpinner = {
|
|
|
80
86
|
* A Loading component that wraps any other component and displays a spinner until the wrapped component has rendered.
|
|
81
87
|
*/
|
|
82
88
|
|
|
83
|
-
var Loading =
|
|
84
|
-
/*#__PURE__*/
|
|
85
|
-
function (_Component) {
|
|
89
|
+
var Loading = /*#__PURE__*/function (_Component) {
|
|
86
90
|
_inherits(Loading, _Component);
|
|
87
91
|
|
|
92
|
+
var _super = _createSuper(Loading);
|
|
93
|
+
|
|
88
94
|
function Loading() {
|
|
89
95
|
_classCallCheck(this, Loading);
|
|
90
96
|
|
|
91
|
-
return
|
|
97
|
+
return _super.apply(this, arguments);
|
|
92
98
|
}
|
|
93
99
|
|
|
94
100
|
_createClass(Loading, [{
|
|
@@ -106,12 +112,12 @@ function (_Component) {
|
|
|
106
112
|
spinnerType = _this$props.type;
|
|
107
113
|
var isLoading = loading_state && loading_state.is_loading;
|
|
108
114
|
var Spinner = isLoading && getSpinner(spinnerType);
|
|
109
|
-
return _react.default.createElement("div", {
|
|
115
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
110
116
|
className: parent_className,
|
|
111
117
|
style: isLoading ? (0, _ramda.mergeRight)(hiddenContainer, parent_style) : parent_style
|
|
112
|
-
}, this.props.children, _react.default.createElement("div", {
|
|
118
|
+
}, this.props.children, /*#__PURE__*/_react.default.createElement("div", {
|
|
113
119
|
style: isLoading ? coveringSpinner : {}
|
|
114
|
-
}, isLoading && _react.default.createElement(Spinner, {
|
|
120
|
+
}, isLoading && /*#__PURE__*/_react.default.createElement(Spinner, {
|
|
115
121
|
className: className,
|
|
116
122
|
style: style,
|
|
117
123
|
status: loading_state,
|
|
@@ -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,41 +17,41 @@ var _dashComponentPlugins = require("@plotly/dash-component-plugins");
|
|
|
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
21
|
|
|
22
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); } }
|
|
23
23
|
|
|
24
|
-
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; }
|
|
25
25
|
|
|
26
|
-
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); }
|
|
27
27
|
|
|
28
|
-
function
|
|
28
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
29
|
|
|
30
|
-
function
|
|
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
31
|
|
|
32
|
-
function
|
|
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); }
|
|
33
33
|
|
|
34
|
-
function
|
|
34
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
35
35
|
|
|
36
|
-
|
|
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; } }
|
|
37
|
+
|
|
38
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
39
|
|
|
38
40
|
/**
|
|
39
41
|
* Update and track the current window.location object through the window.history state.
|
|
40
42
|
* Use in conjunction with the `dash_core_components.Link` component to make apps with multiple pages.
|
|
41
43
|
*/
|
|
42
|
-
var Location =
|
|
43
|
-
/*#__PURE__*/
|
|
44
|
-
function (_Component) {
|
|
44
|
+
var Location = /*#__PURE__*/function (_Component) {
|
|
45
45
|
_inherits(Location, _Component);
|
|
46
46
|
|
|
47
|
+
var _super = _createSuper(Location);
|
|
48
|
+
|
|
47
49
|
function Location(props) {
|
|
48
50
|
var _this;
|
|
49
51
|
|
|
50
52
|
_classCallCheck(this, Location);
|
|
51
53
|
|
|
52
|
-
_this =
|
|
54
|
+
_this = _super.call(this, props);
|
|
53
55
|
_this.updateLocation = _this.updateLocation.bind(_assertThisInitialized(_this));
|
|
54
56
|
_this.onLocationChange = _this.onLocationChange.bind(_assertThisInitialized(_this));
|
|
55
57
|
return _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
|
});
|
|
@@ -13,23 +15,25 @@ require("./css/logout.css");
|
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
17
|
|
|
16
|
-
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); }
|
|
17
|
-
|
|
18
18
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19
19
|
|
|
20
20
|
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
21
|
|
|
22
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
22
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
23
23
|
|
|
24
|
-
function
|
|
24
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
25
25
|
|
|
26
|
-
function
|
|
26
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
27
27
|
|
|
28
|
-
function
|
|
28
|
+
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); }; }
|
|
29
29
|
|
|
30
|
-
function
|
|
30
|
+
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); }
|
|
31
31
|
|
|
32
|
-
function
|
|
32
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
33
|
+
|
|
34
|
+
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; } }
|
|
35
|
+
|
|
36
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
33
37
|
|
|
34
38
|
/**
|
|
35
39
|
* Logout button to submit a form post request to the `logout_url` prop.
|
|
@@ -54,15 +58,15 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
|
54
58
|
* See https://dash.plotly.com/dash-core-components/logout_button
|
|
55
59
|
* for more documentation and examples.
|
|
56
60
|
*/
|
|
57
|
-
var LogoutButton =
|
|
58
|
-
/*#__PURE__*/
|
|
59
|
-
function (_React$Component) {
|
|
61
|
+
var LogoutButton = /*#__PURE__*/function (_React$Component) {
|
|
60
62
|
_inherits(LogoutButton, _React$Component);
|
|
61
63
|
|
|
64
|
+
var _super = _createSuper(LogoutButton);
|
|
65
|
+
|
|
62
66
|
function LogoutButton() {
|
|
63
67
|
_classCallCheck(this, LogoutButton);
|
|
64
68
|
|
|
65
|
-
return
|
|
69
|
+
return _super.apply(this, arguments);
|
|
66
70
|
}
|
|
67
71
|
|
|
68
72
|
_createClass(LogoutButton, [{
|
|
@@ -86,12 +90,12 @@ function (_React$Component) {
|
|
|
86
90
|
submitMethod = method;
|
|
87
91
|
}
|
|
88
92
|
|
|
89
|
-
return _react.default.createElement("form", {
|
|
93
|
+
return /*#__PURE__*/_react.default.createElement("form", {
|
|
90
94
|
"data-dash-is-loading": loading_state && loading_state.is_loading || undefined,
|
|
91
95
|
action: url,
|
|
92
96
|
method: submitMethod,
|
|
93
97
|
className: "dash-logout-frame"
|
|
94
|
-
}, _react.default.createElement("button", {
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
95
99
|
className: "dash-logout-btn ".concat(className || ''),
|
|
96
100
|
style: style,
|
|
97
101
|
id: id,
|
|
@@ -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.
|
|
8
|
+
exports.propTypes = exports.defaultProps = exports.default = void 0;
|
|
7
9
|
|
|
8
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
11
|
|
|
@@ -11,29 +13,33 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
13
|
|
|
12
14
|
var _markdown = _interopRequireDefault(require("../utils/LazyLoader/markdown"));
|
|
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); }
|
|
29
31
|
|
|
30
|
-
function
|
|
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); }; }
|
|
31
33
|
|
|
32
|
-
function
|
|
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); }
|
|
33
35
|
|
|
34
|
-
function
|
|
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; } }
|
|
35
39
|
|
|
36
|
-
|
|
40
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
41
|
+
|
|
42
|
+
var RealDashMarkdown = /*#__PURE__*/(0, _react.lazy)(_markdown.default); // eslint-disable-next-line valid-jsdoc
|
|
37
43
|
|
|
38
44
|
/**
|
|
39
45
|
* A component that renders Markdown text as specified by the
|
|
@@ -41,23 +47,23 @@ var RealDashMarkdown = (0, _react.lazy)(_markdown.default); // eslint-disable-ne
|
|
|
41
47
|
* [react-markdown](https://rexxars.github.io/react-markdown/) under the hood.
|
|
42
48
|
*/
|
|
43
49
|
|
|
44
|
-
var DashMarkdown =
|
|
45
|
-
/*#__PURE__*/
|
|
46
|
-
function (_Component) {
|
|
50
|
+
var DashMarkdown = /*#__PURE__*/function (_Component) {
|
|
47
51
|
_inherits(DashMarkdown, _Component);
|
|
48
52
|
|
|
53
|
+
var _super = _createSuper(DashMarkdown);
|
|
54
|
+
|
|
49
55
|
function DashMarkdown() {
|
|
50
56
|
_classCallCheck(this, DashMarkdown);
|
|
51
57
|
|
|
52
|
-
return
|
|
58
|
+
return _super.apply(this, arguments);
|
|
53
59
|
}
|
|
54
60
|
|
|
55
61
|
_createClass(DashMarkdown, [{
|
|
56
62
|
key: "render",
|
|
57
63
|
value: function render() {
|
|
58
|
-
return _react.default.createElement(_react.Suspense, {
|
|
64
|
+
return /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
59
65
|
fallback: null
|
|
60
|
-
}, _react.default.createElement(RealDashMarkdown, this.props));
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement(RealDashMarkdown, this.props));
|
|
61
67
|
}
|
|
62
68
|
}]);
|
|
63
69
|
|
|
@@ -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,11 +13,13 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
13
|
|
|
12
14
|
require("./css/react-select@1.0.0-rc.3.min.css");
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
var _optionTypes = require("../utils/optionTypes");
|
|
15
17
|
|
|
16
|
-
function
|
|
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
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
23
|
|
|
20
24
|
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
25
|
|
|
@@ -23,17 +27,21 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
23
27
|
|
|
24
28
|
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
29
|
|
|
26
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
30
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
31
|
|
|
28
|
-
function
|
|
32
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
29
33
|
|
|
30
|
-
function
|
|
34
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
35
|
|
|
32
|
-
function
|
|
36
|
+
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
37
|
|
|
34
|
-
function
|
|
38
|
+
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
39
|
|
|
36
|
-
function
|
|
40
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
41
|
+
|
|
42
|
+
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; } }
|
|
43
|
+
|
|
44
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
45
|
|
|
38
46
|
/**
|
|
39
47
|
* RadioItems is a component that encapsulates several radio item inputs.
|
|
@@ -41,15 +49,15 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
|
41
49
|
* property and the seleced item is specified with the `value` property.
|
|
42
50
|
* Each radio item is rendered as an input with a surrounding label.
|
|
43
51
|
*/
|
|
44
|
-
var RadioItems =
|
|
45
|
-
/*#__PURE__*/
|
|
46
|
-
function (_Component) {
|
|
52
|
+
var RadioItems = /*#__PURE__*/function (_Component) {
|
|
47
53
|
_inherits(RadioItems, _Component);
|
|
48
54
|
|
|
55
|
+
var _super = _createSuper(RadioItems);
|
|
56
|
+
|
|
49
57
|
function RadioItems() {
|
|
50
58
|
_classCallCheck(this, RadioItems);
|
|
51
59
|
|
|
52
|
-
return
|
|
60
|
+
return _super.apply(this, arguments);
|
|
53
61
|
}
|
|
54
62
|
|
|
55
63
|
_createClass(RadioItems, [{
|
|
@@ -66,7 +74,8 @@ function (_Component) {
|
|
|
66
74
|
options = _this$props.options,
|
|
67
75
|
setProps = _this$props.setProps,
|
|
68
76
|
loading_state = _this$props.loading_state,
|
|
69
|
-
value = _this$props.value
|
|
77
|
+
value = _this$props.value,
|
|
78
|
+
inline = _this$props.inline;
|
|
70
79
|
var ids = {};
|
|
71
80
|
|
|
72
81
|
if (id) {
|
|
@@ -76,17 +85,19 @@ function (_Component) {
|
|
|
76
85
|
};
|
|
77
86
|
}
|
|
78
87
|
|
|
79
|
-
return _react.default.createElement("div", _extends({
|
|
88
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
80
89
|
"data-dash-is-loading": loading_state && loading_state.is_loading || undefined
|
|
81
90
|
}, ids, {
|
|
82
91
|
className: className,
|
|
83
92
|
style: style
|
|
84
|
-
}), options.map(function (option) {
|
|
85
|
-
return _react.default.createElement("label", {
|
|
86
|
-
style: labelStyle,
|
|
93
|
+
}), (0, _optionTypes.sanitizeOptions)(options).map(function (option) {
|
|
94
|
+
return /*#__PURE__*/_react.default.createElement("label", {
|
|
95
|
+
style: Object.assign({}, labelStyle, inline ? {
|
|
96
|
+
display: 'inline-block'
|
|
97
|
+
} : {}),
|
|
87
98
|
className: labelClassName,
|
|
88
99
|
key: option.value
|
|
89
|
-
}, _react.default.createElement("input", {
|
|
100
|
+
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
90
101
|
checked: option.value === value,
|
|
91
102
|
className: inputClassName,
|
|
92
103
|
disabled: Boolean(option.disabled),
|
|
@@ -108,38 +119,61 @@ function (_Component) {
|
|
|
108
119
|
exports.default = RadioItems;
|
|
109
120
|
RadioItems.propTypes = {
|
|
110
121
|
/**
|
|
111
|
-
*
|
|
112
|
-
* in callbacks. The ID needs to be unique across all of the
|
|
113
|
-
* components in an app.
|
|
122
|
+
* An array of options, or inline dictionary of options
|
|
114
123
|
*/
|
|
115
|
-
|
|
116
|
-
|
|
124
|
+
options: _propTypes.default.oneOfType([
|
|
117
125
|
/**
|
|
118
|
-
*
|
|
126
|
+
* Array of options where the label and the value are the same thing - [string|number|bool]
|
|
119
127
|
*/
|
|
120
|
-
|
|
128
|
+
_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool])),
|
|
129
|
+
/**
|
|
130
|
+
* Simpler `options` representation in dictionary format. The order is not guaranteed.
|
|
131
|
+
* {`value1`: `label1`, `value2`: `label2`, ... }
|
|
132
|
+
* which is equal to
|
|
133
|
+
* [{label: `label1`, value: `value1`}, {label: `label2`, value: `value2`}, ...]
|
|
134
|
+
*/
|
|
135
|
+
_propTypes.default.object,
|
|
136
|
+
/**
|
|
137
|
+
* An array of options {label: [string|number], value: [string|number]},
|
|
138
|
+
* an optional disabled field can be used for each option
|
|
139
|
+
*/
|
|
140
|
+
_propTypes.default.arrayOf(_propTypes.default.exact({
|
|
121
141
|
/**
|
|
122
|
-
* The
|
|
142
|
+
* The option's label
|
|
123
143
|
*/
|
|
124
|
-
label: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]).isRequired,
|
|
144
|
+
label: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool]).isRequired,
|
|
125
145
|
|
|
126
146
|
/**
|
|
127
|
-
* The value of the
|
|
147
|
+
* The value of the option. This value
|
|
128
148
|
* corresponds to the items specified in the
|
|
129
149
|
* `value` property.
|
|
130
150
|
*/
|
|
131
|
-
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]).isRequired,
|
|
151
|
+
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool]).isRequired,
|
|
132
152
|
|
|
133
153
|
/**
|
|
134
|
-
* If true, this
|
|
154
|
+
* If true, this option is disabled and cannot be selected.
|
|
135
155
|
*/
|
|
136
|
-
disabled: _propTypes.default.bool
|
|
137
|
-
|
|
156
|
+
disabled: _propTypes.default.bool,
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The HTML 'title' attribute for the option. Allows for
|
|
160
|
+
* information on hover. For more information on this attribute,
|
|
161
|
+
* see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title
|
|
162
|
+
*/
|
|
163
|
+
title: _propTypes.default.string
|
|
164
|
+
}))]),
|
|
138
165
|
|
|
139
166
|
/**
|
|
140
167
|
* The currently selected value
|
|
141
168
|
*/
|
|
142
|
-
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
169
|
+
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool]),
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Indicates whether labelStyle should be inline or not
|
|
173
|
+
* True: Automatically set { 'display': 'inline-block' } to labelStyle
|
|
174
|
+
* False: No additional styles are passed into labelStyle.
|
|
175
|
+
*/
|
|
176
|
+
inline: _propTypes.default.bool,
|
|
143
177
|
|
|
144
178
|
/**
|
|
145
179
|
* The style of the container (div)
|
|
@@ -173,6 +207,13 @@ RadioItems.propTypes = {
|
|
|
173
207
|
*/
|
|
174
208
|
labelClassName: _propTypes.default.string,
|
|
175
209
|
|
|
210
|
+
/**
|
|
211
|
+
* The ID of this component, used to identify dash components
|
|
212
|
+
* in callbacks. The ID needs to be unique across all of the
|
|
213
|
+
* components in an app.
|
|
214
|
+
*/
|
|
215
|
+
id: _propTypes.default.string,
|
|
216
|
+
|
|
176
217
|
/**
|
|
177
218
|
* Dash-assigned callback that gets fired when the value changes.
|
|
178
219
|
*/
|
|
@@ -230,5 +271,6 @@ RadioItems.defaultProps = {
|
|
|
230
271
|
labelClassName: '',
|
|
231
272
|
options: [],
|
|
232
273
|
persisted_props: ['value'],
|
|
233
|
-
persistence_type: 'local'
|
|
274
|
+
persistence_type: 'local',
|
|
275
|
+
inline: false
|
|
234
276
|
};
|