@fileverse-dev/dsheet 2.0.7 → 2.0.8-a
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.es.js +7903 -7790
- package/dist/sheet-engine/core/index.d.ts +1 -1
- package/dist/sheet-engine/core/modules/index.d.ts +3 -3
- package/dist/sheet-engine/core/modules/merge.d.ts +2 -0
- package/dist/sheet-engine/core/modules/selection.d.ts +7 -2
- package/dist/sheet-engine/core/modules/toolbar.d.ts +3 -2
- package/dist/sheet-engine/core/types.d.ts +2 -0
- package/package.json +2 -2
|
@@ -7,7 +7,7 @@ export { defaultSettings } from './settings';
|
|
|
7
7
|
export type { Settings, Hooks } from './settings';
|
|
8
8
|
export { handleCopy, handleGlobalKeyDown, handlePaste, handlePasteByClick, fixPositionOnFrozenCells, handleCellAreaMouseDown, handleCellAreaDoubleClick, handleContextMenu, mouseRender, handleOverlayMouseMove, handleOverlayMouseUp, handleRowHeaderMouseDown, handleColumnHeaderMouseDown, handleColSizeHandleMouseDown, handleColSizeHandleDoubleClick, handleRowSizeHandleMouseDown, handleColFreezeHandleMouseDown, handleRowFreezeHandleMouseDown, } from './events';
|
|
9
9
|
export * from './locale';
|
|
10
|
-
export { getBorderInfoComputeRange, getBorderInfoCompute, normalizedCellAttr, normalizedAttr, getCellValue, setCellValue, getRealCellValue, mergeBorder, cancelNormalSelected, updateCell, getRangetxt, getRangeByTxt, getInlineStringHTML, applyLinkToSelection, getHyperlinksFromInlineSegments, getUniformLinkFromWindowSelectionInEditor, getHyperlinkAtCaretInContentEditable, getStyleByCell, clearSelectedCellFormat, clearRowsCellsFormat, clearColumnsCellsFormat, clipboard, moveToEnd, getRangeRectsByCharacterOffset, update, is_date, valueShowEs, FormulaCache, groupValuesRefresh, execFunctionGroup, setCaretPosition, getrangeseleciton, getFormulaEditorOwner, rangeHightlightselected, handleFormulaInput, israngeseleciton, createRangeHightlight, maybeRecoverDirtyRangeSelection, getFormulaRangeIndexAtCaret, isCaretAtValidFormulaRangeInsertionPoint, isLegacyFormulaRangeMode, markRangeSelectionDirty, setFormulaEditorOwner, functionHTMLGenerate, suppressFormulaRangeSelectionForInitialEdit, rangeSetValue, getFormulaRangeIndexForKeyboardSync, createFormulaRangeSelect, isFormulaReferenceInputMode, seedFormulaFuncSelectedRangeFromLastSelection, initFreeze, isInlineStringCell, getInlineStringNoStyle, rowLocation, rowLocationByIndex, colLocation, colLocationByIndex, insertRowCol, deleteRowCol, hideSelected, showSelected, isShowHidenCR, scrollToHighlightCell, selectTitlesMap, selectTitlesRange, normalizeSelection, syncPrimaryCellActiveFromSelection, 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, handleSort, handleFreeze, handleTextSize, handleSum, handleLink, captureLinkEditorOpenSnapshot, toolbarItemClickHandler, toolbarItemSelectedFunc, handleScreenShot, insertImage, showImgChooser, drawArrow, setEditingComment, removeEditingComment, newComment, editComment, deleteComment, showComments, showHideComment, showHideAllComments, onCommentBoxMoveStart, removeActiveImage, cancelActiveImgItem, onImageMoveStart, onImageResizeStart, createDropCellRange, sortSelection, searchAll, searchNext, replace, replaceAll, 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, createFilter, getFilterColumnValues, getFilterColumnColors, orderbydatafiler, saveFilter, onCellsMoveStart, cfSplitRange, updateMoreCell, getRegStr, getDataArr, applyLocation, getOptionValue, getSelectRange, getDropdownList, setDropdownValue, confirmMessage, setConditionRules, handleOverlayTouchStart, handleOverlayTouchEnd, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, handleKeydownForZoom, jfrefreshgrid, sanitizeDuneUrl, insertDuneChart, onIframeMoveStart, onIframeResizeStart, onIframeMove, onIframeMoveEnd, onIframeResize, onIframeResizeEnd, setCellError, clearCellError, isdatatypemulti, diff, isdatetime, isRealNull, isRealNum, isNumericCellType, iscelldata, getcellrange, cancelFunctionrangeSelected, seletedHighlistByindex, spillSortResult, execfunction, insertUpdateFunctionGroup, remapFormulaReferencesByMap, checkCF, getComputeMap, cancelPaintModel, hideCRCount, getdatabyselection, } from './modules';
|
|
10
|
+
export { getBorderInfoComputeRange, getBorderInfoCompute, normalizedCellAttr, normalizedAttr, getCellValue, setCellValue, getRealCellValue, mergeBorder, cancelNormalSelected, updateCell, getRangetxt, getRangeByTxt, getInlineStringHTML, applyLinkToSelection, getHyperlinksFromInlineSegments, getUniformLinkFromWindowSelectionInEditor, getHyperlinkAtCaretInContentEditable, getStyleByCell, clearSelectedCellFormat, clearRowsCellsFormat, clearColumnsCellsFormat, clipboard, moveToEnd, getRangeRectsByCharacterOffset, update, is_date, valueShowEs, FormulaCache, groupValuesRefresh, execFunctionGroup, setCaretPosition, getrangeseleciton, getFormulaEditorOwner, rangeHightlightselected, handleFormulaInput, israngeseleciton, createRangeHightlight, maybeRecoverDirtyRangeSelection, getFormulaRangeIndexAtCaret, isCaretAtValidFormulaRangeInsertionPoint, isLegacyFormulaRangeMode, markRangeSelectionDirty, setFormulaEditorOwner, functionHTMLGenerate, suppressFormulaRangeSelectionForInitialEdit, rangeSetValue, getFormulaRangeIndexForKeyboardSync, createFormulaRangeSelect, isFormulaReferenceInputMode, seedFormulaFuncSelectedRangeFromLastSelection, initFreeze, isInlineStringCell, getInlineStringNoStyle, rowLocation, rowLocationByIndex, colLocation, colLocationByIndex, insertRowCol, deleteRowCol, hideSelected, showSelected, isShowHidenCR, scrollToHighlightCell, selectTitlesMap, selectTitlesRange, 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, handleFreeze, handleTextSize, handleSum, handleLink, captureLinkEditorOpenSnapshot, isHyperlinkCreationBlocked, toolbarItemClickHandler, toolbarItemSelectedFunc, handleScreenShot, insertImage, showImgChooser, drawArrow, setEditingComment, removeEditingComment, newComment, editComment, deleteComment, showComments, showHideComment, showHideAllComments, onCommentBoxMoveStart, removeActiveImage, cancelActiveImgItem, onImageMoveStart, onImageResizeStart, createDropCellRange, sortSelection, searchAll, searchNext, replace, replaceAll, 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, createFilter, getFilterColumnValues, getFilterColumnColors, orderbydatafiler, saveFilter, onCellsMoveStart, cfSplitRange, updateMoreCell, getRegStr, getDataArr, applyLocation, getOptionValue, getSelectRange, getDropdownList, setDropdownValue, confirmMessage, setConditionRules, handleOverlayTouchStart, handleOverlayTouchEnd, MAX_ZOOM_RATIO, MIN_ZOOM_RATIO, handleKeydownForZoom, jfrefreshgrid, sanitizeDuneUrl, insertDuneChart, onIframeMoveStart, onIframeResizeStart, onIframeMove, onIframeMoveEnd, onIframeResize, onIframeResizeEnd, setCellError, clearCellError, isdatatypemulti, diff, isdatetime, isRealNull, isRealNum, isNumericCellType, iscelldata, getcellrange, cancelFunctionrangeSelected, seletedHighlistByindex, spillSortResult, execfunction, insertUpdateFunctionGroup, remapFormulaReferencesByMap, checkCF, getComputeMap, cancelPaintModel, hideCRCount, getdatabyselection, } from './modules';
|
|
11
11
|
export type { FilterDate, FilterValue, FilterColor } from './modules';
|
|
12
12
|
export { getFreezeState, toggleFreeze, indexToColumnChar, escapeScriptTag, escapeHTMLTag, getSheetIndex, replaceHtml, isAllowEdit, isAllowEditReadOnly, filterPatch, patchToOp, opToPatch, inverseRowColOptions, } from './utils';
|
|
13
13
|
export type { PatchOptions, ChangedSheet } from './utils';
|
|
@@ -8,14 +8,14 @@ export { initFreeze } from './freeze';
|
|
|
8
8
|
export { isInlineStringCell, getInlineStringNoStyle, applyLinkToSelection, getHyperlinksFromInlineSegments, getUniformLinkFromWindowSelectionInEditor, getHyperlinkAtCaretInContentEditable, } from './inline-string';
|
|
9
9
|
export { rowLocation, rowLocationByIndex, colLocation, colLocationByIndex, } from './location';
|
|
10
10
|
export { insertRowCol, deleteRowCol, hideSelected, showSelected, isShowHidenCR, hideCRCount, } from './rowcol';
|
|
11
|
-
export { scrollToHighlightCell, seletedHighlistByindex, selectTitlesMap, selectTitlesRange, normalizeSelection, syncPrimaryCellActiveFromSelection, setPrimaryCellActive, advancePrimaryCellInLastMultiSelection, snapSheetSelectionFocusToCellPreserveMultiRange, moveHighlightCell, deleteSelectedCellText, selectAll, fixRowStyleOverflowInFreeze, fixColumnStyleOverflowInFreeze, calcSelectionInfo, rangeValueToHtml, } from './selection';
|
|
11
|
+
export { scrollToHighlightCell, seletedHighlistByindex, selectTitlesMap, selectTitlesRange, normalizeSelection, syncPrimaryCellActiveFromSelection, selectionIsExactlyOneMergeBlock, setPrimaryCellActive, advancePrimaryCellInLastMultiSelection, snapSheetSelectionFocusToCellPreserveMultiRange, moveHighlightCell, deleteSelectedCellText, selectAll, fixRowStyleOverflowInFreeze, fixColumnStyleOverflowInFreeze, calcSelectionInfo, rangeValueToHtml, } from './selection';
|
|
12
12
|
export { addSheet, deleteSheet, editSheetName, changeSheet, updateSheet, } from './sheet';
|
|
13
|
-
export { updateFormat, autoSelectionFormula, handleBold, handleItalic, handleStrikeThrough, handleUnderline, handleHorizontalAlign, handleVerticalAlign, handleTextColor, handleTextBackground, handleBorder, handleMerge, handleSort, handleFreeze, handleTextSize, handleSum, handleLink, captureLinkEditorOpenSnapshot, toolbarItemClickHandler, toolbarItemSelectedFunc, updateFormatCell, cancelPaintModel, } from './toolbar';
|
|
13
|
+
export { updateFormat, autoSelectionFormula, handleBold, handleItalic, handleStrikeThrough, handleUnderline, handleHorizontalAlign, handleVerticalAlign, handleTextColor, handleTextBackground, handleBorder, handleMerge, handleSort, handleFreeze, handleTextSize, handleSum, handleLink, captureLinkEditorOpenSnapshot, isHyperlinkCreationBlocked, toolbarItemClickHandler, toolbarItemSelectedFunc, updateFormatCell, cancelPaintModel, } from './toolbar';
|
|
14
14
|
export { handleScreenShot } from './screenshot';
|
|
15
15
|
export { drawArrow, setEditingComment, removeEditingComment, newComment, editComment, deleteComment, showComments, showHideComment, showHideAllComments, onCommentBoxMoveStart, onCommentBoxMove, onCommentBoxMoveEnd, onCommentBoxResize, onCommentBoxResizeEnd, removeOverShowComment, } from './comment';
|
|
16
16
|
export { showImgChooser, insertImage, removeActiveImage, cancelActiveImgItem, onImageMoveStart, onImageResizeStart, onImageMove, onImageMoveEnd, onImageResize, onImageResizeEnd, } from './image';
|
|
17
17
|
export { createDropCellRange, dropCellCache, getTypeItemHide, updateDropCell, } from './dropCell';
|
|
18
|
-
export { mergeCells } from './merge';
|
|
18
|
+
export { mergeCells, mergeSelectionHasValues } from './merge';
|
|
19
19
|
export { sortSelection, spillSortResult } from './sort';
|
|
20
20
|
export { searchAll, searchNext, replace, replaceAll, getSearchIndexArr, getSearchIndexArrAsync, getFindRangeOnCurrentSheet, getQuickSearchIndexArr, getQuickSearchHiddenConfig, expandCellRectForMerge, shouldQuickSearchUseAsync, runQuickSearchIndexArrAsync, QUICK_SEARCH_ASYNC_ROW_THRESHOLD, parseRangeText, } from './searchReplace';
|
|
21
21
|
export type { CheckModes, HyperlinkMap, FindSearchScope, SearchHiddenConfig, SearchNextResult, ReplaceAllResult, } from './searchReplace';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Context } from '../context';
|
|
2
2
|
import { Range } from '../types';
|
|
3
3
|
|
|
4
|
+
/** True if any cell in the current selection has content that merge would consider. */
|
|
5
|
+
export declare function mergeSelectionHasValues(ctx: Context): boolean;
|
|
4
6
|
export declare function mergeCells(ctx: Context, sheetId: string, ranges: Range, type: string): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Sheet as SheetType, Freezen, Range } from '../types';
|
|
1
|
+
import { Sheet as SheetType, Freezen, Range, Selection } from '../types';
|
|
2
2
|
import { Context } from '../context';
|
|
3
3
|
|
|
4
4
|
export declare const selectionCache: {
|
|
@@ -12,6 +12,11 @@ export declare function seletedHighlistByindex(ctx: Context, r1: number, r2: num
|
|
|
12
12
|
top: number;
|
|
13
13
|
height: number;
|
|
14
14
|
} | null;
|
|
15
|
+
/**
|
|
16
|
+
* True when the selection rectangle is exactly one merged block (multi grid cells, one
|
|
17
|
+
* logical cell). Literal 1×1 is false here — callers use row/column span for that.
|
|
18
|
+
*/
|
|
19
|
+
export declare function selectionIsExactlyOneMergeBlock(ctx: Context, selection: Selection): boolean;
|
|
15
20
|
/**
|
|
16
21
|
* Updates `ctx.primaryCellActive` from a selection list (multi-cell → active focus cell;
|
|
17
22
|
* else null). Pass `selection` explicitly when normalizing a **new** array that is not
|
|
@@ -38,7 +43,7 @@ export declare function setPrimaryCellActive(ctx: Context, r: number, c: number)
|
|
|
38
43
|
* that range so Enter-primary navigation + typing do not collapse the yellow box.
|
|
39
44
|
*/
|
|
40
45
|
export declare function snapSheetSelectionFocusToCellPreserveMultiRange(ctx: Context, r: number, c: number): void;
|
|
41
|
-
export declare function normalizeSelection(ctx: Context, selection: SheetType["luckysheet_select_save"]):
|
|
46
|
+
export declare function normalizeSelection(ctx: Context, selection: SheetType["luckysheet_select_save"]): Selection[] | undefined;
|
|
42
47
|
export declare function selectTitlesMap(rangeMap: Record<string, number>, range1: number, range2: number): Record<string, number>;
|
|
43
48
|
export declare function selectTitlesRange(map: Record<string, number>): number[][];
|
|
44
49
|
export declare function pasteHandlerOfPaintModel(ctx: Context, copyRange: Context["luckysheet_copy_save"]): void;
|
|
@@ -28,9 +28,10 @@ export declare function handleFreeze(ctx: Context, type: string): void;
|
|
|
28
28
|
export declare function handleTextSize(ctx: Context, cellInput: HTMLDivElement, size: number, canvas?: CanvasRenderingContext2D): void;
|
|
29
29
|
export declare function handleSum(ctx: Context, cellInput: HTMLDivElement, fxInput: HTMLDivElement | null | undefined, cache?: GlobalCache): void;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
31
|
+
* Hyperlink insert is not supported for formula cells or when the user is entering a formula
|
|
32
|
+
* (cell / formula bar content starts with `=`).
|
|
33
33
|
*/
|
|
34
|
+
export declare function isHyperlinkCreationBlocked(ctx: Context, cellInput: HTMLDivElement | null | undefined): boolean;
|
|
34
35
|
export declare function captureLinkEditorOpenSnapshot(ctx: Context, cellInput: HTMLDivElement | null | undefined, cache: GlobalCache | undefined): void;
|
|
35
36
|
export declare function handleLink(ctx: Context, cellInput: HTMLDivElement | null | undefined, cache?: GlobalCache): void;
|
|
36
37
|
export declare function toolbarItemClickHandler(name: string): ToolbarItemClickHandler;
|
|
@@ -426,6 +426,8 @@ export type GlobalCache = {
|
|
|
426
426
|
} | null;
|
|
427
427
|
selectedPlain: string;
|
|
428
428
|
};
|
|
429
|
+
/** Injected by React: show modal when link insert is blocked (formula / = in editor). */
|
|
430
|
+
onHyperlinkInsertBlocked?: () => void;
|
|
429
431
|
dragCellStartPos?: {
|
|
430
432
|
x: number;
|
|
431
433
|
y: number;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@fileverse-dev/dsheet",
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "DSheet",
|
|
5
|
-
"version": "2.0.
|
|
5
|
+
"version": "2.0.8-a",
|
|
6
6
|
"main": "dist/index.es.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
8
8
|
"exports": {
|
|
@@ -91,4 +91,4 @@
|
|
|
91
91
|
"typescript": "^5.2.2",
|
|
92
92
|
"vite": "^5.0.0"
|
|
93
93
|
}
|
|
94
|
-
}
|
|
94
|
+
}
|