@vuu-ui/vuu-data-test 2.1.4 → 2.1.6

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
- "version": "2.1.4",
2
+ "version": "2.1.6",
3
3
  "author": "heswell",
4
4
  "license": "Apache-2.0",
5
5
  "dependencies": {
6
- "@vuu-ui/vuu-data-local": "2.1.4",
7
- "@vuu-ui/vuu-utils": "2.1.4"
6
+ "@vuu-ui/vuu-data-local": "2.1.6",
7
+ "@vuu-ui/vuu-utils": "2.1.6"
8
8
  },
9
9
  "devDependencies": {
10
- "@vuu-ui/vuu-protocol-types": "2.1.4",
11
- "@vuu-ui/vuu-data-types": "2.1.4",
12
- "@vuu-ui/vuu-table-types": "2.1.4"
10
+ "@vuu-ui/vuu-protocol-types": "2.1.6",
11
+ "@vuu-ui/vuu-data-types": "2.1.6",
12
+ "@vuu-ui/vuu-table-types": "2.1.6"
13
13
  },
14
14
  "sideEffects": false,
15
15
  "files": [
@@ -7,5 +7,6 @@ type RowUpdates = {
7
7
  export type SessionTable = Table & {
8
8
  getSessionUpdates: () => Map<string, RowUpdates>;
9
9
  };
10
+ export declare const isProxySessionTable: (table: any) => table is SessionTable;
10
11
  export declare const SessionTable: (table: Table, sessionId: string) => SessionTable;
11
12
  export {};
@@ -1,8 +1,8 @@
1
1
  import { ArrayDataSource, ArrayDataSourceConstructorProps } from "@vuu-ui/vuu-data-local";
2
- import type { DataSourceSubscribeCallback, DataSourceSubscribeProps, DataSourceVisualLinkCreatedMessage } from "@vuu-ui/vuu-data-types";
3
- import type { LinkDescriptorWithLabel, RpcResultError, RpcResultSuccess, VuuCreateVisualLink, VuuMenu, VuuRemoveVisualLink, VuuRowDataItemType, VuuRpcMenuRequest, VuuRpcMenuResponse, VuuRpcServiceRequest } from "@vuu-ui/vuu-protocol-types";
2
+ import type { DataSource, DataSourceCallbackMessage, DataSourceSubscribeCallback, DataSourceSubscribeProps, DataSourceVisualLinkCreatedMessage, EditSessionMode } from "@vuu-ui/vuu-data-types";
3
+ import type { LinkDescriptorWithLabel, RpcResultError, RpcResultSuccess, VuuCreateVisualLink, VuuMenu, VuuRemoveVisualLink, VuuRowDataItemType, VuuRpcMenuRequest, VuuRpcMenuResponse, VuuRpcServiceRequest, VuuTable } from "@vuu-ui/vuu-protocol-types";
4
4
  import { Range } from "@vuu-ui/vuu-utils";
5
- import { RpcMenuService, RpcService, SessionTableMap } from "./core/module/VuuModule";
5
+ import { IVuuModule, RpcMenuService, RpcService, SessionTableMap } from "./core/module/VuuModule";
6
6
  import { Table } from "./Table";
7
7
  export type VisualLinkHandler = (message: VuuCreateVisualLink | VuuRemoveVisualLink) => Promise<DataSourceVisualLinkCreatedMessage | void>;
8
8
  export interface TickingArrayDataSourceConstructorProps extends Omit<ArrayDataSourceConstructorProps, "data"> {
@@ -14,10 +14,11 @@ export interface TickingArrayDataSourceConstructorProps extends Omit<ArrayDataSo
14
14
  sessionTables?: SessionTableMap;
15
15
  table?: Table;
16
16
  visualLinkService?: VisualLinkHandler;
17
+ vuuModule?: IVuuModule;
17
18
  }
18
19
  export declare class TickingArrayDataSource extends ArrayDataSource {
19
20
  #private;
20
- constructor({ data, getVisualLinks, rpcServices, rpcMenuServices, sessionTables, table, menu, visualLink, visualLinkService, ...arrayDataSourceProps }: TickingArrayDataSourceConstructorProps);
21
+ constructor({ data, getVisualLinks, rpcServices, rpcMenuServices, sessionTables, table, menu, visualLink, visualLinkService, vuuModule, ...arrayDataSourceProps }: TickingArrayDataSourceConstructorProps);
21
22
  updateRowWithSessionCheck: (row: VuuRowDataItemType[], columnName?: string, sessionId?: string) => void;
22
23
  subscribe(subscribeProps: DataSourceSubscribeProps, callback: DataSourceSubscribeCallback): Promise<void>;
23
24
  unsubscribe(): void;
@@ -26,6 +27,11 @@ export declare class TickingArrayDataSource extends ArrayDataSource {
26
27
  set links(links: LinkDescriptorWithLabel[] | undefined);
27
28
  get links(): LinkDescriptorWithLabel[] | undefined;
28
29
  getSelectedRowIds(): string[];
30
+ handleSessionMessage: (msg: DataSourceCallbackMessage) => void;
31
+ createSessionDataSource(sessionTable: VuuTable): DataSource;
32
+ beginEditSession(editSessionMode?: EditSessionMode): Promise<DataSource | undefined>;
33
+ editCell(key: string, column: string, data: VuuRowDataItemType): Promise<void>;
34
+ endEditSession(saveChanges?: boolean): Promise<void>;
29
35
  rpcRequest(rpcRequest: Omit<VuuRpcServiceRequest, "context">): Promise<RpcResultSuccess | RpcResultError>;
30
36
  menuRpcCall(rpcRequest: Omit<VuuRpcMenuRequest, "vpId">): Promise<VuuRpcMenuResponse>;
31
37
  getTypeaheadSuggestions(column: string, pattern?: string): Promise<string[]>;
@@ -1,19 +1,14 @@
1
- import { DataSource, DataSourceConfig, DataSourceVisualLinkCreatedMessage, TableSchema } from "@vuu-ui/vuu-data-types";
2
- import { VuuMenu, VuuTable, VuuLink, LinkDescriptorWithLabel, VuuRpcMenuResponse, VuuCreateVisualLink, VuuRemoveVisualLink, VuuRpcServiceRequest, RpcResultSuccess, RpcResultError, VuuRpcMenuRequest } from "@vuu-ui/vuu-protocol-types";
1
+ import { DataSource, DataSourceConfig, DataSourceVisualLinkCreatedMessage, EditSessionMode, TableSchema } from "@vuu-ui/vuu-data-types";
2
+ import { VuuMenu, VuuLink, LinkDescriptorWithLabel, VuuRpcMenuResponse, VuuCreateVisualLink, VuuRemoveVisualLink, VuuRpcServiceRequest, RpcResultSuccess, RpcResultError, VuuRpcMenuRequest } from "@vuu-ui/vuu-protocol-types";
3
3
  import { Table } from "../../Table";
4
4
  import { SessionTable } from "../../SessionTable";
5
+ import { TickingArrayDataSource } from "../../TickingArrayDataSource";
5
6
  export interface IVuuModule<T extends string = string> {
6
- createDataSource: (tableName: T) => DataSource;
7
+ createDataSource: (tableName: T, viewport?: string) => DataSource;
7
8
  }
8
9
  export type SessionTableMap = Record<string, SessionTable | Table>;
9
- export type LocalDataMenuParameters = {
10
- selectedRowIds: string[];
11
- table: VuuTable;
12
- };
13
10
  export type ServiceHandler = (rpcRequest: VuuRpcServiceRequest) => Promise<RpcResultSuccess | RpcResultError>;
14
- export type MenuServiceHandler = (rpcRequest: VuuRpcMenuRequest & {
15
- localDataParameters?: LocalDataMenuParameters;
16
- }) => Promise<VuuRpcMenuResponse>;
11
+ export type MenuServiceHandler = (rpcRequest: VuuRpcMenuRequest) => Promise<VuuRpcMenuResponse>;
17
12
  export type RpcService = {
18
13
  rpcName: string;
19
14
  service: ServiceHandler;
@@ -54,12 +49,13 @@ export declare abstract class VuuModule<T extends string = string> implements IV
54
49
  protected deleteRow: ServiceHandler;
55
50
  private getColumnDescriptors;
56
51
  private editCell;
57
- private enterEditMode;
58
- private exitEditMode;
59
- private beginBulkEdit;
52
+ private beginEditSessionMenuHandler;
53
+ private beginEditSession;
60
54
  private endEditSession;
61
55
  private applyBulkEdits;
62
- private saveBulkEdits;
63
- protected createSessionTableFromSelectedRows({ data, map, schema }: Table, selectedRowIds: string[]): Table;
56
+ protected createSessionTable(sourceTable: Table, sessionTableName: string, editSessionMode: EditSessionMode | undefined, dataSource: TickingArrayDataSource): Table;
57
+ protected createSessionTableWithAllRows(sourceTable: Table, sessionTableName: string): SessionTable;
58
+ protected createEmptySessionTable({ schema }: Table): Table;
59
+ protected createSessionTableFromSelectedRows({ data, map, schema }: Table, sessionTableName: string, dataSource: TickingArrayDataSource): Table;
64
60
  }
65
61
  export {};