@leankylin-sheet/core 7.0.29 → 7.0.30

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 CHANGED
@@ -197,6 +197,10 @@ export type Context = {
197
197
  };
198
198
  export declare function defaultContext(refs: RefValues): Context;
199
199
  export declare function getFlowdata(ctx?: Context, id?: string | null): import("./types").CellMatrix | null | undefined;
200
+ export declare function calcRowColSize(ctx: Context, rowCount: number, colCount: number, blank?: {
201
+ width: number;
202
+ height: number;
203
+ }): void;
200
204
  export declare function ensureSheetIndex(data: Sheet[], generateSheetId: () => string): void;
201
205
  export declare function initSheetIndex(ctx: Context): void;
202
206
  export declare function updateContextWithSheetData(ctx: Context, data: any[][], blank: {
package/dist/index.esm.js CHANGED
@@ -44483,6 +44483,7 @@ function computeRowlenArr(ctx, rowHeight, cfg) {
44483
44483
  return rowlenArr;
44484
44484
  }
44485
44485
  function hideSelected(ctx, type) {
44486
+ var _flowdata$length, _flowdata$0$length, _flowdata$;
44486
44487
  if (!ctx.luckysheet_select_save || ctx.luckysheet_select_save.length > 1) return "noMulti";
44487
44488
  var index = getSheetIndex(ctx, ctx.currentSheetId);
44488
44489
  if (type === "row") {
@@ -44529,9 +44530,14 @@ function hideSelected(ctx, type) {
44529
44530
  }
44530
44531
  }
44531
44532
  ctx.luckysheetfile[index].config = ctx.config;
44533
+ var flowdata = getFlowdata(ctx);
44534
+ var rowCount = (_flowdata$length = flowdata === null || flowdata === void 0 ? void 0 : flowdata.length) !== null && _flowdata$length !== void 0 ? _flowdata$length : 0;
44535
+ var colCount = rowCount === 0 ? 0 : (_flowdata$0$length = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$ = flowdata[0]) === null || _flowdata$ === void 0 ? void 0 : _flowdata$.length) !== null && _flowdata$0$length !== void 0 ? _flowdata$0$length : 0;
44536
+ calcRowColSize(ctx, rowCount, colCount);
44532
44537
  return "";
44533
44538
  }
44534
44539
  function showSelected(ctx, type) {
44540
+ var _flowdata$length2, _flowdata$0$length2, _flowdata$2;
44535
44541
  if (!ctx.luckysheet_select_save || ctx.luckysheet_select_save.length > 1) return "noMulti";
44536
44542
  var index = getSheetIndex(ctx, ctx.currentSheetId);
44537
44543
  if (type === "row") {
@@ -44554,6 +44560,10 @@ function showSelected(ctx, type) {
44554
44560
  ctx.config.colhidden = colhidden;
44555
44561
  }
44556
44562
  ctx.luckysheetfile[index].config = ctx.config;
44563
+ var flowdata = getFlowdata(ctx);
44564
+ var rowCount = (_flowdata$length2 = flowdata === null || flowdata === void 0 ? void 0 : flowdata.length) !== null && _flowdata$length2 !== void 0 ? _flowdata$length2 : 0;
44565
+ var colCount = rowCount === 0 ? 0 : (_flowdata$0$length2 = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$2 = flowdata[0]) === null || _flowdata$2 === void 0 ? void 0 : _flowdata$2.length) !== null && _flowdata$0$length2 !== void 0 ? _flowdata$0$length2 : 0;
44566
+ calcRowColSize(ctx, rowCount, colCount);
44557
44567
  return "";
44558
44568
  }
44559
44569
  function isShowHidenCR(ctx) {
@@ -55921,7 +55931,11 @@ function getFlowdata(ctx, id) {
55921
55931
  }
55922
55932
  return (_ctx$luckysheetfile = ctx.luckysheetfile) === null || _ctx$luckysheetfile === void 0 ? void 0 : (_ctx$luckysheetfile$i = _ctx$luckysheetfile[i]) === null || _ctx$luckysheetfile$i === void 0 ? void 0 : _ctx$luckysheetfile$i.data;
55923
55933
  }
55924
- function calcRowColSize(ctx, rowCount, colCount, blank) {
55934
+ function calcRowColSize(ctx, rowCount, colCount) {
55935
+ var blank = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {
55936
+ width: 0,
55937
+ height: 0
55938
+ };
55925
55939
  ctx.visibledatarow = [];
55926
55940
  ctx.rh_height = 0;
55927
55941
  for (var r = 0; r < rowCount; r += 1) {
@@ -59141,7 +59155,7 @@ function handleOverlayMouseUp(ctx, globalCache, settings, e, scrollbarX, scrollb
59141
59155
  ctx.luckysheet_cols_selected_status = false;
59142
59156
  ctx.luckysheet_model_move_state = false;
59143
59157
  if (ctx.luckysheet_rows_change_size) {
59144
- var _ctx$luckysheet_selec6, _ctx$luckysheet_selec7;
59158
+ var _ctx$luckysheet_selec6, _ctx$luckysheet_selec7, _flowdata$length2, _flowdata$0$length2, _flowdata$2, _settings$blank;
59145
59159
  ctx.luckysheet_rows_change_size = false;
59146
59160
  var scrollTop = ctx.scrollTop;
59147
59161
  var y = e.pageY - rect.top - ctx.columnHeaderHeight + scrollTop - window.scrollY;
@@ -59196,9 +59210,16 @@ function handleOverlayMouseUp(ctx, globalCache, settings, e, scrollbarX, scrollb
59196
59210
  var idx = getSheetIndex(ctx, ctx.currentSheetId);
59197
59211
  if (idx == null) return;
59198
59212
  ctx.luckysheetfile[idx].config = ctx.config;
59213
+ var flowdata = getFlowdata(ctx);
59214
+ var rowCount = (_flowdata$length2 = flowdata === null || flowdata === void 0 ? void 0 : flowdata.length) !== null && _flowdata$length2 !== void 0 ? _flowdata$length2 : 0;
59215
+ var colCount = rowCount === 0 ? 0 : (_flowdata$0$length2 = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$2 = flowdata[0]) === null || _flowdata$2 === void 0 ? void 0 : _flowdata$2.length) !== null && _flowdata$0$length2 !== void 0 ? _flowdata$0$length2 : 0;
59216
+ calcRowColSize(ctx, rowCount, colCount, (_settings$blank = settings.blank) !== null && _settings$blank !== void 0 ? _settings$blank : {
59217
+ width: 0,
59218
+ height: 0
59219
+ });
59199
59220
  }
59200
59221
  if (ctx.luckysheet_cols_change_size) {
59201
- var _ctx$luckysheet_selec12, _ctx$luckysheet_selec13;
59222
+ var _ctx$luckysheet_selec12, _ctx$luckysheet_selec13, _flowdata$length3, _flowdata$0$length3, _flowdata$3, _settings$blank2;
59202
59223
  ctx.luckysheet_cols_change_size = false;
59203
59224
  var scrollLeft = ctx.scrollLeft;
59204
59225
  var x = e.pageX - rect.left - ctx.rowHeaderWidth + scrollLeft - window.scrollX;
@@ -59257,6 +59278,13 @@ function handleOverlayMouseUp(ctx, globalCache, settings, e, scrollbarX, scrollb
59257
59278
  var _idx = getSheetIndex(ctx, ctx.currentSheetId);
59258
59279
  if (_idx == null) return;
59259
59280
  ctx.luckysheetfile[_idx].config = ctx.config;
59281
+ var _flowdata = getFlowdata(ctx);
59282
+ var _rowCount = (_flowdata$length3 = _flowdata === null || _flowdata === void 0 ? void 0 : _flowdata.length) !== null && _flowdata$length3 !== void 0 ? _flowdata$length3 : 0;
59283
+ var _colCount = _rowCount === 0 ? 0 : (_flowdata$0$length3 = _flowdata === null || _flowdata === void 0 ? void 0 : (_flowdata$3 = _flowdata[0]) === null || _flowdata$3 === void 0 ? void 0 : _flowdata$3.length) !== null && _flowdata$0$length3 !== void 0 ? _flowdata$0$length3 : 0;
59284
+ calcRowColSize(ctx, _rowCount, _colCount, (_settings$blank2 = settings.blank) !== null && _settings$blank2 !== void 0 ? _settings$blank2 : {
59285
+ width: 0,
59286
+ height: 0
59287
+ });
59260
59288
  }
59261
59289
  if (ctx.luckysheet_cols_freeze_drag) {
59262
59290
  ctx.luckysheet_cols_freeze_drag = false;
@@ -59385,8 +59413,8 @@ function handleRowHeaderMouseDown(ctx, globalCache, e, container, cellInput, fxI
59385
59413
  if (e.button === 2) {
59386
59414
  var flowdata = getFlowdata(ctx);
59387
59415
  var isInSelection = _.some(ctx.luckysheet_select_save, function (obj_s) {
59388
- var _flowdata$0$length2, _flowdata$2;
59389
- return obj_s.row != null && row_index >= obj_s.row[0] && row_index <= obj_s.row[1] && obj_s.column[0] === 0 && obj_s.column[1] === ((_flowdata$0$length2 = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$2 = flowdata[0]) === null || _flowdata$2 === void 0 ? void 0 : _flowdata$2.length) !== null && _flowdata$0$length2 !== void 0 ? _flowdata$0$length2 : 0) - 1;
59416
+ var _flowdata$0$length4, _flowdata$4;
59417
+ return obj_s.row != null && row_index >= obj_s.row[0] && row_index <= obj_s.row[1] && obj_s.column[0] === 0 && obj_s.column[1] === ((_flowdata$0$length4 = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$4 = flowdata[0]) === null || _flowdata$4 === void 0 ? void 0 : _flowdata$4.length) !== null && _flowdata$0$length4 !== void 0 ? _flowdata$0$length4 : 0) - 1;
59390
59418
  });
59391
59419
  if (isInSelection) return;
59392
59420
  }
@@ -59623,8 +59651,8 @@ function handleColumnHeaderMouseDown(ctx, globalCache, e, container, cellInput,
59623
59651
  if (e.button === 2) {
59624
59652
  var flowdata = getFlowdata(ctx);
59625
59653
  var isInSelection = _.some(ctx.luckysheet_select_save, function (obj_s) {
59626
- var _flowdata$length2;
59627
- return obj_s.column != null && col_index >= obj_s.column[0] && col_index <= obj_s.column[1] && obj_s.row[0] === 0 && obj_s.row[1] === ((_flowdata$length2 = flowdata === null || flowdata === void 0 ? void 0 : flowdata.length) !== null && _flowdata$length2 !== void 0 ? _flowdata$length2 : 0) - 1;
59654
+ var _flowdata$length4;
59655
+ return obj_s.column != null && col_index >= obj_s.column[0] && col_index <= obj_s.column[1] && obj_s.row[0] === 0 && obj_s.row[1] === ((_flowdata$length4 = flowdata === null || flowdata === void 0 ? void 0 : flowdata.length) !== null && _flowdata$length4 !== void 0 ? _flowdata$length4 : 0) - 1;
59628
59656
  });
59629
59657
  if (isInSelection) return;
59630
59658
  }
@@ -61645,4 +61673,4 @@ function handlePasteByClick(ctx, triggerType) {
61645
61673
  } else if (data.indexOf("leankylin-copy-action-image") > -1) ; else ;
61646
61674
  }
61647
61675
 
61648
- export { CFSplitRange, Canvas, FormulaCache, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, PAINT_MODEL_CURSOR, addSheet, index as api, applyLocation, attrToCssName, autoSelectionFormula, 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 };
61676
+ 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 };
package/dist/index.js CHANGED
@@ -44493,6 +44493,7 @@ function computeRowlenArr(ctx, rowHeight, cfg) {
44493
44493
  return rowlenArr;
44494
44494
  }
44495
44495
  function hideSelected(ctx, type) {
44496
+ var _flowdata$length, _flowdata$0$length, _flowdata$;
44496
44497
  if (!ctx.luckysheet_select_save || ctx.luckysheet_select_save.length > 1) return "noMulti";
44497
44498
  var index = getSheetIndex(ctx, ctx.currentSheetId);
44498
44499
  if (type === "row") {
@@ -44539,9 +44540,14 @@ function hideSelected(ctx, type) {
44539
44540
  }
44540
44541
  }
44541
44542
  ctx.luckysheetfile[index].config = ctx.config;
44543
+ var flowdata = getFlowdata(ctx);
44544
+ var rowCount = (_flowdata$length = flowdata === null || flowdata === void 0 ? void 0 : flowdata.length) !== null && _flowdata$length !== void 0 ? _flowdata$length : 0;
44545
+ var colCount = rowCount === 0 ? 0 : (_flowdata$0$length = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$ = flowdata[0]) === null || _flowdata$ === void 0 ? void 0 : _flowdata$.length) !== null && _flowdata$0$length !== void 0 ? _flowdata$0$length : 0;
44546
+ calcRowColSize(ctx, rowCount, colCount);
44542
44547
  return "";
44543
44548
  }
44544
44549
  function showSelected(ctx, type) {
44550
+ var _flowdata$length2, _flowdata$0$length2, _flowdata$2;
44545
44551
  if (!ctx.luckysheet_select_save || ctx.luckysheet_select_save.length > 1) return "noMulti";
44546
44552
  var index = getSheetIndex(ctx, ctx.currentSheetId);
44547
44553
  if (type === "row") {
@@ -44564,6 +44570,10 @@ function showSelected(ctx, type) {
44564
44570
  ctx.config.colhidden = colhidden;
44565
44571
  }
44566
44572
  ctx.luckysheetfile[index].config = ctx.config;
44573
+ var flowdata = getFlowdata(ctx);
44574
+ var rowCount = (_flowdata$length2 = flowdata === null || flowdata === void 0 ? void 0 : flowdata.length) !== null && _flowdata$length2 !== void 0 ? _flowdata$length2 : 0;
44575
+ var colCount = rowCount === 0 ? 0 : (_flowdata$0$length2 = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$2 = flowdata[0]) === null || _flowdata$2 === void 0 ? void 0 : _flowdata$2.length) !== null && _flowdata$0$length2 !== void 0 ? _flowdata$0$length2 : 0;
44576
+ calcRowColSize(ctx, rowCount, colCount);
44567
44577
  return "";
44568
44578
  }
44569
44579
  function isShowHidenCR(ctx) {
@@ -55931,7 +55941,11 @@ function getFlowdata(ctx, id) {
55931
55941
  }
55932
55942
  return (_ctx$luckysheetfile = ctx.luckysheetfile) === null || _ctx$luckysheetfile === void 0 ? void 0 : (_ctx$luckysheetfile$i = _ctx$luckysheetfile[i]) === null || _ctx$luckysheetfile$i === void 0 ? void 0 : _ctx$luckysheetfile$i.data;
55933
55943
  }
55934
- function calcRowColSize(ctx, rowCount, colCount, blank) {
55944
+ function calcRowColSize(ctx, rowCount, colCount) {
55945
+ var blank = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {
55946
+ width: 0,
55947
+ height: 0
55948
+ };
55935
55949
  ctx.visibledatarow = [];
55936
55950
  ctx.rh_height = 0;
55937
55951
  for (var r = 0; r < rowCount; r += 1) {
@@ -59151,7 +59165,7 @@ function handleOverlayMouseUp(ctx, globalCache, settings, e, scrollbarX, scrollb
59151
59165
  ctx.luckysheet_cols_selected_status = false;
59152
59166
  ctx.luckysheet_model_move_state = false;
59153
59167
  if (ctx.luckysheet_rows_change_size) {
59154
- var _ctx$luckysheet_selec6, _ctx$luckysheet_selec7;
59168
+ var _ctx$luckysheet_selec6, _ctx$luckysheet_selec7, _flowdata$length2, _flowdata$0$length2, _flowdata$2, _settings$blank;
59155
59169
  ctx.luckysheet_rows_change_size = false;
59156
59170
  var scrollTop = ctx.scrollTop;
59157
59171
  var y = e.pageY - rect.top - ctx.columnHeaderHeight + scrollTop - window.scrollY;
@@ -59206,9 +59220,16 @@ function handleOverlayMouseUp(ctx, globalCache, settings, e, scrollbarX, scrollb
59206
59220
  var idx = getSheetIndex(ctx, ctx.currentSheetId);
59207
59221
  if (idx == null) return;
59208
59222
  ctx.luckysheetfile[idx].config = ctx.config;
59223
+ var flowdata = getFlowdata(ctx);
59224
+ var rowCount = (_flowdata$length2 = flowdata === null || flowdata === void 0 ? void 0 : flowdata.length) !== null && _flowdata$length2 !== void 0 ? _flowdata$length2 : 0;
59225
+ var colCount = rowCount === 0 ? 0 : (_flowdata$0$length2 = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$2 = flowdata[0]) === null || _flowdata$2 === void 0 ? void 0 : _flowdata$2.length) !== null && _flowdata$0$length2 !== void 0 ? _flowdata$0$length2 : 0;
59226
+ calcRowColSize(ctx, rowCount, colCount, (_settings$blank = settings.blank) !== null && _settings$blank !== void 0 ? _settings$blank : {
59227
+ width: 0,
59228
+ height: 0
59229
+ });
59209
59230
  }
59210
59231
  if (ctx.luckysheet_cols_change_size) {
59211
- var _ctx$luckysheet_selec12, _ctx$luckysheet_selec13;
59232
+ var _ctx$luckysheet_selec12, _ctx$luckysheet_selec13, _flowdata$length3, _flowdata$0$length3, _flowdata$3, _settings$blank2;
59212
59233
  ctx.luckysheet_cols_change_size = false;
59213
59234
  var scrollLeft = ctx.scrollLeft;
59214
59235
  var x = e.pageX - rect.left - ctx.rowHeaderWidth + scrollLeft - window.scrollX;
@@ -59267,6 +59288,13 @@ function handleOverlayMouseUp(ctx, globalCache, settings, e, scrollbarX, scrollb
59267
59288
  var _idx = getSheetIndex(ctx, ctx.currentSheetId);
59268
59289
  if (_idx == null) return;
59269
59290
  ctx.luckysheetfile[_idx].config = ctx.config;
59291
+ var _flowdata = getFlowdata(ctx);
59292
+ var _rowCount = (_flowdata$length3 = _flowdata === null || _flowdata === void 0 ? void 0 : _flowdata.length) !== null && _flowdata$length3 !== void 0 ? _flowdata$length3 : 0;
59293
+ var _colCount = _rowCount === 0 ? 0 : (_flowdata$0$length3 = _flowdata === null || _flowdata === void 0 ? void 0 : (_flowdata$3 = _flowdata[0]) === null || _flowdata$3 === void 0 ? void 0 : _flowdata$3.length) !== null && _flowdata$0$length3 !== void 0 ? _flowdata$0$length3 : 0;
59294
+ calcRowColSize(ctx, _rowCount, _colCount, (_settings$blank2 = settings.blank) !== null && _settings$blank2 !== void 0 ? _settings$blank2 : {
59295
+ width: 0,
59296
+ height: 0
59297
+ });
59270
59298
  }
59271
59299
  if (ctx.luckysheet_cols_freeze_drag) {
59272
59300
  ctx.luckysheet_cols_freeze_drag = false;
@@ -59395,8 +59423,8 @@ function handleRowHeaderMouseDown(ctx, globalCache, e, container, cellInput, fxI
59395
59423
  if (e.button === 2) {
59396
59424
  var flowdata = getFlowdata(ctx);
59397
59425
  var isInSelection = ___default['default'].some(ctx.luckysheet_select_save, function (obj_s) {
59398
- var _flowdata$0$length2, _flowdata$2;
59399
- return obj_s.row != null && row_index >= obj_s.row[0] && row_index <= obj_s.row[1] && obj_s.column[0] === 0 && obj_s.column[1] === ((_flowdata$0$length2 = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$2 = flowdata[0]) === null || _flowdata$2 === void 0 ? void 0 : _flowdata$2.length) !== null && _flowdata$0$length2 !== void 0 ? _flowdata$0$length2 : 0) - 1;
59426
+ var _flowdata$0$length4, _flowdata$4;
59427
+ return obj_s.row != null && row_index >= obj_s.row[0] && row_index <= obj_s.row[1] && obj_s.column[0] === 0 && obj_s.column[1] === ((_flowdata$0$length4 = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$4 = flowdata[0]) === null || _flowdata$4 === void 0 ? void 0 : _flowdata$4.length) !== null && _flowdata$0$length4 !== void 0 ? _flowdata$0$length4 : 0) - 1;
59400
59428
  });
59401
59429
  if (isInSelection) return;
59402
59430
  }
@@ -59633,8 +59661,8 @@ function handleColumnHeaderMouseDown(ctx, globalCache, e, container, cellInput,
59633
59661
  if (e.button === 2) {
59634
59662
  var flowdata = getFlowdata(ctx);
59635
59663
  var isInSelection = ___default['default'].some(ctx.luckysheet_select_save, function (obj_s) {
59636
- var _flowdata$length2;
59637
- return obj_s.column != null && col_index >= obj_s.column[0] && col_index <= obj_s.column[1] && obj_s.row[0] === 0 && obj_s.row[1] === ((_flowdata$length2 = flowdata === null || flowdata === void 0 ? void 0 : flowdata.length) !== null && _flowdata$length2 !== void 0 ? _flowdata$length2 : 0) - 1;
59664
+ var _flowdata$length4;
59665
+ return obj_s.column != null && col_index >= obj_s.column[0] && col_index <= obj_s.column[1] && obj_s.row[0] === 0 && obj_s.row[1] === ((_flowdata$length4 = flowdata === null || flowdata === void 0 ? void 0 : flowdata.length) !== null && _flowdata$length4 !== void 0 ? _flowdata$length4 : 0) - 1;
59638
59666
  });
59639
59667
  if (isInSelection) return;
59640
59668
  }
@@ -61666,6 +61694,7 @@ exports.api = index;
61666
61694
  exports.applyLocation = applyLocation;
61667
61695
  exports.attrToCssName = attrToCssName;
61668
61696
  exports.autoSelectionFormula = autoSelectionFormula;
61697
+ exports.calcRowColSize = calcRowColSize;
61669
61698
  exports.calcSelectionInfo = calcSelectionInfo;
61670
61699
  exports.cancelActiveImgItem = cancelActiveImgItem;
61671
61700
  exports.cancelFunctionrangeSelected = cancelFunctionrangeSelected;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leankylin-sheet/core",
3
- "version": "7.0.29",
3
+ "version": "7.0.30",
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.29",
16
+ "@leankylin-sheet/formula-parser": "7.0.30",
17
17
  "dayjs": "^1.11.0",
18
18
  "immer": "^9.0.12",
19
19
  "lodash": "^4.17.21",