@theia/toolbar 1.23.0-next.59
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/LICENSE +642 -0
- package/README.md +32 -0
- package/lib/browser/abstract-toolbar-contribution.d.ts +32 -0
- package/lib/browser/abstract-toolbar-contribution.d.ts.map +1 -0
- package/lib/browser/abstract-toolbar-contribution.js +69 -0
- package/lib/browser/abstract-toolbar-contribution.js.map +1 -0
- package/lib/browser/application-shell-with-toolbar-override.d.ts +30 -0
- package/lib/browser/application-shell-with-toolbar-override.d.ts.map +1 -0
- package/lib/browser/application-shell-with-toolbar-override.js +99 -0
- package/lib/browser/application-shell-with-toolbar-override.js.map +1 -0
- package/lib/browser/codicons.d.ts +17 -0
- package/lib/browser/codicons.d.ts.map +1 -0
- package/lib/browser/codicons.js +21 -0
- package/lib/browser/codicons.js.map +1 -0
- package/lib/browser/font-awesome-icons.d.ts +17 -0
- package/lib/browser/font-awesome-icons.d.ts.map +1 -0
- package/lib/browser/font-awesome-icons.js +21 -0
- package/lib/browser/font-awesome-icons.js.map +1 -0
- package/lib/browser/package.spec.d.ts +16 -0
- package/lib/browser/package.spec.d.ts.map +1 -0
- package/lib/browser/package.spec.js +19 -0
- package/lib/browser/package.spec.js.map +1 -0
- package/lib/browser/toolbar-command-contribution.d.ts +41 -0
- package/lib/browser/toolbar-command-contribution.d.ts.map +1 -0
- package/lib/browser/toolbar-command-contribution.js +212 -0
- package/lib/browser/toolbar-command-contribution.js.map +1 -0
- package/lib/browser/toolbar-command-quick-input-service.d.ts +35 -0
- package/lib/browser/toolbar-command-quick-input-service.d.ts.map +1 -0
- package/lib/browser/toolbar-command-quick-input-service.js +108 -0
- package/lib/browser/toolbar-command-quick-input-service.js.map +1 -0
- package/lib/browser/toolbar-constants.d.ts +39 -0
- package/lib/browser/toolbar-constants.d.ts.map +1 -0
- package/lib/browser/toolbar-constants.js +76 -0
- package/lib/browser/toolbar-constants.js.map +1 -0
- package/lib/browser/toolbar-controller.d.ts +49 -0
- package/lib/browser/toolbar-controller.d.ts.map +1 -0
- package/lib/browser/toolbar-controller.js +185 -0
- package/lib/browser/toolbar-controller.js.map +1 -0
- package/lib/browser/toolbar-defaults.d.ts +19 -0
- package/lib/browser/toolbar-defaults.d.ts.map +1 -0
- package/lib/browser/toolbar-defaults.js +61 -0
- package/lib/browser/toolbar-defaults.js.map +1 -0
- package/lib/browser/toolbar-frontend-module.d.ts +20 -0
- package/lib/browser/toolbar-frontend-module.d.ts.map +1 -0
- package/lib/browser/toolbar-frontend-module.js +26 -0
- package/lib/browser/toolbar-frontend-module.js.map +1 -0
- package/lib/browser/toolbar-icon-selector-dialog.d.ts +79 -0
- package/lib/browser/toolbar-icon-selector-dialog.d.ts.map +1 -0
- package/lib/browser/toolbar-icon-selector-dialog.js +237 -0
- package/lib/browser/toolbar-icon-selector-dialog.js.map +1 -0
- package/lib/browser/toolbar-interfaces.d.ts +61 -0
- package/lib/browser/toolbar-interfaces.d.ts.map +1 -0
- package/lib/browser/toolbar-interfaces.js +43 -0
- package/lib/browser/toolbar-interfaces.js.map +1 -0
- package/lib/browser/toolbar-preference-contribution.d.ts +25 -0
- package/lib/browser/toolbar-preference-contribution.d.ts.map +1 -0
- package/lib/browser/toolbar-preference-contribution.js +35 -0
- package/lib/browser/toolbar-preference-contribution.js.map +1 -0
- package/lib/browser/toolbar-preference-schema.d.ts +21 -0
- package/lib/browser/toolbar-preference-schema.d.ts.map +1 -0
- package/lib/browser/toolbar-preference-schema.js +73 -0
- package/lib/browser/toolbar-preference-schema.js.map +1 -0
- package/lib/browser/toolbar-storage-provider.d.ts +62 -0
- package/lib/browser/toolbar-storage-provider.d.ts.map +1 -0
- package/lib/browser/toolbar-storage-provider.js +354 -0
- package/lib/browser/toolbar-storage-provider.js.map +1 -0
- package/lib/browser/toolbar.d.ts +72 -0
- package/lib/browser/toolbar.d.ts.map +1 -0
- package/lib/browser/toolbar.js +381 -0
- package/lib/browser/toolbar.js.map +1 -0
- package/package.json +51 -0
- package/src/browser/abstract-toolbar-contribution.tsx +53 -0
- package/src/browser/application-shell-with-toolbar-override.ts +94 -0
- package/src/browser/codicons.ts +18 -0
- package/src/browser/font-awesome-icons.ts +18 -0
- package/src/browser/package.spec.ts +19 -0
- package/src/browser/style/toolbar.css +253 -0
- package/src/browser/toolbar-command-contribution.ts +211 -0
- package/src/browser/toolbar-command-quick-input-service.ts +86 -0
- package/src/browser/toolbar-constants.ts +79 -0
- package/src/browser/toolbar-controller.ts +182 -0
- package/src/browser/toolbar-defaults.ts +58 -0
- package/src/browser/toolbar-frontend-module.ts +30 -0
- package/src/browser/toolbar-icon-selector-dialog.tsx +296 -0
- package/src/browser/toolbar-interfaces.ts +76 -0
- package/src/browser/toolbar-preference-contribution.ts +38 -0
- package/src/browser/toolbar-preference-schema.ts +74 -0
- package/src/browser/toolbar-storage-provider.ts +347 -0
- package/src/browser/toolbar.tsx +420 -0
|
@@ -0,0 +1,212 @@
|
|
|
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 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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.bindToolbar = exports.ToolbarCommandContribution = void 0;
|
|
28
|
+
const core_1 = require("@theia/core");
|
|
29
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
30
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
31
|
+
const browser_2 = require("@theia/editor/lib/browser");
|
|
32
|
+
const toolbar_1 = require("./toolbar");
|
|
33
|
+
const toolbar_icon_selector_dialog_1 = require("./toolbar-icon-selector-dialog");
|
|
34
|
+
const toolbar_interfaces_1 = require("./toolbar-interfaces");
|
|
35
|
+
const toolbar_command_quick_input_service_1 = require("./toolbar-command-quick-input-service");
|
|
36
|
+
const toolbar_storage_provider_1 = require("./toolbar-storage-provider");
|
|
37
|
+
const toolbar_controller_1 = require("./toolbar-controller");
|
|
38
|
+
const toolbar_preference_contribution_1 = require("./toolbar-preference-contribution");
|
|
39
|
+
const toolbar_defaults_1 = require("./toolbar-defaults");
|
|
40
|
+
const toolbar_constants_1 = require("./toolbar-constants");
|
|
41
|
+
const json_schema_store_1 = require("@theia/core/lib/browser/json-schema-store");
|
|
42
|
+
const toolbar_preference_schema_1 = require("./toolbar-preference-schema");
|
|
43
|
+
const uri_1 = require("@theia/core/lib/common/uri");
|
|
44
|
+
let ToolbarCommandContribution = class ToolbarCommandContribution {
|
|
45
|
+
constructor() {
|
|
46
|
+
this.schemaURI = new uri_1.default(toolbar_preference_schema_1.toolbarSchemaId);
|
|
47
|
+
}
|
|
48
|
+
registerSchemas(context) {
|
|
49
|
+
this.inMemoryResources.add(this.schemaURI, JSON.stringify(toolbar_preference_schema_1.toolbarConfigurationSchema));
|
|
50
|
+
context.registerSchema({
|
|
51
|
+
fileMatch: ['toolbar.json'],
|
|
52
|
+
url: this.schemaURI.toString(),
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
registerCommands(registry) {
|
|
56
|
+
registry.registerCommand(toolbar_constants_1.ToolbarCommands.CUSTOMIZE_TOOLBAR, {
|
|
57
|
+
execute: () => this.model.openOrCreateJSONFile(true),
|
|
58
|
+
});
|
|
59
|
+
registry.registerCommand(toolbar_constants_1.ToolbarCommands.RESET_TOOLBAR, {
|
|
60
|
+
execute: () => this.model.clearAll(),
|
|
61
|
+
});
|
|
62
|
+
registry.registerCommand(toolbar_constants_1.ToolbarCommands.TOGGLE_TOOLBAR, {
|
|
63
|
+
execute: () => {
|
|
64
|
+
const isVisible = this.preferenceService.get(toolbar_preference_contribution_1.TOOLBAR_ENABLE_PREFERENCE_ID);
|
|
65
|
+
this.preferenceService.set(toolbar_preference_contribution_1.TOOLBAR_ENABLE_PREFERENCE_ID, !isVisible, browser_1.PreferenceScope.User);
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
registry.registerCommand(toolbar_constants_1.ToolbarCommands.REMOVE_COMMAND_FROM_TOOLBAR, {
|
|
69
|
+
execute: async (_widget, position, id) => position && this.model.removeItem(position, id),
|
|
70
|
+
isVisible: (...args) => this.isToolbarWidget(args[0]),
|
|
71
|
+
});
|
|
72
|
+
registry.registerCommand(toolbar_constants_1.ToolbarCommands.INSERT_GROUP_LEFT, {
|
|
73
|
+
execute: async (_widget, position) => position && this.model.insertGroup(position, 'left'),
|
|
74
|
+
isVisible: (widget, position) => {
|
|
75
|
+
if (position) {
|
|
76
|
+
const { alignment, groupIndex, itemIndex } = position;
|
|
77
|
+
const owningGroupLength = this.toolbarModel.toolbarItems.items[alignment][groupIndex].length;
|
|
78
|
+
return this.isToolbarWidget(widget) && (owningGroupLength > 1) && (itemIndex > 0);
|
|
79
|
+
}
|
|
80
|
+
return false;
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
registry.registerCommand(toolbar_constants_1.ToolbarCommands.INSERT_GROUP_RIGHT, {
|
|
84
|
+
execute: async (_widget, position) => position && this.model.insertGroup(position, 'right'),
|
|
85
|
+
isVisible: (widget, position) => {
|
|
86
|
+
if (position) {
|
|
87
|
+
const { alignment, groupIndex, itemIndex } = position;
|
|
88
|
+
const owningGroupLength = this.toolbarModel.toolbarItems.items[alignment][groupIndex].length;
|
|
89
|
+
const isNotLastItem = itemIndex < (owningGroupLength - 1);
|
|
90
|
+
return this.isToolbarWidget(widget) && owningGroupLength > 1 && isNotLastItem;
|
|
91
|
+
}
|
|
92
|
+
return false;
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
registry.registerCommand(toolbar_constants_1.ToolbarCommands.ADD_COMMAND_TO_TOOLBAR, {
|
|
96
|
+
execute: () => this.toolbarCommandPickService.openIconDialog(),
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
isToolbarWidget(arg) {
|
|
100
|
+
return arg instanceof toolbar_1.ToolbarImpl;
|
|
101
|
+
}
|
|
102
|
+
registerKeybindings(keys) {
|
|
103
|
+
keys.registerKeybinding({
|
|
104
|
+
command: toolbar_constants_1.ToolbarCommands.TOGGLE_TOOLBAR.id,
|
|
105
|
+
keybinding: 'alt+t',
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
registerMenus(registry) {
|
|
109
|
+
registry.registerMenuAction(browser_1.CommonMenus.VIEW_LAYOUT, {
|
|
110
|
+
commandId: toolbar_constants_1.ToolbarCommands.TOGGLE_TOOLBAR.id,
|
|
111
|
+
order: 'z',
|
|
112
|
+
});
|
|
113
|
+
registry.registerMenuAction(toolbar_constants_1.ToolbarMenus.TOOLBAR_ITEM_CONTEXT_MENU, {
|
|
114
|
+
commandId: toolbar_constants_1.ToolbarCommands.ADD_COMMAND_TO_TOOLBAR.id,
|
|
115
|
+
order: 'a',
|
|
116
|
+
});
|
|
117
|
+
registry.registerMenuAction(toolbar_constants_1.ToolbarMenus.TOOLBAR_ITEM_CONTEXT_MENU, {
|
|
118
|
+
commandId: toolbar_constants_1.ToolbarCommands.INSERT_GROUP_LEFT.id,
|
|
119
|
+
order: 'b',
|
|
120
|
+
});
|
|
121
|
+
registry.registerMenuAction(toolbar_constants_1.ToolbarMenus.TOOLBAR_ITEM_CONTEXT_MENU, {
|
|
122
|
+
commandId: toolbar_constants_1.ToolbarCommands.INSERT_GROUP_RIGHT.id,
|
|
123
|
+
order: 'c',
|
|
124
|
+
});
|
|
125
|
+
registry.registerMenuAction(toolbar_constants_1.ToolbarMenus.TOOLBAR_ITEM_CONTEXT_MENU, {
|
|
126
|
+
commandId: toolbar_constants_1.ToolbarCommands.REMOVE_COMMAND_FROM_TOOLBAR.id,
|
|
127
|
+
order: 'd',
|
|
128
|
+
});
|
|
129
|
+
registry.registerMenuAction(toolbar_constants_1.ToolbarMenus.TOOLBAR_BACKGROUND_CONTEXT_MENU, {
|
|
130
|
+
commandId: toolbar_constants_1.ToolbarCommands.ADD_COMMAND_TO_TOOLBAR.id,
|
|
131
|
+
order: 'a',
|
|
132
|
+
});
|
|
133
|
+
registry.registerMenuAction(toolbar_constants_1.ToolbarMenus.TOOLBAR_BACKGROUND_CONTEXT_MENU, {
|
|
134
|
+
commandId: toolbar_constants_1.ToolbarCommands.CUSTOMIZE_TOOLBAR.id,
|
|
135
|
+
order: 'b',
|
|
136
|
+
});
|
|
137
|
+
registry.registerMenuAction(toolbar_constants_1.ToolbarMenus.TOOLBAR_BACKGROUND_CONTEXT_MENU, {
|
|
138
|
+
commandId: toolbar_constants_1.ToolbarCommands.TOGGLE_TOOLBAR.id,
|
|
139
|
+
order: 'c',
|
|
140
|
+
});
|
|
141
|
+
registry.registerMenuAction(toolbar_constants_1.ToolbarMenus.TOOLBAR_BACKGROUND_CONTEXT_MENU, {
|
|
142
|
+
commandId: toolbar_constants_1.ToolbarCommands.RESET_TOOLBAR.id,
|
|
143
|
+
order: 'd',
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
__decorate([
|
|
148
|
+
(0, inversify_1.inject)(toolbar_controller_1.ToolbarController),
|
|
149
|
+
__metadata("design:type", toolbar_controller_1.ToolbarController)
|
|
150
|
+
], ToolbarCommandContribution.prototype, "model", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, inversify_1.inject)(browser_1.QuickInputService),
|
|
153
|
+
__metadata("design:type", Object)
|
|
154
|
+
], ToolbarCommandContribution.prototype, "quickInputService", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
(0, inversify_1.inject)(toolbar_command_quick_input_service_1.ToolbarCommandQuickInputService),
|
|
157
|
+
__metadata("design:type", toolbar_command_quick_input_service_1.ToolbarCommandQuickInputService)
|
|
158
|
+
], ToolbarCommandContribution.prototype, "toolbarCommandPickService", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
(0, inversify_1.inject)(core_1.CommandService),
|
|
161
|
+
__metadata("design:type", Object)
|
|
162
|
+
], ToolbarCommandContribution.prototype, "commandService", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, inversify_1.inject)(browser_2.EditorManager),
|
|
165
|
+
__metadata("design:type", browser_2.EditorManager)
|
|
166
|
+
], ToolbarCommandContribution.prototype, "editorManager", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
(0, inversify_1.inject)(browser_1.PreferenceService),
|
|
169
|
+
__metadata("design:type", Object)
|
|
170
|
+
], ToolbarCommandContribution.prototype, "preferenceService", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
(0, inversify_1.inject)(toolbar_controller_1.ToolbarController),
|
|
173
|
+
__metadata("design:type", toolbar_controller_1.ToolbarController)
|
|
174
|
+
], ToolbarCommandContribution.prototype, "toolbarModel", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
(0, inversify_1.inject)(core_1.InMemoryResources),
|
|
177
|
+
__metadata("design:type", core_1.InMemoryResources)
|
|
178
|
+
], ToolbarCommandContribution.prototype, "inMemoryResources", void 0);
|
|
179
|
+
ToolbarCommandContribution = __decorate([
|
|
180
|
+
(0, inversify_1.injectable)()
|
|
181
|
+
], ToolbarCommandContribution);
|
|
182
|
+
exports.ToolbarCommandContribution = ToolbarCommandContribution;
|
|
183
|
+
function bindToolbar(bind) {
|
|
184
|
+
bind(toolbar_interfaces_1.ToolbarFactory).toFactory(({ container }) => () => {
|
|
185
|
+
const child = new inversify_1.Container({ defaultScope: 'Singleton' });
|
|
186
|
+
child.parent = container;
|
|
187
|
+
child.bind(toolbar_interfaces_1.Toolbar).to(toolbar_1.ToolbarImpl);
|
|
188
|
+
return child.get(toolbar_interfaces_1.Toolbar);
|
|
189
|
+
});
|
|
190
|
+
bind(ToolbarCommandContribution).toSelf().inSingletonScope();
|
|
191
|
+
bind(core_1.CommandContribution).to(ToolbarCommandContribution);
|
|
192
|
+
bind(core_1.MenuContribution).toService(ToolbarCommandContribution);
|
|
193
|
+
bind(browser_1.KeybindingContribution).toService(ToolbarCommandContribution);
|
|
194
|
+
bind(json_schema_store_1.JsonSchemaContribution).toService(ToolbarCommandContribution);
|
|
195
|
+
bind(toolbar_command_quick_input_service_1.ToolbarCommandQuickInputService).toSelf().inSingletonScope();
|
|
196
|
+
(0, toolbar_icon_selector_dialog_1.bindToolbarIconDialog)(bind);
|
|
197
|
+
bind(toolbar_defaults_1.ToolbarDefaultsFactory).toConstantValue(toolbar_defaults_1.ToolbarDefaults);
|
|
198
|
+
bind(toolbar_preference_contribution_1.ToolbarPreferences).toDynamicValue(({ container }) => {
|
|
199
|
+
const preferences = container.get(browser_1.PreferenceService);
|
|
200
|
+
return (0, browser_1.createPreferenceProxy)(preferences, toolbar_preference_contribution_1.ToolbarPreferencesSchema);
|
|
201
|
+
}).inSingletonScope();
|
|
202
|
+
bind(browser_1.PreferenceContribution).toConstantValue({
|
|
203
|
+
schema: toolbar_preference_contribution_1.ToolbarPreferencesSchema,
|
|
204
|
+
});
|
|
205
|
+
bind(toolbar_constants_1.UserToolbarURI).toConstantValue(toolbar_constants_1.USER_TOOLBAR_URI);
|
|
206
|
+
bind(toolbar_controller_1.ToolbarController).toSelf().inSingletonScope();
|
|
207
|
+
bind(toolbar_storage_provider_1.ToolbarStorageProvider).toSelf().inSingletonScope();
|
|
208
|
+
(0, core_1.bindContributionProvider)(bind, toolbar_interfaces_1.ToolbarContribution);
|
|
209
|
+
bind(toolbar_interfaces_1.LateInjector).toFactory((context) => (id) => (0, toolbar_interfaces_1.lateInjector)(context.container, id));
|
|
210
|
+
}
|
|
211
|
+
exports.bindToolbar = bindToolbar;
|
|
212
|
+
//# sourceMappingURL=toolbar-command-contribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar-command-contribution.js","sourceRoot":"","sources":["../../src/browser/toolbar-command-contribution.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,sCAQqB;AACrB,qDAUiC;AACjC,4DAAyF;AACzF,uDAA0D;AAC1D,uCAAwC;AACxC,iFAAuE;AACvE,6DAO8B;AAC9B,+FAAwF;AACxF,yEAAoE;AACpE,6DAAyD;AACzD,uFAA+H;AAC/H,yDAA6E;AAC7E,2DAAsG;AACtG,iFAA8G;AAC9G,2EAA0F;AAC1F,oDAA6C;AAG7C,IAAa,0BAA0B,GAAvC,MAAa,0BAA0B;IAAvC;QASuB,cAAS,GAAG,IAAI,aAAG,CAAC,2CAAe,CAAC,CAAC;IA2G5D,CAAC;IAzGG,eAAe,CAAC,OAAkC;QAC9C,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,sDAA0B,CAAC,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AAC;IACxE,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACtB,IAAI,CAAC,gCAAsB,CAAC,CAAC,eAAe,CAAC;QACzC,MAAM,EAAE,0DAAwB;KACnC,CAAC,CAAC;IAEH,IAAI,CAAC,kCAAc,CAAC,CAAC,eAAe,CAAC,oCAAgB,CAAC,CAAC;IAEvD,IAAI,CAAC,sCAAiB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACpD,IAAI,CAAC,iDAAsB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACzD,IAAA,+BAAwB,EAAC,IAAI,EAAE,wCAAmB,CAAC,CAAC;IACpD,IAAI,CAAC,iCAAY,CAAC,CAAC,SAAS,CACxB,CAAI,OAA2B,EAAE,EAAE,CAAC,CAAC,EAAmC,EAAK,EAAE,CAAC,IAAA,iCAAY,EAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CACtH,CAAC;AACN,CAAC;AAjCD,kCAiCC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (C) 2022 Ericsson and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
import { Command, CommandRegistry, CommandService } from '@theia/core';
|
|
17
|
+
import { QuickCommandService, QuickInputService, QuickPickItem } from '@theia/core/lib/browser';
|
|
18
|
+
import { ToolbarIconDialogFactory } from './toolbar-icon-selector-dialog';
|
|
19
|
+
import { ToolbarController } from './toolbar-controller';
|
|
20
|
+
export declare class ToolbarCommandQuickInputService {
|
|
21
|
+
protected readonly commandService: CommandService;
|
|
22
|
+
protected readonly quickInputService: QuickInputService;
|
|
23
|
+
protected readonly commandRegistry: CommandRegistry;
|
|
24
|
+
protected readonly quickCommandService: QuickCommandService;
|
|
25
|
+
protected readonly model: ToolbarController;
|
|
26
|
+
protected readonly iconDialogFactory: ToolbarIconDialogFactory;
|
|
27
|
+
protected quickPickItems: QuickPickItem[];
|
|
28
|
+
protected iconClass: string | undefined;
|
|
29
|
+
protected commandToAdd: Command | undefined;
|
|
30
|
+
protected columnQuickPickItems: QuickPickItem[];
|
|
31
|
+
openIconDialog(): void;
|
|
32
|
+
protected openColumnQP(): Promise<QuickPickItem>;
|
|
33
|
+
protected generateCommandsList(): QuickPickItem[];
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=toolbar-command-quick-input-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar-command-quick-input-service.d.ts","sourceRoot":"","sources":["../../src/browser/toolbar-command-quick-input-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAO,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEhG,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,qBACa,+BAA+B;IAChB,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAC/C,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC1D,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAChD,SAAS,CAAC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAC9D,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IACrC,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,wBAAwB,CAAC;IAEjG,SAAS,CAAC,cAAc,EAAE,aAAa,EAAE,CAAM;IAE/C,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,SAAS,CAAC,YAAY,EAAE,OAAO,GAAG,SAAS,CAAC;IAE5C,SAAS,CAAC,oBAAoB,EAAE,aAAa,EAAE,CAa7C;IAEF,cAAc,IAAI,IAAI;IAOtB,SAAS,CAAC,YAAY,IAAI,OAAO,CAAC,aAAa,CAAC;IAMhD,SAAS,CAAC,oBAAoB,IAAI,aAAa,EAAE;CAoBpD"}
|
|
@@ -0,0 +1,108 @@
|
|
|
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 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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.ToolbarCommandQuickInputService = void 0;
|
|
28
|
+
const core_1 = require("@theia/core");
|
|
29
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
30
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
31
|
+
const toolbar_icon_selector_dialog_1 = require("./toolbar-icon-selector-dialog");
|
|
32
|
+
const toolbar_interfaces_1 = require("./toolbar-interfaces");
|
|
33
|
+
const toolbar_controller_1 = require("./toolbar-controller");
|
|
34
|
+
let ToolbarCommandQuickInputService = class ToolbarCommandQuickInputService {
|
|
35
|
+
constructor() {
|
|
36
|
+
this.quickPickItems = [];
|
|
37
|
+
this.columnQuickPickItems = [
|
|
38
|
+
{
|
|
39
|
+
label: core_1.nls.localize('theia/toolbar/leftColumn', 'Left Column'),
|
|
40
|
+
id: toolbar_interfaces_1.ToolbarAlignment.LEFT,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
label: core_1.nls.localize('theia/toolbar/centerColumn', 'Center Column'),
|
|
44
|
+
id: toolbar_interfaces_1.ToolbarAlignment.CENTER,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: core_1.nls.localize('theia/toolbar/rightColumn', 'Right Column'),
|
|
48
|
+
id: toolbar_interfaces_1.ToolbarAlignment.RIGHT
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
openIconDialog() {
|
|
53
|
+
this.quickPickItems = this.generateCommandsList();
|
|
54
|
+
this.quickInputService.showQuickPick(this.quickPickItems, {
|
|
55
|
+
placeholder: core_1.nls.localize('theia/toolbar/addCommandPlaceholder', 'Find a command to add to the toolbar'),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
openColumnQP() {
|
|
59
|
+
return this.quickInputService.showQuickPick(this.columnQuickPickItems, {
|
|
60
|
+
placeholder: core_1.nls.localize('theia/toolbar/toolbarLocationPlaceholder', 'Where would you like the command added?')
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
generateCommandsList() {
|
|
64
|
+
const { recent, other } = this.quickCommandService.getCommands();
|
|
65
|
+
return [...recent, ...other].map(command => {
|
|
66
|
+
const formattedItem = this.quickCommandService.toItem(command);
|
|
67
|
+
return Object.assign(Object.assign({}, formattedItem), { alwaysShow: true, execute: async () => {
|
|
68
|
+
const iconDialog = this.iconDialogFactory(command);
|
|
69
|
+
const iconClass = await iconDialog.open();
|
|
70
|
+
if (iconClass) {
|
|
71
|
+
const { id } = await this.openColumnQP();
|
|
72
|
+
if (toolbar_interfaces_1.ToolbarAlignmentString.is(id)) {
|
|
73
|
+
this.model.addItem(Object.assign(Object.assign({}, command), { iconClass }), id);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
} });
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, inversify_1.inject)(core_1.CommandService),
|
|
82
|
+
__metadata("design:type", Object)
|
|
83
|
+
], ToolbarCommandQuickInputService.prototype, "commandService", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, inversify_1.inject)(browser_1.QuickInputService),
|
|
86
|
+
__metadata("design:type", Object)
|
|
87
|
+
], ToolbarCommandQuickInputService.prototype, "quickInputService", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, inversify_1.inject)(core_1.CommandRegistry),
|
|
90
|
+
__metadata("design:type", core_1.CommandRegistry)
|
|
91
|
+
], ToolbarCommandQuickInputService.prototype, "commandRegistry", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, inversify_1.inject)(browser_1.QuickCommandService),
|
|
94
|
+
__metadata("design:type", browser_1.QuickCommandService)
|
|
95
|
+
], ToolbarCommandQuickInputService.prototype, "quickCommandService", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, inversify_1.inject)(toolbar_controller_1.ToolbarController),
|
|
98
|
+
__metadata("design:type", toolbar_controller_1.ToolbarController)
|
|
99
|
+
], ToolbarCommandQuickInputService.prototype, "model", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, inversify_1.inject)(toolbar_icon_selector_dialog_1.ToolbarIconDialogFactory),
|
|
102
|
+
__metadata("design:type", Function)
|
|
103
|
+
], ToolbarCommandQuickInputService.prototype, "iconDialogFactory", void 0);
|
|
104
|
+
ToolbarCommandQuickInputService = __decorate([
|
|
105
|
+
(0, inversify_1.injectable)()
|
|
106
|
+
], ToolbarCommandQuickInputService);
|
|
107
|
+
exports.ToolbarCommandQuickInputService = ToolbarCommandQuickInputService;
|
|
108
|
+
//# sourceMappingURL=toolbar-command-quick-input-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar-command-quick-input-service.js","sourceRoot":"","sources":["../../src/browser/toolbar-command-quick-input-service.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,sCAA4E;AAC5E,qDAAgG;AAChG,4DAAkE;AAClE,iFAA0E;AAC1E,6DAAgF;AAChF,6DAAyD;AAGzD,IAAa,+BAA+B,GAA5C,MAAa,+BAA+B;IAA5C;QAQc,mBAAc,GAAoB,EAAE,CAAC;QAKrC,yBAAoB,GAAoB;YAC9C;gBACI,KAAK,EAAE,UAAG,CAAC,QAAQ,CAAC,0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AAM,UAAU,CAAC,IAAI,EAAE,CAAC;oBAC1C,IAAI,SAAS,EAAE;wBACX,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC;wBACzC,IAAI,2CAAsB,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;4BAC/B,IAAI,CAAC,KAAK,CAAC,OAAO,iCAAM,OAAO,KAAE,SAAS,KAAI,EAAE,CAAC,CAAC;yBACrD;qBACJ;gBACL,CAAC,IACH;QACN,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AA5D2B;IAAvB,IAAA,kBAAM,EAAC,qBAAc,CAAC;;uEAAmD;AAC/C;IAA1B,IAAA,kBAAM,EAAC,2BAAiB,CAAC;;0EAAyD;AAC1D;IAAxB,IAAA,kBAAM,EAAC,sBAAe,CAAC;8BAAqC,sBAAe;wEAAC;AAChD;IAA5B,IAAA,kBAAM,EAAC,6BAAmB,CAAC;8BAAyC,6BAAmB;4EAAC;AAC9D;IAA1B,IAAA,kBAAM,EAAC,sCAAiB,CAAC;8BAA2B,sCAAiB;8DAAC;AACrC;IAAjC,IAAA,kBAAM,EAAC,uDAAwB,CAAC;;0EAAgE;AANxF,+BAA+B;IAD3C,IAAA,sBAAU,GAAE;GACA,+BAA+B,CA6D3C;AA7DY,0EAA+B"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (C) 2022 Ericsson and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
/// <reference types="react" />
|
|
17
|
+
import { Command, MenuPath } from '@theia/core';
|
|
18
|
+
import URI from '@theia/core/lib/common/uri';
|
|
19
|
+
export declare namespace ToolbarCommands {
|
|
20
|
+
const TOGGLE_TOOLBAR: Command;
|
|
21
|
+
const REMOVE_COMMAND_FROM_TOOLBAR: Command;
|
|
22
|
+
const INSERT_GROUP_LEFT: Command;
|
|
23
|
+
const INSERT_GROUP_RIGHT: Command;
|
|
24
|
+
const ADD_COMMAND_TO_TOOLBAR: Command;
|
|
25
|
+
const RESET_TOOLBAR: Command;
|
|
26
|
+
const CUSTOMIZE_TOOLBAR: Command;
|
|
27
|
+
}
|
|
28
|
+
export declare const UserToolbarURI: unique symbol;
|
|
29
|
+
export declare const USER_TOOLBAR_URI: URI;
|
|
30
|
+
export declare namespace ToolbarMenus {
|
|
31
|
+
const TOOLBAR_ITEM_CONTEXT_MENU: MenuPath;
|
|
32
|
+
const TOOLBAR_BACKGROUND_CONTEXT_MENU: MenuPath;
|
|
33
|
+
const SEARCH_WIDGET_DROPDOWN_MENU: MenuPath;
|
|
34
|
+
}
|
|
35
|
+
export declare type ReactInteraction<T = Element, U = MouseEvent> = React.MouseEvent<T, U> | React.KeyboardEvent<T>;
|
|
36
|
+
export declare namespace ReactKeyboardEvent {
|
|
37
|
+
function is(obj: unknown): obj is React.KeyboardEvent;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=toolbar-constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar-constants.d.ts","sourceRoot":"","sources":["../../src/browser/toolbar-constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;;AAElF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAO,MAAM,aAAa,CAAC;AAErD,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAG7C,yBAAiB,eAAe,CAAC;IACtB,MAAM,cAAc,SAIuD,CAAC;IAE5E,MAAM,2BAA2B,SAIP,CAAC;IAE3B,MAAM,iBAAiB,SAIK,CAAC;IAE7B,MAAM,kBAAkB,SAIK,CAAC;IAE9B,MAAM,sBAAsB,SAIL,CAAC;IAExB,MAAM,aAAa,SAIS,CAAC;IAE7B,MAAM,iBAAiB,SAIF,CAAC;CAChC;AAED,eAAO,MAAM,cAAc,eAA2B,CAAC;AACvD,eAAO,MAAM,gBAAgB,KAA6E,CAAC;AAC3G,yBAAiB,YAAY,CAAC;IACnB,MAAM,yBAAyB,EAAE,QAA6C,CAAC;IAC/E,MAAM,+BAA+B,EAAE,QAA4C,CAAC;IACpF,MAAM,2BAA2B,EAAE,QAAqC,CAAC;CACnF;AAED,oBAAY,gBAAgB,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,UAAU,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;AAC5G,yBAAiB,kBAAkB,CAAC;IAChC,SAAgB,EAAE,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,KAAK,CAAC,aAAa,CAE3D;CACJ"}
|
|
@@ -0,0 +1,76 @@
|
|
|
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 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ReactKeyboardEvent = exports.ToolbarMenus = exports.USER_TOOLBAR_URI = exports.UserToolbarURI = exports.ToolbarCommands = void 0;
|
|
19
|
+
const core_1 = require("@theia/core");
|
|
20
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
21
|
+
const uri_1 = require("@theia/core/lib/common/uri");
|
|
22
|
+
const browser_2 = require("@theia/userstorage/lib/browser");
|
|
23
|
+
var ToolbarCommands;
|
|
24
|
+
(function (ToolbarCommands) {
|
|
25
|
+
ToolbarCommands.TOGGLE_TOOLBAR = core_1.Command.toLocalizedCommand({
|
|
26
|
+
id: 'toolbar.view.toggle',
|
|
27
|
+
category: browser_1.CommonCommands.VIEW_CATEGORY,
|
|
28
|
+
label: 'Toggle Toolbar',
|
|
29
|
+
}, 'theia/toolbar/toggleToolbar', core_1.nls.getDefaultKey(browser_1.CommonCommands.VIEW_CATEGORY));
|
|
30
|
+
ToolbarCommands.REMOVE_COMMAND_FROM_TOOLBAR = core_1.Command.toLocalizedCommand({
|
|
31
|
+
id: 'toolbar.remove.command',
|
|
32
|
+
category: 'Toolbar',
|
|
33
|
+
label: 'Remove Command From Toolbar',
|
|
34
|
+
}, 'theia/toolbar/removeCommand');
|
|
35
|
+
ToolbarCommands.INSERT_GROUP_LEFT = core_1.Command.toLocalizedCommand({
|
|
36
|
+
id: 'toolbar.insert.group.left',
|
|
37
|
+
category: 'Toolbar',
|
|
38
|
+
label: 'Insert Group Separator (Left)',
|
|
39
|
+
}, 'theia/toolbar/insertGroupLeft');
|
|
40
|
+
ToolbarCommands.INSERT_GROUP_RIGHT = core_1.Command.toLocalizedCommand({
|
|
41
|
+
id: 'toolbar.insert.group.right',
|
|
42
|
+
category: 'Toolbar',
|
|
43
|
+
label: 'Insert Group Separator (Right)',
|
|
44
|
+
}, 'theia/toolbar/insertGroupRight');
|
|
45
|
+
ToolbarCommands.ADD_COMMAND_TO_TOOLBAR = core_1.Command.toLocalizedCommand({
|
|
46
|
+
id: 'toolbar.add.command',
|
|
47
|
+
category: 'Toolbar',
|
|
48
|
+
label: 'Add Command to Toolbar',
|
|
49
|
+
}, 'theia/toolbar/addCommand');
|
|
50
|
+
ToolbarCommands.RESET_TOOLBAR = core_1.Command.toLocalizedCommand({
|
|
51
|
+
id: 'toolbar.restore.defaults',
|
|
52
|
+
category: 'Toolbar',
|
|
53
|
+
label: 'Restore Toolbar Defaults',
|
|
54
|
+
}, 'theia/toolbar/restoreDefaults');
|
|
55
|
+
ToolbarCommands.CUSTOMIZE_TOOLBAR = core_1.Command.toLocalizedCommand({
|
|
56
|
+
id: 'toolbar.customize',
|
|
57
|
+
category: 'Toolbar',
|
|
58
|
+
label: 'Customize Toolbar (Open JSON)',
|
|
59
|
+
}, 'theia/toolbar/openJSON');
|
|
60
|
+
})(ToolbarCommands = exports.ToolbarCommands || (exports.ToolbarCommands = {}));
|
|
61
|
+
exports.UserToolbarURI = Symbol('UserToolbarURI');
|
|
62
|
+
exports.USER_TOOLBAR_URI = new uri_1.default().withScheme(browser_2.UserStorageUri.scheme).withPath('/user/toolbar.json');
|
|
63
|
+
var ToolbarMenus;
|
|
64
|
+
(function (ToolbarMenus) {
|
|
65
|
+
ToolbarMenus.TOOLBAR_ITEM_CONTEXT_MENU = ['toolbar:toolbarItemContextMenu'];
|
|
66
|
+
ToolbarMenus.TOOLBAR_BACKGROUND_CONTEXT_MENU = ['toolbar:backgroundContextMenu'];
|
|
67
|
+
ToolbarMenus.SEARCH_WIDGET_DROPDOWN_MENU = ['searchToolbar:dropdown'];
|
|
68
|
+
})(ToolbarMenus = exports.ToolbarMenus || (exports.ToolbarMenus = {}));
|
|
69
|
+
var ReactKeyboardEvent;
|
|
70
|
+
(function (ReactKeyboardEvent) {
|
|
71
|
+
function is(obj) {
|
|
72
|
+
return typeof obj === 'object' && !!obj && 'key' in obj;
|
|
73
|
+
}
|
|
74
|
+
ReactKeyboardEvent.is = is;
|
|
75
|
+
})(ReactKeyboardEvent = exports.ReactKeyboardEvent || (exports.ReactKeyboardEvent = {}));
|
|
76
|
+
//# sourceMappingURL=toolbar-constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar-constants.js","sourceRoot":"","sources":["../../src/browser/toolbar-constants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,sCAAqD;AACrD,qDAAyD;AACzD,oDAA6C;AAC7C,4DAAgE;AAEhE,IAAiB,eAAe,CA0C/B;AA1CD,WAAiB,eAAe;IACf,8BAAc,GAAG,cAAO,CAAC,kBAAkB,CAAC;QACrD,EAAE,EAAE,qBAAqB;QACzB,QAAQ,EAAE,wBAAc,CAAC,aAAa;QACtC,KAAK,EAAE,gBAAgB;KAC1B,EAAE,6BAA6B,EAAE,UAAG,CAAC,aAAa,CAAC,wBAAc,CAAC,aAAa,CAAC,CAAC,CAAC;IAEtE,2CAA2B,GAAG,cAAO,CAAC,kBAAkB,CAAC;QAClE,EAAE,EAAE,wBAAwB;QAC5B,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,6BAA6B;KACvC,EAAE,6BAA6B,CAAC,CAAC;IAErB,iCAAiB,GAAG,cAAO,CAAC,kBAAkB,CAAC;QACxD,EAAE,EAAE,2BAA2B;QAC/B,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,+BAA+B;KACzC,EAAE,+BAA+B,CAAC,CAAC;IAEvB,kCAAkB,GAAG,cAAO,CAAC,kBAAkB,CAAC;QACzD,EAAE,EAAE,4BAA4B;QAChC,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,gCAAgC;KAC1C,EAAE,gCAAgC,CAAC,CAAC;IAExB,sCAAsB,GAAG,cAAO,CAAC,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0,0 +1,49 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (C) 2022 Ericsson and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
import { Command, ContributionProvider, Emitter, MaybePromise, MessageService } from '@theia/core';
|
|
17
|
+
import { Widget } from '@theia/core/lib/browser';
|
|
18
|
+
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state';
|
|
19
|
+
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
20
|
+
import { DeflatedToolbarTree, ToolbarContribution, ToolbarTreeSchema, ToolbarAlignment, ToolbarItemPosition } from './toolbar-interfaces';
|
|
21
|
+
import { ToolbarStorageProvider } from './toolbar-storage-provider';
|
|
22
|
+
export declare class ToolbarController {
|
|
23
|
+
protected readonly storageProvider: ToolbarStorageProvider;
|
|
24
|
+
protected readonly appState: FrontendApplicationStateService;
|
|
25
|
+
protected readonly messageService: MessageService;
|
|
26
|
+
protected readonly defaultsFactory: () => DeflatedToolbarTree;
|
|
27
|
+
protected widgetContributions: ContributionProvider<ToolbarContribution>;
|
|
28
|
+
protected toolbarModelDidUpdateEmitter: Emitter<void>;
|
|
29
|
+
readonly onToolbarModelDidUpdate: import("@theia/core").Event<void>;
|
|
30
|
+
protected toolbarProviderBusyEmitter: Emitter<boolean>;
|
|
31
|
+
readonly onToolbarDidChangeBusyState: import("@theia/core").Event<boolean>;
|
|
32
|
+
readonly ready: Deferred<void>;
|
|
33
|
+
protected _toolbarItems: ToolbarTreeSchema;
|
|
34
|
+
get toolbarItems(): ToolbarTreeSchema;
|
|
35
|
+
set toolbarItems(newTree: ToolbarTreeSchema);
|
|
36
|
+
protected inflateItems(schema: DeflatedToolbarTree): ToolbarTreeSchema;
|
|
37
|
+
getContributionByID(id: string): ToolbarContribution | undefined;
|
|
38
|
+
init(): Promise<void>;
|
|
39
|
+
protected resolveToolbarItems(): Promise<ToolbarTreeSchema>;
|
|
40
|
+
swapValues(oldPosition: ToolbarItemPosition, newPosition: ToolbarItemPosition, direction: 'location-left' | 'location-right'): Promise<boolean>;
|
|
41
|
+
clearAll(): Promise<boolean>;
|
|
42
|
+
openOrCreateJSONFile(doOpen?: boolean): Promise<Widget | undefined>;
|
|
43
|
+
addItem(command: Command, area: ToolbarAlignment): Promise<boolean>;
|
|
44
|
+
removeItem(position: ToolbarItemPosition, id?: string): Promise<boolean>;
|
|
45
|
+
moveItemToEmptySpace(draggedItemPosition: ToolbarItemPosition, column: ToolbarAlignment, centerPosition?: 'left' | 'right'): Promise<boolean>;
|
|
46
|
+
insertGroup(position: ToolbarItemPosition, insertDirection: 'left' | 'right'): Promise<boolean>;
|
|
47
|
+
withBusy<T = unknown>(action: () => MaybePromise<T>): Promise<T>;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=toolbar-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar-controller.d.ts","sourceRoot":"","sources":["../../src/browser/toolbar-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACnG,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAA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