@leankylin-sheet/core 5.2.25 → 5.2.27
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/index.esm.js +126 -98
- package/dist/index.js +126 -98
- package/dist/locale/en.d.ts +4 -0
- package/dist/locale/es.d.ts +4 -0
- package/dist/locale/index.d.ts +4 -0
- package/dist/locale/zh.d.ts +4 -0
- package/dist/locale/zh_tw.d.ts +4 -0
- package/dist/modules/searchReplace.d.ts +6 -5
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -10504,6 +10504,10 @@ var en = {
|
|
|
10504
10504
|
regexTextbox: "Regular Expression",
|
|
10505
10505
|
wholeTextbox: "Whole word",
|
|
10506
10506
|
distinguishTextbox: "Case sensitive",
|
|
10507
|
+
searchTypeLabel: "Search In",
|
|
10508
|
+
searchTypeValue: "Value",
|
|
10509
|
+
searchTypeFormula: "Formula",
|
|
10510
|
+
searchTypeDisplay: "Display Value",
|
|
10507
10511
|
allReplaceBtn: "Replace All",
|
|
10508
10512
|
replaceBtn: "Replace",
|
|
10509
10513
|
allFindBtn: "Find All",
|
|
@@ -21080,6 +21084,10 @@ var zh = {
|
|
|
21080
21084
|
regexTextbox: "正则表达式匹配",
|
|
21081
21085
|
wholeTextbox: "整词匹配",
|
|
21082
21086
|
distinguishTextbox: "区分大小写匹配",
|
|
21087
|
+
searchTypeLabel: "搜索范围",
|
|
21088
|
+
searchTypeValue: "值",
|
|
21089
|
+
searchTypeFormula: "公式",
|
|
21090
|
+
searchTypeDisplay: "显示值",
|
|
21083
21091
|
allReplaceBtn: "全部替换",
|
|
21084
21092
|
replaceBtn: "替换",
|
|
21085
21093
|
allFindBtn: "查找全部",
|
|
@@ -31114,6 +31122,10 @@ var es = {
|
|
|
31114
31122
|
regexTextbox: "Expresión Regular",
|
|
31115
31123
|
wholeTextbox: "Palabra entera",
|
|
31116
31124
|
distinguishTextbox: "Distingue mayúsculas y minúsculas",
|
|
31125
|
+
searchTypeLabel: "Buscar en",
|
|
31126
|
+
searchTypeValue: "Valor",
|
|
31127
|
+
searchTypeFormula: "Fórmula",
|
|
31128
|
+
searchTypeDisplay: "Valor mostrado",
|
|
31117
31129
|
allReplaceBtn: "Reemplazar Todo",
|
|
31118
31130
|
replaceBtn: "Reemplazar",
|
|
31119
31131
|
allFindBtn: "Encontrar Todo",
|
|
@@ -53681,6 +53693,7 @@ function getSearchIndexArr(searchText, range, flowdata) {
|
|
|
53681
53693
|
regCheck = _ref.regCheck,
|
|
53682
53694
|
wordCheck = _ref.wordCheck,
|
|
53683
53695
|
caseCheck = _ref.caseCheck;
|
|
53696
|
+
var searchType = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "v";
|
|
53684
53697
|
var arr = [];
|
|
53685
53698
|
var obj = {};
|
|
53686
53699
|
for (var s = 0; s < range.length; s += 1) {
|
|
@@ -53692,7 +53705,15 @@ function getSearchIndexArr(searchText, range, flowdata) {
|
|
|
53692
53705
|
for (var c = c1; c <= c2; c += 1) {
|
|
53693
53706
|
var cell = flowdata[r][c];
|
|
53694
53707
|
if (cell != null) {
|
|
53695
|
-
var value =
|
|
53708
|
+
var value = void 0;
|
|
53709
|
+
if (searchType === "f") {
|
|
53710
|
+
value = cell.f;
|
|
53711
|
+
} else if (searchType === "m") {
|
|
53712
|
+
var _cell$m;
|
|
53713
|
+
value = (_cell$m = cell.m) !== null && _cell$m !== void 0 ? _cell$m : cell.v;
|
|
53714
|
+
} else {
|
|
53715
|
+
value = valueShowEs(r, c, flowdata);
|
|
53716
|
+
}
|
|
53696
53717
|
if (value === 0) {
|
|
53697
53718
|
value = value.toString();
|
|
53698
53719
|
}
|
|
@@ -53767,117 +53788,122 @@ function getSearchIndexArr(searchText, range, flowdata) {
|
|
|
53767
53788
|
}
|
|
53768
53789
|
return arr;
|
|
53769
53790
|
}
|
|
53791
|
+
function searchSheet(searchText, checkModes, sheet) {
|
|
53792
|
+
var searchType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "v";
|
|
53793
|
+
var flowdata = sheet.data;
|
|
53794
|
+
if (!flowdata || flowdata.length === 0 || flowdata[0].length === 0) {
|
|
53795
|
+
return [];
|
|
53796
|
+
}
|
|
53797
|
+
var range = [{
|
|
53798
|
+
row: [0, flowdata.length - 1],
|
|
53799
|
+
column: [0, flowdata[0].length - 1]
|
|
53800
|
+
}];
|
|
53801
|
+
return getSearchIndexArr(searchText, range, flowdata, checkModes, searchType);
|
|
53802
|
+
}
|
|
53770
53803
|
function searchNext(ctx, searchText, checkModes) {
|
|
53771
|
-
var
|
|
53804
|
+
var _getSheetIndex, _currentSelection$0$r, _currentSelection$, _currentSelection$0$c, _currentSelection$2;
|
|
53805
|
+
var searchType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "v";
|
|
53772
53806
|
var _locale = locale(ctx),
|
|
53773
53807
|
findAndReplace = _locale.findAndReplace;
|
|
53774
|
-
|
|
53775
|
-
if (searchText === "" || searchText == null || flowdata == null) {
|
|
53808
|
+
if (searchText === "" || searchText == null) {
|
|
53776
53809
|
return findAndReplace.searchInputTip;
|
|
53777
53810
|
}
|
|
53778
|
-
var
|
|
53779
|
-
if (
|
|
53780
|
-
range = [{
|
|
53781
|
-
row: [0, flowdata.length - 1],
|
|
53782
|
-
column: [0, flowdata[0].length - 1],
|
|
53783
|
-
row_focus: 0,
|
|
53784
|
-
column_focus: 0
|
|
53785
|
-
}];
|
|
53786
|
-
} else {
|
|
53787
|
-
range = _.assign([], ctx.luckysheet_select_save);
|
|
53788
|
-
}
|
|
53789
|
-
var searchIndexArr = getSearchIndexArr(searchText, range, flowdata, checkModes);
|
|
53790
|
-
if (searchIndexArr.length === 0) {
|
|
53811
|
+
var sheets = ctx.luckysheetfile;
|
|
53812
|
+
if (!sheets || sheets.length === 0) {
|
|
53791
53813
|
return findAndReplace.noFindTip;
|
|
53792
53814
|
}
|
|
53793
|
-
var
|
|
53794
|
-
|
|
53795
|
-
|
|
53796
|
-
|
|
53797
|
-
|
|
53798
|
-
|
|
53799
|
-
|
|
53800
|
-
|
|
53801
|
-
|
|
53802
|
-
|
|
53803
|
-
|
|
53804
|
-
|
|
53815
|
+
var currentSheetIndex = (_getSheetIndex = getSheetIndex(ctx, ctx.currentSheetId)) !== null && _getSheetIndex !== void 0 ? _getSheetIndex : 0;
|
|
53816
|
+
var currentSelection = ctx.luckysheet_select_save;
|
|
53817
|
+
var currentR = (_currentSelection$0$r = currentSelection === null || currentSelection === void 0 ? void 0 : (_currentSelection$ = currentSelection[0]) === null || _currentSelection$ === void 0 ? void 0 : _currentSelection$.row_focus) !== null && _currentSelection$0$r !== void 0 ? _currentSelection$0$r : -1;
|
|
53818
|
+
var currentC = (_currentSelection$0$c = currentSelection === null || currentSelection === void 0 ? void 0 : (_currentSelection$2 = currentSelection[0]) === null || _currentSelection$2 === void 0 ? void 0 : _currentSelection$2.column_focus) !== null && _currentSelection$0$c !== void 0 ? _currentSelection$0$c : -1;
|
|
53819
|
+
var totalSheets = sheets.length;
|
|
53820
|
+
for (var offset = 0; offset < totalSheets; offset += 1) {
|
|
53821
|
+
var sheetIdx = (currentSheetIndex + offset) % totalSheets;
|
|
53822
|
+
var sheet = sheets[sheetIdx];
|
|
53823
|
+
var matches = searchSheet(searchText, checkModes, sheet, searchType);
|
|
53824
|
+
if (matches.length === 0) continue;
|
|
53825
|
+
var foundMatch = null;
|
|
53826
|
+
if (offset === 0 && currentR >= 0 && currentC >= 0) {
|
|
53827
|
+
for (var i = 0; i < matches.length; i += 1) {
|
|
53828
|
+
var m = matches[i];
|
|
53829
|
+
if (m.r > currentR || m.r === currentR && m.c > currentC) {
|
|
53830
|
+
foundMatch = m;
|
|
53805
53831
|
break;
|
|
53806
53832
|
}
|
|
53807
53833
|
}
|
|
53808
53834
|
}
|
|
53809
|
-
|
|
53810
|
-
|
|
53811
|
-
|
|
53812
|
-
}
|
|
53813
|
-
|
|
53814
|
-
|
|
53815
|
-
|
|
53816
|
-
|
|
53817
|
-
|
|
53818
|
-
if (_i === searchIndexArr.length - 1) {
|
|
53819
|
-
count = 0;
|
|
53820
|
-
} else {
|
|
53821
|
-
count = _i + 1;
|
|
53822
|
-
}
|
|
53823
|
-
break;
|
|
53835
|
+
if (!foundMatch && offset > 0) {
|
|
53836
|
+
var _matches = _slicedToArray(matches, 1);
|
|
53837
|
+
foundMatch = _matches[0];
|
|
53838
|
+
}
|
|
53839
|
+
if (!foundMatch && offset === 0 && matches.length > 0) {
|
|
53840
|
+
var _matches2 = _slicedToArray(matches, 1);
|
|
53841
|
+
foundMatch = _matches2[0];
|
|
53842
|
+
if (matches.length === 1 && matches[0].r === currentR && matches[0].c === currentC) {
|
|
53843
|
+
foundMatch = null;
|
|
53824
53844
|
}
|
|
53825
53845
|
}
|
|
53826
|
-
|
|
53827
|
-
|
|
53828
|
-
|
|
53829
|
-
var c1 = range[s].column[0];
|
|
53830
|
-
var c2 = range[s].column[1];
|
|
53831
|
-
if (searchIndexArr[count].r >= r1 && searchIndexArr[count].r <= r2 && searchIndexArr[count].c >= c1 && searchIndexArr[count].c <= c2) {
|
|
53832
|
-
var obj = range[s];
|
|
53833
|
-
obj.row_focus = searchIndexArr[count].r;
|
|
53834
|
-
obj.column_focus = searchIndexArr[count].c;
|
|
53835
|
-
range.splice(s, 1);
|
|
53836
|
-
range.push(obj);
|
|
53837
|
-
break;
|
|
53846
|
+
if (foundMatch) {
|
|
53847
|
+
if (sheetIdx !== currentSheetIndex) {
|
|
53848
|
+
changeSheet(ctx, sheet.id);
|
|
53838
53849
|
}
|
|
53850
|
+
ctx.luckysheet_select_save = normalizeSelection(ctx, [{
|
|
53851
|
+
row: [foundMatch.r, foundMatch.r],
|
|
53852
|
+
column: [foundMatch.c, foundMatch.c]
|
|
53853
|
+
}]);
|
|
53854
|
+
scrollToHighlightCell(ctx, foundMatch.r, foundMatch.c);
|
|
53855
|
+
return null;
|
|
53839
53856
|
}
|
|
53840
|
-
ctx.luckysheet_select_save = range;
|
|
53841
53857
|
}
|
|
53842
|
-
|
|
53843
|
-
return null;
|
|
53858
|
+
return findAndReplace.noFindTip;
|
|
53844
53859
|
}
|
|
53845
53860
|
function searchAll(ctx, searchText, checkModes) {
|
|
53846
|
-
var
|
|
53847
|
-
var flowdata = getFlowdata(ctx);
|
|
53861
|
+
var searchType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "v";
|
|
53848
53862
|
var searchResult = [];
|
|
53849
|
-
if (searchText === "" || searchText == null
|
|
53863
|
+
if (searchText === "" || searchText == null) {
|
|
53850
53864
|
return searchResult;
|
|
53851
53865
|
}
|
|
53852
|
-
var
|
|
53853
|
-
if (
|
|
53854
|
-
range = [{
|
|
53855
|
-
row: [0, flowdata.length - 1],
|
|
53856
|
-
column: [0, flowdata[0].length - 1]
|
|
53857
|
-
}];
|
|
53858
|
-
} else {
|
|
53859
|
-
range = _.assign([], ctx.luckysheet_select_save);
|
|
53860
|
-
}
|
|
53861
|
-
var searchIndexArr = getSearchIndexArr(searchText, range, flowdata, checkModes);
|
|
53862
|
-
if (searchIndexArr.length === 0) {
|
|
53866
|
+
var sheets = ctx.luckysheetfile;
|
|
53867
|
+
if (!sheets || sheets.length === 0) {
|
|
53863
53868
|
return searchResult;
|
|
53864
53869
|
}
|
|
53865
|
-
|
|
53866
|
-
|
|
53867
|
-
var
|
|
53868
|
-
|
|
53869
|
-
|
|
53870
|
-
|
|
53871
|
-
|
|
53872
|
-
|
|
53873
|
-
|
|
53874
|
-
|
|
53875
|
-
|
|
53870
|
+
var firstMatch = null;
|
|
53871
|
+
for (var sheetIdx = 0; sheetIdx < sheets.length; sheetIdx += 1) {
|
|
53872
|
+
var sheet = sheets[sheetIdx];
|
|
53873
|
+
var matches = searchSheet(searchText, checkModes, sheet, searchType);
|
|
53874
|
+
if (matches.length === 0) continue;
|
|
53875
|
+
var flowdata = sheet.data;
|
|
53876
|
+
if (!flowdata) continue;
|
|
53877
|
+
for (var i = 0; i < matches.length; i += 1) {
|
|
53878
|
+
var match = matches[i];
|
|
53879
|
+
var value_ShowEs = valueShowEs(match.r, match.c, flowdata).toString();
|
|
53880
|
+
searchResult.push({
|
|
53881
|
+
r: match.r,
|
|
53882
|
+
c: match.c,
|
|
53883
|
+
sheetName: sheet.name,
|
|
53884
|
+
sheetId: sheet.id,
|
|
53885
|
+
cellPosition: "".concat(chatatABC(match.c)).concat(match.r + 1),
|
|
53886
|
+
value: value_ShowEs
|
|
53887
|
+
});
|
|
53888
|
+
if (!firstMatch) {
|
|
53889
|
+
firstMatch = {
|
|
53890
|
+
r: match.r,
|
|
53891
|
+
c: match.c,
|
|
53892
|
+
sheetId: sheet.id
|
|
53893
|
+
};
|
|
53894
|
+
}
|
|
53895
|
+
}
|
|
53896
|
+
}
|
|
53897
|
+
if (firstMatch) {
|
|
53898
|
+
if (firstMatch.sheetId !== ctx.currentSheetId) {
|
|
53899
|
+
changeSheet(ctx, firstMatch.sheetId);
|
|
53900
|
+
}
|
|
53901
|
+
ctx.luckysheet_select_save = normalizeSelection(ctx, [{
|
|
53902
|
+
row: [firstMatch.r, firstMatch.r],
|
|
53903
|
+
column: [firstMatch.c, firstMatch.c]
|
|
53904
|
+
}]);
|
|
53905
|
+
scrollToHighlightCell(ctx, firstMatch.r, firstMatch.c);
|
|
53876
53906
|
}
|
|
53877
|
-
ctx.luckysheet_select_save = normalizeSelection(ctx, [{
|
|
53878
|
-
row: [searchIndexArr[0].r, searchIndexArr[0].r],
|
|
53879
|
-
column: [searchIndexArr[0].c, searchIndexArr[0].c]
|
|
53880
|
-
}]);
|
|
53881
53907
|
return searchResult;
|
|
53882
53908
|
}
|
|
53883
53909
|
function onSearchDialogMoveStart(globalCache, e, container) {
|
|
@@ -53926,7 +53952,8 @@ function onSearchDialogMoveEnd(globalCache) {
|
|
|
53926
53952
|
_.set(globalCache, "searchDialog.moveProps", undefined);
|
|
53927
53953
|
}
|
|
53928
53954
|
function replace(ctx, searchText, replaceText, checkModes) {
|
|
53929
|
-
var _ctx$
|
|
53955
|
+
var _ctx$luckysheet_selec, _ctx$luckysheet_selec2;
|
|
53956
|
+
var searchType = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "v";
|
|
53930
53957
|
var _locale2 = locale(ctx),
|
|
53931
53958
|
findAndReplace = _locale2.findAndReplace;
|
|
53932
53959
|
var allowEdit = isAllowEdit(ctx);
|
|
@@ -53938,7 +53965,7 @@ function replace(ctx, searchText, replaceText, checkModes) {
|
|
|
53938
53965
|
return findAndReplace.searchInputTip;
|
|
53939
53966
|
}
|
|
53940
53967
|
var range;
|
|
53941
|
-
if (_.size(ctx.luckysheet_select_save) === 0 || ((_ctx$
|
|
53968
|
+
if (_.size(ctx.luckysheet_select_save) === 0 || ((_ctx$luckysheet_selec = ctx.luckysheet_select_save) === null || _ctx$luckysheet_selec === void 0 ? void 0 : _ctx$luckysheet_selec.length) === 1 && ctx.luckysheet_select_save[0].row[0] === ctx.luckysheet_select_save[0].row[1] && ctx.luckysheet_select_save[0].column[0] === ctx.luckysheet_select_save[0].column[1]) {
|
|
53942
53969
|
range = [{
|
|
53943
53970
|
row: [0, flowdata.length - 1],
|
|
53944
53971
|
column: [0, flowdata[0].length - 1]
|
|
@@ -53946,12 +53973,12 @@ function replace(ctx, searchText, replaceText, checkModes) {
|
|
|
53946
53973
|
} else {
|
|
53947
53974
|
range = _.assign([], ctx.luckysheet_select_save);
|
|
53948
53975
|
}
|
|
53949
|
-
var searchIndexArr = getSearchIndexArr(searchText, range, flowdata, checkModes);
|
|
53976
|
+
var searchIndexArr = getSearchIndexArr(searchText, range, flowdata, checkModes, searchType);
|
|
53950
53977
|
if (searchIndexArr.length === 0) {
|
|
53951
53978
|
return findAndReplace.noReplceTip;
|
|
53952
53979
|
}
|
|
53953
53980
|
var count = null;
|
|
53954
|
-
var last = (_ctx$
|
|
53981
|
+
var last = (_ctx$luckysheet_selec2 = ctx.luckysheet_select_save) === null || _ctx$luckysheet_selec2 === void 0 ? void 0 : _ctx$luckysheet_selec2[ctx.luckysheet_select_save.length - 1];
|
|
53955
53982
|
var rf = last === null || last === void 0 ? void 0 : last.row_focus;
|
|
53956
53983
|
var cf = last === null || last === void 0 ? void 0 : last.column_focus;
|
|
53957
53984
|
for (var i = 0; i < searchIndexArr.length; i += 1) {
|
|
@@ -53994,7 +54021,8 @@ function replace(ctx, searchText, replaceText, checkModes) {
|
|
|
53994
54021
|
return null;
|
|
53995
54022
|
}
|
|
53996
54023
|
function replaceAll(ctx, searchText, replaceText, checkModes) {
|
|
53997
|
-
var _ctx$
|
|
54024
|
+
var _ctx$luckysheet_selec3;
|
|
54025
|
+
var searchType = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "v";
|
|
53998
54026
|
var _locale3 = locale(ctx),
|
|
53999
54027
|
findAndReplace = _locale3.findAndReplace;
|
|
54000
54028
|
var allowEdit = isAllowEdit(ctx);
|
|
@@ -54006,7 +54034,7 @@ function replaceAll(ctx, searchText, replaceText, checkModes) {
|
|
|
54006
54034
|
return findAndReplace.searchInputTip;
|
|
54007
54035
|
}
|
|
54008
54036
|
var range;
|
|
54009
|
-
if (_.size(ctx.luckysheet_select_save) === 0 || ((_ctx$
|
|
54037
|
+
if (_.size(ctx.luckysheet_select_save) === 0 || ((_ctx$luckysheet_selec3 = ctx.luckysheet_select_save) === null || _ctx$luckysheet_selec3 === void 0 ? void 0 : _ctx$luckysheet_selec3.length) === 1 && ctx.luckysheet_select_save[0].row[0] === ctx.luckysheet_select_save[0].row[1] && ctx.luckysheet_select_save[0].column[0] === ctx.luckysheet_select_save[0].column[1]) {
|
|
54010
54038
|
range = [{
|
|
54011
54039
|
row: [0, flowdata.length - 1],
|
|
54012
54040
|
column: [0, flowdata[0].length - 1]
|
|
@@ -54014,7 +54042,7 @@ function replaceAll(ctx, searchText, replaceText, checkModes) {
|
|
|
54014
54042
|
} else {
|
|
54015
54043
|
range = _.assign([], ctx.luckysheet_select_save);
|
|
54016
54044
|
}
|
|
54017
|
-
var searchIndexArr = getSearchIndexArr(searchText, range, flowdata, checkModes);
|
|
54045
|
+
var searchIndexArr = getSearchIndexArr(searchText, range, flowdata, checkModes, searchType);
|
|
54018
54046
|
if (searchIndexArr.length === 0) {
|
|
54019
54047
|
return findAndReplace.noReplceTip;
|
|
54020
54048
|
}
|
|
@@ -54039,9 +54067,9 @@ function replaceAll(ctx, searchText, replaceText, checkModes) {
|
|
|
54039
54067
|
} else {
|
|
54040
54068
|
reg = new RegExp(getRegExpStr(searchText), "ig");
|
|
54041
54069
|
}
|
|
54042
|
-
for (var
|
|
54043
|
-
var _r = searchIndexArr[
|
|
54044
|
-
var _c = searchIndexArr[
|
|
54070
|
+
for (var _i = 0; _i < searchIndexArr.length; _i += 1) {
|
|
54071
|
+
var _r = searchIndexArr[_i].r;
|
|
54072
|
+
var _c = searchIndexArr[_i].c;
|
|
54045
54073
|
var _v2 = valueShowEs(_r, _c, d).toString().replace(reg, replaceText);
|
|
54046
54074
|
setCellValue(ctx, _r, _c, d, _v2);
|
|
54047
54075
|
range.push({
|
package/dist/index.js
CHANGED
|
@@ -10514,6 +10514,10 @@ var en = {
|
|
|
10514
10514
|
regexTextbox: "Regular Expression",
|
|
10515
10515
|
wholeTextbox: "Whole word",
|
|
10516
10516
|
distinguishTextbox: "Case sensitive",
|
|
10517
|
+
searchTypeLabel: "Search In",
|
|
10518
|
+
searchTypeValue: "Value",
|
|
10519
|
+
searchTypeFormula: "Formula",
|
|
10520
|
+
searchTypeDisplay: "Display Value",
|
|
10517
10521
|
allReplaceBtn: "Replace All",
|
|
10518
10522
|
replaceBtn: "Replace",
|
|
10519
10523
|
allFindBtn: "Find All",
|
|
@@ -21090,6 +21094,10 @@ var zh = {
|
|
|
21090
21094
|
regexTextbox: "正则表达式匹配",
|
|
21091
21095
|
wholeTextbox: "整词匹配",
|
|
21092
21096
|
distinguishTextbox: "区分大小写匹配",
|
|
21097
|
+
searchTypeLabel: "搜索范围",
|
|
21098
|
+
searchTypeValue: "值",
|
|
21099
|
+
searchTypeFormula: "公式",
|
|
21100
|
+
searchTypeDisplay: "显示值",
|
|
21093
21101
|
allReplaceBtn: "全部替换",
|
|
21094
21102
|
replaceBtn: "替换",
|
|
21095
21103
|
allFindBtn: "查找全部",
|
|
@@ -31124,6 +31132,10 @@ var es = {
|
|
|
31124
31132
|
regexTextbox: "Expresión Regular",
|
|
31125
31133
|
wholeTextbox: "Palabra entera",
|
|
31126
31134
|
distinguishTextbox: "Distingue mayúsculas y minúsculas",
|
|
31135
|
+
searchTypeLabel: "Buscar en",
|
|
31136
|
+
searchTypeValue: "Valor",
|
|
31137
|
+
searchTypeFormula: "Fórmula",
|
|
31138
|
+
searchTypeDisplay: "Valor mostrado",
|
|
31127
31139
|
allReplaceBtn: "Reemplazar Todo",
|
|
31128
31140
|
replaceBtn: "Reemplazar",
|
|
31129
31141
|
allFindBtn: "Encontrar Todo",
|
|
@@ -53691,6 +53703,7 @@ function getSearchIndexArr(searchText, range, flowdata) {
|
|
|
53691
53703
|
regCheck = _ref.regCheck,
|
|
53692
53704
|
wordCheck = _ref.wordCheck,
|
|
53693
53705
|
caseCheck = _ref.caseCheck;
|
|
53706
|
+
var searchType = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "v";
|
|
53694
53707
|
var arr = [];
|
|
53695
53708
|
var obj = {};
|
|
53696
53709
|
for (var s = 0; s < range.length; s += 1) {
|
|
@@ -53702,7 +53715,15 @@ function getSearchIndexArr(searchText, range, flowdata) {
|
|
|
53702
53715
|
for (var c = c1; c <= c2; c += 1) {
|
|
53703
53716
|
var cell = flowdata[r][c];
|
|
53704
53717
|
if (cell != null) {
|
|
53705
|
-
var value =
|
|
53718
|
+
var value = void 0;
|
|
53719
|
+
if (searchType === "f") {
|
|
53720
|
+
value = cell.f;
|
|
53721
|
+
} else if (searchType === "m") {
|
|
53722
|
+
var _cell$m;
|
|
53723
|
+
value = (_cell$m = cell.m) !== null && _cell$m !== void 0 ? _cell$m : cell.v;
|
|
53724
|
+
} else {
|
|
53725
|
+
value = valueShowEs(r, c, flowdata);
|
|
53726
|
+
}
|
|
53706
53727
|
if (value === 0) {
|
|
53707
53728
|
value = value.toString();
|
|
53708
53729
|
}
|
|
@@ -53777,117 +53798,122 @@ function getSearchIndexArr(searchText, range, flowdata) {
|
|
|
53777
53798
|
}
|
|
53778
53799
|
return arr;
|
|
53779
53800
|
}
|
|
53801
|
+
function searchSheet(searchText, checkModes, sheet) {
|
|
53802
|
+
var searchType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "v";
|
|
53803
|
+
var flowdata = sheet.data;
|
|
53804
|
+
if (!flowdata || flowdata.length === 0 || flowdata[0].length === 0) {
|
|
53805
|
+
return [];
|
|
53806
|
+
}
|
|
53807
|
+
var range = [{
|
|
53808
|
+
row: [0, flowdata.length - 1],
|
|
53809
|
+
column: [0, flowdata[0].length - 1]
|
|
53810
|
+
}];
|
|
53811
|
+
return getSearchIndexArr(searchText, range, flowdata, checkModes, searchType);
|
|
53812
|
+
}
|
|
53780
53813
|
function searchNext(ctx, searchText, checkModes) {
|
|
53781
|
-
var
|
|
53814
|
+
var _getSheetIndex, _currentSelection$0$r, _currentSelection$, _currentSelection$0$c, _currentSelection$2;
|
|
53815
|
+
var searchType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "v";
|
|
53782
53816
|
var _locale = locale(ctx),
|
|
53783
53817
|
findAndReplace = _locale.findAndReplace;
|
|
53784
|
-
|
|
53785
|
-
if (searchText === "" || searchText == null || flowdata == null) {
|
|
53818
|
+
if (searchText === "" || searchText == null) {
|
|
53786
53819
|
return findAndReplace.searchInputTip;
|
|
53787
53820
|
}
|
|
53788
|
-
var
|
|
53789
|
-
if (
|
|
53790
|
-
range = [{
|
|
53791
|
-
row: [0, flowdata.length - 1],
|
|
53792
|
-
column: [0, flowdata[0].length - 1],
|
|
53793
|
-
row_focus: 0,
|
|
53794
|
-
column_focus: 0
|
|
53795
|
-
}];
|
|
53796
|
-
} else {
|
|
53797
|
-
range = ___default['default'].assign([], ctx.luckysheet_select_save);
|
|
53798
|
-
}
|
|
53799
|
-
var searchIndexArr = getSearchIndexArr(searchText, range, flowdata, checkModes);
|
|
53800
|
-
if (searchIndexArr.length === 0) {
|
|
53821
|
+
var sheets = ctx.luckysheetfile;
|
|
53822
|
+
if (!sheets || sheets.length === 0) {
|
|
53801
53823
|
return findAndReplace.noFindTip;
|
|
53802
53824
|
}
|
|
53803
|
-
var
|
|
53804
|
-
|
|
53805
|
-
|
|
53806
|
-
|
|
53807
|
-
|
|
53808
|
-
|
|
53809
|
-
|
|
53810
|
-
|
|
53811
|
-
|
|
53812
|
-
|
|
53813
|
-
|
|
53814
|
-
|
|
53825
|
+
var currentSheetIndex = (_getSheetIndex = getSheetIndex(ctx, ctx.currentSheetId)) !== null && _getSheetIndex !== void 0 ? _getSheetIndex : 0;
|
|
53826
|
+
var currentSelection = ctx.luckysheet_select_save;
|
|
53827
|
+
var currentR = (_currentSelection$0$r = currentSelection === null || currentSelection === void 0 ? void 0 : (_currentSelection$ = currentSelection[0]) === null || _currentSelection$ === void 0 ? void 0 : _currentSelection$.row_focus) !== null && _currentSelection$0$r !== void 0 ? _currentSelection$0$r : -1;
|
|
53828
|
+
var currentC = (_currentSelection$0$c = currentSelection === null || currentSelection === void 0 ? void 0 : (_currentSelection$2 = currentSelection[0]) === null || _currentSelection$2 === void 0 ? void 0 : _currentSelection$2.column_focus) !== null && _currentSelection$0$c !== void 0 ? _currentSelection$0$c : -1;
|
|
53829
|
+
var totalSheets = sheets.length;
|
|
53830
|
+
for (var offset = 0; offset < totalSheets; offset += 1) {
|
|
53831
|
+
var sheetIdx = (currentSheetIndex + offset) % totalSheets;
|
|
53832
|
+
var sheet = sheets[sheetIdx];
|
|
53833
|
+
var matches = searchSheet(searchText, checkModes, sheet, searchType);
|
|
53834
|
+
if (matches.length === 0) continue;
|
|
53835
|
+
var foundMatch = null;
|
|
53836
|
+
if (offset === 0 && currentR >= 0 && currentC >= 0) {
|
|
53837
|
+
for (var i = 0; i < matches.length; i += 1) {
|
|
53838
|
+
var m = matches[i];
|
|
53839
|
+
if (m.r > currentR || m.r === currentR && m.c > currentC) {
|
|
53840
|
+
foundMatch = m;
|
|
53815
53841
|
break;
|
|
53816
53842
|
}
|
|
53817
53843
|
}
|
|
53818
53844
|
}
|
|
53819
|
-
|
|
53820
|
-
|
|
53821
|
-
|
|
53822
|
-
}
|
|
53823
|
-
|
|
53824
|
-
|
|
53825
|
-
|
|
53826
|
-
|
|
53827
|
-
|
|
53828
|
-
if (_i === searchIndexArr.length - 1) {
|
|
53829
|
-
count = 0;
|
|
53830
|
-
} else {
|
|
53831
|
-
count = _i + 1;
|
|
53832
|
-
}
|
|
53833
|
-
break;
|
|
53845
|
+
if (!foundMatch && offset > 0) {
|
|
53846
|
+
var _matches = _slicedToArray(matches, 1);
|
|
53847
|
+
foundMatch = _matches[0];
|
|
53848
|
+
}
|
|
53849
|
+
if (!foundMatch && offset === 0 && matches.length > 0) {
|
|
53850
|
+
var _matches2 = _slicedToArray(matches, 1);
|
|
53851
|
+
foundMatch = _matches2[0];
|
|
53852
|
+
if (matches.length === 1 && matches[0].r === currentR && matches[0].c === currentC) {
|
|
53853
|
+
foundMatch = null;
|
|
53834
53854
|
}
|
|
53835
53855
|
}
|
|
53836
|
-
|
|
53837
|
-
|
|
53838
|
-
|
|
53839
|
-
var c1 = range[s].column[0];
|
|
53840
|
-
var c2 = range[s].column[1];
|
|
53841
|
-
if (searchIndexArr[count].r >= r1 && searchIndexArr[count].r <= r2 && searchIndexArr[count].c >= c1 && searchIndexArr[count].c <= c2) {
|
|
53842
|
-
var obj = range[s];
|
|
53843
|
-
obj.row_focus = searchIndexArr[count].r;
|
|
53844
|
-
obj.column_focus = searchIndexArr[count].c;
|
|
53845
|
-
range.splice(s, 1);
|
|
53846
|
-
range.push(obj);
|
|
53847
|
-
break;
|
|
53856
|
+
if (foundMatch) {
|
|
53857
|
+
if (sheetIdx !== currentSheetIndex) {
|
|
53858
|
+
changeSheet(ctx, sheet.id);
|
|
53848
53859
|
}
|
|
53860
|
+
ctx.luckysheet_select_save = normalizeSelection(ctx, [{
|
|
53861
|
+
row: [foundMatch.r, foundMatch.r],
|
|
53862
|
+
column: [foundMatch.c, foundMatch.c]
|
|
53863
|
+
}]);
|
|
53864
|
+
scrollToHighlightCell(ctx, foundMatch.r, foundMatch.c);
|
|
53865
|
+
return null;
|
|
53849
53866
|
}
|
|
53850
|
-
ctx.luckysheet_select_save = range;
|
|
53851
53867
|
}
|
|
53852
|
-
|
|
53853
|
-
return null;
|
|
53868
|
+
return findAndReplace.noFindTip;
|
|
53854
53869
|
}
|
|
53855
53870
|
function searchAll(ctx, searchText, checkModes) {
|
|
53856
|
-
var
|
|
53857
|
-
var flowdata = getFlowdata(ctx);
|
|
53871
|
+
var searchType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "v";
|
|
53858
53872
|
var searchResult = [];
|
|
53859
|
-
if (searchText === "" || searchText == null
|
|
53873
|
+
if (searchText === "" || searchText == null) {
|
|
53860
53874
|
return searchResult;
|
|
53861
53875
|
}
|
|
53862
|
-
var
|
|
53863
|
-
if (
|
|
53864
|
-
range = [{
|
|
53865
|
-
row: [0, flowdata.length - 1],
|
|
53866
|
-
column: [0, flowdata[0].length - 1]
|
|
53867
|
-
}];
|
|
53868
|
-
} else {
|
|
53869
|
-
range = ___default['default'].assign([], ctx.luckysheet_select_save);
|
|
53870
|
-
}
|
|
53871
|
-
var searchIndexArr = getSearchIndexArr(searchText, range, flowdata, checkModes);
|
|
53872
|
-
if (searchIndexArr.length === 0) {
|
|
53876
|
+
var sheets = ctx.luckysheetfile;
|
|
53877
|
+
if (!sheets || sheets.length === 0) {
|
|
53873
53878
|
return searchResult;
|
|
53874
53879
|
}
|
|
53875
|
-
|
|
53876
|
-
|
|
53877
|
-
var
|
|
53878
|
-
|
|
53879
|
-
|
|
53880
|
-
|
|
53881
|
-
|
|
53882
|
-
|
|
53883
|
-
|
|
53884
|
-
|
|
53885
|
-
|
|
53880
|
+
var firstMatch = null;
|
|
53881
|
+
for (var sheetIdx = 0; sheetIdx < sheets.length; sheetIdx += 1) {
|
|
53882
|
+
var sheet = sheets[sheetIdx];
|
|
53883
|
+
var matches = searchSheet(searchText, checkModes, sheet, searchType);
|
|
53884
|
+
if (matches.length === 0) continue;
|
|
53885
|
+
var flowdata = sheet.data;
|
|
53886
|
+
if (!flowdata) continue;
|
|
53887
|
+
for (var i = 0; i < matches.length; i += 1) {
|
|
53888
|
+
var match = matches[i];
|
|
53889
|
+
var value_ShowEs = valueShowEs(match.r, match.c, flowdata).toString();
|
|
53890
|
+
searchResult.push({
|
|
53891
|
+
r: match.r,
|
|
53892
|
+
c: match.c,
|
|
53893
|
+
sheetName: sheet.name,
|
|
53894
|
+
sheetId: sheet.id,
|
|
53895
|
+
cellPosition: "".concat(chatatABC(match.c)).concat(match.r + 1),
|
|
53896
|
+
value: value_ShowEs
|
|
53897
|
+
});
|
|
53898
|
+
if (!firstMatch) {
|
|
53899
|
+
firstMatch = {
|
|
53900
|
+
r: match.r,
|
|
53901
|
+
c: match.c,
|
|
53902
|
+
sheetId: sheet.id
|
|
53903
|
+
};
|
|
53904
|
+
}
|
|
53905
|
+
}
|
|
53906
|
+
}
|
|
53907
|
+
if (firstMatch) {
|
|
53908
|
+
if (firstMatch.sheetId !== ctx.currentSheetId) {
|
|
53909
|
+
changeSheet(ctx, firstMatch.sheetId);
|
|
53910
|
+
}
|
|
53911
|
+
ctx.luckysheet_select_save = normalizeSelection(ctx, [{
|
|
53912
|
+
row: [firstMatch.r, firstMatch.r],
|
|
53913
|
+
column: [firstMatch.c, firstMatch.c]
|
|
53914
|
+
}]);
|
|
53915
|
+
scrollToHighlightCell(ctx, firstMatch.r, firstMatch.c);
|
|
53886
53916
|
}
|
|
53887
|
-
ctx.luckysheet_select_save = normalizeSelection(ctx, [{
|
|
53888
|
-
row: [searchIndexArr[0].r, searchIndexArr[0].r],
|
|
53889
|
-
column: [searchIndexArr[0].c, searchIndexArr[0].c]
|
|
53890
|
-
}]);
|
|
53891
53917
|
return searchResult;
|
|
53892
53918
|
}
|
|
53893
53919
|
function onSearchDialogMoveStart(globalCache, e, container) {
|
|
@@ -53936,7 +53962,8 @@ function onSearchDialogMoveEnd(globalCache) {
|
|
|
53936
53962
|
___default['default'].set(globalCache, "searchDialog.moveProps", undefined);
|
|
53937
53963
|
}
|
|
53938
53964
|
function replace(ctx, searchText, replaceText, checkModes) {
|
|
53939
|
-
var _ctx$
|
|
53965
|
+
var _ctx$luckysheet_selec, _ctx$luckysheet_selec2;
|
|
53966
|
+
var searchType = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "v";
|
|
53940
53967
|
var _locale2 = locale(ctx),
|
|
53941
53968
|
findAndReplace = _locale2.findAndReplace;
|
|
53942
53969
|
var allowEdit = isAllowEdit(ctx);
|
|
@@ -53948,7 +53975,7 @@ function replace(ctx, searchText, replaceText, checkModes) {
|
|
|
53948
53975
|
return findAndReplace.searchInputTip;
|
|
53949
53976
|
}
|
|
53950
53977
|
var range;
|
|
53951
|
-
if (___default['default'].size(ctx.luckysheet_select_save) === 0 || ((_ctx$
|
|
53978
|
+
if (___default['default'].size(ctx.luckysheet_select_save) === 0 || ((_ctx$luckysheet_selec = ctx.luckysheet_select_save) === null || _ctx$luckysheet_selec === void 0 ? void 0 : _ctx$luckysheet_selec.length) === 1 && ctx.luckysheet_select_save[0].row[0] === ctx.luckysheet_select_save[0].row[1] && ctx.luckysheet_select_save[0].column[0] === ctx.luckysheet_select_save[0].column[1]) {
|
|
53952
53979
|
range = [{
|
|
53953
53980
|
row: [0, flowdata.length - 1],
|
|
53954
53981
|
column: [0, flowdata[0].length - 1]
|
|
@@ -53956,12 +53983,12 @@ function replace(ctx, searchText, replaceText, checkModes) {
|
|
|
53956
53983
|
} else {
|
|
53957
53984
|
range = ___default['default'].assign([], ctx.luckysheet_select_save);
|
|
53958
53985
|
}
|
|
53959
|
-
var searchIndexArr = getSearchIndexArr(searchText, range, flowdata, checkModes);
|
|
53986
|
+
var searchIndexArr = getSearchIndexArr(searchText, range, flowdata, checkModes, searchType);
|
|
53960
53987
|
if (searchIndexArr.length === 0) {
|
|
53961
53988
|
return findAndReplace.noReplceTip;
|
|
53962
53989
|
}
|
|
53963
53990
|
var count = null;
|
|
53964
|
-
var last = (_ctx$
|
|
53991
|
+
var last = (_ctx$luckysheet_selec2 = ctx.luckysheet_select_save) === null || _ctx$luckysheet_selec2 === void 0 ? void 0 : _ctx$luckysheet_selec2[ctx.luckysheet_select_save.length - 1];
|
|
53965
53992
|
var rf = last === null || last === void 0 ? void 0 : last.row_focus;
|
|
53966
53993
|
var cf = last === null || last === void 0 ? void 0 : last.column_focus;
|
|
53967
53994
|
for (var i = 0; i < searchIndexArr.length; i += 1) {
|
|
@@ -54004,7 +54031,8 @@ function replace(ctx, searchText, replaceText, checkModes) {
|
|
|
54004
54031
|
return null;
|
|
54005
54032
|
}
|
|
54006
54033
|
function replaceAll(ctx, searchText, replaceText, checkModes) {
|
|
54007
|
-
var _ctx$
|
|
54034
|
+
var _ctx$luckysheet_selec3;
|
|
54035
|
+
var searchType = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "v";
|
|
54008
54036
|
var _locale3 = locale(ctx),
|
|
54009
54037
|
findAndReplace = _locale3.findAndReplace;
|
|
54010
54038
|
var allowEdit = isAllowEdit(ctx);
|
|
@@ -54016,7 +54044,7 @@ function replaceAll(ctx, searchText, replaceText, checkModes) {
|
|
|
54016
54044
|
return findAndReplace.searchInputTip;
|
|
54017
54045
|
}
|
|
54018
54046
|
var range;
|
|
54019
|
-
if (___default['default'].size(ctx.luckysheet_select_save) === 0 || ((_ctx$
|
|
54047
|
+
if (___default['default'].size(ctx.luckysheet_select_save) === 0 || ((_ctx$luckysheet_selec3 = ctx.luckysheet_select_save) === null || _ctx$luckysheet_selec3 === void 0 ? void 0 : _ctx$luckysheet_selec3.length) === 1 && ctx.luckysheet_select_save[0].row[0] === ctx.luckysheet_select_save[0].row[1] && ctx.luckysheet_select_save[0].column[0] === ctx.luckysheet_select_save[0].column[1]) {
|
|
54020
54048
|
range = [{
|
|
54021
54049
|
row: [0, flowdata.length - 1],
|
|
54022
54050
|
column: [0, flowdata[0].length - 1]
|
|
@@ -54024,7 +54052,7 @@ function replaceAll(ctx, searchText, replaceText, checkModes) {
|
|
|
54024
54052
|
} else {
|
|
54025
54053
|
range = ___default['default'].assign([], ctx.luckysheet_select_save);
|
|
54026
54054
|
}
|
|
54027
|
-
var searchIndexArr = getSearchIndexArr(searchText, range, flowdata, checkModes);
|
|
54055
|
+
var searchIndexArr = getSearchIndexArr(searchText, range, flowdata, checkModes, searchType);
|
|
54028
54056
|
if (searchIndexArr.length === 0) {
|
|
54029
54057
|
return findAndReplace.noReplceTip;
|
|
54030
54058
|
}
|
|
@@ -54049,9 +54077,9 @@ function replaceAll(ctx, searchText, replaceText, checkModes) {
|
|
|
54049
54077
|
} else {
|
|
54050
54078
|
reg = new RegExp(getRegExpStr(searchText), "ig");
|
|
54051
54079
|
}
|
|
54052
|
-
for (var
|
|
54053
|
-
var _r = searchIndexArr[
|
|
54054
|
-
var _c = searchIndexArr[
|
|
54080
|
+
for (var _i = 0; _i < searchIndexArr.length; _i += 1) {
|
|
54081
|
+
var _r = searchIndexArr[_i].r;
|
|
54082
|
+
var _c = searchIndexArr[_i].c;
|
|
54055
54083
|
var _v2 = valueShowEs(_r, _c, d).toString().replace(reg, replaceText);
|
|
54056
54084
|
setCellValue(ctx, _r, _c, d, _v2);
|
|
54057
54085
|
range.push({
|
package/dist/locale/en.d.ts
CHANGED
|
@@ -500,6 +500,10 @@ declare const _default: {
|
|
|
500
500
|
regexTextbox: string;
|
|
501
501
|
wholeTextbox: string;
|
|
502
502
|
distinguishTextbox: string;
|
|
503
|
+
searchTypeLabel: string;
|
|
504
|
+
searchTypeValue: string;
|
|
505
|
+
searchTypeFormula: string;
|
|
506
|
+
searchTypeDisplay: string;
|
|
503
507
|
allReplaceBtn: string;
|
|
504
508
|
replaceBtn: string;
|
|
505
509
|
allFindBtn: string;
|
package/dist/locale/es.d.ts
CHANGED
|
@@ -625,6 +625,10 @@ declare const _default: {
|
|
|
625
625
|
regexTextbox: string;
|
|
626
626
|
wholeTextbox: string;
|
|
627
627
|
distinguishTextbox: string;
|
|
628
|
+
searchTypeLabel: string;
|
|
629
|
+
searchTypeValue: string;
|
|
630
|
+
searchTypeFormula: string;
|
|
631
|
+
searchTypeDisplay: string;
|
|
628
632
|
allReplaceBtn: string;
|
|
629
633
|
replaceBtn: string;
|
|
630
634
|
allFindBtn: string;
|
package/dist/locale/index.d.ts
CHANGED
|
@@ -518,6 +518,10 @@ declare function locale(ctx: Context): {
|
|
|
518
518
|
regexTextbox: string;
|
|
519
519
|
wholeTextbox: string;
|
|
520
520
|
distinguishTextbox: string;
|
|
521
|
+
searchTypeLabel: string;
|
|
522
|
+
searchTypeValue: string;
|
|
523
|
+
searchTypeFormula: string;
|
|
524
|
+
searchTypeDisplay: string;
|
|
521
525
|
allReplaceBtn: string;
|
|
522
526
|
replaceBtn: string;
|
|
523
527
|
allFindBtn: string;
|
package/dist/locale/zh.d.ts
CHANGED
|
@@ -517,6 +517,10 @@ declare const _default: {
|
|
|
517
517
|
regexTextbox: string;
|
|
518
518
|
wholeTextbox: string;
|
|
519
519
|
distinguishTextbox: string;
|
|
520
|
+
searchTypeLabel: string;
|
|
521
|
+
searchTypeValue: string;
|
|
522
|
+
searchTypeFormula: string;
|
|
523
|
+
searchTypeDisplay: string;
|
|
520
524
|
allReplaceBtn: string;
|
|
521
525
|
replaceBtn: string;
|
|
522
526
|
allFindBtn: string;
|
package/dist/locale/zh_tw.d.ts
CHANGED
|
@@ -663,6 +663,10 @@ declare const _default: {
|
|
|
663
663
|
regexTextbox: string;
|
|
664
664
|
wholeTextbox: string;
|
|
665
665
|
distinguishTextbox: string;
|
|
666
|
+
searchTypeLabel: string;
|
|
667
|
+
searchTypeValue: string;
|
|
668
|
+
searchTypeFormula: string;
|
|
669
|
+
searchTypeDisplay: string;
|
|
666
670
|
allReplaceBtn: string;
|
|
667
671
|
replaceBtn: string;
|
|
668
672
|
allFindBtn: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Context } from "../context";
|
|
2
2
|
import { CellMatrix, SearchResult, GlobalCache } from "../types";
|
|
3
|
+
export type SearchType = "v" | "m" | "f";
|
|
3
4
|
export declare function getSearchIndexArr(searchText: string, range: {
|
|
4
5
|
row: number[];
|
|
5
6
|
column: number[];
|
|
@@ -7,7 +8,7 @@ export declare function getSearchIndexArr(searchText: string, range: {
|
|
|
7
8
|
regCheck: boolean;
|
|
8
9
|
wordCheck: boolean;
|
|
9
10
|
caseCheck: boolean;
|
|
10
|
-
}): {
|
|
11
|
+
}, searchType?: SearchType): {
|
|
11
12
|
r: number;
|
|
12
13
|
c: number;
|
|
13
14
|
}[];
|
|
@@ -15,12 +16,12 @@ export declare function searchNext(ctx: Context, searchText: string, checkModes:
|
|
|
15
16
|
regCheck: boolean;
|
|
16
17
|
wordCheck: boolean;
|
|
17
18
|
caseCheck: boolean;
|
|
18
|
-
}): string | null;
|
|
19
|
+
}, searchType?: SearchType): string | null;
|
|
19
20
|
export declare function searchAll(ctx: Context, searchText: string, checkModes: {
|
|
20
21
|
regCheck: boolean;
|
|
21
22
|
wordCheck: boolean;
|
|
22
23
|
caseCheck: boolean;
|
|
23
|
-
}): SearchResult[];
|
|
24
|
+
}, searchType?: SearchType): SearchResult[];
|
|
24
25
|
export declare function onSearchDialogMoveStart(globalCache: GlobalCache, e: MouseEvent, container: HTMLDivElement): void;
|
|
25
26
|
export declare function onSearchDialogMove(globalCache: GlobalCache, e: MouseEvent): void;
|
|
26
27
|
export declare function onSearchDialogMoveEnd(globalCache: GlobalCache): void;
|
|
@@ -28,9 +29,9 @@ export declare function replace(ctx: Context, searchText: string, replaceText: s
|
|
|
28
29
|
regCheck: boolean;
|
|
29
30
|
wordCheck: boolean;
|
|
30
31
|
caseCheck: boolean;
|
|
31
|
-
}): string | null;
|
|
32
|
+
}, searchType?: SearchType): string | null;
|
|
32
33
|
export declare function replaceAll(ctx: Context, searchText: string, replaceText: string, checkModes: {
|
|
33
34
|
regCheck: boolean;
|
|
34
35
|
wordCheck: boolean;
|
|
35
36
|
caseCheck: boolean;
|
|
36
|
-
}): string;
|
|
37
|
+
}, searchType?: SearchType): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leankylin-sheet/core",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.27",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"build": "father-build"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@leankylin-sheet/formula-parser": "5.2.
|
|
16
|
+
"@leankylin-sheet/formula-parser": "5.2.27",
|
|
17
17
|
"dayjs": "^1.11.0",
|
|
18
18
|
"immer": "^9.0.12",
|
|
19
19
|
"lodash": "^4.17.21",
|