Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
428 changes: 214 additions & 214 deletions vuu-ui/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions vuu-ui/packages/grid-layout/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@heswell/grid-layout",
"version": "0.13.28",
"version": "0.13.29",
"description": "VUU Layout Components",
"main": "src/index.ts",
"author": "heswell",
Expand All @@ -12,7 +12,7 @@
},
"types": "src/index.ts",
"dependencies": {
"@vuu-ui/vuu-utils": "0.13.28",
"@vuu-ui/vuu-utils": "0.13.29",
"@salt-ds/core": "1.43.0",
"@salt-ds/lab": "1.0.0-alpha.64",
"@salt-ds/styles": "0.2.1",
Expand Down
6 changes: 3 additions & 3 deletions vuu-ui/packages/vuu-codemirror/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuu-ui/vuu-codemirror",
"version": "0.13.28",
"version": "0.13.29",
"author": "heswell",
"main": "src/index.ts",
"license": "Apache-2.0",
Expand All @@ -11,15 +11,15 @@
"lezer-generate:column": "lezer-generator --output ./src/column-expression-input/column-language-parser/generated/column-parser.js ./src/column-expression-input/column-language-parser/grammar/column.grammar"
},
"devDependencies": {
"@vuu-ui/vuu-table-types": "0.13.28"
"@vuu-ui/vuu-table-types": "0.13.29"
},
"dependencies": {
"@codemirror/autocomplete": "^6.4.2",
"@codemirror/commands": "^6.2.1",
"@codemirror/language": "^6.6.0",
"@codemirror/state": "^6.2.0",
"@codemirror/view": "^6.9.3",
"@vuu-ui/vuu-utils": "0.13.28",
"@vuu-ui/vuu-utils": "0.13.29",
"@lezer/common": "1.2.3",
"@lezer/highlight": "^1.1.3"
},
Expand Down
10 changes: 5 additions & 5 deletions vuu-ui/packages/vuu-context-menu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuu-ui/vuu-context-menu",
"version": "0.13.28",
"version": "0.13.29",
"author": "heswell",
"main": "src/index.ts",
"license": "Apache-2.0",
Expand All @@ -10,12 +10,12 @@
"type-defs": "node ../../scripts/build-type-defs.mjs"
},
"devDependencies": {
"@vuu-ui/vuu-data-types": "0.13.28",
"@vuu-ui/vuu-protocol-types": "0.13.28",
"@vuu-ui/vuu-table-types": "0.13.28"
"@vuu-ui/vuu-data-types": "0.13.29",
"@vuu-ui/vuu-protocol-types": "0.13.29",
"@vuu-ui/vuu-table-types": "0.13.29"
},
"dependencies": {
"@vuu-ui/vuu-utils": "0.13.28",
"@vuu-ui/vuu-utils": "0.13.29",
"@salt-ds/core": "1.43.0",
"@salt-ds/styles": "0.2.1",
"@salt-ds/window": "0.1.1"
Expand Down
14 changes: 7 additions & 7 deletions vuu-ui/packages/vuu-data-local/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuu-ui/vuu-data-local",
"version": "0.13.28",
"version": "0.13.29",
"main": "src/index.ts",
"author": "heswell",
"license": "Apache-2.0",
Expand All @@ -11,14 +11,14 @@
"type-defs": "node ../../scripts/build-type-defs.mjs"
},
"devDependencies": {
"@vuu-ui/vuu-data-types": "0.13.28",
"@vuu-ui/vuu-table-types": "0.13.28",
"@vuu-ui/vuu-filter-types": "0.13.28",
"@vuu-ui/vuu-protocol-types": "0.13.28"
"@vuu-ui/vuu-data-types": "0.13.29",
"@vuu-ui/vuu-table-types": "0.13.29",
"@vuu-ui/vuu-filter-types": "0.13.29",
"@vuu-ui/vuu-protocol-types": "0.13.29"
},
"dependencies": {
"@vuu-ui/vuu-filter-parser": "0.13.28",
"@vuu-ui/vuu-utils": "0.13.28"
"@vuu-ui/vuu-filter-parser": "0.13.29",
"@vuu-ui/vuu-utils": "0.13.29"
},
"sideEffects": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import type {
VuuMenu,
VuuRange,
VuuRowDataItemType,
VuuRpcEditRequest,
VuuRpcEditResponse,
VuuRpcRequest,
VuuRpcResponse,
VuuSort,
Expand Down Expand Up @@ -936,6 +938,13 @@ export class ArrayDataSource
return Promise.reject<T>();
}

async editRpcCall(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
rpcRequest: Omit<VuuRpcEditRequest, "vpId">,
): Promise<VuuRpcEditResponse> {
throw Error("ArrayDataSource does not implement editRpcCall");
}

async menuRpcCall(
rpcRequest: Omit<VuuRpcRequest, "vpId">,
): Promise<VuuRpcResponse> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
VuuRowDataItemType,
VuuRpcResponse,
VuuRpcRequest,
VuuRpcEditResponse,
} from "@vuu-ui/vuu-protocol-types";
import type {
DataSourceFilter,
Expand Down Expand Up @@ -426,6 +427,10 @@ export class JsonDataSource
return undefined;
}

