dash-core-components 2.14.2 → 2.14.3
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-highlight.js +1 -1
- package/dash_core_components/async-highlight.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/Link.react.js +7 -5
- package/lib/components/Loading.react.js +10 -13
- package/lib/components/Tab.react.js +14 -7
- package/lib/components/Tabs.react.js +6 -2
- package/lib/components/Tooltip.react.js +26 -18
- package/package.json +8 -7
|
@@ -7,9 +7,12 @@ exports.default = void 0;
|
|
|
7
7
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _ramda = require("ramda");
|
|
10
|
+
var _excluded = ["refresh"];
|
|
10
11
|
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
12
|
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
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
15
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
13
16
|
/*
|
|
14
17
|
* event polyfill for IE
|
|
15
18
|
* https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
|
|
@@ -34,7 +37,10 @@ CustomEvent.prototype = window.Event.prototype;
|
|
|
34
37
|
* For links with destinations outside the current app, `html.A` is a better
|
|
35
38
|
* component to use.
|
|
36
39
|
*/
|
|
37
|
-
var Link = function Link(
|
|
40
|
+
var Link = function Link(_ref) {
|
|
41
|
+
var _ref$refresh = _ref.refresh,
|
|
42
|
+
refresh = _ref$refresh === void 0 ? false : _ref$refresh,
|
|
43
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
38
44
|
var className = props.className,
|
|
39
45
|
style = props.style,
|
|
40
46
|
id = props.id,
|
|
@@ -43,7 +49,6 @@ var Link = function Link(props) {
|
|
|
43
49
|
children = props.children,
|
|
44
50
|
title = props.title,
|
|
45
51
|
target = props.target,
|
|
46
|
-
refresh = props.refresh,
|
|
47
52
|
setProps = props.setProps;
|
|
48
53
|
var cleanUrl = window.dash_clientside.clean_url;
|
|
49
54
|
var sanitizedUrl = (0, _react.useMemo)(function () {
|
|
@@ -141,7 +146,4 @@ Link.propTypes = {
|
|
|
141
146
|
}),
|
|
142
147
|
setProps: _propTypes.default.func
|
|
143
148
|
};
|
|
144
|
-
Link.defaultProps = {
|
|
145
|
-
refresh: false
|
|
146
|
-
};
|
|
147
149
|
var _default = exports.default = Link;
|
|
@@ -41,8 +41,10 @@ var getSpinner = function getSpinner(spinnerType) {
|
|
|
41
41
|
var Loading = function Loading(_ref) {
|
|
42
42
|
var children = _ref.children,
|
|
43
43
|
loading_state = _ref.loading_state,
|
|
44
|
-
display = _ref.display,
|
|
45
|
-
|
|
44
|
+
_ref$display = _ref.display,
|
|
45
|
+
display = _ref$display === void 0 ? 'auto' : _ref$display,
|
|
46
|
+
_ref$color = _ref.color,
|
|
47
|
+
color = _ref$color === void 0 ? '#119DFF' : _ref$color,
|
|
46
48
|
id = _ref.id,
|
|
47
49
|
className = _ref.className,
|
|
48
50
|
style = _ref.style,
|
|
@@ -51,10 +53,13 @@ var Loading = function Loading(_ref) {
|
|
|
51
53
|
overlay_style = _ref.overlay_style,
|
|
52
54
|
fullscreen = _ref.fullscreen,
|
|
53
55
|
debug = _ref.debug,
|
|
54
|
-
show_initially = _ref.show_initially,
|
|
56
|
+
_ref$show_initially = _ref.show_initially,
|
|
57
|
+
show_initially = _ref$show_initially === void 0 ? true : _ref$show_initially,
|
|
55
58
|
spinnerType = _ref.type,
|
|
56
|
-
delay_hide = _ref.delay_hide,
|
|
57
|
-
|
|
59
|
+
_ref$delay_hide = _ref.delay_hide,
|
|
60
|
+
delay_hide = _ref$delay_hide === void 0 ? 0 : _ref$delay_hide,
|
|
61
|
+
_ref$delay_show = _ref.delay_show,
|
|
62
|
+
delay_show = _ref$delay_show === void 0 ? 0 : _ref$delay_show,
|
|
58
63
|
target_components = _ref.target_components,
|
|
59
64
|
custom_spinner = _ref.custom_spinner;
|
|
60
65
|
var coveringSpinner = {
|
|
@@ -159,14 +164,6 @@ var Loading = function Loading(_ref) {
|
|
|
159
164
|
}))));
|
|
160
165
|
};
|
|
161
166
|
Loading._dashprivate_isLoadingComponent = true;
|
|
162
|
-
Loading.defaultProps = {
|
|
163
|
-
type: 'default',
|
|
164
|
-
color: '#119DFF',
|
|
165
|
-
delay_show: 0,
|
|
166
|
-
delay_hide: 0,
|
|
167
|
-
show_initially: true,
|
|
168
|
-
display: 'auto'
|
|
169
|
-
};
|
|
170
167
|
Loading.propTypes = {
|
|
171
168
|
/**
|
|
172
169
|
* The ID of this component, used to identify dash components
|
|
@@ -13,10 +13,23 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
13
13
|
* Part of dcc.Tabs - this is the child Tab component used to render a tabbed page.
|
|
14
14
|
* Its children will be set as the content of that tab, which if clicked will become visible.
|
|
15
15
|
*/
|
|
16
|
+
|
|
17
|
+
/* eslint-disable no-unused-vars */
|
|
16
18
|
var Tab = function Tab(_ref) {
|
|
17
|
-
var children = _ref.children
|
|
19
|
+
var children = _ref.children,
|
|
20
|
+
_ref$disabled = _ref.disabled,
|
|
21
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
22
|
+
_ref$disabled_style = _ref.disabled_style,
|
|
23
|
+
disabled_style = _ref$disabled_style === void 0 ? {
|
|
24
|
+
color: '#d6d6d6'
|
|
25
|
+
} : _ref$disabled_style;
|
|
18
26
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, children);
|
|
19
27
|
};
|
|
28
|
+
/* eslint-enable no-unused-vars */
|
|
29
|
+
|
|
30
|
+
// Default props are defined above for proper docstring generation in React 18.
|
|
31
|
+
// The actual default values are set in Tabs.react.js.
|
|
32
|
+
|
|
20
33
|
Tab.propTypes = {
|
|
21
34
|
/**
|
|
22
35
|
* The ID of this component, used to identify dash components
|
|
@@ -82,10 +95,4 @@ Tab.propTypes = {
|
|
|
82
95
|
component_name: _propTypes.default.string
|
|
83
96
|
})
|
|
84
97
|
};
|
|
85
|
-
Tab.defaultProps = {
|
|
86
|
-
disabled: false,
|
|
87
|
-
disabled_style: {
|
|
88
|
-
color: '#d6d6d6'
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
98
|
var _default = exports.default = Tab;
|
|
@@ -41,8 +41,12 @@ var EnhancedTab = function EnhancedTab(_ref) {
|
|
|
41
41
|
selected_style = _ref.selected_style,
|
|
42
42
|
selectHandler = _ref.selectHandler,
|
|
43
43
|
value = _ref.value,
|
|
44
|
-
disabled = _ref.disabled,
|
|
45
|
-
|
|
44
|
+
_ref$disabled = _ref.disabled,
|
|
45
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
46
|
+
_ref$disabled_style = _ref.disabled_style,
|
|
47
|
+
disabled_style = _ref$disabled_style === void 0 ? {
|
|
48
|
+
color: '#d6d6d6'
|
|
49
|
+
} : _ref$disabled_style,
|
|
46
50
|
disabled_className = _ref.disabled_className,
|
|
47
51
|
mobile_breakpoint = _ref.mobile_breakpoint,
|
|
48
52
|
amountOfTabs = _ref.amountOfTabs,
|
|
@@ -7,42 +7,50 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _style = _interopRequireDefault(require("styled-jsx/style"));
|
|
10
|
+
var _excluded = ["show", "targetable", "direction", "border_color", "background_color", "className", "zindex", "loading_text"];
|
|
10
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
11
14
|
// eslint-disable-line no-unused-vars
|
|
12
15
|
|
|
13
16
|
/**
|
|
14
17
|
* A tooltip with an absolute position.
|
|
15
18
|
*/
|
|
16
|
-
var Tooltip = function Tooltip(
|
|
19
|
+
var Tooltip = function Tooltip(_ref) {
|
|
20
|
+
var _ref$show = _ref.show,
|
|
21
|
+
show = _ref$show === void 0 ? true : _ref$show,
|
|
22
|
+
_ref$targetable = _ref.targetable,
|
|
23
|
+
targetable = _ref$targetable === void 0 ? false : _ref$targetable,
|
|
24
|
+
_ref$direction = _ref.direction,
|
|
25
|
+
direction = _ref$direction === void 0 ? 'right' : _ref$direction,
|
|
26
|
+
_ref$border_color = _ref.border_color,
|
|
27
|
+
border_color = _ref$border_color === void 0 ? '#d6d6d6' : _ref$border_color,
|
|
28
|
+
_ref$background_color = _ref.background_color,
|
|
29
|
+
background_color = _ref$background_color === void 0 ? 'white' : _ref$background_color,
|
|
30
|
+
_ref$className = _ref.className,
|
|
31
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
32
|
+
_ref$zindex = _ref.zindex,
|
|
33
|
+
zindex = _ref$zindex === void 0 ? 1 : _ref$zindex,
|
|
34
|
+
_ref$loading_text = _ref.loading_text,
|
|
35
|
+
loading_text = _ref$loading_text === void 0 ? 'Loading...' : _ref$loading_text,
|
|
36
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
37
|
var bbox = props.bbox,
|
|
18
|
-
border_color = props.border_color,
|
|
19
|
-
background_color = props.background_color,
|
|
20
38
|
id = props.id,
|
|
21
39
|
loading_state = props.loading_state;
|
|
22
40
|
var is_loading = loading_state === null || loading_state === void 0 ? void 0 : loading_state.is_loading;
|
|
23
|
-
var
|
|
41
|
+
var show_tooltip = show && bbox;
|
|
24
42
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
25
43
|
className: "dcc-tooltip-bounding-box"
|
|
26
44
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
27
45
|
"data-dash-is-loading": is_loading || undefined,
|
|
28
|
-
className: "hover hover-".concat(
|
|
46
|
+
className: "hover hover-".concat(direction)
|
|
29
47
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
30
48
|
id: id,
|
|
31
|
-
className: "hover-content ".concat(
|
|
49
|
+
className: "hover-content ".concat(className),
|
|
32
50
|
style: props.style
|
|
33
|
-
}, is_loading ? /*#__PURE__*/_react.default.createElement("span", null,
|
|
51
|
+
}, is_loading ? /*#__PURE__*/_react.default.createElement("span", null, loading_text) : props.children))), /*#__PURE__*/_react.default.createElement("style", {
|
|
34
52
|
jsx: true
|
|
35
|
-
}, "\n .dcc-tooltip-bounding-box {\n position: absolute;\n top: ".concat((bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, "px;\n left: ").concat((bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, "px;\n width: ").concat((bbox === null || bbox === void 0 ? void 0 : bbox.x1) - (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, "px;\n height: ").concat((bbox === null || bbox === void 0 ? void 0 : bbox.y1) - (bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, "px;\n display: ").concat(
|
|
36
|
-
};
|
|
37
|
-
Tooltip.defaultProps = {
|
|
38
|
-
show: true,
|
|
39
|
-
targetable: false,
|
|
40
|
-
direction: 'right',
|
|
41
|
-
border_color: '#d6d6d6',
|
|
42
|
-
background_color: 'white',
|
|
43
|
-
className: '',
|
|
44
|
-
zindex: 1,
|
|
45
|
-
loading_text: 'Loading...'
|
|
53
|
+
}, "\n .dcc-tooltip-bounding-box {\n position: absolute;\n top: ".concat((bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, "px;\n left: ").concat((bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, "px;\n width: ").concat((bbox === null || bbox === void 0 ? void 0 : bbox.x1) - (bbox === null || bbox === void 0 ? void 0 : bbox.x0) || 0, "px;\n height: ").concat((bbox === null || bbox === void 0 ? void 0 : bbox.y1) - (bbox === null || bbox === void 0 ? void 0 : bbox.y0) || 0, "px;\n display: ").concat(show_tooltip ? 'inline-block' : 'none', ";\n pointer-events: ").concat(targetable ? 'auto' : 'none', ";\n }\n .hover {\n position: absolute;\n }\n .hover-right {\n /* Offset so that the triangle caret lands directly on what's hovered */\n transform: translate(5px, 0);\n top: 50%;\n left: 100%;\n }\n .hover-left {\n transform: translate(-5px, 0);\n top: 50%;\n }\n .hover-bottom {\n transform: translate(0, 6px);\n top: 100%;\n left: 50%;\n }\n .hover-top {\n transform: translate(0, -5px);\n left: 50%;\n }\n .hover-content {\n position: absolute;\n border: 1px solid ").concat(border_color, ";\n border-radius: 2px;\n padding: 5px 10px;\n background: ").concat(background_color, ";\n white-space: nowrap;\n z-index: ").concat(zindex, ";\n pointer-events: none;\n }\n .hover .hover-content,\n .hover-right .hover-content {\n transform: translate(0, -50%);\n }\n .hover-left .hover-content {\n transform: translate(-100%, -50%);\n }\n .hover-top .hover-content {\n transform: translate(-50%, -100%);\n }\n .hover-bottom .hover-content {\n transform: translate(-50%, 0);\n }\n /* Add a small triangle on the left side of the box */\n .hover:before,\n .hover:after {\n content: '';\n width: 0;\n height: 0;\n position: absolute;\n border-style: solid;\n top: -6px;\n z-index: ").concat(zindex, ";\n }\n .hover:before,\n .hover:after,\n .hover-right:before,\n .hover-right:after {\n border-width: 6px 6px 6px 0;\n }\n .hover-top:before,\n .hover-top:after {\n border-width: 6px 6px 0 6px;\n }\n .hover-bottom:before,\n .hover-bottom:after {\n border-width: 0 6px 6px 6px;\n }\n .hover-left:before,\n .hover-left:after {\n border-width: 6px 0 6px 6px;\n }\n .hover:before,\n .hover-right:before {\n border-color: transparent ").concat(border_color, " transparent\n transparent;\n left: -5px;\n }\n .hover:after,\n .hover-right:after {\n border-color: transparent ").concat(background_color, " transparent\n transparent;\n left: -4px;\n }\n .hover-left:before {\n border-color: transparent transparent transparent\n ").concat(border_color, ";\n left: -1px;\n }\n .hover-left:after {\n border-color: transparent transparent transparent\n ").concat(background_color, ";\n left: -2px;\n }\n .hover-top:before,\n .hover-top:after,\n .hover-bottom:before,\n .hover-bottom:after {\n left: -6px;\n }\n .hover-bottom:before {\n border-color: transparent transparent ").concat(border_color, "\n transparent;\n }\n .hover-bottom:after {\n border-color: transparent transparent ").concat(background_color, "\n transparent;\n top: -5px;\n }\n .hover-top:before {\n border-color: ").concat(border_color, " transparent transparent\n transparent;\n top: -1px;\n }\n .hover-top:after {\n border-color: ").concat(background_color, " transparent transparent\n transparent;\n top: -2px;\n }\n ")));
|
|
46
54
|
};
|
|
47
55
|
Tooltip.propTypes = {
|
|
48
56
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dash-core-components",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.3",
|
|
4
4
|
"description": "Core component suite for Dash",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -64,14 +64,15 @@
|
|
|
64
64
|
"uniqid": "^5.4.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@babel/cli": "^7.25.
|
|
68
|
-
"@babel/core": "^7.25.
|
|
67
|
+
"@babel/cli": "^7.25.7",
|
|
68
|
+
"@babel/core": "^7.25.8",
|
|
69
|
+
"@babel/eslint-parser": "^7.25.8",
|
|
69
70
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
70
|
-
"@babel/preset-env": "^7.25.
|
|
71
|
-
"@babel/preset-react": "^7.
|
|
71
|
+
"@babel/preset-env": "^7.25.8",
|
|
72
|
+
"@babel/preset-react": "^7.25.7",
|
|
72
73
|
"@plotly/dash-component-plugins": "^1.2.3",
|
|
73
74
|
"@plotly/webpack-dash-dynamic-import": "^1.3.0",
|
|
74
|
-
"babel-loader": "^9.1
|
|
75
|
+
"babel-loader": "^9.2.1",
|
|
75
76
|
"component-playground": "^3.2.1",
|
|
76
77
|
"copyfiles": "^2.4.1",
|
|
77
78
|
"css-loader": "^6.8.1",
|
|
@@ -89,7 +90,7 @@
|
|
|
89
90
|
"rimraf": "^5.0.5",
|
|
90
91
|
"style-loader": "^3.3.3",
|
|
91
92
|
"styled-jsx": "^3.4.4",
|
|
92
|
-
"webpack": "^5.
|
|
93
|
+
"webpack": "^5.95.0",
|
|
93
94
|
"webpack-cli": "^5.1.4"
|
|
94
95
|
},
|
|
95
96
|
"optionalDependencies": {
|