@leankylin-sheet/core 7.0.1 → 7.0.2
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 +32 -8
- package/dist/index.js +32 -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
|
@@ -49165,6 +49165,7 @@ function autoSelectionFormula(ctx, cellInput, fxInput, formula, cache) {
|
|
|
49165
49165
|
}
|
|
49166
49166
|
function cancelPaintModel(ctx) {
|
|
49167
49167
|
var _ctx$luckysheet_copy_;
|
|
49168
|
+
ctx.luckysheetPaintModelOn = false;
|
|
49168
49169
|
if (ctx.luckysheet_copy_save === null) return;
|
|
49169
49170
|
if (((_ctx$luckysheet_copy_ = ctx.luckysheet_copy_save) === null || _ctx$luckysheet_copy_ === void 0 ? void 0 : _ctx$luckysheet_copy_.dataSheetId) === ctx.currentSheetId) {
|
|
49170
49171
|
ctx.luckysheet_selection_range = [];
|
|
@@ -49362,6 +49363,10 @@ function handleVerticalAlign(ctx, cellInput, value) {
|
|
|
49362
49363
|
function handleFormatPainter(ctx) {
|
|
49363
49364
|
var allowEdit = isAllowEdit(ctx);
|
|
49364
49365
|
if (!allowEdit) return;
|
|
49366
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
49367
|
+
cancelPaintModel(ctx);
|
|
49368
|
+
return;
|
|
49369
|
+
}
|
|
49365
49370
|
if (ctx.luckysheet_select_save == null || ctx.luckysheet_select_save.length === 0) {
|
|
49366
49371
|
return;
|
|
49367
49372
|
}
|
|
@@ -57485,7 +57490,7 @@ var defaultSettings = {
|
|
|
57485
57490
|
defaultColWidth: 73,
|
|
57486
57491
|
defaultRowHeight: 19,
|
|
57487
57492
|
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"],
|
|
57493
|
+
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
57494
|
cellContextMenu: function cellContextMenu() {
|
|
57490
57495
|
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
57496
|
},
|
|
@@ -57833,6 +57838,7 @@ function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, hand
|
|
|
57833
57838
|
e.stopPropagation();
|
|
57834
57839
|
}
|
|
57835
57840
|
|
|
57841
|
+
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
57842
|
function handleGlobalWheel(ctx, e, cache, scrollbarX, scrollbarY) {
|
|
57837
57843
|
var _cache$searchDialog;
|
|
57838
57844
|
if (((_cache$searchDialog = cache.searchDialog) === null || _cache$searchDialog === void 0 ? void 0 : _cache$searchDialog.mouseEnter) && ctx.showSearch && ctx.showReplace) return;
|
|
@@ -58254,8 +58260,12 @@ function handleCellDrop(ctx, globalCache, e, container) {
|
|
|
58254
58260
|
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
58261
|
var box = document.querySelector(".leankylin-cell-area");
|
|
58256
58262
|
if (box) {
|
|
58257
|
-
|
|
58258
|
-
|
|
58263
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
58264
|
+
box.style.cursor = PAINT_MODEL_CURSOR;
|
|
58265
|
+
} else {
|
|
58266
|
+
var _currentCellValue$cu;
|
|
58267
|
+
box.style.cursor = (_currentCellValue$cu = currentCellValue === null || currentCellValue === void 0 ? void 0 : currentCellValue.cu) !== null && _currentCellValue$cu !== void 0 ? _currentCellValue$cu : "default";
|
|
58268
|
+
}
|
|
58259
58269
|
}
|
|
58260
58270
|
var yOut = y < 0 || y > ctx.visibledatarow[ctx.visibledatarow.length - 1];
|
|
58261
58271
|
var xOut = x < 0 || x > ctx.visibledatacolumn[ctx.visibledatacolumn.length - 1];
|
|
@@ -58319,8 +58329,12 @@ function handleCellAreaDragOver(ctx, globalCache, e, container) {
|
|
|
58319
58329
|
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
58330
|
var box = document.querySelector(".leankylin-cell-area");
|
|
58321
58331
|
if (box) {
|
|
58322
|
-
|
|
58323
|
-
|
|
58332
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
58333
|
+
box.style.cursor = PAINT_MODEL_CURSOR;
|
|
58334
|
+
} else {
|
|
58335
|
+
var _currentCellValue$cu2;
|
|
58336
|
+
box.style.cursor = (_currentCellValue$cu2 = currentCellValue === null || currentCellValue === void 0 ? void 0 : currentCellValue.cu) !== null && _currentCellValue$cu2 !== void 0 ? _currentCellValue$cu2 : "default";
|
|
58337
|
+
}
|
|
58324
58338
|
}
|
|
58325
58339
|
var yOut = y < 0 || y > ctx.visibledatarow[ctx.visibledatarow.length - 1];
|
|
58326
58340
|
var xOut = x < 0 || x > ctx.visibledatacolumn[ctx.visibledatacolumn.length - 1];
|
|
@@ -58348,6 +58362,12 @@ function handleCellAreaDragOver(ctx, globalCache, e, container) {
|
|
|
58348
58362
|
}
|
|
58349
58363
|
function handleCellAreaMouseMove(ctx, globalCache, e, container) {
|
|
58350
58364
|
var _globalCache$freezen4, _flowdata$row_index6;
|
|
58365
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
58366
|
+
var paintBox = document.querySelector(".leankylin-cell-area");
|
|
58367
|
+
if (paintBox) {
|
|
58368
|
+
paintBox.style.cursor = PAINT_MODEL_CURSOR;
|
|
58369
|
+
}
|
|
58370
|
+
}
|
|
58351
58371
|
var afterCellMouseMove = ctx.hooks.afterCellMouseMove;
|
|
58352
58372
|
if (!afterCellMouseMove) {
|
|
58353
58373
|
return;
|
|
@@ -58375,8 +58395,12 @@ function handleCellAreaMouseMove(ctx, globalCache, e, container) {
|
|
|
58375
58395
|
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
58396
|
var box = document.querySelector(".leankylin-cell-area");
|
|
58377
58397
|
if (box) {
|
|
58378
|
-
|
|
58379
|
-
|
|
58398
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
58399
|
+
box.style.cursor = PAINT_MODEL_CURSOR;
|
|
58400
|
+
} else {
|
|
58401
|
+
var _currentCellValue$cu3;
|
|
58402
|
+
box.style.cursor = (_currentCellValue$cu3 = currentCellValue === null || currentCellValue === void 0 ? void 0 : currentCellValue.cu) !== null && _currentCellValue$cu3 !== void 0 ? _currentCellValue$cu3 : "default";
|
|
58403
|
+
}
|
|
58380
58404
|
}
|
|
58381
58405
|
var yOut = y < 0 || y > ctx.visibledatarow[ctx.visibledatarow.length - 1];
|
|
58382
58406
|
var xOut = x < 0 || x > ctx.visibledatacolumn[ctx.visibledatacolumn.length - 1];
|
|
@@ -61385,4 +61409,4 @@ function handlePasteByClick(ctx, triggerType) {
|
|
|
61385
61409
|
} else if (data.indexOf("leankylin-copy-action-image") > -1) ; else ;
|
|
61386
61410
|
}
|
|
61387
61411
|
|
|
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 };
|
|
61412
|
+
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
|
@@ -49175,6 +49175,7 @@ function autoSelectionFormula(ctx, cellInput, fxInput, formula, cache) {
|
|
|
49175
49175
|
}
|
|
49176
49176
|
function cancelPaintModel(ctx) {
|
|
49177
49177
|
var _ctx$luckysheet_copy_;
|
|
49178
|
+
ctx.luckysheetPaintModelOn = false;
|
|
49178
49179
|
if (ctx.luckysheet_copy_save === null) return;
|
|
49179
49180
|
if (((_ctx$luckysheet_copy_ = ctx.luckysheet_copy_save) === null || _ctx$luckysheet_copy_ === void 0 ? void 0 : _ctx$luckysheet_copy_.dataSheetId) === ctx.currentSheetId) {
|
|
49180
49181
|
ctx.luckysheet_selection_range = [];
|
|
@@ -49372,6 +49373,10 @@ function handleVerticalAlign(ctx, cellInput, value) {
|
|
|
49372
49373
|
function handleFormatPainter(ctx) {
|
|
49373
49374
|
var allowEdit = isAllowEdit(ctx);
|
|
49374
49375
|
if (!allowEdit) return;
|
|
49376
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
49377
|
+
cancelPaintModel(ctx);
|
|
49378
|
+
return;
|
|
49379
|
+
}
|
|
49375
49380
|
if (ctx.luckysheet_select_save == null || ctx.luckysheet_select_save.length === 0) {
|
|
49376
49381
|
return;
|
|
49377
49382
|
}
|
|
@@ -57495,7 +57500,7 @@ var defaultSettings = {
|
|
|
57495
57500
|
defaultColWidth: 73,
|
|
57496
57501
|
defaultRowHeight: 19,
|
|
57497
57502
|
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"],
|
|
57503
|
+
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
57504
|
cellContextMenu: function cellContextMenu() {
|
|
57500
57505
|
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
57506
|
},
|
|
@@ -57843,6 +57848,7 @@ function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, hand
|
|
|
57843
57848
|
e.stopPropagation();
|
|
57844
57849
|
}
|
|
57845
57850
|
|
|
57851
|
+
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
57852
|
function handleGlobalWheel(ctx, e, cache, scrollbarX, scrollbarY) {
|
|
57847
57853
|
var _cache$searchDialog;
|
|
57848
57854
|
if (((_cache$searchDialog = cache.searchDialog) === null || _cache$searchDialog === void 0 ? void 0 : _cache$searchDialog.mouseEnter) && ctx.showSearch && ctx.showReplace) return;
|
|
@@ -58264,8 +58270,12 @@ function handleCellDrop(ctx, globalCache, e, container) {
|
|
|
58264
58270
|
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
58271
|
var box = document.querySelector(".leankylin-cell-area");
|
|
58266
58272
|
if (box) {
|
|
58267
|
-
|
|
58268
|
-
|
|
58273
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
58274
|
+
box.style.cursor = PAINT_MODEL_CURSOR;
|
|
58275
|
+
} else {
|
|
58276
|
+
var _currentCellValue$cu;
|
|
58277
|
+
box.style.cursor = (_currentCellValue$cu = currentCellValue === null || currentCellValue === void 0 ? void 0 : currentCellValue.cu) !== null && _currentCellValue$cu !== void 0 ? _currentCellValue$cu : "default";
|
|
58278
|
+
}
|
|
58269
58279
|
}
|
|
58270
58280
|
var yOut = y < 0 || y > ctx.visibledatarow[ctx.visibledatarow.length - 1];
|
|
58271
58281
|
var xOut = x < 0 || x > ctx.visibledatacolumn[ctx.visibledatacolumn.length - 1];
|
|
@@ -58329,8 +58339,12 @@ function handleCellAreaDragOver(ctx, globalCache, e, container) {
|
|
|
58329
58339
|
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
58340
|
var box = document.querySelector(".leankylin-cell-area");
|
|
58331
58341
|
if (box) {
|
|
58332
|
-
|
|
58333
|
-
|
|
58342
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
58343
|
+
box.style.cursor = PAINT_MODEL_CURSOR;
|
|
58344
|
+
} else {
|
|
58345
|
+
var _currentCellValue$cu2;
|
|
58346
|
+
box.style.cursor = (_currentCellValue$cu2 = currentCellValue === null || currentCellValue === void 0 ? void 0 : currentCellValue.cu) !== null && _currentCellValue$cu2 !== void 0 ? _currentCellValue$cu2 : "default";
|
|
58347
|
+
}
|
|
58334
58348
|
}
|
|
58335
58349
|
var yOut = y < 0 || y > ctx.visibledatarow[ctx.visibledatarow.length - 1];
|
|
58336
58350
|
var xOut = x < 0 || x > ctx.visibledatacolumn[ctx.visibledatacolumn.length - 1];
|
|
@@ -58358,6 +58372,12 @@ function handleCellAreaDragOver(ctx, globalCache, e, container) {
|
|
|
58358
58372
|
}
|
|
58359
58373
|
function handleCellAreaMouseMove(ctx, globalCache, e, container) {
|
|
58360
58374
|
var _globalCache$freezen4, _flowdata$row_index6;
|
|
58375
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
58376
|
+
var paintBox = document.querySelector(".leankylin-cell-area");
|
|
58377
|
+
if (paintBox) {
|
|
58378
|
+
paintBox.style.cursor = PAINT_MODEL_CURSOR;
|
|
58379
|
+
}
|
|
58380
|
+
}
|
|
58361
58381
|
var afterCellMouseMove = ctx.hooks.afterCellMouseMove;
|
|
58362
58382
|
if (!afterCellMouseMove) {
|
|
58363
58383
|
return;
|
|
@@ -58385,8 +58405,12 @@ function handleCellAreaMouseMove(ctx, globalCache, e, container) {
|
|
|
58385
58405
|
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
58406
|
var box = document.querySelector(".leankylin-cell-area");
|
|
58387
58407
|
if (box) {
|
|
58388
|
-
|
|
58389
|
-
|
|
58408
|
+
if (ctx.luckysheetPaintModelOn) {
|
|
58409
|
+
box.style.cursor = PAINT_MODEL_CURSOR;
|
|
58410
|
+
} else {
|
|
58411
|
+
var _currentCellValue$cu3;
|
|
58412
|
+
box.style.cursor = (_currentCellValue$cu3 = currentCellValue === null || currentCellValue === void 0 ? void 0 : currentCellValue.cu) !== null && _currentCellValue$cu3 !== void 0 ? _currentCellValue$cu3 : "default";
|
|
58413
|
+
}
|
|
58390
58414
|
}
|
|
58391
58415
|
var yOut = y < 0 || y > ctx.visibledatarow[ctx.visibledatarow.length - 1];
|
|
58392
58416
|
var xOut = x < 0 || x > ctx.visibledatacolumn[ctx.visibledatacolumn.length - 1];
|
|
@@ -61400,6 +61424,7 @@ exports.Canvas = Canvas;
|
|
|
61400
61424
|
exports.FormulaCache = FormulaCache;
|
|
61401
61425
|
exports.MAX_ZOOM_RATIO = MAX_ZOOM_RATIO;
|
|
61402
61426
|
exports.MIN_ZOOM_RATIO = MIN_ZOOM_RATIO;
|
|
61427
|
+
exports.PAINT_MODEL_CURSOR = PAINT_MODEL_CURSOR;
|
|
61403
61428
|
exports.addSheet = addSheet;
|
|
61404
61429
|
exports.api = index;
|
|
61405
61430
|
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.2",
|
|
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.2",
|
|
17
17
|
"dayjs": "^1.11.0",
|
|
18
18
|
"immer": "^9.0.12",
|
|
19
19
|
"lodash": "^4.17.21",
|