async editRpcCall(): Promise<VuuRpcEditResponse> {
throw Error("JSONDataSource does not implement editRpcCall");
}

applyEdit(
rowKey: string,
columnName: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import type {
VuuUIMessageInRPCEditReject,
VuuUIMessageInRPCEditResponse,
DataSourceFilter,
DataSource,
} from "@vuu-ui/vuu-data-types";
import {
BaseDataSource,
Expand Down Expand Up @@ -55,7 +56,7 @@ const toClientRow = (row: DataSourceRow, keys: KeySet) => {
return clientRow;
};

export class TreeDataSource extends BaseDataSource {
export class TreeDataSource extends BaseDataSource implements DataSource {
public columnDescriptors: ColumnDescriptor[];
private clientCallback: DataSourceSubscribeCallback | undefined;
private expandedRows = new Set<string>();
Expand Down
28 changes: 14 additions & 14 deletions vuu-ui/packages/vuu-data-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuu-ui/vuu-data-react",
"version": "0.13.28",
"version": "0.13.29",
"main": "src/index.ts",
"author": "heswell",
"license": "Apache-2.0",
Expand All @@ -11,21 +11,21 @@
"type-defs": "node ../../scripts/build-type-defs.mjs"
},
"devDependencies": {
"@vuu-ui/vuu-data-types": "0.13.28",
"@vuu-ui/vuu-filter-types": "0.13.28",
"@vuu-ui/vuu-popups": "0.13.28",
"@vuu-ui/vuu-protocol-types": "0.13.28",
"@vuu-ui/vuu-table-types": "0.13.28"
"@vuu-ui/vuu-data-types": "0.13.29",
"@vuu-ui/vuu-filter-types": "0.13.29",
"@vuu-ui/vuu-popups": "0.13.29",
"@vuu-ui/vuu-protocol-types": "0.13.29",
"@vuu-ui/vuu-table-types": "0.13.29"
},
"dependencies": {
"@vuu-ui/vuu-context-menu": "0.13.28",
"@vuu-ui/vuu-data-remote": "0.13.28",
"@vuu-ui/vuu-filter-parser": "0.13.28",
"@vuu-ui/vuu-layout": "0.13.28",
"@vuu-ui/vuu-popups": "0.13.28",
"@vuu-ui/vuu-ui-controls": "0.13.28",
"@vuu-ui/vuu-utils": "0.13.28",
"@vuu-ui/vuu-table": "0.13.28",
"@vuu-ui/vuu-context-menu": "0.13.29",
"@vuu-ui/vuu-data-remote": "0.13.29",
"@vuu-ui/vuu-filter-parser": "0.13.29",
"@vuu-ui/vuu-layout": "0.13.29",
"@vuu-ui/vuu-popups": "0.13.29",
"@vuu-ui/vuu-ui-controls": "0.13.29",
"@vuu-ui/vuu-utils": "0.13.29",
"@vuu-ui/vuu-table": "0.13.29",
"@salt-ds/core": "1.43.0",
"@salt-ds/styles": "0.2.1",
"@salt-ds/window": "0.1.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
dataSourceRowToEntity,
messageHasDataRows,
queryClosest,
viewportRpcRequest,
} from "@vuu-ui/vuu-utils";
import { Button } from "@salt-ds/core";
import {
Expand Down Expand Up @@ -151,9 +150,11 @@ export const useEditForm = ({
);

const submitChanges = useCallback(async () => {
const rpcResponse = await currentDataSource.current?.rpcCall?.(
viewportRpcRequest("VP_BULK_EDIT_SUBMIT_RPC"),
);
const rpcResponse = await currentDataSource.current?.rpcRequest?.({
params: {},
rpcName: "VP_BULK_EDIT_SUBMIT_RPC",
type: "RPC_REQUEST",
});
console.log({ rpcResponse });
}, []);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { SuggestionFetcher, TableSchemaTable } from "@vuu-ui/vuu-data-types";
import {
RpcResultError,
RpcResultSuccess,
TypeaheadParams,
VuuRpcServiceRequest,
} from "@vuu-ui/vuu-protocol-types";
Expand Down Expand Up @@ -56,9 +54,7 @@ export const useTypeaheadSuggestions = () => {
// We don't just return rpcCall . In the case of an
// error we will be returning the rejected promise, bypassing
// the catch block below.
const response = await dataSource.rpcCall?.<
RpcResultSuccess | RpcResultError
>(rpcMessage);
const response = await dataSource.rpcRequest?.(rpcMessage);
if (response?.type === "SUCCESS_RESULT") {
return response.data as string[];
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ import {
metadataKeys,
toColumnName,
useData,
viewportRpcRequest,
} from "@vuu-ui/vuu-utils";
import { useCallback } from "react";
import {
Expand Down Expand Up @@ -397,7 +396,11 @@ export const useVuuMenuActions = ({

const sessionDs = ds.createSessionDataSource?.(action.table);
const handleSubmit = () => {
sessionDs?.rpcCall?.(viewportRpcRequest("VP_BULK_EDIT_SUBMIT_RPC"));
sessionDs?.rpcRequest?.({
params: {},
rpcName: "VP_BULK_EDIT_SUBMIT_RPC",
type: "RPC_REQUEST",
});
closeDialog();
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@ import {
VuuColumnDataType,
VuuDataRow,
VuuRowDataItemType,
VuuRpcAction,
VuuRpcEditCellRequest,
} from "@vuu-ui/vuu-protocol-types";
import {
buildColumnMap,
getTypedValue,
isActionMessage,
isErrorResponse,
queryClosest,
Range,
shallowEquals,
vuuEditCellRequest,
} from "@vuu-ui/vuu-utils";
import {
Button,
Expand Down Expand Up @@ -218,7 +216,12 @@ export const SessionEditingForm = ({
const typedValue = getTypedValue(value, type, true);
if (typeof rowKey === "string") {
dataSource
.menuRpcCall(vuuEditCellRequest(rowKey, field, typedValue))
.editRpcCall({
type: "VP_EDIT_CELL_RPC",
rowKey,
field,
value: typedValue,
} as VuuRpcEditCellRequest)
.then((response) => {
if (isErrorResponse(response)) {
console.log(`edit rejected ${response.error}`);
Expand All @@ -239,21 +242,22 @@ export const SessionEditingForm = ({
);

const applyAction = useCallback(
(action: VuuRpcAction) => {
if (action.type === "CLOSE_DIALOG_ACTION") {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(action: any) => {
if (action?.type === "CLOSE_DIALOG_ACTION") {
onClose?.();
}
},
[onClose],
);

const handleSubmit = useCallback(async () => {
const rpcResponse = await dataSource.menuRpcCall({
const rpcResponse = await dataSource.editRpcCall({
type: "VP_EDIT_SUBMIT_FORM_RPC",
});
if (isErrorResponse(rpcResponse)) {
setErrorMessage(rpcResponse.error);
} else if (isActionMessage(rpcResponse)) {
} else {
applyAction(rpcResponse.action);
}
}, [applyAction, dataSource]);
Expand Down
10 changes: 9 additions & 1 deletion vuu-ui/packages/vuu-data-remote/next/test/MockDataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
VuuGroupBy,
VuuMenu,
VuuRange,
VuuRpcEditError,
VuuRpcRequest,
VuuRpcResponse,
VuuTable,
Expand Down Expand Up @@ -103,6 +104,13 @@ class MockDataSourceImpl extends BaseDataSource implements DataSource {
closeTreeNode(keyOrIndex: string | number, cascade?: boolean) {
console.log(`[MockDataSource] closeTree ${keyOrIndex} ${cascade}`);
}
async editRpcCall(rpcRequest: Omit<VuuRpcRequest, "vpId">) {
console.log(`editRpcCall ${JSON.stringify(rpcRequest)}`);
return {
error: "Either viewport or server is undefined",
type: "VP_EDIT_RPC_REJECT",
} as VuuRpcEditError;
}
async menuRpcCall(rpcRequest: Omit<VuuRpcRequest, "vpId">) {
console.log(`menuRpcCall ${JSON.stringify(rpcRequest)}`);
}
Expand All @@ -121,7 +129,7 @@ class MockDataSourceImpl extends BaseDataSource implements DataSource {
};

selectedRowsCount = 0;
rpcCall?:
rpcRequest?:
| (<T extends VuuRpcResponse = VuuRpcResponse>(
rpcRequest: Omit<VuuRpcRequest, "vpId">,
) => Promise<T>)
Expand Down
14 changes: 7 additions & 7 deletions vuu-ui/packages/vuu-data-remote/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuu-ui/vuu-data-remote",
"version": "0.13.28",
"version": "0.13.29",
"main": "src/index.ts",
"author": "heswell",
"license": "Apache-2.0",
Expand All @@ -12,13 +12,13 @@
"type-defs": "node ../../scripts/build-type-defs.mjs"
},
"devDependencies": {
"@vuu-ui/vuu-data-types": "0.13.28",
"@vuu-ui/vuu-table-types": "0.13.28",
"@vuu-ui/vuu-filter-types": "0.13.28",
"@vuu-ui/vuu-protocol-types": "0.13.28"
"@vuu-ui/vuu-data-types": "0.13.29",
"@vuu-ui/vuu-table-types": "0.13.29",
"@vuu-ui/vuu-filter-types": "0.13.29",
"@vuu-ui/vuu-protocol-types": "0.13.29"
},
"dependencies": {
"@vuu-ui/vuu-filter-parser": "0.13.28",
"@vuu-ui/vuu-utils": "0.13.28"
"@vuu-ui/vuu-filter-parser": "0.13.29",
"@vuu-ui/vuu-utils": "0.13.29"
}
}
Loading
Loading