@theia/messages 1.53.0-next.55 → 1.53.0-next.64

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 CHANGED
@@ -1,30 +1,30 @@
1
- <div align='center'>
2
-
3
- <br />
4
-
5
- <img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
6
-
7
- <h2>ECLIPSE THEIA - MESSAGES EXTENSION</h2>
8
-
9
- <hr />
10
-
11
- </div>
12
-
13
- ## Description
14
-
15
- The `@theia/messages` extension provides the ability to display user notifications in the application.
16
-
17
- ## Additional Information
18
-
19
- - [API documentation for `@theia/messages`](https://eclipse-theia.github.io/theia/docs/next/modules/messages.html)
20
- - [Theia - GitHub](https://github.com/eclipse-theia/theia)
21
- - [Theia - Website](https://theia-ide.org/)
22
-
23
- ## License
24
-
25
- - [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
26
- - [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
27
-
28
- ## Trademark
29
- "Theia" is a trademark of the Eclipse Foundation
30
- https://www.eclipse.org/theia
1
+ <div align='center'>
2
+
3
+ <br />
4
+
5
+ <img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
6
+
7
+ <h2>ECLIPSE THEIA - MESSAGES EXTENSION</h2>
8
+
9
+ <hr />
10
+
11
+ </div>
12
+
13
+ ## Description
14
+
15
+ The `@theia/messages` extension provides the ability to display user notifications in the application.
16
+
17
+ ## Additional Information
18
+
19
+ - [API documentation for `@theia/messages`](https://eclipse-theia.github.io/theia/docs/next/modules/messages.html)
20
+ - [Theia - GitHub](https://github.com/eclipse-theia/theia)
21
+ - [Theia - Website](https://theia-ide.org/)
22
+
23
+ ## License
24
+
25
+ - [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
26
+ - [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
27
+
28
+ ## Trademark
29
+ "Theia" is a trademark of the Eclipse Foundation
30
+ https://www.eclipse.org/theia
@@ -160,27 +160,27 @@ let NotificationsContribution = class NotificationsContribution {
160
160
  registerThemeStyle(theme, collector) {
161
161
  const notificationsBackground = theme.getColor('notifications.background');
162
162
  if (notificationsBackground) {
163
- collector.addRule(`
164
- .theia-notification-list-item-container {
165
- background-color: ${notificationsBackground};
166
- }
163
+ collector.addRule(`
164
+ .theia-notification-list-item-container {
165
+ background-color: ${notificationsBackground};
166
+ }
167
167
  `);
168
168
  }
169
169
  const notificationHover = theme.getColor('list.hoverBackground');
170
170
  if (notificationHover) {
171
- collector.addRule(`
172
- .theia-notification-list-item:hover:not(:focus) {
173
- background-color: ${notificationHover};
174
- }
171
+ collector.addRule(`
172
+ .theia-notification-list-item:hover:not(:focus) {
173
+ background-color: ${notificationHover};
174
+ }
175
175
  `);
176
176
  }
177
177
  const focusBorder = theme.getColor('focusBorder');
178
178
  if (focusBorder && (0, theme_1.isHighContrast)(theme.type)) {
179
- collector.addRule(`
180
- .theia-notification-list-item:hover:not(:focus) {
181
- outline: 1px dashed ${focusBorder};
182
- outline-offset: -2px;
183
- }
179
+ collector.addRule(`
180
+ .theia-notification-list-item:hover:not(:focus) {
181
+ outline: 1px dashed ${focusBorder};
182
+ outline-offset: -2px;
183
+ }
184
184
  `);
185
185
  }
186
186
  }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@theia/messages",
3
- "version": "1.53.0-next.55+d1a989a68c",
3
+ "version": "1.53.0-next.64+23b351d26",
4
4
  "description": "Theia - Messages Extension",
5
5
  "dependencies": {
6
- "@theia/core": "1.53.0-next.55+d1a989a68c",
6
+ "@theia/core": "1.53.0-next.64+23b351d26",
7
7
  "react-perfect-scrollbar": "^1.5.3",
8
8
  "ts-md5": "^1.2.2",
9
9
  "tslib": "^2.6.2"
@@ -46,5 +46,5 @@
46
46
  "nyc": {
47
47
  "extends": "../../configs/nyc.json"
48
48
  },
49
- "gitHead": "d1a989a68c1b5ec1f9098e9126653c6346844769"
49
+ "gitHead": "23b351d26346a2b5d6aca3ee81fba59c056132f7"
50
50
  }
@@ -1,42 +1,42 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2017 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-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- import '../../src/browser/style/index.css';
18
-
19
- import { ContainerModule } from '@theia/core/shared/inversify';
20
- import { MessageClient } from '@theia/core/lib/common';
21
- import { NotificationManager } from './notifications-manager';
22
- import { bindNotificationPreferences } from './notification-preferences';
23
- import { NotificationsRenderer } from './notifications-renderer';
24
- import { NotificationsContribution } from './notifications-contribution';
25
- import { FrontendApplicationContribution, KeybindingContribution, StylingParticipant } from '@theia/core/lib/browser';
26
- import { CommandContribution } from '@theia/core';
27
- import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution';
28
- import { NotificationContentRenderer } from './notification-content-renderer';
29
-
30
- export default new ContainerModule((bind, unbind, isBound, rebind) => {
31
- bind(NotificationContentRenderer).toSelf().inSingletonScope();
32
- bind(NotificationsRenderer).toSelf().inSingletonScope();
33
- bind(NotificationsContribution).toSelf().inSingletonScope();
34
- bind(FrontendApplicationContribution).toService(NotificationsContribution);
35
- bind(CommandContribution).toService(NotificationsContribution);
36
- bind(KeybindingContribution).toService(NotificationsContribution);
37
- bind(ColorContribution).toService(NotificationsContribution);
38
- bind(StylingParticipant).toService(NotificationsContribution);
39
- bind(NotificationManager).toSelf().inSingletonScope();
40
- rebind(MessageClient).toService(NotificationManager);
41
- bindNotificationPreferences(bind);
42
- });
1
+ // *****************************************************************************
2
+ // Copyright (C) 2017 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-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import '../../src/browser/style/index.css';
18
+
19
+ import { ContainerModule } from '@theia/core/shared/inversify';
20
+ import { MessageClient } from '@theia/core/lib/common';
21
+ import { NotificationManager } from './notifications-manager';
22
+ import { bindNotificationPreferences } from './notification-preferences';
23
+ import { NotificationsRenderer } from './notifications-renderer';
24
+ import { NotificationsContribution } from './notifications-contribution';
25
+ import { FrontendApplicationContribution, KeybindingContribution, StylingParticipant } from '@theia/core/lib/browser';
26
+ import { CommandContribution } from '@theia/core';
27
+ import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution';
28
+ import { NotificationContentRenderer } from './notification-content-renderer';
29
+
30
+ export default new ContainerModule((bind, unbind, isBound, rebind) => {
31
+ bind(NotificationContentRenderer).toSelf().inSingletonScope();
32
+ bind(NotificationsRenderer).toSelf().inSingletonScope();
33
+ bind(NotificationsContribution).toSelf().inSingletonScope();
34
+ bind(FrontendApplicationContribution).toService(NotificationsContribution);
35
+ bind(CommandContribution).toService(NotificationsContribution);
36
+ bind(KeybindingContribution).toService(NotificationsContribution);
37
+ bind(ColorContribution).toService(NotificationsContribution);
38
+ bind(StylingParticipant).toService(NotificationsContribution);
39
+ bind(NotificationManager).toSelf().inSingletonScope();
40
+ rebind(MessageClient).toService(NotificationManager);
41
+ bindNotificationPreferences(bind);
42
+ });
@@ -1,95 +1,95 @@
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-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- import * as React from '@theia/core/shared/react';
18
- import { DisposableCollection } from '@theia/core';
19
- import { NotificationManager, NotificationUpdateEvent } from './notifications-manager';
20
- import { NotificationComponent } from './notification-component';
21
- import { codicon } from '@theia/core/lib/browser';
22
- import { nls } from '@theia/core/lib/common/nls';
23
-
24
- const PerfectScrollbar = require('react-perfect-scrollbar');
25
-
26
- export interface NotificationCenterComponentProps {
27
- readonly manager: NotificationManager;
28
- }
29
-
30
- type NotificationCenterComponentState = Pick<NotificationUpdateEvent, Exclude<keyof NotificationUpdateEvent, 'toasts'>>;
31
-
32
- export class NotificationCenterComponent extends React.Component<NotificationCenterComponentProps, NotificationCenterComponentState> {
33
-
34
- constructor(props: NotificationCenterComponentProps) {
35
- super(props);
36
- this.state = {
37
- notifications: [],
38
- visibilityState: 'hidden'
39
- };
40
- }
41
-
42
- protected readonly toDisposeOnUnmount = new DisposableCollection();
43
-
44
- override async componentDidMount(): Promise<void> {
45
- this.toDisposeOnUnmount.push(
46
- this.props.manager.onUpdated(({ notifications, visibilityState }) => {
47
- this.setState({
48
- notifications: notifications,
49
- visibilityState
50
- });
51
- })
52
- );
53
- }
54
- override componentWillUnmount(): void {
55
- this.toDisposeOnUnmount.dispose();
56
- }
57
-
58
- override render(): React.ReactNode {
59
- const empty = this.state.notifications.length === 0;
60
- const title = empty
61
- ? nls.localizeByDefault('No New Notifications')
62
- : nls.localizeByDefault('Notifications');
63
- return (
64
- <div className={`theia-notifications-container theia-notification-center ${this.state.visibilityState === 'center' ? 'open' : 'closed'}`}>
65
- <div className='theia-notification-center-header'>
66
- <div className='theia-notification-center-header-title'>{title}</div>
67
- <div className='theia-notification-center-header-actions'>
68
- <ul className='theia-notification-actions'>
69
- <li className={codicon('clear-all', true)} title={nls.localizeByDefault('Clear All Notifications')}
70
- onClick={this.onClearAll} />
71
- <li className={codicon('chevron-down', true)} title={nls.localizeByDefault('Hide Notifications')}
72
- onClick={this.onHide} />
73
- </ul>
74
- </div>
75
- </div>
76
- <PerfectScrollbar className='theia-notification-list-scroll-container'>
77
- <div className='theia-notification-list'>
78
- {this.state.notifications.map(notification =>
79
- <NotificationComponent key={notification.messageId} notification={notification} manager={this.props.manager} />
80
- )}
81
- </div>
82
- </PerfectScrollbar>
83
- </div>
84
- );
85
- }
86
-
87
- protected onHide = () => {
88
- this.props.manager.hideCenter();
89
- };
90
-
91
- protected onClearAll = () => {
92
- this.props.manager.clearAll();
93
- };
94
-
95
- }
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-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import * as React from '@theia/core/shared/react';
18
+ import { DisposableCollection } from '@theia/core';
19
+ import { NotificationManager, NotificationUpdateEvent } from './notifications-manager';
20
+ import { NotificationComponent } from './notification-component';
21
+ import { codicon } from '@theia/core/lib/browser';
22
+ import { nls } from '@theia/core/lib/common/nls';
23
+
24
+ const PerfectScrollbar = require('react-perfect-scrollbar');
25
+
26
+ export interface NotificationCenterComponentProps {
27
+ readonly manager: NotificationManager;
28
+ }
29
+
30
+ type NotificationCenterComponentState = Pick<NotificationUpdateEvent, Exclude<keyof NotificationUpdateEvent, 'toasts'>>;
31
+
32
+ export class NotificationCenterComponent extends React.Component<NotificationCenterComponentProps, NotificationCenterComponentState> {
33
+
34
+ constructor(props: NotificationCenterComponentProps) {
35
+ super(props);
36
+ this.state = {
37
+ notifications: [],
38
+ visibilityState: 'hidden'
39
+ };
40
+ }
41
+
42
+ protected readonly toDisposeOnUnmount = new DisposableCollection();
43
+
44
+ override async componentDidMount(): Promise<void> {
45
+ this.toDisposeOnUnmount.push(
46
+ this.props.manager.onUpdated(({ notifications, visibilityState }) => {
47
+ this.setState({
48
+ notifications: notifications,
49
+ visibilityState
50
+ });
51
+ })
52
+ );
53
+ }
54
+ override componentWillUnmount(): void {
55
+ this.toDisposeOnUnmount.dispose();
56
+ }
57
+
58
+ override render(): React.ReactNode {
59
+ const empty = this.state.notifications.length === 0;
60
+ const title = empty
61
+ ? nls.localizeByDefault('No New Notifications')
62
+ : nls.localizeByDefault('Notifications');
63
+ return (
64
+ <div className={`theia-notifications-container theia-notification-center ${this.state.visibilityState === 'center' ? 'open' : 'closed'}`}>
65
+ <div className='theia-notification-center-header'>
66
+ <div className='theia-notification-center-header-title'>{title}</div>
67
+ <div className='theia-notification-center-header-actions'>
68
+ <ul className='theia-notification-actions'>
69
+ <li className={codicon('clear-all', true)} title={nls.localizeByDefault('Clear All Notifications')}
70
+ onClick={this.onClearAll} />
71
+ <li className={codicon('chevron-down', true)} title={nls.localizeByDefault('Hide Notifications')}
72
+ onClick={this.onHide} />
73
+ </ul>
74
+ </div>
75
+ </div>
76
+ <PerfectScrollbar className='theia-notification-list-scroll-container'>
77
+ <div className='theia-notification-list'>
78
+ {this.state.notifications.map(notification =>
79
+ <NotificationComponent key={notification.messageId} notification={notification} manager={this.props.manager} />
80
+ )}
81
+ </div>
82
+ </PerfectScrollbar>
83
+ </div>
84
+ );
85
+ }
86
+
87
+ protected onHide = () => {
88
+ this.props.manager.hideCenter();
89
+ };
90
+
91
+ protected onClearAll = () => {
92
+ this.props.manager.clearAll();
93
+ };
94
+
95
+ }