@malloydata/render 0.0.292 → 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 +8 -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 +34411 -32555
- package/dist/module/index.umd.js +425 -403
- 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,10 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import type { RenderPlugin } from '../plugins';
|
|
4
|
-
import type { FieldRegistry } from '../types';
|
|
5
|
-
import { Cell, type CellValue } from '.';
|
|
1
|
+
import { ArrayField, RecordField, RepeatedRecordField, RootField } from '../fields';
|
|
2
|
+
import { Cell, CellValue, NestCell } from '.';
|
|
6
3
|
import { CellBase } from './base';
|
|
7
|
-
import type
|
|
4
|
+
import type * as Malloy from '@malloydata/malloy-interfaces';
|
|
8
5
|
export declare class ArrayCell extends CellBase {
|
|
9
6
|
readonly cell: Malloy.CellWithArrayCell;
|
|
10
7
|
readonly field: ArrayField;
|
|
@@ -13,27 +10,27 @@ export declare class ArrayCell extends CellBase {
|
|
|
13
10
|
constructor(cell: Malloy.CellWithArrayCell, field: ArrayField, parent: NestCell | undefined);
|
|
14
11
|
get value(): Cell[];
|
|
15
12
|
}
|
|
16
|
-
export declare class RepeatedRecordCell extends
|
|
13
|
+
export declare class RepeatedRecordCell extends CellBase {
|
|
17
14
|
readonly cell: Malloy.CellWithArrayCell;
|
|
18
15
|
readonly field: RepeatedRecordField;
|
|
19
16
|
readonly parent: NestCell | undefined;
|
|
20
17
|
readonly rows: RecordCell[];
|
|
21
18
|
readonly fieldValueSets: Map<string, Set<CellValue>>;
|
|
22
|
-
|
|
23
|
-
private registry?;
|
|
24
|
-
constructor(cell: Malloy.CellWithArrayCell, field: RepeatedRecordField, parent: NestCell | undefined, plugins?: RenderPlugin[], registry?: FieldRegistry);
|
|
19
|
+
constructor(cell: Malloy.CellWithArrayCell, field: RepeatedRecordField, parent: NestCell | undefined);
|
|
25
20
|
get value(): RecordCell[];
|
|
21
|
+
get values(): RecordCell[];
|
|
22
|
+
private createRecordCell;
|
|
26
23
|
}
|
|
27
24
|
export declare class RootCell extends RepeatedRecordCell {
|
|
28
25
|
readonly cell: Malloy.CellWithArrayCell;
|
|
29
26
|
readonly field: RootField;
|
|
30
|
-
constructor(cell: Malloy.CellWithArrayCell, field: RootField
|
|
27
|
+
constructor(cell: Malloy.CellWithArrayCell, field: RootField);
|
|
31
28
|
}
|
|
32
29
|
export declare class RecordCell extends CellBase {
|
|
33
30
|
readonly cell: Malloy.CellWithRecordCell;
|
|
34
31
|
readonly field: RecordField;
|
|
35
32
|
readonly parent: NestCell | undefined;
|
|
36
|
-
|
|
33
|
+
cells: Record<string, Cell>;
|
|
37
34
|
constructor(cell: Malloy.CellWithRecordCell, field: RecordField, parent: NestCell | undefined);
|
|
38
35
|
get rows(): RecordCell[];
|
|
39
36
|
get value(): Record<string, Cell>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Cell } from './cells';
|
|
2
|
+
import { DrillEntry, DrillValue } from './types';
|
|
1
3
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
|
-
import type { Cell } from './cells';
|
|
3
|
-
import type { DrillEntry, DrillValue } from './types';
|
|
4
4
|
export declare function canDrill(cell: Cell): boolean;
|
|
5
5
|
export declare function getStableDrillQuery(cell: Cell): Malloy.Query | undefined;
|
|
6
6
|
export declare function getStableDrillClauses(cell: Cell): Malloy.DrillOperation[] | undefined;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { Field } from '.';
|
|
2
|
+
import { BooleanFieldInfo, DateFieldInfo, JSONFieldInfo, NumberFieldInfo, SQLNativeFieldInfo, StringFieldInfo, TimestampFieldInfo } from '../types';
|
|
3
3
|
import { FieldBase } from './base';
|
|
4
4
|
export declare class NumberField extends FieldBase {
|
|
5
5
|
readonly field: NumberFieldInfo;
|
|
6
6
|
min: number | undefined;
|
|
7
7
|
max: number | undefined;
|
|
8
8
|
private _maxString;
|
|
9
|
-
constructor(field: NumberFieldInfo, parent:
|
|
9
|
+
constructor(field: NumberFieldInfo, parent: Field | undefined);
|
|
10
10
|
registerValue(value: number): void;
|
|
11
|
-
fieldAtPath(path: string[]):
|
|
11
|
+
fieldAtPath(path: string[]): Field;
|
|
12
12
|
get minNumber(): number | undefined;
|
|
13
13
|
get maxNumber(): number | undefined;
|
|
14
14
|
get maxString(): string | undefined;
|
|
@@ -18,8 +18,8 @@ export declare class DateField extends FieldBase {
|
|
|
18
18
|
min: Date | undefined;
|
|
19
19
|
max: Date | undefined;
|
|
20
20
|
private _maxString;
|
|
21
|
-
constructor(field: DateFieldInfo, parent:
|
|
22
|
-
get timeframe(): import(
|
|
21
|
+
constructor(field: DateFieldInfo, parent: Field | undefined);
|
|
22
|
+
get timeframe(): import('@malloydata/malloy-interfaces').DateTimeframe | undefined;
|
|
23
23
|
registerValue(value: Date): void;
|
|
24
24
|
get minValue(): Date | undefined;
|
|
25
25
|
get maxValue(): Date | undefined;
|
|
@@ -32,8 +32,8 @@ export declare class TimestampField extends FieldBase {
|
|
|
32
32
|
min: Date | undefined;
|
|
33
33
|
max: Date | undefined;
|
|
34
34
|
private _maxString;
|
|
35
|
-
constructor(field: TimestampFieldInfo, parent:
|
|
36
|
-
get timeframe(): import(
|
|
35
|
+
constructor(field: TimestampFieldInfo, parent: Field | undefined);
|
|
36
|
+
get timeframe(): import('@malloydata/malloy-interfaces').TimestampTimeframe | undefined;
|
|
37
37
|
registerValue(value: Date): void;
|
|
38
38
|
get minValue(): Date | undefined;
|
|
39
39
|
get maxValue(): Date | undefined;
|
|
@@ -44,7 +44,7 @@ export declare class StringField extends FieldBase {
|
|
|
44
44
|
min: string | undefined;
|
|
45
45
|
max: string | undefined;
|
|
46
46
|
private _maxString;
|
|
47
|
-
constructor(field: StringFieldInfo, parent:
|
|
47
|
+
constructor(field: StringFieldInfo, parent: Field | undefined);
|
|
48
48
|
registerValue(value: string): void;
|
|
49
49
|
get minValue(): string | undefined;
|
|
50
50
|
get maxValue(): string | undefined;
|
|
@@ -52,16 +52,16 @@ export declare class StringField extends FieldBase {
|
|
|
52
52
|
}
|
|
53
53
|
export declare class SQLNativeField extends FieldBase {
|
|
54
54
|
readonly field: SQLNativeFieldInfo;
|
|
55
|
-
constructor(field: SQLNativeFieldInfo, parent:
|
|
55
|
+
constructor(field: SQLNativeFieldInfo, parent: Field | undefined);
|
|
56
56
|
}
|
|
57
57
|
export declare class JSONField extends FieldBase {
|
|
58
58
|
readonly field: JSONFieldInfo;
|
|
59
|
-
constructor(field: JSONFieldInfo, parent:
|
|
59
|
+
constructor(field: JSONFieldInfo, parent: Field | undefined);
|
|
60
60
|
}
|
|
61
61
|
export declare class BooleanField extends FieldBase {
|
|
62
62
|
readonly field: BooleanFieldInfo;
|
|
63
63
|
private _maxString;
|
|
64
|
-
constructor(field: BooleanFieldInfo, parent:
|
|
64
|
+
constructor(field: BooleanFieldInfo, parent: Field | undefined);
|
|
65
65
|
get maxString(): string | undefined;
|
|
66
66
|
registerValue(value: boolean): void;
|
|
67
67
|
}
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
+
import { Tag } from '@malloydata/malloy-tag';
|
|
2
|
+
import { Field, NestField, RecordField, RecordOrRepeatedRecordField, BasicAtomicField, TimeField, RootField, ArrayField, BooleanField, DateField, JSONField, NumberField, RepeatedRecordField, SQLNativeField, StringField, TimestampField } from '.';
|
|
3
|
+
import { RenderPluginInstance } from '../../api/plugin-types';
|
|
1
4
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
|
-
import type { Tag } from '@malloydata/malloy-tag';
|
|
3
|
-
import type { Field, NestField, RecordField, RecordOrRepeatedRecordField, BasicAtomicField, TimeField, RootField } from '.';
|
|
4
|
-
import { ArrayField, BooleanField, DateField, JSONField, NumberField, RepeatedRecordField, SQLNativeField, StringField, TimestampField } from '.';
|
|
5
|
-
import type { FieldRegistry } from '../types';
|
|
6
|
-
import type { RenderPluginInstance } from '../plugins';
|
|
7
5
|
export declare abstract class FieldBase {
|
|
8
6
|
readonly field: Malloy.DimensionInfo;
|
|
9
|
-
readonly parent:
|
|
7
|
+
readonly parent: Field | undefined;
|
|
10
8
|
readonly tag: Tag;
|
|
11
9
|
readonly path: string[];
|
|
12
10
|
protected readonly metadataTag: Tag;
|
|
13
|
-
readonly renderAs: string;
|
|
14
11
|
readonly valueSet: Set<string | number | boolean>;
|
|
15
|
-
|
|
16
|
-
protected
|
|
17
|
-
registerPluginData<T>(pluginType: string, data: T): void;
|
|
18
|
-
getPluginData<T>(pluginType: string): T | undefined;
|
|
19
|
-
getAllFieldInstances(): Field[];
|
|
12
|
+
protected plugins: RenderPluginInstance[];
|
|
13
|
+
protected _renderAs: string;
|
|
20
14
|
getPlugins(): RenderPluginInstance[];
|
|
21
|
-
|
|
15
|
+
setPlugins(plugins: RenderPluginInstance[]): void;
|
|
16
|
+
renderAs(): string;
|
|
17
|
+
constructor(field: Malloy.DimensionInfo, parent: Field | undefined);
|
|
22
18
|
isRoot(): boolean;
|
|
23
19
|
root(): RootField;
|
|
24
20
|
get drillPath(): string[];
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import type * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
1
|
import { BooleanField, DateField, JSONField, NumberField, SQLNativeField, StringField, TimestampField } from './atomic';
|
|
3
2
|
import { ArrayField, RecordField, RepeatedRecordField } from './nest';
|
|
4
|
-
import type
|
|
3
|
+
import type * as Malloy from '@malloydata/malloy-interfaces';
|
|
5
4
|
export { ArrayField, RecordField, RepeatedRecordField, RootField } from './nest';
|
|
6
5
|
export { BooleanField, DateField, JSONField, NumberField, SQLNativeField, StringField, TimestampField, } from './atomic';
|
|
7
6
|
export type Field = ArrayField | RepeatedRecordField | RecordField | NumberField | DateField | JSONField | StringField | TimestampField | BooleanField | SQLNativeField;
|
|
8
|
-
export type NestField = RepeatedRecordField | RecordField
|
|
7
|
+
export type NestField = RepeatedRecordField | RecordField;
|
|
9
8
|
export type RecordOrRepeatedRecordField = RepeatedRecordField | RecordField;
|
|
10
9
|
export type BasicAtomicField = NumberField | DateField | JSONField | StringField | TimestampField | BooleanField | SQLNativeField;
|
|
11
10
|
export type TimeField = DateField | TimestampField;
|
|
12
11
|
export declare const Field: {
|
|
13
|
-
from(field: Malloy.DimensionInfo, parent:
|
|
12
|
+
from(field: Malloy.DimensionInfo, parent: Field | undefined): Field;
|
|
14
13
|
isNestField(field: Field): field is NestField;
|
|
15
14
|
pathFromString(path: string): any;
|
|
16
15
|
pathToString(path: string): string;
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Tag } from '@malloydata/malloy-tag';
|
|
2
2
|
import { FieldBase } from './base';
|
|
3
3
|
import { Field } from '.';
|
|
4
|
-
import
|
|
5
|
-
import type { NestField } from '.';
|
|
4
|
+
import { ArrayFieldInfo, RecordFieldInfo, RepeatedRecordFieldInfo, SortableField } from '../types';
|
|
6
5
|
export declare class ArrayField extends FieldBase {
|
|
7
6
|
readonly field: ArrayFieldInfo;
|
|
8
|
-
readonly fields: Field[];
|
|
9
7
|
readonly maxUniqueFieldValueCounts: Map<string, number>;
|
|
10
|
-
|
|
11
|
-
constructor(field: ArrayFieldInfo, parent: NestField | undefined, registry?: FieldRegistry);
|
|
8
|
+
constructor(field: ArrayFieldInfo, parent: Field | undefined);
|
|
12
9
|
get isDrillable(): boolean;
|
|
13
10
|
}
|
|
14
11
|
export declare class RepeatedRecordField extends ArrayField {
|
|
15
12
|
readonly field: RepeatedRecordFieldInfo;
|
|
16
13
|
readonly fields: Field[];
|
|
14
|
+
readonly fieldsByName: Record<string, Field>;
|
|
17
15
|
maxRecordCount: number;
|
|
18
|
-
constructor(field: RepeatedRecordFieldInfo, parent:
|
|
16
|
+
constructor(field: RepeatedRecordFieldInfo, parent: Field | undefined);
|
|
19
17
|
fieldAtPath(path: string[]): Field;
|
|
20
18
|
registerRecordCount(count: number): void;
|
|
21
19
|
registerValueSetSize(fieldName: string, size: number): void;
|
|
@@ -29,14 +27,14 @@ export declare class RootField extends RepeatedRecordField {
|
|
|
29
27
|
constructor(field: RepeatedRecordFieldInfo, metadata: {
|
|
30
28
|
modelTag: Tag;
|
|
31
29
|
queryTimezone: string | undefined;
|
|
32
|
-
}
|
|
30
|
+
});
|
|
33
31
|
}
|
|
34
32
|
export declare class RecordField extends FieldBase {
|
|
35
33
|
readonly field: RecordFieldInfo;
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
fields: Field[];
|
|
35
|
+
fieldsByName: Record<string, Field>;
|
|
38
36
|
readonly maxUniqueFieldValueCounts: Map<string, number>;
|
|
39
|
-
constructor(field: RecordFieldInfo, parent:
|
|
37
|
+
constructor(field: RecordFieldInfo, parent: Field | undefined);
|
|
40
38
|
fieldAtPath(path: string[]): Field;
|
|
41
39
|
private _fieldsWithOrder;
|
|
42
40
|
get fieldsWithOrder(): SortableField[];
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
1
|
import { RootCell } from './cells';
|
|
3
|
-
import
|
|
4
|
-
|
|
2
|
+
import { RenderFieldMetadata } from '../render-field-metadata';
|
|
3
|
+
import type * as Malloy from '@malloydata/malloy-interfaces';
|
|
4
|
+
export declare function getDataTree(result: Malloy.Result, renderFieldMetadata?: RenderFieldMetadata): RootCell;
|
|
5
5
|
export * from './cells/base';
|
|
6
6
|
export * from './types';
|
|
7
|
-
export * from './plugins';
|
|
8
7
|
export * from './fields';
|
|
9
8
|
export * from './cells';
|
|
10
9
|
export * from './utils';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { Field } from './fields';
|
|
2
|
+
import { Cell } from './cells';
|
|
1
3
|
import type * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
|
-
import type { Field } from './fields';
|
|
3
|
-
import type { RenderPluginInstance } from './plugins';
|
|
4
|
-
import type { Cell } from './cells';
|
|
5
4
|
export type DrillEntry = {
|
|
6
5
|
field: Field;
|
|
7
6
|
value: string | number | boolean | Date | null;
|
|
@@ -14,10 +13,6 @@ export type DrillValue = {
|
|
|
14
13
|
} | {
|
|
15
14
|
where: string;
|
|
16
15
|
};
|
|
17
|
-
export interface FieldRegistry {
|
|
18
|
-
fieldInstances: Map<string, Field[]>;
|
|
19
|
-
plugins: Map<string, RenderPluginInstance[]>;
|
|
20
|
-
}
|
|
21
16
|
export type SortableField = {
|
|
22
17
|
field: Field;
|
|
23
18
|
dir: 'asc' | 'desc' | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Tag } from '@malloydata/malloy-tag';
|
|
2
|
+
import { BooleanFieldInfo, DateFieldInfo, JSONFieldInfo, NumberFieldInfo, RecordFieldInfo, RepeatedRecordFieldInfo, ArrayFieldInfo, SQLNativeFieldInfo, StringFieldInfo, TimestampFieldInfo, FieldType } from './types';
|
|
3
|
+
import { Field } from './fields';
|
|
4
|
+
import { FieldBase } from './fields/base';
|
|
2
5
|
import type * as Malloy from '@malloydata/malloy-interfaces';
|
|
3
|
-
import type { BooleanFieldInfo, DateFieldInfo, JSONFieldInfo, NumberFieldInfo, RecordFieldInfo, RepeatedRecordFieldInfo, ArrayFieldInfo, SQLNativeFieldInfo, StringFieldInfo, TimestampFieldInfo } from './types';
|
|
4
|
-
import { FieldType } from './types';
|
|
5
|
-
import { type Field } from './fields';
|
|
6
6
|
export declare function isArrayFieldInfo(field: Malloy.DimensionInfo): field is ArrayFieldInfo;
|
|
7
7
|
export declare function isRepeatedRecordFieldInfo(field: Malloy.DimensionInfo): field is RepeatedRecordFieldInfo;
|
|
8
8
|
export declare function isRecordFieldInfo(field: Malloy.DimensionInfo): field is RecordFieldInfo;
|
|
@@ -13,7 +13,10 @@ export declare function isStringFieldInfo(field: Malloy.DimensionInfo): field is
|
|
|
13
13
|
export declare function isTimestampFieldInfo(field: Malloy.DimensionInfo): field is TimestampFieldInfo;
|
|
14
14
|
export declare function isBooleanFieldInfo(field: Malloy.DimensionInfo): field is BooleanFieldInfo;
|
|
15
15
|
export declare function isSQLNativeFieldInfo(field: Malloy.DimensionInfo): field is SQLNativeFieldInfo;
|
|
16
|
-
export declare function shouldRenderAs(field
|
|
16
|
+
export declare function shouldRenderAs({ field, tagOverride, }: {
|
|
17
|
+
field: FieldBase;
|
|
18
|
+
tagOverride?: Tag;
|
|
19
|
+
}): string;
|
|
17
20
|
export declare function tagFor(field: Malloy.DimensionInfo, prefix?: string): Tag;
|
|
18
21
|
export declare function extractLiteralFromTag(value: Tag | undefined): Malloy.LiteralValue | undefined;
|
|
19
22
|
export declare function getFieldType(field: Field): FieldType;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { HTMLSparkLineRenderer } from './sparkline';
|
|
2
|
-
import type * as lite from 'vega-lite';
|
|
3
2
|
import { RendererFactory } from './renderer_factory';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
3
|
+
import { Renderer } from './renderer';
|
|
4
|
+
import { SparkLineRenderOptions, StyleDefaults } from './data_styles';
|
|
5
|
+
import { RendererOptions } from './renderer_types';
|
|
6
|
+
import { Cell, Field } from '../data_tree';
|
|
7
|
+
import type * as lite from 'vega-lite';
|
|
8
8
|
export declare class HTMLAreaSparkLineRenderer extends HTMLSparkLineRenderer {
|
|
9
9
|
getVegaLiteSpec(data: Cell): lite.TopLevelSpec;
|
|
10
10
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HTMLCartesianChartRenderer } from './cartesian_chart';
|
|
2
|
-
import
|
|
2
|
+
import { BarChartRenderOptions, SparkLineRenderOptions, StyleDefaults } from './data_styles';
|
|
3
3
|
import { RendererFactory } from './renderer_factory';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import { RendererOptions } from './renderer_types';
|
|
5
|
+
import { Renderer } from './renderer';
|
|
6
|
+
import { Cell, Field } from '../data_tree';
|
|
7
7
|
export declare class HTMLBarChartRenderer extends HTMLCartesianChartRenderer {
|
|
8
8
|
getMark(): 'bar';
|
|
9
9
|
getDataType(field: Field): 'temporal' | 'ordinal' | 'quantitative' | 'nominal';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type * as lite from 'vega-lite';
|
|
2
1
|
import { HTMLBarChartRenderer } from './bar_chart';
|
|
3
|
-
import
|
|
2
|
+
import { BarSparkLineRenderOptions, StyleDefaults } from './data_styles';
|
|
4
3
|
import { RendererFactory } from './renderer_factory';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
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 HTMLBarSparkLineRenderer extends HTMLBarChartRenderer {
|
|
9
9
|
getSize(): {
|
|
10
10
|
height: number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HTMLTextRenderer } from './text';
|
|
2
2
|
import { RendererFactory } from './renderer_factory';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import { BooleanRenderOptions, StyleDefaults } from './data_styles';
|
|
4
|
+
import { RendererOptions } from './renderer_types';
|
|
5
|
+
import { Renderer } from './renderer';
|
|
6
|
+
import { Cell, Field } from '../data_tree';
|
|
7
7
|
export declare class HTMLBooleanRenderer extends HTMLTextRenderer {
|
|
8
8
|
getText(data: Cell): string | null;
|
|
9
9
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HTMLTextRenderer } from './text';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { BytesRenderOptions, 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 HTMLBytesRenderer extends HTMLTextRenderer {
|
|
8
8
|
getText(_data: Cell): string | null;
|
|
9
9
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type * as lite from 'vega-lite';
|
|
2
1
|
import { HTMLChartRenderer } from './chart';
|
|
3
|
-
import
|
|
2
|
+
import { Cell } from '../data_tree';
|
|
3
|
+
import type * as lite from 'vega-lite';
|
|
4
4
|
export declare abstract class HTMLCartesianChartRenderer extends HTMLChartRenderer {
|
|
5
5
|
abstract getMark(): 'bar' | 'line' | 'point';
|
|
6
6
|
getVegaLiteSpec(data: Cell): lite.TopLevelSpec;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { Renderer } from './renderer';
|
|
2
|
+
import { RendererOptions } from './renderer_types';
|
|
3
|
+
import { ChartRenderOptions, StyleDefaults } from './data_styles';
|
|
4
|
+
import { Cell, Field, RecordCell } from '../data_tree';
|
|
1
5
|
import * as lite from 'vega-lite';
|
|
2
|
-
import type { Renderer } from './renderer';
|
|
3
|
-
import type { RendererOptions } from './renderer_types';
|
|
4
|
-
import type { ChartRenderOptions, StyleDefaults } from './data_styles';
|
|
5
|
-
import type { Cell, Field, RecordCell } from '../data_tree';
|
|
6
6
|
type MappedRow = {
|
|
7
7
|
[p: string]: string | number | Date | undefined | null;
|
|
8
8
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type * as lite from 'vega-lite';
|
|
2
1
|
import { HTMLBarChartRenderer } from './bar_chart';
|
|
3
2
|
import { RendererFactory } from './renderer_factory';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
3
|
+
import { ColumnSparkLineRenderOptions, 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 HTMLColumnSparkLineRenderer extends HTMLBarChartRenderer {
|
|
9
9
|
getSize(): {
|
|
10
10
|
height: number;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import type { NestField } from '../data_tree';
|
|
1
|
+
import { Tag } from '@malloydata/malloy-tag';
|
|
2
|
+
import { StyleDefaults } from './data_styles';
|
|
3
|
+
import { ChildRenderers, RenderTree } from './renderer';
|
|
4
|
+
import { RendererOptions } from './renderer_types';
|
|
5
|
+
import { NestField } from '../data_tree';
|
|
7
6
|
export declare abstract class ContainerRenderer extends RenderTree {
|
|
8
7
|
childRenderers: ChildRenderers;
|
|
9
8
|
protected abstract childrenStyleDefaults: StyleDefaults;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HTMLTextRenderer } from './text';
|
|
2
2
|
import { RendererFactory } from './renderer_factory';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import { CurrencyRenderOptions, StyleDefaults } from './data_styles';
|
|
4
|
+
import { RendererOptions } from './renderer_types';
|
|
5
|
+
import { Renderer } from './renderer';
|
|
6
|
+
import { Cell, Field } from '../data_tree';
|
|
7
7
|
export declare class HTMLCurrencyRenderer extends HTMLTextRenderer {
|
|
8
8
|
readonly options: CurrencyRenderOptions;
|
|
9
9
|
constructor(document: Document, options: CurrencyRenderOptions);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { StyleDefaults } from './data_styles';
|
|
2
2
|
import { ContainerRenderer } from './container';
|
|
3
|
-
import
|
|
3
|
+
import { Cell } from '../data_tree';
|
|
4
4
|
export declare class HTMLDashboardRenderer extends ContainerRenderer {
|
|
5
5
|
protected childrenStyleDefaults: StyleDefaults;
|
|
6
6
|
render(table: Cell): Promise<HTMLElement>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HTMLTextRenderer } from './text';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { DataVolumeRenderOptions, 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 HTMLDataVolumeRenderer extends HTMLTextRenderer {
|
|
8
8
|
readonly options: DataVolumeRenderOptions;
|
|
9
9
|
constructor(document: Document, options: DataVolumeRenderOptions);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { Renderer } from './renderer';
|
|
2
|
+
import { StyleDefaults, TimeRenderOptions } from './data_styles';
|
|
3
|
+
import { RendererOptions } from './renderer_types';
|
|
4
4
|
import { RendererFactory } from './renderer_factory';
|
|
5
|
-
import
|
|
5
|
+
import { Cell, Field } from '../data_tree';
|
|
6
6
|
export declare class HTMLDateRenderer implements Renderer {
|
|
7
7
|
private readonly document;
|
|
8
8
|
private readonly queryTimezone;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { HTMLTextRenderer } from './text';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import type { Renderer } from './renderer';
|
|
2
|
+
import { DurationRenderOptions, StyleDefaults, DurationUnit } 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';
|
|
8
7
|
export declare function formatTimeUnit(value: number, unit: DurationUnit, options?: {
|
|
9
8
|
numFormat?: string;
|
|
10
9
|
terse?: boolean;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { Tag } from '@malloydata/malloy-tag';
|
|
2
|
+
import { StyleDefaults } from './data_styles';
|
|
3
|
+
import { Renderer } from './renderer';
|
|
4
|
+
import { RendererOptions } from './renderer_types';
|
|
5
|
+
import { Cell, Field } from '../data_tree';
|
|
5
6
|
import type * as Malloy from '@malloydata/malloy-interfaces';
|
|
6
|
-
import type { Cell, Field } from '../data_tree';
|
|
7
7
|
export declare class HTMLView {
|
|
8
8
|
private document;
|
|
9
|
+
private lastRenderedElement;
|
|
10
|
+
private lastViz;
|
|
9
11
|
constructor(document: Document);
|
|
10
12
|
render(malloyResult: Malloy.Result, options: RendererOptions): Promise<HTMLElement>;
|
|
13
|
+
getHTML(): Promise<string>;
|
|
11
14
|
}
|
|
12
15
|
export declare class JSONView {
|
|
13
16
|
private 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 { ImageRenderOptions, StyleDefaults } from './data_styles';
|
|
4
|
+
import { RendererOptions } from './renderer_types';
|
|
5
|
+
import { Cell, Field } from '../data_tree';
|
|
6
6
|
export declare class HTMLImageRenderer implements Renderer {
|
|
7
7
|
private readonly document;
|
|
8
8
|
constructor(document: Document);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { Renderer } from './renderer';
|
|
2
|
+
import { JSONRenderOptions, StyleDefaults } from './data_styles';
|
|
3
|
+
import { RendererOptions } from './renderer_types';
|
|
4
4
|
import { RendererFactory } from './renderer_factory';
|
|
5
|
-
import
|
|
5
|
+
import { Cell, Field } from '../data_tree';
|
|
6
6
|
export declare class HTMLJSONRenderer implements Renderer {
|
|
7
7
|
private readonly document;
|
|
8
8
|
constructor(document: Document);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HTMLCartesianChartRenderer } from './cartesian_chart';
|
|
2
|
-
import
|
|
2
|
+
import { LineChartRenderOptions, StyleDefaults } from './data_styles';
|
|
3
3
|
import { RendererFactory } from './renderer_factory';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import { RendererOptions } from './renderer_types';
|
|
5
|
+
import { Renderer } from './renderer';
|
|
6
|
+
import { Cell, Field } from '../data_tree';
|
|
7
7
|
export declare class HTMLLineChartRenderer extends HTMLCartesianChartRenderer {
|
|
8
8
|
getMark(): 'line';
|
|
9
9
|
getDataType(field: Field): 'temporal' | 'ordinal' | 'quantitative' | 'nominal';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { Renderer } from './renderer';
|
|
2
|
+
import { LinkRenderOptions, StyleDefaults } from './data_styles';
|
|
3
|
+
import { RendererOptions } from './renderer_types';
|
|
4
4
|
import { RendererFactory } from './renderer_factory';
|
|
5
|
-
import
|
|
5
|
+
import { Cell, Field } from '../data_tree';
|
|
6
6
|
export declare class HTMLLinkRenderer implements Renderer {
|
|
7
7
|
private readonly document;
|
|
8
8
|
constructor(document: Document);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { StyleDefaults } from './data_styles';
|
|
2
2
|
import { ContainerRenderer } from './container';
|
|
3
|
-
import
|
|
3
|
+
import { Cell, Field, RecordOrRepeatedRecordField } from '../data_tree';
|
|
4
4
|
export declare class HTMLListRenderer extends ContainerRenderer {
|
|
5
5
|
protected childrenStyleDefaults: StyleDefaults;
|
|
6
6
|
getValueField(struct: RecordOrRepeatedRecordField): Field;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLListRenderer } from './list';
|
|
2
|
-
import
|
|
2
|
+
import { RecordOrRepeatedRecordField, Field } from '../data_tree';
|
|
3
3
|
export declare class HTMLListDetailRenderer extends HTMLListRenderer {
|
|
4
4
|
getDetailField(explore: RecordOrRepeatedRecordField): Field | undefined;
|
|
5
5
|
}
|