dash-core-components 3.0.3 → 3.0.4
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-slider.js +1 -1
- package/dash_core_components/async-slider.js.map +1 -1
- package/dash_core_components/async-upload.js +1 -1
- package/dash_core_components/async-upload.js.map +1 -1
- package/dash_core_components/dash_core_components.js +1 -1
- package/dash_core_components/dash_core_components.js.map +1 -1
- package/lib/components/Checklist.react.js +46 -63
- package/lib/components/Clipboard.react.js +172 -218
- package/lib/components/ConfirmDialog.react.js +34 -61
- package/lib/components/ConfirmDialogProvider.react.js +21 -44
- package/lib/components/DatePickerRange.react.js +7 -26
- package/lib/components/DatePickerSingle.react.js +7 -26
- package/lib/components/Download.react.js +22 -45
- package/lib/components/Dropdown.react.js +7 -26
- package/lib/components/Geolocation.react.js +64 -91
- package/lib/components/Graph.react.js +70 -97
- package/lib/components/Input.react.js +119 -162
- package/lib/components/Interval.react.js +55 -86
- package/lib/components/Link.react.js +4 -4
- package/lib/components/Loading.react.js +31 -35
- package/lib/components/Location.react.js +97 -126
- package/lib/components/Markdown.react.js +15 -35
- package/lib/components/RadioItems.react.js +45 -63
- package/lib/components/RangeSlider.react.js +7 -26
- package/lib/components/Slider.react.js +7 -26
- package/lib/components/Store.react.js +128 -176
- package/lib/components/Tab.react.js +1 -1
- package/lib/components/Tabs.react.js +97 -126
- package/lib/components/Textarea.react.js +4 -4
- package/lib/components/Tooltip.react.js +1 -1
- package/lib/components/Upload.react.js +7 -26
- package/lib/fragments/DatePickerRange.react.js +150 -181
- package/lib/fragments/DatePickerSingle.react.js +103 -134
- package/lib/fragments/Dropdown.react.js +11 -19
- package/lib/fragments/Graph.privateprops.js +3 -9
- package/lib/fragments/Graph.react.js +302 -370
- package/lib/fragments/Loading/spinners/CircleSpinner.js +2 -4
- package/lib/fragments/Loading/spinners/CubeSpinner.js +2 -4
- package/lib/fragments/Loading/spinners/DefaultSpinner.js +2 -4
- package/lib/fragments/Loading/spinners/DotSpinner.js +2 -4
- package/lib/fragments/Loading/spinners/GraphSpinner.js +2 -4
- package/lib/fragments/Markdown.react.js +119 -158
- package/lib/fragments/Math.react.js +23 -47
- package/lib/fragments/RangeSlider.react.js +110 -133
- package/lib/fragments/Slider.react.js +110 -133
- package/lib/fragments/Upload.react.js +82 -99
- package/lib/utils/DatePickerPersistence.js +2 -4
- package/lib/utils/LazyLoader/datePickerRange.js +2 -3
- package/lib/utils/LazyLoader/datePickerSingle.js +2 -3
- package/lib/utils/LazyLoader/dropdown.js +2 -3
- package/lib/utils/LazyLoader/graph.js +2 -3
- package/lib/utils/LazyLoader/hljs.js +2 -5
- package/lib/utils/LazyLoader/markdown.js +2 -3
- package/lib/utils/LazyLoader/mathjax.js +2 -5
- package/lib/utils/LazyLoader/plotly.js +7 -6
- package/lib/utils/LazyLoader/rangeSlider.js +2 -3
- package/lib/utils/LazyLoader/slider.js +2 -3
- package/lib/utils/LazyLoader/upload.js +2 -3
- package/lib/utils/MarkdownHighlighter.js +5 -6
- package/lib/utils/ResizeDetector.js +8 -12
- package/lib/utils/computeSliderMarkers.js +29 -49
- package/lib/utils/computeSliderStyle.js +4 -3
- package/lib/utils/convertToMoment.js +5 -6
- package/lib/utils/formatSliderTooltip.js +6 -8
- package/lib/utils/optionTypes.js +8 -9
- package/package.json +1 -1
|
@@ -12,22 +12,6 @@ var _LoadingElement = _interopRequireDefault(require("../utils/LoadingElement"))
|
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
16
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
18
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
19
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
20
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
21
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
22
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
23
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
24
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
25
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
26
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
27
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
28
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
29
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
30
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
31
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33
17
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -37,7 +21,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
37
21
|
// eslint-disable-line no-unused-vars
|
|
38
22
|
// EnhancedTab is defined here instead of in Tab.react.js because if exported there,
|
|
39
23
|
// it will mess up the Python imports and metadata.json
|
|
40
|
-
var EnhancedTab =
|
|
24
|
+
var EnhancedTab = _ref => {
|
|
41
25
|
var id = _ref.id,
|
|
42
26
|
label = _ref.label,
|
|
43
27
|
selected = _ref.selected,
|
|
@@ -96,7 +80,7 @@ var EnhancedTab = function EnhancedTab(_ref) {
|
|
|
96
80
|
className: tabClassName,
|
|
97
81
|
id: id,
|
|
98
82
|
style: tabStyle,
|
|
99
|
-
onClick:
|
|
83
|
+
onClick: () => {
|
|
100
84
|
if (!disabled) {
|
|
101
85
|
selectHandler(value);
|
|
102
86
|
}
|
|
@@ -118,123 +102,110 @@ EnhancedTab.defaultProps = {
|
|
|
118
102
|
* can be dcc.Tab components, which can hold a label that will be displayed as a tab, and can in turn hold
|
|
119
103
|
* children components that will be that tab's content.
|
|
120
104
|
*/
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
_this.props.setProps({
|
|
129
|
-
value: _this.valueOrDefault()
|
|
105
|
+
class Tabs extends _react.Component {
|
|
106
|
+
constructor(props) {
|
|
107
|
+
super(props);
|
|
108
|
+
this.selectHandler = this.selectHandler.bind(this);
|
|
109
|
+
if (!(0, _ramda.has)('value', this.props)) {
|
|
110
|
+
this.props.setProps({
|
|
111
|
+
value: this.valueOrDefault()
|
|
130
112
|
});
|
|
131
113
|
}
|
|
132
|
-
return _this;
|
|
133
114
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
value: function valueOrDefault() {
|
|
138
|
-
if ((0, _ramda.has)('value', this.props)) {
|
|
139
|
-
return this.props.value;
|
|
140
|
-
}
|
|
141
|
-
var children = this.parseChildrenToArray();
|
|
142
|
-
if (children && children.length) {
|
|
143
|
-
var firstChildren = window.dash_component_api.getLayout([].concat(_toConsumableArray(children[0].props.componentPath), ['props', 'value']));
|
|
144
|
-
return firstChildren || 'tab-1';
|
|
145
|
-
}
|
|
146
|
-
return 'tab-1';
|
|
115
|
+
valueOrDefault() {
|
|
116
|
+
if ((0, _ramda.has)('value', this.props)) {
|
|
117
|
+
return this.props.value;
|
|
147
118
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
// if dcc.Tabs.children contains just one single element, it gets passed as an object
|
|
153
|
-
// instead of an array - so we put it in an array ourselves!
|
|
154
|
-
return [this.props.children];
|
|
155
|
-
}
|
|
156
|
-
return this.props.children;
|
|
119
|
+
var children = this.parseChildrenToArray();
|
|
120
|
+
if (children && children.length) {
|
|
121
|
+
var firstChildren = window.dash_component_api.getLayout([...children[0].props.componentPath, 'props', 'value']);
|
|
122
|
+
return firstChildren || 'tab-1';
|
|
157
123
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
124
|
+
return 'tab-1';
|
|
125
|
+
}
|
|
126
|
+
parseChildrenToArray() {
|
|
127
|
+
if (this.props.children && !(0, _ramda.is)(Array, this.props.children)) {
|
|
128
|
+
// if dcc.Tabs.children contains just one single element, it gets passed as an object
|
|
129
|
+
// instead of an array - so we put it in an array ourselves!
|
|
130
|
+
return [this.props.children];
|
|
164
131
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
if (childProps.value === value) {
|
|
193
|
-
selectedTab = child;
|
|
194
|
-
}
|
|
195
|
-
return /*#__PURE__*/_react.default.createElement(EnhancedTab, {
|
|
196
|
-
key: index,
|
|
197
|
-
id: childProps.id,
|
|
198
|
-
label: childProps.label,
|
|
199
|
-
selected: value === childProps.value,
|
|
200
|
-
selectHandler: _this2.selectHandler,
|
|
201
|
-
className: childProps.className,
|
|
202
|
-
style: childProps.style,
|
|
203
|
-
selectedClassName: childProps.selected_className,
|
|
204
|
-
selected_style: childProps.selected_style,
|
|
205
|
-
value: childProps.value,
|
|
206
|
-
disabled: childProps.disabled,
|
|
207
|
-
disabled_style: childProps.disabled_style,
|
|
208
|
-
disabled_className: childProps.disabled_className,
|
|
209
|
-
mobile_breakpoint: _this2.props.mobile_breakpoint,
|
|
210
|
-
vertical: _this2.props.vertical,
|
|
211
|
-
amountOfTabs: amountOfTabs,
|
|
212
|
-
colors: _this2.props.colors,
|
|
213
|
-
componentPath: child.componentPath
|
|
132
|
+
return this.props.children;
|
|
133
|
+
}
|
|
134
|
+
selectHandler(value) {
|
|
135
|
+
this.props.setProps({
|
|
136
|
+
value: value
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
render() {
|
|
140
|
+
var EnhancedTabs;
|
|
141
|
+
var selectedTab;
|
|
142
|
+
var value = this.valueOrDefault();
|
|
143
|
+
if (this.props.children) {
|
|
144
|
+
var children = this.parseChildrenToArray();
|
|
145
|
+
var amountOfTabs = children.length;
|
|
146
|
+
EnhancedTabs = children.map((child, index) => {
|
|
147
|
+
// TODO: handle components that are not dcc.Tab components (throw error)
|
|
148
|
+
// enhance Tab components coming from Dash (as dcc.Tab) with methods needed for handling logic
|
|
149
|
+
var childProps;
|
|
150
|
+
if (/*#__PURE__*/_react.default.isValidElement(child)) {
|
|
151
|
+
childProps = window.dash_component_api.getLayout([...child.props.componentPath, 'props']);
|
|
152
|
+
} else {
|
|
153
|
+
// In case the selected tab is a string.
|
|
154
|
+
childProps = {};
|
|
155
|
+
}
|
|
156
|
+
if (!childProps.value) {
|
|
157
|
+
childProps = _objectSpread(_objectSpread({}, childProps), {}, {
|
|
158
|
+
value: "tab-".concat(index + 1)
|
|
214
159
|
});
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// check if this child/Tab is currently selected
|
|
163
|
+
if (childProps.value === value) {
|
|
164
|
+
selectedTab = child;
|
|
165
|
+
}
|
|
166
|
+
return /*#__PURE__*/_react.default.createElement(EnhancedTab, {
|
|
167
|
+
key: index,
|
|
168
|
+
id: childProps.id,
|
|
169
|
+
label: childProps.label,
|
|
170
|
+
selected: value === childProps.value,
|
|
171
|
+
selectHandler: this.selectHandler,
|
|
172
|
+
className: childProps.className,
|
|
173
|
+
style: childProps.style,
|
|
174
|
+
selectedClassName: childProps.selected_className,
|
|
175
|
+
selected_style: childProps.selected_style,
|
|
176
|
+
value: childProps.value,
|
|
177
|
+
disabled: childProps.disabled,
|
|
178
|
+
disabled_style: childProps.disabled_style,
|
|
179
|
+
disabled_className: childProps.disabled_className,
|
|
180
|
+
mobile_breakpoint: this.props.mobile_breakpoint,
|
|
181
|
+
vertical: this.props.vertical,
|
|
182
|
+
amountOfTabs: amountOfTabs,
|
|
183
|
+
colors: this.props.colors,
|
|
184
|
+
componentPath: child.componentPath
|
|
215
185
|
});
|
|
216
|
-
}
|
|
217
|
-
var selectedTabContent = !(0, _ramda.isNil)(selectedTab) ? selectedTab : '';
|
|
218
|
-
var tabContainerClass = this.props.vertical ? 'tab-container tab-container--vert' : 'tab-container';
|
|
219
|
-
var tabContentClass = this.props.vertical ? 'tab-content tab-content--vert' : 'tab-content';
|
|
220
|
-
var tabParentClass = this.props.vertical ? 'tab-parent tab-parent--vert' : 'tab-parent';
|
|
221
|
-
return /*#__PURE__*/_react.default.createElement(_LoadingElement.default, {
|
|
222
|
-
className: "".concat(tabParentClass, " ").concat(this.props.parent_className || ''),
|
|
223
|
-
style: this.props.parent_style,
|
|
224
|
-
id: "".concat(this.props.id, "-parent")
|
|
225
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
226
|
-
className: "".concat(tabContainerClass, " ").concat(this.props.className || ''),
|
|
227
|
-
style: this.props.style,
|
|
228
|
-
id: this.props.id
|
|
229
|
-
}, EnhancedTabs), /*#__PURE__*/_react.default.createElement("div", {
|
|
230
|
-
className: "".concat(tabContentClass, " ").concat(this.props.content_className || ''),
|
|
231
|
-
style: this.props.content_style
|
|
232
|
-
}, selectedTabContent || ''), /*#__PURE__*/_react.default.createElement("style", {
|
|
233
|
-
jsx: true
|
|
234
|
-
}, "\n .tab-parent {\n display: flex;\n flex-direction: column;\n }\n .tab-container {\n display: flex;\n flex-direction: column;\n }\n .tab-container--vert {\n display: inline-flex;\n }\n .tab-content--vert {\n display: inline-flex;\n flex-direction: column;\n }\n @media screen and (min-width: ".concat(this.props.mobile_breakpoint, "px) {\n :global(.tab-container--vert .tab) {\n width: auto;\n border-right: none !important;\n border-bottom: none !important;\n }\n :global(.tab-container--vert .tab:last-of-type) {\n border-bottom: 1px solid ").concat(this.props.colors.border, " !important;\n }\n :global(.tab-container--vert .tab--selected) {\n border-top: 1px solid ").concat(this.props.colors.border, ";\n border-left: 2px solid ").concat(this.props.colors.primary, ";\n border-right: none;\n }\n .tab-container {\n flex-direction: row;\n }\n .tab-container--vert {\n flex-direction: column;\n }\n .tab-parent--vert {\n display: inline-flex;\n flex-direction: row;\n }\n }\n ")));
|
|
186
|
+
});
|
|
235
187
|
}
|
|
236
|
-
|
|
237
|
-
|
|
188
|
+
var selectedTabContent = !(0, _ramda.isNil)(selectedTab) ? selectedTab : '';
|
|
189
|
+
var tabContainerClass = this.props.vertical ? 'tab-container tab-container--vert' : 'tab-container';
|
|
190
|
+
var tabContentClass = this.props.vertical ? 'tab-content tab-content--vert' : 'tab-content';
|
|
191
|
+
var tabParentClass = this.props.vertical ? 'tab-parent tab-parent--vert' : 'tab-parent';
|
|
192
|
+
return /*#__PURE__*/_react.default.createElement(_LoadingElement.default, {
|
|
193
|
+
className: "".concat(tabParentClass, " ").concat(this.props.parent_className || ''),
|
|
194
|
+
style: this.props.parent_style,
|
|
195
|
+
id: "".concat(this.props.id, "-parent")
|
|
196
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
197
|
+
className: "".concat(tabContainerClass, " ").concat(this.props.className || ''),
|
|
198
|
+
style: this.props.style,
|
|
199
|
+
id: this.props.id
|
|
200
|
+
}, EnhancedTabs), /*#__PURE__*/_react.default.createElement("div", {
|
|
201
|
+
className: "".concat(tabContentClass, " ").concat(this.props.content_className || ''),
|
|
202
|
+
style: this.props.content_style
|
|
203
|
+
}, selectedTabContent || ''), /*#__PURE__*/_react.default.createElement("style", {
|
|
204
|
+
jsx: true
|
|
205
|
+
}, "\n .tab-parent {\n display: flex;\n flex-direction: column;\n }\n .tab-container {\n display: flex;\n flex-direction: column;\n }\n .tab-container--vert {\n display: inline-flex;\n }\n .tab-content--vert {\n display: inline-flex;\n flex-direction: column;\n }\n @media screen and (min-width: ".concat(this.props.mobile_breakpoint, "px) {\n :global(.tab-container--vert .tab) {\n width: auto;\n border-right: none !important;\n border-bottom: none !important;\n }\n :global(.tab-container--vert .tab:last-of-type) {\n border-bottom: 1px solid ").concat(this.props.colors.border, " !important;\n }\n :global(.tab-container--vert .tab--selected) {\n border-top: 1px solid ").concat(this.props.colors.border, ";\n border-left: 2px solid ").concat(this.props.colors.primary, ";\n border-right: none;\n }\n .tab-container {\n flex-direction: row;\n }\n .tab-container--vert {\n flex-direction: column;\n }\n .tab-parent--vert {\n display: inline-flex;\n flex-direction: row;\n }\n }\n ")));
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
exports.default = Tabs;
|
|
238
209
|
Tabs.defaultProps = {
|
|
239
210
|
mobile_breakpoint: 800,
|
|
240
211
|
colors: {
|
|
@@ -19,7 +19,7 @@ var textAreaProps = ['id', 'autoFocus', 'cols', 'disabled', 'form', 'maxLength',
|
|
|
19
19
|
* A basic HTML textarea for entering multiline text.
|
|
20
20
|
*
|
|
21
21
|
*/
|
|
22
|
-
var Textarea =
|
|
22
|
+
var Textarea = _ref => {
|
|
23
23
|
var setProps = _ref.setProps,
|
|
24
24
|
value = _ref.value,
|
|
25
25
|
_ref$n_blur = _ref.n_blur,
|
|
@@ -37,18 +37,18 @@ var Textarea = function Textarea(_ref) {
|
|
|
37
37
|
return /*#__PURE__*/_react.default.createElement("textarea", _extends({
|
|
38
38
|
"data-dash-is-loading": isLoading || undefined,
|
|
39
39
|
value: value,
|
|
40
|
-
onChange:
|
|
40
|
+
onChange: e => {
|
|
41
41
|
setProps({
|
|
42
42
|
value: e.target.value
|
|
43
43
|
});
|
|
44
44
|
},
|
|
45
|
-
onBlur:
|
|
45
|
+
onBlur: () => {
|
|
46
46
|
setProps({
|
|
47
47
|
n_blur: n_blur + 1,
|
|
48
48
|
n_blur_timestamp: Date.now()
|
|
49
49
|
});
|
|
50
50
|
},
|
|
51
|
-
onClick:
|
|
51
|
+
onClick: () => {
|
|
52
52
|
setProps({
|
|
53
53
|
n_clicks: n_clicks + 1,
|
|
54
54
|
n_clicks_timestamp: Date.now()
|
|
@@ -15,7 +15,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
15
15
|
/**
|
|
16
16
|
* A tooltip with an absolute position.
|
|
17
17
|
*/
|
|
18
|
-
var Tooltip =
|
|
18
|
+
var Tooltip = _ref => {
|
|
19
19
|
var _ref$show = _ref.show,
|
|
20
20
|
show = _ref$show === void 0 ? true : _ref$show,
|
|
21
21
|
_ref$targetable = _ref.targetable,
|
|
@@ -10,38 +10,19 @@ var _upload = _interopRequireDefault(require("../utils/LazyLoader/upload"));
|
|
|
10
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
17
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
18
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
19
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
20
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
21
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
22
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
23
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
24
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
25
13
|
var RealUpload = /*#__PURE__*/(0, _react.lazy)(_upload.default);
|
|
26
14
|
|
|
27
15
|
/**
|
|
28
16
|
* Upload components allow your app to accept user-uploaded files via drag'n'drop
|
|
29
17
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
class Upload extends _react.Component {
|
|
19
|
+
render() {
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
21
|
+
fallback: null
|
|
22
|
+
}, /*#__PURE__*/_react.default.createElement(RealUpload, this.props));
|
|
34
23
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
key: "render",
|
|
38
|
-
value: function render() {
|
|
39
|
-
return /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
40
|
-
fallback: null
|
|
41
|
-
}, /*#__PURE__*/_react.default.createElement(RealUpload, this.props));
|
|
42
|
-
}
|
|
43
|
-
}]);
|
|
44
|
-
}(_react.Component);
|
|
24
|
+
}
|
|
25
|
+
exports.default = Upload;
|
|
45
26
|
Upload.propTypes = {
|
|
46
27
|
/**
|
|
47
28
|
* The ID of this component, used to identify dash components
|