@cratis/components 0.1.9 → 0.1.10

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.
Files changed (101) hide show
  1. package/dist/cjs/PivotViewer/PivotViewer.css +1258 -0
  2. package/dist/cjs/PivotViewer/components/Spinner.css +77 -0
  3. package/dist/cjs/TimeMachine/EventsView.css +213 -0
  4. package/dist/cjs/TimeMachine/TimeMachine.css +567 -0
  5. package/dist/esm/PivotViewer/PivotViewer.css +1258 -0
  6. package/dist/esm/PivotViewer/components/Spinner.css +77 -0
  7. package/dist/esm/TimeMachine/EventsView.css +213 -0
  8. package/dist/esm/TimeMachine/TimeMachine.css +567 -0
  9. package/package.json +3 -4
  10. package/.storybook/main.ts +0 -24
  11. package/CommandDialog/CommandDialog.stories.tsx +0 -25
  12. package/CommandDialog/CommandDialog.tsx +0 -161
  13. package/CommandDialog/index.ts +0 -4
  14. package/CommandForm/CommandForm.stories.tsx +0 -24
  15. package/CommandForm/CommandForm.tsx +0 -266
  16. package/CommandForm/CommandFormField.tsx +0 -27
  17. package/CommandForm/CommandFormFields.tsx +0 -142
  18. package/CommandForm/DatePickerField.tsx +0 -57
  19. package/CommandForm/DropdownField.tsx +0 -65
  20. package/CommandForm/InputTextField.tsx +0 -62
  21. package/CommandForm/SliderField.tsx +0 -68
  22. package/CommandForm/index.ts +0 -10
  23. package/Common/ErrorBoundary.stories.tsx +0 -10
  24. package/Common/ErrorBoundary.tsx +0 -41
  25. package/Common/FormElement.stories.tsx +0 -10
  26. package/Common/FormElement.tsx +0 -20
  27. package/Common/Page.stories.tsx +0 -10
  28. package/Common/Page.tsx +0 -21
  29. package/Common/index.ts +0 -6
  30. package/DataPage/DataPage.stories.tsx +0 -10
  31. package/DataPage/DataPage.tsx +0 -191
  32. package/DataPage/index.ts +0 -4
  33. package/DataTables/DataTableForObservableQuery.stories.tsx +0 -10
  34. package/DataTables/DataTableForObservableQuery.tsx +0 -97
  35. package/DataTables/DataTableForQuery.stories.tsx +0 -10
  36. package/DataTables/DataTableForQuery.tsx +0 -97
  37. package/DataTables/index.ts +0 -5
  38. package/Dialogs/BusyIndicatorDialog.stories.tsx +0 -26
  39. package/Dialogs/BusyIndicatorDialog.tsx +0 -26
  40. package/Dialogs/ConfirmationDialog.stories.tsx +0 -36
  41. package/Dialogs/ConfirmationDialog.tsx +0 -75
  42. package/Dialogs/index.ts +0 -5
  43. package/Dropdown/Dropdown.tsx +0 -23
  44. package/Dropdown/index.ts +0 -4
  45. package/PivotViewer/PivotViewer.stories.tsx +0 -24
  46. package/PivotViewer/PivotViewer.tsx +0 -791
  47. package/PivotViewer/components/AxisLabels.tsx +0 -69
  48. package/PivotViewer/components/DetailPanel.tsx +0 -108
  49. package/PivotViewer/components/FilterPanel.tsx +0 -189
  50. package/PivotViewer/components/FilterPanelContainer.tsx +0 -10
  51. package/PivotViewer/components/PivotCanvas.tsx +0 -660
  52. package/PivotViewer/components/PivotViewerMain.tsx +0 -229
  53. package/PivotViewer/components/RangeHistogramFilter.tsx +0 -220
  54. package/PivotViewer/components/Spinner.tsx +0 -21
  55. package/PivotViewer/components/Toolbar.tsx +0 -130
  56. package/PivotViewer/components/ToolbarContainer.tsx +0 -10
  57. package/PivotViewer/components/index.ts +0 -12
  58. package/PivotViewer/components/pivot/animation.ts +0 -108
  59. package/PivotViewer/components/pivot/buckets.ts +0 -152
  60. package/PivotViewer/components/pivot/colorResolver.ts +0 -67
  61. package/PivotViewer/components/pivot/constants.ts +0 -46
  62. package/PivotViewer/components/pivot/sprites.ts +0 -265
  63. package/PivotViewer/components/pivot/visibility.ts +0 -319
  64. package/PivotViewer/constants.ts +0 -9
  65. package/PivotViewer/engine/layout.ts +0 -149
  66. package/PivotViewer/engine/pivot.worker.ts +0 -86
  67. package/PivotViewer/engine/store.ts +0 -437
  68. package/PivotViewer/engine/types.ts +0 -255
  69. package/PivotViewer/hooks/index.ts +0 -13
  70. package/PivotViewer/hooks/useContainerDimensions.ts +0 -45
  71. package/PivotViewer/hooks/useDimensionState.ts +0 -53
  72. package/PivotViewer/hooks/useFilterOptions.ts +0 -36
  73. package/PivotViewer/hooks/useFilterPanelDrag.ts +0 -49
  74. package/PivotViewer/hooks/useFilterState.ts +0 -106
  75. package/PivotViewer/hooks/useFilteredData.ts +0 -119
  76. package/PivotViewer/hooks/usePanning.ts +0 -163
  77. package/PivotViewer/hooks/usePivotEngine.ts +0 -252
  78. package/PivotViewer/hooks/useSelectedItem.ts +0 -402
  79. package/PivotViewer/hooks/useWheelZoom.ts +0 -114
  80. package/PivotViewer/hooks/useZoomState.ts +0 -34
  81. package/PivotViewer/index.ts +0 -7
  82. package/PivotViewer/types.ts +0 -59
  83. package/PivotViewer/utils/animations.ts +0 -249
  84. package/PivotViewer/utils/constants.ts +0 -20
  85. package/PivotViewer/utils/index.ts +0 -6
  86. package/PivotViewer/utils/selection.ts +0 -292
  87. package/PivotViewer/utils/utils.ts +0 -259
  88. package/TimeMachine/EventsView.stories.tsx +0 -10
  89. package/TimeMachine/EventsView.tsx +0 -119
  90. package/TimeMachine/Properties.stories.tsx +0 -10
  91. package/TimeMachine/Properties.tsx +0 -98
  92. package/TimeMachine/ReadModelView.stories.tsx +0 -10
  93. package/TimeMachine/ReadModelView.tsx +0 -143
  94. package/TimeMachine/TimeMachine.stories.tsx +0 -10
  95. package/TimeMachine/TimeMachine.tsx +0 -244
  96. package/TimeMachine/index.ts +0 -8
  97. package/TimeMachine/types.ts +0 -23
  98. package/global.d.ts +0 -11
  99. package/index.ts +0 -22
  100. package/useOverlayZIndex.ts +0 -32
  101. package/vite.config.ts +0 -80
