@lvce-editor/output-view 2.12.0 → 2.12.1
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/dist/outputViewWorkerMain.js +27 -10
- package/package.json +1 -1
|
@@ -1356,7 +1356,6 @@ const parseStructuredLogLine = line => {
|
|
|
1356
1356
|
if (!parsed.source) {
|
|
1357
1357
|
return parts;
|
|
1358
1358
|
}
|
|
1359
|
-
const href = parsed.line > 0 ? `${parsed.source}:${parsed.line}` : parsed.source;
|
|
1360
1359
|
return [...parts, {
|
|
1361
1360
|
type: Text,
|
|
1362
1361
|
value: ' '
|
|
@@ -1364,7 +1363,7 @@ const parseStructuredLogLine = line => {
|
|
|
1364
1363
|
className: OutputSourceLink,
|
|
1365
1364
|
label: getSourceLabel(parsed.source, parsed.line),
|
|
1366
1365
|
type: Link,
|
|
1367
|
-
value:
|
|
1366
|
+
value: parsed.source
|
|
1368
1367
|
}];
|
|
1369
1368
|
};
|
|
1370
1369
|
|
|
@@ -1789,6 +1788,14 @@ const handleSelect = async (state, id) => {
|
|
|
1789
1788
|
return selectChannel(state, id);
|
|
1790
1789
|
};
|
|
1791
1790
|
|
|
1791
|
+
const handleSourceLinkClick = async (state, uri) => {
|
|
1792
|
+
if (!uri) {
|
|
1793
|
+
return state;
|
|
1794
|
+
}
|
|
1795
|
+
await invoke$1('Main.openUri', uri);
|
|
1796
|
+
return state;
|
|
1797
|
+
};
|
|
1798
|
+
|
|
1792
1799
|
const sendMessagePortToExtensionHostWorker2 = async port => {
|
|
1793
1800
|
await sendMessagePortToExtensionHostWorker(port);
|
|
1794
1801
|
};
|
|
@@ -2078,6 +2085,15 @@ const renderFilterValue = (oldState, newState) => {
|
|
|
2078
2085
|
return ['Viewlet.setValueByName', Filter$1, newState.filterValue];
|
|
2079
2086
|
};
|
|
2080
2087
|
|
|
2088
|
+
const HandleBlur = 'handleBlur';
|
|
2089
|
+
const HandleClearFilterClick = 'handleClearFilterClick';
|
|
2090
|
+
const HandleContextMenu = 'handleContextMenu';
|
|
2091
|
+
const HandleFilterInput = 'handleFilterInput';
|
|
2092
|
+
const HandlePointerDown = 'handlePointerDown';
|
|
2093
|
+
const HandleSelect = 'handleSelect';
|
|
2094
|
+
const HandleButtonClick = 'handleButtonClick';
|
|
2095
|
+
const HandleSourceLinkClick = 'handleSourceLinkClick';
|
|
2096
|
+
|
|
2081
2097
|
const noNodes = [];
|
|
2082
2098
|
const repeatCountNode = {
|
|
2083
2099
|
childCount: 1,
|
|
@@ -2092,6 +2108,7 @@ const getLinePartDom = part => {
|
|
|
2092
2108
|
switch (part.type) {
|
|
2093
2109
|
case Link:
|
|
2094
2110
|
{
|
|
2111
|
+
const isSourceLink = part.className === OutputSourceLink;
|
|
2095
2112
|
const linkNode = {
|
|
2096
2113
|
childCount: 1,
|
|
2097
2114
|
href: part.value,
|
|
@@ -2100,6 +2117,9 @@ const getLinePartDom = part => {
|
|
|
2100
2117
|
type: A,
|
|
2101
2118
|
...(part.className && {
|
|
2102
2119
|
className: part.className
|
|
2120
|
+
}),
|
|
2121
|
+
...(isSourceLink && {
|
|
2122
|
+
onClick: HandleSourceLinkClick
|
|
2103
2123
|
})
|
|
2104
2124
|
};
|
|
2105
2125
|
return {
|
|
@@ -2237,14 +2257,6 @@ const render2 = (uid, diffResult) => {
|
|
|
2237
2257
|
return commands;
|
|
2238
2258
|
};
|
|
2239
2259
|
|
|
2240
|
-
const HandleBlur = 'handleBlur';
|
|
2241
|
-
const HandleClearFilterClick = 'handleClearFilterClick';
|
|
2242
|
-
const HandleContextMenu = 'handleContextMenu';
|
|
2243
|
-
const HandleFilterInput = 'handleFilterInput';
|
|
2244
|
-
const HandlePointerDown = 'handlePointerDown';
|
|
2245
|
-
const HandleSelect = 'handleSelect';
|
|
2246
|
-
const HandleButtonClick = 'handleButtonClick';
|
|
2247
|
-
|
|
2248
2260
|
const getActionButtonVirtualDom = button => {
|
|
2249
2261
|
const {
|
|
2250
2262
|
icon,
|
|
@@ -2353,6 +2365,10 @@ const renderEventListeners = () => {
|
|
|
2353
2365
|
}, {
|
|
2354
2366
|
name: HandleClearFilterClick,
|
|
2355
2367
|
params: ['clearFilter']
|
|
2368
|
+
}, {
|
|
2369
|
+
name: HandleSourceLinkClick,
|
|
2370
|
+
params: ['handleSourceLinkClick', 'event.target.href'],
|
|
2371
|
+
preventDefault: true
|
|
2356
2372
|
}, {
|
|
2357
2373
|
name: HandlePointerDown,
|
|
2358
2374
|
params: ['handleClickAt', 'event.clientX', 'event.clientY']
|
|
@@ -2440,6 +2456,7 @@ const commandMap = {
|
|
|
2440
2456
|
'Output.handleError': wrapCommand(handleError),
|
|
2441
2457
|
'Output.handleFilterInput': wrapCommand(handleFilterInput),
|
|
2442
2458
|
'Output.handleSelect': wrapCommand(handleSelect),
|
|
2459
|
+
'Output.handleSourceLinkClick': wrapCommand(handleSourceLinkClick),
|
|
2443
2460
|
'Output.initialize': initialize,
|
|
2444
2461
|
'Output.loadContent2': wrapCommand(loadContent),
|
|
2445
2462
|
'Output.openFindWidget': wrapCommand(openFindWidget),
|