@opensumi/ide-preferences 2.12.1-next-079c1930
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 +190 -0
- package/lib/browser/abstract-resource-preference-provider.d.ts +51 -0
- package/lib/browser/abstract-resource-preference-provider.d.ts.map +1 -0
- package/lib/browser/abstract-resource-preference-provider.js +281 -0
- package/lib/browser/abstract-resource-preference-provider.js.map +1 -0
- package/lib/browser/folder-preference-provider.d.ts +26 -0
- package/lib/browser/folder-preference-provider.d.ts.map +1 -0
- package/lib/browser/folder-preference-provider.js +49 -0
- package/lib/browser/folder-preference-provider.js.map +1 -0
- package/lib/browser/folders-preferences-provider.d.ts +41 -0
- package/lib/browser/folders-preferences-provider.d.ts.map +1 -0
- package/lib/browser/folders-preferences-provider.js +240 -0
- package/lib/browser/folders-preferences-provider.js.map +1 -0
- package/lib/browser/index.d.ts +12 -0
- package/lib/browser/index.d.ts.map +1 -0
- package/lib/browser/index.js +120 -0
- package/lib/browser/index.js.map +1 -0
- package/lib/browser/index.less +35 -0
- package/lib/browser/preference-contribution.d.ts +51 -0
- package/lib/browser/preference-contribution.d.ts.map +1 -0
- package/lib/browser/preference-contribution.js +315 -0
- package/lib/browser/preference-contribution.js.map +1 -0
- package/lib/browser/preference-settings.service.d.ts +120 -0
- package/lib/browser/preference-settings.service.d.ts.map +1 -0
- package/lib/browser/preference-settings.service.js +492 -0
- package/lib/browser/preference-settings.service.js.map +1 -0
- package/lib/browser/preferenceItem.view.d.ts +20 -0
- package/lib/browser/preferenceItem.view.d.ts.map +1 -0
- package/lib/browser/preferenceItem.view.js +357 -0
- package/lib/browser/preferenceItem.view.js.map +1 -0
- package/lib/browser/preferences.module.less +272 -0
- package/lib/browser/preferences.view.d.ts +29 -0
- package/lib/browser/preferences.view.d.ts.map +1 -0
- package/lib/browser/preferences.view.js +159 -0
- package/lib/browser/preferences.view.js.map +1 -0
- package/lib/browser/user-preference-provider.d.ts +9 -0
- package/lib/browser/user-preference-provider.d.ts.map +1 -0
- package/lib/browser/user-preference-provider.js +23 -0
- package/lib/browser/user-preference-provider.js.map +1 -0
- package/lib/browser/userstorage/index.d.ts +3 -0
- package/lib/browser/userstorage/index.d.ts.map +1 -0
- package/lib/browser/userstorage/index.js +6 -0
- package/lib/browser/userstorage/index.js.map +1 -0
- package/lib/browser/userstorage/user-storage.contribution.d.ts +8 -0
- package/lib/browser/userstorage/user-storage.contribution.d.ts.map +1 -0
- package/lib/browser/userstorage/user-storage.contribution.js +27 -0
- package/lib/browser/userstorage/user-storage.contribution.js.map +1 -0
- package/lib/browser/userstorage/user-storage.service.d.ts +62 -0
- package/lib/browser/userstorage/user-storage.service.d.ts.map +1 -0
- package/lib/browser/userstorage/user-storage.service.js +163 -0
- package/lib/browser/userstorage/user-storage.service.js.map +1 -0
- package/lib/browser/workspace-file-preference-provider.d.ts +19 -0
- package/lib/browser/workspace-file-preference-provider.d.ts.map +1 -0
- package/lib/browser/workspace-file-preference-provider.js +49 -0
- package/lib/browser/workspace-file-preference-provider.js.map +1 -0
- package/lib/browser/workspace-preference-provider.d.ts +34 -0
- package/lib/browser/workspace-preference-provider.d.ts.map +1 -0
- package/lib/browser/workspace-preference-provider.js +109 -0
- package/lib/browser/workspace-preference-provider.js.map +1 -0
- package/lib/common/index.d.ts +5 -0
- package/lib/common/index.d.ts.map +1 -0
- package/lib/common/index.js +8 -0
- package/lib/common/index.js.map +1 -0
- package/lib/common/preference-id.d.ts +8 -0
- package/lib/common/preference-id.d.ts.map +1 -0
- package/lib/common/preference-id.js +12 -0
- package/lib/common/preference-id.js.map +1 -0
- package/lib/common/preference.d.ts +4 -0
- package/lib/common/preference.d.ts.map +1 -0
- package/lib/common/preference.js +21 -0
- package/lib/common/preference.js.map +1 -0
- package/lib/common/types.d.ts +38 -0
- package/lib/common/types.d.ts.map +1 -0
- package/lib/common/types.js +5 -0
- package/lib/common/types.js.map +1 -0
- package/lib/common/user-storage.d.ts +6 -0
- package/lib/common/user-storage.d.ts.map +1 -0
- package/lib/common/user-storage.js +6 -0
- package/lib/common/user-storage.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -0
- package/package.json +29 -0
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NextPreferenceItem = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = (0, tslib_1.__importDefault)(require("react"));
|
|
6
|
+
const ide_core_browser_1 = require("@opensumi/ide-core-browser");
|
|
7
|
+
const preferences_module_less_1 = (0, tslib_1.__importDefault)(require("./preferences.module.less"));
|
|
8
|
+
const classnames_1 = (0, tslib_1.__importDefault)(require("classnames"));
|
|
9
|
+
const ide_components_1 = require("@opensumi/ide-components");
|
|
10
|
+
const select_1 = require("@opensumi/ide-core-browser/lib/components/select");
|
|
11
|
+
const common_1 = require("../common");
|
|
12
|
+
const DESCRIPTION_EXPRESSION_REGEXP = /`#(.+)#`/ig;
|
|
13
|
+
const NONE_SELECT_OPTION = 'none';
|
|
14
|
+
/**
|
|
15
|
+
* 用于展示单个设置项的视图
|
|
16
|
+
* 目前支持类型:
|
|
17
|
+
* string:
|
|
18
|
+
* 含有 enum - 下拉选项框
|
|
19
|
+
* 不含有 enum - 输入框
|
|
20
|
+
* number: 输入框
|
|
21
|
+
* array:
|
|
22
|
+
* 只允许 string类 - 可视化编辑项
|
|
23
|
+
* object:
|
|
24
|
+
* 暂不支持
|
|
25
|
+
*/
|
|
26
|
+
const NextPreferenceItem = ({ preferenceName, localizedName, scope }) => {
|
|
27
|
+
const preferenceService = (0, ide_core_browser_1.useInjectable)(ide_core_browser_1.PreferenceService);
|
|
28
|
+
const settingsService = (0, ide_core_browser_1.useInjectable)(ide_core_browser_1.IPreferenceSettingsService);
|
|
29
|
+
const schemaProvider = (0, ide_core_browser_1.useInjectable)(ide_core_browser_1.PreferenceSchemaProvider);
|
|
30
|
+
const preferenceProvider = preferenceService.getProvider(scope);
|
|
31
|
+
// 获得这个设置项的当前值
|
|
32
|
+
const { value: inherited, effectingScope } = settingsService.getPreference(preferenceName, scope);
|
|
33
|
+
const [value, setValue] = react_1.default.useState(preferenceProvider.get(preferenceName));
|
|
34
|
+
const [schema, setSchema] = react_1.default.useState();
|
|
35
|
+
// 当这个设置项被外部变更时,更新局部值
|
|
36
|
+
react_1.default.useEffect(() => {
|
|
37
|
+
// 获得当前的schema
|
|
38
|
+
const schemas = schemaProvider.getPreferenceProperty(preferenceName);
|
|
39
|
+
setSchema(schemas);
|
|
40
|
+
const disposableCollection = new ide_core_browser_1.DisposableCollection();
|
|
41
|
+
// 监听配置变化
|
|
42
|
+
disposableCollection.push(preferenceProvider.onDidPreferencesChanged((e) => {
|
|
43
|
+
if (e.default && e.default.hasOwnProperty(preferenceName)) {
|
|
44
|
+
if (e.default[preferenceName].scope === scope) {
|
|
45
|
+
const newValue = e.default[preferenceName].newValue;
|
|
46
|
+
setValue(newValue);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}));
|
|
50
|
+
disposableCollection.push(settingsService.onDidEnumLabelsChange(() => {
|
|
51
|
+
const schemas = schemaProvider.getPreferenceProperty(preferenceName);
|
|
52
|
+
setSchema(schemas);
|
|
53
|
+
}));
|
|
54
|
+
return () => {
|
|
55
|
+
disposableCollection.dispose();
|
|
56
|
+
};
|
|
57
|
+
}, []);
|
|
58
|
+
if (!localizedName) {
|
|
59
|
+
localizedName = (0, common_1.toPreferenceReadableName)(preferenceName);
|
|
60
|
+
}
|
|
61
|
+
const renderPreferenceItem = () => {
|
|
62
|
+
let renderSchema = schema;
|
|
63
|
+
if (!renderSchema) {
|
|
64
|
+
// 渲染阶段可能存在还没获取到 schema 的情况
|
|
65
|
+
renderSchema = schemaProvider.getPreferenceProperty(preferenceName);
|
|
66
|
+
}
|
|
67
|
+
if (renderSchema) {
|
|
68
|
+
const props = {
|
|
69
|
+
preferenceName,
|
|
70
|
+
scope,
|
|
71
|
+
effectingScope,
|
|
72
|
+
schema: renderSchema,
|
|
73
|
+
currentValue: value === undefined ? inherited : value,
|
|
74
|
+
localizedName,
|
|
75
|
+
hasValueInScope: value !== undefined,
|
|
76
|
+
};
|
|
77
|
+
switch (renderSchema.type) {
|
|
78
|
+
case 'boolean':
|
|
79
|
+
return react_1.default.createElement(CheckboxPreferenceItem, Object.assign({}, props));
|
|
80
|
+
case 'integer':
|
|
81
|
+
case 'number':
|
|
82
|
+
return react_1.default.createElement(InputPreferenceItem, Object.assign({}, props, { isNumber: true }));
|
|
83
|
+
case 'string':
|
|
84
|
+
if (renderSchema.enum) {
|
|
85
|
+
return react_1.default.createElement(SelectPreferenceItem, Object.assign({}, props));
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
return react_1.default.createElement(InputPreferenceItem, Object.assign({}, props));
|
|
89
|
+
}
|
|
90
|
+
case 'array':
|
|
91
|
+
if (renderSchema.items && renderSchema.items.type === 'string') {
|
|
92
|
+
return react_1.default.createElement(StringArrayPreferenceItem, Object.assign({}, props));
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
return react_1.default.createElement(EditInSettingsJsonPreferenceItem, Object.assign({}, props));
|
|
96
|
+
}
|
|
97
|
+
default:
|
|
98
|
+
return react_1.default.createElement(EditInSettingsJsonPreferenceItem, Object.assign({}, props));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
return react_1.default.createElement("div", { className: (0, classnames_1.default)({
|
|
103
|
+
[preferences_module_less_1.default.preference_item]: true,
|
|
104
|
+
[preferences_module_less_1.default.modified]: value !== undefined,
|
|
105
|
+
}) }, renderPreferenceItem());
|
|
106
|
+
};
|
|
107
|
+
exports.NextPreferenceItem = NextPreferenceItem;
|
|
108
|
+
const renderDescriptionExpression = (des) => {
|
|
109
|
+
const preferenceSettingService = (0, ide_core_browser_1.useInjectable)(ide_core_browser_1.IPreferenceSettingsService);
|
|
110
|
+
const description = (0, ide_core_browser_1.replaceLocalizePlaceholder)(des);
|
|
111
|
+
if (!description) {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
const match = DESCRIPTION_EXPRESSION_REGEXP.exec(description);
|
|
115
|
+
if (!match) {
|
|
116
|
+
return description;
|
|
117
|
+
}
|
|
118
|
+
const { 0: expression, 1: preferenceId, } = match;
|
|
119
|
+
const preference = preferenceSettingService.getSectionByPreferenceId(preferenceId);
|
|
120
|
+
if (preference) {
|
|
121
|
+
const preferenceTitle = (0, ide_core_browser_1.localize)(preference.localized);
|
|
122
|
+
const others = description.split(expression).map((des, index) => react_1.default.createElement("span", { key: `${preferenceId}-${index}` }, des));
|
|
123
|
+
const search = () => {
|
|
124
|
+
preferenceSettingService.search(preferenceTitle);
|
|
125
|
+
};
|
|
126
|
+
const link = react_1.default.createElement("a", { onClick: search, key: preferenceId }, preferenceTitle);
|
|
127
|
+
others.splice(1, 0, link);
|
|
128
|
+
return others;
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
return description;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const SettingStatus = ({ preferenceName, scope, effectingScope, hasValueInScope }) => {
|
|
135
|
+
const settingsService = (0, ide_core_browser_1.useInjectable)(ide_core_browser_1.IPreferenceSettingsService);
|
|
136
|
+
return react_1.default.createElement("span", { className: preferences_module_less_1.default.preference_status },
|
|
137
|
+
effectingScope === ide_core_browser_1.PreferenceScope.Workspace && scope === ide_core_browser_1.PreferenceScope.User ? react_1.default.createElement("span", { className: preferences_module_less_1.default.preference_overwritten }, (0, ide_core_browser_1.localize)('preference.overwrittenInWorkspace')) : undefined,
|
|
138
|
+
effectingScope === ide_core_browser_1.PreferenceScope.User && scope === ide_core_browser_1.PreferenceScope.Workspace ? react_1.default.createElement("span", { className: preferences_module_less_1.default.preference_overwritten }, (0, ide_core_browser_1.localize)('preference.overwrittenInUser')) : undefined,
|
|
139
|
+
hasValueInScope ? react_1.default.createElement("span", { className: (0, classnames_1.default)(preferences_module_less_1.default.preference_reset, (0, ide_core_browser_1.getIcon)('rollback')), onClick: (e) => {
|
|
140
|
+
settingsService.reset(preferenceName, scope);
|
|
141
|
+
} }) : undefined);
|
|
142
|
+
};
|
|
143
|
+
function InputPreferenceItem({ preferenceName, localizedName, currentValue, schema, isNumber, effectingScope, scope, hasValueInScope }) {
|
|
144
|
+
const preferenceService = (0, ide_core_browser_1.useInjectable)(ide_core_browser_1.PreferenceService);
|
|
145
|
+
const schemaProvider = (0, ide_core_browser_1.useInjectable)(ide_core_browser_1.PreferenceSchemaProvider);
|
|
146
|
+
const [value, setValue] = react_1.default.useState();
|
|
147
|
+
react_1.default.useEffect(() => {
|
|
148
|
+
setValue(currentValue);
|
|
149
|
+
}, [currentValue]);
|
|
150
|
+
const handleValueChange = ((value) => {
|
|
151
|
+
if (hasValidateError(value)) {
|
|
152
|
+
// scheme校验失败
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
preferenceService.set(preferenceName, value, scope);
|
|
156
|
+
setValue(value);
|
|
157
|
+
});
|
|
158
|
+
function hasValidateError(value) {
|
|
159
|
+
const res = schemaProvider.validate(preferenceName, value);
|
|
160
|
+
if (res.valid) {
|
|
161
|
+
return undefined;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
return {
|
|
165
|
+
type: 2,
|
|
166
|
+
message: res.reason,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return react_1.default.createElement("div", { className: preferences_module_less_1.default.preference_line },
|
|
171
|
+
react_1.default.createElement("div", { className: preferences_module_less_1.default.key },
|
|
172
|
+
localizedName,
|
|
173
|
+
" ",
|
|
174
|
+
react_1.default.createElement(SettingStatus, { preferenceName: preferenceName, scope: scope, effectingScope: effectingScope, hasValueInScope: hasValueInScope })),
|
|
175
|
+
schema && schema.description && react_1.default.createElement("div", { className: preferences_module_less_1.default.desc }, renderDescriptionExpression(schema.description)),
|
|
176
|
+
react_1.default.createElement("div", { className: preferences_module_less_1.default.control_wrap },
|
|
177
|
+
react_1.default.createElement("div", { className: preferences_module_less_1.default.text_control },
|
|
178
|
+
react_1.default.createElement(ide_components_1.ValidateInput, { type: isNumber ? 'number' : 'text', validate: hasValidateError, onBlur: (event) => {
|
|
179
|
+
const value = isNumber ? event.target.valueAsNumber : event.target.value;
|
|
180
|
+
handleValueChange(value);
|
|
181
|
+
}, value: value }))));
|
|
182
|
+
}
|
|
183
|
+
function CheckboxPreferenceItem({ preferenceName, localizedName, currentValue, schema, effectingScope, scope, hasValueInScope }) {
|
|
184
|
+
const description = schema && schema.description && (0, ide_core_browser_1.replaceLocalizePlaceholder)(schema.description);
|
|
185
|
+
const preferenceService = (0, ide_core_browser_1.useInjectable)(ide_core_browser_1.PreferenceService);
|
|
186
|
+
const [value, setValue] = react_1.default.useState();
|
|
187
|
+
react_1.default.useEffect(() => {
|
|
188
|
+
setValue(currentValue);
|
|
189
|
+
}, [currentValue]);
|
|
190
|
+
const handleValueChange = ((value) => {
|
|
191
|
+
setValue(value);
|
|
192
|
+
preferenceService.set(preferenceName, value, scope);
|
|
193
|
+
});
|
|
194
|
+
return (react_1.default.createElement("div", { className: preferences_module_less_1.default.preference_line },
|
|
195
|
+
react_1.default.createElement("div", { className: (0, classnames_1.default)(preferences_module_less_1.default.check, preferences_module_less_1.default.key) },
|
|
196
|
+
react_1.default.createElement(ide_components_1.CheckBox, { label: localizedName, checked: value, onChange: (event) => {
|
|
197
|
+
handleValueChange(event.target.checked);
|
|
198
|
+
} }),
|
|
199
|
+
react_1.default.createElement(SettingStatus, { preferenceName: preferenceName, scope: scope, effectingScope: effectingScope, hasValueInScope: hasValueInScope })),
|
|
200
|
+
description ?
|
|
201
|
+
react_1.default.createElement("div", null,
|
|
202
|
+
react_1.default.createElement("div", { className: preferences_module_less_1.default.desc }, renderDescriptionExpression(description))) : undefined));
|
|
203
|
+
}
|
|
204
|
+
function SelectPreferenceItem({ preferenceName, localizedName, currentValue, schema, effectingScope, scope, hasValueInScope }) {
|
|
205
|
+
const preferenceService = (0, ide_core_browser_1.useInjectable)(ide_core_browser_1.PreferenceService);
|
|
206
|
+
const settingsService = (0, ide_core_browser_1.useInjectable)(ide_core_browser_1.IPreferenceSettingsService);
|
|
207
|
+
const [value, setValue] = react_1.default.useState();
|
|
208
|
+
const optionEnum = schema.enum;
|
|
209
|
+
react_1.default.useEffect(() => {
|
|
210
|
+
setValue(currentValue);
|
|
211
|
+
}, [currentValue]);
|
|
212
|
+
const handlerValueChange = ((value) => {
|
|
213
|
+
setValue(value);
|
|
214
|
+
preferenceService.set(preferenceName, value, scope);
|
|
215
|
+
});
|
|
216
|
+
// enum 本身为 string[] | number[]
|
|
217
|
+
const labels = settingsService.getEnumLabels(preferenceName);
|
|
218
|
+
const renderEnumOptions = () => {
|
|
219
|
+
return optionEnum === null || optionEnum === void 0 ? void 0 : optionEnum.map((item, idx) => {
|
|
220
|
+
if (typeof item === 'boolean') {
|
|
221
|
+
item = String(item);
|
|
222
|
+
}
|
|
223
|
+
return (0, ide_core_browser_1.isElectronRenderer)() ?
|
|
224
|
+
react_1.default.createElement("option", { value: item, key: `${idx} - ${item}` }, (0, ide_core_browser_1.replaceLocalizePlaceholder)((labels[item] || item).toString())) :
|
|
225
|
+
react_1.default.createElement(ide_components_1.Option, { value: item, label: (0, ide_core_browser_1.replaceLocalizePlaceholder)((labels[item] || item).toString()), key: `${idx} - ${item}` }, (0, ide_core_browser_1.replaceLocalizePlaceholder)((labels[item] || item).toString()));
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
const renderNoneOptions = () => {
|
|
229
|
+
return (0, ide_core_browser_1.isElectronRenderer)() ?
|
|
230
|
+
react_1.default.createElement("option", { value: (0, ide_core_browser_1.localize)('preference.stringArray.none'), key: NONE_SELECT_OPTION, disabled: true }, (0, ide_core_browser_1.localize)('preference.stringArray.none')) :
|
|
231
|
+
react_1.default.createElement(ide_components_1.Option, { value: (0, ide_core_browser_1.localize)('preference.stringArray.none'), key: NONE_SELECT_OPTION, label: (0, ide_core_browser_1.localize)('preference.stringArray.none'), disabled: true }, (0, ide_core_browser_1.localize)('preference.stringArray.none'));
|
|
232
|
+
};
|
|
233
|
+
const options = optionEnum && optionEnum.length > 0 ? renderEnumOptions() : renderNoneOptions();
|
|
234
|
+
return (react_1.default.createElement("div", { className: preferences_module_less_1.default.preference_line },
|
|
235
|
+
react_1.default.createElement("div", { className: preferences_module_less_1.default.key },
|
|
236
|
+
localizedName,
|
|
237
|
+
" ",
|
|
238
|
+
react_1.default.createElement(SettingStatus, { preferenceName: preferenceName, scope: scope, effectingScope: effectingScope, hasValueInScope: hasValueInScope })),
|
|
239
|
+
schema && schema.description && react_1.default.createElement("div", { className: preferences_module_less_1.default.desc }, renderDescriptionExpression(schema.description)),
|
|
240
|
+
react_1.default.createElement("div", { className: preferences_module_less_1.default.control_wrap }, (0, ide_core_browser_1.isElectronRenderer)() ?
|
|
241
|
+
react_1.default.createElement(select_1.Select, { onChange: (event) => {
|
|
242
|
+
handlerValueChange(event.target.value);
|
|
243
|
+
}, className: preferences_module_less_1.default.select_control, value: value }, options) :
|
|
244
|
+
react_1.default.createElement(ide_components_1.Select, { dropdownRenderType: 'absolute', maxHeight: '200', onChange: handlerValueChange, value: value, className: preferences_module_less_1.default.select_control }, options))));
|
|
245
|
+
}
|
|
246
|
+
function EditInSettingsJsonPreferenceItem({ preferenceName, localizedName, schema, effectingScope, scope, hasValueInScope }) {
|
|
247
|
+
const settingsService = (0, ide_core_browser_1.useInjectable)(ide_core_browser_1.IPreferenceSettingsService);
|
|
248
|
+
const editSettingsJson = async () => {
|
|
249
|
+
settingsService.openJSON(scope, preferenceName);
|
|
250
|
+
};
|
|
251
|
+
return (react_1.default.createElement("div", { className: preferences_module_less_1.default.preference_line },
|
|
252
|
+
react_1.default.createElement("div", { className: preferences_module_less_1.default.key },
|
|
253
|
+
localizedName,
|
|
254
|
+
" ",
|
|
255
|
+
react_1.default.createElement(SettingStatus, { preferenceName: preferenceName, scope: scope, effectingScope: effectingScope, hasValueInScope: hasValueInScope })),
|
|
256
|
+
schema && schema.description && react_1.default.createElement("div", { className: preferences_module_less_1.default.desc }, renderDescriptionExpression(schema.description)),
|
|
257
|
+
react_1.default.createElement("div", { className: preferences_module_less_1.default.control_wrap },
|
|
258
|
+
react_1.default.createElement("a", { onClick: editSettingsJson }, (0, ide_core_browser_1.localize)('preference.editSettingsJson')))));
|
|
259
|
+
}
|
|
260
|
+
function StringArrayPreferenceItem({ preferenceName, localizedName, currentValue, schema, effectingScope, scope, hasValueInScope }) {
|
|
261
|
+
const preferenceService = (0, ide_core_browser_1.useInjectable)(ide_core_browser_1.PreferenceService);
|
|
262
|
+
const [value, setValue] = react_1.default.useState([]);
|
|
263
|
+
const [inputValue, setInputValue] = react_1.default.useState();
|
|
264
|
+
const [editValue, setEditValue] = react_1.default.useState();
|
|
265
|
+
const [currentEditIndex, setCurrentEditIndex] = react_1.default.useState(-1);
|
|
266
|
+
react_1.default.useEffect(() => {
|
|
267
|
+
setValue(currentValue || []);
|
|
268
|
+
}, [currentValue]);
|
|
269
|
+
react_1.default.useEffect(() => {
|
|
270
|
+
if (currentEditIndex >= 0) {
|
|
271
|
+
setEditValue(value[currentEditIndex]);
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
setEditValue('');
|
|
275
|
+
}
|
|
276
|
+
}, [currentEditIndex]);
|
|
277
|
+
const handleValueChange = ((value) => {
|
|
278
|
+
setValue(value);
|
|
279
|
+
preferenceService.set(preferenceName, value, scope);
|
|
280
|
+
});
|
|
281
|
+
const addItem = () => {
|
|
282
|
+
if (inputValue) {
|
|
283
|
+
const newValue = value.slice(0);
|
|
284
|
+
if (newValue.indexOf(inputValue) > -1) {
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
newValue.push(inputValue);
|
|
288
|
+
setInputValue('');
|
|
289
|
+
handleValueChange(newValue);
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
const removeItem = (idx) => {
|
|
293
|
+
const newValue = value.slice(0);
|
|
294
|
+
newValue.splice(idx, 1);
|
|
295
|
+
if (newValue.length) {
|
|
296
|
+
handleValueChange(newValue);
|
|
297
|
+
}
|
|
298
|
+
else {
|
|
299
|
+
handleValueChange([]);
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
const editItem = (index) => {
|
|
303
|
+
setCurrentEditIndex(index);
|
|
304
|
+
};
|
|
305
|
+
const handleInputValueChange = (value) => {
|
|
306
|
+
setInputValue(value);
|
|
307
|
+
};
|
|
308
|
+
const items = value.map((item, idx) => {
|
|
309
|
+
if (currentEditIndex >= 0 && currentEditIndex === idx) {
|
|
310
|
+
return react_1.default.createElement("li", { className: preferences_module_less_1.default.array_items, key: `${idx} - ${JSON.stringify(item)}` });
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
return react_1.default.createElement("li", { className: preferences_module_less_1.default.array_items, key: `${idx} - ${JSON.stringify(item)}` },
|
|
314
|
+
react_1.default.createElement("div", { className: preferences_module_less_1.default.array_item }, typeof item === 'string' ? item : JSON.stringify(item)),
|
|
315
|
+
react_1.default.createElement("div", { className: preferences_module_less_1.default.operate },
|
|
316
|
+
react_1.default.createElement(ide_components_1.Button, { type: 'icon', title: (0, ide_core_browser_1.localize)('preference.stringArray.operate.edit'), onClick: () => { editItem(idx); }, className: (0, classnames_1.default)((0, ide_core_browser_1.getIcon)('edit'), preferences_module_less_1.default.array_item) }),
|
|
317
|
+
react_1.default.createElement(ide_components_1.Button, { type: 'icon', title: (0, ide_core_browser_1.localize)('preference.stringArray.operate.delete'), onClick: () => { removeItem(idx); }, className: (0, classnames_1.default)((0, ide_core_browser_1.getIcon)('delete'), preferences_module_less_1.default.array_item) })));
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
const renderEditInput = () => {
|
|
321
|
+
const commit = () => {
|
|
322
|
+
const newValue = value.slice(0);
|
|
323
|
+
if (editValue) {
|
|
324
|
+
newValue[currentEditIndex] = editValue;
|
|
325
|
+
}
|
|
326
|
+
else {
|
|
327
|
+
newValue.splice(currentEditIndex, 1);
|
|
328
|
+
}
|
|
329
|
+
setValue(newValue);
|
|
330
|
+
preferenceService.set(preferenceName, newValue, scope);
|
|
331
|
+
setCurrentEditIndex(-1);
|
|
332
|
+
};
|
|
333
|
+
const handleEditValueChange = (value) => {
|
|
334
|
+
setEditValue(value);
|
|
335
|
+
};
|
|
336
|
+
if (currentEditIndex >= 0) {
|
|
337
|
+
return react_1.default.createElement("div", { className: preferences_module_less_1.default.array_edit_wrapper, style: {
|
|
338
|
+
top: currentEditIndex * 24,
|
|
339
|
+
} },
|
|
340
|
+
react_1.default.createElement(ide_components_1.Input, { type: 'text', className: preferences_module_less_1.default.array_edit_input, value: editValue, onValueChange: handleEditValueChange, onPressEnter: commit, addonAfter: [react_1.default.createElement("div", { className: preferences_module_less_1.default.array_edit_input_tip }, (0, ide_core_browser_1.localize)('preference.stringArray.operate.editTip'))] }));
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
return react_1.default.createElement("div", { className: preferences_module_less_1.default.preference_line },
|
|
344
|
+
react_1.default.createElement("div", { className: preferences_module_less_1.default.key },
|
|
345
|
+
localizedName,
|
|
346
|
+
" ",
|
|
347
|
+
react_1.default.createElement(SettingStatus, { preferenceName: preferenceName, scope: scope, effectingScope: effectingScope, hasValueInScope: hasValueInScope })),
|
|
348
|
+
schema && schema.description && react_1.default.createElement("div", { className: preferences_module_less_1.default.desc }, renderDescriptionExpression(schema.description)),
|
|
349
|
+
react_1.default.createElement("div", { className: preferences_module_less_1.default.control_wrap },
|
|
350
|
+
react_1.default.createElement("ul", { className: preferences_module_less_1.default.array_items_wrapper },
|
|
351
|
+
items,
|
|
352
|
+
renderEditInput()),
|
|
353
|
+
react_1.default.createElement("div", { className: preferences_module_less_1.default.preferences_flex_row },
|
|
354
|
+
react_1.default.createElement(ide_components_1.Input, { type: 'text', className: preferences_module_less_1.default.text_control, value: inputValue, onValueChange: handleInputValueChange }),
|
|
355
|
+
react_1.default.createElement(ide_components_1.Button, { className: preferences_module_less_1.default.add_button, onClick: addItem }, (0, ide_core_browser_1.localize)('preference.array.additem', '添加')))));
|
|
356
|
+
}
|
|
357
|
+
//# sourceMappingURL=preferenceItem.view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preferenceItem.view.js","sourceRoot":"","sources":["../../src/browser/preferenceItem.view.tsx"],"names":[],"mappings":";;;;AAAA,+DAA0B;AAC1B,iEAA0S;AAC1S,qGAA+C;AAC/C,yEAAoC;AACpC,6DAAmH;AAEnH,6EAA0F;AAC1F,sCAAqD;AAYrD,MAAM,6BAA6B,GAAG,YAAY,CAAC;AACnD,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC;;;;;;;;;;;GAWG;AACI,MAAM,kBAAkB,GAAG,CAAC,EAAE,cAAc,EAAE,aAAa,EAAE,KAAK,EAA8E,EAAE,EAAE;IAEzJ,MAAM,iBAAiB,GAAsB,IAAA,gCAAa,EAAC,oCAAiB,CAAC,CAAC;IAC9E,MAAM,eAAe,GAA8B,IAAA,gCAAa,EAAC,6CAA0B,CAAC,CAAC;IAC7F,MAAM,cAAc,GAA6B,IAAA,gCAAa,EAAC,2CAAwB,CAAC,CAAC;IAEzF,MAAM,kBAAkB,GAAuB,iBAAiB,CAAC,WAAW,CAAC,KAAK,CAAE,CAAC;IAErF,cAAc;IACd,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,eAAe,CAAC,aAAa,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAClG,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,eAAK,CAAC,QAAQ,CAA0C,kBAAkB,CAAC,GAAG,CAA8B,cAAc,CAAE,CAAC,CAAC;IACxJ,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,eAAK,CAAC,QAAQ,EAAkB,CAA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9
|
+
font-size:13px;
|
|
10
|
+
padding:20px;
|
|
11
|
+
color: var(--foreground);
|
|
12
|
+
}
|
|
13
|
+
.preferences_header {
|
|
14
|
+
display: flex;
|
|
15
|
+
position: relative;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
align-items: center;
|
|
18
|
+
|
|
19
|
+
height: 40px;
|
|
20
|
+
.search_pref {
|
|
21
|
+
height: 100%;
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
flex-grow:1;
|
|
26
|
+
align-self: flex-end;
|
|
27
|
+
max-width: 400px;
|
|
28
|
+
input {
|
|
29
|
+
width:100%;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
&:after {
|
|
33
|
+
content: '';
|
|
34
|
+
position: absolute;
|
|
35
|
+
bottom:0;
|
|
36
|
+
left:0;
|
|
37
|
+
height:1px;
|
|
38
|
+
width:100%;
|
|
39
|
+
z-index: 0;
|
|
40
|
+
background: var(--editorGroup-border);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.preferences_body {
|
|
45
|
+
height:calc(100% - 40px);
|
|
46
|
+
position: relative;
|
|
47
|
+
padding-left: 155px;
|
|
48
|
+
.preferences_indexes {
|
|
49
|
+
position: absolute;
|
|
50
|
+
width: 155px;
|
|
51
|
+
padding-top: 16px;
|
|
52
|
+
height: 100%;
|
|
53
|
+
left: 0;
|
|
54
|
+
.index_item_wrapper {
|
|
55
|
+
margin-bottom: 2px;
|
|
56
|
+
}
|
|
57
|
+
.index_item {
|
|
58
|
+
height: 26px;
|
|
59
|
+
font-size: 13px;
|
|
60
|
+
line-height: 26px;
|
|
61
|
+
padding-left: 9px;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
white-space: nowrap;
|
|
64
|
+
|
|
65
|
+
> span {
|
|
66
|
+
margin-right:5px;
|
|
67
|
+
display:inline-block;
|
|
68
|
+
font-size: 1em;
|
|
69
|
+
}
|
|
70
|
+
&:hover {
|
|
71
|
+
color: var(--list-hoverForeground);
|
|
72
|
+
background-color: var(--list-hoverBackground);
|
|
73
|
+
}
|
|
74
|
+
&.activated {
|
|
75
|
+
color: var(--list-activeSelectionForeground);
|
|
76
|
+
background: var(--list-activeSelectionBackground);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
.preference_section_link {
|
|
80
|
+
> div {
|
|
81
|
+
padding: 5px 5px 5px 20px;
|
|
82
|
+
padding-left: 25px;
|
|
83
|
+
color: var(--titleBar-inactiveForeground);
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
text-overflow: ellipsis;
|
|
87
|
+
font-size: 13px;
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
&:hover {
|
|
90
|
+
color: var(--list-hoverForeground);
|
|
91
|
+
background-color: var(--list-hoverBackground);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
.preferences_items{
|
|
97
|
+
height:100%;
|
|
98
|
+
user-select: text;
|
|
99
|
+
padding: 16px 0 0 10px;
|
|
100
|
+
}
|
|
101
|
+
.preference_section{
|
|
102
|
+
:global(.kt-checkbox-icon) {
|
|
103
|
+
height: 16px;
|
|
104
|
+
width: 16px;
|
|
105
|
+
}
|
|
106
|
+
:global(.kt-checkbox) {
|
|
107
|
+
font-size: 13px;
|
|
108
|
+
}
|
|
109
|
+
.section_title{
|
|
110
|
+
font-size:14px;
|
|
111
|
+
font-weight:bold;
|
|
112
|
+
padding:10px 15px;
|
|
113
|
+
&:hover {
|
|
114
|
+
color: var(--kt-tree-hoverForeground);
|
|
115
|
+
background: var(--kt-tree-hoverBackground);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
.preference_item{
|
|
119
|
+
padding: 15px 0px 15px 15px;
|
|
120
|
+
border-left: 3px solid transparent;
|
|
121
|
+
&.modified {
|
|
122
|
+
border-left:3px solid var(--settings-modifiedItemIndicator);
|
|
123
|
+
}
|
|
124
|
+
&:hover {
|
|
125
|
+
color: var(--kt-tree-hoverForeground);
|
|
126
|
+
background: var(--kt-tree-hoverBackground);
|
|
127
|
+
}
|
|
128
|
+
&.selected {
|
|
129
|
+
color: var(--kt-tree-inactiveSelectionForeground) !important;
|
|
130
|
+
background: var(--kt-tree-inactiveSelectionBackground);
|
|
131
|
+
}
|
|
132
|
+
&.focused {
|
|
133
|
+
outline: 1px solid var(--list-focusOutline);
|
|
134
|
+
outline-offset: -1px;
|
|
135
|
+
color: var(--kt-tree-activeSelectionForeground) !important;;
|
|
136
|
+
background: var(--kt-tree-activeSelectionBackground);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
.key {
|
|
140
|
+
margin-bottom:5px;
|
|
141
|
+
font-size:13px;
|
|
142
|
+
}
|
|
143
|
+
.check {
|
|
144
|
+
display: flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
> div:first-child {
|
|
147
|
+
margin-right: 2px;
|
|
148
|
+
display: flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
.desc {
|
|
153
|
+
font-size: 13px;
|
|
154
|
+
opacity: 0.75;
|
|
155
|
+
color: var(--descriptionForeground);
|
|
156
|
+
margin-bottom: 5px;
|
|
157
|
+
}
|
|
158
|
+
.control_wrap {
|
|
159
|
+
input[type="number"]::-webkit-outer-spin-button,
|
|
160
|
+
input[type="number"]::-webkit-inner-spin-button {
|
|
161
|
+
-webkit-appearance: none;
|
|
162
|
+
margin: 0;
|
|
163
|
+
}
|
|
164
|
+
.text_control {
|
|
165
|
+
width: 80%;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
.add_button {
|
|
169
|
+
margin-left: 10px;
|
|
170
|
+
padding: 0 8px!important;
|
|
171
|
+
}
|
|
172
|
+
.array_items_wrapper {
|
|
173
|
+
width: 550px;
|
|
174
|
+
padding-left: 0;
|
|
175
|
+
position: relative;
|
|
176
|
+
.array_edit_wrapper {
|
|
177
|
+
position: absolute;
|
|
178
|
+
height: 24px;
|
|
179
|
+
width: 100%;
|
|
180
|
+
top: 0;
|
|
181
|
+
left: 0;
|
|
182
|
+
}
|
|
183
|
+
.array_edit_input {
|
|
184
|
+
height: 24px;
|
|
185
|
+
width: 100%;
|
|
186
|
+
}
|
|
187
|
+
.array_edit_input_tip {
|
|
188
|
+
height: 24px;
|
|
189
|
+
line-height: 24px;
|
|
190
|
+
opacity: .3;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
.array_items {
|
|
194
|
+
list-style: none;
|
|
195
|
+
height: 24px;
|
|
196
|
+
line-height: 24px;
|
|
197
|
+
text-indent: 5px;
|
|
198
|
+
font-size: 12px;
|
|
199
|
+
color: var(--foreground);
|
|
200
|
+
position: relative;
|
|
201
|
+
cursor: pointer;
|
|
202
|
+
.operate {
|
|
203
|
+
display: none;
|
|
204
|
+
position: absolute;
|
|
205
|
+
right: 10px;
|
|
206
|
+
top: 0;
|
|
207
|
+
height: 24px;
|
|
208
|
+
align-items: center;
|
|
209
|
+
justify-content: center;
|
|
210
|
+
}
|
|
211
|
+
&:hover {
|
|
212
|
+
color: var(--list-hoverForeground);
|
|
213
|
+
background-color: var(--list-hoverBackground);
|
|
214
|
+
.operate {
|
|
215
|
+
display: flex;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.array_item {
|
|
221
|
+
display: inline-block;
|
|
222
|
+
}
|
|
223
|
+
.rm_icon {
|
|
224
|
+
cursor: pointer;
|
|
225
|
+
}
|
|
226
|
+
.text_control {
|
|
227
|
+
max-width: 500px;
|
|
228
|
+
width: 100%;
|
|
229
|
+
}
|
|
230
|
+
.select_control {
|
|
231
|
+
max-width: 300px;
|
|
232
|
+
width: 100%;
|
|
233
|
+
}
|
|
234
|
+
.number_control {
|
|
235
|
+
max-width: 300px;
|
|
236
|
+
width: 100%;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
.preferences_flex_row {
|
|
240
|
+
display: flex;
|
|
241
|
+
align-items: center;
|
|
242
|
+
justify-content: start;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.tabs {
|
|
247
|
+
padding: 0 !important;
|
|
248
|
+
font-size: 13px;
|
|
249
|
+
:global {
|
|
250
|
+
.kt-tab {
|
|
251
|
+
padding-left: 10px;
|
|
252
|
+
padding-right: 10px;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.preference_status {
|
|
259
|
+
margin-left: 5px;
|
|
260
|
+
.preference_overwritten {
|
|
261
|
+
font-size:12px;
|
|
262
|
+
opacity: 0.75;
|
|
263
|
+
}
|
|
264
|
+
.preference_reset {
|
|
265
|
+
font-size: 13px;
|
|
266
|
+
cursor: pointer;
|
|
267
|
+
display:inline-block;
|
|
268
|
+
&:hover {
|
|
269
|
+
transform: scale(1.1);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|