@theia/scm 1.34.3 → 1.34.4

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.
Files changed (95) hide show
  1. package/LICENSE +641 -641
  2. package/README.md +31 -31
  3. package/lib/browser/decorations/scm-decorations-service.d.ts +14 -14
  4. package/lib/browser/decorations/scm-decorations-service.js +101 -101
  5. package/lib/browser/decorations/scm-navigator-decorator.d.ts +25 -25
  6. package/lib/browser/decorations/scm-navigator-decorator.js +132 -132
  7. package/lib/browser/decorations/scm-tab-bar-decorator.d.ts +17 -17
  8. package/lib/browser/decorations/scm-tab-bar-decorator.js +93 -93
  9. package/lib/browser/dirty-diff/content-lines.d.ts +12 -12
  10. package/lib/browser/dirty-diff/content-lines.js +106 -106
  11. package/lib/browser/dirty-diff/content-lines.spec.d.ts +1 -1
  12. package/lib/browser/dirty-diff/content-lines.spec.js +39 -39
  13. package/lib/browser/dirty-diff/diff-computer.d.ts +29 -29
  14. package/lib/browser/dirty-diff/diff-computer.js +102 -102
  15. package/lib/browser/dirty-diff/diff-computer.spec.d.ts +1 -1
  16. package/lib/browser/dirty-diff/diff-computer.spec.js +315 -315
  17. package/lib/browser/dirty-diff/dirty-diff-decorator.d.ts +14 -14
  18. package/lib/browser/dirty-diff/dirty-diff-decorator.js +98 -98
  19. package/lib/browser/dirty-diff/dirty-diff-module.d.ts +3 -3
  20. package/lib/browser/dirty-diff/dirty-diff-module.js +24 -24
  21. package/lib/browser/scm-amend-component.d.ts +123 -123
  22. package/lib/browser/scm-amend-component.js +423 -423
  23. package/lib/browser/scm-amend-widget.d.ts +20 -20
  24. package/lib/browser/scm-amend-widget.js +101 -101
  25. package/lib/browser/scm-avatar-service.d.ts +3 -3
  26. package/lib/browser/scm-avatar-service.js +36 -36
  27. package/lib/browser/scm-commit-widget.d.ts +52 -52
  28. package/lib/browser/scm-commit-widget.js +199 -199
  29. package/lib/browser/scm-context-key-service.d.ts +10 -10
  30. package/lib/browser/scm-context-key-service.js +58 -58
  31. package/lib/browser/scm-contribution.d.ts +83 -83
  32. package/lib/browser/scm-contribution.js +353 -353
  33. package/lib/browser/scm-frontend-module.d.ts +6 -6
  34. package/lib/browser/scm-frontend-module.js +130 -130
  35. package/lib/browser/scm-groups-tree-model.d.ts +14 -14
  36. package/lib/browser/scm-groups-tree-model.js +97 -97
  37. package/lib/browser/scm-input.d.ts +53 -53
  38. package/lib/browser/scm-input.js +127 -127
  39. package/lib/browser/scm-layout-migrations.d.ts +9 -9
  40. package/lib/browser/scm-layout-migrations.js +79 -79
  41. package/lib/browser/scm-no-repository-widget.d.ts +8 -8
  42. package/lib/browser/scm-no-repository-widget.js +49 -49
  43. package/lib/browser/scm-preferences.d.ts +11 -11
  44. package/lib/browser/scm-preferences.js +51 -51
  45. package/lib/browser/scm-provider.d.ts +56 -56
  46. package/lib/browser/scm-provider.js +19 -19
  47. package/lib/browser/scm-quick-open-service.d.ts +11 -11
  48. package/lib/browser/scm-quick-open-service.js +73 -73
  49. package/lib/browser/scm-repository.d.ts +17 -17
  50. package/lib/browser/scm-repository.js +41 -41
  51. package/lib/browser/scm-service.d.ts +26 -26
  52. package/lib/browser/scm-service.js +108 -108
  53. package/lib/browser/scm-tree-label-provider.d.ts +7 -7
  54. package/lib/browser/scm-tree-label-provider.js +57 -57
  55. package/lib/browser/scm-tree-model.d.ts +74 -74
  56. package/lib/browser/scm-tree-model.js +348 -348
  57. package/lib/browser/scm-tree-widget.d.ts +201 -201
  58. package/lib/browser/scm-tree-widget.js +664 -664
  59. package/lib/browser/scm-widget.d.ts +40 -40
  60. package/lib/browser/scm-widget.js +218 -218
  61. package/package.json +6 -6
  62. package/src/browser/decorations/scm-decorations-service.ts +78 -78
  63. package/src/browser/decorations/scm-navigator-decorator.ts +121 -121
  64. package/src/browser/decorations/scm-tab-bar-decorator.ts +83 -83
  65. package/src/browser/dirty-diff/content-lines.spec.ts +42 -42
  66. package/src/browser/dirty-diff/content-lines.ts +112 -112
  67. package/src/browser/dirty-diff/diff-computer.spec.ts +387 -387
  68. package/src/browser/dirty-diff/diff-computer.ts +129 -129
  69. package/src/browser/dirty-diff/dirty-diff-decorator.ts +107 -107
  70. package/src/browser/dirty-diff/dirty-diff-module.ts +24 -24
  71. package/src/browser/scm-amend-component.tsx +600 -600
  72. package/src/browser/scm-amend-widget.tsx +77 -77
  73. package/src/browser/scm-avatar-service.ts +27 -27
  74. package/src/browser/scm-commit-widget.tsx +215 -215
  75. package/src/browser/scm-context-key-service.ts +46 -46
  76. package/src/browser/scm-contribution.ts +361 -361
  77. package/src/browser/scm-frontend-module.ts +149 -149
  78. package/src/browser/scm-groups-tree-model.ts +78 -78
  79. package/src/browser/scm-input.ts +164 -164
  80. package/src/browser/scm-layout-migrations.ts +64 -64
  81. package/src/browser/scm-no-repository-widget.tsx +41 -41
  82. package/src/browser/scm-preferences.ts +63 -63
  83. package/src/browser/scm-provider.ts +89 -89
  84. package/src/browser/scm-quick-open-service.ts +48 -48
  85. package/src/browser/scm-repository.ts +52 -52
  86. package/src/browser/scm-service.ts +108 -108
  87. package/src/browser/scm-tree-label-provider.ts +44 -44
  88. package/src/browser/scm-tree-model.ts +405 -405
  89. package/src/browser/scm-tree-widget.tsx +809 -809
  90. package/src/browser/scm-widget.tsx +204 -204
  91. package/src/browser/style/dirty-diff-decorator.css +52 -52
  92. package/src/browser/style/dirty-diff.css +50 -50
  93. package/src/browser/style/index.css +267 -267
  94. package/src/browser/style/scm-amend-component.css +94 -94
  95. package/src/browser/style/scm.svg +4 -4
