@univerjs-pro/sheets-history-ui 1.0.0-rc.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/README.md +22 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/locale/ar-SA.js +1 -0
- package/lib/cjs/locale/ca-ES.js +1 -0
- package/lib/cjs/locale/de-DE.js +1 -0
- package/lib/cjs/locale/en-US.js +1 -0
- package/lib/cjs/locale/es-ES.js +1 -0
- package/lib/cjs/locale/fa-IR.js +1 -0
- package/lib/cjs/locale/fr-FR.js +1 -0
- package/lib/cjs/locale/id-ID.js +1 -0
- package/lib/cjs/locale/it-IT.js +1 -0
- package/lib/cjs/locale/ja-JP.js +1 -0
- package/lib/cjs/locale/ko-KR.js +1 -0
- package/lib/cjs/locale/pl-PL.js +1 -0
- package/lib/cjs/locale/pt-BR.js +1 -0
- package/lib/cjs/locale/ru-RU.js +1 -0
- package/lib/cjs/locale/sk-SK.js +1 -0
- package/lib/cjs/locale/vi-VN.js +1 -0
- package/lib/cjs/locale/zh-CN.js +1 -0
- package/lib/cjs/locale/zh-HK.js +1 -0
- package/lib/cjs/locale/zh-TW.js +1 -0
- package/lib/es/index.js +1 -0
- package/lib/es/locale/ar-SA.js +1 -0
- package/lib/es/locale/ca-ES.js +1 -0
- package/lib/es/locale/de-DE.js +1 -0
- package/lib/es/locale/en-US.js +1 -0
- package/lib/es/locale/es-ES.js +1 -0
- package/lib/es/locale/fa-IR.js +1 -0
- package/lib/es/locale/fr-FR.js +1 -0
- package/lib/es/locale/id-ID.js +1 -0
- package/lib/es/locale/it-IT.js +1 -0
- package/lib/es/locale/ja-JP.js +1 -0
- package/lib/es/locale/ko-KR.js +1 -0
- package/lib/es/locale/pl-PL.js +1 -0
- package/lib/es/locale/pt-BR.js +1 -0
- package/lib/es/locale/ru-RU.js +1 -0
- package/lib/es/locale/sk-SK.js +1 -0
- package/lib/es/locale/vi-VN.js +1 -0
- package/lib/es/locale/zh-CN.js +1 -0
- package/lib/es/locale/zh-HK.js +1 -0
- package/lib/es/locale/zh-TW.js +1 -0
- package/lib/index.css +617 -0
- package/lib/index.js +1 -0
- package/lib/locale/ar-SA.js +1 -0
- package/lib/locale/ca-ES.js +1 -0
- package/lib/locale/de-DE.js +1 -0
- package/lib/locale/en-US.js +1 -0
- package/lib/locale/es-ES.js +1 -0
- package/lib/locale/fa-IR.js +1 -0
- package/lib/locale/fr-FR.js +1 -0
- package/lib/locale/id-ID.js +1 -0
- package/lib/locale/it-IT.js +1 -0
- package/lib/locale/ja-JP.js +1 -0
- package/lib/locale/ko-KR.js +1 -0
- package/lib/locale/pl-PL.js +1 -0
- package/lib/locale/pt-BR.js +1 -0
- package/lib/locale/ru-RU.js +1 -0
- package/lib/locale/sk-SK.js +1 -0
- package/lib/locale/vi-VN.js +1 -0
- package/lib/locale/zh-CN.js +1 -0
- package/lib/locale/zh-HK.js +1 -0
- package/lib/locale/zh-TW.js +1 -0
- package/lib/types/commands/history.operate.d.ts +3 -0
- package/lib/types/config/config.d.ts +55 -0
- package/lib/types/controllers/components.controller.d.ts +5 -0
- package/lib/types/controllers/history-loader.controller.d.ts +26 -0
- package/lib/types/controllers/history-menu.d.ts +4 -0
- package/lib/types/controllers/mobile/components.controller.d.ts +5 -0
- package/lib/types/controllers/mobile-history-loader.controller.d.ts +26 -0
- package/lib/types/controllers/revert-acknowledgement.d.ts +3 -0
- package/lib/types/index.d.ts +5 -0
- package/lib/types/locale/ar-SA.d.ts +3 -0
- package/lib/types/locale/ca-ES.d.ts +3 -0
- package/lib/types/locale/de-DE.d.ts +3 -0
- package/lib/types/locale/en-US.d.ts +157 -0
- package/lib/types/locale/es-ES.d.ts +3 -0
- package/lib/types/locale/fa-IR.d.ts +3 -0
- package/lib/types/locale/fr-FR.d.ts +3 -0
- package/lib/types/locale/id-ID.d.ts +3 -0
- package/lib/types/locale/it-IT.d.ts +3 -0
- package/lib/types/locale/ja-JP.d.ts +3 -0
- package/lib/types/locale/ko-KR.d.ts +3 -0
- package/lib/types/locale/pl-PL.d.ts +3 -0
- package/lib/types/locale/pt-BR.d.ts +3 -0
- package/lib/types/locale/ru-RU.d.ts +3 -0
- package/lib/types/locale/sk-SK.d.ts +3 -0
- package/lib/types/locale/types.d.ts +3 -0
- package/lib/types/locale/vi-VN.d.ts +3 -0
- package/lib/types/locale/zh-CN.d.ts +3 -0
- package/lib/types/locale/zh-HK.d.ts +3 -0
- package/lib/types/locale/zh-TW.d.ts +3 -0
- package/lib/types/menu/schema.d.ts +2 -0
- package/lib/types/mobile-plugin.d.ts +14 -0
- package/lib/types/plugin.d.ts +14 -0
- package/lib/types/services/history-loader.service.d.ts +36 -0
- package/lib/types/services/history-locale.d.ts +5 -0
- package/lib/types/services/history-version-param.d.ts +3 -0
- package/lib/types/services/mobile-history-loader.service.d.ts +35 -0
- package/lib/types/viewer/controllers/disable-state.controller.d.ts +7 -0
- package/lib/types/viewer/controllers/history-manager.controller.d.ts +16 -0
- package/lib/types/viewer/controllers/mobile-history-manager.controller.d.ts +16 -0
- package/lib/types/viewer/controllers/mobile-version-list.controller.d.ts +7 -0
- package/lib/types/viewer/controllers/version-diff.render.controller.d.ts +58 -0
- package/lib/types/viewer/controllers/version-list.controller.d.ts +14 -0
- package/lib/types/viewer/mobile-plugin.d.ts +16 -0
- package/lib/types/viewer/plugin.d.ts +16 -0
- package/lib/types/viewer/services/disable-dialog.service.d.ts +13 -0
- package/lib/types/viewer/services/history-fetch.service.d.ts +106 -0
- package/lib/types/viewer/services/history-manager.service.d.ts +84 -0
- package/lib/types/viewer/services/sheets-history-diff-color.service.d.ts +16 -0
- package/lib/types/viewer/services/version-diff.service.d.ts +89 -0
- package/lib/types/viewer/views/HistoryLoadingMask.d.ts +1 -0
- package/lib/types/viewer/views/HistoryViewHeader.d.ts +1 -0
- package/lib/types/viewer/views/MobileHistoryViewHeader.d.ts +1 -0
- package/lib/types/viewer/views/MobileVersionListPanel.d.ts +1 -0
- package/lib/types/viewer/views/VersionListPanel.d.ts +21 -0
- package/lib/types/viewer/views/all-mutations.d.ts +101 -0
- package/lib/types/viewer/views/shapes/sheet-history-arrow.shape.d.ts +29 -0
- package/lib/types/viewer/views/utils.d.ts +11 -0
- package/lib/umd/index.js +1 -0
- package/lib/umd/locale/ar-SA.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -0
- package/lib/umd/locale/de-DE.js +1 -0
- package/lib/umd/locale/en-US.js +1 -0
- package/lib/umd/locale/es-ES.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -0
- package/lib/umd/locale/fr-FR.js +1 -0
- 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 -0
- package/lib/umd/locale/ko-KR.js +1 -0
- 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 -0
- package/lib/umd/locale/sk-SK.js +1 -0
- package/lib/umd/locale/vi-VN.js +1 -0
- package/lib/umd/locale/zh-CN.js +1 -0
- package/lib/umd/locale/zh-HK.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -0
- package/package.json +108 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { MenuConfig } from '@univerjs/ui';
|
|
2
|
+
export declare const SHEETS_HISTORY_UI_PLUGIN_CONFIG_KEY = "sheets-history-ui.config";
|
|
3
|
+
export declare const configSymbol: unique symbol;
|
|
4
|
+
export declare const SHEETS_HISTORY_PANEL_COMPONENT = "history-panel";
|
|
5
|
+
export interface IUniverSheetsHistoryUIConfig {
|
|
6
|
+
menu?: MenuConfig;
|
|
7
|
+
/**
|
|
8
|
+
* The DOM id of the host Univer container where the history viewer is mounted.
|
|
9
|
+
* If omitted, the container configured for the host Univer UI plugin is used.
|
|
10
|
+
*/
|
|
11
|
+
univerContainerId?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Base URL of the history service, shared by list, creator and changeset requests.
|
|
14
|
+
* @default '/universer-api/history'
|
|
15
|
+
*/
|
|
16
|
+
historyServerUrl?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The component key used to render the history version list in the sidebar.
|
|
19
|
+
* @default 'history-panel'
|
|
20
|
+
*/
|
|
21
|
+
historyPanelComponentKey?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to hide the history viewer header.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
historyPanelHidden?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether to show filters for AI-assisted and collaborator edits.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
historyAIassistantEnabled?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* The Web Worker used in edit history.
|
|
34
|
+
* If the workerURL is provided and workerURL is a Worker instance, it will be destroyed when history is closed.
|
|
35
|
+
* So a new Worker instance need to be created when history is opened again. For example:
|
|
36
|
+
* ```ts
|
|
37
|
+
* import { SHEETS_HISTORY_UI_PLUGIN_CONFIG_KEY, ToggleEditHistoryOperation } from '@univerjs-pro/sheets-history-ui';
|
|
38
|
+
*
|
|
39
|
+
* univerAPI.addEvent(univerAPI.Event.BeforeCommandExecute, (event) => {
|
|
40
|
+
* if (event.id === ToggleEditHistoryOperation.id) {
|
|
41
|
+
* const workerURL = new Worker(new URL('./worker.ts', import.meta.url));
|
|
42
|
+
* const configService = univer.__getInjector().get(IConfigService);
|
|
43
|
+
* configService.setConfig(SHEETS_HISTORY_UI_PLUGIN_CONFIG_KEY, {
|
|
44
|
+
* workerURL,
|
|
45
|
+
* });
|
|
46
|
+
* }
|
|
47
|
+
* });
|
|
48
|
+
*
|
|
49
|
+
* If the workerURL is a string or URL, no additional processing is required.
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
workerURL?: string | URL | Worker;
|
|
53
|
+
}
|
|
54
|
+
export declare const defaultPluginConfig: IUniverSheetsHistoryUIConfig;
|
|
55
|
+
export declare function resolveHistoryServerUrl(config?: IUniverSheetsHistoryUIConfig): string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CollaborationController, DataLoaderService, ILocalCacheService } from '@univerjs-pro/collaboration-client';
|
|
2
|
+
import { IURLService } from '@univerjs-pro/collaboration-client-ui';
|
|
3
|
+
import { ICommandService, IUniverInstanceService, LocaleService, RxDisposable } from '@univerjs/core';
|
|
4
|
+
import { IMenuManagerService, IMessageService } from '@univerjs/ui';
|
|
5
|
+
import { HistoryLoaderService } from '../services/history-loader.service';
|
|
6
|
+
export declare class HistoryLoaderController extends RxDisposable {
|
|
7
|
+
private readonly _commandService;
|
|
8
|
+
protected readonly _menuManagerService: IMenuManagerService;
|
|
9
|
+
private readonly _historyManagerService;
|
|
10
|
+
private readonly _localeService;
|
|
11
|
+
private readonly _messageService;
|
|
12
|
+
private readonly _collaborationController;
|
|
13
|
+
private readonly _localCacheService;
|
|
14
|
+
private readonly _dataLoaderService;
|
|
15
|
+
private readonly _univerInstanceService;
|
|
16
|
+
private readonly _urlService;
|
|
17
|
+
private _revertAcknowledgementSubscription;
|
|
18
|
+
constructor(_commandService: ICommandService, _menuManagerService: IMenuManagerService, _historyManagerService: HistoryLoaderService, _localeService: LocaleService, _messageService: IMessageService, _collaborationController: CollaborationController, _localCacheService: ILocalCacheService, _dataLoaderService: DataLoaderService, _univerInstanceService: IUniverInstanceService, _urlService: IURLService);
|
|
19
|
+
private _init;
|
|
20
|
+
private _handleRevertAcknowledgement;
|
|
21
|
+
private _clearRevertAcknowledgement;
|
|
22
|
+
private _showRevertFailed;
|
|
23
|
+
private _setupSubUnitSync;
|
|
24
|
+
private _updateURLWithCurrentState;
|
|
25
|
+
private _updateSubUnitFromURLParams;
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CollaborationController, DataLoaderService, ILocalCacheService } from '@univerjs-pro/collaboration-client';
|
|
2
|
+
import { IURLService } from '@univerjs-pro/collaboration-client-ui';
|
|
3
|
+
import { ICommandService, IUniverInstanceService, LocaleService, RxDisposable } from '@univerjs/core';
|
|
4
|
+
import { IMenuManagerService, IMessageService } from '@univerjs/ui';
|
|
5
|
+
import { HistoryLoaderService } from '../services/history-loader.service';
|
|
6
|
+
export declare class MobileHistoryLoaderController extends RxDisposable {
|
|
7
|
+
private readonly _commandService;
|
|
8
|
+
protected readonly _menuManagerService: IMenuManagerService;
|
|
9
|
+
private readonly _historyManagerService;
|
|
10
|
+
private readonly _localeService;
|
|
11
|
+
private readonly _messageService;
|
|
12
|
+
private readonly _collaborationController;
|
|
13
|
+
private readonly _localCacheService;
|
|
14
|
+
private readonly _dataLoaderService;
|
|
15
|
+
private readonly _univerInstanceService;
|
|
16
|
+
private readonly _urlService;
|
|
17
|
+
private _revertAcknowledgementSubscription;
|
|
18
|
+
constructor(_commandService: ICommandService, _menuManagerService: IMenuManagerService, _historyManagerService: HistoryLoaderService, _localeService: LocaleService, _messageService: IMessageService, _collaborationController: CollaborationController, _localCacheService: ILocalCacheService, _dataLoaderService: DataLoaderService, _univerInstanceService: IUniverInstanceService, _urlService: IURLService);
|
|
19
|
+
private _init;
|
|
20
|
+
private _handleRevertAcknowledgement;
|
|
21
|
+
private _clearRevertAcknowledgement;
|
|
22
|
+
private _showRevertFailed;
|
|
23
|
+
private _setupSubUnitSync;
|
|
24
|
+
private _updateURLWithCurrentState;
|
|
25
|
+
private _updateSubUnitFromURLParams;
|
|
26
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ICollaborationEvent, IRevertRevisionMutationParams } from '@univerjs-pro/collaboration';
|
|
2
|
+
export declare function isRevertRevisionMutationParams(params: object | undefined): params is IRevertRevisionMutationParams;
|
|
3
|
+
export declare function isExpectedRevertAcknowledgement(event: ICollaborationEvent, expectedRevert: IRevertRevisionMutationParams): boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './global.css';
|
|
2
|
+
export { ToggleEditHistoryOperation } from './commands/history.operate';
|
|
3
|
+
export { SHEETS_HISTORY_UI_PLUGIN_CONFIG_KEY } from './config/config';
|
|
4
|
+
export { UniverSheetsHistoryMobileUIPlugin } from './mobile-plugin';
|
|
5
|
+
export { UniverSheetsHistoryUIPlugin } from './plugin';
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
declare const locale: {
|
|
2
|
+
'sheets-history-ui': {
|
|
3
|
+
loader: {
|
|
4
|
+
panel: {
|
|
5
|
+
title: string;
|
|
6
|
+
reverting: string;
|
|
7
|
+
revertFailed: string;
|
|
8
|
+
listFetchError: string;
|
|
9
|
+
};
|
|
10
|
+
info: {
|
|
11
|
+
initializing: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
viewer: {
|
|
15
|
+
panel: {
|
|
16
|
+
title: string;
|
|
17
|
+
unknownUser: string;
|
|
18
|
+
listFetchError: string;
|
|
19
|
+
revertConfirm: string;
|
|
20
|
+
revertConfirmText: string;
|
|
21
|
+
cancel: string;
|
|
22
|
+
confirm: string;
|
|
23
|
+
reverting: string;
|
|
24
|
+
revertFailed: string;
|
|
25
|
+
currentVersion: string;
|
|
26
|
+
today: string;
|
|
27
|
+
dateCurrentYear: string;
|
|
28
|
+
dateFull: string;
|
|
29
|
+
timeFormat: string;
|
|
30
|
+
currentUser: string;
|
|
31
|
+
revertDesc: string;
|
|
32
|
+
filterAll: string;
|
|
33
|
+
filterUser: string;
|
|
34
|
+
filterAi: string;
|
|
35
|
+
aiAssistant: string;
|
|
36
|
+
filterCollaboratorCancel: string;
|
|
37
|
+
filterCollaboratorConfirm: string;
|
|
38
|
+
filterCollaborator: string;
|
|
39
|
+
};
|
|
40
|
+
info: {
|
|
41
|
+
loading: string;
|
|
42
|
+
initializing: string;
|
|
43
|
+
};
|
|
44
|
+
header: {
|
|
45
|
+
back: string;
|
|
46
|
+
revert: string;
|
|
47
|
+
};
|
|
48
|
+
action: {
|
|
49
|
+
insertSheet: string;
|
|
50
|
+
removeSheet: string;
|
|
51
|
+
createSheet: string;
|
|
52
|
+
renameSheet: string;
|
|
53
|
+
reorderSheet: string;
|
|
54
|
+
hideSheet: string;
|
|
55
|
+
copySheet: string;
|
|
56
|
+
setTabColor: string;
|
|
57
|
+
renameWorkbook: string;
|
|
58
|
+
insertRow: string;
|
|
59
|
+
insertCol: string;
|
|
60
|
+
removeRow: string;
|
|
61
|
+
removeCol: string;
|
|
62
|
+
moveRows: string;
|
|
63
|
+
moveCols: string;
|
|
64
|
+
showRow: string;
|
|
65
|
+
hideRow: string;
|
|
66
|
+
showCol: string;
|
|
67
|
+
hideCol: string;
|
|
68
|
+
setRowHeight: string;
|
|
69
|
+
setColWidth: string;
|
|
70
|
+
setRowAutoHeight: string;
|
|
71
|
+
setRowIsAutoHeight: string;
|
|
72
|
+
setRowData: string;
|
|
73
|
+
setColData: string;
|
|
74
|
+
setRowCount: string;
|
|
75
|
+
setColCount: string;
|
|
76
|
+
setRangeValues: string;
|
|
77
|
+
moveRange: string;
|
|
78
|
+
reorderRange: string;
|
|
79
|
+
mergeCells: string;
|
|
80
|
+
unmergeCells: string;
|
|
81
|
+
setFilter: string;
|
|
82
|
+
setFilterCriteria: string;
|
|
83
|
+
removeFilter: string;
|
|
84
|
+
recalcFilter: string;
|
|
85
|
+
setFrozen: string;
|
|
86
|
+
toggleGridlines: string;
|
|
87
|
+
setGridlinesColor: string;
|
|
88
|
+
setRightToLeft: string;
|
|
89
|
+
setDefaultStyle: string;
|
|
90
|
+
editSheet: string;
|
|
91
|
+
revertSheet: string;
|
|
92
|
+
revertSheetPrefix: string;
|
|
93
|
+
revertSheetSuffix: string;
|
|
94
|
+
setDV: string;
|
|
95
|
+
removeDV: string;
|
|
96
|
+
setCF: string;
|
|
97
|
+
addCF: string;
|
|
98
|
+
deleteCF: string;
|
|
99
|
+
moveCF: string;
|
|
100
|
+
addProtection: string;
|
|
101
|
+
setProtection: string;
|
|
102
|
+
deleteProtection: string;
|
|
103
|
+
addRangeProtection: string;
|
|
104
|
+
setRangeProtection: string;
|
|
105
|
+
deleteRangeProtection: string;
|
|
106
|
+
setPermissionPoints: string;
|
|
107
|
+
setNumfmt: string;
|
|
108
|
+
removeNumfmt: string;
|
|
109
|
+
addRangeTheme: string;
|
|
110
|
+
setRangeTheme: string;
|
|
111
|
+
removeRangeTheme: string;
|
|
112
|
+
setWorksheetRangeTheme: string;
|
|
113
|
+
registerRangeTheme: string;
|
|
114
|
+
unregisterRangeTheme: string;
|
|
115
|
+
deleteWorksheetRangeTheme: string;
|
|
116
|
+
empty: string;
|
|
117
|
+
addSparkline: string;
|
|
118
|
+
setSparkline: string;
|
|
119
|
+
removeSparkline: string;
|
|
120
|
+
insertChart: string;
|
|
121
|
+
removeChart: string;
|
|
122
|
+
updateChartConfig: string;
|
|
123
|
+
updateChartSource: string;
|
|
124
|
+
addPivotTable: string;
|
|
125
|
+
removePivotTable: string;
|
|
126
|
+
setPivotOption: string;
|
|
127
|
+
setPivotPosition: string;
|
|
128
|
+
updatePivotSource: string;
|
|
129
|
+
addPivotField: string;
|
|
130
|
+
removePivotField: string;
|
|
131
|
+
renamePivotField: string;
|
|
132
|
+
updateFieldPosition: string;
|
|
133
|
+
updateValuePosition: string;
|
|
134
|
+
updatePivotFieldSource: string;
|
|
135
|
+
setPivotFieldFormat: string;
|
|
136
|
+
setPivotFilter: string;
|
|
137
|
+
setPivotValueFilter: string;
|
|
138
|
+
setPivotSort: string;
|
|
139
|
+
setPivotCollapse: string;
|
|
140
|
+
setPivotSubtotalType: string;
|
|
141
|
+
insertShape: string;
|
|
142
|
+
removeShape: string;
|
|
143
|
+
updateShapeData: string;
|
|
144
|
+
updateShapeType: string;
|
|
145
|
+
addTable: string;
|
|
146
|
+
updateTable: string;
|
|
147
|
+
removeTable: string;
|
|
148
|
+
setTableFilter: string;
|
|
149
|
+
updateDrawing: string;
|
|
150
|
+
insertDrawing: string;
|
|
151
|
+
removeDrawing: string;
|
|
152
|
+
etc: string;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
export default locale;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IUniverSheetsHistoryUIConfig } from './config/config';
|
|
2
|
+
import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
3
|
+
export declare class UniverSheetsHistoryMobileUIPlugin extends Plugin {
|
|
4
|
+
private readonly _config;
|
|
5
|
+
protected _injector: Injector;
|
|
6
|
+
private readonly _configService;
|
|
7
|
+
static type: UniverInstanceType;
|
|
8
|
+
static pluginName: string;
|
|
9
|
+
static packageName: string;
|
|
10
|
+
static version: string;
|
|
11
|
+
constructor(_config: Partial<IUniverSheetsHistoryUIConfig> | undefined, _injector: Injector, _configService: IConfigService);
|
|
12
|
+
onStarting(): void;
|
|
13
|
+
onSteady(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IUniverSheetsHistoryUIConfig } from './config/config';
|
|
2
|
+
import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
3
|
+
export declare class UniverSheetsHistoryUIPlugin extends Plugin {
|
|
4
|
+
private readonly _config;
|
|
5
|
+
protected _injector: Injector;
|
|
6
|
+
private readonly _configService;
|
|
7
|
+
static pluginName: string;
|
|
8
|
+
static packageName: string;
|
|
9
|
+
static version: string;
|
|
10
|
+
static type: UniverInstanceType;
|
|
11
|
+
constructor(_config: Partial<IUniverSheetsHistoryUIConfig> | undefined, _injector: Injector, _configService: IConfigService);
|
|
12
|
+
onStarting(): void;
|
|
13
|
+
onSteady(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { PluginCtor } from '@univerjs/core';
|
|
2
|
+
import { Disposable, ICommandService, IConfigService, IPermissionService, IUniverInstanceService, LocaleService, ThemeService, Univer } from '@univerjs/core';
|
|
3
|
+
import { RangeProtectionRuleModel } from '@univerjs/sheets';
|
|
4
|
+
import { IDialogService, IMessageService, ISidebarService } from '@univerjs/ui';
|
|
5
|
+
export declare const UNIVER_HISTORY_CONTAINER_ID = "univer-history-container";
|
|
6
|
+
export declare class HistoryLoaderService extends Disposable {
|
|
7
|
+
private readonly _localeService;
|
|
8
|
+
private readonly _univerInstanceService;
|
|
9
|
+
private readonly _configService;
|
|
10
|
+
private readonly _commandService;
|
|
11
|
+
private readonly _messageService;
|
|
12
|
+
private readonly _permissionService;
|
|
13
|
+
private _selectionProtectionRuleModel;
|
|
14
|
+
private readonly _dialogService;
|
|
15
|
+
private readonly _sidebarService;
|
|
16
|
+
private readonly _themeService;
|
|
17
|
+
private _historyUniver$;
|
|
18
|
+
readonly historyUniver$: import("rxjs").Observable<Univer | null>;
|
|
19
|
+
private _disposableCollection;
|
|
20
|
+
private _pluginMap;
|
|
21
|
+
private _internalWebWorker;
|
|
22
|
+
constructor(_localeService: LocaleService, _univerInstanceService: IUniverInstanceService, _configService: IConfigService, _commandService: ICommandService, _messageService: IMessageService, _permissionService: IPermissionService, _selectionProtectionRuleModel: RangeProtectionRuleModel, _dialogService: IDialogService, _sidebarService: ISidebarService, _themeService: ThemeService);
|
|
23
|
+
get historyUniver(): Univer | null;
|
|
24
|
+
private _init;
|
|
25
|
+
private _initContainer;
|
|
26
|
+
private _initPlugins;
|
|
27
|
+
dispose(): void;
|
|
28
|
+
registerPlugin<T extends PluginCtor>(ctor: T, config?: ConstructorParameters<T>[0], override?: false): void;
|
|
29
|
+
getAllPlugins(): [ctor: PluginCtor, config: object | undefined][];
|
|
30
|
+
mountHistoryContent(unitId: string, param?: unknown): void;
|
|
31
|
+
unMountHistoryContent(): void;
|
|
32
|
+
private _initUniver;
|
|
33
|
+
private _syncViewerServices;
|
|
34
|
+
private _initListener;
|
|
35
|
+
private _checkCanRevert;
|
|
36
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IUniverConfig, LocaleService } from '@univerjs/core';
|
|
2
|
+
type IHistoryLocaleService = Pick<LocaleService, 'getCurrentLocale' | 'getDirection' | 'getLocales'>;
|
|
3
|
+
export declare function getHistoryUniverLocaleConfig(localeService: IHistoryLocaleService): Pick<IUniverConfig, 'direction' | 'locale' | 'locales'>;
|
|
4
|
+
export declare function syncHistoryContainerDirection(container: HTMLElement, localeService: IHistoryLocaleService): void;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { HistoryManagerService } from '../viewer/services/history-manager.service';
|
|
2
|
+
export type HistoryVersionParam = Parameters<HistoryManagerService['triggerCustomVersions']>[2];
|
|
3
|
+
export declare function isHistoryVersionParam(value: unknown): value is HistoryVersionParam;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { PluginCtor } from '@univerjs/core';
|
|
2
|
+
import { Disposable, ICommandService, IConfigService, IPermissionService, IUniverInstanceService, LocaleService, ThemeService, Univer } from '@univerjs/core';
|
|
3
|
+
import { RangeProtectionRuleModel } from '@univerjs/sheets';
|
|
4
|
+
import { IDialogService, IMessageService, ISidebarService } from '@univerjs/ui';
|
|
5
|
+
export declare const UNIVER_HISTORY_CONTAINER_ID = "univer-history-container-mobile";
|
|
6
|
+
export declare class MobileHistoryLoaderService extends Disposable {
|
|
7
|
+
private readonly _localeService;
|
|
8
|
+
private readonly _univerInstanceService;
|
|
9
|
+
private readonly _configService;
|
|
10
|
+
private readonly _commandService;
|
|
11
|
+
private readonly _messageService;
|
|
12
|
+
private readonly _permissionService;
|
|
13
|
+
private _selectionProtectionRuleModel;
|
|
14
|
+
private readonly _dialogService;
|
|
15
|
+
private readonly _sidebarService;
|
|
16
|
+
private readonly _themeService;
|
|
17
|
+
private _historyUniver$;
|
|
18
|
+
readonly historyUniver$: import("rxjs").Observable<Univer | null>;
|
|
19
|
+
private readonly _disposableCollection;
|
|
20
|
+
private readonly _pluginMap;
|
|
21
|
+
private _internalWebWorker;
|
|
22
|
+
constructor(_localeService: LocaleService, _univerInstanceService: IUniverInstanceService, _configService: IConfigService, _commandService: ICommandService, _messageService: IMessageService, _permissionService: IPermissionService, _selectionProtectionRuleModel: RangeProtectionRuleModel, _dialogService: IDialogService, _sidebarService: ISidebarService, _themeService: ThemeService);
|
|
23
|
+
get historyUniver(): Univer | null;
|
|
24
|
+
private _init;
|
|
25
|
+
private _initContainer;
|
|
26
|
+
private _initPlugins;
|
|
27
|
+
dispose(): void;
|
|
28
|
+
registerPlugin<T extends PluginCtor>(ctor: T, config?: ConstructorParameters<T>[0], override?: false): void;
|
|
29
|
+
getAllPlugins(): [ctor: PluginCtor, config: object | undefined][];
|
|
30
|
+
mountHistoryContent(unitId: string, param?: unknown): void;
|
|
31
|
+
unMountHistoryContent(): void;
|
|
32
|
+
private _initUniver;
|
|
33
|
+
private _initListener;
|
|
34
|
+
private _checkCanRevert;
|
|
35
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Disposable } from '@univerjs/core';
|
|
2
|
+
import { ICellEditorManagerService } from '@univerjs/sheets-ui';
|
|
3
|
+
export declare class DisableStateController extends Disposable {
|
|
4
|
+
private readonly _cellEditorManagerService;
|
|
5
|
+
constructor(_cellEditorManagerService: ICellEditorManagerService);
|
|
6
|
+
private _init;
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Disposable, IConfigService, Injector, IPermissionService, LocaleService } from '@univerjs/core';
|
|
2
|
+
import { IMessageService, IUIPartsService } from '@univerjs/ui';
|
|
3
|
+
import { HistoryManagerService } from '../services/history-manager.service';
|
|
4
|
+
export declare class HistoryManagerController extends Disposable {
|
|
5
|
+
private readonly _permissionService;
|
|
6
|
+
private readonly _uiPartsService;
|
|
7
|
+
private readonly _messageService;
|
|
8
|
+
private readonly _localeService;
|
|
9
|
+
private readonly _historyManagerService;
|
|
10
|
+
private readonly _injector;
|
|
11
|
+
private readonly _configService;
|
|
12
|
+
constructor(_permissionService: IPermissionService, _uiPartsService: IUIPartsService, _messageService: IMessageService, _localeService: LocaleService, _historyManagerService: HistoryManagerService, _injector: Injector, _configService: IConfigService);
|
|
13
|
+
private _init;
|
|
14
|
+
private _registerHeader;
|
|
15
|
+
private _registerLoadingMask;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Disposable, IConfigService, Injector, IPermissionService, LocaleService } from '@univerjs/core';
|
|
2
|
+
import { IMessageService, IUIPartsService } from '@univerjs/ui';
|
|
3
|
+
import { HistoryManagerService } from '../services/history-manager.service';
|
|
4
|
+
export declare class MobileHistoryManagerController extends Disposable {
|
|
5
|
+
private readonly _permissionService;
|
|
6
|
+
private readonly _uiPartsService;
|
|
7
|
+
private readonly _messageService;
|
|
8
|
+
private readonly _localeService;
|
|
9
|
+
private readonly _historyManagerService;
|
|
10
|
+
private readonly _injector;
|
|
11
|
+
private readonly _configService;
|
|
12
|
+
constructor(_permissionService: IPermissionService, _uiPartsService: IUIPartsService, _messageService: IMessageService, _localeService: LocaleService, _historyManagerService: HistoryManagerService, _injector: Injector, _configService: IConfigService);
|
|
13
|
+
private _init;
|
|
14
|
+
private _registerHeader;
|
|
15
|
+
private _registerLoadingMask;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Disposable, Injector } from '@univerjs/core';
|
|
2
|
+
import { IUIPartsService } from '@univerjs/ui';
|
|
3
|
+
export declare class MobileVersionListController extends Disposable {
|
|
4
|
+
private readonly _uiPartsService;
|
|
5
|
+
private readonly _injector;
|
|
6
|
+
constructor(_uiPartsService: IUIPartsService, _injector: Injector);
|
|
7
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Workbook } from '@univerjs/core';
|
|
2
|
+
import type { IRenderContext, IRenderModule, Scene } from '@univerjs/engine-render';
|
|
3
|
+
import { SheetCollabCursorShape } from '@univerjs-pro/collaboration-client-ui';
|
|
4
|
+
import { Disposable, ICommandService, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
5
|
+
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
6
|
+
import { IRenderManagerService, Rect } from '@univerjs/engine-render';
|
|
7
|
+
import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';
|
|
8
|
+
import { HistoryManagerService } from '../services/history-manager.service';
|
|
9
|
+
import { SheetsHistoryDiffColorService } from '../services/sheets-history-diff-color.service';
|
|
10
|
+
import { VersionDiffService } from '../services/version-diff.service';
|
|
11
|
+
import { SheetHistoryArrowShape } from '../views/shapes/sheet-history-arrow.shape';
|
|
12
|
+
type SheetHistoryDiffShape = SheetCollabCursorShape | Rect | SheetHistoryArrowShape;
|
|
13
|
+
export declare class VersionDiffRenderController extends Disposable implements IRenderModule {
|
|
14
|
+
private readonly _context;
|
|
15
|
+
private readonly _historyManagerService;
|
|
16
|
+
private readonly _versionDiffService;
|
|
17
|
+
private readonly _univerInstanceService;
|
|
18
|
+
private readonly _renderManagerService;
|
|
19
|
+
private readonly _sheetSkeletonManagerService;
|
|
20
|
+
private readonly _commandService;
|
|
21
|
+
private readonly _drawingManagerService;
|
|
22
|
+
private readonly _localeService;
|
|
23
|
+
private readonly _diffColorService;
|
|
24
|
+
private _diffs;
|
|
25
|
+
private _borderDiffs;
|
|
26
|
+
private _arrowDiffs;
|
|
27
|
+
private _lastPointer;
|
|
28
|
+
private _pointerMoveSubscription;
|
|
29
|
+
constructor(_context: IRenderContext<Workbook>, _historyManagerService: HistoryManagerService, _versionDiffService: VersionDiffService, _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService, _drawingManagerService: IDrawingManagerService, _localeService: LocaleService, _diffColorService: SheetsHistoryDiffColorService);
|
|
30
|
+
private _init;
|
|
31
|
+
private _initRender;
|
|
32
|
+
private _initDiffRender;
|
|
33
|
+
private _initPointerEvents;
|
|
34
|
+
private _initActiveSwitch;
|
|
35
|
+
private _updateWorksheetVisibility;
|
|
36
|
+
private _setWorksheetVisibility;
|
|
37
|
+
private _getLabelHorizontalPosition;
|
|
38
|
+
private _updateDiffMarks;
|
|
39
|
+
private _generateDiffMarks;
|
|
40
|
+
hideDiffMarks(): void;
|
|
41
|
+
showDiffMarks(): void;
|
|
42
|
+
removeDiffMarks(): void;
|
|
43
|
+
scrollToShape(shape: SheetHistoryDiffShape, scene: Scene): void;
|
|
44
|
+
private _renderCellRanges;
|
|
45
|
+
private _renderBorderRanges;
|
|
46
|
+
private _renderArrowRanges;
|
|
47
|
+
private _renderDrawingHighlights;
|
|
48
|
+
private _createDrawingHighlight;
|
|
49
|
+
private _bindDrawingHighlightHover;
|
|
50
|
+
private _setOverlappingShapesHovered;
|
|
51
|
+
private _removeDiffMarks;
|
|
52
|
+
private _handleOverlappingShapes;
|
|
53
|
+
private _findOverlappingShapes;
|
|
54
|
+
private _scrollToShape;
|
|
55
|
+
private _getSheetObject;
|
|
56
|
+
dispose(): void;
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Disposable, IConfigService, LocaleService } from '@univerjs/core';
|
|
2
|
+
import { ISidebarService } from '@univerjs/ui';
|
|
3
|
+
import { HistoryManagerService } from '../services/history-manager.service';
|
|
4
|
+
export declare class VersionListController extends Disposable {
|
|
5
|
+
private readonly _sidebarService;
|
|
6
|
+
private readonly _localeService;
|
|
7
|
+
private readonly _historyManagerService;
|
|
8
|
+
private readonly _configService;
|
|
9
|
+
private _sidebarDisposable;
|
|
10
|
+
constructor(_sidebarService: ISidebarService, _localeService: LocaleService, _historyManagerService: HistoryManagerService, _configService: IConfigService);
|
|
11
|
+
private _init;
|
|
12
|
+
private _openPanel;
|
|
13
|
+
private _initPanel;
|
|
14
|
+
}
|