Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit d320dc1

Browse files
authored
Merge pull request #53 from afshin/jupyterlab-2
Support JupyterLab 2 beta
2 parents 6fce32c + 0c46208 commit d320dc1

File tree

7 files changed

+46
-40
lines changed

7 files changed

+46
-40
lines changed

package.json

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jupyterlab/shortcutui",
3-
"version": "0.4.0",
3+
"version": "0.5.0-beta.1",
44
"description": "A JupyterLab extension for managing keyboard shortcuts",
55
"author": "Jenna Landy, Noah Stapp, and Alena Mueller",
66
"keywords": [
@@ -30,29 +30,30 @@
3030
"watch": "tsc -w"
3131
},
3232
"dependencies": {
33-
"@jupyterlab/application": "^1.1.0",
34-
"@jupyterlab/apputils": "^1.0.1",
35-
"@jupyterlab/coreutils": "^3.1.0",
36-
"@jupyterlab/mainmenu": "^1.1.0",
37-
"@phosphor/domutils": "^1.1.3",
38-
"@phosphor/keyboard": "^1.1.3",
39-
"@phosphor/widgets": "^1.9.0",
40-
"react": "~16.8.4",
33+
"@jupyterlab/application": "^2.0.0-alpha.4",
34+
"@jupyterlab/apputils": "^2.0.0-alpha.4",
35+
"@jupyterlab/coreutils": "^4.0.0-alpha.4",
36+
"@jupyterlab/mainmenu": "^2.0.0-alpha.4",
37+
"@jupyterlab/settingregistry": "^2.0.0-beta.1",
38+
"@lumino/domutils": "^1.1.6",
39+
"@lumino/keyboard": "^1.1.5",
40+
"@lumino/widgets": "^1.9.4",
41+
"react": "~16.9.0",
4142
"typestyle": "^2.0.4"
4243
},
4344
"devDependencies": {
44-
"@types/react": "~16.8.18",
45-
"@types/react-dom": "~16.8.4",
46-
"prettier": "^1.18.2",
45+
"@types/react": "~16.9.11",
46+
"@types/react-dom": "~16.9.4",
47+
"prettier": "^1.19.1",
4748
"rimraf": "^3.0.0",
48-
"tslint": "^5.18.0",
49+
"tslint": "^5.20.1",
4950
"tslint-plugin-prettier": "^2.0.1",
50-
"typescript": "~3.6.2"
51+
"typescript": "~3.7.3"
5152
},
5253
"jupyterlab": {
5354
"extension": true
5455
},
5556
"resolutions": {
56-
"@types/react": "~16.8.4"
57+
"@types/react": "^16.9.11"
5758
}
5859
}

src/ShortcutWidget.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
import { VDomRenderer, VDomModel } from '@jupyterlab/apputils';
22

3-
import * as React from 'react';
3+
import { ISettingRegistry } from '@jupyterlab/settingregistry';
44

5-
import { ShortcutUI } from './components/ShortcutUI';
5+
import { CommandRegistry } from '@lumino/commands';
66

7-
import { ISettingRegistry } from '@jupyterlab/coreutils';
7+
import { IDisposable } from '@lumino/disposable';
88

9-
import { CommandRegistry } from '@phosphor/commands';
9+
import { Widget, Title, Menu } from '@lumino/widgets';
1010

11-
import { Widget, Title, Menu } from '@phosphor/widgets';
11+
import * as React from 'react';
1212

1313
import * as ReactDOM from 'react-dom';
14-
import { IDisposable } from '@phosphor/disposable';
14+
15+
import { ShortcutUI } from './components/ShortcutUI';
1516

