@leankylin-sheet/core 3.1.43 → 3.1.45

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/index.esm.js CHANGED
@@ -36580,22 +36580,11 @@ function searchFunction(ctx, searchtxt) {
36580
36580
  var f = [];
36581
36581
  var s = [];
36582
36582
  var t = [];
36583
- var result_i = 0;
36584
36583
  for (var _i17 = 0; _i17 < functionlist.length; _i17 += 1) {
36585
36584
  var item = functionlist[_i17];
36586
36585
  var n = item.n;
36587
- if (n === searchtxt) {
36588
- f.unshift(item);
36589
- result_i += 1;
36590
- } else if (_.startsWith(n, searchtxt)) {
36591
- s.unshift(item);
36592
- result_i += 1;
36593
- } else if (n.indexOf(searchtxt) > -1) {
36586
+ if (n.indexOf(searchtxt) > -1) {
36594
36587
  t.unshift(item);
36595
- result_i += 1;
36596
- }
36597
- if (result_i >= 10) {
36598
- break;
36599
36588
  }
36600
36589
  }
36601
36590
  var list = [].concat(f, s, t);
@@ -36693,7 +36682,7 @@ function helpFunctionExe($editer, currSelection, ctx) {
36693
36682
  function rangeHightlightselected(ctx, $editor) {
36694
36683
  var currSelection = getrangeseleciton();
36695
36684
  if (!currSelection) return;
36696
- var currText = _.trim(currSelection.textContent || "");
36685
+ var currText = _.trimStart(currSelection.textContent || "");
36697
36686
  if (currText === null || currText === void 0 ? void 0 : currText.match(/^[a-zA-Z_]+$/)) {
36698
36687
  searchFunction(ctx, currText.toUpperCase());
36699
36688
  ctx.functionHint = null;
@@ -56049,6 +56038,8 @@ var index = /*#__PURE__*/Object.freeze({
56049
56038
  });
56050
56039
 
56051
56040
  var defaultSettings = {
56041
+ toolbarRightRender: undefined,
56042
+ onClickContentEditable: undefined,
56052
56043
  renderCustomColor: undefined,
56053
56044
  renderFormulaHint: undefined,
56054
56045
  renderFormulaSearch: undefined,
@@ -59922,4 +59913,4 @@ function handlePasteByClick(ctx, triggerType) {
59922
59913
  } else if (data.indexOf("leankylin-copy-action-image") > -1) ; else ;
59923
59914
  }
59924
59915
 
59925
- 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, escapeScriptTag, execFunctionGroup, execfunction, expandRowsAndColumns, extractFormulaCellOps, filterPatch, fixColumnStyleOverflowInFreeze, fixPositionOnFrozenCells, fixRowStyleOverflowInFreeze, functionCopy, functionHTMLGenerate, functionStrChange, genarate, generateRandomId, generateRandomSheetName, getAllFunctionGroup, getArrowCanvasSize, getBorderInfoCompute, getBorderInfoComputeRange, getCellHyperlink, getCellRowColumn, getCellTextInfo, getCellTopRightPostion, getCellValue, getClipboardContent, getColMerge, getColorGradation, getCommentBoxByRC, getCommentBoxPosition, getComputeMap, getCurrentRules, getDataArr, getDataBySelectionNoCopy, getDropdownList, getFailureText, getFilterColumnColors, getFilterColumnValues, getFlattenedRange, getFlowdata, getFontSet, getFontStyleByCell, getFrozenHandleLeft, getFrozenHandleTop, 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, goToLink, groupValuesRefresh, handleArrowKey, handleBold, handleBorder, handleCellAreaDoubleClick, handleCellAreaDragOver, handleCellAreaMouseDown, handleCellAreaMouseMove, handleCellDrop, handleClearFormat, handleColFreezeHandleMouseDown, handleColSizeHandleMouseDown, handleColumnHeaderMouseDown, handleContextMenu, handleCopy, handleCurrencyFormat, 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, 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 };
59916
+ 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, escapeScriptTag, execFunctionGroup, execfunction, expandRowsAndColumns, extractFormulaCellOps, filterPatch, fixColumnStyleOverflowInFreeze, fixPositionOnFrozenCells, fixRowStyleOverflowInFreeze, functionCopy, functionHTMLGenerate, functionStrChange, genarate, generateRandomId, generateRandomSheetName, getAllFunctionGroup, getArrowCanvasSize, getBorderInfoCompute, getBorderInfoComputeRange, getCellHyperlink, getCellRowColumn, getCellTextInfo, getCellTopRightPostion, getCellValue, getClipboardContent, getColMerge, getColorGradation, getCommentBoxByRC, getCommentBoxPosition, getComputeMap, getCurrentRules, getDataArr, getDataBySelectionNoCopy, getDropdownList, getFailureText, getFilterColumnColors, getFilterColumnValues, getFlattenedRange, getFlowdata, getFontSet, getFontStyleByCell, getFrozenHandleLeft, getFrozenHandleTop, 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, 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, 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
@@ -36590,22 +36590,11 @@ function searchFunction(ctx, searchtxt) {
36590
36590
  var f = [];
36591
36591
  var s = [];
36592
36592
  var t = [];
36593
- var result_i = 0;
36594
36593
  for (var _i17 = 0; _i17 < functionlist.length; _i17 += 1) {
36595
36594
  var item = functionlist[_i17];
36596
36595
  var n = item.n;
36597
- if (n === searchtxt) {
36598
- f.unshift(item);
36599
- result_i += 1;
36600
- } else if (___default['default'].startsWith(n, searchtxt)) {
36601
- s.unshift(item);
36602
- result_i += 1;
36603
- } else if (n.indexOf(searchtxt) > -1) {
36596
+ if (n.indexOf(searchtxt) > -1) {
36604
36597
  t.unshift(item);
36605
- result_i += 1;
36606
- }
36607
- if (result_i >= 10) {
36608
- break;
36609
36598
  }
36610
36599
  }
36611
36600
  var list = [].concat(f, s, t);
@@ -36703,7 +36692,7 @@ function helpFunctionExe($editer, currSelection, ctx) {
36703
36692
  function rangeHightlightselected(ctx, $editor) {
36704
36693
  var currSelection = getrangeseleciton();
36705
36694
  if (!currSelection) return;
36706
- var currText = ___default['default'].trim(currSelection.textContent || "");
36695
+ var currText = ___default['default'].trimStart(currSelection.textContent || "");
36707
36696
  if (currText === null || currText === void 0 ? void 0 : currText.match(/^[a-zA-Z_]+$/)) {
36708
36697
  searchFunction(ctx, currText.toUpperCase());
36709
36698
  ctx.functionHint = null;
@@ -56059,6 +56048,8 @@ var index = /*#__PURE__*/Object.freeze({
56059
56048
  });
56060
56049
 
56061
56050
  var defaultSettings = {
56051
+ toolbarRightRender: undefined,
56052
+ onClickContentEditable: undefined,
56062
56053
  renderCustomColor: undefined,
56063
56054
  renderFormulaHint: undefined,
56064
56055
  renderFormulaSearch: undefined,
@@ -60069,6 +60060,7 @@ exports.getTypeItemHide = getTypeItemHide;
60069
60060
  exports.getcellFormula = getcellFormula;
60070
60061
  exports.getcellrange = getcellrange;
60071
60062
  exports.getdatabyselection = getdatabyselection;
60063
+ exports.getrangeseleciton = getrangeseleciton;
60072
60064
  exports.goToLink = goToLink;
60073
60065
  exports.groupValuesRefresh = groupValuesRefresh;
60074
60066
  exports.handleArrowKey = handleArrowKey;
@@ -40,6 +40,7 @@ export declare function createFormulaRangeSelect(ctx: Context, select: {
40
40
  } & Rect): void;
41
41
  export declare function createRangeHightlight(ctx: Context, inputInnerHtmlStr: string, ignoreRangeIndex?: number): void;
42
42
  export declare function setCaretPosition(ctx: Context, textDom: HTMLElement, children: number, pos: number): void;
43
+ export declare function getrangeseleciton(): ParentNode | ChildNode | null | undefined;
43
44
  export declare function rangeHightlightselected(ctx: Context, $editor: HTMLDivElement): void;
44
45
  export declare function functionHTMLGenerate(txt: string): string;
45
46
  export declare function handleFormulaInput(ctx: Context, $copyTo: HTMLDivElement | null | undefined, $editor: HTMLDivElement, kcode: number, preText?: string, refreshRangeSelect?: boolean): void;
@@ -78,6 +78,8 @@ export type Hooks = {
78
78
  afterUpdateSheetName?: (id: string, oldName: string, newName: string) => void;
79
79
  };
80
80
  export type Settings = {
81
+ toolbarRightRender?: any;
82
+ onClickContentEditable?: any;
81
83
  renderCustomColor?: any;
82
84
  renderFormulaHint?: any;
83
85
  renderFormulaSearch?: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leankylin-sheet/core",
3
- "version": "3.1.43",
3
+ "version": "3.1.45",
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": "3.1.43",
16
+ "@leankylin-sheet/formula-parser": "3.1.45",
17
17
  "dayjs": "^1.11.0",
18
18
  "immer": "^9.0.12",
19
19
  "lodash": "^4.17.21",