@@ -1,128 +1,128 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2019 Red Hat, Inc. and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.ScmInput = exports.ScmInputIssueType = void 0;
19
- /* eslint-disable @typescript-eslint/no-explicit-any */
20
- const debounce = require("p-debounce");
21
- const common_1 = require("@theia/core/lib/common");
22
- const coreutils_1 = require("@theia/core/shared/@phosphor/coreutils");
23
- var ScmInputIssueType;
24
- (function (ScmInputIssueType) {
25
- ScmInputIssueType[ScmInputIssueType["Error"] = 0] = "Error";
26
- ScmInputIssueType[ScmInputIssueType["Warning"] = 1] = "Warning";
27
- ScmInputIssueType[ScmInputIssueType["Information"] = 2] = "Information";
28
- })(ScmInputIssueType = exports.ScmInputIssueType || (exports.ScmInputIssueType = {}));
29
- class ScmInput {
30
- constructor(options = {}) {
31
- var _a;
32
- this.options = options;
33
- this.onDidChangeEmitter = new common_1.Emitter();
34
- this.onDidChange = this.onDidChangeEmitter.event;
35
- this.onDidFocusEmitter = new common_1.Emitter();
36
- this.onDidFocus = this.onDidFocusEmitter.event;
37
- this.toDispose = new common_1.DisposableCollection(this.onDidChangeEmitter, this.onDidFocusEmitter);
38
- this._placeholder = this.options.placeholder;
39
- this._visible = this.options.visible;
40
- this._enabled = (_a = this.options.enabled) !== null && _a !== void 0 ? _a : true;
41
- this.validate = debounce(async () => {
42
- if (this.options.validator) {
43
- this.issue = await this.options.validator(this.value);
44
- }
45
- }, 200);
46
- }
47
- fireDidChange() {
48
- this.onDidChangeEmitter.fire(undefined);
49
- }
50
- dispose() {
51
- this.toDispose.dispose();
52
- }
53
- get placeholder() {
54
- return this._placeholder;
55
- }
56
- set placeholder(placeholder) {
57
- if (this._placeholder === placeholder) {
58
- return;
59
- }
60
- this._placeholder = placeholder;
61
- this.fireDidChange();
62
- }
63
- get value() {
64
- return this._value || '';
65
- }
66
- set value(value) {
67
- if (this.value === value) {
68
- return;
69
- }
70
- this._value = value;
71
- this.fireDidChange();
72
- this.validate();
73
- }
74
- get visible() {
75
- var _a;
76
- return (_a = this._visible) !== null && _a !== void 0 ? _a : true;
77
- }
78
- set visible(visible) {
79
- if (this.visible === visible) {
80
- return;
81
- }
82
- this._visible = visible;
83
- this.fireDidChange();
84
- this.validate();
85
- }
86
- get enabled() {
87
- return this._enabled;
88
- }
89
- set enabled(enabled) {
90
- if (this._enabled === enabled) {
91
- return;
92
- }
93
- this._enabled = enabled;
94
- this.fireDidChange();
95
- this.validate();
96
- }
97
- get issue() {
98
- return this._issue;
99
- }
100
- set issue(issue) {
101
- if (coreutils_1.JSONExt.deepEqual((this._issue || {}), (issue || {}))) {
102
- return;
103
- }
104
- this._issue = issue;
105
- this.fireDidChange();
106
- }
107
- focus() {
108
- this.onDidFocusEmitter.fire(undefined);
109
- }
110
- toJSON() {
111
- return {
112
- value: this._value,
113
- issue: this._issue
114
- };
115
- }
116
- fromJSON(data) {
117
- if (this._value !== undefined) {
118
- return;
119
- }
120
- if ('value' in data) {
121
- this._value = data.value;
122
- this._issue = data.issue;
123
- this.fireDidChange();
124
- }
125
- }
126
- }
127
- exports.ScmInput = ScmInput;
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2019 Red Hat, Inc. and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ScmInput = exports.ScmInputIssueType = void 0;
19
+ /* eslint-disable @typescript-eslint/no-explicit-any */
20
+ const debounce = require("p-debounce");
21
+ const common_1 = require("@theia/core/lib/common");
22
+ const coreutils_1 = require("@theia/core/shared/@phosphor/coreutils");
23
+ var ScmInputIssueType;
24
+ (function (ScmInputIssueType) {
25
+ ScmInputIssueType[ScmInputIssueType["Error"] = 0] = "Error";
26
+ ScmInputIssueType[ScmInputIssueType["Warning"] = 1] = "Warning";
27
+ ScmInputIssueType[ScmInputIssueType["Information"] = 2] = "Information";
28
+ })(ScmInputIssueType = exports.ScmInputIssueType || (exports.ScmInputIssueType = {}));
29
+ class ScmInput {
30
+ constructor(options = {}) {
31
+ var _a;
32
+ this.options = options;
33
+ this.onDidChangeEmitter = new common_1.Emitter();
34
+ this.onDidChange = this.onDidChangeEmitter.event;
35
+ this.onDidFocusEmitter = new common_1.Emitter();
36
+ this.onDidFocus = this.onDidFocusEmitter.event;
37
+ this.toDispose = new common_1.DisposableCollection(this.onDidChangeEmitter, this.onDidFocusEmitter);
38
+ this._placeholder = this.options.placeholder;
39
+ this._visible = this.options.visible;
40
+ this._enabled = (_a = this.options.enabled) !== null && _a !== void 0 ? _a : true;
41
+ this.validate = debounce(async () => {
42
+ if (this.options.validator) {
43
+ this.issue = await this.options.validator(this.value);
44
+ }
45
+ }, 200);
46
+ }
47
+ fireDidChange() {
48
+ this.onDidChangeEmitter.fire(undefined);
49
+ }
50
+ dispose() {
51
+ this.toDispose.dispose();
52
+ }
53
+ get placeholder() {
54
+ return this._placeholder;
55
+ }
56
+ set placeholder(placeholder) {
57
+ if (this._placeholder === placeholder) {
58
+ return;
59
+ }
60
+ this._placeholder = placeholder;
61
+ this.fireDidChange();
62
+ }
63
+ get value() {
64
+ return this._value || '';
65
+ }
66
+ set value(value) {
67
+ if (this.value === value) {
68
+ return;
69
+ }
70
+ this._value = value;
71
+ this.fireDidChange();
72
+ this.validate();
73
+ }
74
+ get visible() {
75
+ var _a;
76
+ return (_a = this._visible) !== null && _a !== void 0 ? _a : true;
77
+ }
78
+ set visible(visible) {
79
+ if (this.visible === visible) {
80
+ return;
81
+ }
82
+ this._visible = visible;
83
+ this.fireDidChange();
84
+ this.validate();
85
+ }
86
+ get enabled() {
87
+ return this._enabled;
88
+ }
89
+ set enabled(enabled) {
90
+ if (this._enabled === enabled) {
91
+ return;
92
+ }
93
+ this._enabled = enabled;
94
+ this.fireDidChange();
95
+ this.validate();
96
+ }
97
+ get issue() {
98
+ return this._issue;
99
+ }
100
+ set issue(issue) {
101
+ if (coreutils_1.JSONExt.deepEqual((this._issue || {}), (issue || {}))) {
102
+ return;
103
+ }
104
+ this._issue = issue;
105
+ this.fireDidChange();
106
+ }
107
+ focus() {
108
+ this.onDidFocusEmitter.fire(undefined);
109
+ }
110
+ toJSON() {
111
+ return {
112
+ value: this._value,
113
+ issue: this._issue
114
+ };
115
+ }
116
+ fromJSON(data) {
117
+ if (this._value !== undefined) {
118
+ return;
119
+ }
120
+ if ('value' in data) {
121
+ this._value = data.value;
122
+ this._issue = data.issue;
123
+ this.fireDidChange();
124
+ }
125
+ }
126
+ }
127
+ exports.ScmInput = ScmInput;
128
128
  //# sourceMappingURL=scm-input.js.map
