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.32",
"version": "0.13.33",
"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.32",
"@vuu-ui/vuu-utils": "0.13.33",
"@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.32",
"version": "0.13.33",
"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.32"
"@vuu-ui/vuu-table-types": "0.13.33"
},
"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.32",
"@vuu-ui/vuu-utils": "0.13.33",
"@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.32",
"version": "0.13.33",
"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.32",
"@vuu-ui/vuu-protocol-types": "0.13.32",
"@vuu-ui/vuu-table-types": "0.13.32"
"@vuu-ui/vuu-data-types": "0.13.33",
"@vuu-ui/vuu-protocol-types": "0.13.33",
"@vuu-ui/vuu-table-types": "0.13.33"
},
"dependencies": {
"@vuu-ui/vuu-utils": "0.13.32",
"@vuu-ui/vuu-utils": "0.13.33",
"@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.32",
"version": "0.13.33",
"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.32",
"@vuu-ui/vuu-table-types": "0.13.32",
"@vuu-ui/vuu-filter-types": "0.13.32",
"@vuu-ui/vuu-protocol-types": "0.13.32"
"@vuu-ui/vuu-data-types": "0.13.33",
"@vuu-ui/vuu-table-types": "0.13.33",
"@vuu-ui/vuu-filter-types": "0.13.33",
"@vuu-ui/vuu-protocol-types": "0.13.33"
},
"dependencies": {
"@vuu-ui/vuu-filter-parser": "0.13.32",
"@vuu-ui/vuu-utils": "0.13.32"
"@vuu-ui/vuu-filter-parser": "0.13.33",
"@vuu-ui/vuu-utils": "0.13.33"
},
"sideEffects": false
}
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.32",
"version": "0.13.33",
"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.32",
"@vuu-ui/vuu-filter-types": "0.13.32",
"@vuu-ui/vuu-popups": "0.13.32",
"@vuu-ui/vuu-protocol-types": "0.13.32",
"@vuu-ui/vuu-table-types": "0.13.32"
"@vuu-ui/vuu-data-types": "0.13.33",
"@vuu-ui/vuu-filter-types": "0.13.33",
"@vuu-ui/vuu-popups": "0.13.33",
"@vuu-ui/vuu-protocol-types": "0.13.33",
"@vuu-ui/vuu-table-types": "0.13.33"
},
"dependencies": {
"@vuu-ui/vuu-context-menu": "0.13.32",
"@vuu-ui/vuu-data-remote": "0.13.32",
"@vuu-ui/vuu-filter-parser": "0.13.32",
"@vuu-ui/vuu-layout": "0.13.32",
"@vuu-ui/vuu-popups": "0.13.32",
"@vuu-ui/vuu-ui-controls": "0.13.32",
"@vuu-ui/vuu-utils": "0.13.32",
"@vuu-ui/vuu-table": "0.13.32",
"@vuu-ui/vuu-context-menu": "0.13.33",
"@vuu-ui/vuu-data-remote": "0.13.33",
"@vuu-ui/vuu-filter-parser": "0.13.33",
"@vuu-ui/vuu-layout": "0.13.33",
"@vuu-ui/vuu-popups": "0.13.33",
"@vuu-ui/vuu-ui-controls": "0.13.33",
"@vuu-ui/vuu-utils": "0.13.33",
"@vuu-ui/vuu-table": "0.13.33",
"@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
@@ -1,5 +1,4 @@
import type { DataSource, DataValueDescriptor } from "@vuu-ui/vuu-data-types";
import { useDialogContext } from "@vuu-ui/vuu-popups";
import type { VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
import {
CommitHandler,
Expand Down Expand Up @@ -29,6 +28,7 @@ import {
FormEditState,
buildFormEditState,
} from "./form-edit-state";
import { useModal } from "@vuu-ui/vuu-ui-controls";

export interface EditFormHookProps {
dataSource?: DataSource;
Expand Down Expand Up @@ -118,7 +118,7 @@ export const useEditForm = ({
formFieldDescriptors,
onSubmit,
}: EditFormHookProps) => {
const { showDialog, closeDialog } = useDialogContext();
const { showDialog, closeDialog } = useModal();

const currentDataSource = useRef<DataSource>(undefined);
const formFieldsContainerRef = useRef<HTMLDivElement>(null);
Expand Down
37 changes: 35 additions & 2 deletions vuu-ui/packages/vuu-data-react/src/hooks/useVuuMenuActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
TableSchema,
} from "@vuu-ui/vuu-data-types";
import { getFilterPredicate } from "@vuu-ui/vuu-filter-parser";
import { useDialogContext, useNotifications } from "@vuu-ui/vuu-popups";
import { useNotifications } from "@vuu-ui/vuu-popups";
import type {
ClientToServerMenuCellRPC,
ClientToServerMenuRowRPC,
Expand All @@ -39,8 +39,10 @@ import type { ColumnDescriptor } from "@vuu-ui/vuu-table-types";
import {
ColumnMap,
dataSourceRowToDataRowDto,
getLayoutComponent,
hasShowNotificationAction,
isActionMessage,
isCustomComponentActionMessage,
isOpenBulkEditResponse,
isSessionTableActionMessage,
metadataKeys,
Expand All @@ -53,6 +55,7 @@ import {
FormFieldDescriptor,
SessionEditingForm,
} from "../session-editing-form";
import { useModal } from "@vuu-ui/vuu-ui-controls";

export interface VuuMenuActionHookResult {
menuBuilder: MenuBuilder<TableMenuLocation, TableContextMenuOptions>;
Expand Down Expand Up @@ -349,7 +352,7 @@ export const useVuuMenuActions = ({
[dataSource],
);

const { showDialog, closeDialog } = useDialogContext();
const { showDialog, closeDialog, showPrompt } = useModal();
const showNotification = useNotifications();

const showBulkEditDialog = useCallback(
Expand Down Expand Up @@ -380,6 +383,29 @@ export const useVuuMenuActions = ({
[VuuDataSource, closeDialog, showDialog],
);

const showCustomComponentInDialog = useCallback(
(componentId: string, ds: DataSource, table: VuuTable) => {
const sessionDs = new VuuDataSource({
columns: ds.columns,
table,
viewport: table.table,
});

const handleOpenChangePrompt = (open: boolean) => {
if (!open) {
ds.unsubscribe();
}
};

const Component = getLayoutComponent(componentId);
showPrompt(<Component dataSource={sessionDs} />, {
title: "Confirm operation on selected rows",
onOpenChange: handleOpenChangePrompt,
});
},
[VuuDataSource, showPrompt],
);

const showSessionEditingForm = useCallback(
(
ds: DataSource,
Expand Down Expand Up @@ -495,6 +521,12 @@ export const useVuuMenuActions = ({
);
} else if (isSessionTableActionMessage(rpcResponse)) {
showSessionEditingForm(dataSource, rpcResponse.action);
} else if (isCustomComponentActionMessage(rpcResponse)) {
showCustomComponentInDialog(
rpcResponse.action.renderComponent,
dataSource,
rpcResponse.action.table,
);
}
}
}
Expand All @@ -518,6 +550,7 @@ export const useVuuMenuActions = ({
dataSource,
onRpcResponse,
showBulkEditDialog,
showCustomComponentInDialog,
showNotification,
showSessionEditingForm,
],
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.32",
"version": "0.13.33",
"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.32",
"@vuu-ui/vuu-table-types": "0.13.32",
"@vuu-ui/vuu-filter-types": "0.13.32",
"@vuu-ui/vuu-protocol-types": "0.13.32"
"@vuu-ui/vuu-data-types": "0.13.33",
"@vuu-ui/vuu-table-types": "0.13.33",
"@vuu-ui/vuu-filter-types": "0.13.33",
"@vuu-ui/vuu-protocol-types": "0.13.33"
},
"dependencies": {
"@vuu-ui/vuu-filter-parser": "0.13.32",
"@vuu-ui/vuu-utils": "0.13.32"
"@vuu-ui/vuu-filter-parser": "0.13.33",
"@vuu-ui/vuu-utils": "0.13.33"
}
}
12 changes: 11 additions & 1 deletion vuu-ui/packages/vuu-data-remote/src/WebSocketConnection.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { WebSocketProtocol } from "@vuu-ui/vuu-data-types";
import { VuuClientMessage, VuuServerMessage } from "@vuu-ui/vuu-protocol-types";
import { DeferredPromise, EventEmitter } from "@vuu-ui/vuu-utils";
import { DeferredPromise, EventEmitter, logger } from "@vuu-ui/vuu-utils";

export type ConnectingStatus = "connecting" | "reconnecting";
export type ConnectedStatus = "connected" | "reconnected";
Expand All @@ -27,6 +27,8 @@ export interface WebSocketConnectionState<
connectionStatus: T;
}

const { info } = logger("WebSocketConnection");

const isNotConnecting = (
connectionState: WebSocketConnectionState<InternalConnectionStatus>,
): connectionState is WebSocketConnectionState<ConnectionStatus> =>
Expand Down Expand Up @@ -312,10 +314,18 @@ export class WebSocketConnection extends EventEmitter<WebSocketConnectionEvents>

private receive = (evt: MessageEvent) => {
const vuuMessageFromServer = parseWebSocketMessage(evt.data);
if (vuuMessageFromServer.body.type === "CHANGE_VP_RANGE_SUCCESS") {
info?.(`CHANGE_VP_RANGE_SUCCESS<#${vuuMessageFromServer.requestId}>`);
}
this.#callback(vuuMessageFromServer);
};

send = (msg: VuuClientMessage) => {
if (msg.body.type === "CHANGE_VP_RANGE") {
info?.(
`CHANGE_VP_RANGE<#${msg.requestId}> ${msg.body.from}-${msg.body.to}`,
);
}
this.#ws?.send(JSON.stringify(msg));
};

Expand Down
7 changes: 2 additions & 5 deletions vuu-ui/packages/vuu-data-remote/src/server-proxy/viewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,7 @@ export class Viewport {
}
infoEnabled &&
info(
`(bufferSize ${this.bufferSize}) rangeRequest (${range.from}:${range.to})
current: window client (${this.dataWindow.clientRange.from}:${this.dataWindow.clientRange.to}), full (${this.dataWindow.range.from}:${this.dataWindow.range.to}) `,
`(bufferSize ${this.bufferSize}) rangeRequest (${range.from}:${range.to}) current: window client (${this.dataWindow.clientRange.from}:${this.dataWindow.clientRange.to}), full (${this.dataWindow.range.from}:${this.dataWindow.range.to}) `,
);

// If we can satisfy the range request from the buffer, we will.
Expand All @@ -471,9 +470,7 @@ export class Viewport {
);
infoEnabled &&
info(
`updated: window client (${this.dataWindow.clientRange.from}:${this.dataWindow.clientRange.to}), full (${this.dataWindow.range.from}:${this.dataWindow.range.to})
serverDataRequired ${serverDataRequired ? "Y" : "N"}
${clientRows.length} rows returned from local buffer`,
`updated: dataWindow clientRange (${this.dataWindow.clientRange.from}:${this.dataWindow.clientRange.to}), fullRange (${this.dataWindow.range.from}:${this.dataWindow.range.to}) serverDataRequired ${serverDataRequired ? "Y" : "N"} ${clientRows.length} rows returned from local buffer`,
);
// console.log(
// `[Viewport] updated: window client (${this.dataWindow.clientRange.from}:${this.dataWindow.clientRange.to}), full (${this.dataWindow.range.from}:${this.dataWindow.range.to})
Expand Down
12 changes: 6 additions & 6 deletions vuu-ui/packages/vuu-data-test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuu-ui/vuu-data-test",
"version": "0.13.32",
"version": "0.13.33",
"main": "src/index.ts",
"author": "heswell",
"license": "Apache-2.0",
Expand All @@ -10,13 +10,13 @@
"type-defs": "node ../../scripts/build-type-defs.mjs"
},
"dependencies": {
"@vuu-ui/vuu-data-local": "0.13.32",
"@vuu-ui/vuu-utils": "0.13.32"
"@vuu-ui/vuu-data-local": "0.13.33",
"@vuu-ui/vuu-utils": "0.13.33"
},
"devDependencies": {
"@vuu-ui/vuu-protocol-types": "0.13.32",
"@vuu-ui/vuu-data-types": "0.13.32",
"@vuu-ui/vuu-table-types": "0.13.32"
"@vuu-ui/vuu-protocol-types": "0.13.33",
"@vuu-ui/vuu-data-types": "0.13.33",
"@vuu-ui/vuu-table-types": "0.13.33"
},
"sideEffects": false
}
6 changes: 3 additions & 3 deletions vuu-ui/packages/vuu-data-types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vuu-ui/vuu-data-types",
"version": "0.13.32",
"version": "0.13.33",
"main": "",
"scripts": {
"build": "node ../../scripts/run-build-typelib.mjs"
Expand All @@ -9,8 +9,8 @@
"author": "heswell",
"license": "Apache-2.0",
"devDependencies": {
"@vuu-ui/vuu-filter-types": "0.13.32",
"@vuu-ui/vuu-protocol-types": "0.13.32"
"@vuu-ui/vuu-filter-types": "0.13.33",
"@vuu-ui/vuu-protocol-types": "0.13.33"
},
"dependencies": {},
"peerDependencies": {}
Expand Down
Loading
Loading