@bicharts/chart-host 0.6.76 → 0.6.77
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/card.mjs +234 -0
- package/dist/{chunk-ZEXMBZHP.mjs → chunk-H2P63UMG.mjs} +38 -3828
- package/dist/chunk-IMNZYSIC.mjs +3806 -0
- package/dist/chunk-QOKQUXVV.mjs +614 -0
- package/dist/index.mjs +53 -647
- package/dist/react.mjs +2 -1
- package/dist/types/card.d.ts +1 -0
- package/dist/types/selectionCardChrome.d.ts +29 -0
- package/package.json +6 -1
package/dist/react.mjs
CHANGED
|
@@ -22,7 +22,8 @@ import {
|
|
|
22
22
|
loadGeo,
|
|
23
23
|
syncMemberSelection,
|
|
24
24
|
toSourceRows
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-IMNZYSIC.mjs";
|
|
26
|
+
import "./chunk-H2P63UMG.mjs";
|
|
26
27
|
import "./chunk-A2GMXZP7.mjs";
|
|
27
28
|
import "./chunk-7JWL6LYE.mjs";
|
|
28
29
|
import "./chunk-GHODWOAL.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createSelectionCards, type SelectionCards, type SelectionCardsDeps } from "./selectionCardChrome";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { SourceFormats } from "./sourceDateFormat";
|
|
2
|
+
export interface SelectionCardsDeps {
|
|
3
|
+
/** The positioned ancestor the cards live inside. Nothing the visual draws escapes its
|
|
4
|
+
* frame, and a card is visual-drawn, so this is a hard boundary rather than a preference. */
|
|
5
|
+
container: HTMLElement;
|
|
6
|
+
/** The payload the chart was drawn from. A getter, not a value: the chart is redrawn on
|
|
7
|
+
* resize, on a cell edit and on a live restyle, and a captured payload would age out. */
|
|
8
|
+
getPayload: () => any;
|
|
9
|
+
/** The chart's own aggregation, so the card cannot contradict the picture it sits on. */
|
|
10
|
+
getAggregation: () => string;
|
|
11
|
+
/** The source's own per-column date formats (a worksheet's number formats, a model's format
|
|
12
|
+
* strings), so a click on a date is answered in the reader's formatting rather than in the
|
|
13
|
+
* payload's ISO instant. A getter for the same reason `getPayload` is one - the source is
|
|
14
|
+
* re-read on every resize and every edit. Optional: without it the card still renders a
|
|
15
|
+
* locale date, never the ISO. */
|
|
16
|
+
getSourceFormats?: () => SourceFormats | null;
|
|
17
|
+
getEnabled: () => boolean;
|
|
18
|
+
getPinLimit: () => number;
|
|
19
|
+
cultureCode?: string;
|
|
20
|
+
log?: (tag: string, detail?: unknown) => void;
|
|
21
|
+
}
|
|
22
|
+
export interface SelectionCards {
|
|
23
|
+
/** Hand it the row set chart-host resolved. Empty clears. */
|
|
24
|
+
onSelect(rowIdxs: number[]): void;
|
|
25
|
+
/** Drop the transient card AND every pin - used when the chart itself goes away. */
|
|
26
|
+
clear(): void;
|
|
27
|
+
destroy(): void;
|
|
28
|
+
}
|
|
29
|
+
export declare function createSelectionCards(deps: SelectionCardsDeps): SelectionCards;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bicharts/chart-host",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.77",
|
|
4
4
|
"description": "Run a BIC-generated D3 chart in any web host: compiles the generated render() function, applies the shared option defaults, resolves mark clicks (through tooltip overlays), owns the selection affordance, and translates row indices between cross-filtered charts. The same contract the BIC Power BI visual implements, minus Power BI. React bindings at @bicharts/chart-host/react.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -44,6 +44,11 @@
|
|
|
44
44
|
"import": "./dist/page.mjs",
|
|
45
45
|
"default": "./dist/page.mjs"
|
|
46
46
|
},
|
|
47
|
+
"./card": {
|
|
48
|
+
"types": "./dist/types/card.d.ts",
|
|
49
|
+
"import": "./dist/card.mjs",
|
|
50
|
+
"default": "./dist/card.mjs"
|
|
51
|
+
},
|
|
47
52
|
"./dax": {
|
|
48
53
|
"types": "./dist/types/dax.d.ts",
|
|
49
54
|
"import": "./dist/dax.mjs",
|