@msrajawat298/do-graphs 1.0.2 → 1.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/dist/Assets/Fonts/NotoSans-Bold.ttf +0 -0
- package/dist/Assets/Fonts/NotoSans-Medium.ttf +0 -0
- package/dist/Assets/Fonts/NotoSans-Regular.ttf +0 -0
- package/dist/Assets/Fonts/NotoSans-SemiBold.ttf +0 -0
- package/dist/Assets/Images/analytic-graph.png +0 -0
- package/dist/Assets/Images/bar-graph.png +0 -0
- package/dist/Assets/Images/bubble-chart.png +0 -0
- package/dist/Assets/Images/coding.png +0 -0
- package/dist/Assets/Images/doughnut.png +0 -0
- package/dist/Assets/Images/horizontal-bar-graph.png +0 -0
- package/dist/Assets/Images/line-chart.png +0 -0
- package/dist/Assets/Images/mixed-chart.png +0 -0
- package/dist/Assets/Images/pie-chart.png +0 -0
- package/dist/Assets/Images/polar-chart.png +0 -0
- package/dist/Assets/Images/progress-bar.png +0 -0
- package/dist/Assets/Images/scatter-graph.png +0 -0
- package/dist/Assets/Images/table.png +0 -0
- package/dist/Assets/Images/travel.png +0 -0
- package/dist/Components/Common/CustomComponent/index.js +7 -3
- package/package.json +2 -2
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -56,12 +56,15 @@ var CustomComponent = function (_a) {
|
|
|
56
56
|
var _b = useContext(PopUpContext), layout = _b.layout, setLayout = _b.setLayout, removeChart = _b.removeChart;
|
|
57
57
|
var _c = useState(null), importedComponent = _c[0], setImportedComponent = _c[1];
|
|
58
58
|
var importComponent = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
59
|
-
var module_1, AnotherComponent, error_1;
|
|
59
|
+
var basePath, finalPath, module_1, AnotherComponent, error_1;
|
|
60
60
|
return __generator(this, function (_a) {
|
|
61
61
|
switch (_a.label) {
|
|
62
62
|
case 0:
|
|
63
63
|
_a.trys.push([0, 2, , 3]);
|
|
64
|
-
|
|
64
|
+
basePath = process.env.REACT_APP_ROOT_PATH;
|
|
65
|
+
finalPath = basePath ? "".concat(basePath, "/").concat(component) : component;
|
|
66
|
+
console.log("Attempting to import custom component from:", finalPath);
|
|
67
|
+
return [4 /*yield*/, import(finalPath)];
|
|
65
68
|
case 1:
|
|
66
69
|
module_1 = _a.sent();
|
|
67
70
|
AnotherComponent = module_1.default;
|
|
@@ -69,7 +72,8 @@ var CustomComponent = function (_a) {
|
|
|
69
72
|
return [3 /*break*/, 3];
|
|
70
73
|
case 2:
|
|
71
74
|
error_1 = _a.sent();
|
|
72
|
-
|
|
75
|
+
console.error("Error importing custom component:", error_1);
|
|
76
|
+
toast.error("Failed to load component: ".concat(component, ". Check REACT_APP_ROOT_PATH."));
|
|
73
77
|
return [3 /*break*/, 3];
|
|
74
78
|
case 3: return [2 /*return*/];
|
|
75
79
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@msrajawat298/do-graphs",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Mayank Singh Kushwah",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"test": "react-scripts test",
|
|
50
50
|
"eject": "react-scripts eject",
|
|
51
51
|
"clean": "rimraf dist/",
|
|
52
|
-
"copy-files": "copyfiles -u 1 src/**/*.html src/**/*.css src/Assets
|
|
52
|
+
"copy-files": "copyfiles -u 1 \"src/**/*.html\" \"src/**/*.css\" \"src/Assets/**/*\" dist/",
|
|
53
53
|
"build": "npm run clean && tsc && npm run copy-files",
|
|
54
54
|
"prepublishOnly": "npm run build",
|
|
55
55
|
"build:watch": "tsc -w && npm run copy-files"
|