dockview 6.6.0 → 7.0.2
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/README.md +33 -26
- package/dist/cjs/index.d.ts +0 -9
- package/dist/cjs/index.js +12 -7
- package/dist/dockview.js +20486 -914
- package/dist/dockview.min.js +16 -2
- package/dist/dockview.min.js.map +1 -1
- package/dist/esm/index.d.ts +0 -9
- package/dist/esm/index.js +12 -7
- package/dist/package/main.cjs.js +856 -941
- package/dist/package/main.cjs.min.js +8 -2
- package/dist/package/main.esm.min.mjs +8 -2
- package/dist/package/main.esm.mjs +854 -934
- package/dist/styles/dockview.css +275 -13
- package/package.json +16 -12
- package/dist/cjs/dockview/defaultTab.d.ts +0 -7
- package/dist/cjs/dockview/defaultTab.js +0 -99
- package/dist/cjs/dockview/dockview.d.ts +0 -33
- package/dist/cjs/dockview/dockview.js +0 -285
- package/dist/cjs/dockview/headerActionsRenderer.d.ts +0 -24
- package/dist/cjs/dockview/headerActionsRenderer.js +0 -86
- package/dist/cjs/dockview/reactContentPart.d.ts +0 -21
- package/dist/cjs/dockview/reactContentPart.js +0 -52
- package/dist/cjs/dockview/reactContextMenuItemPart.d.ts +0 -14
- package/dist/cjs/dockview/reactContextMenuItemPart.js +0 -31
- package/dist/cjs/dockview/reactGroupDragGhostPart.d.ts +0 -20
- package/dist/cjs/dockview/reactGroupDragGhostPart.js +0 -32
- package/dist/cjs/dockview/reactHeaderPart.d.ts +0 -17
- package/dist/cjs/dockview/reactHeaderPart.js +0 -46
- package/dist/cjs/dockview/reactTabGroupChipPart.d.ts +0 -23
- package/dist/cjs/dockview/reactTabGroupChipPart.js +0 -36
- package/dist/cjs/dockview/reactWatermarkPart.d.ts +0 -18
- package/dist/cjs/dockview/reactWatermarkPart.js +0 -47
- package/dist/cjs/gridview/gridview.d.ts +0 -17
- package/dist/cjs/gridview/gridview.js +0 -105
- package/dist/cjs/gridview/view.d.ts +0 -9
- package/dist/cjs/gridview/view.js +0 -41
- package/dist/cjs/paneview/paneview.d.ts +0 -20
- package/dist/cjs/paneview/paneview.js +0 -137
- package/dist/cjs/paneview/view.d.ts +0 -19
- package/dist/cjs/paneview/view.js +0 -44
- package/dist/cjs/react.d.ts +0 -35
- package/dist/cjs/react.js +0 -183
- package/dist/cjs/splitview/splitview.d.ts +0 -17
- package/dist/cjs/splitview/splitview.js +0 -105
- package/dist/cjs/splitview/view.d.ts +0 -9
- package/dist/cjs/splitview/view.js +0 -39
- package/dist/cjs/svg.d.ts +0 -3
- package/dist/cjs/svg.js +0 -15
- package/dist/cjs/types.d.ts +0 -4
- package/dist/cjs/types.js +0 -2
- package/dist/esm/dockview/defaultTab.d.ts +0 -7
- package/dist/esm/dockview/defaultTab.js +0 -65
- package/dist/esm/dockview/dockview.d.ts +0 -33
- package/dist/esm/dockview/dockview.js +0 -252
- package/dist/esm/dockview/headerActionsRenderer.d.ts +0 -24
- package/dist/esm/dockview/headerActionsRenderer.js +0 -72
- package/dist/esm/dockview/reactContentPart.d.ts +0 -21
- package/dist/esm/dockview/reactContentPart.js +0 -43
- package/dist/esm/dockview/reactContextMenuItemPart.d.ts +0 -14
- package/dist/esm/dockview/reactContextMenuItemPart.js +0 -22
- package/dist/esm/dockview/reactGroupDragGhostPart.d.ts +0 -20
- package/dist/esm/dockview/reactGroupDragGhostPart.js +0 -23
- package/dist/esm/dockview/reactHeaderPart.d.ts +0 -17
- package/dist/esm/dockview/reactHeaderPart.js +0 -37
- package/dist/esm/dockview/reactTabGroupChipPart.d.ts +0 -23
- package/dist/esm/dockview/reactTabGroupChipPart.js +0 -27
- package/dist/esm/dockview/reactWatermarkPart.d.ts +0 -18
- package/dist/esm/dockview/reactWatermarkPart.js +0 -38
- package/dist/esm/gridview/gridview.d.ts +0 -17
- package/dist/esm/gridview/gridview.js +0 -72
- package/dist/esm/gridview/view.d.ts +0 -9
- package/dist/esm/gridview/view.js +0 -19
- package/dist/esm/paneview/paneview.d.ts +0 -20
- package/dist/esm/paneview/paneview.js +0 -104
- package/dist/esm/paneview/view.d.ts +0 -19
- package/dist/esm/paneview/view.js +0 -35
- package/dist/esm/react.d.ts +0 -35
- package/dist/esm/react.js +0 -134
- package/dist/esm/splitview/splitview.d.ts +0 -17
- package/dist/esm/splitview/splitview.js +0 -72
- package/dist/esm/splitview/view.d.ts +0 -9
- package/dist/esm/splitview/view.js +0 -17
- package/dist/esm/svg.d.ts +0 -3
- package/dist/esm/svg.js +0 -7
- package/dist/esm/types.d.ts +0 -4
- package/dist/esm/types.js +0 -1
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PROPERTY_KEYS_DOCKVIEW, createDockview, } from 'dockview-core';
|
|
3
|
-
import { ReactPanelContentPart } from './reactContentPart';
|
|
4
|
-
import { ReactPanelHeaderPart } from './reactHeaderPart';
|
|
5
|
-
import { usePortalsLifecycle } from '../react';
|
|
6
|
-
import { ReactWatermarkPart } from './reactWatermarkPart';
|
|
7
|
-
import { ReactHeaderActionsRendererPart } from './headerActionsRenderer';
|
|
8
|
-
import { ReactContextMenuItemPart } from './reactContextMenuItemPart';
|
|
9
|
-
import { ReactTabGroupChipPart, } from './reactTabGroupChipPart';
|
|
10
|
-
import { ReactGroupDragGhostPart, } from './reactGroupDragGhostPart';
|
|
11
|
-
function createGroupControlElement(component, store) {
|
|
12
|
-
return component
|
|
13
|
-
? (groupPanel) => {
|
|
14
|
-
return new ReactHeaderActionsRendererPart(component, store, groupPanel);
|
|
15
|
-
}
|
|
16
|
-
: undefined;
|
|
17
|
-
}
|
|
18
|
-
const DEFAULT_REACT_TAB = 'props.defaultTabComponent';
|
|
19
|
-
function extractCoreOptions(props) {
|
|
20
|
-
const coreOptions = PROPERTY_KEYS_DOCKVIEW.reduce((obj, key) => {
|
|
21
|
-
if (key in props) {
|
|
22
|
-
obj[key] = props[key];
|
|
23
|
-
}
|
|
24
|
-
return obj;
|
|
25
|
-
}, {});
|
|
26
|
-
return coreOptions;
|
|
27
|
-
}
|
|
28
|
-
export const DockviewReact = React.forwardRef((props, ref) => {
|
|
29
|
-
const domRef = React.useRef(null);
|
|
30
|
-
const dockviewRef = React.useRef(undefined);
|
|
31
|
-
const [portals, addPortal] = usePortalsLifecycle();
|
|
32
|
-
React.useImperativeHandle(ref, () => domRef.current, []);
|
|
33
|
-
const prevProps = React.useRef({});
|
|
34
|
-
React.useEffect(() => {
|
|
35
|
-
const changes = {};
|
|
36
|
-
PROPERTY_KEYS_DOCKVIEW.forEach((propKey) => {
|
|
37
|
-
const key = propKey;
|
|
38
|
-
const propValue = props[key];
|
|
39
|
-
if (key in props && propValue !== prevProps.current[key]) {
|
|
40
|
-
changes[key] = propValue;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
if (dockviewRef.current) {
|
|
44
|
-
dockviewRef.current.updateOptions(changes);
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
// not yet fully initialized
|
|
48
|
-
}
|
|
49
|
-
prevProps.current = props;
|
|
50
|
-
}, PROPERTY_KEYS_DOCKVIEW.map((key) => props[key]));
|
|
51
|
-
React.useEffect(() => {
|
|
52
|
-
var _a;
|
|
53
|
-
if (!domRef.current) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
const frameworkTabComponents = (_a = props.tabComponents) !== null && _a !== void 0 ? _a : {};
|
|
57
|
-
if (props.defaultTabComponent) {
|
|
58
|
-
frameworkTabComponents[DEFAULT_REACT_TAB] =
|
|
59
|
-
props.defaultTabComponent;
|
|
60
|
-
}
|
|
61
|
-
const frameworkOptions = {
|
|
62
|
-
createLeftHeaderActionComponent: createGroupControlElement(props.leftHeaderActionsComponent, { addPortal }),
|
|
63
|
-
createRightHeaderActionComponent: createGroupControlElement(props.rightHeaderActionsComponent, { addPortal }),
|
|
64
|
-
createPrefixHeaderActionComponent: createGroupControlElement(props.prefixHeaderActionsComponent, { addPortal }),
|
|
65
|
-
createComponent: (options) => {
|
|
66
|
-
return new ReactPanelContentPart(options.id, props.components[options.name], {
|
|
67
|
-
addPortal,
|
|
68
|
-
});
|
|
69
|
-
},
|
|
70
|
-
createTabComponent(options) {
|
|
71
|
-
return new ReactPanelHeaderPart(options.id, frameworkTabComponents[options.name], {
|
|
72
|
-
addPortal,
|
|
73
|
-
});
|
|
74
|
-
},
|
|
75
|
-
createWatermarkComponent: props.watermarkComponent
|
|
76
|
-
? () => {
|
|
77
|
-
return new ReactWatermarkPart('watermark', props.watermarkComponent, {
|
|
78
|
-
addPortal,
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
: undefined,
|
|
82
|
-
defaultTabComponent: props.defaultTabComponent
|
|
83
|
-
? DEFAULT_REACT_TAB
|
|
84
|
-
: undefined,
|
|
85
|
-
createContextMenuItemComponent: (options) => {
|
|
86
|
-
if (!options.component) {
|
|
87
|
-
return undefined;
|
|
88
|
-
}
|
|
89
|
-
return new ReactContextMenuItemPart(options.id, options.component, { addPortal });
|
|
90
|
-
},
|
|
91
|
-
};
|
|
92
|
-
const coreOptions = extractCoreOptions(props);
|
|
93
|
-
if (props.tabGroupChipComponent) {
|
|
94
|
-
const chipComponent = props.tabGroupChipComponent;
|
|
95
|
-
coreOptions.createTabGroupChipComponent = () => {
|
|
96
|
-
return new ReactTabGroupChipPart(chipComponent, {
|
|
97
|
-
addPortal,
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
if (props.groupDragGhostComponent) {
|
|
102
|
-
const ghostComponent = props.groupDragGhostComponent;
|
|
103
|
-
coreOptions.createGroupDragGhostComponent = () => {
|
|
104
|
-
return new ReactGroupDragGhostPart(ghostComponent, {
|
|
105
|
-
addPortal,
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
const api = createDockview(domRef.current, Object.assign(Object.assign({}, coreOptions), frameworkOptions));
|
|
110
|
-
const { clientWidth, clientHeight } = domRef.current;
|
|
111
|
-
api.layout(clientWidth, clientHeight);
|
|
112
|
-
if (props.onReady) {
|
|
113
|
-
props.onReady({ api });
|
|
114
|
-
}
|
|
115
|
-
dockviewRef.current = api;
|
|
116
|
-
return () => {
|
|
117
|
-
dockviewRef.current = undefined;
|
|
118
|
-
api.dispose();
|
|
119
|
-
};
|
|
120
|
-
}, []);
|
|
121
|
-
React.useEffect(() => {
|
|
122
|
-
if (!dockviewRef.current) {
|
|
123
|
-
return () => {
|
|
124
|
-
// noop
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
const disposable = dockviewRef.current.onDidDrop((event) => {
|
|
128
|
-
if (props.onDidDrop) {
|
|
129
|
-
props.onDidDrop(event);
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
return () => {
|
|
133
|
-
disposable.dispose();
|
|
134
|
-
};
|
|
135
|
-
}, [props.onDidDrop]);
|
|
136
|
-
React.useEffect(() => {
|
|
137
|
-
if (!dockviewRef.current) {
|
|
138
|
-
return () => {
|
|
139
|
-
// noop
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
const disposable = dockviewRef.current.onWillDrop((event) => {
|
|
143
|
-
if (props.onWillDrop) {
|
|
144
|
-
props.onWillDrop(event);
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
return () => {
|
|
148
|
-
disposable.dispose();
|
|
149
|
-
};
|
|
150
|
-
}, [props.onWillDrop]);
|
|
151
|
-
React.useEffect(() => {
|
|
152
|
-
if (!dockviewRef.current) {
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
dockviewRef.current.updateOptions({
|
|
156
|
-
createTabGroupChipComponent: props.tabGroupChipComponent
|
|
157
|
-
? () => {
|
|
158
|
-
return new ReactTabGroupChipPart(props.tabGroupChipComponent, {
|
|
159
|
-
addPortal,
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
: undefined,
|
|
163
|
-
});
|
|
164
|
-
}, [props.tabGroupChipComponent]);
|
|
165
|
-
React.useEffect(() => {
|
|
166
|
-
if (!dockviewRef.current) {
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
dockviewRef.current.updateOptions({
|
|
170
|
-
createGroupDragGhostComponent: props.groupDragGhostComponent
|
|
171
|
-
? () => {
|
|
172
|
-
return new ReactGroupDragGhostPart(props.groupDragGhostComponent, {
|
|
173
|
-
addPortal,
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
: undefined,
|
|
177
|
-
});
|
|
178
|
-
}, [props.groupDragGhostComponent]);
|
|
179
|
-
React.useEffect(() => {
|
|
180
|
-
if (!dockviewRef.current) {
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
dockviewRef.current.updateOptions({
|
|
184
|
-
createComponent: (options) => {
|
|
185
|
-
return new ReactPanelContentPart(options.id, props.components[options.name], {
|
|
186
|
-
addPortal,
|
|
187
|
-
});
|
|
188
|
-
},
|
|
189
|
-
});
|
|
190
|
-
}, [props.components]);
|
|
191
|
-
React.useEffect(() => {
|
|
192
|
-
var _a;
|
|
193
|
-
if (!dockviewRef.current) {
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
const frameworkTabComponents = (_a = props.tabComponents) !== null && _a !== void 0 ? _a : {};
|
|
197
|
-
if (props.defaultTabComponent) {
|
|
198
|
-
frameworkTabComponents[DEFAULT_REACT_TAB] =
|
|
199
|
-
props.defaultTabComponent;
|
|
200
|
-
}
|
|
201
|
-
dockviewRef.current.updateOptions({
|
|
202
|
-
defaultTabComponent: props.defaultTabComponent
|
|
203
|
-
? DEFAULT_REACT_TAB
|
|
204
|
-
: undefined,
|
|
205
|
-
createTabComponent(options) {
|
|
206
|
-
return new ReactPanelHeaderPart(options.id, frameworkTabComponents[options.name], {
|
|
207
|
-
addPortal,
|
|
208
|
-
});
|
|
209
|
-
},
|
|
210
|
-
});
|
|
211
|
-
}, [props.tabComponents, props.defaultTabComponent]);
|
|
212
|
-
React.useEffect(() => {
|
|
213
|
-
if (!dockviewRef.current) {
|
|
214
|
-
return;
|
|
215
|
-
}
|
|
216
|
-
dockviewRef.current.updateOptions({
|
|
217
|
-
createWatermarkComponent: props.watermarkComponent
|
|
218
|
-
? () => {
|
|
219
|
-
return new ReactWatermarkPart('watermark', props.watermarkComponent, {
|
|
220
|
-
addPortal,
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
: undefined,
|
|
224
|
-
});
|
|
225
|
-
}, [props.watermarkComponent]);
|
|
226
|
-
React.useEffect(() => {
|
|
227
|
-
if (!dockviewRef.current) {
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
dockviewRef.current.updateOptions({
|
|
231
|
-
createRightHeaderActionComponent: createGroupControlElement(props.rightHeaderActionsComponent, { addPortal }),
|
|
232
|
-
});
|
|
233
|
-
}, [props.rightHeaderActionsComponent]);
|
|
234
|
-
React.useEffect(() => {
|
|
235
|
-
if (!dockviewRef.current) {
|
|
236
|
-
return;
|
|
237
|
-
}
|
|
238
|
-
dockviewRef.current.updateOptions({
|
|
239
|
-
createLeftHeaderActionComponent: createGroupControlElement(props.leftHeaderActionsComponent, { addPortal }),
|
|
240
|
-
});
|
|
241
|
-
}, [props.leftHeaderActionsComponent]);
|
|
242
|
-
React.useEffect(() => {
|
|
243
|
-
if (!dockviewRef.current) {
|
|
244
|
-
return;
|
|
245
|
-
}
|
|
246
|
-
dockviewRef.current.updateOptions({
|
|
247
|
-
createPrefixHeaderActionComponent: createGroupControlElement(props.prefixHeaderActionsComponent, { addPortal }),
|
|
248
|
-
});
|
|
249
|
-
}, [props.prefixHeaderActionsComponent]);
|
|
250
|
-
return (React.createElement("div", { style: { height: '100%', width: '100%' }, ref: domRef }, portals));
|
|
251
|
-
});
|
|
252
|
-
DockviewReact.displayName = 'DockviewComponent';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ReactPart, ReactPortalStore } from '../react';
|
|
3
|
-
import { DockviewApi, DockviewGroupPanel, DockviewGroupPanelApi, PanelUpdateEvent, IHeaderActionsRenderer, IDockviewHeaderActionsProps } from 'dockview-core';
|
|
4
|
-
export declare class ReactHeaderActionsRendererPart implements IHeaderActionsRenderer {
|
|
5
|
-
private readonly component;
|
|
6
|
-
private readonly reactPortalStore;
|
|
7
|
-
private readonly _group;
|
|
8
|
-
private readonly mutableDisposable;
|
|
9
|
-
private readonly _element;
|
|
10
|
-
private _part?;
|
|
11
|
-
get element(): HTMLElement;
|
|
12
|
-
get part(): ReactPart<IDockviewHeaderActionsProps> | undefined;
|
|
13
|
-
constructor(component: React.FunctionComponent<IDockviewHeaderActionsProps>, reactPortalStore: ReactPortalStore, _group: DockviewGroupPanel);
|
|
14
|
-
init(parameters: {
|
|
15
|
-
containerApi: DockviewApi;
|
|
16
|
-
api: DockviewGroupPanelApi;
|
|
17
|
-
}): void;
|
|
18
|
-
dispose(): void;
|
|
19
|
-
update(event: PanelUpdateEvent): void;
|
|
20
|
-
private updatePanels;
|
|
21
|
-
private updateActivePanel;
|
|
22
|
-
private updateGroupActive;
|
|
23
|
-
private updateLocation;
|
|
24
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { ReactPart } from '../react';
|
|
2
|
-
import { DockviewCompositeDisposable, DockviewMutableDisposable, } from 'dockview-core';
|
|
3
|
-
export class ReactHeaderActionsRendererPart {
|
|
4
|
-
get element() {
|
|
5
|
-
return this._element;
|
|
6
|
-
}
|
|
7
|
-
get part() {
|
|
8
|
-
return this._part;
|
|
9
|
-
}
|
|
10
|
-
constructor(component, reactPortalStore, _group) {
|
|
11
|
-
this.component = component;
|
|
12
|
-
this.reactPortalStore = reactPortalStore;
|
|
13
|
-
this._group = _group;
|
|
14
|
-
this.mutableDisposable = new DockviewMutableDisposable();
|
|
15
|
-
this._element = document.createElement('div');
|
|
16
|
-
this._element.className = 'dv-react-part';
|
|
17
|
-
this._element.style.height = '100%';
|
|
18
|
-
this._element.style.width = '100%';
|
|
19
|
-
}
|
|
20
|
-
init(parameters) {
|
|
21
|
-
this.mutableDisposable.value = new DockviewCompositeDisposable(this._group.model.onDidAddPanel(() => {
|
|
22
|
-
this.updatePanels();
|
|
23
|
-
}), this._group.model.onDidRemovePanel(() => {
|
|
24
|
-
this.updatePanels();
|
|
25
|
-
}), this._group.model.onDidActivePanelChange(() => {
|
|
26
|
-
this.updateActivePanel();
|
|
27
|
-
}), parameters.api.onDidActiveChange(() => {
|
|
28
|
-
this.updateGroupActive();
|
|
29
|
-
}), parameters.api.onDidLocationChange((event) => {
|
|
30
|
-
this.updateLocation(event.location);
|
|
31
|
-
}));
|
|
32
|
-
this._part = new ReactPart(this.element, this.reactPortalStore, this.component, {
|
|
33
|
-
api: parameters.api,
|
|
34
|
-
containerApi: parameters.containerApi,
|
|
35
|
-
panels: this._group.model.panels,
|
|
36
|
-
activePanel: this._group.model.activePanel,
|
|
37
|
-
isGroupActive: this._group.api.isActive,
|
|
38
|
-
group: this._group,
|
|
39
|
-
headerPosition: this._group.model.headerPosition,
|
|
40
|
-
location: parameters.api.location,
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
dispose() {
|
|
44
|
-
var _a;
|
|
45
|
-
this.mutableDisposable.dispose();
|
|
46
|
-
(_a = this._part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
47
|
-
}
|
|
48
|
-
update(event) {
|
|
49
|
-
var _a;
|
|
50
|
-
(_a = this._part) === null || _a === void 0 ? void 0 : _a.update(event.params);
|
|
51
|
-
}
|
|
52
|
-
updatePanels() {
|
|
53
|
-
this.update({ params: { panels: this._group.model.panels } });
|
|
54
|
-
}
|
|
55
|
-
updateActivePanel() {
|
|
56
|
-
this.update({
|
|
57
|
-
params: {
|
|
58
|
-
activePanel: this._group.model.activePanel,
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
updateGroupActive() {
|
|
63
|
-
this.update({
|
|
64
|
-
params: {
|
|
65
|
-
isGroupActive: this._group.api.isActive,
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
updateLocation(location) {
|
|
70
|
-
this.update({ params: { location } });
|
|
71
|
-
}
|
|
72
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ReactPortalStore } from '../react';
|
|
3
|
-
import { DockviewEvent, PanelUpdateEvent, IContentRenderer, GroupPanelPartInitParameters, IDockviewPanelProps } from 'dockview-core';
|
|
4
|
-
export declare class ReactPanelContentPart implements IContentRenderer {
|
|
5
|
-
readonly id: string;
|
|
6
|
-
private readonly component;
|
|
7
|
-
private readonly reactPortalStore;
|
|
8
|
-
private readonly _element;
|
|
9
|
-
private part?;
|
|
10
|
-
private readonly _onDidFocus;
|
|
11
|
-
readonly onDidFocus: DockviewEvent<void>;
|
|
12
|
-
private readonly _onDidBlur;
|
|
13
|
-
readonly onDidBlur: DockviewEvent<void>;
|
|
14
|
-
get element(): HTMLElement;
|
|
15
|
-
constructor(id: string, component: React.FunctionComponent<IDockviewPanelProps>, reactPortalStore: ReactPortalStore);
|
|
16
|
-
focus(): void;
|
|
17
|
-
init(parameters: GroupPanelPartInitParameters): void;
|
|
18
|
-
update(event: PanelUpdateEvent): void;
|
|
19
|
-
layout(_width: number, _height: number): void;
|
|
20
|
-
dispose(): void;
|
|
21
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { ReactPart } from '../react';
|
|
2
|
-
import { DockviewEmitter, } from 'dockview-core';
|
|
3
|
-
export class ReactPanelContentPart {
|
|
4
|
-
get element() {
|
|
5
|
-
return this._element;
|
|
6
|
-
}
|
|
7
|
-
constructor(id, component, reactPortalStore) {
|
|
8
|
-
this.id = id;
|
|
9
|
-
this.component = component;
|
|
10
|
-
this.reactPortalStore = reactPortalStore;
|
|
11
|
-
this._onDidFocus = new DockviewEmitter();
|
|
12
|
-
this.onDidFocus = this._onDidFocus.event;
|
|
13
|
-
this._onDidBlur = new DockviewEmitter();
|
|
14
|
-
this.onDidBlur = this._onDidBlur.event;
|
|
15
|
-
this._element = document.createElement('div');
|
|
16
|
-
this._element.className = 'dv-react-part';
|
|
17
|
-
this._element.style.height = '100%';
|
|
18
|
-
this._element.style.width = '100%';
|
|
19
|
-
}
|
|
20
|
-
focus() {
|
|
21
|
-
// TODO
|
|
22
|
-
}
|
|
23
|
-
init(parameters) {
|
|
24
|
-
this.part = new ReactPart(this.element, this.reactPortalStore, this.component, {
|
|
25
|
-
params: parameters.params,
|
|
26
|
-
api: parameters.api,
|
|
27
|
-
containerApi: parameters.containerApi,
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
update(event) {
|
|
31
|
-
var _a;
|
|
32
|
-
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update({ params: event.params });
|
|
33
|
-
}
|
|
34
|
-
layout(_width, _height) {
|
|
35
|
-
// noop
|
|
36
|
-
}
|
|
37
|
-
dispose() {
|
|
38
|
-
var _a;
|
|
39
|
-
this._onDidFocus.dispose();
|
|
40
|
-
this._onDidBlur.dispose();
|
|
41
|
-
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ReactPortalStore } from '../react';
|
|
3
|
-
import { IContextMenuItemRenderer, IContextMenuItemComponentProps } from 'dockview-core';
|
|
4
|
-
export declare class ReactContextMenuItemPart implements IContextMenuItemRenderer {
|
|
5
|
-
readonly id: string;
|
|
6
|
-
private readonly component;
|
|
7
|
-
private readonly reactPortalStore;
|
|
8
|
-
private readonly _element;
|
|
9
|
-
private part?;
|
|
10
|
-
get element(): HTMLElement;
|
|
11
|
-
constructor(id: string, component: React.FunctionComponent<IContextMenuItemComponentProps>, reactPortalStore: ReactPortalStore);
|
|
12
|
-
init(props: IContextMenuItemComponentProps): void;
|
|
13
|
-
dispose(): void;
|
|
14
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ReactPart } from '../react';
|
|
2
|
-
export class ReactContextMenuItemPart {
|
|
3
|
-
get element() {
|
|
4
|
-
return this._element;
|
|
5
|
-
}
|
|
6
|
-
constructor(id, component, reactPortalStore) {
|
|
7
|
-
this.id = id;
|
|
8
|
-
this.component = component;
|
|
9
|
-
this.reactPortalStore = reactPortalStore;
|
|
10
|
-
this._element = document.createElement('div');
|
|
11
|
-
this._element.className = 'dv-react-part';
|
|
12
|
-
this._element.style.height = '100%';
|
|
13
|
-
this._element.style.width = '100%';
|
|
14
|
-
}
|
|
15
|
-
init(props) {
|
|
16
|
-
this.part = new ReactPart(this._element, this.reactPortalStore, this.component, props);
|
|
17
|
-
}
|
|
18
|
-
dispose() {
|
|
19
|
-
var _a;
|
|
20
|
-
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ReactPortalStore } from '../react';
|
|
3
|
-
import { IDockviewGroupPanel, IGroupDragGhostRenderer, DockviewApi } from 'dockview-core';
|
|
4
|
-
export interface IDockviewGroupDragGhostProps {
|
|
5
|
-
group: IDockviewGroupPanel;
|
|
6
|
-
api: DockviewApi;
|
|
7
|
-
}
|
|
8
|
-
export declare class ReactGroupDragGhostPart implements IGroupDragGhostRenderer {
|
|
9
|
-
private readonly component;
|
|
10
|
-
private readonly reactPortalStore;
|
|
11
|
-
private readonly _element;
|
|
12
|
-
private part?;
|
|
13
|
-
get element(): HTMLElement;
|
|
14
|
-
constructor(component: React.FunctionComponent<IDockviewGroupDragGhostProps>, reactPortalStore: ReactPortalStore);
|
|
15
|
-
init(params: {
|
|
16
|
-
group: IDockviewGroupPanel;
|
|
17
|
-
api: DockviewApi;
|
|
18
|
-
}): void;
|
|
19
|
-
dispose(): void;
|
|
20
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ReactPart } from '../react';
|
|
2
|
-
export class ReactGroupDragGhostPart {
|
|
3
|
-
get element() {
|
|
4
|
-
return this._element;
|
|
5
|
-
}
|
|
6
|
-
constructor(component, reactPortalStore) {
|
|
7
|
-
this.component = component;
|
|
8
|
-
this.reactPortalStore = reactPortalStore;
|
|
9
|
-
this._element = document.createElement('div');
|
|
10
|
-
this._element.className = 'dv-react-part';
|
|
11
|
-
this._element.style.display = 'inline-flex';
|
|
12
|
-
}
|
|
13
|
-
init(params) {
|
|
14
|
-
this.part = new ReactPart(this._element, this.reactPortalStore, this.component, {
|
|
15
|
-
group: params.group,
|
|
16
|
-
api: params.api,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
dispose() {
|
|
20
|
-
var _a;
|
|
21
|
-
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ReactPortalStore } from '../react';
|
|
3
|
-
import { PanelUpdateEvent, ITabRenderer, TabPartInitParameters, IDockviewPanelHeaderProps } from 'dockview-core';
|
|
4
|
-
export declare class ReactPanelHeaderPart implements ITabRenderer {
|
|
5
|
-
readonly id: string;
|
|
6
|
-
private readonly component;
|
|
7
|
-
private readonly reactPortalStore;
|
|
8
|
-
private readonly _element;
|
|
9
|
-
private part?;
|
|
10
|
-
get element(): HTMLElement;
|
|
11
|
-
constructor(id: string, component: React.FunctionComponent<IDockviewPanelHeaderProps>, reactPortalStore: ReactPortalStore);
|
|
12
|
-
focus(): void;
|
|
13
|
-
init(parameters: TabPartInitParameters): void;
|
|
14
|
-
update(event: PanelUpdateEvent): void;
|
|
15
|
-
layout(_width: number, _height: number): void;
|
|
16
|
-
dispose(): void;
|
|
17
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ReactPart } from '../react';
|
|
2
|
-
export class ReactPanelHeaderPart {
|
|
3
|
-
get element() {
|
|
4
|
-
return this._element;
|
|
5
|
-
}
|
|
6
|
-
constructor(id, component, reactPortalStore) {
|
|
7
|
-
this.id = id;
|
|
8
|
-
this.component = component;
|
|
9
|
-
this.reactPortalStore = reactPortalStore;
|
|
10
|
-
this._element = document.createElement('div');
|
|
11
|
-
this._element.className = 'dv-react-part';
|
|
12
|
-
this._element.style.height = '100%';
|
|
13
|
-
this._element.style.width = '100%';
|
|
14
|
-
}
|
|
15
|
-
focus() {
|
|
16
|
-
//noop
|
|
17
|
-
}
|
|
18
|
-
init(parameters) {
|
|
19
|
-
this.part = new ReactPart(this.element, this.reactPortalStore, this.component, {
|
|
20
|
-
params: parameters.params,
|
|
21
|
-
api: parameters.api,
|
|
22
|
-
containerApi: parameters.containerApi,
|
|
23
|
-
tabLocation: parameters.tabLocation,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
update(event) {
|
|
27
|
-
var _a;
|
|
28
|
-
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update({ params: event.params });
|
|
29
|
-
}
|
|
30
|
-
layout(_width, _height) {
|
|
31
|
-
// noop - retrieval from api
|
|
32
|
-
}
|
|
33
|
-
dispose() {
|
|
34
|
-
var _a;
|
|
35
|
-
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ReactPortalStore } from '../react';
|
|
3
|
-
import { ITabGroupChipRenderer, ITabGroup, DockviewApi } from 'dockview-core';
|
|
4
|
-
export interface IDockviewTabGroupChipProps {
|
|
5
|
-
tabGroup: ITabGroup;
|
|
6
|
-
api: DockviewApi;
|
|
7
|
-
}
|
|
8
|
-
export declare class ReactTabGroupChipPart implements ITabGroupChipRenderer {
|
|
9
|
-
private readonly component;
|
|
10
|
-
private readonly reactPortalStore;
|
|
11
|
-
private readonly _element;
|
|
12
|
-
private part?;
|
|
13
|
-
get element(): HTMLElement;
|
|
14
|
-
constructor(component: React.FunctionComponent<IDockviewTabGroupChipProps>, reactPortalStore: ReactPortalStore);
|
|
15
|
-
init(params: {
|
|
16
|
-
tabGroup: ITabGroup;
|
|
17
|
-
api: DockviewApi;
|
|
18
|
-
}): void;
|
|
19
|
-
update(params: {
|
|
20
|
-
tabGroup: ITabGroup;
|
|
21
|
-
}): void;
|
|
22
|
-
dispose(): void;
|
|
23
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ReactPart } from '../react';
|
|
2
|
-
export class ReactTabGroupChipPart {
|
|
3
|
-
get element() {
|
|
4
|
-
return this._element;
|
|
5
|
-
}
|
|
6
|
-
constructor(component, reactPortalStore) {
|
|
7
|
-
this.component = component;
|
|
8
|
-
this.reactPortalStore = reactPortalStore;
|
|
9
|
-
this._element = document.createElement('div');
|
|
10
|
-
this._element.className = 'dv-react-part';
|
|
11
|
-
this._element.style.display = 'inline-flex';
|
|
12
|
-
}
|
|
13
|
-
init(params) {
|
|
14
|
-
this.part = new ReactPart(this._element, this.reactPortalStore, this.component, {
|
|
15
|
-
tabGroup: params.tabGroup,
|
|
16
|
-
api: params.api,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
update(params) {
|
|
20
|
-
var _a;
|
|
21
|
-
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update({ tabGroup: params.tabGroup });
|
|
22
|
-
}
|
|
23
|
-
dispose() {
|
|
24
|
-
var _a;
|
|
25
|
-
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ReactPortalStore } from '../react';
|
|
3
|
-
import { PanelUpdateEvent, IWatermarkRenderer, WatermarkRendererInitParameters, IWatermarkPanelProps } from 'dockview-core';
|
|
4
|
-
export declare class ReactWatermarkPart implements IWatermarkRenderer {
|
|
5
|
-
readonly id: string;
|
|
6
|
-
private readonly component;
|
|
7
|
-
private readonly reactPortalStore;
|
|
8
|
-
private readonly _element;
|
|
9
|
-
private part?;
|
|
10
|
-
private readonly parameters;
|
|
11
|
-
get element(): HTMLElement;
|
|
12
|
-
constructor(id: string, component: React.FunctionComponent<IWatermarkPanelProps>, reactPortalStore: ReactPortalStore);
|
|
13
|
-
init(parameters: WatermarkRendererInitParameters): void;
|
|
14
|
-
focus(): void;
|
|
15
|
-
update(params: PanelUpdateEvent): void;
|
|
16
|
-
layout(_width: number, _height: number): void;
|
|
17
|
-
dispose(): void;
|
|
18
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { ReactPart } from '../react';
|
|
2
|
-
export class ReactWatermarkPart {
|
|
3
|
-
get element() {
|
|
4
|
-
return this._element;
|
|
5
|
-
}
|
|
6
|
-
constructor(id, component, reactPortalStore) {
|
|
7
|
-
this.id = id;
|
|
8
|
-
this.component = component;
|
|
9
|
-
this.reactPortalStore = reactPortalStore;
|
|
10
|
-
this._element = document.createElement('div');
|
|
11
|
-
this._element.className = 'dv-react-part';
|
|
12
|
-
this._element.style.height = '100%';
|
|
13
|
-
this._element.style.width = '100%';
|
|
14
|
-
}
|
|
15
|
-
init(parameters) {
|
|
16
|
-
this.part = new ReactPart(this.element, this.reactPortalStore, this.component, {
|
|
17
|
-
group: parameters.group,
|
|
18
|
-
containerApi: parameters.containerApi,
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
focus() {
|
|
22
|
-
// noop
|
|
23
|
-
}
|
|
24
|
-
update(params) {
|
|
25
|
-
var _a, _b, _c;
|
|
26
|
-
if (this.parameters) {
|
|
27
|
-
this.parameters.params = params.params;
|
|
28
|
-
}
|
|
29
|
-
(_a = this.part) === null || _a === void 0 ? void 0 : _a.update({ params: (_c = (_b = this.parameters) === null || _b === void 0 ? void 0 : _b.params) !== null && _c !== void 0 ? _c : {} });
|
|
30
|
-
}
|
|
31
|
-
layout(_width, _height) {
|
|
32
|
-
// noop - retrieval from api
|
|
33
|
-
}
|
|
34
|
-
dispose() {
|
|
35
|
-
var _a;
|
|
36
|
-
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
37
|
-
}
|
|
38
|
-
}
|