@fileverse-dev/fortune-core 1.0.2-mod-103 → 1.0.2-mod-104
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 +4 -24
- package/dist/index.js +3 -24
- package/dist/modules/formula.d.ts +0 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -56992,28 +56992,6 @@ function helpFunctionExe($editer, currSelection, ctx) {
|
|
|
56992
56992
|
}
|
|
56993
56993
|
return funcName;
|
|
56994
56994
|
}
|
|
56995
|
-
function filterAndPickOthers(allItems, nameArray) {
|
|
56996
|
-
var nameSet = new Set(nameArray);
|
|
56997
|
-
var matched = [];
|
|
56998
|
-
var unmatched = [];
|
|
56999
|
-
allItems.forEach(function (item) {
|
|
57000
|
-
if (nameSet.has(item.n)) {
|
|
57001
|
-
matched.push(item);
|
|
57002
|
-
} else if (item.t !== 20) {
|
|
57003
|
-
unmatched.push(item);
|
|
57004
|
-
}
|
|
57005
|
-
});
|
|
57006
|
-
var shuffled = unmatched.reduce(function (acc, curr, index) {
|
|
57007
|
-
var rand = Math.floor(Math.random() * (index + 1));
|
|
57008
|
-
acc[index] = acc[rand];
|
|
57009
|
-
acc[rand] = curr;
|
|
57010
|
-
return acc;
|
|
57011
|
-
}, []);
|
|
57012
|
-
var others = shuffled.slice(0, 5);
|
|
57013
|
-
var result = [].concat(matched, _toConsumableArray(others));
|
|
57014
|
-
return result;
|
|
57015
|
-
}
|
|
57016
|
-
var PROMOTED_CRYPTO_FUNCTIONS = ["EOA", "UNISWAP", "COINGECKO", "DEFILLAMA", "GNOSIS", "BASE"];
|
|
57017
56995
|
function rangeHightlightselected(ctx, $editor) {
|
|
57018
56996
|
var currSelection = getrangeseleciton();
|
|
57019
56997
|
if (!currSelection) return;
|
|
@@ -57021,7 +56999,9 @@ function rangeHightlightselected(ctx, $editor) {
|
|
|
57021
56999
|
if (currText === "=") {
|
|
57022
57000
|
var _locale3 = locale(ctx),
|
|
57023
57001
|
functionlist = _locale3.functionlist;
|
|
57024
|
-
ctx.defaultCandidates =
|
|
57002
|
+
ctx.defaultCandidates = functionlist.filter(function (d) {
|
|
57003
|
+
return d.t === 20;
|
|
57004
|
+
}).slice(0, 10);
|
|
57025
57005
|
var funcName = helpFunctionExe($editor, currSelection, ctx);
|
|
57026
57006
|
ctx.functionHint = funcName === null || funcName === void 0 ? void 0 : funcName.toUpperCase();
|
|
57027
57007
|
return;
|
|
@@ -80269,4 +80249,4 @@ function handlePasteByClick(ctx, clipboardData, triggerType) {
|
|
|
80269
80249
|
} else ;
|
|
80270
80250
|
}
|
|
80271
80251
|
|
|
80272
|
-
export { CFSplitRange, Canvas, FormulaCache, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO,
|
|
80252
|
+
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, 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, getColMerge, getColorGradation, getCommentBoxByRC, getCommentBoxPosition, getComputeMap, getCurrentRules, getDataArr, getDataBySelectionNoCopy, getDropdownList, getFailureText, getFilterColumnColors, getFilterColumnValues, getFlattenedRange, getFlowdata, getFontSet, getFontStyleByCell, getFreezeState, 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, handleCellAreaMouseDown, 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, 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, insertDuneChart, insertIframe, 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, onIframeMove, onIframeMoveEnd, onIframeMoveStart, onIframeResize, onIframeResizeEnd, onIframeResizeStart, 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, removeOverShowComment, replace, replaceAll, replaceHtml, rgbToHex, rowHasMerged, rowLocation, rowLocationByIndex, sanitizeDuneUrl, saveFilter, saveHyperlink, saveIframe, saveImage, scrollToFrozenRowCol, scrollToHighlightCell, searchAll, searchNext, selectAll, selectIsOverlap, selectTextContent, selectTextContentCross, selectTitlesMap, selectTitlesRange, selectionCache, selectionCopyShow, seletedHighlistByindex, setCaretPosition, setCellValue, setConditionRules, setDropdownValue, setEditingComment, showComments, showDropCellSelection, showHideAllComments, showHideComment, showImgChooser, showLinkCard, showSelected, sortDataRange, sortSelection, storeSheetParamALL, toggleFreeze, toolbarItemClickHandler, toolbarItemSelectedFunc, update, updateCell, updateContextWithCanvas, updateContextWithSheetData, updateDropCell, updateFormat, updateFormatCell, updateInlineStringFormat, updateInlineStringFormatOutside, updateItem, updateMoreCell, updateSheet, validateCellData, validateIdCard, valueIsError, valueShowEs };
|
package/dist/index.js
CHANGED
|
@@ -57002,28 +57002,6 @@ function helpFunctionExe($editer, currSelection, ctx) {
|
|
|
57002
57002
|
}
|
|
57003
57003
|
return funcName;
|
|
57004
57004
|
}
|
|
57005
|
-
function filterAndPickOthers(allItems, nameArray) {
|
|
57006
|
-
var nameSet = new Set(nameArray);
|
|
57007
|
-
var matched = [];
|
|
57008
|
-
var unmatched = [];
|
|
57009
|
-
allItems.forEach(function (item) {
|
|
57010
|
-
if (nameSet.has(item.n)) {
|
|
57011
|
-
matched.push(item);
|
|
57012
|
-
} else if (item.t !== 20) {
|
|
57013
|
-
unmatched.push(item);
|
|
57014
|
-
}
|
|
57015
|
-
});
|
|
57016
|
-
var shuffled = unmatched.reduce(function (acc, curr, index) {
|
|
57017
|
-
var rand = Math.floor(Math.random() * (index + 1));
|
|
57018
|
-
acc[index] = acc[rand];
|
|
57019
|
-
acc[rand] = curr;
|
|
57020
|
-
return acc;
|
|
57021
|
-
}, []);
|
|
57022
|
-
var others = shuffled.slice(0, 5);
|
|
57023
|
-
var result = [].concat(matched, _toConsumableArray(others));
|
|
57024
|
-
return result;
|
|
57025
|
-
}
|
|
57026
|
-
var PROMOTED_CRYPTO_FUNCTIONS = ["EOA", "UNISWAP", "COINGECKO", "DEFILLAMA", "GNOSIS", "BASE"];
|
|
57027
57005
|
function rangeHightlightselected(ctx, $editor) {
|
|
57028
57006
|
var currSelection = getrangeseleciton();
|
|
57029
57007
|
if (!currSelection) return;
|
|
@@ -57031,7 +57009,9 @@ function rangeHightlightselected(ctx, $editor) {
|
|
|
57031
57009
|
if (currText === "=") {
|
|
57032
57010
|
var _locale3 = locale(ctx),
|
|
57033
57011
|
functionlist = _locale3.functionlist;
|
|
57034
|
-
ctx.defaultCandidates =
|
|
57012
|
+
ctx.defaultCandidates = functionlist.filter(function (d) {
|
|
57013
|
+
return d.t === 20;
|
|
57014
|
+
}).slice(0, 10);
|
|
57035
57015
|
var funcName = helpFunctionExe($editor, currSelection, ctx);
|
|
57036
57016
|
ctx.functionHint = funcName === null || funcName === void 0 ? void 0 : funcName.toUpperCase();
|
|
57037
57017
|
return;
|
|
@@ -80284,7 +80264,6 @@ exports.Canvas = Canvas;
|
|
|
80284
80264
|
exports.FormulaCache = FormulaCache;
|
|
80285
80265
|
exports.MAX_ZOOM_RATIO = MAX_ZOOM_RATIO;
|
|
80286
80266
|
exports.MIN_ZOOM_RATIO = MIN_ZOOM_RATIO;
|
|
80287
|
-
exports.PROMOTED_CRYPTO_FUNCTIONS = PROMOTED_CRYPTO_FUNCTIONS;
|
|
80288
80267
|
exports.addSheet = addSheet;
|
|
80289
80268
|
exports.api = index;
|
|
80290
80269
|
exports.applyLocation = applyLocation;
|
|
@@ -41,7 +41,6 @@ export declare function createFormulaRangeSelect(ctx: Context, select: {
|
|
|
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
43
|
export declare function getrangeseleciton(): ParentNode | ChildNode | null | undefined;
|
|
44
|
-
export declare const PROMOTED_CRYPTO_FUNCTIONS: string[];
|
|
45
44
|
export declare function rangeHightlightselected(ctx: Context, $editor: HTMLDivElement): void;
|
|
46
45
|
export declare function functionHTMLGenerate(txt: string): string;
|
|
47
46
|
export declare function handleFormulaInput(ctx: Context, $copyTo: HTMLDivElement | null | undefined, $editor: HTMLDivElement, kcode: number, preText?: string, refreshRangeSelect?: boolean): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fileverse-dev/fortune-core",
|
|
3
|
-
"version": "1.0.2-mod-
|
|
3
|
+
"version": "1.0.2-mod-104",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"repository": "https://github.com/ruilisi/fortune-sheet",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@fileverse-dev/formula-parser": "0.2.13-mod-
|
|
13
|
+
"@fileverse-dev/formula-parser": "0.2.13-mod-37",
|
|
14
14
|
"dayjs": "^1.11.0",
|
|
15
15
|
"immer": "^9.0.12",
|
|
16
16
|
"lodash": "^4.17.21",
|