@svgrid/enterprise 2.2.0 → 2.2.1
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.
|
@@ -1158,19 +1158,23 @@ async function jn(e, t) {
|
|
|
1158
1158
|
for (let e of o) {
|
|
1159
1159
|
if (e.type !== "colorScale" && e.type !== "dataBar") continue;
|
|
1160
1160
|
let t = e.columns && e.columns.length > 0 ? i.map((t, n) => e.columns.includes(t.field) ? n : -1).filter((e) => e >= 0) : i.map((e, t) => t);
|
|
1161
|
-
for (let n of t) e.type === "dataBar"
|
|
1161
|
+
for (let n of t) if (e.type === "dataBar") l.push({
|
|
1162
1162
|
kind: "dataBar",
|
|
1163
1163
|
colIdx: n,
|
|
1164
1164
|
color: e.color
|
|
1165
|
-
}) : l.push({
|
|
1166
|
-
kind: "colorScale",
|
|
1167
|
-
colIdx: n,
|
|
1168
|
-
colors: e.mid ? [
|
|
1169
|
-
e.min,
|
|
1170
|
-
e.mid,
|
|
1171
|
-
e.max
|
|
1172
|
-
] : [e.min, e.max]
|
|
1173
1165
|
});
|
|
1166
|
+
else {
|
|
1167
|
+
let t = e.min ?? "#ffffff", r = e.max ?? "#000000";
|
|
1168
|
+
l.push({
|
|
1169
|
+
kind: "colorScale",
|
|
1170
|
+
colIdx: n,
|
|
1171
|
+
colors: e.mid ? [
|
|
1172
|
+
t,
|
|
1173
|
+
e.mid,
|
|
1174
|
+
r
|
|
1175
|
+
] : [t, r]
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1174
1178
|
}
|
|
1175
1179
|
if (t.signal?.aborted) throw new DOMException("Export aborted", "AbortError");
|
|
1176
1180
|
t.onProgress?.({
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "commercial",
|
|
5
5
|
"url": "https://svgrid.com/pricing"
|
|
6
6
|
},
|
|
7
|
-
"version": "2.2.
|
|
7
|
+
"version": "2.2.1",
|
|
8
8
|
"description": "Pro feature pack for sv-grid: data export (Excel, PDF, CSV, TSV, HTML), import (xlsx, CSV, TSV, JSON), pivot table + designer, AI assistant (BYO model), and printing. Requires a paid license key.",
|
|
9
9
|
"license": "SEE LICENSE IN LICENSE",
|
|
10
10
|
"author": "jQWidgets <sales@jqwidgets.com>",
|
package/src/export.ts
CHANGED
|
@@ -1172,7 +1172,13 @@ async function exportXlsxNative<
|
|
|
1172
1172
|
: cols.map((_, i) => i)
|
|
1173
1173
|
for (const ci of targetIdxs) {
|
|
1174
1174
|
if (f.type === 'dataBar') condFormats.push({ kind: 'dataBar', colIdx: ci, color: f.color })
|
|
1175
|
-
else
|
|
1175
|
+
else {
|
|
1176
|
+
// min/mid/max are optional on the format; fall back to the same defaults
|
|
1177
|
+
// the on-screen renderer uses (#ffffff -> #000000) so the export matches.
|
|
1178
|
+
const min = f.min ?? '#ffffff'
|
|
1179
|
+
const max = f.max ?? '#000000'
|
|
1180
|
+
condFormats.push({ kind: 'colorScale', colIdx: ci, colors: f.mid ? [min, f.mid, max] : [min, max] })
|
|
1181
|
+
}
|
|
1176
1182
|
}
|
|
1177
1183
|
}
|
|
1178
1184
|
|