@leankylin-sheet/core 7.0.41 → 7.0.43
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 +1 -0
- package/dist/index.esm.js +40 -7
- package/dist/index.js +40 -6
- package/dist/locale/en.d.ts +1 -0
- package/dist/locale/es.d.ts +1 -0
- package/dist/locale/index.d.ts +1 -0
- package/dist/locale/zh.d.ts +1 -0
- package/dist/locale/zh_tw.d.ts +1 -0
- package/dist/modules/cell.d.ts +1 -0
- package/package.json +2 -2
package/dist/context.d.ts
CHANGED
|
@@ -182,6 +182,7 @@ export type Context = {
|
|
|
182
182
|
allowEdit: boolean;
|
|
183
183
|
showAddSheetButton: boolean;
|
|
184
184
|
autoRecalc: boolean;
|
|
185
|
+
isUpdatingCell: boolean;
|
|
185
186
|
onAddSheetClick?: () => void;
|
|
186
187
|
onSheetRename?: (newName: string) => void;
|
|
187
188
|
onSheetDelete?: (sheetId: string, sheet: Sheet) => void;
|
package/dist/index.esm.js
CHANGED
|
@@ -11111,7 +11111,8 @@ var en = {
|
|
|
11111
11111
|
menuItemColumns: "Print title columns"
|
|
11112
11112
|
},
|
|
11113
11113
|
edit: {
|
|
11114
|
-
typing: "typing"
|
|
11114
|
+
typing: "typing",
|
|
11115
|
+
updatingRelatedCells: "Updating"
|
|
11115
11116
|
},
|
|
11116
11117
|
websocket: {
|
|
11117
11118
|
success: "WebSocket connection success",
|
|
@@ -21723,7 +21724,8 @@ var zh = {
|
|
|
21723
21724
|
menuItemColumns: "打印标题列"
|
|
21724
21725
|
},
|
|
21725
21726
|
edit: {
|
|
21726
|
-
typing: "正在输入"
|
|
21727
|
+
typing: "正在输入",
|
|
21728
|
+
updatingRelatedCells: "修改中"
|
|
21727
21729
|
},
|
|
21728
21730
|
websocket: {
|
|
21729
21731
|
success: "WebSocket连接成功",
|
|
@@ -31754,7 +31756,8 @@ var es = {
|
|
|
31754
31756
|
menuItemColumns: "Imprimir títulos de columnas"
|
|
31755
31757
|
},
|
|
31756
31758
|
edit: {
|
|
31757
|
-
typing: "mecanografía"
|
|
31759
|
+
typing: "mecanografía",
|
|
31760
|
+
updatingRelatedCells: "Actualizando"
|
|
31758
31761
|
},
|
|
31759
31762
|
websocket: {
|
|
31760
31763
|
success: "Éxito de la conexión de WebSocket",
|
|
@@ -41989,7 +41992,7 @@ function cancelNormalSelected(ctx) {
|
|
|
41989
41992
|
ctx.formulaCache.rangedrag_row_start = false;
|
|
41990
41993
|
ctx.formulaCache.func_selectedrange = undefined;
|
|
41991
41994
|
}
|
|
41992
|
-
function
|
|
41995
|
+
function updateCellInner(ctx, r, c, $input, value, canvas, sheetId) {
|
|
41993
41996
|
var _curv, _curv$ct, _inputText, _curv2, _ctx$hooks$beforeUpda, _ctx$hooks, _curv3;
|
|
41994
41997
|
var inputText = $input === null || $input === void 0 ? void 0 : $input.innerText;
|
|
41995
41998
|
var inputHtml = $input === null || $input === void 0 ? void 0 : $input.innerHTML;
|
|
@@ -42234,6 +42237,35 @@ function updateCell(ctx, r, c, $input, value, canvas, sheetId) {
|
|
|
42234
42237
|
}
|
|
42235
42238
|
ctx.formulaCache.execFunctionGlobalData = null;
|
|
42236
42239
|
}
|
|
42240
|
+
function updateCell(ctx, r, c, $input, value, canvas, sheetId) {
|
|
42241
|
+
ctx.isUpdatingCell = true;
|
|
42242
|
+
try {
|
|
42243
|
+
updateCellInner(ctx, r, c, $input, value, canvas, sheetId);
|
|
42244
|
+
} finally {
|
|
42245
|
+
ctx.isUpdatingCell = false;
|
|
42246
|
+
}
|
|
42247
|
+
}
|
|
42248
|
+
function isCellEditUnchanged(ctx, r, c, $input, value, sheetId) {
|
|
42249
|
+
var _flowdata$r, _curv$ct2, _curv$ct3;
|
|
42250
|
+
if (value != null && _typeof(value) === "object") return false;
|
|
42251
|
+
var flowdata = getFlowdata(ctx, sheetId);
|
|
42252
|
+
if (_.isNil(flowdata) || _.isNil(r) || _.isNil(c)) return false;
|
|
42253
|
+
var curv = (_flowdata$r = flowdata[r]) === null || _flowdata$r === void 0 ? void 0 : _flowdata$r[c];
|
|
42254
|
+
if (isInlineStringCell(curv)) return false;
|
|
42255
|
+
var text = value !== null && value !== void 0 ? value : $input === null || $input === void 0 ? void 0 : $input.innerText;
|
|
42256
|
+
if (_.isNil(text)) return false;
|
|
42257
|
+
if (typeof text === "string" && (curv === null || curv === void 0 ? void 0 : (_curv$ct2 = curv.ct) === null || _curv$ct2 === void 0 ? void 0 : _curv$ct2.fa) !== "@") {
|
|
42258
|
+
text = text.trim();
|
|
42259
|
+
}
|
|
42260
|
+
if (text === "") {
|
|
42261
|
+
return !curv || isRealNull(curv.v) && !curv.spl && !curv.f;
|
|
42262
|
+
}
|
|
42263
|
+
if (!curv) return false;
|
|
42264
|
+
if (curv.qp === 1) return false;
|
|
42265
|
+
if (text === curv.f || text === curv.v || text === curv.m) return true;
|
|
42266
|
+
var shown = ((_curv$ct3 = curv.ct) === null || _curv$ct3 === void 0 ? void 0 : _curv$ct3.t) === "d" ? curv.m : curv.v;
|
|
42267
|
+
return !_.isNil(shown) && "".concat(shown) === "".concat(text);
|
|
42268
|
+
}
|
|
42237
42269
|
function getOrigincell(ctx, r, c, i) {
|
|
42238
42270
|
var data = getFlowdata(ctx, i);
|
|
42239
42271
|
if (_.isNil(r) || _.isNil(c)) {
|
|
@@ -42373,10 +42405,10 @@ function isAllSelectedCellsInStatus(ctx, attr, status) {
|
|
|
42373
42405
|
var cells = getFlattenedRange(ctx);
|
|
42374
42406
|
var flowdata = getFlowdata(ctx);
|
|
42375
42407
|
return cells.every(function (_ref2) {
|
|
42376
|
-
var _flowdata$
|
|
42408
|
+
var _flowdata$r2;
|
|
42377
42409
|
var r = _ref2.r,
|
|
42378
42410
|
c = _ref2.c;
|
|
42379
|
-
var cell = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$
|
|
42411
|
+
var cell = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$r2 = flowdata[r]) === null || _flowdata$r2 === void 0 ? void 0 : _flowdata$r2[c];
|
|
42380
42412
|
if (_.isNil(cell)) {
|
|
42381
42413
|
return false;
|
|
42382
42414
|
}
|
|
@@ -55977,6 +56009,7 @@ function defaultContext(refs) {
|
|
|
55977
56009
|
showHeaders: true,
|
|
55978
56010
|
allowEdit: true,
|
|
55979
56011
|
autoRecalc: true,
|
|
56012
|
+
isUpdatingCell: false,
|
|
55980
56013
|
showAddSheetButton: true,
|
|
55981
56014
|
onAddSheetClick: undefined,
|
|
55982
56015
|
onSheetRename: undefined,
|
|
@@ -61802,4 +61835,4 @@ function handlePasteByClick(ctx, triggerType) {
|
|
|
61802
61835
|
} else if (data.indexOf("leankylin-copy-action-image") > -1) ; else ;
|
|
61803
61836
|
}
|
|
61804
61837
|
|
|
61805
|
-
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 };
|
|
61838
|
+
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, isCellEditUnchanged, 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
|
@@ -11121,7 +11121,8 @@ var en = {
|
|
|
11121
11121
|
menuItemColumns: "Print title columns"
|
|
11122
11122
|
},
|
|
11123
11123
|
edit: {
|
|
11124
|
-
typing: "typing"
|
|
11124
|
+
typing: "typing",
|
|
11125
|
+
updatingRelatedCells: "Updating"
|
|
11125
11126
|
},
|
|
11126
11127
|
websocket: {
|
|
11127
11128
|
success: "WebSocket connection success",
|
|
@@ -21733,7 +21734,8 @@ var zh = {
|
|
|
21733
21734
|
menuItemColumns: "打印标题列"
|
|
21734
21735
|
},
|
|
21735
21736
|
edit: {
|
|
21736
|
-
typing: "正在输入"
|
|
21737
|
+
typing: "正在输入",
|
|
21738
|
+
updatingRelatedCells: "修改中"
|
|
21737
21739
|
},
|
|
21738
21740
|
websocket: {
|
|
21739
21741
|
success: "WebSocket连接成功",
|
|
@@ -31764,7 +31766,8 @@ var es = {
|
|
|
31764
31766
|
menuItemColumns: "Imprimir títulos de columnas"
|
|
31765
31767
|
},
|
|
31766
31768
|
edit: {
|
|
31767
|
-
typing: "mecanografía"
|
|
31769
|
+
typing: "mecanografía",
|
|
31770
|
+
updatingRelatedCells: "Actualizando"
|
|
31768
31771
|
},
|
|
31769
31772
|
websocket: {
|
|
31770
31773
|
success: "Éxito de la conexión de WebSocket",
|
|
@@ -41999,7 +42002,7 @@ function cancelNormalSelected(ctx) {
|
|
|
41999
42002
|
ctx.formulaCache.rangedrag_row_start = false;
|
|
42000
42003
|
ctx.formulaCache.func_selectedrange = undefined;
|
|
42001
42004
|
}
|
|
42002
|
-
function
|
|
42005
|
+
function updateCellInner(ctx, r, c, $input, value, canvas, sheetId) {
|
|
42003
42006
|
var _curv, _curv$ct, _inputText, _curv2, _ctx$hooks$beforeUpda, _ctx$hooks, _curv3;
|
|
42004
42007
|
var inputText = $input === null || $input === void 0 ? void 0 : $input.innerText;
|
|
42005
42008
|
var inputHtml = $input === null || $input === void 0 ? void 0 : $input.innerHTML;
|
|
@@ -42244,6 +42247,35 @@ function updateCell(ctx, r, c, $input, value, canvas, sheetId) {
|
|
|
42244
42247
|
}
|
|
42245
42248
|
ctx.formulaCache.execFunctionGlobalData = null;
|
|
42246
42249
|
}
|
|
42250
|
+
function updateCell(ctx, r, c, $input, value, canvas, sheetId) {
|
|
42251
|
+
ctx.isUpdatingCell = true;
|
|
42252
|
+
try {
|
|
42253
|
+
updateCellInner(ctx, r, c, $input, value, canvas, sheetId);
|
|
42254
|
+
} finally {
|
|
42255
|
+
ctx.isUpdatingCell = false;
|
|
42256
|
+
}
|
|
42257
|
+
}
|
|
42258
|
+
function isCellEditUnchanged(ctx, r, c, $input, value, sheetId) {
|
|
42259
|
+
var _flowdata$r, _curv$ct2, _curv$ct3;
|
|
42260
|
+
if (value != null && _typeof(value) === "object") return false;
|
|
42261
|
+
var flowdata = getFlowdata(ctx, sheetId);
|
|
42262
|
+
if (___default['default'].isNil(flowdata) || ___default['default'].isNil(r) || ___default['default'].isNil(c)) return false;
|
|
42263
|
+
var curv = (_flowdata$r = flowdata[r]) === null || _flowdata$r === void 0 ? void 0 : _flowdata$r[c];
|
|
42264
|
+
if (isInlineStringCell(curv)) return false;
|
|
42265
|
+
var text = value !== null && value !== void 0 ? value : $input === null || $input === void 0 ? void 0 : $input.innerText;
|
|
42266
|
+
if (___default['default'].isNil(text)) return false;
|
|
42267
|
+
if (typeof text === "string" && (curv === null || curv === void 0 ? void 0 : (_curv$ct2 = curv.ct) === null || _curv$ct2 === void 0 ? void 0 : _curv$ct2.fa) !== "@") {
|
|
42268
|
+
text = text.trim();
|
|
42269
|
+
}
|
|
42270
|
+
if (text === "") {
|
|
42271
|
+
return !curv || isRealNull(curv.v) && !curv.spl && !curv.f;
|
|
42272
|
+
}
|
|
42273
|
+
if (!curv) return false;
|
|
42274
|
+
if (curv.qp === 1) return false;
|
|
42275
|
+
if (text === curv.f || text === curv.v || text === curv.m) return true;
|
|
42276
|
+
var shown = ((_curv$ct3 = curv.ct) === null || _curv$ct3 === void 0 ? void 0 : _curv$ct3.t) === "d" ? curv.m : curv.v;
|
|
42277
|
+
return !___default['default'].isNil(shown) && "".concat(shown) === "".concat(text);
|
|
42278
|
+
}
|
|
42247
42279
|
function getOrigincell(ctx, r, c, i) {
|
|
42248
42280
|
var data = getFlowdata(ctx, i);
|
|
42249
42281
|
if (___default['default'].isNil(r) || ___default['default'].isNil(c)) {
|
|
@@ -42383,10 +42415,10 @@ function isAllSelectedCellsInStatus(ctx, attr, status) {
|
|
|
42383
42415
|
var cells = getFlattenedRange(ctx);
|
|
42384
42416
|
var flowdata = getFlowdata(ctx);
|
|
42385
42417
|
return cells.every(function (_ref2) {
|
|
42386
|
-
var _flowdata$
|
|
42418
|
+
var _flowdata$r2;
|
|
42387
42419
|
var r = _ref2.r,
|
|
42388
42420
|
c = _ref2.c;
|
|
42389
|
-
var cell = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$
|
|
42421
|
+
var cell = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$r2 = flowdata[r]) === null || _flowdata$r2 === void 0 ? void 0 : _flowdata$r2[c];
|
|
42390
42422
|
if (___default['default'].isNil(cell)) {
|
|
42391
42423
|
return false;
|
|
42392
42424
|
}
|
|
@@ -55987,6 +56019,7 @@ function defaultContext(refs) {
|
|
|
55987
56019
|
showHeaders: true,
|
|
55988
56020
|
allowEdit: true,
|
|
55989
56021
|
autoRecalc: true,
|
|
56022
|
+
isUpdatingCell: false,
|
|
55990
56023
|
showAddSheetButton: true,
|
|
55991
56024
|
onAddSheetClick: undefined,
|
|
55992
56025
|
onSheetRename: undefined,
|
|
@@ -62027,6 +62060,7 @@ exports.inverseRowColOptions = inverseRowColOptions;
|
|
|
62027
62060
|
exports.isAllSelectedCellsInStatus = isAllSelectedCellsInStatus;
|
|
62028
62061
|
exports.isAllowEdit = isAllowEdit;
|
|
62029
62062
|
exports.isAutoRecalc = isAutoRecalc;
|
|
62063
|
+
exports.isCellEditUnchanged = isCellEditUnchanged;
|
|
62030
62064
|
exports.isFormulaReplaceValue = isFormulaReplaceValue;
|
|
62031
62065
|
exports.isInlineStringCT = isInlineStringCT;
|
|
62032
62066
|
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
package/dist/modules/cell.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare function mergeMoveMain(ctx: Context, columnseleted: number[], row
|
|
|
14
14
|
export declare function cancelFunctionrangeSelected(ctx: Context): void;
|
|
15
15
|
export declare function cancelNormalSelected(ctx: Context): void;
|
|
16
16
|
export declare function updateCell(ctx: Context, r: number, c: number, $input?: HTMLDivElement | null, value?: any, canvas?: CanvasRenderingContext2D, sheetId?: string): void;
|
|
17
|
+
export declare function isCellEditUnchanged(ctx: Context, r: number, c: number, $input?: HTMLDivElement | null, value?: any, sheetId?: string): boolean;
|
|
17
18
|
export declare function getOrigincell(ctx: Context, r: number, c: number, i: string): Cell | null;
|
|
18
19
|
export declare function getcellFormula(ctx: Context, r: number, c: number, i: string, data?: any): any;
|
|
19
20
|
export declare function getRange(ctx: Context): Range;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leankylin-sheet/core",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.43",
|
|
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.43",
|
|
17
17
|
"dayjs": "^1.11.0",
|
|
18
18
|
"immer": "^9.0.12",
|
|
19
19
|
"lodash": "^4.17.21",
|