Skip to content

Commit d2c203a

Browse files
committed
chore:update dockview to v4.3.1
1 parent 71806c3 commit d2c203a

2 files changed

Lines changed: 85 additions & 81 deletions

File tree

src/components/BootstrapBlazor.DockView/wwwroot/css/dockview.css

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,67 +1023,6 @@
10231023
pointer-events: none;
10241024
background-color: var(--dv-separator-border);
10251025
}
1026-
.dv-dragged {
1027-
transform: translate3d(0px, 0px, 0px); /* forces tab to be drawn on a separate layer (see https://github.com/microsoft/vscode/issues/18733) */
1028-
}
1029-
1030-
.dv-tab {
1031-
flex-shrink: 0;
1032-
}
1033-
.dv-tab:focus-within, .dv-tab:focus {
1034-
position: relative;
1035-
}
1036-
.dv-tab:focus-within::after, .dv-tab:focus::after {
1037-
position: absolute;
1038-
content: "";
1039-
height: 100%;
1040-
width: 100%;
1041-
top: 0px;
1042-
left: 0px;
1043-
pointer-events: none;
1044-
outline: 1px solid var(--dv-tab-divider-color) !important;
1045-
outline-offset: -1px;
1046-
z-index: 5;
1047-
}
1048-
.dv-tab.dv-tab-dragging .dv-default-tab-action {
1049-
background-color: var(--dv-activegroup-visiblepanel-tab-color);
1050-
}
1051-
.dv-tab.dv-active-tab .dv-default-tab .dv-default-tab-action {
1052-
visibility: visible;
1053-
}
1054-
.dv-tab.dv-inactive-tab .dv-default-tab .dv-default-tab-action {
1055-
visibility: hidden;
1056-
}
1057-
.dv-tab.dv-inactive-tab .dv-default-tab:hover .dv-default-tab-action {
1058-
visibility: visible;
1059-
}
1060-
.dv-tab .dv-default-tab {
1061-
position: relative;
1062-
height: 100%;
1063-
display: flex;
1064-
align-items: center;
1065-
white-space: nowrap;
1066-
text-overflow: ellipsis;
1067-
}
1068-
.dv-tab .dv-default-tab .dv-default-tab-content {
1069-
flex-grow: 1;
1070-
margin-right: 4px;
1071-
}
1072-
.dv-tab .dv-default-tab .dv-default-tab-action {
1073-
padding: 4px;
1074-
display: flex;
1075-
align-items: center;
1076-
justify-content: center;
1077-
box-sizing: border-box;
1078-
}
1079-
.dv-tab .dv-default-tab .dv-default-tab-action:hover {
1080-
border-radius: 2px;
1081-
background-color: var(--dv-icon-hover-background-color);
1082-
}
1083-
.dv-watermark {
1084-
display: flex;
1085-
height: 100%;
1086-
}
10871026
.dv-tabs-overflow-dropdown-default {
10881027
height: 100%;
10891028
color: var(--dv-activegroup-hiddenpanel-tab-color);
@@ -1189,4 +1128,65 @@
11891128
}
11901129
.dv-tabs-and-actions-container .dv-right-actions-container {
11911130
display: flex;
1131+
}
1132+
.dv-dragged {
1133+
transform: translate3d(0px, 0px, 0px); /* forces tab to be drawn on a separate layer (see https://github.com/microsoft/vscode/issues/18733) */
1134+
}
1135+
1136+
.dv-tab {
1137+
flex-shrink: 0;
1138+
}
1139+
.dv-tab:focus-within, .dv-tab:focus {
1140+
position: relative;
1141+
}
1142+
.dv-tab:focus-within::after, .dv-tab:focus::after {
1143+
position: absolute;
1144+
content: "";
1145+
height: 100%;
1146+
width: 100%;
1147+
top: 0px;
1148+
left: 0px;
1149+
pointer-events: none;
1150+
outline: 1px solid var(--dv-tab-divider-color) !important;
1151+
outline-offset: -1px;
1152+
z-index: 5;
1153+
}
1154+
.dv-tab.dv-tab-dragging .dv-default-tab-action {
1155+
background-color: var(--dv-activegroup-visiblepanel-tab-color);
1156+
}
1157+
.dv-tab.dv-active-tab .dv-default-tab .dv-default-tab-action {
1158+
visibility: visible;
1159+
}
1160+
.dv-tab.dv-inactive-tab .dv-default-tab .dv-default-tab-action {
1161+
visibility: hidden;
1162+
}
1163+
.dv-tab.dv-inactive-tab .dv-default-tab:hover .dv-default-tab-action {
1164+
visibility: visible;
1165+
}
1166+
.dv-tab .dv-default-tab {
1167+
position: relative;
1168+
height: 100%;
1169+
display: flex;
1170+
align-items: center;
1171+
white-space: nowrap;
1172+
text-overflow: ellipsis;
1173+
}
1174+
.dv-tab .dv-default-tab .dv-default-tab-content {
1175+
flex-grow: 1;
1176+
margin-right: 4px;
1177+
}
1178+
.dv-tab .dv-default-tab .dv-default-tab-action {
1179+
padding: 4px;
1180+
display: flex;
1181+
align-items: center;
1182+
justify-content: center;
1183+
box-sizing: border-box;
1184+
}
1185+
.dv-tab .dv-default-tab .dv-default-tab-action:hover {
1186+
border-radius: 2px;
1187+
background-color: var(--dv-icon-hover-background-color);
1188+
}
1189+
.dv-watermark {
1190+
display: flex;
1191+
height: 100%;
11921192
}

