@vuu-ui/vuu-data-types 0.8.83 → 0.8.85
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 +20 -16
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { Filter } from "@vuu-ui/vuu-filter-types";
|
|
2
2
|
import type { MenuActionClosePopup } from "@vuu-ui/vuu-popups";
|
|
3
3
|
import type {
|
|
4
|
-
ClientToServerEditRpc,
|
|
5
|
-
ClientToServerMenuRPC,
|
|
6
|
-
ClientToServerViewportRpcCall,
|
|
7
4
|
NoAction,
|
|
8
5
|
OpenDialogAction,
|
|
9
6
|
VuuAggregation,
|
|
@@ -17,6 +14,7 @@ import type {
|
|
|
17
14
|
VuuRowDataItemType,
|
|
18
15
|
VuuSort,
|
|
19
16
|
VuuTable,
|
|
17
|
+
VuuRpcRequest,
|
|
20
18
|
} from "@vuu-ui/vuu-protocol-types";
|
|
21
19
|
import type { DataSourceConfigChanges, IEventEmitter } from "@vuu-ui/vuu-utils";
|
|
22
20
|
import type {
|
|
@@ -26,10 +24,10 @@ import type {
|
|
|
26
24
|
TableSchema,
|
|
27
25
|
} from "@vuu-ui/vuu-data-types";
|
|
28
26
|
import type {
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
VuuTableListRequest,
|
|
28
|
+
VuuTableMetaRequest,
|
|
31
29
|
LinkDescriptorWithLabel,
|
|
32
|
-
|
|
30
|
+
VuuRpcViewportResponse,
|
|
33
31
|
TypeAheadMethod,
|
|
34
32
|
VuuRange,
|
|
35
33
|
} from "@vuu-ui/vuu-protocol-types";
|
|
@@ -352,7 +350,7 @@ export type DataSourceEvents = {
|
|
|
352
350
|
* return Promise<errorMessage> indicates failure
|
|
353
351
|
*/
|
|
354
352
|
export type DataSourceEditHandler = (
|
|
355
|
-
|
|
353
|
+
rowKey: string,
|
|
356
354
|
columnName: string,
|
|
357
355
|
value: VuuRowDataItemType,
|
|
358
356
|
) => Promise<true | string>;
|
|
@@ -370,7 +368,7 @@ export type RpcResponse =
|
|
|
370
368
|
| ViewportRpcResponse;
|
|
371
369
|
|
|
372
370
|
export type RpcResponseHandler = (
|
|
373
|
-
response: Omit<
|
|
371
|
+
response: Omit<VuuRpcResponse, "vpId">,
|
|
374
372
|
) => boolean;
|
|
375
373
|
|
|
376
374
|
export type RowSearchPredicate = (row: DataSourceRow) => boolean;
|
|
@@ -478,16 +476,22 @@ export interface DataSource
|
|
|
478
476
|
insertRow?: DataSourceInsertHandler;
|
|
479
477
|
links?: LinkDescriptorWithLabel[];
|
|
480
478
|
menu?: VuuMenu;
|
|
479
|
+
/** @deprecated, use remoteProcedureCall instead */
|
|
481
480
|
menuRpcCall: (
|
|
482
|
-
rpcRequest: Omit<
|
|
483
|
-
) => Promise<
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
481
|
+
rpcRequest: Omit<VuuRpcRequest, "vpId">,
|
|
482
|
+
) => Promise<VuuRpcMenuResponse>;
|
|
483
|
+
/* @deprecated, use remoteProcedureCall instead */
|
|
484
|
+
rpcCall?: <T extends VuuRpcResponse = VuuRpcResponse>(
|
|
485
|
+
rpcRequest: Omit<VuuRpcRequest, "vpId">,
|
|
486
|
+
) => Promise<T>;
|
|
487
487
|
openTreeNode: (key: string) => void;
|
|
488
488
|
range: VuuRange;
|
|
489
|
+
remoteProcedureCall: <T extends VuuRpcResponse = VuuRpcResponse>(
|
|
490
|
+
message: VuuRpcRequest,
|
|
491
|
+
) => Promise<T>;
|
|
489
492
|
select: SelectionChangeHandler;
|
|
490
493
|
readonly selectedRowsCount: number;
|
|
494
|
+
sendBroadcastMessage?: (message: DataSourceBroadcastMessage) => void;
|
|
491
495
|
readonly size: number;
|
|
492
496
|
sort: VuuSort;
|
|
493
497
|
subscribe: (
|
|
@@ -609,7 +613,7 @@ export interface VuuUIMessageInTableMeta {
|
|
|
609
613
|
type: "TABLE_META_RESP";
|
|
610
614
|
}
|
|
611
615
|
export interface ViewportRpcResponse {
|
|
612
|
-
action:
|
|
616
|
+
action: VuuRpcViewportResponse["action"] & {
|
|
613
617
|
// for SessionTable editing, we inject the schema after receiving server message
|
|
614
618
|
// and before forwarding to UI
|
|
615
619
|
tableSchema?: TableSchema;
|
|
@@ -789,5 +793,5 @@ export type VuuUIMessageOut =
|
|
|
789
793
|
| VuuUIMessageOutSubscribe
|
|
790
794
|
| VuuUIMessageOutUnsubscribe
|
|
791
795
|
| VuuUIMessageOutViewport
|
|
792
|
-
| WithRequestId<
|
|
793
|
-
| WithRequestId<
|
|
796
|
+
| WithRequestId<VuuTableListRequest>
|
|
797
|
+
| WithRequestId<VuuTableMetaRequest>;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuu-ui/vuu-data-types",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.85",
|
|
4
4
|
"author": "heswell",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@vuu-ui/vuu-filter-types": "0.8.
|
|
8
|
-
"@vuu-ui/vuu-protocol-types": "0.8.
|
|
7
|
+
"@vuu-ui/vuu-filter-types": "0.8.85",
|
|
8
|
+
"@vuu-ui/vuu-protocol-types": "0.8.85"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {},
|
|
11
11
|
"peerDependencies": {},
|