dockview-core 7.0.3 → 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,162 +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
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
var __values = (this && this.__values) || function(o) {
|
|
29
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
30
|
-
if (m) return m.call(o);
|
|
31
|
-
if (o && typeof o.length === "number") return {
|
|
32
|
-
next: function () {
|
|
33
|
-
if (o && i >= o.length) o = void 0;
|
|
34
|
-
return { value: o && o[i++], done: !o };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.BasePanelView = void 0;
|
|
41
|
-
var dom_1 = require("../dom");
|
|
42
|
-
var lifecycle_1 = require("../lifecycle");
|
|
43
|
-
var panelApi_1 = require("../api/panelApi");
|
|
44
|
-
var BasePanelView = /** @class */ (function (_super) {
|
|
45
|
-
__extends(BasePanelView, _super);
|
|
46
|
-
function BasePanelView(id, component, api) {
|
|
47
|
-
var _this = _super.call(this) || this;
|
|
48
|
-
_this.id = id;
|
|
49
|
-
_this.component = component;
|
|
50
|
-
_this.api = api;
|
|
51
|
-
_this._height = 0;
|
|
52
|
-
_this._width = 0;
|
|
53
|
-
_this._element = document.createElement('div');
|
|
54
|
-
_this._element.tabIndex = -1;
|
|
55
|
-
_this._element.style.outline = 'none';
|
|
56
|
-
_this._element.style.height = '100%';
|
|
57
|
-
_this._element.style.width = '100%';
|
|
58
|
-
_this._element.style.overflow = 'hidden';
|
|
59
|
-
var focusTracker = (0, dom_1.trackFocus)(_this._element);
|
|
60
|
-
_this.addDisposables(_this.api, focusTracker.onDidFocus(function () {
|
|
61
|
-
_this.api._onDidChangeFocus.fire({ isFocused: true });
|
|
62
|
-
}), focusTracker.onDidBlur(function () {
|
|
63
|
-
_this.api._onDidChangeFocus.fire({ isFocused: false });
|
|
64
|
-
}), focusTracker);
|
|
65
|
-
return _this;
|
|
66
|
-
}
|
|
67
|
-
Object.defineProperty(BasePanelView.prototype, "element", {
|
|
68
|
-
get: function () {
|
|
69
|
-
return this._element;
|
|
70
|
-
},
|
|
71
|
-
enumerable: false,
|
|
72
|
-
configurable: true
|
|
73
|
-
});
|
|
74
|
-
Object.defineProperty(BasePanelView.prototype, "width", {
|
|
75
|
-
get: function () {
|
|
76
|
-
return this._width;
|
|
77
|
-
},
|
|
78
|
-
enumerable: false,
|
|
79
|
-
configurable: true
|
|
80
|
-
});
|
|
81
|
-
Object.defineProperty(BasePanelView.prototype, "height", {
|
|
82
|
-
get: function () {
|
|
83
|
-
return this._height;
|
|
84
|
-
},
|
|
85
|
-
enumerable: false,
|
|
86
|
-
configurable: true
|
|
87
|
-
});
|
|
88
|
-
Object.defineProperty(BasePanelView.prototype, "params", {
|
|
89
|
-
get: function () {
|
|
90
|
-
var _a;
|
|
91
|
-
return (_a = this._params) === null || _a === void 0 ? void 0 : _a.params;
|
|
92
|
-
},
|
|
93
|
-
enumerable: false,
|
|
94
|
-
configurable: true
|
|
95
|
-
});
|
|
96
|
-
BasePanelView.prototype.focus = function () {
|
|
97
|
-
var event = new panelApi_1.WillFocusEvent();
|
|
98
|
-
this.api._onWillFocus.fire(event);
|
|
99
|
-
if (event.defaultPrevented) {
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
this._element.focus();
|
|
103
|
-
};
|
|
104
|
-
BasePanelView.prototype.layout = function (width, height) {
|
|
105
|
-
this._width = width;
|
|
106
|
-
this._height = height;
|
|
107
|
-
this.api._onDidDimensionChange.fire({ width: width, height: height });
|
|
108
|
-
if (this.part) {
|
|
109
|
-
if (this._params) {
|
|
110
|
-
this.part.update(this._params.params);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
BasePanelView.prototype.init = function (parameters) {
|
|
115
|
-
this._params = parameters;
|
|
116
|
-
this.part = this.getComponent();
|
|
117
|
-
};
|
|
118
|
-
BasePanelView.prototype.update = function (event) {
|
|
119
|
-
var e_1, _a;
|
|
120
|
-
var _b, _c;
|
|
121
|
-
// merge the new parameters with the existing parameters
|
|
122
|
-
this._params = __assign(__assign({}, this._params), { params: __assign(__assign({}, (_b = this._params) === null || _b === void 0 ? void 0 : _b.params), event.params) });
|
|
123
|
-
try {
|
|
124
|
-
/**
|
|
125
|
-
* delete new keys that have a value of undefined,
|
|
126
|
-
* allow values of null
|
|
127
|
-
*/
|
|
128
|
-
for (var _d = __values(Object.keys(event.params)), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
129
|
-
var key = _e.value;
|
|
130
|
-
if (event.params[key] === undefined) {
|
|
131
|
-
delete this._params.params[key];
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
136
|
-
finally {
|
|
137
|
-
try {
|
|
138
|
-
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
|
|
139
|
-
}
|
|
140
|
-
finally { if (e_1) throw e_1.error; }
|
|
141
|
-
}
|
|
142
|
-
// update the view with the updated props
|
|
143
|
-
(_c = this.part) === null || _c === void 0 ? void 0 : _c.update({ params: this._params.params });
|
|
144
|
-
};
|
|
145
|
-
BasePanelView.prototype.toJSON = function () {
|
|
146
|
-
var _a, _b;
|
|
147
|
-
var params = (_b = (_a = this._params) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {};
|
|
148
|
-
return {
|
|
149
|
-
id: this.id,
|
|
150
|
-
component: this.component,
|
|
151
|
-
params: Object.keys(params).length > 0 ? params : undefined,
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
BasePanelView.prototype.dispose = function () {
|
|
155
|
-
var _a;
|
|
156
|
-
this.api.dispose();
|
|
157
|
-
(_a = this.part) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
158
|
-
_super.prototype.dispose.call(this);
|
|
159
|
-
};
|
|
160
|
-
return BasePanelView;
|
|
161
|
-
}(lifecycle_1.CompositeDisposable));
|
|
162
|
-
exports.BasePanelView = BasePanelView;
|
|
@@ -1,372 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Accreditation: This file is largly based upon the MIT licenced VSCode sourcecode found at:
|
|
4
|
-
* https://github.com/microsoft/vscode/tree/main/src/vs/base/browser/ui/grid
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
var __extends = (this && this.__extends) || (function () {
|
|
7
|
-
var extendStatics = function (d, b) {
|
|
8
|
-
extendStatics = Object.setPrototypeOf ||
|
|
9
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
10
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
11
|
-
return extendStatics(d, b);
|
|
12
|
-
};
|
|
13
|
-
return function (d, b) {
|
|
14
|
-
if (typeof b !== "function" && b !== null)
|
|
15
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
16
|
-
extendStatics(d, b);
|
|
17
|
-
function __() { this.constructor = d; }
|
|
18
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
19
|
-
};
|
|
20
|
-
})();
|
|
21
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
22
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
23
|
-
if (!m) return o;
|
|
24
|
-
var i = m.call(o), r, ar = [], e;
|
|
25
|
-
try {
|
|
26
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
27
|
-
}
|
|
28
|
-
catch (error) { e = { error: error }; }
|
|
29
|
-
finally {
|
|
30
|
-
try {
|
|
31
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
32
|
-
}
|
|
33
|
-
finally { if (e) throw e.error; }
|
|
34
|
-
}
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
38
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
39
|
-
if (ar || !(i in from)) {
|
|
40
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
41
|
-
ar[i] = from[i];
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
45
|
-
};
|
|
46
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
-
exports.BranchNode = void 0;
|
|
48
|
-
var splitview_1 = require("../splitview/splitview");
|
|
49
|
-
var events_1 = require("../events");
|
|
50
|
-
var leafNode_1 = require("./leafNode");
|
|
51
|
-
var lifecycle_1 = require("../lifecycle");
|
|
52
|
-
var BranchNode = /** @class */ (function (_super) {
|
|
53
|
-
__extends(BranchNode, _super);
|
|
54
|
-
function BranchNode(orientation, proportionalLayout, styles, size, orthogonalSize, disabled, margin, childDescriptors) {
|
|
55
|
-
var _this = _super.call(this) || this;
|
|
56
|
-
_this.orientation = orientation;
|
|
57
|
-
_this.proportionalLayout = proportionalLayout;
|
|
58
|
-
_this.styles = styles;
|
|
59
|
-
_this._childrenDisposable = lifecycle_1.Disposable.NONE;
|
|
60
|
-
_this.children = [];
|
|
61
|
-
_this._onDidChange = new events_1.Emitter();
|
|
62
|
-
_this.onDidChange = _this._onDidChange.event;
|
|
63
|
-
_this._onDidVisibilityChange = new events_1.Emitter();
|
|
64
|
-
_this.onDidVisibilityChange = _this._onDidVisibilityChange.event;
|
|
65
|
-
_this._orthogonalSize = orthogonalSize;
|
|
66
|
-
_this._size = size;
|
|
67
|
-
_this.element = document.createElement('div');
|
|
68
|
-
_this.element.className = 'dv-branch-node';
|
|
69
|
-
if (childDescriptors) {
|
|
70
|
-
var descriptor = {
|
|
71
|
-
views: childDescriptors.map(function (childDescriptor) {
|
|
72
|
-
return {
|
|
73
|
-
view: childDescriptor.node,
|
|
74
|
-
size: childDescriptor.node.size,
|
|
75
|
-
visible: childDescriptor.node instanceof leafNode_1.LeafNode &&
|
|
76
|
-
childDescriptor.visible !== undefined
|
|
77
|
-
? childDescriptor.visible
|
|
78
|
-
: true,
|
|
79
|
-
};
|
|
80
|
-
}),
|
|
81
|
-
size: _this.orthogonalSize,
|
|
82
|
-
};
|
|
83
|
-
_this.children = childDescriptors.map(function (c) { return c.node; });
|
|
84
|
-
_this.splitview = new splitview_1.Splitview(_this.element, {
|
|
85
|
-
orientation: _this.orientation,
|
|
86
|
-
descriptor: descriptor,
|
|
87
|
-
proportionalLayout: proportionalLayout,
|
|
88
|
-
styles: styles,
|
|
89
|
-
margin: margin,
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
_this.splitview = new splitview_1.Splitview(_this.element, {
|
|
94
|
-
orientation: _this.orientation,
|
|
95
|
-
proportionalLayout: proportionalLayout,
|
|
96
|
-
styles: styles,
|
|
97
|
-
margin: margin,
|
|
98
|
-
});
|
|
99
|
-
_this.splitview.layout(_this.size, _this.orthogonalSize);
|
|
100
|
-
}
|
|
101
|
-
_this.disabled = disabled;
|
|
102
|
-
_this.addDisposables(_this._onDidChange, _this._onDidVisibilityChange, _this.splitview.onDidSashEnd(function () {
|
|
103
|
-
_this._onDidChange.fire({});
|
|
104
|
-
}));
|
|
105
|
-
_this.setupChildrenEvents();
|
|
106
|
-
return _this;
|
|
107
|
-
}
|
|
108
|
-
Object.defineProperty(BranchNode.prototype, "width", {
|
|
109
|
-
get: function () {
|
|
110
|
-
return this.orientation === splitview_1.Orientation.HORIZONTAL
|
|
111
|
-
? this.size
|
|
112
|
-
: this.orthogonalSize;
|
|
113
|
-
},
|
|
114
|
-
enumerable: false,
|
|
115
|
-
configurable: true
|
|
116
|
-
});
|
|
117
|
-
Object.defineProperty(BranchNode.prototype, "height", {
|
|
118
|
-
get: function () {
|
|
119
|
-
return this.orientation === splitview_1.Orientation.HORIZONTAL
|
|
120
|
-
? this.orthogonalSize
|
|
121
|
-
: this.size;
|
|
122
|
-
},
|
|
123
|
-
enumerable: false,
|
|
124
|
-
configurable: true
|
|
125
|
-
});
|
|
126
|
-
Object.defineProperty(BranchNode.prototype, "minimumSize", {
|
|
127
|
-
get: function () {
|
|
128
|
-
var _this = this;
|
|
129
|
-
return this.children.length === 0
|
|
130
|
-
? 0
|
|
131
|
-
: Math.max.apply(Math, __spreadArray([], __read(this.children.map(function (c, index) {
|
|
132
|
-
return _this.splitview.isViewVisible(index)
|
|
133
|
-
? c.minimumOrthogonalSize
|
|
134
|
-
: 0;
|
|
135
|
-
})), false));
|
|
136
|
-
},
|
|
137
|
-
enumerable: false,
|
|
138
|
-
configurable: true
|
|
139
|
-
});
|
|
140
|
-
Object.defineProperty(BranchNode.prototype, "maximumSize", {
|
|
141
|
-
get: function () {
|
|
142
|
-
var _this = this;
|
|
143
|
-
return Math.min.apply(Math, __spreadArray([], __read(this.children.map(function (c, index) {
|
|
144
|
-
return _this.splitview.isViewVisible(index)
|
|
145
|
-
? c.maximumOrthogonalSize
|
|
146
|
-
: Number.POSITIVE_INFINITY;
|
|
147
|
-
})), false));
|
|
148
|
-
},
|
|
149
|
-
enumerable: false,
|
|
150
|
-
configurable: true
|
|
151
|
-
});
|
|
152
|
-
Object.defineProperty(BranchNode.prototype, "minimumOrthogonalSize", {
|
|
153
|
-
get: function () {
|
|
154
|
-
return this.splitview.minimumSize;
|
|
155
|
-
},
|
|
156
|
-
enumerable: false,
|
|
157
|
-
configurable: true
|
|
158
|
-
});
|
|
159
|
-
Object.defineProperty(BranchNode.prototype, "maximumOrthogonalSize", {
|
|
160
|
-
get: function () {
|
|
161
|
-
return this.splitview.maximumSize;
|
|
162
|
-
},
|
|
163
|
-
enumerable: false,
|
|
164
|
-
configurable: true
|
|
165
|
-
});
|
|
166
|
-
Object.defineProperty(BranchNode.prototype, "orthogonalSize", {
|
|
167
|
-
get: function () {
|
|
168
|
-
return this._orthogonalSize;
|
|
169
|
-
},
|
|
170
|
-
enumerable: false,
|
|
171
|
-
configurable: true
|
|
172
|
-
});
|
|
173
|
-
Object.defineProperty(BranchNode.prototype, "size", {
|
|
174
|
-
get: function () {
|
|
175
|
-
return this._size;
|
|
176
|
-
},
|
|
177
|
-
enumerable: false,
|
|
178
|
-
configurable: true
|
|
179
|
-
});
|
|
180
|
-
Object.defineProperty(BranchNode.prototype, "minimumWidth", {
|
|
181
|
-
get: function () {
|
|
182
|
-
return this.orientation === splitview_1.Orientation.HORIZONTAL
|
|
183
|
-
? this.minimumOrthogonalSize
|
|
184
|
-
: this.minimumSize;
|
|
185
|
-
},
|
|
186
|
-
enumerable: false,
|
|
187
|
-
configurable: true
|
|
188
|
-
});
|
|
189
|
-
Object.defineProperty(BranchNode.prototype, "minimumHeight", {
|
|
190
|
-
get: function () {
|
|
191
|
-
return this.orientation === splitview_1.Orientation.HORIZONTAL
|
|
192
|
-
? this.minimumSize
|
|
193
|
-
: this.minimumOrthogonalSize;
|
|
194
|
-
},
|
|
195
|
-
enumerable: false,
|
|
196
|
-
configurable: true
|
|
197
|
-
});
|
|
198
|
-
Object.defineProperty(BranchNode.prototype, "maximumWidth", {
|
|
199
|
-
get: function () {
|
|
200
|
-
return this.orientation === splitview_1.Orientation.HORIZONTAL
|
|
201
|
-
? this.maximumOrthogonalSize
|
|
202
|
-
: this.maximumSize;
|
|
203
|
-
},
|
|
204
|
-
enumerable: false,
|
|
205
|
-
configurable: true
|
|
206
|
-
});
|
|
207
|
-
Object.defineProperty(BranchNode.prototype, "maximumHeight", {
|
|
208
|
-
get: function () {
|
|
209
|
-
return this.orientation === splitview_1.Orientation.HORIZONTAL
|
|
210
|
-
? this.maximumSize
|
|
211
|
-
: this.maximumOrthogonalSize;
|
|
212
|
-
},
|
|
213
|
-
enumerable: false,
|
|
214
|
-
configurable: true
|
|
215
|
-
});
|
|
216
|
-
Object.defineProperty(BranchNode.prototype, "priority", {
|
|
217
|
-
get: function () {
|
|
218
|
-
if (this.children.length === 0) {
|
|
219
|
-
return splitview_1.LayoutPriority.Normal;
|
|
220
|
-
}
|
|
221
|
-
var priorities = new Set(this.children.map(function (c) { var _a; return (_a = c.priority) !== null && _a !== void 0 ? _a : splitview_1.LayoutPriority.Normal; }));
|
|
222
|
-
if (priorities.has(splitview_1.LayoutPriority.High)) {
|
|
223
|
-
return splitview_1.LayoutPriority.High;
|
|
224
|
-
}
|
|
225
|
-
else if (priorities.has(splitview_1.LayoutPriority.Low)) {
|
|
226
|
-
return splitview_1.LayoutPriority.Low;
|
|
227
|
-
}
|
|
228
|
-
return splitview_1.LayoutPriority.Normal;
|
|
229
|
-
},
|
|
230
|
-
enumerable: false,
|
|
231
|
-
configurable: true
|
|
232
|
-
});
|
|
233
|
-
Object.defineProperty(BranchNode.prototype, "disabled", {
|
|
234
|
-
get: function () {
|
|
235
|
-
return this.splitview.disabled;
|
|
236
|
-
},
|
|
237
|
-
set: function (value) {
|
|
238
|
-
this.splitview.disabled = value;
|
|
239
|
-
},
|
|
240
|
-
enumerable: false,
|
|
241
|
-
configurable: true
|
|
242
|
-
});
|
|
243
|
-
Object.defineProperty(BranchNode.prototype, "margin", {
|
|
244
|
-
get: function () {
|
|
245
|
-
return this.splitview.margin;
|
|
246
|
-
},
|
|
247
|
-
set: function (value) {
|
|
248
|
-
this.splitview.margin = value;
|
|
249
|
-
this.children.forEach(function (child) {
|
|
250
|
-
if (child instanceof BranchNode) {
|
|
251
|
-
child.margin = value;
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
},
|
|
255
|
-
enumerable: false,
|
|
256
|
-
configurable: true
|
|
257
|
-
});
|
|
258
|
-
BranchNode.prototype.setVisible = function (_visible) {
|
|
259
|
-
// noop
|
|
260
|
-
};
|
|
261
|
-
BranchNode.prototype.isChildVisible = function (index) {
|
|
262
|
-
if (index < 0 || index >= this.children.length) {
|
|
263
|
-
throw new Error('Invalid index');
|
|
264
|
-
}
|
|
265
|
-
return this.splitview.isViewVisible(index);
|
|
266
|
-
};
|
|
267
|
-
BranchNode.prototype.setChildVisible = function (index, visible) {
|
|
268
|
-
if (index < 0 || index >= this.children.length) {
|
|
269
|
-
throw new Error('Invalid index');
|
|
270
|
-
}
|
|
271
|
-
if (this.splitview.isViewVisible(index) === visible) {
|
|
272
|
-
return;
|
|
273
|
-
}
|
|
274
|
-
var wereAllChildrenHidden = this.splitview.contentSize === 0;
|
|
275
|
-
this.splitview.setViewVisible(index, visible);
|
|
276
|
-
// }
|
|
277
|
-
var areAllChildrenHidden = this.splitview.contentSize === 0;
|
|
278
|
-
// If all children are hidden then the parent should hide the entire splitview
|
|
279
|
-
// If the entire splitview is hidden then the parent should show the splitview when a child is shown
|
|
280
|
-
if ((visible && wereAllChildrenHidden) ||
|
|
281
|
-
(!visible && areAllChildrenHidden)) {
|
|
282
|
-
this._onDidVisibilityChange.fire({ visible: visible });
|
|
283
|
-
}
|
|
284
|
-
};
|
|
285
|
-
BranchNode.prototype.moveChild = function (from, to) {
|
|
286
|
-
if (from === to) {
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
if (from < 0 || from >= this.children.length) {
|
|
290
|
-
throw new Error('Invalid from index');
|
|
291
|
-
}
|
|
292
|
-
if (from < to) {
|
|
293
|
-
to--;
|
|
294
|
-
}
|
|
295
|
-
this.splitview.moveView(from, to);
|
|
296
|
-
var child = this._removeChild(from);
|
|
297
|
-
this._addChild(child, to);
|
|
298
|
-
};
|
|
299
|
-
BranchNode.prototype.getChildSize = function (index) {
|
|
300
|
-
if (index < 0 || index >= this.children.length) {
|
|
301
|
-
throw new Error('Invalid index');
|
|
302
|
-
}
|
|
303
|
-
return this.splitview.getViewSize(index);
|
|
304
|
-
};
|
|
305
|
-
BranchNode.prototype.resizeChild = function (index, size) {
|
|
306
|
-
if (index < 0 || index >= this.children.length) {
|
|
307
|
-
throw new Error('Invalid index');
|
|
308
|
-
}
|
|
309
|
-
this.splitview.resizeView(index, size);
|
|
310
|
-
};
|
|
311
|
-
BranchNode.prototype.layout = function (size, orthogonalSize) {
|
|
312
|
-
this._size = orthogonalSize;
|
|
313
|
-
this._orthogonalSize = size;
|
|
314
|
-
this.splitview.layout(orthogonalSize, size);
|
|
315
|
-
};
|
|
316
|
-
BranchNode.prototype.addChild = function (node, size, index, skipLayout) {
|
|
317
|
-
if (index < 0 || index > this.children.length) {
|
|
318
|
-
throw new Error('Invalid index');
|
|
319
|
-
}
|
|
320
|
-
this.splitview.addView(node, size, index, skipLayout);
|
|
321
|
-
this._addChild(node, index);
|
|
322
|
-
};
|
|
323
|
-
BranchNode.prototype.getChildCachedVisibleSize = function (index) {
|
|
324
|
-
if (index < 0 || index >= this.children.length) {
|
|
325
|
-
throw new Error('Invalid index');
|
|
326
|
-
}
|
|
327
|
-
return this.splitview.getViewCachedVisibleSize(index);
|
|
328
|
-
};
|
|
329
|
-
BranchNode.prototype.removeChild = function (index, sizing) {
|
|
330
|
-
if (index < 0 || index >= this.children.length) {
|
|
331
|
-
throw new Error('Invalid index');
|
|
332
|
-
}
|
|
333
|
-
this.splitview.removeView(index, sizing);
|
|
334
|
-
return this._removeChild(index);
|
|
335
|
-
};
|
|
336
|
-
BranchNode.prototype._addChild = function (node, index) {
|
|
337
|
-
this.children.splice(index, 0, node);
|
|
338
|
-
this.setupChildrenEvents();
|
|
339
|
-
};
|
|
340
|
-
BranchNode.prototype._removeChild = function (index) {
|
|
341
|
-
var _a = __read(this.children.splice(index, 1), 1), child = _a[0];
|
|
342
|
-
this.setupChildrenEvents();
|
|
343
|
-
return child;
|
|
344
|
-
};
|
|
345
|
-
BranchNode.prototype.setupChildrenEvents = function () {
|
|
346
|
-
var _this = this;
|
|
347
|
-
this._childrenDisposable.dispose();
|
|
348
|
-
this._childrenDisposable = new (lifecycle_1.CompositeDisposable.bind.apply(lifecycle_1.CompositeDisposable, __spreadArray([void 0, events_1.Event.any.apply(events_1.Event, __spreadArray([], __read(this.children.map(function (c) { return c.onDidChange; })), false))(function (e) {
|
|
349
|
-
/**
|
|
350
|
-
* indicate a change has occured to allows any re-rendering but don't bubble
|
|
351
|
-
* event because that was specific to this branch
|
|
352
|
-
*/
|
|
353
|
-
_this._onDidChange.fire({ size: e.orthogonalSize });
|
|
354
|
-
})], __read(this.children.map(function (c, i) {
|
|
355
|
-
if (c instanceof BranchNode) {
|
|
356
|
-
return c.onDidVisibilityChange(function (_a) {
|
|
357
|
-
var visible = _a.visible;
|
|
358
|
-
_this.setChildVisible(i, visible);
|
|
359
|
-
});
|
|
360
|
-
}
|
|
361
|
-
return lifecycle_1.Disposable.NONE;
|
|
362
|
-
})), false)))();
|
|
363
|
-
};
|
|
364
|
-
BranchNode.prototype.dispose = function () {
|
|
365
|
-
this._childrenDisposable.dispose();
|
|
366
|
-
this.splitview.dispose();
|
|
367
|
-
this.children.forEach(function (child) { return child.dispose(); });
|
|
368
|
-
_super.prototype.dispose.call(this);
|
|
369
|
-
};
|
|
370
|
-
return BranchNode;
|
|
371
|
-
}(lifecycle_1.CompositeDisposable));
|
|
372
|
-
exports.BranchNode = BranchNode;
|