@opensumi/ide-opened-editor 2.21.6 → 2.21.7-next-1670485458.0

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.
@@ -47,7 +47,7 @@ const EditorTreeNode = ({ item, defaultLeftPadding = 8, leftPadding = 8, onClick
47
47
  }
48
48
  return node.displayName;
49
49
  };
50
- const renderDisplayName = (node) => (react_1.default.createElement("div", { className: (0, classnames_1.default)(opened_editor_node_module_less_1.default.opened_editor_node_segment, opened_editor_node_module_less_1.default.opened_editor_node_display_name) }, getNodeName(node)));
50
+ const renderDisplayName = (node) => (react_1.default.createElement("div", { className: (0, classnames_1.default)(opened_editor_node_module_less_1.default.opened_editor_node_segment, opened_editor_node_module_less_1.default.opened_editor_node_displayname) }, getNodeName(node)));
51
51
  const renderDescription = (node) => {
52
52
  if (opened_editor_node_define_1.EditorFileGroup.is(node)) {
53
53
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"opened-editor-node.js","sourceRoot":"","sources":["../../src/browser/opened-editor-node.tsx"],"names":[],"mappings":";;;;AAAA,oEAA6B;AAC7B,0DAA0B;AAE1B,6DAOkC;AAClC,iEAA2G;AAE3G,uDAA8D;AAE9D,2EAA0E;AAC1E,8GAAsD;AAsB/C,MAAM,cAAc,GAAsC,CAAC,EAChE,IAAI,EACJ,kBAAkB,GAAG,CAAC,EACtB,WAAW,GAAG,CAAC,EACf,OAAO,EACP,aAAa,EACb,QAAQ,EACR,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,WAAW,GACa,EAAE,EAAE;IAC5B,MAAM,UAAU,GAAG,2CAAe,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAEtG,MAAM,WAAW,GAAG,CAAC,EAAoB,EAAE,EAAE;QAC3C,IAAI,QAAQ,KAAK,6BAAY,C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C;SACH;IACH,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,uCAAK,SAAS,EAAE,wCAAM,CAAC,wBAAwB,IAAG,YAAY,EAAE,CAAO,CAAC;IAEtG,OAAO,CACL,uCACE,GAAG,EAAE,IAAI,CAAC,EAAE,EACZ,OAAO,EAAE,WAAW,EACpB,aAAa,EAAE,iBAAiB,EAChC,KAAK,EAAE,cAAc,EAAE,EACvB,SAAS,EAAE,IAAA,oBAAG,EAAC,wCAAM,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,EACrF,KAAK,EAAE,eAAe,aACb,IAAI,CAAC,EAAE;QAEf,eAAe,EAAE;QAClB,uCAAK,SAAS,EAAE,IAAA,oBAAG,EAAC,wCAAM,CAAC,0BAA0B,CAAC;YACnD,UAAU,CAAC,IAAI,CAAC;YACjB,uCAAK,SAAS,EAAE,wCAAM,CAAC,gCAAgC;gBACpD,iBAAiB,CAAC,IAAI,CAAC;gBACvB,iBAAiB,CAAC,IAAI,CAAC,CACpB;YACL,gBAAgB,EAAE,CACf,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AA9LW,QAAA,cAAc,kBA8LzB;AAEW,QAAA,8BAA8B,GAAG,EAAE,CAAC;AACpC,QAAA,yBAAyB,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"opened-editor-node.js","sourceRoot":"","sources":["../../src/browser/opened-editor-node.tsx"],"names":[],"mappings":";;;;AAAA,oEAA6B;AAC7B,0DAA0B;AAE1B,6DAOkC;AAClC,iEAA2G;AAE3G,uDAA8D;AAE9D,2EAA0E;AAC1E,8GAAsD;AAsB/C,MAAM,cAAc,GAAsC,CAAC,EAChE,IAAI,EACJ,kBAAkB,GAAG,CAAC,EACtB,WAAW,GAAG,CAAC,EACf,OAAO,EACP,aAAa,EACb,QAAQ,EACR,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,WAAW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in-right: 6px;
105
105
  display: inline;
106
106
  white-space: pre;
@@ -119,6 +119,7 @@
119
119
  text-overflow: ellipsis;
120
120
  white-space: nowrap;
121
121
  text-align: left;
122
+ color: var(--foreground);
122
123
  }
123
124
 
124
125
  .opened_editor_node_flex_wrap {
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@opensumi/ide-opened-editor",
3
- "version": "2.21.6",
3
+ "version": "2.21.7-next-1670485458.0",
4
4
  "files": [
5
- "lib"
5
+ "lib",
6
+ "src"
6
7
  ],
7
8
  "license": "MIT",
8
9
  "main": "lib/index.js",
@@ -16,17 +17,17 @@
16
17
  "url": "git@github.com:opensumi/core.git"
17
18
  },
18
19
  "devDependencies": {
19
- "@opensumi/ide-components": "2.21.6",
20
- "@opensumi/ide-core-browser": "2.21.6",
21
- "@opensumi/ide-core-common": "2.21.6",
22
- "@opensumi/ide-decoration": "2.21.6",
20
+ "@opensumi/ide-components": "2.21.7-next-1670485458.0",
21
+ "@opensumi/ide-core-browser": "2.21.7-next-1670485458.0",
22
+ "@opensumi/ide-core-common": "2.21.7-next-1670485458.0",
23
+ "@opensumi/ide-decoration": "2.21.7-next-1670485458.0",
23
24
  "@opensumi/ide-dev-tool": "^1.3.1",
24
- "@opensumi/ide-editor": "2.21.6",
25
- "@opensumi/ide-explorer": "2.21.6",
26
- "@opensumi/ide-main-layout": "2.21.6",
27
- "@opensumi/ide-theme": "2.21.6",
28
- "@opensumi/ide-webview": "2.21.6",
29
- "@opensumi/ide-workspace": "2.21.6"
25
+ "@opensumi/ide-editor": "2.21.7-next-1670485458.0",
26
+ "@opensumi/ide-explorer": "2.21.7-next-1670485458.0",
27
+ "@opensumi/ide-main-layout": "2.21.7-next-1670485458.0",
28
+ "@opensumi/ide-theme": "2.21.7-next-1670485458.0",
29
+ "@opensumi/ide-webview": "2.21.7-next-1670485458.0",
30
+ "@opensumi/ide-workspace": "2.21.7-next-1670485458.0"
30
31
  },
31
- "gitHead": "a34917dfa6d851e067a431ad700812e58e8cc8a8"
32
+ "gitHead": "8fb92e1814163b5e8c8c2f99ed1bc2fd68de7bd8"
32
33
  }