1617
/** All external actions, setting commands, getting command list ... */
1718
export interface IShortcutUIexternal {
@@ -37,7 +38,7 @@ export default class ShortcutWidget extends VDomRenderer<VDomModel> {
3738
reactComponent: React.ReactElement<any>;
3839

3940
constructor(external: IShortcutUIexternal) {
40-
super();
41+
super(undefined);
4142
this.height = -1;
4243
this.width = -1;
4344
this.external = external;

src/components/ShortcutInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as React from 'react';
44

55
import { classes } from 'typestyle';
66

7-
import { EN_US } from '@phosphor/keyboard';
7+
import { EN_US } from '@lumino/keyboard';
88

99
import {
1010
InputStyle,

src/components/ShortcutItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ShortcutObject, ErrorObject, TakenByObject } from '../index';
22

33
import { ShortcutInput } from './ShortcutInput';
44

5-
import { Platform } from '@phosphor/domutils';
5+
import { Platform } from '@lumino/domutils';
66

77
import { classes } from 'typestyle';
88

src/components/ShortcutUI.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
import { ISettingRegistry } from '@jupyterlab/coreutils';
1+
import { ISettingRegistry } from '@jupyterlab/settingregistry';
22

3-
import { ArrayExt, StringExt } from '@phosphor/algorithm';
3+
import { ArrayExt, StringExt } from '@lumino/algorithm';
44

5-
import { ShortcutList } from './ShortcutList';
5+
import { ReadonlyJSONArray } from '@lumino/coreutils';
66

7-
import { TopNav } from './TopNav';
7+
import {
8+
TopWhitespaceStyle,
9+
ShortcutUIStyle
10+
} from '../componentStyle/ShortcutUIStyle';
811

912
import { ShortcutObject, ErrorObject, TakenByObject } from '../index';
1013

1114
import { IShortcutUIexternal } from '../ShortcutWidget';
1215

13-
import {
14-
TopWhitespaceStyle,
15-
ShortcutUIStyle
16-
} from '../componentStyle/ShortcutUIStyle';
16+
import { ShortcutList } from './ShortcutList';
17+
18+
import { TopNav } from './TopNav';
1719

1820
import * as React from 'react';
19-
import { ReadonlyJSONArray } from '@phosphor/coreutils';
2021

2122
const enum MatchType {
2223
Label,

src/components/TopNav.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import { Menu } from '@lumino/widgets';
2+
13
import * as React from 'react';
24

35
import { classes } from 'typestyle';
46

5-
import { Menu } from '@phosphor/widgets';
7+
import { CellStyle } from '../componentStyle/ShortcutItemStyle';
68

79
import {
810
TopStyle,
@@ -23,10 +25,10 @@ import {
2325
controlIconStyle
2426
} from '../componentStyle/TopNavStyle';
2527

26-
import { CellStyle } from '../componentStyle/ShortcutItemStyle';
28+
import { IShortcutUIexternal } from '../ShortcutWidget';
2729

2830
import { ShortcutTitleItem } from './ShortcutTitleItem';
29-
import { IShortcutUIexternal } from '../ShortcutWidget';
31+
3032
import { UISize } from './ShortcutUI';
3133

3234
export interface IAdvancedOptionsProps {

src/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import {
44
JupyterFrontEnd
55
} from '@jupyterlab/application';
66

7-
import { ISettingRegistry } from '@jupyterlab/coreutils';
8-
97
import {
108
ICommandPalette,
119
MainAreaWidget,
@@ -14,12 +12,15 @@ import {
1412

1513
import { IMainMenu } from '@jupyterlab/mainmenu';
1614

17-
import { Widget, Menu } from '@phosphor/widgets';
15+
import { ISettingRegistry } from '@jupyterlab/settingregistry';
16+
17+
import { CommandRegistry } from '@lumino/commands';
18+
19+
import { Widget, Menu } from '@lumino/widgets';
1820

1921
import ShortcutWidget, { IShortcutUIexternal } from './ShortcutWidget';
2022

2123
import '../style/variables.css';
22-
import { CommandRegistry } from '@phosphor/commands';
2324

2425
/** Object for shortcut items */
2526
export class ShortcutObject {

0 commit comments

Comments
 (0)