@univerjs-pro/boards-ui 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/cjs/shape-preset-labels-C4G0G9GI.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/es/shape-preset-labels-092BdVw3.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/shape-preset-labels-092BdVw3.js +1 -1
- package/lib/types/common/settings-actions.d.ts +26 -0
- package/lib/types/controllers/board-mermaid-import.controller.d.ts +9 -0
- package/lib/types/controllers/board-shape-hyper-link.render-controller.d.ts +10 -0
- package/lib/types/render-objects/board-document-text-render.util.d.ts +2 -0
- package/lib/types/render-objects/board-shape-object.d.ts +1 -0
- package/lib/types/services/board-mermaid-import.service.d.ts +82 -0
- package/lib/types/services/board-settings-action.service.d.ts +21 -0
- package/lib/types/utils/board-draft-insert-position.util.d.ts +13 -0
- package/lib/types/utils/board-mermaid-preview.util.d.ts +4 -0
- package/lib/types/views/BoardContainerRenamePopup.d.ts +7 -0
- package/lib/types/views/BoardMermaidImportDialog.d.ts +2 -0
- package/lib/types/views/BoardSwimlaneLaneRenamePopup.d.ts +7 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- 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 +18 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x2cc5(){const _0x4ea157=['Sound\x20button','Alternate\x20process','Back\x20or\x20previous\x20button','1864048EyIVwn','Bevel','Heptagon','Multiply','Four-way\x20arrow','Funnel','Divide','Border\x20callout\x201','Offline\x20storage','Display','Decagon','Cube','Accent\x20callout\x202','Sort','Accent\x20callout\x203','Ribbon','Curved\x20right\x20arrow','Predefined\x20process','Left-right-up\x20arrow','Minus','Chart\x20X','4-point\x20star','Summing\x20junction','Magnetic\x20drum','Callout\x201','Preparation','32-point\x20star','Half\x20frame','Forward\x20or\x20next\x20button','Curved\x20down\x20arrow','Border\x20callout\x203','Document','Teardrop','40240JhTuJF','Information\x20button','Gear\x206','Four-way\x20arrow\x20callout','Online\x20storage','Punched\x20card','Beginning\x20button','Heart','Left-up\x20arrow','Manual\x20operation','Vertical\x20scroll','Pie','Magnetic\x20tape','Up\x20arrow\x20callout','Accent\x20border\x20callout\x201','Callout\x203','U-turn\x20arrow','Off-page\x20connector','Inverse\x20line','Folded\x20corner','No\x20symbol','Chart\x20plus','Equal','Swoosh\x20arrow','Same-side\x20snip\x20corner\x20rectangle','3tRTRHR','Chord','Manual\x20input','Down\x20arrow','Frame','Snip\x20and\x20round\x20corner\x20rectangle','2871702MSFSjA','822aFcTyt','Pie\x20wedge','Internal\x20storage','Ellipse\x20ribbon','Process','Home\x20button','Right\x20arrow\x20callout','End\x20button','Terminator','Extract','281008tFyJrO','Corner','Explosion\x201','Curved\x20up\x20arrow','Left\x20circular\x20arrow','Donut','Decision','Dodecagon','Blank\x20button','Diagonal\x20stripe','Bracket\x20pair','Up\x20arrow','8-point\x20star','Double\x20wave','Down\x20arrow\x20callout','Corner\x20tabs','Diagonal\x20snip\x20corner\x20rectangle','Left-right\x20circular\x20arrow','Arc','Left\x20arrow\x20callout','Merge','24-point\x20star','6-point\x20star','979794YjxAVK','Brace\x20pair','Wave','7-point\x20star','Ellipse\x20ribbon\x202','11289654nAypfm','12-point\x20star','5257124aBjbGB','Explosion\x202'];_0x2cc5=function(){return _0x4ea157;};return _0x2cc5();}const _0x35ac52=_0x230d;(function(_0x5c76ba,_0x400cc9){const _0x457f91=_0x230d,_0x3b5939=_0x5c76ba();while(!![]){try{const _0x2ebf88=parseInt(_0x457f91(0x18b))/0x1+parseInt(_0x457f91(0x169))/0x2*(parseInt(_0x457f91(0x163))/0x3)+-parseInt(_0x457f91(0x124))/0x4+-parseInt(_0x457f91(0x14a))/0x5*(parseInt(_0x457f91(0x16a))/0x6)+-parseInt(_0x457f91(0x174))/0x7+-parseInt(_0x457f91(0x129))/0x8+parseInt(_0x457f91(0x122))/0x9;if(_0x2ebf88===_0x400cc9)break;else _0x3b5939['push'](_0x3b5939['shift']());}catch(_0x3d81ca){_0x3b5939['push'](_0x3b5939['shift']());}}}(_0x2cc5,0xef44c));const e={'snip1Rect':'Single\x20snip\x20corner\x20rectangle','snip2SameRect':_0x35ac52(0x162),'snip2DiagRect':_0x35ac52(0x184),'snipRoundRect':_0x35ac52(0x168),'round1Rect':'Single\x20round\x20corner\x20rectangle','round2SameRect':'Same-side\x20round\x20corner\x20rectangle','round2DiagRect':'Diagonal\x20round\x20corner\x20rectangle','heptagon':_0x35ac52(0x12b),'decagon':_0x35ac52(0x133),'dodecagon':_0x35ac52(0x17b),'pie':_0x35ac52(0x155),'chord':_0x35ac52(0x164),'teardrop':_0x35ac52(0x149),'frame':_0x35ac52(0x167),'halfFrame':_0x35ac52(0x144),'corner':_0x35ac52(0x175),'diagStripe':_0x35ac52(0x17d),'plaque':'Plaque','cube':_0x35ac52(0x134),'bevel':_0x35ac52(0x12a),'donut':_0x35ac52(0x179),'noSmoking':_0x35ac52(0x15e),'blockArc':'Block\x20arc','foldedCorner':_0x35ac52(0x15d),'smileyFace':'Smiley\x20face','heart':_0x35ac52(0x151),'lightningBolt':'Lightning\x20bolt','sun':'Sun','moon':'Moon','arc':_0x35ac52(0x186),'bracketPair':_0x35ac52(0x17e),'bracePair':_0x35ac52(0x18c),'leftBracket':'Left\x20bracket','rightBracket':'Right\x20bracket','upArrow':_0x35ac52(0x17f),'downArrow':_0x35ac52(0x166),'upDownArrow':'Up-down\x20arrow','quadArrow':_0x35ac52(0x12d),'leftRightUpArrow':_0x35ac52(0x13b),'bentArrow':'Bent\x20arrow','uturnArrow':_0x35ac52(0x15a),'leftUpArrow':_0x35ac52(0x152),'bentUpArrow':'Bent-up\x20arrow','curvedRightArrow':_0x35ac52(0x139),'curvedLeftArrow':'Curved\x20left\x20arrow','curvedUpArrow':_0x35ac52(0x177),'curvedDownArrow':_0x35ac52(0x146),'stripedRightArrow':'Striped\x20right\x20arrow','notchedRightArrow':'Notched\x20right\x20arrow','rightArrowCallout':_0x35ac52(0x170),'downArrowCallout':_0x35ac52(0x182),'leftArrowCallout':_0x35ac52(0x187),'upArrowCallout':_0x35ac52(0x157),'leftRightArrowCallout':'Left-right\x20arrow\x20callout','quadArrowCallout':_0x35ac52(0x14d),'circularArrow':'Circular\x20arrow','mathMinus':_0x35ac52(0x13c),'mathMultiply':_0x35ac52(0x12c),'mathDivide':_0x35ac52(0x12f),'mathEqual':_0x35ac52(0x160),'mathNotEqual':'Not\x20equal','flowChartProcess':_0x35ac52(0x16e),'flowChartAlternateProcess':_0x35ac52(0x127),'flowChartDecision':_0x35ac52(0x17a),'flowChartInputOutput':'Input/output','flowChartPredefinedProcess':_0x35ac52(0x13a),'flowChartInternalStorage':_0x35ac52(0x16c),'flowChartDocument':_0x35ac52(0x148),'flowChartMultidocument':'Multiple\x20documents','flowChartTerminator':_0x35ac52(0x172),'flowChartPreparation':_0x35ac52(0x142),'flowChartManualInput':_0x35ac52(0x165),'flowChartManualOperation':_0x35ac52(0x153),'flowChartConnector':'Connector','flowChartOffpageConnector':_0x35ac52(0x15b),'flowChartPunchedCard':_0x35ac52(0x14f),'flowChartPunchedTape':'Punched\x20tape','flowChartSummingJunction':_0x35ac52(0x13f),'flowChartOr':'Or','flowChartCollate':'Collate','flowChartSort':_0x35ac52(0x136),'flowChartExtract':_0x35ac52(0x173),'flowChartMerge':_0x35ac52(0x188),'flowChartOnlineStorage':_0x35ac52(0x14e),'flowChartDelay':'Delay','flowChartMagneticTape':_0x35ac52(0x156),'flowChartMagneticDisk':'Magnetic\x20disk','flowChartMagneticDrum':_0x35ac52(0x140),'flowChartDisplay':_0x35ac52(0x132),'irregularSeal1':_0x35ac52(0x176),'irregularSeal2':_0x35ac52(0x125),'star4':_0x35ac52(0x13e),'star6':_0x35ac52(0x18a),'star7':_0x35ac52(0x120),'star8':_0x35ac52(0x180),'star10':'10-point\x20star','star12':_0x35ac52(0x123),'star16':'16-point\x20star','star24':_0x35ac52(0x189),'star32':_0x35ac52(0x143),'ribbon2':'Ribbon\x202','ribbon':_0x35ac52(0x138),'ellipseRibbon2':_0x35ac52(0x121),'ellipseRibbon':_0x35ac52(0x16d),'verticalScroll':_0x35ac52(0x154),'horizontalScroll':'Horizontal\x20scroll','wave':_0x35ac52(0x11f),'doubleWave':_0x35ac52(0x181),'wedgeRectCallout':'Rectangular\x20callout','cloudCallout':'Cloud\x20callout','borderCallout1':_0x35ac52(0x130),'borderCallout2':'Border\x20callout\x202','borderCallout3':_0x35ac52(0x147),'accentCallout1':'Accent\x20callout\x201','accentCallout2':_0x35ac52(0x135),'accentCallout3':_0x35ac52(0x137),'callout1':_0x35ac52(0x141),'callout2':'Callout\x202','callout3':_0x35ac52(0x159),'accentBorderCallout1':_0x35ac52(0x158),'accentBorderCallout2':'Accent\x20border\x20callout\x202','accentBorderCallout3':'Accent\x20border\x20callout\x203','leftCircularArrow':_0x35ac52(0x178),'leftRightCircularArrow':_0x35ac52(0x185),'swooshArrow':_0x35ac52(0x161),'leftRightRibbon':'Left-right\x20ribbon','pieWedge':_0x35ac52(0x16b),'funnel':_0x35ac52(0x12e),'gear6':_0x35ac52(0x14c),'gear9':'Gear\x209','cornerTabs':_0x35ac52(0x183),'actionButtonBackPrevious':_0x35ac52(0x128),'actionButtonForwardNext':_0x35ac52(0x145),'actionButtonBeginning':_0x35ac52(0x150),'actionButtonEnd':_0x35ac52(0x171),'actionButtonHome':_0x35ac52(0x16f),'actionButtonInformation':_0x35ac52(0x14b),'actionButtonReturn':'Return\x20button','actionButtonMovie':'Movie\x20button','actionButtonDocument':'Document\x20button','actionButtonSound':_0x35ac52(0x126),'actionButtonHelp':'Help\x20button','actionButtonBlank':_0x35ac52(0x17c),'chartPlus':_0x35ac52(0x15f),'chartStar':'Chart\x20star','chartX':_0x35ac52(0x13d),'flowChartOfflineStorage':_0x35ac52(0x131),'lineInv':_0x35ac52(0x15c),'plaqueTabs':'Plaque\x20tabs','squareTabs':'Square\x20tabs','upDownArrowCallout':'Up-down\x20arrow\x20callout'};function _0x230d(_0x1011e3,_0x3c1ef1){_0x1011e3=_0x1011e3-0x11f;const _0x2cc580=_0x2cc5();let _0x230d06=_0x2cc580[_0x1011e3];return _0x230d06;}export{e as t};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { IUniverBoardsUIConfig } from '../config/config';
|
|
3
|
+
import type { LocaleKey } from '../locale/types';
|
|
4
|
+
export declare const BoardSettingsActionType: {
|
|
5
|
+
readonly Translate: "translate";
|
|
6
|
+
readonly Import: "import";
|
|
7
|
+
readonly Export: "export";
|
|
8
|
+
};
|
|
9
|
+
export type BoardSettingsActionType = typeof BoardSettingsActionType[keyof typeof BoardSettingsActionType];
|
|
10
|
+
export type BoardSettingsActionConfig = boolean | {
|
|
11
|
+
enabled?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export interface IBoardSettingsActionDefinition {
|
|
14
|
+
type: BoardSettingsActionType;
|
|
15
|
+
labelKey: LocaleKey;
|
|
16
|
+
icon: ComponentType<{
|
|
17
|
+
className?: string;
|
|
18
|
+
}>;
|
|
19
|
+
iconClassName?: string;
|
|
20
|
+
enabledByDefault: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface IResolvedBoardSettingsAction extends Omit<IBoardSettingsActionDefinition, 'enabledByDefault'> {
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const BOARD_SETTINGS_ACTION_DEFINITIONS: IBoardSettingsActionDefinition[];
|
|
26
|
+
export declare function resolveBoardSettingsActions(config?: Pick<IUniverBoardsUIConfig, 'settingsMenu'>): IResolvedBoardSettingsAction[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IBoardImportAdapterService } from '@univerjs-pro/boards';
|
|
2
|
+
import { Disposable } from '@univerjs/core';
|
|
3
|
+
import { IBoardMermaidImportService } from '../services/board-mermaid-import.service';
|
|
4
|
+
export declare class BoardMermaidImportController extends Disposable {
|
|
5
|
+
private readonly _importAdapterService;
|
|
6
|
+
private readonly _mermaidImportService;
|
|
7
|
+
constructor(_importAdapterService: IBoardImportAdapterService, _mermaidImportService: IBoardMermaidImportService);
|
|
8
|
+
private _initAdapter;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BoardModel } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
|
+
import { ShapeTextHyperLinkHoverController, ShapeTextHyperLinkPopupService } from '@univerjs-pro/shape-editor-ui';
|
|
4
|
+
import { IPermissionService } from '@univerjs/core';
|
|
5
|
+
import { BoardCanvasPopManagerService } from '../services/board-canvas-pop-manager.service';
|
|
6
|
+
import { BoardTextEditingService } from '../services/board-text-editing.service';
|
|
7
|
+
import { IBoardUIStateService } from '../services/board-ui-state.service';
|
|
8
|
+
export declare class BoardShapeHyperLinkRenderController extends ShapeTextHyperLinkHoverController implements IRenderModule {
|
|
9
|
+
constructor(context: IRenderContext<BoardModel>, popupService: ShapeTextHyperLinkPopupService, editingService: BoardTextEditingService, popupManager: BoardCanvasPopManagerService, uiState: IBoardUIStateService, permissionService: IPermissionService);
|
|
10
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IShapeTextHyperLinkRegion } from '@univerjs-pro/shape-editor-ui';
|
|
1
2
|
import type { BooleanNumber, HorizontalAlign, IDisposable, IDocumentData, LocaleService } from '@univerjs/core';
|
|
2
3
|
import type { UniverRenderingContext } from '@univerjs/engine-render';
|
|
3
4
|
import type { Observable } from 'rxjs';
|
|
@@ -52,6 +53,7 @@ export interface IBoardDocumentTextRenderResources {
|
|
|
52
53
|
width: number;
|
|
53
54
|
}
|
|
54
55
|
export interface IBoardDocumentTextRenderCache {
|
|
56
|
+
hyperLinkRegions?: IShapeTextHyperLinkRegion[];
|
|
55
57
|
signature?: string;
|
|
56
58
|
resources?: IBoardDocumentTextRenderResources;
|
|
57
59
|
}
|
|
@@ -56,6 +56,7 @@ export declare class BoardShapeObject extends Shape<IBoardShapeObjectProps> {
|
|
|
56
56
|
constructor(key: string, config: IBoardShapeObjectProps);
|
|
57
57
|
updateElement(element: IBoardShapeElement): void;
|
|
58
58
|
private _refreshTitleColors;
|
|
59
|
+
resolveHyperLinkAt(coord: Vector2): import("@univerjs-pro/shape-editor-ui/utils/shape-text-hyper-link-hit.js").IShapeTextHyperLinkHit | null;
|
|
59
60
|
getElement(): IBoardShapeElement;
|
|
60
61
|
getShapeModel(): ShapeModel;
|
|
61
62
|
setFormulaPresentation(presentation: IShapeFormulaPresentation | undefined, animate?: boolean): void;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type * as WendellhuRediTypes from "@wendellhu/redi";
|
|
2
|
+
import type { IBoardImportDiagnostic, IBoardImportDraft } from '@univerjs-pro/boards';
|
|
3
|
+
import type { IDisposable } from '@univerjs/core';
|
|
4
|
+
import type { Observable } from 'rxjs';
|
|
5
|
+
import { IBoardElementService } from '@univerjs-pro/boards';
|
|
6
|
+
import { IExchangeService } from '@univerjs-pro/exchange-client';
|
|
7
|
+
import { ICommandService, LocaleService } from '@univerjs/core';
|
|
8
|
+
import { IBoardElementStateService } from './board-element-state.service';
|
|
9
|
+
import { IBoardUIStateService } from './board-ui-state.service';
|
|
10
|
+
export declare const BOARD_MERMAID_IMPORT_SOURCE_TYPE = "mermaid";
|
|
11
|
+
export declare const BoardMermaidImportErrorKey: {
|
|
12
|
+
readonly ExchangeUnavailable: "boards-ui.mermaidImport.errors.exchangeUnavailable";
|
|
13
|
+
readonly EmptyCode: "boards-ui.mermaidImport.errors.emptyCode";
|
|
14
|
+
readonly InvalidDraft: "boards-ui.mermaidImport.errors.invalidDraft";
|
|
15
|
+
readonly InsertFailed: "boards-ui.mermaidImport.errors.insertFailed";
|
|
16
|
+
};
|
|
17
|
+
export type BoardMermaidImportErrorKey = typeof BoardMermaidImportErrorKey[keyof typeof BoardMermaidImportErrorKey];
|
|
18
|
+
export declare const MERMAID_CODE_SAMPLES: Record<string, string>;
|
|
19
|
+
export declare const DEFAULT_MERMAID_CODE: string;
|
|
20
|
+
export interface IBoardMermaidImportContext {
|
|
21
|
+
unitId: string;
|
|
22
|
+
subUnitId: string;
|
|
23
|
+
}
|
|
24
|
+
export interface IBoardMermaidImportState extends IBoardMermaidImportContext {
|
|
25
|
+
open: boolean;
|
|
26
|
+
code: string;
|
|
27
|
+
containerName: string;
|
|
28
|
+
diagramType: string;
|
|
29
|
+
converting: boolean;
|
|
30
|
+
inserting: boolean;
|
|
31
|
+
draft: IBoardImportDraft | null;
|
|
32
|
+
diagnostics: IBoardImportDiagnostic[];
|
|
33
|
+
error: IBoardMermaidImportError | null;
|
|
34
|
+
}
|
|
35
|
+
export interface IBoardMermaidConvertOptions {
|
|
36
|
+
diagramType?: string;
|
|
37
|
+
fileName?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface IBoardMermaidInsertOptions {
|
|
40
|
+
containerName?: string;
|
|
41
|
+
selectAfterInsert?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface IBoardMermaidImportError {
|
|
44
|
+
key: BoardMermaidImportErrorKey;
|
|
45
|
+
detail?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface IBoardMermaidImportService {
|
|
48
|
+
readonly state$: Observable<IBoardMermaidImportState>;
|
|
49
|
+
getState(): IBoardMermaidImportState;
|
|
50
|
+
openImport(context: IBoardMermaidImportContext): void;
|
|
51
|
+
close(): void;
|
|
52
|
+
updateCode(code: string): void;
|
|
53
|
+
updateContainerName(containerName: string): void;
|
|
54
|
+
updateDiagramType(diagramType: string): void;
|
|
55
|
+
convertMermaidToBoardDraft(code: string, options?: IBoardMermaidConvertOptions): Promise<IBoardImportDraft>;
|
|
56
|
+
convertCurrentCode(): Promise<IBoardImportDraft | null>;
|
|
57
|
+
insertCurrentDraft(options?: IBoardMermaidInsertOptions): Promise<boolean>;
|
|
58
|
+
}
|
|
59
|
+
export declare const IBoardMermaidImportService: WendellhuRediTypes.IdentifierDecorator<IBoardMermaidImportService>;
|
|
60
|
+
export declare class BoardMermaidImportService implements IBoardMermaidImportService, IDisposable {
|
|
61
|
+
private readonly _boardElementService;
|
|
62
|
+
private readonly _uiStateService;
|
|
63
|
+
private readonly _elementStateService;
|
|
64
|
+
private readonly _localeService;
|
|
65
|
+
private readonly _commandService;
|
|
66
|
+
private readonly _exchangeService?;
|
|
67
|
+
private readonly _state$;
|
|
68
|
+
private _convertRequestId;
|
|
69
|
+
readonly state$: Observable<IBoardMermaidImportState>;
|
|
70
|
+
constructor(_boardElementService: IBoardElementService, _uiStateService: IBoardUIStateService, _elementStateService: IBoardElementStateService, _localeService: LocaleService, _commandService: ICommandService, _exchangeService?: IExchangeService | undefined);
|
|
71
|
+
dispose(): void;
|
|
72
|
+
getState(): IBoardMermaidImportState;
|
|
73
|
+
openImport(context: IBoardMermaidImportContext): void;
|
|
74
|
+
close(): void;
|
|
75
|
+
updateCode(code: string): void;
|
|
76
|
+
updateContainerName(containerName: string): void;
|
|
77
|
+
updateDiagramType(diagramType: string): void;
|
|
78
|
+
convertMermaidToBoardDraft(code: string, options?: IBoardMermaidConvertOptions): Promise<IBoardImportDraft>;
|
|
79
|
+
convertCurrentCode(): Promise<IBoardImportDraft | null>;
|
|
80
|
+
insertCurrentDraft(options?: IBoardMermaidInsertOptions): Promise<boolean>;
|
|
81
|
+
asDisposable(): IDisposable;
|
|
82
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { BoardModel } from '@univerjs-pro/boards';
|
|
2
|
+
import type { IDisposable } from '@univerjs/core';
|
|
3
|
+
import { ICommandService } from '@univerjs/core';
|
|
4
|
+
import { BoardSettingsActionType } from '../common/settings-actions';
|
|
5
|
+
export interface IBoardSettingsActionContext {
|
|
6
|
+
type: BoardSettingsActionType;
|
|
7
|
+
boardModel: BoardModel;
|
|
8
|
+
unitId: string;
|
|
9
|
+
subUnitId: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IBoardSettingsActionAdapter {
|
|
12
|
+
executeAction(context: IBoardSettingsActionContext): boolean | Promise<boolean>;
|
|
13
|
+
}
|
|
14
|
+
export declare class BoardSettingsActionService {
|
|
15
|
+
private readonly _commandService;
|
|
16
|
+
private readonly _adapters;
|
|
17
|
+
constructor(_commandService: ICommandService);
|
|
18
|
+
registerAdapter(adapter: IBoardSettingsActionAdapter): IDisposable;
|
|
19
|
+
executeAction(type: BoardSettingsActionType, boardModel: BoardModel | null | undefined): Promise<boolean>;
|
|
20
|
+
private _executeDefaultAction;
|
|
21
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IBoardDraftInsertRect {
|
|
2
|
+
left: number;
|
|
3
|
+
top: number;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IResolveBoardDraftInsertPositionOptions {
|
|
8
|
+
draftBounds?: Partial<IBoardDraftInsertRect> | null;
|
|
9
|
+
existingRects?: IBoardDraftInsertRect[];
|
|
10
|
+
preferredPosition?: Pick<IBoardDraftInsertRect, 'left' | 'top'>;
|
|
11
|
+
gap?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function resolveBoardDraftInsertPosition(options: IResolveBoardDraftInsertPositionOptions): Pick<IBoardDraftInsertRect, 'left' | 'top'>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IBoardImportDiagnostic, IBoardImportDraft } from '@univerjs-pro/boards';
|
|
2
|
+
export declare const MAX_AUTO_MERMAID_PREVIEW_ELEMENTS = 300;
|
|
3
|
+
export declare function shouldAutoRenderMermaidPreview(draft: IBoardImportDraft | null): boolean;
|
|
4
|
+
export declare function areImportDiagnosticsEqual(left: IBoardImportDiagnostic[], right: IBoardImportDiagnostic[]): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as ReactTypes from "react";
|
|
2
|
+
export interface IBoardContainerRenamePopupProps {
|
|
3
|
+
initialTitle: string;
|
|
4
|
+
onCancel: () => void;
|
|
5
|
+
onSubmit: (title: string) => void | Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export declare function BoardContainerRenamePopup(props: IBoardContainerRenamePopupProps): ReactTypes.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as ReactTypes from "react";
|
|
2
|
+
export interface IBoardSwimlaneLaneRenamePopupProps {
|
|
3
|
+
initialTitle: string;
|
|
4
|
+
onCancel: () => void;
|
|
5
|
+
onSubmit: (title: string) => void | Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export declare function BoardSwimlaneLaneRenamePopup(props: IBoardSwimlaneLaneRenamePopupProps): ReactTypes.JSX.Element;
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x125e(_0x8b9694,_0x51f650){_0x8b9694=_0x8b9694-0x19b;var _0x4f25b6=_0x4f25();var _0x125e4f=_0x4f25b6[_0x8b9694];return _0x125e4f;}(function(_0x2edc7e,_0xe79a21){var _0x1ffbc1=_0x125e,_0x27330d=_0x2edc7e();while(!![]){try{var _0x270f13=-parseInt(_0x1ffbc1(0x1a3))/0x1+parseInt(_0x1ffbc1(0x1a2))/0x2+-parseInt(_0x1ffbc1(0x1ac))/0x3+-parseInt(_0x1ffbc1(0x1a4))/0x4+parseInt(_0x1ffbc1(0x1a1))/0x5*(-parseInt(_0x1ffbc1(0x1b2))/0x6)+-parseInt(_0x1ffbc1(0x1a5))/0x7*(-parseInt(_0x1ffbc1(0x19e))/0x8)+parseInt(_0x1ffbc1(0x1a7))/0x9;if(_0x270f13===_0xe79a21)break;else _0x27330d['push'](_0x27330d['shift']());}catch(_0x949a2f){_0x27330d['push'](_0x27330d['shift']());}}}(_0x4f25,0xb09af),function(_0x2127de,_0x24e098){var _0x2a9074=_0x125e;typeof exports=='object'&&typeof module<'u'?_0x24e098(require('@univerjs-pro/boards-ui'),require('@univerjs-pro/boards/facade'),require('@univerjs/core/facade')):typeof define==_0x2a9074(0x1a0)&&define['amd']?define(['@univerjs-pro/boards-ui',_0x2a9074(0x1ae),'@univerjs/core/facade'],_0x24e098):(_0x2127de=typeof globalThis<'u'?globalThis:_0x2127de||self,_0x24e098(_0x2127de[_0x2a9074(0x1b0)],_0x2127de[_0x2a9074(0x1be)],_0x2127de[_0x2a9074(0x1b5)]));}(this,function(_0x3a1ac7,_0x4a7875,_0x922260){var _0x12b295=_0x125e,_0x1ebe26=class extends _0x4a7875[_0x12b295(0x1bd)]{[_0x12b295(0x1af)](_0x25f58c){var _0x466617=_0x12b295;return this[_0x466617(0x1b1)][_0x466617(0x1aa)](_0x3a1ac7[_0x466617(0x1b9)]['id'],{'unitId':this['id'],'subUnitId':this[_0x466617(0x1b6)][_0x466617(0x1b4)](),'focusPadding':_0x25f58c});}[_0x12b295(0x1b8)](_0x2480d6){var _0x4bda92=_0x12b295;return this['_commandService'][_0x4bda92(0x1ba)](_0x3a1ac7[_0x4bda92(0x1b3)]['id'],{..._0x2480d6,'unitId':this['id'],'subUnitId':this[_0x4bda92(0x1b6)][_0x4bda92(0x1b4)]()});}};_0x4a7875[_0x12b295(0x1bd)]['extend'](_0x1ebe26);var _0x1cdcfb=class extends _0x922260['FEnum']{get[_0x12b295(0x1a8)](){return _0x3a1ac7['BoardInteractionMode'];}};_0x922260['FEnum'][_0x12b295(0x1b7)](_0x1cdcfb);var _0x4f52d9=class extends _0x4a7875['FBoard']{[_0x12b295(0x1c0)](){var _0x3bb668=_0x12b295;return this[_0x3bb668(0x1b1)][_0x3bb668(0x1aa)](_0x3a1ac7[_0x3bb668(0x1ab)]['id'],{'unitId':this['id']});}[_0x12b295(0x1a6)](_0x5c6637){var _0xe0e92b=_0x12b295;return this[_0xe0e92b(0x1b1)][_0xe0e92b(0x1ba)](_0x3a1ac7['SetBoardInteractionModeOperation']['id'],{'unitId':this['id'],'mode':_0x5c6637});}[_0x12b295(0x19c)](){var _0x2991ff=_0x12b295;return this[_0x2991ff(0x1b1)][_0x2991ff(0x1aa)](_0x3a1ac7[_0x2991ff(0x19f)]['id'],{'unitId':this['id']});}['setSettings'](_0x3ab462){var _0x6887a=_0x12b295;return this[_0x6887a(0x1b1)][_0x6887a(0x1aa)](_0x3a1ac7[_0x6887a(0x1bf)]['id'],{'unitId':this['id'],'settings':_0x3ab462});}[_0x12b295(0x1bb)](){var _0x5ca45f=_0x12b295;return this[_0x5ca45f(0x1b1)][_0x5ca45f(0x1aa)](_0x3a1ac7[_0x5ca45f(0x19b)]['id'],{'unitId':this['id']});}['setObjectListPanelOpen'](_0x2489e0){var _0x2924da=_0x12b295;return this[_0x2924da(0x1b1)]['syncExecuteCommand'](_0x3a1ac7[_0x2924da(0x19d)]['id'],{'unitId':this['id'],'open':_0x2489e0});}['findElementsByText'](_0x496ed4){var _0x563034=_0x12b295;return this[_0x563034(0x1b1)][_0x563034(0x1aa)](_0x3a1ac7[_0x563034(0x1ad)]['id'],{'unitId':this['id'],'query':_0x496ed4});}['focusElement'](_0x4d97b6,_0x391d1c){var _0x1dfa84=_0x12b295;return this[_0x1dfa84(0x1b1)][_0x1dfa84(0x1aa)](_0x3a1ac7['FocusBoardElementOperation']['id'],{'unitId':this['id'],'elementId':_0x4d97b6,'viewportPoint':_0x391d1c});}[_0x12b295(0x1a9)](_0x34aac2){var _0xe11282=_0x12b295;return this[_0xe11282(0x1b1)][_0xe11282(0x1aa)](_0x3a1ac7[_0xe11282(0x1bc)]['id'],{'unitId':this['id'],'elementId':_0x34aac2});}};_0x4a7875[_0x12b295(0x1bd)][_0x12b295(0x1b7)](_0x4f52d9);}));function _0x4f25(){var _0x53f840=['getActivePageId','UniverCoreFacade','_boardModel','extend','getScreenshot','AnalyzeBoardRenderedLayoutCommand','executeCommand','getObjectListPanelOpen','GetBoardElementViewportPointOperation','FBoard','UniverProBoardsFacade','SetBoardSettingsOperation','getInteractionMode','GetBoardObjectListPanelOpenOperation','getSettings','SetBoardObjectListPanelOpenOperation','350936roPqFF','GetBoardSettingsOperation','function','3513020yzNzXu','198034NzfnEB','630431XWgqyG','879592IWhfvY','35fEOskK','setInteractionMode','25152966oXsEZl','BoardInteractionMode','getElementViewportPoint','syncExecuteCommand','GetBoardInteractionModeOperation','402642TdeHBj','FindBoardElementsByTextOperation','@univerjs-pro/boards/facade','analyzeRenderedLayout','UniverProBoardsUi','_commandService','12dhNjnW','CaptureBoardScreenshotCommand'];_0x4f25=function(){return _0x53f840;};return _0x4f25();}
|