@@ -1,10 +1,10 @@
1
- import { ApplicationShellLayoutMigration, WidgetDescription, ApplicationShellLayoutMigrationContext } from '@theia/core/lib/browser/shell/shell-layout-restorer';
2
- export declare class ScmLayoutVersion3Migration implements ApplicationShellLayoutMigration {
3
- readonly layoutVersion = 3;
4
- onWillInflateWidget(desc: WidgetDescription, { parent }: ApplicationShellLayoutMigrationContext): WidgetDescription | undefined;
5
- }
6
- export declare class ScmLayoutVersion5Migration implements ApplicationShellLayoutMigration {
7
- readonly layoutVersion = 5;
8
- onWillInflateWidget(desc: WidgetDescription): WidgetDescription | undefined;
9
- }
1
+ import { ApplicationShellLayoutMigration, WidgetDescription, ApplicationShellLayoutMigrationContext } from '@theia/core/lib/browser/shell/shell-layout-restorer';
2
+ export declare class ScmLayoutVersion3Migration implements ApplicationShellLayoutMigration {
3
+ readonly layoutVersion = 3;
4
+ onWillInflateWidget(desc: WidgetDescription, { parent }: ApplicationShellLayoutMigrationContext): WidgetDescription | undefined;
5
+ }
6
+ export declare class ScmLayoutVersion5Migration implements ApplicationShellLayoutMigration {
7
+ readonly layoutVersion = 5;
8
+ onWillInflateWidget(desc: WidgetDescription): WidgetDescription | undefined;
9
+ }
10
10
  //# sourceMappingURL=scm-layout-migrations.d.ts.map
