@malloydata/render 0.0.297 → 0.0.298
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.
|
@@ -19,7 +19,6 @@ export declare class RepeatedRecordCell extends CellBase {
|
|
|
19
19
|
constructor(cell: Malloy.CellWithArrayCell, field: RepeatedRecordField, parent: NestCell | undefined);
|
|
20
20
|
get value(): RecordCell[];
|
|
21
21
|
get values(): RecordCell[];
|
|
22
|
-
private createRecordCell;
|
|
23
22
|
}
|
|
24
23
|
export declare class RootCell extends RepeatedRecordCell {
|
|
25
24
|
readonly cell: Malloy.CellWithArrayCell;
|
|
@@ -14,7 +14,12 @@ export declare abstract class FieldBase {
|
|
|
14
14
|
getPlugins(): RenderPluginInstance[];
|
|
15
15
|
setPlugins(plugins: RenderPluginInstance[]): void;
|
|
16
16
|
renderAs(): string;
|
|
17
|
-
constructor(field: Malloy.DimensionInfo, parent: Field | undefined
|
|
17
|
+
constructor(field: Malloy.DimensionInfo, parent: Field | undefined,
|
|
18
|
+
/**
|
|
19
|
+
* Performance optimization: Skip metadata tag parsing for synthetic fields.
|
|
20
|
+
* Used when creating internal RecordField instances that don't need metadata.
|
|
21
|
+
*/
|
|
22
|
+
skipTagParsing?: boolean);
|
|
18
23
|
isRoot(): boolean;
|
|
19
24
|
root(): RootField;
|
|
20
25
|
get drillStableExpression(): Malloy.Expression | undefined;
|
|
@@ -5,7 +5,16 @@ import { ArrayFieldInfo, RecordFieldInfo, RepeatedRecordFieldInfo, SortableField
|
|
|
5
5
|
export declare class ArrayField extends FieldBase {
|
|
6
6
|
readonly field: ArrayFieldInfo;
|
|
7
7
|
readonly maxUniqueFieldValueCounts: Map<string, number>;
|
|
8
|
-
|
|
8
|
+
protected _elementField?: Field;
|
|
9
|
+
constructor(field: ArrayFieldInfo, parent: Field | undefined, skipTagParsing?: boolean);
|
|
10
|
+
/**
|
|
11
|
+
* Lazy getter for elementField to optimize field creation.
|
|
12
|
+
*
|
|
13
|
+
* Performance optimization: For RepeatedRecordField, this getter is overridden
|
|
14
|
+
* to return the nestedRecordField, preventing duplicate field creation.
|
|
15
|
+
* For regular ArrayField instances, the element field is created on-demand.
|
|
16
|
+
*/
|
|
17
|
+
get elementField(): Field;
|
|
9
18
|
get isDrillable(): boolean;
|
|
10
19
|
}
|
|
11
20
|
export declare class RepeatedRecordField extends ArrayField {
|
|
@@ -13,7 +22,16 @@ export declare class RepeatedRecordField extends ArrayField {
|
|
|
13
22
|
readonly fields: Field[];
|
|
14
23
|
readonly fieldsByName: Record<string, Field>;
|
|
15
24
|
maxRecordCount: number;
|
|
25
|
+
readonly nestedRecordField: RecordField;
|
|
16
26
|
constructor(field: RepeatedRecordFieldInfo, parent: Field | undefined);
|
|
27
|
+
/**
|
|
28
|
+
* Override elementField to return the shared nestedRecordField.
|
|
29
|
+
*
|
|
30
|
+
* This prevents duplicate field creation that would occur if we let
|
|
31
|
+
* ArrayField create its own elementField. Since RepeatedRecordField
|
|
32
|
+
* already knows its elements are records, we can reuse the nestedRecordField.
|
|
33
|
+
*/
|
|
34
|
+
get elementField(): Field;
|
|
17
35
|
fieldAtPath(path: string[]): Field;
|
|
18
36
|
registerRecordCount(count: number): void;
|
|
19
37
|
registerValueSetSize(fieldName: string, size: number): void;
|
|
@@ -34,7 +52,16 @@ export declare class RecordField extends FieldBase {
|
|
|
34
52
|
fields: Field[];
|
|
35
53
|
fieldsByName: Record<string, Field>;
|
|
36
54
|
readonly maxUniqueFieldValueCounts: Map<string, number>;
|
|
37
|
-
constructor(field: RecordFieldInfo, parent: Field | undefined
|
|
55
|
+
constructor(field: RecordFieldInfo, parent: Field | undefined,
|
|
56
|
+
/**
|
|
57
|
+
* Optional configuration for performance optimizations.
|
|
58
|
+
* - fields: Pre-created fields to share (avoids duplicate field creation)
|
|
59
|
+
* - skipTagParsing: Skip metadata tag parsing for synthetic fields
|
|
60
|
+
*/
|
|
61
|
+
options?: {
|
|
62
|
+
fields?: Field[];
|
|
63
|
+
skipTagParsing?: boolean;
|
|
64
|
+
});
|
|
38
65
|
fieldAtPath(path: string[]): Field;
|
|
39
66
|
private _fieldsWithOrder;
|
|
40
67
|
get fieldsWithOrder(): SortableField[];
|