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
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { SerializedGridview } from './gridview';
|
|
2
|
-
import { IPanelDeserializer } from '../dockview/deserializer';
|
|
3
|
-
import { GridviewComponentOptions } from './options';
|
|
4
|
-
import { BaseGrid, Direction, IBaseGrid, IGridPanelView } from './baseComponentGridview';
|
|
5
|
-
import { GridviewPanel, GridviewInitParameters, GridPanelViewState, IGridviewPanel } from './gridviewPanel';
|
|
6
|
-
import { BaseComponentOptions, Parameters } from '../panel/types';
|
|
7
|
-
import { Orientation, Sizing } from '../splitview/splitview';
|
|
8
|
-
import { Emitter, Event } from '../events';
|
|
9
|
-
import { Position } from '../dnd/droptarget';
|
|
10
|
-
export interface SerializedGridviewComponent {
|
|
11
|
-
grid: SerializedGridview<GridPanelViewState>;
|
|
12
|
-
activePanel?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface AddGridviewComponentOptions<T extends object = Parameters> extends BaseComponentOptions<T> {
|
|
15
|
-
minimumWidth?: number;
|
|
16
|
-
maximumWidth?: number;
|
|
17
|
-
minimumHeight?: number;
|
|
18
|
-
maximumHeight?: number;
|
|
19
|
-
position?: {
|
|
20
|
-
direction: Direction;
|
|
21
|
-
referencePanel: string;
|
|
22
|
-
};
|
|
23
|
-
location?: number[];
|
|
24
|
-
}
|
|
25
|
-
export interface IGridPanelComponentView extends IGridPanelView {
|
|
26
|
-
init: (params: GridviewInitParameters) => void;
|
|
27
|
-
}
|
|
28
|
-
export interface IGridviewComponent extends IBaseGrid<GridviewPanel> {
|
|
29
|
-
readonly orientation: Orientation;
|
|
30
|
-
readonly onDidLayoutFromJSON: Event<void>;
|
|
31
|
-
updateOptions(options: Partial<GridviewComponentOptions>): void;
|
|
32
|
-
addPanel<T extends object = Parameters>(options: AddGridviewComponentOptions<T>): IGridviewPanel;
|
|
33
|
-
removePanel(panel: IGridviewPanel, sizing?: Sizing): void;
|
|
34
|
-
focus(): void;
|
|
35
|
-
fromJSON(serializedGridview: SerializedGridviewComponent): void;
|
|
36
|
-
toJSON(): SerializedGridviewComponent;
|
|
37
|
-
movePanel(panel: IGridviewPanel, options: {
|
|
38
|
-
direction: Direction;
|
|
39
|
-
reference: string;
|
|
40
|
-
size?: number;
|
|
41
|
-
}): void;
|
|
42
|
-
setVisible(panel: IGridviewPanel, visible: boolean): void;
|
|
43
|
-
setActive(panel: IGridviewPanel): void;
|
|
44
|
-
readonly onDidRemoveGroup: Event<GridviewPanel>;
|
|
45
|
-
readonly onDidAddGroup: Event<GridviewPanel>;
|
|
46
|
-
readonly onDidActiveGroupChange: Event<GridviewPanel | undefined>;
|
|
47
|
-
}
|
|
48
|
-
export declare class GridviewComponent extends BaseGrid<GridviewPanel> implements IGridviewComponent {
|
|
49
|
-
private _options;
|
|
50
|
-
private _deserializer;
|
|
51
|
-
private readonly _onDidLayoutfromJSON;
|
|
52
|
-
readonly onDidLayoutFromJSON: Event<void>;
|
|
53
|
-
private readonly _onDidRemoveGroup;
|
|
54
|
-
readonly onDidRemoveGroup: Event<GridviewPanel>;
|
|
55
|
-
protected readonly _onDidAddGroup: Emitter<GridviewPanel<import("../api/gridviewPanelApi").GridviewPanelApiImpl>>;
|
|
56
|
-
readonly onDidAddGroup: Event<GridviewPanel>;
|
|
57
|
-
private readonly _onDidActiveGroupChange;
|
|
58
|
-
readonly onDidActiveGroupChange: Event<GridviewPanel | undefined>;
|
|
59
|
-
get orientation(): Orientation;
|
|
60
|
-
set orientation(value: Orientation);
|
|
61
|
-
get options(): GridviewComponentOptions;
|
|
62
|
-
get deserializer(): IPanelDeserializer | undefined;
|
|
63
|
-
set deserializer(value: IPanelDeserializer | undefined);
|
|
64
|
-
constructor(container: HTMLElement, options: GridviewComponentOptions);
|
|
65
|
-
updateOptions(options: Partial<GridviewComponentOptions>): void;
|
|
66
|
-
removePanel(panel: GridviewPanel): void;
|
|
67
|
-
/**
|
|
68
|
-
* Serialize the current state of the layout
|
|
69
|
-
*
|
|
70
|
-
* @returns A JSON respresentation of the layout
|
|
71
|
-
*/
|
|
72
|
-
toJSON(): SerializedGridviewComponent;
|
|
73
|
-
setVisible(panel: GridviewPanel, visible: boolean): void;
|
|
74
|
-
setActive(panel: GridviewPanel): void;
|
|
75
|
-
focus(): void;
|
|
76
|
-
fromJSON(serializedGridview: SerializedGridviewComponent): void;
|
|
77
|
-
clear(): void;
|
|
78
|
-
movePanel(panel: GridviewPanel, options: {
|
|
79
|
-
direction: Direction;
|
|
80
|
-
reference: string;
|
|
81
|
-
size?: number;
|
|
82
|
-
}): void;
|
|
83
|
-
addPanel<T extends object = Parameters>(options: AddGridviewComponentOptions<T>): IGridviewPanel;
|
|
84
|
-
private registerPanel;
|
|
85
|
-
moveGroup(referenceGroup: IGridPanelComponentView, groupId: string, target: Position): void;
|
|
86
|
-
removeGroup(group: GridviewPanel): void;
|
|
87
|
-
dispose(): void;
|
|
88
|
-
}
|
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
import { getRelativeLocation, getGridLocation, } from './gridview';
|
|
2
|
-
import { tail, sequenceEquals } from '../array';
|
|
3
|
-
import { CompositeDisposable } from '../lifecycle';
|
|
4
|
-
import { BaseGrid, toTarget, } from './baseComponentGridview';
|
|
5
|
-
import { Emitter } from '../events';
|
|
6
|
-
export class GridviewComponent extends BaseGrid {
|
|
7
|
-
get orientation() {
|
|
8
|
-
return this.gridview.orientation;
|
|
9
|
-
}
|
|
10
|
-
set orientation(value) {
|
|
11
|
-
this.gridview.orientation = value;
|
|
12
|
-
}
|
|
13
|
-
get options() {
|
|
14
|
-
return this._options;
|
|
15
|
-
}
|
|
16
|
-
get deserializer() {
|
|
17
|
-
return this._deserializer;
|
|
18
|
-
}
|
|
19
|
-
set deserializer(value) {
|
|
20
|
-
this._deserializer = value;
|
|
21
|
-
}
|
|
22
|
-
constructor(container, options) {
|
|
23
|
-
var _a;
|
|
24
|
-
super(container, {
|
|
25
|
-
proportionalLayout: (_a = options.proportionalLayout) !== null && _a !== void 0 ? _a : true,
|
|
26
|
-
orientation: options.orientation,
|
|
27
|
-
styles: options.hideBorders
|
|
28
|
-
? { separatorBorder: 'transparent' }
|
|
29
|
-
: undefined,
|
|
30
|
-
disableAutoResizing: options.disableAutoResizing,
|
|
31
|
-
className: options.className,
|
|
32
|
-
});
|
|
33
|
-
this._onDidLayoutfromJSON = new Emitter();
|
|
34
|
-
this.onDidLayoutFromJSON = this._onDidLayoutfromJSON.event;
|
|
35
|
-
this._onDidRemoveGroup = new Emitter();
|
|
36
|
-
this.onDidRemoveGroup = this._onDidRemoveGroup.event;
|
|
37
|
-
this._onDidAddGroup = new Emitter();
|
|
38
|
-
this.onDidAddGroup = this._onDidAddGroup.event;
|
|
39
|
-
this._onDidActiveGroupChange = new Emitter();
|
|
40
|
-
this.onDidActiveGroupChange = this._onDidActiveGroupChange.event;
|
|
41
|
-
this._options = options;
|
|
42
|
-
this.addDisposables(this._onDidAddGroup, this._onDidRemoveGroup, this._onDidActiveGroupChange, this.onDidAdd((event) => {
|
|
43
|
-
this._onDidAddGroup.fire(event);
|
|
44
|
-
}), this.onDidRemove((event) => {
|
|
45
|
-
this._onDidRemoveGroup.fire(event);
|
|
46
|
-
}), this.onDidActiveChange((event) => {
|
|
47
|
-
this._onDidActiveGroupChange.fire(event);
|
|
48
|
-
}));
|
|
49
|
-
}
|
|
50
|
-
updateOptions(options) {
|
|
51
|
-
super.updateOptions(options);
|
|
52
|
-
const hasOrientationChanged = typeof options.orientation === 'string' &&
|
|
53
|
-
this.gridview.orientation !== options.orientation;
|
|
54
|
-
this._options = Object.assign(Object.assign({}, this.options), options);
|
|
55
|
-
if (hasOrientationChanged) {
|
|
56
|
-
this.gridview.orientation = options.orientation;
|
|
57
|
-
}
|
|
58
|
-
this.layout(this.gridview.width, this.gridview.height, true);
|
|
59
|
-
}
|
|
60
|
-
removePanel(panel) {
|
|
61
|
-
this.removeGroup(panel);
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Serialize the current state of the layout
|
|
65
|
-
*
|
|
66
|
-
* @returns A JSON respresentation of the layout
|
|
67
|
-
*/
|
|
68
|
-
toJSON() {
|
|
69
|
-
var _a;
|
|
70
|
-
const data = this.gridview.serialize();
|
|
71
|
-
return {
|
|
72
|
-
grid: data,
|
|
73
|
-
activePanel: (_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.id,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
setVisible(panel, visible) {
|
|
77
|
-
this.gridview.setViewVisible(getGridLocation(panel.element), visible);
|
|
78
|
-
}
|
|
79
|
-
setActive(panel) {
|
|
80
|
-
this._groups.forEach((value, _key) => {
|
|
81
|
-
value.value.setActive(panel === value.value);
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
focus() {
|
|
85
|
-
var _a;
|
|
86
|
-
(_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();
|
|
87
|
-
}
|
|
88
|
-
fromJSON(serializedGridview) {
|
|
89
|
-
this.clear();
|
|
90
|
-
const { grid, activePanel } = serializedGridview;
|
|
91
|
-
try {
|
|
92
|
-
const queue = [];
|
|
93
|
-
// take note of the existing dimensions
|
|
94
|
-
const width = this.width;
|
|
95
|
-
const height = this.height;
|
|
96
|
-
this.gridview.deserialize(grid, {
|
|
97
|
-
fromJSON: (node) => {
|
|
98
|
-
const { data } = node;
|
|
99
|
-
const view = this.options.createComponent({
|
|
100
|
-
id: data.id,
|
|
101
|
-
name: data.component,
|
|
102
|
-
});
|
|
103
|
-
queue.push(() => view.init({
|
|
104
|
-
params: data.params,
|
|
105
|
-
minimumWidth: data.minimumWidth,
|
|
106
|
-
maximumWidth: data.maximumWidth,
|
|
107
|
-
minimumHeight: data.minimumHeight,
|
|
108
|
-
maximumHeight: data.maximumHeight,
|
|
109
|
-
priority: data.priority,
|
|
110
|
-
snap: !!data.snap,
|
|
111
|
-
accessor: this,
|
|
112
|
-
isVisible: node.visible,
|
|
113
|
-
}));
|
|
114
|
-
this._onDidAddGroup.fire(view);
|
|
115
|
-
this.registerPanel(view);
|
|
116
|
-
return view;
|
|
117
|
-
},
|
|
118
|
-
});
|
|
119
|
-
this.layout(width, height, true);
|
|
120
|
-
queue.forEach((f) => f());
|
|
121
|
-
if (typeof activePanel === 'string') {
|
|
122
|
-
const panel = this.getPanel(activePanel);
|
|
123
|
-
if (panel) {
|
|
124
|
-
this.doSetGroupActive(panel);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
catch (err) {
|
|
129
|
-
/**
|
|
130
|
-
* To remove a group we cannot call this.removeGroup(...) since this makes assumptions about
|
|
131
|
-
* the underlying HTMLElement existing in the Gridview.
|
|
132
|
-
*/
|
|
133
|
-
for (const group of this.groups) {
|
|
134
|
-
group.dispose();
|
|
135
|
-
this._groups.delete(group.id);
|
|
136
|
-
this._onDidRemoveGroup.fire(group);
|
|
137
|
-
}
|
|
138
|
-
// fires clean-up events and clears the underlying HTML gridview.
|
|
139
|
-
this.clear();
|
|
140
|
-
/**
|
|
141
|
-
* even though we have cleaned-up we still want to inform the caller of their error
|
|
142
|
-
* and we'll do this through re-throwing the original error since afterall you would
|
|
143
|
-
* expect trying to load a corrupted layout to result in an error and not silently fail...
|
|
144
|
-
*/
|
|
145
|
-
throw err;
|
|
146
|
-
}
|
|
147
|
-
this._onDidLayoutfromJSON.fire();
|
|
148
|
-
}
|
|
149
|
-
clear() {
|
|
150
|
-
const hasActiveGroup = this.activeGroup;
|
|
151
|
-
const groups = Array.from(this._groups.values()); // reassign since group panels will mutate
|
|
152
|
-
for (const group of groups) {
|
|
153
|
-
group.disposable.dispose();
|
|
154
|
-
this.doRemoveGroup(group.value, { skipActive: true });
|
|
155
|
-
}
|
|
156
|
-
if (hasActiveGroup) {
|
|
157
|
-
this.doSetGroupActive(undefined);
|
|
158
|
-
}
|
|
159
|
-
this.gridview.clear();
|
|
160
|
-
}
|
|
161
|
-
movePanel(panel, options) {
|
|
162
|
-
var _a;
|
|
163
|
-
let relativeLocation;
|
|
164
|
-
const removedPanel = this.gridview.remove(panel);
|
|
165
|
-
const referenceGroup = (_a = this._groups.get(options.reference)) === null || _a === void 0 ? void 0 : _a.value;
|
|
166
|
-
if (!referenceGroup) {
|
|
167
|
-
throw new Error(`reference group ${options.reference} does not exist`);
|
|
168
|
-
}
|
|
169
|
-
const target = toTarget(options.direction);
|
|
170
|
-
if (target === 'center') {
|
|
171
|
-
throw new Error(`${target} not supported as an option`);
|
|
172
|
-
}
|
|
173
|
-
else {
|
|
174
|
-
const location = getGridLocation(referenceGroup.element);
|
|
175
|
-
relativeLocation = getRelativeLocation(this.gridview.orientation, location, target);
|
|
176
|
-
}
|
|
177
|
-
this.doAddGroup(removedPanel, relativeLocation, options.size);
|
|
178
|
-
}
|
|
179
|
-
addPanel(options) {
|
|
180
|
-
var _a, _b, _c, _d;
|
|
181
|
-
let relativeLocation = (_a = options.location) !== null && _a !== void 0 ? _a : [0];
|
|
182
|
-
if ((_b = options.position) === null || _b === void 0 ? void 0 : _b.referencePanel) {
|
|
183
|
-
const referenceGroup = (_c = this._groups.get(options.position.referencePanel)) === null || _c === void 0 ? void 0 : _c.value;
|
|
184
|
-
if (!referenceGroup) {
|
|
185
|
-
throw new Error(`reference group ${options.position.referencePanel} does not exist`);
|
|
186
|
-
}
|
|
187
|
-
const target = toTarget(options.position.direction);
|
|
188
|
-
if (target === 'center') {
|
|
189
|
-
throw new Error(`${target} not supported as an option`);
|
|
190
|
-
}
|
|
191
|
-
else {
|
|
192
|
-
const location = getGridLocation(referenceGroup.element);
|
|
193
|
-
relativeLocation = getRelativeLocation(this.gridview.orientation, location, target);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
const view = this.options.createComponent({
|
|
197
|
-
id: options.id,
|
|
198
|
-
name: options.component,
|
|
199
|
-
});
|
|
200
|
-
view.init({
|
|
201
|
-
params: (_d = options.params) !== null && _d !== void 0 ? _d : {},
|
|
202
|
-
minimumWidth: options.minimumWidth,
|
|
203
|
-
maximumWidth: options.maximumWidth,
|
|
204
|
-
minimumHeight: options.minimumHeight,
|
|
205
|
-
maximumHeight: options.maximumHeight,
|
|
206
|
-
priority: options.priority,
|
|
207
|
-
snap: !!options.snap,
|
|
208
|
-
accessor: this,
|
|
209
|
-
isVisible: true,
|
|
210
|
-
});
|
|
211
|
-
this.doAddGroup(view, relativeLocation, options.size);
|
|
212
|
-
this.registerPanel(view);
|
|
213
|
-
this.doSetGroupActive(view);
|
|
214
|
-
return view;
|
|
215
|
-
}
|
|
216
|
-
registerPanel(panel) {
|
|
217
|
-
const disposable = new CompositeDisposable(panel.api.onDidFocusChange((event) => {
|
|
218
|
-
if (!event.isFocused) {
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
this._groups.forEach((groupItem) => {
|
|
222
|
-
const group = groupItem.value;
|
|
223
|
-
group.setActive(group === panel);
|
|
224
|
-
});
|
|
225
|
-
}));
|
|
226
|
-
this._groups.set(panel.id, {
|
|
227
|
-
value: panel,
|
|
228
|
-
disposable,
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
moveGroup(referenceGroup, groupId, target) {
|
|
232
|
-
const sourceGroup = this.getPanel(groupId);
|
|
233
|
-
if (!sourceGroup) {
|
|
234
|
-
throw new Error('invalid operation');
|
|
235
|
-
}
|
|
236
|
-
const referenceLocation = getGridLocation(referenceGroup.element);
|
|
237
|
-
const targetLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, target);
|
|
238
|
-
const [targetParentLocation, to] = tail(targetLocation);
|
|
239
|
-
const sourceLocation = getGridLocation(sourceGroup.element);
|
|
240
|
-
const [sourceParentLocation, from] = tail(sourceLocation);
|
|
241
|
-
if (sequenceEquals(sourceParentLocation, targetParentLocation)) {
|
|
242
|
-
// special case when 'swapping' two views within same grid location
|
|
243
|
-
// if a group has one tab - we are essentially moving the 'group'
|
|
244
|
-
// which is equivalent to swapping two views in this case
|
|
245
|
-
this.gridview.moveView(sourceParentLocation, from, to);
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
// source group will become empty so delete the group
|
|
249
|
-
const targetGroup = this.doRemoveGroup(sourceGroup, {
|
|
250
|
-
skipActive: true,
|
|
251
|
-
skipDispose: true,
|
|
252
|
-
});
|
|
253
|
-
// after deleting the group we need to re-evaulate the ref location
|
|
254
|
-
const updatedReferenceLocation = getGridLocation(referenceGroup.element);
|
|
255
|
-
const location = getRelativeLocation(this.gridview.orientation, updatedReferenceLocation, target);
|
|
256
|
-
this.doAddGroup(targetGroup, location);
|
|
257
|
-
}
|
|
258
|
-
removeGroup(group) {
|
|
259
|
-
super.removeGroup(group);
|
|
260
|
-
}
|
|
261
|
-
dispose() {
|
|
262
|
-
super.dispose();
|
|
263
|
-
this._onDidLayoutfromJSON.dispose();
|
|
264
|
-
}
|
|
265
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { PanelInitParameters } from '../panel/types';
|
|
2
|
-
import { IGridPanelComponentView } from './gridviewComponent';
|
|
3
|
-
import { BasePanelView, BasePanelViewExported, BasePanelViewState } from './basePanelView';
|
|
4
|
-
import { GridviewPanelApi, GridviewPanelApiImpl } from '../api/gridviewPanelApi';
|
|
5
|
-
import { LayoutPriority } from '../splitview/splitview';
|
|
6
|
-
import { Event } from '../events';
|
|
7
|
-
import { IViewSize } from './gridview';
|
|
8
|
-
import { BaseGrid, IGridPanelView } from './baseComponentGridview';
|
|
9
|
-
export interface Constraints {
|
|
10
|
-
minimumWidth?: number;
|
|
11
|
-
maximumWidth?: number;
|
|
12
|
-
minimumHeight?: number;
|
|
13
|
-
maximumHeight?: number;
|
|
14
|
-
}
|
|
15
|
-
export interface GridviewInitParameters extends PanelInitParameters {
|
|
16
|
-
minimumWidth?: number;
|
|
17
|
-
maximumWidth?: number;
|
|
18
|
-
minimumHeight?: number;
|
|
19
|
-
maximumHeight?: number;
|
|
20
|
-
priority?: LayoutPriority;
|
|
21
|
-
snap?: boolean;
|
|
22
|
-
accessor: BaseGrid<IGridPanelView>;
|
|
23
|
-
isVisible?: boolean;
|
|
24
|
-
}
|
|
25
|
-
export interface IGridviewPanel<T extends GridviewPanelApi = GridviewPanelApi> extends BasePanelViewExported<T> {
|
|
26
|
-
readonly minimumWidth: number;
|
|
27
|
-
readonly maximumWidth: number;
|
|
28
|
-
readonly minimumHeight: number;
|
|
29
|
-
readonly maximumHeight: number;
|
|
30
|
-
readonly priority: LayoutPriority | undefined;
|
|
31
|
-
readonly snap: boolean;
|
|
32
|
-
}
|
|
33
|
-
export declare abstract class GridviewPanel<T extends GridviewPanelApiImpl = GridviewPanelApiImpl> extends BasePanelView<T> implements IGridPanelComponentView, IGridviewPanel {
|
|
34
|
-
private _evaluatedMinimumWidth;
|
|
35
|
-
private _evaluatedMaximumWidth;
|
|
36
|
-
private _evaluatedMinimumHeight;
|
|
37
|
-
private _evaluatedMaximumHeight;
|
|
38
|
-
private _minimumWidth;
|
|
39
|
-
private _minimumHeight;
|
|
40
|
-
private _maximumWidth;
|
|
41
|
-
private _maximumHeight;
|
|
42
|
-
private _priority?;
|
|
43
|
-
private _snap;
|
|
44
|
-
private readonly _onDidChange;
|
|
45
|
-
readonly onDidChange: Event<IViewSize | undefined>;
|
|
46
|
-
get priority(): LayoutPriority | undefined;
|
|
47
|
-
get snap(): boolean;
|
|
48
|
-
get minimumWidth(): number;
|
|
49
|
-
get minimumHeight(): number;
|
|
50
|
-
get maximumHeight(): number;
|
|
51
|
-
get maximumWidth(): number;
|
|
52
|
-
protected __minimumWidth(): number;
|
|
53
|
-
protected __maximumWidth(): number;
|
|
54
|
-
protected __minimumHeight(): number;
|
|
55
|
-
protected __maximumHeight(): number;
|
|
56
|
-
get isActive(): boolean;
|
|
57
|
-
get isVisible(): boolean;
|
|
58
|
-
constructor(id: string, component: string, options?: {
|
|
59
|
-
minimumWidth?: number;
|
|
60
|
-
maximumWidth?: number;
|
|
61
|
-
minimumHeight?: number;
|
|
62
|
-
maximumHeight?: number;
|
|
63
|
-
}, api?: T);
|
|
64
|
-
setVisible(isVisible: boolean): void;
|
|
65
|
-
setActive(isActive: boolean): void;
|
|
66
|
-
init(parameters: GridviewInitParameters): void;
|
|
67
|
-
private updateConstraints;
|
|
68
|
-
toJSON(): GridPanelViewState;
|
|
69
|
-
}
|
|
70
|
-
export interface GridPanelViewState extends BasePanelViewState {
|
|
71
|
-
minimumHeight?: number;
|
|
72
|
-
maximumHeight?: number;
|
|
73
|
-
minimumWidth?: number;
|
|
74
|
-
maximumWidth?: number;
|
|
75
|
-
snap?: boolean;
|
|
76
|
-
priority?: LayoutPriority;
|
|
77
|
-
}
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import { BasePanelView, } from './basePanelView';
|
|
2
|
-
import { GridviewPanelApiImpl, } from '../api/gridviewPanelApi';
|
|
3
|
-
import { Emitter } from '../events';
|
|
4
|
-
export class GridviewPanel extends BasePanelView {
|
|
5
|
-
get priority() {
|
|
6
|
-
return this._priority;
|
|
7
|
-
}
|
|
8
|
-
get snap() {
|
|
9
|
-
return this._snap;
|
|
10
|
-
}
|
|
11
|
-
get minimumWidth() {
|
|
12
|
-
/**
|
|
13
|
-
* defer to protected function to allow subclasses to override easily.
|
|
14
|
-
* see https://github.com/microsoft/TypeScript/issues/338
|
|
15
|
-
*/
|
|
16
|
-
return this.__minimumWidth();
|
|
17
|
-
}
|
|
18
|
-
get minimumHeight() {
|
|
19
|
-
/**
|
|
20
|
-
* defer to protected function to allow subclasses to override easily.
|
|
21
|
-
* see https://github.com/microsoft/TypeScript/issues/338
|
|
22
|
-
*/
|
|
23
|
-
return this.__minimumHeight();
|
|
24
|
-
}
|
|
25
|
-
get maximumHeight() {
|
|
26
|
-
/**
|
|
27
|
-
* defer to protected function to allow subclasses to override easily.
|
|
28
|
-
* see https://github.com/microsoft/TypeScript/issues/338
|
|
29
|
-
*/
|
|
30
|
-
return this.__maximumHeight();
|
|
31
|
-
}
|
|
32
|
-
get maximumWidth() {
|
|
33
|
-
/**
|
|
34
|
-
* defer to protected function to allow subclasses to override easily.
|
|
35
|
-
* see https://github.com/microsoft/TypeScript/issues/338
|
|
36
|
-
*/
|
|
37
|
-
return this.__maximumWidth();
|
|
38
|
-
}
|
|
39
|
-
__minimumWidth() {
|
|
40
|
-
const width = typeof this._minimumWidth === 'function'
|
|
41
|
-
? this._minimumWidth()
|
|
42
|
-
: this._minimumWidth;
|
|
43
|
-
if (width !== this._evaluatedMinimumWidth) {
|
|
44
|
-
this._evaluatedMinimumWidth = width;
|
|
45
|
-
this.updateConstraints();
|
|
46
|
-
}
|
|
47
|
-
return width;
|
|
48
|
-
}
|
|
49
|
-
__maximumWidth() {
|
|
50
|
-
const width = typeof this._maximumWidth === 'function'
|
|
51
|
-
? this._maximumWidth()
|
|
52
|
-
: this._maximumWidth;
|
|
53
|
-
if (width !== this._evaluatedMaximumWidth) {
|
|
54
|
-
this._evaluatedMaximumWidth = width;
|
|
55
|
-
this.updateConstraints();
|
|
56
|
-
}
|
|
57
|
-
return width;
|
|
58
|
-
}
|
|
59
|
-
__minimumHeight() {
|
|
60
|
-
const height = typeof this._minimumHeight === 'function'
|
|
61
|
-
? this._minimumHeight()
|
|
62
|
-
: this._minimumHeight;
|
|
63
|
-
if (height !== this._evaluatedMinimumHeight) {
|
|
64
|
-
this._evaluatedMinimumHeight = height;
|
|
65
|
-
this.updateConstraints();
|
|
66
|
-
}
|
|
67
|
-
return height;
|
|
68
|
-
}
|
|
69
|
-
__maximumHeight() {
|
|
70
|
-
const height = typeof this._maximumHeight === 'function'
|
|
71
|
-
? this._maximumHeight()
|
|
72
|
-
: this._maximumHeight;
|
|
73
|
-
if (height !== this._evaluatedMaximumHeight) {
|
|
74
|
-
this._evaluatedMaximumHeight = height;
|
|
75
|
-
this.updateConstraints();
|
|
76
|
-
}
|
|
77
|
-
return height;
|
|
78
|
-
}
|
|
79
|
-
get isActive() {
|
|
80
|
-
return this.api.isActive;
|
|
81
|
-
}
|
|
82
|
-
get isVisible() {
|
|
83
|
-
return this.api.isVisible;
|
|
84
|
-
}
|
|
85
|
-
constructor(id, component, options, api) {
|
|
86
|
-
super(id, component, api !== null && api !== void 0 ? api : new GridviewPanelApiImpl(id, component));
|
|
87
|
-
this._evaluatedMinimumWidth = 0;
|
|
88
|
-
this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
|
|
89
|
-
this._evaluatedMinimumHeight = 0;
|
|
90
|
-
this._evaluatedMaximumHeight = Number.MAX_SAFE_INTEGER;
|
|
91
|
-
this._minimumWidth = 0;
|
|
92
|
-
this._minimumHeight = 0;
|
|
93
|
-
this._maximumWidth = Number.MAX_SAFE_INTEGER;
|
|
94
|
-
this._maximumHeight = Number.MAX_SAFE_INTEGER;
|
|
95
|
-
this._snap = false;
|
|
96
|
-
this._onDidChange = new Emitter();
|
|
97
|
-
this.onDidChange = this._onDidChange.event;
|
|
98
|
-
if (typeof (options === null || options === void 0 ? void 0 : options.minimumWidth) === 'number') {
|
|
99
|
-
this._minimumWidth = options.minimumWidth;
|
|
100
|
-
}
|
|
101
|
-
if (typeof (options === null || options === void 0 ? void 0 : options.maximumWidth) === 'number') {
|
|
102
|
-
this._maximumWidth = options.maximumWidth;
|
|
103
|
-
}
|
|
104
|
-
if (typeof (options === null || options === void 0 ? void 0 : options.minimumHeight) === 'number') {
|
|
105
|
-
this._minimumHeight = options.minimumHeight;
|
|
106
|
-
}
|
|
107
|
-
if (typeof (options === null || options === void 0 ? void 0 : options.maximumHeight) === 'number') {
|
|
108
|
-
this._maximumHeight = options.maximumHeight;
|
|
109
|
-
}
|
|
110
|
-
this.api.initialize(this); // TODO: required to by-pass 'super before this' requirement
|
|
111
|
-
this.addDisposables(this.api.onWillVisibilityChange((event) => {
|
|
112
|
-
const { isVisible } = event;
|
|
113
|
-
const { accessor } = this._params;
|
|
114
|
-
accessor.setVisible(this, isVisible);
|
|
115
|
-
}), this.api.onActiveChange(() => {
|
|
116
|
-
const { accessor } = this._params;
|
|
117
|
-
accessor.doSetGroupActive(this);
|
|
118
|
-
}), this.api.onDidConstraintsChangeInternal((event) => {
|
|
119
|
-
if (typeof event.minimumWidth === 'number' ||
|
|
120
|
-
typeof event.minimumWidth === 'function') {
|
|
121
|
-
this._minimumWidth = event.minimumWidth;
|
|
122
|
-
}
|
|
123
|
-
if (typeof event.minimumHeight === 'number' ||
|
|
124
|
-
typeof event.minimumHeight === 'function') {
|
|
125
|
-
this._minimumHeight = event.minimumHeight;
|
|
126
|
-
}
|
|
127
|
-
if (typeof event.maximumWidth === 'number' ||
|
|
128
|
-
typeof event.maximumWidth === 'function') {
|
|
129
|
-
this._maximumWidth = event.maximumWidth;
|
|
130
|
-
}
|
|
131
|
-
if (typeof event.maximumHeight === 'number' ||
|
|
132
|
-
typeof event.maximumHeight === 'function') {
|
|
133
|
-
this._maximumHeight = event.maximumHeight;
|
|
134
|
-
}
|
|
135
|
-
}), this.api.onDidSizeChange((event) => {
|
|
136
|
-
this._onDidChange.fire({
|
|
137
|
-
height: event.height,
|
|
138
|
-
width: event.width,
|
|
139
|
-
});
|
|
140
|
-
}), this._onDidChange);
|
|
141
|
-
}
|
|
142
|
-
setVisible(isVisible) {
|
|
143
|
-
this.api._onDidVisibilityChange.fire({ isVisible });
|
|
144
|
-
}
|
|
145
|
-
setActive(isActive) {
|
|
146
|
-
this.api._onDidActiveChange.fire({ isActive });
|
|
147
|
-
}
|
|
148
|
-
init(parameters) {
|
|
149
|
-
if (parameters.maximumHeight) {
|
|
150
|
-
this._maximumHeight = parameters.maximumHeight;
|
|
151
|
-
}
|
|
152
|
-
if (parameters.minimumHeight) {
|
|
153
|
-
this._minimumHeight = parameters.minimumHeight;
|
|
154
|
-
}
|
|
155
|
-
if (parameters.maximumWidth) {
|
|
156
|
-
this._maximumWidth = parameters.maximumWidth;
|
|
157
|
-
}
|
|
158
|
-
if (parameters.minimumWidth) {
|
|
159
|
-
this._minimumWidth = parameters.minimumWidth;
|
|
160
|
-
}
|
|
161
|
-
this._priority = parameters.priority;
|
|
162
|
-
this._snap = !!parameters.snap;
|
|
163
|
-
super.init(parameters);
|
|
164
|
-
if (typeof parameters.isVisible === 'boolean') {
|
|
165
|
-
this.setVisible(parameters.isVisible);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
updateConstraints() {
|
|
169
|
-
this.api._onDidConstraintsChange.fire({
|
|
170
|
-
minimumWidth: this._evaluatedMinimumWidth,
|
|
171
|
-
maximumWidth: this._evaluatedMaximumWidth,
|
|
172
|
-
minimumHeight: this._evaluatedMinimumHeight,
|
|
173
|
-
maximumHeight: this._evaluatedMaximumHeight,
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
toJSON() {
|
|
177
|
-
const state = super.toJSON();
|
|
178
|
-
const maximum = (value) => value === Number.MAX_SAFE_INTEGER ? undefined : value;
|
|
179
|
-
const minimum = (value) => (value <= 0 ? undefined : value);
|
|
180
|
-
return Object.assign(Object.assign({}, state), { minimumHeight: minimum(this.minimumHeight), maximumHeight: maximum(this.maximumHeight), minimumWidth: minimum(this.minimumWidth), maximumWidth: maximum(this.maximumWidth), snap: this.snap, priority: this.priority });
|
|
181
|
-
}
|
|
182
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { IView, LayoutPriority, Orientation } from '../splitview/splitview';
|
|
2
|
-
import { Event } from '../events';
|
|
3
|
-
import { IGridView } from './gridview';
|
|
4
|
-
export declare class LeafNode implements IView {
|
|
5
|
-
readonly view: IGridView;
|
|
6
|
-
readonly orientation: Orientation;
|
|
7
|
-
private readonly _onDidChange;
|
|
8
|
-
readonly onDidChange: Event<{
|
|
9
|
-
size?: number;
|
|
10
|
-
orthogonalSize?: number;
|
|
11
|
-
}>;
|
|
12
|
-
private _size;
|
|
13
|
-
private _orthogonalSize;
|
|
14
|
-
private readonly _disposable;
|
|
15
|
-
private get minimumWidth();
|
|
16
|
-
private get maximumWidth();
|
|
17
|
-
private get minimumHeight();
|
|
18
|
-
private get maximumHeight();
|
|
19
|
-
get priority(): LayoutPriority | undefined;
|
|
20
|
-
get snap(): boolean | undefined;
|
|
21
|
-
get minimumSize(): number;
|
|
22
|
-
get maximumSize(): number;
|
|
23
|
-
get minimumOrthogonalSize(): number;
|
|
24
|
-
get maximumOrthogonalSize(): number;
|
|
25
|
-
get orthogonalSize(): number;
|
|
26
|
-
get size(): number;
|
|
27
|
-
get element(): HTMLElement;
|
|
28
|
-
get width(): number;
|
|
29
|
-
get height(): number;
|
|
30
|
-
constructor(view: IGridView, orientation: Orientation, orthogonalSize: number, size?: number);
|
|
31
|
-
setVisible(visible: boolean): void;
|
|
32
|
-
layout(size: number, orthogonalSize: number): void;
|
|
33
|
-
dispose(): void;
|
|
34
|
-
}
|