@malloydata/render 0.0.293 → 0.0.294
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 +20 -7
- package/README.md +8 -0
- package/dist/module/api/json-schema-types.d.ts +36 -0
- package/dist/{api → module/api}/malloy-renderer.d.ts +4 -1
- package/dist/{api → module/api}/malloy-viz.d.ts +6 -3
- package/dist/module/api/plugin-types.d.ts +42 -0
- package/dist/{api → module/api}/types.d.ts +5 -2
- package/dist/module/component/bar-chart/generate-bar_chart-vega-spec.d.ts +4 -0
- package/dist/{component → module/component}/bar-chart/get-bar_chart-settings.d.ts +3 -3
- package/dist/{component → module/component}/bar-chart/get-custom-tooltips-entries.d.ts +2 -2
- package/dist/{component → module/component}/chart/chart-dev-tool.d.ts +2 -2
- package/dist/{component → module/component/chart}/chart-layout-settings.d.ts +4 -4
- package/dist/module/component/chart/chart-v2.d.ts +23 -0
- package/dist/{component → module/component}/chart/chart.d.ts +3 -3
- package/dist/{component → module/component}/chart/default-chart-tooltip.d.ts +1 -1
- package/dist/{component → module/component}/dashboard/dashboard.d.ts +1 -1
- package/dist/{component → module/component}/legacy-charts/legacy_chart.d.ts +1 -1
- package/dist/{component → module/component}/malloy-modal/malloy-modal.d.ts +1 -1
- package/dist/{component → module/component}/render-image.d.ts +1 -1
- package/dist/{component → module/component}/render-link.d.ts +1 -1
- package/dist/{component → module/component}/render-list.d.ts +1 -1
- package/dist/{component → module/component}/render-numeric-field.d.ts +1 -1
- package/dist/{component → module/component}/render-result-metadata.d.ts +9 -6
- package/dist/{component → module/component}/render-time.d.ts +1 -1
- package/dist/{component → module/component}/render.d.ts +5 -2
- package/dist/{component → module/component/renderer}/apply-renderer.d.ts +1 -1
- package/dist/module/component/renderer/plugin-render-container.d.ts +8 -0
- package/dist/module/component/result-context.d.ts +4 -0
- package/dist/{component → module/component}/result-store/result-store.d.ts +3 -3
- package/dist/{component → module/component}/table/table-context.d.ts +3 -4
- package/dist/{component → module/component}/table/table-layout.d.ts +2 -2
- package/dist/{component → module/component}/table/table.d.ts +2 -2
- package/dist/{component → module/component}/tag-utils.d.ts +1 -1
- package/dist/{component → module/component}/tooltip/tooltip.d.ts +1 -1
- package/dist/{component → module/component}/types.d.ts +13 -4
- package/dist/{component → module/component}/util.d.ts +1 -1
- package/dist/{component → module/component}/vega/base-vega-config.d.ts +1 -1
- package/dist/{component → module/component}/vega/measure-axis.d.ts +2 -2
- package/dist/{component → module/component}/vega/vega-chart.d.ts +2 -4
- package/dist/{component → module/component}/vega/vega-utils.d.ts +1 -1
- package/dist/{component → module/component}/vega-types.d.ts +2 -2
- package/dist/{data_tree → module/data_tree}/cells/atomic.d.ts +3 -3
- package/dist/{data_tree → module/data_tree}/cells/base.d.ts +3 -4
- package/dist/{data_tree → module/data_tree}/cells/index.d.ts +2 -2
- package/dist/{data_tree → module/data_tree}/cells/nest.d.ts +9 -12
- package/dist/{data_tree → module/data_tree}/drilling.d.ts +2 -2
- package/dist/{data_tree → module/data_tree}/fields/atomic.d.ts +12 -12
- package/dist/{data_tree → module/data_tree}/fields/base.d.ts +9 -13
- package/dist/{data_tree → module/data_tree}/fields/index.d.ts +3 -4
- package/dist/{data_tree → module/data_tree}/fields/nest.d.ts +9 -11
- package/dist/{data_tree → module/data_tree}/index.d.ts +3 -4
- package/dist/{data_tree → module/data_tree}/types.d.ts +2 -7
- package/dist/{data_tree → module/data_tree}/utils.d.ts +8 -5
- package/dist/{html → module/html}/area_sparkline.d.ts +5 -5
- package/dist/{html → module/html}/bar_chart.d.ts +4 -4
- package/dist/{html → module/html}/bar_sparkline.d.ts +5 -5
- package/dist/{html → module/html}/boolean.d.ts +4 -4
- package/dist/{html → module/html}/bytes.d.ts +4 -4
- package/dist/{html → module/html}/cartesian_chart.d.ts +2 -2
- package/dist/{html → module/html}/chart.d.ts +4 -4
- package/dist/{html → module/html}/column_sparkline.d.ts +5 -5
- package/dist/{html → module/html}/container.d.ts +5 -6
- package/dist/{html → module/html}/currency.d.ts +4 -4
- package/dist/{html → module/html}/dashboard.d.ts +2 -2
- package/dist/{html → module/html}/data_styles.d.ts +1 -1
- package/dist/{html → module/html}/data_volume.d.ts +4 -4
- package/dist/{html → module/html}/date.d.ts +4 -4
- package/dist/{html → module/html}/duration.d.ts +4 -5
- package/dist/{html → module/html}/html_view.d.ts +5 -5
- package/dist/{html → module/html}/image.d.ts +4 -4
- package/dist/{html → module/html}/json.d.ts +4 -4
- package/dist/{html → module/html}/line_chart.d.ts +4 -4
- package/dist/{html → module/html}/link.d.ts +4 -4
- package/dist/{html → module/html}/list.d.ts +2 -2
- package/dist/{html → module/html}/list_detail.d.ts +1 -1
- package/dist/{html → module/html}/main_renderer_factory.d.ts +6 -6
- package/dist/{html → module/html}/number.d.ts +4 -4
- package/dist/{html → module/html}/percent.d.ts +4 -4
- package/dist/{html → module/html}/point_map.d.ts +5 -5
- package/dist/{html → module/html}/renderer.d.ts +3 -3
- package/dist/{html → module/html}/renderer_factory.d.ts +5 -5
- package/dist/{html → module/html}/renderer_types.d.ts +2 -2
- package/dist/{html → module/html}/scatter_chart.d.ts +4 -4
- package/dist/{html → module/html}/segment_map.d.ts +5 -5
- package/dist/{html → module/html}/shape_map.d.ts +5 -5
- package/dist/{html → module/html}/sparkline.d.ts +5 -5
- package/dist/{html → module/html}/table.d.ts +3 -3
- package/dist/{html → module/html}/text.d.ts +4 -4
- package/dist/{html → module/html}/unsupported.d.ts +4 -4
- package/dist/{html → module/html}/utils.d.ts +3 -3
- package/dist/{html → module/html}/vega_spec.d.ts +5 -5
- package/dist/module/index.d.ts +11 -0
- package/dist/module/index.mjs +34397 -32554
- package/dist/module/index.umd.js +423 -401
- package/dist/module/plugins/bar-chart/bar-chart-plugin.d.ts +14 -0
- package/dist/module/plugins/bar-chart/bar-chart-settings.d.ts +49 -0
- package/dist/module/plugins/bar-chart/generate-bar_chart-vega-spec.d.ts +4 -0
- package/dist/module/plugins/bar-chart/get-bar_chart-settings.d.ts +5 -0
- package/dist/module/plugins/bar-chart/settings-to-tag.d.ts +3 -0
- package/dist/module/plugins/dummy-dom-plugin.d.ts +8 -0
- package/dist/module/plugins/dummy-plugin.d.ts +8 -0
- package/dist/module/plugins/index.d.ts +3 -0
- package/dist/module/plugins/line-chart/generate-line_chart-vega-spec.d.ts +17 -0
- package/dist/module/plugins/line-chart/get-line_chart-settings.d.ts +5 -0
- package/dist/module/plugins/line-chart/line-chart-plugin.d.ts +21 -0
- package/dist/module/plugins/line-chart/line-chart-settings.d.ts +52 -0
- package/dist/module/plugins/line-chart/settings-to-tag.d.ts +3 -0
- package/dist/module/registry/types.d.ts +15 -0
- package/dist/module/render-field-metadata.d.ts +18 -0
- package/dist/{stories → module/stories}/themes.stories.d.ts +1 -2
- package/dist/{stories → module/stories}/util.d.ts +4 -4
- package/dist/{stories → module/stories}/vega-config-override.stories.d.ts +1 -2
- package/dist/module/stories/wrapped-table.stories.d.ts +9 -0
- package/dist/{util.d.ts → module/util.d.ts} +11 -4
- package/package.json +10 -10
- package/{vite.config.base.ts → vite.config.base.mts} +11 -1
- package/{vite.config.ts → vite.config.mts} +1 -1
- package/dist/component/bar-chart/generate-bar_chart-vega-spec.d.ts +0 -4
- package/dist/component/line-chart/generate-line_chart-vega-spec.d.ts +0 -4
- package/dist/component/line-chart/get-line_chart-settings.d.ts +0 -11
- package/dist/component/result-context.d.ts +0 -4
- package/dist/data_tree/plugins.d.ts +0 -14
- package/dist/index.d.ts +0 -7
- package/dist/plugins/line-chart-series-plugin.d.ts +0 -7
- package/dist/render-field-metadata.d.ts +0 -33
- /package/dist/{component → module/component}/chart/debug_icon.d.ts +0 -0
- /package/dist/{component → module/component}/default-settings.d.ts +0 -0
- /package/dist/{component → module/component}/error-message/error-message.d.ts +0 -0
- /package/dist/{component → module/component}/vega/merge-vega-configs.d.ts +0 -0
- /package/dist/{component → module/component}/vega/vega-expr-addons.d.ts +0 -0
- /package/dist/{html → module/html}/index.d.ts +0 -0
- /package/dist/{html → module/html}/state_codes.d.ts +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HTMLTextRenderer } from './text';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { NumberRenderOptions, StyleDefaults } from './data_styles';
|
|
3
|
+
import { RendererOptions } from './renderer_types';
|
|
4
|
+
import { Renderer } from './renderer';
|
|
5
5
|
import { RendererFactory } from './renderer_factory';
|
|
6
|
-
import
|
|
6
|
+
import { Cell, Field } from '../data_tree';
|
|
7
7
|
export declare class HTMLNumberRenderer extends HTMLTextRenderer {
|
|
8
8
|
readonly options: NumberRenderOptions;
|
|
9
9
|
constructor(document: Document, options: NumberRenderOptions);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HTMLNumberRenderer } from './number';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { PercentRenderOptions, StyleDefaults } from './data_styles';
|
|
3
|
+
import { RendererOptions } from './renderer_types';
|
|
4
|
+
import { Renderer } from './renderer';
|
|
5
5
|
import { RendererFactory } from './renderer_factory';
|
|
6
|
-
import
|
|
6
|
+
import { Cell, Field } from '../data_tree';
|
|
7
7
|
export declare class HTMLPercentRenderer extends HTMLNumberRenderer {
|
|
8
8
|
getText(data: Cell): string | null;
|
|
9
9
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type * as lite from 'vega-lite';
|
|
2
1
|
import { HTMLChartRenderer } from './chart';
|
|
3
2
|
import { RendererFactory } from './renderer_factory';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
3
|
+
import { PointMapRenderOptions, StyleDefaults } from './data_styles';
|
|
4
|
+
import { RendererOptions } from './renderer_types';
|
|
5
|
+
import { Renderer } from './renderer';
|
|
6
|
+
import { Cell, CellBase, Field } from '../data_tree';
|
|
7
|
+
import type * as lite from 'vega-lite';
|
|
8
8
|
export declare class HTMLPointMapRenderer extends HTMLChartRenderer {
|
|
9
9
|
getDataValue(data: Cell): string | number;
|
|
10
10
|
getDataType(field: Field): 'ordinal' | 'quantitative' | 'nominal';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { Tag } from '@malloydata/malloy-tag';
|
|
2
|
+
import { RendererOptions } from './renderer_types';
|
|
3
|
+
import { Cell } from '../data_tree';
|
|
3
4
|
export type ChildRenderers = {
|
|
4
5
|
[fieldName: string]: Renderer;
|
|
5
6
|
};
|
|
6
|
-
import type { Cell } from '../data_tree';
|
|
7
7
|
export interface Renderer {
|
|
8
8
|
render(value: Cell): Promise<HTMLElement>;
|
|
9
9
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { Tag } from '@malloydata/malloy-tag';
|
|
2
|
+
import { Renderer } from './renderer';
|
|
3
|
+
import { DataRenderOptions, RenderDef, StyleDefaults } from './data_styles';
|
|
4
|
+
import { RendererOptions } from './renderer_types';
|
|
5
|
+
import { Field } from '../data_tree';
|
|
6
6
|
type TagPropertyExtractor<T extends DataRenderOptions> = (options: T, tagObj: Tag | undefined) => void;
|
|
7
7
|
export declare abstract class RendererFactory<T extends DataRenderOptions> {
|
|
8
8
|
readonly tagOptionExtractors: Record<string, TagPropertyExtractor<T>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { MalloyRenderProps } from '../component/render';
|
|
2
|
+
import { DataStyles } from './data_styles';
|
|
3
3
|
export interface RendererOptions {
|
|
4
4
|
dataStyles: DataStyles;
|
|
5
5
|
isDrillingEnabled?: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HTMLCartesianChartRenderer } from './cartesian_chart';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { LineChartRenderOptions, ScatterChartRenderOptions, StyleDefaults } from './data_styles';
|
|
3
|
+
import { RendererOptions } from './renderer_types';
|
|
4
|
+
import { Renderer } from './renderer';
|
|
5
5
|
import { RendererFactory } from './renderer_factory';
|
|
6
|
-
import
|
|
6
|
+
import { Cell, Field } from '../data_tree';
|
|
7
7
|
export declare class HTMLScatterChartRenderer extends HTMLCartesianChartRenderer {
|
|
8
8
|
getMark(): 'point';
|
|
9
9
|
getDataType(field: Field): 'temporal' | 'ordinal' | 'quantitative' | 'nominal';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type * as lite from 'vega-lite';
|
|
2
1
|
import { HTMLChartRenderer } from './chart';
|
|
3
2
|
import { RendererFactory } from './renderer_factory';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
3
|
+
import { SegmentMapRenderOptions, StyleDefaults } from './data_styles';
|
|
4
|
+
import { RendererOptions } from './renderer_types';
|
|
5
|
+
import { Renderer } from './renderer';
|
|
6
|
+
import { Cell, Field } from '../data_tree';
|
|
7
|
+
import type * as lite from 'vega-lite';
|
|
8
8
|
export declare class HTMLSegmentMapRenderer extends HTMLChartRenderer {
|
|
9
9
|
getDataValue(data: Cell): string | number | null;
|
|
10
10
|
getDataType(field: Field): 'ordinal' | 'quantitative' | 'nominal';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type * as lite from 'vega-lite';
|
|
2
1
|
import { HTMLChartRenderer } from './chart';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import { ShapeMapRenderOptions, StyleDefaults } from './data_styles';
|
|
3
|
+
import { RendererOptions } from './renderer_types';
|
|
4
|
+
import { Renderer } from './renderer';
|
|
6
5
|
import { RendererFactory } from './renderer_factory';
|
|
7
|
-
import
|
|
6
|
+
import { Cell, Field } from '../data_tree';
|
|
7
|
+
import type * as lite from 'vega-lite';
|
|
8
8
|
export declare class HTMLShapeMapRenderer extends HTMLChartRenderer {
|
|
9
9
|
private getRegionField;
|
|
10
10
|
private getColorField;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type * as lite from 'vega-lite';
|
|
2
1
|
import { HTMLLineChartRenderer } from './line_chart';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import { SparkLineRenderOptions, StyleDefaults } from './data_styles';
|
|
3
|
+
import { RendererOptions } from './renderer_types';
|
|
4
|
+
import { Renderer } from './renderer';
|
|
6
5
|
import { RendererFactory } from './renderer_factory';
|
|
7
|
-
import
|
|
6
|
+
import { Cell, Field } from '../data_tree';
|
|
7
|
+
import type * as lite from 'vega-lite';
|
|
8
8
|
export declare class HTMLSparkLineRenderer extends HTMLLineChartRenderer {
|
|
9
9
|
getSize(): {
|
|
10
10
|
height: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { StyleDefaults } from './data_styles';
|
|
2
2
|
import { ContainerRenderer } from './container';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import { ChildRenderers, Renderer } from './renderer';
|
|
4
|
+
import { Cell, Field, RecordCell, RecordField, RecordOrRepeatedRecordCell, SortableField } from '../data_tree';
|
|
5
5
|
declare class FlattenedColumnField {
|
|
6
6
|
readonly flattenedField: RecordField;
|
|
7
7
|
readonly field: Field;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { Renderer } from './renderer';
|
|
2
|
+
import { DataRenderOptions, StyleDefaults, TextRenderOptions } from './data_styles';
|
|
3
3
|
import { RendererFactory } from './renderer_factory';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import { RendererOptions } from './renderer_types';
|
|
5
|
+
import { Cell, Field } from '../data_tree';
|
|
6
6
|
export declare class HTMLTextRenderer implements Renderer {
|
|
7
7
|
private readonly document;
|
|
8
8
|
constructor(document: Document);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Renderer } from './renderer';
|
|
2
2
|
import { RendererFactory } from './renderer_factory';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import { DataRenderOptions, StyleDefaults } from './data_styles';
|
|
4
|
+
import { RendererOptions } from './renderer_types';
|
|
5
|
+
import { Cell, Field } from '../data_tree';
|
|
6
6
|
export declare class HTMLUnsupportedRenderer implements Renderer {
|
|
7
7
|
private readonly document;
|
|
8
8
|
constructor(document: Document);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { RenderDef } from './data_styles';
|
|
2
|
+
import { RendererOptions } from './renderer_types';
|
|
3
|
+
import { Field } from '../data_tree';
|
|
3
4
|
import type * as Malloy from '@malloydata/malloy-interfaces';
|
|
4
|
-
import type { Field } from '../data_tree';
|
|
5
5
|
export declare function getColorScale(type: 'temporal' | 'ordinal' | 'quantitative' | 'nominal' | undefined, isRectMark: boolean, hasOverlappingText?: boolean): {
|
|
6
6
|
range: string[];
|
|
7
7
|
} | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type * as lite from 'vega-lite';
|
|
2
1
|
import { HTMLChartRenderer } from './chart';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { StyleDefaults, VegaRenderOptions } from './data_styles';
|
|
3
|
+
import { RendererOptions } from './renderer_types';
|
|
5
4
|
import { RendererFactory } from './renderer_factory';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import { Renderer } from './renderer';
|
|
6
|
+
import { Cell, Field, RecordOrRepeatedRecordField } from '../data_tree';
|
|
7
|
+
import type * as lite from 'vega-lite';
|
|
8
8
|
type DataContainer = Array<unknown> | Record<string, unknown>;
|
|
9
9
|
export declare const DEFAULT_SPEC: Partial<lite.TopLevelSpec>;
|
|
10
10
|
export declare const vegaSpecs: Record<string, lite.TopLevelSpec>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { HTMLView, JSONView } from './html/html_view';
|
|
2
|
+
export * from './html/data_styles';
|
|
3
|
+
export type { MalloyRenderProps } from './component/render';
|
|
4
|
+
export { MalloyRenderer } from './api/malloy-renderer';
|
|
5
|
+
export type { MalloyViz } from './api/malloy-viz';
|
|
6
|
+
export type { CoreVizPluginInstance, RenderPluginInstance, } from './api/plugin-types';
|
|
7
|
+
export { isCoreVizPluginInstance } from './api/plugin-types';
|
|
8
|
+
export type { MalloyRendererOptions, RenderFieldMetadata } from './api/types';
|
|
9
|
+
export type * from './api/json-schema-types';
|
|
10
|
+
export type { DrillData, MalloyClickEventPayload, TableConfig, DashboardConfig, VegaConfigHandler, } from './component/types';
|
|
11
|
+
export * from './plugins';
|