diff --git a/vuu-ui/package-lock.json b/vuu-ui/package-lock.json index 90e1a0638..760be9541 100644 --- a/vuu-ui/package-lock.json +++ b/vuu-ui/package-lock.json @@ -12840,14 +12840,14 @@ }, "packages/grid-layout": { "name": "@heswell/grid-layout", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@salt-ds/core": "1.54.1", "@salt-ds/lab": "1.0.0-alpha.83", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-utils": "0.13.114" }, "peerDependencies": { "clsx": "^2.0.0", @@ -12857,7 +12857,7 @@ }, "packages/vuu-codemirror": { "name": "@vuu-ui/vuu-codemirror", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@codemirror/autocomplete": "^6.4.2", @@ -12867,26 +12867,26 @@ "@codemirror/view": "^6.9.3", "@lezer/common": "1.2.3", "@lezer/highlight": "^1.1.3", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-utils": "0.13.114" }, "devDependencies": { - "@vuu-ui/vuu-table-types": "0.13.113" + "@vuu-ui/vuu-table-types": "0.13.114" } }, "packages/vuu-context-menu": { "name": "@vuu-ui/vuu-context-menu", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@salt-ds/core": "1.54.1", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-utils": "0.13.114" }, "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" }, "peerDependencies": { "clsx": "^2.0.0", @@ -12896,42 +12896,42 @@ }, "packages/vuu-data-local": { "name": "@vuu-ui/vuu-data-local", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "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" }, "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" } }, "packages/vuu-data-react": { "name": "@vuu-ui/vuu-data-react", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@salt-ds/core": "1.54.1", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@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-table": "0.13.113", - "@vuu-ui/vuu-ui-controls": "0.13.113", - "@vuu-ui/vuu-utils": "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-table": "0.13.114", + "@vuu-ui/vuu-ui-controls": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114" }, "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" }, "peerDependencies": { "clsx": "^2.0.0", @@ -12941,60 +12941,60 @@ }, "packages/vuu-data-remote": { "name": "@vuu-ui/vuu-data-remote", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "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" }, "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" } }, "packages/vuu-data-test": { "name": "@vuu-ui/vuu-data-test", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "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-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" } }, "packages/vuu-data-types": { "name": "@vuu-ui/vuu-data-types", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "devDependencies": { - "@vuu-ui/vuu-filter-types": "0.13.113", - "@vuu-ui/vuu-protocol-types": "0.13.113" + "@vuu-ui/vuu-filter-types": "0.13.114", + "@vuu-ui/vuu-protocol-types": "0.13.114" } }, "packages/vuu-datatable": { "name": "@vuu-ui/vuu-datatable", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@salt-ds/core": "1.54.1", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@vuu-ui/vuu-data-local": "0.13.113", - "@vuu-ui/vuu-filters": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-shell": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-table-extras": "0.13.113", - "@vuu-ui/vuu-table-types": "0.13.113", - "@vuu-ui/vuu-ui-controls": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-data-local": "0.13.114", + "@vuu-ui/vuu-filters": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-shell": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-table-extras": "0.13.114", + "@vuu-ui/vuu-table-types": "0.13.114", + "@vuu-ui/vuu-ui-controls": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114" }, "peerDependencies": { "clsx": "^2.0.0", @@ -13004,43 +13004,43 @@ }, "packages/vuu-filter-parser": { "name": "@vuu-ui/vuu-filter-parser", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@lezer/common": "^1.0.2", "@lezer/lr": "1.4.2", - "@vuu-ui/vuu-data-types": "0.13.113", - "@vuu-ui/vuu-filter-types": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-data-types": "0.13.114", + "@vuu-ui/vuu-filter-types": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114" } }, "packages/vuu-filter-types": { "name": "@vuu-ui/vuu-filter-types", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0" }, "packages/vuu-filters": { "name": "@vuu-ui/vuu-filters", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@salt-ds/core": "1.54.1", "@salt-ds/lab": "1.0.0-alpha.83", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@vuu-ui/vuu-context-menu": "0.13.113", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-filter-parser": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-ui-controls": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-context-menu": "0.13.114", + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-filter-parser": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-ui-controls": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114" }, "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" }, "peerDependencies": { "@internationalized/date": "^3.0.0", @@ -13051,7 +13051,7 @@ }, "packages/vuu-icons": { "name": "@vuu-ui/vuu-icons", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "peerDependencies": { "react": "^19.2.3", @@ -13060,23 +13060,23 @@ }, "packages/vuu-layout": { "name": "@vuu-ui/vuu-layout", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@salt-ds/core": "1.54.1", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-datatable": "0.13.113", - "@vuu-ui/vuu-filters": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-ui-controls": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-datatable": "0.13.114", + "@vuu-ui/vuu-filters": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-ui-controls": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114" }, "devDependencies": { - "@vuu-ui/vuu-data-types": "0.13.113", - "@vuu-ui/vuu-filter-types": "0.13.113" + "@vuu-ui/vuu-data-types": "0.13.114", + "@vuu-ui/vuu-filter-types": "0.13.114" }, "peerDependencies": { "clsx": "^2.0.0", @@ -13086,13 +13086,13 @@ }, "packages/vuu-notifications": { "name": "@vuu-ui/vuu-notifications", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@salt-ds/core": "1.54.1", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-utils": "0.13.114" }, "peerDependencies": { "clsx": "^2.0.0", @@ -13102,17 +13102,17 @@ }, "packages/vuu-popups": { "name": "@vuu-ui/vuu-popups", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@salt-ds/core": "1.54.1", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@vuu-ui/vuu-context-menu": "0.13.113", - "@vuu-ui/vuu-data-types": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-ui-controls": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-context-menu": "0.13.114", + "@vuu-ui/vuu-data-types": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-ui-controls": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114" }, "peerDependencies": { "clsx": "^2.0.0", @@ -13122,32 +13122,32 @@ }, "packages/vuu-protocol-types": { "name": "@vuu-ui/vuu-protocol-types", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0" }, "packages/vuu-shell": { "name": "@vuu-ui/vuu-shell", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@salt-ds/core": "1.54.1", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@vuu-ui/vuu-context-menu": "0.13.113", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-data-remote": "0.13.113", - "@vuu-ui/vuu-icons": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-notifications": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-ui-controls": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113", + "@vuu-ui/vuu-context-menu": "0.13.114", + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-data-remote": "0.13.114", + "@vuu-ui/vuu-icons": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-notifications": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-ui-controls": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114", "html-to-image": "^1.11.11" }, "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" }, "peerDependencies": { "clsx": "^2.0.0", @@ -13157,23 +13157,23 @@ }, "packages/vuu-table": { "name": "@vuu-ui/vuu-table", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@salt-ds/core": "1.54.1", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@vuu-ui/vuu-context-menu": "0.13.113", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-table-extras": "0.13.113", - "@vuu-ui/vuu-ui-controls": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-context-menu": "0.13.114", + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-table-extras": "0.13.114", + "@vuu-ui/vuu-ui-controls": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114" }, "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" }, "peerDependencies": { "clsx": "^2.0.0", @@ -13183,25 +13183,25 @@ }, "packages/vuu-table-extras": { "name": "@vuu-ui/vuu-table-extras", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@lezer/lr": "1.4.2", "@salt-ds/core": "1.54.1", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@vuu-ui/vuu-codemirror": "0.13.113", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-data-types": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-table-types": "0.13.113", - "@vuu-ui/vuu-ui-controls": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-codemirror": "0.13.114", + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-data-types": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-table-types": "0.13.114", + "@vuu-ui/vuu-ui-controls": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114" }, "devDependencies": { - "@vuu-ui/vuu-filter-types": "0.13.113", - "@vuu-ui/vuu-protocol-types": "0.13.113" + "@vuu-ui/vuu-filter-types": "0.13.114", + "@vuu-ui/vuu-protocol-types": "0.13.114" }, "peerDependencies": { "@floating-ui/react": "^0.26.28", @@ -13212,17 +13212,17 @@ }, "packages/vuu-table-types": { "name": "@vuu-ui/vuu-table-types", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "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-data-types": "0.13.114", + "@vuu-ui/vuu-filter-types": "0.13.114", + "@vuu-ui/vuu-protocol-types": "0.13.114" } }, "packages/vuu-theme": { "name": "@vuu-ui/vuu-theme", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0" }, "packages/vuu-theme-deprecated": { @@ -13232,25 +13232,25 @@ }, "packages/vuu-ui-controls": { "name": "@vuu-ui/vuu-ui-controls", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@salt-ds/core": "1.54.1", "@salt-ds/icons": "1.16.0", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@vuu-ui/vuu-context-menu": "0.13.113", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113", + "@vuu-ui/vuu-context-menu": "0.13.114", + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114", "tabbable": "^6.0.0" }, "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" }, "peerDependencies": { "@floating-ui/react": "^0.26.28", @@ -13262,36 +13262,36 @@ }, "packages/vuu-utils": { "name": "@vuu-ui/vuu-utils", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "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" }, "peerDependencies": { "@internationalized/date": "^3.0.0", - "@vuu-ui/vuu-filter-parser": "0.13.113", + "@vuu-ui/vuu-filter-parser": "0.13.114", "clsx": "^2.0.0", "react": "^19.2.3", "react-dom": "^19.2.3" } }, "sample-apps/app-vuu-example": { - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@fontsource/open-sans": "^4.5.13", "@salt-ds/core": "1.54.1", - "@vuu-ui/vuu-data-local": "0.13.113", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-data-remote": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-shell": "0.13.113", - "@vuu-ui/vuu-table-types": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113", + "@vuu-ui/vuu-data-local": "0.13.114", + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-data-remote": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-shell": "0.13.114", + "@vuu-ui/vuu-table-types": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114", "clsx": "^2.0.0", "react": "^19.2.3", "react-dom": "^19.2.3" @@ -13302,26 +13302,26 @@ } }, "sample-apps/feature-basket-trading": { - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@salt-ds/core": "1.54.1", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-data-remote": "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-shell": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-table-extras": "0.13.113", - "@vuu-ui/vuu-theme": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-data-remote": "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-shell": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-table-extras": "0.13.114", + "@vuu-ui/vuu-theme": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114" }, "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" }, "engines": { "node": ">=16.0.0" @@ -13334,24 +13334,24 @@ }, "sample-apps/feature-filter-table": { "name": "feature-vuu-filter-table", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@salt-ds/core": "1.54.1", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-data-remote": "0.13.113", - "@vuu-ui/vuu-datatable": "0.13.113", - "@vuu-ui/vuu-filter-types": "0.13.113", - "@vuu-ui/vuu-filters": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-protocol-types": "0.13.113", - "@vuu-ui/vuu-shell": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-table-extras": "0.13.113", - "@vuu-ui/vuu-table-types": "0.13.113", - "@vuu-ui/vuu-theme": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-data-remote": "0.13.114", + "@vuu-ui/vuu-datatable": "0.13.114", + "@vuu-ui/vuu-filter-types": "0.13.114", + "@vuu-ui/vuu-filters": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-protocol-types": "0.13.114", + "@vuu-ui/vuu-shell": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-table-extras": "0.13.114", + "@vuu-ui/vuu-table-types": "0.13.114", + "@vuu-ui/vuu-theme": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114" }, "devDependencies": {}, "engines": { @@ -13365,23 +13365,23 @@ }, "sample-apps/feature-instrument-tiles": { "name": "feature-vuu-instrument-tiles", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@salt-ds/core": "1.54.1", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-data-remote": "0.13.113", - "@vuu-ui/vuu-filter-types": "0.13.113", - "@vuu-ui/vuu-filters": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-protocol-types": "0.13.113", - "@vuu-ui/vuu-shell": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-table-extras": "0.13.113", - "@vuu-ui/vuu-table-types": "0.13.113", - "@vuu-ui/vuu-theme": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-data-remote": "0.13.114", + "@vuu-ui/vuu-filter-types": "0.13.114", + "@vuu-ui/vuu-filters": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-protocol-types": "0.13.114", + "@vuu-ui/vuu-shell": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-table-extras": "0.13.114", + "@vuu-ui/vuu-table-types": "0.13.114", + "@vuu-ui/vuu-theme": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114" }, "devDependencies": {}, "engines": { @@ -13394,16 +13394,16 @@ } }, "sample-apps/standalone-table": { - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "dependencies": { "@fontsource/open-sans": "^4.5.13", - "@vuu-ui/vuu-icons": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-shell": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-theme": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113", + "@vuu-ui/vuu-icons": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-shell": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-theme": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114", "clsx": "^2.0.0", "react": "^19.2.3", "react-dom": "^19.2.3" @@ -13430,12 +13430,12 @@ "@fontsource/open-sans": "^4.5.13", "@salt-ds/core": "1.54.1", "@salt-ds/theme": "1.37.0", - "@vuu-ui/vuu-datatable": "0.13.113", - "@vuu-ui/vuu-icons": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-theme": "0.13.113", - "@vuu-ui/vuu-ui-controls": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113", + "@vuu-ui/vuu-datatable": "0.13.114", + "@vuu-ui/vuu-icons": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-theme": "0.13.114", + "@vuu-ui/vuu-ui-controls": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114", "symlink-dir": "^6.0.5", "watcher": "2.3.1" }, @@ -13445,8 +13445,8 @@ "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^15.2.3", "@types/serve-handler": "6.1.4", - "@vuu-ui/vuu-data-types": "0.13.113", - "@vuu-ui/vuu-table-types": "0.13.113", + "@vuu-ui/vuu-data-types": "0.13.114", + "@vuu-ui/vuu-table-types": "0.13.114", "default-browser": "^5.2.1", "is-inside-container": "^1.0.0", "open": "10.1.0", diff --git a/vuu-ui/packages/grid-layout/package.json b/vuu-ui/packages/grid-layout/package.json index 14ba0efe3..f3c768635 100644 --- a/vuu-ui/packages/grid-layout/package.json +++ b/vuu-ui/packages/grid-layout/package.json @@ -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", @@ -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", diff --git a/vuu-ui/packages/vuu-codemirror/package.json b/vuu-ui/packages/vuu-codemirror/package.json index efa9e0243..0cdf0f9f6 100644 --- a/vuu-ui/packages/vuu-codemirror/package.json +++ b/vuu-ui/packages/vuu-codemirror/package.json @@ -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", @@ -11,7 +11,7 @@ "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", @@ -19,7 +19,7 @@ "@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" }, diff --git a/vuu-ui/packages/vuu-context-menu/package.json b/vuu-ui/packages/vuu-context-menu/package.json index f359571c2..cc1749d29 100644 --- a/vuu-ui/packages/vuu-context-menu/package.json +++ b/vuu-ui/packages/vuu-context-menu/package.json @@ -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", @@ -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" diff --git a/vuu-ui/packages/vuu-data-local/package.json b/vuu-ui/packages/vuu-data-local/package.json index 8bc12a5cc..6e28a331b 100644 --- a/vuu-ui/packages/vuu-data-local/package.json +++ b/vuu-ui/packages/vuu-data-local/package.json @@ -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", @@ -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 } diff --git a/vuu-ui/packages/vuu-data-react/package.json b/vuu-ui/packages/vuu-data-react/package.json index b8327a5bf..6d3facf78 100644 --- a/vuu-ui/packages/vuu-data-react/package.json +++ b/vuu-ui/packages/vuu-data-react/package.json @@ -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", @@ -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" diff --git a/vuu-ui/packages/vuu-data-react/src/hooks/useSessionDataSource.ts b/vuu-ui/packages/vuu-data-react/src/hooks/useSessionDataSource.ts index 1b57b3b1f..f60940fd5 100644 --- a/vuu-ui/packages/vuu-data-react/src/hooks/useSessionDataSource.ts +++ b/vuu-ui/packages/vuu-data-react/src/hooks/useSessionDataSource.ts @@ -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; } diff --git a/vuu-ui/packages/vuu-data-remote/package.json b/vuu-ui/packages/vuu-data-remote/package.json index 063a98684..fadcc9bee 100644 --- a/vuu-ui/packages/vuu-data-remote/package.json +++ b/vuu-ui/packages/vuu-data-remote/package.json @@ -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", @@ -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" } } diff --git a/vuu-ui/packages/vuu-data-remote/src/ConnectionManager.ts b/vuu-ui/packages/vuu-data-remote/src/ConnectionManager.ts index 1cb0e91ad..262296520 100644 --- a/vuu-ui/packages/vuu-data-remote/src/ConnectionManager.ts +++ b/vuu-ui/packages/vuu-data-remote/src/ConnectionManager.ts @@ -108,6 +108,16 @@ class ConnectionManager extends EventEmitter { } } + 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, ) => { diff --git a/vuu-ui/packages/vuu-data-remote/src/VuuDataSource.ts b/vuu-ui/packages/vuu-data-remote/src/VuuDataSource.ts index 5fd5b056e..6ac65239c 100644 --- a/vuu-ui/packages/vuu-data-remote/src/VuuDataSource.ts +++ b/vuu-ui/packages/vuu-data-remote/src/VuuDataSource.ts @@ -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 @@ -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 @@ -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) { @@ -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}`); @@ -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); } } diff --git a/vuu-ui/packages/vuu-data-remote/src/server-proxy/server-proxy.ts b/vuu-ui/packages/vuu-data-remote/src/server-proxy/server-proxy.ts index d275c65ed..512efede6 100644 --- a/vuu-ui/packages/vuu-data-remote/src/server-proxy/server-proxy.ts +++ b/vuu-ui/packages/vuu-data-remote/src/server-proxy/server-proxy.ts @@ -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"); } @@ -759,6 +776,10 @@ export class ServerProxy { return this.menuRpcCall(message as WithRequestId); } 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) { diff --git a/vuu-ui/packages/vuu-data-remote/src/server-proxy/viewport.ts b/vuu-ui/packages/vuu-data-remote/src/server-proxy/viewport.ts index ca3ad40e7..8663c3650 100644 --- a/vuu-ui/packages/vuu-data-remote/src/server-proxy/viewport.ts +++ b/vuu-ui/packages/vuu-data-remote/src/server-proxy/viewport.ts @@ -60,6 +60,7 @@ const { debug, debugEnabled, error, info, infoEnabled, warn } = interface Disable { type: "disable"; + disableActive: boolean; } interface Enable { type: "enable"; @@ -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[]; @@ -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, @@ -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, diff --git a/vuu-ui/packages/vuu-data-test/package.json b/vuu-ui/packages/vuu-data-test/package.json index be9b4f66e..bd5a31d63 100644 --- a/vuu-ui/packages/vuu-data-test/package.json +++ b/vuu-ui/packages/vuu-data-test/package.json @@ -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", @@ -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 } diff --git a/vuu-ui/packages/vuu-data-types/index.d.ts b/vuu-ui/packages/vuu-data-types/index.d.ts index 6d6d6a790..6d25b02c5 100644 --- a/vuu-ui/packages/vuu-data-types/index.d.ts +++ b/vuu-ui/packages/vuu-data-types/index.d.ts @@ -817,6 +817,14 @@ export interface VuuUIMessageOutUnsubscribe { type: "unsubscribe"; viewport: string; } + +export interface VuuUIMessageOutDisableAllActive { + type: "disable-all-active"; +} +export interface VuuUIMessageOutEnableAllActive { + type: "enable-all-active"; +} + export interface VuuUIMessageOutSuspend { /** * suspend is purely a client-side mechanism to avoid sending @@ -833,10 +841,6 @@ export interface VuuUIMessageOutSuspend { type: "suspend"; viewport: string; } -export interface VuuUIMessageOutResume { - type: "resume"; - viewport: string; -} export interface ViewportMessageOut { viewport: string; @@ -898,10 +902,6 @@ export interface VuuUIMessageOutSelectNone extends ViewportMessageOut { type: "selectNone"; } -export interface VuuUIMessageOutSuspend extends ViewportMessageOut { - type: "suspend"; -} - export interface VuuUIMessageOutConfig extends ViewportMessageOut { config: WithFullConfig; type: "config"; @@ -926,6 +926,8 @@ export declare type WithRequestId = T & { requestId: string }; export declare type VuuUIMessageOut = | VuuUIMessageOutConnect | VuuUIMessageOutDisconnect + | VuuUIMessageOutDisableAllActive + | VuuUIMessageOutEnableAllActive | VuuUIMessageOutSubscribe | VuuUIMessageOutUnsubscribe | VuuUIMessageOutViewport diff --git a/vuu-ui/packages/vuu-data-types/package.json b/vuu-ui/packages/vuu-data-types/package.json index 26e24537e..9adebb8cc 100644 --- a/vuu-ui/packages/vuu-data-types/package.json +++ b/vuu-ui/packages/vuu-data-types/package.json @@ -1,6 +1,6 @@ { "name": "@vuu-ui/vuu-data-types", - "version": "0.13.113", + "version": "0.13.114", "main": "", "scripts": { "build": "node ../../scripts/run-build-typelib.mjs" @@ -9,8 +9,8 @@ "author": "heswell", "license": "Apache-2.0", "devDependencies": { - "@vuu-ui/vuu-filter-types": "0.13.113", - "@vuu-ui/vuu-protocol-types": "0.13.113" + "@vuu-ui/vuu-filter-types": "0.13.114", + "@vuu-ui/vuu-protocol-types": "0.13.114" }, "dependencies": {}, "peerDependencies": {} diff --git a/vuu-ui/packages/vuu-datatable/package.json b/vuu-ui/packages/vuu-datatable/package.json index 6fa3eeade..e6f8d02cb 100644 --- a/vuu-ui/packages/vuu-datatable/package.json +++ b/vuu-ui/packages/vuu-datatable/package.json @@ -1,6 +1,6 @@ { "name": "@vuu-ui/vuu-datatable", - "version": "0.13.113", + "version": "0.13.114", "author": "heswell", "main": "src/index.ts", "license": "Apache-2.0", @@ -13,16 +13,16 @@ "@salt-ds/core": "1.54.1", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@vuu-ui/vuu-data-local": "0.13.113", - "@vuu-ui/vuu-table-types": "0.13.113", - "@vuu-ui/vuu-filters": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-shell": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-table-extras": "0.13.113", - "@vuu-ui/vuu-ui-controls": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-data-local": "0.13.114", + "@vuu-ui/vuu-table-types": "0.13.114", + "@vuu-ui/vuu-filters": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-shell": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-table-extras": "0.13.114", + "@vuu-ui/vuu-ui-controls": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114" }, "peerDependencies": { "clsx": "^2.0.0", diff --git a/vuu-ui/packages/vuu-filter-parser/package.json b/vuu-ui/packages/vuu-filter-parser/package.json index 54eb95885..f4d6de936 100644 --- a/vuu-ui/packages/vuu-filter-parser/package.json +++ b/vuu-ui/packages/vuu-filter-parser/package.json @@ -1,6 +1,6 @@ { "name": "@vuu-ui/vuu-filter-parser", - "version": "0.13.113", + "version": "0.13.114", "main": "src/index.ts", "author": "heswell", "license": "Apache-2.0", @@ -14,8 +14,8 @@ "dependencies": { "@lezer/common": "^1.0.2", "@lezer/lr": "1.4.2", - "@vuu-ui/vuu-data-types": "0.13.113", - "@vuu-ui/vuu-filter-types": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-data-types": "0.13.114", + "@vuu-ui/vuu-filter-types": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114" } } diff --git a/vuu-ui/packages/vuu-filter-types/package.json b/vuu-ui/packages/vuu-filter-types/package.json index acde5a3f2..845f4054e 100644 --- a/vuu-ui/packages/vuu-filter-types/package.json +++ b/vuu-ui/packages/vuu-filter-types/package.json @@ -1,6 +1,6 @@ { "name": "@vuu-ui/vuu-filter-types", - "version": "0.13.113", + "version": "0.13.114", "main": "", "scripts": { "build": "node ../../scripts/run-build-typelib.mjs" diff --git a/vuu-ui/packages/vuu-filters/package.json b/vuu-ui/packages/vuu-filters/package.json index 093cd5163..e5d9dd9a1 100644 --- a/vuu-ui/packages/vuu-filters/package.json +++ b/vuu-ui/packages/vuu-filters/package.json @@ -1,6 +1,6 @@ { "name": "@vuu-ui/vuu-filters", - "version": "0.13.113", + "version": "0.13.114", "main": "src/index.ts", "author": "heswell", "license": "Apache-2.0", @@ -11,19 +11,19 @@ "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-filter-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", + "@vuu-ui/vuu-filter-types": "0.13.114" }, "dependencies": { - "@vuu-ui/vuu-context-menu": "0.13.113", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-filter-parser": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-ui-controls": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113", + "@vuu-ui/vuu-context-menu": "0.13.114", + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-filter-parser": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-ui-controls": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@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", diff --git a/vuu-ui/packages/vuu-icons/package.json b/vuu-ui/packages/vuu-icons/package.json index 7a010253b..edcc8247f 100644 --- a/vuu-ui/packages/vuu-icons/package.json +++ b/vuu-ui/packages/vuu-icons/package.json @@ -1,6 +1,6 @@ { "name": "@vuu-ui/vuu-icons", - "version": "0.13.113", + "version": "0.13.114", "description": "css embedded svg icons plus icon components for Vuu", "main": "src/index.ts", "license": "Apache-2.0", diff --git a/vuu-ui/packages/vuu-layout/package.json b/vuu-ui/packages/vuu-layout/package.json index 751ef72ee..001a8f87b 100644 --- a/vuu-ui/packages/vuu-layout/package.json +++ b/vuu-ui/packages/vuu-layout/package.json @@ -1,6 +1,6 @@ { "name": "@vuu-ui/vuu-layout", - "version": "0.13.113", + "version": "0.13.114", "description": "VUU Layout Components", "main": "src/index.ts", "author": "heswell", @@ -12,20 +12,20 @@ }, "types": "src/index.ts", "devDependencies": { - "@vuu-ui/vuu-data-types": "0.13.113", - "@vuu-ui/vuu-filter-types": "0.13.113" + "@vuu-ui/vuu-data-types": "0.13.114", + "@vuu-ui/vuu-filter-types": "0.13.114" }, "dependencies": { "@salt-ds/core": "1.54.1", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-datatable": "0.13.113", - "@vuu-ui/vuu-filters": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-ui-controls": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-datatable": "0.13.114", + "@vuu-ui/vuu-filters": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-ui-controls": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114" }, "peerDependencies": { "clsx": "^2.0.0", diff --git a/vuu-ui/packages/vuu-notifications/package.json b/vuu-ui/packages/vuu-notifications/package.json index 58289d113..3915b1f44 100644 --- a/vuu-ui/packages/vuu-notifications/package.json +++ b/vuu-ui/packages/vuu-notifications/package.json @@ -1,6 +1,6 @@ { "name": "@vuu-ui/vuu-notifications", - "version": "0.13.113", + "version": "0.13.114", "description": "VUU notifications - Toast, WorkspaceNotification etc", "main": "src/index.ts", "author": "heswell", @@ -14,7 +14,7 @@ "@salt-ds/core": "1.54.1", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-utils": "0.13.114" }, "peerDependencies": { "clsx": "^2.0.0", diff --git a/vuu-ui/packages/vuu-popups/package.json b/vuu-ui/packages/vuu-popups/package.json index 4c3faa643..356fc1f9b 100644 --- a/vuu-ui/packages/vuu-popups/package.json +++ b/vuu-ui/packages/vuu-popups/package.json @@ -1,6 +1,6 @@ { "name": "@vuu-ui/vuu-popups", - "version": "0.13.113", + "version": "0.13.114", "description": "VUU popup components - Context Menu, Dialog etc", "main": "src/index.ts", "author": "heswell", @@ -14,11 +14,11 @@ "@salt-ds/core": "1.54.1", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@vuu-ui/vuu-context-menu": "0.13.113", - "@vuu-ui/vuu-data-types": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113", - "@vuu-ui/vuu-ui-controls": "0.13.113" + "@vuu-ui/vuu-context-menu": "0.13.114", + "@vuu-ui/vuu-data-types": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114", + "@vuu-ui/vuu-ui-controls": "0.13.114" }, "peerDependencies": { "clsx": "^2.0.0", diff --git a/vuu-ui/packages/vuu-protocol-types/package.json b/vuu-ui/packages/vuu-protocol-types/package.json index e2d101d8d..b875a9cd8 100644 --- a/vuu-ui/packages/vuu-protocol-types/package.json +++ b/vuu-ui/packages/vuu-protocol-types/package.json @@ -1,6 +1,6 @@ { "name": "@vuu-ui/vuu-protocol-types", - "version": "0.13.113", + "version": "0.13.114", "main": "", "scripts": { "build": "node ../../scripts/run-build-typelib.mjs" diff --git a/vuu-ui/packages/vuu-shell/package.json b/vuu-ui/packages/vuu-shell/package.json index 160ca43d5..9f9c901dc 100644 --- a/vuu-ui/packages/vuu-shell/package.json +++ b/vuu-ui/packages/vuu-shell/package.json @@ -1,6 +1,6 @@ { "name": "@vuu-ui/vuu-shell", - "version": "0.13.113", + "version": "0.13.114", "description": "VUU UI Shell", "main": "src/index.ts", "author": "heswell", @@ -11,23 +11,23 @@ "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": { "@salt-ds/core": "1.54.1", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@vuu-ui/vuu-context-menu": "0.13.113", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-data-remote": "0.13.113", - "@vuu-ui/vuu-icons": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-notifications": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-ui-controls": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113", + "@vuu-ui/vuu-context-menu": "0.13.114", + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-data-remote": "0.13.114", + "@vuu-ui/vuu-icons": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-notifications": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-ui-controls": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114", "html-to-image": "^1.11.11" }, "peerDependencies": { diff --git a/vuu-ui/packages/vuu-table-extras/package.json b/vuu-ui/packages/vuu-table-extras/package.json index ed4ee3ef0..243be7ecd 100644 --- a/vuu-ui/packages/vuu-table-extras/package.json +++ b/vuu-ui/packages/vuu-table-extras/package.json @@ -1,6 +1,6 @@ { "name": "@vuu-ui/vuu-table-extras", - "version": "0.13.113", + "version": "0.13.114", "author": "heswell", "main": "src/index.ts", "license": "Apache-2.0", @@ -11,18 +11,18 @@ "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-filter-types": "0.13.113", - "@vuu-ui/vuu-protocol-types": "0.13.113" + "@vuu-ui/vuu-filter-types": "0.13.114", + "@vuu-ui/vuu-protocol-types": "0.13.114" }, "dependencies": { - "@vuu-ui/vuu-codemirror": "0.13.113", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-data-types": "0.13.113", - "@vuu-ui/vuu-table-types": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113", - "@vuu-ui/vuu-ui-controls": "0.13.113", + "@vuu-ui/vuu-codemirror": "0.13.114", + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-data-types": "0.13.114", + "@vuu-ui/vuu-table-types": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114", + "@vuu-ui/vuu-ui-controls": "0.13.114", "@lezer/lr": "1.4.2", "@salt-ds/core": "1.54.1", "@salt-ds/styles": "0.2.1", diff --git a/vuu-ui/packages/vuu-table-types/package.json b/vuu-ui/packages/vuu-table-types/package.json index 4dace9f3f..f0bada000 100644 --- a/vuu-ui/packages/vuu-table-types/package.json +++ b/vuu-ui/packages/vuu-table-types/package.json @@ -1,15 +1,15 @@ { "name": "@vuu-ui/vuu-table-types", - "version": "0.13.113", + "version": "0.13.114", "main": "", "scripts": { "build": "node ../../scripts/run-build-typelib.mjs" }, "types": "index.d.ts", "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-data-types": "0.13.114", + "@vuu-ui/vuu-filter-types": "0.13.114", + "@vuu-ui/vuu-protocol-types": "0.13.114" }, "author": "heswell", "license": "Apache-2.0", diff --git a/vuu-ui/packages/vuu-table/package.json b/vuu-ui/packages/vuu-table/package.json index 4b01c2d4c..e675fb927 100644 --- a/vuu-ui/packages/vuu-table/package.json +++ b/vuu-ui/packages/vuu-table/package.json @@ -1,6 +1,6 @@ { "name": "@vuu-ui/vuu-table", - "version": "0.13.113", + "version": "0.13.114", "author": "heswell", "main": "src/index.ts", "license": "Apache-2.0", @@ -10,20 +10,20 @@ "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-protocol-types": "0.13.113" + "@vuu-ui/vuu-data-types": "0.13.114", + "@vuu-ui/vuu-table-types": "0.13.114", + "@vuu-ui/vuu-protocol-types": "0.13.114" }, "dependencies": { "@salt-ds/core": "1.54.1", "@salt-ds/styles": "0.2.1", "@salt-ds/window": "0.1.1", - "@vuu-ui/vuu-context-menu": "0.13.113", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-table-extras": "0.13.113", - "@vuu-ui/vuu-ui-controls": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113" + "@vuu-ui/vuu-context-menu": "0.13.114", + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-table-extras": "0.13.114", + "@vuu-ui/vuu-ui-controls": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114" }, "peerDependencies": { "clsx": "^2.0.0", diff --git a/vuu-ui/packages/vuu-table/src/table-data-source/useDataSource.ts b/vuu-ui/packages/vuu-table/src/table-data-source/useDataSource.ts index 8296845a8..1d7d5ec6b 100644 --- a/vuu-ui/packages/vuu-table/src/table-data-source/useDataSource.ts +++ b/vuu-ui/packages/vuu-table/src/table-data-source/useDataSource.ts @@ -6,7 +6,7 @@ import type { DataSourceSuspenseProps, } from "@vuu-ui/vuu-data-types"; import { SelectRowRequest, VuuRange } from "@vuu-ui/vuu-protocol-types"; -import { NULL_RANGE, Range } from "@vuu-ui/vuu-utils"; +import { Range } from "@vuu-ui/vuu-utils"; import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { TableProps } from "../Table"; import { metadataKeys } from "@vuu-ui/vuu-utils"; @@ -47,7 +47,7 @@ export const useDataSource = ({ const data = useRef([]); const isMounted = useRef(true); const hasUpdated = useRef(false); - const rangeRef = useRef(NULL_RANGE); + const rangeRef = useRef(dataSource.range); const totalRowCountRef = useRef(0); const rowAutoSelected = useRef(false); @@ -75,21 +75,10 @@ export const useDataSource = ({ }; }, [autoSelect, dataSource, handleConfigChange]); - const dataWindow = useMemo(() => new MovingWindow(NULL_RANGE), []); - - useMemo(() => { - dataSource.on("resumed", () => { - // When we resume a dataSource (after switching tabs etc) - // client will receive rows. We may not have received any - // setRange calls at this point so dataWindow range will - //not yet be set. If the dataWindow range is already set, - // this is a no-op. - const { range } = dataSource; - if (range.to !== 0) { - dataWindow.setRange(dataSource.range.withBuffer); - } - }); - }, [dataSource, dataWindow]); + const dataWindow = useMemo( + () => new MovingWindow(rangeRef.current.withBuffer), + [], + ); const setData = useCallback( (updates: DataSourceRow[]) => { @@ -182,20 +171,6 @@ export const useDataSource = ({ return dataWindow.getSelectedRows(); }, [dataWindow]); - useEffect(() => { - isMounted.current = true; - if (dataSource.status !== "initialising") { - dataSource.resume?.(datasourceMessageHandler); - } - return () => { - isMounted.current = false; - dataSource.suspend?.( - suspenseProps?.escalateToDisable, - suspenseProps?.escalateDelay, - ); - }; - }, [dataSource, datasourceMessageHandler, suspenseProps]); - useEffect(() => { if (dataSource.status === "disabled") { dataSource.enable?.(datasourceMessageHandler); @@ -215,7 +190,8 @@ export const useDataSource = ({ if ( dataSource.status !== "subscribed" && - dataSource.status !== "subscribing" + dataSource.status !== "subscribing" && + dataSource.status !== "enabling" ) { dataSource?.subscribe( { @@ -242,6 +218,26 @@ export const useDataSource = ({ ], ); + useEffect(() => { + isMounted.current = true; + if (dataSource.status !== "initialising") { + dataSource.resume?.(datasourceMessageHandler); + + if (dataSource.range.from > 0) { + // UI does not currently restore scroll position, so always reset to top of dataset + const { from, to } = rangeRef.current.reset; + setRange({ from, to }); + } + } + return () => { + isMounted.current = false; + dataSource.suspend?.( + suspenseProps?.escalateToDisable, + suspenseProps?.escalateDelay, + ); + }; + }, [dataSource, datasourceMessageHandler, setRange, suspenseProps]); + const removeColumnDataFromCache = useCallback( (indexOfRemovedColumn: number) => { dataWindow.spliceDataAtIndex(indexOfRemovedColumn); diff --git a/vuu-ui/packages/vuu-table/src/useCellFocus.ts b/vuu-ui/packages/vuu-table/src/useCellFocus.ts index 0d5e68f4b..1bca742d2 100644 --- a/vuu-ui/packages/vuu-table/src/useCellFocus.ts +++ b/vuu-ui/packages/vuu-table/src/useCellFocus.ts @@ -75,6 +75,8 @@ export const useCellFocus = ({ state.cellPos = cellPos; // TODO needs to be scroll cell to accommodate horizontal virtualization + console.log(`[useCellFocus] requestScroll ${cellPos[0]}`); + requestScroll?.({ type: "scroll-row", rowIndex: cellPos[0] }); activeCell.focus({ preventScroll: true }); } diff --git a/vuu-ui/packages/vuu-table/src/useTable.ts b/vuu-ui/packages/vuu-table/src/useTable.ts index f51f1c120..ca862c565 100644 --- a/vuu-ui/packages/vuu-table/src/useTable.ts +++ b/vuu-ui/packages/vuu-table/src/useTable.ts @@ -369,7 +369,6 @@ export const useTable = ({ const { requestScroll, scrollTop, ...scrollProps } = useTableScroll({ cellFocusStateRef, columns, - focusCell: focusCellRef.current, getRowAtPosition, rowHeight, scrollingApiRef, diff --git a/vuu-ui/packages/vuu-table/src/useTableScroll.ts b/vuu-ui/packages/vuu-table/src/useTableScroll.ts index c6657377d..0967a2d64 100644 --- a/vuu-ui/packages/vuu-table/src/useTableScroll.ts +++ b/vuu-ui/packages/vuu-table/src/useTableScroll.ts @@ -20,7 +20,6 @@ import { howFarIsRowOutsideViewport, } from "./table-dom-utils"; import type { RuntimeColumnDescriptor } from "@vuu-ui/vuu-table-types"; -import { FocusCell } from "./useCellFocus"; import { ICellFocusState } from "./CellFocusState"; export type ScrollDirectionVertical = "up" | "down"; @@ -84,19 +83,7 @@ const getMaxScroll = (container: HTMLElement) => { return [scrollWidth - clientWidth, scrollHeight - clientHeight]; }; -const getScrollDirection = ( - prevScrollPositions: ScrollPos | undefined, - scrollPos: number, -) => { - if (prevScrollPositions === undefined) { - return undefined; - } else { - const { scrollTop: prevTop } = prevScrollPositions; - return scrollPos > prevTop ? "fwd" : "bwd"; - } -}; - -const getPctScroll = (container: HTMLElement, currentScrollPos?: ScrollPos) => { +const getPctScroll = (container: HTMLElement) => { const { clientHeight, clientWidth, @@ -109,15 +96,7 @@ const getPctScroll = (container: HTMLElement, currentScrollPos?: ScrollPos) => { const maxScrollLeft = scrollWidth - clientWidth; const pctScrollLeft = scrollLeft / (scrollWidth - clientWidth); const maxScrollTop = scrollHeight - clientHeight; - let pctScrollTop = scrollTop / (scrollHeight - clientHeight); - - const scrollDirection = getScrollDirection(currentScrollPos, scrollTop); - - if (scrollDirection === "fwd" && pctScrollTop > 0.99) { - pctScrollTop = 1; - } else if (scrollDirection === "bwd" && pctScrollTop < 0.02) { - pctScrollTop = 0; - } + const pctScrollTop = scrollTop / (scrollHeight - clientHeight); return [ scrollLeft, @@ -169,7 +148,6 @@ type ScrollPos = { export interface TableScrollHookProps { cellFocusStateRef: RefObject; columns: RuntimeColumnDescriptor[]; - focusCell?: FocusCell; getRowAtPosition: RowAtPositionFunc; onHorizontalScroll?: (scrollLeft: number) => void; onVerticalScroll?: (scrollTop: number, pctScrollTop: number) => void; @@ -189,7 +167,6 @@ export interface TableScrollHookProps { export const useTableScroll = ({ cellFocusStateRef, columns, - focusCell, getRowAtPosition, onHorizontalScroll, onVerticalScroll, @@ -298,7 +275,7 @@ export const useTableScroll = ({ focusState.outsideViewport = row < firstRow ? "above" : "below"; } else if (isInViewport && !wasInViewport) { focusState.outsideViewport = false; - focusCell?.(focusState.cellPos); + // focusCell?.(focusState.cellPos); } } } @@ -306,7 +283,7 @@ export const useTableScroll = ({ }, [ cellFocusStateRef, - focusCell, + // focusCell, getRowAtPosition, onVerticalScroll, onVerticalScrollInSitu, @@ -327,7 +304,7 @@ export const useTableScroll = ({ if (scrollbarContainer && contentContainer) { const [scrollLeft, pctScrollLeft, , scrollTop, pctScrollTop] = - getPctScroll(scrollbarContainer, scrollPos); + getPctScroll(scrollbarContainer); if ( scrollLeft !== scrollPos.scrollLeft || @@ -364,7 +341,7 @@ export const useTableScroll = ({ } else if (contentContainer && scrollbarContainer) { scrollbarContainerScrolledRef.current = true; const [scrollLeft, pctScrollLeft, , scrollTop, pctScrollTop] = - getPctScroll(scrollbarContainer, scrollPos); + getPctScroll(scrollbarContainer); scrollPos.scrollLeft = scrollLeft; scrollPos.scrollTop = scrollTop; diff --git a/vuu-ui/packages/vuu-theme/package.json b/vuu-ui/packages/vuu-theme/package.json index a1d570657..3b9dbeff8 100644 --- a/vuu-ui/packages/vuu-theme/package.json +++ b/vuu-ui/packages/vuu-theme/package.json @@ -1,6 +1,6 @@ { "name": "@vuu-ui/vuu-theme", - "version": "0.13.113", + "version": "0.13.114", "license": "Apache-2.0", "style": "./index.css", "files": [ diff --git a/vuu-ui/packages/vuu-ui-controls/package.json b/vuu-ui/packages/vuu-ui-controls/package.json index 4b4e07bb9..88d1eb378 100644 --- a/vuu-ui/packages/vuu-ui-controls/package.json +++ b/vuu-ui/packages/vuu-ui-controls/package.json @@ -1,6 +1,6 @@ { "name": "@vuu-ui/vuu-ui-controls", - "version": "0.13.113", + "version": "0.13.114", "description": "VUU UI Controls", "main": "src/index.ts", "author": "heswell", @@ -11,17 +11,17 @@ "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-context-menu": "0.13.113", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113", + "@vuu-ui/vuu-context-menu": "0.13.114", + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114", "@salt-ds/core": "1.54.1", "@salt-ds/icons": "1.16.0", "@salt-ds/styles": "0.2.1", diff --git a/vuu-ui/packages/vuu-utils/package.json b/vuu-ui/packages/vuu-utils/package.json index a45802813..9e8cbfb3c 100644 --- a/vuu-ui/packages/vuu-utils/package.json +++ b/vuu-ui/packages/vuu-utils/package.json @@ -1,6 +1,6 @@ { "name": "@vuu-ui/vuu-utils", - "version": "0.13.113", + "version": "0.13.114", "author": "heswell", "main": "src/index.ts", "license": "Apache-2.0", @@ -12,14 +12,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" }, "peerDependencies": { "@internationalized/date": "^3.0.0", - "@vuu-ui/vuu-filter-parser": "0.13.113", + "@vuu-ui/vuu-filter-parser": "0.13.114", "clsx": "^2.0.0", "react": "^19.2.3", "react-dom": "^19.2.3" diff --git a/vuu-ui/packages/vuu-utils/src/datasource/BaseDataSource.ts b/vuu-ui/packages/vuu-utils/src/datasource/BaseDataSource.ts index 43019e970..75afbe7e9 100644 --- a/vuu-ui/packages/vuu-utils/src/datasource/BaseDataSource.ts +++ b/vuu-ui/packages/vuu-utils/src/datasource/BaseDataSource.ts @@ -195,10 +195,6 @@ export abstract class BaseDataSource protected confirmConfigChange() { if (this._impendingConfigWithVisualLink) { this._configWithVisualLink = this._impendingConfigWithVisualLink; - console.log( - "%cclear impending config and emit config change", - "color:red", - ); this._impendingConfigWithVisualLink = undefined; this.emit("config", this._configWithVisualLink, this.range, true); } else { diff --git a/vuu-ui/packages/vuu-utils/src/range-utils.ts b/vuu-ui/packages/vuu-utils/src/range-utils.ts index 1fcb39d40..8b6edf6b6 100644 --- a/vuu-ui/packages/vuu-utils/src/range-utils.ts +++ b/vuu-ui/packages/vuu-utils/src/range-utils.ts @@ -35,7 +35,11 @@ class RangeImpl implements Range { } get reset() { - return new RangeImpl(0, this.#baseTo - this.#baseFrom); + return new RangeImpl( + 0, + this.#baseTo - this.#baseFrom, + this.#renderBufferSize, + ); } get withBuffer() { diff --git a/vuu-ui/sample-apps/app-vuu-example/index.tsx b/vuu-ui/sample-apps/app-vuu-example/index.tsx index 5952d7460..291b99976 100644 --- a/vuu-ui/sample-apps/app-vuu-example/index.tsx +++ b/vuu-ui/sample-apps/app-vuu-example/index.tsx @@ -6,15 +6,16 @@ import { VuuAuthProvider, VuuAuthTokenIssuePolicy, } from "@vuu-ui/vuu-data-remote"; -import { isLoginErrorMessage } from "@vuu-ui/vuu-utils"; +import { isLoginErrorMessage, PageVisibilityObserver } from "@vuu-ui/vuu-utils"; import { createRoot } from "react-dom/client"; import { App } from "./src/App"; import "@vuu-ui/vuu-icons/index.css"; import "@vuu-ui/vuu-theme/index.css"; -const CONNECTION_FAILED = 'connection-failed'; -const isConnectionFailedMessage = (err) => typeof err === "string" && err.includes(CONNECTION_FAILED); +const CONNECTION_FAILED = "connection-failed"; +const isConnectionFailedMessage = (err) => + typeof err === "string" && err.includes(CONNECTION_FAILED); const { websocketUrl } = await vuuConfig; @@ -29,7 +30,7 @@ const lostConnectionHandler = new LostConnectionHandler(vuuAuth); const onConnectionStatusChange = (connectionStatus: ConnectionStatus) => { if (connectionStatus === "disconnected") { // do we care about the reason ? - lostConnectionHandler.reconnect().then(status => { + lostConnectionHandler.reconnect().then((status) => { if (status === CONNECTION_FAILED) { throw new Error(status); } @@ -37,6 +38,15 @@ const onConnectionStatusChange = (connectionStatus: ConnectionStatus) => { } }; +new PageVisibilityObserver({ + onHidden: () => { + ConnectionManager.disableActiveSubscriptions(); + }, + onVisible: () => { + ConnectionManager.enableActiveSubscriptions(); + }, +}); + const container = document.getElementById("root"); if (!container) { throw Error("No react root defined in page"); diff --git a/vuu-ui/sample-apps/app-vuu-example/package.json b/vuu-ui/sample-apps/app-vuu-example/package.json index 796b1d0ca..1e1a2aacd 100644 --- a/vuu-ui/sample-apps/app-vuu-example/package.json +++ b/vuu-ui/sample-apps/app-vuu-example/package.json @@ -1,6 +1,6 @@ { "name": "app-vuu-example", - "version": "0.13.113", + "version": "0.13.114", "description": "", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", @@ -18,14 +18,14 @@ "dependencies": { "@fontsource/open-sans": "^4.5.13", "@salt-ds/core": "1.54.1", - "@vuu-ui/vuu-data-local": "0.13.113", - "@vuu-ui/vuu-data-remote": "0.13.113", - "@vuu-ui/vuu-table-types": "0.13.113", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-shell": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113", + "@vuu-ui/vuu-data-local": "0.13.114", + "@vuu-ui/vuu-data-remote": "0.13.114", + "@vuu-ui/vuu-table-types": "0.13.114", + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-shell": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114", "clsx": "^2.0.0", "react": "^19.2.3", "react-dom": "^19.2.3" diff --git a/vuu-ui/sample-apps/feature-basket-trading/package.json b/vuu-ui/sample-apps/feature-basket-trading/package.json index 0c2539e6a..744aff0da 100644 --- a/vuu-ui/sample-apps/feature-basket-trading/package.json +++ b/vuu-ui/sample-apps/feature-basket-trading/package.json @@ -1,6 +1,6 @@ { "name": "feature-basket-trading", - "version": "0.13.113", + "version": "0.13.114", "description": "Basket Trading", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", @@ -16,22 +16,22 @@ ], "main": "index.ts", "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-data-remote": "0.13.113", - "@vuu-ui/vuu-data-react": "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-shell": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-table-extras": "0.13.113", - "@vuu-ui/vuu-theme": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113", + "@vuu-ui/vuu-data-remote": "0.13.114", + "@vuu-ui/vuu-data-react": "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-shell": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-table-extras": "0.13.114", + "@vuu-ui/vuu-theme": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114", "@salt-ds/core": "1.54.1" }, "peerDependencies": { diff --git a/vuu-ui/sample-apps/feature-filter-table/package.json b/vuu-ui/sample-apps/feature-filter-table/package.json index ad4d73e6b..36d459757 100644 --- a/vuu-ui/sample-apps/feature-filter-table/package.json +++ b/vuu-ui/sample-apps/feature-filter-table/package.json @@ -1,6 +1,6 @@ { "name": "feature-vuu-filter-table", - "version": "0.13.113", + "version": "0.13.114", "description": "Vuu Filter Table", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", @@ -17,20 +17,20 @@ "main": "index.ts", "devDependencies": {}, "dependencies": { - "@vuu-ui/vuu-data-remote": "0.13.113", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-datatable": "0.13.113", - "@vuu-ui/vuu-table-types": "0.13.113", - "@vuu-ui/vuu-filters": "0.13.113", - "@vuu-ui/vuu-filter-types": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-protocol-types": "0.13.113", - "@vuu-ui/vuu-shell": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-table-extras": "0.13.113", - "@vuu-ui/vuu-theme": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113", + "@vuu-ui/vuu-data-remote": "0.13.114", + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-datatable": "0.13.114", + "@vuu-ui/vuu-table-types": "0.13.114", + "@vuu-ui/vuu-filters": "0.13.114", + "@vuu-ui/vuu-filter-types": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-protocol-types": "0.13.114", + "@vuu-ui/vuu-shell": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-table-extras": "0.13.114", + "@vuu-ui/vuu-theme": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114", "@salt-ds/core": "1.54.1" }, "peerDependencies": { diff --git a/vuu-ui/sample-apps/feature-filter-table/src/useFilterTableFeature.tsx b/vuu-ui/sample-apps/feature-filter-table/src/useFilterTableFeature.tsx index b54e690ad..d42ec6e12 100644 --- a/vuu-ui/sample-apps/feature-filter-table/src/useFilterTableFeature.tsx +++ b/vuu-ui/sample-apps/feature-filter-table/src/useFilterTableFeature.tsx @@ -47,8 +47,8 @@ type FilterTableConfig = { "table-config"?: TableConfig; }; -const NoSuspense: DataSourceSuspenseProps = { - escalateToDisable: false, +const DisableOnSuspend: DataSourceSuspenseProps = { + escalateToDisable: true, }; export const useFilterTableFeature = ({ @@ -109,7 +109,7 @@ export const useFilterTableFeature = ({ columns: datasourceConfigFromState?.columns ?? tableSchema.columns.map(toColumnName), - suspenseProps: NoSuspense, + suspenseProps: DisableOnSuspend, table: tableSchema.table, }); diff --git a/vuu-ui/sample-apps/feature-instrument-tiles/package.json b/vuu-ui/sample-apps/feature-instrument-tiles/package.json index 11ab69152..85e5ce708 100644 --- a/vuu-ui/sample-apps/feature-instrument-tiles/package.json +++ b/vuu-ui/sample-apps/feature-instrument-tiles/package.json @@ -1,6 +1,6 @@ { "name": "feature-vuu-instrument-tiles", - "version": "0.13.113", + "version": "0.13.114", "description": "Instrument Price Tiles", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", @@ -17,19 +17,19 @@ "main": "index.ts", "devDependencies": {}, "dependencies": { - "@vuu-ui/vuu-data-remote": "0.13.113", - "@vuu-ui/vuu-data-react": "0.13.113", - "@vuu-ui/vuu-table-types": "0.13.113", - "@vuu-ui/vuu-filters": "0.13.113", - "@vuu-ui/vuu-filter-types": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-popups": "0.13.113", - "@vuu-ui/vuu-protocol-types": "0.13.113", - "@vuu-ui/vuu-shell": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-table-extras": "0.13.113", - "@vuu-ui/vuu-theme": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113", + "@vuu-ui/vuu-data-remote": "0.13.114", + "@vuu-ui/vuu-data-react": "0.13.114", + "@vuu-ui/vuu-table-types": "0.13.114", + "@vuu-ui/vuu-filters": "0.13.114", + "@vuu-ui/vuu-filter-types": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-popups": "0.13.114", + "@vuu-ui/vuu-protocol-types": "0.13.114", + "@vuu-ui/vuu-shell": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-table-extras": "0.13.114", + "@vuu-ui/vuu-theme": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114", "@salt-ds/core": "1.54.1" }, "peerDependencies": { diff --git a/vuu-ui/sample-apps/standalone-table/package.json b/vuu-ui/sample-apps/standalone-table/package.json index bf8a1ab1f..70b97eccc 100644 --- a/vuu-ui/sample-apps/standalone-table/package.json +++ b/vuu-ui/sample-apps/standalone-table/package.json @@ -1,6 +1,6 @@ { "name": "standalone-table", - "version": "0.13.113", + "version": "0.13.114", "description": "", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", @@ -17,12 +17,12 @@ "devDependencies": {}, "dependencies": { "@fontsource/open-sans": "^4.5.13", - "@vuu-ui/vuu-icons": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-shell": "0.13.113", - "@vuu-ui/vuu-table": "0.13.113", - "@vuu-ui/vuu-theme": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113", + "@vuu-ui/vuu-icons": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-shell": "0.13.114", + "@vuu-ui/vuu-table": "0.13.114", + "@vuu-ui/vuu-theme": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114", "clsx": "^2.0.0", "react": "^19.2.3", "react-dom": "^19.2.3" diff --git a/vuu-ui/showcase/src/examples/scratchpad.examples.tsx b/vuu-ui/showcase/src/examples/scratchpad.examples.tsx deleted file mode 100644 index 4bf6d670b..000000000 --- a/vuu-ui/showcase/src/examples/scratchpad.examples.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { PageVisibilityObserver } from "@vuu-ui/vuu-utils"; -import { useMemo } from "react"; - -type TableDef = { - name: string; -}; - -class TableDefImpl implements TableDef { - constructor(public name: string) {} -} - -function TableDef(name: string): TableDef { - return new TableDefImpl(name); -} - -export const Experiment = () => { - useMemo(() => { - new PageVisibilityObserver({ inactiveTimeout: 10000 }); - }, []); - - const tableDef = useMemo( - () => TableDef("instrument"), - - [], - ); - - return
{tableDef.name}
; -}; diff --git a/vuu-ui/showcase/src/examples/scratchpadA.examples.tsx b/vuu-ui/showcase/src/examples/scratchpadA.examples.tsx new file mode 100644 index 000000000..496e2b94e --- /dev/null +++ b/vuu-ui/showcase/src/examples/scratchpadA.examples.tsx @@ -0,0 +1,66 @@ +import { Button } from "@salt-ds/core"; +import { PageVisibilityObserver } from "@vuu-ui/vuu-utils"; +import { useCallback, useMemo, useRef } from "react"; + +type TableDef = { + name: string; +}; + +class TableDefImpl implements TableDef { + constructor(public name: string) {} +} + +function TableDef(name: string): TableDef { + return new TableDefImpl(name); +} + +export const ExperimentA = () => { + const timerRef = useRef>(null); + const bc = useMemo(() => { + const bc = new BroadcastChannel("example"); + bc.onmessage = ({ data }: MessageEvent) => { + console.log(data); + }; + return bc; + }, []); + + useMemo(() => { + const pageVisibilityObserver = new PageVisibilityObserver({ + inactiveTimeout: 30, + }); + pageVisibilityObserver.on("inactive-timeout", () => { + console.log("session timed out"); + bc.postMessage("session timed out"); + if (timerRef.current) { + clearInterval(timerRef.current); + timerRef.current = null; + } + }); + + pageVisibilityObserver.on("hidden", () => { + bc.postMessage(`hidden`); + timerRef.current = setInterval(() => { + bc.postMessage(Date.now()); + }, 1000); + }); + pageVisibilityObserver.on("visible", () => { + bc.postMessage(`visible`); + if (timerRef.current) { + clearInterval(timerRef.current); + timerRef.current = null; + } + }); + + console.log(`document visibility State ${document.visibilityState}`); + }, [bc]); + + const sendMessage = useCallback(() => { + bc.postMessage("button clicked in A"); + }, [bc]); + + return ( +
+ +
+ ); +}; diff --git a/vuu-ui/showcase/src/examples/scratchpadB.examples.tsx b/vuu-ui/showcase/src/examples/scratchpadB.examples.tsx new file mode 100644 index 000000000..d90820aab --- /dev/null +++ b/vuu-ui/showcase/src/examples/scratchpadB.examples.tsx @@ -0,0 +1,17 @@ +import { useEffect, useMemo } from "react"; + +export const ExperimentB = () => { + const bc = useMemo(() => { + const bc = new BroadcastChannel("example"); + bc.onmessage = ({ data }: MessageEvent) => { + console.log(data); + }; + return bc; + }, []); + + useEffect(() => { + bc.postMessage({ Message: "listening for messages", sender: "B" }); + }, [bc]); + + return
Hello
; +}; diff --git a/vuu-ui/tools/vuu-showcase/package.json b/vuu-ui/tools/vuu-showcase/package.json index ba715e5f4..b5d6892be 100644 --- a/vuu-ui/tools/vuu-showcase/package.json +++ b/vuu-ui/tools/vuu-showcase/package.json @@ -15,8 +15,8 @@ "@mdx-js/rollup": "3.1.1", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^15.2.3", - "@vuu-ui/vuu-data-types": "0.13.113", - "@vuu-ui/vuu-table-types": "0.13.113", + "@vuu-ui/vuu-data-types": "0.13.114", + "@vuu-ui/vuu-table-types": "0.13.114", "default-browser": "^5.2.1", "is-inside-container": "^1.0.0", "open": "10.1.0", @@ -26,12 +26,12 @@ "@fontsource/open-sans": "^4.5.13", "@salt-ds/core": "1.54.1", "@salt-ds/theme": "1.37.0", - "@vuu-ui/vuu-datatable": "0.13.113", - "@vuu-ui/vuu-icons": "0.13.113", - "@vuu-ui/vuu-layout": "0.13.113", - "@vuu-ui/vuu-theme": "0.13.113", - "@vuu-ui/vuu-ui-controls": "0.13.113", - "@vuu-ui/vuu-utils": "0.13.113", + "@vuu-ui/vuu-datatable": "0.13.114", + "@vuu-ui/vuu-icons": "0.13.114", + "@vuu-ui/vuu-layout": "0.13.114", + "@vuu-ui/vuu-theme": "0.13.114", + "@vuu-ui/vuu-ui-controls": "0.13.114", + "@vuu-ui/vuu-utils": "0.13.114", "symlink-dir": "^6.0.5", "watcher": "2.3.1" },