@json-to-office/core-pptx 6.0.0 → 6.1.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.
- package/dist/core/expandHighcharts.d.ts.map +1 -1
- package/dist/index.js +25 -26
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expandHighcharts.d.ts","sourceRoot":"","sources":["../../src/core/expandHighcharts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"expandHighcharts.d.ts","sourceRoot":"","sources":["../../src/core/expandHighcharts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAcL,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,eAAe,EAGf,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAUlB,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,qBAAqB,CAAC;CACrC;AAED;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAC9C,YAAY,EAAE,qBAAqB,EACnC,QAAQ,EAAE,uBAAuB,GAAG,SAAS,EAC7C,QAAQ,EAAE,eAAe,EAAE,EAC3B,UAAU,CAAC,EAAE,SAAS,iBAAiB,EAAE,GACxC,OAAO,CAAC,yBAAyB,CAAC,CAwBpC"}
|
package/dist/index.js
CHANGED
|
@@ -3937,12 +3937,11 @@ import {
|
|
|
3937
3937
|
REMOTE_EXPORT_WARNING,
|
|
3938
3938
|
chartFamilyResolver,
|
|
3939
3939
|
chartPointsPerPixel,
|
|
3940
|
-
chartRequestKey,
|
|
3941
|
-
dedupeChartRequest,
|
|
3942
|
-
limitChartRequest,
|
|
3943
3940
|
postJsonToService,
|
|
3941
|
+
recordChartCollected,
|
|
3944
3942
|
recordChartRetry,
|
|
3945
3943
|
resolveServiceUrl,
|
|
3944
|
+
sendChartRequest,
|
|
3946
3945
|
withChartFontFaceCss,
|
|
3947
3946
|
withChartTypography
|
|
3948
3947
|
} from "@json-to-office/shared";
|
|
@@ -4001,24 +4000,21 @@ async function expandList(components, path4, scope) {
|
|
|
4001
4000
|
}
|
|
4002
4001
|
async function expandOne(component, path4, scope) {
|
|
4003
4002
|
const props = component.props;
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
withThemeTypography(
|
|
4010
|
-
withThemeColors(props, scope.theme, scope.warnings),
|
|
4011
|
-
scope.theme,
|
|
4012
|
-
scope.slideWidth,
|
|
4013
|
-
scope.warnings
|
|
4014
|
-
),
|
|
4003
|
+
recordChartCollected();
|
|
4004
|
+
const chart = await renderChart(
|
|
4005
|
+
withChartFontFaces(
|
|
4006
|
+
withThemeTypography(
|
|
4007
|
+
withThemeColors(props, scope.theme, scope.warnings),
|
|
4015
4008
|
scope.theme,
|
|
4016
|
-
scope.
|
|
4009
|
+
scope.slideWidth,
|
|
4010
|
+
scope.warnings
|
|
4017
4011
|
),
|
|
4018
|
-
scope.
|
|
4019
|
-
scope.
|
|
4020
|
-
|
|
4021
|
-
|
|
4012
|
+
scope.theme,
|
|
4013
|
+
scope.chartFonts
|
|
4014
|
+
),
|
|
4015
|
+
scope.services,
|
|
4016
|
+
scope.warnings,
|
|
4017
|
+
scope.chartCache
|
|
4022
4018
|
);
|
|
4023
4019
|
void path4;
|
|
4024
4020
|
return {
|
|
@@ -4063,14 +4059,16 @@ async function renderChart(config, services, warnings, cache) {
|
|
|
4063
4059
|
// for callers that omit it.
|
|
4064
4060
|
...config.resources ? { resources: config.resources } : {}
|
|
4065
4061
|
};
|
|
4066
|
-
return
|
|
4062
|
+
return sendChartRequest({
|
|
4067
4063
|
cache,
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4064
|
+
serverUrl,
|
|
4065
|
+
concurrency: services?.concurrency,
|
|
4066
|
+
requestBody,
|
|
4067
|
+
send: () => postChart(serverUrl, requestBody, config, services)
|
|
4068
|
+
});
|
|
4071
4069
|
}
|
|
4072
4070
|
async function postChart(serverUrl, requestBody, config, services) {
|
|
4073
|
-
const
|
|
4071
|
+
const base64Data = await postJsonToService({
|
|
4074
4072
|
url: serverUrl,
|
|
4075
4073
|
path: "/export",
|
|
4076
4074
|
body: requestBody,
|
|
@@ -4082,10 +4080,11 @@ async function postChart(serverUrl, requestBody, config, services) {
|
|
|
4082
4080
|
// The code lets a server route report a missing export server as a
|
|
4083
4081
|
// dependency outage with this message, not as an internal error.
|
|
4084
4082
|
onUnreachable: (url, cause) => `Highcharts Export Server is not running at ${url}. Start it with: npx highcharts-export-server --enableServer true
|
|
4085
|
-
Cause: ${cause}
|
|
4083
|
+
Cause: ${cause}`,
|
|
4084
|
+
decode: (response) => response.text()
|
|
4086
4085
|
});
|
|
4087
4086
|
return {
|
|
4088
|
-
dataUri: `data:image/png;base64,${
|
|
4087
|
+
dataUri: `data:image/png;base64,${base64Data}`,
|
|
4089
4088
|
widthPx: config.options.chart?.width ?? DEFAULT_CHART_WIDTH_PX,
|
|
4090
4089
|
heightPx: config.options.chart?.height ?? 720
|
|
4091
4090
|
};
|