@fileverse-dev/dsheet 2.0.2-hyperlink → 2.0.2-insert
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/editor/utils/formula-ui-sync.d.ts +1 -6
- package/dist/index.es.js +19288 -19936
- package/dist/sheet-engine/core/api/common.d.ts +4 -1
- package/dist/sheet-engine/core/index.d.ts +2 -2
- package/dist/sheet-engine/core/modules/cursor.d.ts +0 -5
- package/dist/sheet-engine/core/modules/hyperlink.d.ts +4 -32
- package/dist/sheet-engine/core/modules/index.d.ts +5 -5
- package/dist/sheet-engine/core/modules/inline-string.d.ts +1 -20
- package/dist/sheet-engine/core/modules/toolbar.d.ts +1 -6
- package/dist/sheet-engine/core/types.d.ts +4 -30
- package/dist/sheet-engine/react/components/Toolbar/Button.d.ts +0 -1
- package/dist/sheet-engine/react/components/Workbook/api.d.ts +4 -1
- package/dist/sheet-engine/react/components/Workbook/index.d.ts +4 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -56,7 +56,10 @@ export declare function getSheetWithLatestCelldata(ctx: Context, options?: Commo
|
|
|
56
56
|
luckysheet_alternateformat_save?: any[];
|
|
57
57
|
dataVerification?: any;
|
|
58
58
|
conditionRules?: import('../types').ConditionRulesProps;
|
|
59
|
-
hyperlink?: Record<string,
|
|
59
|
+
hyperlink?: Record<string, {
|
|
60
|
+
linkType: string;
|
|
61
|
+
linkAddress: string;
|
|
62
|
+
}>;
|
|
60
63
|
dynamicArray_compute?: any;
|
|
61
64
|
dynamicArray?: any[];
|
|
62
65
|
frozen?: {
|
|
@@ -7,9 +7,9 @@ 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, getStyleByCell, clearSelectedCellFormat, clearRowsCellsFormat, clearColumnsCellsFormat, clipboard, moveToEnd, getRangeRectsByCharacterOffset, update, is_date, valueShowEs, FormulaCache, groupValuesRefresh, setCaretPosition, getrangeseleciton, getFormulaEditorOwner, rangeHightlightselected, handleFormulaInput, israngeseleciton, createRangeHightlight, maybeRecoverDirtyRangeSelection, getFormulaRangeIndexAtCaret, isCaretAtValidFormulaRangeInsertionPoint, isLegacyFormulaRangeMode, markRangeSelectionDirty, setFormulaEditorOwner, functionHTMLGenerate, suppressFormulaRangeSelectionForInitialEdit, rangeSetValue, getFormulaRangeIndexForKeyboardSync, createFormulaRangeSelect, isFormulaReferenceInputMode, seedFormulaFuncSelectedRangeFromLastSelection, initFreeze, isInlineStringCell, getInlineStringNoStyle,
|
|
10
|
+
export { getBorderInfoComputeRange, getBorderInfoCompute, normalizedCellAttr, normalizedAttr, getCellValue, setCellValue, getRealCellValue, mergeBorder, cancelNormalSelected, updateCell, getRangetxt, getRangeByTxt, getInlineStringHTML, 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, 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, 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';
|
|
14
|
-
export type { Op, Cell, CellWithRowAndCol, CellMatrix,
|
|
14
|
+
export type { Op, Cell, CellWithRowAndCol, CellMatrix, Selection, Presence, Sheet, GlobalCache, SingleRange, Range, SearchResult, LinkCardProps, LiveQueryData, Freezen, } from './types';
|
|
15
15
|
export { cellFadeAnimator, markCellChanged } from './animate';
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
export declare function moveToEnd(obj: HTMLDivElement): void;
|
|
2
2
|
export declare function selectTextContent(ele: HTMLElement): void;
|
|
3
3
|
export declare function selectTextContentCross(sEle: HTMLElement, eEle: HTMLElement): void;
|
|
4
|
-
/**
|
|
5
|
-
* Flat character offset (normalized newlines) of the selection **focus** within `element`.
|
|
6
|
-
* Use for insert position when opening link UI so appended text goes where the caret was.
|
|
7
|
-
*/
|
|
8
|
-
export declare function getFocusCharacterOffset(element: HTMLElement): number | null;
|
|
9
4
|
/** Returns character offsets of the current selection within the element, or null if collapsed/outside. */
|
|
10
5
|
export declare function getSelectionCharacterOffsets(element: Node): {
|
|
11
6
|
start: number;
|
|
@@ -1,39 +1,19 @@
|
|
|
1
1
|
import { Context } from '../context';
|
|
2
|
-
import {
|
|
2
|
+
import { GlobalCache } from '../types';
|
|
3
3
|
|
|
4
4
|
export declare function getCellRowColumn(ctx: Context, e: MouseEvent, container: HTMLDivElement, scrollX: HTMLDivElement, scrollY: HTMLDivElement): {
|
|
5
5
|
r: number;
|
|
6
6
|
c: number;
|
|
7
7
|
} | undefined;
|
|
8
|
-
export declare function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export declare function getHyperlinkDisplayTextInCell(cell: Cell | null | undefined, link: HyperlinkEntry): string;
|
|
12
|
-
/** Plain-text [start, end) of consecutive inline segments that carry `target`. */
|
|
13
|
-
export declare function getInlineLinkPlainRange(cell: Cell | null | undefined, target: HyperlinkEntry): {
|
|
14
|
-
start: number;
|
|
15
|
-
end: number;
|
|
8
|
+
export declare function getCellHyperlink(ctx: Context, r: number, c: number): {
|
|
9
|
+
linkType: string;
|
|
10
|
+
linkAddress: string;
|
|
16
11
|
} | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* If every plain character in [start, end) lies in inline segments that share the same
|
|
19
|
-
* `link`, returns that link; otherwise undefined (mixed/unlinked text in range).
|
|
20
|
-
*/
|
|
21
|
-
export declare function getUniformLinkCoveringPlainRange(cell: Cell | null | undefined, start: number, end: number): HyperlinkEntry | undefined;
|
|
22
|
-
/** Plain caret offset `pos` lies strictly inside a linked segment (before that segment's end). */
|
|
23
|
-
export declare function getUniformLinkAtPlainOffset(cell: Cell | null | undefined, pos: number): HyperlinkEntry | undefined;
|
|
24
|
-
/** After changing hyperlinks on (r,c), update or close `ctx.linkCard` if it matches. */
|
|
25
|
-
export declare function syncLinkCardAfterHyperlinkChange(ctx: Context, r: number, c: number): void;
|
|
26
12
|
export declare function saveHyperlink(ctx: Context, r: number, c: number, linkText: string, linkType: string, linkAddress: string, options?: {
|
|
27
13
|
applyToSelection?: boolean;
|
|
28
14
|
cellInput?: HTMLDivElement | null;
|
|
29
|
-
/** When true, apply range from ctx.linkCard using cell data only (no active editor). */
|
|
30
|
-
applySelectionFromModel?: boolean;
|
|
31
15
|
}): void;
|
|
32
16
|
export declare function removeHyperlink(ctx: Context, r: number, c: number): void;
|
|
33
|
-
/** Remove one distinct hyperlink (inline segment link or sheet map entry). */
|
|
34
|
-
export declare function removeHyperlinkForLink(ctx: Context, r: number, c: number, target: HyperlinkEntry): void;
|
|
35
|
-
/** Update URL/type (and display text when a single segment carries this link). */
|
|
36
|
-
export declare function updateHyperlinkForLink(ctx: Context, r: number, c: number, target: HyperlinkEntry, linkText: string, linkType: string, linkAddress: string): void;
|
|
37
17
|
export declare function showLinkCard(ctx: Context, r: number, c: number, options?: {
|
|
38
18
|
applyToSelection?: boolean;
|
|
39
19
|
originText?: string;
|
|
@@ -41,14 +21,6 @@ export declare function showLinkCard(ctx: Context, r: number, c: number, options
|
|
|
41
21
|
start: number;
|
|
42
22
|
end: number;
|
|
43
23
|
};
|
|
44
|
-
linkInsertOffset?: number;
|
|
45
|
-
/** URL/type defaults when inserting but selection (or cell) already maps to one link */
|
|
46
|
-
prefillLink?: HyperlinkEntry;
|
|
47
|
-
/**
|
|
48
|
-
* In-cell edit: show view-only card for this hyperlink (caret / selection inside that
|
|
49
|
-
* linked run in the contenteditable). Suppresses whole-cell hover list.
|
|
50
|
-
*/
|
|
51
|
-
caretViewLink?: HyperlinkEntry;
|
|
52
24
|
}, isEditing?: boolean, isMouseDown?: boolean): void;
|
|
53
25
|
export declare function goToLink(ctx: Context, r: number, c: number, linkType: string, linkAddress: string, scrollbarX: HTMLDivElement, scrollbarY: HTMLDivElement): void;
|
|
54
26
|
export declare function isLinkValid(ctx: Context, linkType: string, linkAddress: string): {
|
|
@@ -3,14 +3,14 @@ export { normalizedCellAttr, normalizedAttr, getCellValue, setCellValue, getReal
|
|
|
3
3
|
export { default as clipboard } from './clipboard';
|
|
4
4
|
export { moveToEnd, getRangeRectsByCharacterOffset } from './cursor';
|
|
5
5
|
export { update, is_date, valueShowEs } from './format';
|
|
6
|
-
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, } from './formula';
|
|
6
|
+
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, execFunctionGroup, suppressFormulaRangeSelectionForInitialEdit, } from './formula';
|
|
7
7
|
export { initFreeze } from './freeze';
|
|
8
|
-
export { isInlineStringCell, getInlineStringNoStyle
|
|
8
|
+
export { isInlineStringCell, getInlineStringNoStyle } from './inline-string';
|
|
9
9
|
export { rowLocation, rowLocationByIndex, colLocation, colLocationByIndex, } from './location';
|
|
10
10
|
export { insertRowCol, deleteRowCol, hideSelected, showSelected, isShowHidenCR, hideCRCount, } from './rowcol';
|
|
11
11
|
export { scrollToHighlightCell, seletedHighlistByindex, selectTitlesMap, selectTitlesRange, normalizeSelection, syncPrimaryCellActiveFromSelection, 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,
|
|
13
|
+
export { updateFormat, autoSelectionFormula, handleBold, handleItalic, handleStrikeThrough, handleUnderline, handleHorizontalAlign, handleVerticalAlign, handleTextColor, handleTextBackground, handleBorder, handleMerge, handleSort, handleFreeze, handleTextSize, handleSum, handleLink, 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';
|
|
@@ -18,7 +18,7 @@ export { createDropCellRange, dropCellCache, getTypeItemHide, updateDropCell, }
|
|
|
18
18
|
export { mergeCells } from './merge';
|
|
19
19
|
export { sortSelection, spillSortResult } from './sort';
|
|
20
20
|
export { searchAll, searchNext, replace, replaceAll } from './searchReplace';
|
|
21
|
-
export { getCellRowColumn, getCellHyperlink,
|
|
21
|
+
export { getCellRowColumn, getCellHyperlink, saveHyperlink, removeHyperlink, showLinkCard, goToLink, isLinkValid, } from './hyperlink';
|
|
22
22
|
export { createFilterOptions, clearFilter, createFilter, getFilterColumnValues, getFilterColumnColors, orderbydatafiler, saveFilter, } from './filter';
|
|
23
23
|
export type { FilterDate, FilterValue, FilterColor } from './filter';
|
|
24
24
|
export { onCellsMoveStart, onCellsMove, onCellsMoveEnd } from './moveCells';
|
|
@@ -35,6 +35,6 @@ export { sanitizeDuneUrl, insertDuneChart, onIframeMoveStart, onIframeResizeStar
|
|
|
35
35
|
export { setCellError, clearCellError, overShowError, } from './error-state-helpers';
|
|
36
36
|
export { checkCellIsLocked } from './protection';
|
|
37
37
|
export { isdatatypemulti, diff, isdatetime, isRealNull, isRealNum, isNumericCellType, } from './validation';
|
|
38
|
-
export { iscelldata, getcellrange, execfunction,
|
|
38
|
+
export { iscelldata, getcellrange, execfunction, insertUpdateFunctionGroup, functionCopy, } from './formula';
|
|
39
39
|
export { checkCF, getComputeMap } from './ConditionFormat';
|
|
40
40
|
export { getdatabyselection, getQKBorder } from './cell';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Context } from '../context';
|
|
2
|
-
import { Cell, CellMatrix, CellStyle
|
|
2
|
+
import { Cell, CellMatrix, CellStyle } from '../types';
|
|
3
3
|
|
|
4
4
|
export declare const attrToCssName: {
|
|
5
5
|
bl: string;
|
|
@@ -36,14 +36,6 @@ export type InlineSegmentLink = {
|
|
|
36
36
|
linkType: string;
|
|
37
37
|
linkAddress: string;
|
|
38
38
|
};
|
|
39
|
-
export declare function getHyperlinksFromInlineSegments(cell: Cell | null | undefined): InlineSegmentLink[];
|
|
40
|
-
/** Matches `getLinkStyleCssText` / apply-hyperlink blue foreground in the editor. */
|
|
41
|
-
export declare function isDefaultHyperlinkForeground(fc: string): boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Drop fc/un that hyperlink insertion adds to inline runs (link metadata is removed separately).
|
|
44
|
-
* Preserves user bold/italic/etc. on the same segment.
|
|
45
|
-
*/
|
|
46
|
-
export declare function stripInlineSegmentHyperlinkDecoration(seg: CellStyle): void;
|
|
47
39
|
export declare function convertSpanToShareString($dom: NodeListOf<HTMLSpanElement>, originCell: Cell): (CellStyle & {
|
|
48
40
|
v?: string;
|
|
49
41
|
link?: InlineSegmentLink;
|
|
@@ -52,14 +44,3 @@ export declare function updateInlineStringFormatOutside(cell: Cell, key: string,
|
|
|
52
44
|
export declare function updateInlineStringFormat(ctx: Context, attr: keyof Cell, value: any, cellInput: HTMLDivElement): void;
|
|
53
45
|
/** Applies link style (blue + underline) and data-link-* to the current selection in cellInput. Persisted on blur via convertSpanToShareString. */
|
|
54
46
|
export declare function applyLinkToSelection(cellInput: HTMLDivElement, linkType: string, linkAddress: string): void;
|
|
55
|
-
/**
|
|
56
|
-
* When the window selection is still inside the cell editor, read hyperlink from the
|
|
57
|
-
* linked span(s) at both range endpoints (same link required).
|
|
58
|
-
*/
|
|
59
|
-
export declare function getUniformLinkFromWindowSelectionInEditor(root: HTMLElement): HyperlinkEntry | undefined;
|
|
60
|
-
/**
|
|
61
|
-
* Caret or range inside `root`: returns the hyperlink on the collapsed caret, or the
|
|
62
|
-
* uniform link when a non-collapsed selection stays within one link (same as
|
|
63
|
-
* {@link getUniformLinkFromWindowSelectionInEditor}).
|
|
64
|
-
*/
|
|
65
|
-
export declare function getHyperlinkAtCaretInContentEditable(root: HTMLElement): HyperlinkEntry | undefined;
|
|
@@ -27,12 +27,7 @@ export declare function handleSort(ctx: Context, isAsc: boolean): void;
|
|
|
27
27
|
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
|
-
|
|
31
|
-
* Records caret and selection offsets for the active cell editor into `cache`.
|
|
32
|
-
* Call on toolbar link mousedown (before focus leaves the editor) and from selectionchange while editing.
|
|
33
|
-
*/
|
|
34
|
-
export declare function captureLinkEditorOpenSnapshot(ctx: Context, cellInput: HTMLDivElement | null | undefined, cache: GlobalCache | undefined): void;
|
|
35
|
-
export declare function handleLink(ctx: Context, cellInput: HTMLDivElement | null | undefined, cache?: GlobalCache): void;
|
|
30
|
+
export declare function handleLink(ctx: Context, cellInput: HTMLDivElement | null | undefined): void;
|
|
36
31
|
export declare function toolbarItemClickHandler(name: string): ToolbarItemClickHandler;
|
|
37
32
|
export declare function toolbarItemSelectedFunc(name: string): ToolbarItemSelectedFunc;
|
|
38
33
|
export {};
|
|
@@ -46,7 +46,6 @@ export type Cell = {
|
|
|
46
46
|
ct?: {
|
|
47
47
|
fa?: string;
|
|
48
48
|
t?: string;
|
|
49
|
-
tb?: string;
|
|
50
49
|
s?: any;
|
|
51
50
|
};
|
|
52
51
|
qp?: number;
|
|
@@ -79,10 +78,6 @@ export type CellWithRowAndCol = {
|
|
|
79
78
|
v: Cell | null;
|
|
80
79
|
};
|
|
81
80
|
export type CellMatrix = (Cell | null)[][];
|
|
82
|
-
export type HyperlinkEntry = {
|
|
83
|
-
linkType: string;
|
|
84
|
-
linkAddress: string;
|
|
85
|
-
};
|
|
86
81
|
export type Selection = {
|
|
87
82
|
left?: number;
|
|
88
83
|
width?: number;
|
|
@@ -225,7 +220,10 @@ export type Sheet = {
|
|
|
225
220
|
luckysheet_alternateformat_save?: any[];
|
|
226
221
|
dataVerification?: any;
|
|
227
222
|
conditionRules?: ConditionRulesProps;
|
|
228
|
-
hyperlink?: Record<string,
|
|
223
|
+
hyperlink?: Record<string, {
|
|
224
|
+
linkType: string;
|
|
225
|
+
linkAddress: string;
|
|
226
|
+
}>;
|
|
229
227
|
dynamicArray_compute?: any;
|
|
230
228
|
dynamicArray?: any[];
|
|
231
229
|
frozen?: {
|
|
@@ -266,10 +264,6 @@ export type LinkCardProps = {
|
|
|
266
264
|
originText: string;
|
|
267
265
|
originType: string;
|
|
268
266
|
originAddress: string;
|
|
269
|
-
/** Distinct links in this cell (rich text); view lists each with its own actions */
|
|
270
|
-
links?: HyperlinkEntry[];
|
|
271
|
-
/** When editing, index into `links` for multi-link cells (which URL is being edited) */
|
|
272
|
-
editingLinkIndex?: number | null;
|
|
273
267
|
position: {
|
|
274
268
|
cellLeft: number;
|
|
275
269
|
cellBottom: number;
|
|
@@ -283,11 +277,6 @@ export type LinkCardProps = {
|
|
|
283
277
|
start: number;
|
|
284
278
|
end: number;
|
|
285
279
|
};
|
|
286
|
-
/**
|
|
287
|
-
* Normalized flat offset where typed / appended link text should go (selection focus),
|
|
288
|
-
* especially when display text is edited and inserted. Falls back to selection end if unset.
|
|
289
|
-
*/
|
|
290
|
-
linkInsertOffset?: number;
|
|
291
280
|
};
|
|
292
281
|
export type RangeDialogProps = {
|
|
293
282
|
show: boolean;
|
|
@@ -409,21 +398,6 @@ export type GlobalCache = {
|
|
|
409
398
|
} | undefined;
|
|
410
399
|
};
|
|
411
400
|
};
|
|
412
|
-
/**
|
|
413
|
-
* Last caret/selection in the cell editor while editing, captured on selectionchange
|
|
414
|
-
* and on toolbar link mousedown so handleLink still knows insert offsets after focus moves.
|
|
415
|
-
*/
|
|
416
|
-
linkEditorOpenSnapshot?: {
|
|
417
|
-
sheetId: string;
|
|
418
|
-
r: number;
|
|
419
|
-
c: number;
|
|
420
|
-
focusOffset: number;
|
|
421
|
-
range: {
|
|
422
|
-
start: number;
|
|
423
|
-
end: number;
|
|
424
|
-
} | null;
|
|
425
|
-
selectedPlain: string;
|
|
426
|
-
};
|
|
427
401
|
dragCellStartPos?: {
|
|
428
402
|
x: number;
|
|
429
403
|
y: number;
|
|
@@ -4,7 +4,6 @@ type Props = {
|
|
|
4
4
|
tooltip: string;
|
|
5
5
|
iconId: string;
|
|
6
6
|
onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
7
|
-
onMouseDown?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
8
7
|
disabled?: boolean;
|
|
9
8
|
selected?: boolean;
|
|
10
9
|
children?: React.ReactNode;
|
|
@@ -107,7 +107,10 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
|
|
|
107
107
|
luckysheet_alternateformat_save?: any[];
|
|
108
108
|
dataVerification?: any;
|
|
109
109
|
conditionRules?: import('../../../core/types').ConditionRulesProps;
|
|
110
|
-
hyperlink?: Record<string,
|
|
110
|
+
hyperlink?: Record<string, {
|
|
111
|
+
linkType: string;
|
|
112
|
+
linkAddress: string;
|
|
113
|
+
}>;
|
|
111
114
|
dynamicArray_compute?: any;
|
|
112
115
|
dynamicArray?: any[];
|
|
113
116
|
frozen?: {
|
|
@@ -112,7 +112,10 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
|
|
|
112
112
|
luckysheet_alternateformat_save?: any[];
|
|
113
113
|
dataVerification?: any;
|
|
114
114
|
conditionRules?: import('../../../core/types').ConditionRulesProps;
|
|
115
|
-
hyperlink?: Record<string,
|
|
115
|
+
hyperlink?: Record<string, {
|
|
116
|
+
linkType: string;
|
|
117
|
+
linkAddress: string;
|
|
118
|
+
}>;
|
|
116
119
|
dynamicArray_compute?: any;
|
|
117
120
|
dynamicArray?: any[];
|
|
118
121
|
frozen?: {
|