dockview-core 7.0.4 → 8.0.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/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 +46 -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 +303 -19
- package/dist/cjs/dockview/dockviewGroupPanel.d.ts +5 -0
- package/dist/cjs/dockview/dockviewGroupPanelModel.d.ts +52 -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 +480 -14
- package/dist/cjs/dockview/modules.d.ts +101 -22
- package/dist/cjs/dockview/options.d.ts +337 -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/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/gridview/baseComponentGridview.d.ts +2 -2
- 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/svg.d.ts +1 -0
- package/dist/cjs/types.d.ts +8 -0
- package/dist/dockview-core.js +18391 -19679
- package/dist/dockview-core.min.js +4138 -6
- package/dist/dockview-core.min.noStyle.js +6 -7
- package/dist/dockview-core.noStyle.js +18390 -19656
- package/dist/package/main.cjs.js +18002 -19268
- package/dist/package/main.cjs.min.js +6 -6
- package/dist/package/main.esm.min.mjs +6 -6
- package/dist/package/main.esm.mjs +17959 -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
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.DEFAULT_MESSAGES = void 0;
|
|
15
|
-
exports.resolveMessages = resolveMessages;
|
|
16
|
-
/** Where a drop position lands, phrased for the *edge prompt*. */
|
|
17
|
-
function edgeWhere(position, target) {
|
|
18
|
-
return position === 'center'
|
|
19
|
-
? "Tab into ".concat(target)
|
|
20
|
-
: "Split ".concat(position, " of ").concat(target);
|
|
21
|
-
}
|
|
22
|
-
/** Where a drop position landed, phrased for the *commit* sentence. */
|
|
23
|
-
function committedWhere(position, target) {
|
|
24
|
-
return position === 'center'
|
|
25
|
-
? "docked into ".concat(target)
|
|
26
|
-
: "split ".concat(position, " of ").concat(target);
|
|
27
|
-
}
|
|
28
|
-
exports.DEFAULT_MESSAGES = {
|
|
29
|
-
panelOpened: function (title) { return "".concat(title, " opened"); },
|
|
30
|
-
panelClosed: function (title) { return "".concat(title, " closed"); },
|
|
31
|
-
groupMaximized: function (title) { return "".concat(title, " maximized"); },
|
|
32
|
-
groupRestored: function (title) { return "".concat(title, " restored"); },
|
|
33
|
-
groupFloated: function (title) { return "".concat(title, " floated"); },
|
|
34
|
-
groupDocked: function (title) { return "".concat(title, " docked"); },
|
|
35
|
-
groupPoppedOut: function (title) { return "".concat(title, " opened in a new window"); },
|
|
36
|
-
movePickTarget: function (source, target, current, total) {
|
|
37
|
-
return "Moving ".concat(source, ". Target ").concat(target, ", ").concat(current, " of ").concat(total, ". Enter to choose where, Escape to cancel.");
|
|
38
|
-
},
|
|
39
|
-
movePickEdge: function (position, target) {
|
|
40
|
-
return "".concat(edgeWhere(position, target), ". Arrows to change, Enter to confirm, Escape to go back.");
|
|
41
|
-
},
|
|
42
|
-
moveCommitted: function (source, target, position) {
|
|
43
|
-
return "".concat(source, " ").concat(committedWhere(position, target), ".");
|
|
44
|
-
},
|
|
45
|
-
moveCancelled: function () { return "Move cancelled."; },
|
|
46
|
-
moveNotAllowed: function () { return "That move is not allowed."; },
|
|
47
|
-
};
|
|
48
|
-
/** Merge an app's partial overrides over the English defaults. */
|
|
49
|
-
function resolveMessages(overrides) {
|
|
50
|
-
return overrides ? __assign(__assign({}, exports.DEFAULT_MESSAGES), overrides) : exports.DEFAULT_MESSAGES;
|
|
51
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AllModules = void 0;
|
|
4
|
-
var floatingGroupService_1 = require("./floatingGroupService");
|
|
5
|
-
var popoutWindowService_1 = require("./popoutWindowService");
|
|
6
|
-
var watermarkService_1 = require("./watermarkService");
|
|
7
|
-
var edgeGroupService_1 = require("./edgeGroupService");
|
|
8
|
-
var rootDropTargetService_1 = require("./rootDropTargetService");
|
|
9
|
-
var headerActionsService_1 = require("./headerActionsService");
|
|
10
|
-
var liveRegionService_1 = require("./liveRegionService");
|
|
11
|
-
/**
|
|
12
|
-
* Internal list of the built-in modules that ship with the core. Registered
|
|
13
|
-
* automatically by DockviewComponent at construction time; not exported from
|
|
14
|
-
* the package. Additional modules contributed by sibling packages (via
|
|
15
|
-
* `registerModules(...)`) are appended at construction.
|
|
16
|
-
*/
|
|
17
|
-
exports.AllModules = [
|
|
18
|
-
floatingGroupService_1.FloatingGroupModule,
|
|
19
|
-
popoutWindowService_1.PopoutWindowModule,
|
|
20
|
-
watermarkService_1.WatermarkModule,
|
|
21
|
-
edgeGroupService_1.EdgeGroupModule,
|
|
22
|
-
rootDropTargetService_1.RootDropTargetModule,
|
|
23
|
-
headerActionsService_1.HeaderActionsModule,
|
|
24
|
-
liveRegionService_1.LiveRegionModule,
|
|
25
|
-
];
|
|
@@ -1,213 +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.ContentContainer = void 0;
|
|
19
|
-
var lifecycle_1 = require("../../../lifecycle");
|
|
20
|
-
var events_1 = require("../../../events");
|
|
21
|
-
var dom_1 = require("../../../dom");
|
|
22
|
-
var droptarget_1 = require("../../../dnd/droptarget");
|
|
23
|
-
var backend_1 = require("../../../dnd/backend");
|
|
24
|
-
var dataTransfer_1 = require("../../../dnd/dataTransfer");
|
|
25
|
-
var _contentId = 0;
|
|
26
|
-
/** Stable DOM id so each tab's `aria-controls` can reference its tabpanel. */
|
|
27
|
-
var nextContentId = function () { return "dv-tabpanel-".concat(_contentId++); };
|
|
28
|
-
var ContentContainer = /** @class */ (function (_super) {
|
|
29
|
-
__extends(ContentContainer, _super);
|
|
30
|
-
function ContentContainer(accessor, group) {
|
|
31
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
32
|
-
var _this = _super.call(this) || this;
|
|
33
|
-
_this.accessor = accessor;
|
|
34
|
-
_this.group = group;
|
|
35
|
-
_this.disposable = new lifecycle_1.MutableDisposable();
|
|
36
|
-
_this._onDidFocus = new events_1.Emitter();
|
|
37
|
-
_this.onDidFocus = _this._onDidFocus.event;
|
|
38
|
-
_this._onDidBlur = new events_1.Emitter();
|
|
39
|
-
_this.onDidBlur = _this._onDidBlur.event;
|
|
40
|
-
_this._element = document.createElement('div');
|
|
41
|
-
_this._element.className = 'dv-content-container';
|
|
42
|
-
_this._element.tabIndex = -1;
|
|
43
|
-
// WAI-ARIA Tabs pattern: the single content area per group is the
|
|
44
|
-
// tabpanel; `aria-labelledby` is pointed at the active tab in
|
|
45
|
-
// `setLabelledBy` (driven from the group model on activation).
|
|
46
|
-
_this._element.id = nextContentId();
|
|
47
|
-
_this._element.setAttribute('role', 'tabpanel');
|
|
48
|
-
_this.addDisposables(_this._onDidFocus, _this._onDidBlur);
|
|
49
|
-
// Resolve the override anchor dynamically: a group can be relocated
|
|
50
|
-
// between roots (grid / floating / popout) after construction, and the
|
|
51
|
-
// popout anchor in particular lives in another window — a value
|
|
52
|
-
// captured here would mount overlays in the wrong window.
|
|
53
|
-
var getOverrideTarget = function () { var _a; return (_a = group.dropTargetContainer) === null || _a === void 0 ? void 0 : _a.model; };
|
|
54
|
-
var canDisplayOverlay = function (event, position) {
|
|
55
|
-
if (_this.group.locked === 'no-drop-target' ||
|
|
56
|
-
(_this.group.locked && position === 'center')) {
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
var data = (0, dataTransfer_1.getPanelData)();
|
|
60
|
-
if (!data &&
|
|
61
|
-
event.shiftKey &&
|
|
62
|
-
_this.group.location.type !== 'floating') {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
if ((data === null || data === void 0 ? void 0 : data.viewId) === _this.accessor.id) {
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
return _this.group.canDisplayOverlay(event, position, 'content');
|
|
69
|
-
};
|
|
70
|
-
// `dropTarget` stays the concrete `Droptarget` (not via the backend
|
|
71
|
-
// factory) because overlayRenderContainer forwards HTML5 drag events
|
|
72
|
-
// through `dropTarget.dnd` — that field is not part of `IDropTarget`.
|
|
73
|
-
_this.dropTarget = new droptarget_1.Droptarget(_this.element, {
|
|
74
|
-
getOverlayOutline: function () {
|
|
75
|
-
var _a;
|
|
76
|
-
return ((_a = accessor.options.theme) === null || _a === void 0 ? void 0 : _a.dndPanelOverlay) === 'group'
|
|
77
|
-
? _this.element.parentElement
|
|
78
|
-
: null;
|
|
79
|
-
},
|
|
80
|
-
className: 'dv-drop-target-content',
|
|
81
|
-
acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
|
|
82
|
-
canDisplayOverlay: canDisplayOverlay,
|
|
83
|
-
getOverrideTarget: getOverrideTarget,
|
|
84
|
-
overlayModel: (_b = (_a = _this.accessor).resolveDropOverlayModel) === null || _b === void 0 ? void 0 : _b.call(_a, 'content'),
|
|
85
|
-
});
|
|
86
|
-
_this.pointerDropTarget = backend_1.pointerBackend.createDropTarget(_this.element, {
|
|
87
|
-
acceptedTargetZones: ['top', 'bottom', 'left', 'right', 'center'],
|
|
88
|
-
canDisplayOverlay: canDisplayOverlay,
|
|
89
|
-
getOverlayOutline: function () {
|
|
90
|
-
var _a;
|
|
91
|
-
return ((_a = accessor.options.theme) === null || _a === void 0 ? void 0 : _a.dndPanelOverlay) === 'group'
|
|
92
|
-
? _this.element.parentElement
|
|
93
|
-
: null;
|
|
94
|
-
},
|
|
95
|
-
className: 'dv-drop-target-content',
|
|
96
|
-
getOverrideTarget: getOverrideTarget,
|
|
97
|
-
overlayModel: (_d = (_c = _this.accessor).resolveDropOverlayModel) === null || _d === void 0 ? void 0 : _d.call(_c, 'content'),
|
|
98
|
-
});
|
|
99
|
-
_this.addDisposables(_this.dropTarget, _this.pointerDropTarget,
|
|
100
|
-
// Re-apply the app-supplied overlay model when options change.
|
|
101
|
-
// `{}` resets to the built-in default (all fields optional).
|
|
102
|
-
(_g = (_f = (_e = _this.accessor).onDidOptionsChange) === null || _f === void 0 ? void 0 : _f.call(_e, function () {
|
|
103
|
-
var _a, _b, _c;
|
|
104
|
-
var model = (_c = (_b = (_a = _this.accessor).resolveDropOverlayModel) === null || _b === void 0 ? void 0 : _b.call(_a, 'content')) !== null && _c !== void 0 ? _c : {};
|
|
105
|
-
_this.dropTarget.setOverlayModel(model);
|
|
106
|
-
_this.pointerDropTarget.setOverlayModel(model);
|
|
107
|
-
})) !== null && _g !== void 0 ? _g : lifecycle_1.Disposable.NONE);
|
|
108
|
-
return _this;
|
|
109
|
-
}
|
|
110
|
-
Object.defineProperty(ContentContainer.prototype, "element", {
|
|
111
|
-
get: function () {
|
|
112
|
-
return this._element;
|
|
113
|
-
},
|
|
114
|
-
enumerable: false,
|
|
115
|
-
configurable: true
|
|
116
|
-
});
|
|
117
|
-
ContentContainer.prototype.show = function () {
|
|
118
|
-
this.element.style.display = '';
|
|
119
|
-
};
|
|
120
|
-
ContentContainer.prototype.hide = function () {
|
|
121
|
-
this.element.style.display = 'none';
|
|
122
|
-
};
|
|
123
|
-
ContentContainer.prototype.setLabelledBy = function (tabElementId) {
|
|
124
|
-
if (tabElementId) {
|
|
125
|
-
this._element.setAttribute('aria-labelledby', tabElementId);
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
this._element.removeAttribute('aria-labelledby');
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
ContentContainer.prototype.renderPanel = function (panel, options) {
|
|
132
|
-
var _this = this;
|
|
133
|
-
var _a, _b, _c, _d;
|
|
134
|
-
if (options === void 0) { options = { asActive: true }; }
|
|
135
|
-
var doRender = options.asActive ||
|
|
136
|
-
(this.panel && this.group.isPanelActive(this.panel));
|
|
137
|
-
if (this.panel &&
|
|
138
|
-
this.panel.view.content.element.parentElement === this._element) {
|
|
139
|
-
/**
|
|
140
|
-
* If the currently attached panel is mounted directly to the content then remove it
|
|
141
|
-
*/
|
|
142
|
-
this.panel.view.content.element.remove();
|
|
143
|
-
(_b = (_a = this.panel.view.content).onHide) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
144
|
-
}
|
|
145
|
-
this.panel = panel;
|
|
146
|
-
var container;
|
|
147
|
-
switch (panel.api.renderer) {
|
|
148
|
-
case 'onlyWhenVisible':
|
|
149
|
-
this.group.renderContainer.detatch(panel);
|
|
150
|
-
if (this.panel) {
|
|
151
|
-
if (doRender) {
|
|
152
|
-
this._element.appendChild(this.panel.view.content.element);
|
|
153
|
-
(_d = (_c = this.panel.view.content).onShow) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
container = this._element;
|
|
157
|
-
break;
|
|
158
|
-
case 'always':
|
|
159
|
-
if (panel.view.content.element.parentElement === this._element) {
|
|
160
|
-
panel.view.content.element.remove();
|
|
161
|
-
}
|
|
162
|
-
container = this.group.renderContainer.attach({
|
|
163
|
-
panel: panel,
|
|
164
|
-
referenceContainer: this,
|
|
165
|
-
});
|
|
166
|
-
break;
|
|
167
|
-
default:
|
|
168
|
-
throw new Error("dockview: invalid renderer type '".concat(panel.api.renderer, "'"));
|
|
169
|
-
}
|
|
170
|
-
if (doRender) {
|
|
171
|
-
var focusTracker = (0, dom_1.trackFocus)(container);
|
|
172
|
-
this.focusTracker = focusTracker;
|
|
173
|
-
var disposable = new lifecycle_1.CompositeDisposable();
|
|
174
|
-
disposable.addDisposables(focusTracker, focusTracker.onDidFocus(function () { return _this._onDidFocus.fire(); }), focusTracker.onDidBlur(function () { return _this._onDidBlur.fire(); }));
|
|
175
|
-
this.disposable.value = disposable;
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
ContentContainer.prototype.openPanel = function (panel) {
|
|
179
|
-
if (this.panel === panel) {
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
this.renderPanel(panel);
|
|
183
|
-
};
|
|
184
|
-
ContentContainer.prototype.layout = function (_width, _height) {
|
|
185
|
-
// noop
|
|
186
|
-
};
|
|
187
|
-
ContentContainer.prototype.closePanel = function () {
|
|
188
|
-
var _a, _b;
|
|
189
|
-
if (this.panel) {
|
|
190
|
-
if (this.panel.api.renderer === 'onlyWhenVisible') {
|
|
191
|
-
this.panel.view.content.element.remove();
|
|
192
|
-
(_b = (_a = this.panel.view.content).onHide) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
this.panel = undefined;
|
|
196
|
-
};
|
|
197
|
-
ContentContainer.prototype.dispose = function () {
|
|
198
|
-
this.disposable.dispose();
|
|
199
|
-
_super.prototype.dispose.call(this);
|
|
200
|
-
};
|
|
201
|
-
/**
|
|
202
|
-
* Refresh the focus tracker state to handle cases where focus state
|
|
203
|
-
* gets out of sync due to programmatic panel activation
|
|
204
|
-
*/
|
|
205
|
-
ContentContainer.prototype.refreshFocusState = function () {
|
|
206
|
-
var _a;
|
|
207
|
-
if ((_a = this.focusTracker) === null || _a === void 0 ? void 0 : _a.refreshState) {
|
|
208
|
-
this.focusTracker.refreshState();
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
return ContentContainer;
|
|
212
|
-
}(lifecycle_1.CompositeDisposable));
|
|
213
|
-
exports.ContentContainer = ContentContainer;
|
|
@@ -1,132 +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.PopupService = void 0;
|
|
19
|
-
var dom_1 = require("../../dom");
|
|
20
|
-
var events_1 = require("../../events");
|
|
21
|
-
var lifecycle_1 = require("../../lifecycle");
|
|
22
|
-
function isCoarsePrimaryInput(win) {
|
|
23
|
-
if (!win.matchMedia) {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
var coarse = win.matchMedia('(pointer: coarse)').matches;
|
|
27
|
-
var fine = win.matchMedia('(pointer: fine)').matches;
|
|
28
|
-
return coarse && !fine;
|
|
29
|
-
}
|
|
30
|
-
var PopupService = /** @class */ (function (_super) {
|
|
31
|
-
__extends(PopupService, _super);
|
|
32
|
-
function PopupService(root, win) {
|
|
33
|
-
if (win === void 0) { win = globalThis.window; }
|
|
34
|
-
var _this = _super.call(this) || this;
|
|
35
|
-
_this._active = null;
|
|
36
|
-
_this._activeDisposable = new lifecycle_1.MutableDisposable();
|
|
37
|
-
_this._root = root;
|
|
38
|
-
_this._window = win;
|
|
39
|
-
_this._element = win.document.createElement('div');
|
|
40
|
-
_this._element.className = 'dv-popover-anchor';
|
|
41
|
-
_this._element.style.position = 'relative';
|
|
42
|
-
_this._root.prepend(_this._element);
|
|
43
|
-
_this.addDisposables(lifecycle_1.Disposable.from(function () {
|
|
44
|
-
_this.close();
|
|
45
|
-
}), _this._activeDisposable);
|
|
46
|
-
return _this;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Move the popup anchor into a new root element. Call this when a shell
|
|
50
|
-
* wraps the dockview component so that edge-group overflow dropdowns
|
|
51
|
-
* position correctly relative to the full layout area.
|
|
52
|
-
*/
|
|
53
|
-
PopupService.prototype.updateRoot = function (newRoot) {
|
|
54
|
-
newRoot.prepend(this._element);
|
|
55
|
-
this._root = newRoot;
|
|
56
|
-
};
|
|
57
|
-
PopupService.prototype.openPopover = function (element, position) {
|
|
58
|
-
var _this = this;
|
|
59
|
-
var _a;
|
|
60
|
-
this.close();
|
|
61
|
-
var wrapper = this._window.document.createElement('div');
|
|
62
|
-
wrapper.style.position = 'absolute';
|
|
63
|
-
wrapper.style.zIndex = (_a = position.zIndex) !== null && _a !== void 0 ? _a : 'var(--dv-overlay-z-index)';
|
|
64
|
-
wrapper.appendChild(element);
|
|
65
|
-
var anchorBox = this._element.getBoundingClientRect();
|
|
66
|
-
var offsetX = anchorBox.left;
|
|
67
|
-
var offsetY = anchorBox.top;
|
|
68
|
-
wrapper.style.top = "".concat(position.y - offsetY, "px");
|
|
69
|
-
wrapper.style.left = "".concat(position.x - offsetX, "px");
|
|
70
|
-
this._element.appendChild(wrapper);
|
|
71
|
-
this._active = wrapper;
|
|
72
|
-
// Outside-pointerdown dismissal is suppressed for a short grace
|
|
73
|
-
// window after opening. Touch long-press callers (chip / tab context
|
|
74
|
-
// menus) open the popover while the user's finger is still pressing
|
|
75
|
-
// the source element — Android Chrome can dispatch a follow-up
|
|
76
|
-
// synthetic pointerdown tied to the gesture, and the release-then-
|
|
77
|
-
// retap motion can land just outside the wrapper. Either would
|
|
78
|
-
// dismiss the popover before the user can see or interact with it.
|
|
79
|
-
// The grace window is short enough that intentional outside taps
|
|
80
|
-
// still feel responsive.
|
|
81
|
-
var openedAt = Date.now();
|
|
82
|
-
var POINTERDOWN_GRACE_MS = 200;
|
|
83
|
-
this._activeDisposable.value = new lifecycle_1.CompositeDisposable((0, events_1.addDisposableListener)(this._window, 'pointerdown', function (event) {
|
|
84
|
-
var _a;
|
|
85
|
-
if (Date.now() - openedAt < POINTERDOWN_GRACE_MS) {
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
var target = event.target;
|
|
89
|
-
if (!(target instanceof HTMLElement)) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
var el = target;
|
|
93
|
-
while (el && el !== wrapper) {
|
|
94
|
-
el = (_a = el === null || el === void 0 ? void 0 : el.parentElement) !== null && _a !== void 0 ? _a : null;
|
|
95
|
-
}
|
|
96
|
-
if (el) {
|
|
97
|
-
return; // clicked within popover
|
|
98
|
-
}
|
|
99
|
-
_this.close();
|
|
100
|
-
}), (0, events_1.addDisposableListener)(this._window, 'keydown', function (event) {
|
|
101
|
-
if (event.key === 'Escape' || event.key === 'Enter') {
|
|
102
|
-
_this.close();
|
|
103
|
-
}
|
|
104
|
-
}), (0, events_1.addDisposableListener)(this._window, 'resize', function () {
|
|
105
|
-
// On touch-primary devices, common interactions resize the
|
|
106
|
-
// window: on-screen keyboard pop, orientation change, browser
|
|
107
|
-
// address-bar collapse. None of these mean "the user wants
|
|
108
|
-
// the popover dismissed". Specifically, focusing the chip
|
|
109
|
-
// context menu's rename input pops the keyboard, which would
|
|
110
|
-
// otherwise close the menu the moment the user goes to edit
|
|
111
|
-
// it. Desktop / hybrid input keeps the existing behaviour —
|
|
112
|
-
// there a resize genuinely means the user has resized the
|
|
113
|
-
// window and the popover position is now stale.
|
|
114
|
-
if (isCoarsePrimaryInput(_this._window)) {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
_this.close();
|
|
118
|
-
}));
|
|
119
|
-
this._window.requestAnimationFrame(function () {
|
|
120
|
-
(0, dom_1.shiftAbsoluteElementIntoView)(wrapper, _this._root);
|
|
121
|
-
});
|
|
122
|
-
};
|
|
123
|
-
PopupService.prototype.close = function () {
|
|
124
|
-
if (this._active) {
|
|
125
|
-
this._active.remove();
|
|
126
|
-
this._activeDisposable.dispose();
|
|
127
|
-
this._active = null;
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
return PopupService;
|
|
131
|
-
}(lifecycle_1.CompositeDisposable));
|
|
132
|
-
exports.PopupService = PopupService;
|
|
@@ -1,70 +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.DefaultTab = void 0;
|
|
19
|
-
var lifecycle_1 = require("../../../lifecycle");
|
|
20
|
-
var events_1 = require("../../../events");
|
|
21
|
-
var svg_1 = require("../../../svg");
|
|
22
|
-
var DefaultTab = /** @class */ (function (_super) {
|
|
23
|
-
__extends(DefaultTab, _super);
|
|
24
|
-
function DefaultTab() {
|
|
25
|
-
var _this = _super.call(this) || this;
|
|
26
|
-
_this._element = document.createElement('div');
|
|
27
|
-
_this._element.className = 'dv-default-tab';
|
|
28
|
-
_this._content = document.createElement('div');
|
|
29
|
-
_this._content.className = 'dv-default-tab-content';
|
|
30
|
-
_this.action = document.createElement('div');
|
|
31
|
-
_this.action.className = 'dv-default-tab-action';
|
|
32
|
-
_this.action.appendChild((0, svg_1.createCloseButton)());
|
|
33
|
-
_this._element.appendChild(_this._content);
|
|
34
|
-
_this._element.appendChild(_this.action);
|
|
35
|
-
_this.render();
|
|
36
|
-
return _this;
|
|
37
|
-
}
|
|
38
|
-
Object.defineProperty(DefaultTab.prototype, "element", {
|
|
39
|
-
get: function () {
|
|
40
|
-
return this._element;
|
|
41
|
-
},
|
|
42
|
-
enumerable: false,
|
|
43
|
-
configurable: true
|
|
44
|
-
});
|
|
45
|
-
DefaultTab.prototype.init = function (params) {
|
|
46
|
-
var _this = this;
|
|
47
|
-
this._title = params.title;
|
|
48
|
-
this.addDisposables(params.api.onDidTitleChange(function (event) {
|
|
49
|
-
_this._title = event.title;
|
|
50
|
-
_this.render();
|
|
51
|
-
}), (0, events_1.addDisposableListener)(this.action, 'pointerdown', function (ev) {
|
|
52
|
-
ev.preventDefault();
|
|
53
|
-
}), (0, events_1.addDisposableListener)(this.action, 'click', function (ev) {
|
|
54
|
-
if (ev.defaultPrevented) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
ev.preventDefault();
|
|
58
|
-
params.api.close();
|
|
59
|
-
}));
|
|
60
|
-
this.render();
|
|
61
|
-
};
|
|
62
|
-
DefaultTab.prototype.render = function () {
|
|
63
|
-
var _a;
|
|
64
|
-
if (this._content.textContent !== this._title) {
|
|
65
|
-
this._content.textContent = (_a = this._title) !== null && _a !== void 0 ? _a : '';
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
return DefaultTab;
|
|
69
|
-
}(lifecycle_1.CompositeDisposable));
|
|
70
|
-
exports.DefaultTab = DefaultTab;
|