@fileverse-dev/dsheet 2.0.36 → 2.1.0-remove
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/{constants-CnhOvijG.js → constants-yStXQJiK.js} +35 -14
- package/dist/constants.d.ts +4 -0
- package/dist/constants.js +6 -3
- package/dist/editor/components/collab-status-chip.d.ts +8 -0
- package/dist/editor/contexts/editor-context.d.ts +15 -5
- package/dist/editor/dsheet-editor.d.ts +1 -1
- package/dist/editor/hooks/use-collab-awareness.d.ts +17 -0
- package/dist/editor/hooks/use-editor-data.d.ts +2 -1
- package/dist/editor/hooks/use-editor-sync.d.ts +9 -6
- package/dist/editor/types.d.ts +2 -2
- package/dist/editor/utils/after-update-cell.d.ts +12 -0
- package/dist/editor/utils/formula-ui-sync.d.ts +3 -1
- package/dist/editor/utils/remote-apply-guard.d.ts +19 -0
- package/dist/{executeStringFunction-Bl4AYetV.js → executeStringFunction-B0p00aYv.js} +4454 -4451
- package/dist/formula.js +1 -1
- package/dist/index-B0KT8Bdl.js +52333 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +42 -38
- package/dist/sheet-engine/core/api/cell.d.ts +21 -0
- package/dist/sheet-engine/core/index.d.ts +2 -1
- package/dist/sheet-engine/core/locale/en.d.ts +13 -0
- package/dist/sheet-engine/core/modules/filter.d.ts +13 -0
- package/dist/sheet-engine/core/modules/index.d.ts +3 -1
- package/dist/sheet-engine/core/modules/removeDuplicates.d.ts +29 -0
- package/dist/sheet-engine/core/settings.d.ts +3 -0
- package/dist/sheet-engine/core/types.d.ts +1 -0
- package/dist/sheet-engine/react/components/RemoveDuplicates/index.d.ts +12 -0
- package/dist/sheet-engine/react/components/Workbook/api.d.ts +23 -0
- package/dist/sheet-engine/react/components/Workbook/index.d.ts +15 -0
- package/dist/style.css +1 -1
- package/dist/sync-local/SyncManager.d.ts +69 -0
- package/dist/sync-local/collabStateMachine.d.ts +23 -0
- package/dist/sync-local/crypto/index.d.ts +6 -0
- package/dist/sync-local/index.d.ts +3 -0
- package/dist/sync-local/socketClient.d.ts +68 -0
- package/dist/sync-local/types/index.d.ts +212 -0
- package/dist/sync-local/useSyncManager.d.ts +12 -0
- package/dist/sync-local/utils/createAwarenessUpdateHandler.d.ts +8 -0
- package/dist/sync-local/utils/objectToFile.d.ts +1 -0
- package/dist/{use-xlsx-import-impl-BIdckUWG.js → use-xlsx-import-impl-BRLMqMHz.js} +2 -2
- package/dist/{xlsx-export-impl-BEVF8Y2c.js → xlsx-export-impl-DStrYuG2.js} +293 -295
- package/package.json +13 -9
- package/dist/editor/hooks/use-editor-collaboration.d.ts +0 -9
- package/dist/index-CqPhp0yr.js +0 -40212
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export { default as DSheetEditor } from './editor/dsheet-editor';
|
|
2
|
+
export { default as DSheetSkeleton } from './editor/components/skeleton-loader';
|
|
2
3
|
export { formulaResponseUiSync } from './editor/utils/formula-ui-sync';
|
|
3
4
|
export { executeStringFunction } from './editor/utils/executeStringFunction';
|
|
4
5
|
export { FLVURL } from '@fileverse-dev/formulajs';
|
|
5
6
|
export { loadLocale } from './sheet-engine/core';
|
|
6
7
|
export type { ErrorMessageHandlerReturnType } from './editor/types';
|
|
7
8
|
export type { WorkbookInstance } from './sheet-engine/react';
|
|
9
|
+
export type { CollaborationProps, CollabConnectionConfig, CollabSessionMeta, CollabServices, CollabCallbacks, CollabState, CollabStatus, CollabError, CollabErrorCode, CollabUser, } from './sync-local/types';
|
|
8
10
|
export { ERROR_MESSAGES_FLAG, SERVICES_API_KEY, } from './editor/constants/shared-constants';
|
|
9
11
|
export { TEMPLATES } from '@fileverse-dev/dsheets-templates/template-metadata-list';
|
|
10
12
|
export { handleCSVUpload } from './editor/utils/csv-import';
|
|
@@ -13,5 +15,5 @@ export { handleExportToCSV } from './editor/utils/csv-export';
|
|
|
13
15
|
export { handleExportToJSON } from './editor/utils/json-export';
|
|
14
16
|
export { useXLSXImport } from './editor/hooks/use-xlsx-import';
|
|
15
17
|
export * as FortuneCore from './sheet-engine/core';
|
|
16
|
-
export { createFilter, clearFilter, handleSort, handleCopy, handlePasteByClick, removeActiveImage, jfrefreshgrid, deleteSelectedCellText, deleteRowCol, getFlowdata, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, toolbarItemClickHandler, getSheetIndex, handleMerge, clearSelectedCellFormat, clearColumnsCellsFormat, clearRowsCellsFormat, handleFreeze, insertRowCol, showImgChooser, handleLink, api, } from './sheet-engine/core';
|
|
18
|
+
export { createFilter, clearFilter, handleSort, getRemoveDuplicatesPreview, removeDuplicates, getRemoveDuplicatesErrorMessage, handleCopy, handlePasteByClick, removeActiveImage, jfrefreshgrid, deleteSelectedCellText, deleteRowCol, getFlowdata, updateFormat, handleTextSize, handleHorizontalAlign, handleVerticalAlign, toolbarItemClickHandler, getSheetIndex, handleMerge, clearSelectedCellFormat, clearColumnsCellsFormat, clearRowsCellsFormat, handleFreeze, insertRowCol, showImgChooser, handleLink, api, } from './sheet-engine/core';
|
|
17
19
|
export type { PatchOptions } from './sheet-engine/core';
|
package/dist/index.es.js
CHANGED
|
@@ -1,45 +1,49 @@
|
|
|
1
|
-
import { S as s,
|
|
2
|
-
import {
|
|
3
|
-
import { FLVURL as
|
|
4
|
-
import { E as
|
|
1
|
+
import { S as s, a as l, i as o, T as r, b as t, d as n, e as d, g as i, f as S, h as c, j as h, k as m, l as p, n as C, o as E, p as g, q as x, r as F, s as u, t as R, u as f, v as A, w as L, x as T, z as v, A as w, B as I, C as b } from "./index-B0KT8Bdl.js";
|
|
2
|
+
import { bM as D, bN as M, bO as V, ar as z, bc as P, e as X, f as _, h as j, a as y, cc as O, aq as U, cj as q } from "./executeStringFunction-B0p00aYv.js";
|
|
3
|
+
import { FLVURL as G } from "@fileverse-dev/formulajs";
|
|
4
|
+
import { E as N, S as J } from "./constants-yStXQJiK.js";
|
|
5
5
|
export {
|
|
6
6
|
s as DSheetEditor,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
r as
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
l as DSheetSkeleton,
|
|
8
|
+
N as ERROR_MESSAGES_FLAG,
|
|
9
|
+
G as FLVURL,
|
|
10
|
+
o as FortuneCore,
|
|
11
|
+
J as SERVICES_API_KEY,
|
|
12
|
+
r as TEMPLATES,
|
|
13
|
+
t as api,
|
|
14
|
+
D as clearColumnsCellsFormat,
|
|
15
|
+
n as clearFilter,
|
|
16
|
+
M as clearRowsCellsFormat,
|
|
16
17
|
V as clearSelectedCellFormat,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
d as createFilter,
|
|
19
|
+
z as deleteRowCol,
|
|
20
|
+
P as deleteSelectedCellText,
|
|
20
21
|
X as executeStringFunction,
|
|
21
22
|
_ as formulaResponseUiSync,
|
|
22
23
|
j as getFlowdata,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
C as
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
R as
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
24
|
+
i as getRemoveDuplicatesErrorMessage,
|
|
25
|
+
S as getRemoveDuplicatesPreview,
|
|
26
|
+
y as getSheetIndex,
|
|
27
|
+
c as handleCSVUpload,
|
|
28
|
+
h as handleCopy,
|
|
29
|
+
m as handleExportToCSV,
|
|
30
|
+
p as handleExportToJSON,
|
|
31
|
+
C as handleExportToXLSX,
|
|
32
|
+
E as handleFreeze,
|
|
33
|
+
g as handleHorizontalAlign,
|
|
34
|
+
x as handleLink,
|
|
35
|
+
F as handleMerge,
|
|
36
|
+
u as handlePasteByClick,
|
|
37
|
+
R as handleSort,
|
|
38
|
+
f as handleTextSize,
|
|
39
|
+
A as handleVerticalAlign,
|
|
40
|
+
O as insertRowCol,
|
|
41
|
+
U as jfrefreshgrid,
|
|
42
|
+
q as loadLocale,
|
|
43
|
+
L as removeActiveImage,
|
|
44
|
+
T as removeDuplicates,
|
|
45
|
+
v as showImgChooser,
|
|
46
|
+
w as toolbarItemClickHandler,
|
|
47
|
+
I as updateFormat,
|
|
48
|
+
b as useXLSXImport
|
|
45
49
|
};
|
|
@@ -6,6 +6,27 @@ export declare function getCellValue(ctx: Context, row: number, column: number,
|
|
|
6
6
|
type?: keyof Cell;
|
|
7
7
|
}): any;
|
|
8
8
|
export declare function setCellValue(ctx: Context, row: number, column: number, value: any, cellInput: HTMLDivElement | null, options?: CommonOptions, callAfterUpdate?: boolean): void;
|
|
9
|
+
/**
|
|
10
|
+
* Apply a cell value coming from a remote RTC peer, verbatim.
|
|
11
|
+
*
|
|
12
|
+
* This differs from `setCellValue` in two important ways and must be used for
|
|
13
|
+
* every Yjs-driven remote apply:
|
|
14
|
+
*
|
|
15
|
+
* 1. It NEVER runs the formula engine and NEVER fires the local-edit hooks
|
|
16
|
+
* (`onLocalCellEdit` / `afterUpdateCell`). The peer already computed the
|
|
17
|
+
* value, so we use the synced `v`/`m`/`f` as-is. This avoids both
|
|
18
|
+
* recomputation divergence and an update loop back into Yjs.
|
|
19
|
+
*
|
|
20
|
+
* 2. It PRESERVES the formula calc list. The regular `setCellValue` object
|
|
21
|
+
* branch calls `delFunctionGroup`, which removes the cell from `calcChain`
|
|
22
|
+
* and strips its dependency edges. Because `execFunctionGroup` walks
|
|
23
|
+
* `calcChain` to decide what to recompute, dropping a formula cell there
|
|
24
|
+
* permanently breaks its reactivity on that client (even after RTC stops).
|
|
25
|
+
* Here we instead keep formula cells registered via
|
|
26
|
+
* `insertUpdateFunctionGroup`, so they stay reactive to future local edits
|
|
27
|
+
* on both owner and peer.
|
|
28
|
+
*/
|
|
29
|
+
export declare function applyRemoteCellValue(ctx: Context, row: number, column: number, value: any, options?: CommonOptions): void;
|
|
9
30
|
export declare function clearCell(ctx: Context, row: number, column: number, options?: CommonOptions): void;
|
|
10
31
|
export declare function setCellFormat(ctx: Context, row: number, column: number, attr: keyof Cell, value: any, options?: CommonOptions): void;
|
|
11
32
|
export declare function autoFillCell(ctx: Context, copyRange: SingleRange, applyRange: SingleRange, direction: 'up' | 'down' | 'left' | 'right'): void;
|
|
@@ -7,10 +7,11 @@ 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, } 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, 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, 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, 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, handleKeydownForZoom, 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, 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, handleKeydownForZoom, 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';
|
|
14
14
|
export type { Op, Cell, CellWithRowAndCol, CellMatrix, HyperlinkEntry, Selection, Presence, Sheet, GlobalCache, SingleRange, Range, SearchResult, LinkCardProps, LiveQueryData, Freezen, } from './types';
|
|
15
|
+
export type { RemoveDuplicatesColumnOption, RemoveDuplicatesError, RemoveDuplicatesOptions, RemoveDuplicatesPreview, RemoveDuplicatesResult, } from './modules';
|
|
15
16
|
export type { CheckModes, HyperlinkMap, FindSearchScope, ReplaceScope, SearchHiddenConfig, SearchNextResult, ReplaceAllResult, } from './modules/searchReplace';
|
|
16
17
|
export { cellFadeAnimator, markCellChanged } from './animate';
|
|
@@ -910,6 +910,19 @@ declare const _default: {
|
|
|
910
910
|
allowOptionText: string;
|
|
911
911
|
selectCategory: string;
|
|
912
912
|
};
|
|
913
|
+
removeDuplicates: {
|
|
914
|
+
title: string;
|
|
915
|
+
dataHasHeaderRow: string;
|
|
916
|
+
columnsToAnalyze: string;
|
|
917
|
+
selectAll: string;
|
|
918
|
+
removeDuplicates: string;
|
|
919
|
+
result: string;
|
|
920
|
+
noMulti: string;
|
|
921
|
+
noMerge: string;
|
|
922
|
+
noColumns: string;
|
|
923
|
+
noSelection: string;
|
|
924
|
+
readOnly: string;
|
|
925
|
+
};
|
|
913
926
|
drag: {
|
|
914
927
|
noMerge: string;
|
|
915
928
|
affectPivot: string;
|
|
@@ -46,3 +46,16 @@ export declare function getFilterColumnColors(ctx: Context, col: number, startRo
|
|
|
46
46
|
fcColors: FilterColor[];
|
|
47
47
|
};
|
|
48
48
|
export declare function saveFilter(ctx: Context, optionState: boolean, hiddenRows: Record<string, number>, caljs: any, st_r: number, ed_r: number, cindex: number, st_c: number, ed_c: number): void;
|
|
49
|
+
type SheetFilterState = {
|
|
50
|
+
filter?: Record<string, any> | null;
|
|
51
|
+
filter_select?: {
|
|
52
|
+
row: number[];
|
|
53
|
+
column: number[];
|
|
54
|
+
} | null;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Apply filter state from Yjs on a remote RTC peer without a Workbook remount.
|
|
58
|
+
* Bypasses isAllowEdit — caller must only invoke for remote-origin updates.
|
|
59
|
+
*/
|
|
60
|
+
export declare function applySheetFilterState(ctx: Context, sheetId: string, state: SheetFilterState): void;
|
|
61
|
+
export {};
|
|
@@ -18,11 +18,13 @@ export { drawArrow, setEditingComment, removeEditingComment, newComment, editCom
|
|
|
18
18
|
export { showImgChooser, insertImage, removeActiveImage, cancelActiveImgItem, onImageMoveStart, onImageResizeStart, onImageMove, onImageMoveEnd, onImageResize, onImageResizeEnd, } from './image';
|
|
19
19
|
export { createDropCellRange, dropCellCache, getTypeItemHide, updateDropCell, } from './dropCell';
|
|
20
20
|
export { mergeCells, mergeSelectionHasValues } from './merge';
|
|
21
|
+
export { getRemoveDuplicatesPreview, removeDuplicates, getRemoveDuplicatesErrorMessage, } from './removeDuplicates';
|
|
22
|
+
export type { RemoveDuplicatesColumnOption, RemoveDuplicatesError, RemoveDuplicatesOptions, RemoveDuplicatesPreview, RemoveDuplicatesResult, } from './removeDuplicates';
|
|
21
23
|
export { sortSelection, sortSheetBySelectedColumn, spillSortResult, } from './sort';
|
|
22
24
|
export { searchAll, searchNext, replace, replaceAll, replaceAllScoped, getSearchIndexArr, getSearchIndexArrAsync, getFindRangeOnCurrentSheet, getQuickSearchIndexArr, getQuickSearchHiddenConfig, expandCellRectForMerge, shouldQuickSearchUseAsync, runQuickSearchIndexArrAsync, QUICK_SEARCH_ASYNC_ROW_THRESHOLD, parseRangeText, } from './searchReplace';
|
|
23
25
|
export type { CheckModes, HyperlinkMap, FindSearchScope, ReplaceScope, SearchHiddenConfig, SearchNextResult, ReplaceAllResult, } from './searchReplace';
|
|
24
26
|
export { getCellRowColumn, getCellHyperlink, getCellHyperlinks, getHyperlinkDisplayTextInCell, getInlineLinkPlainRange, getUniformLinkCoveringPlainRange, getUniformLinkAtPlainOffset, saveHyperlink, removeHyperlink, removeHyperlinkForLink, updateHyperlinkForLink, syncLinkCardAfterHyperlinkChange, showLinkCard, goToLink, isLinkValid, } from './hyperlink';
|
|
25
|
-
export { createFilterOptions, clearFilter, clearFilterForColumn, toggleViewerFilter, createFilter, getFilterColumnValues, getFilterColumnColors, orderbydatafiler, saveFilter, } from './filter';
|
|
27
|
+
export { createFilterOptions, clearFilter, clearFilterForColumn, toggleViewerFilter, createFilter, applySheetFilterState, getFilterColumnValues, getFilterColumnColors, orderbydatafiler, saveFilter, } from './filter';
|
|
26
28
|
export type { FilterDate, FilterValue, FilterColor } from './filter';
|
|
27
29
|
export { onCellsMoveStart, onCellsMove, onCellsMoveEnd } from './moveCells';
|
|
28
30
|
export { cfSplitRange } from './conditionalFormat';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Context, Selection } from '..';
|
|
2
|
+
|
|
3
|
+
export type RemoveDuplicatesError = 'readOnly' | 'noSelection' | 'noMulti' | 'noMerge' | 'noColumns' | 'cannotDeleteAllRow';
|
|
4
|
+
export type RemoveDuplicatesColumnOption = {
|
|
5
|
+
column: number;
|
|
6
|
+
label: string;
|
|
7
|
+
checked: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type RemoveDuplicatesPreview = {
|
|
10
|
+
range: Selection;
|
|
11
|
+
columns: RemoveDuplicatesColumnOption[];
|
|
12
|
+
};
|
|
13
|
+
export type RemoveDuplicatesOptions = {
|
|
14
|
+
hasHeaderRow: boolean;
|
|
15
|
+
analyzedColumns: number[];
|
|
16
|
+
/** Range captured when the dialog opened; avoids selection drift. */
|
|
17
|
+
range?: Selection;
|
|
18
|
+
};
|
|
19
|
+
export type RemoveDuplicatesResult = {
|
|
20
|
+
removedCount: number;
|
|
21
|
+
remainingCount: number;
|
|
22
|
+
error?: RemoveDuplicatesError;
|
|
23
|
+
};
|
|
24
|
+
export declare function getRemoveDuplicatesPreview(ctx: Context): {
|
|
25
|
+
preview?: RemoveDuplicatesPreview;
|
|
26
|
+
error?: RemoveDuplicatesError;
|
|
27
|
+
};
|
|
28
|
+
export declare function removeDuplicates(ctx: Context, options: RemoveDuplicatesOptions): RemoveDuplicatesResult;
|
|
29
|
+
export declare function getRemoveDuplicatesErrorMessage(ctx: Context, error: RemoveDuplicatesError): string;
|
|
@@ -25,6 +25,8 @@ export type Hooks = {
|
|
|
25
25
|
updateCellYdoc?: (changes: SheetChangePath[]) => void;
|
|
26
26
|
updateAllCell?: (sheetId: string) => void;
|
|
27
27
|
beforeUpdateCell?: (r: number, c: number, value: any) => boolean;
|
|
28
|
+
/** Clears RTC remote-apply lock so local edits can run data-block formulas. */
|
|
29
|
+
onLocalCellEdit?: () => void;
|
|
28
30
|
afterUpdateCell?: (row: number, column: number, oldValue: any, newValue: any) => void;
|
|
29
31
|
afterSelectionChange?: (sheetId: string, selection: Selection) => void;
|
|
30
32
|
beforeRenderRowHeaderCell?: (rowNumber: string, rowIndex: number, top: number, width: number, height: number, ctx: CanvasRenderingContext2D) => boolean;
|
|
@@ -131,6 +133,7 @@ export type Settings = {
|
|
|
131
133
|
onSheetCountChange?: (count: number) => void;
|
|
132
134
|
isAuthorized?: boolean;
|
|
133
135
|
isFlvReadOnly?: boolean;
|
|
136
|
+
isRTCActive?: boolean;
|
|
134
137
|
dateBaseLocale?: DateBaseLocale;
|
|
135
138
|
/** When true, do not auto-select A1 on load (e.g. onboarding modal runs first). */
|
|
136
139
|
suppressInitialCellSelection?: boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { RemoveDuplicatesPreview } from '../../../core';
|
|
3
|
+
|
|
4
|
+
type RemoveDuplicatesDialogProps = {
|
|
5
|
+
initialPreview: RemoveDuplicatesPreview;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
};
|
|
8
|
+
declare const RemoveDuplicatesDialog: React.FC<RemoveDuplicatesDialogProps>;
|
|
9
|
+
export declare function useRemoveDuplicatesDialog(): {
|
|
10
|
+
openRemoveDuplicatesDialog: () => void;
|
|
11
|
+
};
|
|
12
|
+
export default RemoveDuplicatesDialog;
|
|
@@ -19,6 +19,17 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
|
|
|
19
19
|
setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
|
|
20
20
|
type?: keyof Cell;
|
|
21
21
|
}, callAfterUpdate?: boolean) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Apply a cell value coming from a remote RTC peer, verbatim.
|
|
24
|
+
*
|
|
25
|
+
* Use this (instead of `setCellValue`) for every Yjs-driven remote apply:
|
|
26
|
+
* it writes the synced value/formula as-is without running the formula
|
|
27
|
+
* engine and without firing local-edit hooks, while keeping formula cells
|
|
28
|
+
* registered in `calcChain` so they remain reactive to future local edits.
|
|
29
|
+
*/
|
|
30
|
+
applyRemoteCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
|
|
31
|
+
type?: keyof Cell;
|
|
32
|
+
}) => void;
|
|
22
33
|
setCellError: (row: number, column: number, errorMessage: {
|
|
23
34
|
title: string;
|
|
24
35
|
message: string;
|
|
@@ -126,6 +137,18 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
|
|
|
126
137
|
activateSheet: (options?: api.CommonOptions) => void;
|
|
127
138
|
setSheetName: (name: string, options?: api.CommonOptions) => void;
|
|
128
139
|
setSheetOrder: (orderList: Record<string, number>) => void;
|
|
140
|
+
setSheetImages: (images: any[], options?: api.CommonOptions) => void;
|
|
141
|
+
setSheetIframes: (iframes: any[], options?: api.CommonOptions) => void;
|
|
142
|
+
setSheetDataVerification: (dataVerification: Record<string, any>, options?: api.CommonOptions) => void;
|
|
143
|
+
setSheetFilterState: (state: {
|
|
144
|
+
filter?: Record<string, any> | null;
|
|
145
|
+
filter_select?: {
|
|
146
|
+
row: number[];
|
|
147
|
+
column: number[];
|
|
148
|
+
} | null;
|
|
149
|
+
}, options?: api.CommonOptions) => void;
|
|
150
|
+
setSheetMapField: (field: string, value: Record<string, any> | null | undefined, options?: api.CommonOptions) => void;
|
|
151
|
+
setSheetConditionFormatRules: (rules: any[], options?: api.CommonOptions) => void;
|
|
129
152
|
scroll: (options: {
|
|
130
153
|
scrollLeft?: number;
|
|
131
154
|
scrollTop?: number;
|
|
@@ -23,6 +23,9 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
|
|
|
23
23
|
setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
|
|
24
24
|
type?: keyof import('../../../core').Cell;
|
|
25
25
|
}, callAfterUpdate?: boolean) => void;
|
|
26
|
+
applyRemoteCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
|
|
27
|
+
type?: keyof import('../../../core').Cell;
|
|
28
|
+
}) => void;
|
|
26
29
|
setCellError: (row: number, column: number, errorMessage: {
|
|
27
30
|
title: string;
|
|
28
31
|
message: string;
|
|
@@ -130,6 +133,18 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
|
|
|
130
133
|
activateSheet: (options?: api.CommonOptions) => void;
|
|
131
134
|
setSheetName: (name: string, options?: api.CommonOptions) => void;
|
|
132
135
|
setSheetOrder: (orderList: Record<string, number>) => void;
|
|
136
|
+
setSheetImages: (images: any[], options?: api.CommonOptions) => void;
|
|
137
|
+
setSheetIframes: (iframes: any[], options?: api.CommonOptions) => void;
|
|
138
|
+
setSheetDataVerification: (dataVerification: Record<string, any>, options?: api.CommonOptions) => void;
|
|
139
|
+
setSheetFilterState: (state: {
|
|
140
|
+
filter?: Record<string, any> | null;
|
|
141
|
+
filter_select?: {
|
|
142
|
+
row: number[];
|
|
143
|
+
column: number[];
|
|
144
|
+
} | null;
|
|
145
|
+
}, options?: api.CommonOptions) => void;
|
|
146
|
+
setSheetMapField: (field: string, value: Record<string, any> | null | undefined, options?: api.CommonOptions) => void;
|
|
147
|
+
setSheetConditionFormatRules: (rules: any[], options?: api.CommonOptions) => void;
|
|
133
148
|
scroll: (options: {
|
|
134
149
|
scrollLeft?: number;
|
|
135
150
|
scrollTop?: number;
|