@bicharts/chart-host 0.6.6 → 0.6.8
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/{chunk-ZPWRXCS5.mjs → chunk-EPEVGRL6.mjs} +371 -353
- package/dist/index.mjs +1 -1
- package/dist/react.mjs +2 -2
- package/dist/types/group.d.ts +13 -6
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
package/dist/react.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
loadGeo,
|
|
8
8
|
syncMemberSelection,
|
|
9
9
|
toSourceRows
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EPEVGRL6.mjs";
|
|
11
11
|
import "./chunk-A2GMXZP7.mjs";
|
|
12
12
|
import "./chunk-GHODWOAL.mjs";
|
|
13
13
|
|
|
@@ -140,7 +140,7 @@ function BicChart(props) {
|
|
|
140
140
|
useEffect(() => {
|
|
141
141
|
const host = hostRef.current;
|
|
142
142
|
if (!host || !ctx) return;
|
|
143
|
-
syncMemberSelection(host, ctx.selection, id, highlightMode, incoming);
|
|
143
|
+
syncMemberSelection(host, ctx.selection, id, highlightMode, incoming, rowMapRef.current);
|
|
144
144
|
}, [ctx?.selection, id, ctx, highlightMode, incoming && incoming.join(",")]);
|
|
145
145
|
return /* @__PURE__ */ jsx("div", { ref, className, style });
|
|
146
146
|
}
|
package/dist/types/group.d.ts
CHANGED
|
@@ -74,13 +74,20 @@ export interface ChartGroup {
|
|
|
74
74
|
/** Payload row indices -> source row indices, dropping any the map does not cover. */
|
|
75
75
|
export declare function toSourceRows(rowMap: readonly number[] | null | undefined, payloadRowIdxs: readonly number[]): number[];
|
|
76
76
|
/**
|
|
77
|
-
* Make a member's painted selection agree with the group's. A member
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
77
|
+
* Make a member's painted selection agree with the group's. A highlight member with an incoming
|
|
78
|
+
* selection paints it. Any other member that still shows a selection clears it - a stale
|
|
79
|
+
* highlight left on the origin after the selection moved elsewhere, or after a clear.
|
|
80
|
+
*
|
|
81
|
+
* THE MEMBER THAT MADE THE SELECTION keeps it, repainted in the payload it draws NOW when
|
|
82
|
+
* `rowMap` (that payload's row map) is given. Its host holds the selection as PAYLOAD rows, and
|
|
83
|
+
* a member that was filtered when it was clicked stops filtering the moment it becomes the
|
|
84
|
+
* origin - its payload grows back to the whole table and renumbers, so the payload rows its
|
|
85
|
+
* host holds would name different records. The group's selection is in source rows, so it is
|
|
86
|
+
* translated through the new map and repainted when it differs.
|
|
87
|
+
*
|
|
88
|
+
* Every path notifies with source "host", so nothing done here is republished.
|
|
82
89
|
*/
|
|
83
|
-
export declare function syncMemberSelection(host: ChartHost, selection: ChartGroupSelection, id: string | undefined, highlight: boolean, incoming: readonly number[] | null): void;
|
|
90
|
+
export declare function syncMemberSelection(host: ChartHost, selection: ChartGroupSelection, id: string | undefined, highlight: boolean, incoming: readonly number[] | null, rowMap?: readonly number[] | null): void;
|
|
84
91
|
/**
|
|
85
92
|
* Create a cross-filter group over one source table: `rows` are objects keyed by column name,
|
|
86
93
|
* `columns` the column descriptors (`ingest()` returns both).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bicharts/chart-host",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.8",
|
|
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",
|