Skip to content

Commit

Permalink
Build for JL4.
Browse files Browse the repository at this point in the history
* jlpm up '@lumino/*'
* jlpm up '@jupyter-widgets/base'
* jlpm up '@jupyterlab/*'
* Same for a few loaders
* Polyfill DragEvent

Signed-off-by: Vasilis Themelis <vdthemelis@gmail.com>
  • Loading branch information
vthemelis committed Aug 21, 2023
1 parent 4760025 commit 1978e19
Show file tree
Hide file tree
Showing 5 changed files with 456 additions and 908 deletions.
8 changes: 4 additions & 4 deletions js/datagrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,11 @@ export class DataGridModel extends DOMWidgetModel {

this.synchingWithKernel = true;

const selectionIter = sender.selections().iter();
const selectionIter = sender.selections();
const selections: any[] = [];
let selection = null;
while ((selection = selectionIter.next())) {
let selectionNode = null;
while ((selectionNode = selectionIter.next())) {
const selection = selectionNode.value;
selections.push({
r1: Math.min(selection.r1, selection.r2),
r2: Math.max(selection.r1, selection.r2),
Expand Down Expand Up @@ -724,7 +725,6 @@ export class DataGridView extends DOMWidgetView {
default_renderer: CellRendererView;
header_renderer: CellRendererView;
grid: FeatherGrid;
// @ts-ignore needed for ipywidgetx 8.x compatibility
luminoWidget: JupyterLuminoPanelWidget;
model: DataGridModel;
backboneModel: DataGridModel;
Expand Down
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@
},
"dependencies": {
"@jupyter-widgets/base": "^2 || ^3 || ^4 || ^6.0.0",
"@jupyterlab/apputils": "^3.0.2",
"@lumino/algorithm": "^1.9.0",
"@lumino/application": "^1.27.0",
"@lumino/commands": "^1.20.0",
"@lumino/coreutils": "^1.12.0",
"@lumino/datagrid": "^0.36.0",
"@lumino/default-theme": "^0.19.0",
"@lumino/domutils": "^1.8.0",
"@lumino/messaging": "^1.9.0",
"@lumino/signaling": "^1.10",
"@lumino/virtualdom": "^1.13.0",
"@lumino/widgets": "^1.28.0",
"@jupyterlab/apputils": "^4.1.5",
"@lumino/algorithm": "^2.0.1",
"@lumino/application": "^2.2.1",
"@lumino/commands": "^2.1.3",
"@lumino/coreutils": "^2.1.2",
"@lumino/datagrid": "^2.2.0",
"@lumino/default-theme": "^2.1.3",
"@lumino/domutils": "^2.0.1",
"@lumino/messaging": "^2.0.1",
"@lumino/signaling": "^2.1.2",
"@lumino/virtualdom": "^2.0.1",
"@lumino/widgets": "^2.3.0",
"bqplot": "^0.5",
"core-js-pure": "^3.30.2",
"d3-array": "^2.2.0",
Expand Down Expand Up @@ -96,7 +96,7 @@
"acorn": "^6.2.0",
"babel-jest": "^28.1.3",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"css-loader": "^3.0.0",
"css-loader": "^6.8.1",
"eslint": "^7.3.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
Expand All @@ -108,13 +108,13 @@
"prettier": "^2.0.5",
"rimraf": "^2.6.2",
"source-map-loader": "^0.2.4",
"style-loader": "^0.23.1",
"style-loader": "^3.3.3",
"svg-url-loader": "~3.0.3",
"ts-jest": "^28.0.8",
"ts-loader": "^6.0.4",
"typescript": "~4.2.4",
"url-loader": "^4.1.0",
"webpack": "^5",
"webpack": "^5.88.2",
"webpack-cli": "^4.4.0"
},
"jupyterlab": {
Expand Down
2 changes: 1 addition & 1 deletion tests/js/filterMenu.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { InteractiveFilterDialog } from '../..//js/core/filterMenu';
import { InteractiveFilterDialog } from '../../js/core/filterMenu';
import { ViewBasedJSONModel } from '../../js/core/viewbasedjsonmodel';
import { DataGenerator } from '../js/testUtils';
import { Transform } from '../../js/core/transform';
Expand Down
5 changes: 5 additions & 0 deletions tests/js/setupFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ HTMLCanvasElement.prototype.getContext = () => {
stroke: () => { },
};
};

// Polyfill DragEvent
Object.defineProperty(window, 'DragEvent', {
value: class DragEvent {}
});
Loading

0 comments on commit 1978e19

Please sign in to comment.