@univerjs/docs-ui 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +1 -3
- package/lib/cjs/index.js +327 -495
- package/lib/cjs/locale/ar-SA.js +2 -2
- package/lib/cjs/locale/ca-ES.js +2 -2
- package/lib/cjs/locale/de-DE.js +2 -2
- package/lib/cjs/locale/en-US.js +2 -2
- package/lib/cjs/locale/es-ES.js +2 -2
- package/lib/cjs/locale/fa-IR.js +2 -2
- package/lib/cjs/locale/fr-FR.js +2 -2
- package/lib/cjs/locale/id-ID.js +2 -2
- package/lib/cjs/locale/it-IT.js +2 -2
- package/lib/cjs/locale/ja-JP.js +2 -2
- package/lib/cjs/locale/ko-KR.js +2 -2
- package/lib/cjs/locale/pl-PL.js +2 -2
- package/lib/cjs/locale/pt-BR.js +2 -2
- package/lib/cjs/locale/ru-RU.js +2 -2
- package/lib/cjs/locale/sk-SK.js +2 -2
- package/lib/cjs/locale/vi-VN.js +2 -2
- package/lib/cjs/locale/zh-CN.js +2 -2
- package/lib/cjs/locale/zh-HK.js +2 -2
- package/lib/cjs/locale/zh-TW.js +2 -2
- package/lib/es/facade.js +1 -2
- package/lib/es/index.js +327 -494
- package/lib/es/locale/ar-SA.js +2 -2
- package/lib/es/locale/ca-ES.js +2 -2
- package/lib/es/locale/de-DE.js +2 -2
- package/lib/es/locale/en-US.js +2 -2
- package/lib/es/locale/es-ES.js +2 -2
- package/lib/es/locale/fa-IR.js +2 -2
- package/lib/es/locale/fr-FR.js +2 -2
- package/lib/es/locale/id-ID.js +2 -2
- package/lib/es/locale/it-IT.js +2 -2
- package/lib/es/locale/ja-JP.js +2 -2
- package/lib/es/locale/ko-KR.js +2 -2
- package/lib/es/locale/pl-PL.js +2 -2
- package/lib/es/locale/pt-BR.js +2 -2
- package/lib/es/locale/ru-RU.js +2 -2
- package/lib/es/locale/sk-SK.js +2 -2
- package/lib/es/locale/vi-VN.js +2 -2
- package/lib/es/locale/zh-CN.js +2 -2
- package/lib/es/locale/zh-HK.js +2 -2
- package/lib/es/locale/zh-TW.js +2 -2
- package/lib/facade.js +1 -2
- package/lib/index.js +327 -494
- package/lib/locale/ar-SA.js +2 -2
- package/lib/locale/ca-ES.js +2 -2
- package/lib/locale/de-DE.js +2 -2
- package/lib/locale/en-US.js +2 -2
- package/lib/locale/es-ES.js +2 -2
- package/lib/locale/fa-IR.js +2 -2
- package/lib/locale/fr-FR.js +2 -2
- package/lib/locale/id-ID.js +2 -2
- package/lib/locale/it-IT.js +2 -2
- package/lib/locale/ja-JP.js +2 -2
- package/lib/locale/ko-KR.js +2 -2
- package/lib/locale/pl-PL.js +2 -2
- package/lib/locale/pt-BR.js +2 -2
- package/lib/locale/ru-RU.js +2 -2
- package/lib/locale/sk-SK.js +2 -2
- package/lib/locale/vi-VN.js +2 -2
- package/lib/locale/zh-CN.js +2 -2
- package/lib/locale/zh-HK.js +2 -2
- package/lib/locale/zh-TW.js +2 -2
- package/lib/types/commands/commands/doc-paragraph-setting.command.d.ts +1 -1
- package/lib/types/commands/commands/table/doc-table-create.command.d.ts +2 -2
- package/lib/types/controllers/components.controller.d.ts +0 -1
- package/lib/types/controllers/mobile/components.controller.d.ts +0 -1
- package/lib/types/locale/en-US.d.ts +1 -0
- package/lib/types/menu/mobile-schema.d.ts +5 -4
- package/lib/types/menu/paragraph-menu.d.ts +2 -2
- package/lib/types/services/clipboard/clipboard.service.d.ts +1 -1
- package/lib/types/services/clipboard/doc-paste-mutation-adapter.service.d.ts +1 -1
- package/lib/types/services/clipboard/paste-options.d.ts +6 -6
- package/lib/types/services/clipboard/udm-to-html/convertor.d.ts +1 -1
- package/lib/types/services/doc-render-background.d.ts +1 -1
- package/lib/types/services/editor/editor-manager.service.d.ts +1 -1
- package/lib/types/services/editor/editor.d.ts +1 -1
- package/lib/types/services/selection/text-range.d.ts +2 -2
- package/lib/types/views/header-footer/panel/DocHeaderFooterPanel.d.ts +1 -1
- package/lib/types/views/header-footer/panel/use-header-footer-options.d.ts +2 -2
- package/lib/types/views/paragraph-setting/ParagraphWordWrapSetting.d.ts +16 -0
- package/lib/types/views/paragraph-setting/hook/utils.d.ts +2 -2
- package/lib/types/views/rich-text-editor/hooks/use-resize.d.ts +1 -1
- package/lib/types/views/section-setting/use-section-setting.d.ts +13 -13
- package/lib/umd/index.js +16 -16
- 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 +16 -16
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaselineOffset, BlockType, BooleanNumber, BuildTextUtils, COLORS, ColorKit, ColumnSeparatorType, CommandType, CustomDecorationType, CustomRangeType, DEFAULT_DOCUMENT_PARAGRAPH_LINE_SPACING, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_ABOVE, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_BELOW, DEFAULT_EMPTY_DOCUMENT_VALUE, DEFAULT_STYLES, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DOCS_NORMAL_EDITOR_UNIT_ID_KEY, DOC_RANGE_TYPE, DashStyleType, DataStreamTreeNodeType, DataStreamTreeTokenType, DeleteDirection, DependentOn, Direction, Disposable, DisposableCollection, DocumentBlockRangeType, DocumentBlockType, DocumentFlavor, DrawingTypeEnum, EDITOR_ACTIVATED, ErrorService, FOCUSING_COMMENT_EDITOR, FOCUSING_COMMON_DRAWINGS, FOCUSING_DOC, FOCUSING_EDITOR_STANDALONE, FOCUSING_FX_BAR_EDITOR, FOCUSING_SHAPE_TEXT_EDITOR, FOCUSING_UNIVER_EDITOR, HorizontalAlign, ICommandService, IConfigService, IConfirmService, IContextService, ILogService, IPermissionService, IUndoRedoService, IUniverInstanceService, ImageSourceType, Inject, Injector, InterceptorManager, JSON1, JSONX, LOCALE_META, LRUMap, ListGlyphType, LocaleService, MODERN_DOCUMENT_DEFAULT_MARGIN, MODERN_DOCUMENT_WIDTH, MemoryCursor, ModernDocumentWidthMode, NAMED_STYLE_MAP, NamedStyleType, ObjectPermissionService, ObjectRelativeFromH, ObjectRelativeFromV, Optional, PAGE_SIZE, PAPER_TYPES, PRESERVE_INSERTED_PARAGRAPH_IDS, PRESET_LIST_TYPE, PageOrientType, Plugin, PositionedObjectLayoutType, PresetListType, QuickListTypeMap, RANGE_DIRECTION, Rectangle, RedoCommand, RegionService, RichTextBuilder, RxDisposable, SHEET_EDITOR_UNITS, SectionType, SliceBodyType, SpacingRule, TableAlignmentType, TableRowHeightRule, TableSizeType, TableTextWrapType, TextX, TextXActionType, ThemeService, Tools, UndoCommand, UniverInstanceType, UpdateDocsAttributeType, VerticalAlign, checkForSubstrings, cloneBodyWithFreshParagraphIds, containsInteriorInsertionOffset, createIdentifier, createInterceptorKey, createInternalEditorID, createParagraphId, createSectionId, debounce, fromEventSubject, generateRandomId, getBlockRangeInterval, getBodySlice, getBodySliceForTextXAction, getColorStyle, getCustomBlockIdsInSelections, getParagraphContentStartOffset, getParagraphContentStartOffsets, getPlainText, getRichTextEditPath, getSectionHeaderFooterReferenceKey, getTableRangeInterval, getTextRunSlice, isCommentEditorID, isInternalEditorID, isSafeUrl, merge, mergeOverrideWithDependencies, normalizeBody, remove, resolveDocumentParagraphStyle, resolveSectionHeaderFooterReference, resolveSectionHeaderFooterReferences, sequenceExecuteAsync, skipParseTagNames, toDisposable, touchDependencies, validateDocBodyStructure } from "@univerjs/core";
|
|
1
|
+
import { BaselineOffset, BlockType, BooleanNumber, BuildTextUtils, COLORS, ColorKit, ColumnSeparatorType, CommandType, CustomDecorationType, CustomRangeType, DEFAULT_DOCUMENT_PARAGRAPH_LINE_SPACING, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_ABOVE, DEFAULT_DOCUMENT_PARAGRAPH_SPACE_BELOW, DEFAULT_EMPTY_DOCUMENT_VALUE, DEFAULT_STYLES, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DOCS_NORMAL_EDITOR_UNIT_ID_KEY, DOC_RANGE_TYPE, DashStyleType, DataStreamTreeNodeType, DataStreamTreeTokenType, DeleteDirection, DependentOn, Direction, Disposable, DisposableCollection, DocumentBlockRangeType, DocumentBlockType, DocumentFlavor, DrawingTypeEnum, EDITOR_ACTIVATED, ErrorService, FOCUSING_COMMENT_EDITOR, FOCUSING_COMMON_DRAWINGS, FOCUSING_DOC, FOCUSING_EDITOR_STANDALONE, FOCUSING_FX_BAR_EDITOR, FOCUSING_SHAPE_TEXT_EDITOR, FOCUSING_UNIVER_EDITOR, HorizontalAlign, ICommandService, IConfigService, IConfirmService, IContextService, ILogService, IPermissionService, IUndoRedoService, IUniverInstanceService, ImageSourceType, Inject, Injector, InterceptorManager, JSON1, JSONX, LOCALE_META, LRUMap, ListGlyphType, LocaleService, MODERN_DOCUMENT_DEFAULT_MARGIN, MODERN_DOCUMENT_WIDTH, MemoryCursor, ModernDocumentWidthMode, NAMED_STYLE_MAP, NamedStyleType, ObjectPermissionService, ObjectRelativeFromH, ObjectRelativeFromV, Optional, PAGE_SIZE, PAPER_TYPES, PRESERVE_INSERTED_PARAGRAPH_IDS, PRESET_LIST_TYPE, PageOrientType, Plugin, PositionedObjectLayoutType, PresetListType, QuickListTypeMap, RANGE_DIRECTION, Rectangle, RedoCommand, RegionService, RichTextBuilder, RxDisposable, SHEET_EDITOR_UNITS, SectionType, SliceBodyType, SpacingRule, TableAlignmentType, TableRowHeightRule, TableSizeType, TableTextWrapType, TextX, TextXActionType, ThemeService, Tools, UndoCommand, UniverInstanceType, UpdateDocsAttributeType, VerticalAlign, checkForSubstrings, cloneBodyWithFreshParagraphIds, containsInteriorInsertionOffset, createIdentifier, createInterceptorKey, createInternalEditorID, createParagraphId, createSectionId, debounce, fromEventSubject, generateRandomId, getBlockRangeInterval, getBodySlice, getBodySliceForTextXAction, getColorStyle, getCustomBlockIdsInSelections, getParagraphContentStartOffset, getParagraphContentStartOffsets, getPlainText, getRichTextEditPath, getSectionHeaderFooterReferenceKey, getTableRangeInterval, getTextRunSlice, isCommentEditorID, isInternalEditorID, isSafeUrl, merge, mergeOverrideWithDependencies, normalizeBody, remove, resolveDocumentParagraphStyle, resolveDocumentParagraphWordWrap, resolveSectionHeaderFooterReference, resolveSectionHeaderFooterReferences, sequenceExecuteAsync, skipParseTagNames, toDisposable, touchDependencies, validateDocBodyStructure } from "@univerjs/core";
|
|
2
2
|
import { CreateHeaderFooterCommand, DeleteTextCommand, DocBlockMoveValidatorService, DocContentInsertService, DocHistoryAction, DocInterceptorService, DocLayoutExecutorService, DocLayoutExecutorState, DocLayoutSessionStatus, DocSelectionManagerService, DocSkeletonManagerService, DocStateChangeManagerService, DocStateEmitService, HeaderFooterType, IDocStateChangeInterceptorService, InsertDocumentColumnBreakCommand, InsertDocumentSectionBreakCommand, InsertTextCommand, RichTextEditingMutation, SetDocumentPermissionCommand, SetHeadingCollapsedCommand, SetSectionHeaderFooterLinkCommand, SetTextSelectionsOperation, UniverDocsPlugin, UpdateDocumentSectionCommand, UpdateTextCommand, buildDocTransform, canEditDocumentTargets, consumeContentInsertRange, createSectionColumnProperties, generateParagraphs, getDocumentEditTargetObjectIds, getDocumentParagraphPermissionObjectId, getDocumentPermissionValue, getDocumentSectionPermissionObjectId, getTopLevelSectionBreaks, isSheetLikeDocsCustomBlockChildType, resolveDocsCustomBlockSize, shouldUseInlineTextSelectionForDocsCustomBlockDrawing, transformDocumentTextRanges } from "@univerjs/docs";
|
|
3
3
|
import * as EngineRender from "@univerjs/engine-render";
|
|
4
4
|
import { BaseObject, CURSOR_TYPE, DRAWING_OBJECT_UPPER_LAYER_INDEX, DeviceInputEventType, DocBackground, DocumentEditArea, DocumentSkeletonPageType, DocumentViewModel, Documents, GlyphType, IRenderManagerService, Layer, LineType, Liquid, NORMAL_TEXT_SELECTION_PLUGIN_STYLE, PageLayoutType, Path, RENDER_CLASS_TYPE, Rect, RegularPolygon, ScrollBar, ScrollTimer, Shape, TRANSFORM_CHANGE_OBSERVABLE_TYPE, UniverRenderEnginePlugin, Vector2, Viewport, compareDocumentSkeletonNestedPagePathOrder, documentSkeletonLineIterator, documentSkeletonTableIterator, getColor, getDocsTableRenderViewport, getDocsTableViewportLeft, getDocumentSkeletonColumnPagePathInfo, getDocumentSkeletonNestedPageOffset, getLastColumn, getNextWheelZoomRatio, getNumberUnitValue, getOffsetRectForDom, getPageFromPath, getParagraphByGlyph, getSystemHighlightColor, getTableIdAndSliceIndex, getTopmostDocsTableHit, hasListGlyph, isFirstGlyph, isIndentByGlyph, parseDataStreamToTree, pixelToPt, ptToPixel, pxToNum, registerDocumentLayoutPresentation } from "@univerjs/engine-render";
|
|
@@ -12,7 +12,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
12
12
|
import { AddImageIcon, AlignTextBothIcon, BoldIcon, CalendarIcon, CatalogueIcon, CheckMarkIcon, CloseIcon, ColorWheelMultiIcon, ColumnIcon, CopyDoubleIcon, CutIcon, DeleteColumnDoubleIcon, DeleteIcon, DeleteRowDoubleIcon, DeleteTableDoubleIcon, DocPasteOptionsIcon, DocSettingIcon, DownIcon, FontColorDoubleIcon, GridIcon, H1Icon, H2Icon, H3Icon, H4Icon, H5Icon, HeaderFooterIcon, HorizontallyIcon, InsertBelowDoubleIcon, InsertDoubleIcon, InsertRowAboveDoubleIcon, InsertRowBelowDoubleIcon, ItalicIcon, KeyboardIcon, LeftInsertColumnDoubleIcon, LeftJustifyingIcon, LineIndentDecreaseIcon, LineIndentIncreaseIcon, LoadingMultiIcon, MenuIcon, MoreDownIcon, MoreHorizontalIcon, MoreLeftIcon, MoreRightIcon, NoColorDoubleIcon, NumberIcon, OrderIcon, PaintBucketDoubleIcon, ParagraphSettingIcon, PasteSpecialDoubleIcon, QuickAddIcon, ReduceDoubleIcon, ReduceIcon, RightInsertColumnDoubleIcon, RightJustifyingIcon, SectionSettingIcon, ShapeIcon, SmileIcon, StatisticalFunctionIcon, StrikethroughIcon, SubscriptIcon, SubtitleTypeIcon, SuperscriptIcon, SymbolsIcon, TextColorSwatchDoubleIcon, TextIcon, TextTypeIcon, TitleTypeIcon, TodoListDoubleIcon, UnderlineIcon, UnorderIcon, WriteIcon, ZoomInIcon } from "@univerjs/icons";
|
|
13
13
|
import { getDrawingShapeKeyByDrawingSearch } from "@univerjs/drawing";
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
// src/basics/docs-view-key.ts
|
|
16
16
|
/**
|
|
17
17
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
18
18
|
*
|
|
@@ -46,8 +46,7 @@ const DOCS_COMPONENT_HEADER_LAYER_INDEX = 4;
|
|
|
46
46
|
const DOCS_COMPONENT_DEFAULT_Z_INDEX = 10;
|
|
47
47
|
const NORMAL_TEXT_SELECTION_PLUGIN_NAME = "normalTextSelectionPluginName";
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
//#region src/basics/component-tools.ts
|
|
49
|
+
// src/basics/component-tools.ts
|
|
51
50
|
function neoGetDocObject(renderContext) {
|
|
52
51
|
const { mainComponent, scene, engine, components } = renderContext;
|
|
53
52
|
return {
|
|
@@ -69,8 +68,7 @@ function getDocObjectById(unitId, renderManagerService) {
|
|
|
69
68
|
};
|
|
70
69
|
}
|
|
71
70
|
|
|
72
|
-
|
|
73
|
-
//#region src/basics/custom-decoration-factory.ts
|
|
71
|
+
// src/basics/custom-decoration-factory.ts
|
|
74
72
|
function addCustomDecorationFactory(param) {
|
|
75
73
|
const { unitId, ranges, id, type, segmentId } = param;
|
|
76
74
|
const doMutation = {
|
|
@@ -136,8 +134,7 @@ function deleteCustomDecorationFactory(accessor, params) {
|
|
|
136
134
|
return doMutation;
|
|
137
135
|
}
|
|
138
136
|
|
|
139
|
-
|
|
140
|
-
//#region src/basics/doc-custom-range-chrome.ts
|
|
137
|
+
// src/basics/doc-custom-range-chrome.ts
|
|
141
138
|
const DOC_CUSTOM_RANGE_CHROME_RADIUS = 1;
|
|
142
139
|
const DOC_CUSTOM_RANGE_CHROME_BACKGROUND_ALPHA = .07;
|
|
143
140
|
function resolveDocCustomRangeChromeTheme(themeService) {
|
|
@@ -159,8 +156,7 @@ function drawDocCustomRangeChrome(ctx, rect, theme) {
|
|
|
159
156
|
ctx.restore();
|
|
160
157
|
}
|
|
161
158
|
|
|
162
|
-
|
|
163
|
-
//#region src/basics/paragraph.ts
|
|
159
|
+
// src/basics/paragraph.ts
|
|
164
160
|
function isTopLevelStructuralGap(dataStream, offset) {
|
|
165
161
|
const previousToken = dataStream[offset - 1];
|
|
166
162
|
const nextToken = dataStream[offset];
|
|
@@ -241,8 +237,7 @@ function getCustomDecorationAtPosition(customDecorations, position) {
|
|
|
241
237
|
return customDecorations.filter((customDecoration) => position > customDecoration.startIndex && position <= customDecoration.endIndex);
|
|
242
238
|
}
|
|
243
239
|
|
|
244
|
-
|
|
245
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
|
|
240
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/typeof.js
|
|
246
241
|
function _typeof(o) {
|
|
247
242
|
"@babel/helpers - typeof";
|
|
248
243
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -252,8 +247,7 @@ function _typeof(o) {
|
|
|
252
247
|
}, _typeof(o);
|
|
253
248
|
}
|
|
254
249
|
|
|
255
|
-
|
|
256
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPrimitive.js
|
|
250
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/toPrimitive.js
|
|
257
251
|
function toPrimitive(t, r) {
|
|
258
252
|
if ("object" != _typeof(t) || !t) return t;
|
|
259
253
|
var e = t[Symbol.toPrimitive];
|
|
@@ -265,15 +259,13 @@ function toPrimitive(t, r) {
|
|
|
265
259
|
return ("string" === r ? String : Number)(t);
|
|
266
260
|
}
|
|
267
261
|
|
|
268
|
-
|
|
269
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
|
|
262
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/toPropertyKey.js
|
|
270
263
|
function toPropertyKey(t) {
|
|
271
264
|
var i = toPrimitive(t, "string");
|
|
272
265
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
273
266
|
}
|
|
274
267
|
|
|
275
|
-
|
|
276
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
|
|
268
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/defineProperty.js
|
|
277
269
|
function _defineProperty(e, r, t) {
|
|
278
270
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
279
271
|
value: t,
|
|
@@ -283,16 +275,14 @@ function _defineProperty(e, r, t) {
|
|
|
283
275
|
}) : e[r] = t, e;
|
|
284
276
|
}
|
|
285
277
|
|
|
286
|
-
|
|
287
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateParam.js
|
|
278
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/decorateParam.js
|
|
288
279
|
function __decorateParam(paramIndex, decorator) {
|
|
289
280
|
return function(target, key) {
|
|
290
281
|
decorator(target, key, paramIndex);
|
|
291
282
|
};
|
|
292
283
|
}
|
|
293
284
|
|
|
294
|
-
|
|
295
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
|
|
285
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/decorate.js
|
|
296
286
|
function __decorate(decorators, target, key, desc) {
|
|
297
287
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
298
288
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -300,8 +290,7 @@ function __decorate(decorators, target, key, desc) {
|
|
|
300
290
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
301
291
|
}
|
|
302
292
|
|
|
303
|
-
|
|
304
|
-
//#region src/services/doc-auto-format.service.ts
|
|
293
|
+
// src/services/doc-auto-format.service.ts
|
|
305
294
|
let DocAutoFormatService = class DocAutoFormatService extends Disposable {
|
|
306
295
|
constructor(_univerInstanceService, _textSelectionManagerService) {
|
|
307
296
|
super();
|
|
@@ -348,8 +337,7 @@ let DocAutoFormatService = class DocAutoFormatService extends Disposable {
|
|
|
348
337
|
};
|
|
349
338
|
DocAutoFormatService = __decorate([__decorateParam(0, IUniverInstanceService), __decorateParam(1, Inject(DocSelectionManagerService))], DocAutoFormatService);
|
|
350
339
|
|
|
351
|
-
|
|
352
|
-
//#region src/commands/commands/auto-format.command.ts
|
|
340
|
+
// src/commands/commands/auto-format.command.ts
|
|
353
341
|
const TabCommandId = "doc.command.tab";
|
|
354
342
|
const TabCommand = {
|
|
355
343
|
id: TabCommandId,
|
|
@@ -377,8 +365,7 @@ const EnterCommand = {
|
|
|
377
365
|
}
|
|
378
366
|
};
|
|
379
367
|
|
|
380
|
-
|
|
381
|
-
//#region src/services/doc-menu-style.service.ts
|
|
368
|
+
// src/services/doc-menu-style.service.ts
|
|
382
369
|
const BODY_DEFAULT_FONTSIZE = 11;
|
|
383
370
|
const HEADER_FOOTER_DEFAULT_FONTSIZE = 9;
|
|
384
371
|
const DEFAULT_TEXT_STYLE = {
|
|
@@ -463,8 +450,7 @@ const SetDocInputStyleCommand = {
|
|
|
463
450
|
}
|
|
464
451
|
};
|
|
465
452
|
|
|
466
|
-
|
|
467
|
-
//#region src/commands/commands/break-line.command.ts
|
|
453
|
+
// src/commands/commands/break-line.command.ts
|
|
468
454
|
const BreakLineCommand = {
|
|
469
455
|
id: "doc.command.break-line",
|
|
470
456
|
type: CommandType.COMMAND,
|
|
@@ -623,8 +609,7 @@ const BreakLineCommand = {
|
|
|
623
609
|
}
|
|
624
610
|
};
|
|
625
611
|
|
|
626
|
-
|
|
627
|
-
//#region src/services/clipboard/doc-paste-mutation-adapter.service.ts
|
|
612
|
+
// src/services/clipboard/doc-paste-mutation-adapter.service.ts
|
|
628
613
|
const IDocClipboardPasteAdapterService = createIdentifier("doc.clipboard-paste-adapter.service");
|
|
629
614
|
var DocClipboardPasteAdapterService = class {
|
|
630
615
|
constructor() {
|
|
@@ -653,8 +638,7 @@ var DocClipboardPasteAdapterService = class {
|
|
|
653
638
|
}
|
|
654
639
|
};
|
|
655
640
|
|
|
656
|
-
|
|
657
|
-
//#region src/services/clipboard/internal-fragment.ts
|
|
641
|
+
// src/services/clipboard/internal-fragment.ts
|
|
658
642
|
const DOC_INTERNAL_FRAGMENT_MIME = "application/x-doc-fragment+json";
|
|
659
643
|
const DOC_INTERNAL_FRAGMENT_COMMENT_PREFIX = "univer-doc-fragment:";
|
|
660
644
|
function createInternalClipboardFragment(doc) {
|
|
@@ -929,8 +913,7 @@ function decodeBase64(value) {
|
|
|
929
913
|
return decodeURIComponent(escape(atob(value)));
|
|
930
914
|
}
|
|
931
915
|
|
|
932
|
-
|
|
933
|
-
//#region src/services/doc-render-background.ts
|
|
916
|
+
// src/services/doc-render-background.ts
|
|
934
917
|
const DOC_TRADITIONAL_WORKSPACE_BACKGROUND_COLOR = "var(--univer-gray-100)";
|
|
935
918
|
const DOC_MODERN_WORKSPACE_BACKGROUND_COLOR = "var(--univer-gray-0)";
|
|
936
919
|
const DOC_UNSPECIFIED_WORKSPACE_BACKGROUND_COLOR = "var(--univer-gray-100)";
|
|
@@ -970,8 +953,7 @@ function getDefaultDocCanvasBackgroundToken(documentFlavor) {
|
|
|
970
953
|
return documentFlavor === DocumentFlavor.MODERN ? DOC_MODERN_WORKSPACE_BACKGROUND_TOKEN : DOC_TRADITIONAL_WORKSPACE_BACKGROUND_TOKEN;
|
|
971
954
|
}
|
|
972
955
|
|
|
973
|
-
|
|
974
|
-
//#region src/commands/util.ts
|
|
956
|
+
// src/commands/util.ts
|
|
975
957
|
/**
|
|
976
958
|
* Get the skeleton of the command's target.
|
|
977
959
|
* @param accessor The injection accessor.
|
|
@@ -982,8 +964,7 @@ function getCommandSkeleton(accessor, unitId) {
|
|
|
982
964
|
return (_renderManagerService = accessor.get(IRenderManagerService).getRenderUnitById(unitId)) === null || _renderManagerService === void 0 ? void 0 : _renderManagerService.with(DocSkeletonManagerService);
|
|
983
965
|
}
|
|
984
966
|
|
|
985
|
-
|
|
986
|
-
//#region src/commands/commands/replace-content.command.ts
|
|
967
|
+
// src/commands/commands/replace-content.command.ts
|
|
987
968
|
const ReplaceSnapshotCommand = {
|
|
988
969
|
id: "doc.command-replace-snapshot",
|
|
989
970
|
type: CommandType.COMMAND,
|
|
@@ -1203,8 +1184,7 @@ const ReplaceTextRunsCommand = {
|
|
|
1203
1184
|
}
|
|
1204
1185
|
};
|
|
1205
1186
|
|
|
1206
|
-
|
|
1207
|
-
//#region src/services/doc-embed-integration.service.ts
|
|
1187
|
+
// src/services/doc-embed-integration.service.ts
|
|
1208
1188
|
const DOC_EMBED_INTERACTION_BOUNDARY_OWNER_ATTRIBUTE = "data-embed-interaction-boundary-owner";
|
|
1209
1189
|
var EmbedInteractionBoundaryService = class {
|
|
1210
1190
|
constructor() {
|
|
@@ -1285,8 +1265,7 @@ var EmbedRuntimeFocusCoordinator = class {
|
|
|
1285
1265
|
};
|
|
1286
1266
|
const IDocEmbedRuntimeFocusCoordinator = EmbedRuntimeFocusCoordinator;
|
|
1287
1267
|
|
|
1288
|
-
|
|
1289
|
-
//#region src/services/editor/editor-runtime-config.ts
|
|
1268
|
+
// src/services/editor/editor-runtime-config.ts
|
|
1290
1269
|
const configs = /* @__PURE__ */ new WeakMap();
|
|
1291
1270
|
function registerEditorRuntimeConfig(model, config) {
|
|
1292
1271
|
const registration = { config };
|
|
@@ -1302,8 +1281,7 @@ function getEditorRuntimeConfig(model) {
|
|
|
1302
1281
|
return (_configs$get = configs.get(model)) === null || _configs$get === void 0 ? void 0 : _configs$get.config;
|
|
1303
1282
|
}
|
|
1304
1283
|
|
|
1305
|
-
|
|
1306
|
-
//#region src/services/selection/convert-text-range.ts
|
|
1284
|
+
// src/services/selection/convert-text-range.ts
|
|
1307
1285
|
function findDocRangeNodePositions(skeleton, startIndex, endIndex, segmentId = "", pageIndex = -1) {
|
|
1308
1286
|
var _skeleton$getViewMode, _skeleton$getViewMode2, _skeleton$getViewMode3, _skeleton$getViewMode4, _skeleton$getViewMode5, _skeleton$getViewMode6;
|
|
1309
1287
|
const dataStream = (_skeleton$getViewMode = skeleton.getViewModel) === null || _skeleton$getViewMode === void 0 || (_skeleton$getViewMode3 = (_skeleton$getViewMode2 = _skeleton$getViewMode.call(skeleton)).getDataModel) === null || _skeleton$getViewMode3 === void 0 || (_skeleton$getViewMode5 = (_skeleton$getViewMode4 = _skeleton$getViewMode3.call(_skeleton$getViewMode2)).getSelfOrHeaderFooterModel) === null || _skeleton$getViewMode5 === void 0 || (_skeleton$getViewMode5 = _skeleton$getViewMode5.call(_skeleton$getViewMode4, segmentId)) === null || _skeleton$getViewMode5 === void 0 || (_skeleton$getViewMode6 = _skeleton$getViewMode5.getBody) === null || _skeleton$getViewMode6 === void 0 || (_skeleton$getViewMode6 = _skeleton$getViewMode6.call(_skeleton$getViewMode5)) === null || _skeleton$getViewMode6 === void 0 ? void 0 : _skeleton$getViewMode6.dataStream;
|
|
@@ -1868,8 +1846,7 @@ function getDocumentUnitId$1(docSkeleton) {
|
|
|
1868
1846
|
return ((_viewModel$getDataMod = viewModel.getDataModel) === null || _viewModel$getDataMod === void 0 || (_viewModel$getDataMod3 = (_viewModel$getDataMod2 = _viewModel$getDataMod.call(viewModel)).getUnitId) === null || _viewModel$getDataMod3 === void 0 ? void 0 : _viewModel$getDataMod3.call(_viewModel$getDataMod2)) ?? "";
|
|
1869
1847
|
}
|
|
1870
1848
|
|
|
1871
|
-
|
|
1872
|
-
//#region src/services/selection/convert-rect-range.ts
|
|
1849
|
+
// src/services/selection/convert-rect-range.ts
|
|
1873
1850
|
function isValidRectRange(anchorNodePosition, focusNodePosition) {
|
|
1874
1851
|
const { path: anchorPath } = anchorNodePosition;
|
|
1875
1852
|
const { path: focusPath } = focusNodePosition;
|
|
@@ -2278,8 +2255,7 @@ function rangesEqual(left, right) {
|
|
|
2278
2255
|
return left.startRowIndex === right.startRowIndex && left.endRowIndex === right.endRowIndex && left.startColumnIndex === right.startColumnIndex && left.endColumnIndex === right.endColumnIndex;
|
|
2279
2256
|
}
|
|
2280
2257
|
|
|
2281
|
-
|
|
2282
|
-
//#region src/services/selection/text-range.ts
|
|
2258
|
+
// src/services/selection/text-range.ts
|
|
2283
2259
|
const TEXT_RANGE_KEY_PREFIX = "__TestSelectionRange__";
|
|
2284
2260
|
const TEXT_ANCHOR_KEY_PREFIX = "__TestSelectionAnchor__";
|
|
2285
2261
|
const ID_LENGTH$2 = 6;
|
|
@@ -2634,8 +2610,7 @@ var TextRange = class {
|
|
|
2634
2610
|
}
|
|
2635
2611
|
};
|
|
2636
2612
|
|
|
2637
|
-
|
|
2638
|
-
//#region src/services/selection/rect-range.ts
|
|
2613
|
+
// src/services/selection/rect-range.ts
|
|
2639
2614
|
const RECT_RANGE_KEY_PREFIX = "__DocTableRectRange__";
|
|
2640
2615
|
const ID_LENGTH$1 = 6;
|
|
2641
2616
|
function convertPositionsToRectRanges(scene, document, docSkeleton, anchorNodePosition, focusNodePosition, style = NORMAL_TEXT_SELECTION_PLUGIN_STYLE, segmentId = "", segmentPage = -1) {
|
|
@@ -2804,8 +2779,7 @@ var RectRange = class {
|
|
|
2804
2779
|
}
|
|
2805
2780
|
};
|
|
2806
2781
|
|
|
2807
|
-
|
|
2808
|
-
//#region src/services/selection/selection-utils.ts
|
|
2782
|
+
// src/services/selection/selection-utils.ts
|
|
2809
2783
|
function disposeRangeList({ textRanges, rectRanges }) {
|
|
2810
2784
|
textRanges.forEach((range) => range.dispose());
|
|
2811
2785
|
rectRanges.forEach((range) => range.dispose());
|
|
@@ -3155,8 +3129,7 @@ function serializeRectRange(rectRange) {
|
|
|
3155
3129
|
};
|
|
3156
3130
|
}
|
|
3157
3131
|
|
|
3158
|
-
|
|
3159
|
-
//#region src/services/selection/word-boundary.ts
|
|
3132
|
+
// src/services/selection/word-boundary.ts
|
|
3160
3133
|
/**
|
|
3161
3134
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3162
3135
|
*
|
|
@@ -3219,8 +3192,7 @@ function getNextWordBoundaryOffset(content, nodeIndex, paragraphStartOffset, dir
|
|
|
3219
3192
|
return null;
|
|
3220
3193
|
}
|
|
3221
3194
|
|
|
3222
|
-
|
|
3223
|
-
//#region src/services/selection/doc-selection-render.service.ts
|
|
3195
|
+
// src/services/selection/doc-selection-render.service.ts
|
|
3224
3196
|
let DocSelectionRenderService = class DocSelectionRenderService extends RxDisposable {
|
|
3225
3197
|
get hasPendingSelection() {
|
|
3226
3198
|
return this._getPendingSelection() != null;
|
|
@@ -3537,6 +3509,7 @@ let DocSelectionRenderService = class DocSelectionRenderService extends RxDispos
|
|
|
3537
3509
|
return this._getOwnerDocument().activeElement === this._input;
|
|
3538
3510
|
}
|
|
3539
3511
|
focus() {
|
|
3512
|
+
this._ensureHostContainer();
|
|
3540
3513
|
if (!this._input.hasAttribute("tabindex")) this._input.tabIndex = -1;
|
|
3541
3514
|
this._input.focus({ preventScroll: true });
|
|
3542
3515
|
}
|
|
@@ -4320,8 +4293,7 @@ DocSelectionRenderService = __decorate([
|
|
|
4320
4293
|
__decorateParam(8, Optional(IDocEmbedRuntimeFocusCoordinator))
|
|
4321
4294
|
], DocSelectionRenderService);
|
|
4322
4295
|
|
|
4323
|
-
|
|
4324
|
-
//#region src/services/editor/editor.ts
|
|
4296
|
+
// src/services/editor/editor.ts
|
|
4325
4297
|
var Editor = class extends Disposable {
|
|
4326
4298
|
constructor(_param, _univerInstanceService, _docSelectionManagerService, _commandService, _undoRedoService, _injector) {
|
|
4327
4299
|
super();
|
|
@@ -4550,8 +4522,7 @@ var Editor = class extends Disposable {
|
|
|
4550
4522
|
}
|
|
4551
4523
|
};
|
|
4552
4524
|
|
|
4553
|
-
|
|
4554
|
-
//#region src/services/editor/editor-manager.service.ts
|
|
4525
|
+
// src/services/editor/editor-manager.service.ts
|
|
4555
4526
|
/**
|
|
4556
4527
|
* Not these elements will be considered as editor blur.
|
|
4557
4528
|
*/
|
|
@@ -4784,8 +4755,7 @@ EditorService = __decorate([
|
|
|
4784
4755
|
], EditorService);
|
|
4785
4756
|
const IEditorService = createIdentifier("univer.editor.service");
|
|
4786
4757
|
|
|
4787
|
-
|
|
4788
|
-
//#region src/commands/commands/table/table.ts
|
|
4758
|
+
// src/commands/commands/table/table.ts
|
|
4789
4759
|
function genEmptyTable(rowCount, colCount) {
|
|
4790
4760
|
let dataStream = DataStreamTreeTokenType.TABLE_START;
|
|
4791
4761
|
const paragraphs = [];
|
|
@@ -5198,8 +5168,7 @@ function getCellOffsets(viewModel, range, position) {
|
|
|
5198
5168
|
}
|
|
5199
5169
|
}
|
|
5200
5170
|
|
|
5201
|
-
|
|
5202
|
-
//#region src/commands/commands/clipboard.inner.command.ts
|
|
5171
|
+
// src/commands/commands/clipboard.inner.command.ts
|
|
5203
5172
|
function hasRangeInTable(ranges) {
|
|
5204
5173
|
return ranges.some((range) => {
|
|
5205
5174
|
const { startNodePosition } = range;
|
|
@@ -5762,15 +5731,13 @@ const CutContentCommand = {
|
|
|
5762
5731
|
}
|
|
5763
5732
|
};
|
|
5764
5733
|
|
|
5765
|
-
|
|
5766
|
-
//#region src/utils/horizontal-line.ts
|
|
5734
|
+
// src/utils/horizontal-line.ts
|
|
5767
5735
|
function isHorizontalLineParagraph(dataStream, paragraph) {
|
|
5768
5736
|
const paragraphStyle = paragraph === null || paragraph === void 0 ? void 0 : paragraph.paragraphStyle;
|
|
5769
5737
|
return Array.from(dataStream).every((token) => token === DataStreamTreeTokenType.PARAGRAPH || token === DataStreamTreeTokenType.SECTION_BREAK) && (paragraphStyle === null || paragraphStyle === void 0 ? void 0 : paragraphStyle.borderBottom) != null && paragraphStyle.borderTop == null && paragraphStyle.borderLeft == null && paragraphStyle.borderRight == null && paragraphStyle.borderBetween == null;
|
|
5770
5738
|
}
|
|
5771
5739
|
|
|
5772
|
-
|
|
5773
|
-
//#region src/commands/operations/doc-cursor.operation.ts
|
|
5740
|
+
// src/commands/operations/doc-cursor.operation.ts
|
|
5774
5741
|
/**
|
|
5775
5742
|
* The operation to move cursor in the current document.
|
|
5776
5743
|
*/
|
|
@@ -5794,8 +5761,7 @@ const MoveSelectionOperation = {
|
|
|
5794
5761
|
}
|
|
5795
5762
|
};
|
|
5796
5763
|
|
|
5797
|
-
|
|
5798
|
-
//#region src/commands/commands/format-painter.command.ts
|
|
5764
|
+
// src/commands/commands/format-painter.command.ts
|
|
5799
5765
|
function captureTextFormat(body, range, defaultStyle = {}, lists = {}, document = { documentStyle: {} }) {
|
|
5800
5766
|
var _body$paragraphs, _document$documentSty;
|
|
5801
5767
|
const offset = range.startOffset === range.endOffset ? Math.max(0, range.startOffset - 1) : range.startOffset;
|
|
@@ -5961,8 +5927,7 @@ const ApplyTextFormatPainterCommand = {
|
|
|
5961
5927
|
}
|
|
5962
5928
|
};
|
|
5963
5929
|
|
|
5964
|
-
|
|
5965
|
-
//#region src/commands/commands/util.ts
|
|
5930
|
+
// src/commands/commands/util.ts
|
|
5966
5931
|
function getCurrentParagraph(accessor) {
|
|
5967
5932
|
var _doc$getBody, _doc$getBody2;
|
|
5968
5933
|
const instanceService = accessor.get(IUniverInstanceService);
|
|
@@ -5972,8 +5937,7 @@ function getCurrentParagraph(accessor) {
|
|
|
5972
5937
|
return BuildTextUtils.range.getParagraphsInRange(range, ((_doc$getBody = doc.getBody()) === null || _doc$getBody === void 0 ? void 0 : _doc$getBody.paragraphs) ?? [], ((_doc$getBody2 = doc.getBody()) === null || _doc$getBody2 === void 0 ? void 0 : _doc$getBody2.dataStream) ?? "")[0];
|
|
5973
5938
|
}
|
|
5974
5939
|
|
|
5975
|
-
|
|
5976
|
-
//#region src/commands/commands/doc-delete.command.ts
|
|
5940
|
+
// src/commands/commands/doc-delete.command.ts
|
|
5977
5941
|
const DeleteCustomBlockCommand = {
|
|
5978
5942
|
id: "doc.command.delete-custom-block",
|
|
5979
5943
|
type: CommandType.COMMAND,
|
|
@@ -6606,8 +6570,7 @@ const DeleteCurrentParagraphCommand = {
|
|
|
6606
6570
|
}
|
|
6607
6571
|
};
|
|
6608
6572
|
|
|
6609
|
-
|
|
6610
|
-
//#region src/commands/commands/inline-format.command.ts
|
|
6573
|
+
// src/commands/commands/inline-format.command.ts
|
|
6611
6574
|
function handleInlineFormat(preCommandId, params, commandService) {
|
|
6612
6575
|
return commandService.executeCommand(SetInlineFormatCommand.id, {
|
|
6613
6576
|
preCommandId,
|
|
@@ -6959,8 +6922,7 @@ function getReverseFormatValueInSelection(textStyle, preCommandId) {
|
|
|
6959
6922
|
return getReverseFormatValue(textStyle, key, preCommandId);
|
|
6960
6923
|
}
|
|
6961
6924
|
|
|
6962
|
-
|
|
6963
|
-
//#region src/services/clipboard/copy-content-cache.ts
|
|
6925
|
+
// src/services/clipboard/copy-content-cache.ts
|
|
6964
6926
|
const COPY_CONTENT_CACHE_LIMIT = 10;
|
|
6965
6927
|
function extractId(html) {
|
|
6966
6928
|
const match = html.match(/data-copy-id="([^\s]+)"/);
|
|
@@ -6983,8 +6945,7 @@ var CopyContentCache = class {
|
|
|
6983
6945
|
};
|
|
6984
6946
|
const copyContentCache = new CopyContentCache();
|
|
6985
6947
|
|
|
6986
|
-
|
|
6987
|
-
//#region src/services/clipboard/html-to-udm/parse-node-style.ts
|
|
6948
|
+
// src/services/clipboard/html-to-udm/parse-node-style.ts
|
|
6988
6949
|
function extractNodeStyle(node) {
|
|
6989
6950
|
const styles = node.style;
|
|
6990
6951
|
const docStyles = {};
|
|
@@ -7050,8 +7011,7 @@ function extractNodeStyle(node) {
|
|
|
7050
7011
|
return docStyles;
|
|
7051
7012
|
}
|
|
7052
7013
|
|
|
7053
|
-
|
|
7054
|
-
//#region src/services/clipboard/html-to-udm/parse-to-dom.ts
|
|
7014
|
+
// src/services/clipboard/html-to-udm/parse-to-dom.ts
|
|
7055
7015
|
/**
|
|
7056
7016
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
7057
7017
|
*
|
|
@@ -7073,8 +7033,7 @@ function parseToDom(rawHtml) {
|
|
|
7073
7033
|
return parser.parseFromString(html, "text/html").querySelector("#univer-root");
|
|
7074
7034
|
}
|
|
7075
7035
|
|
|
7076
|
-
|
|
7077
|
-
//#region src/services/clipboard/html-to-udm/converter.ts
|
|
7036
|
+
// src/services/clipboard/html-to-udm/converter.ts
|
|
7078
7037
|
function matchFilter(node, filter) {
|
|
7079
7038
|
const tagName = node.tagName.toLowerCase();
|
|
7080
7039
|
if (typeof filter === "string") return tagName === filter;
|
|
@@ -7818,8 +7777,7 @@ function stripListMarkerFromCurrentParagraph(body) {
|
|
|
7818
7777
|
return length;
|
|
7819
7778
|
}
|
|
7820
7779
|
|
|
7821
|
-
|
|
7822
|
-
//#region src/services/clipboard/html-to-udm/paste-plugins/plugin-lark.ts
|
|
7780
|
+
// src/services/clipboard/html-to-udm/paste-plugins/plugin-lark.ts
|
|
7823
7781
|
const LarkPastePlugin = {
|
|
7824
7782
|
name: "univer-doc-paste-plugin-lark",
|
|
7825
7783
|
checkPasteType(html) {
|
|
@@ -7851,8 +7809,7 @@ const LarkPastePlugin = {
|
|
|
7851
7809
|
}]
|
|
7852
7810
|
};
|
|
7853
7811
|
|
|
7854
|
-
|
|
7855
|
-
//#region src/services/clipboard/html-to-udm/utils.ts
|
|
7812
|
+
// src/services/clipboard/html-to-udm/utils.ts
|
|
7856
7813
|
function getParagraphStyle(el) {
|
|
7857
7814
|
const styles = el.style;
|
|
7858
7815
|
const paragraphStyle = {};
|
|
@@ -7893,8 +7850,7 @@ function getHorizontalAlign(value) {
|
|
|
7893
7850
|
}
|
|
7894
7851
|
}
|
|
7895
7852
|
|
|
7896
|
-
|
|
7897
|
-
//#region src/services/clipboard/html-to-udm/paste-plugins/plugin-univer.ts
|
|
7853
|
+
// src/services/clipboard/html-to-udm/paste-plugins/plugin-univer.ts
|
|
7898
7854
|
const UniverPastePlugin = {
|
|
7899
7855
|
name: "univer-doc-paste-plugin-univer",
|
|
7900
7856
|
checkPasteType(html) {
|
|
@@ -7920,8 +7876,7 @@ const UniverPastePlugin = {
|
|
|
7920
7876
|
}]
|
|
7921
7877
|
};
|
|
7922
7878
|
|
|
7923
|
-
|
|
7924
|
-
//#region src/services/clipboard/html-to-udm/paste-plugins/plugin-word.ts
|
|
7879
|
+
// src/services/clipboard/html-to-udm/paste-plugins/plugin-word.ts
|
|
7925
7880
|
const WORD_SPACE_PLACEHOLDER_ENTITY = "";
|
|
7926
7881
|
const WORD_TAB_WIDTH = 4;
|
|
7927
7882
|
const WordPastePlugin = {
|
|
@@ -7983,8 +7938,7 @@ function countWordSpaces(content) {
|
|
|
7983
7938
|
return ((_text$replace$match = text.replace(/\r?\n/g, "").match(/ /g)) === null || _text$replace$match === void 0 ? void 0 : _text$replace$match.length) ?? 0;
|
|
7984
7939
|
}
|
|
7985
7940
|
|
|
7986
|
-
|
|
7987
|
-
//#region src/services/clipboard/paste-options.ts
|
|
7941
|
+
// src/services/clipboard/paste-options.ts
|
|
7988
7942
|
const DOC_PASTE_OPTIONS = [
|
|
7989
7943
|
{
|
|
7990
7944
|
value: "source",
|
|
@@ -8050,8 +8004,7 @@ function applyDocPasteMode(source, mode, style, text) {
|
|
|
8050
8004
|
return doc;
|
|
8051
8005
|
}
|
|
8052
8006
|
|
|
8053
|
-
|
|
8054
|
-
//#region src/services/clipboard/udm-to-html/convertor.ts
|
|
8007
|
+
// src/services/clipboard/udm-to-html/convertor.ts
|
|
8055
8008
|
const DEFAULT_CLIPBOARD_FONT_FAMILY = "Arial";
|
|
8056
8009
|
function stripFieldBoundaryMarkers(value) {
|
|
8057
8010
|
return value.replaceAll("", "").replaceAll("", "");
|
|
@@ -8491,8 +8444,7 @@ var UDMToHtmlService = class {
|
|
|
8491
8444
|
}
|
|
8492
8445
|
};
|
|
8493
8446
|
|
|
8494
|
-
|
|
8495
|
-
//#region src/services/clipboard/udm-to-html/doc-html-export.service.ts
|
|
8447
|
+
// src/services/clipboard/udm-to-html/doc-html-export.service.ts
|
|
8496
8448
|
var DocHtmlExportService = class extends Disposable {
|
|
8497
8449
|
constructor(..._args) {
|
|
8498
8450
|
super(..._args);
|
|
@@ -8507,8 +8459,7 @@ var DocHtmlExportService = class extends Disposable {
|
|
|
8507
8459
|
}
|
|
8508
8460
|
};
|
|
8509
8461
|
|
|
8510
|
-
|
|
8511
|
-
//#region src/services/clipboard/clipboard.service.ts
|
|
8462
|
+
// src/services/clipboard/clipboard.service.ts
|
|
8512
8463
|
HtmlToUDMService.use(LarkPastePlugin);
|
|
8513
8464
|
HtmlToUDMService.use(UniverPastePlugin);
|
|
8514
8465
|
HtmlToUDMService.use(WordPastePlugin);
|
|
@@ -9301,8 +9252,7 @@ function dataUrlToFile(dataUrl, fallbackName) {
|
|
|
9301
9252
|
return new File([bytes], `${fallbackName}.${extension}`, { type: mimeType });
|
|
9302
9253
|
}
|
|
9303
9254
|
|
|
9304
|
-
|
|
9305
|
-
//#region src/commands/commands/clipboard.command.ts
|
|
9255
|
+
// src/commands/commands/clipboard.command.ts
|
|
9306
9256
|
function whenDocOrEditor(contextService) {
|
|
9307
9257
|
return contextService.getContextValue(FOCUSING_DOC) || contextService.getContextValue(EDITOR_ACTIVATED);
|
|
9308
9258
|
}
|
|
@@ -9413,8 +9363,7 @@ const DocChangePasteModeCommand = {
|
|
|
9413
9363
|
}
|
|
9414
9364
|
};
|
|
9415
9365
|
|
|
9416
|
-
|
|
9417
|
-
//#region src/commands/commands/doc-block-move.command.ts
|
|
9366
|
+
// src/commands/commands/doc-block-move.command.ts
|
|
9418
9367
|
const DOC_BLOCK_MOVE_BODY_PATCH_KEYS = [
|
|
9419
9368
|
"paragraphs",
|
|
9420
9369
|
"sectionBreaks",
|
|
@@ -9685,8 +9634,7 @@ function clamp$1(value, min, max) {
|
|
|
9685
9634
|
return Math.min(Math.max(value, min), max);
|
|
9686
9635
|
}
|
|
9687
9636
|
|
|
9688
|
-
|
|
9689
|
-
//#region src/commands/commands/doc-horizontal-line.command.ts
|
|
9637
|
+
// src/commands/commands/doc-horizontal-line.command.ts
|
|
9690
9638
|
const HorizontalLineCommand = {
|
|
9691
9639
|
id: "doc.command.horizontal-line",
|
|
9692
9640
|
type: CommandType.COMMAND,
|
|
@@ -9731,8 +9679,7 @@ const InsertHorizontalLineBellowCommand = {
|
|
|
9731
9679
|
}
|
|
9732
9680
|
};
|
|
9733
9681
|
|
|
9734
|
-
|
|
9735
|
-
//#region src/commands/commands/doc-select-all.command.ts
|
|
9682
|
+
// src/commands/commands/doc-select-all.command.ts
|
|
9736
9683
|
const DocSelectAllCommand = {
|
|
9737
9684
|
id: "doc.command.select-all",
|
|
9738
9685
|
type: CommandType.COMMAND,
|
|
@@ -9964,8 +9911,7 @@ function getRangeType(range) {
|
|
|
9964
9911
|
return range.rangeType ?? DOC_RANGE_TYPE.TEXT;
|
|
9965
9912
|
}
|
|
9966
9913
|
|
|
9967
|
-
|
|
9968
|
-
//#region src/services/doc-ime-input-manager.service.ts
|
|
9914
|
+
// src/services/doc-ime-input-manager.service.ts
|
|
9969
9915
|
var DocIMEInputManagerService = class extends RxDisposable {
|
|
9970
9916
|
constructor(_context) {
|
|
9971
9917
|
super();
|
|
@@ -10062,8 +10008,7 @@ var DocIMEInputManagerService = class extends RxDisposable {
|
|
|
10062
10008
|
}
|
|
10063
10009
|
};
|
|
10064
10010
|
|
|
10065
|
-
|
|
10066
|
-
//#region src/commands/commands/ime-input.command.ts
|
|
10011
|
+
// src/commands/commands/ime-input.command.ts
|
|
10067
10012
|
const IMEInputCommand = {
|
|
10068
10013
|
id: "doc.command.ime-input",
|
|
10069
10014
|
type: CommandType.COMMAND,
|
|
@@ -10216,8 +10161,7 @@ function isRectRange(range) {
|
|
|
10216
10161
|
return "tableId" in range;
|
|
10217
10162
|
}
|
|
10218
10163
|
|
|
10219
|
-
|
|
10220
|
-
//#region src/commands/commands/insert-custom-range.command.ts
|
|
10164
|
+
// src/commands/commands/insert-custom-range.command.ts
|
|
10221
10165
|
const InsertCustomRangeCommand = {
|
|
10222
10166
|
id: "doc.command.insert-custom-range",
|
|
10223
10167
|
type: CommandType.COMMAND,
|
|
@@ -10245,8 +10189,7 @@ const InsertCustomRangeCommand = {
|
|
|
10245
10189
|
}
|
|
10246
10190
|
};
|
|
10247
10191
|
|
|
10248
|
-
|
|
10249
|
-
//#region src/commands/commands/list.command.ts
|
|
10192
|
+
// src/commands/commands/list.command.ts
|
|
10250
10193
|
const ListOperationCommand = {
|
|
10251
10194
|
id: "doc.command.list-operation",
|
|
10252
10195
|
type: CommandType.COMMAND,
|
|
@@ -10620,8 +10563,7 @@ const InsertCheckListBellowCommand = {
|
|
|
10620
10563
|
}
|
|
10621
10564
|
};
|
|
10622
10565
|
|
|
10623
|
-
|
|
10624
|
-
//#region src/commands/commands/paragraph-align.command.ts
|
|
10566
|
+
// src/commands/commands/paragraph-align.command.ts
|
|
10625
10567
|
const AlignOperationCommand = {
|
|
10626
10568
|
id: "doc.command.align-action",
|
|
10627
10569
|
type: CommandType.COMMAND,
|
|
@@ -10718,8 +10660,7 @@ const AlignJustifyCommand = {
|
|
|
10718
10660
|
}
|
|
10719
10661
|
};
|
|
10720
10662
|
|
|
10721
|
-
|
|
10722
|
-
//#region src/commands/operations/set-doc-zoom-ratio.operation.ts
|
|
10663
|
+
// src/commands/operations/set-doc-zoom-ratio.operation.ts
|
|
10723
10664
|
const SetDocZoomRatioUndoMutationFactory = (accessor, params) => {
|
|
10724
10665
|
const documentModel = accessor.get(IUniverInstanceService).getUnit(params.unitId, UniverInstanceType.UNIVER_DOC);
|
|
10725
10666
|
documentModel === null || documentModel === void 0 || documentModel.setZoomRatio(params.zoomRatio);
|
|
@@ -10736,8 +10677,7 @@ const SetDocZoomRatioOperation = {
|
|
|
10736
10677
|
}
|
|
10737
10678
|
};
|
|
10738
10679
|
|
|
10739
|
-
|
|
10740
|
-
//#region src/commands/commands/set-doc-zoom-ratio.command.ts
|
|
10680
|
+
// src/commands/commands/set-doc-zoom-ratio.command.ts
|
|
10741
10681
|
const SetDocZoomRatioCommand = {
|
|
10742
10682
|
type: CommandType.COMMAND,
|
|
10743
10683
|
id: "doc.command.set-zoom-ratio",
|
|
@@ -10772,8 +10712,7 @@ const SetDocZoomRatioCommand = {
|
|
|
10772
10712
|
}
|
|
10773
10713
|
};
|
|
10774
10714
|
|
|
10775
|
-
|
|
10776
|
-
//#region src/commands/commands/set-heading.command.ts
|
|
10715
|
+
// src/commands/commands/set-heading.command.ts
|
|
10777
10716
|
function namedStyleToOutlineLevel(namedStyleType) {
|
|
10778
10717
|
if (namedStyleType >= NamedStyleType.HEADING_1 && namedStyleType <= NamedStyleType.HEADING_5) return namedStyleType - NamedStyleType.HEADING_1;
|
|
10779
10718
|
}
|
|
@@ -10994,8 +10933,7 @@ const SubtitleHeadingCommand = {
|
|
|
10994
10933
|
}
|
|
10995
10934
|
};
|
|
10996
10935
|
|
|
10997
|
-
|
|
10998
|
-
//#region src/commands/commands/switch-doc-mode.command.ts
|
|
10936
|
+
// src/commands/commands/switch-doc-mode.command.ts
|
|
10999
10937
|
const SwitchDocModeCommand = {
|
|
11000
10938
|
id: "doc.command.switch-mode",
|
|
11001
10939
|
type: CommandType.COMMAND,
|
|
@@ -11074,8 +11012,7 @@ const SwitchDocModeCommand = {
|
|
|
11074
11012
|
}
|
|
11075
11013
|
};
|
|
11076
11014
|
|
|
11077
|
-
|
|
11078
|
-
//#region src/commands/commands/table/doc-table-create.command.ts
|
|
11015
|
+
// src/commands/commands/table/doc-table-create.command.ts
|
|
11079
11016
|
const CreateDocTableCommandId = "doc.command.create-table";
|
|
11080
11017
|
function buildDocTableInsertBody(params) {
|
|
11081
11018
|
const { tableDataStream, tableParagraphs, sectionBreaks, tableId, textRun } = params;
|
|
@@ -11220,8 +11157,7 @@ const CreateDocTableCommand = {
|
|
|
11220
11157
|
}
|
|
11221
11158
|
};
|
|
11222
11159
|
|
|
11223
|
-
|
|
11224
|
-
//#region src/commands/commands/table/doc-table-delete.command.ts
|
|
11160
|
+
// src/commands/commands/table/doc-table-delete.command.ts
|
|
11225
11161
|
const DocTableDeleteRowsCommand = {
|
|
11226
11162
|
id: "doc.table.delete-rows",
|
|
11227
11163
|
type: CommandType.COMMAND,
|
|
@@ -11434,8 +11370,7 @@ const DocTableDeleteTableCommand = {
|
|
|
11434
11370
|
}
|
|
11435
11371
|
};
|
|
11436
11372
|
|
|
11437
|
-
|
|
11438
|
-
//#region src/commands/commands/table/doc-table-insert.command.ts
|
|
11373
|
+
// src/commands/commands/table/doc-table-insert.command.ts
|
|
11439
11374
|
const DocTableInsertRowCommandId = "doc.command.table-insert-row";
|
|
11440
11375
|
const DocTableInsertColumnCommandId = "doc.command.table-insert-column";
|
|
11441
11376
|
const DocTableInsertRowAboveCommandId = "doc.command.table-insert-row-above";
|
|
@@ -11647,8 +11582,7 @@ const DocTableInsertColumnCommand = {
|
|
|
11647
11582
|
}
|
|
11648
11583
|
};
|
|
11649
11584
|
|
|
11650
|
-
|
|
11651
|
-
//#region src/commands/commands/table/doc-table-tab.command.ts
|
|
11585
|
+
// src/commands/commands/table/doc-table-tab.command.ts
|
|
11652
11586
|
const DocTableTabCommand = {
|
|
11653
11587
|
id: "doc.table.tab-in-table",
|
|
11654
11588
|
type: CommandType.COMMAND,
|
|
@@ -11683,8 +11617,7 @@ const DocTableTabCommand = {
|
|
|
11683
11617
|
}
|
|
11684
11618
|
};
|
|
11685
11619
|
|
|
11686
|
-
|
|
11687
|
-
//#region src/views/table/create/component-name.ts
|
|
11620
|
+
// src/views/table/create/component-name.ts
|
|
11688
11621
|
/**
|
|
11689
11622
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
11690
11623
|
*
|
|
@@ -11702,8 +11635,7 @@ const DocTableTabCommand = {
|
|
|
11702
11635
|
*/
|
|
11703
11636
|
const COMPONENT_DOC_CREATE_TABLE_CONFIRM = "COMPONENT_DOC_CREATE_TABLE_CONFIRM";
|
|
11704
11637
|
|
|
11705
|
-
|
|
11706
|
-
//#region src/commands/operations/doc-create-table.operation.ts
|
|
11638
|
+
// src/commands/operations/doc-create-table.operation.ts
|
|
11707
11639
|
const COMPONENT_DOC_CREATE_TABLE_CONFIRM_ID = "doc.component.create-table-confirm";
|
|
11708
11640
|
const DocCreateTableOperation = {
|
|
11709
11641
|
id: "doc.operation.create-table",
|
|
@@ -11743,8 +11675,7 @@ const DocCreateTableOperation = {
|
|
|
11743
11675
|
}
|
|
11744
11676
|
};
|
|
11745
11677
|
|
|
11746
|
-
|
|
11747
|
-
//#region src/config/config.ts
|
|
11678
|
+
// src/config/config.ts
|
|
11748
11679
|
const DOCS_UI_PLUGIN_CONFIG_KEY = "docs-ui.config";
|
|
11749
11680
|
const DOCS_UI_PLUGIN_NAME = "DOC_UI_PLUGIN";
|
|
11750
11681
|
const configSymbol = Symbol(DOCS_UI_PLUGIN_CONFIG_KEY);
|
|
@@ -11773,8 +11704,7 @@ const defaultPluginMobileConfig = {
|
|
|
11773
11704
|
}
|
|
11774
11705
|
};
|
|
11775
11706
|
|
|
11776
|
-
|
|
11777
|
-
//#region src/controllers/render-controllers/back-scroll.render-controller.ts
|
|
11707
|
+
// src/controllers/render-controllers/back-scroll.render-controller.ts
|
|
11778
11708
|
const ANCHOR_WIDTH = 1.5;
|
|
11779
11709
|
const MAX_SELECTION_SCROLL_RETRY_FRAMES = 6e3;
|
|
11780
11710
|
let DocBackScrollRenderController = class DocBackScrollRenderController extends RxDisposable {
|
|
@@ -11999,8 +11929,7 @@ DocBackScrollRenderController = __decorate([
|
|
|
11999
11929
|
__decorateParam(3, Inject(DocSkeletonManagerService))
|
|
12000
11930
|
], DocBackScrollRenderController);
|
|
12001
11931
|
|
|
12002
|
-
|
|
12003
|
-
//#region src/controllers/render-controllers/doc-paragraph-placeholder.render-controller.ts
|
|
11932
|
+
// src/controllers/render-controllers/doc-paragraph-placeholder.render-controller.ts
|
|
12004
11933
|
const PLACEHOLDER_COLOR = "gray.300";
|
|
12005
11934
|
const DEFAULT_PLACEHOLDER_FONT_SIZE = 12;
|
|
12006
11935
|
const MIN_BODY_TEXT_PLACEHOLDER_FONT_SIZE = 16;
|
|
@@ -12206,8 +12135,7 @@ function drawParagraphPlaceholders(ctx, placeholders, color = PLACEHOLDER_COLOR)
|
|
|
12206
12135
|
ctx.restore();
|
|
12207
12136
|
}
|
|
12208
12137
|
|
|
12209
|
-
|
|
12210
|
-
//#region src/components/doc-page-render-component.ts
|
|
12138
|
+
// src/components/doc-page-render-component.ts
|
|
12211
12139
|
/** Full document pages let whitespace select drawings behind the text. */
|
|
12212
12140
|
var DocPageRenderComponent = class extends Documents {
|
|
12213
12141
|
isHit(coord) {
|
|
@@ -12247,8 +12175,7 @@ var DocPageRenderComponent = class extends Documents {
|
|
|
12247
12175
|
}
|
|
12248
12176
|
};
|
|
12249
12177
|
|
|
12250
|
-
|
|
12251
|
-
//#region src/services/doc-layout-coordinator.service.ts
|
|
12178
|
+
// src/services/doc-layout-coordinator.service.ts
|
|
12252
12179
|
const FOREGROUND_BUDGET_MS = 8;
|
|
12253
12180
|
const WORKER_FOREGROUND_BUDGET_MS = 32;
|
|
12254
12181
|
const WORKER_BACKGROUND_BUDGET_MS = 128;
|
|
@@ -12766,8 +12693,7 @@ var DocLayoutCoordinatorService = class extends Disposable {
|
|
|
12766
12693
|
}
|
|
12767
12694
|
};
|
|
12768
12695
|
|
|
12769
|
-
|
|
12770
|
-
//#region src/services/doc-layout-interaction.service.ts
|
|
12696
|
+
// src/services/doc-layout-interaction.service.ts
|
|
12771
12697
|
/**
|
|
12772
12698
|
* Coordinates render-scoped interactions that require the current document
|
|
12773
12699
|
* skeleton to stay stable until the interaction ends.
|
|
@@ -12806,8 +12732,7 @@ var DocLayoutInteractionService = class extends Disposable {
|
|
|
12806
12732
|
}
|
|
12807
12733
|
};
|
|
12808
12734
|
|
|
12809
|
-
|
|
12810
|
-
//#region src/services/doc-zoom.ts
|
|
12735
|
+
// src/services/doc-zoom.ts
|
|
12811
12736
|
const DEFAULT_DOC_ZOOM_RATIO = 1;
|
|
12812
12737
|
const DEFAULT_MODERN_DOC_ZOOM_RATIO = 1;
|
|
12813
12738
|
const DOC_ZOOM_SHORTCUTS = [
|
|
@@ -12840,8 +12765,7 @@ function getDocZoomRatio$(commandService, instanceService) {
|
|
|
12840
12765
|
}), distinctUntilChanged());
|
|
12841
12766
|
}
|
|
12842
12767
|
|
|
12843
|
-
|
|
12844
|
-
//#region src/services/doc-view-scale.ts
|
|
12768
|
+
// src/services/doc-view-scale.ts
|
|
12845
12769
|
function normalizeDocFitToWidthOptions(options) {
|
|
12846
12770
|
return {
|
|
12847
12771
|
...DEFAULT_DOC_FIT_TO_WIDTH_OPTIONS,
|
|
@@ -12928,8 +12852,7 @@ let DocViewScaleService = class DocViewScaleService extends Disposable {
|
|
|
12928
12852
|
};
|
|
12929
12853
|
DocViewScaleService = __decorate([__decorateParam(1, IConfigService)], DocViewScaleService);
|
|
12930
12854
|
|
|
12931
|
-
|
|
12932
|
-
//#region src/services/doc-page-layout.service.ts
|
|
12855
|
+
// src/services/doc-page-layout.service.ts
|
|
12933
12856
|
let DocPageLayoutService = class DocPageLayoutService extends Disposable {
|
|
12934
12857
|
constructor(_context, _docViewScaleService) {
|
|
12935
12858
|
super();
|
|
@@ -12993,8 +12916,7 @@ let DocPageLayoutService = class DocPageLayoutService extends Disposable {
|
|
|
12993
12916
|
};
|
|
12994
12917
|
DocPageLayoutService = __decorate([__decorateParam(1, Inject(DocViewScaleService))], DocPageLayoutService);
|
|
12995
12918
|
|
|
12996
|
-
|
|
12997
|
-
//#region src/controllers/render-controllers/doc-mutation-layout.ts
|
|
12919
|
+
// src/controllers/render-controllers/doc-mutation-layout.ts
|
|
12998
12920
|
const BODY_RANGE_COLLECTIONS = /* @__PURE__ */ new Set([
|
|
12999
12921
|
"blockRanges",
|
|
13000
12922
|
"columnGroups",
|
|
@@ -13289,8 +13211,7 @@ function mapCurrentOffsetToPrevious(offset, invalidation) {
|
|
|
13289
13211
|
return offset - (invalidation.newEnd - invalidation.oldEnd);
|
|
13290
13212
|
}
|
|
13291
13213
|
|
|
13292
|
-
|
|
13293
|
-
//#region src/controllers/render-controllers/doc.render-controller.ts
|
|
13214
|
+
// src/controllers/render-controllers/doc.render-controller.ts
|
|
13294
13215
|
const DOC_PAGE_MARGIN = 20;
|
|
13295
13216
|
function getTextXActionLength(action) {
|
|
13296
13217
|
if (typeof action !== "object" || action == null || !("t" in action) || !("len" in action)) return;
|
|
@@ -14388,8 +14309,7 @@ function getPageSizeInModernMode(page) {
|
|
|
14388
14309
|
};
|
|
14389
14310
|
}
|
|
14390
14311
|
|
|
14391
|
-
|
|
14392
|
-
//#region src/basics/selection.ts
|
|
14312
|
+
// src/basics/selection.ts
|
|
14393
14313
|
function findFirstCursorOffset(snapshot) {
|
|
14394
14314
|
const { dataStream } = snapshot.body ?? {};
|
|
14395
14315
|
const EXCLUDE_TOKENS = [
|
|
@@ -14412,8 +14332,7 @@ function findFirstCursorOffset(snapshot) {
|
|
|
14412
14332
|
return 0;
|
|
14413
14333
|
}
|
|
14414
14334
|
|
|
14415
|
-
|
|
14416
|
-
//#region src/utils/section-header-footer.ts
|
|
14335
|
+
// src/utils/section-header-footer.ts
|
|
14417
14336
|
function getDocPageSectionContext(snapshot, page) {
|
|
14418
14337
|
const sections = snapshot.body ? getTopLevelSectionBreaks(snapshot.body) : [];
|
|
14419
14338
|
const sectionIndex = (page === null || page === void 0 ? void 0 : page.sectionId) == null ? -1 : sections.findIndex((item) => item.sectionId === page.sectionId);
|
|
@@ -14460,8 +14379,7 @@ function getHeaderFooterTarget(viewModel, editArea, segmentPage, page) {
|
|
|
14460
14379
|
};
|
|
14461
14380
|
}
|
|
14462
14381
|
|
|
14463
|
-
|
|
14464
|
-
//#region src/views/header-footer/panel/component-name.ts
|
|
14382
|
+
// src/views/header-footer/panel/component-name.ts
|
|
14465
14383
|
/**
|
|
14466
14384
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
14467
14385
|
*
|
|
@@ -14481,8 +14399,7 @@ const COMPONENT_DOC_HEADER_FOOTER_PANEL = "COMPONENT_DOC_HEADER_FOOTER_PANEL";
|
|
|
14481
14399
|
const DOC_HEADER_FOOTER_RIBBON_TAB = "docs-ui.ribbon.header-footer";
|
|
14482
14400
|
const DOC_HEADER_FOOTER_RIBBON_CONTROL = "DocHeaderFooterRibbonControl";
|
|
14483
14401
|
|
|
14484
|
-
|
|
14485
|
-
//#region src/commands/operations/doc-header-footer-panel.operation.ts
|
|
14402
|
+
// src/commands/operations/doc-header-footer-panel.operation.ts
|
|
14486
14403
|
const SidebarDocHeaderFooterPanelOperation = {
|
|
14487
14404
|
id: "sidebar.operation.doc-header-footer-panel",
|
|
14488
14405
|
type: CommandType.OPERATION,
|
|
@@ -14504,8 +14421,7 @@ const SidebarDocHeaderFooterPanelOperation = {
|
|
|
14504
14421
|
}
|
|
14505
14422
|
};
|
|
14506
14423
|
|
|
14507
|
-
|
|
14508
|
-
//#region src/commands/commands/doc-header-footer.command.ts
|
|
14424
|
+
// src/commands/commands/doc-header-footer.command.ts
|
|
14509
14425
|
const CoreHeaderFooterCommandId = "doc.command.core-header-footer";
|
|
14510
14426
|
/**
|
|
14511
14427
|
* The command to update header and footer or create them.
|
|
@@ -14652,8 +14568,7 @@ const CloseHeaderFooterCommand = {
|
|
|
14652
14568
|
}
|
|
14653
14569
|
};
|
|
14654
14570
|
|
|
14655
|
-
|
|
14656
|
-
//#region src/utils/date-time-field.ts
|
|
14571
|
+
// src/utils/date-time-field.ts
|
|
14657
14572
|
function createDateTimeField(format, locale, date) {
|
|
14658
14573
|
const options = format === "time" ? {
|
|
14659
14574
|
hour: "2-digit",
|
|
@@ -14703,8 +14618,7 @@ function resolveDateTimeField(instruction, locale, date) {
|
|
|
14703
14618
|
}
|
|
14704
14619
|
}
|
|
14705
14620
|
|
|
14706
|
-
|
|
14707
|
-
//#region src/commands/commands/insert-header-footer-field.command.ts
|
|
14621
|
+
// src/commands/commands/insert-header-footer-field.command.ts
|
|
14708
14622
|
const InsertHeaderFooterFieldCommand = {
|
|
14709
14623
|
id: "doc.command.insert-header-footer-field",
|
|
14710
14624
|
type: CommandType.COMMAND,
|
|
@@ -14797,8 +14711,7 @@ const InsertHeaderFooterFieldCommand = {
|
|
|
14797
14711
|
}
|
|
14798
14712
|
};
|
|
14799
14713
|
|
|
14800
|
-
|
|
14801
|
-
//#region src/commands/commands/refresh-header-footer-fields.command.ts
|
|
14714
|
+
// src/commands/commands/refresh-header-footer-fields.command.ts
|
|
14802
14715
|
const RefreshHeaderFooterFieldsCommand = {
|
|
14803
14716
|
id: "doc.command.refresh-header-footer-fields",
|
|
14804
14717
|
type: CommandType.COMMAND,
|
|
@@ -14886,8 +14799,7 @@ function refreshDateTimeFields(body, locale, date, canEdit) {
|
|
|
14886
14799
|
return textX.serialize();
|
|
14887
14800
|
}
|
|
14888
14801
|
|
|
14889
|
-
|
|
14890
|
-
//#region src/commands/operations/doc-header-footer-ribbon.operation.ts
|
|
14802
|
+
// src/commands/operations/doc-header-footer-ribbon.operation.ts
|
|
14891
14803
|
const DocHeaderFooterRibbonOperation = {
|
|
14892
14804
|
id: SidebarDocHeaderFooterPanelOperation.id,
|
|
14893
14805
|
type: SidebarDocHeaderFooterPanelOperation.type,
|
|
@@ -14899,8 +14811,7 @@ const DocHeaderFooterRibbonOperation = {
|
|
|
14899
14811
|
}
|
|
14900
14812
|
};
|
|
14901
14813
|
|
|
14902
|
-
|
|
14903
|
-
//#region src/types/const/padding.ts
|
|
14814
|
+
// src/types/const/padding.ts
|
|
14904
14815
|
/**
|
|
14905
14816
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
14906
14817
|
*
|
|
@@ -14918,8 +14829,7 @@ const DocHeaderFooterRibbonOperation = {
|
|
|
14918
14829
|
*/
|
|
14919
14830
|
const DOC_VERTICAL_PADDING = 4;
|
|
14920
14831
|
|
|
14921
|
-
|
|
14922
|
-
//#region src/services/doc-popup-manager.service.ts
|
|
14832
|
+
// src/services/doc-popup-manager.service.ts
|
|
14923
14833
|
function transformBound2OffsetBound(originBound, scene) {
|
|
14924
14834
|
const topLeft = transformPosition2Offset(originBound.left, originBound.top, scene);
|
|
14925
14835
|
const bottomRight = transformPosition2Offset(originBound.right, originBound.bottom, scene);
|
|
@@ -15273,8 +15183,7 @@ DocCanvasPopManagerService = __decorate([
|
|
|
15273
15183
|
__decorateParam(3, ICommandService)
|
|
15274
15184
|
], DocCanvasPopManagerService);
|
|
15275
15185
|
|
|
15276
|
-
|
|
15277
|
-
//#region src/services/doc-event-manager.service.ts
|
|
15186
|
+
// src/services/doc-event-manager.service.ts
|
|
15278
15187
|
const calcDocRangePositions$1 = (range, documents, skeleton, pageIndex) => {
|
|
15279
15188
|
const skeletonData = skeleton.getSkeletonData();
|
|
15280
15189
|
let end = range.collapsed ? range.startOffset : range.endOffset - 1;
|
|
@@ -16137,8 +16046,7 @@ function clipRectHorizontally(rect, visibleLeft, visibleRight) {
|
|
|
16137
16046
|
};
|
|
16138
16047
|
}
|
|
16139
16048
|
|
|
16140
|
-
|
|
16141
|
-
//#region src/commands/operations/paragraph-permission.operation.ts
|
|
16049
|
+
// src/commands/operations/paragraph-permission.operation.ts
|
|
16142
16050
|
const OpenDocParagraphPermissionOperation = {
|
|
16143
16051
|
id: "doc.operation.open-paragraph-permission",
|
|
16144
16052
|
type: CommandType.OPERATION,
|
|
@@ -16166,8 +16074,7 @@ const OpenDocParagraphPermissionOperation = {
|
|
|
16166
16074
|
}
|
|
16167
16075
|
};
|
|
16168
16076
|
|
|
16169
|
-
|
|
16170
|
-
//#region src/commands/operations/permission-panel.operation.ts
|
|
16077
|
+
// src/commands/operations/permission-panel.operation.ts
|
|
16171
16078
|
const OpenDocPermissionPanelOperation = {
|
|
16172
16079
|
id: "doc.operation.open-permission-panel",
|
|
16173
16080
|
type: CommandType.OPERATION,
|
|
@@ -16218,8 +16125,7 @@ const OpenDocPermissionPanelOperation = {
|
|
|
16218
16125
|
}
|
|
16219
16126
|
};
|
|
16220
16127
|
|
|
16221
|
-
|
|
16222
|
-
//#region src/commands/commands/insert-special-character.command.ts
|
|
16128
|
+
// src/commands/commands/insert-special-character.command.ts
|
|
16223
16129
|
const InsertSpecialCharacterCommand = {
|
|
16224
16130
|
id: "doc.command.insert-special-character",
|
|
16225
16131
|
type: CommandType.COMMAND,
|
|
@@ -16266,8 +16172,7 @@ const InsertSpecialCharacterCommand = {
|
|
|
16266
16172
|
}
|
|
16267
16173
|
};
|
|
16268
16174
|
|
|
16269
|
-
|
|
16270
|
-
//#region src/commands/operations/insert-break.operation.ts
|
|
16175
|
+
// src/commands/operations/insert-break.operation.ts
|
|
16271
16176
|
function getCollapsedBodyOffset(selectionManager) {
|
|
16272
16177
|
const range = selectionManager.getActiveTextRange();
|
|
16273
16178
|
if (!(range === null || range === void 0 ? void 0 : range.collapsed) || range.segmentId || !Number.isInteger(range.startOffset)) return null;
|
|
@@ -16312,8 +16217,7 @@ const InsertDocumentSectionBreakOperation = {
|
|
|
16312
16217
|
}
|
|
16313
16218
|
};
|
|
16314
16219
|
|
|
16315
|
-
|
|
16316
|
-
//#region src/views/PageSettings.tsx
|
|
16220
|
+
// src/views/PageSettings.tsx
|
|
16317
16221
|
const MODERN_WIDTH_OPTIONS = [
|
|
16318
16222
|
ModernDocumentWidthMode.NARROW,
|
|
16319
16223
|
ModernDocumentWidthMode.MEDIUM,
|
|
@@ -16489,8 +16393,7 @@ function PageSettings(props) {
|
|
|
16489
16393
|
}
|
|
16490
16394
|
const PAGE_SETTING_COMPONENT_ID = "docs.component.page-setting";
|
|
16491
16395
|
|
|
16492
|
-
|
|
16493
|
-
//#region src/commands/commands/doc-page-setup.command.ts
|
|
16396
|
+
// src/commands/commands/doc-page-setup.command.ts
|
|
16494
16397
|
const PAGE_FILL_TABLE_TOLERANCE = 2;
|
|
16495
16398
|
function getPageContentWidth(config) {
|
|
16496
16399
|
var _config$pageSize;
|
|
@@ -16656,8 +16559,7 @@ const DocPageSetupCommand = {
|
|
|
16656
16559
|
}
|
|
16657
16560
|
};
|
|
16658
16561
|
|
|
16659
|
-
|
|
16660
|
-
//#region src/commands/operations/open-page-setting.operation.ts
|
|
16562
|
+
// src/commands/operations/open-page-setting.operation.ts
|
|
16661
16563
|
const DocOpenPageSettingCommand = {
|
|
16662
16564
|
id: "docs.operation.open-page-setting",
|
|
16663
16565
|
type: CommandType.OPERATION,
|
|
@@ -16696,8 +16598,7 @@ const DocOpenPageSettingCommand = {
|
|
|
16696
16598
|
}
|
|
16697
16599
|
};
|
|
16698
16600
|
|
|
16699
|
-
|
|
16700
|
-
//#region src/views/EditorColorPicker.tsx
|
|
16601
|
+
// src/views/EditorColorPicker.tsx
|
|
16701
16602
|
function EditorColorPicker(props) {
|
|
16702
16603
|
const containerRef = useRef(null);
|
|
16703
16604
|
const ColorPickerComponent = useDependency(ComponentManager).get(COLOR_PICKER_COMPONENT);
|
|
@@ -16718,8 +16619,7 @@ function EditorColorPicker(props) {
|
|
|
16718
16619
|
}
|
|
16719
16620
|
EditorColorPicker.componentKey = "docs.editor-color-picker";
|
|
16720
16621
|
|
|
16721
|
-
|
|
16722
|
-
//#region src/views/const.ts
|
|
16622
|
+
// src/views/const.ts
|
|
16723
16623
|
/**
|
|
16724
16624
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
16725
16625
|
*
|
|
@@ -16737,8 +16637,7 @@ EditorColorPicker.componentKey = "docs.editor-color-picker";
|
|
|
16737
16637
|
*/
|
|
16738
16638
|
const COMPONENT_PREFIX = "UI_PLUGIN_DOCS";
|
|
16739
16639
|
|
|
16740
|
-
|
|
16741
|
-
//#region src/views/list-type-picker/Picker.tsx
|
|
16640
|
+
// src/views/list-type-picker/Picker.tsx
|
|
16742
16641
|
/**
|
|
16743
16642
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
16744
16643
|
*
|
|
@@ -16844,8 +16743,7 @@ const BulletListTypePicker = (props) => /* @__PURE__ */ jsx(ListTypePicker, {
|
|
|
16844
16743
|
options: bulletOptions
|
|
16845
16744
|
});
|
|
16846
16745
|
|
|
16847
|
-
|
|
16848
|
-
//#region src/views/list-type-picker/index.ts
|
|
16746
|
+
// src/views/list-type-picker/index.ts
|
|
16849
16747
|
/**
|
|
16850
16748
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
16851
16749
|
*
|
|
@@ -16864,8 +16762,7 @@ const BulletListTypePicker = (props) => /* @__PURE__ */ jsx(ListTypePicker, {
|
|
|
16864
16762
|
const ORDER_LIST_TYPE_COMPONENT = `${COMPONENT_PREFIX}_ORDER_LIST_TYPE_COMPONENT`;
|
|
16865
16763
|
const BULLET_LIST_TYPE_COMPONENT = `${COMPONENT_PREFIX}_BULLET_LIST_TYPE_COMPONENT`;
|
|
16866
16764
|
|
|
16867
|
-
|
|
16868
|
-
//#region src/menu/menu.ts
|
|
16765
|
+
// src/menu/menu.ts
|
|
16869
16766
|
function shouldSuppressDocMenuStateRefresh(accessor) {
|
|
16870
16767
|
let univerInstanceService;
|
|
16871
16768
|
let focusCoordinator;
|
|
@@ -18074,8 +17971,7 @@ function PageSettingMenuItemFactory(accessor) {
|
|
|
18074
17971
|
};
|
|
18075
17972
|
}
|
|
18076
17973
|
|
|
18077
|
-
|
|
18078
|
-
//#region src/menu/header-footer-ribbon.ts
|
|
17974
|
+
// src/menu/header-footer-ribbon.ts
|
|
18079
17975
|
const headerFooterRibbonSchema = {
|
|
18080
17976
|
[ContextMenuPosition.MAIN_AREA]: { [ContextMenuGroup.FORMAT]: { [UpdateSelectedDocFieldsCommand.id]: {
|
|
18081
17977
|
order: 1,
|
|
@@ -18148,8 +18044,7 @@ const headerFooterRibbonSchema = {
|
|
|
18148
18044
|
} }
|
|
18149
18045
|
};
|
|
18150
18046
|
|
|
18151
|
-
|
|
18152
|
-
//#region src/controllers/doc-paragraph-setting.controller.ts
|
|
18047
|
+
// src/controllers/doc-paragraph-setting.controller.ts
|
|
18153
18048
|
/**
|
|
18154
18049
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
18155
18050
|
*
|
|
@@ -18188,8 +18083,7 @@ let DocParagraphSettingController = class DocParagraphSettingController extends
|
|
|
18188
18083
|
};
|
|
18189
18084
|
DocParagraphSettingController = __decorate([__decorateParam(0, ICommandService), __decorateParam(1, Inject(ISidebarService))], DocParagraphSettingController);
|
|
18190
18085
|
|
|
18191
|
-
|
|
18192
|
-
//#region src/commands/operations/doc-paragraph-setting-panel.operation.ts
|
|
18086
|
+
// src/commands/operations/doc-paragraph-setting-panel.operation.ts
|
|
18193
18087
|
const DocParagraphSettingPanelOperation = {
|
|
18194
18088
|
id: "sidebar.operation.doc-paragraph-setting-panel",
|
|
18195
18089
|
type: CommandType.OPERATION,
|
|
@@ -18199,8 +18093,7 @@ const DocParagraphSettingPanelOperation = {
|
|
|
18199
18093
|
}
|
|
18200
18094
|
};
|
|
18201
18095
|
|
|
18202
|
-
|
|
18203
|
-
//#region src/views/section-setting/component-name.ts
|
|
18096
|
+
// src/views/section-setting/component-name.ts
|
|
18204
18097
|
/**
|
|
18205
18098
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
18206
18099
|
*
|
|
@@ -18218,8 +18111,7 @@ const DocParagraphSettingPanelOperation = {
|
|
|
18218
18111
|
*/
|
|
18219
18112
|
const DOC_SECTION_SETTING_COMPONENT = "doc_ui_section-setting-panel";
|
|
18220
18113
|
|
|
18221
|
-
|
|
18222
|
-
//#region src/controllers/doc-section-setting.controller.ts
|
|
18114
|
+
// src/controllers/doc-section-setting.controller.ts
|
|
18223
18115
|
/**
|
|
18224
18116
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
18225
18117
|
*
|
|
@@ -18267,8 +18159,7 @@ let DocSectionSettingController = class DocSectionSettingController extends Disp
|
|
|
18267
18159
|
};
|
|
18268
18160
|
DocSectionSettingController = __decorate([__decorateParam(0, Inject(ISidebarService)), __decorateParam(1, Inject(DocSelectionManagerService))], DocSectionSettingController);
|
|
18269
18161
|
|
|
18270
|
-
|
|
18271
|
-
//#region src/commands/operations/doc-section-setting-panel.operation.ts
|
|
18162
|
+
// src/commands/operations/doc-section-setting-panel.operation.ts
|
|
18272
18163
|
const DocSectionSettingPanelOperation = {
|
|
18273
18164
|
id: "sidebar.operation.doc-section-setting-panel",
|
|
18274
18165
|
type: CommandType.OPERATION,
|
|
@@ -18278,8 +18169,7 @@ const DocSectionSettingPanelOperation = {
|
|
|
18278
18169
|
}
|
|
18279
18170
|
};
|
|
18280
18171
|
|
|
18281
|
-
|
|
18282
|
-
//#region src/menu/context-menu.ts
|
|
18172
|
+
// src/menu/context-menu.ts
|
|
18283
18173
|
const getDisableOnCollapsedObservable = (accessor) => {
|
|
18284
18174
|
const docSelectionManagerService = accessor.get(DocSelectionManagerService);
|
|
18285
18175
|
return new Observable((subscriber) => {
|
|
@@ -18561,8 +18451,7 @@ function PasteRibbonMenuFactory(accessor) {
|
|
|
18561
18451
|
};
|
|
18562
18452
|
}
|
|
18563
18453
|
|
|
18564
|
-
|
|
18565
|
-
//#region src/menu/display.menu.ts
|
|
18454
|
+
// src/menu/display.menu.ts
|
|
18566
18455
|
const DOC_ZOOM_RATIO_MENU_ID = "doc.menu.zoom-ratio";
|
|
18567
18456
|
function DocZoomRatioMenuItemFactory(accessor) {
|
|
18568
18457
|
const commandService = accessor.get(ICommandService);
|
|
@@ -18601,8 +18490,7 @@ function DocFullscreenMenuItemFactory(accessor) {
|
|
|
18601
18490
|
};
|
|
18602
18491
|
}
|
|
18603
18492
|
|
|
18604
|
-
|
|
18605
|
-
//#region src/views/paragraph-menu/theme-color.ts
|
|
18493
|
+
// src/views/paragraph-menu/theme-color.ts
|
|
18606
18494
|
function getHighlightBackgroundColor(themeService, index) {
|
|
18607
18495
|
const tokenPath = `highlight.background.${index + 1}`;
|
|
18608
18496
|
const token = themeService.getColorFromTheme(tokenPath);
|
|
@@ -18611,8 +18499,7 @@ function getHighlightBackgroundColor(themeService, index) {
|
|
|
18611
18499
|
return new ColorKit(color).setAlpha(token.alpha).toRgbString();
|
|
18612
18500
|
}
|
|
18613
18501
|
|
|
18614
|
-
|
|
18615
|
-
//#region src/menu/paragraph-menu.ts
|
|
18502
|
+
// src/menu/paragraph-menu.ts
|
|
18616
18503
|
const TEXT_COLORS = [
|
|
18617
18504
|
"#FE4B4B",
|
|
18618
18505
|
"#FF8C51",
|
|
@@ -19182,8 +19069,7 @@ const ParagraphMenuBackgroundColorSwatchMenuItemFactories = BACKGROUND_COLOR_SWA
|
|
|
19182
19069
|
return items;
|
|
19183
19070
|
}, {});
|
|
19184
19071
|
|
|
19185
|
-
|
|
19186
|
-
//#region src/menu/permission.menu.ts
|
|
19072
|
+
// src/menu/permission.menu.ts
|
|
19187
19073
|
function DocPermissionMenuItemFactory(accessor) {
|
|
19188
19074
|
return objectPermissionMenuItemFactory(accessor, OpenDocPermissionPanelOperation.id, UniverInstanceType.UNIVER_DOC, UnitObject.DocumentSection);
|
|
19189
19075
|
}
|
|
@@ -19194,8 +19080,7 @@ function DocParagraphPermissionMenuItemFactory(accessor) {
|
|
|
19194
19080
|
};
|
|
19195
19081
|
}
|
|
19196
19082
|
|
|
19197
|
-
|
|
19198
|
-
//#region src/menu/schema.ts
|
|
19083
|
+
// src/menu/schema.ts
|
|
19199
19084
|
const floatToolbarMenuSchema = { [FLOAT_TOOLBAR_MENU_POSITION]: { [FLOAT_TEXT_STYLE_MENU_ID]: {
|
|
19200
19085
|
order: 0,
|
|
19201
19086
|
menuItemFactory: FloatTextStyleMenuItemFactory
|
|
@@ -19228,7 +19113,8 @@ const menuSchema = {
|
|
|
19228
19113
|
gridLayout: {
|
|
19229
19114
|
row: 2,
|
|
19230
19115
|
column: 1,
|
|
19231
|
-
width: 44
|
|
19116
|
+
width: 44,
|
|
19117
|
+
minWidth: 28
|
|
19232
19118
|
},
|
|
19233
19119
|
menuItemFactory: BoldMenuItemFactory
|
|
19234
19120
|
},
|
|
@@ -19237,7 +19123,8 @@ const menuSchema = {
|
|
|
19237
19123
|
gridLayout: {
|
|
19238
19124
|
row: 2,
|
|
19239
19125
|
column: 2,
|
|
19240
|
-
width: 44
|
|
19126
|
+
width: 44,
|
|
19127
|
+
minWidth: 28
|
|
19241
19128
|
},
|
|
19242
19129
|
menuItemFactory: ItalicMenuItemFactory
|
|
19243
19130
|
},
|
|
@@ -19246,7 +19133,8 @@ const menuSchema = {
|
|
|
19246
19133
|
gridLayout: {
|
|
19247
19134
|
row: 2,
|
|
19248
19135
|
column: 3,
|
|
19249
|
-
width: 44
|
|
19136
|
+
width: 44,
|
|
19137
|
+
minWidth: 28
|
|
19250
19138
|
},
|
|
19251
19139
|
menuItemFactory: UnderlineMenuItemFactory
|
|
19252
19140
|
},
|
|
@@ -19255,7 +19143,8 @@ const menuSchema = {
|
|
|
19255
19143
|
gridLayout: {
|
|
19256
19144
|
row: 2,
|
|
19257
19145
|
column: 4,
|
|
19258
|
-
width: 44
|
|
19146
|
+
width: 44,
|
|
19147
|
+
minWidth: 28
|
|
19259
19148
|
},
|
|
19260
19149
|
menuItemFactory: StrikeThroughMenuItemFactory
|
|
19261
19150
|
},
|
|
@@ -19264,7 +19153,8 @@ const menuSchema = {
|
|
|
19264
19153
|
gridLayout: {
|
|
19265
19154
|
row: 2,
|
|
19266
19155
|
column: 6,
|
|
19267
|
-
width: 44
|
|
19156
|
+
width: 44,
|
|
19157
|
+
minWidth: 28
|
|
19268
19158
|
},
|
|
19269
19159
|
menuItemFactory: SubscriptMenuItemFactory
|
|
19270
19160
|
},
|
|
@@ -19273,7 +19163,8 @@ const menuSchema = {
|
|
|
19273
19163
|
gridLayout: {
|
|
19274
19164
|
row: 2,
|
|
19275
19165
|
column: 5,
|
|
19276
|
-
width: 44
|
|
19166
|
+
width: 44,
|
|
19167
|
+
minWidth: 28
|
|
19277
19168
|
},
|
|
19278
19169
|
menuItemFactory: SuperscriptMenuItemFactory
|
|
19279
19170
|
},
|
|
@@ -19283,7 +19174,8 @@ const menuSchema = {
|
|
|
19283
19174
|
row: 1,
|
|
19284
19175
|
column: 1,
|
|
19285
19176
|
columnSpan: 2,
|
|
19286
|
-
width: 96
|
|
19177
|
+
width: 96,
|
|
19178
|
+
minWidth: 72
|
|
19287
19179
|
},
|
|
19288
19180
|
menuItemFactory: HeadingSelectorMenuItemFactory
|
|
19289
19181
|
},
|
|
@@ -19293,7 +19185,8 @@ const menuSchema = {
|
|
|
19293
19185
|
row: 1,
|
|
19294
19186
|
column: 7,
|
|
19295
19187
|
columnSpan: 2,
|
|
19296
|
-
width:
|
|
19188
|
+
width: 112,
|
|
19189
|
+
minWidth: 108
|
|
19297
19190
|
},
|
|
19298
19191
|
menuItemFactory: FontSizeSelectorMenuItemFactory
|
|
19299
19192
|
},
|
|
@@ -19303,7 +19196,8 @@ const menuSchema = {
|
|
|
19303
19196
|
row: 1,
|
|
19304
19197
|
column: 3,
|
|
19305
19198
|
columnSpan: 4,
|
|
19306
|
-
width: 200
|
|
19199
|
+
width: 200,
|
|
19200
|
+
minWidth: 124
|
|
19307
19201
|
},
|
|
19308
19202
|
menuItemFactory: FontFamilySelectorMenuItemFactory
|
|
19309
19203
|
},
|
|
@@ -19312,7 +19206,7 @@ const menuSchema = {
|
|
|
19312
19206
|
gridLayout: {
|
|
19313
19207
|
row: 2,
|
|
19314
19208
|
column: 8,
|
|
19315
|
-
width:
|
|
19209
|
+
width: 52
|
|
19316
19210
|
},
|
|
19317
19211
|
menuItemFactory: TextColorSelectorMenuItemFactory,
|
|
19318
19212
|
[ResetInlineFormatTextColorCommand.id]: {
|
|
@@ -19325,7 +19219,7 @@ const menuSchema = {
|
|
|
19325
19219
|
gridLayout: {
|
|
19326
19220
|
row: 2,
|
|
19327
19221
|
column: 7,
|
|
19328
|
-
width:
|
|
19222
|
+
width: 52
|
|
19329
19223
|
},
|
|
19330
19224
|
menuItemFactory: BackgroundColorSelectorMenuItemFactory,
|
|
19331
19225
|
[ResetInlineFormatTextBackgroundColorCommand.id]: {
|
|
@@ -20100,8 +19994,7 @@ const menuSchema = {
|
|
|
20100
19994
|
}
|
|
20101
19995
|
};
|
|
20102
19996
|
|
|
20103
|
-
|
|
20104
|
-
//#region src/shortcuts/utils.ts
|
|
19997
|
+
// src/shortcuts/utils.ts
|
|
20105
19998
|
function whenTextEditorFocused(contextService) {
|
|
20106
19999
|
return contextService.getContextValue(FOCUSING_UNIVER_EDITOR) && !contextService.getContextValue(FOCUSING_COMMON_DRAWINGS) && (contextService.getContextValue(FOCUSING_DOC) || contextService.getContextValue(EDITOR_ACTIVATED) || contextService.getContextValue(FOCUSING_FX_BAR_EDITOR));
|
|
20107
20000
|
}
|
|
@@ -20112,8 +20005,7 @@ function whenDocAndEditorFocusedWithBreakLine(contextService) {
|
|
|
20112
20005
|
return contextService.getContextValue(FOCUSING_DOC) && contextService.getContextValue(FOCUSING_UNIVER_EDITOR) && !contextService.getContextValue(FOCUSING_COMMON_DRAWINGS);
|
|
20113
20006
|
}
|
|
20114
20007
|
|
|
20115
|
-
|
|
20116
|
-
//#region src/shortcuts/format.shortcut.ts
|
|
20008
|
+
// src/shortcuts/format.shortcut.ts
|
|
20117
20009
|
const TabShortCut = {
|
|
20118
20010
|
id: TabCommand.id,
|
|
20119
20011
|
binding: KeyCode.TAB,
|
|
@@ -20131,8 +20023,7 @@ const ShiftTabShortCut = {
|
|
|
20131
20023
|
staticParameters: { shift: true }
|
|
20132
20024
|
};
|
|
20133
20025
|
|
|
20134
|
-
|
|
20135
|
-
//#region src/shortcuts/toolbar.shortcut.ts
|
|
20026
|
+
// src/shortcuts/toolbar.shortcut.ts
|
|
20136
20027
|
const BoldShortCut = {
|
|
20137
20028
|
id: SetInlineFormatBoldCommand.id,
|
|
20138
20029
|
binding: KeyCode.B | MetaKeys.CTRL_COMMAND,
|
|
@@ -20194,8 +20085,7 @@ const BulletListShortCut = {
|
|
|
20194
20085
|
preconditions: whenDocAndEditorFocused
|
|
20195
20086
|
};
|
|
20196
20087
|
|
|
20197
|
-
|
|
20198
|
-
//#region src/views/count-bar/ZoomSlider.tsx
|
|
20088
|
+
// src/views/count-bar/ZoomSlider.tsx
|
|
20199
20089
|
const DOC_ZOOM_RANGE = [10, 400];
|
|
20200
20090
|
function ZoomSlider() {
|
|
20201
20091
|
const commandService = useDependency(ICommandService);
|
|
@@ -20217,8 +20107,7 @@ function ZoomSlider() {
|
|
|
20217
20107
|
});
|
|
20218
20108
|
}
|
|
20219
20109
|
|
|
20220
|
-
|
|
20221
|
-
//#region src/views/count-bar/CountBar.tsx
|
|
20110
|
+
// src/views/count-bar/CountBar.tsx
|
|
20222
20111
|
/**
|
|
20223
20112
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
20224
20113
|
*
|
|
@@ -20241,8 +20130,7 @@ function CountBar(_props) {
|
|
|
20241
20130
|
});
|
|
20242
20131
|
}
|
|
20243
20132
|
|
|
20244
|
-
|
|
20245
|
-
//#region src/views/doc-statistics/DocPageStatus.tsx
|
|
20133
|
+
// src/views/doc-statistics/DocPageStatus.tsx
|
|
20246
20134
|
const SCROLL_SETTLE_DELAY = 120;
|
|
20247
20135
|
const DRAG_TOOLTIP_HIDE_DELAY = 500;
|
|
20248
20136
|
const EMPTY_DOC_PAGE_STATUS = {
|
|
@@ -20399,8 +20287,7 @@ function DocPageStatus() {
|
|
|
20399
20287
|
})] });
|
|
20400
20288
|
}
|
|
20401
20289
|
|
|
20402
|
-
|
|
20403
|
-
//#region src/views/doc-statistics/use-doc-statistics.ts
|
|
20290
|
+
// src/views/doc-statistics/use-doc-statistics.ts
|
|
20404
20291
|
const STATISTICS_DEBOUNCE_TIME = 200;
|
|
20405
20292
|
const EMPTY_STATISTICS = {
|
|
20406
20293
|
words: 0,
|
|
@@ -20580,8 +20467,7 @@ function useDocStatistics(calculateLayout = false) {
|
|
|
20580
20467
|
};
|
|
20581
20468
|
}
|
|
20582
20469
|
|
|
20583
|
-
|
|
20584
|
-
//#region src/views/doc-statistics/DocStatistics.tsx
|
|
20470
|
+
// src/views/doc-statistics/DocStatistics.tsx
|
|
20585
20471
|
const STATISTIC_ROW_GROUPS = [
|
|
20586
20472
|
[{
|
|
20587
20473
|
key: "pages",
|
|
@@ -20705,8 +20591,7 @@ function DocStatistics() {
|
|
|
20705
20591
|
});
|
|
20706
20592
|
}
|
|
20707
20593
|
|
|
20708
|
-
|
|
20709
|
-
//#region src/services/doc-layout-progress.service.ts
|
|
20594
|
+
// src/services/doc-layout-progress.service.ts
|
|
20710
20595
|
let DocLayoutProgressService = class DocLayoutProgressService extends RxDisposable {
|
|
20711
20596
|
constructor(_univerInstanceService) {
|
|
20712
20597
|
super();
|
|
@@ -20742,8 +20627,7 @@ let DocLayoutProgressService = class DocLayoutProgressService extends RxDisposab
|
|
|
20742
20627
|
};
|
|
20743
20628
|
DocLayoutProgressService = __decorate([__decorateParam(0, IUniverInstanceService)], DocLayoutProgressService);
|
|
20744
20629
|
|
|
20745
|
-
|
|
20746
|
-
//#region src/views/DocLayoutProgress.tsx
|
|
20630
|
+
// src/views/DocLayoutProgress.tsx
|
|
20747
20631
|
function DocLayoutProgress() {
|
|
20748
20632
|
const localeService = useDependency(LocaleService);
|
|
20749
20633
|
const progressState = useObservable(useDependency(DocLayoutProgressService).currentProgress$, null);
|
|
@@ -20777,8 +20661,7 @@ function DocLayoutProgress() {
|
|
|
20777
20661
|
});
|
|
20778
20662
|
}
|
|
20779
20663
|
|
|
20780
|
-
|
|
20781
|
-
//#region src/views/doc-footer/DocFooter.tsx
|
|
20664
|
+
// src/views/doc-footer/DocFooter.tsx
|
|
20782
20665
|
function DocFooterContent() {
|
|
20783
20666
|
const config = useConfigValue(DOCS_UI_PLUGIN_CONFIG_KEY);
|
|
20784
20667
|
return ((config === null || config === void 0 ? void 0 : config.footer) ?? true) && /* @__PURE__ */ jsxs("div", {
|
|
@@ -20796,8 +20679,7 @@ function DocFooter() {
|
|
|
20796
20679
|
return /* @__PURE__ */ jsx(DocFooterContent, {});
|
|
20797
20680
|
}
|
|
20798
20681
|
|
|
20799
|
-
|
|
20800
|
-
//#region src/views/doc-side-menu-layout.ts
|
|
20682
|
+
// src/views/doc-side-menu-layout.ts
|
|
20801
20683
|
function isDocSideMenuTableOverlapping(outline, table, viewport) {
|
|
20802
20684
|
if (table.bottom <= outline.top || table.top >= outline.bottom) return false;
|
|
20803
20685
|
let left = table.left;
|
|
@@ -20810,8 +20692,7 @@ function isDocSideMenuTableOverlapping(outline, table, viewport) {
|
|
|
20810
20692
|
return right > left && left < outline.right && right > outline.left;
|
|
20811
20693
|
}
|
|
20812
20694
|
|
|
20813
|
-
|
|
20814
|
-
//#region src/views/SideMenu.tsx
|
|
20695
|
+
// src/views/SideMenu.tsx
|
|
20815
20696
|
const SideMenu = forwardRef((props, ref) => {
|
|
20816
20697
|
const { label, menus, onClick, className, style, mode = "side-bar", maxHeight, activeId, open: controlledOpen, onOpenChange, maxWidth, wrapperClass, wrapperStyle, iconClass, iconStyle } = props;
|
|
20817
20698
|
const [expanded, setExpanded] = useState(mode === "side-bar");
|
|
@@ -20965,8 +20846,7 @@ const SideMenu = forwardRef((props, ref) => {
|
|
|
20965
20846
|
});
|
|
20966
20847
|
});
|
|
20967
20848
|
|
|
20968
|
-
|
|
20969
|
-
//#region src/views/DocSideMenu.tsx
|
|
20849
|
+
// src/views/DocSideMenu.tsx
|
|
20970
20850
|
const transformNamedStyleTypeToLevel = (type) => {
|
|
20971
20851
|
switch (type) {
|
|
20972
20852
|
case NamedStyleType.HEADING_1: return 1;
|
|
@@ -21164,8 +21044,7 @@ function DocSideMenuContent({ toc }) {
|
|
|
21164
21044
|
});
|
|
21165
21045
|
}
|
|
21166
21046
|
|
|
21167
|
-
|
|
21168
|
-
//#region src/controllers/ui.controller.ts
|
|
21047
|
+
// src/controllers/ui.controller.ts
|
|
21169
21048
|
let DocUIController = class DocUIController extends Disposable {
|
|
21170
21049
|
constructor(_injector, _commandService, _layoutService, _menuManagerService, _uiPartsService, _univerInstanceService, _shortcutService, _configService, _embedInteractionBoundaryService, _embedRuntimeFocusCoordinator) {
|
|
21171
21050
|
super();
|
|
@@ -21232,13 +21111,14 @@ let DocUIController = class DocUIController extends Disposable {
|
|
|
21232
21111
|
_initDateTimeFields() {
|
|
21233
21112
|
const refreshed = /* @__PURE__ */ new WeakSet();
|
|
21234
21113
|
this.disposeWithMe(this._univerInstanceService.getCurrentTypeOfUnit$(UniverInstanceType.UNIVER_DOC).subscribe((model) => {
|
|
21235
|
-
if (model
|
|
21236
|
-
|
|
21237
|
-
|
|
21238
|
-
|
|
21239
|
-
|
|
21240
|
-
|
|
21241
|
-
|
|
21114
|
+
if (!model || refreshed.has(model)) return;
|
|
21115
|
+
const unitId = model.getUnitId();
|
|
21116
|
+
if (!getDocumentPermissionValue(this._injector.get(IPermissionService), unitId, unitId, UnitAction.Edit)) return;
|
|
21117
|
+
refreshed.add(model);
|
|
21118
|
+
this._commandService.syncExecuteCommand(RefreshHeaderFooterFieldsCommand.id, {
|
|
21119
|
+
unitId,
|
|
21120
|
+
onOpen: true
|
|
21121
|
+
});
|
|
21242
21122
|
}));
|
|
21243
21123
|
}
|
|
21244
21124
|
_initFocusHandler() {
|
|
@@ -21268,8 +21148,7 @@ DocUIController = __decorate([
|
|
|
21268
21148
|
__decorateParam(9, Optional(IDocEmbedRuntimeFocusCoordinator))
|
|
21269
21149
|
], DocUIController);
|
|
21270
21150
|
|
|
21271
|
-
|
|
21272
|
-
//#region src/embed-docs-custom-block-bleed.ts
|
|
21151
|
+
// src/embed-docs-custom-block-bleed.ts
|
|
21273
21152
|
/**
|
|
21274
21153
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
21275
21154
|
*
|
|
@@ -21380,8 +21259,7 @@ function hasClippingOverflow(value) {
|
|
|
21380
21259
|
return value === "hidden" || value === "auto" || value === "scroll" || value === "clip";
|
|
21381
21260
|
}
|
|
21382
21261
|
|
|
21383
|
-
|
|
21384
|
-
//#region src/embed-docs-custom-block-refresh.ts
|
|
21262
|
+
// src/embed-docs-custom-block-refresh.ts
|
|
21385
21263
|
function collectDocsTableLikeEmbedChildUnitIds(drawings, resolveChildUnitId) {
|
|
21386
21264
|
const childUnitIds = /* @__PURE__ */ new Set();
|
|
21387
21265
|
Object.values(drawings ?? {}).forEach((drawing) => {
|
|
@@ -21444,8 +21322,7 @@ function createDocsCustomBlockSizeRefreshScheduler(refresh) {
|
|
|
21444
21322
|
};
|
|
21445
21323
|
}
|
|
21446
21324
|
|
|
21447
|
-
|
|
21448
|
-
//#region src/embed-docs-custom-block-scroll.ts
|
|
21325
|
+
// src/embed-docs-custom-block-scroll.ts
|
|
21449
21326
|
function scrollDocsTableLikeCustomBlockLive(event, live, options = {}) {
|
|
21450
21327
|
if (event.defaultPrevented || event.ctrlKey || event.metaKey) return false;
|
|
21451
21328
|
const deltaX = event.deltaX || (event.shiftKey ? event.deltaY : 0);
|
|
@@ -21472,8 +21349,7 @@ function resolveMaxScrollLeft(element, requestedMaxScrollLeft) {
|
|
|
21472
21349
|
return clampScroll(requestedMaxScrollLeft ?? nativeMaxScrollLeft, 0, nativeMaxScrollLeft);
|
|
21473
21350
|
}
|
|
21474
21351
|
|
|
21475
|
-
|
|
21476
|
-
//#region src/embed-host-anchor.ts
|
|
21352
|
+
// src/embed-host-anchor.ts
|
|
21477
21353
|
const MODERN_DOCS_CUSTOM_BLOCK_VIEWPORT_INSET = 10;
|
|
21478
21354
|
function resolveDocsCustomBlockRenderViewport(params) {
|
|
21479
21355
|
const defaultSize = resolveDocsCustomBlockSize(params.childType);
|
|
@@ -21535,13 +21411,11 @@ function resolveDocsCustomBlockRenderViewport(params) {
|
|
|
21535
21411
|
};
|
|
21536
21412
|
}
|
|
21537
21413
|
|
|
21538
|
-
|
|
21539
|
-
//#region package.json
|
|
21414
|
+
// package.json
|
|
21540
21415
|
var name = "@univerjs/docs-ui";
|
|
21541
|
-
var version = "1.
|
|
21416
|
+
var version = "1.4.0";
|
|
21542
21417
|
|
|
21543
|
-
|
|
21544
|
-
//#region src/commands/commands/doc-paragraph-setting.command.ts
|
|
21418
|
+
// src/commands/commands/doc-paragraph-setting.command.ts
|
|
21545
21419
|
const DocParagraphSettingCommand = {
|
|
21546
21420
|
id: "doc-paragraph-setting.command",
|
|
21547
21421
|
type: CommandType.COMMAND,
|
|
@@ -21575,6 +21449,10 @@ const DocParagraphSettingCommand = {
|
|
|
21575
21449
|
const jsonX = JSONX.getInstance();
|
|
21576
21450
|
for (const paragraph of paragraphs) {
|
|
21577
21451
|
const { startIndex } = paragraph;
|
|
21452
|
+
const paragraphStyle = {
|
|
21453
|
+
...paragraph.paragraphStyle,
|
|
21454
|
+
...config.paragraph
|
|
21455
|
+
};
|
|
21578
21456
|
textX.push({
|
|
21579
21457
|
t: TextXActionType.RETAIN,
|
|
21580
21458
|
len: startIndex - memoryCursor.cursor
|
|
@@ -21586,10 +21464,7 @@ const DocParagraphSettingCommand = {
|
|
|
21586
21464
|
dataStream: "",
|
|
21587
21465
|
paragraphs: [{
|
|
21588
21466
|
...paragraph,
|
|
21589
|
-
paragraphStyle
|
|
21590
|
-
...paragraph.paragraphStyle,
|
|
21591
|
-
...config.paragraph
|
|
21592
|
-
},
|
|
21467
|
+
paragraphStyle,
|
|
21593
21468
|
startIndex: 0
|
|
21594
21469
|
}]
|
|
21595
21470
|
},
|
|
@@ -21603,8 +21478,7 @@ const DocParagraphSettingCommand = {
|
|
|
21603
21478
|
}
|
|
21604
21479
|
};
|
|
21605
21480
|
|
|
21606
|
-
|
|
21607
|
-
//#region src/controllers/doc-auto-format.controller.ts
|
|
21481
|
+
// src/controllers/doc-auto-format.controller.ts
|
|
21608
21482
|
function hasQuickListType(text) {
|
|
21609
21483
|
return Object.prototype.hasOwnProperty.call(QuickListTypeMap, text);
|
|
21610
21484
|
}
|
|
@@ -21744,8 +21618,7 @@ let DocAutoFormatController = class DocAutoFormatController extends Disposable {
|
|
|
21744
21618
|
};
|
|
21745
21619
|
DocAutoFormatController = __decorate([__decorateParam(0, Inject(DocAutoFormatService)), __decorateParam(1, IRenderManagerService)], DocAutoFormatController);
|
|
21746
21620
|
|
|
21747
|
-
|
|
21748
|
-
//#region src/views/header-footer/content-cover.ts
|
|
21621
|
+
// src/views/header-footer/content-cover.ts
|
|
21749
21622
|
/** A paint-only overlay. It never participates in hit testing or selection. */
|
|
21750
21623
|
var HeaderFooterContentCover = class extends BaseObject {
|
|
21751
21624
|
constructor(key, _documents, _scene) {
|
|
@@ -21880,8 +21753,7 @@ var HeaderFooterContentCover = class extends BaseObject {
|
|
|
21880
21753
|
}
|
|
21881
21754
|
};
|
|
21882
21755
|
|
|
21883
|
-
|
|
21884
|
-
//#region src/views/header-footer/text-bubble.ts
|
|
21756
|
+
// src/views/header-footer/text-bubble.ts
|
|
21885
21757
|
const COLLAB_CURSOR_LABEL_HEIGHT = 18;
|
|
21886
21758
|
const COLLAB_CURSOR_LABEL_MAX_WIDTH = 200;
|
|
21887
21759
|
const COLLAB_CURSOR_LABEL_TEXT_PADDING_LR = 6;
|
|
@@ -21958,8 +21830,7 @@ var TextBubbleShape = class TextBubbleShape extends Shape {
|
|
|
21958
21830
|
}
|
|
21959
21831
|
};
|
|
21960
21832
|
|
|
21961
|
-
|
|
21962
|
-
//#region src/controllers/doc-header-footer.controller.ts
|
|
21833
|
+
// src/controllers/doc-header-footer.controller.ts
|
|
21963
21834
|
const INACTIVE_AREA_OPACITY = .5;
|
|
21964
21835
|
const HEADER_FOOTER_LABEL_ALPHA = .08;
|
|
21965
21836
|
let DocHeaderFooterController = class DocHeaderFooterController extends Disposable {
|
|
@@ -22153,8 +22024,7 @@ DocHeaderFooterController = __decorate([
|
|
|
22153
22024
|
__decorateParam(6, Inject(ThemeService))
|
|
22154
22025
|
], DocHeaderFooterController);
|
|
22155
22026
|
|
|
22156
|
-
|
|
22157
|
-
//#region src/basics/table.ts
|
|
22027
|
+
// src/basics/table.ts
|
|
22158
22028
|
function findTableAfterLine(line, page) {
|
|
22159
22029
|
const { ed } = line;
|
|
22160
22030
|
const { skeTables } = page;
|
|
@@ -22183,8 +22053,7 @@ function lastLineInCell(cell) {
|
|
|
22183
22053
|
return lastColumn.lines[lastColumn.lines.length - 1];
|
|
22184
22054
|
}
|
|
22185
22055
|
|
|
22186
|
-
|
|
22187
|
-
//#region src/controllers/doc-move-cursor.controller.ts
|
|
22056
|
+
// src/controllers/doc-move-cursor.controller.ts
|
|
22188
22057
|
let DocMoveCursorController = class DocMoveCursorController extends Disposable {
|
|
22189
22058
|
constructor(_univerInstanceService, _renderManagerService, _textSelectionManagerService, _commandService) {
|
|
22190
22059
|
super();
|
|
@@ -22888,8 +22757,7 @@ DocMoveCursorController = __decorate([
|
|
|
22888
22757
|
__decorateParam(3, ICommandService)
|
|
22889
22758
|
], DocMoveCursorController);
|
|
22890
22759
|
|
|
22891
|
-
|
|
22892
|
-
//#region src/controllers/doc-table.controller.ts
|
|
22760
|
+
// src/controllers/doc-table.controller.ts
|
|
22893
22761
|
/**
|
|
22894
22762
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
22895
22763
|
*
|
|
@@ -22922,8 +22790,7 @@ let DocTableController = class DocTableController extends Disposable {
|
|
|
22922
22790
|
};
|
|
22923
22791
|
DocTableController = __decorate([__decorateParam(0, ICommandService)], DocTableController);
|
|
22924
22792
|
|
|
22925
|
-
|
|
22926
|
-
//#region src/views/DocLayoutRecovery.tsx
|
|
22793
|
+
// src/views/DocLayoutRecovery.tsx
|
|
22927
22794
|
const DOC_LAYOUT_RECOVERY_COMPONENT = "DOC_LAYOUT_RECOVERY_COMPONENT";
|
|
22928
22795
|
function DocLayoutRecovery() {
|
|
22929
22796
|
const localeService = useDependency(LocaleService);
|
|
@@ -22938,8 +22805,7 @@ function DocLayoutRecovery() {
|
|
|
22938
22805
|
});
|
|
22939
22806
|
}
|
|
22940
22807
|
|
|
22941
|
-
|
|
22942
|
-
//#region src/views/DocPasteOptions.tsx
|
|
22808
|
+
// src/views/DocPasteOptions.tsx
|
|
22943
22809
|
const DOC_PASTE_OPTIONS_COMPONENT = "docs-ui.paste-options";
|
|
22944
22810
|
function DocPasteOptions() {
|
|
22945
22811
|
const clipboard = useDependency(IDocClipboardService);
|
|
@@ -23015,8 +22881,7 @@ function DocPasteOptions() {
|
|
|
23015
22881
|
});
|
|
23016
22882
|
}
|
|
23017
22883
|
|
|
23018
|
-
|
|
23019
|
-
//#region src/views/Icon.tsx
|
|
22884
|
+
// src/views/Icon.tsx
|
|
23020
22885
|
function BackgroundColorSwatchIcon({ className, style, onClick, color }) {
|
|
23021
22886
|
return /* @__PURE__ */ jsx("svg", {
|
|
23022
22887
|
className,
|
|
@@ -23101,8 +22966,7 @@ const DocParagraphBackgroundColorSwatchIcon13 = createBackgroundColorSwatchIcon(
|
|
|
23101
22966
|
const DocParagraphBackgroundColorSwatchIcon14 = createBackgroundColorSwatchIcon(14);
|
|
23102
22967
|
const DocParagraphBackgroundColorSwatchIcon15 = createBackgroundColorSwatchIcon(15);
|
|
23103
22968
|
|
|
23104
|
-
|
|
23105
|
-
//#region src/views/mobile-element-menu/MobileDocElementMenu.tsx
|
|
22969
|
+
// src/views/mobile-element-menu/MobileDocElementMenu.tsx
|
|
23106
22970
|
const MOBILE_DOC_ELEMENT_MENU = "docs-ui.mobile-element-menu";
|
|
23107
22971
|
const schemas = [{
|
|
23108
22972
|
key: "edit",
|
|
@@ -23135,8 +22999,7 @@ function MobileDocElementMenuPopup({ popup }) {
|
|
|
23135
22999
|
return /* @__PURE__ */ jsx(MobileDocElementMenu, { ...popup.extraProps });
|
|
23136
23000
|
}
|
|
23137
23001
|
|
|
23138
|
-
|
|
23139
|
-
//#region src/views/mobile/MobileDocPasteOptions.tsx
|
|
23002
|
+
// src/views/mobile/MobileDocPasteOptions.tsx
|
|
23140
23003
|
function MobileDocPasteOptions({ popup }) {
|
|
23141
23004
|
var _renders$getRenderUni;
|
|
23142
23005
|
const { unitId } = popup.extraProps;
|
|
@@ -23218,8 +23081,7 @@ function MobileDocPasteOptions({ popup }) {
|
|
|
23218
23081
|
})] });
|
|
23219
23082
|
}
|
|
23220
23083
|
|
|
23221
|
-
|
|
23222
|
-
//#region src/views/header-footer/panel/use-header-footer-options.ts
|
|
23084
|
+
// src/views/header-footer/panel/use-header-footer-options.ts
|
|
23223
23085
|
function getSegmentId(documentStyle, editArea, pageIndex, page) {
|
|
23224
23086
|
const { useFirstPageHeaderFooter, evenAndOddHeaders, defaultHeaderId, defaultFooterId, firstPageHeaderId, firstPageFooterId, evenPageHeaderId, evenPageFooterId } = documentStyle;
|
|
23225
23087
|
const isFirstPage = page ? page.pageNumber === page.pageNumberStart : pageIndex === 0;
|
|
@@ -23379,8 +23241,7 @@ function getHeaderFooterVariant(documentStyle, pageIndex, page) {
|
|
|
23379
23241
|
return "default";
|
|
23380
23242
|
}
|
|
23381
23243
|
|
|
23382
|
-
|
|
23383
|
-
//#region src/views/header-footer/panel/DocHeaderFooterOptions.tsx
|
|
23244
|
+
// src/views/header-footer/panel/DocHeaderFooterOptions.tsx
|
|
23384
23245
|
const DocHeaderFooterOptions = (props) => {
|
|
23385
23246
|
const docSelectionRenderService = useDependency(IRenderManagerService).getRenderUnitById(props.unitId).with(DocSelectionRenderService);
|
|
23386
23247
|
const segmentContext = useObservable(docSelectionRenderService.segmentContext$, {
|
|
@@ -23452,8 +23313,7 @@ function DocHeaderFooterOptionsContent({ unitId }) {
|
|
|
23452
23313
|
});
|
|
23453
23314
|
}
|
|
23454
23315
|
|
|
23455
|
-
|
|
23456
|
-
//#region src/views/header-footer/panel/DocHeaderFooterPanel.tsx
|
|
23316
|
+
// src/views/header-footer/panel/DocHeaderFooterPanel.tsx
|
|
23457
23317
|
const DocHeaderFooterPanel = (props) => {
|
|
23458
23318
|
var _renderManagerService;
|
|
23459
23319
|
const localeService = useDependency(LocaleService);
|
|
@@ -23473,8 +23333,7 @@ const DocHeaderFooterPanel = (props) => {
|
|
|
23473
23333
|
});
|
|
23474
23334
|
};
|
|
23475
23335
|
|
|
23476
|
-
|
|
23477
|
-
//#region src/views/paragraph-setting/line-spacing.ts
|
|
23336
|
+
// src/views/paragraph-setting/line-spacing.ts
|
|
23478
23337
|
const AUTO_LINE_SPACING_CONFIG = {
|
|
23479
23338
|
min: 1,
|
|
23480
23339
|
max: 5,
|
|
@@ -23536,8 +23395,7 @@ function convertLineSpacingForRuleChange(currentStoredValue, currentRule, nextRu
|
|
|
23536
23395
|
return round(DEFAULT_STYLES.fs * currentStoredValue, 4);
|
|
23537
23396
|
}
|
|
23538
23397
|
|
|
23539
|
-
|
|
23540
|
-
//#region src/views/paragraph-setting/hook/utils.ts
|
|
23398
|
+
// src/views/paragraph-setting/hook/utils.ts
|
|
23541
23399
|
const PARAGRAPH_LAYOUT_BLOCK_TYPES = /* @__PURE__ */ new Set([
|
|
23542
23400
|
DocumentBlockRangeType.CALLOUT,
|
|
23543
23401
|
DocumentBlockRangeType.CODE,
|
|
@@ -23739,8 +23597,59 @@ const useFirstParagraphLineSpacing = (paragraph) => {
|
|
|
23739
23597
|
};
|
|
23740
23598
|
};
|
|
23741
23599
|
|
|
23742
|
-
|
|
23743
|
-
|
|
23600
|
+
// src/views/paragraph-setting/ParagraphWordWrapSetting.tsx
|
|
23601
|
+
function ParagraphWordWrapSetting() {
|
|
23602
|
+
const commandService = useDependency(ICommandService);
|
|
23603
|
+
const instanceService = useDependency(IUniverInstanceService);
|
|
23604
|
+
const selectionService = useDependency(DocSelectionManagerService);
|
|
23605
|
+
const label = useDependency(LocaleService).t("docs-ui.doc.paragraphSetting.wordWrap");
|
|
23606
|
+
const readState = useCallback(() => {
|
|
23607
|
+
var _document$getSelfOrHe, _ranges$;
|
|
23608
|
+
const document = instanceService.getCurrentUnitOfType(UniverInstanceType.UNIVER_DOC);
|
|
23609
|
+
const ranges = selectionService.getDocRanges();
|
|
23610
|
+
const body = document === null || document === void 0 || (_document$getSelfOrHe = document.getSelfOrHeaderFooterModel((_ranges$ = ranges[0]) === null || _ranges$ === void 0 ? void 0 : _ranges$.segmentId)) === null || _document$getSelfOrHe === void 0 ? void 0 : _document$getSelfOrHe.getBody();
|
|
23611
|
+
const paragraphs = body && ranges.length ? BuildTextUtils.range.getParagraphsInRanges(ranges, body.paragraphs ?? [], body.dataStream) ?? [] : [];
|
|
23612
|
+
const values = paragraphs.map((paragraph) => resolveDocumentParagraphWordWrap(document.getSnapshot(), paragraph));
|
|
23613
|
+
return {
|
|
23614
|
+
checked: values[0] === BooleanNumber.TRUE,
|
|
23615
|
+
mixed: values.some((value) => value !== values[0]),
|
|
23616
|
+
disabled: paragraphs.length === 0
|
|
23617
|
+
};
|
|
23618
|
+
}, [instanceService, selectionService]);
|
|
23619
|
+
const [state, setState] = useState(readState);
|
|
23620
|
+
const refresh = useCallback(() => setState(readState()), [readState]);
|
|
23621
|
+
useEffect(() => {
|
|
23622
|
+
const selection = selectionService.textSelection$.subscribe(refresh);
|
|
23623
|
+
const mutation = commandService.onCommandExecuted((command) => {
|
|
23624
|
+
if (command.id === RichTextEditingMutation.id) refresh();
|
|
23625
|
+
});
|
|
23626
|
+
return () => {
|
|
23627
|
+
selection.unsubscribe();
|
|
23628
|
+
mutation.dispose();
|
|
23629
|
+
};
|
|
23630
|
+
}, [
|
|
23631
|
+
commandService,
|
|
23632
|
+
refresh,
|
|
23633
|
+
selectionService
|
|
23634
|
+
]);
|
|
23635
|
+
const apply = async (checked) => {
|
|
23636
|
+
await commandService.executeCommand(DocParagraphSettingCommand.id, { paragraph: { wordWrap: checked ? BooleanNumber.TRUE : BooleanNumber.FALSE } });
|
|
23637
|
+
refresh();
|
|
23638
|
+
};
|
|
23639
|
+
return /* @__PURE__ */ jsx("div", {
|
|
23640
|
+
"data-u-editor-interaction-boundary": "true",
|
|
23641
|
+
onMouseDown: (event) => event.preventDefault(),
|
|
23642
|
+
children: /* @__PURE__ */ jsx(Checkbox, {
|
|
23643
|
+
checked: state.checked && !state.mixed,
|
|
23644
|
+
indeterminate: state.mixed,
|
|
23645
|
+
disabled: state.disabled,
|
|
23646
|
+
onChange: (checked) => apply(checked === true),
|
|
23647
|
+
children: label
|
|
23648
|
+
})
|
|
23649
|
+
});
|
|
23650
|
+
}
|
|
23651
|
+
|
|
23652
|
+
// src/views/paragraph-setting/Setting.tsx
|
|
23744
23653
|
const ALIGNMENT_OPTIONS = [
|
|
23745
23654
|
{
|
|
23746
23655
|
label: "docs-ui.toolbar.alignLeft",
|
|
@@ -23944,13 +23853,16 @@ function ParagraphSetting({ RowComponent = ParagraphSettingRow, NumberComponent
|
|
|
23944
23853
|
})
|
|
23945
23854
|
]
|
|
23946
23855
|
})
|
|
23856
|
+
}),
|
|
23857
|
+
/* @__PURE__ */ jsx("div", {
|
|
23858
|
+
className: "univer-mt-5",
|
|
23859
|
+
children: /* @__PURE__ */ jsx(ParagraphWordWrapSetting, {})
|
|
23947
23860
|
})
|
|
23948
23861
|
]
|
|
23949
23862
|
});
|
|
23950
23863
|
}
|
|
23951
23864
|
|
|
23952
|
-
|
|
23953
|
-
//#region src/views/paragraph-setting/index.tsx
|
|
23865
|
+
// src/views/paragraph-setting/index.tsx
|
|
23954
23866
|
const isRangesEqual = (oldRanges, ranges) => {
|
|
23955
23867
|
return ranges.length === oldRanges.length && oldRanges.some((oldRange) => ranges.some((range) => range.startOffset === oldRange.startOffset && range.endOffset === oldRange.endOffset));
|
|
23956
23868
|
};
|
|
@@ -23986,8 +23898,7 @@ function ParagraphSettingIndex(props) {
|
|
|
23986
23898
|
});
|
|
23987
23899
|
}
|
|
23988
23900
|
|
|
23989
|
-
|
|
23990
|
-
//#region src/views/permission/DocObjectPermissionEntry.tsx
|
|
23901
|
+
// src/views/permission/DocObjectPermissionEntry.tsx
|
|
23991
23902
|
function DocObjectPermissionEntry({ unitId, id, objectType, segmentId = "" }) {
|
|
23992
23903
|
const injector = useInjector();
|
|
23993
23904
|
const instances = useDependency(IUniverInstanceService);
|
|
@@ -24026,8 +23937,7 @@ function DocObjectPermissionEntry({ unitId, id, objectType, segmentId = "" }) {
|
|
|
24026
23937
|
});
|
|
24027
23938
|
}
|
|
24028
23939
|
|
|
24029
|
-
|
|
24030
|
-
//#region src/views/section-setting/use-section-setting.ts
|
|
23940
|
+
// src/views/section-setting/use-section-setting.ts
|
|
24031
23941
|
const DEFAULT_SECTION_COLUMN_GAP = 18;
|
|
24032
23942
|
function getCommonValue(values) {
|
|
24033
23943
|
const first = values[0];
|
|
@@ -24198,8 +24108,7 @@ function useSectionSetting() {
|
|
|
24198
24108
|
};
|
|
24199
24109
|
}
|
|
24200
24110
|
|
|
24201
|
-
|
|
24202
|
-
//#region src/views/section-setting/Setting.tsx
|
|
24111
|
+
// src/views/section-setting/Setting.tsx
|
|
24203
24112
|
function SettingRow(props) {
|
|
24204
24113
|
return /* @__PURE__ */ jsxs("div", {
|
|
24205
24114
|
className: "univer-grid univer-min-h-8 univer-items-center univer-gap-3",
|
|
@@ -24462,8 +24371,7 @@ function SectionSetting({ RowComponent = SettingRow, InputNumberComponent = Inpu
|
|
|
24462
24371
|
});
|
|
24463
24372
|
}
|
|
24464
24373
|
|
|
24465
|
-
|
|
24466
|
-
//#region src/views/section-setting/index.tsx
|
|
24374
|
+
// src/views/section-setting/index.tsx
|
|
24467
24375
|
function SectionSettingIndex(props) {
|
|
24468
24376
|
const commandService = useDependency(ICommandService);
|
|
24469
24377
|
const [key, setKey] = useState(() => generateRandomId(4));
|
|
@@ -24481,8 +24389,7 @@ function SectionSettingIndex(props) {
|
|
|
24481
24389
|
});
|
|
24482
24390
|
}
|
|
24483
24391
|
|
|
24484
|
-
|
|
24485
|
-
//#region src/views/mobile/MobileDocSettings.tsx
|
|
24392
|
+
// src/views/mobile/MobileDocSettings.tsx
|
|
24486
24393
|
function MobileSettingRow({ label, unit, children }) {
|
|
24487
24394
|
return /* @__PURE__ */ jsxs("div", {
|
|
24488
24395
|
className: "univer-flex univer-min-h-12 univer-flex-col univer-gap-2",
|
|
@@ -24634,8 +24541,7 @@ function MobileHeaderFooterOptions({ unitId }) {
|
|
|
24634
24541
|
});
|
|
24635
24542
|
}
|
|
24636
24543
|
|
|
24637
|
-
|
|
24638
|
-
//#region src/views/table/create/TableCreate.tsx
|
|
24544
|
+
// src/views/table/create/TableCreate.tsx
|
|
24639
24545
|
const DocCreateTableConfirm = ({ handleRowColChange, tableCreateParams }) => {
|
|
24640
24546
|
const localeService = useDependency(LocaleService);
|
|
24641
24547
|
const [rowCount, setRowCount] = useState(3);
|
|
@@ -24679,8 +24585,7 @@ const DocCreateTableConfirm = ({ handleRowColChange, tableCreateParams }) => {
|
|
|
24679
24585
|
});
|
|
24680
24586
|
};
|
|
24681
24587
|
|
|
24682
|
-
|
|
24683
|
-
//#region src/controllers/mobile/components.controller.ts
|
|
24588
|
+
// src/controllers/mobile/components.controller.ts
|
|
24684
24589
|
/**
|
|
24685
24590
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
24686
24591
|
*
|
|
@@ -24702,14 +24607,8 @@ let MobileComponentsController = class MobileComponentsController extends Dispos
|
|
|
24702
24607
|
this._componentManager = _componentManager;
|
|
24703
24608
|
this._iconManager = _iconManager;
|
|
24704
24609
|
this._registerComponents();
|
|
24705
|
-
this._registerParts();
|
|
24706
24610
|
this._registerIcons();
|
|
24707
24611
|
}
|
|
24708
|
-
_registerParts() {
|
|
24709
|
-
const componentManager = this._componentManager;
|
|
24710
|
-
this.disposeWithMe(componentManager.register(COMPONENT_DOC_CREATE_TABLE_CONFIRM, DocCreateTableConfirm));
|
|
24711
|
-
this.disposeWithMe(componentManager.register(DOC_PASTE_OPTIONS_COMPONENT, MobileDocPasteOptions));
|
|
24712
|
-
}
|
|
24713
24612
|
_registerIcons() {
|
|
24714
24613
|
this.disposeWithMe(this._iconManager.register({
|
|
24715
24614
|
DocPasteOptionsIcon,
|
|
@@ -24806,12 +24705,14 @@ let MobileComponentsController = class MobileComponentsController extends Dispos
|
|
|
24806
24705
|
this.disposeWithMe(this._componentManager.register(BULLET_LIST_TYPE_COMPONENT, BulletListTypePicker));
|
|
24807
24706
|
this.disposeWithMe(this._componentManager.register(ORDER_LIST_TYPE_COMPONENT, OrderListTypePicker));
|
|
24808
24707
|
this.disposeWithMe(this._componentManager.register(DOC_LAYOUT_RECOVERY_COMPONENT, DocLayoutRecovery));
|
|
24708
|
+
const componentManager = this._componentManager;
|
|
24709
|
+
this.disposeWithMe(componentManager.register(COMPONENT_DOC_CREATE_TABLE_CONFIRM, DocCreateTableConfirm));
|
|
24710
|
+
this.disposeWithMe(componentManager.register(DOC_PASTE_OPTIONS_COMPONENT, MobileDocPasteOptions));
|
|
24809
24711
|
}
|
|
24810
24712
|
};
|
|
24811
24713
|
MobileComponentsController = __decorate([__decorateParam(0, Inject(ComponentManager)), __decorateParam(1, Inject(IconManager))], MobileComponentsController);
|
|
24812
24714
|
|
|
24813
|
-
|
|
24814
|
-
//#region src/consts/mobile-context.ts
|
|
24715
|
+
// src/consts/mobile-context.ts
|
|
24815
24716
|
/**
|
|
24816
24717
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
24817
24718
|
*
|
|
@@ -24830,8 +24731,7 @@ MobileComponentsController = __decorate([__decorateParam(0, Inject(ComponentMana
|
|
|
24830
24731
|
const DOC_CARET_MENU_ID = "docs.contextMenu.caret";
|
|
24831
24732
|
const MOBILE_DOC_PINCH_ZOOMING = "MOBILE_DOC_PINCH_ZOOMING";
|
|
24832
24733
|
|
|
24833
|
-
|
|
24834
|
-
//#region src/menu/mobile-schema.ts
|
|
24734
|
+
// src/menu/mobile-schema.ts
|
|
24835
24735
|
const mobileMenuSchema = {
|
|
24836
24736
|
[ContextMenuPosition.MAIN_AREA]: { [ContextMenuGroup.QUICK]: {
|
|
24837
24737
|
[DocSelectWordCommand.id]: {
|
|
@@ -24869,8 +24769,7 @@ const mobileMenuSchema = {
|
|
|
24869
24769
|
}
|
|
24870
24770
|
};
|
|
24871
24771
|
|
|
24872
|
-
|
|
24873
|
-
//#region src/views/mobile-doc-toolbar/MobileDocToolbar.tsx
|
|
24772
|
+
// src/views/mobile-doc-toolbar/MobileDocToolbar.tsx
|
|
24874
24773
|
const MOBILE_DOC_INSERT_GROUP = "doc.mobile.insert";
|
|
24875
24774
|
const MOBILE_DOC_FORMAT_QUICK_GROUP = "doc.mobile.format.quick";
|
|
24876
24775
|
const MOBILE_DOC_FORMAT_DETAIL_GROUP = "doc.mobile.format.detail";
|
|
@@ -25157,8 +25056,7 @@ function MobileDocToolbar() {
|
|
|
25157
25056
|
] });
|
|
25158
25057
|
}
|
|
25159
25058
|
|
|
25160
|
-
|
|
25161
|
-
//#region src/services/doc-mobile-element-menu.service.ts
|
|
25059
|
+
// src/services/doc-mobile-element-menu.service.ts
|
|
25162
25060
|
let DocMobileElementMenuService = class DocMobileElementMenuService extends Disposable {
|
|
25163
25061
|
constructor(_popupService, instanceService) {
|
|
25164
25062
|
super();
|
|
@@ -25233,8 +25131,7 @@ let DocMobileElementMenuService = class DocMobileElementMenuService extends Disp
|
|
|
25233
25131
|
};
|
|
25234
25132
|
DocMobileElementMenuService = __decorate([__decorateParam(0, Inject(DocCanvasPopManagerService)), __decorateParam(1, IUniverInstanceService)], DocMobileElementMenuService);
|
|
25235
25133
|
|
|
25236
|
-
|
|
25237
|
-
//#region src/views/mobile/MobileDocCanvasViewport.tsx
|
|
25134
|
+
// src/views/mobile/MobileDocCanvasViewport.tsx
|
|
25238
25135
|
function MobileDocCanvasViewport({ containerRef, canvasRef }) {
|
|
25239
25136
|
const instances = useDependency(IUniverInstanceService);
|
|
25240
25137
|
const renders = useDependency(IRenderManagerService);
|
|
@@ -25294,8 +25191,7 @@ function MobileDocCanvasViewport({ containerRef, canvasRef }) {
|
|
|
25294
25191
|
return null;
|
|
25295
25192
|
}
|
|
25296
25193
|
|
|
25297
|
-
|
|
25298
|
-
//#region src/controllers/mobile/ui.controller.ts
|
|
25194
|
+
// src/controllers/mobile/ui.controller.ts
|
|
25299
25195
|
/**
|
|
25300
25196
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
25301
25197
|
*
|
|
@@ -25356,8 +25252,7 @@ DocMobileUIController = __decorate([
|
|
|
25356
25252
|
__decorateParam(4, IUIPartsService)
|
|
25357
25253
|
], DocMobileUIController);
|
|
25358
25254
|
|
|
25359
|
-
|
|
25360
|
-
//#region src/controllers/render-controllers/doc-canvas-popup-layout-interaction.controller.ts
|
|
25255
|
+
// src/controllers/render-controllers/doc-canvas-popup-layout-interaction.controller.ts
|
|
25361
25256
|
let DocCanvasPopupLayoutInteractionController = class DocCanvasPopupLayoutInteractionController extends Disposable {
|
|
25362
25257
|
constructor(_context, _canvasPopupManagerService, _docLayoutInteractionService) {
|
|
25363
25258
|
super();
|
|
@@ -25382,8 +25277,7 @@ let DocCanvasPopupLayoutInteractionController = class DocCanvasPopupLayoutIntera
|
|
|
25382
25277
|
};
|
|
25383
25278
|
DocCanvasPopupLayoutInteractionController = __decorate([__decorateParam(1, Inject(DocCanvasPopManagerService)), __decorateParam(2, Inject(DocLayoutInteractionService))], DocCanvasPopupLayoutInteractionController);
|
|
25384
25279
|
|
|
25385
|
-
|
|
25386
|
-
//#region src/controllers/render-controllers/doc-checklist.render-controller.ts
|
|
25280
|
+
// src/controllers/render-controllers/doc-checklist.render-controller.ts
|
|
25387
25281
|
let DocChecklistRenderController = class DocChecklistRenderController extends Disposable {
|
|
25388
25282
|
constructor(_context, _docSkeletonManagerService, _commandService, _docEventManagerService, _textSelectionManagerService) {
|
|
25389
25283
|
super();
|
|
@@ -25425,8 +25319,7 @@ DocChecklistRenderController = __decorate([
|
|
|
25425
25319
|
__decorateParam(4, Inject(DocSelectionManagerService))
|
|
25426
25320
|
], DocChecklistRenderController);
|
|
25427
25321
|
|
|
25428
|
-
|
|
25429
|
-
//#region src/controllers/render-controllers/doc-clipboard.controller.ts
|
|
25322
|
+
// src/controllers/render-controllers/doc-clipboard.controller.ts
|
|
25430
25323
|
let DocClipboardController = class DocClipboardController extends RxDisposable {
|
|
25431
25324
|
constructor(_context, _commandService, _docClipboardService, _docSelectionRenderService, _contextService, _editorService) {
|
|
25432
25325
|
super();
|
|
@@ -25471,8 +25364,7 @@ DocClipboardController = __decorate([
|
|
|
25471
25364
|
__decorateParam(5, IEditorService)
|
|
25472
25365
|
], DocClipboardController);
|
|
25473
25366
|
|
|
25474
|
-
|
|
25475
|
-
//#region src/controllers/render-controllers/doc-contextmenu.render-controller.ts
|
|
25367
|
+
// src/controllers/render-controllers/doc-contextmenu.render-controller.ts
|
|
25476
25368
|
const SKIP_UNIT_IDS = [
|
|
25477
25369
|
DEFAULT_EMPTY_DOCUMENT_VALUE,
|
|
25478
25370
|
DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY,
|
|
@@ -25543,8 +25435,7 @@ function isRangeIntersectingBlock(range, startIndex, endIndex) {
|
|
|
25543
25435
|
return Math.max(range.startOffset, startIndex) <= Math.min(range.endOffset, endIndex);
|
|
25544
25436
|
}
|
|
25545
25437
|
|
|
25546
|
-
|
|
25547
|
-
//#region src/controllers/render-controllers/doc-editor-bridge.controller.ts
|
|
25438
|
+
// src/controllers/render-controllers/doc-editor-bridge.controller.ts
|
|
25548
25439
|
let DocEditorBridgeController = class DocEditorBridgeController extends Disposable {
|
|
25549
25440
|
constructor(_context, _univerInstanceService, _editorService, _commandService, _docSelectionRenderService, _docSkeletonManagerService, _renderManagerService) {
|
|
25550
25441
|
super();
|
|
@@ -25656,8 +25547,7 @@ DocEditorBridgeController = __decorate([
|
|
|
25656
25547
|
__decorateParam(6, IRenderManagerService)
|
|
25657
25548
|
], DocEditorBridgeController);
|
|
25658
25549
|
|
|
25659
|
-
|
|
25660
|
-
//#region src/controllers/render-controllers/doc-ime-input.controller.ts
|
|
25550
|
+
// src/controllers/render-controllers/doc-ime-input.controller.ts
|
|
25661
25551
|
let DocIMEInputController = class DocIMEInputController extends Disposable {
|
|
25662
25552
|
constructor(_context, _docSelectionRenderService, _docImeInputManagerService, _docSkeletonManagerService, _docStateEmitService, _docSelectionManagerService, _commandService) {
|
|
25663
25553
|
super();
|
|
@@ -25788,8 +25678,7 @@ DocIMEInputController = __decorate([
|
|
|
25788
25678
|
__decorateParam(6, ICommandService)
|
|
25789
25679
|
], DocIMEInputController);
|
|
25790
25680
|
|
|
25791
|
-
|
|
25792
|
-
//#region src/controllers/render-controllers/doc-input.controller.ts
|
|
25681
|
+
// src/controllers/render-controllers/doc-input.controller.ts
|
|
25793
25682
|
let DocInputController = class DocInputController extends Disposable {
|
|
25794
25683
|
constructor(_context, _docSelectionRenderService, _docSkeletonManagerService, _commandService, _docMenuStyleService, _embedInteractionBoundaryService, _embedRuntimeFocusCoordinator) {
|
|
25795
25684
|
super();
|
|
@@ -25879,8 +25768,7 @@ DocInputController = __decorate([
|
|
|
25879
25768
|
__decorateParam(6, Optional(IDocEmbedRuntimeFocusCoordinator))
|
|
25880
25769
|
], DocInputController);
|
|
25881
25770
|
|
|
25882
|
-
|
|
25883
|
-
//#region src/controllers/render-controllers/doc-layout-progress.render-controller.ts
|
|
25771
|
+
// src/controllers/render-controllers/doc-layout-progress.render-controller.ts
|
|
25884
25772
|
const DOC_LAYOUT_PROGRESS_DELAY_MS = 2e3;
|
|
25885
25773
|
const DOC_LAYOUT_PROGRESS_CANCEL_GRACE_MS = 1e3;
|
|
25886
25774
|
function resolveDocLayoutProgressPercent(progress) {
|
|
@@ -25975,8 +25863,7 @@ let DocLayoutProgressRenderController = class DocLayoutProgressRenderController
|
|
|
25975
25863
|
};
|
|
25976
25864
|
DocLayoutProgressRenderController = __decorate([__decorateParam(1, Inject(DocSkeletonManagerService)), __decorateParam(2, Inject(DocLayoutProgressService))], DocLayoutProgressRenderController);
|
|
25977
25865
|
|
|
25978
|
-
|
|
25979
|
-
//#region src/controllers/render-controllers/doc-layout-recovery.render-controller.ts
|
|
25866
|
+
// src/controllers/render-controllers/doc-layout-recovery.render-controller.ts
|
|
25980
25867
|
function acquireDocLayoutRecoveryInteractionLock(canvas, shortcutService, blurSelection) {
|
|
25981
25868
|
const previousPointerEvents = canvas.style.pointerEvents;
|
|
25982
25869
|
const previousOpacity = canvas.style.opacity;
|
|
@@ -26056,8 +25943,7 @@ DocLayoutRecoveryRenderController = __decorate([
|
|
|
26056
25943
|
__decorateParam(4, IShortcutService)
|
|
26057
25944
|
], DocLayoutRecoveryRenderController);
|
|
26058
25945
|
|
|
26059
|
-
|
|
26060
|
-
//#region src/controllers/render-controllers/doc-paste-options.render-controller.ts
|
|
25946
|
+
// src/controllers/render-controllers/doc-paste-options.render-controller.ts
|
|
26061
25947
|
let DocPasteOptionsRenderController = class DocPasteOptionsRenderController extends Disposable {
|
|
26062
25948
|
constructor(_context, _clipboard, selection, popupManager, contextService) {
|
|
26063
25949
|
super();
|
|
@@ -26120,8 +26006,7 @@ DocPasteOptionsRenderController = __decorate([
|
|
|
26120
26006
|
__decorateParam(4, IContextService)
|
|
26121
26007
|
], DocPasteOptionsRenderController);
|
|
26122
26008
|
|
|
26123
|
-
|
|
26124
|
-
//#region src/controllers/render-controllers/doc-resize.render-controller.ts
|
|
26009
|
+
// src/controllers/render-controllers/doc-resize.render-controller.ts
|
|
26125
26010
|
function hasRenderableDocSkeleton(component) {
|
|
26126
26011
|
if (typeof component !== "object" || component == null || !("getSkeleton" in component) || typeof component.getSkeleton !== "function") return false;
|
|
26127
26012
|
const skeleton = component.getSkeleton();
|
|
@@ -26164,8 +26049,7 @@ DocResizeRenderController = __decorate([
|
|
|
26164
26049
|
__decorateParam(3, ISidebarService)
|
|
26165
26050
|
], DocResizeRenderController);
|
|
26166
26051
|
|
|
26167
|
-
|
|
26168
|
-
//#region src/controllers/render-controllers/mobile/back-scroll.render-controller.ts
|
|
26052
|
+
// src/controllers/render-controllers/mobile/back-scroll.render-controller.ts
|
|
26169
26053
|
const MOBILE_CARET_MARGIN = 32;
|
|
26170
26054
|
const MOBILE_TOOLBAR_HEIGHT = 48;
|
|
26171
26055
|
const MOBILE_CARET_VIEWPORT_RATIO = .4;
|
|
@@ -26205,8 +26089,7 @@ MobileDocBackScrollRenderController = __decorate([
|
|
|
26205
26089
|
__decorateParam(5, Inject(DocPageLayoutService))
|
|
26206
26090
|
], MobileDocBackScrollRenderController);
|
|
26207
26091
|
|
|
26208
|
-
|
|
26209
|
-
//#region src/controllers/render-controllers/doc-selection-render.util.ts
|
|
26092
|
+
// src/controllers/render-controllers/doc-selection-render.util.ts
|
|
26210
26093
|
function isEmbedInteractionEvent(evt) {
|
|
26211
26094
|
var _document$elementFrom;
|
|
26212
26095
|
const target = evt.target;
|
|
@@ -26237,8 +26120,7 @@ function getEventClientPoint(evt, target) {
|
|
|
26237
26120
|
};
|
|
26238
26121
|
}
|
|
26239
26122
|
|
|
26240
|
-
|
|
26241
|
-
//#region src/controllers/render-controllers/mobile/doc-selection-render.controller.ts
|
|
26123
|
+
// src/controllers/render-controllers/mobile/doc-selection-render.controller.ts
|
|
26242
26124
|
const DOUBLE_TAP_INTERVAL = 450;
|
|
26243
26125
|
const DOUBLE_TAP_DISTANCE = 28;
|
|
26244
26126
|
const DRAG_THRESHOLD = 12;
|
|
@@ -26733,8 +26615,7 @@ function calculateInertiaVelocity(history, duration, displacement) {
|
|
|
26733
26615
|
};
|
|
26734
26616
|
}
|
|
26735
26617
|
|
|
26736
|
-
|
|
26737
|
-
//#region src/controllers/render-controllers/mobile/doc.render-controller.ts
|
|
26618
|
+
// src/controllers/render-controllers/mobile/doc.render-controller.ts
|
|
26738
26619
|
const MOBILE_DOC_OUTER_MARGIN = 12;
|
|
26739
26620
|
let MobileDocRenderController = class MobileDocRenderController extends DocRenderController {
|
|
26740
26621
|
constructor(context, commandService, docSelectionRenderService, docSkeletonManagerService, editorService, renderManagerService, univerInstanceService, docPageLayoutService, textSelectionManagerService, docViewScaleService, themeService, docLayoutExecutorService, docLayoutInteractionService, logService) {
|
|
@@ -26794,8 +26675,7 @@ MobileDocRenderController = __decorate([
|
|
|
26794
26675
|
__decorateParam(13, ILogService)
|
|
26795
26676
|
], MobileDocRenderController);
|
|
26796
26677
|
|
|
26797
|
-
|
|
26798
|
-
//#region src/controllers/render-controllers/zoom.render-controller.ts
|
|
26678
|
+
// src/controllers/render-controllers/zoom.render-controller.ts
|
|
26799
26679
|
function shouldHandleDocWheelZoom(event, focusingDoc, _documentFlavor) {
|
|
26800
26680
|
return focusingDoc && (event.ctrlKey || event.metaKey);
|
|
26801
26681
|
}
|
|
@@ -26921,8 +26801,7 @@ DocZoomRenderController = __decorate([
|
|
|
26921
26801
|
__decorateParam(10, Optional(IDocEmbedInteractionBoundaryService))
|
|
26922
26802
|
], DocZoomRenderController);
|
|
26923
26803
|
|
|
26924
|
-
|
|
26925
|
-
//#region src/controllers/render-controllers/mobile/doc-pinch-zoom.ts
|
|
26804
|
+
// src/controllers/render-controllers/mobile/doc-pinch-zoom.ts
|
|
26926
26805
|
const MOBILE_DOC_ZOOM_MIN = .5;
|
|
26927
26806
|
const MOBILE_DOC_ZOOM_MAX = 3;
|
|
26928
26807
|
function resolveMobileDocPinchZoomRatio(initialZoomRatio, initialDistance, currentDistance) {
|
|
@@ -27020,8 +26899,7 @@ var MobileDocPinchZoomGesture = class extends Disposable {
|
|
|
27020
26899
|
}
|
|
27021
26900
|
};
|
|
27022
26901
|
|
|
27023
|
-
|
|
27024
|
-
//#region src/controllers/render-controllers/mobile/zoom.render-controller.ts
|
|
26902
|
+
// src/controllers/render-controllers/mobile/zoom.render-controller.ts
|
|
27025
26903
|
let MobileDocZoomRenderController = class MobileDocZoomRenderController extends DocZoomRenderController {
|
|
27026
26904
|
constructor(context, contextService, docSkeletonManagerService, univerInstanceService, commandService, textSelectionManagerService, editorService, docPageLayoutService, renderManagerService, docViewScaleService, embedInteractionBoundaryService) {
|
|
27027
26905
|
super(context, contextService, docSkeletonManagerService, univerInstanceService, commandService, textSelectionManagerService, editorService, docPageLayoutService, renderManagerService, docViewScaleService, embedInteractionBoundaryService);
|
|
@@ -27076,8 +26954,7 @@ MobileDocZoomRenderController = __decorate([
|
|
|
27076
26954
|
__decorateParam(10, Optional(IDocEmbedInteractionBoundaryService))
|
|
27077
26955
|
], MobileDocZoomRenderController);
|
|
27078
26956
|
|
|
27079
|
-
|
|
27080
|
-
//#region src/services/doc-ime-state-change-interceptor.service.ts
|
|
26957
|
+
// src/services/doc-ime-state-change-interceptor.service.ts
|
|
27081
26958
|
let DocIMEStateChangeInterceptorService = class DocIMEStateChangeInterceptorService {
|
|
27082
26959
|
constructor(_renderManagerService) {
|
|
27083
26960
|
this._renderManagerService = _renderManagerService;
|
|
@@ -27113,8 +26990,7 @@ let DocIMEStateChangeInterceptorService = class DocIMEStateChangeInterceptorServ
|
|
|
27113
26990
|
};
|
|
27114
26991
|
DocIMEStateChangeInterceptorService = __decorate([__decorateParam(0, IRenderManagerService)], DocIMEStateChangeInterceptorService);
|
|
27115
26992
|
|
|
27116
|
-
|
|
27117
|
-
//#region src/services/doc-print-interceptor.service.ts
|
|
26993
|
+
// src/services/doc-print-interceptor.service.ts
|
|
27118
26994
|
const PRINTING_COMPONENT_COLLECT = createInterceptorKey("PRINTING_COMPONENT_COLLECT");
|
|
27119
26995
|
const PRINTING_DOM_COLLECT = createInterceptorKey("PRINTING_DOM_COLLECT");
|
|
27120
26996
|
var DocPrintInterceptorService = class extends Disposable {
|
|
@@ -27175,8 +27051,7 @@ function collectPageDrawingIds(page, drawingIds) {
|
|
|
27175
27051
|
for (const table of page.skeTables.values()) for (const row of table.rows) for (const cell of row.cells) collectPageDrawingIds(cell, drawingIds);
|
|
27176
27052
|
}
|
|
27177
27053
|
|
|
27178
|
-
|
|
27179
|
-
//#region src/services/docs-render.service.ts
|
|
27054
|
+
// src/services/docs-render.service.ts
|
|
27180
27055
|
const DOC_MAIN_CANVAS_ID = "univer-doc-main-canvas";
|
|
27181
27056
|
function getDocsCanvasBackgroundColor(documentFlavor, canvasColorService, editorBackgroundColor, isEditor) {
|
|
27182
27057
|
return resolveDocRenderBackground({
|
|
@@ -27227,8 +27102,7 @@ let DocsRenderService = class DocsRenderService extends RxDisposable {
|
|
|
27227
27102
|
};
|
|
27228
27103
|
DocsRenderService = __decorate([__decorateParam(0, IUniverInstanceService), __decorateParam(1, IRenderManagerService)], DocsRenderService);
|
|
27229
27104
|
|
|
27230
|
-
|
|
27231
|
-
//#region src/views/float-toolbar/FloatToolbar.tsx
|
|
27105
|
+
// src/views/float-toolbar/FloatToolbar.tsx
|
|
27232
27106
|
const FLOAT_MENU_COMPONENT_KEY = "univer.doc.float-menu";
|
|
27233
27107
|
const DEFAULT_AVALIABLE_MENUS = [
|
|
27234
27108
|
FLOAT_TEXT_STYLE_MENU_ID,
|
|
@@ -27354,8 +27228,7 @@ function FloatToolbar(props) {
|
|
|
27354
27228
|
});
|
|
27355
27229
|
}
|
|
27356
27230
|
|
|
27357
|
-
|
|
27358
|
-
//#region src/services/float-menu.service.ts
|
|
27231
|
+
// src/services/float-menu.service.ts
|
|
27359
27232
|
const SKIP_SYMBOLS = [DataStreamTreeTokenType.CUSTOM_BLOCK, DataStreamTreeTokenType.PARAGRAPH];
|
|
27360
27233
|
let DocFloatMenuService = class DocFloatMenuService extends Disposable {
|
|
27361
27234
|
constructor(_context, _docSelectionManagerService, _docCanvasPopManagerService, _univerInstanceService, _docSelectionRenderService, _contextService, _contextMenuService, _permissionService, _docLayoutInteractionService, _embedRuntimeFocusCoordinator) {
|
|
@@ -27526,8 +27399,7 @@ function isRangeInCodeBlock(documentDataModel, range) {
|
|
|
27526
27399
|
return (((_documentDataModel$ge3 = documentDataModel.getBody()) === null || _documentDataModel$ge3 === void 0 ? void 0 : _documentDataModel$ge3.blockRanges) ?? []).some((blockRange) => blockRange.blockType === DocumentBlockRangeType.CODE && Math.max(range.startOffset, blockRange.startIndex) <= Math.min(range.endOffset, blockRange.endIndex));
|
|
27527
27400
|
}
|
|
27528
27401
|
|
|
27529
|
-
|
|
27530
|
-
//#region src/services/mobile/mobile-text-selection-visuals.ts
|
|
27402
|
+
// src/services/mobile/mobile-text-selection-visuals.ts
|
|
27531
27403
|
const MOBILE_HANDLE_TOUCH_SIZE = 32;
|
|
27532
27404
|
const MOBILE_HANDLE_VISUAL_SIZE = 12;
|
|
27533
27405
|
const MOBILE_HANDLE_STEM_WIDTH = 2;
|
|
@@ -27659,8 +27531,7 @@ var MobileTextSelectionVisuals = class {
|
|
|
27659
27531
|
}
|
|
27660
27532
|
};
|
|
27661
27533
|
|
|
27662
|
-
|
|
27663
|
-
//#region src/services/mobile/doc-selection-render.service.ts
|
|
27534
|
+
// src/services/mobile/doc-selection-render.service.ts
|
|
27664
27535
|
const MOBILE_KEYBOARD_THRESHOLD = 80;
|
|
27665
27536
|
const MOBILE_INPUT_VIEWPORT_INSET = 1;
|
|
27666
27537
|
let MobileDocSelectionRenderService = class MobileDocSelectionRenderService extends DocSelectionRenderService {
|
|
@@ -27891,8 +27762,7 @@ MobileDocSelectionRenderService = __decorate([
|
|
|
27891
27762
|
__decorateParam(8, Optional(IDocEmbedRuntimeFocusCoordinator))
|
|
27892
27763
|
], MobileDocSelectionRenderService);
|
|
27893
27764
|
|
|
27894
|
-
|
|
27895
|
-
//#region src/services/mobile/doc-view-scale.ts
|
|
27765
|
+
// src/services/mobile/doc-view-scale.ts
|
|
27896
27766
|
/**
|
|
27897
27767
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
27898
27768
|
*
|
|
@@ -27915,8 +27785,7 @@ var MobileDocViewScaleService = class extends DocViewScaleService {
|
|
|
27915
27785
|
}
|
|
27916
27786
|
};
|
|
27917
27787
|
|
|
27918
|
-
|
|
27919
|
-
//#region src/services/mobile/float-menu.service.ts
|
|
27788
|
+
// src/services/mobile/float-menu.service.ts
|
|
27920
27789
|
var MobileDocFloatMenuService = class extends DocFloatMenuService {
|
|
27921
27790
|
_openSelectionMenu(unitId, range) {
|
|
27922
27791
|
const [anchor] = this._docCanvasPopManagerService.getRangeBounds(range, unitId) ?? [];
|
|
@@ -27938,8 +27807,7 @@ var MobileDocFloatMenuService = class extends DocFloatMenuService {
|
|
|
27938
27807
|
}
|
|
27939
27808
|
};
|
|
27940
27809
|
|
|
27941
|
-
|
|
27942
|
-
//#region src/mobile-plugin.ts
|
|
27810
|
+
// src/mobile-plugin.ts
|
|
27943
27811
|
let UniverDocsMobileUIPlugin = class UniverDocsMobileUIPlugin extends Plugin {
|
|
27944
27812
|
constructor(_config = defaultPluginMobileConfig, _injector, _renderManagerSrv, _commandService, _configService) {
|
|
27945
27813
|
super();
|
|
@@ -28160,8 +28028,7 @@ UniverDocsMobileUIPlugin = __decorate([
|
|
|
28160
28028
|
__decorateParam(4, IConfigService)
|
|
28161
28029
|
], UniverDocsMobileUIPlugin);
|
|
28162
28030
|
|
|
28163
|
-
|
|
28164
|
-
//#region src/views/header-footer/panel/DocHeaderFooterFields.tsx
|
|
28031
|
+
// src/views/header-footer/panel/DocHeaderFooterFields.tsx
|
|
28165
28032
|
function DocHeaderFooterFields({ unitId, disabled }) {
|
|
28166
28033
|
const localeService = useDependency(LocaleService);
|
|
28167
28034
|
useObservable(localeService.currentLocale$);
|
|
@@ -28340,8 +28207,7 @@ function DocHeaderFooterFields({ unitId, disabled }) {
|
|
|
28340
28207
|
});
|
|
28341
28208
|
}
|
|
28342
28209
|
|
|
28343
|
-
|
|
28344
|
-
//#region src/views/header-footer/panel/DocHeaderFooterRibbonControl.tsx
|
|
28210
|
+
// src/views/header-footer/panel/DocHeaderFooterRibbonControl.tsx
|
|
28345
28211
|
function DocHeaderFooterRibbonControl(props) {
|
|
28346
28212
|
const instances = useDependency(IUniverInstanceService);
|
|
28347
28213
|
const localeService = useDependency(LocaleService);
|
|
@@ -28473,8 +28339,7 @@ function HeaderFooterRibbonControl({ kind, unitId }) {
|
|
|
28473
28339
|
});
|
|
28474
28340
|
}
|
|
28475
28341
|
|
|
28476
|
-
|
|
28477
|
-
//#region src/views/paragraph-menu/component-keys.ts
|
|
28342
|
+
// src/views/paragraph-menu/component-keys.ts
|
|
28478
28343
|
/**
|
|
28479
28344
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
28480
28345
|
*
|
|
@@ -28493,8 +28358,7 @@ function HeaderFooterRibbonControl({ kind, unitId }) {
|
|
|
28493
28358
|
const DOC_PARAGRAPH_MENU_COMPONENT_KEY = "doc.paragraph.menu";
|
|
28494
28359
|
const DOC_TABLE_BLOCK_MENU_COMPONENT_KEY = "doc.table-block.menu";
|
|
28495
28360
|
|
|
28496
|
-
|
|
28497
|
-
//#region src/services/doc-paragraph-menu.service.ts
|
|
28361
|
+
// src/services/doc-paragraph-menu.service.ts
|
|
28498
28362
|
const BLOCK_RANGE_ICON_MAP = {
|
|
28499
28363
|
code: "CodeBlockIcon",
|
|
28500
28364
|
quote: "QuoteIcon",
|
|
@@ -29311,8 +29175,7 @@ function getBlockRangeAnchorRect(docEventManagerService, blockRange, fallbackPar
|
|
|
29311
29175
|
};
|
|
29312
29176
|
}
|
|
29313
29177
|
|
|
29314
|
-
|
|
29315
|
-
//#region src/views/paragraph-menu/paragraph-menu-position.ts
|
|
29178
|
+
// src/views/paragraph-menu/paragraph-menu-position.ts
|
|
29316
29179
|
function observeParagraphMenuPosition(element, popup, targets$) {
|
|
29317
29180
|
let anchor;
|
|
29318
29181
|
let table = false;
|
|
@@ -29379,8 +29242,7 @@ function observeParagraphMenuPosition(element, popup, targets$) {
|
|
|
29379
29242
|
};
|
|
29380
29243
|
}
|
|
29381
29244
|
|
|
29382
|
-
|
|
29383
|
-
//#region src/views/ParagraphMenu.tsx
|
|
29245
|
+
// src/views/ParagraphMenu.tsx
|
|
29384
29246
|
function getParagraphMenuPopupDirection(anchorLeft, menuWidth = 212, viewportPadding = 8, options = {}) {
|
|
29385
29247
|
const { anchorRight = anchorLeft, direction = "ltr", viewportWidth = Number.POSITIVE_INFINITY } = options;
|
|
29386
29248
|
const hasLeftSpace = anchorLeft - menuWidth >= viewportPadding;
|
|
@@ -30459,8 +30321,7 @@ function DragHandleDotsIcon() {
|
|
|
30459
30321
|
});
|
|
30460
30322
|
}
|
|
30461
30323
|
|
|
30462
|
-
|
|
30463
|
-
//#region src/controllers/components.controller.ts
|
|
30324
|
+
// src/controllers/components.controller.ts
|
|
30464
30325
|
/**
|
|
30465
30326
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
30466
30327
|
*
|
|
@@ -30483,14 +30344,8 @@ let ComponentsController = class ComponentsController extends Disposable {
|
|
|
30483
30344
|
this._componentManager = _componentManager;
|
|
30484
30345
|
this._iconManager = _iconManager;
|
|
30485
30346
|
this._registerComponents();
|
|
30486
|
-
this._registerParts();
|
|
30487
30347
|
this._registerIcons();
|
|
30488
30348
|
}
|
|
30489
|
-
_registerParts() {
|
|
30490
|
-
const componentManager = this._componentManager;
|
|
30491
|
-
this.disposeWithMe(componentManager.register(DOC_PASTE_OPTIONS_COMPONENT, DocPasteOptions));
|
|
30492
|
-
this.disposeWithMe(componentManager.register(COMPONENT_DOC_CREATE_TABLE_CONFIRM, DocCreateTableConfirm));
|
|
30493
|
-
}
|
|
30494
30349
|
_registerIcons() {
|
|
30495
30350
|
this.disposeWithMe(this._iconManager.register({
|
|
30496
30351
|
AlignTextBothIcon,
|
|
@@ -30595,12 +30450,14 @@ let ComponentsController = class ComponentsController extends Disposable {
|
|
|
30595
30450
|
].forEach(([key, comp]) => {
|
|
30596
30451
|
this.disposeWithMe(this._componentManager.register(key, comp));
|
|
30597
30452
|
});
|
|
30453
|
+
const componentManager = this._componentManager;
|
|
30454
|
+
this.disposeWithMe(componentManager.register(DOC_PASTE_OPTIONS_COMPONENT, DocPasteOptions));
|
|
30455
|
+
this.disposeWithMe(componentManager.register(COMPONENT_DOC_CREATE_TABLE_CONFIRM, DocCreateTableConfirm));
|
|
30598
30456
|
}
|
|
30599
30457
|
};
|
|
30600
30458
|
ComponentsController = __decorate([__decorateParam(0, Inject(ComponentManager)), __decorateParam(1, Inject(IconManager))], ComponentsController);
|
|
30601
30459
|
|
|
30602
|
-
|
|
30603
|
-
//#region src/controllers/doc-header-footer-ribbon.controller.ts
|
|
30460
|
+
// src/controllers/doc-header-footer-ribbon.controller.ts
|
|
30604
30461
|
let DocHeaderFooterRibbonController = class DocHeaderFooterRibbonController extends Disposable {
|
|
30605
30462
|
constructor(_context, skeletonManager, _instanceService, _ribbonService, _renderManager) {
|
|
30606
30463
|
super();
|
|
@@ -30636,8 +30493,7 @@ DocHeaderFooterRibbonController = __decorate([
|
|
|
30636
30493
|
__decorateParam(4, IRenderManagerService)
|
|
30637
30494
|
], DocHeaderFooterRibbonController);
|
|
30638
30495
|
|
|
30639
|
-
|
|
30640
|
-
//#region src/controllers/format-painter.controller.ts
|
|
30496
|
+
// src/controllers/format-painter.controller.ts
|
|
30641
30497
|
let DocFormatPainterController = class DocFormatPainterController extends Disposable {
|
|
30642
30498
|
constructor(session, selections, styles, instances, context, permissions, editors, commands) {
|
|
30643
30499
|
super();
|
|
@@ -30703,8 +30559,7 @@ DocFormatPainterController = __decorate([
|
|
|
30703
30559
|
__decorateParam(7, ICommandService)
|
|
30704
30560
|
], DocFormatPainterController);
|
|
30705
30561
|
|
|
30706
|
-
|
|
30707
|
-
//#region src/controllers/render-controllers/doc-field.render-controller.ts
|
|
30562
|
+
// src/controllers/render-controllers/doc-field.render-controller.ts
|
|
30708
30563
|
let DocFieldRenderController = class DocFieldRenderController extends Disposable {
|
|
30709
30564
|
constructor(_context, _events, _selections, theme, _instances) {
|
|
30710
30565
|
super();
|
|
@@ -30780,8 +30635,7 @@ DocFieldRenderController = __decorate([
|
|
|
30780
30635
|
__decorateParam(4, IUniverInstanceService)
|
|
30781
30636
|
], DocFieldRenderController);
|
|
30782
30637
|
|
|
30783
|
-
|
|
30784
|
-
//#region src/controllers/render-controllers/doc-selection-render.controller.ts
|
|
30638
|
+
// src/controllers/render-controllers/doc-selection-render.controller.ts
|
|
30785
30639
|
let DocSelectionRenderController = class DocSelectionRenderController extends Disposable {
|
|
30786
30640
|
constructor(_context, _commandService, _editorService, _instanceSrv, _docSelectionRenderService, _docSkeletonManagerService, _docSelectionManagerService, _embedInteractionBoundaryService, _embedRuntimeFocusCoordinator) {
|
|
30787
30641
|
super();
|
|
@@ -30992,8 +30846,7 @@ DocSelectionRenderController = __decorate([
|
|
|
30992
30846
|
__decorateParam(8, Optional(IDocEmbedRuntimeFocusCoordinator))
|
|
30993
30847
|
], DocSelectionRenderController);
|
|
30994
30848
|
|
|
30995
|
-
|
|
30996
|
-
//#region src/controllers/render-controllers/format-painter.render-controller.ts
|
|
30849
|
+
// src/controllers/render-controllers/format-painter.render-controller.ts
|
|
30997
30850
|
let DocFormatPainterRenderController = class DocFormatPainterRenderController extends Disposable {
|
|
30998
30851
|
constructor(context, session, selections, instances) {
|
|
30999
30852
|
super();
|
|
@@ -31024,8 +30877,7 @@ DocFormatPainterRenderController = __decorate([
|
|
|
31024
30877
|
__decorateParam(3, IUniverInstanceService)
|
|
31025
30878
|
], DocFormatPainterRenderController);
|
|
31026
30879
|
|
|
31027
|
-
|
|
31028
|
-
//#region src/services/doc-contextual-ribbon.service.ts
|
|
30880
|
+
// src/services/doc-contextual-ribbon.service.ts
|
|
31029
30881
|
/**
|
|
31030
30882
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
31031
30883
|
*
|
|
@@ -31077,8 +30929,7 @@ let DocContextualRibbonService = class DocContextualRibbonService extends Dispos
|
|
|
31077
30929
|
};
|
|
31078
30930
|
DocContextualRibbonService = __decorate([__decorateParam(0, IRibbonService)], DocContextualRibbonService);
|
|
31079
30931
|
|
|
31080
|
-
|
|
31081
|
-
//#region src/views/heading-collapse-shape.ts
|
|
30932
|
+
// src/views/heading-collapse-shape.ts
|
|
31082
30933
|
var HeadingCollapseShape = class extends Shape {
|
|
31083
30934
|
constructor(key, colors, activate) {
|
|
31084
30935
|
super(key, {
|
|
@@ -31196,8 +31047,7 @@ var HeadingCollapseShape = class extends Shape {
|
|
|
31196
31047
|
}
|
|
31197
31048
|
};
|
|
31198
31049
|
|
|
31199
|
-
|
|
31200
|
-
//#region src/services/doc-heading-collapse.service.ts
|
|
31050
|
+
// src/services/doc-heading-collapse.service.ts
|
|
31201
31051
|
let DocHeadingCollapseService = class DocHeadingCollapseService extends Disposable {
|
|
31202
31052
|
constructor(_context, _skeletonManager, _eventManager, _selections, _commandService, _layoutService, themeService, localeService) {
|
|
31203
31053
|
super();
|
|
@@ -31360,8 +31210,7 @@ DocHeadingCollapseService = __decorate([
|
|
|
31360
31210
|
__decorateParam(7, Inject(LocaleService))
|
|
31361
31211
|
], DocHeadingCollapseService);
|
|
31362
31212
|
|
|
31363
|
-
|
|
31364
|
-
//#region src/shortcuts/core-editing.shortcut.ts
|
|
31213
|
+
// src/shortcuts/core-editing.shortcut.ts
|
|
31365
31214
|
const BreakLineShortcut = {
|
|
31366
31215
|
id: EnterCommand.id,
|
|
31367
31216
|
preconditions: whenDocAndEditorFocusedWithBreakLine,
|
|
@@ -31414,8 +31263,7 @@ const DeleteLineEndShortcut = {
|
|
|
31414
31263
|
staticParameters: { granularity: "line" }
|
|
31415
31264
|
};
|
|
31416
31265
|
|
|
31417
|
-
|
|
31418
|
-
//#region src/shortcuts/cursor.shortcut.ts
|
|
31266
|
+
// src/shortcuts/cursor.shortcut.ts
|
|
31419
31267
|
function moveCursorShortcut(direction, granularity, binding, mac = binding, win = binding, linux = binding) {
|
|
31420
31268
|
return {
|
|
31421
31269
|
id: MoveCursorOperation.id,
|
|
@@ -31514,8 +31362,7 @@ const SelectAllShortcut = {
|
|
|
31514
31362
|
preconditions: (contextService) => contextService.getContextValue(FOCUSING_UNIVER_EDITOR) && (contextService.getContextValue(FOCUSING_DOC) || contextService.getContextValue(EDITOR_ACTIVATED))
|
|
31515
31363
|
};
|
|
31516
31364
|
|
|
31517
|
-
|
|
31518
|
-
//#region src/shortcuts/heading.shortcut.ts
|
|
31365
|
+
// src/shortcuts/heading.shortcut.ts
|
|
31519
31366
|
function headingShortcut(id, key) {
|
|
31520
31367
|
const binding = key | MetaKeys.CTRL_COMMAND | MetaKeys.ALT;
|
|
31521
31368
|
return {
|
|
@@ -31534,8 +31381,7 @@ const H3HeadingShortcut = headingShortcut(H3HeadingCommand.id, KeyCode.Digit3);
|
|
|
31534
31381
|
const H4HeadingShortcut = headingShortcut(H4HeadingCommand.id, KeyCode.Digit4);
|
|
31535
31382
|
const H5HeadingShortcut = headingShortcut(H5HeadingCommand.id, KeyCode.Digit5);
|
|
31536
31383
|
|
|
31537
|
-
|
|
31538
|
-
//#region src/plugin.ts
|
|
31384
|
+
// src/plugin.ts
|
|
31539
31385
|
let UniverDocsUIPlugin = class UniverDocsUIPlugin extends Plugin {
|
|
31540
31386
|
constructor(_config = defaultPluginConfig, _injector, _renderManagerSrv, _commandService, _configService) {
|
|
31541
31387
|
super();
|
|
@@ -31812,8 +31658,7 @@ UniverDocsUIPlugin = __decorate([
|
|
|
31812
31658
|
__decorateParam(4, IConfigService)
|
|
31813
31659
|
], UniverDocsUIPlugin);
|
|
31814
31660
|
|
|
31815
|
-
|
|
31816
|
-
//#region src/services/clipboard/rtf-to-plain-text.ts
|
|
31661
|
+
// src/services/clipboard/rtf-to-plain-text.ts
|
|
31817
31662
|
/**
|
|
31818
31663
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
31819
31664
|
*
|
|
@@ -31973,8 +31818,7 @@ function decodeWindows1252(code) {
|
|
|
31973
31818
|
}[code] ?? String.fromCharCode(code);
|
|
31974
31819
|
}
|
|
31975
31820
|
|
|
31976
|
-
|
|
31977
|
-
//#region src/views/mobile-rich-text-toolbar/MobileRichTextToolbar.tsx
|
|
31821
|
+
// src/views/mobile-rich-text-toolbar/MobileRichTextToolbar.tsx
|
|
31978
31822
|
const COLOR_TOKENS = [
|
|
31979
31823
|
"gray.900",
|
|
31980
31824
|
"red.500",
|
|
@@ -32170,8 +32014,7 @@ function FormatButton(props) {
|
|
|
32170
32014
|
});
|
|
32171
32015
|
}
|
|
32172
32016
|
|
|
32173
|
-
|
|
32174
|
-
//#region src/views/rich-text-editor/hooks/editor-undo-redo-keyboard.ts
|
|
32017
|
+
// src/views/rich-text-editor/hooks/editor-undo-redo-keyboard.ts
|
|
32175
32018
|
function isSheetFormulaEditor(editorUnitId, univerInstanceService) {
|
|
32176
32019
|
var _documentModel$getBod;
|
|
32177
32020
|
if (editorUnitId !== DOCS_NORMAL_EDITOR_UNIT_ID_KEY && editorUnitId !== DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY) return false;
|
|
@@ -32251,8 +32094,7 @@ function createEditorUndoRedoKeyboardConfig(options) {
|
|
|
32251
32094
|
};
|
|
32252
32095
|
}
|
|
32253
32096
|
|
|
32254
|
-
|
|
32255
|
-
//#region src/views/rich-text-editor/hooks/use-editor.ts
|
|
32097
|
+
// src/views/rich-text-editor/hooks/use-editor.ts
|
|
32256
32098
|
function useEditor(opts) {
|
|
32257
32099
|
const { autoFocus: _autoFocus, cancelDefaultResizeListener, canvasStyle, container, disableBackScroll, documentLayoutSize, emitSelectionWhileDragging, editorId, initialValue, isSingle, pixelRatio, preserveHostFocus, renderConfig } = opts;
|
|
32258
32100
|
const autoFocus = useMemo(() => _autoFocus ?? false, []);
|
|
@@ -32318,8 +32160,7 @@ function useEditor(opts) {
|
|
|
32318
32160
|
return editor;
|
|
32319
32161
|
}
|
|
32320
32162
|
|
|
32321
|
-
|
|
32322
|
-
//#region src/views/rich-text-editor/hooks/use-editor-click-outside.ts
|
|
32163
|
+
// src/views/rich-text-editor/hooks/use-editor-click-outside.ts
|
|
32323
32164
|
const useEditorClickOutside = (editorId, containerRef, onClickOutside) => {
|
|
32324
32165
|
const editorService = useDependency(IEditorService);
|
|
32325
32166
|
useEffect(() => {
|
|
@@ -32344,8 +32185,7 @@ const useEditorClickOutside = (editorId, containerRef, onClickOutside) => {
|
|
|
32344
32185
|
]);
|
|
32345
32186
|
};
|
|
32346
32187
|
|
|
32347
|
-
|
|
32348
|
-
//#region src/views/rich-text-editor/hooks/use-is-focusing.ts
|
|
32188
|
+
// src/views/rich-text-editor/hooks/use-is-focusing.ts
|
|
32349
32189
|
/**
|
|
32350
32190
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
32351
32191
|
*
|
|
@@ -32368,8 +32208,7 @@ function useIsFocusing(editorId) {
|
|
|
32368
32208
|
return Boolean(((docSelectionRenderService === null || docSelectionRenderService === void 0 ? void 0 : docSelectionRenderService.isFocusing) ?? false) && (selections === null || selections === void 0 ? void 0 : selections.textRanges.some((r) => r.collapsed)));
|
|
32369
32209
|
}
|
|
32370
32210
|
|
|
32371
|
-
|
|
32372
|
-
//#region src/views/rich-text-editor/hooks/use-keyboard-event.ts
|
|
32211
|
+
// src/views/rich-text-editor/hooks/use-keyboard-event.ts
|
|
32373
32212
|
function useKeyboardEvent(isNeed, config, editor) {
|
|
32374
32213
|
const commandService = useDependency(ICommandService);
|
|
32375
32214
|
const shortcutService = useDependency(IShortcutService);
|
|
@@ -32417,8 +32256,7 @@ function useKeyboardEvent(isNeed, config, editor) {
|
|
|
32417
32256
|
]);
|
|
32418
32257
|
}
|
|
32419
32258
|
|
|
32420
|
-
|
|
32421
|
-
//#region src/views/rich-text-editor/hooks/use-left-and-right-arrow.ts
|
|
32259
|
+
// src/views/rich-text-editor/hooks/use-left-and-right-arrow.ts
|
|
32422
32260
|
const useLeftAndRightArrow = (isNeed, selectingMode, editor, onMoveInEditor) => {
|
|
32423
32261
|
const commandService = useDependency(ICommandService);
|
|
32424
32262
|
const shortcutService = useDependency(IShortcutService);
|
|
@@ -32498,8 +32336,7 @@ const useLeftAndRightArrow = (isNeed, selectingMode, editor, onMoveInEditor) =>
|
|
|
32498
32336
|
]);
|
|
32499
32337
|
};
|
|
32500
32338
|
|
|
32501
|
-
|
|
32502
|
-
//#region src/views/rich-text-editor/hooks/use-on-change.ts
|
|
32339
|
+
// src/views/rich-text-editor/hooks/use-on-change.ts
|
|
32503
32340
|
function useOnChange(editor, onChange) {
|
|
32504
32341
|
const commandService = useDependency(ICommandService);
|
|
32505
32342
|
useEffect(() => {
|
|
@@ -32522,8 +32359,7 @@ function useOnChange(editor, onChange) {
|
|
|
32522
32359
|
]);
|
|
32523
32360
|
}
|
|
32524
32361
|
|
|
32525
|
-
|
|
32526
|
-
//#region src/views/rich-text-editor/hooks/use-resize.ts
|
|
32362
|
+
// src/views/rich-text-editor/hooks/use-resize.ts
|
|
32527
32363
|
function resizeEditor(editor, isSingle, layoutSize, pixelRatio, documentLayoutSize) {
|
|
32528
32364
|
var _editor$render$compon;
|
|
32529
32365
|
if (editor.render.isDisposed()) return;
|
|
@@ -32682,8 +32518,7 @@ const useResize = (editor, isSingle = true, autoScrollbar, autoScroll, layoutSiz
|
|
|
32682
32518
|
};
|
|
32683
32519
|
};
|
|
32684
32520
|
|
|
32685
|
-
|
|
32686
|
-
//#region src/views/RichTextEditor.tsx
|
|
32521
|
+
// src/views/RichTextEditor.tsx
|
|
32687
32522
|
const RichTextEditor = (props) => {
|
|
32688
32523
|
const { className, autoFocus, onFocusChange: _onFocusChange, initialValue, onClickOutside: _onClickOutside, preserveHostFocus, cancelDefaultResizeListener, documentLayoutSize, autoScroll = true, autoScrollbar = true, emitSelectionWhileDragging, keyboardEventsOnSelection = false, keyboardEventConfig, layoutSize, pixelRatio, moveCursor = true, style, isSingle, editorId: propsEditorId, onHeightChange, onChange: _onChange, defaultHeight = 32, maxHeight = 32, icon, editorRef, placeholder, noStyle, canvasStyle, renderConfig } = props;
|
|
32689
32524
|
const commandService = useDependency(ICommandService);
|
|
@@ -32800,8 +32635,7 @@ const RichTextEditor = (props) => {
|
|
|
32800
32635
|
});
|
|
32801
32636
|
};
|
|
32802
32637
|
|
|
32803
|
-
|
|
32804
|
-
//#region src/views/mobile-rich-text-editor/MobileRichTextEditor.tsx
|
|
32638
|
+
// src/views/mobile-rich-text-editor/MobileRichTextEditor.tsx
|
|
32805
32639
|
/** Compact object text input; expanding keeps the same document editor mounted. */
|
|
32806
32640
|
function MobileRichTextEditor(props) {
|
|
32807
32641
|
var _props$canvasStyle;
|
|
@@ -32915,5 +32749,4 @@ function MobileRichTextEditor(props) {
|
|
|
32915
32749
|
});
|
|
32916
32750
|
}
|
|
32917
32751
|
|
|
32918
|
-
//#endregion
|
|
32919
32752
|
export { AfterSpaceCommand, AlignCenterCommand, AlignJustifyCommand, AlignLeftCommand, AlignMenuItemFactory, AlignOperationCommand, AlignRightCommand, BackgroundColorSelectorMenuItemFactory, BoldMenuItemFactory, BreakLineCommand, BulletListCommand, BulletListTypePicker, ChangeListNestingLevelCommand, ChangeListNestingLevelType, ChangeListTypeCommand, CheckListCommand, CoverContentCommand, CreateDocTableCommand, CutContentCommand, DEFAULT_DOC_FIT_TO_WIDTH_OPTIONS, DOCS_COMPONENT_BACKGROUND_LAYER_INDEX, DOCS_COMPONENT_DEFAULT_Z_INDEX, DOCS_COMPONENT_HEADER_LAYER_INDEX, DOCS_COMPONENT_MAIN_LAYER_INDEX, DOCS_UI_PLUGIN_CONFIG_KEY, DOCS_VIEW_KEY, DOC_CONTENT_INSERT_MENU_ID, DOC_CUSTOM_RANGE_CHROME_BACKGROUND_ALPHA, DOC_CUSTOM_RANGE_CHROME_RADIUS, DOC_EMBED_INTERACTION_BOUNDARY_OWNER_ATTRIBUTE, DOC_PARAGRAPH_T_ALIGN_MENU_ID, DOC_PARAGRAPH_T_COLORS_MENU_ID, DOC_PARAGRAPH_T_DIVIDER_MENU_ID, DOC_PARAGRAPH_T_EDIT_MENU_ID, DOC_PARAGRAPH_T_INSERT_BELOW_MENU_ID, DOC_PARAGRAPH_T_INSERT_MENU_ID, DOC_TABLE_BLOCK_MENU_ID, DOC_VERTICAL_PADDING, DeleteCurrentParagraphCommand, DeleteCustomBlockCommand, DeleteLeftCommand, DeleteRightCommand, DocAutoFormatService, DocBackScrollRenderController, DocCanvasPopManagerService, DocClipboardPasteAdapterService, DocContextualRibbonService, DocCopyCommand, DocCreateTableOperation, DocCutCommand, DocEventManagerService, DocFloatMenuService, DocHtmlExportService, DocIMEInputManagerService, DocLayoutInteractionService, DocMobileElementMenuService, DocPageLayoutService, DocParagraphMenuService, DocParagraphPlaceholderRenderController, DocPasteCommand, DocPrintInterceptorService, DocRenderController, DocSelectAllCommand, DocSelectionRenderService, DocTableDeleteColumnsCommand, DocTableDeleteRowsCommand, DocTableDeleteTableCommand, DocTableInsertColumnCommand, DocTableInsertColumnLeftCommand, DocTableInsertColumnRightCommand, DocTableInsertRowAboveCommand, DocTableInsertRowBellowCommand, DocTableInsertRowCommand, DocTableTabCommand, DocUIController, DocViewScaleService, DocsRenderService, menuSchema as DocsUIMenuSchema, EMPTY_PARAGRAPH_MENU_ID, Editor, EditorColorPicker, EditorService, EnterCommand, FLOAT_TEXT_STYLE_MENU_ID, FLOAT_TOOLBAR_MENU_POSITION, FloatTextStyleMenuItemFactory, FontFamilySelectorMenuItemFactory, FontSizeSelectorMenuItemFactory, HorizontalLineCommand, IDocClipboardPasteAdapterService, IDocClipboardService, IDocEmbedInteractionBoundaryService, IDocEmbedRuntimeFocusCoordinator, IEditorService, IMEInputCommand, INSERT_BELLOW_MENU_ID, InnerPasteCommand, InsertCustomRangeCommand, ItalicMenuItemFactory, ListOperationCommand, MOBILE_DOC_ELEMENT_MENU, MergeTwoParagraphCommand, MobileDocElementMenu, MobileRichTextEditor, MobileRichTextToolbar, MoveCursorOperation, MoveDocBlockCommand, MoveSelectionOperation, NORMAL_TEXT_SELECTION_PLUGIN_NAME, NodePositionConvertToCursor, NodePositionConvertToRectRange, OrderListCommand, OrderListTypePicker, ParagraphMenuInsertBelowSubmenuItemFactory, ParagraphSettingMenuFactory, LarkPastePlugin as PastePluginLark, UniverPastePlugin as PastePluginUniver, WordPastePlugin as PastePluginWord, QuickListCommand, RectRange, ReplaceSelectionCommand, ReplaceSnapshotCommand, ReplaceTextRunsCommand, ResetInlineFormatTextBackgroundColorCommand, ResetInlineFormatTextColorCommand, RichTextEditor, SetDocInputStyleCommand, SetDocZoomRatioCommand, SetDocZoomRatioOperation, SetInlineFormatBoldCommand, SetInlineFormatCommand, SetInlineFormatFontFamilyCommand, SetInlineFormatFontSizeCommand, SetInlineFormatItalicCommand, SetInlineFormatStrikethroughCommand, SetInlineFormatSubscriptCommand, SetInlineFormatSuperscriptCommand, SetInlineFormatTextBackgroundColorCommand, SetInlineFormatTextColorCommand, SetInlineFormatTextFillCommand, SetInlineFormatUnderlineCommand, SetParagraphNamedStyleCommand, StrikeThroughMenuItemFactory, SwitchDocModeCommand, TEXT_RANGE_LAYER_INDEX, TabCommand, TextColorSelectorMenuItemFactory, TextRange, ToggleCheckListCommand, UnderlineMenuItemFactory, UniverDocsMobileUIPlugin, UniverDocsUIPlugin, VIEWPORT_KEY, addCustomDecorationBySelectionFactory, addCustomDecorationFactory, buildMoveDocBlockActions, calcDocFitToWidthScale, calcDocRangePositions, captureTextFormat, collectDocsTableLikeEmbedChildUnitIds, convertBodyToHtml, convertClipboardHtmlToDocumentData, convertClipboardRtfToPlainText, convertPositionsToRectRanges, createDefaultDocsTableLikeCustomBlockBleedViewport, createDocsCustomBlockSizeRefreshScheduler, createEditorUndoRedoKeyboardConfig, deleteCustomDecorationFactory, disableMenuWhenHeaderFooterEditing, disableMenuWithoutDocumentUnitPermission, drawDocCustomRangeChrome, executeEditorUndoRedoCommand, findDocRangeNodePositions, genTableSource, generateParagraphs, getAnchorBounding, getCanvasOffsetByEngine, getCommandSkeleton, getCursorWhenDelete, getCutActionsFromDocRanges, getDocBlockRangeMenuId, getDocObjectById, getEditorRuntimeConfig, getEmptyTableCell, getEmptyTableRow, getLineBounding, getListMarkerFallbackBound, getListParagraphContextMenuHit, getOneTextSelectionRange, getStyleInTextRange, getTableColumn, getTextRangeFromCharIndex, hasParagraphInTable, hideMenuWhenSelectionInBlockRange, isInSameTableCell, isTextRangeInAnyBlockRange, isValidRectRange, neoGetDocObject, normalizeDocFitToWidthOptions, registerEditorRuntimeConfig, removeClipboardHtmlImages, resolveDocCustomRangeChromeTheme, resolveDocFitBaseWidth, resolveDocViewScale, resolveDocsCustomBlockRenderViewport, resolveDocsTableLikeCustomBlockBleedViewport, resolveDocsTableLikeCustomBlockContentHeight, resolveDocsTableLikeCustomBlockContentWidth, scrollDocsTableLikeCustomBlockLive, shouldRefreshDocsCustomBlockSizeForCommand, useEditor, useEditorClickOutside, useIsFocusing, useKeyboardEvent, useLeftAndRightArrow, useOnChange, useResize, whenDocAndEditorFocused };
|