@lvce-editor/text-search-worker 6.6.0 → 6.8.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.
- package/dist/textSearchWorkerMain.js +19 -29
- package/package.json +1 -1
|
@@ -3062,13 +3062,14 @@ const getMenuEntriesList = (state, props) => {
|
|
|
3062
3062
|
};
|
|
3063
3063
|
|
|
3064
3064
|
const getMenuEntries = (state, props) => {
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3065
|
+
switch (props.menuId) {
|
|
3066
|
+
case InputContextMenu:
|
|
3067
|
+
return getMenuEntriesInput(props);
|
|
3068
|
+
case Search$1:
|
|
3069
|
+
return getMenuEntriesList(state, props);
|
|
3070
|
+
default:
|
|
3071
|
+
return [];
|
|
3070
3072
|
}
|
|
3071
|
-
return [];
|
|
3072
3073
|
};
|
|
3073
3074
|
|
|
3074
3075
|
const getMenuEntryIds = () => {
|
|
@@ -4807,10 +4808,7 @@ const getUsePullBasedSearch = async () => {
|
|
|
4807
4808
|
};
|
|
4808
4809
|
|
|
4809
4810
|
const hasProperty = (object, key) => {
|
|
4810
|
-
|
|
4811
|
-
return false;
|
|
4812
|
-
}
|
|
4813
|
-
return true;
|
|
4811
|
+
return !!object && typeof object === 'object' && key in object;
|
|
4814
4812
|
};
|
|
4815
4813
|
|
|
4816
4814
|
const getSavedFocus = savedState => {
|
|
@@ -5497,11 +5495,7 @@ const SearchWarningMessage = 'SearchWarningMessage';
|
|
|
5497
5495
|
|
|
5498
5496
|
const getSearchHeaderLimitHitVirtualDom = limitHitWarning => {
|
|
5499
5497
|
if (!limitHitWarning) {
|
|
5500
|
-
|
|
5501
|
-
return [{
|
|
5502
|
-
childCount: 0,
|
|
5503
|
-
type: Div
|
|
5504
|
-
}];
|
|
5498
|
+
return [];
|
|
5505
5499
|
}
|
|
5506
5500
|
const dom = [{
|
|
5507
5501
|
childCount: 1,
|
|
@@ -5611,15 +5605,16 @@ const getSearchHeaderTopVirtualDom = (flags, searchInputErrorMessage, matchCount
|
|
|
5611
5605
|
return dom;
|
|
5612
5606
|
};
|
|
5613
5607
|
|
|
5614
|
-
const parentNode = {
|
|
5615
|
-
childCount: 3,
|
|
5616
|
-
className: SearchHeader,
|
|
5617
|
-
onContextMenu: HandleHeaderContextMenu,
|
|
5618
|
-
role: None$2,
|
|
5619
|
-
type: Div
|
|
5620
|
-
};
|
|
5621
5608
|
const getSearchHeaderVirtualDom = (flags, message, searchInputErrorMessage, matchCount, focus, limitHitWarning) => {
|
|
5622
|
-
const
|
|
5609
|
+
const warningDom = getSearchHeaderLimitHitVirtualDom(limitHitWarning);
|
|
5610
|
+
const parentNode = {
|
|
5611
|
+
childCount: 2 + (warningDom.length > 0 ? 1 : 0),
|
|
5612
|
+
className: SearchHeader,
|
|
5613
|
+
onContextMenu: HandleHeaderContextMenu,
|
|
5614
|
+
role: None$2,
|
|
5615
|
+
type: Div
|
|
5616
|
+
};
|
|
5617
|
+
const dom = [parentNode, ...getSearchHeaderTopVirtualDom(flags, searchInputErrorMessage, matchCount, focus), ...getSearchHeaderDetailsVirtualDom(flags, message), ...warningDom];
|
|
5623
5618
|
return dom;
|
|
5624
5619
|
};
|
|
5625
5620
|
|
|
@@ -6176,12 +6171,7 @@ const replaceAllAndPrompt = async (workspacePath, items, replacement, matchCount
|
|
|
6176
6171
|
confirmMessage: confirmAccept,
|
|
6177
6172
|
title: confirmTitle
|
|
6178
6173
|
});
|
|
6179
|
-
|
|
6180
|
-
return false;
|
|
6181
|
-
}
|
|
6182
|
-
// TODO
|
|
6183
|
-
// await TextSearchReplaceAll.replaceAll(workspacePath, items, replacement)
|
|
6184
|
-
return true;
|
|
6174
|
+
return shouldReplace;
|
|
6185
6175
|
};
|
|
6186
6176
|
|
|
6187
6177
|
const replaceAllInFile = async state => {
|