dockview-core 6.6.1 → 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 +8 -1
- package/dist/cjs/api/component.api.d.ts +42 -21
- package/dist/cjs/api/component.api.js +111 -20
- package/dist/cjs/api/dockviewGroupPanelApi.d.ts +23 -8
- package/dist/cjs/api/dockviewGroupPanelApi.js +23 -0
- package/dist/cjs/api/dockviewPanelApi.d.ts +4 -3
- package/dist/cjs/api/dockviewPanelApi.js +8 -0
- package/dist/cjs/dnd/droptarget.d.ts +8 -0
- package/dist/cjs/dnd/droptarget.js +28 -0
- package/dist/cjs/dockview/accessibilityMessages.d.ts +32 -0
- package/dist/cjs/dockview/accessibilityMessages.js +51 -0
- package/dist/cjs/dockview/allModules.d.ts +8 -0
- package/dist/cjs/dockview/allModules.js +25 -0
- package/dist/cjs/dockview/components/panel/content.d.ts +2 -0
- package/dist/cjs/dockview/components/panel/content.js +35 -4
- package/dist/cjs/dockview/components/tab/tab.js +33 -5
- package/dist/cjs/dockview/components/titlebar/floatingTitleBar.d.ts +35 -0
- package/dist/cjs/dockview/components/titlebar/floatingTitleBar.js +95 -0
- package/dist/cjs/dockview/components/titlebar/groupDragSource.d.ts +52 -0
- package/dist/cjs/dockview/components/titlebar/groupDragSource.js +218 -0
- package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.d.ts +2 -1
- package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.js +31 -24
- package/dist/cjs/dockview/components/titlebar/tabGroups.js +1 -0
- package/dist/cjs/dockview/components/titlebar/tabs.d.ts +12 -0
- package/dist/cjs/dockview/components/titlebar/tabs.js +105 -2
- package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +4 -0
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js +13 -3
- package/dist/cjs/dockview/components/titlebar/voidContainer.d.ts +1 -4
- package/dist/cjs/dockview/components/titlebar/voidContainer.js +31 -155
- package/dist/cjs/dockview/dockviewComponent.d.ts +299 -44
- package/dist/cjs/dockview/dockviewComponent.js +1787 -1041
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.d.ts +33 -2
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.js +39 -3
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +0 -1
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +36 -14
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +133 -101
- package/dist/cjs/dockview/dockviewPanel.d.ts +2 -2
- package/dist/cjs/dockview/edgeGroupService.d.ts +38 -0
- package/dist/cjs/dockview/edgeGroupService.js +128 -0
- package/dist/cjs/dockview/floatingGroupService.d.ts +37 -0
- package/dist/cjs/dockview/floatingGroupService.js +231 -0
- package/dist/cjs/dockview/headerActionsService.d.ts +32 -0
- package/dist/cjs/dockview/headerActionsService.js +149 -0
- package/dist/cjs/dockview/liveRegionService.d.ts +53 -0
- package/dist/cjs/dockview/liveRegionService.js +185 -0
- package/dist/cjs/dockview/moduleContracts.d.ts +119 -0
- package/dist/cjs/dockview/moduleContracts.js +2 -0
- package/dist/cjs/dockview/modules.d.ts +110 -0
- package/dist/cjs/dockview/modules.js +304 -0
- package/dist/cjs/dockview/options.d.ts +159 -6
- package/dist/cjs/dockview/options.js +8 -1
- package/dist/cjs/dockview/popoutWindowService.d.ts +95 -0
- package/dist/cjs/dockview/popoutWindowService.js +261 -0
- package/dist/cjs/dockview/rootDropTargetService.d.ts +35 -0
- package/dist/cjs/dockview/rootDropTargetService.js +87 -0
- package/dist/cjs/dockview/watermarkService.d.ts +30 -0
- package/dist/cjs/dockview/watermarkService.js +61 -0
- package/dist/cjs/gridview/baseComponentGridview.d.ts +1 -1
- package/dist/cjs/gridview/baseComponentGridview.js +3 -2
- package/dist/cjs/gridview/gridviewComponent.d.ts +3 -3
- package/dist/cjs/gridview/gridviewPanel.d.ts +1 -1
- package/dist/cjs/index.d.ts +11 -4
- package/dist/cjs/index.js +14 -1
- package/dist/cjs/overlay/overlay.d.ts +43 -1
- package/dist/cjs/overlay/overlay.js +57 -8
- package/dist/cjs/paneview/draggablePaneviewPanel.d.ts +2 -2
- package/dist/cjs/paneview/draggablePaneviewPanel.js +4 -4
- package/dist/cjs/paneview/paneviewComponent.d.ts +3 -3
- package/dist/cjs/paneview/paneviewComponent.js +5 -5
- package/dist/dockview-core.js +3201 -1280
- package/dist/dockview-core.min.js +2 -2
- package/dist/dockview-core.min.js.map +1 -1
- package/dist/dockview-core.min.noStyle.js +2 -2
- package/dist/dockview-core.min.noStyle.js.map +1 -1
- package/dist/dockview-core.noStyle.js +3200 -1279
- package/dist/esm/api/component.api.d.ts +42 -21
- package/dist/esm/api/component.api.js +63 -18
- package/dist/esm/api/dockviewGroupPanelApi.d.ts +23 -8
- package/dist/esm/api/dockviewGroupPanelApi.js +19 -0
- package/dist/esm/api/dockviewPanelApi.d.ts +4 -3
- package/dist/esm/api/dockviewPanelApi.js +7 -0
- package/dist/esm/dnd/droptarget.d.ts +8 -0
- package/dist/esm/dnd/droptarget.js +28 -0
- package/dist/esm/dockview/accessibilityMessages.d.ts +32 -0
- package/dist/esm/dockview/accessibilityMessages.js +30 -0
- package/dist/esm/dockview/allModules.d.ts +8 -0
- package/dist/esm/dockview/allModules.js +22 -0
- package/dist/esm/dockview/components/panel/content.d.ts +2 -0
- package/dist/esm/dockview/components/panel/content.js +36 -5
- package/dist/esm/dockview/components/tab/tab.js +33 -5
- package/dist/esm/dockview/components/titlebar/floatingTitleBar.d.ts +35 -0
- package/dist/esm/dockview/components/titlebar/floatingTitleBar.js +65 -0
- package/dist/esm/dockview/components/titlebar/groupDragSource.d.ts +52 -0
- package/dist/esm/dockview/components/titlebar/groupDragSource.js +178 -0
- package/dist/esm/dockview/components/titlebar/tabGroupIndicator.d.ts +2 -1
- package/dist/esm/dockview/components/titlebar/tabGroupIndicator.js +31 -24
- package/dist/esm/dockview/components/titlebar/tabGroups.js +1 -0
- package/dist/esm/dockview/components/titlebar/tabs.d.ts +12 -0
- package/dist/esm/dockview/components/titlebar/tabs.js +102 -2
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +4 -0
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +8 -2
- package/dist/esm/dockview/components/titlebar/voidContainer.d.ts +1 -4
- package/dist/esm/dockview/components/titlebar/voidContainer.js +33 -145
- package/dist/esm/dockview/dockviewComponent.d.ts +299 -44
- package/dist/esm/dockview/dockviewComponent.js +1420 -743
- package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts +33 -2
- package/dist/esm/dockview/dockviewFloatingGroupPanel.js +35 -3
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +0 -1
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +36 -14
- package/dist/esm/dockview/dockviewGroupPanelModel.js +109 -93
- package/dist/esm/dockview/dockviewPanel.d.ts +2 -2
- package/dist/esm/dockview/edgeGroupService.d.ts +38 -0
- package/dist/esm/dockview/edgeGroupService.js +63 -0
- package/dist/esm/dockview/floatingGroupService.d.ts +37 -0
- package/dist/esm/dockview/floatingGroupService.js +150 -0
- package/dist/esm/dockview/headerActionsService.d.ts +32 -0
- package/dist/esm/dockview/headerActionsService.js +86 -0
- package/dist/esm/dockview/liveRegionService.d.ts +53 -0
- package/dist/esm/dockview/liveRegionService.js +159 -0
- package/dist/esm/dockview/moduleContracts.d.ts +119 -0
- package/dist/esm/dockview/moduleContracts.js +1 -0
- package/dist/esm/dockview/modules.d.ts +110 -0
- package/dist/esm/dockview/modules.js +170 -0
- package/dist/esm/dockview/options.d.ts +159 -6
- package/dist/esm/dockview/options.js +8 -1
- package/dist/esm/dockview/popoutWindowService.d.ts +95 -0
- package/dist/esm/dockview/popoutWindowService.js +175 -0
- package/dist/esm/dockview/rootDropTargetService.d.ts +35 -0
- package/dist/esm/dockview/rootDropTargetService.js +82 -0
- package/dist/esm/dockview/watermarkService.d.ts +30 -0
- package/dist/esm/dockview/watermarkService.js +56 -0
- package/dist/esm/gridview/baseComponentGridview.d.ts +1 -1
- package/dist/esm/gridview/baseComponentGridview.js +2 -2
- package/dist/esm/gridview/gridviewComponent.d.ts +3 -3
- package/dist/esm/gridview/gridviewPanel.d.ts +1 -1
- package/dist/esm/index.d.ts +11 -4
- package/dist/esm/index.js +4 -0
- package/dist/esm/overlay/overlay.d.ts +43 -1
- package/dist/esm/overlay/overlay.js +53 -8
- package/dist/esm/paneview/draggablePaneviewPanel.d.ts +2 -2
- package/dist/esm/paneview/draggablePaneviewPanel.js +4 -4
- package/dist/esm/paneview/paneviewComponent.d.ts +3 -3
- package/dist/esm/paneview/paneviewComponent.js +5 -5
- package/dist/package/main.cjs.js +3236 -1315
- package/dist/package/main.cjs.min.js +2 -2
- package/dist/package/main.esm.min.mjs +2 -2
- package/dist/package/main.esm.mjs +3191 -1281
- package/dist/styles/dockview.css +275 -13
- package/package.json +10 -1
- package/dist/cjs/dockview/contextMenu.d.ts +0 -10
- package/dist/cjs/dockview/contextMenu.js +0 -313
- package/dist/esm/dockview/contextMenu.d.ts +0 -10
- package/dist/esm/dockview/contextMenu.js +0 -228
|
@@ -14,17 +14,6 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
18
|
exports.VoidContainer = void 0;
|
|
30
19
|
var dataTransfer_1 = require("../../../dnd/dataTransfer");
|
|
@@ -32,29 +21,20 @@ var backend_1 = require("../../../dnd/backend");
|
|
|
32
21
|
var events_1 = require("../../../events");
|
|
33
22
|
var lifecycle_1 = require("../../../lifecycle");
|
|
34
23
|
var dom_1 = require("../../../dom");
|
|
35
|
-
var
|
|
36
|
-
// Floating-group redock via touch: require a deliberate long press so the
|
|
37
|
-
// "move the float around" gesture doesn't double-trigger the redock ghost.
|
|
38
|
-
// Infinity pressTolerance disables the pre-arm flick override; any motion
|
|
39
|
-
// during the wait is treated as drag-the-float, not redock intent.
|
|
40
|
-
var FLOATING_REDOCK_INITIATION_DELAY_MS = 500;
|
|
24
|
+
var groupDragSource_1 = require("./groupDragSource");
|
|
41
25
|
var VoidContainer = /** @class */ (function (_super) {
|
|
42
26
|
__extends(VoidContainer, _super);
|
|
43
27
|
function VoidContainer(accessor, group) {
|
|
44
|
-
var _a, _b;
|
|
28
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
45
29
|
var _this = _super.call(this) || this;
|
|
46
30
|
_this.accessor = accessor;
|
|
47
31
|
_this.group = group;
|
|
48
|
-
_this.panelTransfer = dataTransfer_1.LocalSelectionTransfer.getInstance();
|
|
49
32
|
_this._onDrop = new events_1.Emitter();
|
|
50
33
|
_this.onDrop = _this._onDrop.event;
|
|
51
34
|
_this._onDragStart = new events_1.Emitter();
|
|
52
35
|
_this.onDragStart = _this._onDragStart.event;
|
|
53
|
-
var caps = (0, dndCapabilities_1.resolveDndCapabilities)(_this.accessor.options);
|
|
54
36
|
_this._element = document.createElement('div');
|
|
55
37
|
_this._element.className = 'dv-void-container';
|
|
56
|
-
_this._element.draggable = caps.html5;
|
|
57
|
-
(0, dom_1.toggleClass)(_this._element, 'dv-draggable', caps.html5 || caps.pointer);
|
|
58
38
|
_this.addDisposables(_this._onDrop, _this._onDragStart, (0, events_1.addDisposableListener)(_this._element, 'pointerdown', function () {
|
|
59
39
|
_this.accessor.doSetGroupActive(_this.group);
|
|
60
40
|
}),
|
|
@@ -68,6 +48,20 @@ var VoidContainer = /** @class */ (function (_super) {
|
|
|
68
48
|
(0, dom_1.quasiPreventDefault)(e);
|
|
69
49
|
}
|
|
70
50
|
}, true));
|
|
51
|
+
// The drag-source (move-the-float disambiguation, redock ghost and
|
|
52
|
+
// group-level PanelTransfer) is shared with the floating title bar.
|
|
53
|
+
_this.dragSource = new groupDragSource_1.GroupDragSource({
|
|
54
|
+
element: _this._element,
|
|
55
|
+
accessor: _this.accessor,
|
|
56
|
+
group: _this.group,
|
|
57
|
+
// The void container is the float's move handle only when there is
|
|
58
|
+
// no dedicated title bar. When a title bar moves the float (the
|
|
59
|
+
// overlay is `.dv-resize-container-with-titlebar`), the void
|
|
60
|
+
// container redocks with a plain drag, like a group in the grid.
|
|
61
|
+
isFloatingMoveHandle: function () {
|
|
62
|
+
return !_this._element.closest('.dv-resize-container-with-titlebar');
|
|
63
|
+
},
|
|
64
|
+
});
|
|
71
65
|
var canDisplayOverlay = function (event, position) {
|
|
72
66
|
if (_this.group.api.locked) {
|
|
73
67
|
// Dropping on the void/header space adds the panel
|
|
@@ -85,135 +79,30 @@ var VoidContainer = /** @class */ (function (_super) {
|
|
|
85
79
|
acceptedTargetZones: ['center'],
|
|
86
80
|
canDisplayOverlay: canDisplayOverlay,
|
|
87
81
|
getOverrideTarget: function () { var _a; return (_a = group.model.dropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; },
|
|
82
|
+
overlayModel: (_b = (_a = _this.accessor).resolveDropOverlayModel) === null || _b === void 0 ? void 0 : _b.call(_a, 'header_space', _this.group),
|
|
88
83
|
});
|
|
89
84
|
_this.pointerDropTarget = backend_1.pointerBackend.createDropTarget(_this._element, {
|
|
90
85
|
acceptedTargetZones: ['center'],
|
|
91
86
|
canDisplayOverlay: canDisplayOverlay,
|
|
92
87
|
getOverrideTarget: function () { var _a; return (_a = group.model.dropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; },
|
|
88
|
+
overlayModel: (_d = (_c = _this.accessor).resolveDropOverlayModel) === null || _d === void 0 ? void 0 : _d.call(_c, 'header_space', _this.group),
|
|
93
89
|
});
|
|
94
|
-
var buildMultiPanelsGhost = function () {
|
|
95
|
-
var ghostEl = document.createElement('div');
|
|
96
|
-
var style = window.getComputedStyle(_this._element);
|
|
97
|
-
var bgColor = style.getPropertyValue('--dv-activegroup-visiblepanel-tab-background-color');
|
|
98
|
-
var color = style.getPropertyValue('--dv-activegroup-visiblepanel-tab-color');
|
|
99
|
-
ghostEl.style.backgroundColor = bgColor;
|
|
100
|
-
ghostEl.style.color = color;
|
|
101
|
-
ghostEl.style.padding = '2px 8px';
|
|
102
|
-
ghostEl.style.height = '24px';
|
|
103
|
-
ghostEl.style.fontSize = '11px';
|
|
104
|
-
ghostEl.style.lineHeight = '20px';
|
|
105
|
-
ghostEl.style.borderRadius = '12px';
|
|
106
|
-
ghostEl.style.whiteSpace = 'nowrap';
|
|
107
|
-
ghostEl.style.boxSizing = 'border-box';
|
|
108
|
-
// HTML5 setDragImage snapshots the element as appended to the
|
|
109
|
-
// document; a default block-level div would stretch to the
|
|
110
|
-
// body's width and render as a viewport-wide bar.
|
|
111
|
-
ghostEl.style.display = 'inline-block';
|
|
112
|
-
ghostEl.textContent = "Multiple Panels (".concat(_this.group.size, ")");
|
|
113
|
-
return ghostEl;
|
|
114
|
-
};
|
|
115
|
-
var buildGhostSpec = function () {
|
|
116
|
-
var createGhost = _this.accessor.options.createGroupDragGhostComponent;
|
|
117
|
-
if (createGhost) {
|
|
118
|
-
var renderer_1 = createGhost(_this.group);
|
|
119
|
-
renderer_1.init({
|
|
120
|
-
group: _this.group,
|
|
121
|
-
api: _this.accessor.api,
|
|
122
|
-
});
|
|
123
|
-
return {
|
|
124
|
-
element: renderer_1.element,
|
|
125
|
-
offsetX: 30,
|
|
126
|
-
offsetY: -10,
|
|
127
|
-
dispose: renderer_1.dispose
|
|
128
|
-
? function () { var _a; return (_a = renderer_1.dispose) === null || _a === void 0 ? void 0 : _a.call(renderer_1); }
|
|
129
|
-
: undefined,
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
return {
|
|
133
|
-
element: buildMultiPanelsGhost(),
|
|
134
|
-
offsetX: 30,
|
|
135
|
-
offsetY: -10,
|
|
136
|
-
};
|
|
137
|
-
};
|
|
138
|
-
var sharedDragOptions = {
|
|
139
|
-
getData: function () {
|
|
140
|
-
_this.panelTransfer.setData([new dataTransfer_1.PanelTransfer(_this.accessor.id, _this.group.id, null)], dataTransfer_1.PanelTransfer.prototype);
|
|
141
|
-
return {
|
|
142
|
-
dispose: function () {
|
|
143
|
-
_this.panelTransfer.clearData(dataTransfer_1.PanelTransfer.prototype);
|
|
144
|
-
},
|
|
145
|
-
};
|
|
146
|
-
},
|
|
147
|
-
createGhost: buildGhostSpec,
|
|
148
|
-
onDragStart: function (event) {
|
|
149
|
-
_this._onDragStart.fire(event);
|
|
150
|
-
},
|
|
151
|
-
};
|
|
152
|
-
_this.html5DragSource = backend_1.html5Backend.createDragSource(_this._element, __assign(__assign({}, sharedDragOptions), { disabled: !caps.html5, isCancelled: function (event) {
|
|
153
|
-
// HTML5: floating groups need shift+drag as the explicit
|
|
154
|
-
// detach gesture (otherwise click-and-drag conflicts with
|
|
155
|
-
// moving the floating group itself).
|
|
156
|
-
if (_this.group.api.location.type === 'floating' &&
|
|
157
|
-
!event.shiftKey) {
|
|
158
|
-
return true;
|
|
159
|
-
}
|
|
160
|
-
if (_this.group.api.location.type === 'edge' &&
|
|
161
|
-
_this.group.size === 0) {
|
|
162
|
-
return true;
|
|
163
|
-
}
|
|
164
|
-
return false;
|
|
165
|
-
} }));
|
|
166
|
-
var isFloating = function () { var _a, _b, _c; return ((_c = (_b = (_a = _this.group) === null || _a === void 0 ? void 0 : _a.api) === null || _b === void 0 ? void 0 : _b.location) === null || _c === void 0 ? void 0 : _c.type) === 'floating'; };
|
|
167
|
-
_this.pointerDragSource = backend_1.pointerBackend.createDragSource(_this._element, __assign(__assign({}, sharedDragOptions), { disabled: !caps.pointer, touchOnly: !caps.pointerHandlesMouse,
|
|
168
|
-
// Floating groups share this element with the overlay's
|
|
169
|
-
// move-the-float drag. Without a longer hold + tolerance
|
|
170
|
-
// override, both gestures commit simultaneously and the
|
|
171
|
-
// user sees the float follow their finger *and* a ghost.
|
|
172
|
-
touchInitiationDelay: function () {
|
|
173
|
-
return isFloating() ? FLOATING_REDOCK_INITIATION_DELAY_MS : 250;
|
|
174
|
-
}, pressTolerance: function () { return (isFloating() ? Infinity : 8); }, isCancelled: function () {
|
|
175
|
-
if (!(0, dndCapabilities_1.resolveDndCapabilities)(_this.accessor.options).pointer) {
|
|
176
|
-
return true;
|
|
177
|
-
}
|
|
178
|
-
// Pointer: long-press IS the deliberate gesture, so
|
|
179
|
-
// floating groups don't need the shift gate.
|
|
180
|
-
if (_this.group.api.location.type === 'edge' &&
|
|
181
|
-
_this.group.size === 0) {
|
|
182
|
-
return true;
|
|
183
|
-
}
|
|
184
|
-
return false;
|
|
185
|
-
}, onDragStart: function (event) {
|
|
186
|
-
var _a;
|
|
187
|
-
// Redock just committed — abort any in-flight overlay
|
|
188
|
-
// move so the float stops following the finger while
|
|
189
|
-
// the ghost takes over.
|
|
190
|
-
(_a = _this.getFloatingOverlay()) === null || _a === void 0 ? void 0 : _a.cancelPendingDrag();
|
|
191
|
-
_this._onDragStart.fire(event);
|
|
192
|
-
} }));
|
|
193
|
-
// Mirror direction: once the overlay's move-the-float gesture has
|
|
194
|
-
// actually moved something, cancel the pending redock arm so the
|
|
195
|
-
// ghost doesn't appear mid-drag if the user holds past 500ms.
|
|
196
|
-
var overlayMoveSub = new lifecycle_1.MutableDisposable();
|
|
197
|
-
var refreshOverlayMoveSub = function () {
|
|
198
|
-
var overlay = _this.getFloatingOverlay();
|
|
199
|
-
overlayMoveSub.value = overlay
|
|
200
|
-
? overlay.onDidStartMoving(function () {
|
|
201
|
-
_this.pointerDragSource.cancelPending();
|
|
202
|
-
})
|
|
203
|
-
: lifecycle_1.Disposable.NONE;
|
|
204
|
-
};
|
|
205
|
-
refreshOverlayMoveSub();
|
|
206
|
-
_this.addDisposables(overlayMoveSub);
|
|
207
|
-
var locationChange = (_b = (_a = _this.group) === null || _a === void 0 ? void 0 : _a.api) === null || _b === void 0 ? void 0 : _b.onDidLocationChange;
|
|
208
|
-
if (locationChange) {
|
|
209
|
-
_this.addDisposables(locationChange(refreshOverlayMoveSub));
|
|
210
|
-
}
|
|
211
90
|
_this.onWillShowOverlay = events_1.Event.any(_this.dropTarget.onWillShowOverlay, _this.pointerDropTarget.onWillShowOverlay);
|
|
212
|
-
_this.addDisposables(_this.
|
|
91
|
+
_this.addDisposables(_this.dragSource, _this.dragSource.onDragStart(function (event) {
|
|
92
|
+
_this._onDragStart.fire(event);
|
|
93
|
+
}), _this.dropTarget.onDrop(function (event) {
|
|
213
94
|
_this._onDrop.fire(event);
|
|
214
95
|
}), _this.pointerDropTarget.onDrop(function (event) {
|
|
215
96
|
_this._onDrop.fire(event);
|
|
216
|
-
}), _this.dropTarget, _this.pointerDropTarget,
|
|
97
|
+
}), _this.dropTarget, _this.pointerDropTarget,
|
|
98
|
+
// Re-apply the app-supplied overlay model when options change.
|
|
99
|
+
// `{}` resets to the built-in default (all fields optional).
|
|
100
|
+
(_g = (_f = (_e = _this.accessor).onDidOptionsChange) === null || _f === void 0 ? void 0 : _f.call(_e, function () {
|
|
101
|
+
var _a, _b, _c;
|
|
102
|
+
var model = (_c = (_b = (_a = _this.accessor).resolveDropOverlayModel) === null || _b === void 0 ? void 0 : _b.call(_a, 'header_space', _this.group)) !== null && _c !== void 0 ? _c : {};
|
|
103
|
+
_this.dropTarget.setOverlayModel(model);
|
|
104
|
+
_this.pointerDropTarget.setOverlayModel(model);
|
|
105
|
+
})) !== null && _g !== void 0 ? _g : lifecycle_1.Disposable.NONE);
|
|
217
106
|
return _this;
|
|
218
107
|
}
|
|
219
108
|
Object.defineProperty(VoidContainer.prototype, "element", {
|
|
@@ -224,20 +113,7 @@ var VoidContainer = /** @class */ (function (_super) {
|
|
|
224
113
|
configurable: true
|
|
225
114
|
});
|
|
226
115
|
VoidContainer.prototype.updateDragAndDropState = function () {
|
|
227
|
-
|
|
228
|
-
this._element.draggable = caps.html5;
|
|
229
|
-
(0, dom_1.toggleClass)(this._element, 'dv-draggable', caps.html5 || caps.pointer);
|
|
230
|
-
this.html5DragSource.setDisabled(!caps.html5);
|
|
231
|
-
this.pointerDragSource.setDisabled(!caps.pointer);
|
|
232
|
-
this.pointerDragSource.setTouchOnly(!caps.pointerHandlesMouse);
|
|
233
|
-
};
|
|
234
|
-
VoidContainer.prototype.getFloatingOverlay = function () {
|
|
235
|
-
var _this = this;
|
|
236
|
-
var _a, _b;
|
|
237
|
-
if (!this.group) {
|
|
238
|
-
return undefined;
|
|
239
|
-
}
|
|
240
|
-
return (_b = (_a = this.accessor.floatingGroups) === null || _a === void 0 ? void 0 : _a.find(function (fg) { return fg.group === _this.group; })) === null || _b === void 0 ? void 0 : _b.overlay;
|
|
116
|
+
this.dragSource.updateDragAndDropState();
|
|
241
117
|
};
|
|
242
118
|
return VoidContainer;
|
|
243
119
|
}(lifecycle_1.CompositeDisposable));
|