@univerjs/docs-ui 1.0.2 → 1.0.4
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 +1315 -349
- package/lib/cjs/locale/ar-SA.js +13 -0
- package/lib/cjs/locale/ca-ES.js +13 -0
- package/lib/cjs/locale/de-DE.js +13 -0
- package/lib/cjs/locale/en-US.js +13 -0
- package/lib/cjs/locale/es-ES.js +13 -0
- package/lib/cjs/locale/fa-IR.js +13 -0
- package/lib/cjs/locale/fr-FR.js +13 -0
- package/lib/cjs/locale/id-ID.js +13 -0
- package/lib/cjs/locale/it-IT.js +13 -0
- package/lib/cjs/locale/ja-JP.js +13 -0
- package/lib/cjs/locale/ko-KR.js +13 -0
- package/lib/cjs/locale/pl-PL.js +13 -0
- package/lib/cjs/locale/pt-BR.js +13 -0
- package/lib/cjs/locale/ru-RU.js +13 -0
- package/lib/cjs/locale/sk-SK.js +13 -0
- package/lib/cjs/locale/vi-VN.js +13 -0
- package/lib/cjs/locale/zh-CN.js +13 -0
- package/lib/cjs/locale/zh-HK.js +13 -0
- package/lib/cjs/locale/zh-TW.js +13 -0
- package/lib/es/index.js +1319 -355
- package/lib/es/locale/ar-SA.js +13 -0
- package/lib/es/locale/ca-ES.js +13 -0
- package/lib/es/locale/de-DE.js +13 -0
- package/lib/es/locale/en-US.js +13 -0
- package/lib/es/locale/es-ES.js +13 -0
- package/lib/es/locale/fa-IR.js +13 -0
- package/lib/es/locale/fr-FR.js +13 -0
- package/lib/es/locale/id-ID.js +13 -0
- package/lib/es/locale/it-IT.js +13 -0
- package/lib/es/locale/ja-JP.js +13 -0
- package/lib/es/locale/ko-KR.js +13 -0
- package/lib/es/locale/pl-PL.js +13 -0
- package/lib/es/locale/pt-BR.js +13 -0
- package/lib/es/locale/ru-RU.js +13 -0
- package/lib/es/locale/sk-SK.js +13 -0
- package/lib/es/locale/vi-VN.js +13 -0
- package/lib/es/locale/zh-CN.js +13 -0
- package/lib/es/locale/zh-HK.js +13 -0
- package/lib/es/locale/zh-TW.js +13 -0
- package/lib/index.css +21 -0
- package/lib/index.js +1319 -355
- package/lib/locale/ar-SA.js +13 -0
- package/lib/locale/ca-ES.js +13 -0
- package/lib/locale/de-DE.js +13 -0
- package/lib/locale/en-US.js +13 -0
- package/lib/locale/es-ES.js +13 -0
- package/lib/locale/fa-IR.js +13 -0
- package/lib/locale/fr-FR.js +13 -0
- package/lib/locale/id-ID.js +13 -0
- package/lib/locale/it-IT.js +13 -0
- package/lib/locale/ja-JP.js +13 -0
- package/lib/locale/ko-KR.js +13 -0
- package/lib/locale/pl-PL.js +13 -0
- package/lib/locale/pt-BR.js +13 -0
- package/lib/locale/ru-RU.js +13 -0
- package/lib/locale/sk-SK.js +13 -0
- package/lib/locale/vi-VN.js +13 -0
- package/lib/locale/zh-CN.js +13 -0
- package/lib/locale/zh-HK.js +13 -0
- package/lib/locale/zh-TW.js +13 -0
- package/lib/types/commands/commands/clipboard.inner.command.d.ts +2 -0
- package/lib/types/commands/commands/doc-delete.command.d.ts +5 -2
- package/lib/types/commands/commands/doc-header-footer.command.d.ts +2 -0
- package/lib/types/commands/commands/insert-header-footer-field.command.d.ts +28 -0
- package/lib/types/commands/commands/refresh-header-footer-fields.command.d.ts +22 -0
- package/lib/types/commands/operations/doc-header-footer-ribbon.operation.d.ts +19 -0
- package/lib/types/controllers/doc-header-footer-ribbon.controller.d.ts +31 -0
- package/lib/types/controllers/render-controllers/doc-field.render-controller.d.ts +31 -0
- package/lib/types/controllers/ui.controller.d.ts +1 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/locale/en-US.d.ts +13 -0
- package/lib/types/menu/context-menu.d.ts +1 -0
- package/lib/types/menu/header-footer-ribbon.d.ts +17 -0
- package/lib/types/services/clipboard/clipboard.service.d.ts +4 -0
- package/lib/types/services/doc-event-manager.service.d.ts +1 -0
- package/lib/types/services/editor/editor-runtime-config.d.ts +2 -0
- package/lib/types/services/selection/doc-selection-render.service.d.ts +2 -0
- package/lib/types/services/selection/text-range.d.ts +6 -1
- package/lib/types/services/selection/word-boundary.d.ts +1 -0
- package/lib/types/shortcuts/core-editing.shortcut.d.ts +4 -0
- package/lib/types/shortcuts/format.shortcut.d.ts +1 -0
- package/lib/types/shortcuts/utils.d.ts +1 -0
- package/lib/types/utils/date-time-field.d.ts +22 -0
- package/lib/types/views/header-footer/panel/DocHeaderFooterFields.d.ts +19 -0
- package/lib/types/views/header-footer/panel/DocHeaderFooterRibbonControl.d.ts +20 -0
- package/lib/types/views/header-footer/panel/component-name.d.ts +2 -0
- package/lib/types/views/header-footer/panel/use-header-footer-options.d.ts +2 -2
- package/lib/umd/index.js +15 -14
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- 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 -1
- package/lib/umd/locale/it-IT.js +1 -1
- 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 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- 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 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +10 -10
|
@@ -0,0 +1,31 @@
|
|
|
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 { DocumentDataModel } from '@univerjs/core';
|
|
17
|
+
import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
18
|
+
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
19
|
+
import { DocSkeletonManagerService } from '@univerjs/docs';
|
|
20
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
21
|
+
import { IRibbonService } from '@univerjs/ui';
|
|
22
|
+
export declare class DocHeaderFooterRibbonController extends Disposable implements IRenderModule {
|
|
23
|
+
private readonly _context;
|
|
24
|
+
private readonly _instanceService;
|
|
25
|
+
private readonly _ribbonService;
|
|
26
|
+
private readonly _renderManager;
|
|
27
|
+
private _visible;
|
|
28
|
+
constructor(_context: IRenderContext<DocumentDataModel>, skeletonManager: DocSkeletonManagerService, _instanceService: IUniverInstanceService, _ribbonService: IRibbonService, _renderManager: IRenderManagerService);
|
|
29
|
+
private _focusedDocumentEditsHeaderFooter;
|
|
30
|
+
dispose(): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 { DocumentDataModel } from '@univerjs/core';
|
|
17
|
+
import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
18
|
+
import { Disposable, IUniverInstanceService, ThemeService } from '@univerjs/core';
|
|
19
|
+
import { DocSelectionManagerService } from '@univerjs/docs';
|
|
20
|
+
import { DocEventManagerService } from '../../services/doc-event-manager.service';
|
|
21
|
+
export declare class DocFieldRenderController extends Disposable implements IRenderModule {
|
|
22
|
+
private readonly _context;
|
|
23
|
+
private readonly _events;
|
|
24
|
+
private readonly _selections;
|
|
25
|
+
private readonly _instances;
|
|
26
|
+
private _hovered;
|
|
27
|
+
private _shade;
|
|
28
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _events: DocEventManagerService, _selections: DocSelectionManagerService, theme: ThemeService, _instances: IUniverInstanceService);
|
|
29
|
+
private _drawFields;
|
|
30
|
+
private _getActiveFields;
|
|
31
|
+
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -116,6 +116,7 @@ export { DocsRenderService } from './services/docs-render.service';
|
|
|
116
116
|
export { Editor } from './services/editor/editor';
|
|
117
117
|
export { EditorService, IEditorService } from './services/editor/editor-manager.service';
|
|
118
118
|
export type { IEditorRuntimeConfig } from './services/editor/editor-runtime-config';
|
|
119
|
+
export { getEditorRuntimeConfig, registerEditorRuntimeConfig } from './services/editor/editor-runtime-config';
|
|
119
120
|
export { DocFloatMenuService } from './services/float-menu.service';
|
|
120
121
|
export { isInSameTableCell, isValidRectRange, NodePositionConvertToRectRange, } from './services/selection/convert-rect-range';
|
|
121
122
|
export { findDocRangeNodePositions } from './services/selection/convert-text-range';
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
declare const locale: {
|
|
17
17
|
'docs-ui': {
|
|
18
18
|
pasteOptions: {
|
|
19
|
+
special: string;
|
|
19
20
|
title: string;
|
|
20
21
|
source: string;
|
|
21
22
|
destination: string;
|
|
@@ -114,6 +115,18 @@ declare const locale: {
|
|
|
114
115
|
deleteTable: string;
|
|
115
116
|
};
|
|
116
117
|
headerFooter: {
|
|
118
|
+
navigation: string;
|
|
119
|
+
options: string;
|
|
120
|
+
position: string;
|
|
121
|
+
refreshFields: string;
|
|
122
|
+
pageNumber: string;
|
|
123
|
+
currentPage: string;
|
|
124
|
+
totalPages: string;
|
|
125
|
+
dateTime: string;
|
|
126
|
+
updateAutomatically: string;
|
|
127
|
+
insertFailed: string;
|
|
128
|
+
goToHeader: string;
|
|
129
|
+
goToFooter: string;
|
|
117
130
|
header: string;
|
|
118
131
|
footer: string;
|
|
119
132
|
panel: string;
|
|
@@ -36,3 +36,4 @@ export declare function DeleteRowsMenuItemFactory(accessor: IAccessor): IMenuBut
|
|
|
36
36
|
export declare function DeleteColumnsMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
|
|
37
37
|
export declare function DeleteTableMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
|
|
38
38
|
export declare function PasteSpecialMenuFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey>;
|
|
39
|
+
export declare function PasteRibbonMenuFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { MenuSchemaType } from '@univerjs/ui';
|
|
17
|
+
export declare const headerFooterRibbonSchema: MenuSchemaType;
|
|
@@ -39,6 +39,8 @@ export interface IDocClipboardPasteContext {
|
|
|
39
39
|
targetUnitId: string;
|
|
40
40
|
}
|
|
41
41
|
export interface IDocClipboardHook {
|
|
42
|
+
/** Opt an internal rich-text editor into the post-paste format menu. */
|
|
43
|
+
supportsPasteOptions?(unitId: string): boolean;
|
|
42
44
|
/** Supply a rich fragment for selections owned by a plugin rather than native text ranges. */
|
|
43
45
|
onCopySelection?(unitId: string): {
|
|
44
46
|
documentData: IDocumentData;
|
|
@@ -73,6 +75,7 @@ export interface IDocClipboardService {
|
|
|
73
75
|
pasteFromClipboard(mode?: DocPasteMode): Promise<boolean>;
|
|
74
76
|
legacyPaste(options: IDocClipboardPayload): Promise<boolean>;
|
|
75
77
|
readonly pasteOptions$: Observable<IDocPasteOptionsState | null>;
|
|
78
|
+
isPasteOptionsEnabled(unitId: string): boolean;
|
|
76
79
|
setNextPasteMode(mode: DocPasteMode): void;
|
|
77
80
|
dismissPasteOptions(): void;
|
|
78
81
|
changePasteMode(mode: DocPasteMode): Promise<boolean>;
|
|
@@ -107,6 +110,7 @@ export declare class DocClipboardService extends Disposable implements IDocClipb
|
|
|
107
110
|
cut(ranges?: ITextRangeWithStyle[]): Promise<boolean>;
|
|
108
111
|
pasteFromClipboard(mode?: DocPasteMode): Promise<boolean>;
|
|
109
112
|
paste(items?: ClipboardItem[], mode?: DocPasteMode): Promise<boolean>;
|
|
113
|
+
isPasteOptionsEnabled(unitId: string): boolean;
|
|
110
114
|
setNextPasteMode(mode: DocPasteMode): void;
|
|
111
115
|
legacyPaste(options: IDocClipboardPayload): Promise<boolean>;
|
|
112
116
|
dismissPasteOptions(): void;
|
|
@@ -169,6 +169,7 @@ export declare class DocEventManagerService extends Disposable implements IRende
|
|
|
169
169
|
isPointerOnInteractiveRange(offsetX: number, offsetY: number): boolean;
|
|
170
170
|
isPointerOnNonChecklistBullet(offsetX: number, offsetY: number): boolean;
|
|
171
171
|
getBulletBounds(): IBulletBound[];
|
|
172
|
+
getCustomRangeBounds(): ICustomRangeBound[];
|
|
172
173
|
getListContextMenuBulletByOffset(offsetX: number, offsetY: number): Nullable<IBulletBound>;
|
|
173
174
|
private _buildCustomRangeBoundsBySegment;
|
|
174
175
|
private _buildCustomRangeBounds;
|
|
@@ -19,6 +19,8 @@ export interface IEditorRuntimeConfig {
|
|
|
19
19
|
layout?: IDocumentLayoutPresentation;
|
|
20
20
|
inheritParagraphStartStyle?: boolean;
|
|
21
21
|
disableSelectionAutoScroll?: boolean;
|
|
22
|
+
/** The host editor provides its own hyperlink menus and pointer interaction. */
|
|
23
|
+
customHyperLinkUI?: boolean;
|
|
22
24
|
}
|
|
23
25
|
export declare function registerEditorRuntimeConfig(model: DocumentDataModel, config: IEditorRuntimeConfig): IDisposable;
|
|
24
26
|
export declare function getEditorRuntimeConfig(model: DocumentDataModel): IEditorRuntimeConfig | undefined;
|
|
@@ -92,6 +92,8 @@ export declare class DocSelectionRenderService extends RxDisposable implements I
|
|
|
92
92
|
get hasPendingSelection(): boolean;
|
|
93
93
|
get isOnPointerEvent(): boolean;
|
|
94
94
|
get isFocusing(): boolean;
|
|
95
|
+
get inputElement(): HTMLDivElement;
|
|
96
|
+
get selectionContainer(): HTMLDivElement;
|
|
95
97
|
get isEditing(): boolean;
|
|
96
98
|
get canFocusing(): boolean;
|
|
97
99
|
cancelPointerSelection(): void;
|
|
@@ -41,6 +41,7 @@ export declare class TextRange implements IDocRange {
|
|
|
41
41
|
style: ITextSelectionStyle;
|
|
42
42
|
private _segmentId;
|
|
43
43
|
private _segmentPage;
|
|
44
|
+
private _logicalRange?;
|
|
44
45
|
rangeType: DOC_RANGE_TYPE;
|
|
45
46
|
private _current;
|
|
46
47
|
private _rangeShape;
|
|
@@ -48,7 +49,10 @@ export declare class TextRange implements IDocRange {
|
|
|
48
49
|
private _cursorList;
|
|
49
50
|
private _anchorBlinkTimer;
|
|
50
51
|
private _anchorActiveStroke;
|
|
51
|
-
constructor(_scene: Scene, _document: Documents, _docSkeleton: DocumentSkeleton, anchorNodePosition?: Nullable<INodePosition>, focusNodePosition?: Nullable<INodePosition>, style?: ITextSelectionStyle, _segmentId?: string, _segmentPage?: number
|
|
52
|
+
constructor(_scene: Scene, _document: Documents, _docSkeleton: DocumentSkeleton, anchorNodePosition?: Nullable<INodePosition>, focusNodePosition?: Nullable<INodePosition>, style?: ITextSelectionStyle, _segmentId?: string, _segmentPage?: number, _logicalRange?: {
|
|
53
|
+
startOffset: number;
|
|
54
|
+
endOffset: number;
|
|
55
|
+
} | undefined);
|
|
52
56
|
private _anchorBlink;
|
|
53
57
|
get startOffset(): number | undefined;
|
|
54
58
|
get endOffset(): number | undefined;
|
|
@@ -73,6 +77,7 @@ export declare class TextRange implements IDocRange {
|
|
|
73
77
|
dispose(): void;
|
|
74
78
|
isIntersection(compareRange: TextRange): boolean;
|
|
75
79
|
refresh(): void;
|
|
80
|
+
private _refreshLogicalRangePositions;
|
|
76
81
|
private _isEmpty;
|
|
77
82
|
private _isCollapsed;
|
|
78
83
|
private _createOrUpdateRange;
|
|
@@ -19,4 +19,5 @@ export interface IWordBoundary {
|
|
|
19
19
|
endOffset: number;
|
|
20
20
|
}
|
|
21
21
|
export declare function getWordBoundaryByIndex(content: string, nodeIndex: number, paragraphStartOffset: number): IWordBoundary | null;
|
|
22
|
+
export declare function getWordSelectionByIndex(content: string, nodeIndex: number, paragraphStartOffset: number, isBack: boolean): IWordBoundary | null;
|
|
22
23
|
export declare function getNextWordBoundaryOffset(content: string, nodeIndex: number, paragraphStartOffset: number, direction: Direction): number | null;
|
|
@@ -19,3 +19,7 @@ export declare const SoftBreakLineShortcut: IShortcutItem;
|
|
|
19
19
|
export declare const DeleteLeftShortcut: IShortcutItem;
|
|
20
20
|
export declare const DeleteRightShortcut: IShortcutItem;
|
|
21
21
|
export declare const CloseHeaderFooterShortcut: IShortcutItem;
|
|
22
|
+
export declare const DeleteWordLeftShortcut: IShortcutItem;
|
|
23
|
+
export declare const DeleteWordRightShortcut: IShortcutItem;
|
|
24
|
+
export declare const DeleteLineStartShortcut: IShortcutItem;
|
|
25
|
+
export declare const DeleteLineEndShortcut: IShortcutItem;
|
|
@@ -14,5 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { IContextService } from '@univerjs/core';
|
|
17
|
+
export declare function whenTextEditorFocused(contextService: IContextService): boolean;
|
|
17
18
|
export declare function whenDocAndEditorFocused(contextService: IContextService): boolean;
|
|
18
19
|
export declare function whenDocAndEditorFocusedWithBreakLine(contextService: IContextService): boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
export type DateTimeFieldFormat = 'short' | 'long' | 'time';
|
|
17
|
+
export declare function createDateTimeField(format: DateTimeFieldFormat, locale: string, date: Date): {
|
|
18
|
+
fieldType: string;
|
|
19
|
+
instruction: string;
|
|
20
|
+
cachedResult: string;
|
|
21
|
+
};
|
|
22
|
+
export declare function resolveDateTimeField(instruction: string, locale: string, date: Date): string | undefined;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
export declare function DocHeaderFooterFields({ unitId, disabled }: {
|
|
17
|
+
unitId: string;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
interface IHeaderFooterRibbonControlProps {
|
|
17
|
+
kind: 'insertion' | 'navigation' | 'options' | 'position';
|
|
18
|
+
}
|
|
19
|
+
export declare function DocHeaderFooterRibbonControl(props: IHeaderFooterRibbonControlProps): import("react").JSX.Element | null;
|
|
20
|
+
export {};
|
|
@@ -14,3 +14,5 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export declare const COMPONENT_DOC_HEADER_FOOTER_PANEL = "COMPONENT_DOC_HEADER_FOOTER_PANEL";
|
|
17
|
+
export declare const DOC_HEADER_FOOTER_RIBBON_TAB = "docs-ui.ribbon.header-footer";
|
|
18
|
+
export declare const DOC_HEADER_FOOTER_RIBBON_CONTROL = "DocHeaderFooterRibbonControl";
|
|
@@ -19,7 +19,7 @@ export declare function useHeaderFooterOptions(unitId: string): {
|
|
|
19
19
|
linkedToPrevious: boolean;
|
|
20
20
|
options: IHeaderFooterProps;
|
|
21
21
|
handleLinkToPreviousChange: (linked: boolean) => Promise<void>;
|
|
22
|
-
handleCheckboxChange: (val: boolean, type: "useFirstPageHeaderFooter" | "evenAndOddHeaders") => void
|
|
22
|
+
handleCheckboxChange: (val: boolean, type: "useFirstPageHeaderFooter" | "evenAndOddHeaders") => Promise<void>;
|
|
23
23
|
handleMarginChange: (val: number, type: "marginHeader" | "marginFooter") => Promise<void>;
|
|
24
|
-
closeHeaderFooter: () =>
|
|
24
|
+
closeHeaderFooter: () => Promise<boolean>;
|
|
25
25
|
};
|