Skip to content

Commit e3a4a05

Browse files
committed
chart pkg exports paths
1 parent 472c828 commit e3a4a05

File tree

3 files changed

+56
-1
lines changed

3 files changed

+56
-1
lines changed

packages/base/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"./VersionInfo": {
2828
"types": "./dist/generated/VersionInfo.d.ts",
29-
"default": "./dist/styling/VersionInfo.js"
29+
"default": "./dist/generated/VersionInfo.js"
3030
},
3131
"./I18nStore": {
3232
"types": "./dist/stores/I18nStore.d.ts",

packages/charts/package.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
"./dist/*": "./dist/*",
1717
"./dist/*.js": "./dist/*.js",
1818
"./styles.css": "./dist/css/index.css",
19+
"./VersionInfo": {
20+
"types": "./dist/generated/VersionInfo.d.ts",
21+
"default": "./dist/generated/VersionInfo.js"
22+
},
1923
"./ComposedChart": {
2024
"types": "./dist/components/ComposedChart/index.d.ts",
2125
"default": "./dist/components/ComposedChart/index.js"
@@ -63,6 +67,46 @@
6367
"./TimelineChart": {
6468
"types": "./dist/components/TimelineChart/index.d.ts",
6569
"default": "./dist/components/TimelineChart/index.js"
70+
},
71+
"./TimelineChartAnnotation": {
72+
"types": "./dist/components/TimelineChart/TimelineChartAnnotation.d.ts",
73+
"default": "./dist/components/TimelineChart/TimelineChartAnnotation.js"
74+
},
75+
"./BarChartPlaceholder": {
76+
"types": "./dist/components/BarChart/Placeholder.d.ts",
77+
"default": "./dist/components/BarChart/Placeholder.js"
78+
},
79+
"./BulletChartPlaceholder": {
80+
"types": "./dist/components/BulletChart/Placeholder.d.ts",
81+
"default": "./dist/components/BulletChart/Placeholder.js"
82+
},
83+
"./ColumnChartPlaceholder": {
84+
"types": "./dist/components/ColumnChart/Placeholder.d.ts",
85+
"default": "./dist/components/ColumnChart/Placeholder.js"
86+
},
87+
"./ColumnChartWithTrendPlaceholder": {
88+
"types": "./dist/components/ColumnChartWithTrend/Placeholder.d.ts",
89+
"default": "./dist/components/ColumnChartWithTrend/Placeholder.js"
90+
},
91+
"./ComposedChartPlaceholder": {
92+
"types": "./dist/components/ComposedChart/Placeholder.d.ts",
93+
"default": "./dist/components/ComposedChart/Placeholder.js"
94+
},
95+
"./LineChartPlaceholder": {
96+
"types": "./dist/components/LineChart/Placeholder.d.ts",
97+
"default": "./dist/components/LineChart/Placeholder.js"
98+
},
99+
"./PieChartPlaceholder": {
100+
"types": "./dist/components/PieChart/Placeholder.d.ts",
101+
"default": "./dist/components/PieChart/Placeholder.js"
102+
},
103+
"./ScatterChartPlaceholder": {
104+
"types": "./dist/components/ScatterChart/Placeholder.d.ts",
105+
"default": "./dist/components/ScatterChart/Placeholder.js"
106+
},
107+
"./TimelineChartPlaceholder": {
108+
"types": "./dist/components/TimelineChart/Placeholder.d.ts",
109+
"default": "./dist/components/TimelineChart/Placeholder.js"
66110
}
67111
},
68112
"homepage": "https://sap.github.io/ui5-webcomponents-react",

scripts/create-export-paths.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ function getComponentExports(distDir, componentDir) {
2323
default: `./dist/${componentDir}/${entry.name}/index.js`,
2424
};
2525
}
26+
27+
// charts export "Placeholder" components
28+
if (dir.includes('/charts')) {
29+
const placeholderJs = path.join(dir, entry.name, 'Placeholder.js');
30+
if (fs.existsSync(placeholderJs)) {
31+
exportsObj[`./${entry.name}Placeholder`] = {
32+
types: `./dist/${componentDir}/${entry.name}/Placeholder.d.ts`,
33+
default: `./dist/${componentDir}/${entry.name}/Placeholder.js`,
34+
};
35+
}
36+
}
2637
}
2738
});
2839

0 commit comments

Comments
 (0)