@theia/cli 1.59.0-next.72 → 1.60.0-next.43
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/src/run-test.ts
CHANGED
|
@@ -49,7 +49,7 @@ export default async function runTest(options: TestOptions): Promise<void> {
|
|
|
49
49
|
// When launching in non-headless mode (with a UI and dev-tools open), make sure
|
|
50
50
|
// the app has focus, to avoid failures of tests that query the UI's state.
|
|
51
51
|
if (launch && launch.devtools) {
|
|
52
|
-
promises.push(testPage.waitForSelector('#theia-app-shell.
|
|
52
|
+
promises.push(testPage.waitForSelector('#theia-app-shell.lm-Widget.theia-ApplicationShell')
|
|
53
53
|
.then(e => {
|
|
54
54
|
// eslint-disable-next-line no-null/no-null
|
|
55
55
|
if (e !== null) {
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
diff --git a/node_modules/@phosphor/widgets/lib/menu.d.ts b/node_modules/@phosphor/widgets/lib/menu.d.ts
|
|
2
|
-
index 5d5053c..7802167 100644
|
|
3
|
-
--- a/node_modules/@phosphor/widgets/lib/menu.d.ts
|
|
4
|
-
+++ b/node_modules/@phosphor/widgets/lib/menu.d.ts
|
|
5
|
-
@@ -195,7 +195,7 @@ export declare class Menu extends Widget {
|
|
6
|
-
*
|
|
7
|
-
* This is a no-op if the menu is already attached to the DOM.
|
|
8
|
-
*/
|
|
9
|
-
- open(x: number, y: number, options?: Menu.IOpenOptions): void;
|
|
10
|
-
+ open(x: number, y: number, options?: Menu.IOpenOptions, anchor?: HTMLElement): void;
|
|
11
|
-
/**
|
|
12
|
-
* Handle the DOM events for the menu.
|
|
13
|
-
*
|
|
14
|
-
diff --git a/node_modules/@phosphor/widgets/lib/menu.js b/node_modules/@phosphor/widgets/lib/menu.js
|
|
15
|
-
index de23022..a8b15b1 100644
|
|
16
|
-
--- a/node_modules/@phosphor/widgets/lib/menu.js
|
|
17
|
-
+++ b/node_modules/@phosphor/widgets/lib/menu.js
|
|
18
|
-
@@ -13,7 +13,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
19
|
-
};
|
|
20
|
-
})();
|
|
21
|
-
var __assign = (this && this.__assign) || function () {
|
|
22
|
-
- __assign = Object.assign || function(t) {
|
|
23
|
-
+ __assign = Object.assign || function (t) {
|
|
24
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
-
s = arguments[i];
|
|
26
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
27
|
-
@@ -424,7 +424,7 @@ var Menu = /** @class */ (function (_super) {
|
|
28
|
-
*
|
|
29
|
-
* This is a no-op if the menu is already attached to the DOM.
|
|
30
|
-
*/
|
|
31
|
-
- Menu.prototype.open = function (x, y, options) {
|
|
32
|
-
+ Menu.prototype.open = function (x, y, options, node) {
|
|
33
|
-
if (options === void 0) { options = {}; }
|
|
34
|
-
// Bail early if the menu is already attached.
|
|
35
|
-
if (this.isAttached) {
|
|
36
|
-
@@ -434,7 +434,7 @@ var Menu = /** @class */ (function (_super) {
|
|
37
|
-
var forceX = options.forceX || false;
|
|
38
|
-
var forceY = options.forceY || false;
|
|
39
|
-
// Open the menu as a root menu.
|
|
40
|
-
- Private.openRootMenu(this, x, y, forceX, forceY);
|
|
41
|
-
+ Private.openRootMenu(this, x, y, forceX, forceY, node);
|
|
42
|
-
// Activate the menu to accept keyboard input.
|
|
43
|
-
this.activate();
|
|
44
|
-
};
|
|
45
|
-
@@ -484,8 +484,16 @@ var Menu = /** @class */ (function (_super) {
|
|
46
|
-
this.node.addEventListener('mouseenter', this);
|
|
47
|
-
this.node.addEventListener('mouseleave', this);
|
|
48
|
-
this.node.addEventListener('contextmenu', this);
|
|
49
|
-
- document.addEventListener('mousedown', this, true);
|
|
50
|
-
};
|
|
51
|
-
+
|
|
52
|
-
+ Menu.prototype.onAfterAttach = function (msg) {
|
|
53
|
-
+ this.node.ownerDocument.addEventListener('mousedown', this, true);
|
|
54
|
-
+ }
|
|
55
|
-
+
|
|
56
|
-
+ Menu.prototype.onBeforeDetach = function (msg) {
|
|
57
|
-
+ this.node.ownerDocument.removeEventListener('mousedown', this, true);
|
|
58
|
-
+ }
|
|
59
|
-
+
|
|
60
|
-
/**
|
|
61
|
-
* A message handler invoked on an `'after-detach'` message.
|
|
62
|
-
*/
|
|
63
|
-
@@ -496,7 +504,6 @@ var Menu = /** @class */ (function (_super) {
|
|
64
|
-
this.node.removeEventListener('mouseenter', this);
|
|
65
|
-
this.node.removeEventListener('mouseleave', this);
|
|
66
|
-
this.node.removeEventListener('contextmenu', this);
|
|
67
|
-
- document.removeEventListener('mousedown', this, true);
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* A message handler invoked on an `'activate-request'` message.
|
|
71
|
-
@@ -1124,14 +1131,15 @@ var Private;
|
|
72
|
-
/**
|
|
73
|
-
* Open a menu as a root menu at the target location.
|
|
74
|
-
*/
|
|
75
|
-
- function openRootMenu(menu, x, y, forceX, forceY) {
|
|
76
|
-
+ function openRootMenu(menu, x, y, forceX, forceY, element) {
|
|
77
|
-
// Ensure the menu is updated before attaching and measuring.
|
|
78
|
-
messaging_1.MessageLoop.sendMessage(menu, widget_1.Widget.Msg.UpdateRequest);
|
|
79
|
-
// Get the current position and size of the main viewport.
|
|
80
|
-
+ var doc = element ? element.ownerDocument : document;
|
|
81
|
-
var px = window.pageXOffset;
|
|
82
|
-
var py = window.pageYOffset;
|
|
83
|
-
- var cw = document.documentElement.clientWidth;
|
|
84
|
-
- var ch = document.documentElement.clientHeight;
|
|
85
|
-
+ var cw = doc.documentElement.clientWidth;
|
|
86
|
-
+ var ch = doc.documentElement.clientHeight;
|
|
87
|
-
// Compute the maximum allowed height for the menu.
|
|
88
|
-
var maxHeight = ch - (forceY ? y : 0);
|
|
89
|
-
// Fetch common variables.
|
|
90
|
-
@@ -1145,7 +1153,7 @@ var Private;
|
|
91
|
-
style.visibility = 'hidden';
|
|
92
|
-
style.maxHeight = maxHeight + "px";
|
|
93
|
-
// Attach the menu to the document.
|
|
94
|
-
- widget_1.Widget.attach(menu, document.body);
|
|
95
|
-
+ widget_1.Widget.attach(menu, doc.body);
|
|
96
|
-
// Measure the size of the menu.
|
|
97
|
-
var _a = node.getBoundingClientRect(), width = _a.width, height = _a.height;
|
|
98
|
-
// Adjust the X position of the menu to fit on-screen.
|
|
99
|
-
@@ -1177,8 +1185,8 @@ var Private;
|
|
100
|
-
// Get the current position and size of the main viewport.
|
|
101
|
-
var px = window.pageXOffset;
|
|
102
|
-
var py = window.pageYOffset;
|
|
103
|
-
- var cw = document.documentElement.clientWidth;
|
|
104
|
-
- var ch = document.documentElement.clientHeight;
|
|
105
|
-
+ var cw = itemNode.ownerDocument.documentElement.clientWidth;
|
|
106
|
-
+ var ch = itemNode.ownerDocument.documentElement.clientHeight;
|
|
107
|
-
// Compute the maximum allowed height for the menu.
|
|
108
|
-
var maxHeight = ch;
|
|
109
|
-
// Fetch common variables.
|
|
110
|
-
@@ -1192,7 +1200,7 @@ var Private;
|
|
111
|
-
style.visibility = 'hidden';
|
|
112
|
-
style.maxHeight = maxHeight + "px";
|
|
113
|
-
// Attach the menu to the document.
|
|
114
|
-
- widget_1.Widget.attach(submenu, document.body);
|
|
115
|
-
+ widget_1.Widget.attach(submenu, itemNode.ownerDocument.body);
|
|
116
|
-
// Measure the size of the menu.
|
|
117
|
-
var _a = node.getBoundingClientRect(), width = _a.width, height = _a.height;
|
|
118
|
-
// Compute the box sizing for the menu.
|
|
119
|
-
diff --git a/node_modules/@phosphor/widgets/lib/menubar.js b/node_modules/@phosphor/widgets/lib/menubar.js
|
|
120
|
-
index a8e10f4..da2ee82 100644
|
|
121
|
-
--- a/node_modules/@phosphor/widgets/lib/menubar.js
|
|
122
|
-
+++ b/node_modules/@phosphor/widgets/lib/menubar.js
|
|
123
|
-
@@ -521,7 +521,7 @@ var MenuBar = /** @class */ (function (_super) {
|
|
124
|
-
// Get the positioning data for the new menu.
|
|
125
|
-
var _a = itemNode.getBoundingClientRect(), left = _a.left, bottom = _a.bottom;
|
|
126
|
-
// Open the new menu at the computed location.
|
|
127
|
-
- newMenu.open(left, bottom, { forceX: true, forceY: true });
|
|
128
|
-
+ newMenu.open(left, bottom, { forceX: true, forceY: true }, this.node);
|
|
129
|
-
};
|
|
130
|
-
/**
|
|
131
|
-
* Close the child menu immediately.
|
|
132
|
-
diff --git a/node_modules/@phosphor/widgets/lib/widget.js b/node_modules/@phosphor/widgets/lib/widget.js
|
|
133
|
-
index 01241fa..62da27c 100644
|
|
134
|
-
--- a/node_modules/@phosphor/widgets/lib/widget.js
|
|
135
|
-
+++ b/node_modules/@phosphor/widgets/lib/widget.js
|
|
136
|
-
@@ -906,10 +906,10 @@ exports.Widget = Widget;
|
|
137
|
-
if (widget.parent) {
|
|
138
|
-
throw new Error('Cannot attach a child widget.');
|
|
139
|
-
}
|
|
140
|
-
- if (widget.isAttached || document.body.contains(widget.node)) {
|
|
141
|
-
+ if (widget.isAttached || widget.node.ownerDocument.body.contains(widget.node)) {
|
|
142
|
-
throw new Error('Widget is already attached.');
|
|
143
|
-
}
|
|
144
|
-
- if (!document.body.contains(host)) {
|
|
145
|
-
+ if (!host.ownerDocument.body.contains(host)) {
|
|
146
|
-
throw new Error('Host is not attached.');
|
|
147
|
-
}
|
|
148
|
-
messaging_1.MessageLoop.sendMessage(widget, Widget.Msg.BeforeAttach);
|
|
149
|
-
@@ -930,7 +930,7 @@ exports.Widget = Widget;
|
|
150
|
-
if (widget.parent) {
|
|
151
|
-
throw new Error('Cannot detach a child widget.');
|
|
152
|
-
}
|
|
153
|
-
- if (!widget.isAttached || !document.body.contains(widget.node)) {
|
|
154
|
-
+ if (!widget.isAttached || !widget.node.ownerDocument.body.contains(widget.node)) {
|
|
155
|
-
throw new Error('Widget is not attached.');
|
|
156
|
-
}
|
|
157
|
-
messaging_1.MessageLoop.sendMessage(widget, Widget.Msg.BeforeDetach);
|