@theia/toolbar 1.45.1 → 1.46.0-next.72
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/README.md +32 -32
- package/lib/browser/abstract-toolbar-contribution.d.ts +16 -16
- package/lib/browser/abstract-toolbar-contribution.js +68 -68
- package/lib/browser/application-shell-with-toolbar-override.d.ts +15 -15
- package/lib/browser/application-shell-with-toolbar-override.js +101 -101
- package/lib/browser/codicons.d.ts +1 -1
- package/lib/browser/codicons.js +20 -20
- package/lib/browser/font-awesome-icons.d.ts +1 -1
- package/lib/browser/font-awesome-icons.js +20 -20
- package/lib/browser/package.spec.js +18 -18
- package/lib/browser/toolbar-command-contribution.d.ts +25 -25
- package/lib/browser/toolbar-command-contribution.js +211 -211
- package/lib/browser/toolbar-command-quick-input-service.d.ts +19 -19
- package/lib/browser/toolbar-command-quick-input-service.js +112 -112
- package/lib/browser/toolbar-constants.d.ts +23 -23
- package/lib/browser/toolbar-constants.js +75 -75
- package/lib/browser/toolbar-controller.d.ts +34 -34
- package/lib/browser/toolbar-controller.js +186 -186
- package/lib/browser/toolbar-defaults.d.ts +3 -3
- package/lib/browser/toolbar-defaults.js +60 -60
- package/lib/browser/toolbar-frontend-module.d.ts +4 -4
- package/lib/browser/toolbar-frontend-module.js +25 -25
- package/lib/browser/toolbar-icon-selector-dialog.d.ts +65 -65
- package/lib/browser/toolbar-icon-selector-dialog.js +235 -235
- package/lib/browser/toolbar-interfaces.d.ts +45 -45
- package/lib/browser/toolbar-interfaces.js +42 -42
- package/lib/browser/toolbar-preference-contribution.d.ts +9 -9
- package/lib/browser/toolbar-preference-contribution.js +34 -34
- package/lib/browser/toolbar-preference-schema.d.ts +5 -5
- package/lib/browser/toolbar-preference-schema.js +73 -73
- package/lib/browser/toolbar-storage-provider.d.ts +47 -47
- package/lib/browser/toolbar-storage-provider.js +357 -357
- package/lib/browser/toolbar.d.ts +56 -56
- package/lib/browser/toolbar.js +380 -380
- package/package.json +11 -11
- package/src/browser/abstract-toolbar-contribution.tsx +53 -53
- package/src/browser/application-shell-with-toolbar-override.ts +98 -98
- package/src/browser/codicons.ts +18 -18
- package/src/browser/font-awesome-icons.ts +18 -18
- package/src/browser/package.spec.ts +19 -19
- package/src/browser/style/toolbar.css +255 -255
- package/src/browser/toolbar-command-contribution.ts +211 -211
- package/src/browser/toolbar-command-quick-input-service.ts +86 -86
- package/src/browser/toolbar-constants.ts +79 -79
- package/src/browser/toolbar-controller.ts +185 -185
- package/src/browser/toolbar-defaults.ts +58 -58
- package/src/browser/toolbar-frontend-module.ts +30 -30
- package/src/browser/toolbar-icon-selector-dialog.tsx +296 -296
- package/src/browser/toolbar-interfaces.ts +76 -76
- package/src/browser/toolbar-preference-contribution.ts +38 -38
- package/src/browser/toolbar-preference-schema.ts +75 -75
- package/src/browser/toolbar-storage-provider.ts +352 -352
- package/src/browser/toolbar.tsx +424 -424
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { interfaces } from '@theia/core/shared/inversify';
|
|
2
|
-
import { ReactTabBarToolbarItem, TabBarToolbar, TabBarToolbarItem } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
|
3
|
-
export declare enum ToolbarAlignment {
|
|
4
|
-
LEFT = "left",
|
|
5
|
-
CENTER = "center",
|
|
6
|
-
RIGHT = "right"
|
|
7
|
-
}
|
|
8
|
-
export interface ToolbarTreeSchema {
|
|
9
|
-
items: {
|
|
10
|
-
[key in ToolbarAlignment]: ToolbarItem[][];
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export interface DeflatedToolbarTree {
|
|
14
|
-
items: {
|
|
15
|
-
[key in ToolbarAlignment]: ToolbarItemDeflated[][];
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export declare namespace ToolbarAlignmentString {
|
|
19
|
-
const is: (obj: unknown) => obj is ToolbarAlignment;
|
|
20
|
-
}
|
|
21
|
-
export interface ToolbarContributionProperties {
|
|
22
|
-
toJSON(): DeflatedContributedToolbarItem;
|
|
23
|
-
}
|
|
24
|
-
export declare type ToolbarContribution = ReactTabBarToolbarItem & ToolbarContributionProperties;
|
|
25
|
-
export declare const ToolbarContribution: unique symbol;
|
|
26
|
-
export declare const Toolbar: unique symbol;
|
|
27
|
-
export declare const ToolbarFactory: unique symbol;
|
|
28
|
-
export declare type Toolbar = TabBarToolbar;
|
|
29
|
-
export declare type ToolbarItem = ToolbarContribution | TabBarToolbarItem;
|
|
30
|
-
export interface DeflatedContributedToolbarItem {
|
|
31
|
-
id: string;
|
|
32
|
-
group: 'contributed';
|
|
33
|
-
}
|
|
34
|
-
export declare type ToolbarItemDeflated = DeflatedContributedToolbarItem | TabBarToolbarItem;
|
|
35
|
-
export declare const LateInjector: unique symbol;
|
|
36
|
-
export declare const lateInjector: <T>(context: interfaces.Container, serviceIdentifier: interfaces.ServiceIdentifier<T>) => T;
|
|
37
|
-
export interface ToolbarItemPosition {
|
|
38
|
-
alignment: ToolbarAlignment;
|
|
39
|
-
groupIndex: number;
|
|
40
|
-
itemIndex: number;
|
|
41
|
-
}
|
|
42
|
-
export declare enum IconSet {
|
|
43
|
-
FA = "fa",
|
|
44
|
-
CODICON = "codicon"
|
|
45
|
-
}
|
|
1
|
+
import { interfaces } from '@theia/core/shared/inversify';
|
|
2
|
+
import { ReactTabBarToolbarItem, TabBarToolbar, TabBarToolbarItem } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
|
3
|
+
export declare enum ToolbarAlignment {
|
|
4
|
+
LEFT = "left",
|
|
5
|
+
CENTER = "center",
|
|
6
|
+
RIGHT = "right"
|
|
7
|
+
}
|
|
8
|
+
export interface ToolbarTreeSchema {
|
|
9
|
+
items: {
|
|
10
|
+
[key in ToolbarAlignment]: ToolbarItem[][];
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface DeflatedToolbarTree {
|
|
14
|
+
items: {
|
|
15
|
+
[key in ToolbarAlignment]: ToolbarItemDeflated[][];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare namespace ToolbarAlignmentString {
|
|
19
|
+
const is: (obj: unknown) => obj is ToolbarAlignment;
|
|
20
|
+
}
|
|
21
|
+
export interface ToolbarContributionProperties {
|
|
22
|
+
toJSON(): DeflatedContributedToolbarItem;
|
|
23
|
+
}
|
|
24
|
+
export declare type ToolbarContribution = ReactTabBarToolbarItem & ToolbarContributionProperties;
|
|
25
|
+
export declare const ToolbarContribution: unique symbol;
|
|
26
|
+
export declare const Toolbar: unique symbol;
|
|
27
|
+
export declare const ToolbarFactory: unique symbol;
|
|
28
|
+
export declare type Toolbar = TabBarToolbar;
|
|
29
|
+
export declare type ToolbarItem = ToolbarContribution | TabBarToolbarItem;
|
|
30
|
+
export interface DeflatedContributedToolbarItem {
|
|
31
|
+
id: string;
|
|
32
|
+
group: 'contributed';
|
|
33
|
+
}
|
|
34
|
+
export declare type ToolbarItemDeflated = DeflatedContributedToolbarItem | TabBarToolbarItem;
|
|
35
|
+
export declare const LateInjector: unique symbol;
|
|
36
|
+
export declare const lateInjector: <T>(context: interfaces.Container, serviceIdentifier: interfaces.ServiceIdentifier<T>) => T;
|
|
37
|
+
export interface ToolbarItemPosition {
|
|
38
|
+
alignment: ToolbarAlignment;
|
|
39
|
+
groupIndex: number;
|
|
40
|
+
itemIndex: number;
|
|
41
|
+
}
|
|
42
|
+
export declare enum IconSet {
|
|
43
|
+
FA = "fa",
|
|
44
|
+
CODICON = "codicon"
|
|
45
|
+
}
|
|
46
46
|
//# sourceMappingURL=toolbar-interfaces.d.ts.map
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2022 Ericsson 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-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.IconSet = exports.lateInjector = exports.LateInjector = exports.ToolbarFactory = exports.Toolbar = exports.ToolbarContribution = exports.ToolbarAlignmentString = exports.ToolbarAlignment = void 0;
|
|
19
|
-
var ToolbarAlignment;
|
|
20
|
-
(function (ToolbarAlignment) {
|
|
21
|
-
ToolbarAlignment["LEFT"] = "left";
|
|
22
|
-
ToolbarAlignment["CENTER"] = "center";
|
|
23
|
-
ToolbarAlignment["RIGHT"] = "right";
|
|
24
|
-
})(ToolbarAlignment = exports.ToolbarAlignment || (exports.ToolbarAlignment = {}));
|
|
25
|
-
var ToolbarAlignmentString;
|
|
26
|
-
(function (ToolbarAlignmentString) {
|
|
27
|
-
ToolbarAlignmentString.is = (obj) => obj === ToolbarAlignment.LEFT
|
|
28
|
-
|| obj === ToolbarAlignment.CENTER
|
|
29
|
-
|| obj === ToolbarAlignment.RIGHT;
|
|
30
|
-
})(ToolbarAlignmentString = exports.ToolbarAlignmentString || (exports.ToolbarAlignmentString = {}));
|
|
31
|
-
exports.ToolbarContribution = Symbol('ToolbarContribution');
|
|
32
|
-
exports.Toolbar = Symbol('Toolbar');
|
|
33
|
-
exports.ToolbarFactory = Symbol('ToolbarFactory');
|
|
34
|
-
;
|
|
35
|
-
exports.LateInjector = Symbol('LateInjector');
|
|
36
|
-
const lateInjector = (context, serviceIdentifier) => context.get(serviceIdentifier);
|
|
37
|
-
exports.lateInjector = lateInjector;
|
|
38
|
-
var IconSet;
|
|
39
|
-
(function (IconSet) {
|
|
40
|
-
IconSet["FA"] = "fa";
|
|
41
|
-
IconSet["CODICON"] = "codicon";
|
|
42
|
-
})(IconSet = exports.IconSet || (exports.IconSet = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2022 Ericsson 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-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.IconSet = exports.lateInjector = exports.LateInjector = exports.ToolbarFactory = exports.Toolbar = exports.ToolbarContribution = exports.ToolbarAlignmentString = exports.ToolbarAlignment = void 0;
|
|
19
|
+
var ToolbarAlignment;
|
|
20
|
+
(function (ToolbarAlignment) {
|
|
21
|
+
ToolbarAlignment["LEFT"] = "left";
|
|
22
|
+
ToolbarAlignment["CENTER"] = "center";
|
|
23
|
+
ToolbarAlignment["RIGHT"] = "right";
|
|
24
|
+
})(ToolbarAlignment = exports.ToolbarAlignment || (exports.ToolbarAlignment = {}));
|
|
25
|
+
var ToolbarAlignmentString;
|
|
26
|
+
(function (ToolbarAlignmentString) {
|
|
27
|
+
ToolbarAlignmentString.is = (obj) => obj === ToolbarAlignment.LEFT
|
|
28
|
+
|| obj === ToolbarAlignment.CENTER
|
|
29
|
+
|| obj === ToolbarAlignment.RIGHT;
|
|
30
|
+
})(ToolbarAlignmentString = exports.ToolbarAlignmentString || (exports.ToolbarAlignmentString = {}));
|
|
31
|
+
exports.ToolbarContribution = Symbol('ToolbarContribution');
|
|
32
|
+
exports.Toolbar = Symbol('Toolbar');
|
|
33
|
+
exports.ToolbarFactory = Symbol('ToolbarFactory');
|
|
34
|
+
;
|
|
35
|
+
exports.LateInjector = Symbol('LateInjector');
|
|
36
|
+
const lateInjector = (context, serviceIdentifier) => context.get(serviceIdentifier);
|
|
37
|
+
exports.lateInjector = lateInjector;
|
|
38
|
+
var IconSet;
|
|
39
|
+
(function (IconSet) {
|
|
40
|
+
IconSet["FA"] = "fa";
|
|
41
|
+
IconSet["CODICON"] = "codicon";
|
|
42
|
+
})(IconSet = exports.IconSet || (exports.IconSet = {}));
|
|
43
43
|
//# sourceMappingURL=toolbar-interfaces.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { PreferenceSchema, PreferenceProxy } from '@theia/core/lib/browser';
|
|
2
|
-
export declare const TOOLBAR_ENABLE_PREFERENCE_ID = "toolbar.showToolbar";
|
|
3
|
-
export declare const ToolbarPreferencesSchema: PreferenceSchema;
|
|
4
|
-
declare class ToolbarPreferencesContribution {
|
|
5
|
-
[TOOLBAR_ENABLE_PREFERENCE_ID]: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare const ToolbarPreferences: unique symbol;
|
|
8
|
-
export declare type ToolbarPreferences = PreferenceProxy<ToolbarPreferencesContribution>;
|
|
9
|
-
export {};
|
|
1
|
+
import { PreferenceSchema, PreferenceProxy } from '@theia/core/lib/browser';
|
|
2
|
+
export declare const TOOLBAR_ENABLE_PREFERENCE_ID = "toolbar.showToolbar";
|
|
3
|
+
export declare const ToolbarPreferencesSchema: PreferenceSchema;
|
|
4
|
+
declare class ToolbarPreferencesContribution {
|
|
5
|
+
[TOOLBAR_ENABLE_PREFERENCE_ID]: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const ToolbarPreferences: unique symbol;
|
|
8
|
+
export declare type ToolbarPreferences = PreferenceProxy<ToolbarPreferencesContribution>;
|
|
9
|
+
export {};
|
|
10
10
|
//# sourceMappingURL=toolbar-preference-contribution.d.ts.map
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2022 Ericsson 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-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.ToolbarPreferences = exports.ToolbarPreferencesSchema = exports.TOOLBAR_ENABLE_PREFERENCE_ID = void 0;
|
|
19
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
20
|
-
exports.TOOLBAR_ENABLE_PREFERENCE_ID = 'toolbar.showToolbar';
|
|
21
|
-
exports.ToolbarPreferencesSchema = {
|
|
22
|
-
type: 'object',
|
|
23
|
-
properties: {
|
|
24
|
-
[exports.TOOLBAR_ENABLE_PREFERENCE_ID]: {
|
|
25
|
-
'type': 'boolean',
|
|
26
|
-
'description': 'Show toolbar',
|
|
27
|
-
'default': false,
|
|
28
|
-
'scope': browser_1.PreferenceScope.Workspace,
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
class ToolbarPreferencesContribution {
|
|
33
|
-
}
|
|
34
|
-
exports.ToolbarPreferences = Symbol('ToolbarPreferences');
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2022 Ericsson 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-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ToolbarPreferences = exports.ToolbarPreferencesSchema = exports.TOOLBAR_ENABLE_PREFERENCE_ID = void 0;
|
|
19
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
20
|
+
exports.TOOLBAR_ENABLE_PREFERENCE_ID = 'toolbar.showToolbar';
|
|
21
|
+
exports.ToolbarPreferencesSchema = {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
[exports.TOOLBAR_ENABLE_PREFERENCE_ID]: {
|
|
25
|
+
'type': 'boolean',
|
|
26
|
+
'description': 'Show toolbar',
|
|
27
|
+
'default': false,
|
|
28
|
+
'scope': browser_1.PreferenceScope.Workspace,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
class ToolbarPreferencesContribution {
|
|
33
|
+
}
|
|
34
|
+
exports.ToolbarPreferences = Symbol('ToolbarPreferences');
|
|
35
35
|
//# sourceMappingURL=toolbar-preference-contribution.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IJSONSchema } from '@theia/core/lib/common/json-schema';
|
|
2
|
-
import { DeflatedToolbarTree } from './toolbar-interfaces';
|
|
3
|
-
export declare const toolbarSchemaId = "vscode://schemas/toolbar";
|
|
4
|
-
export declare const toolbarConfigurationSchema: IJSONSchema;
|
|
5
|
-
export declare function isToolbarPreferences(candidate: unknown): candidate is DeflatedToolbarTree;
|
|
1
|
+
import { IJSONSchema } from '@theia/core/lib/common/json-schema';
|
|
2
|
+
import { DeflatedToolbarTree } from './toolbar-interfaces';
|
|
3
|
+
export declare const toolbarSchemaId = "vscode://schemas/toolbar";
|
|
4
|
+
export declare const toolbarConfigurationSchema: IJSONSchema;
|
|
5
|
+
export declare function isToolbarPreferences(candidate: unknown): candidate is DeflatedToolbarTree;
|
|
6
6
|
//# sourceMappingURL=toolbar-preference-schema.d.ts.map
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2022 Ericsson 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-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.isToolbarPreferences = exports.toolbarConfigurationSchema = exports.toolbarSchemaId = void 0;
|
|
19
|
-
const Ajv = require("@theia/core/shared/ajv");
|
|
20
|
-
const toolbarColumnGroup = {
|
|
21
|
-
'type': 'array',
|
|
22
|
-
'description': 'Array of subgroups for right toolbar column',
|
|
23
|
-
'items': {
|
|
24
|
-
'type': 'array',
|
|
25
|
-
'description': 'Grouping',
|
|
26
|
-
'items': {
|
|
27
|
-
'type': 'object',
|
|
28
|
-
'properties': {
|
|
29
|
-
'id': { 'type': 'string' },
|
|
30
|
-
'command': { 'type': 'string' },
|
|
31
|
-
'icon': { 'type': 'string' },
|
|
32
|
-
'tooltip': { 'type': 'string' },
|
|
33
|
-
'group': { 'enum': ['contributed'] },
|
|
34
|
-
'when': { 'type': 'string' },
|
|
35
|
-
},
|
|
36
|
-
'required': [
|
|
37
|
-
'id',
|
|
38
|
-
],
|
|
39
|
-
'additionalProperties': false,
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
exports.toolbarSchemaId = 'vscode://schemas/toolbar';
|
|
44
|
-
exports.toolbarConfigurationSchema = {
|
|
45
|
-
// '$schema': 'https://json-schema.org/draft/2019-09/schema',
|
|
46
|
-
'$id': 'vscode://schemas/indexing-grid',
|
|
47
|
-
'type': 'object',
|
|
48
|
-
'title': 'Toolbar',
|
|
49
|
-
'properties': {
|
|
50
|
-
'items': {
|
|
51
|
-
'type': 'object',
|
|
52
|
-
'properties': {
|
|
53
|
-
'left': toolbarColumnGroup,
|
|
54
|
-
'center': toolbarColumnGroup,
|
|
55
|
-
'right': toolbarColumnGroup,
|
|
56
|
-
},
|
|
57
|
-
'required': [
|
|
58
|
-
'left',
|
|
59
|
-
'center',
|
|
60
|
-
'right'
|
|
61
|
-
],
|
|
62
|
-
'additionalProperties': false,
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
'required': [
|
|
66
|
-
'items'
|
|
67
|
-
]
|
|
68
|
-
};
|
|
69
|
-
const validator = new Ajv().compile(exports.toolbarConfigurationSchema);
|
|
70
|
-
function isToolbarPreferences(candidate) {
|
|
71
|
-
return Boolean(validator(candidate));
|
|
72
|
-
}
|
|
73
|
-
exports.isToolbarPreferences = isToolbarPreferences;
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2022 Ericsson 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-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.isToolbarPreferences = exports.toolbarConfigurationSchema = exports.toolbarSchemaId = void 0;
|
|
19
|
+
const Ajv = require("@theia/core/shared/ajv");
|
|
20
|
+
const toolbarColumnGroup = {
|
|
21
|
+
'type': 'array',
|
|
22
|
+
'description': 'Array of subgroups for right toolbar column',
|
|
23
|
+
'items': {
|
|
24
|
+
'type': 'array',
|
|
25
|
+
'description': 'Grouping',
|
|
26
|
+
'items': {
|
|
27
|
+
'type': 'object',
|
|
28
|
+
'properties': {
|
|
29
|
+
'id': { 'type': 'string' },
|
|
30
|
+
'command': { 'type': 'string' },
|
|
31
|
+
'icon': { 'type': 'string' },
|
|
32
|
+
'tooltip': { 'type': 'string' },
|
|
33
|
+
'group': { 'enum': ['contributed'] },
|
|
34
|
+
'when': { 'type': 'string' },
|
|
35
|
+
},
|
|
36
|
+
'required': [
|
|
37
|
+
'id',
|
|
38
|
+
],
|
|
39
|
+
'additionalProperties': false,
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
exports.toolbarSchemaId = 'vscode://schemas/toolbar';
|
|
44
|
+
exports.toolbarConfigurationSchema = {
|
|
45
|
+
// '$schema': 'https://json-schema.org/draft/2019-09/schema',
|
|
46
|
+
'$id': 'vscode://schemas/indexing-grid',
|
|
47
|
+
'type': 'object',
|
|
48
|
+
'title': 'Toolbar',
|
|
49
|
+
'properties': {
|
|
50
|
+
'items': {
|
|
51
|
+
'type': 'object',
|
|
52
|
+
'properties': {
|
|
53
|
+
'left': toolbarColumnGroup,
|
|
54
|
+
'center': toolbarColumnGroup,
|
|
55
|
+
'right': toolbarColumnGroup,
|
|
56
|
+
},
|
|
57
|
+
'required': [
|
|
58
|
+
'left',
|
|
59
|
+
'center',
|
|
60
|
+
'right'
|
|
61
|
+
],
|
|
62
|
+
'additionalProperties': false,
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
'required': [
|
|
66
|
+
'items'
|
|
67
|
+
]
|
|
68
|
+
};
|
|
69
|
+
const validator = new Ajv().compile(exports.toolbarConfigurationSchema);
|
|
70
|
+
function isToolbarPreferences(candidate) {
|
|
71
|
+
return Boolean(validator(candidate));
|
|
72
|
+
}
|
|
73
|
+
exports.isToolbarPreferences = isToolbarPreferences;
|
|
74
74
|
//# sourceMappingURL=toolbar-preference-schema.js.map
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import * as jsoncParser from 'jsonc-parser';
|
|
2
|
-
import { Command, Disposable, DisposableCollection, Emitter, MessageService } from '@theia/core';
|
|
3
|
-
import { interfaces } from '@theia/core/shared/inversify';
|
|
4
|
-
import { MonacoTextModelService } from '@theia/monaco/lib/browser/monaco-text-model-service';
|
|
5
|
-
import { MonacoEditorModel } from '@theia/monaco/lib/browser/monaco-editor-model';
|
|
6
|
-
import { MonacoWorkspace } from '@theia/monaco/lib/browser/monaco-workspace';
|
|
7
|
-
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
|
|
8
|
-
import { EditorManager } from '@theia/editor/lib/browser';
|
|
9
|
-
import { Widget } from '@theia/core/lib/browser';
|
|
10
|
-
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
11
|
-
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
12
|
-
import URI from '@theia/core/lib/common/uri';
|
|
13
|
-
import { DeflatedToolbarTree, ToolbarTreeSchema, ToolbarItemDeflated, ToolbarAlignment, ToolbarItemPosition } from './toolbar-interfaces';
|
|
14
|
-
export declare const TOOLBAR_BAD_JSON_ERROR_MESSAGE: string;
|
|
15
|
-
export declare class ToolbarStorageProvider implements Disposable {
|
|
16
|
-
protected readonly appState: FrontendApplicationStateService;
|
|
17
|
-
protected readonly textModelService: MonacoTextModelService;
|
|
18
|
-
protected readonly fileService: FileService;
|
|
19
|
-
protected readonly messageService: MessageService;
|
|
20
|
-
protected lateInjector: <T>(id: interfaces.ServiceIdentifier<T>) => T;
|
|
21
|
-
protected readonly USER_TOOLBAR_URI: URI;
|
|
22
|
-
get ready(): Promise<void>;
|
|
23
|
-
protected readonly _ready: Deferred<void>;
|
|
24
|
-
protected monacoWorkspace: MonacoWorkspace;
|
|
25
|
-
protected editorManager: EditorManager;
|
|
26
|
-
protected model: MonacoEditorModel | undefined;
|
|
27
|
-
protected toDispose: DisposableCollection;
|
|
28
|
-
protected toolbarItemsUpdatedEmitter: Emitter<void>;
|
|
29
|
-
readonly onToolbarItemsChanged: import("@theia/core").Event<void>;
|
|
30
|
-
toolbarItems: DeflatedToolbarTree | undefined;
|
|
31
|
-
protected init(): void;
|
|
32
|
-
protected doInit(): Promise<void>;
|
|
33
|
-
protected readConfiguration(): void;
|
|
34
|
-
removeItem(position: ToolbarItemPosition): Promise<boolean>;
|
|
35
|
-
addItem(command: Command, alignment: ToolbarAlignment): Promise<boolean>;
|
|
36
|
-
swapValues(oldPosition: ToolbarItemPosition, newPosition: ToolbarItemPosition, direction: 'location-left' | 'location-right'): Promise<boolean>;
|
|
37
|
-
addItemToEmptyColumn(item: ToolbarItemDeflated, alignment: ToolbarAlignment): Promise<boolean>;
|
|
38
|
-
moveItemToEmptySpace(oldPosition: ToolbarItemPosition, newAlignment: ToolbarAlignment, centerPosition?: 'left' | 'right'): Promise<boolean>;
|
|
39
|
-
insertGroup(position: ToolbarItemPosition, insertDirection: 'left' | 'right'): Promise<boolean>;
|
|
40
|
-
protected removeEmptyGroupsFromToolbar(toolbarItems: DeflatedToolbarTree | undefined): DeflatedToolbarTree | undefined;
|
|
41
|
-
clearAll(): Promise<boolean>;
|
|
42
|
-
protected writeToFile(path: jsoncParser.JSONPath, value: unknown, insertion?: boolean): Promise<boolean>;
|
|
43
|
-
protected parseContent(fileContent: string): DeflatedToolbarTree | undefined;
|
|
44
|
-
protected parse(fileContent: string): DeflatedToolbarTree | undefined;
|
|
45
|
-
openOrCreateJSONFile(state: ToolbarTreeSchema, doOpen?: boolean): Promise<Widget | undefined>;
|
|
46
|
-
dispose(): void;
|
|
47
|
-
}
|
|
1
|
+
import * as jsoncParser from 'jsonc-parser';
|
|
2
|
+
import { Command, Disposable, DisposableCollection, Emitter, MessageService } from '@theia/core';
|
|
3
|
+
import { interfaces } from '@theia/core/shared/inversify';
|
|
4
|
+
import { MonacoTextModelService } from '@theia/monaco/lib/browser/monaco-text-model-service';
|
|
5
|
+
import { MonacoEditorModel } from '@theia/monaco/lib/browser/monaco-editor-model';
|
|
6
|
+
import { MonacoWorkspace } from '@theia/monaco/lib/browser/monaco-workspace';
|
|
7
|
+
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
|
|
8
|
+
import { EditorManager } from '@theia/editor/lib/browser';
|
|
9
|
+
import { Widget } from '@theia/core/lib/browser';
|
|
10
|
+
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
11
|
+
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
12
|
+
import URI from '@theia/core/lib/common/uri';
|
|
13
|
+
import { DeflatedToolbarTree, ToolbarTreeSchema, ToolbarItemDeflated, ToolbarAlignment, ToolbarItemPosition } from './toolbar-interfaces';
|
|
14
|
+
export declare const TOOLBAR_BAD_JSON_ERROR_MESSAGE: string;
|
|
15
|
+
export declare class ToolbarStorageProvider implements Disposable {
|
|
16
|
+
protected readonly appState: FrontendApplicationStateService;
|
|
17
|
+
protected readonly textModelService: MonacoTextModelService;
|
|
18
|
+
protected readonly fileService: FileService;
|
|
19
|
+
protected readonly messageService: MessageService;
|
|
20
|
+
protected lateInjector: <T>(id: interfaces.ServiceIdentifier<T>) => T;
|
|
21
|
+
protected readonly USER_TOOLBAR_URI: URI;
|
|
22
|
+
get ready(): Promise<void>;
|
|
23
|
+
protected readonly _ready: Deferred<void>;
|
|
24
|
+
protected monacoWorkspace: MonacoWorkspace;
|
|
25
|
+
protected editorManager: EditorManager;
|
|
26
|
+
protected model: MonacoEditorModel | undefined;
|
|
27
|
+
protected toDispose: DisposableCollection;
|
|
28
|
+
protected toolbarItemsUpdatedEmitter: Emitter<void>;
|
|
29
|
+
readonly onToolbarItemsChanged: import("@theia/core").Event<void>;
|
|
30
|
+
toolbarItems: DeflatedToolbarTree | undefined;
|
|
31
|
+
protected init(): void;
|
|
32
|
+
protected doInit(): Promise<void>;
|
|
33
|
+
protected readConfiguration(): void;
|
|
34
|
+
removeItem(position: ToolbarItemPosition): Promise<boolean>;
|
|
35
|
+
addItem(command: Command, alignment: ToolbarAlignment): Promise<boolean>;
|
|
36
|
+
swapValues(oldPosition: ToolbarItemPosition, newPosition: ToolbarItemPosition, direction: 'location-left' | 'location-right'): Promise<boolean>;
|
|
37
|
+
addItemToEmptyColumn(item: ToolbarItemDeflated, alignment: ToolbarAlignment): Promise<boolean>;
|
|
38
|
+
moveItemToEmptySpace(oldPosition: ToolbarItemPosition, newAlignment: ToolbarAlignment, centerPosition?: 'left' | 'right'): Promise<boolean>;
|
|
39
|
+
insertGroup(position: ToolbarItemPosition, insertDirection: 'left' | 'right'): Promise<boolean>;
|
|
40
|
+
protected removeEmptyGroupsFromToolbar(toolbarItems: DeflatedToolbarTree | undefined): DeflatedToolbarTree | undefined;
|
|
41
|
+
clearAll(): Promise<boolean>;
|
|
42
|
+
protected writeToFile(path: jsoncParser.JSONPath, value: unknown, insertion?: boolean): Promise<boolean>;
|
|
43
|
+
protected parseContent(fileContent: string): DeflatedToolbarTree | undefined;
|
|
44
|
+
protected parse(fileContent: string): DeflatedToolbarTree | undefined;
|
|
45
|
+
openOrCreateJSONFile(state: ToolbarTreeSchema, doOpen?: boolean): Promise<Widget | undefined>;
|
|
46
|
+
dispose(): void;
|
|
47
|
+
}
|
|
48
48
|
//# sourceMappingURL=toolbar-storage-provider.d.ts.map
|