@@ -1,80 +1,80 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2019 TypeFox and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.ScmLayoutVersion5Migration = exports.ScmLayoutVersion3Migration = void 0;
25
- const inversify_1 = require("@theia/core/shared/inversify");
26
- const scm_contribution_1 = require("./scm-contribution");
27
- let ScmLayoutVersion3Migration = class ScmLayoutVersion3Migration {
28
- constructor() {
29
- this.layoutVersion = 3.0;
30
- }
31
- onWillInflateWidget(desc, { parent }) {
32
- if (desc.constructionOptions.factoryId === 'scm' && !parent) {
33
- return {
34
- constructionOptions: {
35
- factoryId: scm_contribution_1.SCM_VIEW_CONTAINER_ID
36
- },
37
- innerWidgetState: {
38
- parts: [
39
- {
40
- widget: {
41
- constructionOptions: {
42
- factoryId: scm_contribution_1.SCM_WIDGET_FACTORY_ID
43
- },
44
- innerWidgetState: desc.innerWidgetState
45
- },
46
- partId: {
47
- factoryId: scm_contribution_1.SCM_WIDGET_FACTORY_ID
48
- },
49
- collapsed: false,
50
- hidden: false
51
- }
52
- ],
53
- title: scm_contribution_1.SCM_VIEW_CONTAINER_TITLE_OPTIONS
54
- }
55
- };
56
- }
57
- return undefined;
58
- }
59
- };
60
- ScmLayoutVersion3Migration = __decorate([
61
- (0, inversify_1.injectable)()
62
- ], ScmLayoutVersion3Migration);
63
- exports.ScmLayoutVersion3Migration = ScmLayoutVersion3Migration;
64
- let ScmLayoutVersion5Migration = class ScmLayoutVersion5Migration {
65
- constructor() {
66
- this.layoutVersion = 5.0;
67
- }
68
- onWillInflateWidget(desc) {
69
- if (desc.constructionOptions.factoryId === scm_contribution_1.SCM_VIEW_CONTAINER_ID && typeof desc.innerWidgetState === 'string') {
70
- desc.innerWidgetState = desc.innerWidgetState.replace(/scm-tab-icon/g, scm_contribution_1.SCM_VIEW_CONTAINER_TITLE_OPTIONS.iconClass);
71
- return desc;
72
- }
73
- return undefined;
74
- }
75
- };
76
- ScmLayoutVersion5Migration = __decorate([
77
- (0, inversify_1.injectable)()
78
- ], ScmLayoutVersion5Migration);
79
- exports.ScmLayoutVersion5Migration = ScmLayoutVersion5Migration;
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2019 TypeFox and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.ScmLayoutVersion5Migration = exports.ScmLayoutVersion3Migration = void 0;
25
+ const inversify_1 = require("@theia/core/shared/inversify");
26
+ const scm_contribution_1 = require("./scm-contribution");
27
+ let ScmLayoutVersion3Migration = class ScmLayoutVersion3Migration {
28
+ constructor() {
29
+ this.layoutVersion = 3.0;
30
+ }
31
+ onWillInflateWidget(desc, { parent }) {
32
+ if (desc.constructionOptions.factoryId === 'scm' && !parent) {
33
+ return {
34
+ constructionOptions: {
35
+ factoryId: scm_contribution_1.SCM_VIEW_CONTAINER_ID
36
+ },
37
+ innerWidgetState: {
38
+ parts: [
39
+ {
40
+ widget: {
41
+ constructionOptions: {
42
+ factoryId: scm_contribution_1.SCM_WIDGET_FACTORY_ID
43
+ },
44
+ innerWidgetState: desc.innerWidgetState
45
+ },
46
+ partId: {
47
+ factoryId: scm_contribution_1.SCM_WIDGET_FACTORY_ID
48
+ },
49
+ collapsed: false,
50
+ hidden: false
51
+ }
52
+ ],
53
+ title: scm_contribution_1.SCM_VIEW_CONTAINER_TITLE_OPTIONS
54
+ }
55
+ };
56
+ }
57
+ return undefined;
58
+ }
59
+ };
60
+ ScmLayoutVersion3Migration = __decorate([
61
+ (0, inversify_1.injectable)()
62
+ ], ScmLayoutVersion3Migration);
63
+ exports.ScmLayoutVersion3Migration = ScmLayoutVersion3Migration;
64
+ let ScmLayoutVersion5Migration = class ScmLayoutVersion5Migration {
65
+ constructor() {
66
+ this.layoutVersion = 5.0;
67
+ }
68
+ onWillInflateWidget(desc) {
69
+ if (desc.constructionOptions.factoryId === scm_contribution_1.SCM_VIEW_CONTAINER_ID && typeof desc.innerWidgetState === 'string') {
70
+ desc.innerWidgetState = desc.innerWidgetState.replace(/scm-tab-icon/g, scm_contribution_1.SCM_VIEW_CONTAINER_TITLE_OPTIONS.iconClass);
71
+ return desc;
72
+ }
73
+ return undefined;
74
+ }
75
+ };
76
+ ScmLayoutVersion5Migration = __decorate([
77
+ (0, inversify_1.injectable)()
78
+ ], ScmLayoutVersion5Migration);
79
+ exports.ScmLayoutVersion5Migration = ScmLayoutVersion5Migration;
80
80
  //# sourceMappingURL=scm-layout-migrations.js.map
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
2
- import * as React from '@theia/core/shared/react';
3
- import { ReactWidget } from '@theia/core/lib/browser';
4
- export declare class ScmNoRepositoryWidget extends ReactWidget {
5
- static ID: string;
6
- constructor();
7
- protected render(): React.ReactNode;
8
- }
1
+ /// <reference types="react" />
2
+ import * as React from '@theia/core/shared/react';
3
+ import { ReactWidget } from '@theia/core/lib/browser';
4
+ export declare class ScmNoRepositoryWidget extends ReactWidget {
5
+ static ID: string;
6
+ constructor();
7
+ protected render(): React.ReactNode;
8
+ }
9
9
  //# sourceMappingURL=scm-no-repository-widget.d.ts.map
