@leankylin-sheet/core 7.0.1 → 7.0.3
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/events/mouse.d.ts +1 -0
- package/dist/index.esm.js +33 -8
- package/dist/index.js +33 -7
- package/package.json +2 -2
package/dist/events/mouse.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Freezen } from "..";
|
|
2
|
+
export declare const PAINT_MODEL_CURSOR = "url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path fill='%23525C6F' stroke='%23FFFFFF' stroke-width='1.4' stroke-linejoin='round' paint-order='stroke' d='M15.1004 6.5L6.90039 6.5V9.8L15.1004 9.8L15.1004 6.5ZM15.1004 5C15.9288 5 16.6004 5.67157 16.6004 6.5V9.8C16.6004 10.6284 15.9288 11.3 15.1004 11.3H6.90039C6.07196 11.3 5.40039 10.6284 5.40039 9.8V6.5C5.40039 5.67157 6.07196 5 6.90039 5H15.1004Z'/><path fill='%23525C6F' stroke='%23FFFFFF' stroke-width='1.4' stroke-linejoin='round' paint-order='stroke' d='M17.7174 8.90039H15.3262V7.40039H18.4674C18.8816 7.40039 19.2174 7.73618 19.2174 8.15039V13.7859C19.2174 14.163 18.9374 14.4814 18.5634 14.5297L10.8174 15.5299V19.0004H9.31738V14.8705C9.31738 14.4934 9.59736 14.175 9.97134 14.1267L17.7174 13.1265V8.90039Z'/></svg>\") 6 6, pointer";
|
|
2
3
|
import { Context } from "../context";
|
|
3
4
|
import { Settings } from "../settings";
|
|
4
5
|
import { GlobalCache } from "../types";
|
package/dist/index.esm.js
CHANGED
|
@@ -40539,6 +40539,7 @@ function cancelNormalSelected(ctx) {
|
|
|
40539
40539
|
ctx.formulaCache.rangestart = false;
|
|
40540
40540
|
ctx.formulaCache.rangedrag_column_start = false;
|
|
40541
40541
|
ctx.formulaCache.rangedrag_row_start = false;
|
|
40542
|
+
ctx.formulaCache.func_selectedrange = undefined;
|
|
40542
40543
|
}
|
|
40543
40544
|
function updateCell(ctx, r, c, $input, value, canvas, sheetId) {
|
|
40544
40545
|
var _inputText, _curv, _ctx$hooks$beforeUpda, _ctx$hooks, _curv2;
|
|
@@ -49165,6 +49166,7 @@ function autoSelectionFormula(ctx, cellInput, fxInput, formula, cache) {
|
|
|
49165
49166
|
}
|
|
49166
49167
|
function cancelPaintModel(ctx) {
|
|
49167
49168
|
var _ctx$luckysheet_copy_;
|
|
49169
|
+
ctx.luckysheetPaintModelOn = false;
|
|
49168
49170
|
if (ctx.luckysheet_copy_save === null) return;
|
|
49169
49171
|
if (((_ctx$luckysheet_copy_ = ctx.luckysheet_copy_save) === null || _ctx$luckysheet_copy_ === void 0 ? void 0 : _ctx$luckysheet_copy_.dataSheetId) === ctx.currentSheetId) {
|
|
49170
49172
|
ctx.luckysheet_selection_range = [];
|
|
@@ -49362,6 +49364,10 @@ function handleVerticalAlign(ctx, cellInput, value) {
|
|
|
49362
49364
|
function handleFormatPainter(ctx) {
|
|
49363
49365
|
var allowEdit = isAllowEdit(ctx);
|
|
49364
49366
|
if (!allowEdit) return;
|
|
49367
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
49368
|
+
cancelPaintModel(ctx);
|
|
49369
|
+
return;
|
|
49370
|
+
}
|
|
49365
49371
|
if (ctx.luckysheet_select_save == null || ctx.luckysheet_select_save.length === 0) {
|
|
49366
49372
|
return;
|
|
49367
49373
|
}
|
|
@@ -57485,7 +57491,7 @@ var defaultSettings = {
|
|
|
57485
57491
|
defaultColWidth: 73,
|
|
57486
57492
|
defaultRowHeight: 19,
|
|
57487
57493
|
defaultFontSize: 10,
|
|
57488
|
-
toolbarItems: ["undo", "redo", "|", "format", "|", "font", "|", "font-size", "|", "bold", "italic", "strike-through", "underline", "|", "font-color", "background", "border", "merge-cell", "|", "horizontal-align", "vertical-align", "text-wrap", "text-rotation", "|", "search"],
|
|
57494
|
+
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"],
|
|
57489
57495
|
cellContextMenu: function cellContextMenu() {
|
|
57490
57496
|
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"];
|
|
57491
57497
|
},
|
|
@@ -57833,6 +57839,7 @@ function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, hand
|
|
|
57833
57839
|
e.stopPropagation();
|
|
57834
57840
|
}
|
|
57835
57841
|
|
|
57842
|
+
var PAINT_MODEL_CURSOR = "url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path fill='%23525C6F' stroke='%23FFFFFF' stroke-width='1.4' stroke-linejoin='round' paint-order='stroke' d='M15.1004 6.5L6.90039 6.5V9.8L15.1004 9.8L15.1004 6.5ZM15.1004 5C15.9288 5 16.6004 5.67157 16.6004 6.5V9.8C16.6004 10.6284 15.9288 11.3 15.1004 11.3H6.90039C6.07196 11.3 5.40039 10.6284 5.40039 9.8V6.5C5.40039 5.67157 6.07196 5 6.90039 5H15.1004Z'/><path fill='%23525C6F' stroke='%23FFFFFF' stroke-width='1.4' stroke-linejoin='round' paint-order='stroke' d='M17.7174 8.90039H15.3262V7.40039H18.4674C18.8816 7.40039 19.2174 7.73618 19.2174 8.15039V13.7859C19.2174 14.163 18.9374 14.4814 18.5634 14.5297L10.8174 15.5299V19.0004H9.31738V14.8705C9.31738 14.4934 9.59736 14.175 9.97134 14.1267L17.7174 13.1265V8.90039Z'/></svg>\") 6 6, pointer";
|
|
57836
57843
|
function handleGlobalWheel(ctx, e, cache, scrollbarX, scrollbarY) {
|
|
57837
57844
|
var _cache$searchDialog;
|
|
57838
57845
|
if (((_cache$searchDialog = cache.searchDialog) === null || _cache$searchDialog === void 0 ? void 0 : _cache$searchDialog.mouseEnter) && ctx.showSearch && ctx.showReplace) return;
|
|
@@ -58254,8 +58261,12 @@ function handleCellDrop(ctx, globalCache, e, container) {
|
|
|
58254
58261
|
var currentCellValue = JSON.parse(JSON.stringify(((_flowdata$row_index4 = flowdata[row_index]) === null || _flowdata$row_index4 === void 0 ? void 0 : _flowdata$row_index4[col_index]) || null));
|
|
58255
58262
|
var box = document.querySelector(".leankylin-cell-area");
|
|
58256
58263
|
if (box) {
|
|
58257
|
-
|
|
58258
|
-
|
|
58264
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
58265
|
+
box.style.cursor = PAINT_MODEL_CURSOR;
|
|
58266
|
+
} else {
|
|
58267
|
+
var _currentCellValue$cu;
|
|
58268
|
+
box.style.cursor = (_currentCellValue$cu = currentCellValue === null || currentCellValue === void 0 ? void 0 : currentCellValue.cu) !== null && _currentCellValue$cu !== void 0 ? _currentCellValue$cu : "default";
|
|
58269
|
+
}
|
|
58259
58270
|
}
|
|
58260
58271
|
var yOut = y < 0 || y > ctx.visibledatarow[ctx.visibledatarow.length - 1];
|
|
58261
58272
|
var xOut = x < 0 || x > ctx.visibledatacolumn[ctx.visibledatacolumn.length - 1];
|
|
@@ -58319,8 +58330,12 @@ function handleCellAreaDragOver(ctx, globalCache, e, container) {
|
|
|
58319
58330
|
var currentCellValue = JSON.parse(JSON.stringify((_flowdata$row_index5 = flowdata[row_index]) === null || _flowdata$row_index5 === void 0 ? void 0 : _flowdata$row_index5[col_index]));
|
|
58320
58331
|
var box = document.querySelector(".leankylin-cell-area");
|
|
58321
58332
|
if (box) {
|
|
58322
|
-
|
|
58323
|
-
|
|
58333
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
58334
|
+
box.style.cursor = PAINT_MODEL_CURSOR;
|
|
58335
|
+
} else {
|
|
58336
|
+
var _currentCellValue$cu2;
|
|
58337
|
+
box.style.cursor = (_currentCellValue$cu2 = currentCellValue === null || currentCellValue === void 0 ? void 0 : currentCellValue.cu) !== null && _currentCellValue$cu2 !== void 0 ? _currentCellValue$cu2 : "default";
|
|
58338
|
+
}
|
|
58324
58339
|
}
|
|
58325
58340
|
var yOut = y < 0 || y > ctx.visibledatarow[ctx.visibledatarow.length - 1];
|
|
58326
58341
|
var xOut = x < 0 || x > ctx.visibledatacolumn[ctx.visibledatacolumn.length - 1];
|
|
@@ -58348,6 +58363,12 @@ function handleCellAreaDragOver(ctx, globalCache, e, container) {
|
|
|
58348
58363
|
}
|
|
58349
58364
|
function handleCellAreaMouseMove(ctx, globalCache, e, container) {
|
|
58350
58365
|
var _globalCache$freezen4, _flowdata$row_index6;
|
|
58366
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
58367
|
+
var paintBox = document.querySelector(".leankylin-cell-area");
|
|
58368
|
+
if (paintBox) {
|
|
58369
|
+
paintBox.style.cursor = PAINT_MODEL_CURSOR;
|
|
58370
|
+
}
|
|
58371
|
+
}
|
|
58351
58372
|
var afterCellMouseMove = ctx.hooks.afterCellMouseMove;
|
|
58352
58373
|
if (!afterCellMouseMove) {
|
|
58353
58374
|
return;
|
|
@@ -58375,8 +58396,12 @@ function handleCellAreaMouseMove(ctx, globalCache, e, container) {
|
|
|
58375
58396
|
var currentCellValue = JSON.parse(JSON.stringify(((_flowdata$row_index6 = flowdata[row_index]) === null || _flowdata$row_index6 === void 0 ? void 0 : _flowdata$row_index6[col_index]) || null));
|
|
58376
58397
|
var box = document.querySelector(".leankylin-cell-area");
|
|
58377
58398
|
if (box) {
|
|
58378
|
-
|
|
58379
|
-
|
|
58399
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
58400
|
+
box.style.cursor = PAINT_MODEL_CURSOR;
|
|
58401
|
+
} else {
|
|
58402
|
+
var _currentCellValue$cu3;
|
|
58403
|
+
box.style.cursor = (_currentCellValue$cu3 = currentCellValue === null || currentCellValue === void 0 ? void 0 : currentCellValue.cu) !== null && _currentCellValue$cu3 !== void 0 ? _currentCellValue$cu3 : "default";
|
|
58404
|
+
}
|
|
58380
58405
|
}
|
|
58381
58406
|
var yOut = y < 0 || y > ctx.visibledatarow[ctx.visibledatarow.length - 1];
|
|
58382
58407
|
var xOut = x < 0 || x > ctx.visibledatacolumn[ctx.visibledatacolumn.length - 1];
|
|
@@ -61385,4 +61410,4 @@ function handlePasteByClick(ctx, triggerType) {
|
|
|
61385
61410
|
} else if (data.indexOf("leankylin-copy-action-image") > -1) ; else ;
|
|
61386
61411
|
}
|
|
61387
61412
|
|
|
61388
|
-
export { CFSplitRange, Canvas, FormulaCache, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, 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, 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, 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, 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 };
|
|
61413
|
+
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, 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, 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, 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 };
|
package/dist/index.js
CHANGED
|
@@ -40549,6 +40549,7 @@ function cancelNormalSelected(ctx) {
|
|
|
40549
40549
|
ctx.formulaCache.rangestart = false;
|
|
40550
40550
|
ctx.formulaCache.rangedrag_column_start = false;
|
|
40551
40551
|
ctx.formulaCache.rangedrag_row_start = false;
|
|
40552
|
+
ctx.formulaCache.func_selectedrange = undefined;
|
|
40552
40553
|
}
|
|
40553
40554
|
function updateCell(ctx, r, c, $input, value, canvas, sheetId) {
|
|
40554
40555
|
var _inputText, _curv, _ctx$hooks$beforeUpda, _ctx$hooks, _curv2;
|
|
@@ -49175,6 +49176,7 @@ function autoSelectionFormula(ctx, cellInput, fxInput, formula, cache) {
|
|
|
49175
49176
|
}
|
|
49176
49177
|
function cancelPaintModel(ctx) {
|
|
49177
49178
|
var _ctx$luckysheet_copy_;
|
|
49179
|
+
ctx.luckysheetPaintModelOn = false;
|
|
49178
49180
|
if (ctx.luckysheet_copy_save === null) return;
|
|
49179
49181
|
if (((_ctx$luckysheet_copy_ = ctx.luckysheet_copy_save) === null || _ctx$luckysheet_copy_ === void 0 ? void 0 : _ctx$luckysheet_copy_.dataSheetId) === ctx.currentSheetId) {
|
|
49180
49182
|
ctx.luckysheet_selection_range = [];
|
|
@@ -49372,6 +49374,10 @@ function handleVerticalAlign(ctx, cellInput, value) {
|
|
|
49372
49374
|
function handleFormatPainter(ctx) {
|
|
49373
49375
|
var allowEdit = isAllowEdit(ctx);
|
|
49374
49376
|
if (!allowEdit) return;
|
|
49377
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
49378
|
+
cancelPaintModel(ctx);
|
|
49379
|
+
return;
|
|
49380
|
+
}
|
|
49375
49381
|
if (ctx.luckysheet_select_save == null || ctx.luckysheet_select_save.length === 0) {
|
|
49376
49382
|
return;
|
|
49377
49383
|
}
|
|
@@ -57495,7 +57501,7 @@ var defaultSettings = {
|
|
|
57495
57501
|
defaultColWidth: 73,
|
|
57496
57502
|
defaultRowHeight: 19,
|
|
57497
57503
|
defaultFontSize: 10,
|
|
57498
|
-
toolbarItems: ["undo", "redo", "|", "format", "|", "font", "|", "font-size", "|", "bold", "italic", "strike-through", "underline", "|", "font-color", "background", "border", "merge-cell", "|", "horizontal-align", "vertical-align", "text-wrap", "text-rotation", "|", "search"],
|
|
57504
|
+
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"],
|
|
57499
57505
|
cellContextMenu: function cellContextMenu() {
|
|
57500
57506
|
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"];
|
|
57501
57507
|
},
|
|
@@ -57843,6 +57849,7 @@ function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, hand
|
|
|
57843
57849
|
e.stopPropagation();
|
|
57844
57850
|
}
|
|
57845
57851
|
|
|
57852
|
+
var PAINT_MODEL_CURSOR = "url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path fill='%23525C6F' stroke='%23FFFFFF' stroke-width='1.4' stroke-linejoin='round' paint-order='stroke' d='M15.1004 6.5L6.90039 6.5V9.8L15.1004 9.8L15.1004 6.5ZM15.1004 5C15.9288 5 16.6004 5.67157 16.6004 6.5V9.8C16.6004 10.6284 15.9288 11.3 15.1004 11.3H6.90039C6.07196 11.3 5.40039 10.6284 5.40039 9.8V6.5C5.40039 5.67157 6.07196 5 6.90039 5H15.1004Z'/><path fill='%23525C6F' stroke='%23FFFFFF' stroke-width='1.4' stroke-linejoin='round' paint-order='stroke' d='M17.7174 8.90039H15.3262V7.40039H18.4674C18.8816 7.40039 19.2174 7.73618 19.2174 8.15039V13.7859C19.2174 14.163 18.9374 14.4814 18.5634 14.5297L10.8174 15.5299V19.0004H9.31738V14.8705C9.31738 14.4934 9.59736 14.175 9.97134 14.1267L17.7174 13.1265V8.90039Z'/></svg>\") 6 6, pointer";
|
|
57846
57853
|
function handleGlobalWheel(ctx, e, cache, scrollbarX, scrollbarY) {
|
|
57847
57854
|
var _cache$searchDialog;
|
|
57848
57855
|
if (((_cache$searchDialog = cache.searchDialog) === null || _cache$searchDialog === void 0 ? void 0 : _cache$searchDialog.mouseEnter) && ctx.showSearch && ctx.showReplace) return;
|
|
@@ -58264,8 +58271,12 @@ function handleCellDrop(ctx, globalCache, e, container) {
|
|
|
58264
58271
|
var currentCellValue = JSON.parse(JSON.stringify(((_flowdata$row_index4 = flowdata[row_index]) === null || _flowdata$row_index4 === void 0 ? void 0 : _flowdata$row_index4[col_index]) || null));
|
|
58265
58272
|
var box = document.querySelector(".leankylin-cell-area");
|
|
58266
58273
|
if (box) {
|
|
58267
|
-
|
|
58268
|
-
|
|
58274
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
58275
|
+
box.style.cursor = PAINT_MODEL_CURSOR;
|
|
58276
|
+
} else {
|
|
58277
|
+
var _currentCellValue$cu;
|
|
58278
|
+
box.style.cursor = (_currentCellValue$cu = currentCellValue === null || currentCellValue === void 0 ? void 0 : currentCellValue.cu) !== null && _currentCellValue$cu !== void 0 ? _currentCellValue$cu : "default";
|
|
58279
|
+
}
|
|
58269
58280
|
}
|
|
58270
58281
|
var yOut = y < 0 || y > ctx.visibledatarow[ctx.visibledatarow.length - 1];
|
|
58271
58282
|
var xOut = x < 0 || x > ctx.visibledatacolumn[ctx.visibledatacolumn.length - 1];
|
|
@@ -58329,8 +58340,12 @@ function handleCellAreaDragOver(ctx, globalCache, e, container) {
|
|
|
58329
58340
|
var currentCellValue = JSON.parse(JSON.stringify((_flowdata$row_index5 = flowdata[row_index]) === null || _flowdata$row_index5 === void 0 ? void 0 : _flowdata$row_index5[col_index]));
|
|
58330
58341
|
var box = document.querySelector(".leankylin-cell-area");
|
|
58331
58342
|
if (box) {
|
|
58332
|
-
|
|
58333
|
-
|
|
58343
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
58344
|
+
box.style.cursor = PAINT_MODEL_CURSOR;
|
|
58345
|
+
} else {
|
|
58346
|
+
var _currentCellValue$cu2;
|
|
58347
|
+
box.style.cursor = (_currentCellValue$cu2 = currentCellValue === null || currentCellValue === void 0 ? void 0 : currentCellValue.cu) !== null && _currentCellValue$cu2 !== void 0 ? _currentCellValue$cu2 : "default";
|
|
58348
|
+
}
|
|
58334
58349
|
}
|
|
58335
58350
|
var yOut = y < 0 || y > ctx.visibledatarow[ctx.visibledatarow.length - 1];
|
|
58336
58351
|
var xOut = x < 0 || x > ctx.visibledatacolumn[ctx.visibledatacolumn.length - 1];
|
|
@@ -58358,6 +58373,12 @@ function handleCellAreaDragOver(ctx, globalCache, e, container) {
|
|
|
58358
58373
|
}
|
|
58359
58374
|
function handleCellAreaMouseMove(ctx, globalCache, e, container) {
|
|
58360
58375
|
var _globalCache$freezen4, _flowdata$row_index6;
|
|
58376
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
58377
|
+
var paintBox = document.querySelector(".leankylin-cell-area");
|
|
58378
|
+
if (paintBox) {
|
|
58379
|
+
paintBox.style.cursor = PAINT_MODEL_CURSOR;
|
|
58380
|
+
}
|
|
58381
|
+
}
|
|
58361
58382
|
var afterCellMouseMove = ctx.hooks.afterCellMouseMove;
|
|
58362
58383
|
if (!afterCellMouseMove) {
|
|
58363
58384
|
return;
|
|
@@ -58385,8 +58406,12 @@ function handleCellAreaMouseMove(ctx, globalCache, e, container) {
|
|
|
58385
58406
|
var currentCellValue = JSON.parse(JSON.stringify(((_flowdata$row_index6 = flowdata[row_index]) === null || _flowdata$row_index6 === void 0 ? void 0 : _flowdata$row_index6[col_index]) || null));
|
|
58386
58407
|
var box = document.querySelector(".leankylin-cell-area");
|
|
58387
58408
|
if (box) {
|
|
58388
|
-
|
|
58389
|
-
|
|
58409
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
58410
|
+
box.style.cursor = PAINT_MODEL_CURSOR;
|
|
58411
|
+
} else {
|
|
58412
|
+
var _currentCellValue$cu3;
|
|
58413
|
+
box.style.cursor = (_currentCellValue$cu3 = currentCellValue === null || currentCellValue === void 0 ? void 0 : currentCellValue.cu) !== null && _currentCellValue$cu3 !== void 0 ? _currentCellValue$cu3 : "default";
|
|
58414
|
+
}
|
|
58390
58415
|
}
|
|
58391
58416
|
var yOut = y < 0 || y > ctx.visibledatarow[ctx.visibledatarow.length - 1];
|
|
58392
58417
|
var xOut = x < 0 || x > ctx.visibledatacolumn[ctx.visibledatacolumn.length - 1];
|
|
@@ -61400,6 +61425,7 @@ exports.Canvas = Canvas;
|
|
|
61400
61425
|
exports.FormulaCache = FormulaCache;
|
|
61401
61426
|
exports.MAX_ZOOM_RATIO = MAX_ZOOM_RATIO;
|
|
61402
61427
|
exports.MIN_ZOOM_RATIO = MIN_ZOOM_RATIO;
|
|
61428
|
+
exports.PAINT_MODEL_CURSOR = PAINT_MODEL_CURSOR;
|
|
61403
61429
|
exports.addSheet = addSheet;
|
|
61404
61430
|
exports.api = index;
|
|
61405
61431
|
exports.applyLocation = applyLocation;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leankylin-sheet/core",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.3",
|
|
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.3",
|
|
17
17
|
"dayjs": "^1.11.0",
|
|
18
18
|
"immer": "^9.0.12",
|
|
19
19
|
"lodash": "^4.17.21",
|