@@ -0,0 +1,24 @@
1
+ .opened_editor_container {
2
+ font-size: 12px;
3
+ overflow: hidden;
4
+ }
5
+
6
+ .opened_editor_empty_text {
7
+ display: block;
8
+ line-height: 36px;
9
+ text-align: center;
10
+ width: 100%;
11
+ user-select: none;
12
+ }
13
+
14
+ .dirty_icon {
15
+ &::before {
16
+ content: '';
17
+ display: block;
18
+ width: 8px;
19
+ height: 8px;
20
+ border-radius: 4px;
21
+ margin: 7px 5px;
22
+ background: var(--kt-dirtyDot-foreground);
23
+ }
24
+ }
@@ -0,0 +1,26 @@
1
+ import { Provider, Injectable } from '@opensumi/di';
2
+ import { BrowserModule } from '@opensumi/ide-core-browser';
3
+
4
+ import { OpenedEditorContribution } from './opened-editor.contribution';
5
+ import { OpenedEditorDecorationService } from './services/opened-editor-decoration.service';
6
+ import { OpenedEditorModelService } from './services/opened-editor-model.service';
7
+ import { OpenedEditorService } from './services/opened-editor-tree.service';
8
+
9
+ @Injectable()
10
+ export class OpenedEditorModule extends BrowserModule {
11
+ providers: Provider[] = [
12
+ {
13
+ token: OpenedEditorDecorationService,
14
+ useClass: OpenedEditorDecorationService,
15
+ },
16
+ {
17
+ token: OpenedEditorService,
18
+ useClass: OpenedEditorService,
19
+ },
20
+ {
21
+ token: OpenedEditorModelService,
22
+ useClass: OpenedEditorModelService,
23
+ },
24
+ OpenedEditorContribution,
25
+ ];
26
+ }
@@ -0,0 +1,87 @@
1
+ import { TreeNode, CompositeTreeNode, ITree } from '@opensumi/ide-components';
2
+ import { formatLocalize, URI } from '@opensumi/ide-core-browser';
3
+ import { IEditorGroup, IResource } from '@opensumi/ide-editor';
4
+
5
+ import { OpenedEditorService } from './services/opened-editor-tree.service';
6
+
7
+ export type OpenedEditorData = IEditorGroup | IResource;
8
+
9
+ export class EditorFileRoot extends CompositeTreeNode {
10
+ static is(node: EditorFileGroup | EditorFileRoot): node is EditorFileRoot {
11
+ return !!node && !node.parent;
12
+ }
13
+
14
+ constructor(tree: OpenedEditorService) {
15
+ super(tree as ITree, undefined);
16
+ // 根节点默认展开节点
17
+ }
18
+
19
+ get expanded() {
20
+ return true;
21
+ }
22
+
23
+ dispose() {
24
+ super.dispose();
25
+ }
26
+ }
27
+
28
+ // EditorFileGroup 节点不包含父节点, 同时默认为展开状态
29
+ export class EditorFileGroup extends CompositeTreeNode {
30
+ static isEditorGroup(data: OpenedEditorData): data is IEditorGroup {
31
+ return typeof (data as any).resources !== 'undefined';
32
+ }
33
+
34
+ static is(node: EditorFileGroup | EditorFile): node is EditorFileGroup {
35
+ return !!node && !!(node as EditorFileGroup).group;
36
+ }
37
+
38
+ private groupIndex: number;
39
+
40
+ constructor(tree: OpenedEditorService, public readonly group: IEditorGroup, parent: EditorFileRoot) {
41
+ super(tree as ITree, parent);
42
+ this.groupIndex = this.group.index;
43
+ }
44
+
45
+ get expanded() {
46
+ return true;
47
+ }
48
+
49
+ get name() {
50
+ return formatLocalize('opened.editors.group.title', this.groupIndex + 1);
51
+ }
52
+
53
+ get displayName() {
54
+ return this.name;
55
+ }
56
+
57
+ get tooltip() {
58
+ return this.name;
59
+ }
60
+
61
+ dispose() {
62
+ super.dispose();
63
+ }
64
+ }
65
+
66
+ export class EditorFile extends TreeNode {
67
+ constructor(
68
+ tree: OpenedEditorService,
69
+ public readonly resource: IResource,
70
+ public tooltip: string,
71
+ parent: EditorFileGroup | undefined,
72
+ ) {
73
+ super(tree as ITree, parent, undefined, { name: `${resource.uri.toString()}` });
74
+ }
75
+
76
+ get displayName() {
77
+ return this.resource ? this.resource.name : '';
78
+ }
79
+
80
+ get uri() {
81
+ return this.resource ? this.resource.uri : new URI();
82
+ }
83
+
84
+ dispose() {
85
+ super.dispose();
86
+ }
87
+ }
@@ -0,0 +1,195 @@
1
+ .opened_editor_node {
2
+ height: 22px;
3
+ line-height: 22px;
4
+ display: flex;
5
+ flex-direction: column;
6
+ position: relative;
7
+ cursor: pointer;
8
+
9
+ &:hover {
10
+ color: var(--kt-tree-hoverForeground);
11
+ background: var(--kt-tree-hoverBackground);
12
+ .opened_editor_action_bar {
13
+ display: block;
14
+ }
15
+ &::before {
16
+ display: none !important;
17
+ }
18
+ }
19
+
20
+ &.mod_selected {
21
+ color: var(--kt-tree-inactiveSelectionForeground) !important;
22
+ background: var(--kt-tree-inactiveSelectionBackground);
23
+ .expansion_toggle,
24
+ .opened_editor_node_description {
25
+ color: var(--kt-tree-inactiveSelectionForeground) !important;
26
+ }
27
+ }
28
+
29
+ &.mod_focused {
30
+ outline: 1px solid var(--list-focusOutline);
31
+ outline-offset: -1px;
32
+ color: var(--kt-tree-activeSelectionForeground) !important;
33
+ background: var(--kt-tree-activeSelectionBackground);
34
+ .expansion_toggle,
35
+ .opened_editor_node_description {
36
+ color: var(--kt-tree-activeSelectionForeground) !important;
37
+ }
38
+ }
39
+
40
+ &.mod_actived {
41
+ outline: 1px solid var(--list-focusOutline);
42
+ outline-offset: -1px;
43
+ .expansion_toggle {
44
+ color: var(--kt-tree-activeSelectionForeground) !important;
45
+ }
46
+ }
47
+
48
+ &.mod_dirty {
49
+ &::before {
50
+ content: '';
51
+ display: block;
52
+ width: 8px;
53
+ height: 8px;
54
+ border-radius: 4px;
55
+ margin: 7px 5px;
56
+ background: var(--kt-dirtyDot-foreground);
57
+ position: absolute;
58
+ left: 18px;
59
+ }
60
+ }
61
+ }
62
+
63
+ .opened_editor_node_description {
64
+ display: inline;
65
+ transform: scale(0.96);
66
+ color: var(--descriptionForeground);
67
+ }
68
+
69
+ .opened_editor_node_content {
70
+ position: relative;
71
+ display: flex;
72
+ align-items: center;
73
+ width: 100%;
74
+
75
+ match {
76
+ background-color: var(--editor-findMatchHighlightBackground);
77
+ }
78
+ }
79
+
80
+ .opened_editor_node_status {
81
+ opacity: 0.75;
82
+ text-align: center;
83
+ font-size: 12px;
84
+ padding-right: 0;
85
+ }
86
+
87
+ .opened_editor_node_segment {
88
+ flex-grow: 0;
89
+ white-space: nowrap;
90
+ color: inherit;
91
+ &_grow {
92
+ flex-grow: 1 !important;
93
+ text-align: left;
94
+ z-index: 10;
95
+ padding-right: 5px;
96
+
97
+ &.overflow_visible {
98
+ overflow: visible !important;
99
+ }
100
+ }
101
+ }
102
+
103
+ .opened_editor_node_displayname {
104
+ margin-right: 6px;
105
+ display: inline;
106
+ white-space: pre;
107
+ }
108
+
109
+ .opened_editor_node_description {
110
+ display: inline;
111
+ transform: scale(0.96);
112
+ color: var(--descriptionForeground);
113
+ }
114
+
115
+ .opened_editor_node_overflow_wrap {
116
+ flex: 1;
117
+ flex-shrink: 0;
118
+ overflow: hidden;
119
+ text-overflow: ellipsis;
120
+ white-space: nowrap;
121
+ text-align: left;
122
+ color: var(--foreground);
123
+ }
124
+
125
+ .opened_editor_node_flex_wrap {
126
+ display: flex;
127
+ flex-direction: row;
128
+ }
129
+
130
+ .opened_editor_node_segment_grow {
131
+ flex-grow: 1 !important;
132
+ text-align: left;
133
+ z-index: 10;
134
+ padding-right: 5px;
135
+
136
+ &.overflow_visible {
137
+ overflow: visible !important;
138
+ }
139
+ }
140
+
141
+ .file_icon {
142
+ position: relative;
143
+ color: var(--icon-foreground);
144
+ margin-right: 4px;
145
+ &:before {
146
+ font-size: 16px;
147
+ text-align: center;
148
+ }
149
+ }
150
+
151
+ .file_icon:global(&.fileIcon:before) {
152
+ font-size: 18px;
153
+ }
154
+
155
+ .opened_editor_node_tail {
156
+ text-align: center;
157
+ margin-right: 10px;
158
+ position: relative;
159
+ height: 22px;
160
+ display: flex;
161
+ align-items: center;
162
+ }
163
+
164
+ .opened_editor_action_bar {
165
+ position: absolute;
166
+ top: 0;
167
+ left: 0;
168
+ width: 100%;
169
+ display: flex;
170
+ display: none;
171
+ z-index: 10;
172
+ .action_icon {
173
+ margin-left: 6px;
174
+ font-size: 14px;
175
+ }
176
+ }
177
+
178
+ .opened_editor_left_actions {
179
+ position: absolute;
180
+ left: 14px;
181
+ }
182
+
183
+ .opened_editor_right_actions {
184
+ right: 0;
185
+ position: absolute;
186
+ margin-right: 10px;
187
+ }
188
+
189
+ .opened_editor_left_actions,
190
+ .opened_editor_right_actions {
191
+ display: flex;
192
+ align-items: center;
193
+ justify-content: center;
194
+ height: 22px;
195
+ }
@@ -0,0 +1,232 @@
1
+ import cls from 'classnames';
2
+ import React from 'react';
3
+
4
+ import {
5
+ TreeNode,
6
+ CompositeTreeNode,
7
+ INodeRendererProps,
8
+ ClasslistComposite,
9
+ TreeNodeType,
10
+ Button,
11
+ } from '@opensumi/ide-components';
12
+ import { URI, OPEN_EDITORS_COMMANDS, localize, getIcon, CommandService } from '@opensumi/ide-core-browser';
13
+ import { LabelService } from '@opensumi/ide-core-browser/lib/services';
14
+ import { EDITOR_WEBVIEW_SCHEME } from '@opensumi/ide-webview';
15
+
16
+ import { EditorFileGroup, EditorFile } from './opened-editor-node.define';
17
+ import styles from './opened-editor-node.module.less';
18
+ import { OpenedEditorDecorationService } from './services/opened-editor-decoration.service';
19
+
20
+ export interface IEditorNodeProps {
21
+ item: any;
22
+ defaultLeftPadding?: number;
23
+ leftPadding?: number;
24
+ decorationService: OpenedEditorDecorationService;
25
+ commandService: CommandService;
26
+ labelService: LabelService;
27
+ decorations?: ClasslistComposite;
28
+ onClick: (ev: React.MouseEvent, item: TreeNode | CompositeTreeNode, type: TreeNodeType, activeUri?: URI) => void;
29
+ onContextMenu: (
30
+ ev: React.MouseEvent,
31
+ item: TreeNode | CompositeTreeNode,
32
+ type: TreeNodeType,
33
+ activeUri?: URI,
34
+ ) => void;
35
+ }
36
+
37
+ export type EditorNodeRenderedProps = IEditorNodeProps & INodeRendererProps;
38
+
39
+ export const EditorTreeNode: React.FC<EditorNodeRenderedProps> = ({
40
+ item,
41
+ defaultLeftPadding = 8,
42
+ leftPadding = 8,
43
+ onClick,
44
+ onContextMenu,
45
+ itemType,
46
+ decorationService,
47
+ labelService,
48
+ commandService,
49
+ decorations,
50
+ }: EditorNodeRenderedProps) => {
51
+ const decoration = EditorFileGroup.is(item) ? null : decorationService.getDecoration(item.uri, false);
52
+
53
+ const handleClick = (ev: React.MouseEvent) => {
54
+ if (itemType === TreeNodeType.TreeNode || itemType === TreeNodeType.CompositeTreeNode) {
55
+ onClick(ev, item as EditorFile, itemType);
56
+ }
57
+ };
58
+
59
+ const handleContextMenu = (ev: React.MouseEvent) => {
60
+ if (ev.nativeEvent.which === 0) {
61
+ return;
62
+ }
63
+ if (itemType === TreeNodeType.TreeNode || itemType === TreeNodeType.CompositeTreeNode) {
64
+ onContextMenu(ev, item as TreeNode, itemType);
65
+ }
66
+ };
67
+
68
+ const paddingLeft = `${
69
+ defaultLeftPadding + (item.depth || 0) * (leftPadding || 0) + (!EditorFileGroup.is(item) ? 16 : 0)
70
+ }px`;
71
+
72
+ const editorNodeStyle = {
73
+ color: decoration ? decoration.color : '',
74
+ height: OPENED_EDITOR_TREE_NODE_HEIGHT,
75
+ lineHeight: `${OPENED_EDITOR_TREE_NODE_HEIGHT}px`,
76
+ paddingLeft,
77
+ } as React.CSSProperties;
78
+
79
+ const renderIcon = (node: EditorFileGroup | EditorFile) => {
80
+ if (EditorFileGroup.is(node)) {
81
+ return null;
82
+ }
83
+ const iconClass = node.resource.icon || labelService.getIcon((node as EditorFile).uri, { isDirectory: false });
84
+ return (
85
+ <div
86
+ className={cls(styles.file_icon, iconClass)}
87
+ style={{ height: OPENED_EDITOR_TREE_NODE_HEIGHT, lineHeight: `${OPENED_EDITOR_TREE_NODE_HEIGHT}px` }}
88
+ ></div>
89
+ );
90
+ };
91
+
92
+ const getNodeName = (node: EditorFileGroup | EditorFile) => {
93
+ if (!EditorFileGroup.is(node)) {
94
+ if (node.uri.scheme === EDITOR_WEBVIEW_SCHEME) {
95
+ return node.displayName;
96
+ }
97
+
98
+ return node.displayName || labelService.getName(node.uri);
99
+ }
100
+
101
+ return node.displayName;
102
+ };
103
+
104
+ const renderDisplayName = (node: EditorFileGroup | EditorFile) => (
105
+ <div className={cls(styles.opened_editor_node_segment, styles.opened_editor_node_displayname)}>
106
+ {getNodeName(node)}
107
+ </div>
108
+ );
109
+
110
+ const renderDescription = (node: EditorFileGroup | EditorFile) => {
111
+ if (EditorFileGroup.is(node)) {
112
+ return null;
113
+ }
114
+ return (
115
+ <div className={cls(styles.opened_editor_node_segment_grow, styles.opened_editor_node_description)}>
116
+ {node.tooltip}
117
+ </div>
118
+ );
119
+ };
120
+
121
+ const renderStatusTail = () => (
122
+ <div className={cls(styles.opened_editor_node_segment, styles.opened_editor_node_tail)}>{renderBadge()}</div>
123
+ );
124
+
125
+ const renderBadge = () => {
126
+ if (!decoration) {
127
+ return null;
128
+ }
129
+ return <div className={styles.opened_editor_node_status}>{decoration.badge.slice()}</div>;
130
+ };
131
+
132
+ const getItemTooltip = () => {
133
+ let tooltip = item.tooltip;
134
+ if (decoration && decoration.badge) {
135
+ tooltip += ` • ${decoration.tooltip}`;
136
+ }
137
+ return tooltip;
138
+ };
139
+
140
+ const renderAction = () => {
141
+ let actions: any[] = [];
142
+ if (EditorFileGroup.is(item)) {
143
+ actions = [
144
+ {
145
+ icon: getIcon('save-all'),
146
+ title: localize('opened.editors.save.byGroup'),
147
+ command: OPEN_EDITORS_COMMANDS.SAVE_BY_GROUP.id,
148
+ },
149
+ {
150
+ icon: getIcon('clear'),
151
+ title: localize('opened.editors.close.byGroup'),
152
+ command: OPEN_EDITORS_COMMANDS.CLOSE_BY_GROUP.id,
153
+ },
154
+ ];
155
+ return (
156
+ <div className={styles.opened_editor_right_actions}>
157
+ {actions.map((action) => {
158
+ const clickHandler = (event: React.MouseEvent) => {
159
+ event.stopPropagation();
160
+ event.preventDefault();
161
+ commandService.executeCommand(action.command, item);
162
+ };
163
+ return (
164
+ <Button
165
+ type='icon'
166
+ key={`${item.id}-${action.command}`}
167
+ iconClass={cls(styles.action_icon, action.icon)}
168
+ title={action.title}
169
+ onClick={clickHandler}
170
+ />
171
+ );
172
+ })}
173
+ </div>
174
+ );
175
+ } else {
176
+ actions = [
177
+ {
178
+ icon: getIcon('close'),
179
+ title: localize('file.close'),
180
+ command: OPEN_EDITORS_COMMANDS.CLOSE.id,
181
+ },
182
+ ];
183
+ return (
184
+ <div className={styles.opened_editor_left_actions}>
185
+ {actions.map((action) => {
186
+ const clickHandler = (event: React.MouseEvent) => {
187
+ event.stopPropagation();
188
+ event.preventDefault();
189
+ commandService.executeCommand(action.command, item);
190
+ };
191
+ return (
192
+ <Button
193
+ type='icon'
194
+ key={`${item.id}-${action.command}`}
195
+ iconClass={cls(styles.action_icon, action.icon)}
196
+ title={action.title}
197
+ onClick={clickHandler}
198
+ />
199
+ );
200
+ })}
201
+ </div>
202
+ );
203
+ }
204
+ };
205
+
206
+ const renderActionBar = () => <div className={styles.opened_editor_action_bar}>{renderAction()}</div>;
207
+
208
+ return (
209
+ <div
210
+ key={item.id}
211
+ onClick={handleClick}
212
+ onContextMenu={handleContextMenu}
213
+ title={getItemTooltip()}
214
+ className={cls(styles.opened_editor_node, decorations ? decorations.classlist : null)}
215
+ style={editorNodeStyle}
216
+ data-id={item.id}
217
+ >
218
+ {renderActionBar()}
219
+ <div className={cls(styles.opened_editor_node_content)}>
220
+ {renderIcon(item)}
221
+ <div className={styles.opened_editor_node_overflow_wrap}>
222
+ {renderDisplayName(item)}
223
+ {renderDescription(item)}
224
+ </div>
225
+ {renderStatusTail()}
226
+ </div>
227
+ </div>
228
+ );
229
+ };
230
+
231
+ export const OPENED_EDITOR_TREE_NODE_HEIGHT = 22;
232
+ export const OPENED_EDITOR_BADGE_LIMIT = 99;