@lvce-editor/extension-search-view 6.1.0 → 6.3.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.
|
@@ -231,8 +231,8 @@ const getModuleNotFoundError = stderr => {
|
|
|
231
231
|
const messageIndex = lines.findIndex(isModuleNotFoundMessage);
|
|
232
232
|
const message = lines[messageIndex];
|
|
233
233
|
return {
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
code: ERR_MODULE_NOT_FOUND,
|
|
235
|
+
message
|
|
236
236
|
};
|
|
237
237
|
};
|
|
238
238
|
const isModuleNotFoundError = stderr => {
|
|
@@ -255,14 +255,14 @@ const isUnhelpfulNativeModuleError = stderr => {
|
|
|
255
255
|
const getNativeModuleErrorMessage = stderr => {
|
|
256
256
|
const message = getMessageCodeBlock(stderr);
|
|
257
257
|
return {
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
code: E_INCOMPATIBLE_NATIVE_MODULE,
|
|
259
|
+
message: `Incompatible native node module: ${message}`
|
|
260
260
|
};
|
|
261
261
|
};
|
|
262
262
|
const getModuleSyntaxError = () => {
|
|
263
263
|
return {
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
code: E_MODULES_NOT_SUPPORTED_IN_ELECTRON,
|
|
265
|
+
message: `ES Modules are not supported in electron`
|
|
266
266
|
};
|
|
267
267
|
};
|
|
268
268
|
const getHelpfulChildProcessError = (stdout, stderr) => {
|
|
@@ -281,8 +281,8 @@ const getHelpfulChildProcessError = (stdout, stderr) => {
|
|
|
281
281
|
rest
|
|
282
282
|
} = getDetails(lines);
|
|
283
283
|
return {
|
|
284
|
-
message: actualMessage,
|
|
285
284
|
code: '',
|
|
285
|
+
message: actualMessage,
|
|
286
286
|
stack: rest
|
|
287
287
|
};
|
|
288
288
|
};
|
|
@@ -292,8 +292,8 @@ class IpcError extends VError {
|
|
|
292
292
|
if (stdout || stderr) {
|
|
293
293
|
// @ts-ignore
|
|
294
294
|
const {
|
|
295
|
-
message,
|
|
296
295
|
code,
|
|
296
|
+
message,
|
|
297
297
|
stack
|
|
298
298
|
} = getHelpfulChildProcessError(stdout, stderr);
|
|
299
299
|
const cause = new Error(message);
|
|
@@ -354,8 +354,8 @@ const wrap$f = global => {
|
|
|
354
354
|
};
|
|
355
355
|
const waitForFirstMessage = async port => {
|
|
356
356
|
const {
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
promise,
|
|
358
|
+
resolve
|
|
359
359
|
} = Promise.withResolvers();
|
|
360
360
|
port.addEventListener('message', resolve, {
|
|
361
361
|
once: true
|
|
@@ -375,8 +375,8 @@ const listen$6 = async () => {
|
|
|
375
375
|
const type = firstMessage.params[0];
|
|
376
376
|
if (type === 'message-port') {
|
|
377
377
|
parentIpc.send({
|
|
378
|
-
jsonrpc: '2.0',
|
|
379
378
|
id: firstMessage.id,
|
|
379
|
+
jsonrpc: '2.0',
|
|
380
380
|
result: null
|
|
381
381
|
});
|
|
382
382
|
parentIpc.dispose();
|
|
@@ -433,8 +433,8 @@ const removeListener = (emitter, type, callback) => {
|
|
|
433
433
|
};
|
|
434
434
|
const getFirstEvent = (eventEmitter, eventMap) => {
|
|
435
435
|
const {
|
|
436
|
-
|
|
437
|
-
|
|
436
|
+
promise,
|
|
437
|
+
resolve
|
|
438
438
|
} = Promise.withResolvers();
|
|
439
439
|
const listenerMap = Object.create(null);
|
|
440
440
|
const cleanup = value => {
|
|
@@ -446,8 +446,8 @@ const getFirstEvent = (eventEmitter, eventMap) => {
|
|
|
446
446
|
for (const [event, type] of Object.entries(eventMap)) {
|
|
447
447
|
const listener = event => {
|
|
448
448
|
cleanup({
|
|
449
|
-
|
|
450
|
-
|
|
449
|
+
event,
|
|
450
|
+
type
|
|
451
451
|
});
|
|
452
452
|
};
|
|
453
453
|
addListener(eventEmitter, event, listener);
|
|
@@ -457,8 +457,8 @@ const getFirstEvent = (eventEmitter, eventMap) => {
|
|
|
457
457
|
};
|
|
458
458
|
const Message$1 = 3;
|
|
459
459
|
const create$5$1 = async ({
|
|
460
|
-
|
|
461
|
-
|
|
460
|
+
isMessagePortOpen,
|
|
461
|
+
messagePort
|
|
462
462
|
}) => {
|
|
463
463
|
if (!isMessagePort(messagePort)) {
|
|
464
464
|
throw new IpcError('port must be of type MessagePort');
|
|
@@ -471,8 +471,8 @@ const create$5$1 = async ({
|
|
|
471
471
|
});
|
|
472
472
|
messagePort.start();
|
|
473
473
|
const {
|
|
474
|
-
|
|
475
|
-
|
|
474
|
+
event,
|
|
475
|
+
type
|
|
476
476
|
} = await eventPromise;
|
|
477
477
|
if (type !== Message$1) {
|
|
478
478
|
throw new IpcError('Failed to wait for ipc message');
|
|
@@ -1033,15 +1033,7 @@ const createMockRpc = ({
|
|
|
1033
1033
|
return mockRpc;
|
|
1034
1034
|
};
|
|
1035
1035
|
|
|
1036
|
-
const
|
|
1037
|
-
|
|
1038
|
-
const Button$2 = 1;
|
|
1039
|
-
const Div = 4;
|
|
1040
|
-
const Input$1 = 6;
|
|
1041
|
-
const Text = 12;
|
|
1042
|
-
const Img = 17;
|
|
1043
|
-
|
|
1044
|
-
const Button$1 = 'event.button';
|
|
1036
|
+
const Button$2 = 'event.button';
|
|
1045
1037
|
const ClientX = 'event.clientX';
|
|
1046
1038
|
const ClientY = 'event.clientY';
|
|
1047
1039
|
const DeltaMode = 'event.deltaMode';
|
|
@@ -1050,13 +1042,12 @@ const TargetValue = 'event.target.value';
|
|
|
1050
1042
|
|
|
1051
1043
|
const Script$1 = 2;
|
|
1052
1044
|
|
|
1053
|
-
const ManageExtension
|
|
1054
|
-
|
|
1055
|
-
const LeftClick = 0;
|
|
1045
|
+
const ManageExtension = 8;
|
|
1046
|
+
const ExtensionSearchFilter = 95;
|
|
1056
1047
|
|
|
1057
1048
|
const ExtensionHostWorker = 44;
|
|
1058
|
-
const RendererWorker = 1;
|
|
1059
1049
|
const ExtensionManagementWorker = 9006;
|
|
1050
|
+
const RendererWorker = 1;
|
|
1060
1051
|
|
|
1061
1052
|
const FocusSelector = 'Viewlet.focusSelector';
|
|
1062
1053
|
|
|
@@ -1247,8 +1238,8 @@ const terminate = () => {
|
|
|
1247
1238
|
globalThis.close();
|
|
1248
1239
|
};
|
|
1249
1240
|
|
|
1250
|
-
const None$
|
|
1251
|
-
const Input = 1;
|
|
1241
|
+
const None$3 = 0;
|
|
1242
|
+
const Input$1 = 1;
|
|
1252
1243
|
const List$2 = 2;
|
|
1253
1244
|
|
|
1254
1245
|
const handleError = async (error, notify = true, prefix = '') => {
|
|
@@ -1274,10 +1265,13 @@ const Refresh$1 = 'Refresh';
|
|
|
1274
1265
|
const ClearExtensionSearchResults = 'Clear extension search results';
|
|
1275
1266
|
const Enable = 'Enable';
|
|
1276
1267
|
const Disable = 'Disable';
|
|
1268
|
+
const EnableWorkspace = 'Enable Workspace';
|
|
1269
|
+
const DisableWorkspace = 'Disable Workspace';
|
|
1277
1270
|
const InstallAnotherVersion = 'Install Another Version';
|
|
1278
1271
|
const SearchExtensionsInMarketplace = 'Search Extensions in Marketplace';
|
|
1279
1272
|
const ViewsAndMoreActions = 'Views and more Actions...';
|
|
1280
1273
|
const Extensions$2 = 'Extensions';
|
|
1274
|
+
const Installed$1 = 'Installed';
|
|
1281
1275
|
const Copy = 'Copy';
|
|
1282
1276
|
const CopyExtensionId = 'Copy Extension Id';
|
|
1283
1277
|
const Name = 'Name';
|
|
@@ -1286,6 +1280,18 @@ const Description = 'Description';
|
|
|
1286
1280
|
const Version = 'Version';
|
|
1287
1281
|
const Publisher = 'Publisher';
|
|
1288
1282
|
const MarketplaceLink = 'Marketplace Link';
|
|
1283
|
+
const Category$1 = 'Category';
|
|
1284
|
+
const Disabled$1 = 'Disabled';
|
|
1285
|
+
const Featured = 'Featured';
|
|
1286
|
+
const McpServers = 'MCP Servers';
|
|
1287
|
+
const MostPopular = 'Most Popular';
|
|
1288
|
+
const RecentlyPublished = 'Recently Published';
|
|
1289
|
+
const Recommended = 'Recommended';
|
|
1290
|
+
const Updates = 'Updates';
|
|
1291
|
+
const BuiltIn = 'Built-in';
|
|
1292
|
+
const Enabled$1 = 'Enabled';
|
|
1293
|
+
const WorkspaceUnsupported = 'Workspace Unsupported';
|
|
1294
|
+
const SortBy = 'Sort By';
|
|
1289
1295
|
|
|
1290
1296
|
const noExtensionsFound = () => {
|
|
1291
1297
|
return i18nString(NoExtensionsFound);
|
|
@@ -1326,6 +1332,12 @@ const enable = () => {
|
|
|
1326
1332
|
const disable = () => {
|
|
1327
1333
|
return i18nString(Disable);
|
|
1328
1334
|
};
|
|
1335
|
+
const enableWorkspace = () => {
|
|
1336
|
+
return i18nString(EnableWorkspace);
|
|
1337
|
+
};
|
|
1338
|
+
const disableWorkspace = () => {
|
|
1339
|
+
return i18nString(DisableWorkspace);
|
|
1340
|
+
};
|
|
1329
1341
|
const installAnotherVersion = () => {
|
|
1330
1342
|
return i18nString(InstallAnotherVersion);
|
|
1331
1343
|
};
|
|
@@ -1341,6 +1353,45 @@ const searchExtensionsInMarketPlace = () => {
|
|
|
1341
1353
|
const viewsAndMoreActions = () => {
|
|
1342
1354
|
return i18nString(ViewsAndMoreActions);
|
|
1343
1355
|
};
|
|
1356
|
+
const installed = () => {
|
|
1357
|
+
return i18nString(Installed$1);
|
|
1358
|
+
};
|
|
1359
|
+
const category = () => {
|
|
1360
|
+
return i18nString(Category$1);
|
|
1361
|
+
};
|
|
1362
|
+
const disabled = () => {
|
|
1363
|
+
return i18nString(Disabled$1);
|
|
1364
|
+
};
|
|
1365
|
+
const featured = () => {
|
|
1366
|
+
return i18nString(Featured);
|
|
1367
|
+
};
|
|
1368
|
+
const mcpServers = () => {
|
|
1369
|
+
return i18nString(McpServers);
|
|
1370
|
+
};
|
|
1371
|
+
const mostPopular = () => {
|
|
1372
|
+
return i18nString(MostPopular);
|
|
1373
|
+
};
|
|
1374
|
+
const recentlyPublished = () => {
|
|
1375
|
+
return i18nString(RecentlyPublished);
|
|
1376
|
+
};
|
|
1377
|
+
const recommended = () => {
|
|
1378
|
+
return i18nString(Recommended);
|
|
1379
|
+
};
|
|
1380
|
+
const updates = () => {
|
|
1381
|
+
return i18nString(Updates);
|
|
1382
|
+
};
|
|
1383
|
+
const builtIn = () => {
|
|
1384
|
+
return i18nString(BuiltIn);
|
|
1385
|
+
};
|
|
1386
|
+
const enabled = () => {
|
|
1387
|
+
return i18nString(Enabled$1);
|
|
1388
|
+
};
|
|
1389
|
+
const workspaceUnsupported = () => {
|
|
1390
|
+
return i18nString(WorkspaceUnsupported);
|
|
1391
|
+
};
|
|
1392
|
+
const sortBy = () => {
|
|
1393
|
+
return i18nString(SortBy);
|
|
1394
|
+
};
|
|
1344
1395
|
|
|
1345
1396
|
const getFinalDeltaY = (height, itemHeight, itemsLength) => {
|
|
1346
1397
|
const contentHeight = itemsLength * itemHeight;
|
|
@@ -1348,7 +1399,7 @@ const getFinalDeltaY = (height, itemHeight, itemsLength) => {
|
|
|
1348
1399
|
return finalDeltaY;
|
|
1349
1400
|
};
|
|
1350
1401
|
|
|
1351
|
-
const Button = 1;
|
|
1402
|
+
const Button$1 = 1;
|
|
1352
1403
|
|
|
1353
1404
|
const HandleClearSearchResults = 1;
|
|
1354
1405
|
const HandleClickFilter = 2;
|
|
@@ -1378,13 +1429,13 @@ const getInputActions = hasValue => {
|
|
|
1378
1429
|
icon: `MaskIcon${ClearAll}`,
|
|
1379
1430
|
onClick: HandleClearSearchResults,
|
|
1380
1431
|
title: clearExtensionSearchResults(),
|
|
1381
|
-
type: Button
|
|
1432
|
+
type: Button$1
|
|
1382
1433
|
}, {
|
|
1383
1434
|
enabled: true,
|
|
1384
1435
|
icon: `MaskIcon${Filter}`,
|
|
1385
1436
|
onClick: HandleClickFilter,
|
|
1386
1437
|
title: filter(),
|
|
1387
|
-
type: Button
|
|
1438
|
+
type: Button$1
|
|
1388
1439
|
}];
|
|
1389
1440
|
return actions;
|
|
1390
1441
|
};
|
|
@@ -1590,7 +1641,7 @@ const handleChange = async (state, update) => {
|
|
|
1590
1641
|
allExtensions,
|
|
1591
1642
|
deltaY: 0,
|
|
1592
1643
|
finalDeltaY: 0,
|
|
1593
|
-
focus: Input,
|
|
1644
|
+
focus: Input$1,
|
|
1594
1645
|
inputActions,
|
|
1595
1646
|
inputSource,
|
|
1596
1647
|
items,
|
|
@@ -1642,7 +1693,7 @@ const handleChange = async (state, update) => {
|
|
|
1642
1693
|
const clearSearchResults = state => {
|
|
1643
1694
|
return handleChange(state, {
|
|
1644
1695
|
...state,
|
|
1645
|
-
focus: Input,
|
|
1696
|
+
focus: Input$1,
|
|
1646
1697
|
inputSource: Script$1,
|
|
1647
1698
|
searchValue: ''
|
|
1648
1699
|
});
|
|
@@ -1765,6 +1816,7 @@ const create = (id, uri, x, y, width, height, platform, assetDir) => {
|
|
|
1765
1816
|
scrollBarY: 0,
|
|
1766
1817
|
searchValue: '',
|
|
1767
1818
|
size: 0,
|
|
1819
|
+
suggestOpen: false,
|
|
1768
1820
|
uid: id,
|
|
1769
1821
|
width,
|
|
1770
1822
|
x,
|
|
@@ -1985,12 +2037,12 @@ const getActions = () => {
|
|
|
1985
2037
|
command: '',
|
|
1986
2038
|
icon: Refresh,
|
|
1987
2039
|
id: refresh(),
|
|
1988
|
-
type: Button
|
|
2040
|
+
type: Button$1
|
|
1989
2041
|
}, {
|
|
1990
2042
|
command: '',
|
|
1991
2043
|
icon: Ellipsis,
|
|
1992
2044
|
id: viewsAndMoreActions(),
|
|
1993
|
-
type: Button
|
|
2045
|
+
type: Button$1
|
|
1994
2046
|
}];
|
|
1995
2047
|
};
|
|
1996
2048
|
|
|
@@ -2052,49 +2104,158 @@ const getKeyBindings = () => {
|
|
|
2052
2104
|
}];
|
|
2053
2105
|
};
|
|
2054
2106
|
|
|
2055
|
-
const
|
|
2107
|
+
const Separator = 1;
|
|
2108
|
+
const None$2 = 0;
|
|
2109
|
+
const SubMenu = 4;
|
|
2056
2110
|
|
|
2057
2111
|
const getMenuEntries = () => {
|
|
2058
2112
|
return [{
|
|
2059
2113
|
command: 'SearchExtensions.enable',
|
|
2060
|
-
flags: None$
|
|
2114
|
+
flags: None$2,
|
|
2061
2115
|
id: 'enable',
|
|
2062
2116
|
label: enable()
|
|
2117
|
+
}, {
|
|
2118
|
+
command: 'SearchExtensions.enableWorkspace',
|
|
2119
|
+
flags: None$2,
|
|
2120
|
+
id: 'enableWorkspace',
|
|
2121
|
+
label: enableWorkspace()
|
|
2122
|
+
}, {
|
|
2123
|
+
command: '',
|
|
2124
|
+
flags: Separator,
|
|
2125
|
+
id: 'separator1',
|
|
2126
|
+
label: ''
|
|
2063
2127
|
}, {
|
|
2064
2128
|
command: 'SearchExtensions.disable',
|
|
2065
|
-
flags: None$
|
|
2129
|
+
flags: None$2,
|
|
2066
2130
|
id: 'disable',
|
|
2067
2131
|
label: disable()
|
|
2132
|
+
}, {
|
|
2133
|
+
command: 'SearchExtensions.disableWorkspace',
|
|
2134
|
+
flags: None$2,
|
|
2135
|
+
id: 'disableWorkspace',
|
|
2136
|
+
label: disableWorkspace()
|
|
2137
|
+
}, {
|
|
2138
|
+
command: '',
|
|
2139
|
+
flags: Separator,
|
|
2140
|
+
id: 'separator2',
|
|
2141
|
+
label: ''
|
|
2068
2142
|
}, {
|
|
2069
2143
|
command: 'SearchExtensions.installAnotherVersion',
|
|
2070
|
-
flags: None$
|
|
2144
|
+
flags: None$2,
|
|
2071
2145
|
id: 'installAnotherVersion',
|
|
2072
2146
|
label: installAnotherVersion()
|
|
2073
2147
|
}, {
|
|
2074
2148
|
command: 'Extensions.copyExtensionInfo',
|
|
2075
|
-
flags: None$
|
|
2149
|
+
flags: None$2,
|
|
2076
2150
|
id: 'copy',
|
|
2077
2151
|
label: copy()
|
|
2078
2152
|
}, {
|
|
2079
2153
|
command: 'Extensions.copyExtensionId',
|
|
2080
|
-
flags: None$
|
|
2154
|
+
flags: None$2,
|
|
2081
2155
|
id: 'copyExtensionId',
|
|
2082
2156
|
label: copyExtensionId$1()
|
|
2083
2157
|
}];
|
|
2084
2158
|
};
|
|
2085
2159
|
|
|
2086
|
-
const
|
|
2087
|
-
return
|
|
2160
|
+
const getMenuEntriesFilter = () => {
|
|
2161
|
+
return [{
|
|
2162
|
+
command: 'SearchExtensions.filterByFeatured',
|
|
2163
|
+
flags: None$2,
|
|
2164
|
+
id: 'filterByFeatured',
|
|
2165
|
+
label: featured()
|
|
2166
|
+
}, {
|
|
2167
|
+
command: 'SearchExtensions.filterByMcpServers',
|
|
2168
|
+
flags: None$2,
|
|
2169
|
+
id: 'filterByMcpServers',
|
|
2170
|
+
label: mcpServers()
|
|
2171
|
+
}, {
|
|
2172
|
+
command: 'SearchExtensions.filterByMostPopular',
|
|
2173
|
+
flags: None$2,
|
|
2174
|
+
id: 'filterByMostPopular',
|
|
2175
|
+
label: mostPopular()
|
|
2176
|
+
}, {
|
|
2177
|
+
command: 'SearchExtensions.filterByRecentlyPublished',
|
|
2178
|
+
flags: None$2,
|
|
2179
|
+
id: 'filterByRecentlyPublished',
|
|
2180
|
+
label: recentlyPublished()
|
|
2181
|
+
}, {
|
|
2182
|
+
command: 'SearchExtensions.filterByRecommended',
|
|
2183
|
+
flags: None$2,
|
|
2184
|
+
id: 'filterByRecommended',
|
|
2185
|
+
label: recommended()
|
|
2186
|
+
}, {
|
|
2187
|
+
command: '',
|
|
2188
|
+
flags: Separator,
|
|
2189
|
+
id: 'separator1',
|
|
2190
|
+
label: ''
|
|
2191
|
+
}, {
|
|
2192
|
+
command: 'SearchExtensions.filterByCategory',
|
|
2193
|
+
flags: SubMenu,
|
|
2194
|
+
id: 'filterByCategory',
|
|
2195
|
+
label: category()
|
|
2196
|
+
}, {
|
|
2197
|
+
command: 'SearchExtensions.filterByInstalled',
|
|
2198
|
+
flags: None$2,
|
|
2199
|
+
id: 'filterByInstalled',
|
|
2200
|
+
label: installed()
|
|
2201
|
+
}, {
|
|
2202
|
+
command: 'SearchExtensions.filterByUpdates',
|
|
2203
|
+
flags: None$2,
|
|
2204
|
+
id: 'filterByUpdates',
|
|
2205
|
+
label: updates()
|
|
2206
|
+
}, {
|
|
2207
|
+
command: 'SearchExtensions.filterByBuiltin',
|
|
2208
|
+
flags: None$2,
|
|
2209
|
+
id: 'filterByBuiltin',
|
|
2210
|
+
label: builtIn()
|
|
2211
|
+
}, {
|
|
2212
|
+
command: 'SearchExtensions.filterByEnabled',
|
|
2213
|
+
flags: None$2,
|
|
2214
|
+
id: 'filterByEnabled',
|
|
2215
|
+
label: enabled()
|
|
2216
|
+
}, {
|
|
2217
|
+
command: 'SearchExtensions.filterByDisabled',
|
|
2218
|
+
flags: None$2,
|
|
2219
|
+
id: 'filterByDisabled',
|
|
2220
|
+
label: disabled()
|
|
2221
|
+
}, {
|
|
2222
|
+
command: 'SearchExtensions.filterByWorkspaceUnsupported',
|
|
2223
|
+
flags: None$2,
|
|
2224
|
+
id: 'filterByWorkspaceUnsupported',
|
|
2225
|
+
label: workspaceUnsupported()
|
|
2226
|
+
}, {
|
|
2227
|
+
command: '',
|
|
2228
|
+
flags: Separator,
|
|
2229
|
+
id: 'separator2',
|
|
2230
|
+
label: ''
|
|
2231
|
+
}, {
|
|
2232
|
+
command: 'SearchExtensions.filterBySortBy',
|
|
2233
|
+
flags: SubMenu,
|
|
2234
|
+
id: 'filterBySortBy',
|
|
2235
|
+
label: sortBy()
|
|
2236
|
+
}];
|
|
2237
|
+
};
|
|
2238
|
+
|
|
2239
|
+
const getMenuEntries2 = (state, props) => {
|
|
2240
|
+
const {
|
|
2241
|
+
menuId
|
|
2242
|
+
} = props;
|
|
2243
|
+
switch (menuId) {
|
|
2244
|
+
case ExtensionSearchFilter:
|
|
2245
|
+
return getMenuEntriesFilter();
|
|
2246
|
+
default:
|
|
2247
|
+
return getMenuEntries();
|
|
2248
|
+
}
|
|
2088
2249
|
};
|
|
2089
2250
|
|
|
2090
2251
|
const getMenuIds = () => {
|
|
2091
|
-
return [ManageExtension
|
|
2252
|
+
return [ManageExtension, ExtensionSearchFilter];
|
|
2092
2253
|
};
|
|
2093
2254
|
|
|
2094
2255
|
const handleBlur = state => {
|
|
2095
2256
|
return {
|
|
2096
2257
|
...state,
|
|
2097
|
-
focus: None$
|
|
2258
|
+
focus: None$3
|
|
2098
2259
|
};
|
|
2099
2260
|
};
|
|
2100
2261
|
|
|
@@ -2130,6 +2291,16 @@ const handleClick = async (state, index) => {
|
|
|
2130
2291
|
return newState;
|
|
2131
2292
|
};
|
|
2132
2293
|
|
|
2294
|
+
const None$1 = 'none';
|
|
2295
|
+
|
|
2296
|
+
const Button = 1;
|
|
2297
|
+
const Div = 4;
|
|
2298
|
+
const Input = 6;
|
|
2299
|
+
const Text = 12;
|
|
2300
|
+
const Img = 17;
|
|
2301
|
+
|
|
2302
|
+
const LeftClick = 0;
|
|
2303
|
+
|
|
2133
2304
|
const mergeClassNames = (...classNames) => {
|
|
2134
2305
|
return classNames.filter(Boolean).join(' ');
|
|
2135
2306
|
};
|
|
@@ -2182,7 +2353,21 @@ const show2 = async (uid, menuId, x, y, args) => {
|
|
|
2182
2353
|
await showContextMenu2(uid, menuId, x, y, args);
|
|
2183
2354
|
};
|
|
2184
2355
|
|
|
2185
|
-
const
|
|
2356
|
+
const handleClickFilter = async state => {
|
|
2357
|
+
const {
|
|
2358
|
+
headerHeight,
|
|
2359
|
+
uid,
|
|
2360
|
+
width,
|
|
2361
|
+
x,
|
|
2362
|
+
y
|
|
2363
|
+
} = state;
|
|
2364
|
+
const menuX = x + width + 80;
|
|
2365
|
+
const menuY = y + headerHeight + 100;
|
|
2366
|
+
await show2(uid, ExtensionSearchFilter, menuX, menuY, {
|
|
2367
|
+
menuId: ExtensionSearchFilter
|
|
2368
|
+
});
|
|
2369
|
+
return state;
|
|
2370
|
+
};
|
|
2186
2371
|
|
|
2187
2372
|
const handleContextMenu = async (state, button, eventX, eventY) => {
|
|
2188
2373
|
// TODO use focused index when when context menu button is -1 (keyboard)
|
|
@@ -2210,10 +2395,18 @@ const handleDisable = (state, id) => {
|
|
|
2210
2395
|
// TODO
|
|
2211
2396
|
};
|
|
2212
2397
|
|
|
2398
|
+
const handleDisableWorkspace = (state, id) => {
|
|
2399
|
+
return state;
|
|
2400
|
+
};
|
|
2401
|
+
|
|
2213
2402
|
const handleEnable = (state, id) => {
|
|
2214
2403
|
return state;
|
|
2215
2404
|
};
|
|
2216
2405
|
|
|
2406
|
+
const handleEnableWorkspace = (state, id) => {
|
|
2407
|
+
return state;
|
|
2408
|
+
};
|
|
2409
|
+
|
|
2217
2410
|
const handleFocus = async state => {
|
|
2218
2411
|
return {
|
|
2219
2412
|
...state,
|
|
@@ -2630,7 +2823,7 @@ const Extensions$1 = 'extensions';
|
|
|
2630
2823
|
|
|
2631
2824
|
const getSelector = focus => {
|
|
2632
2825
|
switch (focus) {
|
|
2633
|
-
case Input:
|
|
2826
|
+
case Input$1:
|
|
2634
2827
|
return `[name="${Extensions$1}"]`;
|
|
2635
2828
|
case List$2:
|
|
2636
2829
|
return '.ListItems';
|
|
@@ -2654,7 +2847,7 @@ const renderFocusContext = newState => {
|
|
|
2654
2847
|
const {
|
|
2655
2848
|
uid
|
|
2656
2849
|
} = newState;
|
|
2657
|
-
if (newState.focus === Input) {
|
|
2850
|
+
if (newState.focus === Input$1) {
|
|
2658
2851
|
return ['Viewlet.setFocusContext', uid, FocusExtensionsInput];
|
|
2659
2852
|
}
|
|
2660
2853
|
if (newState.focus === List$2) {
|
|
@@ -2718,7 +2911,7 @@ const getSearchFieldButtonVirtualDom = button => {
|
|
|
2718
2911
|
onClick,
|
|
2719
2912
|
tabIndex: 0,
|
|
2720
2913
|
title,
|
|
2721
|
-
type: Button
|
|
2914
|
+
type: Button
|
|
2722
2915
|
}, {
|
|
2723
2916
|
childCount: 0,
|
|
2724
2917
|
className: mergeClassNames(MaskIcon, icon),
|
|
@@ -2745,7 +2938,7 @@ const getSearchFieldVirtualDom = (name, placeholder, onInput, insideButtons, out
|
|
|
2745
2938
|
onInput,
|
|
2746
2939
|
placeholder,
|
|
2747
2940
|
spellcheck: false,
|
|
2748
|
-
type: Input
|
|
2941
|
+
type: Input
|
|
2749
2942
|
}, {
|
|
2750
2943
|
childCount: insideButtons.length,
|
|
2751
2944
|
className: SearchFieldButtons,
|
|
@@ -2986,7 +3179,7 @@ const getExtensionsViewVirtualDom = state => {
|
|
|
2986
3179
|
ariaLive: 'polite',
|
|
2987
3180
|
childCount: 2,
|
|
2988
3181
|
className: mergeClassNames(Viewlet, Extensions),
|
|
2989
|
-
role: None$
|
|
3182
|
+
role: None$1,
|
|
2990
3183
|
type: Div
|
|
2991
3184
|
}, ...getExtensionHeaderVirtualDom(placeholder, inputActions), ...getContentVirtualDom(visibleExtensions, message, scrollBarHeight, scrollBarY, focusOutline)];
|
|
2992
3185
|
};
|
|
@@ -3081,13 +3274,13 @@ const getActionButtonVirtualDom = action => {
|
|
|
3081
3274
|
childCount: 1,
|
|
3082
3275
|
className: IconButton,
|
|
3083
3276
|
title: id,
|
|
3084
|
-
type: Button
|
|
3277
|
+
type: Button
|
|
3085
3278
|
}, getIconVirtualDom(icon)];
|
|
3086
3279
|
};
|
|
3087
3280
|
|
|
3088
3281
|
const getActionVirtualDom = action => {
|
|
3089
3282
|
switch (action.type) {
|
|
3090
|
-
case Button:
|
|
3283
|
+
case Button$1:
|
|
3091
3284
|
return getActionButtonVirtualDom(action);
|
|
3092
3285
|
default:
|
|
3093
3286
|
return [];
|
|
@@ -3119,7 +3312,7 @@ const renderActions = uid => {
|
|
|
3119
3312
|
const renderEventListeners = () => {
|
|
3120
3313
|
return [{
|
|
3121
3314
|
name: HandleContextMenu,
|
|
3122
|
-
params: ['handleContextMenu', Button$
|
|
3315
|
+
params: ['handleContextMenu', Button$2, ClientX, ClientY],
|
|
3123
3316
|
preventDefault: true
|
|
3124
3317
|
}, {
|
|
3125
3318
|
name: HandleHeaderContextMenu,
|
|
@@ -3127,7 +3320,7 @@ const renderEventListeners = () => {
|
|
|
3127
3320
|
preventDefault: true
|
|
3128
3321
|
}, {
|
|
3129
3322
|
name: HandlePointerDown,
|
|
3130
|
-
params: ['handleClickAt', Button$
|
|
3323
|
+
params: ['handleClickAt', Button$2, ClientX, ClientY],
|
|
3131
3324
|
preventDefault: true
|
|
3132
3325
|
}, {
|
|
3133
3326
|
name: HandleScrollBarPointerDown,
|
|
@@ -3224,7 +3417,10 @@ const selectIndex = (state, index) => {
|
|
|
3224
3417
|
};
|
|
3225
3418
|
|
|
3226
3419
|
const toggleSuggest = state => {
|
|
3227
|
-
return
|
|
3420
|
+
return {
|
|
3421
|
+
...state,
|
|
3422
|
+
suggestOpen: !state.suggestOpen
|
|
3423
|
+
};
|
|
3228
3424
|
};
|
|
3229
3425
|
|
|
3230
3426
|
const commandMap = {
|
|
@@ -3234,7 +3430,11 @@ const commandMap = {
|
|
|
3234
3430
|
'SearchExtensions.copyExtensionInfo': wrapCommand(copyExtensionInfo),
|
|
3235
3431
|
'SearchExtensions.create': create,
|
|
3236
3432
|
'SearchExtensions.diff2': diff2,
|
|
3433
|
+
'SearchExtensions.disable': wrapCommand(handleDisable),
|
|
3434
|
+
'SearchExtensions.disableWorkspace': wrapCommand(handleDisableWorkspace),
|
|
3237
3435
|
'SearchExtensions.dispose': dispose,
|
|
3436
|
+
'SearchExtensions.enable': wrapCommand(handleEnable),
|
|
3437
|
+
'SearchExtensions.enableWorkspace': wrapCommand(handleEnableWorkspace),
|
|
3238
3438
|
'SearchExtensions.focusFirst': wrapCommand(focusFirst),
|
|
3239
3439
|
'SearchExtensions.focusIndex': wrapCommand(focusIndex),
|
|
3240
3440
|
'SearchExtensions.focusLast': wrapCommand(focusLast),
|
|
@@ -3247,15 +3447,19 @@ const commandMap = {
|
|
|
3247
3447
|
'SearchExtensions.getKeyBindings': getKeyBindings,
|
|
3248
3448
|
'SearchExtensions.getMenuEntries': getMenuEntries,
|
|
3249
3449
|
'SearchExtensions.getMenuEntries2': wrapGetter(getMenuEntries2),
|
|
3450
|
+
'SearchExtensions.getMenuEntriesFilter': getMenuEntriesFilter,
|
|
3250
3451
|
'SearchExtensions.getMenuIds': getMenuIds,
|
|
3251
3452
|
'SearchExtensions.handleBlur': wrapCommand(handleBlur),
|
|
3252
3453
|
'SearchExtensions.handleClick': wrapCommand(handleClick),
|
|
3253
3454
|
'SearchExtensions.handleClickAt': wrapCommand(handleClickAt),
|
|
3254
3455
|
'SearchExtensions.handleClickCurrent': wrapCommand(handleClickCurrent),
|
|
3255
3456
|
'SearchExtensions.handleClickCurrentButKeepFocus': wrapCommand(handleClickCurrentButKeepFocus),
|
|
3457
|
+
'SearchExtensions.handleClickFilter': wrapCommand(handleClickFilter),
|
|
3256
3458
|
'SearchExtensions.handleContextMenu': wrapCommand(handleContextMenu),
|
|
3257
3459
|
'SearchExtensions.handleDisable': wrapCommand(handleDisable),
|
|
3460
|
+
'SearchExtensions.handleDisableWorkspace': wrapCommand(handleDisableWorkspace),
|
|
3258
3461
|
'SearchExtensions.handleEnable': wrapCommand(handleEnable),
|
|
3462
|
+
'SearchExtensions.handleEnableWorkspace': wrapCommand(handleEnableWorkspace),
|
|
3259
3463
|
'SearchExtensions.handleFocus': wrapCommand(handleFocus),
|
|
3260
3464
|
'SearchExtensions.handleHeaderContextMenu': wrapCommand(handleHeaderContextMenu),
|
|
3261
3465
|
'SearchExtensions.handleInput': wrapCommand(handleInput),
|