@codingame/monaco-vscode-api 1.69.8 → 1.69.9
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/dist/api.js +6 -6
- package/dist/configuration.js +74 -384
- package/dist/contextkey.js +1 -13
- package/dist/dialogs.js +11 -11
- package/dist/extHost.js +1402 -2068
- package/dist/files.js +106 -100
- package/dist/keybindings.js +308 -358
- package/dist/languageConfiguration.js +4 -4
- package/dist/languageService.js +2 -2
- package/dist/languages.js +3 -3
- package/dist/layout.js +310 -292
- package/dist/missing-services.js +867 -5546
- package/dist/modelEditor.js +67 -67
- package/dist/monaco.js +13 -13
- package/dist/notifications.js +336 -266
- package/dist/polyfill.js +395 -394
- package/dist/services.js +1 -1
- package/dist/services2.js +27 -659
- package/dist/snippets.js +112 -104
- package/dist/textmate.js +88 -80
- package/dist/theme.js +408 -396
- package/dist/tokenClassification.js +3 -3
- package/dist/tokenClassificationRegistry.js +83 -77
- package/dist/workbenchThemeService.js +1 -1
- package/dist/workspaceContext.js +1 -1
- package/package.json +1 -1
package/dist/notifications.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { E as Emitter } from './polyfill.js';
|
|
2
2
|
import { a as IntervalCounter, b as ILifecycleService } from './missing-services.js';
|
|
3
|
-
import {
|
|
4
|
-
import { n,
|
|
5
|
-
import {
|
|
3
|
+
import { _ as __decorate, f as NotificationsFilter, a as __param, g as NeverShowAgainScope } from './contextkey.js';
|
|
4
|
+
import { n, B as ButtonBar, a as attachButtonStyler, g as getServiceOverride$1, b as attachProgressBarStyler, D as DialogHandlerContribution } from './layout.js';
|
|
5
|
+
import { focusBorder, registerColor, textLinkForeground, editorErrorForeground, editorWarningForeground, editorInfoForeground, widgetShadow, contrastBorder, editorWidgetBackground, lighten, darken, editorWidgetForeground } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
6
6
|
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
7
7
|
import { Disposable, toDisposable, DisposableStore, dispose } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
8
8
|
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
@@ -13,22 +13,22 @@ import { equals, isNonEmptyArray } from 'monaco-editor/esm/vs/base/common/arrays
|
|
|
13
13
|
import { Action, ActionRunner } from 'monaco-editor/esm/vs/base/common/actions.js';
|
|
14
14
|
import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
|
|
15
15
|
import { hash } from 'monaco-editor/esm/vs/base/common/hash.js';
|
|
16
|
-
import {
|
|
16
|
+
import { i as IFileService, b as IEditorGroupsService, o as IHostService } from './services2.js';
|
|
17
17
|
import { RawContextKey, IContextKeyService, ContextKeyExpr } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
18
18
|
import { ILanguageService } from 'monaco-editor/esm/vs/editor/common/languages/language.js';
|
|
19
19
|
import { IModelService } from 'monaco-editor/esm/vs/editor/common/services/model.js';
|
|
20
20
|
import { isEqual, basename, dirname, extname } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
21
|
-
import {
|
|
21
|
+
import { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
22
22
|
import { KeybindingsRegistry } from 'monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js';
|
|
23
|
-
import {
|
|
23
|
+
import { WorkbenchList, IListService } from 'monaco-editor/esm/vs/platform/list/browser/listService.js';
|
|
24
24
|
import { MenuRegistry, MenuId } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
25
25
|
import { registerIcon } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
|
|
26
26
|
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
27
|
-
import {
|
|
27
|
+
import { registerThemingParticipant, ThemeIcon, Themable, IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
28
28
|
import { IClipboardService } from 'monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js';
|
|
29
|
-
import {
|
|
29
|
+
import { Dimension, addDisposableListener, EventType, EventHelper, clearNode, scheduleAtNextAnimationFrame, isAncestor, $, trackFocus, getClientArea } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
30
30
|
import { DomEmitter } from 'monaco-editor/esm/vs/base/browser/event.js';
|
|
31
|
-
import { Gesture, EventType } from 'monaco-editor/esm/vs/base/browser/touch.js';
|
|
31
|
+
import { Gesture, EventType as EventType$1 } from 'monaco-editor/esm/vs/base/browser/touch.js';
|
|
32
32
|
import { ActionBar } from 'monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js';
|
|
33
33
|
import { ProgressBar } from 'monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.js';
|
|
34
34
|
import { IContextMenuService } from 'monaco-editor/esm/vs/platform/contextview/browser/contextView.js';
|
|
@@ -53,105 +53,105 @@ var css$3 = "/*-----------------------------------------------------------------
|
|
|
53
53
|
n(css$3,{});
|
|
54
54
|
var css$2 = "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/** Notification: Container */\n\n.monaco-workbench .notifications-list-container .notification-list-item {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex-direction: column-reverse; /* the details row appears first in order for better keyboard access to notification buttons */\n\tpadding: 10px 5px;\n\theight: 100%;\n\tbox-sizing: border-box;\n}\n\n.monaco-workbench .notifications-list-container .notification-offset-helper {\n\topacity: 0;\n\tposition: absolute;\n\tline-height: 22px;\n\tword-wrap: break-word; /* never overflow long words, but break to next line */\n}\n\n/** Notification: Main Row */\n\n.monaco-workbench .notifications-list-container .notification-list-item > .notification-list-item-main-row {\n\tdisplay: flex;\n\tflex-grow: 1;\n}\n\n/** Notification: Icon */\n\n.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-icon {\n\tdisplay: flex;\n\talign-items: center;\n\tflex: 0 0 16px;\n\theight: 22px;\n\tmargin-right: 4px;\n\tmargin-left: 4px;\n\tfont-size: 18px;\n\tbackground-position: center;\n\tbackground-repeat: no-repeat;\n}\n\n/** Notification: Message */\n\n.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-message {\n\tline-height: 22px;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tflex: 1; /* let the message always grow */\n\tuser-select: text;\n\t-webkit-user-select: text;\n}\n\n.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-message a:focus {\n\toutline-width: 1px;\n\toutline-style: solid;\n}\n\n.monaco-workbench .notifications-list-container .notification-list-item.expanded .notification-list-item-message {\n\twhite-space: normal;\n\tword-wrap: break-word; /* never overflow long words, but break to next line */\n}\n\n/** Notification: Toolbar Container */\n\n.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-toolbar-container {\n\tdisplay: none;\n\theight: 22px;\n}\n\n.monaco-workbench .notifications-list-container .notification-list-item:hover .notification-list-item-toolbar-container,\n.monaco-workbench .notifications-list-container .monaco-list-row.focused .notification-list-item .notification-list-item-toolbar-container,\n.monaco-workbench .notifications-list-container .notification-list-item.expanded .notification-list-item-toolbar-container {\n\tdisplay: block;\n}\n\n/** Notification: Details Row */\n\n.monaco-workbench .notifications-list-container .notification-list-item > .notification-list-item-details-row {\n\tdisplay: none;\n\talign-items: center;\n\tpadding-left: 5px;\n\toverflow: hidden; /* details row should never overflow */\n}\n\n.monaco-workbench .notifications-list-container .notification-list-item.expanded > .notification-list-item-details-row {\n\tdisplay: flex;\n}\n\n/** Notification: Source */\n\n.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-source {\n\tflex: 1;\n\tfont-size: 12px;\n\toverflow: hidden; /* always give away space to buttons container */\n\ttext-overflow: ellipsis;\n}\n\n/** Notification: Buttons */\n\n.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container {\n\tdisplay: flex;\n\toverflow: hidden;\n}\n\n.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container > .monaco-button-dropdown,\n.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container > .monaco-button {\n\tmargin: 4px 5px; /* allows button focus outline to be visible */\n}\n\n.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container .monaco-button {\n\toutline-offset: 2px !important;\n}\n\n.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container .monaco-text-button {\n\twidth: fit-content;\n\twidth: -moz-fit-content;\n\tpadding: 5px 10px;\n\tdisplay: inline-block;\t/* to enable ellipsis in text overflow */\n\tfont-size: 12px;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-buttons-container .monaco-dropdown-button {\n\tpadding: 5px\n}\n\n/** Notification: Progress */\n\n.monaco-workbench .notifications-list-container .progress-bit {\n\theight: 2px;\n\tbottom: 0;\n}\n";
|
|
55
55
|
n(css$2,{});
|
|
56
|
-
const NOTIFICATIONS_CENTER_BORDER = ( registerColor('notificationCenter.border', {
|
|
56
|
+
const NOTIFICATIONS_CENTER_BORDER = ( (registerColor('notificationCenter.border', {
|
|
57
57
|
dark: null,
|
|
58
58
|
light: null,
|
|
59
59
|
hcDark: contrastBorder,
|
|
60
60
|
hcLight: contrastBorder
|
|
61
|
-
},
|
|
61
|
+
}, (localize(
|
|
62
62
|
'notificationCenterBorder',
|
|
63
63
|
"Notifications center border color. Notifications slide in from the bottom right of the window."
|
|
64
|
-
))));
|
|
65
|
-
const NOTIFICATIONS_TOAST_BORDER = ( registerColor('notificationToast.border', {
|
|
64
|
+
)))));
|
|
65
|
+
const NOTIFICATIONS_TOAST_BORDER = ( (registerColor('notificationToast.border', {
|
|
66
66
|
dark: null,
|
|
67
67
|
light: null,
|
|
68
68
|
hcDark: contrastBorder,
|
|
69
69
|
hcLight: contrastBorder
|
|
70
|
-
},
|
|
70
|
+
}, (localize(
|
|
71
71
|
'notificationToastBorder',
|
|
72
72
|
"Notification toast border color. Notifications slide in from the bottom right of the window."
|
|
73
|
-
))));
|
|
74
|
-
const NOTIFICATIONS_FOREGROUND = ( registerColor('notifications.foreground', {
|
|
73
|
+
)))));
|
|
74
|
+
const NOTIFICATIONS_FOREGROUND = ( (registerColor('notifications.foreground', {
|
|
75
75
|
dark: editorWidgetForeground,
|
|
76
76
|
light: editorWidgetForeground,
|
|
77
77
|
hcDark: editorWidgetForeground,
|
|
78
78
|
hcLight: editorWidgetForeground
|
|
79
|
-
},
|
|
79
|
+
}, (localize(
|
|
80
80
|
'notificationsForeground',
|
|
81
81
|
"Notifications foreground color. Notifications slide in from the bottom right of the window."
|
|
82
|
-
))));
|
|
83
|
-
const NOTIFICATIONS_BACKGROUND = ( registerColor('notifications.background', {
|
|
82
|
+
)))));
|
|
83
|
+
const NOTIFICATIONS_BACKGROUND = ( (registerColor('notifications.background', {
|
|
84
84
|
dark: editorWidgetBackground,
|
|
85
85
|
light: editorWidgetBackground,
|
|
86
86
|
hcDark: editorWidgetBackground,
|
|
87
87
|
hcLight: editorWidgetBackground
|
|
88
|
-
},
|
|
88
|
+
}, (localize(
|
|
89
89
|
'notificationsBackground',
|
|
90
90
|
"Notifications background color. Notifications slide in from the bottom right of the window."
|
|
91
|
-
))));
|
|
92
|
-
const NOTIFICATIONS_LINKS = ( registerColor('notificationLink.foreground', {
|
|
91
|
+
)))));
|
|
92
|
+
const NOTIFICATIONS_LINKS = ( (registerColor('notificationLink.foreground', {
|
|
93
93
|
dark: textLinkForeground,
|
|
94
94
|
light: textLinkForeground,
|
|
95
95
|
hcDark: textLinkForeground,
|
|
96
96
|
hcLight: textLinkForeground
|
|
97
|
-
},
|
|
97
|
+
}, (localize(
|
|
98
98
|
'notificationsLink',
|
|
99
99
|
"Notification links foreground color. Notifications slide in from the bottom right of the window."
|
|
100
|
-
))));
|
|
101
|
-
const NOTIFICATIONS_CENTER_HEADER_FOREGROUND = ( registerColor('notificationCenterHeader.foreground', {
|
|
100
|
+
)))));
|
|
101
|
+
const NOTIFICATIONS_CENTER_HEADER_FOREGROUND = ( (registerColor('notificationCenterHeader.foreground', {
|
|
102
102
|
dark: null,
|
|
103
103
|
light: null,
|
|
104
104
|
hcDark: null,
|
|
105
105
|
hcLight: null
|
|
106
|
-
},
|
|
106
|
+
}, (localize(
|
|
107
107
|
'notificationCenterHeaderForeground',
|
|
108
108
|
"Notifications center header foreground color. Notifications slide in from the bottom right of the window."
|
|
109
|
-
))));
|
|
110
|
-
const NOTIFICATIONS_CENTER_HEADER_BACKGROUND = ( registerColor('notificationCenterHeader.background', {
|
|
111
|
-
dark: ( lighten(NOTIFICATIONS_BACKGROUND, 0.3)),
|
|
112
|
-
light: ( darken(NOTIFICATIONS_BACKGROUND, 0.05)),
|
|
109
|
+
)))));
|
|
110
|
+
const NOTIFICATIONS_CENTER_HEADER_BACKGROUND = ( (registerColor('notificationCenterHeader.background', {
|
|
111
|
+
dark: ( (lighten(NOTIFICATIONS_BACKGROUND, 0.3))),
|
|
112
|
+
light: ( (darken(NOTIFICATIONS_BACKGROUND, 0.05))),
|
|
113
113
|
hcDark: NOTIFICATIONS_BACKGROUND,
|
|
114
114
|
hcLight: NOTIFICATIONS_BACKGROUND
|
|
115
|
-
},
|
|
115
|
+
}, (localize(
|
|
116
116
|
'notificationCenterHeaderBackground',
|
|
117
117
|
"Notifications center header background color. Notifications slide in from the bottom right of the window."
|
|
118
|
-
))));
|
|
119
|
-
const NOTIFICATIONS_BORDER = ( registerColor('notifications.border', {
|
|
118
|
+
)))));
|
|
119
|
+
const NOTIFICATIONS_BORDER = ( (registerColor('notifications.border', {
|
|
120
120
|
dark: NOTIFICATIONS_CENTER_HEADER_BACKGROUND,
|
|
121
121
|
light: NOTIFICATIONS_CENTER_HEADER_BACKGROUND,
|
|
122
122
|
hcDark: NOTIFICATIONS_CENTER_HEADER_BACKGROUND,
|
|
123
123
|
hcLight: NOTIFICATIONS_CENTER_HEADER_BACKGROUND
|
|
124
|
-
},
|
|
124
|
+
}, (localize(
|
|
125
125
|
'notificationsBorder',
|
|
126
126
|
"Notifications border color separating from other notifications in the notifications center. Notifications slide in from the bottom right of the window."
|
|
127
|
-
))));
|
|
128
|
-
const NOTIFICATIONS_ERROR_ICON_FOREGROUND = ( registerColor('notificationsErrorIcon.foreground', {
|
|
127
|
+
)))));
|
|
128
|
+
const NOTIFICATIONS_ERROR_ICON_FOREGROUND = ( (registerColor('notificationsErrorIcon.foreground', {
|
|
129
129
|
dark: editorErrorForeground,
|
|
130
130
|
light: editorErrorForeground,
|
|
131
131
|
hcDark: editorErrorForeground,
|
|
132
132
|
hcLight: editorErrorForeground
|
|
133
|
-
},
|
|
133
|
+
}, (localize(
|
|
134
134
|
'notificationsErrorIconForeground',
|
|
135
135
|
"The color used for the icon of error notifications. Notifications slide in from the bottom right of the window."
|
|
136
|
-
))));
|
|
137
|
-
const NOTIFICATIONS_WARNING_ICON_FOREGROUND = ( registerColor('notificationsWarningIcon.foreground', {
|
|
136
|
+
)))));
|
|
137
|
+
const NOTIFICATIONS_WARNING_ICON_FOREGROUND = ( (registerColor('notificationsWarningIcon.foreground', {
|
|
138
138
|
dark: editorWarningForeground,
|
|
139
139
|
light: editorWarningForeground,
|
|
140
140
|
hcDark: editorWarningForeground,
|
|
141
141
|
hcLight: editorWarningForeground
|
|
142
|
-
},
|
|
142
|
+
}, (localize(
|
|
143
143
|
'notificationsWarningIconForeground',
|
|
144
144
|
"The color used for the icon of warning notifications. Notifications slide in from the bottom right of the window."
|
|
145
|
-
))));
|
|
146
|
-
const NOTIFICATIONS_INFO_ICON_FOREGROUND = ( registerColor('notificationsInfoIcon.foreground', {
|
|
145
|
+
)))));
|
|
146
|
+
const NOTIFICATIONS_INFO_ICON_FOREGROUND = ( (registerColor('notificationsInfoIcon.foreground', {
|
|
147
147
|
dark: editorInfoForeground,
|
|
148
148
|
light: editorInfoForeground,
|
|
149
149
|
hcDark: editorInfoForeground,
|
|
150
150
|
hcLight: editorInfoForeground
|
|
151
|
-
},
|
|
151
|
+
}, (localize(
|
|
152
152
|
'notificationsInfoIconForeground',
|
|
153
153
|
"The color used for the icon of info notifications. Notifications slide in from the bottom right of the window."
|
|
154
|
-
))));
|
|
154
|
+
)))));
|
|
155
155
|
class LinkedText {
|
|
156
156
|
constructor(nodes) {
|
|
157
157
|
this.nodes = nodes;
|
|
@@ -181,16 +181,18 @@ function parseLinkedText(text) {
|
|
|
181
181
|
if (index < text.length) {
|
|
182
182
|
result.push(text.substring(index));
|
|
183
183
|
}
|
|
184
|
-
return (
|
|
184
|
+
return (
|
|
185
|
+
(new LinkedText(result))
|
|
186
|
+
);
|
|
185
187
|
}
|
|
186
188
|
class NotificationHandle extends Disposable {
|
|
187
189
|
constructor(item, onClose) {
|
|
188
190
|
super();
|
|
189
191
|
this.item = item;
|
|
190
192
|
this.onClose = onClose;
|
|
191
|
-
this._onDidClose = this._register(( new Emitter()));
|
|
193
|
+
this._onDidClose = this._register(( (new Emitter())));
|
|
192
194
|
this.onDidClose = this._onDidClose.event;
|
|
193
|
-
this._onDidChangeVisibility = this._register(( new Emitter()));
|
|
195
|
+
this._onDidChangeVisibility = this._register(( (new Emitter())));
|
|
194
196
|
this.onDidChangeVisibility = this._onDidChangeVisibility.event;
|
|
195
197
|
this.registerListeners();
|
|
196
198
|
}
|
|
@@ -221,11 +223,11 @@ class NotificationHandle extends Disposable {
|
|
|
221
223
|
class NotificationsModel extends Disposable {
|
|
222
224
|
constructor() {
|
|
223
225
|
super(...arguments);
|
|
224
|
-
this._onDidChangeNotification = this._register(( new Emitter()));
|
|
226
|
+
this._onDidChangeNotification = this._register(( (new Emitter())));
|
|
225
227
|
this.onDidChangeNotification = this._onDidChangeNotification.event;
|
|
226
|
-
this._onDidChangeStatusMessage = this._register(( new Emitter()));
|
|
228
|
+
this._onDidChangeStatusMessage = this._register(( (new Emitter())));
|
|
227
229
|
this.onDidChangeStatusMessage = this._onDidChangeStatusMessage.event;
|
|
228
|
-
this._onDidChangeFilter = this._register(( new Emitter()));
|
|
230
|
+
this._onDidChangeFilter = this._register(( (new Emitter())));
|
|
229
231
|
this.onDidChangeFilter = this._onDidChangeFilter.event;
|
|
230
232
|
this._notifications = [];
|
|
231
233
|
this.filter = NotificationsFilter.OFF;
|
|
@@ -247,7 +249,9 @@ class NotificationsModel extends Disposable {
|
|
|
247
249
|
}
|
|
248
250
|
this._notifications.splice(0, 0, item);
|
|
249
251
|
this._onDidChangeNotification.fire({ item, index: 0, kind: 0 });
|
|
250
|
-
return (
|
|
252
|
+
return (
|
|
253
|
+
(new NotificationHandle(item, item => this.onClose(item)))
|
|
254
|
+
);
|
|
251
255
|
}
|
|
252
256
|
onClose(item) {
|
|
253
257
|
const liveItem = this.findNotification(item);
|
|
@@ -300,14 +304,14 @@ class NotificationsModel extends Disposable {
|
|
|
300
304
|
});
|
|
301
305
|
}
|
|
302
306
|
}
|
|
303
|
-
NotificationsModel.NO_OP_NOTIFICATION = ( new NoOpNotification());
|
|
307
|
+
NotificationsModel.NO_OP_NOTIFICATION = ( (new NoOpNotification()));
|
|
304
308
|
function isNotificationViewItem(obj) {
|
|
305
309
|
return obj instanceof NotificationViewItem;
|
|
306
310
|
}
|
|
307
311
|
class NotificationViewItemProgress extends Disposable {
|
|
308
312
|
constructor() {
|
|
309
313
|
super();
|
|
310
|
-
this._onDidChange = this._register(( new Emitter()));
|
|
314
|
+
this._onDidChange = this._register(( (new Emitter())));
|
|
311
315
|
this.onDidChange = this._onDidChange.event;
|
|
312
316
|
this._state = Object.create(null);
|
|
313
317
|
}
|
|
@@ -365,13 +369,13 @@ class NotificationViewItem extends Disposable {
|
|
|
365
369
|
this._message = _message;
|
|
366
370
|
this._source = _source;
|
|
367
371
|
this._visible = false;
|
|
368
|
-
this._onDidChangeExpansion = this._register(( new Emitter()));
|
|
372
|
+
this._onDidChangeExpansion = this._register(( (new Emitter())));
|
|
369
373
|
this.onDidChangeExpansion = this._onDidChangeExpansion.event;
|
|
370
|
-
this._onDidClose = this._register(( new Emitter()));
|
|
374
|
+
this._onDidClose = this._register(( (new Emitter())));
|
|
371
375
|
this.onDidClose = this._onDidClose.event;
|
|
372
|
-
this._onDidChangeContent = this._register(( new Emitter()));
|
|
376
|
+
this._onDidChangeContent = this._register(( (new Emitter())));
|
|
373
377
|
this.onDidChangeContent = this._onDidChangeContent.event;
|
|
374
|
-
this._onDidChangeVisibility = this._register(( new Emitter()));
|
|
378
|
+
this._onDidChangeVisibility = this._register(( (new Emitter())));
|
|
375
379
|
this.onDidChangeVisibility = this._onDidChangeVisibility.event;
|
|
376
380
|
if (progress) {
|
|
377
381
|
this.setProgress(progress);
|
|
@@ -400,16 +404,18 @@ class NotificationViewItem extends Disposable {
|
|
|
400
404
|
else if (isErrorWithActions(notification.message)) {
|
|
401
405
|
actions = { primary: notification.message.actions };
|
|
402
406
|
}
|
|
403
|
-
return (
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
407
|
+
return (
|
|
408
|
+
(new NotificationViewItem(
|
|
409
|
+
notification.id,
|
|
410
|
+
severity,
|
|
411
|
+
notification.sticky,
|
|
412
|
+
notification.silent || filter === NotificationsFilter.SILENT || (filter === NotificationsFilter.ERROR && notification.severity !== Severity.Error),
|
|
413
|
+
message,
|
|
414
|
+
notification.source,
|
|
415
|
+
notification.progress,
|
|
416
|
+
actions
|
|
417
|
+
))
|
|
418
|
+
);
|
|
413
419
|
}
|
|
414
420
|
static parseNotificationMessage(input) {
|
|
415
421
|
let message;
|
|
@@ -487,7 +493,7 @@ class NotificationViewItem extends Disposable {
|
|
|
487
493
|
}
|
|
488
494
|
get progress() {
|
|
489
495
|
if (!this._progress) {
|
|
490
|
-
this._progress = this._register(( new NotificationViewItemProgress()));
|
|
496
|
+
this._progress = this._register(( (new NotificationViewItemProgress())));
|
|
491
497
|
this._register(this._progress.onDidChange(() => this._onDidChangeContent.fire({ kind: 3 })));
|
|
492
498
|
}
|
|
493
499
|
return this._progress;
|
|
@@ -590,10 +596,10 @@ class ChoiceAction extends Action {
|
|
|
590
596
|
choice.run();
|
|
591
597
|
this._onDidRun.fire();
|
|
592
598
|
});
|
|
593
|
-
this._onDidRun = this._register(( new Emitter()));
|
|
599
|
+
this._onDidRun = this._register(( (new Emitter())));
|
|
594
600
|
this.onDidRun = this._onDidRun.event;
|
|
595
601
|
this._keepOpen = !!choice.keepOpen;
|
|
596
|
-
this._menu = !choice.isSecondary && choice.menu ? choice.menu.map((c, index) => ( new ChoiceAction(`${id}.${index}`, c))) : undefined;
|
|
602
|
+
this._menu = !choice.isSecondary && choice.menu ? choice.menu.map((c, index) => ( (new ChoiceAction(`${id}.${index}`, c)))) : undefined;
|
|
597
603
|
}
|
|
598
604
|
get menu() {
|
|
599
605
|
return this._menu;
|
|
@@ -624,7 +630,7 @@ var css$1 = "/*-----------------------------------------------------------------
|
|
|
624
630
|
n(css$1,{});
|
|
625
631
|
function notificationToMetrics(message, source, silent) {
|
|
626
632
|
return {
|
|
627
|
-
id: ( hash(( message.toString())).toString()),
|
|
633
|
+
id: ( (hash(( (message.toString()))).toString())),
|
|
628
634
|
silent,
|
|
629
635
|
source: source || 'core'
|
|
630
636
|
};
|
|
@@ -647,22 +653,38 @@ let NotificationsTelemetry = class NotificationsTelemetry extends Disposable {
|
|
|
647
653
|
}));
|
|
648
654
|
}
|
|
649
655
|
};
|
|
650
|
-
NotificationsTelemetry = ( __decorate([
|
|
651
|
-
( __param(0, ITelemetryService)),
|
|
652
|
-
( __param(1, INotificationService))
|
|
653
|
-
], NotificationsTelemetry));
|
|
654
|
-
const MultipleEditorGroupsContext = ( new RawContextKey(
|
|
656
|
+
NotificationsTelemetry = ( (__decorate([
|
|
657
|
+
( (__param(0, ITelemetryService))),
|
|
658
|
+
( (__param(1, INotificationService)))
|
|
659
|
+
], NotificationsTelemetry)));
|
|
660
|
+
const MultipleEditorGroupsContext = ( (new RawContextKey(
|
|
661
|
+
'multipleEditorGroups',
|
|
662
|
+
false,
|
|
663
|
+
(localize('multipleEditorGroups', "Whether there are multiple editor groups opened"))
|
|
664
|
+
)));
|
|
655
665
|
MultipleEditorGroupsContext.toNegated();
|
|
656
|
-
const NotificationFocusedContext = ( new RawContextKey(
|
|
657
|
-
|
|
658
|
-
|
|
666
|
+
const NotificationFocusedContext = ( (new RawContextKey(
|
|
667
|
+
'notificationFocus',
|
|
668
|
+
true,
|
|
669
|
+
(localize('notificationFocus', "Whether a notification has keyboard focus"))
|
|
670
|
+
)));
|
|
671
|
+
const NotificationsCenterVisibleContext = ( (new RawContextKey(
|
|
672
|
+
'notificationCenterVisible',
|
|
673
|
+
false,
|
|
674
|
+
(localize('notificationCenterVisible', "Whether the notifications center is visible"))
|
|
675
|
+
)));
|
|
676
|
+
const NotificationsToastsVisibleContext = ( (new RawContextKey(
|
|
677
|
+
'notificationToastsVisible',
|
|
678
|
+
false,
|
|
679
|
+
(localize('notificationToastsVisible', "Whether a notification toast is visible"))
|
|
680
|
+
)));
|
|
659
681
|
let ResourceContextKey = class ResourceContextKey {
|
|
660
682
|
constructor(_contextKeyService, _fileService, _languageService, _modelService) {
|
|
661
683
|
this._contextKeyService = _contextKeyService;
|
|
662
684
|
this._fileService = _fileService;
|
|
663
685
|
this._languageService = _languageService;
|
|
664
686
|
this._modelService = _modelService;
|
|
665
|
-
this._disposables = ( new DisposableStore());
|
|
687
|
+
this._disposables = ( (new DisposableStore()));
|
|
666
688
|
this._schemeKey = ResourceContextKey.Scheme.bindTo(this._contextKeyService);
|
|
667
689
|
this._filenameKey = ResourceContextKey.Filename.bindTo(this._contextKeyService);
|
|
668
690
|
this._dirnameKey = ResourceContextKey.Dirname.bindTo(this._contextKeyService);
|
|
@@ -706,7 +728,7 @@ let ResourceContextKey = class ResourceContextKey {
|
|
|
706
728
|
}
|
|
707
729
|
this._value = value;
|
|
708
730
|
this._contextKeyService.bufferChangeEvents(() => {
|
|
709
|
-
this._resourceKey.set(value ? ( value.toString()) : null);
|
|
731
|
+
this._resourceKey.set(value ? ( (value.toString())) : null);
|
|
710
732
|
this._schemeKey.set(value ? value.scheme : null);
|
|
711
733
|
this._filenameKey.set(value ? basename(value) : null);
|
|
712
734
|
this._dirnameKey.set(value ? dirname(value).fsPath : null);
|
|
@@ -735,40 +757,60 @@ let ResourceContextKey = class ResourceContextKey {
|
|
|
735
757
|
return this._value;
|
|
736
758
|
}
|
|
737
759
|
};
|
|
738
|
-
ResourceContextKey.Scheme = ( new RawContextKey(
|
|
739
|
-
|
|
760
|
+
ResourceContextKey.Scheme = ( (new RawContextKey(
|
|
761
|
+
'resourceScheme',
|
|
762
|
+
undefined,
|
|
763
|
+
{ type: 'string', description: ( (localize('resourceScheme', "The scheme of the resource"))) }
|
|
764
|
+
)));
|
|
765
|
+
ResourceContextKey.Filename = ( (new RawContextKey(
|
|
740
766
|
'resourceFilename',
|
|
741
767
|
undefined,
|
|
742
|
-
{ type: 'string', description: ( localize('resourceFilename', "The file name of the resource")) }
|
|
743
|
-
));
|
|
744
|
-
ResourceContextKey.Dirname = ( new RawContextKey(
|
|
768
|
+
{ type: 'string', description: ( (localize('resourceFilename', "The file name of the resource"))) }
|
|
769
|
+
)));
|
|
770
|
+
ResourceContextKey.Dirname = ( (new RawContextKey(
|
|
745
771
|
'resourceDirname',
|
|
746
772
|
undefined,
|
|
747
|
-
{ type: 'string', description: ( localize('resourceDirname', "The folder name the resource is contained in")) }
|
|
748
|
-
));
|
|
749
|
-
ResourceContextKey.Path = ( new RawContextKey(
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
773
|
+
{ type: 'string', description: ( (localize('resourceDirname', "The folder name the resource is contained in"))) }
|
|
774
|
+
)));
|
|
775
|
+
ResourceContextKey.Path = ( (new RawContextKey(
|
|
776
|
+
'resourcePath',
|
|
777
|
+
undefined,
|
|
778
|
+
{ type: 'string', description: ( (localize('resourcePath', "The full path of the resource"))) }
|
|
779
|
+
)));
|
|
780
|
+
ResourceContextKey.LangId = ( (new RawContextKey(
|
|
781
|
+
'resourceLangId',
|
|
782
|
+
undefined,
|
|
783
|
+
{ type: 'string', description: ( (localize('resourceLangId', "The language identifier of the resource"))) }
|
|
784
|
+
)));
|
|
785
|
+
ResourceContextKey.Resource = ( (new RawContextKey(
|
|
786
|
+
'resource',
|
|
787
|
+
undefined,
|
|
788
|
+
{ type: 'URI', description: ( (localize('resource', "The full value of the resource including scheme and path"))) }
|
|
789
|
+
)));
|
|
790
|
+
ResourceContextKey.Extension = ( (new RawContextKey(
|
|
753
791
|
'resourceExtname',
|
|
754
792
|
undefined,
|
|
755
|
-
{ type: 'string', description: ( localize('resourceExtname', "The extension name of the resource")) }
|
|
756
|
-
));
|
|
757
|
-
ResourceContextKey.HasResource = ( new RawContextKey(
|
|
758
|
-
|
|
793
|
+
{ type: 'string', description: ( (localize('resourceExtname', "The extension name of the resource"))) }
|
|
794
|
+
)));
|
|
795
|
+
ResourceContextKey.HasResource = ( (new RawContextKey(
|
|
796
|
+
'resourceSet',
|
|
797
|
+
undefined,
|
|
798
|
+
{ type: 'boolean', description: ( (localize('resourceSet', "Whether a resource is present or not"))) }
|
|
799
|
+
)));
|
|
800
|
+
ResourceContextKey.IsFileSystemResource = ( (new RawContextKey(
|
|
759
801
|
'isFileSystemResource',
|
|
760
802
|
undefined,
|
|
761
|
-
{ type: 'boolean', description: ( localize(
|
|
803
|
+
{ type: 'boolean', description: ( (localize(
|
|
762
804
|
'isFileSystemResource',
|
|
763
805
|
"Whether the resource is backed by a file system provider"
|
|
764
|
-
)) }
|
|
765
|
-
));
|
|
766
|
-
ResourceContextKey = ( __decorate([
|
|
767
|
-
( __param(0, IContextKeyService)),
|
|
768
|
-
( __param(1, IFileService)),
|
|
769
|
-
( __param(2, ILanguageService)),
|
|
770
|
-
( __param(3, IModelService))
|
|
771
|
-
], ResourceContextKey));
|
|
806
|
+
))) }
|
|
807
|
+
)));
|
|
808
|
+
ResourceContextKey = ( (__decorate([
|
|
809
|
+
( (__param(0, IContextKeyService))),
|
|
810
|
+
( (__param(1, IFileService))),
|
|
811
|
+
( (__param(2, ILanguageService))),
|
|
812
|
+
( (__param(3, IModelService)))
|
|
813
|
+
], ResourceContextKey)));
|
|
772
814
|
const SHOW_NOTIFICATIONS_CENTER = 'notifications.showList';
|
|
773
815
|
const HIDE_NOTIFICATIONS_CENTER = 'notifications.hideList';
|
|
774
816
|
const HIDE_NOTIFICATION_TOAST = 'notifications.hideToasts';
|
|
@@ -797,10 +839,6 @@ function registerNotificationCommands(center, toasts, model) {
|
|
|
797
839
|
}
|
|
798
840
|
return undefined;
|
|
799
841
|
}
|
|
800
|
-
( CommandsRegistry.registerCommand(SHOW_NOTIFICATIONS_CENTER, () => {
|
|
801
|
-
toasts.hide();
|
|
802
|
-
center.show();
|
|
803
|
-
}));
|
|
804
842
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
805
843
|
id: HIDE_NOTIFICATIONS_CENTER,
|
|
806
844
|
weight: 200 + 50,
|
|
@@ -918,20 +956,20 @@ function registerNotificationCommands(center, toasts, model) {
|
|
|
918
956
|
toasts.focusLast();
|
|
919
957
|
}
|
|
920
958
|
});
|
|
921
|
-
const category = { value: ( localize('notifications', "Notifications")), original: 'Notifications' };
|
|
922
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: SHOW_NOTIFICATIONS_CENTER, title: { value: ( localize('showNotifications', "Show Notifications")), original: 'Show Notifications' }, category } });
|
|
923
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: HIDE_NOTIFICATIONS_CENTER, title: { value: ( localize('hideNotifications', "Hide Notifications")), original: 'Hide Notifications' }, category }, when: NotificationsCenterVisibleContext });
|
|
924
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLEAR_ALL_NOTIFICATIONS, title: { value: ( localize('clearAllNotifications', "Clear All Notifications")), original: 'Clear All Notifications' }, category } });
|
|
925
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: TOGGLE_DO_NOT_DISTURB_MODE, title: { value: ( localize('toggleDoNotDisturbMode', "Toggle Do Not Disturb Mode")), original: 'Toggle Do Not Disturb Mode' }, category } });
|
|
926
|
-
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: FOCUS_NOTIFICATION_TOAST, title: { value: ( localize('focusNotificationToasts', "Focus Notification Toast")), original: 'Focus Notification Toast' }, category }, when: NotificationsToastsVisibleContext });
|
|
959
|
+
const category = { value: ( (localize('notifications', "Notifications"))), original: 'Notifications' };
|
|
960
|
+
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: SHOW_NOTIFICATIONS_CENTER, title: { value: ( (localize('showNotifications', "Show Notifications"))), original: 'Show Notifications' }, category } });
|
|
961
|
+
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: HIDE_NOTIFICATIONS_CENTER, title: { value: ( (localize('hideNotifications', "Hide Notifications"))), original: 'Hide Notifications' }, category }, when: NotificationsCenterVisibleContext });
|
|
962
|
+
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: CLEAR_ALL_NOTIFICATIONS, title: { value: ( (localize('clearAllNotifications', "Clear All Notifications"))), original: 'Clear All Notifications' }, category } });
|
|
963
|
+
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: TOGGLE_DO_NOT_DISTURB_MODE, title: { value: ( (localize('toggleDoNotDisturbMode', "Toggle Do Not Disturb Mode"))), original: 'Toggle Do Not Disturb Mode' }, category } });
|
|
964
|
+
MenuRegistry.appendMenuItem(MenuId.CommandPalette, { command: { id: FOCUS_NOTIFICATION_TOAST, title: { value: ( (localize('focusNotificationToasts', "Focus Notification Toast"))), original: 'Focus Notification Toast' }, category }, when: NotificationsToastsVisibleContext });
|
|
927
965
|
}
|
|
928
|
-
const clearIcon = registerIcon('notifications-clear', Codicon.close, ( localize('clearIcon', 'Icon for the clear action in notifications.')));
|
|
929
|
-
const clearAllIcon = registerIcon('notifications-clear-all', Codicon.clearAll, ( localize('clearAllIcon', 'Icon for the clear all action in notifications.')));
|
|
930
|
-
const hideIcon = registerIcon('notifications-hide', Codicon.chevronDown, ( localize('hideIcon', 'Icon for the hide action in notifications.')));
|
|
931
|
-
const expandIcon = registerIcon('notifications-expand', Codicon.chevronUp, ( localize('expandIcon', 'Icon for the expand action in notifications.')));
|
|
932
|
-
const collapseIcon = registerIcon('notifications-collapse', Codicon.chevronDown, ( localize('collapseIcon', 'Icon for the collapse action in notifications.')));
|
|
933
|
-
const configureIcon = registerIcon('notifications-configure', Codicon.gear, ( localize('configureIcon', 'Icon for the configure action in notifications.')));
|
|
934
|
-
const doNotDisturbIcon = registerIcon('notifications-do-not-disturb', Codicon.bellSlash, ( localize('doNotDisturbIcon', 'Icon for the mute all action in notifications.')));
|
|
966
|
+
const clearIcon = registerIcon('notifications-clear', Codicon.close, ( (localize('clearIcon', 'Icon for the clear action in notifications.'))));
|
|
967
|
+
const clearAllIcon = registerIcon('notifications-clear-all', Codicon.clearAll, ( (localize('clearAllIcon', 'Icon for the clear all action in notifications.'))));
|
|
968
|
+
const hideIcon = registerIcon('notifications-hide', Codicon.chevronDown, ( (localize('hideIcon', 'Icon for the hide action in notifications.'))));
|
|
969
|
+
const expandIcon = registerIcon('notifications-expand', Codicon.chevronUp, ( (localize('expandIcon', 'Icon for the expand action in notifications.'))));
|
|
970
|
+
const collapseIcon = registerIcon('notifications-collapse', Codicon.chevronDown, ( (localize('collapseIcon', 'Icon for the collapse action in notifications.'))));
|
|
971
|
+
const configureIcon = registerIcon('notifications-configure', Codicon.gear, ( (localize('configureIcon', 'Icon for the configure action in notifications.'))));
|
|
972
|
+
const doNotDisturbIcon = registerIcon('notifications-do-not-disturb', Codicon.bellSlash, ( (localize('doNotDisturbIcon', 'Icon for the mute all action in notifications.'))));
|
|
935
973
|
let ClearNotificationAction = class ClearNotificationAction extends Action {
|
|
936
974
|
constructor(id, label, commandService) {
|
|
937
975
|
super(id, label, ThemeIcon.asClassName(clearIcon));
|
|
@@ -942,10 +980,10 @@ let ClearNotificationAction = class ClearNotificationAction extends Action {
|
|
|
942
980
|
}
|
|
943
981
|
};
|
|
944
982
|
ClearNotificationAction.ID = CLEAR_NOTIFICATION;
|
|
945
|
-
ClearNotificationAction.LABEL = ( localize('clearNotification', "Clear Notification"));
|
|
946
|
-
ClearNotificationAction = ( __decorate([
|
|
947
|
-
( __param(2, ICommandService))
|
|
948
|
-
], ClearNotificationAction));
|
|
983
|
+
ClearNotificationAction.LABEL = ( (localize('clearNotification', "Clear Notification")));
|
|
984
|
+
ClearNotificationAction = ( (__decorate([
|
|
985
|
+
( (__param(2, ICommandService)))
|
|
986
|
+
], ClearNotificationAction)));
|
|
949
987
|
let ClearAllNotificationsAction = class ClearAllNotificationsAction extends Action {
|
|
950
988
|
constructor(id, label, commandService) {
|
|
951
989
|
super(id, label, ThemeIcon.asClassName(clearAllIcon));
|
|
@@ -956,10 +994,10 @@ let ClearAllNotificationsAction = class ClearAllNotificationsAction extends Acti
|
|
|
956
994
|
}
|
|
957
995
|
};
|
|
958
996
|
ClearAllNotificationsAction.ID = CLEAR_ALL_NOTIFICATIONS;
|
|
959
|
-
ClearAllNotificationsAction.LABEL = ( localize('clearNotifications', "Clear All Notifications"));
|
|
960
|
-
ClearAllNotificationsAction = ( __decorate([
|
|
961
|
-
( __param(2, ICommandService))
|
|
962
|
-
], ClearAllNotificationsAction));
|
|
997
|
+
ClearAllNotificationsAction.LABEL = ( (localize('clearNotifications', "Clear All Notifications")));
|
|
998
|
+
ClearAllNotificationsAction = ( (__decorate([
|
|
999
|
+
( (__param(2, ICommandService)))
|
|
1000
|
+
], ClearAllNotificationsAction)));
|
|
963
1001
|
let ToggleDoNotDisturbAction = class ToggleDoNotDisturbAction extends Action {
|
|
964
1002
|
constructor(id, label, commandService) {
|
|
965
1003
|
super(id, label, ThemeIcon.asClassName(doNotDisturbIcon));
|
|
@@ -970,10 +1008,10 @@ let ToggleDoNotDisturbAction = class ToggleDoNotDisturbAction extends Action {
|
|
|
970
1008
|
}
|
|
971
1009
|
};
|
|
972
1010
|
ToggleDoNotDisturbAction.ID = TOGGLE_DO_NOT_DISTURB_MODE;
|
|
973
|
-
ToggleDoNotDisturbAction.LABEL = ( localize('toggleDoNotDisturbMode', "Toggle Do Not Disturb Mode"));
|
|
974
|
-
ToggleDoNotDisturbAction = ( __decorate([
|
|
975
|
-
( __param(2, ICommandService))
|
|
976
|
-
], ToggleDoNotDisturbAction));
|
|
1011
|
+
ToggleDoNotDisturbAction.LABEL = ( (localize('toggleDoNotDisturbMode', "Toggle Do Not Disturb Mode")));
|
|
1012
|
+
ToggleDoNotDisturbAction = ( (__decorate([
|
|
1013
|
+
( (__param(2, ICommandService)))
|
|
1014
|
+
], ToggleDoNotDisturbAction)));
|
|
977
1015
|
let HideNotificationsCenterAction = class HideNotificationsCenterAction extends Action {
|
|
978
1016
|
constructor(id, label, commandService) {
|
|
979
1017
|
super(id, label, ThemeIcon.asClassName(hideIcon));
|
|
@@ -984,10 +1022,10 @@ let HideNotificationsCenterAction = class HideNotificationsCenterAction extends
|
|
|
984
1022
|
}
|
|
985
1023
|
};
|
|
986
1024
|
HideNotificationsCenterAction.ID = HIDE_NOTIFICATIONS_CENTER;
|
|
987
|
-
HideNotificationsCenterAction.LABEL = ( localize('hideNotificationsCenter', "Hide Notifications"));
|
|
988
|
-
HideNotificationsCenterAction = ( __decorate([
|
|
989
|
-
( __param(2, ICommandService))
|
|
990
|
-
], HideNotificationsCenterAction));
|
|
1025
|
+
HideNotificationsCenterAction.LABEL = ( (localize('hideNotificationsCenter', "Hide Notifications")));
|
|
1026
|
+
HideNotificationsCenterAction = ( (__decorate([
|
|
1027
|
+
( (__param(2, ICommandService)))
|
|
1028
|
+
], HideNotificationsCenterAction)));
|
|
991
1029
|
let ExpandNotificationAction = class ExpandNotificationAction extends Action {
|
|
992
1030
|
constructor(id, label, commandService) {
|
|
993
1031
|
super(id, label, ThemeIcon.asClassName(expandIcon));
|
|
@@ -998,10 +1036,10 @@ let ExpandNotificationAction = class ExpandNotificationAction extends Action {
|
|
|
998
1036
|
}
|
|
999
1037
|
};
|
|
1000
1038
|
ExpandNotificationAction.ID = EXPAND_NOTIFICATION;
|
|
1001
|
-
ExpandNotificationAction.LABEL = ( localize('expandNotification', "Expand Notification"));
|
|
1002
|
-
ExpandNotificationAction = ( __decorate([
|
|
1003
|
-
( __param(2, ICommandService))
|
|
1004
|
-
], ExpandNotificationAction));
|
|
1039
|
+
ExpandNotificationAction.LABEL = ( (localize('expandNotification', "Expand Notification")));
|
|
1040
|
+
ExpandNotificationAction = ( (__decorate([
|
|
1041
|
+
( (__param(2, ICommandService)))
|
|
1042
|
+
], ExpandNotificationAction)));
|
|
1005
1043
|
let CollapseNotificationAction = class CollapseNotificationAction extends Action {
|
|
1006
1044
|
constructor(id, label, commandService) {
|
|
1007
1045
|
super(id, label, ThemeIcon.asClassName(collapseIcon));
|
|
@@ -1012,10 +1050,10 @@ let CollapseNotificationAction = class CollapseNotificationAction extends Action
|
|
|
1012
1050
|
}
|
|
1013
1051
|
};
|
|
1014
1052
|
CollapseNotificationAction.ID = COLLAPSE_NOTIFICATION;
|
|
1015
|
-
CollapseNotificationAction.LABEL = ( localize('collapseNotification', "Collapse Notification"));
|
|
1016
|
-
CollapseNotificationAction = ( __decorate([
|
|
1017
|
-
( __param(2, ICommandService))
|
|
1018
|
-
], CollapseNotificationAction));
|
|
1053
|
+
CollapseNotificationAction.LABEL = ( (localize('collapseNotification', "Collapse Notification")));
|
|
1054
|
+
CollapseNotificationAction = ( (__decorate([
|
|
1055
|
+
( (__param(2, ICommandService)))
|
|
1056
|
+
], CollapseNotificationAction)));
|
|
1019
1057
|
class ConfigureNotificationAction extends Action {
|
|
1020
1058
|
constructor(id, label, configurationActions) {
|
|
1021
1059
|
super(id, label, ThemeIcon.asClassName(configureIcon));
|
|
@@ -1023,7 +1061,7 @@ class ConfigureNotificationAction extends Action {
|
|
|
1023
1061
|
}
|
|
1024
1062
|
}
|
|
1025
1063
|
ConfigureNotificationAction.ID = 'workbench.action.configureNotification';
|
|
1026
|
-
ConfigureNotificationAction.LABEL = ( localize('configureNotification', "Configure Notification"));
|
|
1064
|
+
ConfigureNotificationAction.LABEL = ( (localize('configureNotification', "Configure Notification")));
|
|
1027
1065
|
let CopyNotificationMessageAction = class CopyNotificationMessageAction extends Action {
|
|
1028
1066
|
constructor(id, label, clipboardService) {
|
|
1029
1067
|
super(id, label);
|
|
@@ -1034,10 +1072,10 @@ let CopyNotificationMessageAction = class CopyNotificationMessageAction extends
|
|
|
1034
1072
|
}
|
|
1035
1073
|
};
|
|
1036
1074
|
CopyNotificationMessageAction.ID = 'workbench.action.copyNotificationMessage';
|
|
1037
|
-
CopyNotificationMessageAction.LABEL = ( localize('copyNotification', "Copy Text"));
|
|
1038
|
-
CopyNotificationMessageAction = ( __decorate([
|
|
1039
|
-
( __param(2, IClipboardService))
|
|
1040
|
-
], CopyNotificationMessageAction));
|
|
1075
|
+
CopyNotificationMessageAction.LABEL = ( (localize('copyNotification', "Copy Text")));
|
|
1076
|
+
CopyNotificationMessageAction = ( (__decorate([
|
|
1077
|
+
( (__param(2, IClipboardService)))
|
|
1078
|
+
], CopyNotificationMessageAction)));
|
|
1041
1079
|
let NotificationActionRunner = class NotificationActionRunner extends ActionRunner {
|
|
1042
1080
|
constructor(telemetryService, notificationService) {
|
|
1043
1081
|
super();
|
|
@@ -1048,7 +1086,7 @@ let NotificationActionRunner = class NotificationActionRunner extends ActionRunn
|
|
|
1048
1086
|
this.telemetryService.publicLog2('workbenchActionExecuted', { id: action.id, from: 'message' });
|
|
1049
1087
|
if (isNotificationViewItem(context)) {
|
|
1050
1088
|
this.telemetryService.publicLog2('notification:actionExecuted', {
|
|
1051
|
-
id: ( hash(( context.message.original.toString())).toString()),
|
|
1089
|
+
id: ( (hash(( (context.message.original.toString()))).toString())),
|
|
1052
1090
|
actionLabel: action.label,
|
|
1053
1091
|
source: context.sourceId || 'core',
|
|
1054
1092
|
silent: context.silent
|
|
@@ -1062,10 +1100,10 @@ let NotificationActionRunner = class NotificationActionRunner extends ActionRunn
|
|
|
1062
1100
|
}
|
|
1063
1101
|
}
|
|
1064
1102
|
};
|
|
1065
|
-
NotificationActionRunner = ( __decorate([
|
|
1066
|
-
( __param(0, ITelemetryService)),
|
|
1067
|
-
( __param(1, INotificationService))
|
|
1068
|
-
], NotificationActionRunner));
|
|
1103
|
+
NotificationActionRunner = ( (__decorate([
|
|
1104
|
+
( (__param(0, ITelemetryService))),
|
|
1105
|
+
( (__param(1, INotificationService)))
|
|
1106
|
+
], NotificationActionRunner)));
|
|
1069
1107
|
class NotificationsListDelegate {
|
|
1070
1108
|
constructor(container) {
|
|
1071
1109
|
this.offsetHelper = this.createOffsetHelper(container);
|
|
@@ -1129,11 +1167,11 @@ class NotificationMessageRenderer {
|
|
|
1129
1167
|
else {
|
|
1130
1168
|
let title = node.title;
|
|
1131
1169
|
if (!title && node.href.startsWith('command:')) {
|
|
1132
|
-
title = ( localize(
|
|
1170
|
+
title = ( (localize(
|
|
1133
1171
|
'executeCommand',
|
|
1134
1172
|
"Click to execute command '{0}'",
|
|
1135
1173
|
node.href.substr('command:'.length)
|
|
1136
|
-
));
|
|
1174
|
+
)));
|
|
1137
1175
|
}
|
|
1138
1176
|
else if (!title) {
|
|
1139
1177
|
title = node.href;
|
|
@@ -1144,9 +1182,9 @@ class NotificationMessageRenderer {
|
|
|
1144
1182
|
EventHelper.stop(e, true);
|
|
1145
1183
|
actionHandler.callback(node.href);
|
|
1146
1184
|
};
|
|
1147
|
-
const onClick = actionHandler.toDispose.add(( new DomEmitter(anchor, 'click'))).event;
|
|
1185
|
+
const onClick = actionHandler.toDispose.add(( (new DomEmitter(anchor, 'click')))).event;
|
|
1148
1186
|
actionHandler.toDispose.add(Gesture.addTarget(anchor));
|
|
1149
|
-
const onTap = actionHandler.toDispose.add(( new DomEmitter(anchor, EventType.Tap))).event;
|
|
1187
|
+
const onTap = actionHandler.toDispose.add(( (new DomEmitter(anchor, EventType$1.Tap)))).event;
|
|
1150
1188
|
Event.any(onClick, onTap)(onPointer, null, actionHandler.toDispose);
|
|
1151
1189
|
}
|
|
1152
1190
|
messageContainer.appendChild(anchor);
|
|
@@ -1167,7 +1205,7 @@ let NotificationRenderer = class NotificationRenderer {
|
|
|
1167
1205
|
}
|
|
1168
1206
|
renderTemplate(container) {
|
|
1169
1207
|
const data = Object.create(null);
|
|
1170
|
-
data.toDispose = ( new DisposableStore());
|
|
1208
|
+
data.toDispose = ( (new DisposableStore()));
|
|
1171
1209
|
data.container = document.createElement('div');
|
|
1172
1210
|
data.container.classList.add('notification-list-item');
|
|
1173
1211
|
data.mainRow = document.createElement('div');
|
|
@@ -1178,23 +1216,23 @@ let NotificationRenderer = class NotificationRenderer {
|
|
|
1178
1216
|
data.message.classList.add('notification-list-item-message');
|
|
1179
1217
|
const toolbarContainer = document.createElement('div');
|
|
1180
1218
|
toolbarContainer.classList.add('notification-list-item-toolbar-container');
|
|
1181
|
-
data.toolbar = ( new ActionBar(toolbarContainer, {
|
|
1182
|
-
ariaLabel: ( localize('notificationActions', "Notification Actions")),
|
|
1219
|
+
data.toolbar = ( (new ActionBar(toolbarContainer, {
|
|
1220
|
+
ariaLabel: ( (localize('notificationActions', "Notification Actions"))),
|
|
1183
1221
|
actionViewItemProvider: action => {
|
|
1184
1222
|
if (action && action instanceof ConfigureNotificationAction) {
|
|
1185
|
-
const item = ( new DropdownMenuActionViewItem(
|
|
1223
|
+
const item = ( (new DropdownMenuActionViewItem(
|
|
1186
1224
|
action,
|
|
1187
1225
|
action.configurationActions,
|
|
1188
1226
|
this.contextMenuService,
|
|
1189
1227
|
{ actionRunner: this.actionRunner, classNames: action.class }
|
|
1190
|
-
));
|
|
1228
|
+
)));
|
|
1191
1229
|
data.toDispose.add(item);
|
|
1192
1230
|
return item;
|
|
1193
1231
|
}
|
|
1194
1232
|
return undefined;
|
|
1195
1233
|
},
|
|
1196
1234
|
actionRunner: this.actionRunner
|
|
1197
|
-
}));
|
|
1235
|
+
})));
|
|
1198
1236
|
data.toDispose.add(data.toolbar);
|
|
1199
1237
|
data.detailsRow = document.createElement('div');
|
|
1200
1238
|
data.detailsRow.classList.add('notification-list-item-details-row');
|
|
@@ -1210,7 +1248,7 @@ let NotificationRenderer = class NotificationRenderer {
|
|
|
1210
1248
|
data.mainRow.appendChild(data.icon);
|
|
1211
1249
|
data.mainRow.appendChild(data.message);
|
|
1212
1250
|
data.mainRow.appendChild(toolbarContainer);
|
|
1213
|
-
data.progress = ( new ProgressBar(container));
|
|
1251
|
+
data.progress = ( (new ProgressBar(container)));
|
|
1214
1252
|
data.toDispose.add(attachProgressBarStyler(data.progress, this.themeService));
|
|
1215
1253
|
data.toDispose.add(data.progress);
|
|
1216
1254
|
data.renderer = this.instantiationService.createInstance(NotificationTemplateRenderer, data, this.actionRunner);
|
|
@@ -1225,11 +1263,11 @@ let NotificationRenderer = class NotificationRenderer {
|
|
|
1225
1263
|
}
|
|
1226
1264
|
};
|
|
1227
1265
|
NotificationRenderer.TEMPLATE_ID = 'notification';
|
|
1228
|
-
NotificationRenderer = ( __decorate([
|
|
1229
|
-
( __param(1, IThemeService)),
|
|
1230
|
-
( __param(2, IContextMenuService)),
|
|
1231
|
-
( __param(3, IInstantiationService))
|
|
1232
|
-
], NotificationRenderer));
|
|
1266
|
+
NotificationRenderer = ( (__decorate([
|
|
1267
|
+
( (__param(1, IThemeService))),
|
|
1268
|
+
( (__param(2, IContextMenuService))),
|
|
1269
|
+
( (__param(3, IInstantiationService)))
|
|
1270
|
+
], NotificationRenderer)));
|
|
1233
1271
|
let NotificationTemplateRenderer = class NotificationTemplateRenderer extends Disposable {
|
|
1234
1272
|
constructor(template, actionRunner, openerService, instantiationService, themeService, keybindingService, contextMenuService) {
|
|
1235
1273
|
super();
|
|
@@ -1240,7 +1278,7 @@ let NotificationTemplateRenderer = class NotificationTemplateRenderer extends Di
|
|
|
1240
1278
|
this.themeService = themeService;
|
|
1241
1279
|
this.keybindingService = keybindingService;
|
|
1242
1280
|
this.contextMenuService = contextMenuService;
|
|
1243
|
-
this.inputDisposables = this._register(( new DisposableStore()));
|
|
1281
|
+
this.inputDisposables = this._register(( (new DisposableStore())));
|
|
1244
1282
|
if (!NotificationTemplateRenderer.closeNotificationAction) {
|
|
1245
1283
|
NotificationTemplateRenderer.closeNotificationAction = instantiationService.createInstance(ClearNotificationAction, ClearNotificationAction.ID, ClearNotificationAction.LABEL);
|
|
1246
1284
|
NotificationTemplateRenderer.expandNotificationAction = instantiationService.createInstance(ExpandNotificationAction, ExpandNotificationAction.ID, ExpandNotificationAction.LABEL);
|
|
@@ -1253,12 +1291,12 @@ let NotificationTemplateRenderer = class NotificationTemplateRenderer extends Di
|
|
|
1253
1291
|
}
|
|
1254
1292
|
render(notification) {
|
|
1255
1293
|
this.template.container.classList.toggle('expanded', notification.expanded);
|
|
1256
|
-
this.inputDisposables.add(addDisposableListener(this.template.container, EventType
|
|
1294
|
+
this.inputDisposables.add(addDisposableListener(this.template.container, EventType.MOUSE_UP, e => {
|
|
1257
1295
|
if (e.button === 1 ) {
|
|
1258
1296
|
EventHelper.stop(e, true);
|
|
1259
1297
|
}
|
|
1260
1298
|
}));
|
|
1261
|
-
this.inputDisposables.add(addDisposableListener(this.template.container, EventType
|
|
1299
|
+
this.inputDisposables.add(addDisposableListener(this.template.container, EventType.AUXCLICK, e => {
|
|
1262
1300
|
if (!notification.hasProgress && e.button === 1 ) {
|
|
1263
1301
|
EventHelper.stop(e, true);
|
|
1264
1302
|
notification.close();
|
|
@@ -1295,7 +1333,7 @@ let NotificationTemplateRenderer = class NotificationTemplateRenderer extends Di
|
|
|
1295
1333
|
renderMessage(notification) {
|
|
1296
1334
|
clearNode(this.template.message);
|
|
1297
1335
|
this.template.message.appendChild(NotificationMessageRenderer.render(notification.message, {
|
|
1298
|
-
callback: link => this.openerService.open(( URI.parse(link)), { allowCommands: true }),
|
|
1336
|
+
callback: link => this.openerService.open(( (URI.parse(link))), { allowCommands: true }),
|
|
1299
1337
|
toDispose: this.inputDisposables
|
|
1300
1338
|
}));
|
|
1301
1339
|
const messageOverflows = notification.canCollapse && !notification.expanded && this.template.message.scrollWidth > this.template.message.clientWidth;
|
|
@@ -1343,7 +1381,7 @@ let NotificationTemplateRenderer = class NotificationTemplateRenderer extends Di
|
|
|
1343
1381
|
}
|
|
1344
1382
|
renderSource(notification) {
|
|
1345
1383
|
if (notification.expanded && notification.source) {
|
|
1346
|
-
this.template.source.textContent = ( localize('notificationSource', "Source: {0}", notification.source));
|
|
1384
|
+
this.template.source.textContent = ( (localize('notificationSource', "Source: {0}", notification.source)));
|
|
1347
1385
|
this.template.source.title = notification.source;
|
|
1348
1386
|
}
|
|
1349
1387
|
else {
|
|
@@ -1364,7 +1402,7 @@ let NotificationTemplateRenderer = class NotificationTemplateRenderer extends Di
|
|
|
1364
1402
|
}
|
|
1365
1403
|
}
|
|
1366
1404
|
})();
|
|
1367
|
-
const buttonToolbar = this.inputDisposables.add(( new ButtonBar(this.template.buttonsContainer)));
|
|
1405
|
+
const buttonToolbar = this.inputDisposables.add(( (new ButtonBar(this.template.buttonsContainer))));
|
|
1368
1406
|
for (let i = 0; i < primaryActions.length; i++) {
|
|
1369
1407
|
const action = primaryActions[i];
|
|
1370
1408
|
const options = {
|
|
@@ -1427,13 +1465,13 @@ let NotificationTemplateRenderer = class NotificationTemplateRenderer extends Di
|
|
|
1427
1465
|
}
|
|
1428
1466
|
};
|
|
1429
1467
|
NotificationTemplateRenderer.SEVERITIES = [Severity.Info, Severity.Warning, Severity.Error];
|
|
1430
|
-
NotificationTemplateRenderer = ( __decorate([
|
|
1431
|
-
( __param(2, IOpenerService)),
|
|
1432
|
-
( __param(3, IInstantiationService)),
|
|
1433
|
-
( __param(4, IThemeService)),
|
|
1434
|
-
( __param(5, IKeybindingService)),
|
|
1435
|
-
( __param(6, IContextMenuService))
|
|
1436
|
-
], NotificationTemplateRenderer));
|
|
1468
|
+
NotificationTemplateRenderer = ( (__decorate([
|
|
1469
|
+
( (__param(2, IOpenerService))),
|
|
1470
|
+
( (__param(3, IInstantiationService))),
|
|
1471
|
+
( (__param(4, IThemeService))),
|
|
1472
|
+
( (__param(5, IKeybindingService))),
|
|
1473
|
+
( (__param(6, IContextMenuService)))
|
|
1474
|
+
], NotificationTemplateRenderer)));
|
|
1437
1475
|
let NotificationsList = class NotificationsList extends Themable {
|
|
1438
1476
|
constructor(container, options, instantiationService, themeService, contextMenuService) {
|
|
1439
1477
|
super(themeService);
|
|
@@ -1465,7 +1503,7 @@ let NotificationsList = class NotificationsList extends Themable {
|
|
|
1465
1503
|
this.listContainer.classList.add('notifications-list-container');
|
|
1466
1504
|
const actionRunner = this._register(this.instantiationService.createInstance(NotificationActionRunner));
|
|
1467
1505
|
const renderer = this.instantiationService.createInstance(NotificationRenderer, actionRunner);
|
|
1468
|
-
const listDelegate = this.listDelegate = ( new NotificationsListDelegate(this.listContainer));
|
|
1506
|
+
const listDelegate = this.listDelegate = ( (new NotificationsListDelegate(this.listContainer)));
|
|
1469
1507
|
const options = this.options;
|
|
1470
1508
|
const list = this.list = this._register(this.instantiationService.createInstance(WorkbenchList, 'NotificationsList', this.listContainer, listDelegate, [renderer], {
|
|
1471
1509
|
...options,
|
|
@@ -1477,17 +1515,21 @@ let NotificationsList = class NotificationsList extends Themable {
|
|
|
1477
1515
|
accessibilityProvider: {
|
|
1478
1516
|
getAriaLabel(element) {
|
|
1479
1517
|
if (!element.source) {
|
|
1480
|
-
return (
|
|
1518
|
+
return (
|
|
1519
|
+
(localize('notificationAriaLabel', "{0}, notification", element.message.raw))
|
|
1520
|
+
);
|
|
1481
1521
|
}
|
|
1482
|
-
return (
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1522
|
+
return (
|
|
1523
|
+
(localize(
|
|
1524
|
+
'notificationWithSourceAriaLabel',
|
|
1525
|
+
"{0}, source: {1}, notification",
|
|
1526
|
+
element.message.raw,
|
|
1527
|
+
element.source
|
|
1528
|
+
))
|
|
1529
|
+
);
|
|
1488
1530
|
},
|
|
1489
1531
|
getWidgetAriaLabel() {
|
|
1490
|
-
return options.widgetAriaLabel ?? ( localize('notificationsList', "Notifications List"));
|
|
1532
|
+
return options.widgetAriaLabel ?? ( (localize('notificationsList', "Notifications List")));
|
|
1491
1533
|
},
|
|
1492
1534
|
getRole() {
|
|
1493
1535
|
return 'dialog';
|
|
@@ -1611,11 +1653,11 @@ let NotificationsList = class NotificationsList extends Themable {
|
|
|
1611
1653
|
super.dispose();
|
|
1612
1654
|
}
|
|
1613
1655
|
};
|
|
1614
|
-
NotificationsList = ( __decorate([
|
|
1615
|
-
( __param(2, IInstantiationService)),
|
|
1616
|
-
( __param(3, IThemeService)),
|
|
1617
|
-
( __param(4, IContextMenuService))
|
|
1618
|
-
], NotificationsList));
|
|
1656
|
+
NotificationsList = ( (__decorate([
|
|
1657
|
+
( (__param(2, IInstantiationService))),
|
|
1658
|
+
( (__param(3, IThemeService))),
|
|
1659
|
+
( (__param(4, IContextMenuService)))
|
|
1660
|
+
], NotificationsList)));
|
|
1619
1661
|
registerThemingParticipant((theme, collector) => {
|
|
1620
1662
|
const linkColor = theme.getColor(NOTIFICATIONS_LINKS);
|
|
1621
1663
|
if (linkColor) {
|
|
@@ -1654,11 +1696,11 @@ registerThemingParticipant((theme, collector) => {
|
|
|
1654
1696
|
}
|
|
1655
1697
|
});
|
|
1656
1698
|
var ToastVisibility;
|
|
1657
|
-
( (function(ToastVisibility) {
|
|
1699
|
+
( ((function(ToastVisibility) {
|
|
1658
1700
|
ToastVisibility[ToastVisibility["HIDDEN_OR_VISIBLE"] = 0] = "HIDDEN_OR_VISIBLE";
|
|
1659
1701
|
ToastVisibility[ToastVisibility["HIDDEN"] = 1] = "HIDDEN";
|
|
1660
1702
|
ToastVisibility[ToastVisibility["VISIBLE"] = 2] = "VISIBLE";
|
|
1661
|
-
})(ToastVisibility || (ToastVisibility = {})));
|
|
1703
|
+
})(ToastVisibility || (ToastVisibility = {}))));
|
|
1662
1704
|
let NotificationsToasts = class NotificationsToasts extends Themable {
|
|
1663
1705
|
constructor(container, model, instantiationService, layoutService, themeService, editorGroupService, contextKeyService, lifecycleService, hostService) {
|
|
1664
1706
|
super(themeService);
|
|
@@ -1670,13 +1712,13 @@ let NotificationsToasts = class NotificationsToasts extends Themable {
|
|
|
1670
1712
|
this.contextKeyService = contextKeyService;
|
|
1671
1713
|
this.lifecycleService = lifecycleService;
|
|
1672
1714
|
this.hostService = hostService;
|
|
1673
|
-
this._onDidChangeVisibility = this._register(( new Emitter()));
|
|
1715
|
+
this._onDidChangeVisibility = this._register(( (new Emitter())));
|
|
1674
1716
|
this.onDidChangeVisibility = this._onDidChangeVisibility.event;
|
|
1675
1717
|
this._isVisible = false;
|
|
1676
|
-
this.mapNotificationToToast = ( new Map());
|
|
1677
|
-
this.mapNotificationToDisposable = ( new Map());
|
|
1718
|
+
this.mapNotificationToToast = ( (new Map()));
|
|
1719
|
+
this.mapNotificationToDisposable = ( (new Map()));
|
|
1678
1720
|
this.notificationsToastsVisibleContextKey = NotificationsToastsVisibleContext.bindTo(this.contextKeyService);
|
|
1679
|
-
this.addedToastsIntervalCounter = ( new IntervalCounter(NotificationsToasts.SPAM_PROTECTION.interval));
|
|
1721
|
+
this.addedToastsIntervalCounter = ( (new IntervalCounter(NotificationsToasts.SPAM_PROTECTION.interval)));
|
|
1680
1722
|
this.registerListeners();
|
|
1681
1723
|
}
|
|
1682
1724
|
get isVisible() { return !!this._isVisible; }
|
|
@@ -1710,7 +1752,7 @@ let NotificationsToasts = class NotificationsToasts extends Themable {
|
|
|
1710
1752
|
if (this.addedToastsIntervalCounter.increment() > NotificationsToasts.SPAM_PROTECTION.limit) {
|
|
1711
1753
|
return;
|
|
1712
1754
|
}
|
|
1713
|
-
const itemDisposables = ( new DisposableStore());
|
|
1755
|
+
const itemDisposables = ( (new DisposableStore()));
|
|
1714
1756
|
this.mapNotificationToDisposable.set(item, itemDisposables);
|
|
1715
1757
|
itemDisposables.add(scheduleAtNextAnimationFrame(() => this.doAddToast(item, itemDisposables)));
|
|
1716
1758
|
}
|
|
@@ -1738,14 +1780,18 @@ let NotificationsToasts = class NotificationsToasts extends Themable {
|
|
|
1738
1780
|
verticalScrollMode: 2 ,
|
|
1739
1781
|
widgetAriaLabel: (() => {
|
|
1740
1782
|
if (!item.source) {
|
|
1741
|
-
return (
|
|
1783
|
+
return (
|
|
1784
|
+
(localize('notificationAriaLabel', "{0}, notification", item.message.raw))
|
|
1785
|
+
);
|
|
1742
1786
|
}
|
|
1743
|
-
return (
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1787
|
+
return (
|
|
1788
|
+
(localize(
|
|
1789
|
+
'notificationWithSourceAriaLabel',
|
|
1790
|
+
"{0}, source: {1}, notification",
|
|
1791
|
+
item.message.raw,
|
|
1792
|
+
item.source
|
|
1793
|
+
))
|
|
1794
|
+
);
|
|
1749
1795
|
})()
|
|
1750
1796
|
});
|
|
1751
1797
|
itemDisposables.add(notificationList);
|
|
@@ -1791,8 +1837,8 @@ let NotificationsToasts = class NotificationsToasts extends Themable {
|
|
|
1791
1837
|
}
|
|
1792
1838
|
purgeNotification(item, notificationToastContainer, notificationList, disposables) {
|
|
1793
1839
|
let isMouseOverToast = false;
|
|
1794
|
-
disposables.add(addDisposableListener(notificationToastContainer, EventType
|
|
1795
|
-
disposables.add(addDisposableListener(notificationToastContainer, EventType
|
|
1840
|
+
disposables.add(addDisposableListener(notificationToastContainer, EventType.MOUSE_OVER, () => isMouseOverToast = true));
|
|
1841
|
+
disposables.add(addDisposableListener(notificationToastContainer, EventType.MOUSE_OUT, () => isMouseOverToast = false));
|
|
1796
1842
|
let purgeTimeoutHandle;
|
|
1797
1843
|
let listener;
|
|
1798
1844
|
const hideAfterTimeout = () => {
|
|
@@ -1987,7 +2033,9 @@ let NotificationsToasts = class NotificationsToasts extends Themable {
|
|
|
1987
2033
|
availableHeight = typeof availableHeight === 'number'
|
|
1988
2034
|
? Math.round(availableHeight * 0.618)
|
|
1989
2035
|
: 0;
|
|
1990
|
-
return (
|
|
2036
|
+
return (
|
|
2037
|
+
(new Dimension(Math.min(maxWidth, availableWidth), availableHeight))
|
|
2038
|
+
);
|
|
1991
2039
|
}
|
|
1992
2040
|
layoutLists(width) {
|
|
1993
2041
|
this.mapNotificationToToast.forEach(({ list }) => list.layout(width));
|
|
@@ -2040,25 +2088,25 @@ NotificationsToasts.SPAM_PROTECTION = {
|
|
|
2040
2088
|
interval: 800,
|
|
2041
2089
|
limit: NotificationsToasts.MAX_NOTIFICATIONS
|
|
2042
2090
|
};
|
|
2043
|
-
NotificationsToasts = ( __decorate([
|
|
2044
|
-
( __param(2, IInstantiationService)),
|
|
2045
|
-
( __param(3, IWorkbenchLayoutService)),
|
|
2046
|
-
( __param(4, IThemeService)),
|
|
2047
|
-
( __param(5, IEditorGroupsService)),
|
|
2048
|
-
( __param(6, IContextKeyService)),
|
|
2049
|
-
( __param(7, ILifecycleService)),
|
|
2050
|
-
( __param(8, IHostService))
|
|
2051
|
-
], NotificationsToasts));
|
|
2091
|
+
NotificationsToasts = ( (__decorate([
|
|
2092
|
+
( (__param(2, IInstantiationService))),
|
|
2093
|
+
( (__param(3, IWorkbenchLayoutService))),
|
|
2094
|
+
( (__param(4, IThemeService))),
|
|
2095
|
+
( (__param(5, IEditorGroupsService))),
|
|
2096
|
+
( (__param(6, IContextKeyService))),
|
|
2097
|
+
( (__param(7, ILifecycleService))),
|
|
2098
|
+
( (__param(8, IHostService)))
|
|
2099
|
+
], NotificationsToasts)));
|
|
2052
2100
|
let NotificationService = class NotificationService extends Disposable {
|
|
2053
2101
|
constructor(storageService) {
|
|
2054
2102
|
super();
|
|
2055
2103
|
this.storageService = storageService;
|
|
2056
|
-
this.model = this._register(( new NotificationsModel()));
|
|
2057
|
-
this._onDidAddNotification = this._register(( new Emitter()));
|
|
2104
|
+
this.model = this._register(( (new NotificationsModel())));
|
|
2105
|
+
this._onDidAddNotification = this._register(( (new Emitter())));
|
|
2058
2106
|
this.onDidAddNotification = this._onDidAddNotification.event;
|
|
2059
|
-
this._onDidRemoveNotification = this._register(( new Emitter()));
|
|
2107
|
+
this._onDidRemoveNotification = this._register(( (new Emitter())));
|
|
2060
2108
|
this.onDidRemoveNotification = this._onDidRemoveNotification.event;
|
|
2061
|
-
this._onDidChangeDoNotDisturbMode = this._register(( new Emitter()));
|
|
2109
|
+
this._onDidChangeDoNotDisturbMode = this._register(( (new Emitter())));
|
|
2062
2110
|
this.onDidChangeDoNotDisturbMode = this._onDidChangeDoNotDisturbMode.event;
|
|
2063
2111
|
this._doNotDisturbMode = this.storageService.getBoolean(NotificationService.DND_SETTINGS_KEY, -1 , false);
|
|
2064
2112
|
this.updateDoNotDisturbFilters();
|
|
@@ -2130,17 +2178,25 @@ let NotificationService = class NotificationService extends Disposable {
|
|
|
2130
2178
|
this.model.addNotification({ severity: Severity.Error, message });
|
|
2131
2179
|
}
|
|
2132
2180
|
notify(notification) {
|
|
2133
|
-
const toDispose = ( new DisposableStore());
|
|
2181
|
+
const toDispose = ( (new DisposableStore()));
|
|
2134
2182
|
if (notification.neverShowAgain) {
|
|
2135
2183
|
const scope = this.toStorageScope(notification.neverShowAgain);
|
|
2136
2184
|
const id = notification.neverShowAgain.id;
|
|
2137
2185
|
if (this.storageService.getBoolean(id, scope)) {
|
|
2138
|
-
return (
|
|
2186
|
+
return (
|
|
2187
|
+
(new NoOpNotification())
|
|
2188
|
+
);
|
|
2139
2189
|
}
|
|
2140
|
-
const neverShowAgainAction = toDispose.add(( new Action(
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2190
|
+
const neverShowAgainAction = toDispose.add(( (new Action(
|
|
2191
|
+
'workbench.notification.neverShowAgain',
|
|
2192
|
+
(localize('neverShowAgain', "Don't Show Again")),
|
|
2193
|
+
undefined,
|
|
2194
|
+
true,
|
|
2195
|
+
async () => {
|
|
2196
|
+
handle.close();
|
|
2197
|
+
this.storageService.store(id, true, scope, 0 );
|
|
2198
|
+
}
|
|
2199
|
+
))));
|
|
2144
2200
|
const actions = {
|
|
2145
2201
|
primary: notification.actions?.primary || [],
|
|
2146
2202
|
secondary: notification.actions?.secondary || []
|
|
@@ -2170,15 +2226,17 @@ let NotificationService = class NotificationService extends Disposable {
|
|
|
2170
2226
|
}
|
|
2171
2227
|
}
|
|
2172
2228
|
prompt(severity, message, choices, options) {
|
|
2173
|
-
const toDispose = ( new DisposableStore());
|
|
2229
|
+
const toDispose = ( (new DisposableStore()));
|
|
2174
2230
|
if (options?.neverShowAgain) {
|
|
2175
2231
|
const scope = this.toStorageScope(options.neverShowAgain);
|
|
2176
2232
|
const id = options.neverShowAgain.id;
|
|
2177
2233
|
if (this.storageService.getBoolean(id, scope)) {
|
|
2178
|
-
return (
|
|
2234
|
+
return (
|
|
2235
|
+
(new NoOpNotification())
|
|
2236
|
+
);
|
|
2179
2237
|
}
|
|
2180
2238
|
const neverShowAgainChoice = {
|
|
2181
|
-
label: ( localize('neverShowAgain', "Don't Show Again")),
|
|
2239
|
+
label: ( (localize('neverShowAgain', "Don't Show Again"))),
|
|
2182
2240
|
run: () => this.storageService.store(id, true, scope, 0 ),
|
|
2183
2241
|
isSecondary: options.neverShowAgain.isSecondary
|
|
2184
2242
|
};
|
|
@@ -2193,7 +2251,7 @@ let NotificationService = class NotificationService extends Disposable {
|
|
|
2193
2251
|
const primaryActions = [];
|
|
2194
2252
|
const secondaryActions = [];
|
|
2195
2253
|
choices.forEach((choice, index) => {
|
|
2196
|
-
const action = ( new ChoiceAction(`workbench.dialog.choice.${index}`, choice));
|
|
2254
|
+
const action = ( (new ChoiceAction(`workbench.dialog.choice.${index}`, choice)));
|
|
2197
2255
|
if (!choice.isSecondary) {
|
|
2198
2256
|
primaryActions.push(action);
|
|
2199
2257
|
}
|
|
@@ -2223,9 +2281,9 @@ let NotificationService = class NotificationService extends Disposable {
|
|
|
2223
2281
|
}
|
|
2224
2282
|
};
|
|
2225
2283
|
NotificationService.DND_SETTINGS_KEY = 'notifications.doNotDisturbMode';
|
|
2226
|
-
NotificationService = ( __decorate([
|
|
2227
|
-
( __param(0, IStorageService))
|
|
2228
|
-
], NotificationService));
|
|
2284
|
+
NotificationService = ( (__decorate([
|
|
2285
|
+
( (__param(0, IStorageService)))
|
|
2286
|
+
], NotificationService)));
|
|
2229
2287
|
var css = "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-workbench > .notifications-center {\n\tposition: absolute;\n\tz-index: 1000;\n\tright: 8px;\n\tbottom: 31px;\n\tdisplay: none;\n\toverflow: hidden;\n}\n\n.monaco-workbench.nostatusbar > .notifications-center {\n\tbottom: 8px;\n}\n\n.monaco-workbench > .notifications-center.visible {\n\tdisplay: block;\n}\n\n/* Header */\n\n.monaco-workbench > .notifications-center > .notifications-center-header {\n\tdisplay: flex;\n\talign-items: center;\n\tpadding-left: 8px;\n\tpadding-right: 5px;\n\theight: 35px;\n}\n\n.monaco-workbench > .notifications-center > .notifications-center-header > .notifications-center-header-title {\n\ttext-transform: uppercase;\n\tfont-size: 11px;\n}\n\n.monaco-workbench > .notifications-center > .notifications-center-header > .notifications-center-header-toolbar {\n\tflex: 1;\n}\n\n.monaco-workbench > .notifications-center > .notifications-center-header > .notifications-center-header-toolbar .actions-container {\n\tjustify-content: flex-end;\n}\n";
|
|
2230
2288
|
n(css,{});
|
|
2231
2289
|
let NotificationsCenter = class NotificationsCenter extends Themable {
|
|
@@ -2239,7 +2297,7 @@ let NotificationsCenter = class NotificationsCenter extends Themable {
|
|
|
2239
2297
|
this.editorGroupService = editorGroupService;
|
|
2240
2298
|
this.keybindingService = keybindingService;
|
|
2241
2299
|
this.notificationService = notificationService;
|
|
2242
|
-
this._onDidChangeVisibility = this._register(( new Emitter()));
|
|
2300
|
+
this._onDidChangeVisibility = this._register(( (new Emitter())));
|
|
2243
2301
|
this.onDidChangeVisibility = this._onDidChangeVisibility.event;
|
|
2244
2302
|
this.notificationsCenterVisibleContextKey = NotificationsCenterVisibleContext.bindTo(this.contextKeyService);
|
|
2245
2303
|
this.notificationsCenterVisibleContextKey = NotificationsCenterVisibleContext.bindTo(contextKeyService);
|
|
@@ -2281,11 +2339,11 @@ let NotificationsCenter = class NotificationsCenter extends Themable {
|
|
|
2281
2339
|
updateTitle() {
|
|
2282
2340
|
const [notificationsCenterTitle, clearAllAction] = assertAllDefined(this.notificationsCenterTitle, this.clearAllAction);
|
|
2283
2341
|
if (this.model.notifications.length === 0) {
|
|
2284
|
-
notificationsCenterTitle.textContent = ( localize('notificationsEmpty', "No new notifications"));
|
|
2342
|
+
notificationsCenterTitle.textContent = ( (localize('notificationsEmpty', "No new notifications")));
|
|
2285
2343
|
clearAllAction.enabled = false;
|
|
2286
2344
|
}
|
|
2287
2345
|
else {
|
|
2288
|
-
notificationsCenterTitle.textContent = ( localize('notifications', "Notifications"));
|
|
2346
|
+
notificationsCenterTitle.textContent = ( (localize('notifications', "Notifications")));
|
|
2289
2347
|
clearAllAction.enabled = this.model.notifications.some(notification => !notification.hasProgress);
|
|
2290
2348
|
}
|
|
2291
2349
|
}
|
|
@@ -2302,10 +2360,10 @@ let NotificationsCenter = class NotificationsCenter extends Themable {
|
|
|
2302
2360
|
toolbarContainer.classList.add('notifications-center-header-toolbar');
|
|
2303
2361
|
this.notificationsCenterHeader.appendChild(toolbarContainer);
|
|
2304
2362
|
const actionRunner = this._register(this.instantiationService.createInstance(NotificationActionRunner));
|
|
2305
|
-
const notificationsToolBar = this._register(( new ActionBar(toolbarContainer, {
|
|
2306
|
-
ariaLabel: ( localize('notificationsToolbar', "Notification Center Actions")),
|
|
2363
|
+
const notificationsToolBar = this._register(( (new ActionBar(toolbarContainer, {
|
|
2364
|
+
ariaLabel: ( (localize('notificationsToolbar', "Notification Center Actions"))),
|
|
2307
2365
|
actionRunner
|
|
2308
|
-
})));
|
|
2366
|
+
}))));
|
|
2309
2367
|
this.clearAllAction = this._register(this.instantiationService.createInstance(ClearAllNotificationsAction, ClearAllNotificationsAction.ID, ClearAllNotificationsAction.LABEL));
|
|
2310
2368
|
notificationsToolBar.push(this.clearAllAction, { icon: true, label: false, keybinding: this.getKeybindingLabel(this.clearAllAction) });
|
|
2311
2369
|
this.toggleDoNotDisturbAction = this._register(this.instantiationService.createInstance(ToggleDoNotDisturbAction, ToggleDoNotDisturbAction.ID, ToggleDoNotDisturbAction.LABEL));
|
|
@@ -2313,7 +2371,7 @@ let NotificationsCenter = class NotificationsCenter extends Themable {
|
|
|
2313
2371
|
const hideAllAction = this._register(this.instantiationService.createInstance(HideNotificationsCenterAction, HideNotificationsCenterAction.ID, HideNotificationsCenterAction.LABEL));
|
|
2314
2372
|
notificationsToolBar.push(hideAllAction, { icon: true, label: false, keybinding: this.getKeybindingLabel(hideAllAction) });
|
|
2315
2373
|
this.notificationsList = this.instantiationService.createInstance(NotificationsList, this.notificationsCenterContainer, {
|
|
2316
|
-
widgetAriaLabel: ( localize('notificationsCenterWidgetAriaLabel', "Notifications Center"))
|
|
2374
|
+
widgetAriaLabel: ( (localize('notificationsCenterWidgetAriaLabel', "Notifications Center")))
|
|
2317
2375
|
});
|
|
2318
2376
|
this.container.appendChild(this.notificationsCenterContainer);
|
|
2319
2377
|
}
|
|
@@ -2383,9 +2441,9 @@ let NotificationsCenter = class NotificationsCenter extends Themable {
|
|
|
2383
2441
|
const borderColor = this.getColor(NOTIFICATIONS_CENTER_BORDER);
|
|
2384
2442
|
this.notificationsCenterContainer.style.border = borderColor ? `1px solid ${borderColor}` : '';
|
|
2385
2443
|
const headerForeground = this.getColor(NOTIFICATIONS_CENTER_HEADER_FOREGROUND);
|
|
2386
|
-
this.notificationsCenterHeader.style.color = headerForeground ? ( headerForeground.toString()) : '';
|
|
2444
|
+
this.notificationsCenterHeader.style.color = headerForeground ? ( (headerForeground.toString())) : '';
|
|
2387
2445
|
const headerBackground = this.getColor(NOTIFICATIONS_CENTER_HEADER_BACKGROUND);
|
|
2388
|
-
this.notificationsCenterHeader.style.background = headerBackground ? ( headerBackground.toString()) : '';
|
|
2446
|
+
this.notificationsCenterHeader.style.background = headerBackground ? ( (headerBackground.toString())) : '';
|
|
2389
2447
|
}
|
|
2390
2448
|
}
|
|
2391
2449
|
layout(dimension) {
|
|
@@ -2420,16 +2478,16 @@ let NotificationsCenter = class NotificationsCenter extends Themable {
|
|
|
2420
2478
|
}
|
|
2421
2479
|
}
|
|
2422
2480
|
};
|
|
2423
|
-
NotificationsCenter.MAX_DIMENSIONS = ( new Dimension(450, 400));
|
|
2424
|
-
NotificationsCenter = ( __decorate([
|
|
2425
|
-
( __param(2, IThemeService)),
|
|
2426
|
-
( __param(3, IInstantiationService)),
|
|
2427
|
-
( __param(4, IWorkbenchLayoutService)),
|
|
2428
|
-
( __param(5, IContextKeyService)),
|
|
2429
|
-
( __param(6, IEditorGroupsService)),
|
|
2430
|
-
( __param(7, IKeybindingService)),
|
|
2431
|
-
( __param(8, INotificationService))
|
|
2432
|
-
], NotificationsCenter));
|
|
2481
|
+
NotificationsCenter.MAX_DIMENSIONS = ( (new Dimension(450, 400)));
|
|
2482
|
+
NotificationsCenter = ( (__decorate([
|
|
2483
|
+
( (__param(2, IThemeService))),
|
|
2484
|
+
( (__param(3, IInstantiationService))),
|
|
2485
|
+
( (__param(4, IWorkbenchLayoutService))),
|
|
2486
|
+
( (__param(5, IContextKeyService))),
|
|
2487
|
+
( (__param(6, IEditorGroupsService))),
|
|
2488
|
+
( (__param(7, IKeybindingService))),
|
|
2489
|
+
( (__param(8, INotificationService)))
|
|
2490
|
+
], NotificationsCenter)));
|
|
2433
2491
|
registerThemingParticipant((theme, collector) => {
|
|
2434
2492
|
const notificationBorderColor = theme.getColor(NOTIFICATIONS_BORDER);
|
|
2435
2493
|
if (notificationBorderColor) {
|
|
@@ -2456,7 +2514,7 @@ class NotificationsAlerts extends Disposable {
|
|
|
2456
2514
|
console.error(e.item.message.original);
|
|
2457
2515
|
}
|
|
2458
2516
|
else {
|
|
2459
|
-
console.error(toErrorMessage(( e.item.message.linkedText.toString()), true));
|
|
2517
|
+
console.error(toErrorMessage(( (e.item.message.linkedText.toString())), true));
|
|
2460
2518
|
}
|
|
2461
2519
|
}
|
|
2462
2520
|
}
|
|
@@ -2476,13 +2534,25 @@ class NotificationsAlerts extends Disposable {
|
|
|
2476
2534
|
doTriggerAriaAlert(notification) {
|
|
2477
2535
|
let alertText;
|
|
2478
2536
|
if (notification.severity === Severity.Error) {
|
|
2479
|
-
alertText = ( localize(
|
|
2537
|
+
alertText = ( (localize(
|
|
2538
|
+
'alertErrorMessage',
|
|
2539
|
+
"Error: {0}",
|
|
2540
|
+
(notification.message.linkedText.toString())
|
|
2541
|
+
)));
|
|
2480
2542
|
}
|
|
2481
2543
|
else if (notification.severity === Severity.Warning) {
|
|
2482
|
-
alertText = ( localize(
|
|
2544
|
+
alertText = ( (localize(
|
|
2545
|
+
'alertWarningMessage',
|
|
2546
|
+
"Warning: {0}",
|
|
2547
|
+
(notification.message.linkedText.toString())
|
|
2548
|
+
)));
|
|
2483
2549
|
}
|
|
2484
2550
|
else {
|
|
2485
|
-
alertText = ( localize(
|
|
2551
|
+
alertText = ( (localize(
|
|
2552
|
+
'alertInfoMessage',
|
|
2553
|
+
"Info: {0}",
|
|
2554
|
+
(notification.message.linkedText.toString())
|
|
2555
|
+
)));
|
|
2486
2556
|
}
|
|
2487
2557
|
alert(alertText);
|
|
2488
2558
|
}
|
|
@@ -2501,7 +2571,7 @@ function initialize(instantiationService) {
|
|
|
2501
2571
|
function getServiceOverride(container) {
|
|
2502
2572
|
onServicesInitialized(initialize);
|
|
2503
2573
|
return {
|
|
2504
|
-
[INotificationService.toString()]: new SyncDescriptor(NotificationService),
|
|
2574
|
+
[( INotificationService.toString())]: new SyncDescriptor(NotificationService),
|
|
2505
2575
|
...getServiceOverride$1(container)
|
|
2506
2576
|
};
|
|
2507
2577
|
}
|