@leankylin-sheet/core 7.0.36 → 7.0.38
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/context.d.ts +2 -0
- package/dist/index.esm.js +41 -30
- package/dist/index.js +42 -29
- package/dist/locale/en.d.ts +2 -0
- package/dist/locale/es.d.ts +2 -0
- package/dist/locale/index.d.ts +2 -0
- package/dist/locale/zh.d.ts +2 -0
- package/dist/locale/zh_tw.d.ts +2 -0
- package/dist/modules/toolbar.d.ts +1 -0
- package/dist/settings.d.ts +1 -0
- package/package.json +2 -2
package/dist/context.d.ts
CHANGED
|
@@ -181,6 +181,7 @@ export type Context = {
|
|
|
181
181
|
showHeaders: boolean;
|
|
182
182
|
allowEdit: boolean;
|
|
183
183
|
showAddSheetButton: boolean;
|
|
184
|
+
autoRecalc: boolean;
|
|
184
185
|
onAddSheetClick?: () => void;
|
|
185
186
|
onSheetRename?: (newName: string) => void;
|
|
186
187
|
onSheetDelete?: (sheetId: string, sheet: Sheet) => void;
|
|
@@ -196,6 +197,7 @@ export type Context = {
|
|
|
196
197
|
forceFormulaRef?: Boolean;
|
|
197
198
|
getRefs: () => RefValues;
|
|
198
199
|
};
|
|
200
|
+
export declare function isAutoRecalc(ctx: Context): boolean;
|
|
199
201
|
export declare function defaultContext(refs: RefValues): Context;
|
|
200
202
|
export declare function getFlowdata(ctx?: Context, id?: string | null): import("./types").CellMatrix | null | undefined;
|
|
201
203
|
export declare function calcRowColSize(ctx: Context, rowCount: number, colCount: number, blank?: {
|
package/dist/index.esm.js
CHANGED
|
@@ -9448,7 +9448,9 @@ var en = {
|
|
|
9448
9448
|
toolMoreTip: "More features",
|
|
9449
9449
|
moreOptions: "More options",
|
|
9450
9450
|
cellFormat: "Cell format config",
|
|
9451
|
-
print: "Print"
|
|
9451
|
+
print: "Print",
|
|
9452
|
+
autoRecalcOn: "Auto recalculate: on (dependent formulas update right after editing)",
|
|
9453
|
+
autoRecalcOff: "Auto recalculate: off (dependent cells do not update after editing)"
|
|
9452
9454
|
},
|
|
9453
9455
|
alternatingColors: {
|
|
9454
9456
|
applyRange: "Apply to range",
|
|
@@ -20026,7 +20028,9 @@ var zh = {
|
|
|
20026
20028
|
toolMoreTip: "更多功能",
|
|
20027
20029
|
moreOptions: "更多选项",
|
|
20028
20030
|
cellFormat: "设置单元格格式",
|
|
20029
|
-
print: "打印"
|
|
20031
|
+
print: "打印",
|
|
20032
|
+
autoRecalcOn: "自动重算:已开启(编辑后立即更新相关公式)",
|
|
20033
|
+
autoRecalcOff: "自动重算:已关闭(编辑后不更新相关引用单元格)"
|
|
20030
20034
|
},
|
|
20031
20035
|
alternatingColors: {
|
|
20032
20036
|
applyRange: "应用范围",
|
|
@@ -30625,7 +30629,9 @@ var es = {
|
|
|
30625
30629
|
toolMoreTip: "Más funcionalidades",
|
|
30626
30630
|
moreOptions: "Más opciones",
|
|
30627
30631
|
cellFormat: "Configuración formato de celda",
|
|
30628
|
-
print: "Imprimir"
|
|
30632
|
+
print: "Imprimir",
|
|
30633
|
+
autoRecalcOn: "Recálculo automático: activado (las fórmulas dependientes se actualizan al editar)",
|
|
30634
|
+
autoRecalcOff: "Recálculo automático: desactivado (las celdas dependientes no se actualizan al editar)"
|
|
30629
30635
|
},
|
|
30630
30636
|
alternatingColors: {
|
|
30631
30637
|
applyRange: "Aplicar a rango",
|
|
@@ -37574,7 +37580,7 @@ function execfunction(ctx, txt, r, c, id, isrefresh, notInsertFunc) {
|
|
|
37574
37580
|
if (!notInsertFunc) {
|
|
37575
37581
|
insertUpdateFunctionGroup(ctx, r, c, id);
|
|
37576
37582
|
}
|
|
37577
|
-
if (isrefresh) {
|
|
37583
|
+
if (isrefresh && isAutoRecalc(ctx)) {
|
|
37578
37584
|
var _data$r;
|
|
37579
37585
|
var data = getFlowdata(ctx, id);
|
|
37580
37586
|
var cell = data === null || data === void 0 ? void 0 : (_data$r = data[r]) === null || _data$r === void 0 ? void 0 : _data$r[c];
|
|
@@ -37649,7 +37655,7 @@ function groupValuesRefresh(ctx) {
|
|
|
37649
37655
|
}
|
|
37650
37656
|
}
|
|
37651
37657
|
function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, notInsertFunc, originFormula) {
|
|
37652
|
-
console.time('execFunctionGroup-
|
|
37658
|
+
console.time('execFunctionGroup-1');
|
|
37653
37659
|
isForce = !_.isNil(isForce) ? isForce : false;
|
|
37654
37660
|
notInsertFunc = !_.isNil(notInsertFunc) ? notInsertFunc : true;
|
|
37655
37661
|
if (_.isNil(data)) {
|
|
@@ -37693,7 +37699,6 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, no
|
|
|
37693
37699
|
updateValueOjects[_key2] = 1;
|
|
37694
37700
|
}
|
|
37695
37701
|
}
|
|
37696
|
-
console.time('arrayMatchCache');
|
|
37697
37702
|
var arrayMatchCache = {};
|
|
37698
37703
|
var arrayMatch = function arrayMatch(formulaArray, _formulaObjects, _updateValueOjects, func) {
|
|
37699
37704
|
for (var a = 0; a < formulaArray.length; a += 1) {
|
|
@@ -37726,8 +37731,6 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, no
|
|
|
37726
37731
|
}
|
|
37727
37732
|
}
|
|
37728
37733
|
};
|
|
37729
|
-
console.timeEnd('arrayMatchCache');
|
|
37730
|
-
console.time('cache1');
|
|
37731
37734
|
var _loop = function _loop() {
|
|
37732
37735
|
var formulaCell = calcChains[_i12];
|
|
37733
37736
|
var fR = formulaCell.r;
|
|
@@ -37842,8 +37845,6 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, no
|
|
|
37842
37845
|
_ret = _loop();
|
|
37843
37846
|
if (_ret === 0) continue;
|
|
37844
37847
|
}
|
|
37845
|
-
console.timeEnd('cache1');
|
|
37846
|
-
console.time('cache2');
|
|
37847
37848
|
Object.keys(formulaObjects).forEach(function (key) {
|
|
37848
37849
|
var formulaObject = formulaObjects[key];
|
|
37849
37850
|
arrayMatch(formulaObject.formulaArray, formulaObjects, updateValueOjects, function (childKey) {
|
|
@@ -37860,8 +37861,6 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, no
|
|
|
37860
37861
|
updateValueArray.push(formulaObject);
|
|
37861
37862
|
}
|
|
37862
37863
|
});
|
|
37863
|
-
console.timeEnd('cache2');
|
|
37864
|
-
console.time('dev');
|
|
37865
37864
|
var visited = {};
|
|
37866
37865
|
var inStack = {};
|
|
37867
37866
|
var circularNodes = {};
|
|
@@ -37973,8 +37972,6 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, no
|
|
|
37973
37972
|
});
|
|
37974
37973
|
});
|
|
37975
37974
|
}
|
|
37976
|
-
console.timeEnd('dev');
|
|
37977
|
-
console.timeEnd('execFunctionGroup-before');
|
|
37978
37975
|
var lastDataRowSheets = Object.create(null);
|
|
37979
37976
|
for (var _i14 = 0; _i14 < formulaRunList.length; _i14++) {
|
|
37980
37977
|
var sheetId = formulaRunList[_i14].id;
|
|
@@ -37992,7 +37989,7 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, no
|
|
|
37992
37989
|
lastDataRowSheets[sheetId] = lastDataRow;
|
|
37993
37990
|
}
|
|
37994
37991
|
ctx.formulaCache._lastDataRowCache = lastDataRowSheets;
|
|
37995
|
-
console.time('formulaRunList');
|
|
37992
|
+
console.time('execFunctionGroup-formulaRunList');
|
|
37996
37993
|
console.log('formulaRunList', formulaRunList);
|
|
37997
37994
|
for (var _i15 = 0; _i15 < formulaRunList.length; _i15 += 1) {
|
|
37998
37995
|
var formulaCell = formulaRunList[_i15];
|
|
@@ -38014,9 +38011,10 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, no
|
|
|
38014
38011
|
f: v[2]
|
|
38015
38012
|
};
|
|
38016
38013
|
}
|
|
38017
|
-
console.timeEnd('formulaRunList');
|
|
38014
|
+
console.timeEnd('execFunctionGroup-formulaRunList');
|
|
38018
38015
|
ctx.formulaCache._lastDataRowCache = null;
|
|
38019
38016
|
ctx.formulaCache.execFunctionExist = undefined;
|
|
38017
|
+
console.timeEnd('execFunctionGroup-1');
|
|
38020
38018
|
}
|
|
38021
38019
|
function findrangeindex(ctx, v, vp) {
|
|
38022
38020
|
var re = /<span.*?>/g;
|
|
@@ -42086,7 +42084,9 @@ function updateCell(ctx, r, c, $input, value, canvas, sheetId) {
|
|
|
42086
42084
|
} else {
|
|
42087
42085
|
var _d$r3;
|
|
42088
42086
|
delFunctionGroup(ctx, r, c);
|
|
42089
|
-
|
|
42087
|
+
if (isAutoRecalc(ctx)) {
|
|
42088
|
+
execFunctionGroup(ctx, r, c, value, undefined, undefined, false, false, "");
|
|
42089
|
+
}
|
|
42090
42090
|
curv = _.cloneDeep((d === null || d === void 0 ? void 0 : (_d$r3 = d[r]) === null || _d$r3 === void 0 ? void 0 : _d$r3[c]) || {});
|
|
42091
42091
|
curv.v = value;
|
|
42092
42092
|
delete curv.f;
|
|
@@ -42145,7 +42145,9 @@ function updateCell(ctx, r, c, $input, value, canvas, sheetId) {
|
|
|
42145
42145
|
}
|
|
42146
42146
|
} else {
|
|
42147
42147
|
delFunctionGroup(ctx, r, c);
|
|
42148
|
-
|
|
42148
|
+
if (isAutoRecalc(ctx)) {
|
|
42149
|
+
execFunctionGroup(ctx, r, c, value, undefined, undefined, false, false, "");
|
|
42150
|
+
}
|
|
42149
42151
|
}
|
|
42150
42152
|
}
|
|
42151
42153
|
setCellValue(ctx, r, c, d, value);
|
|
@@ -46647,11 +46649,9 @@ function copySheet(ctx, sheetId, hooks) {
|
|
|
46647
46649
|
(_hooks$onCopySheet = hooks.onCopySheet) === null || _hooks$onCopySheet === void 0 ? void 0 : _hooks$onCopySheet.call(hooks, sheetId, copyId);
|
|
46648
46650
|
}
|
|
46649
46651
|
function calculateSheetFromula(ctx, id, isrefresh) {
|
|
46650
|
-
console.time("calcTime:all");
|
|
46651
46652
|
execFunctionGroup(ctx, null, null, null, undefined, [], true);
|
|
46652
46653
|
groupValuesRefresh(ctx);
|
|
46653
46654
|
ctx.formulaCache.execFunctionGlobalData = null;
|
|
46654
|
-
console.timeEnd("calcTime:all");
|
|
46655
46655
|
}
|
|
46656
46656
|
function updateFunctionGroupBySheetId(ctx, id) {
|
|
46657
46657
|
var _ctx$luckysheetfile$i, _ctx$luckysheetfile$i2, _ctx$luckysheetfile$i3;
|
|
@@ -46702,7 +46702,6 @@ function parseCellReferences(expression) {
|
|
|
46702
46702
|
return uniqueCells;
|
|
46703
46703
|
}
|
|
46704
46704
|
function calculateSheetByCells(ctx, cells) {
|
|
46705
|
-
console.time("calculateSheetByCellsTime");
|
|
46706
46705
|
var fileList = ctx.luckysheetfile;
|
|
46707
46706
|
var sheetIdNameMap = {};
|
|
46708
46707
|
for (var ffIndex = 0; ffIndex < fileList.length; ffIndex++) {
|
|
@@ -46772,7 +46771,6 @@ function calculateSheetByCells(ctx, cells) {
|
|
|
46772
46771
|
id: _id
|
|
46773
46772
|
});
|
|
46774
46773
|
}
|
|
46775
|
-
console.timeEnd("calculateSheetByCellsTime");
|
|
46776
46774
|
}
|
|
46777
46775
|
function getVariableValue(variables, sheetId, name) {
|
|
46778
46776
|
var _variables$sheetId;
|
|
@@ -47640,9 +47638,7 @@ function runExecFunction(ctx, range, index, data) {
|
|
|
47640
47638
|
}
|
|
47641
47639
|
}
|
|
47642
47640
|
ctx.formulaCache.execFunctionExist.reverse();
|
|
47643
|
-
console.time('execFunctionGroup');
|
|
47644
47641
|
execFunctionGroup(ctx, null, null, null, null, data);
|
|
47645
|
-
console.timeEnd('execFunctionGroup');
|
|
47646
47642
|
ctx.formulaCache.execFunctionGlobalData = null;
|
|
47647
47643
|
updateFunctionGroup(ctx);
|
|
47648
47644
|
}
|
|
@@ -47655,7 +47651,6 @@ function jfrefreshgrid(ctx, data, range) {
|
|
|
47655
47651
|
range = ctx.luckysheet_select_save;
|
|
47656
47652
|
if (range == null) return;
|
|
47657
47653
|
}
|
|
47658
|
-
console.log('isRunExecFunction', isRunExecFunction);
|
|
47659
47654
|
if (isRunExecFunction) {
|
|
47660
47655
|
runExecFunction(ctx, range, ctx.currentSheetId, data);
|
|
47661
47656
|
}
|
|
@@ -49396,6 +49391,9 @@ function handleLink(ctx) {
|
|
|
49396
49391
|
showLinkCard(ctx, selection.row[0], selection.column[0], true);
|
|
49397
49392
|
}
|
|
49398
49393
|
}
|
|
49394
|
+
function handleAutoRecalc(ctx) {
|
|
49395
|
+
ctx.autoRecalc = !isAutoRecalc(ctx);
|
|
49396
|
+
}
|
|
49399
49397
|
var handlerMap = {
|
|
49400
49398
|
"currency-format": handleCurrencyFormat,
|
|
49401
49399
|
"percentage-format": handlePercentageFormat,
|
|
@@ -49416,6 +49414,7 @@ var handlerMap = {
|
|
|
49416
49414
|
underline: handleUnderline,
|
|
49417
49415
|
"clear-format": handleClearFormat,
|
|
49418
49416
|
"format-painter": handleFormatPainter,
|
|
49417
|
+
"auto-recalc": handleAutoRecalc,
|
|
49419
49418
|
search: function search(ctx) {
|
|
49420
49419
|
ctx.showSearch = true;
|
|
49421
49420
|
},
|
|
@@ -52830,6 +52829,9 @@ var Canvas = /*#__PURE__*/function () {
|
|
|
52830
52829
|
if (clear) {
|
|
52831
52830
|
renderCtx.clearRect(0, 0, this.sheetCtx.luckysheetTableContentHW[0], this.sheetCtx.luckysheetTableContentHW[1]);
|
|
52832
52831
|
}
|
|
52832
|
+
renderCtx.beginPath();
|
|
52833
|
+
renderCtx.rect(offsetLeft - 1, offsetTop - 1, drawWidth + 1, drawHeight + 1);
|
|
52834
|
+
renderCtx.clip();
|
|
52833
52835
|
var rowStart;
|
|
52834
52836
|
var rowEnd;
|
|
52835
52837
|
var colStart;
|
|
@@ -53023,7 +53025,7 @@ var Canvas = /*#__PURE__*/function () {
|
|
|
53023
53025
|
_startY2 = this.sheetCtx.visibledatarow[_r2 - 1] - scrollHeight - 1;
|
|
53024
53026
|
}
|
|
53025
53027
|
_endY2 = this.sheetCtx.visibledatarow[_r2 + mainCell.mc.rs - 1] - scrollHeight;
|
|
53026
|
-
_endX2 =
|
|
53028
|
+
_endX2 = this.sheetCtx.visibledatacolumn[_c2 + mainCell.mc.cs - 1] - scrollWidth;
|
|
53027
53029
|
if (_.isNil(_value3) || _value3.toString().length === 0) {
|
|
53028
53030
|
this.nullCellRender(_r2, _c2, _startY2, _startX2, _endY2, _endX2, renderCtx, afCompute, cfCompute, offsetLeft, offsetTop, dynamicArrayCompute, cellOverflowMap, colStart, colEnd, scrollHeight, scrollWidth, bodrder05, true);
|
|
53029
53031
|
} else {
|
|
@@ -55716,6 +55718,9 @@ function handleKeydownForZoom(ev, currentZoom) {
|
|
|
55716
55718
|
return parseFloat(zoom.toFixed(1));
|
|
55717
55719
|
}
|
|
55718
55720
|
|
|
55721
|
+
function isAutoRecalc(ctx) {
|
|
55722
|
+
return ctx.autoRecalc !== false;
|
|
55723
|
+
}
|
|
55719
55724
|
function defaultContext(refs) {
|
|
55720
55725
|
return {
|
|
55721
55726
|
headerBgColor: "#fff",
|
|
@@ -55920,6 +55925,7 @@ function defaultContext(refs) {
|
|
|
55920
55925
|
showGridLines: true,
|
|
55921
55926
|
showHeaders: true,
|
|
55922
55927
|
allowEdit: true,
|
|
55928
|
+
autoRecalc: true,
|
|
55923
55929
|
showAddSheetButton: true,
|
|
55924
55930
|
onAddSheetClick: undefined,
|
|
55925
55931
|
onSheetRename: undefined,
|
|
@@ -56770,7 +56776,9 @@ function setCellValue$1(ctx, row, column, value, cellInput) {
|
|
|
56770
56776
|
var formatList = FORMAT_LIST;
|
|
56771
56777
|
if (value == null || value.toString().length === 0) {
|
|
56772
56778
|
delFunctionGroup(ctx, row, column);
|
|
56773
|
-
|
|
56779
|
+
if (isAutoRecalc(ctx)) {
|
|
56780
|
+
execFunctionGroup(ctx, row, column, value, sheet.id, data, false, false, "");
|
|
56781
|
+
}
|
|
56774
56782
|
setCellValue(ctx, row, column, data, value);
|
|
56775
56783
|
} else if (value instanceof Object) {
|
|
56776
56784
|
var _data$row;
|
|
@@ -56841,7 +56849,9 @@ function setCellValue$1(ctx, row, column, value, cellInput) {
|
|
|
56841
56849
|
updateCell(ctx, row, column, cellInput, value);
|
|
56842
56850
|
} else {
|
|
56843
56851
|
delFunctionGroup(ctx, row, column);
|
|
56844
|
-
|
|
56852
|
+
if (isAutoRecalc(ctx)) {
|
|
56853
|
+
execFunctionGroup(ctx, row, column, value, sheet.id, data, false, false, "");
|
|
56854
|
+
}
|
|
56845
56855
|
setCellValue(ctx, row, column, data, value);
|
|
56846
56856
|
}
|
|
56847
56857
|
}
|
|
@@ -57737,12 +57747,13 @@ var defaultSettings = {
|
|
|
57737
57747
|
disabledMoveSheet: false,
|
|
57738
57748
|
lang: null,
|
|
57739
57749
|
forceCalculation: false,
|
|
57750
|
+
autoRecalc: true,
|
|
57740
57751
|
rowHeaderWidth: 46,
|
|
57741
57752
|
columnHeaderHeight: 20,
|
|
57742
57753
|
defaultColWidth: 73,
|
|
57743
57754
|
defaultRowHeight: 19,
|
|
57744
57755
|
defaultFontSize: 10,
|
|
57745
|
-
toolbarItems: ["undo", "redo", "format-painter", "clear-format", "|", "format", "|", "font", "|", "font-size", "|", "bold", "italic", "strike-through", "underline", "|", "font-color", "background", "border", "merge-cell", "|", "horizontal-align", "vertical-align", "text-wrap", "text-rotation", "|", "search"],
|
|
57756
|
+
toolbarItems: ["undo", "redo", "format-painter", "clear-format", "|", "format", "|", "font", "|", "font-size", "|", "bold", "italic", "strike-through", "underline", "|", "font-color", "background", "border", "merge-cell", "|", "horizontal-align", "vertical-align", "text-wrap", "text-rotation", "|", "auto-recalc", "search"],
|
|
57746
57757
|
cellContextMenu: function cellContextMenu() {
|
|
57747
57758
|
return ["insert-comment", "copy", "paste", "|", "insert-row", "insert-column", "delete-row", "delete-column", "delete-cell", "hide-row", "hide-column", "set-row-height", "set-column-width", "|", "clear", "sort", "orderAZ", "orderZA", "filter", "chart", "image", "link", "data", "cell-format"];
|
|
57748
57759
|
},
|
|
@@ -61740,4 +61751,4 @@ function handlePasteByClick(ctx, triggerType) {
|
|
|
61740
61751
|
} else if (data.indexOf("leankylin-copy-action-image") > -1) ; else ;
|
|
61741
61752
|
}
|
|
61742
61753
|
|
|
61743
|
-
export { CFSplitRange, Canvas, FormulaCache, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, PAINT_MODEL_CURSOR, addSheet, index as api, applyLocation, attrToCssName, autoSelectionFormula, calcRowColSize, calcSelectionInfo, cancelActiveImgItem, cancelFunctionrangeSelected, cancelNormalSelected, cancelPaintModel, cellFocus, cfSplitRange, changeSheet, chatatABC, checkCF, checkCellIsLocked, checkProtectionAllSelected, checkProtectionFormatCells, checkProtectionSelectLockedOrUnLockedCells, checkboxChange, clearFilter, clearMeasureTextCache, colHasMerged, colLocation, colLocationByIndex, colors, columnCharToIndex, commentBoxProps, compute, computeRowlenArr, confirmMessage, convertCssToStyleList, convertSpanToShareString, copy, copy2, createDropCellRange, createFilter, createFilterOptions, createFormulaRangeSelect, createRangeHightlight, dataRangeSelection, datenum_local, defaultContext, defaultFont, defaultSettings, defaultStyle, delFunctionGroup, deleteCellInSave, deleteComment, deleteRowCol, deleteSelectedCellText, deleteSheet, diff, drawArrow, drawLineInfo, dropCellCache, editComment, editSheetName, ensureSheetIndex, error, escapeHTMLTag, escapeRegExpStr, escapeScriptTag, execFunctionGroup, execfunction, expandRowsAndColumns, extractFormulaCellOps, filterPatch, fixColumnStyleOverflowInFreeze, fixPositionOnFrozenCells, fixRowStyleOverflowInFreeze, functionCopy, functionHTMLGenerate, functionStrChange, genarate, generateRandomId, generateRandomSheetName, getAllFunctionGroup, getArrowCanvasSize, getBorderInfoCompute, getBorderInfoComputeRange, getCellHyperlink, getCellHyperlinkWithPayload, getCellRowColumn, getCellTextInfo, getCellTopRightPostion, getCellValue, getClipboardContent, getColMerge, getColorGradation, getCommentBoxByRC, getCommentBoxPosition, getComputeMap, getCurrentRules, getDataArr, getDataBySelectionNoCopy, getDropdownList, getFailureText, getFilterColumnColors, getFilterColumnValues, getFlattenedRange, getFlowdata, getFontSet, getFontStyleByCell, getFrozenHandleLeft, getFrozenHandleTop, getHLColor, getHintText, getHistoryRules, getInlineStringHTML, getInlineStringNoStyle, getMeasureText, getNowDateTime, getNullData, getOptionValue, getOrigincell, getQKBorder, getRange, getRangeArr, getRangeByTxt, getRangetxt, getRealCellValue, getRegExpStr, getRegStr, getRowMerge, getSearchIndexArr, getSelectRange, getSheetByIndex, getSheetIdByName, getSheetIndex, getStyleByCell, getTypeItemHide, getcellFormula, getcellrange, getdatabyselection, getrangeseleciton, goToLink, groupValuesRefresh, handleArrowKey, handleBold, handleBorder, handleCellAreaDoubleClick, handleCellAreaDragOver, handleCellAreaMouseDown, handleCellAreaMouseMove, handleCellDrop, handleClearFormat, handleColFreezeHandleMouseDown, handleColSizeHandleMouseDown, handleColumnHeaderMouseDown, handleContextMenu, handleCopy, handleCurrencyFormat, handleDropCellDoubleClick, handleFormatPainter, handleFormulaInput, handleFreeze, handleGlobalEnter, handleGlobalKeyDown, handleGlobalWheel, handleHorizontalAlign, handleItalic, handleKeydownForZoom, handleLink, handleMerge, handleNumberDecrease, handleNumberIncrease, handleOverlayMouseMove, handleOverlayMouseUp, handleOverlayTouchEnd, handleOverlayTouchMove, handleOverlayTouchStart, handlePaste, handlePasteByClick, handlePasteByLeanklin, handlePercentageFormat, handleRowFreezeHandleMouseDown, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleScreenShot, handleSort, handleStrikeThrough, handleSum, handleTextBackground, handleTextColor, handleTextSize, handleUnderline, handleVerticalAlign, handleWithCtrlOrMetaKey, hasChinaword, hasPartMC, hideCRCount, hideDropCellSelection, hideSelected, imageProps, indexToColumnChar, initFreeze, initSheetIndex, inlineStyleAffectAttribute, inlineStyleAffectCssName, insertImage, insertRowCol, insertUpdateFunctionGroup, inverseRowColOptions, isAllSelectedCellsInStatus, isAllowEdit, isFormulaReplaceValue, isInlineStringCT, isInlineStringCell, isLinkValid, isRealNull, isRealNum, isShowHidenCR, isSupportBoundingBox, is_date, iscelldata, isdatatype, isdatatypemulti, isdatetime, israngeseleciton, jfrefreshgrid, labelFilterOptionState, locale, luckysheetUpdateCell, mergeBorder, mergeCells, mergeMoveMain, mousePosition, moveHighlightCell, moveHighlightRange, moveToEnd, newComment, normalizeSelection, normalizedAttr, normalizedCellAttr, onCellsMove, onCellsMoveEnd, onCellsMoveStart, onCommentBoxMove, onCommentBoxMoveEnd, onCommentBoxMoveStart, onCommentBoxResize, onCommentBoxResizeEnd, onCommentBoxResizeStart, onDropCellSelect, onDropCellSelectEnd, onFormulaRangeDragEnd, onImageMove, onImageMoveEnd, onImageMoveStart, onImageResize, onImageResizeEnd, onImageResizeStart, onRangeSelectionModalMove, onRangeSelectionModalMoveEnd, onRangeSelectionModalMoveStart, onSearchDialogMove, onSearchDialogMoveEnd, onSearchDialogMoveStart, opToPatch, orderbydata, orderbydatafiler, overShowComment, pasteHandlerOfPaintModel, patchToOp, rangeDrag, rangeDragColumn, rangeDragRow, rangeHightlightselected, rangeSetValue, rangeValueToHtml, refreshAfterReplaceAll, removeActiveImage, removeEditingComment, removeHyperlink, replace, replaceAll, replaceHtml, rgbToHex, rowHasMerged, rowLocation, rowLocationByIndex, saveFilter, saveHyperlink, saveImage, scrollToFrozenRowCol, scrollToHighlightCell, searchAll, searchNext, selectAll, selectIsOverlap, selectTextContent, selectTextContentCross, selectTitlesMap, selectTitlesRange, selectionCache, selectionCopyShow, seletedHighlistByindex, setCaretPosition, setCellValue, setConditionRules, setDateCellValue, setDropcownValue, setEditingComment, setNextSheet, showComments, showDropCellSelection, showHideAllComments, showHideComment, showImgChooser, showLinkCard, showSelected, sortDataRange, sortSelection, storeSheetParamALL, toolbarItemClickHandler, toolbarItemSelectedFunc, update, updateCell, updateContextWithCanvas, updateContextWithSheetData, updateDropCell, updateFormat, updateFormatCell, updateInlineStringFormat, updateInlineStringFormatOutside, updateItem, updateMoreCell, updateSheet, validateCellData, validateIdCard, valueIsError, valueShowEs, writeReplaceValue };
|
|
61754
|
+
export { CFSplitRange, Canvas, FormulaCache, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, PAINT_MODEL_CURSOR, addSheet, index as api, applyLocation, attrToCssName, autoSelectionFormula, calcRowColSize, calcSelectionInfo, cancelActiveImgItem, cancelFunctionrangeSelected, cancelNormalSelected, cancelPaintModel, cellFocus, cfSplitRange, changeSheet, chatatABC, checkCF, checkCellIsLocked, checkProtectionAllSelected, checkProtectionFormatCells, checkProtectionSelectLockedOrUnLockedCells, checkboxChange, clearFilter, clearMeasureTextCache, colHasMerged, colLocation, colLocationByIndex, colors, columnCharToIndex, commentBoxProps, compute, computeRowlenArr, confirmMessage, convertCssToStyleList, convertSpanToShareString, copy, copy2, createDropCellRange, createFilter, createFilterOptions, createFormulaRangeSelect, createRangeHightlight, dataRangeSelection, datenum_local, defaultContext, defaultFont, defaultSettings, defaultStyle, delFunctionGroup, deleteCellInSave, deleteComment, deleteRowCol, deleteSelectedCellText, deleteSheet, diff, drawArrow, drawLineInfo, dropCellCache, editComment, editSheetName, ensureSheetIndex, error, escapeHTMLTag, escapeRegExpStr, escapeScriptTag, execFunctionGroup, execfunction, expandRowsAndColumns, extractFormulaCellOps, filterPatch, fixColumnStyleOverflowInFreeze, fixPositionOnFrozenCells, fixRowStyleOverflowInFreeze, functionCopy, functionHTMLGenerate, functionStrChange, genarate, generateRandomId, generateRandomSheetName, getAllFunctionGroup, getArrowCanvasSize, getBorderInfoCompute, getBorderInfoComputeRange, getCellHyperlink, getCellHyperlinkWithPayload, getCellRowColumn, getCellTextInfo, getCellTopRightPostion, getCellValue, getClipboardContent, getColMerge, getColorGradation, getCommentBoxByRC, getCommentBoxPosition, getComputeMap, getCurrentRules, getDataArr, getDataBySelectionNoCopy, getDropdownList, getFailureText, getFilterColumnColors, getFilterColumnValues, getFlattenedRange, getFlowdata, getFontSet, getFontStyleByCell, getFrozenHandleLeft, getFrozenHandleTop, getHLColor, getHintText, getHistoryRules, getInlineStringHTML, getInlineStringNoStyle, getMeasureText, getNowDateTime, getNullData, getOptionValue, getOrigincell, getQKBorder, getRange, getRangeArr, getRangeByTxt, getRangetxt, getRealCellValue, getRegExpStr, getRegStr, getRowMerge, getSearchIndexArr, getSelectRange, getSheetByIndex, getSheetIdByName, getSheetIndex, getStyleByCell, getTypeItemHide, getcellFormula, getcellrange, getdatabyselection, getrangeseleciton, goToLink, groupValuesRefresh, handleArrowKey, handleAutoRecalc, handleBold, handleBorder, handleCellAreaDoubleClick, handleCellAreaDragOver, handleCellAreaMouseDown, handleCellAreaMouseMove, handleCellDrop, handleClearFormat, handleColFreezeHandleMouseDown, handleColSizeHandleMouseDown, handleColumnHeaderMouseDown, handleContextMenu, handleCopy, handleCurrencyFormat, handleDropCellDoubleClick, handleFormatPainter, handleFormulaInput, handleFreeze, handleGlobalEnter, handleGlobalKeyDown, handleGlobalWheel, handleHorizontalAlign, handleItalic, handleKeydownForZoom, handleLink, handleMerge, handleNumberDecrease, handleNumberIncrease, handleOverlayMouseMove, handleOverlayMouseUp, handleOverlayTouchEnd, handleOverlayTouchMove, handleOverlayTouchStart, handlePaste, handlePasteByClick, handlePasteByLeanklin, handlePercentageFormat, handleRowFreezeHandleMouseDown, handleRowHeaderMouseDown, handleRowSizeHandleMouseDown, handleScreenShot, handleSort, handleStrikeThrough, handleSum, handleTextBackground, handleTextColor, handleTextSize, handleUnderline, handleVerticalAlign, handleWithCtrlOrMetaKey, hasChinaword, hasPartMC, hideCRCount, hideDropCellSelection, hideSelected, imageProps, indexToColumnChar, initFreeze, initSheetIndex, inlineStyleAffectAttribute, inlineStyleAffectCssName, insertImage, insertRowCol, insertUpdateFunctionGroup, inverseRowColOptions, isAllSelectedCellsInStatus, isAllowEdit, isAutoRecalc, isFormulaReplaceValue, isInlineStringCT, isInlineStringCell, isLinkValid, isRealNull, isRealNum, isShowHidenCR, isSupportBoundingBox, is_date, iscelldata, isdatatype, isdatatypemulti, isdatetime, israngeseleciton, jfrefreshgrid, labelFilterOptionState, locale, luckysheetUpdateCell, mergeBorder, mergeCells, mergeMoveMain, mousePosition, moveHighlightCell, moveHighlightRange, moveToEnd, newComment, normalizeSelection, normalizedAttr, normalizedCellAttr, onCellsMove, onCellsMoveEnd, onCellsMoveStart, onCommentBoxMove, onCommentBoxMoveEnd, onCommentBoxMoveStart, onCommentBoxResize, onCommentBoxResizeEnd, onCommentBoxResizeStart, onDropCellSelect, onDropCellSelectEnd, onFormulaRangeDragEnd, onImageMove, onImageMoveEnd, onImageMoveStart, onImageResize, onImageResizeEnd, onImageResizeStart, onRangeSelectionModalMove, onRangeSelectionModalMoveEnd, onRangeSelectionModalMoveStart, onSearchDialogMove, onSearchDialogMoveEnd, onSearchDialogMoveStart, opToPatch, orderbydata, orderbydatafiler, overShowComment, pasteHandlerOfPaintModel, patchToOp, rangeDrag, rangeDragColumn, rangeDragRow, rangeHightlightselected, rangeSetValue, rangeValueToHtml, refreshAfterReplaceAll, removeActiveImage, removeEditingComment, removeHyperlink, replace, replaceAll, replaceHtml, rgbToHex, rowHasMerged, rowLocation, rowLocationByIndex, saveFilter, saveHyperlink, saveImage, scrollToFrozenRowCol, scrollToHighlightCell, searchAll, searchNext, selectAll, selectIsOverlap, selectTextContent, selectTextContentCross, selectTitlesMap, selectTitlesRange, selectionCache, selectionCopyShow, seletedHighlistByindex, setCaretPosition, setCellValue, setConditionRules, setDateCellValue, setDropcownValue, setEditingComment, setNextSheet, showComments, showDropCellSelection, showHideAllComments, showHideComment, showImgChooser, showLinkCard, showSelected, sortDataRange, sortSelection, storeSheetParamALL, toolbarItemClickHandler, toolbarItemSelectedFunc, update, updateCell, updateContextWithCanvas, updateContextWithSheetData, updateDropCell, updateFormat, updateFormatCell, updateInlineStringFormat, updateInlineStringFormatOutside, updateItem, updateMoreCell, updateSheet, validateCellData, validateIdCard, valueIsError, valueShowEs, writeReplaceValue };
|
package/dist/index.js
CHANGED
|
@@ -9458,7 +9458,9 @@ var en = {
|
|
|
9458
9458
|
toolMoreTip: "More features",
|
|
9459
9459
|
moreOptions: "More options",
|
|
9460
9460
|
cellFormat: "Cell format config",
|
|
9461
|
-
print: "Print"
|
|
9461
|
+
print: "Print",
|
|
9462
|
+
autoRecalcOn: "Auto recalculate: on (dependent formulas update right after editing)",
|
|
9463
|
+
autoRecalcOff: "Auto recalculate: off (dependent cells do not update after editing)"
|
|
9462
9464
|
},
|
|
9463
9465
|
alternatingColors: {
|
|
9464
9466
|
applyRange: "Apply to range",
|
|
@@ -20036,7 +20038,9 @@ var zh = {
|
|
|
20036
20038
|
toolMoreTip: "更多功能",
|
|
20037
20039
|
moreOptions: "更多选项",
|
|
20038
20040
|
cellFormat: "设置单元格格式",
|
|
20039
|
-
print: "打印"
|
|
20041
|
+
print: "打印",
|
|
20042
|
+
autoRecalcOn: "自动重算:已开启(编辑后立即更新相关公式)",
|
|
20043
|
+
autoRecalcOff: "自动重算:已关闭(编辑后不更新相关引用单元格)"
|
|
20040
20044
|
},
|
|
20041
20045
|
alternatingColors: {
|
|
20042
20046
|
applyRange: "应用范围",
|
|
@@ -30635,7 +30639,9 @@ var es = {
|
|
|
30635
30639
|
toolMoreTip: "Más funcionalidades",
|
|
30636
30640
|
moreOptions: "Más opciones",
|
|
30637
30641
|
cellFormat: "Configuración formato de celda",
|
|
30638
|
-
print: "Imprimir"
|
|
30642
|
+
print: "Imprimir",
|
|
30643
|
+
autoRecalcOn: "Recálculo automático: activado (las fórmulas dependientes se actualizan al editar)",
|
|
30644
|
+
autoRecalcOff: "Recálculo automático: desactivado (las celdas dependientes no se actualizan al editar)"
|
|
30639
30645
|
},
|
|
30640
30646
|
alternatingColors: {
|
|
30641
30647
|
applyRange: "Aplicar a rango",
|
|
@@ -37584,7 +37590,7 @@ function execfunction(ctx, txt, r, c, id, isrefresh, notInsertFunc) {
|
|
|
37584
37590
|
if (!notInsertFunc) {
|
|
37585
37591
|
insertUpdateFunctionGroup(ctx, r, c, id);
|
|
37586
37592
|
}
|
|
37587
|
-
if (isrefresh) {
|
|
37593
|
+
if (isrefresh && isAutoRecalc(ctx)) {
|
|
37588
37594
|
var _data$r;
|
|
37589
37595
|
var data = getFlowdata(ctx, id);
|
|
37590
37596
|
var cell = data === null || data === void 0 ? void 0 : (_data$r = data[r]) === null || _data$r === void 0 ? void 0 : _data$r[c];
|
|
@@ -37659,7 +37665,7 @@ function groupValuesRefresh(ctx) {
|
|
|
37659
37665
|
}
|
|
37660
37666
|
}
|
|
37661
37667
|
function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, notInsertFunc, originFormula) {
|
|
37662
|
-
console.time('execFunctionGroup-
|
|
37668
|
+
console.time('execFunctionGroup-1');
|
|
37663
37669
|
isForce = !___default['default'].isNil(isForce) ? isForce : false;
|
|
37664
37670
|
notInsertFunc = !___default['default'].isNil(notInsertFunc) ? notInsertFunc : true;
|
|
37665
37671
|
if (___default['default'].isNil(data)) {
|
|
@@ -37703,7 +37709,6 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, no
|
|
|
37703
37709
|
updateValueOjects[_key2] = 1;
|
|
37704
37710
|
}
|
|
37705
37711
|
}
|
|
37706
|
-
console.time('arrayMatchCache');
|
|
37707
37712
|
var arrayMatchCache = {};
|
|
37708
37713
|
var arrayMatch = function arrayMatch(formulaArray, _formulaObjects, _updateValueOjects, func) {
|
|
37709
37714
|
for (var a = 0; a < formulaArray.length; a += 1) {
|
|
@@ -37736,8 +37741,6 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, no
|
|
|
37736
37741
|
}
|
|
37737
37742
|
}
|
|
37738
37743
|
};
|
|
37739
|
-
console.timeEnd('arrayMatchCache');
|
|
37740
|
-
console.time('cache1');
|
|
37741
37744
|
var _loop = function _loop() {
|
|
37742
37745
|
var formulaCell = calcChains[_i12];
|
|
37743
37746
|
var fR = formulaCell.r;
|
|
@@ -37852,8 +37855,6 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, no
|
|
|
37852
37855
|
_ret = _loop();
|
|
37853
37856
|
if (_ret === 0) continue;
|
|
37854
37857
|
}
|
|
37855
|
-
console.timeEnd('cache1');
|
|
37856
|
-
console.time('cache2');
|
|
37857
37858
|
Object.keys(formulaObjects).forEach(function (key) {
|
|
37858
37859
|
var formulaObject = formulaObjects[key];
|
|
37859
37860
|
arrayMatch(formulaObject.formulaArray, formulaObjects, updateValueOjects, function (childKey) {
|
|
@@ -37870,8 +37871,6 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, no
|
|
|
37870
37871
|
updateValueArray.push(formulaObject);
|
|
37871
37872
|
}
|
|
37872
37873
|
});
|
|
37873
|
-
console.timeEnd('cache2');
|
|
37874
|
-
console.time('dev');
|
|
37875
37874
|
var visited = {};
|
|
37876
37875
|
var inStack = {};
|
|
37877
37876
|
var circularNodes = {};
|
|
@@ -37983,8 +37982,6 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, no
|
|
|
37983
37982
|
});
|
|
37984
37983
|
});
|
|
37985
37984
|
}
|
|
37986
|
-
console.timeEnd('dev');
|
|
37987
|
-
console.timeEnd('execFunctionGroup-before');
|
|
37988
37985
|
var lastDataRowSheets = Object.create(null);
|
|
37989
37986
|
for (var _i14 = 0; _i14 < formulaRunList.length; _i14++) {
|
|
37990
37987
|
var sheetId = formulaRunList[_i14].id;
|
|
@@ -38002,7 +37999,7 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, no
|
|
|
38002
37999
|
lastDataRowSheets[sheetId] = lastDataRow;
|
|
38003
38000
|
}
|
|
38004
38001
|
ctx.formulaCache._lastDataRowCache = lastDataRowSheets;
|
|
38005
|
-
console.time('formulaRunList');
|
|
38002
|
+
console.time('execFunctionGroup-formulaRunList');
|
|
38006
38003
|
console.log('formulaRunList', formulaRunList);
|
|
38007
38004
|
for (var _i15 = 0; _i15 < formulaRunList.length; _i15 += 1) {
|
|
38008
38005
|
var formulaCell = formulaRunList[_i15];
|
|
@@ -38024,9 +38021,10 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, no
|
|
|
38024
38021
|
f: v[2]
|
|
38025
38022
|
};
|
|
38026
38023
|
}
|
|
38027
|
-
console.timeEnd('formulaRunList');
|
|
38024
|
+
console.timeEnd('execFunctionGroup-formulaRunList');
|
|
38028
38025
|
ctx.formulaCache._lastDataRowCache = null;
|
|
38029
38026
|
ctx.formulaCache.execFunctionExist = undefined;
|
|
38027
|
+
console.timeEnd('execFunctionGroup-1');
|
|
38030
38028
|
}
|
|
38031
38029
|
function findrangeindex(ctx, v, vp) {
|
|
38032
38030
|
var re = /<span.*?>/g;
|
|
@@ -42096,7 +42094,9 @@ function updateCell(ctx, r, c, $input, value, canvas, sheetId) {
|
|
|
42096
42094
|
} else {
|
|
42097
42095
|
var _d$r3;
|
|
42098
42096
|
delFunctionGroup(ctx, r, c);
|
|
42099
|
-
|
|
42097
|
+
if (isAutoRecalc(ctx)) {
|
|
42098
|
+
execFunctionGroup(ctx, r, c, value, undefined, undefined, false, false, "");
|
|
42099
|
+
}
|
|
42100
42100
|
curv = ___default['default'].cloneDeep((d === null || d === void 0 ? void 0 : (_d$r3 = d[r]) === null || _d$r3 === void 0 ? void 0 : _d$r3[c]) || {});
|
|
42101
42101
|
curv.v = value;
|
|
42102
42102
|
delete curv.f;
|
|
@@ -42155,7 +42155,9 @@ function updateCell(ctx, r, c, $input, value, canvas, sheetId) {
|
|
|
42155
42155
|
}
|
|
42156
42156
|
} else {
|
|
42157
42157
|
delFunctionGroup(ctx, r, c);
|
|
42158
|
-
|
|
42158
|
+
if (isAutoRecalc(ctx)) {
|
|
42159
|
+
execFunctionGroup(ctx, r, c, value, undefined, undefined, false, false, "");
|
|
42160
|
+
}
|
|
42159
42161
|
}
|
|
42160
42162
|
}
|
|
42161
42163
|
setCellValue(ctx, r, c, d, value);
|
|
@@ -46657,11 +46659,9 @@ function copySheet(ctx, sheetId, hooks) {
|
|
|
46657
46659
|
(_hooks$onCopySheet = hooks.onCopySheet) === null || _hooks$onCopySheet === void 0 ? void 0 : _hooks$onCopySheet.call(hooks, sheetId, copyId);
|
|
46658
46660
|
}
|
|
46659
46661
|
function calculateSheetFromula(ctx, id, isrefresh) {
|
|
46660
|
-
console.time("calcTime:all");
|
|
46661
46662
|
execFunctionGroup(ctx, null, null, null, undefined, [], true);
|
|
46662
46663
|
groupValuesRefresh(ctx);
|
|
46663
46664
|
ctx.formulaCache.execFunctionGlobalData = null;
|
|
46664
|
-
console.timeEnd("calcTime:all");
|
|
46665
46665
|
}
|
|
46666
46666
|
function updateFunctionGroupBySheetId(ctx, id) {
|
|
46667
46667
|
var _ctx$luckysheetfile$i, _ctx$luckysheetfile$i2, _ctx$luckysheetfile$i3;
|
|
@@ -46712,7 +46712,6 @@ function parseCellReferences(expression) {
|
|
|
46712
46712
|
return uniqueCells;
|
|
46713
46713
|
}
|
|
46714
46714
|
function calculateSheetByCells(ctx, cells) {
|
|
46715
|
-
console.time("calculateSheetByCellsTime");
|
|
46716
46715
|
var fileList = ctx.luckysheetfile;
|
|
46717
46716
|
var sheetIdNameMap = {};
|
|
46718
46717
|
for (var ffIndex = 0; ffIndex < fileList.length; ffIndex++) {
|
|
@@ -46782,7 +46781,6 @@ function calculateSheetByCells(ctx, cells) {
|
|
|
46782
46781
|
id: _id
|
|
46783
46782
|
});
|
|
46784
46783
|
}
|
|
46785
|
-
console.timeEnd("calculateSheetByCellsTime");
|
|
46786
46784
|
}
|
|
46787
46785
|
function getVariableValue(variables, sheetId, name) {
|
|
46788
46786
|
var _variables$sheetId;
|
|
@@ -47650,9 +47648,7 @@ function runExecFunction(ctx, range, index, data) {
|
|
|
47650
47648
|
}
|
|
47651
47649
|
}
|
|
47652
47650
|
ctx.formulaCache.execFunctionExist.reverse();
|
|
47653
|
-
console.time('execFunctionGroup');
|
|
47654
47651
|
execFunctionGroup(ctx, null, null, null, null, data);
|
|
47655
|
-
console.timeEnd('execFunctionGroup');
|
|
47656
47652
|
ctx.formulaCache.execFunctionGlobalData = null;
|
|
47657
47653
|
updateFunctionGroup(ctx);
|
|
47658
47654
|
}
|
|
@@ -47665,7 +47661,6 @@ function jfrefreshgrid(ctx, data, range) {
|
|
|
47665
47661
|
range = ctx.luckysheet_select_save;
|
|
47666
47662
|
if (range == null) return;
|
|
47667
47663
|
}
|
|
47668
|
-
console.log('isRunExecFunction', isRunExecFunction);
|
|
47669
47664
|
if (isRunExecFunction) {
|
|
47670
47665
|
runExecFunction(ctx, range, ctx.currentSheetId, data);
|
|
47671
47666
|
}
|
|
@@ -49406,6 +49401,9 @@ function handleLink(ctx) {
|
|
|
49406
49401
|
showLinkCard(ctx, selection.row[0], selection.column[0], true);
|
|
49407
49402
|
}
|
|
49408
49403
|
}
|
|
49404
|
+
function handleAutoRecalc(ctx) {
|
|
49405
|
+
ctx.autoRecalc = !isAutoRecalc(ctx);
|
|
49406
|
+
}
|
|
49409
49407
|
var handlerMap = {
|
|
49410
49408
|
"currency-format": handleCurrencyFormat,
|
|
49411
49409
|
"percentage-format": handlePercentageFormat,
|
|
@@ -49426,6 +49424,7 @@ var handlerMap = {
|
|
|
49426
49424
|
underline: handleUnderline,
|
|
49427
49425
|
"clear-format": handleClearFormat,
|
|
49428
49426
|
"format-painter": handleFormatPainter,
|
|
49427
|
+
"auto-recalc": handleAutoRecalc,
|
|
49429
49428
|
search: function search(ctx) {
|
|
49430
49429
|
ctx.showSearch = true;
|
|
49431
49430
|
},
|
|
@@ -52840,6 +52839,9 @@ var Canvas = /*#__PURE__*/function () {
|
|
|
52840
52839
|
if (clear) {
|
|
52841
52840
|
renderCtx.clearRect(0, 0, this.sheetCtx.luckysheetTableContentHW[0], this.sheetCtx.luckysheetTableContentHW[1]);
|
|
52842
52841
|
}
|
|
52842
|
+
renderCtx.beginPath();
|
|
52843
|
+
renderCtx.rect(offsetLeft - 1, offsetTop - 1, drawWidth + 1, drawHeight + 1);
|
|
52844
|
+
renderCtx.clip();
|
|
52843
52845
|
var rowStart;
|
|
52844
52846
|
var rowEnd;
|
|
52845
52847
|
var colStart;
|
|
@@ -53033,7 +53035,7 @@ var Canvas = /*#__PURE__*/function () {
|
|
|
53033
53035
|
_startY2 = this.sheetCtx.visibledatarow[_r2 - 1] - scrollHeight - 1;
|
|
53034
53036
|
}
|
|
53035
53037
|
_endY2 = this.sheetCtx.visibledatarow[_r2 + mainCell.mc.rs - 1] - scrollHeight;
|
|
53036
|
-
_endX2 =
|
|
53038
|
+
_endX2 = this.sheetCtx.visibledatacolumn[_c2 + mainCell.mc.cs - 1] - scrollWidth;
|
|
53037
53039
|
if (___default['default'].isNil(_value3) || _value3.toString().length === 0) {
|
|
53038
53040
|
this.nullCellRender(_r2, _c2, _startY2, _startX2, _endY2, _endX2, renderCtx, afCompute, cfCompute, offsetLeft, offsetTop, dynamicArrayCompute, cellOverflowMap, colStart, colEnd, scrollHeight, scrollWidth, bodrder05, true);
|
|
53039
53041
|
} else {
|
|
@@ -55726,6 +55728,9 @@ function handleKeydownForZoom(ev, currentZoom) {
|
|
|
55726
55728
|
return parseFloat(zoom.toFixed(1));
|
|
55727
55729
|
}
|
|
55728
55730
|
|
|
55731
|
+
function isAutoRecalc(ctx) {
|
|
55732
|
+
return ctx.autoRecalc !== false;
|
|
55733
|
+
}
|
|
55729
55734
|
function defaultContext(refs) {
|
|
55730
55735
|
return {
|
|
55731
55736
|
headerBgColor: "#fff",
|
|
@@ -55930,6 +55935,7 @@ function defaultContext(refs) {
|
|
|
55930
55935
|
showGridLines: true,
|
|
55931
55936
|
showHeaders: true,
|
|
55932
55937
|
allowEdit: true,
|
|
55938
|
+
autoRecalc: true,
|
|
55933
55939
|
showAddSheetButton: true,
|
|
55934
55940
|
onAddSheetClick: undefined,
|
|
55935
55941
|
onSheetRename: undefined,
|
|
@@ -56780,7 +56786,9 @@ function setCellValue$1(ctx, row, column, value, cellInput) {
|
|
|
56780
56786
|
var formatList = FORMAT_LIST;
|
|
56781
56787
|
if (value == null || value.toString().length === 0) {
|
|
56782
56788
|
delFunctionGroup(ctx, row, column);
|
|
56783
|
-
|
|
56789
|
+
if (isAutoRecalc(ctx)) {
|
|
56790
|
+
execFunctionGroup(ctx, row, column, value, sheet.id, data, false, false, "");
|
|
56791
|
+
}
|
|
56784
56792
|
setCellValue(ctx, row, column, data, value);
|
|
56785
56793
|
} else if (value instanceof Object) {
|
|
56786
56794
|
var _data$row;
|
|
@@ -56851,7 +56859,9 @@ function setCellValue$1(ctx, row, column, value, cellInput) {
|
|
|
56851
56859
|
updateCell(ctx, row, column, cellInput, value);
|
|
56852
56860
|
} else {
|
|
56853
56861
|
delFunctionGroup(ctx, row, column);
|
|
56854
|
-
|
|
56862
|
+
if (isAutoRecalc(ctx)) {
|
|
56863
|
+
execFunctionGroup(ctx, row, column, value, sheet.id, data, false, false, "");
|
|
56864
|
+
}
|
|
56855
56865
|
setCellValue(ctx, row, column, data, value);
|
|
56856
56866
|
}
|
|
56857
56867
|
}
|
|
@@ -57747,12 +57757,13 @@ var defaultSettings = {
|
|
|
57747
57757
|
disabledMoveSheet: false,
|
|
57748
57758
|
lang: null,
|
|
57749
57759
|
forceCalculation: false,
|
|
57760
|
+
autoRecalc: true,
|
|
57750
57761
|
rowHeaderWidth: 46,
|
|
57751
57762
|
columnHeaderHeight: 20,
|
|
57752
57763
|
defaultColWidth: 73,
|
|
57753
57764
|
defaultRowHeight: 19,
|
|
57754
57765
|
defaultFontSize: 10,
|
|
57755
|
-
toolbarItems: ["undo", "redo", "format-painter", "clear-format", "|", "format", "|", "font", "|", "font-size", "|", "bold", "italic", "strike-through", "underline", "|", "font-color", "background", "border", "merge-cell", "|", "horizontal-align", "vertical-align", "text-wrap", "text-rotation", "|", "search"],
|
|
57766
|
+
toolbarItems: ["undo", "redo", "format-painter", "clear-format", "|", "format", "|", "font", "|", "font-size", "|", "bold", "italic", "strike-through", "underline", "|", "font-color", "background", "border", "merge-cell", "|", "horizontal-align", "vertical-align", "text-wrap", "text-rotation", "|", "auto-recalc", "search"],
|
|
57756
57767
|
cellContextMenu: function cellContextMenu() {
|
|
57757
57768
|
return ["insert-comment", "copy", "paste", "|", "insert-row", "insert-column", "delete-row", "delete-column", "delete-cell", "hide-row", "hide-column", "set-row-height", "set-column-width", "|", "clear", "sort", "orderAZ", "orderZA", "filter", "chart", "image", "link", "data", "cell-format"];
|
|
57758
57769
|
},
|
|
@@ -61896,6 +61907,7 @@ exports.getrangeseleciton = getrangeseleciton;
|
|
|
61896
61907
|
exports.goToLink = goToLink;
|
|
61897
61908
|
exports.groupValuesRefresh = groupValuesRefresh;
|
|
61898
61909
|
exports.handleArrowKey = handleArrowKey;
|
|
61910
|
+
exports.handleAutoRecalc = handleAutoRecalc;
|
|
61899
61911
|
exports.handleBold = handleBold;
|
|
61900
61912
|
exports.handleBorder = handleBorder;
|
|
61901
61913
|
exports.handleCellAreaDoubleClick = handleCellAreaDoubleClick;
|
|
@@ -61963,6 +61975,7 @@ exports.insertUpdateFunctionGroup = insertUpdateFunctionGroup;
|
|
|
61963
61975
|
exports.inverseRowColOptions = inverseRowColOptions;
|
|
61964
61976
|
exports.isAllSelectedCellsInStatus = isAllSelectedCellsInStatus;
|
|
61965
61977
|
exports.isAllowEdit = isAllowEdit;
|
|
61978
|
+
exports.isAutoRecalc = isAutoRecalc;
|
|
61966
61979
|
exports.isFormulaReplaceValue = isFormulaReplaceValue;
|
|
61967
61980
|
exports.isInlineStringCT = isInlineStringCT;
|
|
61968
61981
|
exports.isInlineStringCell = isInlineStringCell;
|
package/dist/locale/en.d.ts
CHANGED
package/dist/locale/es.d.ts
CHANGED
package/dist/locale/index.d.ts
CHANGED
package/dist/locale/zh.d.ts
CHANGED
package/dist/locale/zh_tw.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export declare function handleFreeze(ctx: Context, type: string): void;
|
|
|
27
27
|
export declare function handleTextSize(ctx: Context, cellInput: HTMLDivElement, size: number, canvas?: CanvasRenderingContext2D): void;
|
|
28
28
|
export declare function handleSum(ctx: Context, cellInput: HTMLDivElement, fxInput: HTMLDivElement | null | undefined, cache?: GlobalCache): void;
|
|
29
29
|
export declare function handleLink(ctx: Context): void;
|
|
30
|
+
export declare function handleAutoRecalc(ctx: Context): void;
|
|
30
31
|
export declare function toolbarItemClickHandler(name: string): ToolbarItemClickHandler;
|
|
31
32
|
export declare function toolbarItemSelectedFunc(name: string): ToolbarItemSelectedFunc;
|
|
32
33
|
export {};
|
package/dist/settings.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leankylin-sheet/core",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.38",
|
|
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": "7.0.
|
|
16
|
+
"@leankylin-sheet/formula-parser": "7.0.38",
|
|
17
17
|
"dayjs": "^1.11.0",
|
|
18
18
|
"immer": "^9.0.12",
|
|
19
19
|
"lodash": "^4.17.21",
|