@univerjs/sheets-ui 0.4.0 → 0.4.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/lib/cjs/index.js +1 -1
- package/lib/es/index.js +14 -10
- package/lib/umd/index.js +1 -1
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { KeyCode, IConfirmService, ISidebarService, IDialogService, ComponentMan
|
|
|
11
11
|
import { DocSkeletonManagerService, SetTextSelectionsOperation, DocSelectionManagerService, RichTextEditingMutation } from "@univerjs/docs";
|
|
12
12
|
import React, { forwardRef, useRef, createElement, useState, useEffect, useMemo, useCallback, useLayoutEffect } from "react";
|
|
13
13
|
import { Dropdown, ColorPicker, Menu, MenuItem, InputNumber, Input, RadioGroup, Radio, Select, Button, Tooltip, Confirm, Slider, MessageType, Avatar, FormLayout, Switch } from "@univerjs/design";
|
|
14
|
-
import { IDefinedNamesService, IFunctionService, LexerTreeBuilder, operatorToken, isReferenceStrings, isReferenceStringWithEffectiveColumn, serializeRangeWithSheet, FUNCTION_NAMES_STATISTICAL, FUNCTION_NAMES_MATH, FUNCTION_NAMES_TEXT, sequenceNodeType, matchToken, deserializeRangeWithSheet, NullValueObject, serializeRange } from "@univerjs/engine-formula";
|
|
14
|
+
import { IDefinedNamesService, IFunctionService, LexerTreeBuilder, operatorToken, isReferenceStrings, isReferenceStringWithEffectiveColumn, serializeRangeWithSheet, FUNCTION_NAMES_STATISTICAL, FUNCTION_NAMES_MATH, FUNCTION_NAMES_TEXT, sequenceNodeType, matchToken, deserializeRangeWithSheet, NullValueObject, serializeRange, SetFormulaCalculationNotificationMutation } from "@univerjs/engine-formula";
|
|
15
15
|
import { filter as filter$1 } from "rxjs/operators";
|
|
16
16
|
import { ITelemetryService } from "@univerjs/telemetry";
|
|
17
17
|
var SheetsUIPart = /* @__PURE__ */ ((SheetsUIPart2) => (SheetsUIPart2.FILTER_PANEL_EMBED_POINT = "filter-panel-embed-point", SheetsUIPart2.SHEETS_FOOTER = "sheets-footer", SheetsUIPart2))(SheetsUIPart || {});
|
|
@@ -20879,14 +20879,18 @@ let EditorBridgeRenderController = (_a50 = class extends RxDisposable {
|
|
|
20879
20879
|
* @param d DisposableCollection
|
|
20880
20880
|
*/
|
|
20881
20881
|
_initialKeyboardListener(d) {
|
|
20882
|
-
|
|
20883
|
-
const
|
|
20884
|
-
|
|
20885
|
-
|
|
20886
|
-
|
|
20887
|
-
|
|
20888
|
-
|
|
20889
|
-
|
|
20882
|
+
let disposable = null;
|
|
20883
|
+
const addEvent = /* @__PURE__ */ __name((render22) => {
|
|
20884
|
+
const docSelectionRenderService = render22.with(DocSelectionRenderService);
|
|
20885
|
+
docSelectionRenderService && (disposable = toDisposable(docSelectionRenderService.onInputBefore$.subscribe((config) => {
|
|
20886
|
+
if (!this._isCurrentSheetFocused())
|
|
20887
|
+
return;
|
|
20888
|
+
const isFocusFormulaEditor = this._contextService.getContextValue(FOCUSING_FX_BAR_EDITOR), isFocusSheets = this._contextService.getContextValue(FOCUSING_SHEET), unitId = render22.unitId;
|
|
20889
|
+
this._editorBridgeService.isVisible().visible || unitId && isFocusSheets && !isFocusFormulaEditor && this._editorService.isSheetEditor(unitId) && this._showEditorByKeyboard(config);
|
|
20890
|
+
})), d.add(disposable));
|
|
20891
|
+
}, "addEvent"), render2 = this._renderManagerService.getRenderById(DOCS_NORMAL_EDITOR_UNIT_ID_KEY);
|
|
20892
|
+
render2 ? addEvent(render2) : this.disposeWithMe(this._renderManagerService.created$.pipe(filter((render22) => render22.unitId === DOCS_NORMAL_EDITOR_UNIT_ID_KEY)).subscribe((render22) => {
|
|
20893
|
+
disposable == null || disposable.dispose(), addEvent(render22);
|
|
20890
20894
|
}));
|
|
20891
20895
|
}
|
|
20892
20896
|
_commandExecutedListener(d) {
|
|
@@ -21590,7 +21594,7 @@ let SheetRenderController = (_a54 = class extends RxDisposable {
|
|
|
21590
21594
|
}
|
|
21591
21595
|
_markUnitDirty(unitId, command) {
|
|
21592
21596
|
const { mainComponent: spreadsheet, scene } = this._context;
|
|
21593
|
-
if (spreadsheet && spreadsheet.makeDirty(), scene.makeDirty(), !command.params) return;
|
|
21597
|
+
if (command.id === SetFormulaCalculationNotificationMutation.id && command.params.stageInfo != null || (spreadsheet && spreadsheet.makeDirty(), scene.makeDirty(), !command.params)) return;
|
|
21594
21598
|
const cmdParams = command.params, viewports = this._spreadsheetViewports(scene);
|
|
21595
21599
|
if (command.id === SetRangeValuesMutation.id && cmdParams.cellValue) {
|
|
21596
21600
|
const dirtyRange = this._cellValueToRange(cmdParams.cellValue), dirtyBounds = this._rangeToBounds([dirtyRange]);
|