@malloydata/render 0.0.352 → 0.0.354
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/.storybook/malloy-stories-indexer.ts +3 -2
- package/dist/module/component/cell-utils.d.ts +9 -8
- package/dist/module/component/render-numeric-field.d.ts +7 -21
- package/dist/module/component/table/pivot-utils.d.ts +1 -1
- package/dist/module/component/tag-configs.d.ts +76 -0
- package/dist/module/component/types.d.ts +0 -1
- package/dist/module/data_tree/fields/base.d.ts +27 -0
- package/dist/module/html/main_renderer_factory.d.ts +1 -1
- package/dist/module/index.mjs +25974 -25388
- package/dist/module/index.umd.js +78 -78
- package/dist/module/plugins/big-value/big-value-component.d.ts +8 -2
- package/dist/module/plugins/big-value/big-value-settings.d.ts +28 -0
- package/dist/module/plugins/scatter-chart/scatter-chart-plugin.d.ts +2 -0
- package/dist/module/plugins/segment-map/segment-map-plugin.d.ts +2 -0
- package/dist/module/plugins/shape-map/shape-map-plugin.d.ts +2 -0
- package/dist/module/render-field-metadata.d.ts +4 -1
- package/dist/module/util.d.ts +1 -0
- package/package.json +5 -5
- package/dist/module/component/legacy-charts/legacy_chart.d.ts +0 -5
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { Field, NestCell } from '../../data_tree';
|
|
2
|
-
import { BigValueSettings } from './big-value-settings';
|
|
2
|
+
import { BigValueSettings, BigValueTagConfig } from './big-value-settings';
|
|
3
3
|
/**
|
|
4
|
-
* Props for the BigValueComponent
|
|
4
|
+
* Props for the BigValueComponent.
|
|
5
|
+
*
|
|
6
|
+
* The component receives pre-resolved tag data and never reads
|
|
7
|
+
* tags directly. All tag access happens at setup time in the
|
|
8
|
+
* plugin's create() method.
|
|
5
9
|
*/
|
|
6
10
|
export interface BigValueComponentProps {
|
|
7
11
|
/** The data cell containing the row(s) */
|
|
@@ -10,6 +14,8 @@ export interface BigValueComponentProps {
|
|
|
10
14
|
field: Field;
|
|
11
15
|
/** Plugin settings */
|
|
12
16
|
settings: BigValueSettings;
|
|
17
|
+
/** Pre-resolved tag data for all child fields */
|
|
18
|
+
tagConfig: BigValueTagConfig;
|
|
13
19
|
}
|
|
14
20
|
/**
|
|
15
21
|
* Main Big Value component
|
|
@@ -44,3 +44,31 @@ export declare const bigValueSettingsSchema: JSONSchemaObject;
|
|
|
44
44
|
* Type for the settings schema
|
|
45
45
|
*/
|
|
46
46
|
export type IBigValueSettingsSchema = typeof bigValueSettingsSchema;
|
|
47
|
+
/**
|
|
48
|
+
* Per-field tag data resolved at setup time.
|
|
49
|
+
*
|
|
50
|
+
* All tag reads for a field happen during plugin create(), before
|
|
51
|
+
* the component mounts. This ensures tag validation and unread-tag
|
|
52
|
+
* detection work without a browser/DOM. See the TagResolver pattern
|
|
53
|
+
* in CONTEXT.md for the design rationale.
|
|
54
|
+
*/
|
|
55
|
+
export interface BigValueFieldConfig {
|
|
56
|
+
/** Display label (from # label or snake_case conversion of field name) */
|
|
57
|
+
label: string;
|
|
58
|
+
/** Description text (from # description) */
|
|
59
|
+
description: string | null;
|
|
60
|
+
/** Comparison info (from # big_value { comparison_field=... }) */
|
|
61
|
+
comparison: BigValueComparisonInfo | null;
|
|
62
|
+
/** Sparkline nest reference (from # big_value { sparkline=... }) */
|
|
63
|
+
sparklineRef: string | null;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Tag data resolved at setup time for the entire big_value nest.
|
|
67
|
+
* Keyed by child field name.
|
|
68
|
+
*/
|
|
69
|
+
export interface BigValueTagConfig {
|
|
70
|
+
/** Per-field resolved tag data */
|
|
71
|
+
fieldConfigs: Map<string, BigValueFieldConfig>;
|
|
72
|
+
/** Field names of child nests that are sparkline charts */
|
|
73
|
+
sparklineNestNames: Set<string>;
|
|
74
|
+
}
|
|
@@ -25,10 +25,13 @@ export declare class RenderFieldMetadata {
|
|
|
25
25
|
*/
|
|
26
26
|
private validateFieldTags;
|
|
27
27
|
/**
|
|
28
|
-
* Mark tag paths declared by plugins
|
|
28
|
+
* Mark tag paths declared by plugins as read.
|
|
29
29
|
* This prevents false-positive "unknown tag" warnings for tags that
|
|
30
30
|
* are consumed at render time or interaction time but may not have
|
|
31
31
|
* been read yet (e.g. virtualized charts, hover tooltips).
|
|
32
|
+
*
|
|
33
|
+
* Built-in renderer tags are now handled by resolveBuiltInTags()
|
|
34
|
+
* which reads all tags at setup time via typed config resolvers.
|
|
32
35
|
*/
|
|
33
36
|
private markDeclaredTags;
|
|
34
37
|
}
|
package/dist/module/util.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare function formatTimeUnit(value: number, unit: DurationUnit, option
|
|
|
16
16
|
}): string;
|
|
17
17
|
export declare function getText(field: Field, value: number, options: {
|
|
18
18
|
durationUnit?: string;
|
|
19
|
+
terse?: boolean;
|
|
19
20
|
}): string | null;
|
|
20
21
|
export interface RenderTimeStringOptions {
|
|
21
22
|
isDate?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/render",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.354",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/module/index.umd.js",
|
|
6
6
|
"types": "dist/module/index.d.ts",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"generate-flow": "ts-node ../../scripts/gen-flow.ts"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@malloydata/malloy-interfaces": "0.0.
|
|
33
|
-
"@malloydata/malloy-tag": "0.0.
|
|
32
|
+
"@malloydata/malloy-interfaces": "0.0.354",
|
|
33
|
+
"@malloydata/malloy-tag": "0.0.354",
|
|
34
34
|
"@tanstack/solid-virtual": "^3.10.4",
|
|
35
35
|
"lodash": "^4.17.20",
|
|
36
36
|
"luxon": "^3.5.0",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"vega-lite": "^5.2.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@malloydata/db-duckdb": "0.0.
|
|
46
|
-
"@malloydata/malloy": "0.0.
|
|
45
|
+
"@malloydata/db-duckdb": "0.0.354",
|
|
46
|
+
"@malloydata/malloy": "0.0.354",
|
|
47
47
|
"@storybook/addon-essentials": "^8.6.15",
|
|
48
48
|
"@storybook/addon-interactions": "^8.6.15",
|
|
49
49
|
"@storybook/addon-links": "^8.6.15",
|