@bicharts/chart-host 0.5.61 → 0.5.62
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/index.mjs +6 -2
- package/dist/types/qualifyFilter.d.ts +17 -5
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -688,8 +688,12 @@ function filterQualifyRows(rows, term, read) {
|
|
|
688
688
|
if (byDesc.length > 0) return { rows: byDesc, tier: "desc", term: t };
|
|
689
689
|
return { rows: [], tier: "none", term: t };
|
|
690
690
|
}
|
|
691
|
-
|
|
692
|
-
|
|
691
|
+
function readQualifyChartRow(r) {
|
|
692
|
+
return { name: r.name, description: r.description };
|
|
693
|
+
}
|
|
694
|
+
function readQualifyRefusalRow(r) {
|
|
695
|
+
return { name: r.name, description: r.reason };
|
|
696
|
+
}
|
|
693
697
|
var FILTER_ROW_PX = 32;
|
|
694
698
|
var FILTER_MIN_WIDTH_PX = 420;
|
|
695
699
|
var FILTER_MIN_HEIGHT_PX = 300;
|
|
@@ -67,21 +67,33 @@ export type QualifyFilterRead<T> = (row: T) => {
|
|
|
67
67
|
* and the hosts already drop it at render time.
|
|
68
68
|
*/
|
|
69
69
|
export declare function filterQualifyRows<T>(rows: readonly T[] | null | undefined, term: string | null | undefined, read: QualifyFilterRead<T>): QualifyFilterResult<T>;
|
|
70
|
-
/** Reads a fitting row (`charts[]`): `name` / `description`.
|
|
71
|
-
|
|
70
|
+
/** Reads a fitting row (`charts[]`): `name` / `description`.
|
|
71
|
+
*
|
|
72
|
+
* GENERIC, and it has to be. Written as a `const` with an explicit `QualifyFilterRead<{...}>`
|
|
73
|
+
* annotation it PINS the row type, and `filterQualifyRows` then infers T from the reader instead
|
|
74
|
+
* of from the rows - so a caller passing its own richer row type gets back an array typed as the
|
|
75
|
+
* reader's minimal shape and fails to assign it home. Caught by the MCP tool, which passes
|
|
76
|
+
* `EligibleChart[]` and got `{name?, description?}[]` back. */
|
|
77
|
+
export declare function readQualifyChartRow<T extends {
|
|
78
|
+
name?: string | null;
|
|
79
|
+
description?: string | null;
|
|
80
|
+
}>(r: T): {
|
|
72
81
|
name?: string | null;
|
|
73
82
|
description?: string | null;
|
|
74
|
-
}
|
|
83
|
+
};
|
|
75
84
|
/**
|
|
76
85
|
* Reads a REFUSED row (`refused[]`). Its second field is the gate's SENTENCE rather than a
|
|
77
86
|
* description, and searching it is right for the same reason the tier exists: the sentence names
|
|
78
87
|
* the reader's own columns, so "region" finding every type refused over Region is a useful
|
|
79
88
|
* answer to "why isn't my chart here" - which is the only question that section is open to ask.
|
|
80
89
|
*/
|
|
81
|
-
export declare
|
|
90
|
+
export declare function readQualifyRefusalRow<T extends {
|
|
82
91
|
name?: string | null;
|
|
83
92
|
reason?: string | null;
|
|
84
|
-
}
|
|
93
|
+
}>(r: T): {
|
|
94
|
+
name?: string | null;
|
|
95
|
+
description?: string | null;
|
|
96
|
+
};
|
|
85
97
|
/**
|
|
86
98
|
* THE HEIGHT THE FILTER ROW COSTS THE LIST - the row plus its 6px bottom margin.
|
|
87
99
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bicharts/chart-host",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.62",
|
|
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",
|