@malloydata/render 0.0.325 → 0.0.327
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/module/data_tree/cells/atomic.d.ts +28 -0
- package/dist/module/data_tree/cells/base.d.ts +2 -1
- package/dist/module/data_tree/cells/index.d.ts +3 -3
- package/dist/module/index.mjs +158027 -157711
- package/dist/module/index.umd.js +356 -356
- package/dist/module/util.d.ts +1 -0
- package/package.json +6 -6
|
@@ -16,6 +16,34 @@ export declare class NumberCell extends CellBase {
|
|
|
16
16
|
readonly parent: NestCell | undefined;
|
|
17
17
|
constructor(cell: Malloy.CellWithNumberCell, field: NumberField, parent: NestCell | undefined);
|
|
18
18
|
get value(): number;
|
|
19
|
+
/**
|
|
20
|
+
* Returns the numeric value as a JS number.
|
|
21
|
+
* For NumberCell, this is the same as `.value`.
|
|
22
|
+
*/
|
|
23
|
+
number(): number;
|
|
24
|
+
compareTo(other: Cell): 1 | 0 | -1;
|
|
25
|
+
get literalValue(): Malloy.LiteralValue | undefined;
|
|
26
|
+
}
|
|
27
|
+
export declare class BigNumberCell extends CellBase {
|
|
28
|
+
readonly cell: Malloy.CellWithBigNumberCell;
|
|
29
|
+
readonly field: NumberField;
|
|
30
|
+
readonly parent: NestCell | undefined;
|
|
31
|
+
constructor(cell: Malloy.CellWithBigNumberCell, field: NumberField, parent: NestCell | undefined);
|
|
32
|
+
/**
|
|
33
|
+
* Returns the string representation of the big number value.
|
|
34
|
+
* Use this for display or when precision matters.
|
|
35
|
+
*/
|
|
36
|
+
get value(): string;
|
|
37
|
+
/**
|
|
38
|
+
* Returns the value as a JS number (potentially lossy for large values).
|
|
39
|
+
* Use this when a number is required (e.g., for charts, calculations).
|
|
40
|
+
*/
|
|
41
|
+
number(): number;
|
|
42
|
+
/**
|
|
43
|
+
* Returns the value as a JS BigInt for precise integer arithmetic.
|
|
44
|
+
* Only valid when subtype is 'bigint'.
|
|
45
|
+
*/
|
|
46
|
+
bigint(): bigint;
|
|
19
47
|
compareTo(other: Cell): 1 | 0 | -1;
|
|
20
48
|
get literalValue(): Malloy.LiteralValue | undefined;
|
|
21
49
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cell, NestCell, RecordCell, ArrayCell, BooleanCell, DateCell, JSONCell, NullCell, NumberCell, RepeatedRecordCell, StringCell, TimestampCell, TimeCell, RecordOrRepeatedRecordCell, CellValue } from '.';
|
|
1
|
+
import { Cell, NestCell, RecordCell, ArrayCell, BigNumberCell, BooleanCell, DateCell, JSONCell, NullCell, NumberCell, RepeatedRecordCell, StringCell, TimestampCell, TimeCell, RecordOrRepeatedRecordCell, CellValue } from '.';
|
|
2
2
|
import { Field } from '../fields';
|
|
3
3
|
import { DrillEntry } from '../types';
|
|
4
4
|
import type * as Malloy from '@malloydata/malloy-interfaces';
|
|
@@ -16,6 +16,7 @@ export declare abstract class CellBase {
|
|
|
16
16
|
isRecordOrRepeatedRecord(): this is RecordOrRepeatedRecordCell;
|
|
17
17
|
isNest(): this is NestCell;
|
|
18
18
|
isNumber(): this is NumberCell;
|
|
19
|
+
isBigNumber(): this is BigNumberCell;
|
|
19
20
|
isDate(): this is DateCell;
|
|
20
21
|
isTime(): this is TimeCell;
|
|
21
22
|
isJSON(): this is JSONCell;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Field } from '../fields';
|
|
2
2
|
import { ArrayCell, RecordCell, RepeatedRecordCell } from './nest';
|
|
3
|
-
import { BooleanCell, DateCell, JSONCell, NullCell, NumberCell, SQLNativeCell, StringCell, TimestampCell } from './atomic';
|
|
3
|
+
import { BigNumberCell, BooleanCell, DateCell, JSONCell, NullCell, NumberCell, SQLNativeCell, StringCell, TimestampCell } from './atomic';
|
|
4
4
|
import type * as Malloy from '@malloydata/malloy-interfaces';
|
|
5
5
|
export { ArrayCell, RecordCell, RepeatedRecordCell, RootCell } from './nest';
|
|
6
|
-
export { BooleanCell, DateCell, JSONCell, NullCell, NumberCell, SQLNativeCell, StringCell, TimestampCell, } from './atomic';
|
|
6
|
+
export { BigNumberCell, BooleanCell, DateCell, JSONCell, NullCell, NumberCell, SQLNativeCell, StringCell, TimestampCell, } from './atomic';
|
|
7
7
|
export type NestCell = ArrayCell | RecordCell;
|
|
8
8
|
export type RecordOrRepeatedRecordCell = RepeatedRecordCell | RecordCell;
|
|
9
9
|
export type TimeCell = DateCell | TimestampCell;
|
|
10
|
-
export type Cell = ArrayCell | RecordCell | NullCell | NumberCell | DateCell | JSONCell | StringCell | TimestampCell | BooleanCell | SQLNativeCell;
|
|
10
|
+
export type Cell = ArrayCell | RecordCell | NullCell | NumberCell | BigNumberCell | DateCell | JSONCell | StringCell | TimestampCell | BooleanCell | SQLNativeCell;
|
|
11
11
|
export type CellValue = string | number | boolean | Date | Cell[] | Record<string, Cell> | null;
|
|
12
12
|
export declare const Cell: {
|
|
13
13
|
from(cell: Malloy.Cell, field: Field, parent: NestCell): Cell;
|