Skip to content
Open
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
436 changes: 218 additions & 218 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.113",
"version": "0.13.114",
"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.113",
"@vuu-ui/vuu-utils": "0.13.114",
"@salt-ds/core": "1.54.1",
"@salt-ds/lab": "1.0.0-alpha.83",
"@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.113",
"version": "0.13.114",
"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.113"
"@vuu-ui/vuu-table-types": "0.13.114"
},
"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.113",
"@vuu-ui/vuu-utils": "0.13.114",
"@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.113",
"version": "0.13.114",
"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.113",
"@vuu-ui/vuu-protocol-types": "0.13.113",
"@vuu-ui/vuu-table-types": "0.13.113"
"@vuu-ui/vuu-data-types": "0.13.114",
"@vuu-ui/vuu-protocol-types": "0.13.114",
"@vuu-ui/vuu-table-types": "0.13.114"
},
"dependencies": {
"@vuu-ui/vuu-utils": "0.13.113",
"@vuu-ui/vuu-utils": "0.13.114",
"@salt-ds/core": "1.54.1",
"@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.113",
"version": "0.13.114",
"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.113",
"@vuu-ui/vuu-table-types": "0.13.113",
"@vuu-ui/vuu-filter-types": "0.13.113",
"@vuu-ui/vuu-protocol-types": "0.13.113"
"@vuu-ui/vuu-data-types": "0.13.114",
"@vuu-ui/vuu-table-types": "0.13.114",
"@vuu-ui/vuu-filter-types": "0.13.114",
"@vuu-ui/vuu-protocol-types": "0.13.114"
},
"dependencies": {
"@vuu-ui/vuu-filter-parser": "0.13.113",
"@vuu-ui/vuu-utils": "0.13.113"
"@vuu-ui/vuu-filter-parser": "0.13.114",
"@vuu-ui/vuu-utils": "0.13.114"
},
"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.113",
"version": "0.13.114",
"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.113",
"@vuu-ui/vuu-filter-types": "0.13.113",
"@vuu-ui/vuu-protocol-types": "0.13.113",
"@vuu-ui/vuu-table-types": "0.13.113"
"@vuu-ui/vuu-data-types": "0.13.114",
"@vuu-ui/vuu-filter-types": "0.13.114",
"@vuu-ui/vuu-protocol-types": "0.13.114",
"@vuu-ui/vuu-table-types": "0.13.114"
},
"dependencies": {
"@vuu-ui/vuu-context-menu": "0.13.113",
"@vuu-ui/vuu-data-remote": "0.13.113",
"@vuu-ui/vuu-filter-parser": "0.13.113",
"@vuu-ui/vuu-filters": "0.13.113",
"@vuu-ui/vuu-layout": "0.13.113",
"@vuu-ui/vuu-notifications": "0.13.113",
"@vuu-ui/vuu-ui-controls": "0.13.113",
"@vuu-ui/vuu-utils": "0.13.113",
"@vuu-ui/vuu-table": "0.13.113",
"@vuu-ui/vuu-context-menu": "0.13.114",
"@vuu-ui/vuu-data-remote": "0.13.114",
"@vuu-ui/vuu-filter-parser": "0.13.114",
"@vuu-ui/vuu-filters": "0.13.114",
"@vuu-ui/vuu-layout": "0.13.114",
"@vuu-ui/vuu-notifications": "0.13.114",
"@vuu-ui/vuu-ui-controls": "0.13.114",
"@vuu-ui/vuu-utils": "0.13.114",
"@vuu-ui/vuu-table": "0.13.114",
"@salt-ds/core": "1.54.1",
"@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 @@ -25,10 +25,6 @@ export const useSessionDataSource = (props?: SessionStateHookProps) => {
) => {
let ds = sessionState.get(sessionKey);
if (ds) {
if (ds.range.from > 0) {
// UI does not currently restore scroll position, so always reset to top of dataset
ds.range = ds.range.reset;
}
return ds;
}

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.113",
"version": "0.13.114",
"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.113",
"@vuu-ui/vuu-table-types": "0.13.113",
"@vuu-ui/vuu-filter-types": "0.13.113",
"@vuu-ui/vuu-protocol-types": "0.13.113"
"@vuu-ui/vuu-data-types": "0.13.114",
"@vuu-ui/vuu-table-types": "0.13.114",
"@vuu-ui/vuu-filter-types": "0.13.114",
"@vuu-ui/vuu-protocol-types": "0.13.114"
},
"dependencies": {
"@vuu-ui/vuu-filter-parser": "0.13.113",
"@vuu-ui/vuu-utils": "0.13.113"
"@vuu-ui/vuu-filter-parser": "0.13.114",
"@vuu-ui/vuu-utils": "0.13.114"
}
}
10 changes: 10 additions & 0 deletions vuu-ui/packages/vuu-data-remote/src/ConnectionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@ class ConnectionManager extends EventEmitter<ConnectionEvents> {
}
}

disableActiveSubscriptions() {
console.log(`[ConnectionManager] disableActiveSubscriptions`);
this.#worker.send({ type: "disable-all-active" });
}

enableActiveSubscriptions() {
console.log(`[ConnectionManager] enableActiveSubscriptions`);
this.#worker.send({ type: "enable-all-active" });
}

