@univerjs/sheets-formula-ui 1.0.3 → 1.0.4
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/lib/cjs/index.js +45 -43
- package/lib/es/index.js +45 -44
- package/lib/index.js +45 -44
- package/lib/types/index.d.ts +1 -0
- package/lib/types/views/formula-editor/formula-embed-integration.service.d.ts +2 -0
- package/lib/types/views/formula-editor/hooks/use-focus.d.ts +1 -5
- package/lib/umd/index.js +5 -5
- package/package.json +12 -12
package/lib/index.js
CHANGED
|
@@ -998,7 +998,7 @@ const menuSchema = {
|
|
|
998
998
|
//#endregion
|
|
999
999
|
//#region package.json
|
|
1000
1000
|
var name = "@univerjs/sheets-formula-ui";
|
|
1001
|
-
var version = "1.0.
|
|
1001
|
+
var version = "1.0.4";
|
|
1002
1002
|
|
|
1003
1003
|
//#endregion
|
|
1004
1004
|
//#region src/config/config.ts
|
|
@@ -1581,6 +1581,10 @@ let FormulaEditorShowController = class FormulaEditorShowController extends Disp
|
|
|
1581
1581
|
if (range == null) return true;
|
|
1582
1582
|
const { startRow, startColumn, endRow, endColumn } = range;
|
|
1583
1583
|
if (rowIndex === row && columnIndex === col) {
|
|
1584
|
+
result = {
|
|
1585
|
+
...cellInfo,
|
|
1586
|
+
isInArrayFormulaRange: false
|
|
1587
|
+
};
|
|
1584
1588
|
this._createArrayFormulaRangeShape(range, unitId, subUnitId);
|
|
1585
1589
|
return false;
|
|
1586
1590
|
}
|
|
@@ -1771,15 +1775,17 @@ function registerFormulaEditorRuntimePortal(options) {
|
|
|
1771
1775
|
let registeredPortalRoot = null;
|
|
1772
1776
|
let disposed = false;
|
|
1773
1777
|
const tryRegister = () => {
|
|
1778
|
+
var _options$editorServic;
|
|
1774
1779
|
if (disposed) return;
|
|
1775
|
-
const
|
|
1780
|
+
const selection = (_options$editorServic = options.editorService.getEditor(options.editorId)) === null || _options$editorServic === void 0 ? void 0 : _options$editorServic.docSelectionRenderService;
|
|
1781
|
+
const portalRoot = (selection === null || selection === void 0 ? void 0 : selection.selectionContainer.isConnected) ? selection.selectionContainer : null;
|
|
1776
1782
|
if (portalRoot === registeredPortalRoot) return;
|
|
1777
1783
|
portalRegistration === null || portalRegistration === void 0 || portalRegistration.dispose();
|
|
1778
1784
|
portalRegistration = void 0;
|
|
1779
1785
|
registeredPortalRoot = null;
|
|
1780
|
-
if (!portalRoot) return;
|
|
1786
|
+
if (!portalRoot || !selection) return;
|
|
1781
1787
|
registeredPortalRoot = portalRoot;
|
|
1782
|
-
portalRegistration = registerFormulaEditorPortalRoot(options,
|
|
1788
|
+
portalRegistration = registerFormulaEditorPortalRoot(options, selection);
|
|
1783
1789
|
};
|
|
1784
1790
|
const scheduleRetry = (remaining) => {
|
|
1785
1791
|
if (remaining <= 0 || !(view === null || view === void 0 ? void 0 : view.requestAnimationFrame)) return;
|
|
@@ -1815,13 +1821,9 @@ function registerFormulaEditorRuntimePortal(options) {
|
|
|
1815
1821
|
}));
|
|
1816
1822
|
return collection;
|
|
1817
1823
|
}
|
|
1818
|
-
function
|
|
1819
|
-
return ownerDocument.getElementById(`univer-doc-selection-container-${editorId}`) ?? ownerDocument.getElementById(`__editor_${editorId}`);
|
|
1820
|
-
}
|
|
1821
|
-
function registerFormulaEditorPortalRoot(options, ownerDocument, portalRoot) {
|
|
1824
|
+
function registerFormulaEditorPortalRoot(options, selection) {
|
|
1822
1825
|
const collection = new DisposableCollection();
|
|
1823
|
-
|
|
1824
|
-
(editorElement && editorElement !== portalRoot ? [portalRoot, editorElement] : [portalRoot]).forEach((element) => {
|
|
1826
|
+
[selection.selectionContainer, selection.inputElement].forEach((element) => {
|
|
1825
1827
|
if (options.interactionBoundaryService) collection.add(options.interactionBoundaryService.registerOwnedElement(options.embedId, element));
|
|
1826
1828
|
if (options.focusCoordinator) collection.add(options.focusCoordinator.registerElement({
|
|
1827
1829
|
embedId: options.embedId,
|
|
@@ -1861,7 +1863,7 @@ function focusFormulaEditor(editorService, editor, offset) {
|
|
|
1861
1863
|
if (!editor) return;
|
|
1862
1864
|
const selections = [...editor.getSelectionRanges()];
|
|
1863
1865
|
editorService.focus(editor.getEditorId());
|
|
1864
|
-
|
|
1866
|
+
editor.docSelectionRenderService.focus();
|
|
1865
1867
|
if (editor.docSelectionRenderService.isOnPointerEvent) return;
|
|
1866
1868
|
if (Tools.isDefine(offset)) editor.setSelectionRanges([{
|
|
1867
1869
|
startOffset: offset,
|
|
@@ -1877,16 +1879,7 @@ function focusFormulaEditor(editorService, editor, offset) {
|
|
|
1877
1879
|
}]);
|
|
1878
1880
|
} else editor.setSelectionRanges(selections);
|
|
1879
1881
|
}
|
|
1880
|
-
function focusFormulaEditorElement(editor) {
|
|
1881
|
-
var _editor$editorDOM;
|
|
1882
|
-
const editorElement = (((_editor$editorDOM = editor.editorDOM) === null || _editor$editorDOM === void 0 ? void 0 : _editor$editorDOM.ownerDocument) ?? document).getElementById(`__editor_${editor.getEditorId()}`);
|
|
1883
|
-
editorElement === null || editorElement === void 0 || editorElement.focus({ preventScroll: true });
|
|
1884
|
-
}
|
|
1885
|
-
function shouldSkipFormulaEditorMouseUpFocus(_target) {
|
|
1886
|
-
return false;
|
|
1887
|
-
}
|
|
1888
1882
|
function shouldRefocusFormulaEditorOnMouseUp(options) {
|
|
1889
|
-
if (shouldSkipFormulaEditorMouseUpFocus(options.target)) return false;
|
|
1890
1883
|
if (options.isPointerSelecting || options.isFocusing) return false;
|
|
1891
1884
|
return true;
|
|
1892
1885
|
}
|
|
@@ -1974,18 +1967,16 @@ let RefSelectionsRenderService = class RefSelectionsRenderService extends BaseSe
|
|
|
1974
1967
|
if (evt.button !== 2) state.stopPropagation();
|
|
1975
1968
|
}));
|
|
1976
1969
|
listenerDisposables.add(spreadsheetRowHeader === null || spreadsheetRowHeader === void 0 ? void 0 : spreadsheetRowHeader.onPointerDown$.subscribeEvent((evt, state) => {
|
|
1977
|
-
if (!this.inRefSelectionMode()) return;
|
|
1978
1970
|
const skeleton = this._sheetSkeletonManagerService.getCurrentSkeleton();
|
|
1979
|
-
if (!skeleton) return;
|
|
1971
|
+
if (!this.inRefSelectionMode() || !skeleton) return;
|
|
1980
1972
|
const { row } = getCoordByOffset(evt.offsetX, evt.offsetY, scene, skeleton);
|
|
1981
1973
|
if (checkInHeaderRanges(this._workbookSelections.getCurrentSelections(), row, RANGE_TYPE.ROW)) return;
|
|
1982
1974
|
this._onPointerDown(evt, (spreadsheet.zIndex || 1) + 1, RANGE_TYPE.ROW, this._getActiveViewport(evt), ScrollTimerType.Y);
|
|
1983
1975
|
if (evt.button !== 2) state.stopPropagation();
|
|
1984
1976
|
}));
|
|
1985
1977
|
listenerDisposables.add(spreadsheetColumnHeader === null || spreadsheetColumnHeader === void 0 ? void 0 : spreadsheetColumnHeader.onPointerDown$.subscribeEvent((evt, state) => {
|
|
1986
|
-
if (!this.inRefSelectionMode()) return;
|
|
1987
1978
|
const skeleton = this._sheetSkeletonManagerService.getCurrentSkeleton();
|
|
1988
|
-
if (!skeleton) return;
|
|
1979
|
+
if (!this.inRefSelectionMode() || !skeleton) return;
|
|
1989
1980
|
const { column } = getCoordByOffset(evt.offsetX, evt.offsetY, scene, skeleton);
|
|
1990
1981
|
if (checkInHeaderRanges(this._workbookSelections.getCurrentSelections(), column, RANGE_TYPE.COLUMN)) return;
|
|
1991
1982
|
this._onPointerDown(evt, (spreadsheet.zIndex || 1) + 1, RANGE_TYPE.COLUMN, this._getActiveViewport(evt), ScrollTimerType.X);
|
|
@@ -1993,9 +1984,8 @@ let RefSelectionsRenderService = class RefSelectionsRenderService extends BaseSe
|
|
|
1993
1984
|
}));
|
|
1994
1985
|
listenerDisposables.add(spreadsheetLeftTopPlaceholder === null || spreadsheetLeftTopPlaceholder === void 0 ? void 0 : spreadsheetLeftTopPlaceholder.onPointerDown$.subscribeEvent((evt, state) => {
|
|
1995
1986
|
this._reset();
|
|
1996
|
-
if (!this.inRefSelectionMode()) return;
|
|
1997
1987
|
const skeleton = this._sheetSkeletonManagerService.getCurrentSkeleton();
|
|
1998
|
-
if (!skeleton) return;
|
|
1988
|
+
if (!this.inRefSelectionMode() || !skeleton) return;
|
|
1999
1989
|
const selectionWithStyle = getAllSelection(skeleton);
|
|
2000
1990
|
this._addSelectionControlByModelData(selectionWithStyle);
|
|
2001
1991
|
this._selectionMoveStart$.next(this.getSelectionDataWithStyle());
|
|
@@ -2161,7 +2151,7 @@ let RefSelectionsRenderService = class RefSelectionsRenderService extends BaseSe
|
|
|
2161
2151
|
endRow: activeSelectionControl.model.endRow,
|
|
2162
2152
|
endColumn: activeSelectionControl.model.endColumn
|
|
2163
2153
|
} : null;
|
|
2164
|
-
const remainLastEnable = this._remainLastEnabled && !
|
|
2154
|
+
const remainLastEnable = this._remainLastEnabled && !this._isMultiSelectModifier(evt) && !evt.shiftKey && !this._skipLastEnabled && !this._singleSelectionEnabled;
|
|
2165
2155
|
if (expandByShiftKey && currentCell) this._makeSelectionByTwoCells(currentCell, cursorCellRangeWithRangeType, skeleton, rangeType, activeSelectionControl);
|
|
2166
2156
|
else if (remainLastEnable && activeSelectionControl) activeSelectionControl.updateRangeBySelectionWithCoord(selectionCellWithCoord);
|
|
2167
2157
|
else activeSelectionControl = this.newSelectionControl(scene, skeleton, selectionWithStyle);
|
|
@@ -2734,8 +2724,8 @@ const useLeftAndRightArrow = (isNeed, shouldMoveSelection, editor, onMoveInEdito
|
|
|
2734
2724
|
if (keycode === KeyCode.ARROW_DOWN) direction = Direction.DOWN;
|
|
2735
2725
|
else if (keycode === KeyCode.ARROW_UP) direction = Direction.UP;
|
|
2736
2726
|
else if (keycode === KeyCode.ARROW_RIGHT) direction = Direction.RIGHT;
|
|
2737
|
-
if (metaKey === MetaKeys.SHIFT) commandService.
|
|
2738
|
-
else commandService.
|
|
2727
|
+
if (metaKey === MetaKeys.SHIFT) return commandService.syncExecuteCommand(MoveSelectionOperation.id, { direction });
|
|
2728
|
+
else return commandService.syncExecuteCommand(MoveCursorOperation.id, { direction });
|
|
2739
2729
|
};
|
|
2740
2730
|
const handleKeycode = (keycode, metaKey) => {
|
|
2741
2731
|
let direction = Direction.DOWN;
|
|
@@ -2745,35 +2735,38 @@ const useLeftAndRightArrow = (isNeed, shouldMoveSelection, editor, onMoveInEdito
|
|
|
2745
2735
|
else if (keycode === KeyCode.ARROW_RIGHT) direction = Direction.RIGHT;
|
|
2746
2736
|
if (shouldMoveSelectionRef.current) {
|
|
2747
2737
|
var _getRefSelectionCount;
|
|
2748
|
-
const
|
|
2749
|
-
|
|
2738
|
+
const refSelectionCount = ((_getRefSelectionCount = getRefSelectionCountRef.current) === null || _getRefSelectionCount === void 0 ? void 0 : _getRefSelectionCount.call(getRefSelectionCountRef)) ?? 0;
|
|
2739
|
+
const fromCurrentSelection = shouldMoveFormulaSelectionFromCurrentSelection(shouldMoveSelectionRef.current, refSelectionCount);
|
|
2740
|
+
if (metaKey === MetaKeys.CTRL_COMMAND) return commandService.executeCommand(MoveSelectionCommand.id, {
|
|
2750
2741
|
direction,
|
|
2751
2742
|
jumpOver: JumpOver.moveGap,
|
|
2752
2743
|
extra: "formula-editor",
|
|
2753
2744
|
fromCurrentSelection
|
|
2754
2745
|
});
|
|
2755
|
-
else if (metaKey === MetaKeys.SHIFT) commandService.executeCommand(ExpandSelectionCommand.id, {
|
|
2746
|
+
else if (metaKey === MetaKeys.SHIFT) return commandService.executeCommand(ExpandSelectionCommand.id, {
|
|
2756
2747
|
direction,
|
|
2757
|
-
extra: "formula-editor"
|
|
2748
|
+
extra: "formula-editor",
|
|
2749
|
+
fromCurrentSelection: refSelectionCount === 0
|
|
2758
2750
|
});
|
|
2759
|
-
else if (metaKey === (MetaKeys.CTRL_COMMAND | MetaKeys.SHIFT)) commandService.executeCommand(ExpandSelectionCommand.id, {
|
|
2751
|
+
else if (metaKey === (MetaKeys.CTRL_COMMAND | MetaKeys.SHIFT)) return commandService.executeCommand(ExpandSelectionCommand.id, {
|
|
2760
2752
|
direction,
|
|
2761
2753
|
jumpOver: JumpOver.moveGap,
|
|
2762
|
-
extra: "formula-editor"
|
|
2754
|
+
extra: "formula-editor",
|
|
2755
|
+
fromCurrentSelection: refSelectionCount === 0
|
|
2763
2756
|
});
|
|
2764
|
-
else commandService.executeCommand(MoveSelectionCommand.id, {
|
|
2757
|
+
else return commandService.executeCommand(MoveSelectionCommand.id, {
|
|
2765
2758
|
direction,
|
|
2766
2759
|
extra: "formula-editor",
|
|
2767
2760
|
fromCurrentSelection
|
|
2768
2761
|
});
|
|
2769
|
-
} else handleMoveInEditor(keycode, metaKey);
|
|
2762
|
+
} else return handleMoveInEditor(keycode, metaKey);
|
|
2770
2763
|
};
|
|
2771
2764
|
d.add(commandService.registerCommand({
|
|
2772
2765
|
id: operationId,
|
|
2773
2766
|
type: CommandType.OPERATION,
|
|
2774
2767
|
handler(_event, params) {
|
|
2775
2768
|
const { keyCode, metaKey } = params;
|
|
2776
|
-
handleKeycode(keyCode, metaKey);
|
|
2769
|
+
return handleKeycode(keyCode, metaKey);
|
|
2777
2770
|
}
|
|
2778
2771
|
}));
|
|
2779
2772
|
[
|
|
@@ -2833,7 +2826,7 @@ const useLeftAndRightArrow = (isNeed, shouldMoveSelection, editor, onMoveInEdito
|
|
|
2833
2826
|
return {
|
|
2834
2827
|
id: operationId,
|
|
2835
2828
|
binding: metaKey ? keyCode | metaKey : keyCode,
|
|
2836
|
-
preconditions: shouldHandleShortcut,
|
|
2829
|
+
preconditions: () => shouldHandleShortcut() && (!(metaKey && metaKey & MetaKeys.CTRL_COMMAND) || Boolean(shouldMoveSelectionRef.current)),
|
|
2837
2830
|
priority: 900,
|
|
2838
2831
|
staticParameters: {
|
|
2839
2832
|
eventType: DeviceInputEventType.Keyboard,
|
|
@@ -4391,6 +4384,7 @@ const MobileFormulaEditor = forwardRef((props, ref) => {
|
|
|
4391
4384
|
element: formulaEditorContainer
|
|
4392
4385
|
}));
|
|
4393
4386
|
collection.add(registerFormulaEditorRuntimePortal({
|
|
4387
|
+
editorService,
|
|
4394
4388
|
embedId: scope.embedId,
|
|
4395
4389
|
editorId,
|
|
4396
4390
|
ownerDocument: formulaEditorContainer.ownerDocument,
|
|
@@ -4400,6 +4394,7 @@ const MobileFormulaEditor = forwardRef((props, ref) => {
|
|
|
4400
4394
|
return () => collection.dispose();
|
|
4401
4395
|
}, [
|
|
4402
4396
|
editorId,
|
|
4397
|
+
editorService,
|
|
4403
4398
|
injector,
|
|
4404
4399
|
isFocus
|
|
4405
4400
|
]);
|
|
@@ -4543,10 +4538,9 @@ const MobileFormulaEditor = forwardRef((props, ref) => {
|
|
|
4543
4538
|
contextService.setContextValue(MOBILE_FORMULA_FUNCTION_PANEL_OPEN, false);
|
|
4544
4539
|
});
|
|
4545
4540
|
};
|
|
4546
|
-
const handleMouseUp = (
|
|
4541
|
+
const handleMouseUp = () => {
|
|
4547
4542
|
if (hasActiveFormulaEmbedInteraction(formulaEditorContainerRef.current)) return;
|
|
4548
4543
|
if (!shouldRefocusFormulaEditorOnMouseUp({
|
|
4549
|
-
target: event.target,
|
|
4550
4544
|
isFocusing,
|
|
4551
4545
|
isPointerSelecting: docSelectionRenderService === null || docSelectionRenderService === void 0 ? void 0 : docSelectionRenderService.isOnPointerEvent
|
|
4552
4546
|
})) return;
|
|
@@ -5212,6 +5206,7 @@ function RangeSelector(props) {
|
|
|
5212
5206
|
const { className, onVerify, selectorRef, unitId, subUnitId, maxRangeCount, supportAcrossSheet, keepSheetReference, autoFocus, onChange, onRangeSelectorDialogVisibleChange, onClickOutside, onFocusChange, forceShowDialogWhenSelectionChanged, hideEditor, resetRange, onClose } = props;
|
|
5213
5207
|
const [focusing, setFocusing] = useState(autoFocus ?? false);
|
|
5214
5208
|
const [popupVisible, setPopupVisible] = useState(false);
|
|
5209
|
+
const [tooltipVisible, setTooltipVisible] = useState(false);
|
|
5215
5210
|
const [rangeSelectorRanges, setRangeSelectorRanges] = useState([]);
|
|
5216
5211
|
const editorService = useDependency(IEditorService);
|
|
5217
5212
|
const { sequenceNodes } = useRangesHighlight(editor, focusing, unitId, subUnitId);
|
|
@@ -5225,6 +5220,7 @@ function RangeSelector(props) {
|
|
|
5225
5220
|
});
|
|
5226
5221
|
const handleOpenModal = useEvent(() => {
|
|
5227
5222
|
var _editor$getDocumentDa;
|
|
5223
|
+
setTooltipVisible(false);
|
|
5228
5224
|
blurEditor();
|
|
5229
5225
|
setRangeSelectorRanges(parseRanges((editor === null || editor === void 0 || (_editor$getDocumentDa = editor.getDocumentDataModel()) === null || _editor$getDocumentDa === void 0 ? void 0 : _editor$getDocumentDa.getPlainText()) ?? ""));
|
|
5230
5226
|
setPopupVisible(true);
|
|
@@ -5241,6 +5237,7 @@ function RangeSelector(props) {
|
|
|
5241
5237
|
blur: blurEditor,
|
|
5242
5238
|
verify: () => verifyRange(sequenceNodesRef.current),
|
|
5243
5239
|
showDialog: (ranges) => {
|
|
5240
|
+
setTooltipVisible(false);
|
|
5244
5241
|
blurEditor();
|
|
5245
5242
|
setRangeSelectorRanges(ranges);
|
|
5246
5243
|
setPopupVisible(true);
|
|
@@ -5296,6 +5293,8 @@ function RangeSelector(props) {
|
|
|
5296
5293
|
icon: /* @__PURE__ */ jsx(Tooltip, {
|
|
5297
5294
|
title: localeService.t("sheets-formula-ui.rangeSelector.buttonTooltip"),
|
|
5298
5295
|
placement: "bottom",
|
|
5296
|
+
visible: tooltipVisible && !popupVisible,
|
|
5297
|
+
onVisibleChange: (visible) => setTooltipVisible(visible && !popupVisible),
|
|
5299
5298
|
children: /* @__PURE__ */ jsx(SelectRangeIcon, {
|
|
5300
5299
|
className: "-univer-translate-y-0.5 univer-cursor-pointer dark:!univer-text-gray-300",
|
|
5301
5300
|
onClick: handleOpenModal
|
|
@@ -5327,6 +5326,7 @@ function RangeSelector(props) {
|
|
|
5327
5326
|
keepSheetReference,
|
|
5328
5327
|
onShowBySelection: (ranges) => {
|
|
5329
5328
|
if (focusing || forceShowDialogWhenSelectionChanged) {
|
|
5329
|
+
setTooltipVisible(false);
|
|
5330
5330
|
setRangeSelectorRanges(ranges);
|
|
5331
5331
|
setPopupVisible(true);
|
|
5332
5332
|
return false;
|
|
@@ -6763,6 +6763,7 @@ const FormulaEditor = forwardRef((props, ref) => {
|
|
|
6763
6763
|
element: formulaEditorContainer
|
|
6764
6764
|
}));
|
|
6765
6765
|
collection.add(registerFormulaEditorRuntimePortal({
|
|
6766
|
+
editorService,
|
|
6766
6767
|
embedId: scope.embedId,
|
|
6767
6768
|
editorId,
|
|
6768
6769
|
ownerDocument: formulaEditorContainer.ownerDocument,
|
|
@@ -6772,6 +6773,7 @@ const FormulaEditor = forwardRef((props, ref) => {
|
|
|
6772
6773
|
return () => collection.dispose();
|
|
6773
6774
|
}, [
|
|
6774
6775
|
editorId,
|
|
6776
|
+
editorService,
|
|
6775
6777
|
injector,
|
|
6776
6778
|
isFocus
|
|
6777
6779
|
]);
|
|
@@ -6865,10 +6867,9 @@ const FormulaEditor = forwardRef((props, ref) => {
|
|
|
6865
6867
|
highlight(`=${res.text}`);
|
|
6866
6868
|
}
|
|
6867
6869
|
};
|
|
6868
|
-
const handleMouseUp = (
|
|
6870
|
+
const handleMouseUp = () => {
|
|
6869
6871
|
if (hasActiveFormulaEmbedInteraction(formulaEditorContainerRef.current)) return;
|
|
6870
6872
|
if (!shouldRefocusFormulaEditorOnMouseUp({
|
|
6871
|
-
target: event.target,
|
|
6872
6873
|
isFocusing,
|
|
6873
6874
|
isPointerSelecting: docSelectionRenderService === null || docSelectionRenderService === void 0 ? void 0 : docSelectionRenderService.isOnPointerEvent
|
|
6874
6875
|
})) return;
|
|
@@ -7083,4 +7084,4 @@ UniverSheetsFormulaUIPlugin = __decorate([
|
|
|
7083
7084
|
], UniverSheetsFormulaUIPlugin);
|
|
7084
7085
|
|
|
7085
7086
|
//#endregion
|
|
7086
|
-
export { FORMULA_PROMPT_ACTIVATED, FormulaEditor, FormulaReorderController, GlobalRangeSelectorService, HelpFunctionOperation, InsertFunctionOperation, MobileRangeSelector, MoreFunctionsOperation, RangeSelector, RefSelectionsRenderService, ReferenceAbsoluteOperation, SearchFunctionOperation, SheetCopyFormulaOnlyCommand, SheetOnlyPasteFormulaCommand, menuSchema as SheetsFormulaUIMenuSchema, UniverSheetsFormulaMobileUIPlugin, UniverSheetsFormulaUIPlugin, genFormulaRefSelectionStyle };
|
|
7087
|
+
export { FORMULA_PROMPT_ACTIVATED, FormulaEditor, FormulaReorderController, GlobalRangeSelectorService, HelpFunctionOperation, InsertFunctionOperation, MORE_FUNCTIONS_COMPONENT, MobileRangeSelector, MoreFunctionsOperation, RangeSelector, RefSelectionsRenderService, ReferenceAbsoluteOperation, SearchFunctionOperation, SheetCopyFormulaOnlyCommand, SheetOnlyPasteFormulaCommand, menuSchema as SheetsFormulaUIMenuSchema, UniverSheetsFormulaMobileUIPlugin, UniverSheetsFormulaUIPlugin, genFormulaRefSelectionStyle };
|
package/lib/types/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export type { IShowRangeSelectorDialogOptions } from './services/range-selector.
|
|
|
32
32
|
export { RefSelectionsRenderService } from './services/render-services/ref-selections.render.service';
|
|
33
33
|
export { FormulaEditor } from './views/formula-editor/index';
|
|
34
34
|
export type { IFormulaEditorRef } from './views/formula-editor/index';
|
|
35
|
+
export { MORE_FUNCTIONS_COMPONENT } from './views/more-functions/interface';
|
|
35
36
|
export { RangeSelector } from './views/range-selector/index';
|
|
36
37
|
export type { IRangeSelectorInstance, IRangeSelectorProps } from './views/range-selector/index';
|
|
37
38
|
export { MobileRangeSelector } from './views/range-selector/MobileRangeSelector';
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { IDisposable } from '@univerjs/core';
|
|
17
|
+
import type { IEditorService } from '@univerjs/docs-ui';
|
|
17
18
|
export declare const FORMULA_EMBED_INTERACTION_BOUNDARY_OWNER_ATTRIBUTE = "data-embed-interaction-boundary-owner";
|
|
18
19
|
export declare const FORMULA_EMBED_RUNTIME_FOCUS_ROLE_ATTRIBUTE = "data-embed-runtime-focus-role";
|
|
19
20
|
export declare const FORMULA_EMBED_ID_ATTRIBUTE = "data-embed-id";
|
|
@@ -48,6 +49,7 @@ export declare const IFormulaEmbedInteractionBoundaryService: import("@wendellhu
|
|
|
48
49
|
interface IRegisterFormulaEditorRuntimePortalOptions {
|
|
49
50
|
embedId: string;
|
|
50
51
|
editorId: string;
|
|
52
|
+
editorService: IEditorService;
|
|
51
53
|
ownerDocument?: Document;
|
|
52
54
|
interactionBoundaryService?: IFormulaEmbedInteractionBoundaryService;
|
|
53
55
|
focusCoordinator?: IFormulaEmbedRuntimeFocusCoordinator;
|
|
@@ -15,12 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { Editor } from '@univerjs/docs-ui';
|
|
17
17
|
import { IEditorService } from '@univerjs/docs-ui';
|
|
18
|
-
export declare function focusFormulaEditor(editorService: Pick<IEditorService, 'focus'>, editor?: Pick<Editor, 'getEditorId' | 'getSelectionRanges' | 'setSelectionRanges' | 'getDocumentData' | 'docSelectionRenderService'
|
|
19
|
-
editorDOM?: HTMLElement;
|
|
20
|
-
}, offset?: number): void;
|
|
21
|
-
export declare function shouldSkipFormulaEditorMouseUpFocus(_target: EventTarget | null): boolean;
|
|
18
|
+
export declare function focusFormulaEditor(editorService: Pick<IEditorService, 'focus'>, editor?: Pick<Editor, 'getEditorId' | 'getSelectionRanges' | 'setSelectionRanges' | 'getDocumentData' | 'docSelectionRenderService'>, offset?: number): void;
|
|
22
19
|
export declare function shouldRefocusFormulaEditorOnMouseUp(options: {
|
|
23
|
-
target: EventTarget | null;
|
|
24
20
|
isFocusing: boolean | undefined;
|
|
25
21
|
isPointerSelecting: boolean | undefined;
|
|
26
22
|
}): boolean;
|