dockview-core 7.0.4 → 8.1.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/LICENCE.md +21 -0
- package/README.md +17 -86
- package/dist/cjs/api/component.api.d.ts +100 -9
- package/dist/cjs/api/dockviewGroupPanelApi.d.ts +45 -1
- package/dist/cjs/api/dockviewPanelApi.d.ts +21 -0
- package/dist/cjs/dismissableLayer.d.ts +57 -0
- package/dist/cjs/dnd/backend.d.ts +2 -2
- package/dist/cjs/dnd/dataTransfer.d.ts +1 -0
- package/dist/cjs/dnd/dropTargetAnchorContainer.d.ts +12 -0
- package/dist/cjs/dnd/droptarget.d.ts +94 -0
- package/dist/cjs/dnd/ghost.d.ts +1 -0
- package/dist/cjs/dnd/pointer/longPress.d.ts +2 -2
- package/dist/cjs/dnd/pointer/pointerDragController.d.ts +5 -2
- package/dist/cjs/dnd/pointer/pointerDragSource.d.ts +1 -1
- package/dist/cjs/dnd/pointer/pointerDropTarget.d.ts +30 -1
- package/dist/cjs/dnd/pointer/pointerGhost.d.ts +1 -1
- package/dist/cjs/dockview/accessibilityMessages.d.ts +6 -0
- package/dist/cjs/dockview/advancedDnDService.d.ts +31 -0
- package/dist/cjs/dockview/components/panel/content.d.ts +1 -1
- package/dist/cjs/dockview/components/tab/defaultTab.d.ts +2 -0
- package/dist/cjs/dockview/components/tab/tab.d.ts +2 -0
- package/dist/cjs/dockview/components/titlebar/floatingTitleBar.d.ts +2 -2
- package/dist/cjs/dockview/components/titlebar/groupDragSource.d.ts +1 -1
- package/dist/cjs/dockview/components/titlebar/tabGroupChip.d.ts +1 -1
- package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.d.ts +73 -2
- package/dist/cjs/dockview/components/titlebar/tabGroups.d.ts +1 -1
- package/dist/cjs/dockview/components/titlebar/tabReorderController.d.ts +295 -0
- package/dist/cjs/dockview/components/titlebar/tabs.d.ts +120 -50
- package/dist/cjs/dockview/components/titlebar/tabsContainer.d.ts +48 -0
- package/dist/cjs/dockview/dndCapabilities.d.ts +1 -1
- package/dist/cjs/dockview/dockviewComponent.d.ts +307 -19
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +5 -0
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +76 -2
- package/dist/cjs/dockview/dockviewPanel.d.ts +12 -0
- package/dist/cjs/dockview/dockviewShell.d.ts +48 -24
- package/dist/cjs/dockview/edgeGroupService.d.ts +20 -0
- package/dist/cjs/dockview/events.d.ts +6 -0
- package/dist/cjs/dockview/liveRegionService.d.ts +18 -5
- package/dist/cjs/dockview/moduleContracts.d.ts +485 -14
- package/dist/cjs/dockview/modules.d.ts +101 -22
- package/dist/cjs/dockview/options.d.ts +336 -30
- package/dist/cjs/dockview/optionsModules.d.ts +73 -0
- package/dist/cjs/dockview/popoutWindowService.d.ts +15 -10
- package/dist/cjs/dockview/rootDropTargetService.d.ts +11 -0
- package/dist/cjs/dockview/tabGroup.d.ts +3 -0
- package/dist/cjs/dockview/tabGroupAccent.d.ts +1 -1
- package/dist/cjs/dockview/tabGroupChipsService.d.ts +10 -0
- package/dist/cjs/dockview/theme.d.ts +2 -2
- package/dist/cjs/dockview/types.d.ts +3 -0
- package/dist/cjs/dom.d.ts +9 -1
- package/dist/cjs/events.d.ts +1 -1
- package/dist/cjs/gridview/baseComponentGridview.d.ts +2 -2
- package/dist/cjs/gridview/branchNode.d.ts +16 -0
- package/dist/cjs/gridview/gridview.d.ts +2 -0
- package/dist/cjs/index.d.ts +35 -29
- package/dist/cjs/lifecycle.d.ts +1 -0
- package/dist/cjs/overlay/overlay.d.ts +4 -2
- package/dist/cjs/overlay/overlayRenderContainer.d.ts +8 -0
- package/dist/cjs/paneview/paneview.d.ts +2 -1
- package/dist/cjs/paneview/paneviewComponent.d.ts +3 -0
- package/dist/cjs/paneview/paneviewPanel.d.ts +5 -0
- package/dist/cjs/scrollbar.d.ts +10 -0
- package/dist/cjs/splitview/viewItem.d.ts +10 -0
- package/dist/cjs/svg.d.ts +1 -0
- package/dist/cjs/types.d.ts +8 -0
- package/dist/dockview-core.js +18513 -19679
- package/dist/dockview-core.min.js +4138 -6
- package/dist/dockview-core.min.noStyle.js +6 -7
- package/dist/dockview-core.noStyle.js +18512 -19656
- package/dist/package/main.cjs.js +18123 -19267
- package/dist/package/main.cjs.min.js +6 -6
- package/dist/package/main.esm.min.mjs +6 -6
- package/dist/package/main.esm.mjs +18081 -19260
- package/package.json +81 -77
- package/dist/cjs/api/component.api.js +0 -1242
- package/dist/cjs/api/dockviewGroupPanelApi.js +0 -200
- package/dist/cjs/api/dockviewPanelApi.js +0 -172
- package/dist/cjs/api/entryPoints.js +0 -27
- package/dist/cjs/api/gridviewPanelApi.js +0 -45
- package/dist/cjs/api/panelApi.js +0 -133
- package/dist/cjs/api/paneviewPanelApi.js +0 -57
- package/dist/cjs/api/splitviewPanelApi.js +0 -47
- package/dist/cjs/array.js +0 -66
- package/dist/cjs/constants.js +0 -11
- package/dist/cjs/dnd/backend.js +0 -171
- package/dist/cjs/dnd/dataTransfer.js +0 -100
- package/dist/cjs/dnd/dnd.js +0 -74
- package/dist/cjs/dnd/dropOverlay.js +0 -197
- package/dist/cjs/dnd/dropTargetAnchorContainer.js +0 -104
- package/dist/cjs/dnd/droptarget.js +0 -362
- package/dist/cjs/dnd/ghost.js +0 -17
- package/dist/cjs/dnd/pointer/index.js +0 -13
- package/dist/cjs/dnd/pointer/longPress.js +0 -151
- package/dist/cjs/dnd/pointer/pointerDragController.js +0 -243
- package/dist/cjs/dnd/pointer/pointerDragSource.js +0 -197
- package/dist/cjs/dnd/pointer/pointerDropTarget.js +0 -198
- package/dist/cjs/dnd/pointer/pointerGhost.js +0 -44
- package/dist/cjs/dnd/pointer/types.js +0 -2
- package/dist/cjs/dockview/accessibilityMessages.js +0 -51
- package/dist/cjs/dockview/allModules.js +0 -25
- package/dist/cjs/dockview/components/panel/content.js +0 -213
- package/dist/cjs/dockview/components/popupService.js +0 -132
- package/dist/cjs/dockview/components/tab/defaultTab.js +0 -70
- package/dist/cjs/dockview/components/tab/tab.js +0 -281
- package/dist/cjs/dockview/components/titlebar/floatingTitleBar.js +0 -95
- package/dist/cjs/dockview/components/titlebar/groupDragSource.js +0 -218
- package/dist/cjs/dockview/components/titlebar/tabGroupChip.js +0 -104
- package/dist/cjs/dockview/components/titlebar/tabGroupIndicator.js +0 -477
- package/dist/cjs/dockview/components/titlebar/tabGroups.js +0 -854
- package/dist/cjs/dockview/components/titlebar/tabOverflowControl.js +0 -19
- package/dist/cjs/dockview/components/titlebar/tabs.js +0 -2016
- package/dist/cjs/dockview/components/titlebar/tabsContainer.js +0 -458
- package/dist/cjs/dockview/components/titlebar/voidContainer.js +0 -120
- package/dist/cjs/dockview/components/watermark/watermark.js +0 -40
- package/dist/cjs/dockview/deserializer.js +0 -39
- package/dist/cjs/dockview/dndCapabilities.js +0 -39
- package/dist/cjs/dockview/dockviewComponent.js +0 -3896
- package/dist/cjs/dockview/dockviewFloatingGroupPanel.js +0 -70
- package/dist/cjs/dockview/dockviewGroupPanel.js +0 -204
- package/dist/cjs/dockview/dockviewGroupPanelModel.js +0 -1514
- package/dist/cjs/dockview/dockviewPanel.js +0 -265
- package/dist/cjs/dockview/dockviewPanelModel.js +0 -105
- package/dist/cjs/dockview/dockviewShell.js +0 -744
- package/dist/cjs/dockview/edgeGroupService.js +0 -128
- package/dist/cjs/dockview/events.js +0 -67
- package/dist/cjs/dockview/floatingGroupService.js +0 -231
- package/dist/cjs/dockview/framework.js +0 -2
- package/dist/cjs/dockview/headerActionsService.js +0 -149
- package/dist/cjs/dockview/liveRegionService.js +0 -185
- package/dist/cjs/dockview/moduleContracts.js +0 -2
- package/dist/cjs/dockview/modules.js +0 -304
- package/dist/cjs/dockview/options.js +0 -103
- package/dist/cjs/dockview/popoutWindowService.js +0 -261
- package/dist/cjs/dockview/rootDropTargetService.js +0 -87
- package/dist/cjs/dockview/strictEventsSequencing.js +0 -63
- package/dist/cjs/dockview/tabGroup.js +0 -219
- package/dist/cjs/dockview/tabGroupAccent.js +0 -126
- package/dist/cjs/dockview/theme.js +0 -139
- package/dist/cjs/dockview/types.js +0 -2
- package/dist/cjs/dockview/validate.js +0 -76
- package/dist/cjs/dockview/watermarkService.js +0 -61
- package/dist/cjs/dom.js +0 -543
- package/dist/cjs/events.js +0 -296
- package/dist/cjs/framwork.js +0 -2
- package/dist/cjs/gridview/baseComponentGridview.js +0 -330
- package/dist/cjs/gridview/basePanelView.js +0 -162
- package/dist/cjs/gridview/branchNode.js +0 -372
- package/dist/cjs/gridview/gridview.js +0 -776
- package/dist/cjs/gridview/gridviewComponent.js +0 -363
- package/dist/cjs/gridview/gridviewPanel.js +0 -249
- package/dist/cjs/gridview/leafNode.js +0 -169
- package/dist/cjs/gridview/options.js +0 -17
- package/dist/cjs/gridview/types.js +0 -2
- package/dist/cjs/index.js +0 -105
- package/dist/cjs/lifecycle.js +0 -80
- package/dist/cjs/math.js +0 -38
- package/dist/cjs/overlay/overlay.js +0 -602
- package/dist/cjs/overlay/overlayRenderContainer.js +0 -309
- package/dist/cjs/panel/types.js +0 -2
- package/dist/cjs/paneview/defaultPaneviewHeader.js +0 -92
- package/dist/cjs/paneview/draggablePaneviewPanel.js +0 -141
- package/dist/cjs/paneview/options.js +0 -44
- package/dist/cjs/paneview/paneview.js +0 -203
- package/dist/cjs/paneview/paneviewComponent.js +0 -430
- package/dist/cjs/paneview/paneviewPanel.js +0 -275
- package/dist/cjs/popoutWindow.js +0 -244
- package/dist/cjs/resizable.js +0 -97
- package/dist/cjs/scrollbar.js +0 -169
- package/dist/cjs/splitview/options.js +0 -19
- package/dist/cjs/splitview/splitview.js +0 -999
- package/dist/cjs/splitview/splitviewComponent.js +0 -401
- package/dist/cjs/splitview/splitviewPanel.js +0 -179
- package/dist/cjs/splitview/viewItem.js +0 -119
- package/dist/cjs/svg.js +0 -43
- package/dist/cjs/types.js +0 -2
- package/dist/dockview-core.min.js.map +0 -1
- package/dist/dockview-core.min.noStyle.js.map +0 -1
- package/dist/esm/api/component.api.d.ts +0 -640
- package/dist/esm/api/component.api.js +0 -887
- package/dist/esm/api/dockviewGroupPanelApi.d.ts +0 -109
- package/dist/esm/api/dockviewGroupPanelApi.js +0 -155
- package/dist/esm/api/dockviewPanelApi.d.ts +0 -84
- package/dist/esm/api/dockviewPanelApi.js +0 -124
- package/dist/esm/api/entryPoints.d.ts +0 -9
- package/dist/esm/api/entryPoints.js +0 -21
- package/dist/esm/api/gridviewPanelApi.d.ts +0 -37
- package/dist/esm/api/gridviewPanelApi.js +0 -23
- package/dist/esm/api/panelApi.d.ts +0 -100
- package/dist/esm/api/panelApi.js +0 -87
- package/dist/esm/api/paneviewPanelApi.d.ts +0 -26
- package/dist/esm/api/paneviewPanelApi.js +0 -27
- package/dist/esm/api/splitviewPanelApi.d.ts +0 -32
- package/dist/esm/api/splitviewPanelApi.js +0 -25
- package/dist/esm/array.d.ts +0 -13
- package/dist/esm/array.js +0 -57
- package/dist/esm/constants.d.ts +0 -8
- package/dist/esm/constants.js +0 -8
- package/dist/esm/dnd/backend.d.ts +0 -70
- package/dist/esm/dnd/backend.js +0 -148
- package/dist/esm/dnd/dataTransfer.d.ts +0 -31
- package/dist/esm/dnd/dataTransfer.js +0 -67
- package/dist/esm/dnd/dnd.d.ts +0 -32
- package/dist/esm/dnd/dnd.js +0 -51
- package/dist/esm/dnd/dropOverlay.d.ts +0 -20
- package/dist/esm/dnd/dropOverlay.js +0 -192
- package/dist/esm/dnd/dropTargetAnchorContainer.d.ts +0 -16
- package/dist/esm/dnd/dropTargetAnchorContainer.js +0 -73
- package/dist/esm/dnd/droptarget.d.ts +0 -116
- package/dist/esm/dnd/droptarget.js +0 -316
- package/dist/esm/dnd/ghost.d.ts +0 -4
- package/dist/esm/dnd/ghost.js +0 -14
- package/dist/esm/dnd/pointer/index.d.ts +0 -11
- package/dist/esm/dnd/pointer/index.js +0 -5
- package/dist/esm/dnd/pointer/longPress.d.ts +0 -32
- package/dist/esm/dnd/pointer/longPress.js +0 -127
- package/dist/esm/dnd/pointer/pointerDragController.d.ts +0 -60
- package/dist/esm/dnd/pointer/pointerDragController.js +0 -193
- package/dist/esm/dnd/pointer/pointerDragSource.d.ts +0 -61
- package/dist/esm/dnd/pointer/pointerDragSource.js +0 -173
- package/dist/esm/dnd/pointer/pointerDropTarget.d.ts +0 -39
- package/dist/esm/dnd/pointer/pointerDropTarget.js +0 -168
- package/dist/esm/dnd/pointer/pointerGhost.d.ts +0 -30
- package/dist/esm/dnd/pointer/pointerGhost.js +0 -39
- package/dist/esm/dnd/pointer/types.d.ts +0 -16
- package/dist/esm/dnd/pointer/types.js +0 -1
- package/dist/esm/dockview/accessibilityMessages.d.ts +0 -32
- package/dist/esm/dockview/accessibilityMessages.js +0 -30
- package/dist/esm/dockview/allModules.d.ts +0 -8
- package/dist/esm/dockview/allModules.js +0 -22
- package/dist/esm/dockview/components/panel/content.d.ts +0 -54
- package/dist/esm/dockview/components/panel/content.js +0 -185
- package/dist/esm/dockview/components/popupService.d.ts +0 -21
- package/dist/esm/dockview/components/popupService.js +0 -108
- package/dist/esm/dockview/components/tab/defaultTab.d.ts +0 -12
- package/dist/esm/dockview/components/tab/defaultTab.js +0 -43
- package/dist/esm/dockview/components/tab/tab.d.ts +0 -44
- package/dist/esm/dockview/components/tab/tab.js +0 -242
- package/dist/esm/dockview/components/titlebar/floatingTitleBar.d.ts +0 -34
- package/dist/esm/dockview/components/titlebar/floatingTitleBar.js +0 -65
- package/dist/esm/dockview/components/titlebar/groupDragSource.d.ts +0 -51
- package/dist/esm/dockview/components/titlebar/groupDragSource.js +0 -178
- package/dist/esm/dockview/components/titlebar/tabGroupChip.d.ts +0 -37
- package/dist/esm/dockview/components/titlebar/tabGroupChip.js +0 -77
- package/dist/esm/dockview/components/titlebar/tabGroupIndicator.d.ts +0 -72
- package/dist/esm/dockview/components/titlebar/tabGroupIndicator.js +0 -360
- package/dist/esm/dockview/components/titlebar/tabGroups.d.ts +0 -107
- package/dist/esm/dockview/components/titlebar/tabGroups.js +0 -621
- package/dist/esm/dockview/components/titlebar/tabOverflowControl.d.ts +0 -8
- package/dist/esm/dockview/components/titlebar/tabOverflowControl.js +0 -16
- package/dist/esm/dockview/components/titlebar/tabs.d.ts +0 -167
- package/dist/esm/dockview/components/titlebar/tabs.js +0 -1653
- package/dist/esm/dockview/components/titlebar/tabsContainer.d.ts +0 -104
- package/dist/esm/dockview/components/titlebar/tabsContainer.js +0 -359
- package/dist/esm/dockview/components/titlebar/voidContainer.d.ts +0 -21
- package/dist/esm/dockview/components/titlebar/voidContainer.js +0 -92
- package/dist/esm/dockview/components/watermark/watermark.d.ts +0 -8
- package/dist/esm/dockview/components/watermark/watermark.js +0 -14
- package/dist/esm/dockview/deserializer.d.ts +0 -12
- package/dist/esm/dockview/deserializer.js +0 -34
- package/dist/esm/dockview/dndCapabilities.d.ts +0 -19
- package/dist/esm/dockview/dndCapabilities.js +0 -36
- package/dist/esm/dockview/dockviewComponent.d.ts +0 -626
- package/dist/esm/dockview/dockviewComponent.js +0 -3214
- package/dist/esm/dockview/dockviewFloatingGroupPanel.d.ts +0 -45
- package/dist/esm/dockview/dockviewFloatingGroupPanel.js +0 -44
- package/dist/esm/dockview/dockviewGroupPanel.d.ts +0 -35
- package/dist/esm/dockview/dockviewGroupPanel.js +0 -142
- package/dist/esm/dockview/dockviewGroupPanelModel.d.ts +0 -358
- package/dist/esm/dockview/dockviewGroupPanelModel.js +0 -1180
- package/dist/esm/dockview/dockviewPanel.d.ts +0 -69
- package/dist/esm/dockview/dockviewPanel.js +0 -178
- package/dist/esm/dockview/dockviewPanelModel.d.ts +0 -37
- package/dist/esm/dockview/dockviewPanelModel.js +0 -81
- package/dist/esm/dockview/dockviewShell.d.ts +0 -150
- package/dist/esm/dockview/dockviewShell.js +0 -678
- package/dist/esm/dockview/edgeGroupService.d.ts +0 -38
- package/dist/esm/dockview/edgeGroupService.js +0 -63
- package/dist/esm/dockview/events.d.ts +0 -38
- package/dist/esm/dockview/events.js +0 -34
- package/dist/esm/dockview/floatingGroupService.d.ts +0 -37
- package/dist/esm/dockview/floatingGroupService.js +0 -150
- package/dist/esm/dockview/framework.d.ts +0 -65
- package/dist/esm/dockview/framework.js +0 -1
- package/dist/esm/dockview/headerActionsService.d.ts +0 -32
- package/dist/esm/dockview/headerActionsService.js +0 -86
- package/dist/esm/dockview/liveRegionService.d.ts +0 -53
- package/dist/esm/dockview/liveRegionService.js +0 -159
- package/dist/esm/dockview/moduleContracts.d.ts +0 -119
- package/dist/esm/dockview/moduleContracts.js +0 -1
- package/dist/esm/dockview/modules.d.ts +0 -110
- package/dist/esm/dockview/modules.js +0 -170
- package/dist/esm/dockview/options.d.ts +0 -474
- package/dist/esm/dockview/options.js +0 -77
- package/dist/esm/dockview/popoutWindowService.d.ts +0 -95
- package/dist/esm/dockview/popoutWindowService.js +0 -175
- package/dist/esm/dockview/rootDropTargetService.d.ts +0 -35
- package/dist/esm/dockview/rootDropTargetService.js +0 -82
- package/dist/esm/dockview/strictEventsSequencing.d.ts +0 -7
- package/dist/esm/dockview/strictEventsSequencing.js +0 -41
- package/dist/esm/dockview/tabGroup.d.ts +0 -99
- package/dist/esm/dockview/tabGroup.js +0 -144
- package/dist/esm/dockview/tabGroupAccent.d.ts +0 -65
- package/dist/esm/dockview/tabGroupAccent.js +0 -114
- package/dist/esm/dockview/theme.d.ts +0 -86
- package/dist/esm/dockview/theme.js +0 -136
- package/dist/esm/dockview/types.d.ts +0 -53
- package/dist/esm/dockview/types.js +0 -1
- package/dist/esm/dockview/validate.d.ts +0 -0
- package/dist/esm/dockview/validate.js +0 -76
- package/dist/esm/dockview/watermarkService.d.ts +0 -30
- package/dist/esm/dockview/watermarkService.js +0 -56
- package/dist/esm/dom.d.ts +0 -60
- package/dist/esm/dom.js +0 -375
- package/dist/esm/events.d.ts +0 -79
- package/dist/esm/events.js +0 -219
- package/dist/esm/framwork.d.ts +0 -4
- package/dist/esm/framwork.js +0 -1
- package/dist/esm/gridview/baseComponentGridview.d.ts +0 -111
- package/dist/esm/gridview/baseComponentGridview.js +0 -237
- package/dist/esm/gridview/basePanelView.d.ts +0 -40
- package/dist/esm/gridview/basePanelView.js +0 -91
- package/dist/esm/gridview/branchNode.d.ts +0 -57
- package/dist/esm/gridview/branchNode.js +0 -257
- package/dist/esm/gridview/gridview.d.ts +0 -158
- package/dist/esm/gridview/gridview.js +0 -681
- package/dist/esm/gridview/gridviewComponent.d.ts +0 -88
- package/dist/esm/gridview/gridviewComponent.js +0 -265
- package/dist/esm/gridview/gridviewPanel.d.ts +0 -77
- package/dist/esm/gridview/gridviewPanel.js +0 -182
- package/dist/esm/gridview/leafNode.d.ts +0 -34
- package/dist/esm/gridview/leafNode.js +0 -102
- package/dist/esm/gridview/options.d.ts +0 -15
- package/dist/esm/gridview/options.js +0 -14
- package/dist/esm/gridview/types.d.ts +0 -3
- package/dist/esm/gridview/types.js +0 -1
- package/dist/esm/index.d.ts +0 -58
- package/dist/esm/index.js +0 -44
- package/dist/esm/lifecycle.d.ts +0 -25
- package/dist/esm/lifecycle.js +0 -56
- package/dist/esm/math.d.ts +0 -5
- package/dist/esm/math.js +0 -32
- package/dist/esm/overlay/overlay.d.ts +0 -91
- package/dist/esm/overlay/overlay.js +0 -520
- package/dist/esm/overlay/overlayRenderContainer.d.ts +0 -24
- package/dist/esm/overlay/overlayRenderContainer.js +0 -249
- package/dist/esm/panel/types.d.ts +0 -33
- package/dist/esm/panel/types.js +0 -1
- package/dist/esm/paneview/defaultPaneviewHeader.d.ts +0 -21
- package/dist/esm/paneview/defaultPaneviewHeader.js +0 -65
- package/dist/esm/paneview/draggablePaneviewPanel.d.ts +0 -38
- package/dist/esm/paneview/draggablePaneviewPanel.js +0 -107
- package/dist/esm/paneview/options.d.ts +0 -30
- package/dist/esm/paneview/options.js +0 -22
- package/dist/esm/paneview/paneview.d.ts +0 -41
- package/dist/esm/paneview/paneview.js +0 -148
- package/dist/esm/paneview/paneviewComponent.d.ts +0 -133
- package/dist/esm/paneview/paneviewComponent.js +0 -306
- package/dist/esm/paneview/paneviewPanel.d.ts +0 -98
- package/dist/esm/paneview/paneviewPanel.js +0 -192
- package/dist/esm/popoutWindow.d.ts +0 -38
- package/dist/esm/popoutWindow.js +0 -170
- package/dist/esm/resizable.d.ts +0 -12
- package/dist/esm/resizable.js +0 -66
- package/dist/esm/scrollbar.d.ts +0 -15
- package/dist/esm/scrollbar.js +0 -139
- package/dist/esm/splitview/options.d.ts +0 -21
- package/dist/esm/splitview/options.js +0 -16
- package/dist/esm/splitview/splitview.d.ts +0 -145
- package/dist/esm/splitview/splitview.js +0 -770
- package/dist/esm/splitview/splitviewComponent.d.ts +0 -101
- package/dist/esm/splitview/splitviewComponent.js +0 -267
- package/dist/esm/splitview/splitviewPanel.d.ts +0 -45
- package/dist/esm/splitview/splitviewPanel.js +0 -108
- package/dist/esm/splitview/viewItem.d.ts +0 -25
- package/dist/esm/splitview/viewItem.js +0 -74
- package/dist/esm/svg.d.ts +0 -3
- package/dist/esm/svg.js +0 -31
- package/dist/esm/types.d.ts +0 -31
- package/dist/esm/types.js +0 -1
- package/dist/styles/dockview.css +0 -3436
package/dist/cjs/array.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tail = tail;
|
|
4
|
-
exports.last = last;
|
|
5
|
-
exports.sequenceEquals = sequenceEquals;
|
|
6
|
-
exports.pushToStart = pushToStart;
|
|
7
|
-
exports.pushToEnd = pushToEnd;
|
|
8
|
-
exports.firstIndex = firstIndex;
|
|
9
|
-
exports.remove = remove;
|
|
10
|
-
function tail(arr) {
|
|
11
|
-
if (arr.length === 0) {
|
|
12
|
-
throw new Error('Invalid tail call');
|
|
13
|
-
}
|
|
14
|
-
return [arr.slice(0, arr.length - 1), arr[arr.length - 1]];
|
|
15
|
-
}
|
|
16
|
-
function last(arr) {
|
|
17
|
-
return arr.length > 0 ? arr[arr.length - 1] : undefined;
|
|
18
|
-
}
|
|
19
|
-
function sequenceEquals(arr1, arr2) {
|
|
20
|
-
if (arr1.length !== arr2.length) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
for (var i = 0; i < arr1.length; i++) {
|
|
24
|
-
if (arr1[i] !== arr2[i]) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Pushes an element to the start of the array, if found.
|
|
32
|
-
*/
|
|
33
|
-
function pushToStart(arr, value) {
|
|
34
|
-
var index = arr.indexOf(value);
|
|
35
|
-
if (index > -1) {
|
|
36
|
-
arr.splice(index, 1);
|
|
37
|
-
arr.unshift(value);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Pushes an element to the end of the array, if found.
|
|
42
|
-
*/
|
|
43
|
-
function pushToEnd(arr, value) {
|
|
44
|
-
var index = arr.indexOf(value);
|
|
45
|
-
if (index > -1) {
|
|
46
|
-
arr.splice(index, 1);
|
|
47
|
-
arr.push(value);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function firstIndex(array, fn) {
|
|
51
|
-
for (var i = 0; i < array.length; i++) {
|
|
52
|
-
var element = array[i];
|
|
53
|
-
if (fn(element)) {
|
|
54
|
-
return i;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return -1;
|
|
58
|
-
}
|
|
59
|
-
function remove(array, value) {
|
|
60
|
-
var index = array.findIndex(function (t) { return t === value; });
|
|
61
|
-
if (index > -1) {
|
|
62
|
-
array.splice(index, 1);
|
|
63
|
-
return true;
|
|
64
|
-
}
|
|
65
|
-
return false;
|
|
66
|
-
}
|
package/dist/cjs/constants.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DESERIALIZATION_POPOUT_DELAY_MS = exports.DEFAULT_FLOATING_GROUP_POSITION = exports.DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE = void 0;
|
|
4
|
-
exports.DEFAULT_FLOATING_GROUP_OVERFLOW_SIZE = 100;
|
|
5
|
-
exports.DEFAULT_FLOATING_GROUP_POSITION = {
|
|
6
|
-
left: 100,
|
|
7
|
-
top: 100,
|
|
8
|
-
width: 300,
|
|
9
|
-
height: 300,
|
|
10
|
-
};
|
|
11
|
-
exports.DESERIALIZATION_POPOUT_DELAY_MS = 100;
|
package/dist/cjs/dnd/backend.js
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.pointerBackend = exports.html5Backend = void 0;
|
|
19
|
-
var events_1 = require("../events");
|
|
20
|
-
var lifecycle_1 = require("../lifecycle");
|
|
21
|
-
var droptarget_1 = require("./droptarget");
|
|
22
|
-
var ghost_1 = require("./ghost");
|
|
23
|
-
var pointerDropTarget_1 = require("./pointer/pointerDropTarget");
|
|
24
|
-
var pointerDragSource_1 = require("./pointer/pointerDragSource");
|
|
25
|
-
var pointerGhost_1 = require("./pointer/pointerGhost");
|
|
26
|
-
var dom_1 = require("../dom");
|
|
27
|
-
/**
|
|
28
|
-
* HTML5 drag source. Listens for the native `dragstart` event, calls
|
|
29
|
-
* `getData` to populate transfer, optionally renders the ghost via
|
|
30
|
-
* `setDragImage`, fires `onDragStart` / `onDragEnd`, and tears down the
|
|
31
|
-
* transfer disposer after `dragend`.
|
|
32
|
-
*/
|
|
33
|
-
var Html5DragSource = /** @class */ (function (_super) {
|
|
34
|
-
__extends(Html5DragSource, _super);
|
|
35
|
-
function Html5DragSource(el, opts) {
|
|
36
|
-
var _this = _super.call(this) || this;
|
|
37
|
-
_this.el = el;
|
|
38
|
-
_this.opts = opts;
|
|
39
|
-
_this._dataDisposable = new lifecycle_1.MutableDisposable();
|
|
40
|
-
_this._pointerEventsDisposable = new lifecycle_1.MutableDisposable();
|
|
41
|
-
_this._disabled = !!opts.disabled;
|
|
42
|
-
_this.addDisposables(_this._dataDisposable, _this._pointerEventsDisposable, (0, events_1.addDisposableListener)(_this.el, 'dragstart', function (event) {
|
|
43
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
44
|
-
if (event.defaultPrevented ||
|
|
45
|
-
_this._disabled ||
|
|
46
|
-
((_b = (_a = _this.opts).isCancelled) === null || _b === void 0 ? void 0 : _b.call(_a, event))) {
|
|
47
|
-
event.preventDefault();
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
// Iframes capture pointermove once the cursor enters them,
|
|
51
|
-
// which freezes drag tracking from the parent window's
|
|
52
|
-
// POV. Shield the source's owning document so popout-window
|
|
53
|
-
// drags shield the popout, not the main window.
|
|
54
|
-
var iframes = (0, dom_1.disableIframePointEvents)((_c = _this.el.ownerDocument) !== null && _c !== void 0 ? _c : document);
|
|
55
|
-
_this._pointerEventsDisposable.value = {
|
|
56
|
-
dispose: function () { return iframes.release(); },
|
|
57
|
-
};
|
|
58
|
-
_this.el.classList.add('dv-dragged');
|
|
59
|
-
setTimeout(function () { return _this.el.classList.remove('dv-dragged'); }, 0);
|
|
60
|
-
_this._dataDisposable.value = _this.opts.getData(event);
|
|
61
|
-
var ghost = (_e = (_d = _this.opts).createGhost) === null || _e === void 0 ? void 0 : _e.call(_d, event);
|
|
62
|
-
if (ghost && event.dataTransfer) {
|
|
63
|
-
(0, ghost_1.addGhostImage)(event.dataTransfer, ghost.element, {
|
|
64
|
-
x: (_f = ghost.offsetX) !== null && _f !== void 0 ? _f : 0,
|
|
65
|
-
y: (_g = ghost.offsetY) !== null && _g !== void 0 ? _g : 0,
|
|
66
|
-
});
|
|
67
|
-
if (ghost.dispose) {
|
|
68
|
-
// addGhostImage removes the element from the DOM on
|
|
69
|
-
// the next tick; dispose the framework renderer on
|
|
70
|
-
// the same schedule.
|
|
71
|
-
var disposeGhost_1 = ghost.dispose;
|
|
72
|
-
setTimeout(function () { return disposeGhost_1(); }, 0);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
if (event.dataTransfer) {
|
|
76
|
-
event.dataTransfer.effectAllowed = 'move';
|
|
77
|
-
// Some third-party DnD libs (e.g. react-dnd) cancel the
|
|
78
|
-
// dragstart when `dataTransfer.types` is empty.
|
|
79
|
-
if (event.dataTransfer.items.length === 0) {
|
|
80
|
-
event.dataTransfer.setData('text/plain', '');
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
(_j = (_h = _this.opts).onDragStart) === null || _j === void 0 ? void 0 : _j.call(_h, event);
|
|
84
|
-
}), (0, events_1.addDisposableListener)(_this.el, 'dragend', function (event) {
|
|
85
|
-
var _a, _b;
|
|
86
|
-
_this._pointerEventsDisposable.dispose();
|
|
87
|
-
// Defer disposal so drop handlers can still read the
|
|
88
|
-
// transfer payload before it clears.
|
|
89
|
-
setTimeout(function () { return _this._dataDisposable.dispose(); }, 0);
|
|
90
|
-
(_b = (_a = _this.opts).onDragEnd) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
91
|
-
}));
|
|
92
|
-
return _this;
|
|
93
|
-
}
|
|
94
|
-
Html5DragSource.prototype.setDisabled = function (value) {
|
|
95
|
-
this._disabled = value;
|
|
96
|
-
};
|
|
97
|
-
Html5DragSource.prototype.setTouchOnly = function (_) {
|
|
98
|
-
// No-op — HTML5 path can't filter by pointer type.
|
|
99
|
-
};
|
|
100
|
-
Html5DragSource.prototype.cancelPending = function () {
|
|
101
|
-
// No-op — HTML5 has no pre-arm phase to cancel.
|
|
102
|
-
};
|
|
103
|
-
return Html5DragSource;
|
|
104
|
-
}(lifecycle_1.CompositeDisposable));
|
|
105
|
-
var Html5DragBackend = /** @class */ (function () {
|
|
106
|
-
function Html5DragBackend() {
|
|
107
|
-
this.kind = 'html5';
|
|
108
|
-
}
|
|
109
|
-
Html5DragBackend.prototype.createDropTarget = function (element, options) {
|
|
110
|
-
return new droptarget_1.Droptarget(element, options);
|
|
111
|
-
};
|
|
112
|
-
Html5DragBackend.prototype.createDragSource = function (element, options) {
|
|
113
|
-
return new Html5DragSource(element, options);
|
|
114
|
-
};
|
|
115
|
-
return Html5DragBackend;
|
|
116
|
-
}());
|
|
117
|
-
var PointerDragBackend = /** @class */ (function () {
|
|
118
|
-
function PointerDragBackend() {
|
|
119
|
-
this.kind = 'pointer';
|
|
120
|
-
}
|
|
121
|
-
PointerDragBackend.prototype.createDropTarget = function (element, options) {
|
|
122
|
-
return new pointerDropTarget_1.PointerDropTarget(element, options);
|
|
123
|
-
};
|
|
124
|
-
PointerDragBackend.prototype.createDragSource = function (element, options) {
|
|
125
|
-
var pointerCreateGhost = options.createGhost
|
|
126
|
-
? function (event) {
|
|
127
|
-
var spec = options.createGhost(event);
|
|
128
|
-
if (!spec) {
|
|
129
|
-
return undefined;
|
|
130
|
-
}
|
|
131
|
-
var ghost = new pointerGhost_1.PointerGhost({
|
|
132
|
-
element: spec.element,
|
|
133
|
-
initialX: event.clientX,
|
|
134
|
-
initialY: event.clientY,
|
|
135
|
-
offsetX: spec.offsetX,
|
|
136
|
-
offsetY: spec.offsetY,
|
|
137
|
-
owner: element,
|
|
138
|
-
});
|
|
139
|
-
if (spec.dispose) {
|
|
140
|
-
var baseDispose_1 = ghost.dispose.bind(ghost);
|
|
141
|
-
var disposeSpec_1 = spec.dispose;
|
|
142
|
-
ghost.dispose = function () {
|
|
143
|
-
baseDispose_1();
|
|
144
|
-
disposeSpec_1();
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
return ghost;
|
|
148
|
-
}
|
|
149
|
-
: undefined;
|
|
150
|
-
var source = new pointerDragSource_1.PointerDragSource(element, {
|
|
151
|
-
getData: options.getData,
|
|
152
|
-
isCancelled: options.isCancelled,
|
|
153
|
-
onDragStart: options.onDragStart,
|
|
154
|
-
onDragEnd: options.onDragEnd
|
|
155
|
-
? function (event) { return options.onDragEnd(event.pointerEvent); }
|
|
156
|
-
: undefined,
|
|
157
|
-
createGhost: pointerCreateGhost,
|
|
158
|
-
touchOnly: options.touchOnly,
|
|
159
|
-
touchInitiationDelay: options.touchInitiationDelay,
|
|
160
|
-
pressTolerance: options.pressTolerance,
|
|
161
|
-
threshold: options.threshold,
|
|
162
|
-
});
|
|
163
|
-
if (options.disabled) {
|
|
164
|
-
source.setDisabled(true);
|
|
165
|
-
}
|
|
166
|
-
return source;
|
|
167
|
-
};
|
|
168
|
-
return PointerDragBackend;
|
|
169
|
-
}());
|
|
170
|
-
exports.html5Backend = new Html5DragBackend();
|
|
171
|
-
exports.pointerBackend = new PointerDragBackend();
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.LocalSelectionTransfer = exports.PaneTransfer = exports.PanelTransfer = void 0;
|
|
19
|
-
exports.getPanelData = getPanelData;
|
|
20
|
-
exports.getPaneData = getPaneData;
|
|
21
|
-
var TransferObject = /** @class */ (function () {
|
|
22
|
-
function TransferObject() {
|
|
23
|
-
}
|
|
24
|
-
return TransferObject;
|
|
25
|
-
}());
|
|
26
|
-
var PanelTransfer = /** @class */ (function (_super) {
|
|
27
|
-
__extends(PanelTransfer, _super);
|
|
28
|
-
function PanelTransfer(viewId, groupId, panelId, tabGroupId) {
|
|
29
|
-
var _this = _super.call(this) || this;
|
|
30
|
-
_this.viewId = viewId;
|
|
31
|
-
_this.groupId = groupId;
|
|
32
|
-
_this.panelId = panelId;
|
|
33
|
-
_this.tabGroupId = tabGroupId;
|
|
34
|
-
return _this;
|
|
35
|
-
}
|
|
36
|
-
return PanelTransfer;
|
|
37
|
-
}(TransferObject));
|
|
38
|
-
exports.PanelTransfer = PanelTransfer;
|
|
39
|
-
var PaneTransfer = /** @class */ (function (_super) {
|
|
40
|
-
__extends(PaneTransfer, _super);
|
|
41
|
-
function PaneTransfer(viewId, paneId) {
|
|
42
|
-
var _this = _super.call(this) || this;
|
|
43
|
-
_this.viewId = viewId;
|
|
44
|
-
_this.paneId = paneId;
|
|
45
|
-
return _this;
|
|
46
|
-
}
|
|
47
|
-
return PaneTransfer;
|
|
48
|
-
}(TransferObject));
|
|
49
|
-
exports.PaneTransfer = PaneTransfer;
|
|
50
|
-
/**
|
|
51
|
-
* A singleton to store transfer data during drag & drop operations that are only valid within the application.
|
|
52
|
-
*/
|
|
53
|
-
var LocalSelectionTransfer = /** @class */ (function () {
|
|
54
|
-
function LocalSelectionTransfer() {
|
|
55
|
-
// protect against external instantiation
|
|
56
|
-
}
|
|
57
|
-
LocalSelectionTransfer.getInstance = function () {
|
|
58
|
-
return LocalSelectionTransfer.INSTANCE;
|
|
59
|
-
};
|
|
60
|
-
LocalSelectionTransfer.prototype.hasData = function (proto) {
|
|
61
|
-
return proto && proto === this.proto;
|
|
62
|
-
};
|
|
63
|
-
LocalSelectionTransfer.prototype.clearData = function (proto) {
|
|
64
|
-
if (this.hasData(proto)) {
|
|
65
|
-
this.proto = undefined;
|
|
66
|
-
this.data = undefined;
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
LocalSelectionTransfer.prototype.getData = function (proto) {
|
|
70
|
-
if (this.hasData(proto)) {
|
|
71
|
-
return this.data;
|
|
72
|
-
}
|
|
73
|
-
return undefined;
|
|
74
|
-
};
|
|
75
|
-
LocalSelectionTransfer.prototype.setData = function (data, proto) {
|
|
76
|
-
if (proto) {
|
|
77
|
-
this.data = data;
|
|
78
|
-
this.proto = proto;
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
LocalSelectionTransfer.INSTANCE = new LocalSelectionTransfer();
|
|
82
|
-
return LocalSelectionTransfer;
|
|
83
|
-
}());
|
|
84
|
-
exports.LocalSelectionTransfer = LocalSelectionTransfer;
|
|
85
|
-
function getPanelData() {
|
|
86
|
-
var panelTransfer = LocalSelectionTransfer.getInstance();
|
|
87
|
-
var isPanelEvent = panelTransfer.hasData(PanelTransfer.prototype);
|
|
88
|
-
if (!isPanelEvent) {
|
|
89
|
-
return undefined;
|
|
90
|
-
}
|
|
91
|
-
return panelTransfer.getData(PanelTransfer.prototype)[0];
|
|
92
|
-
}
|
|
93
|
-
function getPaneData() {
|
|
94
|
-
var paneTransfer = LocalSelectionTransfer.getInstance();
|
|
95
|
-
var isPanelEvent = paneTransfer.hasData(PaneTransfer.prototype);
|
|
96
|
-
if (!isPanelEvent) {
|
|
97
|
-
return undefined;
|
|
98
|
-
}
|
|
99
|
-
return paneTransfer.getData(PaneTransfer.prototype)[0];
|
|
100
|
-
}
|
package/dist/cjs/dnd/dnd.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.DragAndDropObserver = void 0;
|
|
19
|
-
var events_1 = require("../events");
|
|
20
|
-
var lifecycle_1 = require("../lifecycle");
|
|
21
|
-
var DragAndDropObserver = /** @class */ (function (_super) {
|
|
22
|
-
__extends(DragAndDropObserver, _super);
|
|
23
|
-
function DragAndDropObserver(element, callbacks) {
|
|
24
|
-
var _this = _super.call(this) || this;
|
|
25
|
-
_this.element = element;
|
|
26
|
-
_this.callbacks = callbacks;
|
|
27
|
-
_this.target = null;
|
|
28
|
-
_this.registerListeners();
|
|
29
|
-
return _this;
|
|
30
|
-
}
|
|
31
|
-
DragAndDropObserver.prototype.onDragEnter = function (e) {
|
|
32
|
-
this.target = e.target;
|
|
33
|
-
this.callbacks.onDragEnter(e);
|
|
34
|
-
};
|
|
35
|
-
DragAndDropObserver.prototype.onDragOver = function (e) {
|
|
36
|
-
e.preventDefault(); // needed so that the drop event fires (https://stackoverflow.com/questions/21339924/drop-event-not-firing-in-chrome)
|
|
37
|
-
if (this.callbacks.onDragOver) {
|
|
38
|
-
this.callbacks.onDragOver(e);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
DragAndDropObserver.prototype.onDragLeave = function (e) {
|
|
42
|
-
if (this.target === e.target) {
|
|
43
|
-
this.target = null;
|
|
44
|
-
this.callbacks.onDragLeave(e);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
DragAndDropObserver.prototype.onDragEnd = function (e) {
|
|
48
|
-
this.target = null;
|
|
49
|
-
this.callbacks.onDragEnd(e);
|
|
50
|
-
};
|
|
51
|
-
DragAndDropObserver.prototype.onDrop = function (e) {
|
|
52
|
-
this.callbacks.onDrop(e);
|
|
53
|
-
};
|
|
54
|
-
DragAndDropObserver.prototype.registerListeners = function () {
|
|
55
|
-
var _this = this;
|
|
56
|
-
this.addDisposables((0, events_1.addDisposableListener)(this.element, 'dragenter', function (e) {
|
|
57
|
-
_this.onDragEnter(e);
|
|
58
|
-
}, true));
|
|
59
|
-
this.addDisposables((0, events_1.addDisposableListener)(this.element, 'dragover', function (e) {
|
|
60
|
-
_this.onDragOver(e);
|
|
61
|
-
}, true));
|
|
62
|
-
this.addDisposables((0, events_1.addDisposableListener)(this.element, 'dragleave', function (e) {
|
|
63
|
-
_this.onDragLeave(e);
|
|
64
|
-
}));
|
|
65
|
-
this.addDisposables((0, events_1.addDisposableListener)(this.element, 'dragend', function (e) {
|
|
66
|
-
_this.onDragEnd(e);
|
|
67
|
-
}));
|
|
68
|
-
this.addDisposables((0, events_1.addDisposableListener)(this.element, 'drop', function (e) {
|
|
69
|
-
_this.onDrop(e);
|
|
70
|
-
}));
|
|
71
|
-
};
|
|
72
|
-
return DragAndDropObserver;
|
|
73
|
-
}(lifecycle_1.CompositeDisposable));
|
|
74
|
-
exports.DragAndDropObserver = DragAndDropObserver;
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Two render paths: in-place (dropzone appended to drop element) and
|
|
3
|
-
// anchored (overlay rendered into an external anchor container).
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.createOverlayElements = createOverlayElements;
|
|
6
|
-
exports.renderInPlaceOverlay = renderInPlaceOverlay;
|
|
7
|
-
exports.renderAnchoredOverlay = renderAnchoredOverlay;
|
|
8
|
-
var dom_1 = require("../dom");
|
|
9
|
-
var math_1 = require("../math");
|
|
10
|
-
var DEFAULT_SIZE = { value: 50, type: 'percentage' };
|
|
11
|
-
var SMALL_WIDTH_BOUNDARY = 100;
|
|
12
|
-
var SMALL_HEIGHT_BOUNDARY = 100;
|
|
13
|
-
function createOverlayElements() {
|
|
14
|
-
var dropzone = document.createElement('div');
|
|
15
|
-
dropzone.className = 'dv-drop-target-dropzone';
|
|
16
|
-
var selection = document.createElement('div');
|
|
17
|
-
selection.className = 'dv-drop-target-selection';
|
|
18
|
-
dropzone.appendChild(selection);
|
|
19
|
-
return { dropzone: dropzone, selection: selection };
|
|
20
|
-
}
|
|
21
|
-
function computeOverlayShape(quadrant, width, height, overlayModel) {
|
|
22
|
-
var _a, _b, _c;
|
|
23
|
-
var smallWidthBoundary = (_a = overlayModel === null || overlayModel === void 0 ? void 0 : overlayModel.smallWidthBoundary) !== null && _a !== void 0 ? _a : SMALL_WIDTH_BOUNDARY;
|
|
24
|
-
var smallHeightBoundary = (_b = overlayModel === null || overlayModel === void 0 ? void 0 : overlayModel.smallHeightBoundary) !== null && _b !== void 0 ? _b : SMALL_HEIGHT_BOUNDARY;
|
|
25
|
-
var isSmallX = width < smallWidthBoundary;
|
|
26
|
-
var isSmallY = height < smallHeightBoundary;
|
|
27
|
-
var isLeft = quadrant === 'left';
|
|
28
|
-
var isRight = quadrant === 'right';
|
|
29
|
-
var isTop = quadrant === 'top';
|
|
30
|
-
var isBottom = quadrant === 'bottom';
|
|
31
|
-
var rightClass = !isSmallX && isRight;
|
|
32
|
-
var leftClass = !isSmallX && isLeft;
|
|
33
|
-
var topClass = !isSmallY && isTop;
|
|
34
|
-
var bottomClass = !isSmallY && isBottom;
|
|
35
|
-
var size = 1;
|
|
36
|
-
var sizeOptions = (_c = overlayModel === null || overlayModel === void 0 ? void 0 : overlayModel.size) !== null && _c !== void 0 ? _c : DEFAULT_SIZE;
|
|
37
|
-
if (sizeOptions.type === 'percentage') {
|
|
38
|
-
size = (0, math_1.clamp)(sizeOptions.value, 0, 100) / 100;
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
if (rightClass || leftClass) {
|
|
42
|
-
size = (0, math_1.clamp)(0, sizeOptions.value, width) / width;
|
|
43
|
-
}
|
|
44
|
-
if (topClass || bottomClass) {
|
|
45
|
-
size = (0, math_1.clamp)(0, sizeOptions.value, height) / height;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return {
|
|
49
|
-
isSmallX: isSmallX,
|
|
50
|
-
isSmallY: isSmallY,
|
|
51
|
-
isLeft: isLeft,
|
|
52
|
-
isRight: isRight,
|
|
53
|
-
isTop: isTop,
|
|
54
|
-
isBottom: isBottom,
|
|
55
|
-
rightClass: rightClass,
|
|
56
|
-
leftClass: leftClass,
|
|
57
|
-
topClass: topClass,
|
|
58
|
-
bottomClass: bottomClass,
|
|
59
|
-
size: size,
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
function renderInPlaceOverlay(overlay, quadrant, width, height, overlayModel) {
|
|
63
|
-
var shape = computeOverlayShape(quadrant, width, height, overlayModel);
|
|
64
|
-
var rightClass = shape.rightClass, leftClass = shape.leftClass, topClass = shape.topClass, bottomClass = shape.bottomClass, size = shape.size;
|
|
65
|
-
var box = { top: '0px', left: '0px', width: '100%', height: '100%' };
|
|
66
|
-
if (rightClass) {
|
|
67
|
-
box.left = "".concat(100 * (1 - size), "%");
|
|
68
|
-
box.width = "".concat(100 * size, "%");
|
|
69
|
-
}
|
|
70
|
-
else if (leftClass) {
|
|
71
|
-
box.width = "".concat(100 * size, "%");
|
|
72
|
-
}
|
|
73
|
-
else if (topClass) {
|
|
74
|
-
box.height = "".concat(100 * size, "%");
|
|
75
|
-
}
|
|
76
|
-
else if (bottomClass) {
|
|
77
|
-
box.top = "".concat(100 * (1 - size), "%");
|
|
78
|
-
box.height = "".concat(100 * size, "%");
|
|
79
|
-
}
|
|
80
|
-
if (shape.isSmallX && shape.isLeft) {
|
|
81
|
-
box.width = '4px';
|
|
82
|
-
}
|
|
83
|
-
if (shape.isSmallX && shape.isRight) {
|
|
84
|
-
box.left = "".concat(width - 4, "px");
|
|
85
|
-
box.width = '4px';
|
|
86
|
-
}
|
|
87
|
-
if (shape.isSmallY && shape.isTop) {
|
|
88
|
-
box.height = '4px';
|
|
89
|
-
}
|
|
90
|
-
if (shape.isSmallY && shape.isBottom) {
|
|
91
|
-
box.top = "".concat(height - 4, "px");
|
|
92
|
-
box.height = '4px';
|
|
93
|
-
}
|
|
94
|
-
overlay.style.top = box.top;
|
|
95
|
-
overlay.style.left = box.left;
|
|
96
|
-
overlay.style.width = box.width;
|
|
97
|
-
overlay.style.height = box.height;
|
|
98
|
-
overlay.style.visibility = 'visible';
|
|
99
|
-
if (!overlay.style.transform || overlay.style.transform === '') {
|
|
100
|
-
overlay.style.transform = 'translate3d(0, 0, 0)';
|
|
101
|
-
}
|
|
102
|
-
var isLine = (shape.isSmallX && (shape.isLeft || shape.isRight)) ||
|
|
103
|
-
(shape.isSmallY && (shape.isTop || shape.isBottom));
|
|
104
|
-
(0, dom_1.toggleClass)(overlay, 'dv-drop-target-small-vertical', shape.isSmallY);
|
|
105
|
-
(0, dom_1.toggleClass)(overlay, 'dv-drop-target-small-horizontal', shape.isSmallX);
|
|
106
|
-
(0, dom_1.toggleClass)(overlay, 'dv-drop-target-selection-line', isLine);
|
|
107
|
-
(0, dom_1.toggleClass)(overlay, 'dv-drop-target-left', shape.isLeft);
|
|
108
|
-
(0, dom_1.toggleClass)(overlay, 'dv-drop-target-right', shape.isRight);
|
|
109
|
-
(0, dom_1.toggleClass)(overlay, 'dv-drop-target-top', shape.isTop);
|
|
110
|
-
(0, dom_1.toggleClass)(overlay, 'dv-drop-target-bottom', shape.isBottom);
|
|
111
|
-
(0, dom_1.toggleClass)(overlay, 'dv-drop-target-center', quadrant === 'center');
|
|
112
|
-
}
|
|
113
|
-
function checkAnchoredBoundsChanged(overlay, bounds) {
|
|
114
|
-
var topPx = "".concat(Math.round(bounds.top), "px");
|
|
115
|
-
var leftPx = "".concat(Math.round(bounds.left), "px");
|
|
116
|
-
var widthPx = "".concat(Math.round(bounds.width), "px");
|
|
117
|
-
var heightPx = "".concat(Math.round(bounds.height), "px");
|
|
118
|
-
return (overlay.style.top !== topPx ||
|
|
119
|
-
overlay.style.left !== leftPx ||
|
|
120
|
-
overlay.style.width !== widthPx ||
|
|
121
|
-
overlay.style.height !== heightPx);
|
|
122
|
-
}
|
|
123
|
-
function applyAnchoredBounds(overlay, bounds) {
|
|
124
|
-
overlay.style.top = "".concat(Math.round(bounds.top), "px");
|
|
125
|
-
overlay.style.left = "".concat(Math.round(bounds.left), "px");
|
|
126
|
-
overlay.style.width = "".concat(Math.round(bounds.width), "px");
|
|
127
|
-
overlay.style.height = "".concat(Math.round(bounds.height), "px");
|
|
128
|
-
overlay.style.visibility = 'visible';
|
|
129
|
-
if (!overlay.style.transform || overlay.style.transform === '') {
|
|
130
|
-
overlay.style.transform = 'translate3d(0, 0, 0)';
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
/** `boundsChanged: false` lets callers skip redundant work on tight drag loops. */
|
|
134
|
-
function renderAnchoredOverlay(args) {
|
|
135
|
-
var shape = computeOverlayShape(args.quadrant, args.width, args.height, args.overlayModel);
|
|
136
|
-
var rightClass = shape.rightClass, leftClass = shape.leftClass, topClass = shape.topClass, bottomClass = shape.bottomClass, size = shape.size;
|
|
137
|
-
var elBox = args.outlineElement.getBoundingClientRect();
|
|
138
|
-
var ta = args.targetModel.getElements(undefined, args.outlineElement);
|
|
139
|
-
var el = ta.root;
|
|
140
|
-
var overlay = ta.overlay;
|
|
141
|
-
var bigbox = el.getBoundingClientRect();
|
|
142
|
-
var rootTop = elBox.top - bigbox.top;
|
|
143
|
-
var rootLeft = elBox.left - bigbox.left;
|
|
144
|
-
var box = {
|
|
145
|
-
top: rootTop,
|
|
146
|
-
left: rootLeft,
|
|
147
|
-
width: args.width,
|
|
148
|
-
height: args.height,
|
|
149
|
-
};
|
|
150
|
-
if (rightClass) {
|
|
151
|
-
box.left = rootLeft + args.width * (1 - size);
|
|
152
|
-
box.width = args.width * size;
|
|
153
|
-
}
|
|
154
|
-
else if (leftClass) {
|
|
155
|
-
box.width = args.width * size;
|
|
156
|
-
}
|
|
157
|
-
else if (topClass) {
|
|
158
|
-
box.height = args.height * size;
|
|
159
|
-
}
|
|
160
|
-
else if (bottomClass) {
|
|
161
|
-
box.top = rootTop + args.height * (1 - size);
|
|
162
|
-
box.height = args.height * size;
|
|
163
|
-
}
|
|
164
|
-
if (shape.isSmallX && shape.isLeft) {
|
|
165
|
-
box.width = 4;
|
|
166
|
-
}
|
|
167
|
-
if (shape.isSmallX && shape.isRight) {
|
|
168
|
-
box.left = rootLeft + args.width - 4;
|
|
169
|
-
box.width = 4;
|
|
170
|
-
}
|
|
171
|
-
if (shape.isSmallY && shape.isTop) {
|
|
172
|
-
box.height = 4;
|
|
173
|
-
}
|
|
174
|
-
if (shape.isSmallY && shape.isBottom) {
|
|
175
|
-
box.top = rootTop + args.height - 4;
|
|
176
|
-
box.height = 4;
|
|
177
|
-
}
|
|
178
|
-
if (!checkAnchoredBoundsChanged(overlay, box)) {
|
|
179
|
-
return { boundsChanged: false, targetChanged: ta.changed };
|
|
180
|
-
}
|
|
181
|
-
applyAnchoredBounds(overlay, box);
|
|
182
|
-
overlay.className = "dv-drop-target-anchor".concat(args.className ? " ".concat(args.className) : '');
|
|
183
|
-
(0, dom_1.toggleClass)(overlay, 'dv-drop-target-left', shape.isLeft);
|
|
184
|
-
(0, dom_1.toggleClass)(overlay, 'dv-drop-target-right', shape.isRight);
|
|
185
|
-
(0, dom_1.toggleClass)(overlay, 'dv-drop-target-top', shape.isTop);
|
|
186
|
-
(0, dom_1.toggleClass)(overlay, 'dv-drop-target-bottom', shape.isBottom);
|
|
187
|
-
(0, dom_1.toggleClass)(overlay, 'dv-drop-target-anchor-line', (shape.isSmallX && (shape.isLeft || shape.isRight)) ||
|
|
188
|
-
(shape.isSmallY && (shape.isTop || shape.isBottom)));
|
|
189
|
-
(0, dom_1.toggleClass)(overlay, 'dv-drop-target-center', args.quadrant === 'center');
|
|
190
|
-
if (ta.changed) {
|
|
191
|
-
(0, dom_1.toggleClass)(overlay, 'dv-drop-target-anchor-container-changed', true);
|
|
192
|
-
setTimeout(function () {
|
|
193
|
-
(0, dom_1.toggleClass)(overlay, 'dv-drop-target-anchor-container-changed', false);
|
|
194
|
-
}, 10);
|
|
195
|
-
}
|
|
196
|
-
return { boundsChanged: true, targetChanged: ta.changed };
|
|
197
|
-
}
|