@bicharts/chart-host 0.6.109 → 0.6.111
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/adapters.mjs +3 -3
- package/dist/card.mjs +2 -2
- package/dist/{chunk-ABGDJ3NJ.mjs → chunk-3JCWTEEH.mjs} +11 -1
- package/dist/{chunk-TN5JRULV.mjs → chunk-7XT5OJ6M.mjs} +1 -1
- package/dist/{chunk-GQLEU3VC.mjs → chunk-AEO5SFEQ.mjs} +1 -1
- package/dist/{chunk-JQ7FFCOE.mjs → chunk-CASW2BIB.mjs} +64 -17
- package/dist/{chunk-QAPZIFOB.mjs → chunk-FT75ONSB.mjs} +17 -1
- package/dist/{chunk-4DOKJ3R3.mjs → chunk-IL5M7K6Z.mjs} +2 -2
- package/dist/{chunk-3ER4C7TG.mjs → chunk-KGVNZR23.mjs} +1 -1
- package/dist/{chunk-USZSHKIB.mjs → chunk-KY4FI2HA.mjs} +1 -1
- package/dist/{chunk-TH577JHI.mjs → chunk-NJWR3DFK.mjs} +110 -109
- package/dist/{chunk-3EQOJHRA.mjs → chunk-PELRAFYZ.mjs} +1 -1
- package/dist/{chunk-G4CKILIL.mjs → chunk-Q43WOKSV.mjs} +1 -1
- package/dist/{chunk-5WTQN5DL.mjs → chunk-S564YXNE.mjs} +1 -1
- package/dist/geo-world.mjs +1 -1
- package/dist/geo.mjs +1 -1
- package/dist/{geoWorld110m.generated-TD2TA7S7.mjs → geoWorld110m-3PRV3V4G.mjs} +1 -1
- package/dist/index.mjs +14 -12
- package/dist/legend-fit.mjs +3 -3
- package/dist/page.mjs +6 -4
- package/dist/provinces.mjs +2 -2
- package/dist/react.mjs +33 -11
- package/dist/testing.mjs +1 -1
- package/dist/types/contract.d.ts +14 -1
- package/dist/types/defaults.d.ts +2 -1
- package/dist/types/filterScope.d.ts +8 -0
- package/dist/types/geo-world.d.ts +1 -1
- package/dist/types/geoWorld110m.d.ts +1 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/keyboardMarks.d.ts +3 -2
- package/dist/types/page.d.ts +1 -1
- package/dist/types/react.d.ts +10 -1
- package/dist/zoom-memory.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! @bicharts/chart-host — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; Natural Earth and US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
2
|
import {
|
|
3
3
|
SNAPSHOT_SVG_ATTR
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KY4FI2HA.mjs";
|
|
5
5
|
|
|
6
6
|
// src/snapshot.ts
|
|
7
7
|
var DEFAULT_TIMEOUT_MS = 2e3;
|
|
@@ -59,7 +59,7 @@ async function loadGeo(geoKind) {
|
|
|
59
59
|
} else if (asset === "us-zip3") {
|
|
60
60
|
byAsset.set(asset, (await import("./geoUsZip3.generated-VSWL7D6F.mjs")).US_ZIP3);
|
|
61
61
|
} else {
|
|
62
|
-
byAsset.set(asset, (await import("./geoWorld110m
|
|
62
|
+
byAsset.set(asset, (await import("./geoWorld110m-3PRV3V4G.mjs")).WORLD_110M);
|
|
63
63
|
}
|
|
64
64
|
return fromAssets(key);
|
|
65
65
|
}
|
package/dist/geo-world.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! @bicharts/chart-host — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; Natural Earth and US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
2
|
import {
|
|
3
3
|
WORLD_110M
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3JCWTEEH.mjs";
|
|
5
5
|
import "./chunk-GHODWOAL.mjs";
|
|
6
6
|
export {
|
|
7
7
|
WORLD_110M
|
package/dist/geo.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! @bicharts/chart-host — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; Natural Earth and US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
2
|
import {
|
|
3
3
|
WORLD_110M
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3JCWTEEH.mjs";
|
|
5
5
|
import "./chunk-GHODWOAL.mjs";
|
|
6
6
|
export {
|
|
7
7
|
WORLD_110M
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
formatSourceDateFor,
|
|
6
6
|
isExcelDateFormat,
|
|
7
7
|
normaliseAggregation
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-Q43WOKSV.mjs";
|
|
9
9
|
import {
|
|
10
10
|
captureSvgSnapshot,
|
|
11
11
|
chartSvgOf,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
svgNaturalSize,
|
|
16
16
|
svgToDataUrl,
|
|
17
17
|
tableHostOf
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-PELRAFYZ.mjs";
|
|
19
19
|
import {
|
|
20
20
|
ANNOTATION_CLASS,
|
|
21
21
|
ANNOTATION_LAYER_CLASS,
|
|
@@ -66,6 +66,7 @@ import {
|
|
|
66
66
|
censusColourSpread,
|
|
67
67
|
censusMarks,
|
|
68
68
|
censusValuePlacement,
|
|
69
|
+
cleanFilterScope,
|
|
69
70
|
cleanHostSelection,
|
|
70
71
|
clippedTextFlag,
|
|
71
72
|
codeHasKeyboardStamp,
|
|
@@ -114,7 +115,7 @@ import {
|
|
|
114
115
|
toRGBA,
|
|
115
116
|
toSourceRows,
|
|
116
117
|
valuePlacementFlag
|
|
117
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-CASW2BIB.mjs";
|
|
118
119
|
import {
|
|
119
120
|
LASSO_AXES_SLOT,
|
|
120
121
|
LASSO_COUNT_CLASS,
|
|
@@ -141,13 +142,13 @@ import {
|
|
|
141
142
|
lassoVerdict,
|
|
142
143
|
pointInShape,
|
|
143
144
|
registerLassoAction
|
|
144
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-IL5M7K6Z.mjs";
|
|
145
146
|
import {
|
|
146
147
|
MIN_HIT_BAND_PX,
|
|
147
148
|
censusHitBands,
|
|
148
149
|
ensureCrossfilterHitTargets,
|
|
149
150
|
hitBandFlag
|
|
150
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-AEO5SFEQ.mjs";
|
|
151
152
|
import {
|
|
152
153
|
CONTAINER_SLOT_PRESS_AT,
|
|
153
154
|
DRAG_NOT_CLICK_PX,
|
|
@@ -172,7 +173,7 @@ import {
|
|
|
172
173
|
selectionRuleOf,
|
|
173
174
|
trackPress,
|
|
174
175
|
validRowSet
|
|
175
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-KGVNZR23.mjs";
|
|
176
177
|
import {
|
|
177
178
|
AXIS_PIN_BAND_PAD_PX,
|
|
178
179
|
AXIS_PIN_MAX_BAND_FRACTION,
|
|
@@ -201,7 +202,7 @@ import {
|
|
|
201
202
|
svgInkReach,
|
|
202
203
|
takeScroll,
|
|
203
204
|
unpinScrolledAxis
|
|
204
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-7XT5OJ6M.mjs";
|
|
205
206
|
import {
|
|
206
207
|
clearGeoCache,
|
|
207
208
|
geoAssetFor,
|
|
@@ -209,12 +210,12 @@ import {
|
|
|
209
210
|
loadGeo,
|
|
210
211
|
registerGeo,
|
|
211
212
|
registerGeoAsset
|
|
212
|
-
} from "./chunk-
|
|
213
|
+
} from "./chunk-S564YXNE.mjs";
|
|
213
214
|
import {
|
|
214
|
-
|
|
215
|
+
Ot,
|
|
215
216
|
l,
|
|
216
217
|
o
|
|
217
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-NJWR3DFK.mjs";
|
|
218
219
|
import "./chunk-A2GMXZP7.mjs";
|
|
219
220
|
import {
|
|
220
221
|
ACTIVE_TICK_CLASS,
|
|
@@ -271,7 +272,7 @@ import {
|
|
|
271
272
|
chartOwnsTimeline,
|
|
272
273
|
periodTickSuppressesFeedback,
|
|
273
274
|
withoutViewOnlyKeys
|
|
274
|
-
} from "./chunk-
|
|
275
|
+
} from "./chunk-KY4FI2HA.mjs";
|
|
275
276
|
import "./chunk-GHODWOAL.mjs";
|
|
276
277
|
|
|
277
278
|
// src/hostLinks.ts
|
|
@@ -2308,7 +2309,7 @@ function fingerprintComponentDigest(components) {
|
|
|
2308
2309
|
|
|
2309
2310
|
// src/index.ts
|
|
2310
2311
|
function registerCityTable(packed) {
|
|
2311
|
-
|
|
2312
|
+
Ot(packed);
|
|
2312
2313
|
}
|
|
2313
2314
|
export {
|
|
2314
2315
|
ACTIVE_TICK_CLASS,
|
|
@@ -2493,6 +2494,7 @@ export {
|
|
|
2493
2494
|
chartOwnsTimeline,
|
|
2494
2495
|
chartSvgOf,
|
|
2495
2496
|
chooserFitsViewport,
|
|
2497
|
+
cleanFilterScope,
|
|
2496
2498
|
cleanHostSelection,
|
|
2497
2499
|
clearGeoCache,
|
|
2498
2500
|
clearLasso,
|
package/dist/legend-fit.mjs
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
chartSvgOf,
|
|
4
4
|
tableHostOf
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PELRAFYZ.mjs";
|
|
6
6
|
import {
|
|
7
7
|
FIT_CONTENT_SELECTOR,
|
|
8
8
|
ctmScaleOf,
|
|
9
9
|
isPhantomBox
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-7XT5OJ6M.mjs";
|
|
11
|
+
import "./chunk-KY4FI2HA.mjs";
|
|
12
12
|
import "./chunk-GHODWOAL.mjs";
|
|
13
13
|
|
|
14
14
|
// src/legendFit/legendReconcile.ts
|
package/dist/page.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
createControls,
|
|
8
8
|
createFilter,
|
|
9
9
|
createFilterScope,
|
|
10
|
+
filterScopeOf,
|
|
10
11
|
fromVegaInteraction,
|
|
11
12
|
noteBadges,
|
|
12
13
|
notesFor,
|
|
@@ -14,10 +15,10 @@ import {
|
|
|
14
15
|
readControls,
|
|
15
16
|
viewFromToken,
|
|
16
17
|
viewToken
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-FT75ONSB.mjs";
|
|
19
|
+
import "./chunk-IL5M7K6Z.mjs";
|
|
20
|
+
import "./chunk-KGVNZR23.mjs";
|
|
21
|
+
import "./chunk-KY4FI2HA.mjs";
|
|
21
22
|
import "./chunk-GHODWOAL.mjs";
|
|
22
23
|
export {
|
|
23
24
|
LINKED_HOVER_CLASS,
|
|
@@ -27,6 +28,7 @@ export {
|
|
|
27
28
|
createControls,
|
|
28
29
|
createFilter,
|
|
29
30
|
createFilterScope,
|
|
31
|
+
filterScopeOf,
|
|
30
32
|
fromVegaInteraction,
|
|
31
33
|
noteBadges,
|
|
32
34
|
notesFor,
|
package/dist/provinces.mjs
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
geoFromCache,
|
|
4
4
|
registerGeo
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-S564YXNE.mjs";
|
|
6
6
|
import {
|
|
7
7
|
Si,
|
|
8
8
|
W,
|
|
9
9
|
bt
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NJWR3DFK.mjs";
|
|
11
11
|
import "./chunk-A2GMXZP7.mjs";
|
|
12
12
|
import "./chunk-GHODWOAL.mjs";
|
|
13
13
|
|
package/dist/react.mjs
CHANGED
|
@@ -7,35 +7,36 @@ import {
|
|
|
7
7
|
createControls,
|
|
8
8
|
createFilter,
|
|
9
9
|
createFilterScope,
|
|
10
|
+
filterScopeOf,
|
|
10
11
|
fromVegaInteraction,
|
|
11
12
|
noteBadges,
|
|
12
13
|
notesFor,
|
|
13
14
|
payloadRowReader,
|
|
14
15
|
viewFromToken,
|
|
15
16
|
viewToken
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FT75ONSB.mjs";
|
|
17
18
|
import {
|
|
18
19
|
assembleD3,
|
|
19
20
|
createChartGroup,
|
|
20
21
|
createChartHost,
|
|
21
22
|
syncMemberSelection,
|
|
22
23
|
toSourceRows
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-CASW2BIB.mjs";
|
|
25
|
+
import "./chunk-IL5M7K6Z.mjs";
|
|
26
|
+
import "./chunk-AEO5SFEQ.mjs";
|
|
27
|
+
import "./chunk-KGVNZR23.mjs";
|
|
28
|
+
import "./chunk-7XT5OJ6M.mjs";
|
|
28
29
|
import {
|
|
29
30
|
geoFromCache,
|
|
30
31
|
loadGeo
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
32
|
+
} from "./chunk-S564YXNE.mjs";
|
|
33
|
+
import "./chunk-NJWR3DFK.mjs";
|
|
33
34
|
import "./chunk-A2GMXZP7.mjs";
|
|
34
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-KY4FI2HA.mjs";
|
|
35
36
|
import "./chunk-GHODWOAL.mjs";
|
|
36
37
|
|
|
37
38
|
// src/react.tsx
|
|
38
|
-
import { createContext, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
39
|
+
import { createContext, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
39
40
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
40
41
|
var Ctx = createContext(null);
|
|
41
42
|
function useBicSelection() {
|
|
@@ -65,7 +66,7 @@ function BicChart(props) {
|
|
|
65
66
|
const {
|
|
66
67
|
code,
|
|
67
68
|
renderFn,
|
|
68
|
-
options,
|
|
69
|
+
options: pageOptions,
|
|
69
70
|
d3,
|
|
70
71
|
geoKind,
|
|
71
72
|
viewState,
|
|
@@ -85,9 +86,29 @@ function BicChart(props) {
|
|
|
85
86
|
className,
|
|
86
87
|
style,
|
|
87
88
|
selects,
|
|
89
|
+
scopedBy,
|
|
88
90
|
controls,
|
|
89
91
|
ariaLabel
|
|
90
92
|
} = props;
|
|
93
|
+
const scopeList = scopedBy == null ? [] : Array.isArray(scopedBy) ? scopedBy : [scopedBy];
|
|
94
|
+
const scopeIds = scopeList.map((f) => f?.id).join("");
|
|
95
|
+
const subscribeScope = useCallback((cb) => {
|
|
96
|
+
const offs = scopeList.map((f) => f?.onChange?.(() => cb()));
|
|
97
|
+
return () => {
|
|
98
|
+
for (const off of offs) off?.();
|
|
99
|
+
};
|
|
100
|
+
}, [scopeIds]);
|
|
101
|
+
const scopeSnapshot = () => scopeList.map((f) => f?.version).join(",");
|
|
102
|
+
useSyncExternalStore(subscribeScope, scopeSnapshot, scopeSnapshot);
|
|
103
|
+
const [scopeEver, setScopeEver] = useState(scopedBy !== void 0);
|
|
104
|
+
if (scopedBy !== void 0 && !scopeEver) setScopeEver(true);
|
|
105
|
+
const scopeFact = scopedBy === void 0 ? void 0 : filterScopeOf(scopeList);
|
|
106
|
+
const scopeKey = scopeFact ? JSON.stringify(scopeFact) : "";
|
|
107
|
+
const options = useMemo(
|
|
108
|
+
() => scopeEver ? { ...pageOptions ?? {}, filterScope: scopeFact ?? pageOptions?.filterScope } : pageOptions,
|
|
109
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
110
|
+
[pageOptions, scopeEver, scopeKey]
|
|
111
|
+
);
|
|
91
112
|
const ref = useRef(null);
|
|
92
113
|
const hostRef = useRef(null);
|
|
93
114
|
const rowMapRef = useRef(null);
|
|
@@ -503,6 +524,7 @@ export {
|
|
|
503
524
|
createControls,
|
|
504
525
|
createFilter,
|
|
505
526
|
createFilterScope,
|
|
527
|
+
filterScopeOf,
|
|
506
528
|
fromVegaInteraction,
|
|
507
529
|
noteBadges,
|
|
508
530
|
notesFor,
|
package/dist/testing.mjs
CHANGED
package/dist/types/contract.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExportFormat, ExportTableService, SaveFileService } from "./exportTable";
|
|
2
|
-
export declare const HOST_CONTRACT_VERSION = "1.
|
|
2
|
+
export declare const HOST_CONTRACT_VERSION = "1.23.0";
|
|
3
3
|
export type GeoPointPrecision = "latlon" | "city" | "zip3" | "state" | "country";
|
|
4
4
|
/** Every valid tier, ordered most precise → coarsest. Runtime form of GeoPointPrecision. */
|
|
5
5
|
export declare const GEO_POINT_PRECISIONS: readonly GeoPointPrecision[];
|
|
@@ -51,6 +51,18 @@ export interface HostSelectionFact {
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
export declare const CONTAINER_SLOT_HOST_SELECTION = "__lchHostSelection";
|
|
54
|
+
/**
|
|
55
|
+
* THE PAGE FILTER THAT NARROWED THIS CHART'S ROWS BEFORE THEY ARRIVED (1.23.0), as RenderOptions.filterScope. Untrusted
|
|
56
|
+
* on the chart side like every option: resolveOptions keeps values to non-blank text, each once.
|
|
57
|
+
*/
|
|
58
|
+
export interface FilterScopeFact {
|
|
59
|
+
/** The field the filter is on, as the reader knows it ("Country"); "" when the host can't name it. */
|
|
60
|
+
field: string;
|
|
61
|
+
/** The values it keeps, as the reader reads them ("United States"); never empty. */
|
|
62
|
+
values: string[];
|
|
63
|
+
/** The host's own phrase for the whole filter ("the two neighbours"), used instead of one made from the values. */
|
|
64
|
+
label?: string;
|
|
65
|
+
}
|
|
54
66
|
export declare const CONTAINER_SLOT_ANIM_STOP = "__llmAnimStop";
|
|
55
67
|
export declare const CONTAINER_SLOT_XF_CLEAR = "__llmXfClear";
|
|
56
68
|
export declare const CONTAINER_SLOT_INITIAL_XF_MARK = "__llmInitialXfMark";
|
|
@@ -149,6 +161,7 @@ export interface RenderOptions {
|
|
|
149
161
|
rowsWithheld?: number;
|
|
150
162
|
rowsFilteredOut?: number;
|
|
151
163
|
hostSelection?: HostSelectionFact;
|
|
164
|
+
filterScope?: FilterScopeFact;
|
|
152
165
|
openUrl?: (url: string) => void;
|
|
153
166
|
copyText?: (text: string) => boolean | void | Promise<boolean | void>;
|
|
154
167
|
saveFile?: SaveFileService;
|
package/dist/types/defaults.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type RenderOptions, type HostSelectionFact } from "./contract";
|
|
1
|
+
import { type RenderOptions, type HostSelectionFact, type FilterScopeFact } from "./contract";
|
|
2
2
|
export declare function cleanHostSelection(v: unknown): HostSelectionFact | undefined;
|
|
3
|
+
export declare function cleanFilterScope(v: unknown): FilterScopeFact | undefined;
|
|
3
4
|
export type ResolveOptionsInput = {
|
|
4
5
|
[K in keyof RenderOptions]?: any;
|
|
5
6
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ChartHost } from "./host";
|
|
2
2
|
import type { Controls } from "./controls";
|
|
3
|
+
import type { FilterScopeFact } from "./contract";
|
|
3
4
|
/** Why a filter changed. */
|
|
4
5
|
export type FilterChangeReason = "click" | "clear" | "page" | "data";
|
|
5
6
|
/** One selected key: a value per key column, in the filter's column order. */
|
|
@@ -118,6 +119,13 @@ export declare function viewFromToken(token: string | null | undefined): PageVie
|
|
|
118
119
|
export declare function createFilter(columns: string | readonly string[], opts?: FilterOptions): Filter;
|
|
119
120
|
/** Make a page's filter scope. */
|
|
120
121
|
export declare function createFilterScope(): FilterScope;
|
|
122
|
+
/**
|
|
123
|
+
* THE PAGE FILTERS THAT NARROWED A CHART'S ROWS, as the fact the chart is told (RenderOptions.filterScope, contract
|
|
124
|
+
* 1.23.0). For filters applied to the chart's QUERY, so its rows arrive already narrowed and it can't see the filter.
|
|
125
|
+
* Only the active ones count. The field is each one's label (its key columns when it has none), joined ", "; the values
|
|
126
|
+
* are what its chip shows for each key, in order, each once. Nothing active, nothing to say: undefined.
|
|
127
|
+
*/
|
|
128
|
+
export declare function filterScopeOf(filters: Filter | readonly Filter[] | null | undefined): FilterScopeFact | undefined;
|
|
121
129
|
export interface FilterBinding {
|
|
122
130
|
/**
|
|
123
131
|
* Call after the chart is handed new data. The selection is repainted where its keys are drawn now, and a key the new
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { WORLD_110M } from "./geoWorld110m
|
|
1
|
+
export { WORLD_110M } from "./geoWorld110m";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const WORLD_110M: any;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { HOST_CONTRACT_VERSION, GEO_POINT_PRECISIONS, MARK_CLASS, LEGEND_MARK_CLASS, AXIS_FILTER_CLASS, ROW_IDX_ATTR, LIFT_SELECTED_CLASS, CONTROL_CLASS, NO_ROW_MARKS_ATTR, NOTE_STYLE_ATTR, SELECTION_RULE_ATTR, SELECTION_RULE_CLICKED_MARKS, MARK_KEY_ATTR, CONTAINER_SLOT_CLICKED_MARKS, SNAPSHOT_SVG_ATTR, XFILTER_REFRESH_EVENT, CONTAINER_SLOT_ANIM_STOP, CONTAINER_SLOT_XF_CLEAR, CONTAINER_SLOT_INITIAL_XF_MARK, CONTAINER_SLOT_UI_STATE, CONTAINER_SLOT_SCROLL, CONTAINER_SLOT_HOST_SELECTION, VIEW_ONLY_UI_STATE_KEYS, withoutViewOnlyKeys, HOST_CONTAINER_CLASS, SELECTION_ACTIVE_CLASS, MARK_SELECTED_CLASS, MARKS_INERT_CLASS, ACTIVE_TICK_CLASS, DIM_OPACITY_VAR, DIM_OPACITY_DEFAULT, DIM_OPACITY_MIN, chartOwnsTimeline, periodTickSuppressesFeedback, ANIM_PLAY_SPEED_DEFAULT, ANIM_PLAY_SPEED_MIN, ANIM_PLAY_SPEED_MAX, ANIM_LOOP_DELAY_DEFAULT, ANIM_LOOP_DELAY_MIN, ANIM_MAX_IDEAL_FRAMES_DEFAULT, ANIM_MAX_IDEAL_FRAMES_MIN, ANIM_MAX_IDEAL_FRAMES_MAX, ANIMATION_OPTION_KEYS, COLOR_SCALE_SELF_CLAMP_PCT_DEFAULT, COLOR_SCALE_SELF_CLAMP_PCT_MIN, COLOR_SCALE_SELF_CLAMP_PCT_MAX, FLIP_MODE_DEFAULT, FLIP_INTERVAL_MIN_MS, FLIP_INTERVAL_MAX_MS, FLIP_DIRECTION_DEFAULT, APPROXIMATE_POSITIONS_DEFAULT, VALUE_AXIS_BASELINE_DEFAULT, SEASONAL_MARKERS_DEFAULT, MAX_MAP_POINTS_DEFAULT, type GeoPointPrecision, type GeoMapKind, type TimelineStyle, type FlipMode, type FlipDirection, type ApproximatePositions, type ValueAxisBaseline, type SeasonalMarkers, type ColorScaleScope, type RenderOptions, type ViewStateProvider, type ChartControlChange, type XfilterRefreshDetail, type HostSelectionFact, } from "./contract";
|
|
2
|
-
export { resolveOptions, cleanHostSelection, type ResolveOptionsInput } from "./defaults";
|
|
1
|
+
export { HOST_CONTRACT_VERSION, GEO_POINT_PRECISIONS, MARK_CLASS, LEGEND_MARK_CLASS, AXIS_FILTER_CLASS, ROW_IDX_ATTR, LIFT_SELECTED_CLASS, CONTROL_CLASS, NO_ROW_MARKS_ATTR, NOTE_STYLE_ATTR, SELECTION_RULE_ATTR, SELECTION_RULE_CLICKED_MARKS, MARK_KEY_ATTR, CONTAINER_SLOT_CLICKED_MARKS, SNAPSHOT_SVG_ATTR, XFILTER_REFRESH_EVENT, CONTAINER_SLOT_ANIM_STOP, CONTAINER_SLOT_XF_CLEAR, CONTAINER_SLOT_INITIAL_XF_MARK, CONTAINER_SLOT_UI_STATE, CONTAINER_SLOT_SCROLL, CONTAINER_SLOT_HOST_SELECTION, VIEW_ONLY_UI_STATE_KEYS, withoutViewOnlyKeys, HOST_CONTAINER_CLASS, SELECTION_ACTIVE_CLASS, MARK_SELECTED_CLASS, MARKS_INERT_CLASS, ACTIVE_TICK_CLASS, DIM_OPACITY_VAR, DIM_OPACITY_DEFAULT, DIM_OPACITY_MIN, chartOwnsTimeline, periodTickSuppressesFeedback, ANIM_PLAY_SPEED_DEFAULT, ANIM_PLAY_SPEED_MIN, ANIM_PLAY_SPEED_MAX, ANIM_LOOP_DELAY_DEFAULT, ANIM_LOOP_DELAY_MIN, ANIM_MAX_IDEAL_FRAMES_DEFAULT, ANIM_MAX_IDEAL_FRAMES_MIN, ANIM_MAX_IDEAL_FRAMES_MAX, ANIMATION_OPTION_KEYS, COLOR_SCALE_SELF_CLAMP_PCT_DEFAULT, COLOR_SCALE_SELF_CLAMP_PCT_MIN, COLOR_SCALE_SELF_CLAMP_PCT_MAX, FLIP_MODE_DEFAULT, FLIP_INTERVAL_MIN_MS, FLIP_INTERVAL_MAX_MS, FLIP_DIRECTION_DEFAULT, APPROXIMATE_POSITIONS_DEFAULT, VALUE_AXIS_BASELINE_DEFAULT, SEASONAL_MARKERS_DEFAULT, MAX_MAP_POINTS_DEFAULT, type GeoPointPrecision, type GeoMapKind, type TimelineStyle, type FlipMode, type FlipDirection, type ApproximatePositions, type ValueAxisBaseline, type SeasonalMarkers, type ColorScaleScope, type RenderOptions, type ViewStateProvider, type ChartControlChange, type XfilterRefreshDetail, type HostSelectionFact, type FilterScopeFact, } from "./contract";
|
|
2
|
+
export { resolveOptions, cleanHostSelection, cleanFilterScope, type ResolveOptionsInput } from "./defaults";
|
|
3
3
|
export { hostLinkServices, type HostLinkServices, type ClipboardLike } from "./hostLinks";
|
|
4
4
|
export { tableToCsv, tableToXlsx, buildExportFile, exportFileName, sheetName as exportSheetName, excelNumberFormat, excelSerial, bytesToBase64, exportFormatsFor, exportTableService, browserSaveFile, EXPORT_FORMATS, XLSX_MIME, CSV_MIME, type ExportTable, type ExportColumn, type ExportColumnType, type ExportCell, type ExportFormat, type ExportFile, type SaveFileService, type ExportTableService, } from "./exportTable";
|
|
5
5
|
export { OPTIONS_VOCABULARY, LIVE_OPTION_KEYS, MAX_MAP_POINTS_MIN, MAX_MAP_POINTS_MAX, LIMIT_COUNT_MAX, wireLimitCount, codeReadsOption, type OptionVocabularyEntry, type OptionTiming, type OptionWire, type OptionKey, } from "./optionsVocabulary";
|
|
@@ -37,7 +37,8 @@ export interface KeyboardHandle {
|
|
|
37
37
|
refresh(): void;
|
|
38
38
|
destroy(): void;
|
|
39
39
|
}
|
|
40
|
-
/** What a screen reader calls a row: its first few values, numbers in the reader's culture, internal columns
|
|
41
|
-
*
|
|
40
|
+
/** What a screen reader calls a row: its first few values, numbers and dates in the reader's culture, internal columns
|
|
41
|
+
* left out. A Date is read as the reader's date, never as its String() (weekday, time and time zone); one that names
|
|
42
|
+
* no day is skipped like a blank. Text is kept as it is. Shared so every host names a mark the same way. */
|
|
42
43
|
export declare function rowNameOf(columns: ReadonlyArray<unknown>, row: ReadonlyArray<unknown> | null | undefined, culture?: string): string | null;
|
|
43
44
|
export declare function installKeyboard(env: KeyboardEnv): KeyboardHandle;
|
package/dist/types/page.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { viewToken, viewFromToken, LINKED_HOVER_CLASS, type PageView } from "./filterScope";
|
|
2
|
-
export { createFilter, createFilterScope, bindFilter, payloadRowReader, fromVegaInteraction, type Filter, type FilterScope, type FilterOptions, type FilterKey, type FilterChangeReason, type FilterBinding, type BindFilterOptions, type VegaInteractionEvent } from "./filterScope";
|
|
2
|
+
export { createFilter, createFilterScope, bindFilter, payloadRowReader, fromVegaInteraction, filterScopeOf, type Filter, type FilterScope, type FilterOptions, type FilterKey, type FilterChangeReason, type FilterBinding, type BindFilterOptions, type VegaInteractionEvent } from "./filterScope";
|
|
3
3
|
export { createControls, attachControls, readControls, type Controls, type ControlInfo, type ControlsAttachment } from "./controls";
|
|
4
4
|
export { noteBadges, badgeKey, notesFor, type MarkNoteLike, type NoteBadgeOptions } from "./markNotes";
|
package/dist/types/react.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { type Controls } from "./controls";
|
|
|
8
8
|
export { createControls, type Controls, type ControlInfo } from "./controls";
|
|
9
9
|
export { noteBadges, badgeKey, notesFor, type MarkNoteLike, type NoteBadgeOptions } from "./markNotes";
|
|
10
10
|
export { viewToken, viewFromToken, LINKED_HOVER_CLASS, type PageView } from "./filterScope";
|
|
11
|
-
export { createFilter, createFilterScope, fromVegaInteraction, type Filter, type FilterOptions, type FilterScope, type FilterChangeReason } from "./filterScope";
|
|
11
|
+
export { createFilter, createFilterScope, fromVegaInteraction, filterScopeOf, type Filter, type FilterOptions, type FilterScope, type FilterChangeReason } from "./filterScope";
|
|
12
12
|
export interface BicChartProps {
|
|
13
13
|
/** Generated render() source (an ES module's `code` export, or the raw string). */
|
|
14
14
|
code?: string;
|
|
@@ -100,6 +100,15 @@ export interface BicChartProps {
|
|
|
100
100
|
* `selects`, the filter owns what this chart shows as selected.
|
|
101
101
|
*/
|
|
102
102
|
selects?: Filter;
|
|
103
|
+
/**
|
|
104
|
+
* THE PAGE FILTERS THIS CHART'S QUERY ALREADY APPLIES - a KPI deck whose query takes the picked country, a table the
|
|
105
|
+
* page narrows with `filter.keep(rows)` before handing it over. The rows arrive narrowed, so the chart can't see the
|
|
106
|
+
* filter; while one of these is active the chart is told (options.filterScope: the filter's label and the values its
|
|
107
|
+
* chip shows), and its titles and comparisons say so ("North America · United States only", "rank 2 of 3 (United
|
|
108
|
+
* States only)"). Cleared again when the filters clear. Not for the filter this chart `selects` unless its own rows
|
|
109
|
+
* are narrowed by it too. Absent: the page's own options.filterScope, if any, goes through untouched.
|
|
110
|
+
*/
|
|
111
|
+
scopedBy?: Filter | readonly Filter[];
|
|
103
112
|
/**
|
|
104
113
|
* THE CHART'S OWN CONTROLS AS PAGE STATE - from useBicControls(). For a chart that draws
|
|
105
114
|
* sliders (the What-if projection's rate and horizon): `controls.values` holds every
|
package/dist/zoom-memory.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! @bicharts/chart-host — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; Natural Earth and US Census/TIGER (public domain). Full text: NOTICE in this package. */
|
|
2
2
|
import {
|
|
3
3
|
K
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NJWR3DFK.mjs";
|
|
5
5
|
import "./chunk-GHODWOAL.mjs";
|
|
6
6
|
|
|
7
7
|
// src/zoomMemory/zoomMemory.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bicharts/chart-host",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.111",
|
|
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",
|