dash-core-components 2.6.2 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 -1
- package/dash_core_components/async-plotlyjs.js +1 -1
- package/dash_core_components/async-slider.js +2 -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/plotly.min.js +7 -7
- package/lib/components/Checklist.react.js +14 -61
- package/lib/components/Clipboard.react.js +12 -82
- package/lib/components/ConfirmDialog.react.js +5 -35
- package/lib/components/ConfirmDialogProvider.react.js +7 -45
- package/lib/components/DatePickerRange.react.js +3 -64
- package/lib/components/DatePickerSingle.react.js +3 -58
- package/lib/components/Download.react.js +8 -41
- package/lib/components/Dropdown.react.js +3 -51
- package/lib/components/Graph.react.js +17 -121
- package/lib/components/Input.react.js +9 -80
- package/lib/components/Interval.react.js +10 -42
- package/lib/components/Link.react.js +18 -62
- package/lib/components/Loading.react.js +12 -59
- package/lib/components/Location.react.js +18 -56
- package/lib/components/LogoutButton.react.js +8 -42
- package/lib/components/Markdown.react.js +3 -52
- package/lib/components/RadioItems.react.js +15 -63
- package/lib/components/RangeSlider.react.js +3 -53
- package/lib/components/Slider.react.js +3 -50
- package/lib/components/Store.react.js +17 -69
- package/lib/components/Tab.react.js +1 -23
- package/lib/components/Tabs.react.js +26 -92
- package/lib/components/Textarea.react.js +9 -70
- package/lib/components/Tooltip.react.js +4 -25
- package/lib/components/Upload.react.js +3 -50
- package/lib/fragments/DatePickerRange.react.js +36 -83
- package/lib/fragments/DatePickerSingle.react.js +27 -67
- package/lib/fragments/Dropdown.react.js +50 -86
- package/lib/fragments/Graph.privateprops.js +0 -3
- package/lib/fragments/Graph.react.js +51 -153
- package/lib/fragments/Loading/spinners/CircleSpinner.js +5 -14
- package/lib/fragments/Loading/spinners/CubeSpinner.js +5 -16
- package/lib/fragments/Loading/spinners/DefaultSpinner.js +5 -14
- package/lib/fragments/Loading/spinners/DotSpinner.js +5 -14
- package/lib/fragments/Loading/spinners/GraphSpinner.js +4 -13
- package/lib/fragments/Markdown.react.js +13 -60
- package/lib/fragments/Math.react.js +2 -28
- package/lib/fragments/RangeSlider.react.js +20 -60
- package/lib/fragments/Slider.react.js +20 -60
- package/lib/fragments/Upload.react.js +23 -52
- package/lib/index.js +0 -28
- package/lib/third-party/highlight.js +0 -40
- package/lib/utils/DatePickerPersistence.js +0 -5
- package/lib/utils/LazyLoader/datePickerRange.js +1 -5
- package/lib/utils/LazyLoader/datePickerSingle.js +1 -5
- package/lib/utils/LazyLoader/dropdown.js +1 -5
- package/lib/utils/LazyLoader/graph.js +1 -5
- package/lib/utils/LazyLoader/hljs.js +1 -5
- package/lib/utils/LazyLoader/markdown.js +1 -5
- package/lib/utils/LazyLoader/mathjax.js +1 -5
- package/lib/utils/LazyLoader/plotly.js +1 -5
- package/lib/utils/LazyLoader/rangeSlider.js +1 -5
- package/lib/utils/LazyLoader/slider.js +1 -5
- package/lib/utils/LazyLoader/upload.js +1 -5
- package/lib/utils/MarkdownHighlighter.js +0 -6
- package/lib/utils/computeSliderMarkers.js +17 -68
- package/lib/utils/computeSliderStyle.js +0 -6
- package/lib/utils/convertToMoment.js +0 -8
- package/lib/utils/mathjax.js +0 -1
- package/lib/utils/optionTypes.js +3 -18
- package/package.json +17 -17
- package/lib/components/css/react-virtualized-select@3.1.0.css +0 -22
|
@@ -1,40 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
|
-
|
|
10
7
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
9
|
require("./css/logout.css");
|
|
15
|
-
|
|
16
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
11
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19
|
-
|
|
20
12
|
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
|
-
|
|
22
13
|
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
|
-
|
|
24
14
|
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); }
|
|
25
|
-
|
|
26
15
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
27
|
-
|
|
28
16
|
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
|
-
|
|
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
|
-
|
|
17
|
+
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); }
|
|
32
18
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
33
|
-
|
|
34
19
|
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
20
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
|
-
|
|
38
21
|
/**
|
|
39
22
|
* Logout button to submit a form post request to the `logout_url` prop.
|
|
40
23
|
* Usage is intended for dash-deployment-server authentication.
|
|
@@ -60,28 +43,23 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
60
43
|
*/
|
|
61
44
|
var LogoutButton = /*#__PURE__*/function (_React$Component) {
|
|
62
45
|
_inherits(LogoutButton, _React$Component);
|
|
63
|
-
|
|
64
46
|
var _super = _createSuper(LogoutButton);
|
|
65
|
-
|
|
66
47
|
function LogoutButton() {
|
|
67
48
|
_classCallCheck(this, LogoutButton);
|
|
68
|
-
|
|
69
49
|
return _super.apply(this, arguments);
|
|
70
50
|
}
|
|
71
|
-
|
|
72
51
|
_createClass(LogoutButton, [{
|
|
73
52
|
key: "render",
|
|
74
53
|
value: function render() {
|
|
75
54
|
var _this$props = this.props,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
55
|
+
id = _this$props.id,
|
|
56
|
+
logout_url = _this$props.logout_url,
|
|
57
|
+
label = _this$props.label,
|
|
58
|
+
className = _this$props.className,
|
|
59
|
+
style = _this$props.style,
|
|
60
|
+
method = _this$props.method,
|
|
61
|
+
loading_state = _this$props.loading_state;
|
|
83
62
|
var url, submitMethod;
|
|
84
|
-
|
|
85
63
|
if (!logout_url) {
|
|
86
64
|
url = logout_url || 'https://dash.plotly.com/dash-core-components/logout_button';
|
|
87
65
|
submitMethod = 'get';
|
|
@@ -89,7 +67,6 @@ var LogoutButton = /*#__PURE__*/function (_React$Component) {
|
|
|
89
67
|
url = logout_url;
|
|
90
68
|
submitMethod = method;
|
|
91
69
|
}
|
|
92
|
-
|
|
93
70
|
return /*#__PURE__*/_react.default.createElement("form", {
|
|
94
71
|
"data-dash-is-loading": loading_state && loading_state.is_loading || undefined,
|
|
95
72
|
action: url,
|
|
@@ -103,10 +80,8 @@ var LogoutButton = /*#__PURE__*/function (_React$Component) {
|
|
|
103
80
|
}, label));
|
|
104
81
|
}
|
|
105
82
|
}]);
|
|
106
|
-
|
|
107
83
|
return LogoutButton;
|
|
108
84
|
}(_react.default.Component);
|
|
109
|
-
|
|
110
85
|
exports.default = LogoutButton;
|
|
111
86
|
LogoutButton.defaultProps = {
|
|
112
87
|
label: 'Logout',
|
|
@@ -117,37 +92,30 @@ LogoutButton.propTypes = {
|
|
|
117
92
|
* Id of the button.
|
|
118
93
|
*/
|
|
119
94
|
id: _propTypes.default.string,
|
|
120
|
-
|
|
121
95
|
/**
|
|
122
96
|
* Text of the button
|
|
123
97
|
*/
|
|
124
98
|
label: _propTypes.default.string,
|
|
125
|
-
|
|
126
99
|
/**
|
|
127
100
|
* Url to submit a post logout request.
|
|
128
101
|
*/
|
|
129
102
|
logout_url: _propTypes.default.string,
|
|
130
|
-
|
|
131
103
|
/**
|
|
132
104
|
* Style of the button
|
|
133
105
|
*/
|
|
134
106
|
style: _propTypes.default.object,
|
|
135
|
-
|
|
136
107
|
/**
|
|
137
108
|
* Http method to submit the logout form.
|
|
138
109
|
*/
|
|
139
110
|
method: _propTypes.default.string,
|
|
140
|
-
|
|
141
111
|
/**
|
|
142
112
|
* CSS class for the button.
|
|
143
113
|
*/
|
|
144
114
|
className: _propTypes.default.string,
|
|
145
|
-
|
|
146
115
|
/**
|
|
147
116
|
* Dash-assigned callback that gets fired when the value changes.
|
|
148
117
|
*/
|
|
149
118
|
setProps: _propTypes.default.func,
|
|
150
|
-
|
|
151
119
|
/**
|
|
152
120
|
* Object that holds the loading state object coming from dash-renderer
|
|
153
121
|
*/
|
|
@@ -156,12 +124,10 @@ LogoutButton.propTypes = {
|
|
|
156
124
|
* Determines if the component is loading or not
|
|
157
125
|
*/
|
|
158
126
|
is_loading: _propTypes.default.bool,
|
|
159
|
-
|
|
160
127
|
/**
|
|
161
128
|
* Holds which property is loading
|
|
162
129
|
*/
|
|
163
130
|
prop_name: _propTypes.default.string,
|
|
164
|
-
|
|
165
131
|
/**
|
|
166
132
|
* Holds the name of the component that is loading
|
|
167
133
|
*/
|
|
@@ -1,62 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.propTypes = exports.defaultProps = exports.default = void 0;
|
|
9
|
-
|
|
10
7
|
var _dashComponentPlugins = require("@plotly/dash-component-plugins");
|
|
11
|
-
|
|
12
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
10
|
var _markdown = _interopRequireDefault(require("../utils/LazyLoader/markdown"));
|
|
17
|
-
|
|
18
11
|
var _mathjax = _interopRequireDefault(require("../utils/LazyLoader/mathjax"));
|
|
19
|
-
|
|
20
12
|
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
|
-
|
|
22
|
-
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
|
-
|
|
13
|
+
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; }
|
|
24
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
15
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
|
-
|
|
28
16
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29
|
-
|
|
30
17
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
31
|
-
|
|
32
18
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
33
|
-
|
|
34
19
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
35
|
-
|
|
36
20
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
|
-
|
|
38
21
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
39
|
-
|
|
40
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); } }
|
|
41
|
-
|
|
42
23
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
43
|
-
|
|
44
24
|
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); }
|
|
45
|
-
|
|
46
25
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
47
|
-
|
|
48
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); }; }
|
|
49
|
-
|
|
50
|
-
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); }
|
|
51
|
-
|
|
27
|
+
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); }
|
|
52
28
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
53
|
-
|
|
54
29
|
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; } }
|
|
55
|
-
|
|
56
30
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
57
|
-
|
|
58
31
|
// eslint-disable-next-line valid-jsdoc
|
|
59
|
-
|
|
60
32
|
/**
|
|
61
33
|
* A component that renders Markdown text as specified by the
|
|
62
34
|
* GitHub Markdown spec. These component uses
|
|
@@ -64,23 +36,16 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
64
36
|
*/
|
|
65
37
|
var DashMarkdown = /*#__PURE__*/function (_Component) {
|
|
66
38
|
_inherits(DashMarkdown, _Component);
|
|
67
|
-
|
|
68
39
|
var _super = _createSuper(DashMarkdown);
|
|
69
|
-
|
|
70
40
|
function DashMarkdown(props) {
|
|
71
41
|
var _this;
|
|
72
|
-
|
|
73
42
|
_classCallCheck(this, DashMarkdown);
|
|
74
|
-
|
|
75
43
|
_this = _super.call(this, props);
|
|
76
|
-
|
|
77
44
|
if (props.mathjax) {
|
|
78
45
|
DashMarkdown._loadMathjax = true;
|
|
79
46
|
}
|
|
80
|
-
|
|
81
47
|
return _this;
|
|
82
48
|
}
|
|
83
|
-
|
|
84
49
|
_createClass(DashMarkdown, [{
|
|
85
50
|
key: "render",
|
|
86
51
|
value: function render() {
|
|
@@ -89,10 +54,8 @@ var DashMarkdown = /*#__PURE__*/function (_Component) {
|
|
|
89
54
|
}, /*#__PURE__*/_react.default.createElement(RealDashMarkdown, this.props));
|
|
90
55
|
}
|
|
91
56
|
}]);
|
|
92
|
-
|
|
93
57
|
return DashMarkdown;
|
|
94
58
|
}(_react.Component);
|
|
95
|
-
|
|
96
59
|
exports.default = DashMarkdown;
|
|
97
60
|
DashMarkdown.propTypes = {
|
|
98
61
|
/**
|
|
@@ -101,17 +64,14 @@ DashMarkdown.propTypes = {
|
|
|
101
64
|
* components in an app.
|
|
102
65
|
*/
|
|
103
66
|
id: _propTypes.default.string,
|
|
104
|
-
|
|
105
67
|
/**
|
|
106
68
|
* Class name of the container element
|
|
107
69
|
*/
|
|
108
70
|
className: _propTypes.default.string,
|
|
109
|
-
|
|
110
71
|
/**
|
|
111
72
|
* If true, loads mathjax v3 (tex-svg) into the page and use it in the markdown
|
|
112
73
|
*/
|
|
113
74
|
mathjax: _propTypes.default.bool,
|
|
114
|
-
|
|
115
75
|
/**
|
|
116
76
|
* A boolean to control raw HTML escaping.
|
|
117
77
|
* Setting HTML from code is risky because it's easy to
|
|
@@ -119,17 +79,14 @@ DashMarkdown.propTypes = {
|
|
|
119
79
|
* (https://en.wikipedia.org/wiki/Cross-site_scripting) attack.
|
|
120
80
|
*/
|
|
121
81
|
dangerously_allow_html: _propTypes.default.bool,
|
|
122
|
-
|
|
123
82
|
/**
|
|
124
83
|
* A string for the target attribute to use on links (such as "_blank")
|
|
125
84
|
*/
|
|
126
85
|
link_target: _propTypes.default.string,
|
|
127
|
-
|
|
128
86
|
/**
|
|
129
87
|
* A markdown string (or array of strings) that adheres to the CommonMark spec
|
|
130
88
|
*/
|
|
131
89
|
children: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)]),
|
|
132
|
-
|
|
133
90
|
/**
|
|
134
91
|
* Remove matching leading whitespace from all lines.
|
|
135
92
|
* Lines that are empty, or contain *only* whitespace, are ignored.
|
|
@@ -137,7 +94,6 @@ DashMarkdown.propTypes = {
|
|
|
137
94
|
* we will not convert tabs to spaces or vice versa.
|
|
138
95
|
*/
|
|
139
96
|
dedent: _propTypes.default.bool,
|
|
140
|
-
|
|
141
97
|
/**
|
|
142
98
|
* Config options for syntax highlighting.
|
|
143
99
|
*/
|
|
@@ -147,7 +103,6 @@ DashMarkdown.propTypes = {
|
|
|
147
103
|
*/
|
|
148
104
|
theme: _propTypes.default.oneOf(['dark', 'light'])
|
|
149
105
|
}),
|
|
150
|
-
|
|
151
106
|
/**
|
|
152
107
|
* Object that holds the loading state object coming from dash-renderer
|
|
153
108
|
*/
|
|
@@ -156,18 +111,15 @@ DashMarkdown.propTypes = {
|
|
|
156
111
|
* Determines if the component is loading or not
|
|
157
112
|
*/
|
|
158
113
|
is_loading: _propTypes.default.bool,
|
|
159
|
-
|
|
160
114
|
/**
|
|
161
115
|
* Holds which property is loading
|
|
162
116
|
*/
|
|
163
117
|
prop_name: _propTypes.default.string,
|
|
164
|
-
|
|
165
118
|
/**
|
|
166
119
|
* Holds the name of the component that is loading
|
|
167
120
|
*/
|
|
168
121
|
component_name: _propTypes.default.string
|
|
169
122
|
}),
|
|
170
|
-
|
|
171
123
|
/**
|
|
172
124
|
* User-defined inline styles for the rendered Markdown
|
|
173
125
|
*/
|
|
@@ -182,8 +134,7 @@ DashMarkdown.defaultProps = {
|
|
|
182
134
|
var RealDashMarkdown = (0, _dashComponentPlugins.asyncDecorator)(DashMarkdown, function () {
|
|
183
135
|
return Promise.all([(0, _markdown.default)(), DashMarkdown._loadMathjax ? (0, _mathjax.default)() : undefined]).then(function (_ref) {
|
|
184
136
|
var _ref2 = _slicedToArray(_ref, 1),
|
|
185
|
-
|
|
186
|
-
|
|
137
|
+
md = _ref2[0];
|
|
187
138
|
return md;
|
|
188
139
|
});
|
|
189
140
|
});
|
|
@@ -1,48 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
|
-
|
|
10
7
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
9
|
require("./css/react-select@1.0.0-rc.3.min.css");
|
|
15
|
-
|
|
16
10
|
var _optionTypes = require("../utils/optionTypes");
|
|
17
|
-
|
|
18
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
-
|
|
20
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
-
|
|
12
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
22
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
14
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
-
|
|
26
15
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
|
-
|
|
28
16
|
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
|
-
|
|
30
17
|
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
|
-
|
|
32
18
|
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); }
|
|
33
|
-
|
|
34
19
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
35
|
-
|
|
36
20
|
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); }; }
|
|
37
|
-
|
|
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); }
|
|
39
|
-
|
|
21
|
+
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); }
|
|
40
22
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
41
|
-
|
|
42
23
|
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
24
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
45
|
-
|
|
46
25
|
/**
|
|
47
26
|
* RadioItems is a component that encapsulates several radio item inputs.
|
|
48
27
|
* The values and labels of the RadioItems is specified in the `options`
|
|
@@ -51,40 +30,34 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
51
30
|
*/
|
|
52
31
|
var RadioItems = /*#__PURE__*/function (_Component) {
|
|
53
32
|
_inherits(RadioItems, _Component);
|
|
54
|
-
|
|
55
33
|
var _super = _createSuper(RadioItems);
|
|
56
|
-
|
|
57
34
|
function RadioItems() {
|
|
58
35
|
_classCallCheck(this, RadioItems);
|
|
59
|
-
|
|
60
36
|
return _super.apply(this, arguments);
|
|
61
37
|
}
|
|
62
|
-
|
|
63
38
|
_createClass(RadioItems, [{
|
|
64
39
|
key: "render",
|
|
65
40
|
value: function render() {
|
|
66
41
|
var _this$props = this.props,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
42
|
+
id = _this$props.id,
|
|
43
|
+
className = _this$props.className,
|
|
44
|
+
style = _this$props.style,
|
|
45
|
+
inputClassName = _this$props.inputClassName,
|
|
46
|
+
inputStyle = _this$props.inputStyle,
|
|
47
|
+
labelClassName = _this$props.labelClassName,
|
|
48
|
+
labelStyle = _this$props.labelStyle,
|
|
49
|
+
options = _this$props.options,
|
|
50
|
+
setProps = _this$props.setProps,
|
|
51
|
+
loading_state = _this$props.loading_state,
|
|
52
|
+
value = _this$props.value,
|
|
53
|
+
inline = _this$props.inline;
|
|
79
54
|
var ids = {};
|
|
80
|
-
|
|
81
55
|
if (id) {
|
|
82
56
|
ids = {
|
|
83
|
-
id
|
|
57
|
+
id,
|
|
84
58
|
key: id
|
|
85
59
|
};
|
|
86
60
|
}
|
|
87
|
-
|
|
88
61
|
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
89
62
|
"data-dash-is-loading": loading_state && loading_state.is_loading || undefined
|
|
90
63
|
}, ids, {
|
|
@@ -112,10 +85,8 @@ var RadioItems = /*#__PURE__*/function (_Component) {
|
|
|
112
85
|
}));
|
|
113
86
|
}
|
|
114
87
|
}]);
|
|
115
|
-
|
|
116
88
|
return RadioItems;
|
|
117
89
|
}(_react.Component);
|
|
118
|
-
|
|
119
90
|
exports.default = RadioItems;
|
|
120
91
|
RadioItems.propTypes = {
|
|
121
92
|
/**
|
|
@@ -142,19 +113,16 @@ RadioItems.propTypes = {
|
|
|
142
113
|
* The option's label
|
|
143
114
|
*/
|
|
144
115
|
label: _propTypes.default.node.isRequired,
|
|
145
|
-
|
|
146
116
|
/**
|
|
147
117
|
* The value of the option. This value
|
|
148
118
|
* corresponds to the items specified in the
|
|
149
119
|
* `value` property.
|
|
150
120
|
*/
|
|
151
121
|
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool]).isRequired,
|
|
152
|
-
|
|
153
122
|
/**
|
|
154
123
|
* If true, this option is disabled and cannot be selected.
|
|
155
124
|
*/
|
|
156
125
|
disabled: _propTypes.default.bool,
|
|
157
|
-
|
|
158
126
|
/**
|
|
159
127
|
* The HTML 'title' attribute for the option. Allows for
|
|
160
128
|
* information on hover. For more information on this attribute,
|
|
@@ -162,63 +130,52 @@ RadioItems.propTypes = {
|
|
|
162
130
|
*/
|
|
163
131
|
title: _propTypes.default.string
|
|
164
132
|
}))]),
|
|
165
|
-
|
|
166
133
|
/**
|
|
167
134
|
* The currently selected value
|
|
168
135
|
*/
|
|
169
136
|
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.bool]),
|
|
170
|
-
|
|
171
137
|
/**
|
|
172
138
|
* Indicates whether labelStyle should be inline or not
|
|
173
139
|
* True: Automatically set { 'display': 'inline-block' } to labelStyle
|
|
174
140
|
* False: No additional styles are passed into labelStyle.
|
|
175
141
|
*/
|
|
176
142
|
inline: _propTypes.default.bool,
|
|
177
|
-
|
|
178
143
|
/**
|
|
179
144
|
* The style of the container (div)
|
|
180
145
|
*/
|
|
181
146
|
style: _propTypes.default.object,
|
|
182
|
-
|
|
183
147
|
/**
|
|
184
148
|
* The class of the container (div)
|
|
185
149
|
*/
|
|
186
150
|
className: _propTypes.default.string,
|
|
187
|
-
|
|
188
151
|
/**
|
|
189
152
|
* The style of the <input> radio element
|
|
190
153
|
*/
|
|
191
154
|
inputStyle: _propTypes.default.object,
|
|
192
|
-
|
|
193
155
|
/**
|
|
194
156
|
* The class of the <input> radio element
|
|
195
157
|
*/
|
|
196
158
|
inputClassName: _propTypes.default.string,
|
|
197
|
-
|
|
198
159
|
/**
|
|
199
160
|
* The style of the <label> that wraps the radio input
|
|
200
161
|
* and the option's label
|
|
201
162
|
*/
|
|
202
163
|
labelStyle: _propTypes.default.object,
|
|
203
|
-
|
|
204
164
|
/**
|
|
205
165
|
* The class of the <label> that wraps the radio input
|
|
206
166
|
* and the option's label
|
|
207
167
|
*/
|
|
208
168
|
labelClassName: _propTypes.default.string,
|
|
209
|
-
|
|
210
169
|
/**
|
|
211
170
|
* The ID of this component, used to identify dash components
|
|
212
171
|
* in callbacks. The ID needs to be unique across all of the
|
|
213
172
|
* components in an app.
|
|
214
173
|
*/
|
|
215
174
|
id: _propTypes.default.string,
|
|
216
|
-
|
|
217
175
|
/**
|
|
218
176
|
* Dash-assigned callback that gets fired when the value changes.
|
|
219
177
|
*/
|
|
220
178
|
setProps: _propTypes.default.func,
|
|
221
|
-
|
|
222
179
|
/**
|
|
223
180
|
* Object that holds the loading state object coming from dash-renderer
|
|
224
181
|
*/
|
|
@@ -227,18 +184,15 @@ RadioItems.propTypes = {
|
|
|
227
184
|
* Determines if the component is loading or not
|
|
228
185
|
*/
|
|
229
186
|
is_loading: _propTypes.default.bool,
|
|
230
|
-
|
|
231
187
|
/**
|
|
232
188
|
* Holds which property is loading
|
|
233
189
|
*/
|
|
234
190
|
prop_name: _propTypes.default.string,
|
|
235
|
-
|
|
236
191
|
/**
|
|
237
192
|
* Holds the name of the component that is loading
|
|
238
193
|
*/
|
|
239
194
|
component_name: _propTypes.default.string
|
|
240
195
|
}),
|
|
241
|
-
|
|
242
196
|
/**
|
|
243
197
|
* Used to allow user interactions in this component to be persisted when
|
|
244
198
|
* the component - or the page - is refreshed. If `persisted` is truthy and
|
|
@@ -248,14 +202,12 @@ RadioItems.propTypes = {
|
|
|
248
202
|
* Used in conjunction with `persistence_type`.
|
|
249
203
|
*/
|
|
250
204
|
persistence: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.string, _propTypes.default.number]),
|
|
251
|
-
|
|
252
205
|
/**
|
|
253
206
|
* Properties whose user interactions will persist after refreshing the
|
|
254
207
|
* component or the page. Since only `value` is allowed this prop can
|
|
255
208
|
* normally be ignored.
|
|
256
209
|
*/
|
|
257
210
|
persisted_props: _propTypes.default.arrayOf(_propTypes.default.oneOf(['value'])),
|
|
258
|
-
|
|
259
211
|
/**
|
|
260
212
|
* Where persisted user changes will be stored:
|
|
261
213
|
* memory: only kept in memory, reset on page refresh.
|