@adecore/charts 0.39.0 → 0.40.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.
- package/dist/Heatmap.js +161 -144
- package/dist/Root.js +71 -60
- package/dist/annotations.js +87 -145
- package/dist/cursor.d.ts +1 -0
- package/dist/cursor.js +5 -1
- package/dist/heat.js +2 -2
- package/dist/overlays.js +242 -233
- package/dist/points.js +0 -1
- package/dist/register.js +2 -3
- package/dist/series.js +147 -155
- package/dist/spark.js +1 -4
- package/dist/store.js +40 -70
- package/dist/timeline-layout.js +6 -1
- package/dist/values-table.d.ts +13 -0
- package/dist/values-table.js +13 -0
- package/package.json +9 -9
- package/src/Heatmap.tsx +20 -14
- package/src/Root.tsx +112 -11
- package/src/SeriesLegend.tsx +9 -0
- package/src/Sparkline.tsx +2 -0
- package/src/access.ts +3 -0
- package/src/annotations.tsx +14 -2
- package/src/axes.tsx +37 -2
- package/src/band.ts +25 -0
- package/src/color.ts +1 -0
- package/src/context.ts +2 -0
- package/src/cursor.ts +24 -1
- package/src/group-axes.ts +8 -0
- package/src/heat.ts +8 -2
- package/src/layer.tsx +3 -0
- package/src/legend.ts +2 -0
- package/src/overlays.tsx +43 -16
- package/src/points.ts +19 -2
- package/src/register.ts +3 -3
- package/src/scale.ts +60 -0
- package/src/scatter.tsx +9 -0
- package/src/series.tsx +51 -8
- package/src/spark.ts +4 -4
- package/src/store.ts +46 -70
- package/src/time-format.ts +1 -0
- package/src/timeline-layout.ts +27 -1
- package/src/timeline.tsx +28 -0
- package/src/use-chart.ts +1 -0
- package/src/values-table.ts +12 -0
package/dist/overlays.js
CHANGED
|
@@ -5,6 +5,7 @@ import clsx from 'clsx';
|
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { Button, Icon, Surface, useContentSize } from '@adecore/ui';
|
|
7
7
|
import { useChartContext } from './context.js';
|
|
8
|
+
import { tableClasses } from './values-table.js';
|
|
8
9
|
/* Between the cursor and the card, and the least room the card keeps to the edge of the chart. */
|
|
9
10
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
11
|
const OFFSET = 12;
|
|
@@ -140,7 +141,7 @@ function NoteSwatch(t0) {
|
|
|
140
141
|
}
|
|
141
142
|
/* The card at the cursor: the x of the bucket, a row per series, then its markers and bands. */
|
|
142
143
|
export function ChartTooltip(t0) {
|
|
143
|
-
const $ = _c(
|
|
144
|
+
const $ = _c(72);
|
|
144
145
|
const {
|
|
145
146
|
total: t1,
|
|
146
147
|
format,
|
|
@@ -185,128 +186,127 @@ export function ChartTooltip(t0) {
|
|
|
185
186
|
t9 = $[21];
|
|
186
187
|
}
|
|
187
188
|
const pixel = chart.leftAxis + t9 - chart.scroll;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
189
|
+
let place;
|
|
190
|
+
if (placement === "cursor") {
|
|
191
|
+
let t10;
|
|
192
|
+
if ($[22] !== chart.box || $[23] !== pixel) {
|
|
193
|
+
t10 = pixel > chart.box / 2 ? {
|
|
194
|
+
right: Math.round(chart.box - pixel + OFFSET),
|
|
195
|
+
maxWidth: Math.max(0, Math.round(pixel - OFFSET - EDGE))
|
|
196
|
+
} : {
|
|
197
|
+
left: Math.round(pixel + OFFSET),
|
|
198
|
+
maxWidth: Math.max(0, Math.round(chart.box - pixel - OFFSET - EDGE))
|
|
199
|
+
};
|
|
200
|
+
$[22] = chart.box;
|
|
201
|
+
$[23] = pixel;
|
|
202
|
+
$[24] = t10;
|
|
203
|
+
} else {
|
|
204
|
+
t10 = $[24];
|
|
205
|
+
}
|
|
206
|
+
const t11 = position === null || position === undefined ? chart.plot.top : Math.max(0, Math.round(position[1]) - OFFSET);
|
|
207
|
+
let t12;
|
|
208
|
+
if ($[25] !== t10 || $[26] !== t11) {
|
|
209
|
+
t12 = {
|
|
210
|
+
...t10,
|
|
211
|
+
top: t11
|
|
212
|
+
};
|
|
213
|
+
$[25] = t10;
|
|
214
|
+
$[26] = t11;
|
|
215
|
+
$[27] = t12;
|
|
216
|
+
} else {
|
|
217
|
+
t12 = $[27];
|
|
218
|
+
}
|
|
219
|
+
place = t12;
|
|
216
220
|
} else {
|
|
217
|
-
t12 = $[28];
|
|
218
|
-
}
|
|
219
|
-
place = t12;
|
|
220
|
-
if (placement !== "cursor") {
|
|
221
221
|
const plotLeft = chart.leftAxis + Math.max(0, chart.plot.left - chart.scroll);
|
|
222
222
|
const plotRight = Math.min(chart.box - chart.rightAxis, chart.leftAxis + chart.plot.right - chart.scroll);
|
|
223
|
-
let
|
|
224
|
-
if ($[
|
|
225
|
-
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
223
|
+
let t10;
|
|
224
|
+
if ($[28] !== activeIndex || $[29] !== chart) {
|
|
225
|
+
t10 = chart.bucketAt(activeIndex)?.width ?? 2 * POINT_ROOM;
|
|
226
|
+
$[28] = activeIndex;
|
|
227
|
+
$[29] = chart;
|
|
228
|
+
$[30] = t10;
|
|
229
229
|
} else {
|
|
230
|
-
|
|
230
|
+
t10 = $[30];
|
|
231
231
|
}
|
|
232
|
-
const reach =
|
|
233
|
-
let
|
|
232
|
+
const reach = t10 / 2;
|
|
233
|
+
let t11;
|
|
234
234
|
let vertical;
|
|
235
|
-
if ($[
|
|
236
|
-
const [
|
|
237
|
-
vertical =
|
|
235
|
+
if ($[31] !== card.width || $[32] !== pixel || $[33] !== placement || $[34] !== plotLeft || $[35] !== plotRight || $[36] !== reach) {
|
|
236
|
+
const [t12, horizontal] = placement.split("-");
|
|
237
|
+
vertical = t12;
|
|
238
238
|
const covers = side => side === "left" ? pixel - reach < plotLeft + card.width : pixel + reach > plotRight - card.width;
|
|
239
|
-
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
239
|
+
t11 = covers(horizontal) && !covers(horizontal === "left" ? "right" : "left") ? horizontal === "left" ? "right" : "left" : horizontal;
|
|
240
|
+
$[31] = card.width;
|
|
241
|
+
$[32] = pixel;
|
|
242
|
+
$[33] = placement;
|
|
243
|
+
$[34] = plotLeft;
|
|
244
|
+
$[35] = plotRight;
|
|
245
|
+
$[36] = reach;
|
|
246
|
+
$[37] = t11;
|
|
247
|
+
$[38] = vertical;
|
|
248
248
|
} else {
|
|
249
|
-
|
|
250
|
-
vertical = $[
|
|
249
|
+
t11 = $[37];
|
|
250
|
+
vertical = $[38];
|
|
251
251
|
}
|
|
252
|
-
const side_0 =
|
|
253
|
-
let
|
|
254
|
-
if ($[
|
|
255
|
-
|
|
252
|
+
const side_0 = t11;
|
|
253
|
+
let t12;
|
|
254
|
+
if ($[39] !== chart.box || $[40] !== plotLeft || $[41] !== plotRight || $[42] !== side_0) {
|
|
255
|
+
t12 = side_0 === "left" ? {
|
|
256
256
|
left: Math.round(plotLeft)
|
|
257
257
|
} : {
|
|
258
258
|
right: Math.round(chart.box - plotRight)
|
|
259
259
|
};
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
260
|
+
$[39] = chart.box;
|
|
261
|
+
$[40] = plotLeft;
|
|
262
|
+
$[41] = plotRight;
|
|
263
|
+
$[42] = side_0;
|
|
264
|
+
$[43] = t12;
|
|
265
265
|
} else {
|
|
266
|
-
|
|
266
|
+
t12 = $[43];
|
|
267
267
|
}
|
|
268
|
-
let
|
|
269
|
-
if ($[
|
|
270
|
-
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
268
|
+
let t13;
|
|
269
|
+
if ($[44] !== card.height || $[45] !== chart.plot.bottom || $[46] !== chart.plot.top || $[47] !== vertical) {
|
|
270
|
+
t13 = vertical === "top" ? Math.round(chart.plot.top) : Math.round(chart.plot.bottom - card.height);
|
|
271
|
+
$[44] = card.height;
|
|
272
|
+
$[45] = chart.plot.bottom;
|
|
273
|
+
$[46] = chart.plot.top;
|
|
274
|
+
$[47] = vertical;
|
|
275
|
+
$[48] = t13;
|
|
276
276
|
} else {
|
|
277
|
-
|
|
277
|
+
t13 = $[48];
|
|
278
278
|
}
|
|
279
|
-
let
|
|
280
|
-
if ($[
|
|
281
|
-
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
284
|
-
$[
|
|
279
|
+
let t14;
|
|
280
|
+
if ($[49] !== plotLeft || $[50] !== plotRight) {
|
|
281
|
+
t14 = Math.round(plotRight - plotLeft);
|
|
282
|
+
$[49] = plotLeft;
|
|
283
|
+
$[50] = plotRight;
|
|
284
|
+
$[51] = t14;
|
|
285
285
|
} else {
|
|
286
|
-
|
|
286
|
+
t14 = $[51];
|
|
287
287
|
}
|
|
288
|
-
const
|
|
289
|
-
let
|
|
290
|
-
if ($[
|
|
291
|
-
|
|
292
|
-
...
|
|
293
|
-
top:
|
|
294
|
-
maxWidth:
|
|
288
|
+
const t15 = Math.max(0, t14);
|
|
289
|
+
let t16;
|
|
290
|
+
if ($[52] !== t12 || $[53] !== t13 || $[54] !== t15) {
|
|
291
|
+
t16 = {
|
|
292
|
+
...t12,
|
|
293
|
+
top: t13,
|
|
294
|
+
maxWidth: t15
|
|
295
295
|
};
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
296
|
+
$[52] = t12;
|
|
297
|
+
$[53] = t13;
|
|
298
|
+
$[54] = t15;
|
|
299
|
+
$[55] = t16;
|
|
300
300
|
} else {
|
|
301
|
-
|
|
301
|
+
t16 = $[55];
|
|
302
302
|
}
|
|
303
|
-
place =
|
|
303
|
+
place = t16;
|
|
304
304
|
}
|
|
305
305
|
const sum = bucket.values.reduce(_temp, 0);
|
|
306
306
|
const heading = chart.points ? [bucket.groupLabel, chart.rowLabels?.[activeIndex]].filter(Boolean).join(" \xB7 ") || chart.formatX(bucket.x) : [bucket.groupLabel, chart.rowLabels?.[activeIndex] ?? chart.formatX(bucket.x)].filter(Boolean).join(" \xB7 ");
|
|
307
307
|
t8 = createPortal;
|
|
308
308
|
T0 = Surface;
|
|
309
|
-
if ($[
|
|
309
|
+
if ($[56] !== measure || $[57] !== ref) {
|
|
310
310
|
t3 = node => {
|
|
311
311
|
measure(node);
|
|
312
312
|
if (typeof ref === "function") {
|
|
@@ -317,19 +317,19 @@ export function ChartTooltip(t0) {
|
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
};
|
|
320
|
-
$[
|
|
321
|
-
$[
|
|
322
|
-
$[
|
|
320
|
+
$[56] = measure;
|
|
321
|
+
$[57] = ref;
|
|
322
|
+
$[58] = t3;
|
|
323
323
|
} else {
|
|
324
|
-
t3 = $[
|
|
324
|
+
t3 = $[58];
|
|
325
325
|
}
|
|
326
326
|
t4 = true;
|
|
327
|
-
if ($[
|
|
327
|
+
if ($[59] !== className) {
|
|
328
328
|
t5 = clsx("absolute flex w-max min-w-36 flex-col gap-1 rounded-lg px-2.5 py-2 text-xs", className);
|
|
329
|
-
$[
|
|
330
|
-
$[
|
|
329
|
+
$[59] = className;
|
|
330
|
+
$[60] = t5;
|
|
331
331
|
} else {
|
|
332
|
-
t5 = $[
|
|
332
|
+
t5 = $[60];
|
|
333
333
|
}
|
|
334
334
|
t6 = place;
|
|
335
335
|
t7 = children !== undefined ? children(bucket) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
@@ -345,8 +345,8 @@ export function ChartTooltip(t0) {
|
|
|
345
345
|
className: "ml-auto pl-3 text-text tabular-nums",
|
|
346
346
|
children: chart.formatX(bucket.x)
|
|
347
347
|
})]
|
|
348
|
-
}), chart.readable.map(
|
|
349
|
-
const [id, entry_0] =
|
|
348
|
+
}), chart.readable.map(t10 => {
|
|
349
|
+
const [id, entry_0] = t10;
|
|
350
350
|
const value = entry_0.values[activeIndex];
|
|
351
351
|
return /*#__PURE__*/_jsxs("p", {
|
|
352
352
|
className: "flex items-center gap-2 text-text-muted",
|
|
@@ -398,7 +398,7 @@ export function ChartTooltip(t0) {
|
|
|
398
398
|
t8 = $[17];
|
|
399
399
|
}
|
|
400
400
|
let t9;
|
|
401
|
-
if ($[
|
|
401
|
+
if ($[61] !== T0 || $[62] !== t3 || $[63] !== t4 || $[64] !== t5 || $[65] !== t6 || $[66] !== t7) {
|
|
402
402
|
t9 = /*#__PURE__*/_jsx(T0, {
|
|
403
403
|
ref: t3,
|
|
404
404
|
"aria-hidden": t4,
|
|
@@ -406,25 +406,25 @@ export function ChartTooltip(t0) {
|
|
|
406
406
|
style: t6,
|
|
407
407
|
children: t7
|
|
408
408
|
});
|
|
409
|
-
$[
|
|
410
|
-
$[
|
|
411
|
-
$[
|
|
412
|
-
$[
|
|
413
|
-
$[
|
|
414
|
-
$[
|
|
415
|
-
$[
|
|
409
|
+
$[61] = T0;
|
|
410
|
+
$[62] = t3;
|
|
411
|
+
$[63] = t4;
|
|
412
|
+
$[64] = t5;
|
|
413
|
+
$[65] = t6;
|
|
414
|
+
$[66] = t7;
|
|
415
|
+
$[67] = t9;
|
|
416
416
|
} else {
|
|
417
|
-
t9 = $[
|
|
417
|
+
t9 = $[67];
|
|
418
418
|
}
|
|
419
419
|
let t10;
|
|
420
|
-
if ($[
|
|
420
|
+
if ($[68] !== elements.tooltip || $[69] !== t8 || $[70] !== t9) {
|
|
421
421
|
t10 = t8(t9, elements.tooltip);
|
|
422
|
-
$[
|
|
423
|
-
$[
|
|
424
|
-
$[
|
|
425
|
-
$[
|
|
422
|
+
$[68] = elements.tooltip;
|
|
423
|
+
$[69] = t8;
|
|
424
|
+
$[70] = t9;
|
|
425
|
+
$[71] = t10;
|
|
426
426
|
} else {
|
|
427
|
-
t10 = $[
|
|
427
|
+
t10 = $[71];
|
|
428
428
|
}
|
|
429
429
|
return t10;
|
|
430
430
|
}
|
|
@@ -517,7 +517,7 @@ export function ChartLegend(t0) {
|
|
|
517
517
|
}
|
|
518
518
|
/* A toggle that shows every value as a table. Hidden, the table is still there for a screen reader. */
|
|
519
519
|
export function ChartTable(t0) {
|
|
520
|
-
const $ = _c(
|
|
520
|
+
const $ = _c(85);
|
|
521
521
|
const {
|
|
522
522
|
toggle: t1,
|
|
523
523
|
open,
|
|
@@ -589,18 +589,25 @@ export function ChartTable(t0) {
|
|
|
589
589
|
return value === null || value === undefined ? "" : chart.formatY(value);
|
|
590
590
|
})]
|
|
591
591
|
}]);
|
|
592
|
-
|
|
593
|
-
|
|
592
|
+
let t16;
|
|
593
|
+
if ($[30] !== shown) {
|
|
594
|
+
t16 = tableClasses(shown);
|
|
595
|
+
$[30] = shown;
|
|
596
|
+
$[31] = t16;
|
|
597
|
+
} else {
|
|
598
|
+
t16 = $[31];
|
|
599
|
+
}
|
|
600
|
+
const classes = t16;
|
|
594
601
|
t14 = createPortal;
|
|
595
602
|
t11 = ref;
|
|
596
|
-
if ($[
|
|
603
|
+
if ($[32] !== className) {
|
|
597
604
|
t12 = clsx("flex flex-col items-start gap-2", className);
|
|
598
|
-
$[
|
|
599
|
-
$[
|
|
605
|
+
$[32] = className;
|
|
606
|
+
$[33] = t12;
|
|
600
607
|
} else {
|
|
601
|
-
t12 = $[
|
|
608
|
+
t12 = $[33];
|
|
602
609
|
}
|
|
603
|
-
if ($[
|
|
610
|
+
if ($[34] !== id || $[35] !== setShown || $[36] !== shown || $[37] !== t || $[38] !== toggle) {
|
|
604
611
|
t13 = toggle && /*#__PURE__*/_jsx(Button, {
|
|
605
612
|
size: "sm",
|
|
606
613
|
"aria-expanded": shown,
|
|
@@ -608,122 +615,124 @@ export function ChartTable(t0) {
|
|
|
608
615
|
onClick: () => setShown(!shown),
|
|
609
616
|
children: shown ? t("values.hide") : t("values.show")
|
|
610
617
|
});
|
|
611
|
-
$[
|
|
612
|
-
$[
|
|
613
|
-
$[
|
|
614
|
-
$[
|
|
615
|
-
$[
|
|
616
|
-
$[
|
|
618
|
+
$[34] = id;
|
|
619
|
+
$[35] = setShown;
|
|
620
|
+
$[36] = shown;
|
|
621
|
+
$[37] = t;
|
|
622
|
+
$[38] = toggle;
|
|
623
|
+
$[39] = t13;
|
|
617
624
|
} else {
|
|
618
|
-
t13 = $[
|
|
625
|
+
t13 = $[39];
|
|
619
626
|
}
|
|
620
627
|
t9 = id;
|
|
621
|
-
t10 =
|
|
622
|
-
t6 =
|
|
623
|
-
let
|
|
624
|
-
if ($[
|
|
625
|
-
|
|
628
|
+
t10 = classes.box;
|
|
629
|
+
t6 = classes.table;
|
|
630
|
+
let t17;
|
|
631
|
+
if ($[40] !== chart.label || $[41] !== t) {
|
|
632
|
+
t17 = t("values.caption", {
|
|
626
633
|
label: chart.label
|
|
627
634
|
});
|
|
628
|
-
$[
|
|
629
|
-
$[
|
|
630
|
-
$[
|
|
635
|
+
$[40] = chart.label;
|
|
636
|
+
$[41] = t;
|
|
637
|
+
$[42] = t17;
|
|
631
638
|
} else {
|
|
632
|
-
|
|
639
|
+
t17 = $[42];
|
|
633
640
|
}
|
|
634
|
-
if ($[
|
|
641
|
+
if ($[43] !== t17) {
|
|
635
642
|
t7 = /*#__PURE__*/_jsx("caption", {
|
|
636
643
|
className: "sr-only",
|
|
637
|
-
children:
|
|
644
|
+
children: t17
|
|
638
645
|
});
|
|
639
|
-
$[
|
|
640
|
-
$[
|
|
641
|
-
} else {
|
|
642
|
-
t7 = $[42];
|
|
643
|
-
}
|
|
644
|
-
const t17 = shown ? "sticky top-0 bg-surface-hover" : undefined;
|
|
645
|
-
let t18;
|
|
646
|
-
if ($[43] !== grouped) {
|
|
647
|
-
t18 = grouped && /*#__PURE__*/_jsx("td", {});
|
|
648
|
-
$[43] = grouped;
|
|
649
|
-
$[44] = t18;
|
|
646
|
+
$[43] = t17;
|
|
647
|
+
$[44] = t7;
|
|
650
648
|
} else {
|
|
651
|
-
|
|
649
|
+
t7 = $[44];
|
|
652
650
|
}
|
|
651
|
+
const t18 = classes.head;
|
|
653
652
|
let t19;
|
|
654
|
-
if ($[45]
|
|
655
|
-
t19 = /*#__PURE__*/_jsx("td", {});
|
|
656
|
-
$[45] =
|
|
653
|
+
if ($[45] !== grouped) {
|
|
654
|
+
t19 = grouped && /*#__PURE__*/_jsx("td", {});
|
|
655
|
+
$[45] = grouped;
|
|
656
|
+
$[46] = t19;
|
|
657
657
|
} else {
|
|
658
|
-
t19 = $[
|
|
658
|
+
t19 = $[46];
|
|
659
659
|
}
|
|
660
660
|
let t20;
|
|
661
|
-
if ($[
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
661
|
+
if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
|
|
662
|
+
t20 = /*#__PURE__*/_jsx("td", {});
|
|
663
|
+
$[47] = t20;
|
|
664
|
+
} else {
|
|
665
|
+
t20 = $[47];
|
|
666
|
+
}
|
|
667
|
+
let t21;
|
|
668
|
+
if ($[48] !== classes.column || $[49] !== columns) {
|
|
669
|
+
let t22;
|
|
670
|
+
if ($[51] !== classes.column) {
|
|
671
|
+
t22 = (column, index_0) => /*#__PURE__*/_jsx("th", {
|
|
665
672
|
scope: "col",
|
|
666
|
-
className:
|
|
673
|
+
className: classes.column,
|
|
667
674
|
children: column
|
|
668
675
|
}, index_0);
|
|
669
|
-
$[
|
|
670
|
-
$[
|
|
676
|
+
$[51] = classes.column;
|
|
677
|
+
$[52] = t22;
|
|
671
678
|
} else {
|
|
672
|
-
|
|
679
|
+
t22 = $[52];
|
|
673
680
|
}
|
|
674
|
-
|
|
675
|
-
$[
|
|
676
|
-
$[
|
|
677
|
-
$[
|
|
681
|
+
t21 = columns.map(t22);
|
|
682
|
+
$[48] = classes.column;
|
|
683
|
+
$[49] = columns;
|
|
684
|
+
$[50] = t21;
|
|
678
685
|
} else {
|
|
679
|
-
|
|
686
|
+
t21 = $[50];
|
|
680
687
|
}
|
|
681
|
-
let
|
|
682
|
-
if ($[
|
|
683
|
-
|
|
684
|
-
children: [
|
|
688
|
+
let t22;
|
|
689
|
+
if ($[53] !== t19 || $[54] !== t21) {
|
|
690
|
+
t22 = /*#__PURE__*/_jsxs("tr", {
|
|
691
|
+
children: [t19, t20, t21]
|
|
685
692
|
});
|
|
686
|
-
$[
|
|
687
|
-
$[
|
|
688
|
-
$[
|
|
693
|
+
$[53] = t19;
|
|
694
|
+
$[54] = t21;
|
|
695
|
+
$[55] = t22;
|
|
689
696
|
} else {
|
|
690
|
-
|
|
697
|
+
t22 = $[55];
|
|
691
698
|
}
|
|
692
|
-
if ($[
|
|
699
|
+
if ($[56] !== classes.head || $[57] !== t22) {
|
|
693
700
|
t8 = /*#__PURE__*/_jsx("thead", {
|
|
694
|
-
className:
|
|
695
|
-
children:
|
|
701
|
+
className: t18,
|
|
702
|
+
children: t22
|
|
696
703
|
});
|
|
697
|
-
$[
|
|
698
|
-
$[
|
|
699
|
-
$[
|
|
704
|
+
$[56] = classes.head;
|
|
705
|
+
$[57] = t22;
|
|
706
|
+
$[58] = t8;
|
|
700
707
|
} else {
|
|
701
|
-
t8 = $[
|
|
708
|
+
t8 = $[58];
|
|
702
709
|
}
|
|
703
|
-
let
|
|
704
|
-
if ($[
|
|
705
|
-
|
|
706
|
-
className:
|
|
710
|
+
let t23;
|
|
711
|
+
if ($[59] !== classes.cell || $[60] !== classes.row || $[61] !== classes.rowHeading || $[62] !== grouped || $[63] !== shown) {
|
|
712
|
+
t23 = row_0 => /*#__PURE__*/_jsxs("tr", {
|
|
713
|
+
className: classes.row,
|
|
707
714
|
children: [grouped && /*#__PURE__*/_jsx("td", {
|
|
708
715
|
className: shown ? "h-8 px-2 text-text-muted" : undefined,
|
|
709
716
|
children: row_0.group
|
|
710
717
|
}), /*#__PURE__*/_jsx("th", {
|
|
711
718
|
scope: "row",
|
|
712
|
-
className:
|
|
719
|
+
className: classes.rowHeading,
|
|
713
720
|
children: row_0.label
|
|
714
721
|
}), row_0.cells.map((value_0, index_1) => /*#__PURE__*/_jsx("td", {
|
|
715
|
-
className: cell,
|
|
722
|
+
className: classes.cell,
|
|
716
723
|
children: value_0
|
|
717
724
|
}, index_1))]
|
|
718
725
|
}, row_0.key);
|
|
719
|
-
$[
|
|
720
|
-
$[
|
|
721
|
-
$[
|
|
722
|
-
$[
|
|
726
|
+
$[59] = classes.cell;
|
|
727
|
+
$[60] = classes.row;
|
|
728
|
+
$[61] = classes.rowHeading;
|
|
729
|
+
$[62] = grouped;
|
|
730
|
+
$[63] = shown;
|
|
731
|
+
$[64] = t23;
|
|
723
732
|
} else {
|
|
724
|
-
|
|
733
|
+
t23 = $[64];
|
|
725
734
|
}
|
|
726
|
-
t5 = rows.map(
|
|
735
|
+
t5 = rows.map(t23);
|
|
727
736
|
$[8] = chart;
|
|
728
737
|
$[9] = className;
|
|
729
738
|
$[10] = columns;
|
|
@@ -759,67 +768,67 @@ export function ChartTable(t0) {
|
|
|
759
768
|
t9 = $[29];
|
|
760
769
|
}
|
|
761
770
|
let t15;
|
|
762
|
-
if ($[
|
|
771
|
+
if ($[65] !== t5) {
|
|
763
772
|
t15 = /*#__PURE__*/_jsx("tbody", {
|
|
764
773
|
children: t5
|
|
765
774
|
});
|
|
766
|
-
$[
|
|
767
|
-
$[
|
|
775
|
+
$[65] = t5;
|
|
776
|
+
$[66] = t15;
|
|
768
777
|
} else {
|
|
769
|
-
t15 = $[
|
|
778
|
+
t15 = $[66];
|
|
770
779
|
}
|
|
771
780
|
let t16;
|
|
772
|
-
if ($[
|
|
781
|
+
if ($[67] !== t15 || $[68] !== t6 || $[69] !== t7 || $[70] !== t8) {
|
|
773
782
|
t16 = /*#__PURE__*/_jsxs("table", {
|
|
774
783
|
className: t6,
|
|
775
784
|
children: [t7, t8, t15]
|
|
776
785
|
});
|
|
777
|
-
$[
|
|
778
|
-
$[
|
|
779
|
-
$[
|
|
780
|
-
$[
|
|
781
|
-
$[
|
|
786
|
+
$[67] = t15;
|
|
787
|
+
$[68] = t6;
|
|
788
|
+
$[69] = t7;
|
|
789
|
+
$[70] = t8;
|
|
790
|
+
$[71] = t16;
|
|
782
791
|
} else {
|
|
783
|
-
t16 = $[
|
|
792
|
+
t16 = $[71];
|
|
784
793
|
}
|
|
785
794
|
let t17;
|
|
786
|
-
if ($[
|
|
795
|
+
if ($[72] !== t10 || $[73] !== t16 || $[74] !== t9) {
|
|
787
796
|
t17 = /*#__PURE__*/_jsx("div", {
|
|
788
797
|
id: t9,
|
|
789
798
|
className: t10,
|
|
790
799
|
children: t16
|
|
791
800
|
});
|
|
792
|
-
$[
|
|
793
|
-
$[
|
|
794
|
-
$[
|
|
795
|
-
$[
|
|
801
|
+
$[72] = t10;
|
|
802
|
+
$[73] = t16;
|
|
803
|
+
$[74] = t9;
|
|
804
|
+
$[75] = t17;
|
|
796
805
|
} else {
|
|
797
|
-
t17 = $[
|
|
806
|
+
t17 = $[75];
|
|
798
807
|
}
|
|
799
808
|
let t18;
|
|
800
|
-
if ($[
|
|
809
|
+
if ($[76] !== t11 || $[77] !== t12 || $[78] !== t13 || $[79] !== t17) {
|
|
801
810
|
t18 = /*#__PURE__*/_jsxs("div", {
|
|
802
811
|
ref: t11,
|
|
803
812
|
className: t12,
|
|
804
813
|
children: [t13, t17]
|
|
805
814
|
});
|
|
806
|
-
$[
|
|
807
|
-
$[
|
|
808
|
-
$[
|
|
809
|
-
$[
|
|
810
|
-
$[
|
|
815
|
+
$[76] = t11;
|
|
816
|
+
$[77] = t12;
|
|
817
|
+
$[78] = t13;
|
|
818
|
+
$[79] = t17;
|
|
819
|
+
$[80] = t18;
|
|
811
820
|
} else {
|
|
812
|
-
t18 = $[
|
|
821
|
+
t18 = $[80];
|
|
813
822
|
}
|
|
814
823
|
let t19;
|
|
815
|
-
if ($[
|
|
824
|
+
if ($[81] !== chart.elements.table || $[82] !== t14 || $[83] !== t18) {
|
|
816
825
|
t19 = t14(t18, chart.elements.table);
|
|
817
|
-
$[
|
|
818
|
-
$[
|
|
819
|
-
$[
|
|
820
|
-
$[
|
|
826
|
+
$[81] = chart.elements.table;
|
|
827
|
+
$[82] = t14;
|
|
828
|
+
$[83] = t18;
|
|
829
|
+
$[84] = t19;
|
|
821
830
|
} else {
|
|
822
|
-
t19 = $[
|
|
831
|
+
t19 = $[84];
|
|
823
832
|
}
|
|
824
833
|
return t19;
|
|
825
834
|
}
|
package/dist/points.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* The pure geometry of a point chart: the nearest point, moving between points, the frontier and the end labels. */
|
|
2
1
|
/* The point closest to (x, y) within `reach` pixels, so the pointer need not land on a mark exactly; -1 for none. */
|
|
3
2
|
export function nearestPoint(points, x, y, reach) {
|
|
4
3
|
let nearest = -1;
|