@univerjs-pro/boards-mind-ui 1.0.0-rc.0 → 1.0.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/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/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/index.css +75 -0
- 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/types/controllers/board-mind-map-insert.render-controller.d.ts +10 -3
- package/lib/types/controllers/board-mind-map-panel.controller.d.ts +1 -3
- package/lib/types/controllers/components.controller.d.ts +2 -2
- package/lib/types/controllers/mobile/board-mind-map-insert.render-controller.d.ts +7 -0
- package/lib/types/controllers/mobile/board-mind-map-panel.controller.d.ts +12 -0
- package/lib/types/controllers/mobile/components.controller.d.ts +7 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/locale/en-US.d.ts +9 -0
- package/lib/types/mobile-plugin.d.ts +18 -0
- package/lib/types/plugin.d.ts +3 -0
- package/lib/types/render-objects/board-mind-map-node-controls-object.d.ts +4 -3
- package/lib/types/utils/mind-map-node-controls.util.d.ts +1 -0
- package/lib/types/views/BoardMindMapMobileStylePanel.d.ts +7 -0
- package/lib/types/views/BoardMindMapPanel.d.ts +56 -5
- package/lib/types/views/mobile/BoardMobileMindMapFloatingToolbar.d.ts +3 -0
- package/lib/types/views/mobile/BoardMobileMindMapPanel.d.ts +2 -0
- 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 +15 -14
package/lib/locale/zh-CN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x1e6c(){const _0x222130=['4713USQngu','连接线样式','粘贴\x20OPML\x20XML','565676JJgmdj','左右树形图','9fjhMNC','搜索节点','圆角折线','父子间距','导入\x20OPML','112920XWBfLd','添加子节点','右对齐','左右思维导图','横向时间线','字体颜色','205DmCJQY','514PZQzRx','两端对齐','重命名','3985107QfKETz','上下思维导图','删除线','导入/导出','42604voFJYh','2475104SzCEBx','左侧树形图','暂无节点','底部对齐','右侧树形图','思维导图','分支间距','同级间距','左对齐','纵向时间线','25520090LFYVIw','导出\x20OPML'];_0x1e6c=function(){return _0x222130;};return _0x1e6c();}const _0x530bf0=_0x3501;(function(_0x5afcd2,_0x55719b){const _0x4f7183=_0x3501,_0x17d130=_0x5afcd2();while(!![]){try{const _0x15a3be=-parseInt(_0x4f7183(0x1ed))/0x1+-parseInt(_0x4f7183(0x1fb))/0x2*(parseInt(_0x4f7183(0x20f))/0x3)+parseInt(_0x4f7183(0x202))/0x4*(-parseInt(_0x4f7183(0x1fa))/0x5)+parseInt(_0x4f7183(0x1f4))/0x6+-parseInt(_0x4f7183(0x1fe))/0x7+-parseInt(_0x4f7183(0x203))/0x8+-parseInt(_0x4f7183(0x1ef))/0x9*(-parseInt(_0x4f7183(0x20d))/0xa);if(_0x15a3be===_0x55719b)break;else _0x17d130['push'](_0x17d130['shift']());}catch(_0x40a8d9){_0x17d130['push'](_0x17d130['shift']());}}}(_0x1e6c,0x45d4a));function _0x3501(_0x1039a1,_0x23707d){_0x1039a1=_0x1039a1-0x1ec;const _0x1e6c93=_0x1e6c();let _0x3501bf=_0x1e6c93[_0x1039a1];return _0x3501bf;}const e={'boards-mind-ui':{'alignBottom':_0x530bf0(0x206),'alignMiddle':'垂直居中','alignTop':'顶部对齐','alignJustify':_0x530bf0(0x1fc),'alignRight':_0x530bf0(0x1f6),'alignCenter':'居中对齐','alignLeft':_0x530bf0(0x20b),'saveDescription':'保存','descriptionPlaceholder':'为当前节点添加描述','description':'描述','cancel':'取消','panel':{'nodeStyle':{'style':'样式','fontFamily':'字体','fontSize':'字号','bold':'加粗','italic':'斜体','underline':'下划线','strikethrough':_0x530bf0(0x200)},'title':_0x530bf0(0x208),'tab':{'importExport':_0x530bf0(0x201),'layout':'布局','structure':'结构'},'layout':{'both':'双向','left':'左侧','right':'右侧'},'structureKind':{'mindmapHorizontal':_0x530bf0(0x1f7),'mindmapVertical':_0x530bf0(0x1ff),'treeRight':_0x530bf0(0x207),'treeLeft':_0x530bf0(0x204),'treeAlternate':_0x530bf0(0x1ee),'timelineHorizontal':_0x530bf0(0x1f8),'timelineVertical':_0x530bf0(0x20c)},'branchLineType':{'curve':'曲线','roundedOrthogonal':_0x530bf0(0x1f1),'orthogonal':'直角折线'},'addText':'添加文本','cancel':'取消','emptyNodes':_0x530bf0(0x205),'exportOPML':_0x530bf0(0x20e),'importOPML':_0x530bf0(0x1f3),'pasteOPML':_0x530bf0(0x1ec),'rename':_0x530bf0(0x1fd),'renamePrompt':'重命名思维导图节点','searchNodes':_0x530bf0(0x1f0),'spacing':{'branchGap':_0x530bf0(0x209),'parentGap':_0x530bf0(0x1f2),'siblingGap':_0x530bf0(0x20a)}},'toolbar':{'primary':{'line':_0x530bf0(0x210),'fontColor':_0x530bf0(0x1f9),'typography':'排版','more':'更多'},'panel':{'line':'线条','typography':'排版','more':'更多'},'action':{'addChild':_0x530bf0(0x1f5),'addSibling':'添加同级节点','copy':'复制','delete':'删除','fill':'填充','fontColor':_0x530bf0(0x1f9),'layout':'布局','paste':'粘贴','stroke':'描边'}}}};export{e as default};
|
package/lib/locale/zh-HK.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x5ae7(){const _0x800097=['置中對齊','117jXloom','分支間距','同層間距','新增文字','右側樹狀圖','靠右對齊','刪除線','5732010SeAqJn','圓角折線','匯出\x20OPML','靠左對齊','直角折線','匯入/匯出','橫向時間軸','連接線樣式','3LiOQJL','父子間距','版面配置','左右樹狀圖','左右對齊','596552HRqZYz','新增同層節點','6PnUfqw','7521300xhmbBC','沒有節點','縱向心智圖','2376358POkznt','2319660SNzZpI','搜尋節點','橫向心智圖','1237644zNKNUY','字體大小','垂直置中','文字排版','匯入\x20OPML','縱向時間軸','左側樹狀圖','10390093gAUCix'];_0x5ae7=function(){return _0x800097;};return _0x5ae7();}function _0x4f23(_0x2aaa3e,_0x1e675d){_0x2aaa3e=_0x2aaa3e-0x71;const _0x5ae7c1=_0x5ae7();let _0x4f239f=_0x5ae7c1[_0x2aaa3e];return _0x4f239f;}const _0x49c7b9=_0x4f23;(function(_0x5e40c4,_0x1beeba){const _0x1ee4e8=_0x4f23,_0x4c826b=_0x5e40c4();while(!![]){try{const _0x39ffc7=-parseInt(_0x1ee4e8(0x72))/0x1+-parseInt(_0x1ee4e8(0x95))/0x2*(-parseInt(_0x1ee4e8(0x8a))/0x3)+-parseInt(_0x1ee4e8(0x96))/0x4+-parseInt(_0x1ee4e8(0x92))/0x5+parseInt(_0x1ee4e8(0x91))/0x6*(parseInt(_0x1ee4e8(0x79))/0x7)+parseInt(_0x1ee4e8(0x8f))/0x8*(parseInt(_0x1ee4e8(0x7b))/0x9)+parseInt(_0x1ee4e8(0x82))/0xa;if(_0x39ffc7===_0x1beeba)break;else _0x4c826b['push'](_0x4c826b['shift']());}catch(_0xb3cae5){_0x4c826b['push'](_0x4c826b['shift']());}}}(_0x5ae7,0xda149));const e={'boards-mind-ui':{'alignBottom':'靠下對齊','alignMiddle':_0x49c7b9(0x74),'alignTop':'靠上對齊','alignJustify':_0x49c7b9(0x8e),'alignRight':_0x49c7b9(0x80),'alignCenter':_0x49c7b9(0x7a),'alignLeft':_0x49c7b9(0x85),'saveDescription':'儲存','descriptionPlaceholder':'為目前節點新增描述','description':'描述','cancel':'取消','panel':{'nodeStyle':{'style':'樣式','fontFamily':'字體','fontSize':_0x49c7b9(0x73),'bold':'粗體','italic':'斜體','underline':'底線','strikethrough':_0x49c7b9(0x81)},'title':'心智圖','tab':{'importExport':_0x49c7b9(0x87),'layout':_0x49c7b9(0x8c),'structure':'結構'},'layout':{'both':'雙向','left':'左側','right':'右側'},'structureKind':{'mindmapHorizontal':_0x49c7b9(0x71),'mindmapVertical':_0x49c7b9(0x94),'treeRight':_0x49c7b9(0x7f),'treeLeft':_0x49c7b9(0x78),'treeAlternate':_0x49c7b9(0x8d),'timelineHorizontal':_0x49c7b9(0x88),'timelineVertical':_0x49c7b9(0x77)},'branchLineType':{'curve':'曲線','roundedOrthogonal':_0x49c7b9(0x83),'orthogonal':_0x49c7b9(0x86)},'addText':_0x49c7b9(0x7e),'cancel':'取消','emptyNodes':_0x49c7b9(0x93),'exportOPML':_0x49c7b9(0x84),'importOPML':_0x49c7b9(0x76),'pasteOPML':'貼上\x20OPML\x20XML','rename':'重新命名','renamePrompt':'重新命名心智圖節點','searchNodes':_0x49c7b9(0x97),'spacing':{'branchGap':_0x49c7b9(0x7c),'parentGap':_0x49c7b9(0x8b),'siblingGap':_0x49c7b9(0x7d)}},'toolbar':{'primary':{'line':_0x49c7b9(0x89),'fontColor':'字型顏色','typography':_0x49c7b9(0x75),'more':'更多'},'panel':{'line':'線條','typography':_0x49c7b9(0x75),'more':'更多'},'action':{'addChild':'新增子節點','addSibling':_0x49c7b9(0x90),'copy':'複製','delete':'刪除','fill':'填滿','fontColor':'字型顏色','layout':'版面配置','paste':'貼上','stroke':'外框'}}}};export{e as default};
|
package/lib/locale/zh-TW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x124782=_0x19cf;(function(_0x2d9e7d,_0x467289){const _0x36bef4=_0x19cf,_0x4e6a26=_0x2d9e7d();while(!![]){try{const _0x1a2574=-parseInt(_0x36bef4(0xf4))/0x1*(-parseInt(_0x36bef4(0xe6))/0x2)+parseInt(_0x36bef4(0xee))/0x3*(-parseInt(_0x36bef4(0xd4))/0x4)+-parseInt(_0x36bef4(0xf2))/0x5*(-parseInt(_0x36bef4(0xf0))/0x6)+parseInt(_0x36bef4(0xe3))/0x7+-parseInt(_0x36bef4(0xdb))/0x8*(parseInt(_0x36bef4(0xf7))/0x9)+parseInt(_0x36bef4(0xf1))/0xa*(-parseInt(_0x36bef4(0xe7))/0xb)+parseInt(_0x36bef4(0xea))/0xc*(parseInt(_0x36bef4(0xf6))/0xd);if(_0x1a2574===_0x467289)break;else _0x4e6a26['push'](_0x4e6a26['shift']());}catch(_0x5b83cd){_0x4e6a26['push'](_0x4e6a26['shift']());}}}(_0x264c,0x73343));function _0x19cf(_0x18e867,_0xb8a0ae){_0x18e867=_0x18e867-0xd4;const _0x264cce=_0x264c();let _0x19cf56=_0x264cce[_0x18e867];return _0x19cf56;}const e={'boards-mind-ui':{'alignBottom':_0x124782(0xd6),'alignMiddle':'垂直置中','alignTop':'靠上對齊','alignJustify':_0x124782(0xfa),'alignRight':_0x124782(0xfb),'alignCenter':_0x124782(0xec),'alignLeft':_0x124782(0xd9),'saveDescription':'儲存','descriptionPlaceholder':'為目前節點新增描述','description':'描述','cancel':'取消','panel':{'nodeStyle':{'style':'樣式','fontFamily':'字型','fontSize':_0x124782(0xdc),'bold':'粗體','italic':'斜體','underline':'底線','strikethrough':'刪除線'},'title':'心智圖','tab':{'importExport':_0x124782(0xe0),'layout':_0x124782(0xda),'structure':'結構'},'layout':{'both':'雙向','left':'左側','right':'右側'},'structureKind':{'mindmapHorizontal':_0x124782(0xfc),'mindmapVertical':_0x124782(0xef),'treeRight':_0x124782(0xd5),'treeLeft':_0x124782(0xf3),'treeAlternate':_0x124782(0xe5),'timelineHorizontal':_0x124782(0xf8),'timelineVertical':_0x124782(0xde)},'branchLineType':{'curve':'曲線','roundedOrthogonal':_0x124782(0xf9),'orthogonal':'直角折線'},'addText':_0x124782(0xdd),'cancel':'取消','emptyNodes':'沒有節點','exportOPML':_0x124782(0xed),'importOPML':_0x124782(0xe4),'pasteOPML':_0x124782(0xe1),'rename':_0x124782(0xd7),'renamePrompt':_0x124782(0xd8),'searchNodes':_0x124782(0xeb),'spacing':{'branchGap':_0x124782(0xe8),'parentGap':'父子間距','siblingGap':'同層間距'}},'toolbar':{'primary':{'line':_0x124782(0xf5),'fontColor':_0x124782(0xdf),'typography':_0x124782(0xe2),'more':'更多'},'panel':{'line':'線條','typography':_0x124782(0xe2),'more':'更多'},'action':{'addChild':_0x124782(0xe9),'addSibling':'新增同層節點','copy':'複製','delete':'刪除','fill':'填滿','fontColor':_0x124782(0xdf),'layout':_0x124782(0xda),'paste':'貼上','stroke':'外框'}}}};export{e as default};function _0x264c(){const _0x5e674f=['重新命名','重新命名心智圖節點','靠左對齊','版面配置','280rqcgnr','字型大小','新增文字','縱向時間軸','字型顏色','匯入/匯出','貼上\x20OPML\x20XML','文字排版','732774adxxaJ','匯入\x20OPML','左右樹狀圖','34fmILgm','418ljpgcB','分支間距','新增子節點','222456UMdWHS','搜尋節點','置中對齊','匯出\x20OPML','3iYheeH','縱向心智圖','18SrzQXc','145160CkCudP','1404860lYCEpr','左側樹狀圖','10815PhRpOn','連接線樣式','624cbfWOz','207909RfzUgJ','橫向時間軸','圓角折線','左右對齊','靠右對齊','橫向心智圖','757036pMLqnG','右側樹狀圖','靠下對齊'];_0x264c=function(){return _0x5e674f;};return _0x264c();}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { BoardModel } from '@univerjs-pro/boards';
|
|
2
|
+
import type { EventState, UnitModel } from '@univerjs/core';
|
|
3
|
+
import type { IMouseEvent, IPointerEvent, IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
4
|
import { BoardTextEditingService, IBoardElementStateService, IBoardUIStateService } from '@univerjs-pro/boards-ui';
|
|
4
5
|
import { ICommandService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
5
6
|
import { BoardMindMapInsertStateService } from '../services/board-mind-map-insert-state.service';
|
|
7
|
+
interface IInsertedMindMapNode {
|
|
8
|
+
rootNodeId: string;
|
|
9
|
+
subUnitId: string;
|
|
10
|
+
}
|
|
6
11
|
export declare class BoardMindMapInsertRenderController extends RxDisposable implements IRenderModule {
|
|
7
12
|
private readonly _renderContext;
|
|
8
13
|
private readonly _instanceSrv;
|
|
@@ -21,5 +26,7 @@ export declare class BoardMindMapInsertRenderController extends RxDisposable imp
|
|
|
21
26
|
private _getPointFromEvent;
|
|
22
27
|
private _resolveRootTopLeft;
|
|
23
28
|
private _handlePointerMove;
|
|
24
|
-
|
|
29
|
+
protected _handlePointerDown(boardModel: BoardModel, evt: IPointerEvent | IMouseEvent, state: EventState): Promise<void>;
|
|
30
|
+
protected _insertMindMap(boardModel: BoardModel, evt: IPointerEvent | IMouseEvent, state: EventState): Promise<IInsertedMindMapNode | null>;
|
|
25
31
|
}
|
|
32
|
+
export {};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import type { IOpenMindMapPanelOperationParams } from '../commands/operations/open-mind-map-panel.operation';
|
|
2
|
-
import { IBoardElementService } from '@univerjs-pro/boards';
|
|
3
2
|
import { Disposable, ICommandService, LocaleService } from '@univerjs/core';
|
|
4
3
|
import { ISidebarService } from '@univerjs/ui';
|
|
5
4
|
export declare class BoardMindMapPanelController extends Disposable {
|
|
6
5
|
private readonly _commandService;
|
|
7
6
|
private readonly _localeService;
|
|
8
7
|
private readonly _sidebarService;
|
|
9
|
-
private readonly _boardElementService;
|
|
10
8
|
private _sidebarDisposable;
|
|
11
|
-
constructor(_commandService: ICommandService, _localeService: LocaleService, _sidebarService: ISidebarService
|
|
9
|
+
constructor(_commandService: ICommandService, _localeService: LocaleService, _sidebarService: ISidebarService);
|
|
12
10
|
dispose(): void;
|
|
13
11
|
open(params: IOpenMindMapPanelOperationParams): void;
|
|
14
12
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Disposable } from '@univerjs/core';
|
|
2
2
|
import { ComponentManager } from '@univerjs/ui';
|
|
3
3
|
export declare class ComponentsController extends Disposable {
|
|
4
|
-
|
|
4
|
+
protected readonly _componentManager: ComponentManager;
|
|
5
5
|
constructor(_componentManager: ComponentManager);
|
|
6
|
-
|
|
6
|
+
protected _registerComponents(): void;
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BoardModel } from '@univerjs-pro/boards';
|
|
2
|
+
import type { EventState } from '@univerjs/core';
|
|
3
|
+
import type { IMouseEvent, IPointerEvent } from '@univerjs/engine-render';
|
|
4
|
+
import { BoardMindMapInsertRenderController } from '../board-mind-map-insert.render-controller';
|
|
5
|
+
export declare class MobileBoardMindMapInsertRenderController extends BoardMindMapInsertRenderController {
|
|
6
|
+
protected _handlePointerDown(boardModel: BoardModel, evt: IPointerEvent | IMouseEvent, state: EventState): Promise<void>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IOpenMindMapPanelOperationParams } from '../../commands/operations/open-mind-map-panel.operation';
|
|
2
|
+
import { Disposable, ICommandService, LocaleService } from '@univerjs/core';
|
|
3
|
+
import { ISidebarService } from '@univerjs/ui';
|
|
4
|
+
export declare class MobileBoardMindMapPanelController extends Disposable {
|
|
5
|
+
private readonly _commandService;
|
|
6
|
+
private readonly _localeService;
|
|
7
|
+
private readonly _sidebarService;
|
|
8
|
+
private _sidebarDisposable;
|
|
9
|
+
constructor(_commandService: ICommandService, _localeService: LocaleService, _sidebarService: ISidebarService);
|
|
10
|
+
dispose(): void;
|
|
11
|
+
open(params: IOpenMindMapPanelOperationParams): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Disposable } from '@univerjs/core';
|
|
2
|
+
import { ComponentManager } from '@univerjs/ui';
|
|
3
|
+
export declare class MobileComponentsController extends Disposable {
|
|
4
|
+
protected readonly _componentManager: ComponentManager;
|
|
5
|
+
constructor(_componentManager: ComponentManager);
|
|
6
|
+
protected _registerComponents(): void;
|
|
7
|
+
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -12,6 +12,15 @@ declare const locale: {
|
|
|
12
12
|
description: string;
|
|
13
13
|
cancel: string;
|
|
14
14
|
panel: {
|
|
15
|
+
nodeStyle: {
|
|
16
|
+
style: string;
|
|
17
|
+
fontFamily: string;
|
|
18
|
+
fontSize: string;
|
|
19
|
+
bold: string;
|
|
20
|
+
italic: string;
|
|
21
|
+
underline: string;
|
|
22
|
+
strikethrough: string;
|
|
23
|
+
};
|
|
15
24
|
title: string;
|
|
16
25
|
tab: {
|
|
17
26
|
importExport: string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IUniverBoardsMindUIConfig } from './config/config';
|
|
2
|
+
import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
3
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
4
|
+
export declare class UniverBoardsMindMobileUIPlugin extends Plugin {
|
|
5
|
+
private readonly _config;
|
|
6
|
+
protected readonly _injector: Injector;
|
|
7
|
+
private readonly _configService;
|
|
8
|
+
private readonly _renderManagerService;
|
|
9
|
+
static pluginName: string;
|
|
10
|
+
static packageName: string;
|
|
11
|
+
static version: string;
|
|
12
|
+
static type: UniverInstanceType;
|
|
13
|
+
constructor(_config: Partial<IUniverBoardsMindUIConfig> | undefined, _injector: Injector, _configService: IConfigService, _renderManagerService: IRenderManagerService);
|
|
14
|
+
onStarting(): void;
|
|
15
|
+
onReady(): void;
|
|
16
|
+
private _enableMindMapToolbarTool;
|
|
17
|
+
private _getBoardsUIConfig;
|
|
18
|
+
}
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BoardToolbarToolConfig } from '@univerjs-pro/boards-ui';
|
|
2
|
+
import type { Dependency } from '@univerjs/core';
|
|
2
3
|
import type { IUniverBoardsMindUIConfig } from './config/config';
|
|
3
4
|
import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
4
5
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
@@ -14,6 +15,8 @@ export declare class UniverBoardsMindUIPlugin extends Plugin {
|
|
|
14
15
|
static type: UniverInstanceType;
|
|
15
16
|
constructor(_config: Partial<IUniverBoardsMindUIConfig> | undefined, _injector: Injector, _configService: IConfigService, _renderManagerService: IRenderManagerService);
|
|
16
17
|
onStarting(): void;
|
|
18
|
+
protected _getDependencies(): Dependency[];
|
|
19
|
+
protected _getRenderModules(): Dependency[];
|
|
17
20
|
onReady(): void;
|
|
18
21
|
private _enableMindMapToolbarTool;
|
|
19
22
|
private _getBoardsUIConfig;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { IViewportInfo, UniverRenderingContext, Vector2 } from '@univerjs/engine-render';
|
|
2
2
|
import type { IMindMapNodeControl } from '../utils/mind-map-node-controls.util';
|
|
3
|
-
import {
|
|
3
|
+
import { Control, DeviceType } from '@univerjs/engine-render';
|
|
4
4
|
export interface IBoardMindMapNodeControlsObjectState {
|
|
5
5
|
controls: IMindMapNodeControl[];
|
|
6
6
|
hoveredControl?: IMindMapNodeControl | null;
|
|
7
7
|
}
|
|
8
8
|
export declare const BOARD_MIND_MAP_NODE_CONTROLS_OBJECT_KEY = "board-mind-map-node-controls-object";
|
|
9
9
|
export declare const BOARD_MIND_MAP_NODE_CONTROLS_OBJECT_LAYER_INDEX: 5;
|
|
10
|
-
export declare class BoardMindMapNodeControlsObject extends
|
|
10
|
+
export declare class BoardMindMapNodeControlsObject extends Control {
|
|
11
11
|
private _state;
|
|
12
12
|
constructor(key?: string, state?: Partial<IBoardMindMapNodeControlsObjectState>);
|
|
13
13
|
updateState(state?: Partial<IBoardMindMapNodeControlsObjectState>): void;
|
|
@@ -15,7 +15,8 @@ export declare class BoardMindMapNodeControlsObject extends BaseObject {
|
|
|
15
15
|
getHitControl(point: {
|
|
16
16
|
x: number;
|
|
17
17
|
y: number;
|
|
18
|
-
}): IMindMapNodeControl | null;
|
|
18
|
+
}, deviceType?: DeviceType): IMindMapNodeControl | null;
|
|
19
|
+
getTouchHitDistance(coord: Vector2): number;
|
|
19
20
|
isHit(coord: Vector2): boolean;
|
|
20
21
|
render(ctx: UniverRenderingContext, _bounds: IViewportInfo): this;
|
|
21
22
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { IBoardElementData } from '@univerjs-pro/boards';
|
|
2
2
|
import type { IMindMapContainerData, MindMapBranchLineType, MindMapLayoutDirection, MindMapStructureKind } from '@univerjs-pro/boards-mind';
|
|
3
|
-
import type { CSSProperties, ReactNode } from 'react';
|
|
3
|
+
import type { CSSProperties, DragEvent, ReactNode } from 'react';
|
|
4
4
|
import type { LocaleKey } from '../locale/types';
|
|
5
|
-
import {
|
|
5
|
+
import { IBoardElementStateService } from '@univerjs-pro/boards-ui';
|
|
6
|
+
import { ICommandService, LocaleService } from '@univerjs/core';
|
|
6
7
|
export declare const BOARD_MIND_MAP_PANEL_KEY = "board.mind-map.panel";
|
|
7
8
|
export declare const BOARD_MIND_MAP_PANEL_SIDEBAR_WIDTH = 388;
|
|
8
9
|
export declare const BOARD_MIND_MAP_PANEL_TABS: readonly ["structure", "layout", "importExport"];
|
|
9
|
-
export type BoardMindMapPanelTab = typeof BOARD_MIND_MAP_PANEL_TABS[number];
|
|
10
|
+
export type BoardMindMapPanelTab = typeof BOARD_MIND_MAP_PANEL_TABS[number] | 'style';
|
|
10
11
|
export type BoardMindMapPanelSpacingKey = 'horizontalGap' | 'siblingGap' | 'branchGap';
|
|
11
12
|
export declare const BOARD_MIND_MAP_PANEL_DEFAULT_SPACING: Record<BoardMindMapPanelSpacingKey, number>;
|
|
12
13
|
export declare const BOARD_MIND_MAP_PANEL_SPACING_CONTROLS: Array<{
|
|
@@ -37,8 +38,6 @@ export interface IBoardMindMapPanelProps {
|
|
|
37
38
|
subUnitId: string;
|
|
38
39
|
scopeId: string;
|
|
39
40
|
nodeId?: string;
|
|
40
|
-
outlineItems?: IBoardMindMapPanelOutlineItem[];
|
|
41
|
-
layout?: IMindMapContainerData['layout'];
|
|
42
41
|
}
|
|
43
42
|
export declare function resolveMindMapPanelLayoutState(layout?: IMindMapContainerData['layout']): {
|
|
44
43
|
spacing: {
|
|
@@ -107,4 +106,56 @@ export declare function BoardMindMapPanelSection(props: {
|
|
|
107
106
|
title: string;
|
|
108
107
|
children?: ReactNode;
|
|
109
108
|
}): import("react").JSX.Element;
|
|
109
|
+
export declare function useBoardMindMapPanel(props: IBoardMindMapPanelProps, initialTab?: BoardMindMapPanelTab): {
|
|
110
|
+
commandService: ICommandService;
|
|
111
|
+
elementStateService: IBoardElementStateService;
|
|
112
|
+
localeService: LocaleService;
|
|
113
|
+
query: string;
|
|
114
|
+
setQuery: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
115
|
+
editingOutlineNode: {
|
|
116
|
+
nodeId: string;
|
|
117
|
+
text: string;
|
|
118
|
+
} | null;
|
|
119
|
+
setEditingOutlineNode: import("react").Dispatch<import("react").SetStateAction<{
|
|
120
|
+
nodeId: string;
|
|
121
|
+
text: string;
|
|
122
|
+
} | null>>;
|
|
123
|
+
opmlText: string;
|
|
124
|
+
setOpmlText: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
125
|
+
spacing: {
|
|
126
|
+
horizontalGap: number;
|
|
127
|
+
siblingGap: number;
|
|
128
|
+
branchGap: number;
|
|
129
|
+
};
|
|
130
|
+
layoutDirection: MindMapLayoutDirection;
|
|
131
|
+
structureKind: MindMapStructureKind;
|
|
132
|
+
branchLineType: MindMapBranchLineType;
|
|
133
|
+
setDraggedOutlineNodeId: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
134
|
+
activeTab: BoardMindMapPanelTab;
|
|
135
|
+
setActiveTab: import("react").Dispatch<import("react").SetStateAction<BoardMindMapPanelTab>>;
|
|
136
|
+
visibleOutlineItems: IBoardMindMapPanelOutlineItem[];
|
|
137
|
+
baseParams: {
|
|
138
|
+
unitId: string;
|
|
139
|
+
subUnitId: string;
|
|
140
|
+
scopeId: string;
|
|
141
|
+
};
|
|
142
|
+
tabItems: {
|
|
143
|
+
label: string;
|
|
144
|
+
value: BoardMindMapPanelTab;
|
|
145
|
+
}[];
|
|
146
|
+
selectedNode: import("@univerjs-pro/boards").IBoardPageElement | undefined;
|
|
147
|
+
branchLineItems: {
|
|
148
|
+
labelKey: LocaleKey;
|
|
149
|
+
value: MindMapBranchLineType;
|
|
150
|
+
}[];
|
|
151
|
+
changeLayout: (direction: MindMapLayoutDirection) => Promise<boolean>;
|
|
152
|
+
changeStructureKind: (nextStructureKind: MindMapStructureKind) => Promise<boolean>;
|
|
153
|
+
changeBranchLineType: (nextBranchLineType: MindMapBranchLineType) => Promise<boolean>;
|
|
154
|
+
changeSpacing: (key: BoardMindMapPanelSpacingKey, value: number) => Promise<boolean>;
|
|
155
|
+
importOpml: () => void;
|
|
156
|
+
exportOpml: () => Promise<boolean>;
|
|
157
|
+
startRenameNode: (nodeId: string, currentText: string) => void;
|
|
158
|
+
commitRenameNode: () => void;
|
|
159
|
+
reorderNode: (event: DragEvent<HTMLElement>, targetNodeId: string) => void;
|
|
160
|
+
};
|
|
110
161
|
export declare function BoardMindMapPanel(props: IBoardMindMapPanelProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import type { BoardMindMapFloatingToolbar } from '../BoardMindMapFloatingToolbar';
|
|
3
|
+
export declare function BoardMobileMindMapFloatingToolbar(props: ComponentProps<typeof BoardMindMapFloatingToolbar>): import("react").JSX.Element | null;
|