@jupyterlab/debugger 4.6.2 → 4.6.3
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.
|
@@ -36,12 +36,18 @@ export declare class VariablesBodyGrid extends Panel {
|
|
|
36
36
|
* Wait until actually displaying the grid to trigger initialization.
|
|
37
37
|
*/
|
|
38
38
|
protected onBeforeShow(msg: Message): void;
|
|
39
|
+
/**
|
|
40
|
+
* Trigger initialization for a grid which is displayed as soon as it is
|
|
41
|
+
* attached, as it never gets a `before-show` message.
|
|
42
|
+
*/
|
|
43
|
+
protected onAfterAttach(msg: Message): void;
|
|
39
44
|
/**
|
|
40
45
|
* Handle `update-request` messages.
|
|
41
46
|
*/
|
|
42
47
|
protected onUpdateRequest(msg: Message): void;
|
|
43
48
|
private _filter;
|
|
44
49
|
private _grid;
|
|
50
|
+
private _initialScopes;
|
|
45
51
|
private _pending;
|
|
46
52
|
private _scope;
|
|
47
53
|
}
|
|
@@ -19,7 +19,12 @@ export class VariablesBodyGrid extends Panel {
|
|
|
19
19
|
this.model = options.model;
|
|
20
20
|
this.themeManager = options.themeManager;
|
|
21
21
|
this.translator = options.translator;
|
|
22
|
-
this.
|
|
22
|
+
this._initialScopes = options.scopes;
|
|
23
|
+
this.model.changed.connect(() => {
|
|
24
|
+
// The model took over the scopes given at instantiation.
|
|
25
|
+
this._initialScopes = undefined;
|
|
26
|
+
this.update();
|
|
27
|
+
}, this);
|
|
23
28
|
this.addClass('jp-DebuggerVariables-body');
|
|
24
29
|
}
|
|
25
30
|
/**
|
|
@@ -57,6 +62,10 @@ export class VariablesBodyGrid extends Panel {
|
|
|
57
62
|
}
|
|
58
63
|
// Lazily load the datagrid module when the first grid is requested.
|
|
59
64
|
const { Grid } = await (this._pending = import('./gridpanel'));
|
|
65
|
+
if (this.isDisposed) {
|
|
66
|
+
this._pending = null;
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
60
69
|
const { commands, model, themeManager, translator } = this;
|
|
61
70
|
this._grid = new Grid({ commands, model, themeManager, translator });
|
|
62
71
|
this._grid.addClass('jp-DebuggerVariables-grid');
|
|
@@ -68,21 +77,29 @@ export class VariablesBodyGrid extends Panel {
|
|
|
68
77
|
* Wait until actually displaying the grid to trigger initialization.
|
|
69
78
|
*/
|
|
70
79
|
onBeforeShow(msg) {
|
|
71
|
-
|
|
80
|
+
void this.initialize();
|
|
81
|
+
super.onBeforeShow(msg);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Trigger initialization for a grid which is displayed as soon as it is
|
|
85
|
+
* attached, as it never gets a `before-show` message.
|
|
86
|
+
*/
|
|
87
|
+
onAfterAttach(msg) {
|
|
88
|
+
super.onAfterAttach(msg);
|
|
89
|
+
if (this.isVisible) {
|
|
72
90
|
void this.initialize();
|
|
73
91
|
}
|
|
74
|
-
super.onBeforeShow(msg);
|
|
75
92
|
}
|
|
76
93
|
/**
|
|
77
94
|
* Handle `update-request` messages.
|
|
78
95
|
*/
|
|
79
96
|
onUpdateRequest(msg) {
|
|
80
|
-
var _a;
|
|
97
|
+
var _a, _b;
|
|
81
98
|
if (this._grid) {
|
|
82
99
|
const { dataModel } = this._grid;
|
|
83
100
|
dataModel.filter = this._filter;
|
|
84
101
|
dataModel.scope = this._scope;
|
|
85
|
-
dataModel.setData((_a = this.model.scopes) !== null &&
|
|
102
|
+
dataModel.setData((_b = (_a = this._initialScopes) !== null && _a !== void 0 ? _a : this.model.scopes) !== null && _b !== void 0 ? _b : []);
|
|
86
103
|
}
|
|
87
104
|
super.onUpdateRequest(msg);
|
|
88
105
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.js","sourceRoot":"","sources":["../../../src/panels/variables/grid.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAU3D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAMxC;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAC1C;;;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;;OAGG;IACO,aAAa,CAAC,GAAY;QAClC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QACzB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,KAAK,IAAI,CAAC,UAAU,EAAE,CAAC;QACzB,CAAC;IACH,CAAC;IAED;;OAEG;IACO,eAAe,CAAC,GAAY;;QACpC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YACjC,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;YAChC,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;YAC9B,SAAS,CAAC,OAAO,CAAC,MAAA,MAAA,IAAI,CAAC,cAAc,mCAAI,IAAI,CAAC,KAAK,CAAC,MAAM,mCAAI,EAAE,CAAC,CAAC;QACpE,CAAC;QACD,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;CAOF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyterlab/debugger",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.3",
|
|
4
4
|
"description": "JupyterLab - Debugger Extension",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
|
@@ -51,22 +51,22 @@
|
|
|
51
51
|
"@codemirror/view": "^6.39.14",
|
|
52
52
|
"@jupyter/react-components": "^0.16.6",
|
|
53
53
|
"@jupyter/ydoc": "^4.0.0",
|
|
54
|
-
"@jupyterlab/application": "^4.6.
|
|
55
|
-
"@jupyterlab/apputils": "^4.7.
|
|
56
|
-
"@jupyterlab/cells": "^4.6.
|
|
57
|
-
"@jupyterlab/codeeditor": "^4.6.
|
|
58
|
-
"@jupyterlab/codemirror": "^4.6.
|
|
59
|
-
"@jupyterlab/console": "^4.6.
|
|
60
|
-
"@jupyterlab/coreutils": "^6.6.
|
|
61
|
-
"@jupyterlab/docregistry": "^4.6.
|
|
62
|
-
"@jupyterlab/fileeditor": "^4.6.
|
|
63
|
-
"@jupyterlab/notebook": "^4.6.
|
|
64
|
-
"@jupyterlab/observables": "^5.6.
|
|
65
|
-
"@jupyterlab/rendermime": "^4.6.
|
|
66
|
-
"@jupyterlab/services": "^7.6.
|
|
67
|
-
"@jupyterlab/settingregistry": "^4.6.
|
|
68
|
-
"@jupyterlab/translation": "^4.6.
|
|
69
|
-
"@jupyterlab/ui-components": "^4.6.
|
|
54
|
+
"@jupyterlab/application": "^4.6.3",
|
|
55
|
+
"@jupyterlab/apputils": "^4.7.3",
|
|
56
|
+
"@jupyterlab/cells": "^4.6.3",
|
|
57
|
+
"@jupyterlab/codeeditor": "^4.6.3",
|
|
58
|
+
"@jupyterlab/codemirror": "^4.6.3",
|
|
59
|
+
"@jupyterlab/console": "^4.6.3",
|
|
60
|
+
"@jupyterlab/coreutils": "^6.6.3",
|
|
61
|
+
"@jupyterlab/docregistry": "^4.6.3",
|
|
62
|
+
"@jupyterlab/fileeditor": "^4.6.3",
|
|
63
|
+
"@jupyterlab/notebook": "^4.6.3",
|
|
64
|
+
"@jupyterlab/observables": "^5.6.3",
|
|
65
|
+
"@jupyterlab/rendermime": "^4.6.3",
|
|
66
|
+
"@jupyterlab/services": "^7.6.3",
|
|
67
|
+
"@jupyterlab/settingregistry": "^4.6.3",
|
|
68
|
+
"@jupyterlab/translation": "^4.6.3",
|
|
69
|
+
"@jupyterlab/ui-components": "^4.6.3",
|
|
70
70
|
"@lumino/algorithm": "^2.0.4",
|
|
71
71
|
"@lumino/commands": "^2.3.3",
|
|
72
72
|
"@lumino/coreutils": "^2.2.2",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"react": "^18.2.0"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@jupyterlab/testing": "^4.6.
|
|
83
|
+
"@jupyterlab/testing": "^4.6.3",
|
|
84
84
|
"@types/jest": "^29.2.0",
|
|
85
85
|
"jest": "^29.2.0",
|
|
86
86
|
"jest-canvas-mock": "^2.5.2",
|
|
@@ -30,7 +30,12 @@ export class VariablesBodyGrid extends Panel {
|
|
|
30
30
|
this.model = options.model;
|
|
31
31
|
this.themeManager = options.themeManager;
|
|
32
32
|
this.translator = options.translator;
|
|
33
|
-
this.
|
|
33
|
+
this._initialScopes = options.scopes;
|
|
34
|
+
this.model.changed.connect(() => {
|
|
35
|
+
// The model took over the scopes given at instantiation.
|
|
36
|
+
this._initialScopes = undefined;
|
|
37
|
+
this.update();
|
|
38
|
+
}, this);
|
|
34
39
|
this.addClass('jp-DebuggerVariables-body');
|
|
35
40
|
}
|
|
36
41
|
|
|
@@ -76,6 +81,10 @@ export class VariablesBodyGrid extends Panel {
|
|
|
76
81
|
|
|
77
82
|
// Lazily load the datagrid module when the first grid is requested.
|
|
78
83
|
const { Grid } = await (this._pending = import('./gridpanel'));
|
|
84
|
+
if (this.isDisposed) {
|
|
85
|
+
this._pending = null;
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
79
88
|
const { commands, model, themeManager, translator } = this;
|
|
80
89
|
|
|
81
90
|
this._grid = new Grid({ commands, model, themeManager, translator });
|
|
@@ -89,10 +98,19 @@ export class VariablesBodyGrid extends Panel {
|
|
|
89
98
|
* Wait until actually displaying the grid to trigger initialization.
|
|
90
99
|
*/
|
|
91
100
|
protected onBeforeShow(msg: Message): void {
|
|
92
|
-
|
|
101
|
+
void this.initialize();
|
|
102
|
+
super.onBeforeShow(msg);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Trigger initialization for a grid which is displayed as soon as it is
|
|
107
|
+
* attached, as it never gets a `before-show` message.
|
|
108
|
+
*/
|
|
109
|
+
protected onAfterAttach(msg: Message): void {
|
|
110
|
+
super.onAfterAttach(msg);
|
|
111
|
+
if (this.isVisible) {
|
|
93
112
|
void this.initialize();
|
|
94
113
|
}
|
|
95
|
-
super.onBeforeShow(msg);
|
|
96
114
|
}
|
|
97
115
|
|
|
98
116
|
/**
|
|
@@ -103,13 +121,14 @@ export class VariablesBodyGrid extends Panel {
|
|
|
103
121
|
const { dataModel } = this._grid;
|
|
104
122
|
dataModel.filter = this._filter;
|
|
105
123
|
dataModel.scope = this._scope;
|
|
106
|
-
dataModel.setData(this.model.scopes ?? []);
|
|
124
|
+
dataModel.setData(this._initialScopes ?? this.model.scopes ?? []);
|
|
107
125
|
}
|
|
108
126
|
super.onUpdateRequest(msg);
|
|
109
127
|
}
|
|
110
128
|
|
|
111
129
|
private _filter: Set<string> = new Set();
|
|
112
130
|
private _grid: GridPanelModule.Grid | null = null;
|
|
131
|
+
private _initialScopes: IDebugger.IScope[] | undefined;
|
|
113
132
|
private _pending: Promise<unknown> | null = null;
|
|
114
133
|
private _scope: string;
|
|
115
134
|
}
|