@fileverse-dev/dsheet 3.0.3 → 4.0.1

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 CHANGED
@@ -1,5 +1,5 @@
1
- import { C as s, a as t, b as o, S as r, d as l, i as d, e as n, T as i, f as c, g as S, h, j as m, k as p, l as C, n as u, o as E, p as F, q as g, s as x, t as R, u as f, v as A, w as L, x as w, z as I, A as T, B as v, D, E as M } from "./index-T7U1EYEU.js";
2
- import { cm as k, cn as V, co as X, ct as z, bj as P, e as U, f as _, l as j, a as y, d2 as B, d3 as O, b2 as G, d4 as H, d5 as q, d9 as J, da as K, dc as N, D as Y, dr as Z, dR as Q, aX as W } from "./executeStringFunction-DVN2p-9G.js";
1
+ import { C as s, a as t, b as o, S as r, d as l, i as d, e as n, T as i, f as S, g as c, h, j as m, k as p, l as C, n as u, o as E, p as F, q as g, s as x, t as R, u as f, v as w, w as A, x as I, z as L, A as T, B as v, D as b, E as D } from "./index-qeHbZskm.js";
2
+ import { cr as k, cs as V, ct as y, cy as z, bo as P, e as U, f as X, l as _, a as B, d7 as O, d8 as j, b7 as G, d9 as H, da as q, de as J, df as K, dh as N, I as W, dw as Y, dW as Z, b0 as Q } from "./executeStringFunction-BQvE7aeV.js";
3
3
  import { FLVURL as ee } from "@fileverse-dev/formulajs";
4
4
  import { E as se, S as te } from "./constants-Cdz6oSCq.js";
