@fileverse-dev/dsheet 4.1.23 → 4.1.24
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/{executeStringFunction-ZHYCWIpK.js → executeStringFunction-B3Tw7e1U.js} +2411 -2201
- package/dist/formula.js +1 -1
- package/dist/{index-8_qnUyMl.js → index-DvpQioe4.js} +5174 -5157
- package/dist/index.es.js +21 -21
- package/dist/sheet-engine/core/index.d.ts +1 -1
- package/dist/sheet-engine/core/modules/formula-arrow-mode.d.ts +81 -0
- package/dist/sheet-engine/core/modules/formula-arrow-mode.test.d.ts +1 -0
- package/dist/sheet-engine/core/modules/formula.d.ts +32 -1
- package/dist/sheet-engine/core/modules/index.d.ts +1 -1
- package/dist/{use-xlsx-import-impl-cgDH14_y.js → use-xlsx-import-impl-DWkIjd5v.js} +4 -4
- package/dist/{xlsx-defined-names-DCK7aKIO.js → xlsx-defined-names-776Vg9GT.js} +2 -2
- package/dist/{xlsx-export-impl-BHDWz0aW.js → xlsx-export-impl-C60SB8Ve.js} +4 -4
- package/dist/{xlsx-hyperlink-inline-T4GsXFm7.js → xlsx-hyperlink-inline-DaxgypSu.js} +2 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as s, d as o, f as t, S as r, g as l, h as n, j as d, T as S, k as c, l as i, n as m, o as h, p, q as C, t as u, u as E, v as F, w as
|
|
2
|
-
import {
|
|
1
|
+
import { C as s, d as o, f as t, S as r, g as l, h as n, j as d, T as S, k as c, l as i, n as m, o as h, p, q as C, t as u, u as E, v as F, w as x, x as g, z as R, A as f, B as A, D as I, E as L, F as w, G as T, H as v, I as y, J as D, K as M, L as b, M as O, N as k, O as P, P as V } from "./index-DvpQioe4.js";
|
|
2
|
+
import { cB as B, cC as K, cD as U, cJ as X, bx as _, e as G, f as H, l as J, a as j, dn as q, dp as N, bb as Y, dq as Z, dr as Q, dv as W, dw as $, dy as ee, I as ae, dO as se, el as oe, b4 as te } from "./executeStringFunction-B3Tw7e1U.js";
|
|
3
3
|
import { FLVURL as le } from "@fileverse-dev/formulajs";
|
|
4
4
|
import { E as de, S as Se } from "./constants-8Ij49Lxv.js";
|
|
5
5
|
export {
|
|
@@ -15,7 +15,7 @@ export {
|
|
|
15
15
|
d as SupportedChain,
|
|
16
16
|
S as TEMPLATES,
|
|
17
17
|
c as api,
|
|
18
|
-
|
|
18
|
+
B as clearColumnsCellsFormat,
|
|
19
19
|
i as clearFilter,
|
|
20
20
|
K as clearRowsCellsFormat,
|
|
21
21
|
U as clearSelectedCellFormat,
|
|
@@ -25,41 +25,41 @@ export {
|
|
|
25
25
|
_ as deleteSelectedCellText,
|
|
26
26
|
p as describeMatchedShortcut,
|
|
27
27
|
C as encryptForRoomKey,
|
|
28
|
-
|
|
28
|
+
G as executeStringFunction,
|
|
29
29
|
u as fetchSessionState,
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
H as formulaResponseUiSync,
|
|
31
|
+
J as getFlowdata,
|
|
32
32
|
E as getRemoveDuplicatesErrorMessage,
|
|
33
33
|
F as getRemoveDuplicatesPreview,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
j as getSheetIndex,
|
|
35
|
+
x as handleCSVUpload,
|
|
36
|
+
g as handleCopy,
|
|
37
37
|
R as handleExportToCSV,
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
f as handleExportToJSON,
|
|
39
|
+
A as handleExportToODS,
|
|
40
40
|
I as handleExportToXLSX,
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
q as handleFreeze,
|
|
42
|
+
N as handleHorizontalAlign,
|
|
43
43
|
Y as handleLink,
|
|
44
44
|
Z as handleMerge,
|
|
45
45
|
L as handlePasteByClick,
|
|
46
46
|
Q as handleSort,
|
|
47
47
|
W as handleTextSize,
|
|
48
48
|
$ as handleVerticalAlign,
|
|
49
|
-
|
|
49
|
+
w as importSpreadsheetFile,
|
|
50
50
|
ee as insertRowCol,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
T as isBrowserZoomShortcut,
|
|
52
|
+
v as isFormulaListShortcut,
|
|
53
|
+
y as isOpenShortcutsModalShortcut,
|
|
54
54
|
ae as jfrefreshgrid,
|
|
55
55
|
se as loadLocale,
|
|
56
56
|
D as remapCommentAnchors,
|
|
57
57
|
M as removeActiveImage,
|
|
58
58
|
b as removeDuplicates,
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
O as seedSession,
|
|
60
|
+
k as showImgChooser,
|
|
61
61
|
oe as toolbarItemClickHandler,
|
|
62
62
|
te as updateFormat,
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
P as useEnsStatus,
|
|
64
|
+
V as useXLSXImport
|
|
65
65
|
};
|
|
@@ -7,7 +7,7 @@ export { defaultSettings } from './settings';
|
|
|
7
7
|
export type { Settings, Hooks, DateBaseLocale, CommentAnchorMove, } from './settings';
|
|
8
8
|
export { handleCopy, handleGlobalKeyDown, handlePaste, handlePasteByClick, fixPositionOnFrozenCells, handleCellAreaMouseDown, handleCellAreaDoubleClick, handleContextMenu, mouseRender, handleOverlayMouseMove, handleOverlayMouseUp, handleRowHeaderMouseDown, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColSizeHandleDoubleClick, handleRowSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleRowFreezeHandleMouseDown, describeMatchedShortcut, isBrowserZoomShortcut, isOpenShortcutsModalShortcut, isFormulaListShortcut, } from './events';
|
|
9
9
|
export * from './locale';
|
|
10
|
-
export { getBorderInfoComputeRange, getBorderInfoCompute, normalizedCellAttr, normalizedAttr, getCellValue, setCellValue, getRealCellValue, mergeBorder, cancelNormalSelected, updateCell, getRangetxt, getRangeByTxt, isValidRangeText, getInlineStringHTML, applyLinkToSelection, getHyperlinksFromInlineSegments, getUniformLinkFromWindowSelectionInEditor, getHyperlinkAtCaretInContentEditable, getStyleByCell, clearSelectedCellFormat, clearRowsCellsFormat, clearColumnsCellsFormat, clipboard, moveToEnd, getRangeRectsByCharacterOffset, getDateBaseLocale, getCanonicalDateDisplayFormat, getCanonicalDateEditFormat, getDateEditFormatForCell, isUsDateBaseLocale, normalizeDateBaseLocale, shouldPreserveDateFormatForEdit, setDateBaseLocale, update, is_date, valueShowEs, isTypedCurrencyDisplayFormat, isCurrencyLikeNumberFormat, buildFiatCurrencyFormat, quoteSsfLiteral, FormulaCache, groupValuesRefresh, execFunctionGroup, runFormulaEvalChunk, applyWorkerFormulaChunkResults, isFormulaEvalPending, FORMULA_ASYNC_CHUNK_SIZE, FORMULA_ASYNC_EVAL_THRESHOLD, FORMULA_WORKER_CHUNK_SIZE, FORMULA_WORKER_THRESHOLD, setCaretPosition, getrangeseleciton, getFormulaEditorOwner, rangeHightlightselected, handleFormulaInput, israngeseleciton, createRangeHightlight, maybeRecoverDirtyRangeSelection, getFormulaRangeIndexAtCaret, isCaretAtValidFormulaRangeInsertionPoint, isLegacyFormulaRangeMode, markRangeSelectionDirty, setFormulaEditorOwner, functionHTMLGenerate, suppressFormulaRangeSelectionForInitialEdit, ensureFormulaRangeToSheet, shouldPreserveFormulaEditOnSheetSwitch, activateSheetForNavigation, returnToFormulaOriginSheet, rangeSetValue, getFormulaRangeIndexForKeyboardSync, createFormulaRangeSelect, isFormulaReferenceInputMode, seedFormulaFuncSelectedRangeFromLastSelection, initFreeze, isInlineStringCell, getInlineStringNoStyle, rowLocation, rowLocationByIndex, colLocation, colLocationByIndex, insertRowCol, deleteRowCol, hideSelected, showSelected, isShowHidenCR, getFilterHiddenRowsUnionFromFilterMap, getFilterHiddenRowsUnion, ensureManualHiddenInitialized, rebuildRowHiddenUnion, scrollToHighlightCell, selectTitlesMap, selectTitlesRange, defaultLuckysheetSelectRanges, normalizeSelection, syncPrimaryCellActiveFromSelection, selectionIsExactlyOneMergeBlock, setPrimaryCellActive, advancePrimaryCellInLastMultiSelection, snapSheetSelectionFocusToCellPreserveMultiRange, moveHighlightCell, deleteSelectedCellText, selectAll, fixRowStyleOverflowInFreeze, fixColumnStyleOverflowInFreeze, calcSelectionInfo, addSheet, deleteSheet, editSheetName, changeSheet, updateFormat, autoSelectionFormula, handleBold, handleItalic, handleStrikeThrough, handleUnderline, handleHorizontalAlign, handleVerticalAlign, handleTextColor, handleTextBackground, handleBorder, handleMerge, mergeSelectionHasValues, handleSort, getRemoveDuplicatesPreview, removeDuplicates, getRemoveDuplicatesErrorMessage, handleFreeze, handleTextSize, handleSum, handleLink, captureLinkEditorOpenSnapshot, isHyperlinkCreationBlocked, toolbarItemClickHandler, toolbarItemSelectedFunc, handleScreenShot, insertImage, showImgChooser, drawArrow, setEditingComment, removeEditingComment, removeOverShowComment, newComment, editComment, deleteComment, showComments, showHideComment, showHideAllComments, onCommentBoxMoveStart, removeActiveImage, copyActiveImage, cutActiveImage, pasteImageItem, loadImageFromFile, getImageClipboard, getImageCutSourceId, cancelActiveImgItem, onImageMoveStart, onImageResizeStart, createDropCellRange, sortSelection, sortSheetBySelectedColumn, searchAll, searchNext, replace, replaceAll, replaceAllScoped, getSearchIndexArr, getSearchIndexArrAsync, getFindRangeOnCurrentSheet, getQuickSearchIndexArr, getQuickSearchHiddenConfig, getCellHyperlinks, getHyperlinkDisplayTextInCell, getInlineLinkPlainRange, getUniformLinkCoveringPlainRange, getUniformLinkAtPlainOffset, removeHyperlinkForLink, updateHyperlinkForLink, syncLinkCardAfterHyperlinkChange, expandCellRectForMerge, shouldQuickSearchUseAsync, runQuickSearchIndexArrAsync, QUICK_SEARCH_ASYNC_ROW_THRESHOLD, parseRangeText, getCellRowColumn, getCellHyperlink, saveHyperlink, removeHyperlink, showLinkCard, goToLink, isLinkValid, createFilterOptions, clearFilter, clearFilterForColumn, toggleViewerFilter, createFilter, applySheetFilterState, getFilterColumnValues, getFilterColumnColors, orderbydatafiler, saveFilter, onCellsMoveStart, cfSplitRange, updateMoreCell, getRegStr, getDataArr, applyLocation, getOptionValue, getSelectRange, getDropdownList, setDropdownValue, confirmMessage, setConditionRules, CF_DATE_DEFAULT_FORMAT, parseCfDateConditionForUi, formatCfDatePresetSnapshot, parseDdMmYyyyToSerial, handleOverlayTouchStart, handleOverlayTouchEnd, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, jfrefreshgrid, sanitizeDuneUrl, insertDuneChart, onIframeMoveStart, onIframeResizeStart, onIframeMove, onIframeMoveEnd, onIframeResize, onIframeResizeEnd, setCellError, clearCellError, detectDateFormat, isdatatypemulti, diff, isdatetime, isRealNull, isRealNum, isNumericCellType, iscelldata, getcellrange, cancelFunctionrangeSelected, seletedHighlistByindex, spillSortResult, execfunction, insertUpdateFunctionGroup, remapFormulaReferencesByMap, refreshFormulasUsingDefinedNames, checkCF, getComputeMap, isValidDefinedNameIdentifier, getDefinedNameDisplayRange, findDefinedNameForSelection, findDefinedNameByName, resolveDefinedNameForFormula, addDefinedName, updateDefinedName, deleteDefinedName, selectDefinedName, openNamedRangesSidebar, scheduleDefinedNamesSync, shiftDefinedNamesOnInsert, shiftDefinedNamesOnDelete, removeDefinedNamesForSheet, cancelPaintModel, hideCRCount, getdatabyselection, } from './modules';
|
|
10
|
+
export { getBorderInfoComputeRange, getBorderInfoCompute, normalizedCellAttr, normalizedAttr, getCellValue, setCellValue, getRealCellValue, mergeBorder, cancelNormalSelected, updateCell, getRangetxt, getRangeByTxt, isValidRangeText, getInlineStringHTML, applyLinkToSelection, getHyperlinksFromInlineSegments, getUniformLinkFromWindowSelectionInEditor, getHyperlinkAtCaretInContentEditable, getStyleByCell, clearSelectedCellFormat, clearRowsCellsFormat, clearColumnsCellsFormat, clipboard, moveToEnd, getRangeRectsByCharacterOffset, getDateBaseLocale, getCanonicalDateDisplayFormat, getCanonicalDateEditFormat, getDateEditFormatForCell, isUsDateBaseLocale, normalizeDateBaseLocale, shouldPreserveDateFormatForEdit, setDateBaseLocale, update, is_date, valueShowEs, isTypedCurrencyDisplayFormat, isCurrencyLikeNumberFormat, buildFiatCurrencyFormat, quoteSsfLiteral, FormulaCache, groupValuesRefresh, execFunctionGroup, runFormulaEvalChunk, applyWorkerFormulaChunkResults, isFormulaEvalPending, FORMULA_ASYNC_CHUNK_SIZE, FORMULA_ASYNC_EVAL_THRESHOLD, FORMULA_WORKER_CHUNK_SIZE, FORMULA_WORKER_THRESHOLD, setCaretPosition, getrangeseleciton, getFormulaEditorOwner, rangeHightlightselected, handleFormulaInput, israngeseleciton, createRangeHightlight, maybeRecoverDirtyRangeSelection, getFormulaRangeIndexAtCaret, isCaretAtValidFormulaRangeInsertionPoint, isLegacyFormulaRangeMode, markRangeSelectionDirty, setFormulaEditorOwner, functionHTMLGenerate, suppressFormulaRangeSelectionForInitialEdit, resetFormulaArrowSession, ensureFormulaRangeToSheet, shouldPreserveFormulaEditOnSheetSwitch, activateSheetForNavigation, returnToFormulaOriginSheet, rangeSetValue, getFormulaRangeIndexForKeyboardSync, createFormulaRangeSelect, isFormulaReferenceInputMode, seedFormulaFuncSelectedRangeFromLastSelection, initFreeze, isInlineStringCell, getInlineStringNoStyle, rowLocation, rowLocationByIndex, colLocation, colLocationByIndex, insertRowCol, deleteRowCol, hideSelected, showSelected, isShowHidenCR, getFilterHiddenRowsUnionFromFilterMap, getFilterHiddenRowsUnion, ensureManualHiddenInitialized, rebuildRowHiddenUnion, scrollToHighlightCell, selectTitlesMap, selectTitlesRange, defaultLuckysheetSelectRanges, normalizeSelection, syncPrimaryCellActiveFromSelection, selectionIsExactlyOneMergeBlock, setPrimaryCellActive, advancePrimaryCellInLastMultiSelection, snapSheetSelectionFocusToCellPreserveMultiRange, moveHighlightCell, deleteSelectedCellText, selectAll, fixRowStyleOverflowInFreeze, fixColumnStyleOverflowInFreeze, calcSelectionInfo, addSheet, deleteSheet, editSheetName, changeSheet, updateFormat, autoSelectionFormula, handleBold, handleItalic, handleStrikeThrough, handleUnderline, handleHorizontalAlign, handleVerticalAlign, handleTextColor, handleTextBackground, handleBorder, handleMerge, mergeSelectionHasValues, handleSort, getRemoveDuplicatesPreview, removeDuplicates, getRemoveDuplicatesErrorMessage, handleFreeze, handleTextSize, handleSum, handleLink, captureLinkEditorOpenSnapshot, isHyperlinkCreationBlocked, toolbarItemClickHandler, toolbarItemSelectedFunc, handleScreenShot, insertImage, showImgChooser, drawArrow, setEditingComment, removeEditingComment, removeOverShowComment, newComment, editComment, deleteComment, showComments, showHideComment, showHideAllComments, onCommentBoxMoveStart, removeActiveImage, copyActiveImage, cutActiveImage, pasteImageItem, loadImageFromFile, getImageClipboard, getImageCutSourceId, cancelActiveImgItem, onImageMoveStart, onImageResizeStart, createDropCellRange, sortSelection, sortSheetBySelectedColumn, searchAll, searchNext, replace, replaceAll, replaceAllScoped, getSearchIndexArr, getSearchIndexArrAsync, getFindRangeOnCurrentSheet, getQuickSearchIndexArr, getQuickSearchHiddenConfig, getCellHyperlinks, getHyperlinkDisplayTextInCell, getInlineLinkPlainRange, getUniformLinkCoveringPlainRange, getUniformLinkAtPlainOffset, removeHyperlinkForLink, updateHyperlinkForLink, syncLinkCardAfterHyperlinkChange, expandCellRectForMerge, shouldQuickSearchUseAsync, runQuickSearchIndexArrAsync, QUICK_SEARCH_ASYNC_ROW_THRESHOLD, parseRangeText, getCellRowColumn, getCellHyperlink, saveHyperlink, removeHyperlink, showLinkCard, goToLink, isLinkValid, createFilterOptions, clearFilter, clearFilterForColumn, toggleViewerFilter, createFilter, applySheetFilterState, getFilterColumnValues, getFilterColumnColors, orderbydatafiler, saveFilter, onCellsMoveStart, cfSplitRange, updateMoreCell, getRegStr, getDataArr, applyLocation, getOptionValue, getSelectRange, getDropdownList, setDropdownValue, confirmMessage, setConditionRules, CF_DATE_DEFAULT_FORMAT, parseCfDateConditionForUi, formatCfDatePresetSnapshot, parseDdMmYyyyToSerial, handleOverlayTouchStart, handleOverlayTouchEnd, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, jfrefreshgrid, sanitizeDuneUrl, insertDuneChart, onIframeMoveStart, onIframeResizeStart, onIframeMove, onIframeMoveEnd, onIframeResize, onIframeResizeEnd, setCellError, clearCellError, detectDateFormat, isdatatypemulti, diff, isdatetime, isRealNull, isRealNum, isNumericCellType, iscelldata, getcellrange, cancelFunctionrangeSelected, seletedHighlistByindex, spillSortResult, execfunction, insertUpdateFunctionGroup, remapFormulaReferencesByMap, refreshFormulasUsingDefinedNames, checkCF, getComputeMap, isValidDefinedNameIdentifier, getDefinedNameDisplayRange, findDefinedNameForSelection, findDefinedNameByName, resolveDefinedNameForFormula, addDefinedName, updateDefinedName, deleteDefinedName, selectDefinedName, openNamedRangesSidebar, scheduleDefinedNamesSync, shiftDefinedNamesOnInsert, shiftDefinedNamesOnDelete, removeDefinedNamesForSheet, cancelPaintModel, hideCRCount, getdatabyselection, } from './modules';
|
|
11
11
|
export type { FilterDate, FilterValue, FilterColor } from './modules';
|
|
12
12
|
export { getFreezeState, getFrozenPixelBounds, toggleFreeze, indexToColumnChar, escapeScriptTag, escapeHTMLTag, getSheetIndex, replaceHtml, isAllowEdit, isAllowEditReadOnly, filterPatch, patchToOp, opToPatch, inverseRowColOptions, } from './utils';
|
|
13
13
|
export type { PatchOptions, ChangedSheet } from './utils';
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure (DOM-free, ctx-free) logic that decides what an arrow key does while a
|
|
3
|
+
* formula is being edited.
|
|
4
|
+
*
|
|
5
|
+
* GRID - not editing: arrows move the grid selection
|
|
6
|
+
* TEXT_EDIT - arrows move the text caret
|
|
7
|
+
* REFERENCE_READY - next arrow inserts a new cell reference at the caret
|
|
8
|
+
* REFERENCE_ACTIVE - arrows move/extend the reference that was just inserted
|
|
9
|
+
*/
|
|
10
|
+
export type FormulaArrowMode = 'GRID' | 'TEXT_EDIT' | 'REFERENCE_READY' | 'REFERENCE_ACTIVE';
|
|
11
|
+
/** Sticky, user-controlled (F2). `null` = automatic behavior. */
|
|
12
|
+
export type FormulaArrowOverride = null | 'TEXT_EDIT' | 'REFERENCE';
|
|
13
|
+
export type TokenKind = 'EQ' | 'SPACE' | 'STRING' | 'REF' | 'NAME' | 'NUMBER' | 'FUNC_NAME' | 'LPAREN' | 'RPAREN' | 'COMMA' | 'OPERATOR' | 'POSTFIX' | 'UNKNOWN';
|
|
14
|
+
export type Token = {
|
|
15
|
+
kind: TokenKind;
|
|
16
|
+
start: number;
|
|
17
|
+
end: number;
|
|
18
|
+
text: string;
|
|
19
|
+
/** STRING / quoted sheet name: closing quote present. */
|
|
20
|
+
terminated?: boolean;
|
|
21
|
+
/** REF that is not (yet) a complete reference, e.g. `A1:A`, `A1:`. */
|
|
22
|
+
partial?: boolean;
|
|
23
|
+
};
|
|
24
|
+
/** Never throws. Offsets index into `text` as given. */
|
|
25
|
+
export declare function tokenizeFormula(text: string): Token[];
|
|
26
|
+
export type CaretContext = {
|
|
27
|
+
inString: boolean;
|
|
28
|
+
/** Caret strictly inside a non-string token (e.g. `A|1`, `SU|M(`). */
|
|
29
|
+
insideToken: Token | null;
|
|
30
|
+
/** REF token the caret is inside or right after (start < caret <= end). */
|
|
31
|
+
touchingRef: Token | null;
|
|
32
|
+
prevSig: Token | null;
|
|
33
|
+
nextSig: Token | null;
|
|
34
|
+
};
|
|
35
|
+
export declare function getCaretContext(tokens: Token[], caret: number): CaretContext;
|
|
36
|
+
/**
|
|
37
|
+
* True when a new operand (cell reference) can be entered at the caret:
|
|
38
|
+
* the previous significant token wants an operand, the caret is not inside a
|
|
39
|
+
* string or token, and no operand sits immediately to the right.
|
|
40
|
+
*/
|
|
41
|
+
export declare function isOperandSlot(ctx: CaretContext): boolean;
|
|
42
|
+
export type ArrowModeInput = {
|
|
43
|
+
editing: boolean;
|
|
44
|
+
/** Full editor text (offsets of `caretOffset` index into it). */
|
|
45
|
+
text: string;
|
|
46
|
+
/** null when the caret is not inside the editor. */
|
|
47
|
+
caretOffset: number | null;
|
|
48
|
+
override: FormulaArrowOverride;
|
|
49
|
+
/** false for sessions opened on an existing formula (F2 / dblclick / bar). */
|
|
50
|
+
autoAllowed: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* The engine is driving a reference right now (mouse drag, or a reference the
|
|
53
|
+
* keyboard just inserted and the caret is still on).
|
|
54
|
+
*/
|
|
55
|
+
refActive: boolean;
|
|
56
|
+
};
|
|
57
|
+
/** Decision priority from the product spec, evaluated in this exact order. */
|
|
58
|
+
export declare function resolveArrowMode(input: ArrowModeInput): FormulaArrowMode;
|
|
59
|
+
/**
|
|
60
|
+
* F2 while editing a formula: flip between caret and reference selection.
|
|
61
|
+
*
|
|
62
|
+
* Toggles the stored override once one exists, so a second press always undoes
|
|
63
|
+
* the first, even at a caret where the derived mode cannot change (e.g. after
|
|
64
|
+
* `)`). With no stored override, flips from the mode the user is looking at.
|
|
65
|
+
*/
|
|
66
|
+
export declare function overrideAfterF2(mode: FormulaArrowMode, current?: FormulaArrowOverride): FormulaArrowOverride;
|
|
67
|
+
/**
|
|
68
|
+
* Rule 4: keys typed while a reference is active end the arrow-driven
|
|
69
|
+
* reference. The next mode is then derived from the caret position
|
|
70
|
+
* (operator or `,` -> READY, `)` or anything else -> TEXT_EDIT).
|
|
71
|
+
* keyCode based because it is called from keyup/keydown handlers.
|
|
72
|
+
*/
|
|
73
|
+
export declare function isTextChangingKeyCode(kcode: number): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Keys that edit characters *inside* a reference token (letters, digits incl.
|
|
76
|
+
* numpad digits, Backspace/Delete). Typing them over an arrow-inserted
|
|
77
|
+
* reference makes it a hand-edited token, so its highlight must be dropped.
|
|
78
|
+
* Operators, commas and spaces are not here: they end the reference but leave
|
|
79
|
+
* its highlight alone (see `isTextChangingKeyCode`).
|
|
80
|
+
*/
|
|
81
|
+
export declare function isReferenceDirtyingKeyCode(kcode: number): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Cell, CellMatrix, Rect, Selection } from '../types';
|
|
2
2
|
import { Context } from '../context';
|
|
3
|
+
import { FormulaArrowMode, FormulaArrowOverride } from './formula-arrow-mode';
|
|
3
4
|
import { FormulaAsyncEvalJob } from './formula-async-eval';
|
|
4
5
|
import { RangePassCacheEntry } from './formula-range-cache';
|
|
5
6
|
import { SnapshotEvalOutput } from './formula-snapshot-eval';
|
|
@@ -28,6 +29,9 @@ export declare class FormulaCache {
|
|
|
28
29
|
rangedrag_row_start?: boolean;
|
|
29
30
|
rangeSelectionActive?: boolean | null;
|
|
30
31
|
keyboardRangeSelectionLock?: boolean;
|
|
32
|
+
arrowOverride?: FormulaArrowOverride;
|
|
33
|
+
arrowAutoAllowed?: boolean;
|
|
34
|
+
arrowSessionCell?: [number, number];
|
|
31
35
|
/** True after arrow/Shift+arrow moved `func_selectedrange` without updating yellow selection. */
|
|
32
36
|
formulaKeyboardRefSync?: boolean;
|
|
33
37
|
formulaEditorOwner?: 'cell' | 'fx' | null;
|
|
@@ -98,6 +102,14 @@ export declare function execFunctionGroup(ctx: Context, origin_r: number, origin
|
|
|
98
102
|
* without resizing `luckysheet_select_save`.
|
|
99
103
|
*/
|
|
100
104
|
export declare function seedFormulaFuncSelectedRangeFromLastSelection(ctx: Context): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Explicit reference selection (F2) with the caret on an existing reference:
|
|
107
|
+
* seed the keyboard range from *that reference*, so the first arrow moves it
|
|
108
|
+
* from where it is (`=SUM(A1|)` + Right -> `=SUM(B1)`), not from the edited
|
|
109
|
+
* cell. Replaces any stale `func_selectedrange`. Returns false when the caret
|
|
110
|
+
* is not on a complete reference on the visible sheet.
|
|
111
|
+
*/
|
|
112
|
+
export declare function seedFormulaFuncSelectedRangeFromTouchedReference(ctx: Context): boolean;
|
|
101
113
|
export declare function createFormulaRangeSelect(ctx: Context, select: {
|
|
102
114
|
rangeIndex: number;
|
|
103
115
|
} & Rect): void;
|
|
@@ -146,7 +158,7 @@ export declare function isBareCellOrRangeOnlyFormula(formulaText: string): boole
|
|
|
146
158
|
* disable sheet-driven range selection until the caret reaches a fresh insertion slot
|
|
147
159
|
* (comma, open paren, operator, etc.) or the user starts an active range drag.
|
|
148
160
|
*/
|
|
149
|
-
export declare function suppressFormulaRangeSelectionForInitialEdit(ctx: Context): void;
|
|
161
|
+
export declare function suppressFormulaRangeSelectionForInitialEdit(ctx: Context, cell?: [number, number]): void;
|
|
150
162
|
export declare function isCaretAtValidFormulaRangeInsertionPoint(editor: HTMLElement | null): boolean;
|
|
151
163
|
export declare function markRangeSelectionDirty(ctx: Context): void;
|
|
152
164
|
/**
|
|
@@ -161,6 +173,25 @@ export declare function toggleFormulaAbsoluteReferenceAtCaret(ctx: Context, $cop
|
|
|
161
173
|
/** True while picking a range for a formula (sheet selection drives references). */
|
|
162
174
|
export declare function isLegacyFormulaRangeMode(ctx: Context): boolean;
|
|
163
175
|
export declare function israngeseleciton(ctx: Context, istooltip?: boolean): boolean;
|
|
176
|
+
/**
|
|
177
|
+
* Start (or end) an arrow-key session with the defaults: automatic reference
|
|
178
|
+
* selection on, no F2 override. Call when a session opens on a cell that does
|
|
179
|
+
* not hold a formula, and when one ends.
|
|
180
|
+
*/
|
|
181
|
+
export declare function resetFormulaArrowSession(ctx: Context): void;
|
|
182
|
+
/** The F2 override / auto flag in effect for the cell being edited right now. */
|
|
183
|
+
export declare function getFormulaArrowSession(ctx: Context): {
|
|
184
|
+
override: FormulaArrowOverride;
|
|
185
|
+
autoAllowed: boolean;
|
|
186
|
+
};
|
|
187
|
+
/** F2 pressed while editing: store the new override for this cell's session. */
|
|
188
|
+
export declare function setFormulaArrowOverride(ctx: Context, override: FormulaArrowOverride): void;
|
|
189
|
+
/**
|
|
190
|
+
* Single source of truth for what an arrow key does while editing.
|
|
191
|
+
* Thin ctx/DOM adapter over the pure `resolveArrowMode`.
|
|
192
|
+
*/
|
|
193
|
+
export declare function getFormulaArrowMode(ctx: Context): FormulaArrowMode;
|
|
194
|
+
/** True while arrows should drive a cell reference (READY or ACTIVE). */
|
|
164
195
|
export declare function isFormulaReferenceInputMode(ctx: Context): boolean;
|
|
165
196
|
export declare function maybeRecoverDirtyRangeSelection(ctx: Context): boolean;
|
|
166
197
|
export declare function functionStrChange(txt: string, type: string, rc: 'row' | 'col', orient: string | null, stindex: number, step: number): string;
|
|
@@ -4,7 +4,7 @@ export { default as clipboard } from './clipboard';
|
|
|
4
4
|
export { moveToEnd, getRangeRectsByCharacterOffset } from './cursor';
|
|
5
5
|
export { getDateBaseLocale, getCanonicalDateDisplayFormat, getCanonicalDateEditFormat, getDateEditFormatForCell, isUsDateBaseLocale, normalizeDateBaseLocale, shouldPreserveDateFormatForEdit, setDateBaseLocale, } from './date-base-locale';
|
|
6
6
|
export { update, is_date, valueShowEs, isTypedCurrencyDisplayFormat, isCurrencyLikeNumberFormat, buildFiatCurrencyFormat, quoteSsfLiteral, } from './format';
|
|
7
|
-
export { FormulaCache, groupValuesRefresh, setCaretPosition, getrangeseleciton, getFormulaEditorOwner, rangeHightlightselected, handleFormulaInput, israngeseleciton, createRangeHightlight, createFormulaRangeSelect, maybeRecoverDirtyRangeSelection, delFunctionGroup, functionHTMLGenerate, onFormulaRangeDragEnd, rangeDrag, rangeSetValue, remapFormulaReferencesByMap, getFormulaRangeIndexAtCaret, isCaretAtValidFormulaRangeInsertionPoint, isLegacyFormulaRangeMode, markRangeSelectionDirty, getFormulaRangeIndexForKeyboardSync, isFormulaReferenceInputMode, seedFormulaFuncSelectedRangeFromLastSelection, functionStrChange, setFormulaEditorOwner, getAllFunctionGroup, suppressFormulaRangeSelectionForInitialEdit, ensureFormulaRangeToSheet, shouldPreserveFormulaEditOnSheetSwitch, activateSheetForNavigation, returnToFormulaOriginSheet, } from './formula';
|
|
7
|
+
export { FormulaCache, groupValuesRefresh, setCaretPosition, getrangeseleciton, getFormulaEditorOwner, rangeHightlightselected, handleFormulaInput, israngeseleciton, createRangeHightlight, createFormulaRangeSelect, maybeRecoverDirtyRangeSelection, delFunctionGroup, functionHTMLGenerate, onFormulaRangeDragEnd, rangeDrag, rangeSetValue, remapFormulaReferencesByMap, getFormulaRangeIndexAtCaret, isCaretAtValidFormulaRangeInsertionPoint, isLegacyFormulaRangeMode, markRangeSelectionDirty, getFormulaRangeIndexForKeyboardSync, isFormulaReferenceInputMode, seedFormulaFuncSelectedRangeFromLastSelection, functionStrChange, setFormulaEditorOwner, getAllFunctionGroup, suppressFormulaRangeSelectionForInitialEdit, resetFormulaArrowSession, ensureFormulaRangeToSheet, shouldPreserveFormulaEditOnSheetSwitch, activateSheetForNavigation, returnToFormulaOriginSheet, } from './formula';
|
|
8
8
|
export { FORMULA_ASYNC_CHUNK_SIZE, FORMULA_ASYNC_EVAL_THRESHOLD, FORMULA_WORKER_CHUNK_SIZE, FORMULA_WORKER_THRESHOLD, isFormulaEvalPending, } from './formula-async-eval';
|
|
9
9
|
export type { FormulaAsyncEvalJob } from './formula-async-eval';
|
|
10
10
|
export { initFreeze } from './freeze';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as BZ from "yjs";
|
|
2
|
-
import { i as Yl, a as hl, s as eZ, r as ul, y as Il, b as pl, m as Rl } from "./index-
|
|
3
|
-
import { g as sl } from "./executeStringFunction-
|
|
2
|
+
import { i as Yl, a as hl, s as eZ, r as ul, y as Il, b as pl, m as Rl } from "./index-DvpQioe4.js";
|
|
3
|
+
import { g as sl } from "./executeStringFunction-B3Tw7e1U.js";
|
|
4
4
|
import { Workbook as al } from "exceljs";
|
|
5
5
|
import Kl from "luckyexcel";
|
|
6
|
-
import { e as Jl, b as xl, n as Ml } from "./xlsx-hyperlink-inline-
|
|
7
|
-
import { parseDefinedNamesFromXlsxBuffer as Sl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-
|
|
6
|
+
import { e as Jl, b as xl, n as Ml } from "./xlsx-hyperlink-inline-DaxgypSu.js";
|
|
7
|
+
import { parseDefinedNamesFromXlsxBuffer as Sl, excelEntriesToDefinedNames as OZ } from "./xlsx-defined-names-776Vg9GT.js";
|
|
8
8
|
import { toast as fZ } from "@fileverse/ui";
|
|
9
9
|
var Zl = { exports: {} };
|
|
10
10
|
(function(m) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as w } from "./executeStringFunction-
|
|
2
|
-
import { J as x } from "./xlsx-hyperlink-inline-
|
|
1
|
+
import { i as w } from "./executeStringFunction-B3Tw7e1U.js";
|
|
2
|
+
import { J as x } from "./xlsx-hyperlink-inline-DaxgypSu.js";
|
|
3
3
|
function g(o) {
|
|
4
4
|
return o.startsWith("_xlnm.");
|
|
5
5
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { utils as S, write as nt } from "xlsx-js-style";
|
|
2
2
|
import { Workbook as pt } from "exceljs";
|
|
3
3
|
import { toast as rt } from "@fileverse/ui";
|
|
4
|
-
import { J as dt, c as X, g as ht, a as mt } from "./xlsx-hyperlink-inline-
|
|
5
|
-
import { b as gt } from "./executeStringFunction-
|
|
6
|
-
import { e as bt } from "./index-
|
|
4
|
+
import { J as dt, c as X, g as ht, a as mt } from "./xlsx-hyperlink-inline-DaxgypSu.js";
|
|
5
|
+
import { b as gt } from "./executeStringFunction-B3Tw7e1U.js";
|
|
6
|
+
import { e as bt } from "./index-DvpQioe4.js";
|
|
7
7
|
const xt = {
|
|
8
8
|
1: "thin",
|
|
9
9
|
2: "hair",
|
|
@@ -854,7 +854,7 @@ const Z = (t) => {
|
|
|
854
854
|
O
|
|
855
855
|
);
|
|
856
856
|
});
|
|
857
|
-
const { applyDefinedNamesToExcelWorkbook: ct } = await import("./xlsx-defined-names-
|
|
857
|
+
const { applyDefinedNamesToExcelWorkbook: ct } = await import("./xlsx-defined-names-776Vg9GT.js");
|
|
858
858
|
ct(
|
|
859
859
|
B,
|
|
860
860
|
(k = (C = (s = t.current).getWorkbookContext) == null ? void 0 : C.call(s)) == null ? void 0 : k.definedNames,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as Rt, c as yt } from "./executeStringFunction-
|
|
2
|
-
import { c as wt } from "./index-
|
|
1
|
+
import { g as Rt, c as yt } from "./executeStringFunction-B3Tw7e1U.js";
|
|
2
|
+
import { c as wt } from "./index-DvpQioe4.js";
|
|
3
3
|
function jt(J, nt) {
|
|
4
4
|
const g = J.getImages();
|
|
5
5
|
if (!g.length) return [];
|