@univerjs/sheets-ui 0.24.0 → 0.25.0-insiders.20260608-e4336f7
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/facade.js +209 -259
- package/lib/cjs/index.js +437 -381
- package/lib/cjs/locale/ar-SA.js +424 -0
- package/lib/cjs/locale/ca-ES.js +51 -91
- package/lib/cjs/locale/de-DE.js +424 -0
- package/lib/cjs/locale/en-US.js +51 -91
- package/lib/cjs/locale/es-ES.js +51 -91
- package/lib/cjs/locale/fa-IR.js +51 -91
- package/lib/cjs/locale/fr-FR.js +52 -92
- package/lib/cjs/locale/id-ID.js +424 -0
- package/lib/cjs/locale/it-IT.js +424 -0
- package/lib/cjs/locale/ja-JP.js +51 -91
- package/lib/cjs/locale/ko-KR.js +51 -91
- package/lib/cjs/locale/pl-PL.js +424 -0
- package/lib/cjs/locale/pt-BR.js +424 -0
- package/lib/cjs/locale/ru-RU.js +52 -92
- package/lib/cjs/locale/sk-SK.js +51 -91
- package/lib/cjs/locale/vi-VN.js +53 -93
- package/lib/cjs/locale/zh-CN.js +53 -93
- package/lib/cjs/locale/zh-HK.js +424 -0
- package/lib/cjs/locale/zh-TW.js +53 -93
- package/lib/es/facade.js +210 -260
- package/lib/es/index.js +442 -386
- package/lib/es/locale/ar-SA.js +423 -0
- package/lib/es/locale/ca-ES.js +51 -91
- package/lib/es/locale/de-DE.js +423 -0
- package/lib/es/locale/en-US.js +51 -91
- package/lib/es/locale/es-ES.js +51 -91
- package/lib/es/locale/fa-IR.js +51 -91
- package/lib/es/locale/fr-FR.js +52 -92
- package/lib/es/locale/id-ID.js +423 -0
- package/lib/es/locale/it-IT.js +423 -0
- package/lib/es/locale/ja-JP.js +51 -91
- package/lib/es/locale/ko-KR.js +51 -91
- package/lib/es/locale/pl-PL.js +423 -0
- package/lib/es/locale/pt-BR.js +423 -0
- package/lib/es/locale/ru-RU.js +52 -92
- package/lib/es/locale/sk-SK.js +51 -91
- package/lib/es/locale/vi-VN.js +53 -93
- package/lib/es/locale/zh-CN.js +53 -93
- package/lib/es/locale/zh-HK.js +423 -0
- package/lib/es/locale/zh-TW.js +53 -93
- package/lib/facade.js +210 -260
- package/lib/index.css +0 -5
- package/lib/index.js +442 -386
- package/lib/locale/ar-SA.js +423 -0
- package/lib/locale/ca-ES.js +51 -91
- package/lib/locale/de-DE.js +423 -0
- package/lib/locale/en-US.js +51 -91
- package/lib/locale/es-ES.js +51 -91
- package/lib/locale/fa-IR.js +51 -91
- package/lib/locale/fr-FR.js +52 -92
- package/lib/locale/id-ID.js +423 -0
- package/lib/locale/it-IT.js +423 -0
- package/lib/locale/ja-JP.js +51 -91
- package/lib/locale/ko-KR.js +51 -91
- package/lib/locale/pl-PL.js +423 -0
- package/lib/locale/pt-BR.js +423 -0
- package/lib/locale/ru-RU.js +52 -92
- package/lib/locale/sk-SK.js +51 -91
- package/lib/locale/vi-VN.js +53 -93
- package/lib/locale/zh-CN.js +53 -93
- package/lib/locale/zh-HK.js +423 -0
- package/lib/locale/zh-TW.js +53 -93
- package/lib/types/components/border-panel/BorderPanel.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/BorderLine.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderDashDot.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderDashDotDot.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderDashed.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderDotted.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderDouble.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderHair.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderMedium.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderMediumDashDot.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderMediumDashDotDot.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderMediumDashed.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderThick.d.ts +1 -1
- package/lib/types/components/border-panel/border-line/icons/BorderThin.d.ts +1 -1
- package/lib/types/components/menu-item-frozen/MenuItemFrozen.d.ts +1 -1
- package/lib/types/components/menu-item-input/MenuItemInput.d.ts +1 -1
- package/lib/types/facade/f-event.d.ts +4 -4
- package/lib/types/facade/f-range.d.ts +16 -8
- package/lib/types/facade/f-univer.d.ts +9 -20
- package/lib/types/facade/f-workbook.d.ts +5 -55
- package/lib/types/facade/f-worksheet.d.ts +33 -22
- package/lib/types/facade/index.d.ts +0 -4
- package/lib/types/locale/ar-SA.d.ts +18 -0
- package/lib/types/locale/de-DE.d.ts +18 -0
- package/lib/types/locale/en-US.d.ts +406 -442
- package/lib/types/locale/id-ID.d.ts +18 -0
- package/lib/types/locale/it-IT.d.ts +18 -0
- package/lib/types/locale/pl-PL.d.ts +18 -0
- package/lib/types/locale/pt-BR.d.ts +18 -0
- package/lib/types/locale/zh-HK.d.ts +18 -0
- package/lib/types/views/auto-fill-popup-menu/AutoFillPopupMenu.d.ts +1 -1
- package/lib/types/views/cell-alert/CellAlertPopup.d.ts +1 -1
- package/lib/types/views/cell-popup/index.d.ts +1 -1
- package/lib/types/views/clipboard/ClipboardPopupMenu.d.ts +1 -1
- package/lib/types/views/defined-name/DefinedName.d.ts +1 -1
- package/lib/types/views/defined-name/DefinedNameContainer.d.ts +1 -1
- package/lib/types/views/defined-name/DefinedNameInput.d.ts +1 -1
- package/lib/types/views/defined-name/DefinedNameOverlay.d.ts +1 -1
- package/lib/types/views/dropdown/cascader-dropdown/index.d.ts +1 -1
- package/lib/types/views/dropdown/color-dropdown/index.d.ts +1 -1
- package/lib/types/views/dropdown/date-dropdown/index.d.ts +1 -1
- package/lib/types/views/dropdown/list-dropdown/index.d.ts +1 -1
- package/lib/types/views/dropdown/list-dropdown/utils.d.ts +16 -0
- package/lib/types/views/formula-bar/FormulaBar.d.ts +1 -1
- package/lib/types/views/mobile/sheet-bar/MobileSheetBar.d.ts +1 -1
- package/lib/types/views/permission/error-msg-dialog/index.d.ts +1 -1
- package/lib/types/views/permission/panel/index.d.ts +1 -1
- package/lib/types/views/permission/panel-detail/PermissionDetailFooterPart.d.ts +1 -1
- package/lib/types/views/permission/panel-detail/PermissionDetailMainPart.d.ts +1 -1
- package/lib/types/views/permission/panel-detail/PermissionDetailPanel.d.ts +1 -1
- package/lib/types/views/permission/panel-detail/PermissionDetailUserPart.d.ts +1 -1
- package/lib/types/views/permission/panel-list/index.d.ts +1 -1
- package/lib/types/views/permission/permission-dialog/index.d.ts +1 -1
- package/lib/types/views/permission/spin/index.d.ts +1 -1
- package/lib/types/views/permission/user-dialog/index.d.ts +1 -1
- package/lib/types/views/sheet-bar/SheetBar.d.ts +1 -1
- package/lib/types/views/sheet-bar/sheet-bar-button/SheetBarButton.d.ts +1 -1
- package/lib/types/views/sheet-bar/sheet-bar-menu/SheetBarMenu.d.ts +1 -1
- package/lib/types/views/sheet-bar/sheet-bar-tabs/SheetBarItem.d.ts +1 -1
- package/lib/types/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.d.ts +1 -1
- package/lib/types/views/sheet-bar/sheet-bar-tabs/SheetBarTabsContextMenu.d.ts +1 -1
- package/lib/types/views/sheet-bar/sheet-bar-tabs/utils/animate.d.ts +3 -3
- package/lib/types/views/sheet-bar/sheet-bar-tabs/utils/slide-tab-bar.d.ts +2 -2
- package/lib/types/views/sheet-container/SheetContainer.d.ts +3 -3
- package/lib/types/views/sheet-slider/CountBar.d.ts +1 -1
- package/lib/types/views/sheet-slider/ZoomSlider.d.ts +1 -1
- package/lib/types/views/status-bar/StatusBar.d.ts +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +10 -7
- package/lib/umd/locale/ar-SA.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -0
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -0
- package/lib/umd/locale/it-IT.js +1 -0
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -0
- package/lib/umd/locale/pt-BR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +16 -16
- package/LICENSE +0 -176
- package/lib/types/facade/f-sheet-hooks.d.ts +0 -125
- package/lib/types/facade/f-workbook-permission.d.ts +0 -39
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { IMenuItemFrozenProps } from './interface';
|
|
17
|
-
export declare const MenuItemFrozen: (props: IMenuItemFrozenProps) => import("react
|
|
17
|
+
export declare const MenuItemFrozen: (props: IMenuItemFrozenProps) => import("react").JSX.Element;
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { IMenuItemInputProps } from './interface';
|
|
17
|
-
export declare const MenuItemInput: (props: IMenuItemInputProps) => import("react
|
|
17
|
+
export declare const MenuItemInput: (props: IMenuItemInputProps) => import("react").JSX.Element;
|
|
@@ -94,7 +94,7 @@ export interface IBeforeSheetEditStartEventParams extends IEventBase {
|
|
|
94
94
|
/** Column index of the cell to be edited */
|
|
95
95
|
column: number;
|
|
96
96
|
/** Type of input device event triggering the edit */
|
|
97
|
-
eventType
|
|
97
|
+
eventType?: DeviceInputEventType;
|
|
98
98
|
/** Optional keycode triggering the edit */
|
|
99
99
|
keycode?: KeyCode;
|
|
100
100
|
/** Whether the edit will happen in zen editor mode */
|
|
@@ -113,7 +113,7 @@ export interface ISheetEditStartedEventParams extends IEventBase {
|
|
|
113
113
|
/** Column index of the editing cell */
|
|
114
114
|
column: number;
|
|
115
115
|
/** Type of input device event that triggered the edit */
|
|
116
|
-
eventType
|
|
116
|
+
eventType?: DeviceInputEventType;
|
|
117
117
|
/** Optional keycode that triggered the edit */
|
|
118
118
|
keycode?: KeyCode;
|
|
119
119
|
/** Whether the edit is happening in zen editor mode */
|
|
@@ -151,7 +151,7 @@ export interface IBeforeSheetEditEndEventParams extends IEventBase {
|
|
|
151
151
|
/** Current value being edited */
|
|
152
152
|
value: RichTextValue;
|
|
153
153
|
/** Type of input device event triggering the edit end */
|
|
154
|
-
eventType
|
|
154
|
+
eventType?: DeviceInputEventType;
|
|
155
155
|
/** Optional keycode triggering the edit end */
|
|
156
156
|
keycode?: KeyCode;
|
|
157
157
|
/** Whether the edit is happening in zen editor mode */
|
|
@@ -172,7 +172,7 @@ export interface ISheetEditEndedEventParams extends IEventBase {
|
|
|
172
172
|
/** Column index of the edited cell */
|
|
173
173
|
column: number;
|
|
174
174
|
/** Type of input device event that triggered the edit end */
|
|
175
|
-
eventType
|
|
175
|
+
eventType?: DeviceInputEventType;
|
|
176
176
|
/** Optional keycode that triggered the edit end */
|
|
177
177
|
keycode?: KeyCode;
|
|
178
178
|
/** Whether the edit happened in zen editor mode */
|
|
@@ -44,7 +44,8 @@ interface IFRangeSheetsUIMixin {
|
|
|
44
44
|
* @example
|
|
45
45
|
* ```ts
|
|
46
46
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
47
|
-
* const fWorksheet = fWorkbook.
|
|
47
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
48
|
+
* if (!fWorksheet) return;
|
|
48
49
|
* const fRange = fWorksheet.getRange('H6');
|
|
49
50
|
* console.log(fRange.getCell());
|
|
50
51
|
* ```
|
|
@@ -56,7 +57,8 @@ interface IFRangeSheetsUIMixin {
|
|
|
56
57
|
* @example
|
|
57
58
|
* ```ts
|
|
58
59
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
59
|
-
* const fWorksheet = fWorkbook.
|
|
60
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
61
|
+
* if (!fWorksheet) return;
|
|
60
62
|
* const fRange = fWorksheet.getRange('H6');
|
|
61
63
|
* console.log(fRange.getCellRect());
|
|
62
64
|
* ```
|
|
@@ -68,7 +70,8 @@ interface IFRangeSheetsUIMixin {
|
|
|
68
70
|
* @example
|
|
69
71
|
* ```ts
|
|
70
72
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
71
|
-
* const fWorksheet = fWorkbook.
|
|
73
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
74
|
+
* if (!fWorksheet) return;
|
|
72
75
|
* const fRange = fWorksheet.getRange('A1:B2');
|
|
73
76
|
* fRange.setValues([
|
|
74
77
|
* [1, 2],
|
|
@@ -99,7 +102,8 @@ interface IFRangeSheetsUIMixin {
|
|
|
99
102
|
*
|
|
100
103
|
* // Attach the popup to the start cell of range C3:E5
|
|
101
104
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
102
|
-
* const fWorksheet = fWorkbook.
|
|
105
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
106
|
+
* if (!fWorksheet) return;
|
|
103
107
|
* const fRange = fWorksheet.getRange('C3:E5');
|
|
104
108
|
* const disposable = fRange.attachPopup({
|
|
105
109
|
* componentKey: 'myPopup'
|
|
@@ -120,7 +124,8 @@ interface IFRangeSheetsUIMixin {
|
|
|
120
124
|
* ```ts
|
|
121
125
|
* // Attach an alert popup to the start cell of range C3:E5
|
|
122
126
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
123
|
-
* const fWorksheet = fWorkbook.
|
|
127
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
128
|
+
* if (!fWorksheet) return;
|
|
124
129
|
* const fRange = fWorksheet.getRange('C3:E5');
|
|
125
130
|
*
|
|
126
131
|
* const disposable = fRange.attachAlertPopup({
|
|
@@ -155,7 +160,8 @@ interface IFRangeSheetsUIMixin {
|
|
|
155
160
|
*
|
|
156
161
|
* // Attach the popup to the range C3:E5
|
|
157
162
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
158
|
-
* const fWorksheet = fWorkbook.
|
|
163
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
164
|
+
* if (!fWorksheet) return;
|
|
159
165
|
* const fRange = fWorksheet.getRange('C3:E5');
|
|
160
166
|
* const disposable = fRange.attachRangePopup({
|
|
161
167
|
* componentKey: 'myPopup',
|
|
@@ -172,7 +178,8 @@ interface IFRangeSheetsUIMixin {
|
|
|
172
178
|
* @example
|
|
173
179
|
* ```ts
|
|
174
180
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
175
|
-
* const fWorksheet = fWorkbook.
|
|
181
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
182
|
+
* if (!fWorksheet) return;
|
|
176
183
|
*
|
|
177
184
|
* // Highlight the range C3:E5 with default style
|
|
178
185
|
* const fRange = fWorksheet.getRange('C3:E5');
|
|
@@ -207,7 +214,8 @@ interface IFRangeSheetsUIMixin {
|
|
|
207
214
|
* @example
|
|
208
215
|
* ```ts
|
|
209
216
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
210
|
-
* const fWorksheet = fWorkbook.
|
|
217
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
218
|
+
* if (!fWorksheet) return;
|
|
211
219
|
* const fRange = fWorksheet.getRange('C3:E5');
|
|
212
220
|
* fRange.showDropdown({ type: 'list', props: { options: [{ label: 'Option 1', value: 'option1' }, { label: 'Option 2', value: 'option2' }] } });
|
|
213
221
|
* ```
|
|
@@ -13,23 +13,15 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { IDisposable, Injector } from '@univerjs/core';
|
|
17
|
-
import type {
|
|
16
|
+
import type { ICellCustomRender, IDisposable, Injector, Nullable } from '@univerjs/core';
|
|
17
|
+
import type { SheetExtension } from '@univerjs/engine-render';
|
|
18
18
|
import type { Observable } from 'rxjs';
|
|
19
|
+
import { InterceptorEffectEnum } from '@univerjs/core';
|
|
19
20
|
import { FUniver } from '@univerjs/core/facade';
|
|
20
|
-
import { FSheetHooks } from '@univerjs/sheets/facade';
|
|
21
21
|
/**
|
|
22
22
|
* @ignore
|
|
23
23
|
*/
|
|
24
24
|
export interface IFUniverSheetsUIMixin {
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated use same API in FWorkbook and FWorkSheet.
|
|
27
|
-
*/
|
|
28
|
-
customizeColumnHeader(cfg: IColumnsHeaderCfgParam): void;
|
|
29
|
-
/**
|
|
30
|
-
* @deprecated use same API in FWorkbook and FWorkSheet.
|
|
31
|
-
*/
|
|
32
|
-
customizeRowHeader(cfg: IRowsHeaderCfgParam): void;
|
|
33
25
|
/**
|
|
34
26
|
* Register sheet row header render extensions.
|
|
35
27
|
* @param {string} unitId The unit id of the spreadsheet.
|
|
@@ -52,9 +44,12 @@ export interface IFUniverSheetsUIMixin {
|
|
|
52
44
|
*/
|
|
53
45
|
registerSheetMainExtension(unitId: string, ...extensions: SheetExtension[]): IDisposable;
|
|
54
46
|
/**
|
|
55
|
-
*
|
|
47
|
+
* Register cell custom render.
|
|
48
|
+
* @param {Nullable<ICellCustomRender[]>} customRender Custom render function.
|
|
49
|
+
* @param {InterceptorEffectEnum} [effect] The effect of the interceptor, style or value.
|
|
50
|
+
* @param {number} [priority] The priority of the interceptor.
|
|
56
51
|
*/
|
|
57
|
-
|
|
52
|
+
registerCellCustomRender(customRender: Nullable<ICellCustomRender[]>, effect?: InterceptorEffectEnum, priority?: number): IDisposable;
|
|
58
53
|
/**
|
|
59
54
|
* Paste clipboard data or custom data into the active sheet at the current selection position.
|
|
60
55
|
* @param {string} [htmlContent] - The HTML content from the clipboard or custom data.
|
|
@@ -155,11 +150,10 @@ export declare class FUniverSheetsUIMixin extends FUniver implements IFUniverShe
|
|
|
155
150
|
private _clipboardPaste;
|
|
156
151
|
private _beforeClipboardPasteAsync;
|
|
157
152
|
private _clipboardPasteAsync;
|
|
158
|
-
customizeColumnHeader(cfg: IColumnsHeaderCfgParam): void;
|
|
159
|
-
customizeRowHeader(cfg: IRowsHeaderCfgParam): void;
|
|
160
153
|
registerSheetRowHeaderExtension(unitId: string, ...extensions: SheetExtension[]): IDisposable;
|
|
161
154
|
registerSheetColumnHeaderExtension(unitId: string, ...extensions: SheetExtension[]): IDisposable;
|
|
162
155
|
registerSheetMainExtension(unitId: string, ...extensions: SheetExtension[]): IDisposable;
|
|
156
|
+
registerCellCustomRender(customRender: Nullable<ICellCustomRender[]>, effect?: InterceptorEffectEnum, priority?: number): IDisposable;
|
|
163
157
|
/**
|
|
164
158
|
* Get sheet render component from render by unitId and view key.
|
|
165
159
|
* @private
|
|
@@ -168,11 +162,6 @@ export declare class FUniverSheetsUIMixin extends FUniver implements IFUniverShe
|
|
|
168
162
|
* @returns {Nullable<RenderComponentType>} The render component.
|
|
169
163
|
*/
|
|
170
164
|
private _getSheetRenderComponent;
|
|
171
|
-
/**
|
|
172
|
-
* Get sheet hooks.
|
|
173
|
-
* @returns {FSheetHooks} FSheetHooks instance
|
|
174
|
-
*/
|
|
175
|
-
getSheetHooks(): FSheetHooks;
|
|
176
165
|
pasteIntoSheet(htmlContent?: string, textContent?: string, files?: File[]): Promise<boolean>;
|
|
177
166
|
setProtectedRangeShadowStrategy(strategy: 'always' | 'non-editable' | 'non-viewable' | 'none'): void;
|
|
178
167
|
getProtectedRangeShadowStrategy(): 'always' | 'non-editable' | 'non-viewable' | 'none';
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { IDisposable, Nullable } from '@univerjs/core';
|
|
17
|
-
import type { IColumnsHeaderCfgParam,
|
|
18
|
-
import type {
|
|
17
|
+
import type { IColumnsHeaderCfgParam, IRowsHeaderCfgParam } from '@univerjs/engine-render';
|
|
18
|
+
import type { IScrollState } from '@univerjs/sheets-ui';
|
|
19
19
|
import type { IDialogPartMethodOptions, ISidebarMethodOptions } from '@univerjs/ui';
|
|
20
20
|
import { FWorkbook } from '@univerjs/sheets/facade';
|
|
21
21
|
/**
|
|
@@ -131,34 +131,6 @@ export interface IFWorkbookSheetsUIMixin {
|
|
|
131
131
|
* ```
|
|
132
132
|
*/
|
|
133
133
|
customizeRowHeader(cfg: IRowsHeaderCfgParam): void;
|
|
134
|
-
/**
|
|
135
|
-
* @deprecated use `univerAPI.addEvent(univerAPI.Event.CellClicked, (params) => {})` instead
|
|
136
|
-
*/
|
|
137
|
-
onCellClick(callback: (cell: IHoverRichTextInfo) => void): IDisposable;
|
|
138
|
-
/**
|
|
139
|
-
* @deprecated use `univerAPI.addEvent(univerAPI.Event.CellHover, (params) => {})` instead
|
|
140
|
-
*/
|
|
141
|
-
onCellHover(callback: (cell: IHoverRichTextPosition) => void): IDisposable;
|
|
142
|
-
/**
|
|
143
|
-
* @deprecated use `univerAPI.addEvent(univerAPI.Event.CellPointerMove, (params) => {})` instead
|
|
144
|
-
*/
|
|
145
|
-
onCellPointerMove(callback: (cell: ICellPosWithEvent, event: IPointerEvent | IMouseEvent) => void): IDisposable;
|
|
146
|
-
/**
|
|
147
|
-
* @deprecated use `univerAPI.addEvent(univerAPI.Event.CellPointerDown, (params) => {})` instead
|
|
148
|
-
*/
|
|
149
|
-
onCellPointerDown(callback: (cell: ICellPosWithEvent) => void): IDisposable;
|
|
150
|
-
/**
|
|
151
|
-
* @deprecated use `univerAPI.addEvent(univerAPI.Event.CellPointerUp, (params) => {})` instead
|
|
152
|
-
*/
|
|
153
|
-
onCellPointerUp(callback: (cell: ICellPosWithEvent) => void): IDisposable;
|
|
154
|
-
/**
|
|
155
|
-
* @deprecated use `univerAPI.addEvent(univerAPI.Event.DragOver, (params) => {})` instead
|
|
156
|
-
*/
|
|
157
|
-
onDragOver(callback: (cell: IDragCellPosition) => void): IDisposable;
|
|
158
|
-
/**
|
|
159
|
-
* @deprecated use `univerAPI.addEvent(univerAPI.Event.Drop, (params) => {})` instead
|
|
160
|
-
*/
|
|
161
|
-
onDrop(callback: (cell: IDragCellPosition) => void): IDisposable;
|
|
162
134
|
/**
|
|
163
135
|
* Start the editing process of the current active cell
|
|
164
136
|
* @returns {boolean} Whether the editing process is started successfully
|
|
@@ -170,11 +142,6 @@ export interface IFWorkbookSheetsUIMixin {
|
|
|
170
142
|
*/
|
|
171
143
|
startEditing(): boolean;
|
|
172
144
|
/**
|
|
173
|
-
* @deprecated Use `endEditingAsync` as instead
|
|
174
|
-
*/
|
|
175
|
-
endEditing(save?: boolean): Promise<boolean>;
|
|
176
|
-
/**
|
|
177
|
-
* @async
|
|
178
145
|
* End the editing process of the current active cell
|
|
179
146
|
* @param {boolean} save - Whether to save the changes, default is true
|
|
180
147
|
* @returns {Promise<boolean>} Whether the editing process is ended successfully
|
|
@@ -186,8 +153,7 @@ export interface IFWorkbookSheetsUIMixin {
|
|
|
186
153
|
*/
|
|
187
154
|
endEditingAsync(save?: boolean): Promise<boolean>;
|
|
188
155
|
/**
|
|
189
|
-
*
|
|
190
|
-
* End the editing process of the current active cell
|
|
156
|
+
* End the editing process of the current active cell, and discard the changes.
|
|
191
157
|
* @returns {Promise<boolean>} Whether the editing process is ended successfully
|
|
192
158
|
* @example
|
|
193
159
|
* ```ts
|
|
@@ -214,7 +180,8 @@ export interface IFWorkbookSheetsUIMixin {
|
|
|
214
180
|
* @example
|
|
215
181
|
* ``` ts
|
|
216
182
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
217
|
-
* const fWorksheet = fWorkbook.
|
|
183
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
184
|
+
* if (!fWorksheet) return;
|
|
218
185
|
*
|
|
219
186
|
* // scroll to cell D10
|
|
220
187
|
* fWorksheet.scrollToCell(9, 3);
|
|
@@ -281,27 +248,10 @@ export declare class FWorkbookSheetsUIMixin extends FWorkbook implements IFWorkb
|
|
|
281
248
|
*/
|
|
282
249
|
private _getSheetRenderComponent;
|
|
283
250
|
private _logDeprecation;
|
|
284
|
-
onCellClick(callback: (cell: IHoverRichTextInfo) => void): IDisposable;
|
|
285
|
-
onCellHover(callback: (cell: IHoverRichTextPosition) => void): IDisposable;
|
|
286
|
-
onCellPointerDown(callback: (cell: ICellPosWithEvent) => void): IDisposable;
|
|
287
|
-
onCellPointerUp(callback: (cell: ICellPosWithEvent) => void): IDisposable;
|
|
288
|
-
onCellPointerMove(callback: (cell: ICellPosWithEvent, event: IPointerEvent | IMouseEvent) => void): IDisposable;
|
|
289
|
-
onDragOver(callback: (cell: IDragCellPosition) => void): IDisposable;
|
|
290
|
-
onDrop(callback: (cell: IDragCellPosition) => void): IDisposable;
|
|
291
251
|
startEditing(): boolean;
|
|
292
|
-
endEditing(save?: boolean): Promise<boolean>;
|
|
293
252
|
endEditingAsync(save?: boolean): Promise<boolean>;
|
|
294
253
|
abortEditingAsync(): Promise<boolean>;
|
|
295
254
|
isCellEditing(): boolean;
|
|
296
|
-
/**
|
|
297
|
-
* Get scroll state of specified sheet.
|
|
298
|
-
* @param {string} sheetId - sheet id
|
|
299
|
-
* @returns {IScrollState} scroll state
|
|
300
|
-
* @example
|
|
301
|
-
* ``` ts
|
|
302
|
-
* univerAPI.getActiveWorkbook().getScrollStateBySheetId($sheetId)
|
|
303
|
-
* ```
|
|
304
|
-
*/
|
|
305
255
|
getScrollStateBySheetId(sheetId: string): Nullable<IScrollState>;
|
|
306
256
|
disableSelection(): FWorkbook;
|
|
307
257
|
enableSelection(): FWorkbook;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import type { IDisposable, IRange, ISelectionCell, Nullable } from '@univerjs/core';
|
|
17
17
|
import type { IColumnsHeaderCfgParam, IRowsHeaderCfgParam, SpreadsheetSkeleton } from '@univerjs/engine-render';
|
|
18
18
|
import type { ISelectionStyle } from '@univerjs/sheets';
|
|
19
|
-
import type { IScrollState
|
|
19
|
+
import type { IScrollState } from '@univerjs/sheets-ui';
|
|
20
20
|
import type { FRange } from '@univerjs/sheets/facade';
|
|
21
21
|
import { SHEET_VIEWPORT_KEY } from '@univerjs/engine-render';
|
|
22
22
|
import { FWorksheet } from '@univerjs/sheets/facade';
|
|
@@ -30,7 +30,8 @@ export interface IFWorksheetUIMixin {
|
|
|
30
30
|
* @example
|
|
31
31
|
* ```ts
|
|
32
32
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
33
|
-
* const fWorksheet = fWorkbook.
|
|
33
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
34
|
+
* if (!fWorksheet) return;
|
|
34
35
|
* fWorksheet.refreshCanvas();
|
|
35
36
|
* ```
|
|
36
37
|
*/
|
|
@@ -44,7 +45,8 @@ export interface IFWorksheetUIMixin {
|
|
|
44
45
|
* @example
|
|
45
46
|
* ```ts
|
|
46
47
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
47
|
-
* const fWorksheet = fWorkbook.
|
|
48
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
49
|
+
* if (!fWorksheet) return;
|
|
48
50
|
* const ranges = [fWorksheet.getRange('A1:B2'), fWorksheet.getRange('D4:E5')];
|
|
49
51
|
* const disposable = fWorksheet.highlightRanges(ranges, { fill: 'yellow' });
|
|
50
52
|
*
|
|
@@ -60,7 +62,8 @@ export interface IFWorksheetUIMixin {
|
|
|
60
62
|
* @example
|
|
61
63
|
* ```ts
|
|
62
64
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
63
|
-
* const fWorksheet = fWorkbook.
|
|
65
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
66
|
+
* if (!fWorksheet) return;
|
|
64
67
|
*
|
|
65
68
|
* // Set zoom ratio to 200%
|
|
66
69
|
* fWorksheet.zoom(2);
|
|
@@ -75,7 +78,8 @@ export interface IFWorksheetUIMixin {
|
|
|
75
78
|
* @example
|
|
76
79
|
* ```ts
|
|
77
80
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
78
|
-
* const fWorksheet = fWorkbook.
|
|
81
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
82
|
+
* if (!fWorksheet) return;
|
|
79
83
|
* const zoomRatio = fWorksheet.getZoom();
|
|
80
84
|
* console.log(zoomRatio);
|
|
81
85
|
* ```
|
|
@@ -87,7 +91,8 @@ export interface IFWorksheetUIMixin {
|
|
|
87
91
|
* @example
|
|
88
92
|
* ```ts
|
|
89
93
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
90
|
-
* const fWorksheet = fWorkbook.
|
|
94
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
95
|
+
* if (!fWorksheet) return;
|
|
91
96
|
* const visibleRange = fWorksheet.getVisibleRange();
|
|
92
97
|
* console.log(visibleRange);
|
|
93
98
|
* console.log(fWorksheet.getRange(visibleRange).getA1Notation());
|
|
@@ -100,7 +105,8 @@ export interface IFWorksheetUIMixin {
|
|
|
100
105
|
* @example
|
|
101
106
|
* ```ts
|
|
102
107
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
103
|
-
* const fWorksheet = fWorkbook.
|
|
108
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
109
|
+
* if (!fWorksheet) return;
|
|
104
110
|
* const visibleRanges = fWorksheet.getVisibleRangesOfAllViewports();
|
|
105
111
|
* console.log(visibleRanges);
|
|
106
112
|
* const mainLeftTopViewportRange = visibleRanges?.get(univerAPI.Enum.SHEET_VIEWPORT_KEY.VIEW_MAIN_LEFT_TOP);
|
|
@@ -118,7 +124,8 @@ export interface IFWorksheetUIMixin {
|
|
|
118
124
|
* @example
|
|
119
125
|
* ```ts
|
|
120
126
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
121
|
-
* const fWorksheet = fWorkbook.
|
|
127
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
128
|
+
* if (!fWorksheet) return;
|
|
122
129
|
*
|
|
123
130
|
* // Scroll to cell D10
|
|
124
131
|
* const fRange = fWorksheet.getRange('D10');
|
|
@@ -134,7 +141,8 @@ export interface IFWorksheetUIMixin {
|
|
|
134
141
|
* @example
|
|
135
142
|
* ```ts
|
|
136
143
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
137
|
-
* const fWorksheet = fWorkbook.
|
|
144
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
145
|
+
* if (!fWorksheet) return;
|
|
138
146
|
*
|
|
139
147
|
* // Scroll to cell D10
|
|
140
148
|
* const fRange = fWorksheet.getRange('D10');
|
|
@@ -155,7 +163,8 @@ export interface IFWorksheetUIMixin {
|
|
|
155
163
|
* @example
|
|
156
164
|
* ```ts
|
|
157
165
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
158
|
-
* const fWorksheet = fWorkbook.
|
|
166
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
167
|
+
* if (!fWorksheet) return;
|
|
159
168
|
* const skeleton = fWorksheet.getSkeleton();
|
|
160
169
|
* console.log(skeleton);
|
|
161
170
|
* ```
|
|
@@ -168,7 +177,8 @@ export interface IFWorksheetUIMixin {
|
|
|
168
177
|
* @example
|
|
169
178
|
* ```ts
|
|
170
179
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
171
|
-
* const fWorksheet = fWorkbook.
|
|
180
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
181
|
+
* if (!fWorksheet) return;
|
|
172
182
|
*
|
|
173
183
|
* // Set the long text value in cell A1
|
|
174
184
|
* const fRange = fWorksheet.getRange('A1');
|
|
@@ -187,7 +197,8 @@ export interface IFWorksheetUIMixin {
|
|
|
187
197
|
* @example
|
|
188
198
|
* ```ts
|
|
189
199
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
190
|
-
* const fWorksheet = fWorkbook.
|
|
200
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
201
|
+
* if (!fWorksheet) return;
|
|
191
202
|
*
|
|
192
203
|
* // Set the A:C columns to a width that fits their text.
|
|
193
204
|
* fWorksheet.autoResizeColumns(0, 3);
|
|
@@ -210,7 +221,8 @@ export interface IFWorksheetUIMixin {
|
|
|
210
221
|
* @example
|
|
211
222
|
* ```ts
|
|
212
223
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
213
|
-
* const fWorksheet = fWorkbook.
|
|
224
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
225
|
+
* if (!fWorksheet) return;
|
|
214
226
|
*
|
|
215
227
|
* // Set the first 3 rows to a height that fits their text.
|
|
216
228
|
* fWorksheet.autoResizeRows(0, 3);
|
|
@@ -223,7 +235,8 @@ export interface IFWorksheetUIMixin {
|
|
|
223
235
|
* @example
|
|
224
236
|
* ```typescript
|
|
225
237
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
226
|
-
* const fWorksheet = fWorkbook.
|
|
238
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
239
|
+
* if (!fWorksheet) return;
|
|
227
240
|
* fWorksheet.customizeColumnHeader({
|
|
228
241
|
* headerStyle: {
|
|
229
242
|
* fontColor: '#fff',
|
|
@@ -252,7 +265,8 @@ export interface IFWorksheetUIMixin {
|
|
|
252
265
|
* @example
|
|
253
266
|
* ```typescript
|
|
254
267
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
255
|
-
* const fWorksheet = fWorkbook.
|
|
268
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
269
|
+
* if (!fWorksheet) return;
|
|
256
270
|
* fWorksheet.customizeRowHeader({
|
|
257
271
|
* headerStyle: {
|
|
258
272
|
* backgroundColor: 'pink',
|
|
@@ -276,7 +290,8 @@ export interface IFWorksheetUIMixin {
|
|
|
276
290
|
* @example
|
|
277
291
|
* ```ts
|
|
278
292
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
279
|
-
* const fWorksheet = fWorkbook.
|
|
293
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
294
|
+
* if (!fWorksheet) return;
|
|
280
295
|
* fWorksheet.setColumnHeaderHeight(100);
|
|
281
296
|
* ```
|
|
282
297
|
*/
|
|
@@ -288,15 +303,12 @@ export interface IFWorksheetUIMixin {
|
|
|
288
303
|
* @example
|
|
289
304
|
* ```ts
|
|
290
305
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
291
|
-
* const fWorksheet = fWorkbook.
|
|
306
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
307
|
+
* if (!fWorksheet) return;
|
|
292
308
|
* fWorksheet.setRowHeaderWidth(100);
|
|
293
309
|
* ```
|
|
294
310
|
*/
|
|
295
311
|
setRowHeaderWidth(width: number): FWorksheet;
|
|
296
|
-
/**
|
|
297
|
-
* @deprecated use `univerAPI.addEvent(univerAPI.Event.Scroll, (params) => {})` instead
|
|
298
|
-
*/
|
|
299
|
-
onScroll(callback: (params: Nullable<IViewportScrollState>) => void): IDisposable;
|
|
300
312
|
}
|
|
301
313
|
export declare class FWorksheetUIMixin extends FWorksheet implements IFWorksheetUIMixin {
|
|
302
314
|
refreshCanvas(): FWorksheet;
|
|
@@ -307,7 +319,6 @@ export declare class FWorksheetUIMixin extends FWorksheet implements IFWorksheet
|
|
|
307
319
|
getVisibleRangesOfAllViewports(): Map<SHEET_VIEWPORT_KEY, IRange> | null;
|
|
308
320
|
scrollToCell(row: number, column: number, duration?: number): FWorksheet;
|
|
309
321
|
getScrollState(): IScrollState;
|
|
310
|
-
onScroll(callback: (params: Nullable<IViewportScrollState>) => void): IDisposable;
|
|
311
322
|
getSkeleton(): Nullable<SpreadsheetSkeleton>;
|
|
312
323
|
autoResizeColumn(columnPosition: number): FWorksheet;
|
|
313
324
|
autoResizeColumns(startColumn: number, numColumns: number): FWorksheet;
|
|
@@ -16,14 +16,10 @@
|
|
|
16
16
|
import './f-univer';
|
|
17
17
|
import './f-workbook';
|
|
18
18
|
import './f-worksheet';
|
|
19
|
-
import './f-workbook-permission';
|
|
20
|
-
import './f-sheet-hooks';
|
|
21
19
|
import './f-event';
|
|
22
20
|
export * from './f-enum';
|
|
23
21
|
export type * from './f-event';
|
|
24
22
|
export { type IFComponentKey, transformComponentKey } from './f-range';
|
|
25
|
-
export type * from './f-sheet-hooks';
|
|
26
23
|
export type * from './f-univer';
|
|
27
24
|
export type * from './f-workbook';
|
|
28
|
-
export type * from './f-workbook-permission';
|
|
29
25
|
export type * from './f-worksheet';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type enUS from './en-US';
|
|
17
|
+
declare const locale: typeof enUS;
|
|
18
|
+
export default locale;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type enUS from './en-US';
|
|
17
|
+
declare const locale: typeof enUS;
|
|
18
|
+
export default locale;
|