@univerjs/sheets-formula-ui 0.4.2 → 0.5.0-beta.0
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 +9 -7
- package/lib/cjs/locale/en-US.js +40 -0
- package/lib/cjs/locale/fa-IR.js +40 -0
- package/lib/cjs/locale/ru-RU.js +40 -0
- package/lib/cjs/locale/vi-VN.js +37 -0
- package/lib/cjs/locale/zh-CN.js +38 -0
- package/lib/cjs/locale/zh-TW.js +38 -0
- package/lib/es/index.js +3431 -2453
- package/lib/es/locale/en-US.js +7684 -0
- package/lib/es/locale/fa-IR.js +7684 -0
- package/lib/es/locale/ru-RU.js +7683 -0
- package/lib/es/locale/vi-VN.js +7467 -0
- package/lib/es/locale/zh-CN.js +7661 -0
- package/lib/es/locale/zh-TW.js +7661 -0
- package/lib/index.css +1 -1
- package/lib/types/common/selection.d.ts +1 -1
- package/lib/types/controllers/config.schema.d.ts +1 -1
- package/lib/types/controllers/formula-editor-show.controller.d.ts +7 -3
- package/lib/types/index.d.ts +1 -0
- package/lib/types/locale/en-US.d.ts +344 -156
- package/lib/types/locale/fa-IR.d.ts +344 -156
- package/lib/types/locale/function-list/compatibility/en-US.d.ts +106 -30
- package/lib/types/locale/function-list/compatibility/ja-JP.d.ts +106 -30
- package/lib/types/locale/function-list/compatibility/vi-VN.d.ts +106 -30
- package/lib/types/locale/function-list/compatibility/zh-CN.d.ts +106 -30
- package/lib/types/locale/function-list/compatibility/zh-TW.d.ts +106 -30
- package/lib/types/locale/function-list/lookup/en-US.d.ts +1 -5
- package/lib/types/locale/function-list/lookup/ja-JP.d.ts +1 -5
- package/lib/types/locale/function-list/lookup/vi-VN.d.ts +14 -0
- package/lib/types/locale/function-list/lookup/zh-CN.d.ts +1 -5
- package/lib/types/locale/function-list/lookup/zh-TW.d.ts +1 -5
- package/lib/types/locale/function-list/statistical/en-US.d.ts +173 -93
- package/lib/types/locale/function-list/statistical/ja-JP.d.ts +173 -93
- package/lib/types/locale/function-list/statistical/vi-VN.d.ts +983 -57
- package/lib/types/locale/function-list/statistical/zh-CN.d.ts +173 -93
- package/lib/types/locale/function-list/statistical/zh-TW.d.ts +173 -93
- package/lib/types/locale/function-list/text/en-US.d.ts +64 -28
- package/lib/types/locale/function-list/text/ja-JP.d.ts +64 -28
- package/lib/types/locale/function-list/text/ru-RU.d.ts +220 -106
- package/lib/types/locale/function-list/text/vi-VN.d.ts +124 -14
- package/lib/types/locale/function-list/text/zh-CN.d.ts +64 -28
- package/lib/types/locale/function-list/text/zh-TW.d.ts +64 -28
- package/lib/types/locale/ru-RU.d.ts +500 -234
- package/lib/types/locale/vi-VN.d.ts +1231 -105
- package/lib/types/locale/zh-CN.d.ts +344 -156
- package/lib/types/locale/zh-TW.d.ts +344 -156
- package/lib/types/services/render-services/ref-selections.render-service.d.ts +28 -4
- package/lib/types/sheets-formula-ui.plugin.d.ts +0 -1
- package/lib/types/views/formula-editor/help-function/HelpFunction.d.ts +11 -0
- package/lib/types/views/formula-editor/hooks/useFormulaDescribe.d.ts +7 -0
- package/lib/types/views/formula-editor/hooks/useFormulaSearch.d.ts +12 -0
- package/lib/types/views/formula-editor/hooks/useResizeScrollObserver.d.ts +18 -0
- package/lib/types/views/formula-editor/hooks/useSelectionAdd.d.ts +19 -0
- package/lib/types/views/formula-editor/hooks/useSheetSelectionChange.d.ts +3 -0
- package/lib/types/views/formula-editor/hooks/useStateRef.d.ts +18 -0
- package/lib/types/views/formula-editor/hooks/useVerify.d.ts +2 -0
- package/lib/types/views/formula-editor/index.d.ts +17 -0
- package/lib/types/views/formula-editor/search-function/SearchFunction.d.ts +12 -0
- package/lib/types/{controllers/utils/__tests__/ref-range-formula.spec.d.ts → views/formula-editor/utils/getFormulaText.d.ts} +1 -1
- package/lib/types/views/range-selector/hooks/useEmitChange.d.ts +3 -0
- package/lib/types/views/range-selector/hooks/useFirstHighlightDoc.d.ts +3 -0
- package/lib/types/views/range-selector/hooks/useFocus.d.ts +2 -0
- package/lib/types/views/range-selector/hooks/useFormulaToken.d.ts +2 -4
- package/lib/types/views/range-selector/hooks/useHighlight.d.ts +4 -2
- package/lib/types/views/range-selector/hooks/useLeftAndRightArrow.d.ts +2 -0
- package/lib/types/views/range-selector/hooks/useOnlyOneRange.d.ts +16 -0
- package/lib/types/views/range-selector/hooks/useRefactorEffect.d.ts +1 -1
- package/lib/types/{controllers/utils/__tests__/offset-formula-data.spec.d.ts → views/range-selector/hooks/useRefocus.d.ts} +1 -1
- package/lib/types/views/range-selector/hooks/useResetSelection.d.ts +16 -0
- package/lib/types/views/range-selector/hooks/useSheetSelectionChange.d.ts +1 -1
- package/lib/types/views/range-selector/hooks/useSwitchSheet.d.ts +16 -0
- package/lib/types/views/range-selector/hooks/useVerify.d.ts +2 -2
- package/lib/types/views/range-selector/index.d.ts +1 -5
- package/lib/types/views/range-selector/utils/unitRangesToText.d.ts +1 -1
- package/lib/umd/index.js +9 -7
- package/lib/umd/locale/en-US.js +40 -0
- package/lib/umd/locale/fa-IR.js +40 -0
- package/lib/umd/locale/ru-RU.js +40 -0
- package/lib/umd/locale/vi-VN.js +37 -0
- package/lib/umd/locale/zh-CN.js +38 -0
- package/lib/umd/locale/zh-TW.js +38 -0
- package/package.json +33 -27
- package/lib/locale/en-US.json +0 -11054
- package/lib/locale/fa-IR.json +0 -11054
- package/lib/locale/ru-RU.json +0 -10969
- package/lib/locale/vi-VN.json +0 -9678
- package/lib/locale/zh-CN.json +0 -11054
- package/lib/locale/zh-TW.json +0 -11054
- package/lib/types/controllers/utils/offset-formula-data.d.ts +0 -15
- package/lib/types/controllers/utils/ref-range-formula.d.ts +0 -71
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IDisposable, Workbook, Injector, ThemeService } from '@univerjs/core';
|
|
2
|
-
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
1
|
+
import { IDisposable, Nullable, Workbook, Injector, RANGE_TYPE, ThemeService } from '@univerjs/core';
|
|
2
|
+
import { IMouseEvent, IPointerEvent, IRenderContext, IRenderModule, Scene, SpreadsheetSkeleton, Viewport, ScrollTimerType } from '@univerjs/engine-render';
|
|
3
3
|
import { ISelectionWithStyle, SheetsSelectionsService } from '@univerjs/sheets';
|
|
4
|
-
import { BaseSelectionRenderService, SheetSkeletonManagerService } from '@univerjs/sheets-ui';
|
|
4
|
+
import { BaseSelectionRenderService, SelectionControl, SheetSkeletonManagerService } from '@univerjs/sheets-ui';
|
|
5
5
|
import { IShortcutService } from '@univerjs/ui';
|
|
6
6
|
/**
|
|
7
7
|
* This service extends the existing `SelectionRenderService` to provide the rendering of prompt selections
|
|
@@ -34,6 +34,12 @@ export declare class RefSelectionsRenderService extends BaseSelectionRenderServi
|
|
|
34
34
|
enableSelectionChanging(): IDisposable;
|
|
35
35
|
private _disableSelectionChanging;
|
|
36
36
|
private _initCanvasEventListeners;
|
|
37
|
+
/**
|
|
38
|
+
* Add a selection in spreadsheet, create a new SelectionControl and then update this control by range derives from selection.
|
|
39
|
+
* For ref selection, create selectionShapeExtension to handle user action.
|
|
40
|
+
* @param {ISelectionWithCoord} selectionWithStyle
|
|
41
|
+
*/
|
|
42
|
+
protected _addSelectionControlByModelData(selectionWithStyle: ISelectionWithStyle): SelectionControl;
|
|
37
43
|
/**
|
|
38
44
|
* Update selectionModel in this._workbookSelections by user action in spreadsheet area.
|
|
39
45
|
*/
|
|
@@ -41,7 +47,25 @@ export declare class RefSelectionsRenderService extends BaseSelectionRenderServi
|
|
|
41
47
|
private _updateSelections;
|
|
42
48
|
private _initSelectionChangeListener;
|
|
43
49
|
private _initSkeletonChangeListener;
|
|
44
|
-
protected _refreshSelectionControl(selectionsData: readonly ISelectionWithStyle[]): void;
|
|
45
50
|
private _getActiveViewport;
|
|
46
51
|
private _getSheetObject;
|
|
52
|
+
/**
|
|
53
|
+
* Handle pointer down event, bind pointermove & pointerup handler.
|
|
54
|
+
* then trigger selectionMoveStart$.
|
|
55
|
+
*
|
|
56
|
+
* @param evt
|
|
57
|
+
* @param _zIndex
|
|
58
|
+
* @param rangeType
|
|
59
|
+
* @param viewport
|
|
60
|
+
* @param scrollTimerType
|
|
61
|
+
*/
|
|
62
|
+
protected _onPointerDown(evt: IPointerEvent | IMouseEvent, _zIndex: number | undefined, rangeType: RANGE_TYPE | undefined, viewport: Nullable<Viewport>, scrollTimerType?: ScrollTimerType): void;
|
|
63
|
+
/**
|
|
64
|
+
* Diff between normal selection, no highlightHeader for ref selections.
|
|
65
|
+
* @param scene
|
|
66
|
+
* @param skeleton
|
|
67
|
+
* @param selectionWithCoord
|
|
68
|
+
* @returns {SelectionControl} selectionControl just created
|
|
69
|
+
*/
|
|
70
|
+
newSelectionControl(scene: Scene, skeleton: SpreadsheetSkeleton, selection: ISelectionWithStyle): SelectionControl;
|
|
47
71
|
}
|
|
@@ -13,7 +13,6 @@ export declare class UniverSheetsFormulaUIPlugin extends Plugin {
|
|
|
13
13
|
static type: UniverInstanceType;
|
|
14
14
|
constructor(_config: Partial<IUniverSheetsFormulaBaseConfig> | undefined, _injector: Injector, _renderManagerService: IRenderManagerService, _configService: IConfigService);
|
|
15
15
|
onStarting(): void;
|
|
16
|
-
onReady(): void;
|
|
17
16
|
onRendered(): void;
|
|
18
17
|
onSteady(): void;
|
|
19
18
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IFunctionInfo } from '@univerjs/engine-formula';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
interface IHelpFunctionProps {
|
|
4
|
+
functionInfo?: IFunctionInfo;
|
|
5
|
+
paramIndex: number;
|
|
6
|
+
editorId: string;
|
|
7
|
+
onParamsSwitch?: (index: number) => void;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function HelpFunction(props: IHelpFunctionProps): React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Editor } from '@univerjs/docs-ui';
|
|
2
|
+
import { IFunctionInfo } from '@univerjs/engine-formula';
|
|
3
|
+
export declare const useFormulaDescribe: (isNeed: boolean, formulaText: string, editor?: Editor) => {
|
|
4
|
+
functionInfo: IFunctionInfo | undefined;
|
|
5
|
+
paramIndex: number;
|
|
6
|
+
reset: () => void;
|
|
7
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Editor } from '@univerjs/docs-ui';
|
|
2
|
+
import { ISearchItem } from '@univerjs/sheets-formula';
|
|
3
|
+
import { INode } from '../../range-selector/hooks/useFormulaToken';
|
|
4
|
+
export declare const useFormulaSearch: (isNeed: boolean, nodes?: INode[], editor?: Editor) => {
|
|
5
|
+
searchList: ISearchItem[];
|
|
6
|
+
searchText: string;
|
|
7
|
+
handlerFormulaReplace: (formulaName: string) => {
|
|
8
|
+
text: string;
|
|
9
|
+
offset: number;
|
|
10
|
+
} | undefined;
|
|
11
|
+
reset: () => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
type Callback = () => void;
|
|
17
|
+
export declare const useResizeScrollObserver: (callback: Callback, delay?: number) => void;
|
|
18
|
+
export default useResizeScrollObserver;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Editor } from '@univerjs/docs-ui';
|
|
2
|
+
import { INode } from '../../range-selector/utils/filterReferenceNode';
|
|
3
|
+
/**
|
|
4
|
+
* 根据输入内容,以及当前光标位置判断下一个 mouseDown 事件是不是需要新增选区
|
|
5
|
+
*
|
|
6
|
+
* @param {string} unitId
|
|
7
|
+
* @param {INode[]} sequenceNodes
|
|
8
|
+
* @param {Editor} [editor]
|
|
9
|
+
* @return {*}
|
|
10
|
+
*/
|
|
11
|
+
export declare const useSelectionAdd: (unitId: string, sequenceNodes: INode[], editor?: Editor) => {
|
|
12
|
+
setIsAddSelection: (v: boolean) => void;
|
|
13
|
+
getIsNeedAddSelection: () => boolean;
|
|
14
|
+
isLockSelectionEvent: {
|
|
15
|
+
getValue: () => boolean;
|
|
16
|
+
setValue: (v: boolean) => void;
|
|
17
|
+
reset: () => void;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Editor } from '@univerjs/docs-ui';
|
|
2
|
+
import { INode } from '../../range-selector/utils/filterReferenceNode';
|
|
3
|
+
export declare const useSheetSelectionChange: (isNeed: boolean, unitId: string, subUnitId: string, sequenceNodes: INode[], isSupportAcrossSheet: boolean, editor?: Editor, handleRangeChange?: ((refString: string, offset: number, isEnd: boolean) => void)) => void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare const useStateRef: <T = any>(value: T) => {
|
|
17
|
+
current: T;
|
|
18
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode, default as React } from 'react';
|
|
2
|
+
export interface IFormulaEditorProps {
|
|
3
|
+
unitId: string;
|
|
4
|
+
subUnitId: string;
|
|
5
|
+
initValue: `=${string}`;
|
|
6
|
+
onChange: (text: string) => void;
|
|
7
|
+
errorText?: string | ReactNode;
|
|
8
|
+
onVerify?: (res: boolean, result: string) => void;
|
|
9
|
+
isFocus?: boolean;
|
|
10
|
+
onFocus?: () => void;
|
|
11
|
+
onBlur?: () => void;
|
|
12
|
+
isSupportAcrossSheet?: boolean;
|
|
13
|
+
actions?: {
|
|
14
|
+
handleOutClick?: (e: MouseEvent, cb: () => void) => void;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare function FormulaEditor(props: IFormulaEditorProps): React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ISearchItem } from '@univerjs/sheets-formula';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
interface ISearchFunctionProps {
|
|
4
|
+
searchList: ISearchItem[];
|
|
5
|
+
searchText: string;
|
|
6
|
+
onSelect: (functionName: string) => void;
|
|
7
|
+
onChange?: (functionName: string) => void;
|
|
8
|
+
editorId: string;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const SearchFunction: React.ForwardRefExoticComponent<ISearchFunctionProps & React.RefAttributes<HTMLElement>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Editor } from '@univerjs/docs-ui';
|
|
2
|
+
import { useDocHight, useSheetHighlight } from './useHighlight';
|
|
3
|
+
export declare const useFirstHighlightDoc: (text: string, leadingCharacter: string, isNeed: boolean, highlightDoc: ReturnType<typeof useDocHight>, highlightSheet: ReturnType<typeof useSheetHighlight>, editor?: Editor) => void;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { ISequenceNode } from '@univerjs/engine-formula';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
sequenceNodesSet: import('react').Dispatch<import('react').SetStateAction<(string | ISequenceNode)[]>>;
|
|
5
|
-
};
|
|
2
|
+
export type INode = (string | ISequenceNode);
|
|
3
|
+
export declare const useFormulaToken: () => (text: string) => (string | ISequenceNode)[];
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ITextRun } from '@univerjs/core';
|
|
2
|
+
import { Editor } from '@univerjs/docs-ui';
|
|
2
3
|
import { ISequenceNode } from '@univerjs/engine-formula';
|
|
4
|
+
import { INode } from './useFormulaToken';
|
|
3
5
|
import { IDescriptionService } from '@univerjs/sheets-formula';
|
|
4
6
|
interface IRefSelection {
|
|
5
7
|
refIndex: number;
|
|
@@ -11,8 +13,8 @@ interface IRefSelection {
|
|
|
11
13
|
* @param {string} subUnitId 打开面板的时候传入的 sheetId
|
|
12
14
|
* @param {IRefSelection[]} refSelections
|
|
13
15
|
*/
|
|
14
|
-
export declare function useSheetHighlight(
|
|
15
|
-
export declare function useDocHight(
|
|
16
|
+
export declare function useSheetHighlight(unitId: string): (refSelections: IRefSelection[]) => void;
|
|
17
|
+
export declare function useDocHight(_leadingCharacter?: string): (editor: Editor, sequenceNodes: INode[], isNeedResetSelection?: boolean) => IRefSelection[];
|
|
16
18
|
export declare function useColor(): {
|
|
17
19
|
formulaRefColors: string[];
|
|
18
20
|
numberColor: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare const useOnlyOneRange: (unitId: string, isOnlyOneRange: boolean) => void;
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export declare const useRefactorEffect: (isNeed: boolean, unitId: string
|
|
16
|
+
export declare const useRefactorEffect: (isNeed: boolean, unitId: string) => void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare const useResetSelection: (isNeed: boolean) => () => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { INode } from '../utils/filterReferenceNode';
|
|
2
|
-
export declare const useSheetSelectionChange: (isNeed: boolean, unitId: string, _subUnitId: string, sequenceNodes: INode[], isSupportAcrossSheet: boolean, isOnlyOneRange: boolean, handleRangeChange: (refString: string, offset: number) => void) => void;
|
|
2
|
+
export declare const useSheetSelectionChange: (isNeed: boolean, unitId: string, _subUnitId: string, sequenceNodes: INode[], isSupportAcrossSheet: boolean, isOnlyOneRange: boolean, handleRangeChange: (refString: string, offset: number, isEnd: boolean) => void) => void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare const useSwitchSheet: (isNeed: boolean, unitId: string, isSupportAcrossSheet: boolean, isFocusSet: (v: boolean) => void, onBlur: () => void, refresh: () => void) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IRangeSelectorProps } from '../';
|
|
2
|
-
import {
|
|
3
|
-
export declare const useVerify: (onVerify: IRangeSelectorProps["onVerify"], sequenceNodes:
|
|
2
|
+
import { INode } from './useFormulaToken';
|
|
3
|
+
export declare const useVerify: (isNeed: boolean, onVerify: IRangeSelectorProps["onVerify"], sequenceNodes: INode[]) => void;
|
|
@@ -10,13 +10,9 @@ export interface IRangeSelectorProps {
|
|
|
10
10
|
placeholder?: string;
|
|
11
11
|
isFocus?: boolean;
|
|
12
12
|
onBlur?: () => void;
|
|
13
|
-
/**
|
|
14
|
-
* 暂无效果
|
|
15
|
-
* @memberof IRangeSelectorProps
|
|
16
|
-
*/
|
|
17
13
|
onFocus?: () => void;
|
|
18
14
|
actions?: {
|
|
19
|
-
handleOutClick?: (e:
|
|
15
|
+
handleOutClick?: (e: MouseEvent, cb: () => void) => void;
|
|
20
16
|
};
|
|
21
17
|
/**
|
|
22
18
|
* 是否只允许最多一个 range 区域,默认为 false。
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IUnitRangeName, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
export declare function getSheetIdByName(univerInstanceService: IUniverInstanceService, unitId: string, name: string): string;
|
|
3
3
|
export declare function getSheetNameById(univerInstanceService: IUniverInstanceService, unitId: string, sheetId: string): string;
|
|
4
|
-
export declare const unitRangesToText: (ranges: IUnitRangeName[],
|
|
4
|
+
export declare const unitRangesToText: (ranges: IUnitRangeName[], isNeedSheetName?: boolean) => string[];
|