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
17 changes: 8 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -163,29 +163,28 @@ python/perspective/perspective/node/assets/*
docs/static/js/logo.js
docs/static/js/logo.js.map
python/perspective/pip-wheel-metadata
darwin.json
darwin.interactive.json
junit.xml
python/perspective/python_junit.xml
python/perspective/coverage.xml
python/perspective/bench/stresstest/results
rust/perspective-view/target
rust/perspective-view/pkg
rust/perspective-view/target2
rust/perspective-vieux/pkg
rust/perspective-viewer/target
rust/perspective-viewer/pkg
rust/perspective-viewer/target2
rust/perspective-viewer/pkg

rust/perspective-vieux/target
rust/perspective-vieux/target2
rust/perspective-viewer/target
rust/perspective-viewer/target2
.emsdk

docs/static/css/material.dark.css
docs/i18n/en.json
docs/static/js

rust/perspective-vieux/target.vscode
rust/perspective-viewer/target.vscode
target.vscode

# jupyterlab test artifacts
packages/perspective-jupyterlab/test/config/jupyter/lab
packages/perspective-jupyterlab/test/config/jupyter/migrated
docs/static/features
results.debug.json
18 changes: 9 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ parameters:
default:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
versionSpec: '15.x'

- bash: npm install -g yarn
displayName: 'Install Yarn'
Expand Down Expand Up @@ -205,25 +205,25 @@ jobs:
- task: PublishPipelineArtifact@1
condition: failed()
inputs:
targetPath: '$(System.DefaultWorkingDirectory)/packages/perspective-viewer/screenshots/'
targetPath: '$(System.DefaultWorkingDirectory)/rust/perspective-viewer/test/screenshots/'
artifactName: "perspective-viewer-$(Build.BuildNumber)"

- task: PublishPipelineArtifact@1
condition: failed()
inputs:
targetPath: '$(System.DefaultWorkingDirectory)/packages/perspective-viewer-datagrid/screenshots/'
targetPath: '$(System.DefaultWorkingDirectory)/packages/perspective-viewer-datagrid/test/screenshots/'
artifactName: "perspective-viewer-datagrid-$(Build.BuildNumber)"

- task: PublishPipelineArtifact@1
condition: failed()
inputs:
targetPath: '$(System.DefaultWorkingDirectory)/packages/perspective-viewer-d3fc/screenshots/'
targetPath: '$(System.DefaultWorkingDirectory)/packages/perspective-viewer-d3fc/test/screenshots/'
artifactName: "perspective-viewer-d3fc-$(Build.BuildNumber)"

- task: PublishPipelineArtifact@1
condition: failed()
inputs:
targetPath: '$(System.DefaultWorkingDirectory)/packages/perspective-workspace/screenshots/'
targetPath: '$(System.DefaultWorkingDirectory)/packages/perspective-workspace/test/screenshots/'
artifactName: "perspective-workspace-$(Build.BuildNumber)"

# `yarn pack` the public packages so the Jupyterlab tests can use the
Expand All @@ -233,7 +233,7 @@ jobs:
- bash: cd $(System.DefaultWorkingDirectory)/packages/perspective && yarn pack --filename=perspective-dist.tgz
displayName: "yarn pack perspective"

- bash: cd $(System.DefaultWorkingDirectory)/packages/perspective-viewer && yarn pack --filename=perspective-viewer-dist.tgz
- bash: cd $(System.DefaultWorkingDirectory)/rust/perspective-viewer && yarn pack --filename=perspective-viewer-dist.tgz
displayName: "yarn pack perspective-viewer"

- bash: cd $(System.DefaultWorkingDirectory)/packages/perspective-viewer-datagrid && yarn pack --filename=perspective-viewer-datagrid-dist.tgz
Expand All @@ -253,7 +253,7 @@ jobs:

- task: PublishPipelineArtifact@1
inputs:
targetPath: "$(System.DefaultWorkingDirectory)/packages/perspective-viewer/perspective-viewer-dist.tgz"
targetPath: "$(System.DefaultWorkingDirectory)/rust/perspective-viewer/perspective-viewer-dist.tgz"
artifactName: "perspective-viewer-dist"

- task: PublishPipelineArtifact@1
Expand Down Expand Up @@ -411,7 +411,7 @@ jobs:
# don't use InitSteps because we don't want to cache local puppeteer
- task: NodeTool@0
inputs:
versionSpec: '12.x'
versionSpec: '15.x'

- bash: npm install -g yarn
displayName: 'Install Yarn'
Expand Down Expand Up @@ -480,7 +480,7 @@ jobs:
- bash: tar --strip-components=1 -xvf $(System.DefaultWorkingDirectory)/perspective-dist.tgz -C $(System.DefaultWorkingDirectory)/packages/perspective package
displayName: "Install perspective dist"

- bash: tar --strip-components=1 -xvf $(System.DefaultWorkingDirectory)/perspective-viewer-dist.tgz -C $(System.DefaultWorkingDirectory)/packages/perspective-viewer package
- bash: tar --strip-components=1 -xvf $(System.DefaultWorkingDirectory)/perspective-viewer-dist.tgz -C $(System.DefaultWorkingDirectory)/rust/perspective-viewer package
displayName: "Install perspective-viewer dist"

- bash: tar --strip-components=1 -xvf $(System.DefaultWorkingDirectory)/perspective-viewer-datagrid-dist.tgz -C $(System.DefaultWorkingDirectory)/packages/perspective-viewer-datagrid package
Expand Down
24 changes: 0 additions & 24 deletions docker/puppeteer/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion examples/blocks/src/csv/csv.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ window.addEventListener("DOMContentLoaded", function() {
parent.appendChild(psp);

// Load the CSV data into `<perspective-viewer>`.
worker.table(txt).then(table => psp.load(table));
psp.load(worker.table(txt));
};

// Read the contents of the CSV - triggering the onload when finished.
Expand Down
2 changes: 1 addition & 1 deletion examples/blocks/src/editable/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
function on_load() {
var el = document.getElementsByTagName('perspective-viewer')[0];
WORKER.table(this.response).then(table => {
el.load(table);
el.load(Promise.resolve(table));
el.toggleConfig();
});
}
Expand Down
22 changes: 11 additions & 11 deletions examples/blocks/src/olympics/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
Two: {
selectable: true,
plugin: "datagrid",
"row-pivots": ["country"],
"row_pivots": ["country"],
aggregates: {
sport: "dominant"
},
Expand All @@ -127,11 +127,11 @@
},
Three: {
plugin: "Heatmap",
"row-pivots": ["sport"],
"column-pivots": ["age"],
sort: [["total"]],
"row_pivots": ["sport"],
"column_pivots": ["age"],
sort: [["total", "desc"]],
columns: ["total"],
filters: [],
filter: [],
plugin_config: {
realValues: ["total"]
},
Expand All @@ -141,14 +141,14 @@
PERSPECTIVE_GENERATED_ID_1: {
plugin: "datagrid",
columns: ["total", "sport", "country", "age", "gold", "silver", "bronze"],
"row-pivots": ["athlete"],
"row_pivots": ["athlete"],
sort: [["total", "desc"]],
aggregates: {
sport: "dominant",
age: "high",
country: "dominant"
},
filters: [["country", "==", "Canada"]],
filter: [["country", "==", "Canada"]],
name: "Athlete by Sport",
table: "olympics"
},
Expand All @@ -157,12 +157,12 @@
aggregates: {
age: "avg"
},
filters: [
filter: [
// ["country", "==", "Canada"],
["year", "in", ["2002", "2006", "2010", ""]]
],
columns: ["age", "total"],
"row-pivots": ["year"],
"row_pivots": ["year"],
plugin_config: {
realValues: ["age", "total"],
splitMainValues: ["age"]
Expand All @@ -173,11 +173,11 @@
PERSPECTIVE_GENERATED_ID_0: {
plugin: "Y Line",
columns: ["age", "total"],
"row-pivots": ["year"],
"row_pivots": ["year"],
aggregates: {
age: "avg"
},
filters: [
filter: [
// ["country", "==", "Canada"],
["year", "in", ["2000", "2004", "2008", "2012", ""]]
],
Expand Down
7 changes: 4 additions & 3 deletions examples/blocks/src/streaming/streaming.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ window.addEventListener("DOMContentLoaded", async function() {
});

// Load the `table` in the `<perspective-viewer>` DOM reference.
elem.load(table);
await elem.load(Promise.resolve(table));

elem.restore({
plugin: "Datagrid",
columns: ["(-)chg", "chg", "(+)chg"],
expressions: ['//(-)chg\nif("chg"<0){"chg"}else{0}', '//(+)chg\nif("chg">0){"chg"}else{0}'],
"row-pivots": ["name"],
"column-pivots": ["client"],
row_pivots: ["name"],
column_pivots: ["client"],
aggregates: {"(-)chg": "avg", "(+)chg": "avg", chg: "avg"},
sort: [["chg", "desc"]],
plugin_config: {
Expand Down
6 changes: 3 additions & 3 deletions examples/blocks/src/superstore/layout.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
"viewers": {
"PERSPECTIVE_GENERATED_ID_0": {
"plugin": "datagrid",
"row-pivots": [
"row_pivots": [
"Region",
"State"
],
"column-pivots": [
"column_pivots": [
"Category",
"Sub-Category"
],
Expand Down Expand Up @@ -82,7 +82,7 @@
},
"PERSPECTIVE_GENERATED_ID_2": {
"plugin": "Treemap",
"row-pivots": [
"row_pivots": [
"State"
],
"columns": [
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,14 @@
"npm-pack-here": "^1.2.0",
"npm-run-all": "^4.1.3",
"postcss": "^8.2.6",
"postcss-copy-assets": "^0.3.1",
"postcss-easy-import": "^3.0.0",
"postcss-font-grabber": "^3.0.2",
"postcss-loader": "^4.1.0",
"postcss-url": "^10.1.3",
"pre-commit": "^1.2.2",
"prettier": "^1.19.1",
"puppeteer": "^10.2.0",
"rimraf": "^2.6.2",
"rollup": "^2.38.5",
"rollup-plugin-filesize": "^9.1.0",
Expand Down
26 changes: 5 additions & 21 deletions packages/perspective-jupyterlab/src/config/plugin.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

const path = require("path");
const PerspectivePlugin = require("@finos/perspective-webpack-plugin");

module.exports = {
mode: process.env.PSP_NO_MINIFY || process.env.PSP_DEBUG ? "development" : process.env.NODE_ENV || "production",
Expand All @@ -22,6 +23,7 @@ module.exports = {
crypto: false
}
},
plugins: [new PerspectivePlugin({inline: true})],
performance: {
hints: false,
maxEntrypointSize: 512000,
Expand All @@ -33,14 +35,17 @@ module.exports = {
rules: [
{
test: /\.less$/,
exclude: /node_modules/,
use: [{loader: "style-loader"}, {loader: "css-loader"}, {loader: "less-loader"}]
},
{
test: /\.css$/,
exclude: /node_modules/,
use: [{loader: "css-loader"}]
},
{
test: /\.(html)$/,
exclude: /node_modules/,
use: {
loader: "html-loader",
options: {}
Expand All @@ -50,31 +55,10 @@ module.exports = {
test: /\.ts$/,
exclude: /node_modules/,
loader: "ts-loader"
},
{
test: /\.wasm$/,
type: "javascript/auto",
include: path.dirname(require.resolve("@finos/perspective-viewer")),
loader: "arraybuffer-loader"
},
{
test: /editor\.worker/,
type: "javascript/auto",
loader: "worker-loader",
options: {
inline: "no-fallback"
}
},
{
test: /\.ttf$/,
use: ["file-loader"]
}
]
},
externalsPresets: {web: false, webAsync: true},
experiments: {
syncWebAssembly: true
},
output: {
filename: "[name].js",
library: {
Expand Down
Loading