@codingame/monaco-vscode-dialogs-service-override 3.2.3 → 4.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/override/vs/platform/dialogs/common/dialogs.js +2 -0
- package/package.json +2 -2
- package/vscode/src/vs/workbench/browser/parts/dialogs/dialogHandler.js +2 -2
- package/vscode/src/vs/workbench/contrib/welcomeDialog/browser/welcomeWidget.js +11 -1
- package/vscode/src/vs/workbench/services/dialogs/browser/abstractFileDialogService.js +2 -2
- package/vscode/src/vs/workbench/services/dialogs/browser/simpleFileDialog.js +43 -37
- package/vscode/src/vs/workbench/services/dialogs/common/dialogService.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-dialogs-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@4.0.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -3,7 +3,7 @@ import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
|
3
3
|
import '../../../../../../../override/vs/platform/dialogs/common/dialogs.js';
|
|
4
4
|
import { ILayoutService } from 'vscode/vscode/vs/platform/layout/browser/layoutService';
|
|
5
5
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
6
|
-
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
6
|
+
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
7
7
|
import { Dialog } from 'vscode/vscode/vs/base/browser/ui/dialog/dialog';
|
|
8
8
|
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
9
9
|
import { EventHelper } from 'vscode/vscode/vs/base/browser/dom';
|
|
@@ -69,7 +69,7 @@ let BrowserDialogHandler = class BrowserDialogHandler extends AbstractDialogHand
|
|
|
69
69
|
};
|
|
70
70
|
const detail = detailString(true);
|
|
71
71
|
const detailToCopy = detailString(false);
|
|
72
|
-
const { button } = await this.doShow(Severity.Info, this.productService.nameLong, [
|
|
72
|
+
const { button } = await this.doShow(Severity$1.Info, this.productService.nameLong, [
|
|
73
73
|
( localizeWithPath(
|
|
74
74
|
'vs/workbench/browser/parts/dialogs/dialogHandler',
|
|
75
75
|
{ key: 'copy', comment: ['&& denotes a mnemonic'] },
|
|
@@ -16,7 +16,17 @@ import { Link } from 'vscode/vscode/vs/platform/opener/browser/link';
|
|
|
16
16
|
import { renderLabelWithIcons } from 'vscode/vscode/vs/base/browser/ui/iconLabel/iconLabels';
|
|
17
17
|
import { renderFormattedText } from 'vscode/vscode/vs/base/browser/formattedTextRenderer';
|
|
18
18
|
import { registerThemingParticipant } from 'vscode/vscode/vs/platform/theme/common/themeService';
|
|
19
|
-
import
|
|
19
|
+
import 'vscode/vscode/vs/platform/theme/common/colorUtils';
|
|
20
|
+
import { contrastBorder } from 'vscode/vscode/vs/platform/theme/common/colors/baseColors';
|
|
21
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/chartsColors';
|
|
22
|
+
import { editorWidgetBackground, widgetShadow, widgetBorder, editorWidgetForeground } from 'vscode/vscode/vs/platform/theme/common/colors/editorColors';
|
|
23
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/inputColors';
|
|
24
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/listColors';
|
|
25
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/menuColors';
|
|
26
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/minimapColors';
|
|
27
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
|
|
28
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
29
|
+
import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
20
30
|
|
|
21
31
|
class WelcomeWidget extends Disposable {
|
|
22
32
|
constructor(_editor, instantiationService, commandService, telemetryService, openerService) {
|
|
@@ -14,7 +14,7 @@ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/c
|
|
|
14
14
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files';
|
|
15
15
|
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener';
|
|
16
16
|
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host';
|
|
17
|
-
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
17
|
+
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
18
18
|
import { coalesce, distinct } from 'vscode/vscode/vs/base/common/arrays';
|
|
19
19
|
import { trim } from 'vscode/vscode/vs/base/common/strings';
|
|
20
20
|
import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
|
|
@@ -142,7 +142,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
142
142
|
detail = getFileNamesMessage(fileNamesOrResources) + '\n' + detail;
|
|
143
143
|
}
|
|
144
144
|
const { result } = await this.dialogService.prompt({
|
|
145
|
-
type: Severity.Warning,
|
|
145
|
+
type: Severity$1.Warning,
|
|
146
146
|
message,
|
|
147
147
|
detail,
|
|
148
148
|
buttons: [
|
|
@@ -545,43 +545,49 @@ let SimpleFileDialog = class SimpleFileDialog {
|
|
|
545
545
|
value = this.pathFromUri(valueUri);
|
|
546
546
|
return (await this.updateItems(valueUri, true)) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated;
|
|
547
547
|
}
|
|
548
|
-
else
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
))
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
548
|
+
else {
|
|
549
|
+
const newFolderIsOldFolder = extUriIgnorePathCase.isEqual(this.currentFolder, valueUri);
|
|
550
|
+
const newFolderIsSubFolder = extUriIgnorePathCase.isEqual(this.currentFolder, dirname(valueUri));
|
|
551
|
+
const newFolderIsParent = extUriIgnorePathCase.isEqualOrParent(this.currentFolder, dirname(valueUri));
|
|
552
|
+
const newFolderIsUnrelated = !newFolderIsParent && !newFolderIsSubFolder;
|
|
553
|
+
if (!newFolderIsOldFolder && (this.endsWithSlash(value) || newFolderIsParent || newFolderIsUnrelated)) {
|
|
554
|
+
let stat;
|
|
555
|
+
try {
|
|
556
|
+
stat = await this.fileService.stat(valueUri);
|
|
557
|
+
}
|
|
558
|
+
catch (e) {
|
|
559
|
+
}
|
|
560
|
+
if (stat && stat.isDirectory && (basename(valueUri) !== '.') && this.endsWithSlash(value)) {
|
|
561
|
+
valueUri = this.tryAddTrailingSeparatorToDirectory(valueUri, stat);
|
|
562
|
+
return (await this.updateItems(valueUri)) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated;
|
|
563
|
+
}
|
|
564
|
+
else if (this.endsWithSlash(value)) {
|
|
565
|
+
this.filePickBox.validationMessage = ( localizeWithPath(
|
|
566
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
567
|
+
'remoteFileDialog.badPath',
|
|
568
|
+
'The path does not exist.'
|
|
569
|
+
));
|
|
570
|
+
this.badPath = value;
|
|
571
|
+
return UpdateResult.InvalidPath;
|
|
572
|
+
}
|
|
573
|
+
else {
|
|
574
|
+
let inputUriDirname = dirname(valueUri);
|
|
575
|
+
const currentFolderWithoutSep = removeTrailingPathSeparator(addTrailingPathSeparator(this.currentFolder));
|
|
576
|
+
const inputUriDirnameWithoutSep = removeTrailingPathSeparator(addTrailingPathSeparator(inputUriDirname));
|
|
577
|
+
if (!extUriIgnorePathCase.isEqual(currentFolderWithoutSep, inputUriDirnameWithoutSep)
|
|
578
|
+
&& (!/^[a-zA-Z]:$/.test(this.filePickBox.value)
|
|
579
|
+
|| !equalsIgnoreCase(this.pathFromUri(this.currentFolder).substring(0, this.filePickBox.value.length), this.filePickBox.value))) {
|
|
580
|
+
let statWithoutTrailing;
|
|
581
|
+
try {
|
|
582
|
+
statWithoutTrailing = await this.fileService.stat(inputUriDirname);
|
|
583
|
+
}
|
|
584
|
+
catch (e) {
|
|
585
|
+
}
|
|
586
|
+
if (statWithoutTrailing && statWithoutTrailing.isDirectory) {
|
|
587
|
+
this.badPath = undefined;
|
|
588
|
+
inputUriDirname = this.tryAddTrailingSeparatorToDirectory(inputUriDirname, statWithoutTrailing);
|
|
589
|
+
return (await this.updateItems(inputUriDirname, false, basename(valueUri))) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated;
|
|
590
|
+
}
|
|
585
591
|
}
|
|
586
592
|
}
|
|
587
593
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
2
|
+
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
3
3
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import '../../../../../../../override/vs/platform/dialogs/common/dialogs.js';
|
|
5
5
|
import { DialogsModel } from '../../../common/dialogs.js';
|
|
@@ -48,13 +48,13 @@ let DialogService = class DialogService extends Disposable {
|
|
|
48
48
|
return await handle.result;
|
|
49
49
|
}
|
|
50
50
|
async info(message, detail) {
|
|
51
|
-
await this.prompt({ type: Severity.Info, message, detail });
|
|
51
|
+
await this.prompt({ type: Severity$1.Info, message, detail });
|
|
52
52
|
}
|
|
53
53
|
async warn(message, detail) {
|
|
54
|
-
await this.prompt({ type: Severity.Warning, message, detail });
|
|
54
|
+
await this.prompt({ type: Severity$1.Warning, message, detail });
|
|
55
55
|
}
|
|
56
56
|
async error(message, detail) {
|
|
57
|
-
await this.prompt({ type: Severity.Error, message, detail });
|
|
57
|
+
await this.prompt({ type: Severity$1.Error, message, detail });
|
|
58
58
|
}
|
|
59
59
|
async about() {
|
|
60
60
|
if (this.skipDialogs()) {
|