@@ -1,50 +1,50 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2020 Arm and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
- var ScmNoRepositoryWidget_1;
27
- Object.defineProperty(exports, "__esModule", { value: true });
28
- exports.ScmNoRepositoryWidget = void 0;
29
- const inversify_1 = require("@theia/core/shared/inversify");
30
- const React = require("@theia/core/shared/react");
31
- const browser_1 = require("@theia/core/lib/browser");
32
- const alert_message_1 = require("@theia/core/lib/browser/widgets/alert-message");
33
- const nls_1 = require("@theia/core/lib/common/nls");
34
- let ScmNoRepositoryWidget = ScmNoRepositoryWidget_1 = class ScmNoRepositoryWidget extends browser_1.ReactWidget {
35
- constructor() {
36
- super();
37
- this.addClass('theia-scm-no-repository');
38
- this.id = ScmNoRepositoryWidget_1.ID;
39
- }
40
- render() {
41
- return React.createElement(alert_message_1.AlertMessage, { type: 'WARNING', header: nls_1.nls.localize('theia/scm/noRepositoryFound', 'No repository found') });
42
- }
43
- };
44
- ScmNoRepositoryWidget.ID = 'scm-no-repository-widget';
45
- ScmNoRepositoryWidget = ScmNoRepositoryWidget_1 = __decorate([
46
- (0, inversify_1.injectable)(),
47
- __metadata("design:paramtypes", [])
48
- ], ScmNoRepositoryWidget);
49
- exports.ScmNoRepositoryWidget = ScmNoRepositoryWidget;
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2020 Arm and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ var ScmNoRepositoryWidget_1;
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.ScmNoRepositoryWidget = void 0;
29
+ const inversify_1 = require("@theia/core/shared/inversify");
30
+ const React = require("@theia/core/shared/react");
31
+ const browser_1 = require("@theia/core/lib/browser");
32
+ const alert_message_1 = require("@theia/core/lib/browser/widgets/alert-message");
33
+ const nls_1 = require("@theia/core/lib/common/nls");
34
+ let ScmNoRepositoryWidget = ScmNoRepositoryWidget_1 = class ScmNoRepositoryWidget extends browser_1.ReactWidget {
35
+ constructor() {
36
+ super();
37
+ this.addClass('theia-scm-no-repository');
38
+ this.id = ScmNoRepositoryWidget_1.ID;
39
+ }
40
+ render() {
41
+ return React.createElement(alert_message_1.AlertMessage, { type: 'WARNING', header: nls_1.nls.localize('theia/scm/noRepositoryFound', 'No repository found') });
42
+ }
43
+ };
44
+ ScmNoRepositoryWidget.ID = 'scm-no-repository-widget';
45
+ ScmNoRepositoryWidget = ScmNoRepositoryWidget_1 = __decorate([
46
+ (0, inversify_1.injectable)(),
47
+ __metadata("design:paramtypes", [])
48
+ ], ScmNoRepositoryWidget);
49
+ exports.ScmNoRepositoryWidget = ScmNoRepositoryWidget;
50
50
  //# sourceMappingURL=scm-no-repository-widget.js.map
