@vuu-ui/vuu-data-types 0.11.2 → 0.11.3
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/index.d.ts +15 -11
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -33,7 +33,11 @@ import type {
|
|
|
33
33
|
VuuRemoveVisualLink,
|
|
34
34
|
VuuTableList,
|
|
35
35
|
} from "@vuu-ui/vuu-protocol-types";
|
|
36
|
-
import type {
|
|
36
|
+
import type {
|
|
37
|
+
DataSourceConfigChanges,
|
|
38
|
+
IEventEmitter,
|
|
39
|
+
Range,
|
|
40
|
+
} from "@vuu-ui/vuu-utils";
|
|
37
41
|
import type {
|
|
38
42
|
DataSourceFilter,
|
|
39
43
|
MenuRpcResponse,
|
|
@@ -451,17 +455,17 @@ export interface DataSourceConstructorProps
|
|
|
451
455
|
viewport?: string;
|
|
452
456
|
}
|
|
453
457
|
|
|
454
|
-
export interface
|
|
458
|
+
export interface DataSourceSubscribeProps
|
|
455
459
|
extends Partial<WithBaseFilter<WithFullConfig>> {
|
|
456
460
|
viewport?: string;
|
|
457
|
-
range?:
|
|
461
|
+
range?: Range;
|
|
458
462
|
revealSelected?: boolean;
|
|
459
463
|
selectedIndexValues?: Selection;
|
|
460
464
|
selectedKeyValues?: string[];
|
|
461
465
|
title?: string;
|
|
462
466
|
}
|
|
463
467
|
|
|
464
|
-
export declare type
|
|
468
|
+
export declare type DataSourceSubscribeCallback = (
|
|
465
469
|
message: DataSourceCallbackMessage,
|
|
466
470
|
) => void;
|
|
467
471
|
export declare type OptimizeStrategy = "none" | "throttle" | "debounce";
|
|
@@ -474,7 +478,7 @@ export declare type RowSelectionEventHandler = (
|
|
|
474
478
|
|
|
475
479
|
export type DataSourceConfigChangeHandler = (
|
|
476
480
|
config: WithBaseFilter<WithFullConfig>,
|
|
477
|
-
range:
|
|
481
|
+
range: Range,
|
|
478
482
|
confirmed?: boolean,
|
|
479
483
|
configChanges?: DataSourceConfigChanges,
|
|
480
484
|
) => void;
|
|
@@ -483,7 +487,7 @@ export declare type DataSourceEvents = {
|
|
|
483
487
|
config: DataSourceConfigChangeHandler;
|
|
484
488
|
optimize: (optimize: OptimizeStrategy) => void;
|
|
485
489
|
"page-count": (pageCount: number) => void;
|
|
486
|
-
range: (range:
|
|
490
|
+
range: (range: Range) => void;
|
|
487
491
|
resize: (size: number) => void;
|
|
488
492
|
"row-selection": RowSelectionEventHandler;
|
|
489
493
|
subscribed: (subscription: DataSourceSubscribedMessage) => void;
|
|
@@ -601,7 +605,7 @@ export interface DataSource
|
|
|
601
605
|
* If an suspend is requested and not resumed within 3 seconds, it will automatically be promoted to a disable.,
|
|
602
606
|
*/
|
|
603
607
|
suspend?: () => void;
|
|
604
|
-
resume?: (callback?:
|
|
608
|
+
resume?: (callback?: DataSourceSubscribeCallback) => void;
|
|
605
609
|
|
|
606
610
|
deleteRow?: DataSourceDeleteHandler;
|
|
607
611
|
/**
|
|
@@ -618,7 +622,7 @@ export interface DataSource
|
|
|
618
622
|
* assume ownership of a subscription and receive all messages.
|
|
619
623
|
* Should emit an enabled event
|
|
620
624
|
*/
|
|
621
|
-
enable?: (callback?:
|
|
625
|
+
enable?: (callback?: DataSourceSubscribeCallback) => void;
|
|
622
626
|
/**
|
|
623
627
|
* Disables this subscription. A datasource will send no further messages until re-enabled. Example usage
|
|
624
628
|
* might be for a component displayed within a set of Tabs. If user switches to another tab, the dataSource
|
|
@@ -658,7 +662,7 @@ export interface DataSource
|
|
|
658
662
|
rpcRequest: Omit<VuuRpcRequest, "vpId">,
|
|
659
663
|
) => Promise<T>;
|
|
660
664
|
openTreeNode: (keyOrIndex: string | number) => void;
|
|
661
|
-
range:
|
|
665
|
+
range: Range;
|
|
662
666
|
remoteProcedureCall: <T extends VuuRpcResponse = VuuRpcResponse>(
|
|
663
667
|
message: VuuRpcRequest,
|
|
664
668
|
) => Promise<T>;
|
|
@@ -668,8 +672,8 @@ export interface DataSource
|
|
|
668
672
|
readonly size: number;
|
|
669
673
|
sort: VuuSort;
|
|
670
674
|
subscribe: (
|
|
671
|
-
props:
|
|
672
|
-
callback:
|
|
675
|
+
props: DataSourceSubscribeProps,
|
|
676
|
+
callback: DataSourceSubscribeCallback,
|
|
673
677
|
) => Promise<void>;
|
|
674
678
|
table?: VuuTable;
|
|
675
679
|
readonly tableSchema?: TableSchema;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuu-ui/vuu-data-types",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"author": "heswell",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@vuu-ui/vuu-filter-types": "0.11.
|
|
8
|
-
"@vuu-ui/vuu-protocol-types": "0.11.
|
|
7
|
+
"@vuu-ui/vuu-filter-types": "0.11.3",
|
|
8
|
+
"@vuu-ui/vuu-protocol-types": "0.11.3"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {},
|
|
11
11
|
"peerDependencies": {},
|