@lvce-editor/problems-view 1.26.6 → 1.26.7
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.
|
@@ -2900,6 +2900,7 @@ const HandleCollapseAll = 11;
|
|
|
2900
2900
|
const HandleViewAsList = 12;
|
|
2901
2901
|
const HandleViewAsTable = 13;
|
|
2902
2902
|
const HandleClickButton = 14;
|
|
2903
|
+
const HandleFileNameClick = 15;
|
|
2903
2904
|
|
|
2904
2905
|
const getIconVirtualDom = (icon, type = Div) => {
|
|
2905
2906
|
return {
|
|
@@ -3119,7 +3120,8 @@ const getProblemVirtualDom = problem => {
|
|
|
3119
3120
|
rowIndex,
|
|
3120
3121
|
setSize,
|
|
3121
3122
|
source,
|
|
3122
|
-
type
|
|
3123
|
+
type,
|
|
3124
|
+
uri
|
|
3123
3125
|
} = problem;
|
|
3124
3126
|
let className = Problem;
|
|
3125
3127
|
const indent = getProblemIndent(listItemType);
|
|
@@ -3138,7 +3140,11 @@ const getProblemVirtualDom = problem => {
|
|
|
3138
3140
|
className,
|
|
3139
3141
|
role: TreeItem,
|
|
3140
3142
|
type: Div
|
|
3141
|
-
}, listItemType === Collapsed ? getChevronRightVirtualDom() : getChevronDownVirtualDom(), getFileIconVirtualDom(icon),
|
|
3143
|
+
}, listItemType === Collapsed ? getChevronRightVirtualDom() : getChevronDownVirtualDom(), getFileIconVirtualDom(icon), {
|
|
3144
|
+
...labelNode,
|
|
3145
|
+
'data-uri': uri,
|
|
3146
|
+
onClick: HandleFileNameClick
|
|
3147
|
+
}, text(fileName), labelDetailNode, text(relativePath), ...getBadgeVirtualDom(ProblemBadge, problem.count)];
|
|
3142
3148
|
}
|
|
3143
3149
|
const lineColumn = atLineColumn(rowIndex + 1, columnIndex + 1);
|
|
3144
3150
|
const label = {
|
|
@@ -3498,6 +3504,9 @@ const renderEventListeners = () => {
|
|
|
3498
3504
|
}, {
|
|
3499
3505
|
name: HandlePointerDown,
|
|
3500
3506
|
params: ['handleClickAt', 'event.clientX', 'event.clientY']
|
|
3507
|
+
}, {
|
|
3508
|
+
name: HandleFileNameClick,
|
|
3509
|
+
params: ['toggleFileGroup', 'event.target.dataset.uri']
|
|
3501
3510
|
}, {
|
|
3502
3511
|
name: HandleClickMoreFilters,
|
|
3503
3512
|
params: ['handleClickMoreFilters', ClientX, ClientY]
|
|
@@ -3551,6 +3560,17 @@ const saveState = state => {
|
|
|
3551
3560
|
};
|
|
3552
3561
|
};
|
|
3553
3562
|
|
|
3563
|
+
const toggleFileGroup = (state, uri) => {
|
|
3564
|
+
const {
|
|
3565
|
+
collapsedUris
|
|
3566
|
+
} = state;
|
|
3567
|
+
const newCollapsedUris = collapsedUris.includes(uri) ? collapsedUris.filter(collapsedUri => collapsedUri !== uri) : [...collapsedUris, uri];
|
|
3568
|
+
return {
|
|
3569
|
+
...state,
|
|
3570
|
+
collapsedUris: newCollapsedUris
|
|
3571
|
+
};
|
|
3572
|
+
};
|
|
3573
|
+
|
|
3554
3574
|
const commandMap = {
|
|
3555
3575
|
'Problems.collapseAll': wrapCommand(collapseAll$1),
|
|
3556
3576
|
'Problems.copyMessage': wrapCommand(copyMessage),
|
|
@@ -3584,6 +3604,7 @@ const commandMap = {
|
|
|
3584
3604
|
'Problems.resize': resize,
|
|
3585
3605
|
'Problems.saveState': wrapGetter(saveState),
|
|
3586
3606
|
'Problems.terminate': terminate,
|
|
3607
|
+
'Problems.toggleFileGroup': wrapCommand(toggleFileGroup),
|
|
3587
3608
|
'Problems.viewAsList': wrapCommand(viewAsList),
|
|
3588
3609
|
'Problems.viewAsTable': wrapCommand(viewAsTable)
|
|
3589
3610
|
};
|