@vuu-ui/vuu-data-types 0.8.21-debug → 0.8.22-debug

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 (2) hide show
  1. package/index.d.ts +748 -0
  2. package/package.json +4 -3
package/index.d.ts ADDED
@@ -0,0 +1,748 @@
1
+ import type { Filter } from "@vuu-ui/vuu-filter-types";
2
+ import type { MenuActionClosePopup } from "@vuu-ui/vuu-popups";
3
+ import type {
4
+ ClientToServerEditRpc,
5
+ ClientToServerMenuRPC,
6
+ ClientToServerViewportRpcCall,
7
+ VuuAggregation,
8
+ VuuColumnDataType,
9
+ VuuColumns,
10
+ VuuDataRowDto,
11
+ VuuFilter,
12
+ VuuGroupBy,
13
+ VuuLinkDescriptor,
14
+ VuuMenu,
15
+ VuuRowDataItemType,
16
+ VuuSort,
17
+ VuuTable,
18
+ } from "@vuu-ui/vuu-protocol-types";
19
+ import type { IEventEmitter } from "@vuu-ui/vuu-utils";
20
+ import type {
21
+ DataSourceFilter,
22
+ MenuRpcResponse,
23
+ Selection,
24
+ TableSchema,
25
+ } from "@vuu-ui/vuu-data-types";
26
+ import type {
27
+ ClientToServerTableList,
28
+ ClientToServerTableMeta,
29
+ LinkDescriptorWithLabel,
30
+ ServerToClientViewportRpcResponse,
31
+ TypeAheadMethod,
32
+ VuuRange,
33
+ } from "@vuu-ui/vuu-protocol-types";
34
+
35
+ export interface DataSourceFilter extends VuuFilter {
36
+ filterStruct?: Filter;
37
+ }
38
+
39
+ export interface NamedDataSourceFilter extends DataSourceFilter {
40
+ id?: string;
41
+ name?: string;
42
+ }
43
+
44
+ type RowIndex = number;
45
+ type RenderKey = number;
46
+ type IsLeaf = boolean;
47
+ type IsExpanded = boolean;
48
+ type Depth = number;
49
+ type ChildCount = number;
50
+ type RowKey = string;
51
+ export type IsSelected = number;
52
+
53
+ export type DataSourceRow = [
54
+ RowIndex,
55
+ RenderKey,
56
+ IsLeaf,
57
+ IsExpanded,
58
+ Depth,
59
+ ChildCount,
60
+ RowKey,
61
+ IsSelected,
62
+ ...VuuRowDataItemType[]
63
+ ];
64
+
65
+ export type DataSourceRowPredicate = (row: DataSourceRow) => boolean;
66
+
67
+ export interface ContextMenuItemBase {
68
+ className?: string;
69
+ icon?: string;
70
+ label: string;
71
+ location?: string;
72
+ }
73
+
74
+ export interface ContextMenuLeafItemDescriptor extends ContextMenuItemBase {
75
+ action: string;
76
+ options?: unknown;
77
+ }
78
+
79
+ export type ContextMenuItemDescriptor =
80
+ | ContextMenuLeafItemDescriptor
81
+ | ContextMenuGroupItemDescriptor;
82
+
83
+ export interface ContextMenuGroupItemDescriptor extends ContextMenuItemBase {
84
+ children: ContextMenuItemDescriptor[];
85
+ }
86
+
87
+ export interface MessageWithClientViewportId {
88
+ clientViewportId: string;
89
+ }
90
+
91
+ export interface DataSourceAggregateMessage
92
+ extends MessageWithClientViewportId {
93
+ aggregations: VuuAggregation[];
94
+ type: "aggregate";
95
+ }
96
+
97
+ export type DataUpdateMode = "batch" | "update" | "size-only";
98
+
99
+ export interface DataSourceDataMessage extends MessageWithClientViewportId {
100
+ mode: DataUpdateMode;
101
+ rows?: DataSourceRow[];
102
+ size?: number;
103
+ type: "viewport-update";
104
+ }
105
+
106
+ export interface DataSourceDataSizeMessage extends MessageWithClientViewportId {
107
+ mode: "size-only";
108
+ size: number;
109
+ type: "viewport-update";
110
+ }
111
+
112
+ export interface DataSourceDisabledMessage extends MessageWithClientViewportId {
113
+ type: "disabled";
114
+ }
115
+
116
+ export interface DataSourceEnabledMessage extends MessageWithClientViewportId {
117
+ type: "enabled";
118
+ }
119
+
120
+ export interface DataSourceColumnsMessage extends MessageWithClientViewportId {
121
+ type: "columns";
122
+ columns: VuuColumns;
123
+ }
124
+ export interface DataSourceFilterMessage extends MessageWithClientViewportId {
125
+ type: "filter";
126
+ filter: DataSourceFilter;
127
+ }
128
+ export interface DataSourceGroupByMessage extends MessageWithClientViewportId {
129
+ type: "groupBy";
130
+ groupBy: VuuGroupBy | undefined;
131
+ }
132
+
133
+ export interface DataSourceSetConfigMessage
134
+ extends MessageWithClientViewportId {
135
+ type: "config";
136
+ config: WithFullConfig;
137
+ }
138
+
139
+ export interface DataSourceDebounceRequest extends MessageWithClientViewportId {
140
+ type: "debounce-begin";
141
+ }
142
+
143
+ export interface DataSourceMenusMessage extends MessageWithClientViewportId {
144
+ type: "vuu-menu";
145
+ menu: VuuMenu;
146
+ }
147
+
148
+ export interface DataSourceSortMessage extends MessageWithClientViewportId {
149
+ type: "sort";
150
+ sort: VuuSort;
151
+ }
152
+
153
+ export interface DataSourceSubscribedMessage
154
+ extends MessageWithClientViewportId {
155
+ aggregations: VuuAggregation[];
156
+ columns: VuuColumns;
157
+ filter: DataSourceFilter;
158
+ groupBy: VuuGroupBy;
159
+ range: VuuRange;
160
+ sort: VuuSort;
161
+ tableSchema: Readonly<TableSchema>;
162
+ type: "subscribed";
163
+ }
164
+
165
+ export interface DataSourceVisualLinkCreatedMessage
166
+ extends MessageWithClientViewportId {
167
+ colName: string;
168
+ parentViewportId: string;
169
+ parentColName: string;
170
+ type: "vuu-link-created";
171
+ }
172
+
173
+ export interface DataSourceVisualLinkRemovedMessage
174
+ extends MessageWithClientViewportId {
175
+ type: "vuu-link-removed";
176
+ }
177
+
178
+ export interface DataSourceVisualLinksMessage
179
+ extends MessageWithClientViewportId {
180
+ type: "vuu-links";
181
+ links: VuuLinkDescriptor[];
182
+ }
183
+
184
+ export type VuuFeatureInvocationMessage =
185
+ | DataSourceVisualLinkCreatedMessage
186
+ | DataSourceVisualLinkRemovedMessage;
187
+
188
+ export type VuuFeatureMessage =
189
+ | DataSourceMenusMessage
190
+ | DataSourceVisualLinksMessage;
191
+
192
+ export type DataSourceConfigMessage =
193
+ | DataSourceAggregateMessage
194
+ | DataSourceColumnsMessage
195
+ | DataSourceFilterMessage
196
+ | DataSourceGroupByMessage
197
+ | DataSourceSortMessage
198
+ | DataSourceSetConfigMessage;
199
+
200
+ export type DataSourceCallbackMessage =
201
+ | DataSourceConfigMessage
202
+ | DataSourceColumnsMessage
203
+ | DataSourceDataMessage
204
+ | DataSourceDebounceRequest
205
+ | DataSourceDisabledMessage
206
+ | DataSourceEnabledMessage
207
+ | DataSourceMenusMessage
208
+ | DataSourceSubscribedMessage
209
+ | DataSourceVisualLinkCreatedMessage
210
+ | DataSourceVisualLinkRemovedMessage
211
+ | DataSourceVisualLinksMessage;
212
+
213
+ export type ConfigChangeColumnsMessage = {
214
+ type: "columns";
215
+ columns?: ColumnDescriptor[];
216
+ };
217
+
218
+ export type ConfigChangeMessage =
219
+ | ConfigChangeColumnsMessage
220
+ | DataSourceAggregateMessage
221
+ | DataSourceFilterMessage
222
+ | DataSourceGroupByMessage
223
+ | DataSourceSortMessage
224
+ | DataSourceVisualLinkCreatedMessage
225
+ | DataSourceVisualLinkRemovedMessage;
226
+
227
+ export type ConfigChangeHandler = (msg: ConfigChangeMessage) => void;
228
+
229
+ /**
230
+ * MenuBuilder describes a factory function that creates
231
+ * Menu Item Descriptors appropriate to the supplied
232
+ * location. Location can be any string identifier, it
233
+ * can be used to determine which Menu Items to include
234
+ * in the menu. Most often used for ContextMenus.
235
+ */
236
+ export type MenuBuilder<L = string, O = unknown> = (
237
+ location: L,
238
+ options: O
239
+ ) => ContextMenuItemDescriptor[];
240
+
241
+ /**
242
+ * MenuActionHandler describes a function that provides an implementation of
243
+ * one or more MenuItem actions. It will receive the type from the MenuItem
244
+ * clicked, plus any options object associated with that MenuItem.
245
+ *
246
+ * It should return true if it handled this MenuItem. This allows multiple Menu-
247
+ * ActionHandlers to be chained.
248
+ */
249
+ export type MenuActionHandler = (
250
+ reason: MenuActionClosePopup
251
+ ) => boolean | undefined;
252
+
253
+ export interface ContextMenuContextType {
254
+ menuBuilders: MenuBuilder[];
255
+ menuActionHandler: MenuActionHandler;
256
+ }
257
+
258
+ export type SchemaColumn = {
259
+ name: string;
260
+ serverDataType: VuuColumnDataType;
261
+ };
262
+
263
+ export type TableSchema = {
264
+ columns: SchemaColumn[];
265
+ key: string;
266
+ table: VuuTable;
267
+ };
268
+
269
+ /**
270
+ * Described the configuration values that should typically be
271
+ * persisted across sessions.
272
+ */
273
+ export interface WithFullConfig {
274
+ readonly aggregations: VuuAggregation[];
275
+ readonly columns: string[];
276
+ readonly filter: DataSourceFilter;
277
+ readonly groupBy: VuuGroupBy;
278
+ readonly sort: VuuSort;
279
+ readonly visualLink?: LinkDescriptorWithLabel;
280
+ }
281
+
282
+ export interface DataSourceConfig extends Partial<WithFullConfig> {
283
+ visualLink?: LinkDescriptorWithLabel;
284
+ }
285
+
286
+ export interface WithGroupBy extends DataSourceConfig {
287
+ groupBy: VuuGroupBy;
288
+ }
289
+ export interface WithFilter extends DataSourceConfig {
290
+ filter: DataSourceFilter;
291
+ }
292
+ export interface WithSort extends DataSourceConfig {
293
+ sort: VuuSort;
294
+ }
295
+
296
+ export interface DataSourceConstructorProps extends DataSourceConfig {
297
+ bufferSize?: number;
298
+ table: VuuTable;
299
+ title?: string;
300
+ viewport?: string;
301
+ }
302
+
303
+ export interface SubscribeProps {
304
+ viewport?: string;
305
+ columns?: string[];
306
+ aggregations?: VuuAggregation[];
307
+ range?: VuuRange;
308
+ sort?: VuuSort;
309
+ groupBy?: VuuGroupBy;
310
+ filter?: DataSourceFilter;
311
+ title?: string;
312
+ }
313
+
314
+ export type SubscribeCallback = (message: DataSourceCallbackMessage) => void;
315
+ export type OptimizeStrategy = "none" | "throttle" | "debounce";
316
+
317
+ export type DataSourceEvents = {
318
+ config: (config: DataSourceConfig | undefined, confirmed?: boolean) => void;
319
+ optimize: (optimize: OptimizeStrategy) => void;
320
+ range: (range: VuuRange) => void;
321
+ resize: (size: number) => void;
322
+ };
323
+
324
+ /**
325
+ * return Promise<true> indicates success
326
+ * return Promise<errorMessage> indicates failure
327
+ */
328
+ export type DataSourceEditHandler = (
329
+ row: DataSourceRow,
330
+ columnName: string,
331
+ value: VuuRowDataItemType
332
+ ) => Promise<true | string>;
333
+
334
+ export type DataSourceDeleteHandler = (key: string) => Promise<true | string>;
335
+ export type DataSourceInsertHandler = (
336
+ key: string,
337
+ data: VuuDataRowDto
338
+ ) => Promise<true | string>;
339
+
340
+ export type RpcResponse =
341
+ | MenuRpcResponse
342
+ | VuuUIMessageInRPCEditReject
343
+ | VuuUIMessageInRPCEditResponse
344
+ | ViewportRpcResponse;
345
+
346
+ export type RpcResponseHandler = (response: RpcResponse) => boolean;
347
+
348
+ export type RowSearchPredicate = (row: DataSourceRow) => boolean;
349
+
350
+ export type DataSourceStatus =
351
+ | "disabled"
352
+ | "disabling"
353
+ | "enabled"
354
+ | "enabling"
355
+ | "initialising"
356
+ | "subscribing"
357
+ | "subscribed"
358
+ | "suspended"
359
+ | "unsubscribed";
360
+
361
+ export interface TypeaheadSuggestionProvider {
362
+ getTypeaheadSuggestions: (
363
+ columnName: string,
364
+ pattern?: string
365
+ ) => Promise<string[]>;
366
+ }
367
+
368
+ export type RangeTuple = [from: number, to: number];
369
+ export type SelectionItem = number | RangeTuple;
370
+ export type Selection = SelectionItem[];
371
+ export type SelectionChangeHandler = (selection: Selection) => void;
372
+
373
+ export interface DataSource
374
+ extends IEventEmitter<DataSourceEvents>,
375
+ Partial<TypeaheadSuggestionProvider> {
376
+ aggregations: VuuAggregation[];
377
+ applyEdit: DataSourceEditHandler;
378
+ /**
379
+ * set config without triggering config event. Use this method when initialising
380
+ * a dataSource that has been restored from session state. The dataSource will
381
+ * not yet be subscribed. Triggering the config event is unnecessary and might
382
+ * cause a React exception if the event were to cause a render.
383
+ * @param config DataSourceConfig
384
+ * @returns true if config has been applied (will not be if existig config is same)
385
+ */
386
+ applyConfig: (config: DataSourceConfig) => true | undefined;
387
+ closeTreeNode: (key: string, cascade?: boolean) => void;
388
+ columns: string[];
389
+ config: DataSourceConfig;
390
+ status: DataSourceStatus;
391
+ /**
392
+ *
393
+ * Similar to disable but intended for pauses of very short duration (default is 3 seconds). Although
394
+ * the dataSource will stop sending messages until resumed, it will not disconnect from a remote server.
395
+ * It will preserve subscription to the remote server and continue to apply updates to cached data. It
396
+ * just won't send updates through to the UI thread (until resumed). Useful in edge cases such as where a
397
+ * component is dragged to a new location. When dropped, the component will be unmounted and very quickly
398
+ * remounted by React. For the duration of this operation, we suspend updates . Updating an unmounted
399
+ * React component would cause a React error.
400
+ * If an suspend is requested and not resumed within 3 seconds, it will automatically be promoted to a disable.,
401
+ */
402
+ suspend?: () => void;
403
+ resume?: () => void;
404
+
405
+ deleteRow?: DataSourceDeleteHandler;
406
+
407
+ /**
408
+ * For a dataSource that has been previously disabled and is currently in disabled state , this will restore
409
+ * the subscription to active status. Fresh data will be dispatched to client. The enable call optionally
410
+ * accepts the same subscribe callback as subscribe. This allows a completely new instance of a component to
411
+ * assume ownership of a subscription and receive all messages.
412
+ */
413
+ enable?: (callback?: SubscribeCallback) => void;
414
+ /**
415
+ * Disables this subscription. A datasource will send no further messages until re-enabled. Example usage
416
+ * might be for a component displayed within a set of Tabs. If user switches to another tab, the dataSource
417
+ * of the component that is no longer visible can be disabled until it is made visible again.
418
+ */
419
+ disable?: () => void;
420
+ filter: DataSourceFilter;
421
+
422
+ /**
423
+ * Only implemented on JSON DataSource
424
+ * @param depth
425
+ * @param visibleOnly
426
+ * @returns
427
+ */
428
+ getChildRows?: (rowKey: string) => DataSourceRow[];
429
+ /**
430
+ * Only implemented on JSON DataSource
431
+ * @param depth
432
+ * @param visibleOnly
433
+ * @returns
434
+ */
435
+ getRowsAtDepth?: (depth: number, visibleOnly?: boolean) => DataSourceRow[];
436
+ groupBy: VuuGroupBy;
437
+ insertRow?: DataSourceInsertHandler;
438
+ links?: LinkDescriptorWithLabel[];
439
+ menu?: VuuMenu;
440
+ menuRpcCall: (
441
+ rpcRequest: Omit<ClientToServerMenuRPC, "vpId"> | ClientToServerEditRpc
442
+ ) => Promise<RpcResponse | undefined>;
443
+ rpcCall?: <T extends RpcResponse = RpcResponse>(
444
+ message: Omit<ClientToServerViewportRpcCall, "vpId">
445
+ ) => Promise<T | undefined>;
446
+ openTreeNode: (key: string) => void;
447
+ range: VuuRange;
448
+ select: SelectionChangeHandler;
449
+ readonly selectedRowsCount: number;
450
+ readonly size: number;
451
+ sort: VuuSort;
452
+ subscribe: (
453
+ props: SubscribeProps,
454
+ callback: SubscribeCallback
455
+ ) => Promise<void>;
456
+ table?: VuuTable;
457
+ readonly tableSchema?: TableSchema;
458
+ title?: string;
459
+ unsubscribe: () => void;
460
+ viewport?: string;
461
+ visualLink?: LinkDescriptorWithLabel;
462
+ }
463
+
464
+ export interface MenuRpcResponse {
465
+ action: MenuRpcAction;
466
+ error?: string;
467
+ requestId: string;
468
+ rpcName?: string;
469
+ tableAlreadyOpen?: boolean;
470
+ type: "VIEW_PORT_MENU_RESP";
471
+ }
472
+
473
+ export interface OpenDialogAction {
474
+ type: "OPEN_DIALOG_ACTION";
475
+ tableSchema?: TableSchema;
476
+ table?: VuuTable;
477
+ }
478
+ export interface NoAction {
479
+ type: "NO_ACTION";
480
+ }
481
+
482
+ export declare type MenuRpcAction = OpenDialogAction | NoAction;
483
+
484
+ export type ConnectionStatus =
485
+ | "connecting"
486
+ | "connection-open-awaiting-session"
487
+ | "connected"
488
+ | "disconnected"
489
+ | "reconnected";
490
+
491
+ export interface ConnectionStatusMessage {
492
+ type: "connection-status";
493
+ reason?: string;
494
+ retry?: boolean;
495
+ status: ConnectionStatus;
496
+ }
497
+
498
+ export interface ConnectionQualityMetrics {
499
+ type: "connection-metrics";
500
+ messagesLength: number;
501
+ }
502
+
503
+ export interface ServerProxySubscribeMessage {
504
+ aggregations: VuuAggregation[];
505
+ bufferSize?: number;
506
+ columns: VuuColumns;
507
+ filter: DataSourceFilter;
508
+ groupBy: VuuGroupBy;
509
+ range: VuuRange;
510
+ sort: VuuSort;
511
+ table: VuuTable;
512
+ title?: string;
513
+ viewport: string;
514
+ visualLink?: LinkDescriptorWithLabel;
515
+ }
516
+
517
+ // export type VuuUIMessageInConnectionStatus = {
518
+ // type: 'connection-status';
519
+ // };
520
+
521
+ export type VuuUIMessageInConnected = {
522
+ type: "connected";
523
+ };
524
+
525
+ export type VuuUIMessageInWorkerReady = {
526
+ type: "ready";
527
+ };
528
+
529
+ export interface ViewportMessageIn {
530
+ clientViewportId: string;
531
+ }
532
+
533
+ // TODO use generic to type result
534
+ export interface VuuUIMessageInRPC {
535
+ method: string;
536
+ result: unknown;
537
+ requestId: string;
538
+ type: "RPC_RESP";
539
+ }
540
+
541
+ export interface VuuUIMessageInRPCEditReject {
542
+ error: string;
543
+ requestId?: string;
544
+ type: "VP_EDIT_RPC_REJECT";
545
+ }
546
+
547
+ export interface VuuUIMessageInRPCEditResponse {
548
+ action: unknown;
549
+ requestId: string;
550
+ rpcName: string;
551
+ type: "VP_EDIT_RPC_RESPONSE";
552
+ }
553
+
554
+ export interface VuuUIMessageInTableList {
555
+ requestId: string;
556
+ type: "TABLE_LIST_RESP";
557
+ tables: VuuTable[];
558
+ }
559
+ export interface VuuUIMessageInTableMeta {
560
+ requestId: string;
561
+ tableSchema: TableSchema;
562
+ type: "TABLE_META_RESP";
563
+ }
564
+ export interface ViewportRpcResponse {
565
+ action: ServerToClientViewportRpcResponse["action"];
566
+ requestId: string;
567
+ rpcName?: string;
568
+ type: "VIEW_PORT_RPC_RESPONSE";
569
+ }
570
+ export interface MenuRpcReject extends ViewportMessageIn {
571
+ error?: string;
572
+ requestId: string;
573
+ rpcName?: string;
574
+ type: "VIEW_PORT_MENU_REJ";
575
+ }
576
+
577
+ export interface VuuUIMessageInMenuRej {
578
+ error: string;
579
+ requestId: string;
580
+ rpcName: string;
581
+ type: "VIEW_PORT_MENU_REJ";
582
+ }
583
+
584
+ export type VuuUIMessageIn =
585
+ | VuuUIMessageInConnected
586
+ | VuuUIMessageInWorkerReady
587
+ | VuuUIMessageInRPC
588
+ | ViewportRpcResponse
589
+ | MenuRpcResponse
590
+ | MenuRpcReject
591
+ | VuuUIMessageInTableList
592
+ | VuuUIMessageInTableMeta
593
+ | VuuUIMessageInRPCEditReject
594
+ | VuuUIMessageInRPCEditResponse;
595
+
596
+ export type WebSocketProtocol = string | string[] | undefined;
597
+
598
+ export interface VuuUIMessageOutConnect {
599
+ protocol: WebSocketProtocol;
600
+ type: "connect";
601
+ token: string;
602
+ url: string;
603
+ username?: string;
604
+ retryLimitDisconnect?: number;
605
+ retryLimitStartup?: number;
606
+ }
607
+
608
+ export interface VuuUIMessageOutSubscribe extends ServerProxySubscribeMessage {
609
+ type: "subscribe";
610
+ }
611
+
612
+ export interface VuuUIMessageOutUnsubscribe {
613
+ type: "unsubscribe";
614
+ viewport: string;
615
+ }
616
+ export interface VuuUIMessageOutSuspend {
617
+ type: "suspend";
618
+ viewport: string;
619
+ }
620
+ export interface VuuUIMessageOutResume {
621
+ type: "resume";
622
+ viewport: string;
623
+ }
624
+
625
+ export interface ViewportMessageOut {
626
+ viewport: string;
627
+ }
628
+
629
+ export interface RequestMessage {
630
+ requestId: string;
631
+ }
632
+
633
+ export interface VuuUIMessageOutColumns extends ViewportMessageOut {
634
+ type: "setColumns";
635
+ columns: string[];
636
+ }
637
+ export interface VuuUIMessageOutViewRange extends ViewportMessageOut {
638
+ type: "setViewRange";
639
+ range: {
640
+ from: number;
641
+ to: number;
642
+ };
643
+ }
644
+ export interface VuuUIMessageOutAggregate extends ViewportMessageOut {
645
+ aggregations: VuuAggregation[];
646
+ type: "aggregate";
647
+ }
648
+ export interface VuuUIMessageOutCloseTreeNode extends ViewportMessageOut {
649
+ key: string;
650
+ type: "closeTreeNode";
651
+ }
652
+ export interface VuuUIMessageOutCreateLink extends ViewportMessageOut {
653
+ childColumnName: string;
654
+ parentColumnName: string;
655
+ parentClientVpId: string;
656
+ type: "createLink";
657
+ }
658
+ export interface VuuUIMessageOutRemoveLink extends ViewportMessageOut {
659
+ type: "removeLink";
660
+ }
661
+ export interface VuuUIMessageOutSetTitle extends ViewportMessageOut {
662
+ title: string;
663
+ type: "setTitle";
664
+ }
665
+
666
+ export interface VuuUIMessageOutDisable extends ViewportMessageOut {
667
+ type: "disable";
668
+ }
669
+ export interface VuuUIMessageOutEnable extends ViewportMessageOut {
670
+ type: "enable";
671
+ }
672
+ export interface VuuUIMessageOutOpenTreeNode extends ViewportMessageOut {
673
+ key: string;
674
+ type: "openTreeNode";
675
+ }
676
+ export interface VuuUIMessageOutResume extends ViewportMessageOut {
677
+ type: "resume";
678
+ }
679
+
680
+ export interface VuuUIMessageOutSelect extends ViewportMessageOut {
681
+ selected: Selection;
682
+ type: "select";
683
+ }
684
+ export interface VuuUIMessageOutSelectAll extends ViewportMessageOut {
685
+ type: "selectAll";
686
+ }
687
+ export interface VuuUIMessageOutSelectNone extends ViewportMessageOut {
688
+ type: "selectNone";
689
+ }
690
+
691
+ export interface VuuUIMessageOutSort extends ViewportMessageOut {
692
+ sort: VuuSort;
693
+ type: "sort";
694
+ }
695
+ export interface VuuUIMessageOutSuspend extends ViewportMessageOut {
696
+ type: "suspend";
697
+ }
698
+
699
+ export interface VuuUIMessageOutFilter extends ViewportMessageOut {
700
+ filter: DataSourceFilter;
701
+ type: "filter";
702
+ }
703
+ export interface VuuUIMessageOutGroupby extends ViewportMessageOut {
704
+ groupBy: VuuGroupBy;
705
+ type: "groupBy";
706
+ }
707
+
708
+ export interface VuuUIMessageOutConfig extends ViewportMessageOut {
709
+ config: WithFullConfig;
710
+ type: "config";
711
+ }
712
+
713
+ export type VuuUIMessageOutViewport =
714
+ | VuuUIMessageOutAggregate
715
+ | VuuUIMessageOutCloseTreeNode
716
+ | VuuUIMessageOutColumns
717
+ | VuuUIMessageOutConfig
718
+ | VuuUIMessageOutCreateLink
719
+ | VuuUIMessageOutFilter
720
+ | VuuUIMessageOutDisable
721
+ | VuuUIMessageOutEnable
722
+ | VuuUIMessageOutGroupby
723
+ | VuuUIMessageOutOpenTreeNode
724
+ | VuuUIMessageOutRemoveLink
725
+ | VuuUIMessageOutResume
726
+ | VuuUIMessageOutSelect
727
+ | VuuUIMessageOutSelectAll
728
+ | VuuUIMessageOutSelectNone
729
+ | VuuUIMessageOutSetTitle
730
+ | VuuUIMessageOutSuspend
731
+ | VuuUIMessageOutSort
732
+ | VuuUIMessageOutViewRange;
733
+
734
+ export interface TypeAheadRpcRequest {
735
+ method: TypeAheadMethod;
736
+ params: [VuuTable, ...string[]];
737
+ type: "RPC_CALL";
738
+ }
739
+
740
+ export type WithRequestId<T> = T & { requestId: string };
741
+
742
+ export type VuuUIMessageOut =
743
+ | VuuUIMessageOutConnect
744
+ | VuuUIMessageOutSubscribe
745
+ | VuuUIMessageOutUnsubscribe
746
+ | VuuUIMessageOutViewport
747
+ | WithRequestId<ClientToServerTableList>
748
+ | WithRequestId<ClientToServerTableMeta>;
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@vuu-ui/vuu-data-types",
3
- "version": "0.8.21-debug",
3
+ "version": "0.8.22-debug",
4
4
  "author": "heswell",
5
5
  "license": "Apache-2.0",
6
6
  "devDependencies": {
7
- "@vuu-ui/vuu-filter-types": "0.8.21-debug",
8
- "@vuu-ui/vuu-protocol-types": "0.8.21-debug"
7
+ "@vuu-ui/vuu-filter-types": "0.8.22-debug",
8
+ "@vuu-ui/vuu-protocol-types": "0.8.22-debug"
9
9
  },
10
10
  "dependencies": {},
11
11
  "peerDependencies": {},
12
12
  "files": [
13
+ "index.d.ts",
13
14
  "index.d.ts"
14
15
  ],
15
16
  "types": "index.d.ts"