mirror of
https://github.com/mathuo/dockview
synced 2025-03-10 07:52:07 +00:00
chore: add README
This commit is contained in:
parent
db1cb49487
commit
e0bf694512
16
packages/README.md
Normal file
16
packages/README.md
Normal file
@ -0,0 +1,16 @@
|
||||
# Project Structure
|
||||
|
||||
## dockview-core
|
||||
|
||||
- Contains the core logic for the dockview library.
|
||||
- Written entirely in vanilla JavaScript/TypeScript.
|
||||
|
||||
## dockview
|
||||
|
||||
- Depends on `dockview-core`.
|
||||
- Exports a `React` wrapper.
|
||||
- Published `dockview` package.
|
||||
|
||||
## docs
|
||||
|
||||
- Code for website found at [dockview.dev](dockview.dev).
|
@ -93,66 +93,6 @@ class PanelTabPartTest implements ITabRenderer {
|
||||
}
|
||||
}
|
||||
|
||||
class TestGroupPanel implements IDockviewPanel {
|
||||
private _group: DockviewGroupPanel | undefined;
|
||||
|
||||
readonly api: DockviewPanelApi;
|
||||
readonly view: IDockviewPanelModel;
|
||||
|
||||
constructor(
|
||||
public readonly id: string,
|
||||
public readonly title: string,
|
||||
accessor: DockviewComponent
|
||||
) {
|
||||
this.api = new DockviewPanelApiImpl(this, this._group!);
|
||||
this._group = new DockviewGroupPanel(accessor, id, {});
|
||||
this.view = new DockviewPanelModelMock(
|
||||
'component',
|
||||
new PanelContentPartTest(id, 'component'),
|
||||
'tabComponent',
|
||||
new DefaultTab()
|
||||
);
|
||||
}
|
||||
|
||||
get params(): Record<string, any> {
|
||||
return {};
|
||||
}
|
||||
get group(): DockviewGroupPanel {
|
||||
return this._group!;
|
||||
}
|
||||
|
||||
updateParentGroup(group: DockviewGroupPanel, isGroupActive: boolean): void {
|
||||
this._group = group;
|
||||
}
|
||||
|
||||
init(params: IGroupPanelInitParameters): void {
|
||||
//
|
||||
}
|
||||
|
||||
layout(width: number, height: number): void {
|
||||
//
|
||||
}
|
||||
|
||||
focus(): void {
|
||||
//
|
||||
}
|
||||
|
||||
toJSON(): GroupviewPanelState {
|
||||
return {
|
||||
id: this.id,
|
||||
title: this.title,
|
||||
};
|
||||
}
|
||||
|
||||
update(event: GroupPanelUpdateEvent): void {
|
||||
//
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
describe('dockviewComponent', () => {
|
||||
let container: HTMLElement;
|
||||
let dockview: DockviewComponent;
|
||||
@ -990,15 +930,6 @@ describe('dockviewComponent', () => {
|
||||
|
||||
test('#1', () => {
|
||||
dockview.layout(500, 500);
|
||||
dockview.deserializer = {
|
||||
fromJSON: (panelData: GroupviewPanelState): IDockviewPanel => {
|
||||
return new TestGroupPanel(
|
||||
panelData.id,
|
||||
panelData.title || '',
|
||||
dockview
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
const panel1 = dockview.addPanel({
|
||||
id: 'panel1',
|
||||
@ -1053,14 +984,17 @@ describe('dockviewComponent', () => {
|
||||
panels: {
|
||||
view_1: {
|
||||
id: 'view_1',
|
||||
contentComponent: 'default',
|
||||
title: 'view_1_title',
|
||||
},
|
||||
view_2: {
|
||||
id: 'view_2',
|
||||
contentComponent: 'default',
|
||||
title: 'view_2_title',
|
||||
},
|
||||
view_3: {
|
||||
id: 'view_3',
|
||||
contentComponent: 'default',
|
||||
title: 'view_3_title',
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user