@kepler.gl/table 3.0.0 → 3.1.0-alpha.1
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/package.json +15 -12
- package/dist/dataset-utils.d.ts +0 -8
- package/dist/dataset-utils.js +0 -86
- package/dist/gpu-filter-utils.d.ts +0 -28
- package/dist/gpu-filter-utils.js +0 -254
- package/dist/index.d.ts +0 -4
- package/dist/index.js +0 -95
- package/dist/kepler-table.d.ts +0 -152
- package/dist/kepler-table.js +0 -675
package/dist/kepler-table.d.ts
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { RGBColor, Field, FieldPair, FieldDomain, Filter, ProtoDataset, FilterRecord, FilterDatasetOpt } from '@kepler.gl/types';
|
|
2
|
-
import { Layer } from '@kepler.gl/layers';
|
|
3
|
-
import { DataContainerInterface } from '@kepler.gl/utils';
|
|
4
|
-
export declare type GpuFilter = {
|
|
5
|
-
filterRange: number[][];
|
|
6
|
-
filterValueUpdateTriggers: any;
|
|
7
|
-
filterValueAccessor: (dc: DataContainerInterface) => (getIndex?: (any: any) => number, getData?: (dc_: DataContainerInterface, d: any, fieldIndex: number) => any) => (d: any) => number[];
|
|
8
|
-
};
|
|
9
|
-
export declare function maybeToDate(isTime: boolean, fieldIdx: number, format: string, dc: DataContainerInterface, d: {
|
|
10
|
-
index: number;
|
|
11
|
-
}): any;
|
|
12
|
-
declare class KeplerTable {
|
|
13
|
-
readonly id: string;
|
|
14
|
-
type?: string;
|
|
15
|
-
label: string;
|
|
16
|
-
color: RGBColor;
|
|
17
|
-
fields: Field[];
|
|
18
|
-
dataContainer: DataContainerInterface;
|
|
19
|
-
allIndexes: number[];
|
|
20
|
-
filteredIndex: number[];
|
|
21
|
-
filteredIdxCPU?: number[];
|
|
22
|
-
filteredIndexForDomain: number[];
|
|
23
|
-
fieldPairs: FieldPair[];
|
|
24
|
-
gpuFilter: GpuFilter;
|
|
25
|
-
filterRecord?: FilterRecord;
|
|
26
|
-
filterRecordCPU?: FilterRecord;
|
|
27
|
-
changedFilters?: any;
|
|
28
|
-
sortColumn?: {
|
|
29
|
-
[key: string]: string;
|
|
30
|
-
};
|
|
31
|
-
sortOrder?: number[] | null;
|
|
32
|
-
pinnedColumns?: string[];
|
|
33
|
-
supportedFilterTypes?: string[] | null;
|
|
34
|
-
disableDataOperation?: boolean;
|
|
35
|
-
metadata: object;
|
|
36
|
-
constructor({ info, data, color, metadata, supportedFilterTypes, disableDataOperation }: {
|
|
37
|
-
info?: ProtoDataset['info'];
|
|
38
|
-
data: ProtoDataset['data'];
|
|
39
|
-
color: RGBColor;
|
|
40
|
-
metadata?: ProtoDataset['metadata'];
|
|
41
|
-
supportedFilterTypes?: ProtoDataset['supportedFilterTypes'];
|
|
42
|
-
disableDataOperation?: ProtoDataset['disableDataOperation'];
|
|
43
|
-
});
|
|
44
|
-
/**
|
|
45
|
-
* update table with new data
|
|
46
|
-
* @param data - new data e.g. the arrow data with new batches loaded
|
|
47
|
-
*/
|
|
48
|
-
update(data: ProtoDataset['data']): void;
|
|
49
|
-
get length(): number;
|
|
50
|
-
/**
|
|
51
|
-
* Get field
|
|
52
|
-
* @param columnName
|
|
53
|
-
*/
|
|
54
|
-
getColumnField(columnName: string): Field | undefined;
|
|
55
|
-
/**
|
|
56
|
-
* Get fieldIdx
|
|
57
|
-
* @param columnName
|
|
58
|
-
*/
|
|
59
|
-
getColumnFieldIdx(columnName: string): number;
|
|
60
|
-
/**
|
|
61
|
-
* Get displayFormat
|
|
62
|
-
* @param columnName
|
|
63
|
-
*/
|
|
64
|
-
getColumnDisplayFormat(columnName: any): string | undefined;
|
|
65
|
-
/**
|
|
66
|
-
* Get the value of a cell
|
|
67
|
-
*/
|
|
68
|
-
getValue(columnName: string, rowIdx: number): any;
|
|
69
|
-
/**
|
|
70
|
-
* Updates existing field with a new object
|
|
71
|
-
* @param fieldIdx
|
|
72
|
-
* @param newField
|
|
73
|
-
*/
|
|
74
|
-
updateColumnField(fieldIdx: number, newField: Field): void;
|
|
75
|
-
/**
|
|
76
|
-
* Update dataset color by custom color
|
|
77
|
-
* @param newColor
|
|
78
|
-
*/
|
|
79
|
-
updateTableColor(newColor: RGBColor): void;
|
|
80
|
-
/**
|
|
81
|
-
* Save filterProps to field and retrieve it
|
|
82
|
-
* @param columnName
|
|
83
|
-
*/
|
|
84
|
-
getColumnFilterProps(columnName: string): Field['filterProps'] | null | undefined;
|
|
85
|
-
/**
|
|
86
|
-
* Apply filters to dataset, return the filtered dataset with updated `gpuFilter`, `filterRecord`, `filteredIndex`, `filteredIndexForDomain`
|
|
87
|
-
* @param filters
|
|
88
|
-
* @param layers
|
|
89
|
-
* @param opt
|
|
90
|
-
*/
|
|
91
|
-
filterTable(filters: Filter[], layers: Layer[], opt?: FilterDatasetOpt): KeplerTable;
|
|
92
|
-
/**
|
|
93
|
-
* Apply filters to a dataset all on CPU, assign to `filteredIdxCPU`, `filterRecordCPU`
|
|
94
|
-
* @param filters
|
|
95
|
-
* @param layers
|
|
96
|
-
*/
|
|
97
|
-
filterTableCPU(filters: Filter[], layers: Layer[]): KeplerTable;
|
|
98
|
-
/**
|
|
99
|
-
* Calculate field domain based on field type and data
|
|
100
|
-
* for Filter
|
|
101
|
-
*/
|
|
102
|
-
getColumnFilterDomain(field: Field): FieldDomain;
|
|
103
|
-
/**
|
|
104
|
-
* Get the domain of this column based on scale type
|
|
105
|
-
*/
|
|
106
|
-
getColumnLayerDomain(field: Field, scaleType: string): number[] | string[] | [number, number] | null;
|
|
107
|
-
/**
|
|
108
|
-
* Get a sample of rows to calculate layer boundaries
|
|
109
|
-
*/
|
|
110
|
-
/**
|
|
111
|
-
* Parse cell value based on column type and return a string representation
|
|
112
|
-
* Value the field value, type the field type
|
|
113
|
-
*/
|
|
114
|
-
/**
|
|
115
|
-
* Assert whether field exist
|
|
116
|
-
* @param fieldName
|
|
117
|
-
* @param condition
|
|
118
|
-
*/
|
|
119
|
-
_assetField(fieldName: string, condition: any): void;
|
|
120
|
-
}
|
|
121
|
-
export declare type Datasets = {
|
|
122
|
-
[key: string]: KeplerTable;
|
|
123
|
-
};
|
|
124
|
-
/**
|
|
125
|
-
* Find point fields pairs from fields
|
|
126
|
-
*
|
|
127
|
-
* @param fields
|
|
128
|
-
* @returns found point fields
|
|
129
|
-
*/
|
|
130
|
-
export declare function findPointFieldPairs(fields: Field[]): FieldPair[];
|
|
131
|
-
/**
|
|
132
|
-
*
|
|
133
|
-
* @param dataset
|
|
134
|
-
* @param column
|
|
135
|
-
* @param mode
|
|
136
|
-
* @type
|
|
137
|
-
*/
|
|
138
|
-
export declare function sortDatasetByColumn(dataset: KeplerTable, column: string, mode?: string): KeplerTable;
|
|
139
|
-
export declare function pinTableColumns(dataset: KeplerTable, column: string): KeplerTable;
|
|
140
|
-
export declare function copyTable(original: KeplerTable): KeplerTable;
|
|
141
|
-
/**
|
|
142
|
-
* @type
|
|
143
|
-
* @returns
|
|
144
|
-
*/
|
|
145
|
-
export declare function copyTableAndUpdate(original: KeplerTable, options?: Partial<KeplerTable>): KeplerTable;
|
|
146
|
-
export declare function getFieldValueAccessor<F extends {
|
|
147
|
-
type?: Field['type'];
|
|
148
|
-
format?: Field['format'];
|
|
149
|
-
}>(f: F, i: number, dc: DataContainerInterface): (d: {
|
|
150
|
-
index: number;
|
|
151
|
-
}) => any;
|
|
152
|
-
export default KeplerTable;
|