@jupyterlab/statusbar 4.0.0-alpha.1 → 4.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/hover.js +2 -6
- package/lib/components/hover.js.map +1 -1
- package/lib/components/progressBar.js +3 -3
- package/lib/components/progressBar.js.map +1 -1
- package/lib/components/progressCircle.js +1 -1
- package/lib/components/progressCircle.js.map +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/style/statusbar.d.ts +1 -0
- package/lib/style/statusbar.js +3 -0
- package/lib/style/statusbar.js.map +1 -1
- package/package.json +6 -10
- package/style/base.css +4 -1
- package/style/index.css +0 -2
- package/style/index.js +0 -2
- package/lib/defaults/index.d.ts +0 -3
- package/lib/defaults/index.js +0 -6
- package/lib/defaults/index.js.map +0 -1
- package/lib/defaults/kernelStatus.d.ts +0 -74
- package/lib/defaults/kernelStatus.js +0 -141
- package/lib/defaults/kernelStatus.js.map +0 -1
- package/lib/defaults/lineCol.d.ts +0 -92
- package/lib/defaults/lineCol.js +0 -208
- package/lib/defaults/lineCol.js.map +0 -1
- package/lib/defaults/runningSessions.d.ts +0 -72
- package/lib/defaults/runningSessions.js +0 -119
- package/lib/defaults/runningSessions.js.map +0 -1
- package/lib/style/lineForm.d.ts +0 -11
- package/lib/style/lineForm.js +0 -71
- package/lib/style/lineForm.js.map +0 -1
package/lib/components/hover.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
|
-
import { HoverBox } from '@jupyterlab/
|
|
3
|
+
import { HoverBox } from '@jupyterlab/ui-components';
|
|
4
4
|
import { PanelLayout, Widget } from '@lumino/widgets';
|
|
5
|
-
import {
|
|
6
|
-
import { clickedItem, interactiveItem } from '../style/statusbar';
|
|
7
|
-
const hoverItem = style({
|
|
8
|
-
boxShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)'
|
|
9
|
-
});
|
|
5
|
+
import { clickedItem, hoverItem, interactiveItem } from '../style/statusbar';
|
|
10
6
|
/**
|
|
11
7
|
* Create and show a popup component.
|
|
12
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover.js","sourceRoot":"","sources":["../../src/components/hover.tsx"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"hover.js","sourceRoot":"","sources":["../../src/components/hover.tsx"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE7E;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,OAAuB;IAC/C,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAClC,MAAM,CAAC,MAAM,EAAE,CAAC;IAChB,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,MAAM;IAC/B;;OAEG;IACH,YAAY,OAAuB;QACjC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;QAC1B,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAC5B,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC,CAAC;QAC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OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC7D,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC;QACzD,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO,EAAE;YAC3B,OAAO,GAAG,CAAC,CAAC,QAAQ,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;SAChD;QACD,MAAM,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACvD,QAAQ,CAAC,WAAW,CAAC;YACnB,MAAM,EAAE,UAAU;YAClB,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,EAAE;YACb,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI;YACrB,MAAM,EAAE;gBACN,UAAU,EAAE,OAAO;aACpB;YACD,SAAS,EAAE,YAAY;YACvB,KAAK;SACN,CAAC,CAAC;IACL,CAAC;CAKF"}
|
|
@@ -16,9 +16,9 @@ import * as React from 'react';
|
|
|
16
16
|
* A functional tsx component for a progress bar.
|
|
17
17
|
*/
|
|
18
18
|
export function ProgressBar(props) {
|
|
19
|
-
const { width } = props, rest = __rest(props, ["width"]);
|
|
20
|
-
return (React.createElement("div", { className: 'jp-Statusbar-ProgressBar-progress-bar' },
|
|
21
|
-
React.createElement(Filler, Object.assign({}, rest, { contentWidth: width }))));
|
|
19
|
+
const { width, percentage } = props, rest = __rest(props, ["width", "percentage"]);
|
|
20
|
+
return (React.createElement("div", { className: 'jp-Statusbar-ProgressBar-progress-bar', role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": percentage },
|
|
21
|
+
React.createElement(Filler, Object.assign({}, Object.assign({ percentage }, rest), { contentWidth: width }))));
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* A functional tsx component for a partially filled div.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressBar.js","sourceRoot":"","sources":["../../src/components/progressBar.tsx"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;;;;;;;;;;;;AAE3D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA2B/B;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,KAAyB;IACnD,MAAM,EAAE,KAAK,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"progressBar.js","sourceRoot":"","sources":["../../src/components/progressBar.tsx"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;;;;;;;;;;;;AAE3D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA2B/B;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,KAAyB;IACnD,MAAM,EAAE,KAAK,EAAE,UAAU,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAAtC,uBAA8B,CAAQ,CAAC;IAC7C,OAAO,CACL,6BACE,SAAS,EAAE,uCAAuC,EAClD,IAAI,EAAC,aAAa,mBACH,CAAC,mBACD,GAAG,mBACH,UAAU;QAEzB,oBAAC,MAAM,oCAAO,UAAU,IAAK,IAAI,KAAI,YAAY,EAAE,KAAK,IAAI,CACxD,CACP,CAAC;AACJ,CAAC;AA2BD;;GAEG;AACH,SAAS,MAAM,CAAC,KAAoB;IAClC,OAAO,CACL,6BACE,KAAK,EAAE;YACL,KAAK,EAAE,GAAG,KAAK,CAAC,UAAU,GAAG;SAC9B;QAED,+BAAI,KAAK,CAAC,OAAO,CAAK,CAClB,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -12,7 +12,7 @@ export function ProgressCircle(props) {
|
|
|
12
12
|
' z';
|
|
13
13
|
return shape;
|
|
14
14
|
};
|
|
15
|
-
return (React.createElement("div", { className: 'jp-Statusbar-ProgressCircle' },
|
|
15
|
+
return (React.createElement("div", { className: 'jp-Statusbar-ProgressCircle', role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": props.progress },
|
|
16
16
|
React.createElement("svg", { viewBox: "0 0 250 250" },
|
|
17
17
|
React.createElement("circle", { cx: "125", cy: "125", r: `${radius}`, stroke: "var(--jp-inverse-layout-color3)", strokeWidth: "20", fill: "none" }),
|
|
18
18
|
React.createElement("path", { transform: "translate(125,125) scale(.9)", d: d(props.progress), fill: 'var(--jp-inverse-layout-color3)' }))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressCircle.js","sourceRoot":"","sources":["../../src/components/progressCircle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAiB1B,MAAM,UAAU,cAAc,CAAC,KAA4B;IACzD,MAAM,MAAM,GAAG,GAAG,CAAC;IACnB,MAAM,CAAC,GAAG,CAAC,QAAgB,EAAU,EAAE;QACrC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,GAAG,GAAG,EAAE,GAAG,CAAC,CAAC;QAC5C,MAAM,GAAG,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,EACjC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,EAC1B,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,EAC3B,GAAG,GAAG,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACzB,KAAK,GACH,YAAY,MAAM,MAAM,MAAM,IAAI,MAAM,KAAK;YAC7C,GAAG;YACH,KAAK;YACL,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACZ,GAAG;YACH,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACZ,IAAI,CAAC;QACT,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IACF,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"progressCircle.js","sourceRoot":"","sources":["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IAAI,EAAE,iCAAiC,GACvC,CACE,CACF,CACP,CAAC;AACJ,CAAC"}
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;+EAG+E;AAC/E;;;GAGG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;+EAG+E;AAC/E;;;GAGG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC"}
|
package/lib/style/statusbar.d.ts
CHANGED
package/lib/style/statusbar.js
CHANGED
|
@@ -44,4 +44,7 @@ export const item = style({
|
|
|
44
44
|
}, itemPadding);
|
|
45
45
|
export const clickedItem = style(clicked);
|
|
46
46
|
export const interactiveItem = style(interactiveHover);
|
|
47
|
+
export const hoverItem = style({
|
|
48
|
+
boxShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)'
|
|
49
|
+
});
|
|
47
50
|
//# sourceMappingURL=statusbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statusbar.js","sourceRoot":"","sources":["../../src/style/statusbar.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,IAAI,MAAM,aAAa,CAAC;AAE/B,MAAM,WAAW,GAAG;IAClB,WAAW,EAAE,IAAI,CAAC,WAAW;IAC7B,YAAY,EAAE,IAAI,CAAC,WAAW;CAC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S,EAAE,IAAI,CAAC,MAAM;IACtB,UAAU,EAAE,IAAI,CAAC,UAAU;IAC3B,WAAW,EAAE,IAAI,CAAC,UAAU;IAC5B,MAAM,EAAE,IAAI,CAAC,MAAM;IACnB,UAAU,EAAE,IAAI,CAAC,UAAU;IAC3B,YAAY,EAAE,IAAI,CAAC,YAAY;IAC/B,KAAK,EAAE,IAAI,CAAC,SAAS;CACtB,EACD,WAAW,CACZ,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;AAC1C,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAEvD,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC;IAC7B,SAAS,EAAE,iCAAiC;CAC7C,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyterlab/statusbar",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.10",
|
|
4
4
|
"description": "JupyterLab statusbar package.",
|
|
5
5
|
"homepage": "https://github.com/jupyterlab/jupyterlab",
|
|
6
6
|
"bugs": {
|
|
@@ -36,28 +36,24 @@
|
|
|
36
36
|
"watch": "tsc -b --watch"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@jupyterlab/
|
|
40
|
-
"@jupyterlab/codeeditor": "^4.0.0-alpha.1",
|
|
41
|
-
"@jupyterlab/services": "^7.0.0-alpha.1",
|
|
42
|
-
"@jupyterlab/translation": "^4.0.0-alpha.1",
|
|
43
|
-
"@jupyterlab/ui-components": "^4.0.0-alpha.16",
|
|
39
|
+
"@jupyterlab/ui-components": "^4.0.0-alpha.25",
|
|
44
40
|
"@lumino/algorithm": "^1.9.1",
|
|
45
|
-
"@lumino/coreutils": "^1.
|
|
41
|
+
"@lumino/coreutils": "^1.12.0",
|
|
46
42
|
"@lumino/disposable": "^1.10.1",
|
|
47
43
|
"@lumino/messaging": "^1.10.1",
|
|
48
44
|
"@lumino/signaling": "^1.10.1",
|
|
49
|
-
"@lumino/widgets": "^1.
|
|
45
|
+
"@lumino/widgets": "^1.32.0",
|
|
50
46
|
"csstype": "~3.0.3",
|
|
51
47
|
"react": "^17.0.1",
|
|
52
48
|
"typestyle": "^2.0.4"
|
|
53
49
|
},
|
|
54
50
|
"devDependencies": {
|
|
55
|
-
"@jupyterlab/testutils": "^4.0.0-alpha.
|
|
51
|
+
"@jupyterlab/testutils": "^4.0.0-alpha.10",
|
|
56
52
|
"@types/jest": "^26.0.10",
|
|
57
53
|
"jest": "^26.4.2",
|
|
58
54
|
"rimraf": "~3.0.0",
|
|
59
55
|
"ts-jest": "^26.3.0",
|
|
60
|
-
"typescript": "~4.
|
|
56
|
+
"typescript": "~4.6.3"
|
|
61
57
|
},
|
|
62
58
|
"publishConfig": {
|
|
63
59
|
"access": "public"
|
package/style/base.css
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
height: 24px;
|
|
21
21
|
align-self: normal;
|
|
22
22
|
}
|
|
23
|
+
|
|
23
24
|
.jp-Statusbar-ProgressCircle path {
|
|
24
25
|
fill: var(--jp-inverse-layout-color3);
|
|
25
26
|
}
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
overflow: hidden;
|
|
33
34
|
align-self: center;
|
|
34
35
|
}
|
|
36
|
+
|
|
35
37
|
.jp-Statusbar-ProgressBar-progress-bar > div {
|
|
36
38
|
background-color: var(--jp-brand-color2);
|
|
37
39
|
background-image: linear-gradient(
|
|
@@ -50,7 +52,7 @@
|
|
|
50
52
|
height: 100%;
|
|
51
53
|
font-size: 12px;
|
|
52
54
|
line-height: 14px;
|
|
53
|
-
color: #
|
|
55
|
+
color: #fff;
|
|
54
56
|
text-align: center;
|
|
55
57
|
animation: jp-Statusbar-ExecutionTime-progress-bar 2s linear infinite;
|
|
56
58
|
}
|
|
@@ -67,6 +69,7 @@
|
|
|
67
69
|
0% {
|
|
68
70
|
background-position: 0 0;
|
|
69
71
|
}
|
|
72
|
+
|
|
70
73
|
100% {
|
|
71
74
|
background-position: 40px 40px;
|
|
72
75
|
}
|
package/style/index.css
CHANGED
|
@@ -6,7 +6,5 @@
|
|
|
6
6
|
/* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */
|
|
7
7
|
@import url('~@lumino/widgets/style/index.css');
|
|
8
8
|
@import url('~@jupyterlab/ui-components/style/index.css');
|
|
9
|
-
@import url('~@jupyterlab/apputils/style/index.css');
|
|
10
|
-
@import url('~@jupyterlab/codeeditor/style/index.css');
|
|
11
9
|
|
|
12
10
|
@import url('./base.css');
|
package/style/index.js
CHANGED
|
@@ -6,7 +6,5 @@
|
|
|
6
6
|
/* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */
|
|
7
7
|
import '@lumino/widgets/style/index.js';
|
|
8
8
|
import '@jupyterlab/ui-components/style/index.js';
|
|
9
|
-
import '@jupyterlab/apputils/style/index.js';
|
|
10
|
-
import '@jupyterlab/codeeditor/style/index.js';
|
|
11
9
|
|
|
12
10
|
import './base.css';
|
package/lib/defaults/index.d.ts
DELETED
package/lib/defaults/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/defaults/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { ISessionContext } from '@jupyterlab/apputils';
|
|
2
|
-
import { ITranslator } from '@jupyterlab/translation';
|
|
3
|
-
import { VDomModel, VDomRenderer } from '@jupyterlab/ui-components';
|
|
4
|
-
/**
|
|
5
|
-
* A VDomRenderer widget for displaying the status of a kernel.
|
|
6
|
-
*/
|
|
7
|
-
export declare class KernelStatus extends VDomRenderer<KernelStatus.Model> {
|
|
8
|
-
/**
|
|
9
|
-
* Construct the kernel status widget.
|
|
10
|
-
*/
|
|
11
|
-
constructor(opts: KernelStatus.IOptions, translator?: ITranslator);
|
|
12
|
-
/**
|
|
13
|
-
* Render the kernel status item.
|
|
14
|
-
*/
|
|
15
|
-
render(): JSX.Element | null;
|
|
16
|
-
translator: ITranslator;
|
|
17
|
-
private _handleClick;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* A namespace for KernelStatus statics.
|
|
21
|
-
*/
|
|
22
|
-
export declare namespace KernelStatus {
|
|
23
|
-
/**
|
|
24
|
-
* A VDomModel for the kernel status indicator.
|
|
25
|
-
*/
|
|
26
|
-
class Model extends VDomModel {
|
|
27
|
-
constructor(translator?: ITranslator);
|
|
28
|
-
/**
|
|
29
|
-
* The name of the kernel.
|
|
30
|
-
*/
|
|
31
|
-
get kernelName(): string;
|
|
32
|
-
/**
|
|
33
|
-
* The current status of the kernel.
|
|
34
|
-
*/
|
|
35
|
-
get status(): string | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* A display name for the activity.
|
|
38
|
-
*/
|
|
39
|
-
get activityName(): string;
|
|
40
|
-
set activityName(val: string);
|
|
41
|
-
/**
|
|
42
|
-
* The current client session associated with the kernel status indicator.
|
|
43
|
-
*/
|
|
44
|
-
get sessionContext(): ISessionContext | null;
|
|
45
|
-
set sessionContext(sessionContext: ISessionContext | null);
|
|
46
|
-
/**
|
|
47
|
-
* React to changes to the kernel status.
|
|
48
|
-
*/
|
|
49
|
-
private _onKernelStatusChanged;
|
|
50
|
-
/**
|
|
51
|
-
* React to changes in the kernel.
|
|
52
|
-
*/
|
|
53
|
-
private _onKernelChanged;
|
|
54
|
-
private _getAllState;
|
|
55
|
-
private _triggerChange;
|
|
56
|
-
protected translation: ITranslator;
|
|
57
|
-
private _trans;
|
|
58
|
-
private _activityName;
|
|
59
|
-
private _kernelName;
|
|
60
|
-
private _kernelStatus;
|
|
61
|
-
private _sessionContext;
|
|
62
|
-
private readonly _statusNames;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Options for creating a KernelStatus object.
|
|
66
|
-
*/
|
|
67
|
-
interface IOptions {
|
|
68
|
-
/**
|
|
69
|
-
* A click handler for the item. By default
|
|
70
|
-
* we launch a kernel selection dialog.
|
|
71
|
-
*/
|
|
72
|
-
onClick: () => void;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Jupyter Development Team.
|
|
2
|
-
// Distributed under the terms of the Modified BSD License.
|
|
3
|
-
import { translateKernelStatuses } from '@jupyterlab/apputils';
|
|
4
|
-
import { nullTranslator } from '@jupyterlab/translation';
|
|
5
|
-
import { VDomModel, VDomRenderer } from '@jupyterlab/ui-components';
|
|
6
|
-
import { JSONExt } from '@lumino/coreutils';
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import { interactiveItem, TextItem } from '..';
|
|
9
|
-
/**
|
|
10
|
-
* A pure functional component for rendering kernel status.
|
|
11
|
-
*/
|
|
12
|
-
function KernelStatusComponent(props) {
|
|
13
|
-
const translator = props.translator || nullTranslator;
|
|
14
|
-
const trans = translator.load('jupyterlab');
|
|
15
|
-
let statusText = '';
|
|
16
|
-
if (props.status) {
|
|
17
|
-
statusText = ` | ${props.status}`;
|
|
18
|
-
}
|
|
19
|
-
return (React.createElement(TextItem, { onClick: props.handleClick, source: `${props.kernelName}${statusText}`, title: trans.__('Change kernel for %1', props.activityName) }));
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* A VDomRenderer widget for displaying the status of a kernel.
|
|
23
|
-
*/
|
|
24
|
-
export class KernelStatus extends VDomRenderer {
|
|
25
|
-
/**
|
|
26
|
-
* Construct the kernel status widget.
|
|
27
|
-
*/
|
|
28
|
-
constructor(opts, translator) {
|
|
29
|
-
super(new KernelStatus.Model(translator));
|
|
30
|
-
this.translator = translator || nullTranslator;
|
|
31
|
-
this._handleClick = opts.onClick;
|
|
32
|
-
this.addClass(interactiveItem);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Render the kernel status item.
|
|
36
|
-
*/
|
|
37
|
-
render() {
|
|
38
|
-
if (this.model === null) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
return (React.createElement(KernelStatusComponent, { status: this.model.status, kernelName: this.model.kernelName, activityName: this.model.activityName, handleClick: this._handleClick, translator: this.translator }));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* A namespace for KernelStatus statics.
|
|
48
|
-
*/
|
|
49
|
-
(function (KernelStatus) {
|
|
50
|
-
/**
|
|
51
|
-
* A VDomModel for the kernel status indicator.
|
|
52
|
-
*/
|
|
53
|
-
class Model extends VDomModel {
|
|
54
|
-
constructor(translator) {
|
|
55
|
-
super();
|
|
56
|
-
/**
|
|
57
|
-
* React to changes to the kernel status.
|
|
58
|
-
*/
|
|
59
|
-
this._onKernelStatusChanged = () => {
|
|
60
|
-
var _a;
|
|
61
|
-
this._kernelStatus = (_a = this._sessionContext) === null || _a === void 0 ? void 0 : _a.kernelDisplayStatus;
|
|
62
|
-
this.stateChanged.emit(void 0);
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* React to changes in the kernel.
|
|
66
|
-
*/
|
|
67
|
-
this._onKernelChanged = (_sessionContext, change) => {
|
|
68
|
-
var _a;
|
|
69
|
-
const oldState = this._getAllState();
|
|
70
|
-
// sync setting of status and display name
|
|
71
|
-
this._kernelStatus = (_a = this._sessionContext) === null || _a === void 0 ? void 0 : _a.kernelDisplayStatus;
|
|
72
|
-
this._kernelName = _sessionContext.kernelDisplayName;
|
|
73
|
-
this._triggerChange(oldState, this._getAllState());
|
|
74
|
-
};
|
|
75
|
-
this._activityName = 'activity'; // FIXME-TRANS:?
|
|
76
|
-
this._kernelStatus = '';
|
|
77
|
-
this._sessionContext = null;
|
|
78
|
-
translator = translator || nullTranslator;
|
|
79
|
-
this._trans = translator.load('jupyterlab');
|
|
80
|
-
this._kernelName = this._trans.__('No Kernel!');
|
|
81
|
-
this._statusNames = translateKernelStatuses(translator);
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* The name of the kernel.
|
|
85
|
-
*/
|
|
86
|
-
get kernelName() {
|
|
87
|
-
return this._kernelName;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* The current status of the kernel.
|
|
91
|
-
*/
|
|
92
|
-
get status() {
|
|
93
|
-
return this._kernelStatus
|
|
94
|
-
? this._statusNames[this._kernelStatus]
|
|
95
|
-
: undefined;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* A display name for the activity.
|
|
99
|
-
*/
|
|
100
|
-
get activityName() {
|
|
101
|
-
return this._activityName;
|
|
102
|
-
}
|
|
103
|
-
set activityName(val) {
|
|
104
|
-
const oldVal = this._activityName;
|
|
105
|
-
if (oldVal === val) {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
this._activityName = val;
|
|
109
|
-
this.stateChanged.emit(void 0);
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* The current client session associated with the kernel status indicator.
|
|
113
|
-
*/
|
|
114
|
-
get sessionContext() {
|
|
115
|
-
return this._sessionContext;
|
|
116
|
-
}
|
|
117
|
-
set sessionContext(sessionContext) {
|
|
118
|
-
var _a, _b, _c;
|
|
119
|
-
(_a = this._sessionContext) === null || _a === void 0 ? void 0 : _a.statusChanged.disconnect(this._onKernelStatusChanged);
|
|
120
|
-
(_b = this._sessionContext) === null || _b === void 0 ? void 0 : _b.kernelChanged.disconnect(this._onKernelChanged);
|
|
121
|
-
const oldState = this._getAllState();
|
|
122
|
-
this._sessionContext = sessionContext;
|
|
123
|
-
this._kernelStatus = sessionContext === null || sessionContext === void 0 ? void 0 : sessionContext.kernelDisplayStatus;
|
|
124
|
-
this._kernelName = (_c = sessionContext === null || sessionContext === void 0 ? void 0 : sessionContext.kernelDisplayName) !== null && _c !== void 0 ? _c : this._trans.__('No Kernel');
|
|
125
|
-
sessionContext === null || sessionContext === void 0 ? void 0 : sessionContext.statusChanged.connect(this._onKernelStatusChanged, this);
|
|
126
|
-
sessionContext === null || sessionContext === void 0 ? void 0 : sessionContext.connectionStatusChanged.connect(this._onKernelStatusChanged, this);
|
|
127
|
-
sessionContext === null || sessionContext === void 0 ? void 0 : sessionContext.kernelChanged.connect(this._onKernelChanged, this);
|
|
128
|
-
this._triggerChange(oldState, this._getAllState());
|
|
129
|
-
}
|
|
130
|
-
_getAllState() {
|
|
131
|
-
return [this._kernelName, this._kernelStatus, this._activityName];
|
|
132
|
-
}
|
|
133
|
-
_triggerChange(oldState, newState) {
|
|
134
|
-
if (JSONExt.deepEqual(oldState, newState)) {
|
|
135
|
-
this.stateChanged.emit(void 0);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
KernelStatus.Model = Model;
|
|
140
|
-
})(KernelStatus || (KernelStatus = {}));
|
|
141
|
-
//# sourceMappingURL=kernelStatus.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kernelStatus.js","sourceRoot":"","sources":["../../src/defaults/kernelStatus.tsx"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAmB,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEhF,OAAO,EAEL,cAAc,EAEf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAa,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAE/C;;GAEG;AACH,SAAS,qBAAqB,CAC5B,KAAmC;IAEnC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,cAAc,CAAC;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aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE;YACnE,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;QACrD,CAAC;QAyBO,YAAY;YAClB,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QACpE,CAAC;QAEO,cAAc,CAAC,QAAuB,EAAE,QAAuB;YACrE,IAAI,OAAO,CAAC,SAAS,CAAC,QAAqB,EAAE,QAAqB,CAAC,EAAE;gBACnE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;aAChC;QACH,CAAC;KAYF;IA7GY,kBAAK,QA6GjB,CAAA;AAYH,CAAC,EA7HgB,YAAY,KAAZ,YAAY,QA6H5B"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { CodeEditor } from '@jupyterlab/codeeditor';
|
|
2
|
-
import { ITranslator } from '@jupyterlab/translation';
|
|
3
|
-
import { VDomModel, VDomRenderer } from '@jupyterlab/ui-components';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
/**
|
|
6
|
-
* A namespace for LineColComponent.
|
|
7
|
-
*/
|
|
8
|
-
declare namespace LineColComponent {
|
|
9
|
-
/**
|
|
10
|
-
* Props for LineColComponent.
|
|
11
|
-
*/
|
|
12
|
-
interface IProps {
|
|
13
|
-
/**
|
|
14
|
-
* The current line number.
|
|
15
|
-
*/
|
|
16
|
-
line: number;
|
|
17
|
-
/**
|
|
18
|
-
* The current column number.
|
|
19
|
-
*/
|
|
20
|
-
column: number;
|
|
21
|
-
/**
|
|
22
|
-
* The application language translator.
|
|
23
|
-
*/
|
|
24
|
-
translator?: ITranslator;
|
|
25
|
-
/**
|
|
26
|
-
* A click handler for the LineColComponent, which
|
|
27
|
-
* we use to launch the LineFormComponent.
|
|
28
|
-
*/
|
|
29
|
-
handleClick: () => void;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* A pure functional component for rendering a line/column
|
|
34
|
-
* status item.
|
|
35
|
-
*/
|
|
36
|
-
declare function LineColComponent(props: LineColComponent.IProps): React.ReactElement<LineColComponent.IProps>;
|
|
37
|
-
/**
|
|
38
|
-
* A widget implementing a line/column status item.
|
|
39
|
-
*/
|
|
40
|
-
export declare class LineCol extends VDomRenderer<LineCol.Model> {
|
|
41
|
-
/**
|
|
42
|
-
* Construct a new LineCol status item.
|
|
43
|
-
*/
|
|
44
|
-
constructor(translator?: ITranslator);
|
|
45
|
-
/**
|
|
46
|
-
* Render the status item.
|
|
47
|
-
*/
|
|
48
|
-
render(): React.ReactElement<LineColComponent.IProps> | null;
|
|
49
|
-
/**
|
|
50
|
-
* A click handler for the widget.
|
|
51
|
-
*/
|
|
52
|
-
private _handleClick;
|
|
53
|
-
/**
|
|
54
|
-
* Handle submission for the widget.
|
|
55
|
-
*/
|
|
56
|
-
private _handleSubmit;
|
|
57
|
-
protected translator: ITranslator;
|
|
58
|
-
private _popup;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* A namespace for LineCol statics.
|
|
62
|
-
*/
|
|
63
|
-
export declare namespace LineCol {
|
|
64
|
-
/**
|
|
65
|
-
* A VDom model for a status item tracking the line/column of an editor.
|
|
66
|
-
*/
|
|
67
|
-
class Model extends VDomModel {
|
|
68
|
-
/**
|
|
69
|
-
* The current editor of the model.
|
|
70
|
-
*/
|
|
71
|
-
get editor(): CodeEditor.IEditor | null;
|
|
72
|
-
set editor(editor: CodeEditor.IEditor | null);
|
|
73
|
-
/**
|
|
74
|
-
* The current line of the model.
|
|
75
|
-
*/
|
|
76
|
-
get line(): number;
|
|
77
|
-
/**
|
|
78
|
-
* The current column of the model.
|
|
79
|
-
*/
|
|
80
|
-
get column(): number;
|
|
81
|
-
/**
|
|
82
|
-
* React to a change in the cursors of the current editor.
|
|
83
|
-
*/
|
|
84
|
-
private _onSelectionChanged;
|
|
85
|
-
private _getAllState;
|
|
86
|
-
private _triggerChange;
|
|
87
|
-
private _line;
|
|
88
|
-
private _column;
|
|
89
|
-
private _editor;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
export {};
|
package/lib/defaults/lineCol.js
DELETED
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Jupyter Development Team.
|
|
2
|
-
// Distributed under the terms of the Modified BSD License.
|
|
3
|
-
import { nullTranslator } from '@jupyterlab/translation';
|
|
4
|
-
import { lineFormIcon, ReactWidget, VDomModel, VDomRenderer } from '@jupyterlab/ui-components';
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { classes } from 'typestyle/lib';
|
|
7
|
-
import { interactiveItem, showPopup, TextItem } from '..';
|
|
8
|
-
import { lineFormButton, lineFormButtonDiv, lineFormButtonIcon, lineFormCaption, lineFormInput, lineFormSearch, lineFormWrapper, lineFormWrapperFocusWithin } from '../style/lineForm';
|
|
9
|
-
/**
|
|
10
|
-
* A component for rendering a "go-to-line" form.
|
|
11
|
-
*/
|
|
12
|
-
class LineFormComponent extends React.Component {
|
|
13
|
-
/**
|
|
14
|
-
* Construct a new LineFormComponent.
|
|
15
|
-
*/
|
|
16
|
-
constructor(props) {
|
|
17
|
-
super(props);
|
|
18
|
-
/**
|
|
19
|
-
* Handle a change to the value in the input field.
|
|
20
|
-
*/
|
|
21
|
-
this._handleChange = (event) => {
|
|
22
|
-
this.setState({ value: event.currentTarget.value });
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Handle submission of the input field.
|
|
26
|
-
*/
|
|
27
|
-
this._handleSubmit = (event) => {
|
|
28
|
-
event.preventDefault();
|
|
29
|
-
const value = parseInt(this._textInput.value, 10);
|
|
30
|
-
if (!isNaN(value) &&
|
|
31
|
-
isFinite(value) &&
|
|
32
|
-
1 <= value &&
|
|
33
|
-
value <= this.props.maxLine) {
|
|
34
|
-
this.props.handleSubmit(value);
|
|
35
|
-
}
|
|
36
|
-
return false;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Handle focusing of the input field.
|
|
40
|
-
*/
|
|
41
|
-
this._handleFocus = () => {
|
|
42
|
-
this.setState({ hasFocus: true });
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* Handle blurring of the input field.
|
|
46
|
-
*/
|
|
47
|
-
this._handleBlur = () => {
|
|
48
|
-
this.setState({ hasFocus: false });
|
|
49
|
-
};
|
|
50
|
-
this._textInput = null;
|
|
51
|
-
this.translator = props.translator || nullTranslator;
|
|
52
|
-
this._trans = this.translator.load('jupyterlab');
|
|
53
|
-
this.state = {
|
|
54
|
-
value: '',
|
|
55
|
-
hasFocus: false
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Focus the element on mount.
|
|
60
|
-
*/
|
|
61
|
-
componentDidMount() {
|
|
62
|
-
this._textInput.focus();
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Render the LineFormComponent.
|
|
66
|
-
*/
|
|
67
|
-
render() {
|
|
68
|
-
return (React.createElement("div", { className: lineFormSearch },
|
|
69
|
-
React.createElement("form", { name: "lineColumnForm", onSubmit: this._handleSubmit, noValidate: true },
|
|
70
|
-
React.createElement("div", { className: classes(lineFormWrapper, 'lm-lineForm-wrapper', this.state.hasFocus ? lineFormWrapperFocusWithin : undefined) },
|
|
71
|
-
React.createElement("input", { type: "text", className: lineFormInput, onChange: this._handleChange, onFocus: this._handleFocus, onBlur: this._handleBlur, value: this.state.value, ref: input => {
|
|
72
|
-
this._textInput = input;
|
|
73
|
-
} }),
|
|
74
|
-
React.createElement("div", { className: lineFormButtonDiv },
|
|
75
|
-
React.createElement(lineFormIcon.react, { className: lineFormButtonIcon, elementPosition: "center" }),
|
|
76
|
-
React.createElement("input", { type: "submit", className: lineFormButton, value: "" }))),
|
|
77
|
-
React.createElement("label", { className: lineFormCaption }, this._trans.__('Go to line number between 1 and %1', this.props.maxLine)))));
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* A pure functional component for rendering a line/column
|
|
82
|
-
* status item.
|
|
83
|
-
*/
|
|
84
|
-
function LineColComponent(props) {
|
|
85
|
-
const translator = props.translator || nullTranslator;
|
|
86
|
-
const trans = translator.load('jupyterlab');
|
|
87
|
-
return (React.createElement(TextItem, { onClick: props.handleClick, source: trans.__('Ln %1, Col %2', props.line, props.column), title: trans.__('Go to line number…') }));
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* A widget implementing a line/column status item.
|
|
91
|
-
*/
|
|
92
|
-
export class LineCol extends VDomRenderer {
|
|
93
|
-
/**
|
|
94
|
-
* Construct a new LineCol status item.
|
|
95
|
-
*/
|
|
96
|
-
constructor(translator) {
|
|
97
|
-
super(new LineCol.Model());
|
|
98
|
-
this._popup = null;
|
|
99
|
-
this.addClass(interactiveItem);
|
|
100
|
-
this.translator = translator || nullTranslator;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Render the status item.
|
|
104
|
-
*/
|
|
105
|
-
render() {
|
|
106
|
-
if (this.model === null) {
|
|
107
|
-
return null;
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
return (React.createElement(LineColComponent, { line: this.model.line, column: this.model.column, translator: this.translator, handleClick: () => this._handleClick() }));
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* A click handler for the widget.
|
|
115
|
-
*/
|
|
116
|
-
_handleClick() {
|
|
117
|
-
if (this._popup) {
|
|
118
|
-
this._popup.dispose();
|
|
119
|
-
}
|
|
120
|
-
const body = ReactWidget.create(React.createElement(LineFormComponent, { handleSubmit: val => this._handleSubmit(val), currentLine: this.model.line, maxLine: this.model.editor.lineCount, translator: this.translator }));
|
|
121
|
-
this._popup = showPopup({
|
|
122
|
-
body: body,
|
|
123
|
-
anchor: this,
|
|
124
|
-
align: 'right'
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Handle submission for the widget.
|
|
129
|
-
*/
|
|
130
|
-
_handleSubmit(value) {
|
|
131
|
-
this.model.editor.setCursorPosition({ line: value - 1, column: 0 });
|
|
132
|
-
this._popup.dispose();
|
|
133
|
-
this.model.editor.focus();
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* A namespace for LineCol statics.
|
|
138
|
-
*/
|
|
139
|
-
(function (LineCol) {
|
|
140
|
-
/**
|
|
141
|
-
* A VDom model for a status item tracking the line/column of an editor.
|
|
142
|
-
*/
|
|
143
|
-
class Model extends VDomModel {
|
|
144
|
-
constructor() {
|
|
145
|
-
super(...arguments);
|
|
146
|
-
/**
|
|
147
|
-
* React to a change in the cursors of the current editor.
|
|
148
|
-
*/
|
|
149
|
-
this._onSelectionChanged = () => {
|
|
150
|
-
const oldState = this._getAllState();
|
|
151
|
-
const pos = this.editor.getCursorPosition();
|
|
152
|
-
this._line = pos.line + 1;
|
|
153
|
-
this._column = pos.column + 1;
|
|
154
|
-
this._triggerChange(oldState, this._getAllState());
|
|
155
|
-
};
|
|
156
|
-
this._line = 1;
|
|
157
|
-
this._column = 1;
|
|
158
|
-
this._editor = null;
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* The current editor of the model.
|
|
162
|
-
*/
|
|
163
|
-
get editor() {
|
|
164
|
-
return this._editor;
|
|
165
|
-
}
|
|
166
|
-
set editor(editor) {
|
|
167
|
-
const oldEditor = this._editor;
|
|
168
|
-
if (oldEditor) {
|
|
169
|
-
oldEditor.model.selections.changed.disconnect(this._onSelectionChanged);
|
|
170
|
-
}
|
|
171
|
-
const oldState = this._getAllState();
|
|
172
|
-
this._editor = editor;
|
|
173
|
-
if (!this._editor) {
|
|
174
|
-
this._column = 1;
|
|
175
|
-
this._line = 1;
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
this._editor.model.selections.changed.connect(this._onSelectionChanged);
|
|
179
|
-
const pos = this._editor.getCursorPosition();
|
|
180
|
-
this._column = pos.column + 1;
|
|
181
|
-
this._line = pos.line + 1;
|
|
182
|
-
}
|
|
183
|
-
this._triggerChange(oldState, this._getAllState());
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* The current line of the model.
|
|
187
|
-
*/
|
|
188
|
-
get line() {
|
|
189
|
-
return this._line;
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* The current column of the model.
|
|
193
|
-
*/
|
|
194
|
-
get column() {
|
|
195
|
-
return this._column;
|
|
196
|
-
}
|
|
197
|
-
_getAllState() {
|
|
198
|
-
return [this._line, this._column];
|
|
199
|
-
}
|
|
200
|
-
_triggerChange(oldState, newState) {
|
|
201
|
-
if (oldState[0] !== newState[0] || oldState[1] !== newState[1]) {
|
|
202
|
-
this.stateChanged.emit(void 0);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
LineCol.Model = Model;
|
|
207
|
-
})(LineCol || (LineCol = {}));
|
|
208
|
-
//# sourceMappingURL=lineCol.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lineCol.js","sourceRoot":"","sources":["../../src/defaults/lineCol.tsx"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAG3D,OAAO,EAEL,cAAc,EAEf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,YAAY,EACZ,WAAW,EACX,SAAS,EACT,YAAY,EACb,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,eAAe,EAAS,SAAS,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACjE,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,cAAc,EACd,eAAe,EACf,0BAA0B,EAC3B,MAAM,mBAAmB,CAAC;AAgD3B;;G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QAAQ,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE;gBAC9D,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;aAChC;QACH,CAAC;KAKF;IAvEY,aAAK,QAuEjB,CAAA;AACH,CAAC,EA5EgB,OAAO,KAAP,OAAO,QA4EvB"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { ServiceManager } from '@jupyterlab/services';
|
|
2
|
-
import { ITranslator } from '@jupyterlab/translation';
|
|
3
|
-
import { VDomModel, VDomRenderer } from '@jupyterlab/ui-components';
|
|
4
|
-
/**
|
|
5
|
-
* A VDomRenderer for a RunningSessions status item.
|
|
6
|
-
*/
|
|
7
|
-
export declare class RunningSessions extends VDomRenderer<RunningSessions.Model> {
|
|
8
|
-
/**
|
|
9
|
-
* Create a new RunningSessions widget.
|
|
10
|
-
*/
|
|
11
|
-
constructor(opts: RunningSessions.IOptions);
|
|
12
|
-
/**
|
|
13
|
-
* Render the running sessions widget.
|
|
14
|
-
*/
|
|
15
|
-
render(): JSX.Element | null;
|
|
16
|
-
/**
|
|
17
|
-
* Dispose of the status item.
|
|
18
|
-
*/
|
|
19
|
-
dispose(): void;
|
|
20
|
-
/**
|
|
21
|
-
* Set the number of kernel sessions when the list changes.
|
|
22
|
-
*/
|
|
23
|
-
private _onSessionsRunningChanged;
|
|
24
|
-
/**
|
|
25
|
-
* Set the number of terminal sessions when the list changes.
|
|
26
|
-
*/
|
|
27
|
-
private _onTerminalsRunningChanged;
|
|
28
|
-
protected translator: ITranslator;
|
|
29
|
-
private _trans;
|
|
30
|
-
private _handleClick;
|
|
31
|
-
private _serviceManager;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* A namespace for RunningSessions statics.
|
|
35
|
-
*/
|
|
36
|
-
export declare namespace RunningSessions {
|
|
37
|
-
/**
|
|
38
|
-
* A VDomModel for the RunningSessions status item.
|
|
39
|
-
*/
|
|
40
|
-
class Model extends VDomModel {
|
|
41
|
-
/**
|
|
42
|
-
* The number of active kernel sessions.
|
|
43
|
-
*/
|
|
44
|
-
get sessions(): number;
|
|
45
|
-
set sessions(sessions: number);
|
|
46
|
-
/**
|
|
47
|
-
* The number of active terminal sessions.
|
|
48
|
-
*/
|
|
49
|
-
get terminals(): number;
|
|
50
|
-
set terminals(terminals: number);
|
|
51
|
-
private _terminals;
|
|
52
|
-
private _sessions;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Options for creating a RunningSessions item.
|
|
56
|
-
*/
|
|
57
|
-
interface IOptions {
|
|
58
|
-
/**
|
|
59
|
-
* The application service manager.
|
|
60
|
-
*/
|
|
61
|
-
serviceManager: ServiceManager.IManager;
|
|
62
|
-
/**
|
|
63
|
-
* A click handler for the item. By default this is used
|
|
64
|
-
* to activate the running sessions side panel.
|
|
65
|
-
*/
|
|
66
|
-
onClick: () => void;
|
|
67
|
-
/**
|
|
68
|
-
* The application language translator.
|
|
69
|
-
*/
|
|
70
|
-
translator?: ITranslator;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Jupyter Development Team.
|
|
2
|
-
// Distributed under the terms of the Modified BSD License.
|
|
3
|
-
import { nullTranslator } from '@jupyterlab/translation';
|
|
4
|
-
import { kernelIcon, terminalIcon, VDomModel, VDomRenderer } from '@jupyterlab/ui-components';
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { GroupItem, interactiveItem, TextItem } from '..';
|
|
7
|
-
/**
|
|
8
|
-
* Half spacing between subitems in a status item.
|
|
9
|
-
*/
|
|
10
|
-
const HALF_SPACING = 4;
|
|
11
|
-
/**
|
|
12
|
-
* A pure functional component for rendering kernel and terminal sessions.
|
|
13
|
-
*
|
|
14
|
-
* @param props: the props for the component.
|
|
15
|
-
*
|
|
16
|
-
* @returns a tsx component for the running sessions.
|
|
17
|
-
*/
|
|
18
|
-
function RunningSessionsComponent(props) {
|
|
19
|
-
return (React.createElement(GroupItem, { spacing: HALF_SPACING, onClick: props.handleClick },
|
|
20
|
-
React.createElement(GroupItem, { spacing: HALF_SPACING },
|
|
21
|
-
React.createElement(TextItem, { source: props.terminals }),
|
|
22
|
-
React.createElement(terminalIcon.react, { left: '1px', top: '3px', stylesheet: 'statusBar' })),
|
|
23
|
-
React.createElement(GroupItem, { spacing: HALF_SPACING },
|
|
24
|
-
React.createElement(TextItem, { source: props.sessions }),
|
|
25
|
-
React.createElement(kernelIcon.react, { top: '2px', stylesheet: 'statusBar' }))));
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* A VDomRenderer for a RunningSessions status item.
|
|
29
|
-
*/
|
|
30
|
-
export class RunningSessions extends VDomRenderer {
|
|
31
|
-
/**
|
|
32
|
-
* Create a new RunningSessions widget.
|
|
33
|
-
*/
|
|
34
|
-
constructor(opts) {
|
|
35
|
-
super(new RunningSessions.Model());
|
|
36
|
-
this._serviceManager = opts.serviceManager;
|
|
37
|
-
this._handleClick = opts.onClick;
|
|
38
|
-
this.translator = opts.translator || nullTranslator;
|
|
39
|
-
this._trans = this.translator.load('jupyterload');
|
|
40
|
-
this._serviceManager.sessions.runningChanged.connect(this._onSessionsRunningChanged, this);
|
|
41
|
-
this._serviceManager.terminals.runningChanged.connect(this._onTerminalsRunningChanged, this);
|
|
42
|
-
this.addClass(interactiveItem);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Render the running sessions widget.
|
|
46
|
-
*/
|
|
47
|
-
render() {
|
|
48
|
-
if (!this.model) {
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
// TODO-TRANS: Should probably be handled differently.
|
|
52
|
-
// This is more localizable friendly: "Terminals: %1 | Kernels: %2"
|
|
53
|
-
this.title.caption = this._trans.__('%1 Terminals, %2 Kernel sessions', this.model.terminals, this.model.sessions);
|
|
54
|
-
return (React.createElement(RunningSessionsComponent, { sessions: this.model.sessions, terminals: this.model.terminals, handleClick: this._handleClick }));
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Dispose of the status item.
|
|
58
|
-
*/
|
|
59
|
-
dispose() {
|
|
60
|
-
super.dispose();
|
|
61
|
-
this._serviceManager.sessions.runningChanged.disconnect(this._onSessionsRunningChanged, this);
|
|
62
|
-
this._serviceManager.terminals.runningChanged.disconnect(this._onTerminalsRunningChanged, this);
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Set the number of kernel sessions when the list changes.
|
|
66
|
-
*/
|
|
67
|
-
_onSessionsRunningChanged(manager, sessions) {
|
|
68
|
-
this.model.sessions = sessions.length;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Set the number of terminal sessions when the list changes.
|
|
72
|
-
*/
|
|
73
|
-
_onTerminalsRunningChanged(manager, terminals) {
|
|
74
|
-
this.model.terminals = terminals.length;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* A namespace for RunningSessions statics.
|
|
79
|
-
*/
|
|
80
|
-
(function (RunningSessions) {
|
|
81
|
-
/**
|
|
82
|
-
* A VDomModel for the RunningSessions status item.
|
|
83
|
-
*/
|
|
84
|
-
class Model extends VDomModel {
|
|
85
|
-
constructor() {
|
|
86
|
-
super(...arguments);
|
|
87
|
-
this._terminals = 0;
|
|
88
|
-
this._sessions = 0;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* The number of active kernel sessions.
|
|
92
|
-
*/
|
|
93
|
-
get sessions() {
|
|
94
|
-
return this._sessions;
|
|
95
|
-
}
|
|
96
|
-
set sessions(sessions) {
|
|
97
|
-
const oldSessions = this._sessions;
|
|
98
|
-
this._sessions = sessions;
|
|
99
|
-
if (oldSessions !== this._sessions) {
|
|
100
|
-
this.stateChanged.emit(void 0);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* The number of active terminal sessions.
|
|
105
|
-
*/
|
|
106
|
-
get terminals() {
|
|
107
|
-
return this._terminals;
|
|
108
|
-
}
|
|
109
|
-
set terminals(terminals) {
|
|
110
|
-
const oldTerminals = this._terminals;
|
|
111
|
-
this._terminals = terminals;
|
|
112
|
-
if (oldTerminals !== this._terminals) {
|
|
113
|
-
this.stateChanged.emit(void 0);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
RunningSessions.Model = Model;
|
|
118
|
-
})(RunningSessions || (RunningSessions = {}));
|
|
119
|
-
//# sourceMappingURL=runningSessions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runningSessions.js","sourceRoot":"","sources":["../../src/defaults/runningSessions.tsx"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAS3D,OAAO,EAEL,cAAc,EAEf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,UAAU,EACV,YAAY,EACZ,SAAS,EACT,YAAY,EACb,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAE1D;;GAEG;AACH,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB;;;;;;GAMG;AACH,SAAS,wBAAwB,CAC/B,KAAsC;IAEtC,OAAO,CACL,oBAAC,SAAS,IAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,CAAC,WAAW;QAC1D,oBAAC,SAAS,IAAC,OAAO,EAAE,YAAY;YAC9B,oBAAC,QAAQ,IAAC,MAAM,EAAE,KAAK,CAAC,SAAS,GAAI;YACrC,oBAAC,YAAY,CAAC,KAAK,IAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,GAAI,CAC9D;QACZ,oBAAC,SAAS,IAAC,OAAO,EAAE,YAAY;YAC9B,o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UAAU,CAAC;QACzB,CAAC;QACD,IAAI,SAAS,CAAC,SAAiB;YAC7B,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC;YACrC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;YAE5B,IAAI,YAAY,KAAK,IAAI,CAAC,UAAU,EAAE;gBACpC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;aAChC;QACH,CAAC;KAIF;IAjCY,qBAAK,QAiCjB,CAAA;AAsBH,CAAC,EA3DgB,eAAe,KAAf,eAAe,QA2D/B"}
|
package/lib/style/lineForm.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { NestedCSSProperties } from 'typestyle/lib/types';
|
|
2
|
-
export declare const hoverItem: string;
|
|
3
|
-
export declare const lineFormSearch: string;
|
|
4
|
-
export declare const lineFormCaption: string;
|
|
5
|
-
export declare const baseLineForm: NestedCSSProperties;
|
|
6
|
-
export declare const lineFormButtonDiv: string;
|
|
7
|
-
export declare const lineFormButtonIcon: string;
|
|
8
|
-
export declare const lineFormButton: string;
|
|
9
|
-
export declare const lineFormWrapper: string;
|
|
10
|
-
export declare const lineFormWrapperFocusWithin: string;
|
|
11
|
-
export declare const lineFormInput: string;
|
package/lib/style/lineForm.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Jupyter Development Team.
|
|
2
|
-
// Distributed under the terms of the Modified BSD License.
|
|
3
|
-
import { style } from 'typestyle/lib';
|
|
4
|
-
export const hoverItem = style({
|
|
5
|
-
boxShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)'
|
|
6
|
-
});
|
|
7
|
-
export const lineFormSearch = style({
|
|
8
|
-
padding: '4px 12px',
|
|
9
|
-
backgroundColor: 'var(--jp-layout-color2)',
|
|
10
|
-
boxShadow: 'var(--jp-toolbar-box-shadow)',
|
|
11
|
-
zIndex: 2,
|
|
12
|
-
fontSize: 'var(--jp-ui-font-size1)'
|
|
13
|
-
});
|
|
14
|
-
export const lineFormCaption = style({
|
|
15
|
-
fontSize: 'var(--jp-ui-font-size0)',
|
|
16
|
-
lineHeight: 'var(--jp-ui-font-size1)',
|
|
17
|
-
marginTop: '4px',
|
|
18
|
-
color: 'var(--jp-ui-font-color0)'
|
|
19
|
-
});
|
|
20
|
-
export const baseLineForm = {
|
|
21
|
-
border: 'none',
|
|
22
|
-
borderRadius: '0px',
|
|
23
|
-
position: 'absolute',
|
|
24
|
-
backgroundSize: '16px',
|
|
25
|
-
backgroundRepeat: 'no-repeat',
|
|
26
|
-
backgroundPosition: 'center',
|
|
27
|
-
outline: 'none',
|
|
28
|
-
top: '0px',
|
|
29
|
-
right: '0px'
|
|
30
|
-
};
|
|
31
|
-
export const lineFormButtonDiv = style(baseLineForm, {
|
|
32
|
-
top: '4px',
|
|
33
|
-
right: '8px',
|
|
34
|
-
height: '24px',
|
|
35
|
-
padding: '0px 12px',
|
|
36
|
-
width: '12px'
|
|
37
|
-
});
|
|
38
|
-
export const lineFormButtonIcon = style(baseLineForm, {
|
|
39
|
-
backgroundColor: 'var(--jp-brand-color1)',
|
|
40
|
-
height: '100%',
|
|
41
|
-
width: '100%',
|
|
42
|
-
boxSizing: 'border-box',
|
|
43
|
-
padding: '4px 6px'
|
|
44
|
-
});
|
|
45
|
-
export const lineFormButton = style(baseLineForm, {
|
|
46
|
-
backgroundColor: 'transparent',
|
|
47
|
-
height: '100%',
|
|
48
|
-
width: '100%',
|
|
49
|
-
boxSizing: 'border-box'
|
|
50
|
-
});
|
|
51
|
-
export const lineFormWrapper = style({
|
|
52
|
-
overflow: 'hidden',
|
|
53
|
-
padding: '0px 8px',
|
|
54
|
-
border: '1px solid var(--jp-border-color0)',
|
|
55
|
-
backgroundColor: 'var(--jp-input-active-background)',
|
|
56
|
-
height: '22px'
|
|
57
|
-
});
|
|
58
|
-
export const lineFormWrapperFocusWithin = style({
|
|
59
|
-
border: 'var(--jp-border-width) solid var(--md-blue-500)',
|
|
60
|
-
boxShadow: 'inset 0 0 4px var(--md-blue-300)'
|
|
61
|
-
});
|
|
62
|
-
export const lineFormInput = style({
|
|
63
|
-
background: 'transparent',
|
|
64
|
-
width: '200px',
|
|
65
|
-
height: '100%',
|
|
66
|
-
border: 'none',
|
|
67
|
-
outline: 'none',
|
|
68
|
-
color: 'var(--jp-ui-font-color0)',
|
|
69
|
-
lineHeight: '28px'
|
|
70
|
-
});
|
|
71
|
-
//# sourceMappingURL=lineForm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lineForm.js","sourceRoot":"","sources":["../../src/style/lineForm.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtC,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC;IAC7B,SAAS,EAAE,iCAAiC;CAC7C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC;IAClC,OAAO,EAAE,UAAU;IACnB,eAAe,EAAE,yBAAyB;IAC1C,SAAS,EAAE,8BAA8B;IACzC,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,yBAAyB;CACpC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC;IACnC,QAAQ,EAAE,yBAAyB;IACnC,UAAU,EAAE,yBAAyB;IACrC,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,0BAA0B;CAClC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,YAAY,GAAwB;IAC/C,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,KAAK;IACnB,QAAQ,EAAE,UAAU;IACpB,cAAc,EAAE,MAAM;IACtB,gBAAgB,EAAE,WAAW;IAC7B,kBAAkB,EAAE,QAAQ;IAC5B,OAAO,EAAE,MAAM;IACf,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,KAAK;CACb,CAAC;AAEF,MAAM,CAAC,MA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