private handleMessageFromWorker = (
message: VuuUIMessageIn | DataSourceCallbackMessage | ConnectionStatus,
) => {
Expand Down
14 changes: 12 additions & 2 deletions vuu-ui/packages/vuu-data-remote/src/VuuDataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,11 @@ export class VuuDataSource extends BaseDataSource implements DataSource {
const { viewport = this.viewport || (this.viewport = uuid()) } =
subscribeProps;

if (this.#status === "disabled" || this.#status === "disabling") {
if (
this.#status === "disabled" ||
this.#status === "disabling" ||
this.#status === "enabling"
) {
// We can subscribe to a disabled dataSource. No request will be
// sent to server to create a new VP, just to enable the existing one.
// The current subscribing client becomes the subscription owner
Expand Down Expand Up @@ -181,7 +185,8 @@ export class VuuDataSource extends BaseDataSource implements DataSource {
} else if (message.type === "disabled") {
this.#status = "disabled";
} else if (message.type === "enabled") {
this.#status = "enabled";
this.#status = "subscribed";
this.emit("enabled", this.viewport);
} else if (isDataSourceConfigMessage(message)) {
// This is an ACK for a CHANGE_VP message. Nothing to do here. We need
// to wait for data to be returned before we can consider the change
Expand Down Expand Up @@ -248,6 +253,9 @@ export class VuuDataSource extends BaseDataSource implements DataSource {
escalateToDisable = this._defaultSuspenseProps.escalateToDisable,
escalateDelay = this._defaultSuspenseProps.escalateDelay,
) {
console.log(
`[VuuDataSuurce] suspend, current status ${this.#status}, escalateToDisable ? ${escalateToDisable}`,
);
if (this.#status !== "unsubscribed") {
info?.(`suspend #${this.viewport}, current status ${this.#status}`);
if (this.viewport) {
Expand All @@ -264,6 +272,7 @@ export class VuuDataSource extends BaseDataSource implements DataSource {
}

resume(callback?: DataSourceSubscribeCallback) {
console.log(`[VuuDataSuurce] resume, current status ${this.#status}`);
const isDisabled = this.#status.startsWith("disabl");
const isSuspended = this.#status === "suspended";
info?.(`resume #${this.viewport}, current status ${this.#status}`);
Expand Down Expand Up @@ -334,6 +343,7 @@ export class VuuDataSource extends BaseDataSource implements DataSource {
viewport: this.viewport,
type: "enable",
});
// TODO is this a bit premature ?
this.emit("enabled", this.viewport);
}
}
Expand Down
25 changes: 23 additions & 2 deletions vuu-ui/packages/vuu-data-remote/src/server-proxy/server-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,26 @@ export class ServerProxy {
this.sendMessageToServer(request, requestId);
}

private disableViewport(viewport: Viewport) {
private disableAllActiveViewports() {
console.log(`[ServerProxy] disableAllActiveViewports`);
this.viewports.forEach((vp) => {
if (isActiveViewport(vp)) {
this.disableViewport(vp, true);
}
});
}

private enableAllActiveViewports() {
this.viewports.forEach((vp) => {
if (vp.disabledActive) {
this.enableViewport(vp);
}
});
}

private disableViewport(viewport: Viewport, disableActive = false) {
const requestId = nextRequestId();
const request = viewport.disable(requestId);
const request = viewport.disable(requestId, disableActive);
this.sendIfReady(request, requestId, viewport.status === "subscribed");
}

Expand Down Expand Up @@ -759,6 +776,10 @@ export class ServerProxy {
return this.menuRpcCall(message as WithRequestId<VuuRpcMenuRequest>);
} else if (message.type === "disconnect") {
return this.disconnect();
} else if (message.type === "disable-all-active") {
return this.disableAllActiveViewports();
} else if (message.type === "enable-all-active") {
return this.enableAllActiveViewports();
} else {
const { type, requestId } = message;
switch (type) {
Expand Down
12 changes: 10 additions & 2 deletions vuu-ui/packages/vuu-data-remote/src/server-proxy/viewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const { debug, debugEnabled, error, info, infoEnabled, warn } =

interface Disable {
type: "disable";
disableActive: boolean;
}
interface Enable {
type: "enable";
Expand Down Expand Up @@ -169,6 +170,11 @@ export class Viewport {

public clientViewportId: string;
public disabled = false;
/**
* disabledActive is a state assigned when all active viewports are disabled, used
* when browser window is hidden or minimised.
*/
public disabledActive = false;
public frozen = false;
public isTree = false;
public links?: LinkDescriptorWithLabel[];
Expand Down Expand Up @@ -406,12 +412,14 @@ export class Viewport {
} else if (type === "disable") {
this.suspended = false;
this.disabled = true; // assuming its _SUCCESS, of course
this.disabledActive = pendingOperation.disableActive;
return {
type: "disabled",
clientViewportId,
} as DataSourceDisabledMessage;
} else if (type === "enable") {
this.disabled = false;
this.disabledActive = false;
return {
type: "enabled",
clientViewportId,
Expand Down Expand Up @@ -661,8 +669,8 @@ export class Viewport {
} as VuuViewportEnableRequest;
}

disable(requestId: string) {
this.awaitOperation(requestId, { type: "disable" });
disable(requestId: string, disableActive = false) {
this.awaitOperation(requestId, { type: "disable", disableActive });
info?.(`disable: ${this.serverViewportId}`);
return {
type: Message.DISABLE_VP,
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.113",
"version": "0.13.114",
"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.113",
"@vuu-ui/vuu-utils": "0.13.113"
"@vuu-ui/vuu-data-local": "0.13.114",
"@vuu-ui/vuu-utils": "0.13.114"
},
"devDependencies": {
"@vuu-ui/vuu-protocol-types": "0.13.113",
"@vuu-ui/vuu-data-types": "0.13.113",
"@vuu-ui/vuu-table-types": "0.13.113"
"@vuu-ui/vuu-protocol-types": "0.13.114",
"@vuu-ui/vuu-data-types": "0.13.114",
"@vuu-ui/vuu-table-types": "0.13.114"
},
"sideEffects": false
}
Loading
Loading