@@ -1,437 +0,0 @@
1
- // Copyright (c) Cratis. All rights reserved.
2
- // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
-
4
- import type {
5
- PivotStore,
6
- Field,
7
- CategoricalIndex,
8
- NumericIndex,
9
- PivotIndexes,
10
- FilterSpec,
11
- FilterResult,
12
- GroupSpec,
13
- GroupResult,
14
- GroupingResult,
15
- FieldValue,
16
- } from './types';
17
-
18
- /**
19
- * Convert array of items to columnar store
20
- */
21
- export function buildStore<TItem extends object>(
22
- items: TItem[],
23
- fieldExtractors: Map<string, (item: TItem) => FieldValue>
24
- ): PivotStore {
25
- const count = items.length;
26
- const ids = new Uint32Array(count);
27
- const fields = new Map<string, Field>();
28
-
29
- for (let i = 0; i < count; i++) {
30
- ids[i] = i;
31
- }
32
-
33
- for (const [fieldName, extractor] of fieldExtractors) {
34
- const firstValue = count > 0 ? extractor(items[0]) : null;
35
- const kind = inferKind(firstValue);
36
-
37
- if (kind === 'number') {
38
- const values = new Float64Array(count);
39
- for (let i = 0; i < count; i++) {
40
- const val = extractor(items[i]);
41
- values[i] = typeof val === 'number' ? val : NaN;
42
- }
43
- fields.set(fieldName, { kind: 'number', values });
44
- } else if (kind === 'boolean') {
45
- const values = new Uint8Array(count);
46
- for (let i = 0; i < count; i++) {
47
- const val = extractor(items[i]);
48
- values[i] = val === true ? 1 : 0;
49
- }
50
- fields.set(fieldName, { kind: 'boolean', values });
51
- } else {
52
- const values: string[] = [];
53
- for (let i = 0; i < count; i++) {
54
- const val = extractor(items[i]);
55
- values.push(stringifyValue(val));
56
- }
57
- fields.set(fieldName, { kind: 'string', values });
58
- }
59
- }
60
-
61
- return { count, ids, fields, items };
62
- }
63
-
64
- function inferKind(value: FieldValue): 'string' | 'number' | 'boolean' {
65
- if (typeof value === 'number') return 'number';
66
- if (typeof value === 'boolean') return 'boolean';
67
- return 'string';
68
- }
69
-
70
- function stringifyValue(value: FieldValue): string {
71
- if (value === null) return 'null';
72
- if (value === undefined) return 'undefined';
73
- return String(value);
74
- }
75
-
76
- /**
77
- * Build categorical index for a string field
78
- */
79
- export function buildCategoricalIndex(field: Field): CategoricalIndex {
80
- if (field.kind !== 'string') {
81
- throw new Error('Categorical index requires string field');
82
- }
83
-
84
- const valueToIdsList = new Map<string, number[]>();
85
-
86
- for (let i = 0; i < field.values.length; i++) {
87
- const value = field.values[i];
88
- let list = valueToIdsList.get(value);
89
- if (!list) {
90
- list = [];
91
- valueToIdsList.set(value, list);
92
- }
93
- list.push(i);
94
- }
95
-
96
- const valueToIds = new Map<string, Uint32Array>();
97
- const values: string[] = [];
98
-
99
- for (const [value, idsList] of valueToIdsList) {
100
- values.push(value);
101
- const ids = new Uint32Array(idsList.length);
102
- for (let i = 0; i < idsList.length; i++) {
103
- ids[i] = idsList[i];
104
- }
105
- ids.sort();
106
- valueToIds.set(value, ids);
107
- }
108
-
109
- values.sort();
110
-
111
- return { valueToIds, values };
112
- }
113
-
114
- /**
115
- * Build numeric index for a number field
116
- */
117
- export function buildNumericIndex(field: Field): NumericIndex {
118
- if (field.kind !== 'number') {
119
- throw new Error('Numeric index requires number field');
120
- }
121
-
122
- const count = field.values.length;
123
- const pairs: Array<{ value: number; id: number }> = [];
124
-
125
- let min = Infinity;
126
- let max = -Infinity;
127
-
128
- for (let i = 0; i < count; i++) {
129
- const value = field.values[i];
130
- if (!isNaN(value)) {
131
- pairs.push({ value, id: i });
132
- if (value < min) min = value;
133
- if (value > max) max = value;
134
- }
135
- }
136
-
137
- pairs.sort((a, b) => a.value - b.value);
138
-
139
- const values = new Float64Array(pairs.length);
140
- const ids = new Uint32Array(pairs.length);
141
-
142
- for (let i = 0; i < pairs.length; i++) {
143
- values[i] = pairs[i].value;
144
- ids[i] = pairs[i].id;
145
- }
146
-
147
- return { values, ids, min, max };
148
- }
149
-
150
- /**
151
- * Build all indexes for specified fields
152
- */
153
- export function buildIndexes(store: PivotStore, fieldNames: string[]): PivotIndexes {
154
- const categorical = new Map<string, CategoricalIndex>();
155
- const numeric = new Map<string, NumericIndex>();
156
-
157
- for (const fieldName of fieldNames) {
158
- const field = store.fields.get(fieldName);
159
- if (!field) continue;
160
-
161
- if (field.kind === 'string') {
162
- categorical.set(fieldName, buildCategoricalIndex(field));
163
- } else if (field.kind === 'number') {
164
- numeric.set(fieldName, buildNumericIndex(field));
165
- }
166
- }
167
-
168
- return { categorical, numeric };
169
- }
170
-
171
- /**
172
- * Intersect two sorted arrays of IDs
173
- */
174
- function intersectSorted(a: Uint32Array, b: Uint32Array): Uint32Array {
175
- const result: number[] = [];
176
- let i = 0;
177
- let j = 0;
178
-
179
- while (i < a.length && j < b.length) {
180
- if (a[i] === b[j]) {
181
- result.push(a[i]);
182
- i++;
183
- j++;
184
- } else if (a[i] < b[j]) {
185
- i++;
186
- } else {
187
- j++;
188
- }
189
- }
190
-
191
- return new Uint32Array(result);
192
- }
193
-
194
- /**
195
- * Union multiple sorted arrays
196
- */
197
- function unionSorted(arrays: Uint32Array[]): Uint32Array {
198
- if (arrays.length === 0) return new Uint32Array(0);
199
- if (arrays.length === 1) return arrays[0];
200
-
201
- const set = new Set<number>();
202
- for (const arr of arrays) {
203
- for (let i = 0; i < arr.length; i++) {
204
- set.add(arr[i]);
205
- }
206
- }
207
-
208
- const result = Array.from(set).sort((a, b) => a - b);
209
- return new Uint32Array(result);
210
- }
211
-
212
- /**
213
- * Apply filters using indexes
214
- */
215
- export function applyFilters(
216
- store: PivotStore,
217
- indexes: PivotIndexes,
218
- filters: FilterSpec[]
219
- ): FilterResult {
220
- if (filters.length === 0) {
221
- return {
222
- visibleIds: store.ids,
223
- count: store.count,
224
- };
225
- }
226
-
227
- const sets: Uint32Array[] = [];
228
-
229
- for (const filter of filters) {
230
- if (filter.type === 'categorical' && filter.values && filter.values.size > 0) {
231
- const index = indexes.categorical.get(filter.field);
232
- if (!index) continue;
233
-
234
- const arrays: Uint32Array[] = [];
235
- for (const value of filter.values) {
236
- const ids = index.valueToIds.get(value);
237
- if (ids) {
238
- arrays.push(ids);
239
- }
240
- }
241
-
242
- if (arrays.length > 0) {
243
- sets.push(unionSorted(arrays));
244
- }
245
- } else if (filter.type === 'numeric' && filter.range) {
246
- const index = indexes.numeric.get(filter.field);
247
- if (!index) continue;
248
-
249
- const { min, max } = filter.range;
250
- const result: number[] = [];
251
-
252
- for (let i = 0; i < index.values.length; i++) {
253
- const val = index.values[i];
254
- if (val >= min && val <= max) {
255
- result.push(index.ids[i]);
256
- }
257
- }
258
-
259
- if (result.length > 0) {
260
- result.sort((a, b) => a - b);
261
- sets.push(new Uint32Array(result));
262
- }
263
- }
264
- }
265
-
266
- if (sets.length === 0) {
267
- return {
268
- visibleIds: store.ids,
269
- count: store.count,
270
- };
271
- }
272
-
273
- let visibleIds = sets[0];
274
- for (let i = 1; i < sets.length; i++) {
275
- visibleIds = intersectSorted(visibleIds, sets[i]);
276
- }
277
-
278
- return {
279
- visibleIds,
280
- count: visibleIds.length,
281
- };
282
- }
283
-
284
- /**
285
- * Group items by field value
286
- */
287
- export function computeGrouping(
288
- store: PivotStore,
289
- indexes: PivotIndexes,
290
- visibleIds: Uint32Array,
291
- groupBy: GroupSpec
292
- ): GroupingResult {
293
- const field = store.fields.get(groupBy.field);
294
- if (!field) {
295
- return { groups: [] };
296
- }
297
-
298
- if (field.kind === 'string') {
299
- return groupByCategorical(field, visibleIds, indexes.categorical.get(groupBy.field));
300
- } else if (field.kind === 'number') {
301
- return groupByNumeric(field, visibleIds, groupBy.buckets);
302
- }
303
-
304
- return { groups: [] };
305
- }
306
-
307
- function groupByCategorical(
308
- field: Field,
309
- visibleIds: Uint32Array,
310
- index?: CategoricalIndex
311
- ): GroupingResult {
312
- if (field.kind !== 'string') {
313
- return { groups: [] };
314
- }
315
-
316
- const valueToIds = new Map<string, number[]>();
317
-
318
- for (let i = 0; i < visibleIds.length; i++) {
319
- const id = visibleIds[i];
320
- const value = field.values[id];
321
-
322
- let list = valueToIds.get(value);
323
- if (!list) {
324
- list = [];
325
- valueToIds.set(value, list);
326
- }
327
- list.push(id);
328
- }
329
-
330
- const groups: GroupResult[] = [];
331
- const sortedValues = index ? index.values : Array.from(valueToIds.keys()).sort();
332
-
333
- for (const value of sortedValues) {
334
- const idsList = valueToIds.get(value);
335
- if (!idsList) continue;
336
-
337
- const ids = new Uint32Array(idsList);
338
- groups.push({
339
- key: value,
340
- label: value,
341
- value,
342
- ids,
343
- count: ids.length,
344
- });
345
- }
346
-
347
- return { groups };
348
- }
349
-
350
- function groupByNumeric(
351
- field: Field,
352
- visibleIds: Uint32Array,
353
- buckets: number = 10
354
- ): GroupingResult {
355
- if (field.kind !== 'number') {
356
- return { groups: [] };
357
- }
358
-
359
- let min = Infinity;
360
- let max = -Infinity;
361
-
362
- for (let i = 0; i < visibleIds.length; i++) {
363
- const value = field.values[visibleIds[i]];
364
- if (!isNaN(value)) {
365
- if (value < min) min = value;
366
- if (value > max) max = value;
367
- }
368
- }
369
-
370
- if (!isFinite(min) || !isFinite(max)) {
371
- return { groups: [] };
372
- }
373
-
374
- const range = max - min;
375
- const bucketSize = range / buckets;
376
-
377
- const bucketLists: number[][] = Array.from({ length: buckets }, () => []);
378
-
379
- for (let i = 0; i < visibleIds.length; i++) {
380
- const id = visibleIds[i];
381
- const value = field.values[id];
382
- if (isNaN(value)) continue;
383
-
384
- let bucketIndex = Math.floor((value - min) / bucketSize);
385
- if (bucketIndex >= buckets) bucketIndex = buckets - 1;
386
-
387
- bucketLists[bucketIndex].push(id);
388
- }
389
-
390
- const groups: GroupResult[] = [];
391
-
392
- for (let i = 0; i < buckets; i++) {
393
- const list = bucketLists[i];
394
- if (list.length === 0) continue;
395
-
396
- const bucketMin = min + i * bucketSize;
397
- const bucketMax = min + (i + 1) * bucketSize;
398
-
399
- const ids = new Uint32Array(list);
400
- groups.push({
401
- key: `${i}`,
402
- label: `${bucketMin.toFixed(1)} - ${bucketMax.toFixed(1)}`,
403
- value: bucketMin,
404
- ids,
405
- count: ids.length,
406
- });
407
- }
408
-
409
- return { groups };
410
- }
411
-
412
- /**
413
- * Sort IDs based on a field
414
- */
415
- export function sortIds(
416
- store: PivotStore,
417
- ids: Uint32Array,
418
- sortBy: string
419
- ): Uint32Array {
420
- const field = store.fields.get(sortBy);
421
- if (!field) return ids;
422
-
423
- const sortedIds = new Uint32Array(ids);
424
-
425
- if (field.kind === 'number') {
426
- const values = field.values;
427
- sortedIds.sort((a, b) => values[a] - values[b]);
428
- } else if (field.kind === 'string') {
429
- const values = field.values;
430
- sortedIds.sort((a, b) => values[a].localeCompare(values[b]));
431
- } else if (field.kind === 'boolean') {
432
- const values = field.values;
433
- sortedIds.sort((a, b) => values[a] - values[b]);
434
- }
435
-
436
- return sortedIds;
437
- }
@@ -1,255 +0,0 @@
1
- // Copyright (c) Cratis. All rights reserved.
2
- // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
-
4
- export type ItemId = number | string;
5
-
6
- export type FieldValue = string | number | boolean | null;
7
-
8
- export interface FieldDef {
9
- name: string;
10
- kind: 'string' | 'number' | 'boolean';
11
- }
12
-
13
- export interface StringField {
14
- kind: 'string';
15
- values: string[];
16
- }
17
-
18
- export interface NumberField {
19
- kind: 'number';
20
- values: Float64Array;
21
- }
22
-
23
- export interface BooleanField {
24
- kind: 'boolean';
25
- values: Uint8Array;
26
- }
27
-
28
- export type Field = StringField | NumberField | BooleanField;
29
-
30
- /**
31
- * Columnar data store for efficient scanning
32
- */
33
- export interface PivotStore {
34
- count: number;
35
- ids: Uint32Array;
36
- fields: Map<string, Field>;
37
-
38
- /** Original items for rendering - indexed by ItemId */
39
- items: unknown[];
40
- }
41
-
42
- /**
43
- * Facet index for categorical fields
44
- */
45
- export interface CategoricalIndex {
46
- /** Map from value to sorted array of item IDs */
47
- valueToIds: Map<string, Uint32Array>;
48
-
49
- /** All unique values in this field */
50
- values: string[];
51
- }
52
-
53
- /**
54
- * Index for numeric fields - pre-sorted for range queries
55
- */
56
- export interface NumericIndex {
57
- /** Values sorted ascending */
58
- values: Float64Array;
59
-
60
- /** Item IDs parallel to values */
61
- ids: Uint32Array;
62
-
63
- /** Min/max for quick bounds */
64
- min: number;
65
- max: number;
66
- }
67
-
68
- /**
69
- * All indexes for fast filtering and pivoting
70
- */
71
- export interface PivotIndexes {
72
- categorical: Map<string, CategoricalIndex>;
73
- numeric: Map<string, NumericIndex>;
74
- }
75
-
76
- /**
77
- * Filter specification
78
- */
79
- export interface FilterSpec {
80
- field: string;
81
- type: 'categorical' | 'numeric';
82
-
83
- /** For categorical: selected values */
84
- values?: Set<string>;
85
-
86
- /** For numeric: min/max range (inclusive) */
87
- range?: { min: number; max: number };
88
- }
89
-
90
- /**
91
- * Result of filter operation
92
- */
93
- export interface FilterResult {
94
- /** Sorted array of visible item IDs */
95
- visibleIds: Uint32Array;
96
-
97
- /** Number of items */
98
- count: number;
99
- }
100
-
101
- /**
102
- * Grouping specification
103
- */
104
- export interface GroupSpec {
105
- field: string;
106
-
107
- /** For numeric fields: number of buckets */
108
- buckets?: number;
109
- }
110
-
111
- /**
112
- * A single group result
113
- */
114
- export interface GroupResult {
115
- /** Group key (value or bucket label) */
116
- key: string;
117
-
118
- /** Display label */
119
- label: string;
120
-
121
- /** Original value */
122
- value: FieldValue;
123
-
124
- /** Item IDs in this group (sorted) */
125
- ids: Uint32Array;
126
-
127
- /** Count */
128
- count: number;
129
- }
130
-
131
- /**
132
- * Result of grouping operation
133
- */
134
- export interface GroupingResult {
135
- groups: GroupResult[];
136
- ungrouped?: Uint32Array;
137
- }
138
-
139
- /**
140
- * Layout specification
141
- */
142
- export interface LayoutSpec {
143
- viewMode: 'collection' | 'grouped';
144
- cardWidth: number;
145
- cardHeight: number;
146
- cardsPerColumn: number;
147
- groupSpacing: number;
148
- containerWidth: number;
149
- containerHeight?: number;
150
- }
151
-
152
- /**
153
- * Position for a single item
154
- */
155
- export interface ItemPosition {
156
- x: number;
157
- y: number;
158
- groupIndex: number;
159
- }
160
-
161
- /**
162
- * Layout result - positions for all visible items
163
- */
164
- export interface LayoutResult {
165
- /** Positions indexed by ItemId */
166
- positions: Map<ItemId, ItemPosition>;
167
-
168
- /** Total width of layout */
169
- totalWidth: number;
170
-
171
- /** Total height of layout */
172
- totalHeight: number;
173
-
174
- /** Width of each bucket (only for grouped layout) */
175
- bucketWidths?: number[];
176
- }
177
-
178
- /**
179
- * Message to worker: build indexes
180
- */
181
- export interface BuildIndexesMessage {
182
- type: 'buildIndexes';
183
- store: PivotStore;
184
- fields: string[];
185
- }
186
-
187
- /**
188
- * Message from worker: indexes ready
189
- */
190
- export interface IndexesReadyMessage {
191
- type: 'indexesReady';
192
- indexes: PivotIndexes;
193
- }
194
-
195
- /**
196
- * Message to worker: apply filters
197
- */
198
- export interface ApplyFiltersMessage {
199
- type: 'applyFilters';
200
- filters: FilterSpec[];
201
- }
202
-
203
- /**
204
- * Message from worker: filter result
205
- */
206
- export interface FilterResultMessage {
207
- type: 'filterResult';
208
- result: FilterResult;
209
- }
210
-
211
- /**
212
- * Message to worker: compute grouping
213
- */
214
- export interface ComputeGroupingMessage {
215
- type: 'computeGrouping';
216
- visibleIds: Uint32Array;
217
- groupBy: GroupSpec;
218
- }
219
-
220
- /**
221
- * Message from worker: grouping result
222
- */
223
- export interface GroupingResultMessage {
224
- type: 'groupingResult';
225
- result: GroupingResult;
226
- }
227
-
228
- export type WorkerInMessage =
229
- | BuildIndexesMessage
230
- | ApplyFiltersMessage
231
- | ComputeGroupingMessage
232
- | SortMessage;
233
-
234
- export type WorkerOutMessage =
235
- | IndexesReadyMessage
236
- | FilterResultMessage
237
- | GroupingResultMessage
238
- | SortResultMessage;
239
-
240
- /**
241
- * Message to worker: sort ids
242
- */
243
- export interface SortMessage {
244
- type: 'sort';
245
- ids: Uint32Array;
246
- sortBy: string;
247
- }
248
-
249
- /**
250
- * Message from worker: sort result
251
- */
252
- export interface SortResultMessage {
253
- type: 'sortResult';
254
- result: Uint32Array;
255
- }
@@ -1,13 +0,0 @@
1
- // Copyright (c) Cratis. All rights reserved.
2
- // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
-
4
- export { useFilterState } from './useFilterState';
5
- export { useDimensionState } from './useDimensionState';
6
- export { useFilteredData } from './useFilteredData';
7
- export { useFilterOptions } from './useFilterOptions';
8
- export { useZoomState } from './useZoomState';
9
- export { usePanning } from './usePanning';
10
- export { useWheelZoom } from './useWheelZoom';
11
- export { useFilterPanelDrag } from './useFilterPanelDrag';
12
- export { useSelectedItem } from './useSelectedItem';
13
- export * from './usePivotEngine';