@theia/timeline 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.
- package/LICENSE +641 -641
- package/README.md +30 -30
- package/lib/browser/timeline-context-key-service.d.ts +7 -7
- package/lib/browser/timeline-context-key-service.js +51 -51
- package/lib/browser/timeline-contribution.d.ts +17 -17
- package/lib/browser/timeline-contribution.js +128 -128
- package/lib/browser/timeline-empty-widget.d.ts +8 -8
- package/lib/browser/timeline-empty-widget.js +48 -48
- package/lib/browser/timeline-frontend-module.d.ts +5 -5
- package/lib/browser/timeline-frontend-module.js +68 -68
- package/lib/browser/timeline-service.d.ts +25 -25
- package/lib/browser/timeline-service.js +110 -110
- package/lib/browser/timeline-tree-model.d.ts +10 -10
- package/lib/browser/timeline-tree-model.js +68 -68
- package/lib/browser/timeline-tree-widget.d.ts +36 -36
- package/lib/browser/timeline-tree-widget.js +128 -128
- package/lib/browser/timeline-widget.d.ts +29 -29
- package/lib/browser/timeline-widget.js +194 -194
- package/lib/common/timeline-model.d.ts +56 -56
- package/lib/common/timeline-model.js +17 -17
- package/lib/package.spec.js +25 -25
- package/package.json +5 -5
- package/src/browser/style/index.css +51 -51
- package/src/browser/timeline-context-key-service.ts +36 -36
- package/src/browser/timeline-contribution.ts +112 -112
- package/src/browser/timeline-empty-widget.tsx +40 -40
- package/src/browser/timeline-frontend-module.ts +71 -71
- package/src/browser/timeline-service.ts +124 -124
- package/src/browser/timeline-tree-model.ts +72 -72
- package/src/browser/timeline-tree-widget.tsx +120 -120
- package/src/browser/timeline-widget.tsx +179 -179
- package/src/common/timeline-model.ts +84 -84
- package/src/package.spec.ts +29 -29
|
@@ -1,195 +1,195 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2020 RedHat 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 TimelineWidget_1;
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.TimelineWidget = void 0;
|
|
29
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
30
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
31
|
-
const timeline_tree_widget_1 = require("./timeline-tree-widget");
|
|
32
|
-
const timeline_service_1 = require("./timeline-service");
|
|
33
|
-
const common_1 = require("@theia/core/lib/common");
|
|
34
|
-
const timeline_empty_widget_1 = require("./timeline-empty-widget");
|
|
35
|
-
const algorithm_1 = require("@theia/core/shared/@phosphor/algorithm");
|
|
36
|
-
const vscode_uri_1 = require("@theia/core/shared/vscode-uri");
|
|
37
|
-
const nls_1 = require("@theia/core/lib/common/nls");
|
|
38
|
-
let TimelineWidget = TimelineWidget_1 = class TimelineWidget extends browser_1.BaseWidget {
|
|
39
|
-
constructor() {
|
|
40
|
-
super();
|
|
41
|
-
this.timelinesBySource = new Map();
|
|
42
|
-
this.id = TimelineWidget_1.ID;
|
|
43
|
-
this.title.label = nls_1.nls.localizeByDefault('Timeline');
|
|
44
|
-
this.title.caption = this.title.label;
|
|
45
|
-
this.addClass('theia-timeline');
|
|
46
|
-
}
|
|
47
|
-
init() {
|
|
48
|
-
const layout = new browser_1.PanelLayout();
|
|
49
|
-
this.layout = layout;
|
|
50
|
-
this.panel = new browser_1.Panel({ layout: new browser_1.PanelLayout({}) });
|
|
51
|
-
this.panel.node.tabIndex = -1;
|
|
52
|
-
layout.addWidget(this.panel);
|
|
53
|
-
this.containerLayout.addWidget(this.resourceWidget);
|
|
54
|
-
this.containerLayout.addWidget(this.timelineEmptyWidget);
|
|
55
|
-
this.refresh();
|
|
56
|
-
this.toDispose.push(this.timelineService.onDidChangeTimeline(event => {
|
|
57
|
-
const currentWidgetUri = this.getCurrentWidgetUri();
|
|
58
|
-
if (currentWidgetUri) {
|
|
59
|
-
this.loadTimeline(currentWidgetUri, event.reset);
|
|
60
|
-
}
|
|
61
|
-
}));
|
|
62
|
-
this.toDispose.push(this.selectionService.onSelectionChanged(selection => {
|
|
63
|
-
if (Array.isArray(selection) && !!selection[0] && 'uri' in selection[0]) {
|
|
64
|
-
this.refresh(selection[0].uri);
|
|
65
|
-
}
|
|
66
|
-
}));
|
|
67
|
-
this.toDispose.push(this.applicationShell.onDidChangeCurrentWidget(async (e) => {
|
|
68
|
-
if ((e.newValue && browser_1.Navigatable.is(e.newValue)) || !this.suitableWidgetsOpened()) {
|
|
69
|
-
this.refresh();
|
|
70
|
-
}
|
|
71
|
-
}));
|
|
72
|
-
this.toDispose.push(this.applicationShell.onDidRemoveWidget(widget => {
|
|
73
|
-
if (browser_1.NavigatableWidget.is(widget)) {
|
|
74
|
-
this.refresh();
|
|
75
|
-
}
|
|
76
|
-
}));
|
|
77
|
-
this.toDispose.push(this.timelineService.onDidChangeProviders(() => this.refresh()));
|
|
78
|
-
}
|
|
79
|
-
async loadTimelineForSource(source, uri, reset) {
|
|
80
|
-
var _a;
|
|
81
|
-
if (reset) {
|
|
82
|
-
this.timelinesBySource.delete(source);
|
|
83
|
-
}
|
|
84
|
-
let timeline = this.timelinesBySource.get(source);
|
|
85
|
-
const cursor = timeline === null || timeline === void 0 ? void 0 : timeline.cursor;
|
|
86
|
-
const options = { cursor: reset ? undefined : cursor, limit: timeline_tree_widget_1.TimelineTreeWidget.PAGE_SIZE };
|
|
87
|
-
const timelineResult = await this.timelineService.getTimeline(source, uri, options, { cacheResults: true, resetCache: reset });
|
|
88
|
-
if (timelineResult) {
|
|
89
|
-
const items = timelineResult.items;
|
|
90
|
-
if (items) {
|
|
91
|
-
if (timeline) {
|
|
92
|
-
timeline.add(items);
|
|
93
|
-
timeline.cursor = (_a = timelineResult.paging) === null || _a === void 0 ? void 0 : _a.cursor;
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
timeline = new timeline_service_1.TimelineAggregate(timelineResult);
|
|
97
|
-
}
|
|
98
|
-
this.timelinesBySource.set(source, timeline);
|
|
99
|
-
this.resourceWidget.model.updateTree(timeline.items, !!timeline.cursor);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
async loadTimeline(uri, reset) {
|
|
104
|
-
for (const source of this.timelineService.getSources().map(s => s.id)) {
|
|
105
|
-
this.loadTimelineForSource(source, vscode_uri_1.URI.parse(uri.toString()), reset);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
refresh(uri) {
|
|
109
|
-
if (!uri) {
|
|
110
|
-
uri = this.getCurrentWidgetUri();
|
|
111
|
-
}
|
|
112
|
-
if (uri) {
|
|
113
|
-
this.timelineEmptyWidget.hide();
|
|
114
|
-
this.resourceWidget.show();
|
|
115
|
-
this.loadTimeline(uri, true);
|
|
116
|
-
}
|
|
117
|
-
else if (!this.suitableWidgetsOpened()) {
|
|
118
|
-
this.timelineEmptyWidget.show();
|
|
119
|
-
this.resourceWidget.hide();
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
suitableWidgetsOpened() {
|
|
123
|
-
return !!(0, algorithm_1.toArray)(this.applicationShell.mainPanel.widgets()).find(widget => {
|
|
124
|
-
if (browser_1.NavigatableWidget.is(widget)) {
|
|
125
|
-
const uri = widget.getResourceUri();
|
|
126
|
-
if ((uri === null || uri === void 0 ? void 0 : uri.scheme) && this.timelineService.getSchemas().indexOf(uri === null || uri === void 0 ? void 0 : uri.scheme) > -1) {
|
|
127
|
-
return true;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
getCurrentWidgetUri() {
|
|
133
|
-
let current = this.applicationShell.currentWidget;
|
|
134
|
-
if (!browser_1.NavigatableWidget.is(current)) {
|
|
135
|
-
current = (0, algorithm_1.toArray)(this.applicationShell.mainPanel.widgets()).find(widget => {
|
|
136
|
-
if (widget.isVisible && !widget.isHidden) {
|
|
137
|
-
return widget;
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
return browser_1.NavigatableWidget.is(current) ? current.getResourceUri() : undefined;
|
|
142
|
-
}
|
|
143
|
-
get containerLayout() {
|
|
144
|
-
return this.panel.layout;
|
|
145
|
-
}
|
|
146
|
-
onUpdateRequest(msg) {
|
|
147
|
-
browser_1.MessageLoop.sendMessage(this.resourceWidget, msg);
|
|
148
|
-
browser_1.MessageLoop.sendMessage(this.timelineEmptyWidget, msg);
|
|
149
|
-
this.refresh();
|
|
150
|
-
super.onUpdateRequest(msg);
|
|
151
|
-
}
|
|
152
|
-
onAfterAttach(msg) {
|
|
153
|
-
this.node.appendChild(this.resourceWidget.node);
|
|
154
|
-
this.node.appendChild(this.timelineEmptyWidget.node);
|
|
155
|
-
super.onAfterAttach(msg);
|
|
156
|
-
this.update();
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
TimelineWidget.ID = 'timeline-view';
|
|
160
|
-
__decorate([
|
|
161
|
-
(0, inversify_1.inject)(timeline_tree_widget_1.TimelineTreeWidget),
|
|
162
|
-
__metadata("design:type", timeline_tree_widget_1.TimelineTreeWidget)
|
|
163
|
-
], TimelineWidget.prototype, "resourceWidget", void 0);
|
|
164
|
-
__decorate([
|
|
165
|
-
(0, inversify_1.inject)(timeline_service_1.TimelineService),
|
|
166
|
-
__metadata("design:type", timeline_service_1.TimelineService)
|
|
167
|
-
], TimelineWidget.prototype, "timelineService", void 0);
|
|
168
|
-
__decorate([
|
|
169
|
-
(0, inversify_1.inject)(common_1.CommandRegistry),
|
|
170
|
-
__metadata("design:type", common_1.CommandRegistry)
|
|
171
|
-
], TimelineWidget.prototype, "commandRegistry", void 0);
|
|
172
|
-
__decorate([
|
|
173
|
-
(0, inversify_1.inject)(browser_1.ApplicationShell),
|
|
174
|
-
__metadata("design:type", browser_1.ApplicationShell)
|
|
175
|
-
], TimelineWidget.prototype, "applicationShell", void 0);
|
|
176
|
-
__decorate([
|
|
177
|
-
(0, inversify_1.inject)(timeline_empty_widget_1.TimelineEmptyWidget),
|
|
178
|
-
__metadata("design:type", timeline_empty_widget_1.TimelineEmptyWidget)
|
|
179
|
-
], TimelineWidget.prototype, "timelineEmptyWidget", void 0);
|
|
180
|
-
__decorate([
|
|
181
|
-
(0, inversify_1.inject)(common_1.SelectionService),
|
|
182
|
-
__metadata("design:type", common_1.SelectionService)
|
|
183
|
-
], TimelineWidget.prototype, "selectionService", void 0);
|
|
184
|
-
__decorate([
|
|
185
|
-
(0, inversify_1.postConstruct)(),
|
|
186
|
-
__metadata("design:type", Function),
|
|
187
|
-
__metadata("design:paramtypes", []),
|
|
188
|
-
__metadata("design:returntype", void 0)
|
|
189
|
-
], TimelineWidget.prototype, "init", null);
|
|
190
|
-
TimelineWidget = TimelineWidget_1 = __decorate([
|
|
191
|
-
(0, inversify_1.injectable)(),
|
|
192
|
-
__metadata("design:paramtypes", [])
|
|
193
|
-
], TimelineWidget);
|
|
194
|
-
exports.TimelineWidget = TimelineWidget;
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2020 RedHat 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 TimelineWidget_1;
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.TimelineWidget = void 0;
|
|
29
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
30
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
31
|
+
const timeline_tree_widget_1 = require("./timeline-tree-widget");
|
|
32
|
+
const timeline_service_1 = require("./timeline-service");
|
|
33
|
+
const common_1 = require("@theia/core/lib/common");
|
|
34
|
+
const timeline_empty_widget_1 = require("./timeline-empty-widget");
|
|
35
|
+
const algorithm_1 = require("@theia/core/shared/@phosphor/algorithm");
|
|
36
|
+
const vscode_uri_1 = require("@theia/core/shared/vscode-uri");
|
|
37
|
+
const nls_1 = require("@theia/core/lib/common/nls");
|
|
38
|
+
let TimelineWidget = TimelineWidget_1 = class TimelineWidget extends browser_1.BaseWidget {
|
|
39
|
+
constructor() {
|
|
40
|
+
super();
|
|
41
|
+
this.timelinesBySource = new Map();
|
|
42
|
+
this.id = TimelineWidget_1.ID;
|
|
43
|
+
this.title.label = nls_1.nls.localizeByDefault('Timeline');
|
|
44
|
+
this.title.caption = this.title.label;
|
|
45
|
+
this.addClass('theia-timeline');
|
|
46
|
+
}
|
|
47
|
+
init() {
|
|
48
|
+
const layout = new browser_1.PanelLayout();
|
|
49
|
+
this.layout = layout;
|
|
50
|
+
this.panel = new browser_1.Panel({ layout: new browser_1.PanelLayout({}) });
|
|
51
|
+
this.panel.node.tabIndex = -1;
|
|
52
|
+
layout.addWidget(this.panel);
|
|
53
|
+
this.containerLayout.addWidget(this.resourceWidget);
|
|
54
|
+
this.containerLayout.addWidget(this.timelineEmptyWidget);
|
|
55
|
+
this.refresh();
|
|
56
|
+
this.toDispose.push(this.timelineService.onDidChangeTimeline(event => {
|
|
57
|
+
const currentWidgetUri = this.getCurrentWidgetUri();
|
|
58
|
+
if (currentWidgetUri) {
|
|
59
|
+
this.loadTimeline(currentWidgetUri, event.reset);
|
|
60
|
+
}
|
|
61
|
+
}));
|
|
62
|
+
this.toDispose.push(this.selectionService.onSelectionChanged(selection => {
|
|
63
|
+
if (Array.isArray(selection) && !!selection[0] && 'uri' in selection[0]) {
|
|
64
|
+
this.refresh(selection[0].uri);
|
|
65
|
+
}
|
|
66
|
+
}));
|
|
67
|
+
this.toDispose.push(this.applicationShell.onDidChangeCurrentWidget(async (e) => {
|
|
68
|
+
if ((e.newValue && browser_1.Navigatable.is(e.newValue)) || !this.suitableWidgetsOpened()) {
|
|
69
|
+
this.refresh();
|
|
70
|
+
}
|
|
71
|
+
}));
|
|
72
|
+
this.toDispose.push(this.applicationShell.onDidRemoveWidget(widget => {
|
|
73
|
+
if (browser_1.NavigatableWidget.is(widget)) {
|
|
74
|
+
this.refresh();
|
|
75
|
+
}
|
|
76
|
+
}));
|
|
77
|
+
this.toDispose.push(this.timelineService.onDidChangeProviders(() => this.refresh()));
|
|
78
|
+
}
|
|
79
|
+
async loadTimelineForSource(source, uri, reset) {
|
|
80
|
+
var _a;
|
|
81
|
+
if (reset) {
|
|
82
|
+
this.timelinesBySource.delete(source);
|
|
83
|
+
}
|
|
84
|
+
let timeline = this.timelinesBySource.get(source);
|
|
85
|
+
const cursor = timeline === null || timeline === void 0 ? void 0 : timeline.cursor;
|
|
86
|
+
const options = { cursor: reset ? undefined : cursor, limit: timeline_tree_widget_1.TimelineTreeWidget.PAGE_SIZE };
|
|
87
|
+
const timelineResult = await this.timelineService.getTimeline(source, uri, options, { cacheResults: true, resetCache: reset });
|
|
88
|
+
if (timelineResult) {
|
|
89
|
+
const items = timelineResult.items;
|
|
90
|
+
if (items) {
|
|
91
|
+
if (timeline) {
|
|
92
|
+
timeline.add(items);
|
|
93
|
+
timeline.cursor = (_a = timelineResult.paging) === null || _a === void 0 ? void 0 : _a.cursor;
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
timeline = new timeline_service_1.TimelineAggregate(timelineResult);
|
|
97
|
+
}
|
|
98
|
+
this.timelinesBySource.set(source, timeline);
|
|
99
|
+
this.resourceWidget.model.updateTree(timeline.items, !!timeline.cursor);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
async loadTimeline(uri, reset) {
|
|
104
|
+
for (const source of this.timelineService.getSources().map(s => s.id)) {
|
|
105
|
+
this.loadTimelineForSource(source, vscode_uri_1.URI.parse(uri.toString()), reset);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
refresh(uri) {
|
|
109
|
+
if (!uri) {
|
|
110
|
+
uri = this.getCurrentWidgetUri();
|
|
111
|
+
}
|
|
112
|
+
if (uri) {
|
|
113
|
+
this.timelineEmptyWidget.hide();
|
|
114
|
+
this.resourceWidget.show();
|
|
115
|
+
this.loadTimeline(uri, true);
|
|
116
|
+
}
|
|
117
|
+
else if (!this.suitableWidgetsOpened()) {
|
|
118
|
+
this.timelineEmptyWidget.show();
|
|
119
|
+
this.resourceWidget.hide();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
suitableWidgetsOpened() {
|
|
123
|
+
return !!(0, algorithm_1.toArray)(this.applicationShell.mainPanel.widgets()).find(widget => {
|
|
124
|
+
if (browser_1.NavigatableWidget.is(widget)) {
|
|
125
|
+
const uri = widget.getResourceUri();
|
|
126
|
+
if ((uri === null || uri === void 0 ? void 0 : uri.scheme) && this.timelineService.getSchemas().indexOf(uri === null || uri === void 0 ? void 0 : uri.scheme) > -1) {
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
getCurrentWidgetUri() {
|
|
133
|
+
let current = this.applicationShell.currentWidget;
|
|
134
|
+
if (!browser_1.NavigatableWidget.is(current)) {
|
|
135
|
+
current = (0, algorithm_1.toArray)(this.applicationShell.mainPanel.widgets()).find(widget => {
|
|
136
|
+
if (widget.isVisible && !widget.isHidden) {
|
|
137
|
+
return widget;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
return browser_1.NavigatableWidget.is(current) ? current.getResourceUri() : undefined;
|
|
142
|
+
}
|
|
143
|
+
get containerLayout() {
|
|
144
|
+
return this.panel.layout;
|
|
145
|
+
}
|
|
146
|
+
onUpdateRequest(msg) {
|
|
147
|
+
browser_1.MessageLoop.sendMessage(this.resourceWidget, msg);
|
|
148
|
+
browser_1.MessageLoop.sendMessage(this.timelineEmptyWidget, msg);
|
|
149
|
+
this.refresh();
|
|
150
|
+
super.onUpdateRequest(msg);
|
|
151
|
+
}
|
|
152
|
+
onAfterAttach(msg) {
|
|
153
|
+
this.node.appendChild(this.resourceWidget.node);
|
|
154
|
+
this.node.appendChild(this.timelineEmptyWidget.node);
|
|
155
|
+
super.onAfterAttach(msg);
|
|
156
|
+
this.update();
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
TimelineWidget.ID = 'timeline-view';
|
|
160
|
+
__decorate([
|
|
161
|
+
(0, inversify_1.inject)(timeline_tree_widget_1.TimelineTreeWidget),
|
|
162
|
+
__metadata("design:type", timeline_tree_widget_1.TimelineTreeWidget)
|
|
163
|
+
], TimelineWidget.prototype, "resourceWidget", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
(0, inversify_1.inject)(timeline_service_1.TimelineService),
|
|
166
|
+
__metadata("design:type", timeline_service_1.TimelineService)
|
|
167
|
+
], TimelineWidget.prototype, "timelineService", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, inversify_1.inject)(common_1.CommandRegistry),
|
|
170
|
+
__metadata("design:type", common_1.CommandRegistry)
|
|
171
|
+
], TimelineWidget.prototype, "commandRegistry", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
(0, inversify_1.inject)(browser_1.ApplicationShell),
|
|
174
|
+
__metadata("design:type", browser_1.ApplicationShell)
|
|
175
|
+
], TimelineWidget.prototype, "applicationShell", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
(0, inversify_1.inject)(timeline_empty_widget_1.TimelineEmptyWidget),
|
|
178
|
+
__metadata("design:type", timeline_empty_widget_1.TimelineEmptyWidget)
|
|
179
|
+
], TimelineWidget.prototype, "timelineEmptyWidget", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
(0, inversify_1.inject)(common_1.SelectionService),
|
|
182
|
+
__metadata("design:type", common_1.SelectionService)
|
|
183
|
+
], TimelineWidget.prototype, "selectionService", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
(0, inversify_1.postConstruct)(),
|
|
186
|
+
__metadata("design:type", Function),
|
|
187
|
+
__metadata("design:paramtypes", []),
|
|
188
|
+
__metadata("design:returntype", void 0)
|
|
189
|
+
], TimelineWidget.prototype, "init", null);
|
|
190
|
+
TimelineWidget = TimelineWidget_1 = __decorate([
|
|
191
|
+
(0, inversify_1.injectable)(),
|
|
192
|
+
__metadata("design:paramtypes", [])
|
|
193
|
+
], TimelineWidget);
|
|
194
|
+
exports.TimelineWidget = TimelineWidget;
|
|
195
195
|
//# sourceMappingURL=timeline-widget.js.map
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { Command, Disposable, Event } from '@theia/core/lib/common';
|
|
2
|
-
import { URI } from '@theia/core/shared/vscode-uri';
|
|
3
|
-
export interface TimelineItem {
|
|
4
|
-
source: string;
|
|
5
|
-
uri: string;
|
|
6
|
-
handle: string;
|
|
7
|
-
timestamp: number;
|
|
8
|
-
label: string;
|
|
9
|
-
id?: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
detail?: string;
|
|
12
|
-
command?: Command & {
|
|
13
|
-
arguments?: unknown[];
|
|
14
|
-
};
|
|
15
|
-
contextValue?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface TimelineChangeEvent {
|
|
18
|
-
id: string;
|
|
19
|
-
uri: URI | undefined;
|
|
20
|
-
reset: boolean;
|
|
21
|
-
}
|
|
22
|
-
export interface TimelineProvidersChangeEvent {
|
|
23
|
-
readonly added?: string[];
|
|
24
|
-
readonly removed?: string[];
|
|
25
|
-
}
|
|
26
|
-
export interface TimelineOptions {
|
|
27
|
-
cursor?: string;
|
|
28
|
-
limit?: number | {
|
|
29
|
-
timestamp: number;
|
|
30
|
-
id?: string;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
export interface InternalTimelineOptions {
|
|
34
|
-
cacheResults: boolean;
|
|
35
|
-
resetCache: boolean;
|
|
36
|
-
}
|
|
37
|
-
export interface Timeline {
|
|
38
|
-
source: string;
|
|
39
|
-
paging?: {
|
|
40
|
-
readonly cursor: string | undefined;
|
|
41
|
-
};
|
|
42
|
-
items: TimelineItem[];
|
|
43
|
-
}
|
|
44
|
-
export interface TimelineProviderDescriptor {
|
|
45
|
-
id: string;
|
|
46
|
-
label: string;
|
|
47
|
-
scheme: string | string[];
|
|
48
|
-
}
|
|
49
|
-
export interface TimelineProvider extends TimelineProviderDescriptor, Disposable {
|
|
50
|
-
onDidChange?: Event<TimelineChangeEvent>;
|
|
51
|
-
provideTimeline(uri: URI, options: TimelineOptions, internalOptions?: InternalTimelineOptions): Promise<Timeline | undefined>;
|
|
52
|
-
}
|
|
53
|
-
export interface TimelineSource {
|
|
54
|
-
id: string;
|
|
55
|
-
label: string;
|
|
56
|
-
}
|
|
1
|
+
import { Command, Disposable, Event } from '@theia/core/lib/common';
|
|
2
|
+
import { URI } from '@theia/core/shared/vscode-uri';
|
|
3
|
+
export interface TimelineItem {
|
|
4
|
+
source: string;
|
|
5
|
+
uri: string;
|
|
6
|
+
handle: string;
|
|
7
|
+
timestamp: number;
|
|
8
|
+
label: string;
|
|
9
|
+
id?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
detail?: string;
|
|
12
|
+
command?: Command & {
|
|
13
|
+
arguments?: unknown[];
|
|
14
|
+
};
|
|
15
|
+
contextValue?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface TimelineChangeEvent {
|
|
18
|
+
id: string;
|
|
19
|
+
uri: URI | undefined;
|
|
20
|
+
reset: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface TimelineProvidersChangeEvent {
|
|
23
|
+
readonly added?: string[];
|
|
24
|
+
readonly removed?: string[];
|
|
25
|
+
}
|
|
26
|
+
export interface TimelineOptions {
|
|
27
|
+
cursor?: string;
|
|
28
|
+
limit?: number | {
|
|
29
|
+
timestamp: number;
|
|
30
|
+
id?: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface InternalTimelineOptions {
|
|
34
|
+
cacheResults: boolean;
|
|
35
|
+
resetCache: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface Timeline {
|
|
38
|
+
source: string;
|
|
39
|
+
paging?: {
|
|
40
|
+
readonly cursor: string | undefined;
|
|
41
|
+
};
|
|
42
|
+
items: TimelineItem[];
|
|
43
|
+
}
|
|
44
|
+
export interface TimelineProviderDescriptor {
|
|
45
|
+
id: string;
|
|
46
|
+
label: string;
|
|
47
|
+
scheme: string | string[];
|
|
48
|
+
}
|
|
49
|
+
export interface TimelineProvider extends TimelineProviderDescriptor, Disposable {
|
|
50
|
+
onDidChange?: Event<TimelineChangeEvent>;
|
|
51
|
+
provideTimeline(uri: URI, options: TimelineOptions, internalOptions?: InternalTimelineOptions): Promise<Timeline | undefined>;
|
|
52
|
+
}
|
|
53
|
+
export interface TimelineSource {
|
|
54
|
+
id: string;
|
|
55
|
+
label: string;
|
|
56
|
+
}
|
|
57
57
|
//# sourceMappingURL=timeline-model.d.ts.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2020 RedHat 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 });
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2020 RedHat 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
18
|
//# sourceMappingURL=timeline-model.js.map
|
package/lib/package.spec.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2019 TypeFox 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
|
-
/* note: this bogus test file is required so that
|
|
17
|
-
we are able to run mocha unit tests on this
|
|
18
|
-
package, without having any actual unit tests in it.
|
|
19
|
-
This way a coverage report will be generated,
|
|
20
|
-
showing 0% coverage, instead of no report.
|
|
21
|
-
This file can be removed once we have real unit
|
|
22
|
-
tests in place. */
|
|
23
|
-
describe('timeline package', () => {
|
|
24
|
-
it('support code coverage statistics', () => true);
|
|
25
|
-
});
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2019 TypeFox 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
|
+
/* note: this bogus test file is required so that
|
|
17
|
+
we are able to run mocha unit tests on this
|
|
18
|
+
package, without having any actual unit tests in it.
|
|
19
|
+
This way a coverage report will be generated,
|
|
20
|
+
showing 0% coverage, instead of no report.
|
|
21
|
+
This file can be removed once we have real unit
|
|
22
|
+
tests in place. */
|
|
23
|
+
describe('timeline package', () => {
|
|
24
|
+
it('support code coverage statistics', () => true);
|
|
25
|
+
});
|
|
26
26
|
//# sourceMappingURL=package.spec.js.map
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/timeline",
|
|
3
|
-
"version": "1.34.
|
|
3
|
+
"version": "1.34.4",
|
|
4
4
|
"description": "Theia - Timeline Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.34.
|
|
7
|
-
"@theia/navigator": "1.34.
|
|
6
|
+
"@theia/core": "1.34.4",
|
|
7
|
+
"@theia/navigator": "1.34.4"
|
|
8
8
|
},
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"watch": "theiaext watch"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@theia/ext-scripts": "1.34.
|
|
42
|
+
"@theia/ext-scripts": "1.34.4"
|
|
43
43
|
},
|
|
44
44
|
"nyc": {
|
|
45
45
|
"extends": "../../configs/nyc.json"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "aa496bdc8cefaa76fe123cd0b233d816246d58a8"
|
|
48
48
|
}
|