@codingame/monaco-vscode-notifications-service-override 37.6.1 → 38.0.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-notifications-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "38.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - notifications service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "38.0.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -28,6 +28,6 @@ export declare class NotificationService extends Disposable implements INotifica
|
|
|
28
28
|
error(message: NotificationMessage | NotificationMessage[]): void;
|
|
29
29
|
notify(notification: INotification): INotificationHandle;
|
|
30
30
|
private toStorageScope;
|
|
31
|
-
prompt(severity: Severity, message:
|
|
31
|
+
prompt(severity: Severity, message: NotificationMessage, choices: IPromptChoice[], options?: IPromptOptions): INotificationHandle;
|
|
32
32
|
status(message: NotificationMessage, options?: IStatusMessageOptions): IStatusHandle;
|
|
33
33
|
}
|
|
@@ -10,6 +10,7 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/ext
|
|
|
10
10
|
import { Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
11
11
|
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
12
12
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
13
|
+
import { withNotificationActionTelemetry, NotificationActionTelemetryId } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notificationTelemetry';
|
|
13
14
|
import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
|
|
14
15
|
|
|
15
16
|
var NotificationService_1;
|
|
@@ -185,12 +186,14 @@ let NotificationService = class NotificationService extends Disposable {
|
|
|
185
186
|
const scope = this.toStorageScope(notification.neverShowAgain);
|
|
186
187
|
const id = notification.neverShowAgain.id;
|
|
187
188
|
if (this.storageService.getBoolean(id, scope)) {
|
|
189
|
+
toDispose.dispose();
|
|
188
190
|
return ( new NoOpNotification());
|
|
189
191
|
}
|
|
190
|
-
const neverShowAgainAction = toDispose.add(( new Action("workbench.notification.neverShowAgain", ( localize(
|
|
192
|
+
const neverShowAgainAction = toDispose.add(( new Action("workbench.notification.neverShowAgain", ( localize(24766, "Don't Show Again")), undefined, true, async () => {
|
|
191
193
|
handle.close();
|
|
192
194
|
this.storageService.store(id, true, scope, StorageTarget.USER);
|
|
193
195
|
})));
|
|
196
|
+
withNotificationActionTelemetry(neverShowAgainAction, NotificationActionTelemetryId.NeverShowAgain);
|
|
194
197
|
const actions = {
|
|
195
198
|
primary: notification.actions?.primary || [],
|
|
196
199
|
secondary: notification.actions?.secondary || []
|
|
@@ -226,7 +229,8 @@ let NotificationService = class NotificationService extends Disposable {
|
|
|
226
229
|
return ( new NoOpNotification());
|
|
227
230
|
}
|
|
228
231
|
const neverShowAgainChoice = {
|
|
229
|
-
|
|
232
|
+
telemetryId: NotificationActionTelemetryId.NeverShowAgain,
|
|
233
|
+
label: ( localize(24766, "Don't Show Again")),
|
|
230
234
|
run: () => this.storageService.store(id, true, scope, StorageTarget.USER),
|
|
231
235
|
isSecondary: options.neverShowAgain.isSecondary
|
|
232
236
|
};
|
|
@@ -263,8 +267,10 @@ let NotificationService = class NotificationService extends Disposable {
|
|
|
263
267
|
severity,
|
|
264
268
|
message,
|
|
265
269
|
actions,
|
|
270
|
+
telemetry: options?.telemetry,
|
|
266
271
|
sticky: options?.sticky,
|
|
267
|
-
priority: options?.priority
|
|
272
|
+
priority: options?.priority,
|
|
273
|
+
legacyExtensionLinkParsing: options?.legacyExtensionLinkParsing
|
|
268
274
|
});
|
|
269
275
|
Event.once(handle.onDidClose)(() => {
|
|
270
276
|
toDispose.dispose();
|