@lvce-editor/text-search-view 1.14.1 → 1.14.2
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/textSearchViewMain.js +32 -5
- package/package.json +1 -1
|
@@ -2817,8 +2817,12 @@ const RevealInExplorerView = 'Reveal in Explorer View';
|
|
|
2817
2817
|
const ReplacingManyOccurrencesInManyFiles = 'Replacing {PH1} occurrences across {PH2} files…';
|
|
2818
2818
|
const ReplacingManyOccurrencesInOneFile = 'Replacing {PH1} occurrences across 1 file…';
|
|
2819
2819
|
const ReplacingOneOccurrenceInOneFile = 'Replacing 1 occurrence across 1 file…';
|
|
2820
|
+
const ReplacedManyOccurrencesInManyFilesNoValue = 'Replaced {PH1} occurrences across {PH2} files';
|
|
2820
2821
|
const ReplacedManyOccurrencesInManyFiles = "Replaced {PH1} occurrences across {PH2} files with '{PH3}'";
|
|
2822
|
+
const ReplacedManyOccurrencesInOneFile = "Replaced {PH1} occurrences across 1 file with '{PH2}'";
|
|
2823
|
+
const ReplacedManyOccurrencesInOneFileNoValue = 'Replaced {PH1} occurrences across 1 file';
|
|
2821
2824
|
const ReplacedOneOccurrenceInOneFile = "Replaced 1 occurrence across 1 file with '{PH1}'";
|
|
2825
|
+
const ReplacedOneOccurrenceInOneFileNoValue = 'Replaced 1 occurrence across 1 file';
|
|
2822
2826
|
const ReplaceForHistory = 'Replace (⇅ for history)';
|
|
2823
2827
|
const Search = 'Search';
|
|
2824
2828
|
const SearchForHistory = 'Search (⇅ for history)';
|
|
@@ -2911,12 +2915,20 @@ const replacedOneOccurrenceInOneFile = replacement => {
|
|
|
2911
2915
|
PH1: replacement
|
|
2912
2916
|
});
|
|
2913
2917
|
};
|
|
2918
|
+
const replacedOneOccurrenceInOneFileNoValue = () => {
|
|
2919
|
+
return i18nString(ReplacedOneOccurrenceInOneFileNoValue);
|
|
2920
|
+
};
|
|
2914
2921
|
const replacedManyOccurrencesInOneFile = (matchCount, replacement) => {
|
|
2915
|
-
return i18nString(
|
|
2922
|
+
return i18nString(ReplacedManyOccurrencesInOneFile, {
|
|
2916
2923
|
PH1: matchCount,
|
|
2917
2924
|
PH2: replacement
|
|
2918
2925
|
});
|
|
2919
2926
|
};
|
|
2927
|
+
const replacedManyOccurrencesInOneFileNoValue = matchCount => {
|
|
2928
|
+
return i18nString(ReplacedManyOccurrencesInOneFileNoValue, {
|
|
2929
|
+
PH1: matchCount
|
|
2930
|
+
});
|
|
2931
|
+
};
|
|
2920
2932
|
const replacedManyOccurrencesInManyFiles = (matchCount, fileCount, replacement) => {
|
|
2921
2933
|
return i18nString(ReplacedManyOccurrencesInManyFiles, {
|
|
2922
2934
|
PH1: matchCount,
|
|
@@ -2924,6 +2936,12 @@ const replacedManyOccurrencesInManyFiles = (matchCount, fileCount, replacement)
|
|
|
2924
2936
|
PH3: replacement
|
|
2925
2937
|
});
|
|
2926
2938
|
};
|
|
2939
|
+
const replacedManyOccurrencesInManyFilesNoValue = (matchCount, fileCount) => {
|
|
2940
|
+
return i18nString(ReplacedManyOccurrencesInManyFilesNoValue, {
|
|
2941
|
+
PH1: matchCount,
|
|
2942
|
+
PH2: fileCount
|
|
2943
|
+
});
|
|
2944
|
+
};
|
|
2927
2945
|
const replacingOneOccurrenceInOneFile = () => {
|
|
2928
2946
|
return i18nString(ReplacingOneOccurrenceInOneFile);
|
|
2929
2947
|
};
|
|
@@ -4115,6 +4133,15 @@ const applyBulkReplacement = async bulkEdits => {
|
|
|
4115
4133
|
};
|
|
4116
4134
|
|
|
4117
4135
|
const getReplacedMessage = (fileCount, replaceCount, replacement) => {
|
|
4136
|
+
if (replacement === '') {
|
|
4137
|
+
if (replaceCount === 1) {
|
|
4138
|
+
return replacedOneOccurrenceInOneFileNoValue();
|
|
4139
|
+
}
|
|
4140
|
+
if (fileCount === 1) {
|
|
4141
|
+
return replacedManyOccurrencesInOneFileNoValue(replaceCount);
|
|
4142
|
+
}
|
|
4143
|
+
return replacedManyOccurrencesInManyFilesNoValue(replaceCount, fileCount);
|
|
4144
|
+
}
|
|
4118
4145
|
if (replaceCount === 1) {
|
|
4119
4146
|
return replacedOneOccurrenceInOneFile(replacement);
|
|
4120
4147
|
}
|
|
@@ -6734,16 +6761,16 @@ const renderSelections = (oldState, newState) => {
|
|
|
6734
6761
|
};
|
|
6735
6762
|
|
|
6736
6763
|
const renderValue = (oldState, newState) => {
|
|
6737
|
-
return [SetValueByName, SearchValue, newState.value];
|
|
6764
|
+
return [SetValueByName, newState.uid, SearchValue, newState.value];
|
|
6738
6765
|
};
|
|
6739
6766
|
const renderReplacement = (oldState, newState) => {
|
|
6740
|
-
return [SetValueByName, ReplaceValue, newState.replacement];
|
|
6767
|
+
return [SetValueByName, newState.uid, ReplaceValue, newState.replacement];
|
|
6741
6768
|
};
|
|
6742
6769
|
const renderIncludeValue = (oldState, newState) => {
|
|
6743
|
-
return [SetValueByName, FilesToInclude, newState.includeValue];
|
|
6770
|
+
return [SetValueByName, newState.uid, FilesToInclude, newState.includeValue];
|
|
6744
6771
|
};
|
|
6745
6772
|
const renderExcludeValue = (oldState, newState) => {
|
|
6746
|
-
return [SetValueByName, FilesToExclude, newState.excludeValue];
|
|
6773
|
+
return [SetValueByName, newState.uid, FilesToExclude, newState.excludeValue];
|
|
6747
6774
|
};
|
|
6748
6775
|
|
|
6749
6776
|
const getRenderer = diffType => {
|