@yudaocode/univer-sheets-ui 1.6.215 → 1.6.216
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 +201 -54
- package/lib/cjs/index.js.map +1 -1
- package/lib/es/index.js +198 -54
- package/lib/es/index.js.map +1 -1
- package/lib/types/index.d.ts +41 -8
- package/package.json +3 -3
package/lib/types/index.d.ts
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import * as _univerjs_core from '@univerjs/core';
|
|
2
2
|
import { Disposable, Injector, ICommandService, LocaleType, IOperation, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
3
4
|
import { IMenuManagerService, IUIPartsService, ISidebarService, ComponentManager, IconManager } from '@univerjs/ui';
|
|
4
5
|
import { ISheetTemplateService, SheetIoTarget } from '@yudaocode/univer-sheets';
|
|
5
|
-
import { Observable } from 'rxjs';
|
|
6
6
|
export { default as enUS } from './locale/en-US.js';
|
|
7
7
|
export { ISheetsUILocale, default as zhCN } from './locale/zh-CN.js';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
10
10
|
type SheetModalTabMode = 'import' | 'export' | 'print' | 'json';
|
|
11
|
+
interface IOpenSheetModalOptions {
|
|
12
|
+
tab?: SheetModalTabMode;
|
|
13
|
+
initialTab?: SheetModalTabMode;
|
|
14
|
+
tabs?: SheetModalTabMode[];
|
|
15
|
+
showPipelineBadge?: boolean;
|
|
16
|
+
}
|
|
11
17
|
interface IUniverSheetsUIFeatures {
|
|
12
18
|
/** Enable dataset tree binding, template cell corner markers & dynamic vertical list expansion. Default: `false` */
|
|
13
19
|
datasetBinding?: boolean;
|
|
@@ -48,12 +54,15 @@ interface ISheetsUIFeatureService {
|
|
|
48
54
|
readonly features$: Observable<IResolvedSheetsUIFeatures>;
|
|
49
55
|
readonly modalOpen$: Observable<boolean>;
|
|
50
56
|
readonly modalTab$: Observable<SheetModalTabMode>;
|
|
57
|
+
readonly ioModalConfig$: Observable<ISheetIoModalConfig>;
|
|
51
58
|
getFeatures(): IResolvedSheetsUIFeatures;
|
|
52
59
|
setFeatures(features: IUniverSheetsUIFeatures): void;
|
|
53
60
|
patchFeatures(patch: Partial<IResolvedSheetsUIFeatures>): void;
|
|
61
|
+
getIoModalConfig(): ISheetIoModalConfig;
|
|
62
|
+
setIoModalConfig(config: ISheetIoModalConfig): void;
|
|
54
63
|
isModalOpen(): boolean;
|
|
55
64
|
getModalTab(): SheetModalTabMode;
|
|
56
|
-
openModal(
|
|
65
|
+
openModal(tabOrOptions?: SheetModalTabMode | IOpenSheetModalOptions): void;
|
|
57
66
|
closeModal(): void;
|
|
58
67
|
setModalTab(tab: SheetModalTabMode): void;
|
|
59
68
|
}
|
|
@@ -62,26 +71,49 @@ declare class SheetsUIFeatureService extends Disposable implements ISheetsUIFeat
|
|
|
62
71
|
private readonly _features$;
|
|
63
72
|
private readonly _modalOpen$;
|
|
64
73
|
private readonly _modalTab$;
|
|
74
|
+
private _baseIoModalConfig;
|
|
75
|
+
private _invocationOverride;
|
|
76
|
+
private readonly _ioModalConfig$;
|
|
65
77
|
readonly features$: Observable<IResolvedSheetsUIFeatures>;
|
|
66
78
|
readonly modalOpen$: Observable<boolean>;
|
|
67
79
|
readonly modalTab$: Observable<SheetModalTabMode>;
|
|
68
|
-
|
|
80
|
+
readonly ioModalConfig$: Observable<ISheetIoModalConfig>;
|
|
81
|
+
constructor(initial?: IUniverSheetsUIFeatures, initialIoModal?: ISheetIoModalConfig);
|
|
82
|
+
private _clampTabToAllowed;
|
|
83
|
+
private _computeEffectiveIoModalConfig;
|
|
69
84
|
getFeatures(): IResolvedSheetsUIFeatures;
|
|
70
85
|
setFeatures(features: IUniverSheetsUIFeatures): void;
|
|
71
86
|
patchFeatures(patch: Partial<IResolvedSheetsUIFeatures>): void;
|
|
87
|
+
getIoModalConfig(): ISheetIoModalConfig;
|
|
88
|
+
setIoModalConfig(config: ISheetIoModalConfig): void;
|
|
72
89
|
isModalOpen(): boolean;
|
|
73
90
|
getModalTab(): SheetModalTabMode;
|
|
74
|
-
openModal(
|
|
91
|
+
openModal(tabOrOptions?: SheetModalTabMode | IOpenSheetModalOptions): void;
|
|
75
92
|
closeModal(): void;
|
|
76
93
|
setModalTab(tab: SheetModalTabMode): void;
|
|
77
94
|
}
|
|
78
95
|
|
|
96
|
+
declare const SHEETS_EXT_UI_PLUGIN_CONFIG_KEY = "yudao-sheets-ext-ui.config";
|
|
97
|
+
interface ISheetIoModalConfig {
|
|
98
|
+
/** Allowed tabs rendered in the IO modal (e.g. `['import']` or `['export']` for compact single-purpose mode) */
|
|
99
|
+
tabs?: SheetModalTabMode[];
|
|
100
|
+
/** Default tab activated when the IO modal opens without an explicit tab parameter */
|
|
101
|
+
defaultTab?: SheetModalTabMode;
|
|
102
|
+
/** Show internal IO adapter pipeline badge in the modal header (`true` by default; `false` hides it) */
|
|
103
|
+
showPipelineBadge?: boolean;
|
|
104
|
+
}
|
|
79
105
|
interface IUniverSheetsExtUIConfig {
|
|
80
106
|
/** Whether to open the right inspector sidebar on startup when report features are enabled */
|
|
81
107
|
defaultOpenInspector?: boolean;
|
|
82
108
|
/** On-demand enterprise dataset expansion & print features (all `false` by default) */
|
|
83
109
|
features?: IUniverSheetsUIFeatures;
|
|
110
|
+
/** Optional IO modal compact mode, allowed tabs & pipeline badge visibility */
|
|
111
|
+
ioModal?: ISheetIoModalConfig;
|
|
84
112
|
}
|
|
113
|
+
/** Alias for `IUniverSheetsExtUIConfig` */
|
|
114
|
+
type IUniverSheetsUIConfig = IUniverSheetsExtUIConfig;
|
|
115
|
+
declare const defaultPluginConfig: IUniverSheetsExtUIConfig;
|
|
116
|
+
|
|
85
117
|
declare class SheetsExtUIController extends Disposable {
|
|
86
118
|
private readonly _config;
|
|
87
119
|
private readonly _injector;
|
|
@@ -105,16 +137,17 @@ declare function useSheetsUILocale(): {
|
|
|
105
137
|
currentLocale: LocaleType;
|
|
106
138
|
};
|
|
107
139
|
|
|
140
|
+
type IOpenSheetModalOperationParams = IOpenSheetModalOptions;
|
|
108
141
|
declare const SHEET_INSPECTOR_SIDEBAR_ID = "yudao.sheets.inspector.sidebar";
|
|
109
142
|
declare const SHEET_INSPECTOR_COMPONENT_KEY = "yudao.sheets.inspector.component";
|
|
110
143
|
declare function openSheetInspectorSidebar(sidebarService: ISidebarService): void;
|
|
111
144
|
declare const ToggleSheetInspectorOperation: IOperation;
|
|
112
|
-
declare const OpenSheetModalOperation: IOperation<
|
|
113
|
-
|
|
114
|
-
}>;
|
|
145
|
+
declare const OpenSheetModalOperation: IOperation<IOpenSheetModalOperationParams>;
|
|
146
|
+
declare const OpenSheetIoModalOperation: IOperation<IOpenSheetModalOperationParams>;
|
|
115
147
|
declare const ImportSheetFileOperation: IOperation<{
|
|
116
148
|
file?: File;
|
|
117
149
|
target?: SheetIoTarget;
|
|
150
|
+
signal?: AbortSignal;
|
|
118
151
|
}>;
|
|
119
152
|
declare const FillSheetSampleDatasetOperation: IOperation;
|
|
120
153
|
declare const UpdateSheetsUIFeaturesOperation: IOperation<{
|
|
@@ -142,4 +175,4 @@ declare const SheetPreviewAndIoModal: React.FC;
|
|
|
142
175
|
|
|
143
176
|
declare const SheetRichOverlayHost: React.FC;
|
|
144
177
|
|
|
145
|
-
export { FillSheetSampleDatasetOperation, type IResolvedSheetsUIFeatures, ISheetsUIFeatureService, type IUniverSheetsExtUIConfig, type IUniverSheetsUIFeatures, ImportSheetFileOperation, OpenSheetModalOperation, SHEET_INSPECTOR_COMPONENT_KEY, SHEET_INSPECTOR_SIDEBAR_ID, SheetInspectorPanel, SheetLeftSidebar, type SheetModalTabMode, SheetPreviewAndIoModal, SheetRichOverlayHost, SheetsExtUIController, SheetsUIFeatureService, ToggleSheetInspectorOperation, UNIVER_SHEETS_EXT_UI_PLUGIN_NAME, UniverSheetsExtUIPlugin, UpdateSheetsUIFeaturesOperation, openSheetInspectorSidebar, resolveSheetsUIFeatures, useSheetsUILocale };
|
|
178
|
+
export { FillSheetSampleDatasetOperation, type IOpenSheetModalOperationParams, type IOpenSheetModalOptions, type IResolvedSheetsUIFeatures, type ISheetIoModalConfig, ISheetsUIFeatureService, type IUniverSheetsExtUIConfig, type IUniverSheetsUIConfig, type IUniverSheetsUIFeatures, ImportSheetFileOperation, OpenSheetIoModalOperation, OpenSheetModalOperation, SHEETS_EXT_UI_PLUGIN_CONFIG_KEY, SHEET_INSPECTOR_COMPONENT_KEY, SHEET_INSPECTOR_SIDEBAR_ID, SheetInspectorPanel, SheetLeftSidebar, type SheetModalTabMode, SheetPreviewAndIoModal, SheetRichOverlayHost, SheetsExtUIController, SheetsUIFeatureService, ToggleSheetInspectorOperation, UNIVER_SHEETS_EXT_UI_PLUGIN_NAME, UniverSheetsExtUIPlugin, UpdateSheetsUIFeaturesOperation, defaultPluginConfig, openSheetInspectorSidebar, resolveSheetsUIFeatures, useSheetsUILocale };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yudaocode/univer-sheets-ui",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.216",
|
|
4
4
|
"description": "Univer Sheets UI enhancement plugin: on-demand dataset list binding sidebar, template cell inspector, A4 print preview, charts/pivots, and XLSX/CSV/PDF IO modal",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/yudaocode/yudao-univer#readme",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"react": ">=18.0.0",
|
|
67
67
|
"react-dom": ">=18.0.0",
|
|
68
68
|
"rxjs": ">=7.0.0",
|
|
69
|
-
"@yudaocode/univer-sheets": "^1.6.
|
|
69
|
+
"@yudaocode/univer-sheets": "^1.6.216"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/qrcode": "^1.5.6",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"react": "^18.3.1",
|
|
82
82
|
"react-dom": "^18.3.1",
|
|
83
83
|
"rxjs": "^7.8.2",
|
|
84
|
-
"@yudaocode/univer-sheets": "1.6.
|
|
84
|
+
"@yudaocode/univer-sheets": "1.6.216"
|
|
85
85
|
},
|
|
86
86
|
"scripts": {
|
|
87
87
|
"build": "tsup",
|