dash-core-components 2.11.1 → 2.12.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.
|
@@ -5,10 +5,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _default = function _default() {
|
|
8
|
-
return Promise.resolve(window.Plotly ||
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
return Promise.resolve(window.Plotly || new Promise(function (resolve, reject) {
|
|
9
|
+
/* eslint-disable prefer-const */
|
|
10
|
+
var timeoutId;
|
|
11
|
+
var element = document.createElement('script');
|
|
12
|
+
element.src = window._dashPlotlyJSURL;
|
|
13
|
+
element.async = true;
|
|
14
|
+
element.onload = function () {
|
|
15
|
+
clearTimeout(timeoutId);
|
|
16
|
+
resolve();
|
|
17
|
+
};
|
|
18
|
+
element.onerror = function (error) {
|
|
19
|
+
clearTimeout(timeoutId);
|
|
20
|
+
reject(error);
|
|
21
|
+
};
|
|
22
|
+
timeoutId = setTimeout(function () {
|
|
23
|
+
element.src = '';
|
|
24
|
+
reject(new Error("plotly.js did not load after 30 seconds"));
|
|
25
|
+
}, 3 * 10 * 1000);
|
|
26
|
+
document.querySelector('body').appendChild(element);
|
|
12
27
|
}));
|
|
13
28
|
};
|
|
14
29
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dash-core-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"description": "Core component suite for Dash",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"test": "run-s -c lint test:intg test:pyimport",
|
|
24
24
|
"test:intg": "pytest --nopercyfinalize --headless tests/integration ",
|
|
25
25
|
"test:pyimport": "python -m unittest tests/test_dash_import.py",
|
|
26
|
-
"prebuild:js": "cp node_modules/plotly.js-dist-min/plotly.min.js dash_core_components_base/plotly.min.js",
|
|
27
26
|
"build:js": "webpack --mode production",
|
|
28
27
|
"build:backends": "dash-generate-components ./src/components dash_core_components -p package-info.json && cp dash_core_components_base/** dash_core_components/ && dash-generate-components ./src/components dash_core_components -p package-info.json -k RangeSlider,Slider,Dropdown,RadioItems,Checklist,DatePickerSingle,DatePickerRange,Input,Link --r-prefix 'dcc' --r-suggests 'dash,dashHtmlComponents,jsonlite,plotly' --jl-prefix 'dcc' && black dash_core_components",
|
|
29
28
|
"build": "run-s prepublishOnly build:js build:backends",
|
|
@@ -49,7 +48,6 @@
|
|
|
49
48
|
"mathjax": "^3.2.2",
|
|
50
49
|
"moment": "^2.29.4",
|
|
51
50
|
"node-polyfill-webpack-plugin": "^2.0.1",
|
|
52
|
-
"plotly.js-dist-min": "2.25.2",
|
|
53
51
|
"prop-types": "^15.8.1",
|
|
54
52
|
"ramda": "^0.29.0",
|
|
55
53
|
"rc-slider": "^9.7.5",
|
|
@@ -103,6 +101,5 @@
|
|
|
103
101
|
},
|
|
104
102
|
"browserslist": [
|
|
105
103
|
"last 8 years and not dead"
|
|
106
|
-
]
|
|
107
|
-
"gitHead": "8461114f974f90b384723df9a6889decb892b73d"
|
|
104
|
+
]
|
|
108
105
|
}
|