@@ -1,12 +1,12 @@
1
- import { interfaces } from '@theia/core/shared/inversify';
2
- import { PreferenceProxy, PreferenceService, PreferenceSchema } from '@theia/core/lib/browser/preferences';
3
- export declare const scmPreferenceSchema: PreferenceSchema;
4
- export interface ScmConfiguration {
5
- 'scm.defaultViewMode': 'tree' | 'list';
6
- }
7
- export declare const ScmPreferenceContribution: unique symbol;
8
- export declare const ScmPreferences: unique symbol;
9
- export declare type ScmPreferences = PreferenceProxy<ScmConfiguration>;
10
- export declare function createScmPreferences(preferences: PreferenceService, schema?: PreferenceSchema): ScmPreferences;
11
- export declare function bindScmPreferences(bind: interfaces.Bind): void;
1
+ import { interfaces } from '@theia/core/shared/inversify';
2
+ import { PreferenceProxy, PreferenceService, PreferenceSchema } from '@theia/core/lib/browser/preferences';
3
+ export declare const scmPreferenceSchema: PreferenceSchema;
4
+ export interface ScmConfiguration {
5
+ 'scm.defaultViewMode': 'tree' | 'list';
6
+ }
7
+ export declare const ScmPreferenceContribution: unique symbol;
8
+ export declare const ScmPreferences: unique symbol;
9
+ export declare type ScmPreferences = PreferenceProxy<ScmConfiguration>;
10
+ export declare function createScmPreferences(preferences: PreferenceService, schema?: PreferenceSchema): ScmPreferences;
11
+ export declare function bindScmPreferences(bind: interfaces.Bind): void;
12
12
  //# sourceMappingURL=scm-preferences.d.ts.map