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
|
});
|
|
@@ -13,32 +15,39 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
15
|
|
|
14
16
|
var _ramda = require("ramda");
|
|
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; }
|
|
19
21
|
|
|
20
|
-
function
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
22
24
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23
25
|
|
|
24
26
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
25
27
|
|
|
26
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
28
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
29
|
|
|
28
|
-
function
|
|
30
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
29
31
|
|
|
30
|
-
function
|
|
32
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
|
+
|
|
34
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
35
|
+
|
|
36
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
31
37
|
|
|
32
38
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
33
39
|
|
|
34
|
-
function
|
|
40
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
35
41
|
|
|
36
|
-
function
|
|
42
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
43
|
|
|
38
|
-
function
|
|
44
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
45
|
+
|
|
46
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
39
47
|
|
|
40
48
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
41
49
|
|
|
50
|
+
// eslint-disable-line no-unused-vars
|
|
42
51
|
// EnhancedTab is defined here instead of in Tab.react.js because if exported there,
|
|
43
52
|
// it will mess up the Python imports and metadata.json
|
|
44
53
|
var EnhancedTab = function EnhancedTab(_ref) {
|
|
@@ -93,7 +102,7 @@ var EnhancedTab = function EnhancedTab(_ref) {
|
|
|
93
102
|
labelDisplay = label;
|
|
94
103
|
}
|
|
95
104
|
|
|
96
|
-
return _react.default.createElement("div", {
|
|
105
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
97
106
|
"data-dash-is-loading": loading_state && loading_state.is_loading || undefined,
|
|
98
107
|
id: id,
|
|
99
108
|
style: tabStyle,
|
|
@@ -103,9 +112,9 @@ var EnhancedTab = function EnhancedTab(_ref) {
|
|
|
103
112
|
}
|
|
104
113
|
},
|
|
105
114
|
className: _style.default.dynamic([["1358318571", [colors.background, colors.border, colors.border, colors.border, colors.primary, mobile_breakpoint, colors.border, vertical ? '' : "width: calc(100% / ".concat(amountOfTabs, ");"), vertical ? "border-left: 2px solid ".concat(colors.primary, ";") : "border-top: 2px solid ".concat(colors.primary, ";")]]]) + " " + (tabClassName || "")
|
|
106
|
-
}, _react.default.createElement("span", {
|
|
115
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
107
116
|
className: _style.default.dynamic([["1358318571", [colors.background, colors.border, colors.border, colors.border, colors.primary, mobile_breakpoint, colors.border, vertical ? '' : "width: calc(100% / ".concat(amountOfTabs, ");"), vertical ? "border-left: 2px solid ".concat(colors.primary, ";") : "border-top: 2px solid ".concat(colors.primary, ";")]]])
|
|
108
|
-
}, labelDisplay), _react.default.createElement(_style.default, {
|
|
117
|
+
}, labelDisplay), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
109
118
|
id: "1358318571",
|
|
110
119
|
dynamic: [colors.background, colors.border, colors.border, colors.border, colors.primary, mobile_breakpoint, colors.border, vertical ? '' : "width: calc(100% / ".concat(amountOfTabs, ");"), vertical ? "border-left: 2px solid ".concat(colors.primary, ";") : "border-top: 2px solid ".concat(colors.primary, ";")]
|
|
111
120
|
}, ".tab.__jsx-style-dynamic-selector{display:inline-block;background-color:".concat(colors.background, ";border:1px solid ").concat(colors.border, ";border-bottom:none;padding:20px 25px;-webkit-transition:background-color,color 200ms;transition:background-color,color 200ms;width:100%;text-align:center;box-sizing:border-box;}.tab.__jsx-style-dynamic-selector:last-of-type{border-right:1px solid ").concat(colors.border, ";border-bottom:1px solid ").concat(colors.border, ";}.tab.__jsx-style-dynamic-selector:hover{cursor:pointer;}.tab--selected.__jsx-style-dynamic-selector{border-top:2px solid ").concat(colors.primary, ";color:black;background-color:white;}.tab--selected.__jsx-style-dynamic-selector:hover{background-color:white;}.tab--disabled.__jsx-style-dynamic-selector{color:#d6d6d6;}@media screen and (min-width:").concat(mobile_breakpoint, "px){.tab.__jsx-style-dynamic-selector{border:1px solid ").concat(colors.border, ";border-right:none;").concat(vertical ? '' : "width: calc(100% / ".concat(amountOfTabs, ");"), ";}.tab--selected.__jsx-style-dynamic-selector,.tab.__jsx-style-dynamic-selector:last-of-type.tab--selected{border-bottom:none;").concat(vertical ? "border-left: 2px solid ".concat(colors.primary, ";") : "border-top: 2px solid ".concat(colors.primary, ";"), ";}}")));
|
|
@@ -124,17 +133,17 @@ EnhancedTab.defaultProps = {
|
|
|
124
133
|
* children components that will be that tab's content.
|
|
125
134
|
*/
|
|
126
135
|
|
|
127
|
-
var Tabs =
|
|
128
|
-
/*#__PURE__*/
|
|
129
|
-
function (_Component) {
|
|
136
|
+
var Tabs = /*#__PURE__*/function (_Component) {
|
|
130
137
|
_inherits(Tabs, _Component);
|
|
131
138
|
|
|
139
|
+
var _super = _createSuper(Tabs);
|
|
140
|
+
|
|
132
141
|
function Tabs(props) {
|
|
133
142
|
var _this;
|
|
134
143
|
|
|
135
144
|
_classCallCheck(this, Tabs);
|
|
136
145
|
|
|
137
|
-
_this =
|
|
146
|
+
_this = _super.call(this, props);
|
|
138
147
|
_this.selectHandler = _this.selectHandler.bind(_assertThisInitialized(_this));
|
|
139
148
|
_this.parseChildrenToArray = _this.parseChildrenToArray.bind(_assertThisInitialized(_this));
|
|
140
149
|
_this.valueOrDefault = _this.valueOrDefault.bind(_assertThisInitialized(_this));
|
|
@@ -210,7 +219,7 @@ function (_Component) {
|
|
|
210
219
|
}
|
|
211
220
|
|
|
212
221
|
if (!childProps.value) {
|
|
213
|
-
childProps = _objectSpread({}, childProps, {
|
|
222
|
+
childProps = _objectSpread(_objectSpread({}, childProps), {}, {
|
|
214
223
|
value: "tab-".concat(index + 1)
|
|
215
224
|
});
|
|
216
225
|
} // check if this child/Tab is currently selected
|
|
@@ -220,7 +229,7 @@ function (_Component) {
|
|
|
220
229
|
selectedTab = child;
|
|
221
230
|
}
|
|
222
231
|
|
|
223
|
-
return _react.default.createElement(EnhancedTab, {
|
|
232
|
+
return /*#__PURE__*/_react.default.createElement(EnhancedTab, {
|
|
224
233
|
key: index,
|
|
225
234
|
id: childProps.id,
|
|
226
235
|
label: childProps.label,
|
|
@@ -233,7 +242,7 @@ function (_Component) {
|
|
|
233
242
|
value: childProps.value,
|
|
234
243
|
disabled: childProps.disabled,
|
|
235
244
|
disabled_style: childProps.disabled_style,
|
|
236
|
-
|
|
245
|
+
disabled_className: childProps.disabled_className,
|
|
237
246
|
mobile_breakpoint: _this2.props.mobile_breakpoint,
|
|
238
247
|
vertical: _this2.props.vertical,
|
|
239
248
|
amountOfTabs: amountOfTabs,
|
|
@@ -247,19 +256,19 @@ function (_Component) {
|
|
|
247
256
|
var tabContainerClass = this.props.vertical ? 'tab-container tab-container--vert' : 'tab-container';
|
|
248
257
|
var tabContentClass = this.props.vertical ? 'tab-content tab-content--vert' : 'tab-content';
|
|
249
258
|
var tabParentClass = this.props.vertical ? 'tab-parent tab-parent--vert' : 'tab-parent';
|
|
250
|
-
return _react.default.createElement("div", {
|
|
259
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
251
260
|
"data-dash-is-loading": this.props.loading_state && this.props.loading_state.is_loading || undefined,
|
|
252
261
|
style: this.props.parent_style,
|
|
253
262
|
id: "".concat(this.props.id, "-parent"),
|
|
254
263
|
className: _style.default.dynamic([["2495343579", [this.props.mobile_breakpoint, this.props.colors.border, this.props.colors.border, this.props.colors.primary]]]) + " " + "".concat(tabParentClass, " ").concat(this.props.parent_className || '')
|
|
255
|
-
}, _react.default.createElement("div", {
|
|
264
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
256
265
|
style: this.props.style,
|
|
257
266
|
id: this.props.id,
|
|
258
267
|
className: _style.default.dynamic([["2495343579", [this.props.mobile_breakpoint, this.props.colors.border, this.props.colors.border, this.props.colors.primary]]]) + " " + "".concat(tabContainerClass, " ").concat(this.props.className || '')
|
|
259
|
-
}, EnhancedTabs), _react.default.createElement("div", {
|
|
268
|
+
}, EnhancedTabs), /*#__PURE__*/_react.default.createElement("div", {
|
|
260
269
|
style: this.props.content_style,
|
|
261
270
|
className: _style.default.dynamic([["2495343579", [this.props.mobile_breakpoint, this.props.colors.border, this.props.colors.border, this.props.colors.primary]]]) + " " + "".concat(tabContentClass, " ").concat(this.props.content_className || '')
|
|
262
|
-
}, selectedTabContent || ''), _react.default.createElement(_style.default, {
|
|
271
|
+
}, selectedTabContent || ''), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
263
272
|
id: "2495343579",
|
|
264
273
|
dynamic: [this.props.mobile_breakpoint, this.props.colors.border, this.props.colors.border, this.props.colors.primary]
|
|
265
274
|
}, ".tab-parent.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.tab-container.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.tab-container--vert.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}.tab-content--vert.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}@media screen and (min-width:".concat(this.props.mobile_breakpoint, "px){.tab-container--vert .tab{width:auto;border-right:none !important;border-bottom:none !important;}.tab-container--vert .tab:last-of-type{border-bottom:1px solid ").concat(this.props.colors.border, " !important;}.tab-container--vert .tab--selected{border-top:1px solid ").concat(this.props.colors.border, ";border-left:2px solid ").concat(this.props.colors.primary, ";border-right:none;}.tab-container.__jsx-style-dynamic-selector{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}.tab-container--vert.__jsx-style-dynamic-selector{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.tab-parent--vert.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}}")));
|
|
@@ -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,9 +15,9 @@ var _ramda = require("ramda");
|
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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; }
|
|
19
21
|
|
|
20
22
|
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
23
|
|
|
@@ -23,31 +25,35 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
23
25
|
|
|
24
26
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
25
27
|
|
|
26
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
28
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
29
|
|
|
28
|
-
function
|
|
30
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
29
31
|
|
|
30
|
-
function
|
|
32
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
33
|
|
|
32
|
-
function
|
|
34
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
33
35
|
|
|
34
|
-
function
|
|
36
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
35
37
|
|
|
36
|
-
function
|
|
38
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
39
|
+
|
|
40
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
|
+
|
|
42
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
43
|
|
|
38
44
|
/**
|
|
39
45
|
* A basic HTML textarea for entering multiline text.
|
|
40
46
|
*
|
|
41
47
|
*/
|
|
42
|
-
var Textarea =
|
|
43
|
-
/*#__PURE__*/
|
|
44
|
-
function (_Component) {
|
|
48
|
+
var Textarea = /*#__PURE__*/function (_Component) {
|
|
45
49
|
_inherits(Textarea, _Component);
|
|
46
50
|
|
|
51
|
+
var _super = _createSuper(Textarea);
|
|
52
|
+
|
|
47
53
|
function Textarea() {
|
|
48
54
|
_classCallCheck(this, Textarea);
|
|
49
55
|
|
|
50
|
-
return
|
|
56
|
+
return _super.apply(this, arguments);
|
|
51
57
|
}
|
|
52
58
|
|
|
53
59
|
_createClass(Textarea, [{
|
|
@@ -59,7 +65,7 @@ function (_Component) {
|
|
|
59
65
|
setProps = _this$props.setProps,
|
|
60
66
|
loading_state = _this$props.loading_state,
|
|
61
67
|
value = _this$props.value;
|
|
62
|
-
return _react.default.createElement("textarea", _extends({
|
|
68
|
+
return /*#__PURE__*/_react.default.createElement("textarea", _extends({
|
|
63
69
|
"data-dash-is-loading": loading_state && loading_state.is_loading || undefined,
|
|
64
70
|
value: value,
|
|
65
71
|
onChange: function onChange(e) {
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _style = _interopRequireDefault(require("styled-jsx/style"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
// eslint-disable-line no-unused-vars
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A tooltip with an absolute position.
|
|
18
|
+
*/
|
|
19
|
+
var Tooltip = function Tooltip(props) {
|
|
20
|
+
var bbox = props.bbox,
|
|
21
|
+
border_color = props.border_color,
|
|
22
|
+
background_color = props.background_color,
|
|
23
|
+
id = props.id,
|
|
24
|
+
loading_state = props.loading_state;
|
|
25
|
+
var is_loading = loading_state === null || loading_state === void 0 ? void 0 : loading_state.is_loading;
|
|
26
|
+
var show = props.show && bbox;
|
|
27
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
className: _style.default.dynamic([["1224640168", [(bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x1) - (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.y1) - (bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, show ? 'inline-block' : 'none', props.targetable ? 'auto' : 'none', border_color, background_color, props.zindex, props.zindex, border_color, background_color, border_color, background_color, border_color, background_color, border_color, background_color]]]) + " " + "dcc-tooltip-bounding-box"
|
|
29
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
30
|
+
"data-dash-is-loading": is_loading || undefined,
|
|
31
|
+
className: _style.default.dynamic([["1224640168", [(bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x1) - (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.y1) - (bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, show ? 'inline-block' : 'none', props.targetable ? 'auto' : 'none', border_color, background_color, props.zindex, props.zindex, border_color, background_color, border_color, background_color, border_color, background_color, border_color, background_color]]]) + " " + "hover hover-".concat(props.direction)
|
|
32
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
33
|
+
id: id,
|
|
34
|
+
style: props.style,
|
|
35
|
+
className: _style.default.dynamic([["1224640168", [(bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x1) - (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.y1) - (bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, show ? 'inline-block' : 'none', props.targetable ? 'auto' : 'none', border_color, background_color, props.zindex, props.zindex, border_color, background_color, border_color, background_color, border_color, background_color, border_color, background_color]]]) + " " + "hover-content ".concat(props.className)
|
|
36
|
+
}, is_loading ? /*#__PURE__*/React.createElement("span", {
|
|
37
|
+
className: _style.default.dynamic([["1224640168", [(bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x1) - (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.y1) - (bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, show ? 'inline-block' : 'none', props.targetable ? 'auto' : 'none', border_color, background_color, props.zindex, props.zindex, border_color, background_color, border_color, background_color, border_color, background_color, border_color, background_color]]])
|
|
38
|
+
}, props.loading_text) : props.children))), /*#__PURE__*/React.createElement(_style.default, {
|
|
39
|
+
id: "1224640168",
|
|
40
|
+
dynamic: [(bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.x1) - (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, (bbox === null || bbox === void 0 ? void 0 : bbox.y1) - (bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, show ? 'inline-block' : 'none', props.targetable ? 'auto' : 'none', border_color, background_color, props.zindex, props.zindex, border_color, background_color, border_color, background_color, border_color, background_color, border_color, background_color]
|
|
41
|
+
}, ".dcc-tooltip-bounding-box.__jsx-style-dynamic-selector{position:absolute;top:".concat((bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, "px;left:").concat((bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, "px;width:").concat((bbox === null || bbox === void 0 ? void 0 : bbox.x1) - (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, "px;height:").concat((bbox === null || bbox === void 0 ? void 0 : bbox.y1) - (bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, "px;display:").concat(show ? 'inline-block' : 'none', ";pointer-events:").concat(props.targetable ? 'auto' : 'none', ";}.hover.__jsx-style-dynamic-selector{position:absolute;}.hover-right.__jsx-style-dynamic-selector{-webkit-transform:translate(5px,0);-ms-transform:translate(5px,0);transform:translate(5px,0);top:50%;left:100%;}.hover-left.__jsx-style-dynamic-selector{-webkit-transform:translate(-5px,0);-ms-transform:translate(-5px,0);transform:translate(-5px,0);top:50%;}.hover-bottom.__jsx-style-dynamic-selector{-webkit-transform:translate(0,6px);-ms-transform:translate(0,6px);transform:translate(0,6px);top:100%;left:50%;}.hover-top.__jsx-style-dynamic-selector{-webkit-transform:translate(0,-5px);-ms-transform:translate(0,-5px);transform:translate(0,-5px);left:50%;}.hover-content.__jsx-style-dynamic-selector{position:absolute;border:1px solid ").concat(border_color, ";border-radius:2px;padding:5px 10px;background:").concat(background_color, ";white-space:nowrap;z-index:").concat(props.zindex, ";pointer-events:none;}.hover.__jsx-style-dynamic-selector .hover-content.__jsx-style-dynamic-selector,.hover-right.__jsx-style-dynamic-selector .hover-content.__jsx-style-dynamic-selector{-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%);}.hover-left.__jsx-style-dynamic-selector .hover-content.__jsx-style-dynamic-selector{-webkit-transform:translate(-100%,-50%);-ms-transform:translate(-100%,-50%);transform:translate(-100%,-50%);}.hover-top.__jsx-style-dynamic-selector .hover-content.__jsx-style-dynamic-selector{-webkit-transform:translate(-50%,-100%);-ms-transform:translate(-50%,-100%);transform:translate(-50%,-100%);}.hover-bottom.__jsx-style-dynamic-selector .hover-content.__jsx-style-dynamic-selector{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);}.hover.__jsx-style-dynamic-selector:before,.hover.__jsx-style-dynamic-selector:after{content:'';width:0;height:0;position:absolute;border-style:solid;top:-6px;z-index:").concat(props.zindex, ";}.hover.__jsx-style-dynamic-selector:before,.hover.__jsx-style-dynamic-selector:after,.hover-right.__jsx-style-dynamic-selector:before,.hover-right.__jsx-style-dynamic-selector:after{border-width:6px 6px 6px 0;}.hover-top.__jsx-style-dynamic-selector:before,.hover-top.__jsx-style-dynamic-selector:after{border-width:6px 6px 0 6px;}.hover-bottom.__jsx-style-dynamic-selector:before,.hover-bottom.__jsx-style-dynamic-selector:after{border-width:0 6px 6px 6px;}.hover-left.__jsx-style-dynamic-selector:before,.hover-left.__jsx-style-dynamic-selector:after{border-width:6px 0 6px 6px;}.hover.__jsx-style-dynamic-selector:before,.hover-right.__jsx-style-dynamic-selector:before{border-color:transparent ").concat(border_color, " transparent transparent;left:-5px;}.hover.__jsx-style-dynamic-selector:after,.hover-right.__jsx-style-dynamic-selector:after{border-color:transparent ").concat(background_color, " transparent transparent;left:-4px;}.hover-left.__jsx-style-dynamic-selector:before{border-color:transparent transparent transparent ").concat(border_color, ";left:-1px;}.hover-left.__jsx-style-dynamic-selector:after{border-color:transparent transparent transparent ").concat(background_color, ";left:-2px;}.hover-top.__jsx-style-dynamic-selector:before,.hover-top.__jsx-style-dynamic-selector:after,.hover-bottom.__jsx-style-dynamic-selector:before,.hover-bottom.__jsx-style-dynamic-selector:after{left:-6px;}.hover-bottom.__jsx-style-dynamic-selector:before{border-color:transparent transparent ").concat(border_color, " transparent;}.hover-bottom.__jsx-style-dynamic-selector:after{border-color:transparent transparent ").concat(background_color, " transparent;top:-5px;}.hover-top.__jsx-style-dynamic-selector:before{border-color:").concat(border_color, " transparent transparent transparent;top:-1px;}.hover-top.__jsx-style-dynamic-selector:after{border-color:").concat(background_color, " transparent transparent transparent;top:-2px;}")));
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
Tooltip.defaultProps = {
|
|
45
|
+
show: true,
|
|
46
|
+
targetable: false,
|
|
47
|
+
direction: 'right',
|
|
48
|
+
border_color: '#d6d6d6',
|
|
49
|
+
background_color: 'white',
|
|
50
|
+
className: '',
|
|
51
|
+
zindex: 1,
|
|
52
|
+
loading_text: 'Loading...'
|
|
53
|
+
};
|
|
54
|
+
Tooltip.propTypes = {
|
|
55
|
+
/**
|
|
56
|
+
* The contents of the tooltip
|
|
57
|
+
*/
|
|
58
|
+
children: _propTypes.default.node,
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The ID of this component, used to identify dash components
|
|
62
|
+
* in callbacks. The ID needs to be unique across all of the
|
|
63
|
+
* components in an app.
|
|
64
|
+
*/
|
|
65
|
+
id: _propTypes.default.string,
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The class of the tooltip
|
|
69
|
+
*/
|
|
70
|
+
className: _propTypes.default.string,
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The style of the tooltip
|
|
74
|
+
*/
|
|
75
|
+
style: _propTypes.default.object,
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The bounding box coordinates of the item to label, in px relative to
|
|
79
|
+
* the positioning parent of the Tooltip component.
|
|
80
|
+
*/
|
|
81
|
+
bbox: _propTypes.default.exact({
|
|
82
|
+
x0: _propTypes.default.number,
|
|
83
|
+
y0: _propTypes.default.number,
|
|
84
|
+
x1: _propTypes.default.number,
|
|
85
|
+
y1: _propTypes.default.number
|
|
86
|
+
}),
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Whether to show the tooltip
|
|
90
|
+
*/
|
|
91
|
+
show: _propTypes.default.bool,
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The side of the `bbox` on which the tooltip should open.
|
|
95
|
+
*/
|
|
96
|
+
direction: _propTypes.default.oneOf(['top', 'right', 'bottom', 'left']),
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Color of the tooltip border, as a CSS color string.
|
|
100
|
+
*/
|
|
101
|
+
border_color: _propTypes.default.string,
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Color of the tooltip background, as a CSS color string.
|
|
105
|
+
*/
|
|
106
|
+
background_color: _propTypes.default.string,
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The text displayed in the tooltip while loading
|
|
110
|
+
*/
|
|
111
|
+
loading_text: _propTypes.default.string,
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The `z-index` CSS property to assign to the tooltip. Components with
|
|
115
|
+
* higher values will be displayed on top of components with lower values.
|
|
116
|
+
*/
|
|
117
|
+
zindex: _propTypes.default.number,
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Whether the tooltip itself can be targeted by pointer events.
|
|
121
|
+
* For tooltips triggered by hover events, typically this should be left
|
|
122
|
+
* `false` to avoid the tooltip interfering with those same events.
|
|
123
|
+
*/
|
|
124
|
+
targetable: _propTypes.default.bool,
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Dash-assigned callback that gets fired when the value changes.
|
|
128
|
+
*/
|
|
129
|
+
setProps: _propTypes.default.func,
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Object that holds the loading state object coming from dash-renderer
|
|
133
|
+
*/
|
|
134
|
+
loading_state: _propTypes.default.shape({
|
|
135
|
+
/**
|
|
136
|
+
* Determines if the component is loading or not
|
|
137
|
+
*/
|
|
138
|
+
is_loading: _propTypes.default.bool,
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Holds which property is loading
|
|
142
|
+
*/
|
|
143
|
+
prop_name: _propTypes.default.string,
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Holds the name of the component that is loading
|
|
147
|
+
*/
|
|
148
|
+
component_name: _propTypes.default.string
|
|
149
|
+
})
|
|
150
|
+
};
|
|
151
|
+
var _default = Tooltip;
|
|
152
|
+
exports.default = _default;
|
|
@@ -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,50 +13,54 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
13
|
|
|
12
14
|
var _upload = _interopRequireDefault(require("../utils/LazyLoader/upload"));
|
|
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 RealUpload = /*#__PURE__*/(0, _react.lazy)(_upload.default);
|
|
37
43
|
/**
|
|
38
44
|
* Upload components allow your app to accept user-uploaded files via drag'n'drop
|
|
39
45
|
*/
|
|
40
46
|
|
|
41
|
-
var Upload =
|
|
42
|
-
/*#__PURE__*/
|
|
43
|
-
function (_Component) {
|
|
47
|
+
var Upload = /*#__PURE__*/function (_Component) {
|
|
44
48
|
_inherits(Upload, _Component);
|
|
45
49
|
|
|
50
|
+
var _super = _createSuper(Upload);
|
|
51
|
+
|
|
46
52
|
function Upload() {
|
|
47
53
|
_classCallCheck(this, Upload);
|
|
48
54
|
|
|
49
|
-
return
|
|
55
|
+
return _super.apply(this, arguments);
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
_createClass(Upload, [{
|
|
53
59
|
key: "render",
|
|
54
60
|
value: function render() {
|
|
55
|
-
return _react.default.createElement(_react.Suspense, {
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
56
62
|
fallback: null
|
|
57
|
-
}, _react.default.createElement(RealUpload, this.props));
|
|
63
|
+
}, /*#__PURE__*/_react.default.createElement(RealUpload, this.props));
|
|
58
64
|
}
|
|
59
65
|
}]);
|
|
60
66
|
|
|
@@ -139,12 +145,12 @@ Upload.propTypes = {
|
|
|
139
145
|
disable_click: _propTypes.default.bool,
|
|
140
146
|
|
|
141
147
|
/**
|
|
142
|
-
* Maximum file size. If `-1`, then infinite
|
|
148
|
+
* Maximum file size in bytes. If `-1`, then infinite
|
|
143
149
|
*/
|
|
144
150
|
max_size: _propTypes.default.number,
|
|
145
151
|
|
|
146
152
|
/**
|
|
147
|
-
* Minimum file size
|
|
153
|
+
* Minimum file size in bytes
|
|
148
154
|
*/
|
|
149
155
|
min_size: _propTypes.default.number,
|
|
150
156
|
|