5
5
  export {
@@ -14,28 +14,28 @@ export {
14
14
  te as SERVICES_API_KEY,
15
15
  n as SupportedChain,
16
16
  i as TEMPLATES,
17
- c as api,
17
+ S as api,
18
18
  k as clearColumnsCellsFormat,
19
- S as clearFilter,
19
+ c as clearFilter,
20
20
  V as clearRowsCellsFormat,
21
- X as clearSelectedCellFormat,
21
+ y as clearSelectedCellFormat,
22
22
  h as createFilter,
23
23
  z as deleteRowCol,
24
24
  P as deleteSelectedCellText,
25
25
  m as describeMatchedShortcut,
26
26
  U as executeStringFunction,
27
- _ as formulaResponseUiSync,
28
- j as getFlowdata,
27
+ X as formulaResponseUiSync,
28
+ _ as getFlowdata,
29
29
  p as getRemoveDuplicatesErrorMessage,
30
30
  C as getRemoveDuplicatesPreview,
31
- y as getSheetIndex,
31
+ B as getSheetIndex,
32
32
  u as handleCSVUpload,
33
33
  E as handleCopy,
34
34
  F as handleExportToCSV,
35
35
  g as handleExportToJSON,
36
36
  x as handleExportToXLSX,
37
- B as handleFreeze,
38
- O as handleHorizontalAlign,
37
+ O as handleFreeze,
38
+ j as handleHorizontalAlign,
39
39
  G as handleLink,
40
40
  H as handleMerge,
41
41
  R as handlePasteByClick,
@@ -44,16 +44,16 @@ export {
44
44
  K as handleVerticalAlign,
45
45
  f as importSpreadsheetFile,
46
46
  N as insertRowCol,
47
- A as isBrowserZoomShortcut,
48
- L as isFormulaListShortcut,
49
- w as isOpenShortcutsModalShortcut,
50
- Y as jfrefreshgrid,
51
- Z as loadLocale,
52
- I as removeActiveImage,
47
+ w as isBrowserZoomShortcut,
48
+ A as isFormulaListShortcut,
49
+ I as isOpenShortcutsModalShortcut,
50
+ W as jfrefreshgrid,
51
+ Y as loadLocale,
52
+ L as removeActiveImage,
53
53
  T as removeDuplicates,
54
54
  v as showImgChooser,
55
- Q as toolbarItemClickHandler,
56
- W as updateFormat,
57
- D as useEnsStatus,
58
- M as useXLSXImport
55
+ Z as toolbarItemClickHandler,
56
+ Q as updateFormat,
57
+ b as useEnsStatus,
58
+ D as useXLSXImport
59
59
  };
@@ -7,7 +7,7 @@ export { defaultSettings } from './settings';
7
7
  export type { Settings, Hooks, DateBaseLocale } 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, 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, 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, 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, checkCF, getComputeMap, 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, 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, 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, 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';
@@ -0,0 +1,8 @@
1
+ import { Image } from '../types';
2
+
3
+ export declare function getImageClipboard(): Image | null;
4
+ export declare function getImageCutSourceId(): string | null;
5
+ export declare function getImageCutSourceSheetId(): string | null;
6
+ export declare function setImageClipboard(img: Image | null, asCut?: boolean, sheetId?: string | null): void;
7
+ export declare function clearImageClipboard(): void;
8
+ export declare function clearImageCutFlag(): void;
@@ -1,6 +1,7 @@
1
1
  import { GlobalCache } from '../types';
2
2
  import { Context } from '../context';
3
3
 
4
+ export { clearImageClipboard, getImageClipboard, getImageCutSourceId, getImageCutSourceSheetId, } from './image-clipboard';
4
5
  type ImageProps = {
5
6
  defaultWidth: number;
6
7
  defaultHeight: number;
@@ -22,6 +23,17 @@ export declare function showImgChooser(): void;
22
23
  export declare function saveImage(ctx: Context): void;
23
24
  export declare function removeActiveImage(ctx: Context): void;
24
25
  export declare function insertImage(ctx: Context, image: HTMLImageElement): void;
26
+ /** Copy/cut the currently selected floating image onto the clipboard. */
27
+ export declare function copyActiveImage(ctx: Context): boolean;
28
+ /**
29
+ * Cut: copy into the clipboard but keep the image on the sheet until paste
30
+ * (same deferred-remove behavior as cell Ctrl/Cmd+X).
31
+ */
32
+ export declare function cutActiveImage(ctx: Context): boolean;
33
+ /** Paste a previously copied floating image (or one encoded in paste HTML). */
34
+ export declare function pasteImageItem(ctx: Context, html?: string): boolean;
35
+ /** Load an image File (e.g. from the system clipboard) as an HTMLImageElement. */
36
+ export declare function loadImageFromFile(file: File): Promise<HTMLImageElement | null>;
25
37
  export declare function cancelActiveImgItem(ctx: Context, globalCache: GlobalCache): void;
26
38
  export declare function onImageMoveStart(ctx: Context, globalCache: GlobalCache, e: MouseEvent): void;
27
39
  export declare function onImageMove(ctx: Context, globalCache: GlobalCache, e: MouseEvent): boolean;
@@ -29,4 +41,3 @@ export declare function onImageMoveEnd(ctx: Context, globalCache: GlobalCache):
29
41
  export declare function onImageResizeStart(globalCache: GlobalCache, e: MouseEvent, resizingSide: string): void;
30
42
  export declare function onImageResize(ctx: Context, globalCache: GlobalCache, e: MouseEvent): boolean;
31
43
  export declare function onImageResizeEnd(ctx: Context, globalCache: GlobalCache): void;
32
- export {};
@@ -17,7 +17,7 @@ export { addSheet, deleteSheet, editSheetName, changeSheet, updateSheet, } from
17
17
  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';
18
18
  export { handleScreenShot } from './screenshot';
19
19
  export { drawArrow, setEditingComment, removeEditingComment, newComment, editComment, deleteComment, showComments, showHideComment, showHideAllComments, getCommentBoxByRC, onCommentBoxMoveStart, onCommentBoxMove, onCommentBoxMoveEnd, onCommentBoxResize, onCommentBoxResizeEnd, removeOverShowComment, } from './comment';
20
- export { showImgChooser, insertImage, removeActiveImage, cancelActiveImgItem, onImageMoveStart, onImageResizeStart, onImageMove, onImageMoveEnd, onImageResize, onImageResizeEnd, } from './image';
20
+ export { showImgChooser, insertImage, removeActiveImage, copyActiveImage, cutActiveImage, pasteImageItem, loadImageFromFile, getImageClipboard, getImageCutSourceId, cancelActiveImgItem, onImageMoveStart, onImageResizeStart, onImageMove, onImageMoveEnd, onImageResize, onImageResizeEnd, } from './image';
21
21
  export { createDropCellRange, dropCellCache, getTypeItemHide, updateDropCell, } from './dropCell';
22
22
  export { mergeCells, mergeSelectionHasValues } from './merge';
23
23
  export { getRemoveDuplicatesPreview, removeDuplicates, getRemoveDuplicatesErrorMessage, } from './removeDuplicates';
@@ -154,6 +154,8 @@ export type Image = {
154
154
  left: number;
155
155
  top: number;
156
156
  src: string;
157
+ originWidth?: number;
158
+ originHeight?: number;
157
159
  };
158
160
  export type ConditionRulesProps = {
159
161
  editKey?: string | null;