src/components/BootstrapBlazor.DockView/wwwroot/js/dockview-core.esm.js

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* dockview-core
3-
* @version 4.2.5
3+
* @version 4.3.1
44
* @link https://github.com/mathuo/dockview
55
* @license MIT
66
*/
@@ -185,7 +185,10 @@ class Emitter {
185185
return this._event;
186186
}
187187
fire(e) {
188-
this._last = e;
188+
var _a;
189+
if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.replay) {
190+
this._last = e;
191+
}
189192
for (const listener of this._listeners) {
190193
listener.callback(e);
191194
}
@@ -3950,9 +3953,9 @@ class Droptarget extends CompositeDisposable {
39503953
onDragOver: (e) => {
39513954
var _a, _b, _c, _d, _e, _f, _g;
39523955
Droptarget.ACTUAL_TARGET = this;
3953-
const overrideTraget = (_b = (_a = this.options).getOverrideTarget) === null || _b === void 0 ? void 0 : _b.call(_a);
3956+
const overrideTarget = (_b = (_a = this.options).getOverrideTarget) === null || _b === void 0 ? void 0 : _b.call(_a);
39543957
if (this._acceptedTargetZonesSet.size === 0) {
3955-
if (overrideTraget) {
3958+
if (overrideTarget) {
39563959
return;
39573960
}
39583961
this.removeDropTarget();
@@ -3979,7 +3982,7 @@ class Droptarget extends CompositeDisposable {
39793982
return;
39803983
}
39813984
if (!this.options.canDisplayOverlay(e, quadrant)) {
3982-
if (overrideTraget) {
3985+
if (overrideTarget) {
39833986
return;
39843987
}
39853988
this.removeDropTarget();
@@ -3999,7 +4002,7 @@ class Droptarget extends CompositeDisposable {
39994002
return;
40004003
}
40014004
this.markAsUsed(e);
4002-
if (overrideTraget) ;
4005+
if (overrideTarget) ;
40034006
else if (!this.targetElement) {
40044007
this.targetElement = document.createElement('div');
40054008
this.targetElement.className = 'dv-drop-target-dropzone';
@@ -5108,7 +5111,7 @@ class VoidContainer extends CompositeDisposable {
51085111
this.accessor.doSetGroupActive(this.group);
51095112
}));
51105113
const handler = new GroupDragHandler(this._element, accessor, group);
5111-
this.dropTraget = new Droptarget(this._element, {
5114+
this.dropTarget = new Droptarget(this._element, {
51125115
acceptedTargetZones: ['center'],
51135116
canDisplayOverlay: (event, position) => {
51145117
const data = getPanelData();
@@ -5119,12 +5122,12 @@ class VoidContainer extends CompositeDisposable {
51195122
},
51205123
getOverrideTarget: () => { var _a; return (_a = group.model.dropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; },
51215124
});
5122-
this.onWillShowOverlay = this.dropTraget.onWillShowOverlay;
5125+
this.onWillShowOverlay = this.dropTarget.onWillShowOverlay;
51235126
this.addDisposables(handler, handler.onDragStart((event) => {
51245127
this._onDragStart.fire(event);
5125-
}), this.dropTraget.onDrop((event) => {
5128+
}), this.dropTarget.onDrop((event) => {
51265129
this._onDrop.fire(event);
5127-
}), this.dropTraget);
5130+
}), this.dropTarget);
51285131
}
51295132
}
51305133

@@ -8350,7 +8353,7 @@ class DockviewComponent extends BaseGrid {
83508353
this.onDidPopoutGroupPositionChange = this._onDidPopoutGroupPositionChange.event;
83518354
this._onDidLayoutFromJSON = new Emitter();
83528355
this.onDidLayoutFromJSON = this._onDidLayoutFromJSON.event;
8353-
this._onDidActivePanelChange = new Emitter();
8356+
this._onDidActivePanelChange = new Emitter({ replay: true });
83548357
this.onDidActivePanelChange = this._onDidActivePanelChange.event;
83558358
this._onDidMovePanel = new Emitter();
83568359
this.onDidMovePanel = this._onDidMovePanel.event;
@@ -8569,9 +8572,11 @@ class DockviewComponent extends BaseGrid {
85698572
const gready = document.createElement('div');
85708573
gready.className = 'dv-overlay-render-container';
85718574
const overlayRenderContainer = new OverlayRenderContainer(gready, this);
8572-
const referenceGroup = itemToPopout instanceof DockviewPanel
8573-
? itemToPopout.group
8574-
: itemToPopout;
8575+
const referenceGroup = (options === null || options === void 0 ? void 0 : options.referenceGroup)
8576+
? options.referenceGroup
8577+
: itemToPopout instanceof DockviewPanel
8578+
? itemToPopout.group
8579+
: itemToPopout;
85758580
const referenceLocation = itemToPopout.api.location.type;
85768581
/**
85778582
* The group that is being added doesn't already exist within the DOM, the most likely occurance
@@ -9063,7 +9068,7 @@ class DockviewComponent extends BaseGrid {
90639068
return result;
90649069
}
90659070
fromJSON(data) {
9066-
var _a, _b, _c;
9071+
var _a, _b;
90679072
this.clear();
90689073
if (typeof data !== 'object' || data === null) {
90699074
throw new Error('serialized layout must be a non-null object');
@@ -9135,12 +9140,11 @@ class DockviewComponent extends BaseGrid {
91359140
for (const serializedPopoutGroup of serializedPopoutGroups) {
91369141
const { data, position, gridReferenceGroup, url } = serializedPopoutGroup;
91379142
const group = createGroupFromSerializedState(data);
9138-
this.addPopoutGroup((_c = (gridReferenceGroup
9139-
? this.getPanel(gridReferenceGroup)
9140-
: undefined)) !== null && _c !== void 0 ? _c : group, {
9143+
this.addPopoutGroup(group, {
91419144
position: position !== null && position !== void 0 ? position : undefined,
9142-
overridePopoutGroup: gridReferenceGroup
9143-
? group
9145+
overridePopoutGroup: gridReferenceGroup ? group : undefined,
9146+
referenceGroup: gridReferenceGroup
9147+
? this.getPanel(gridReferenceGroup)
91449148
: undefined,
91459149
popoutUrl: url,
91469150
});

0 commit comments

Comments
 (0)