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,363 +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
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
40
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
41
|
-
if (!m) return o;
|
|
42
|
-
var i = m.call(o), r, ar = [], e;
|
|
43
|
-
try {
|
|
44
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
45
|
-
}
|
|
46
|
-
catch (error) { e = { error: error }; }
|
|
47
|
-
finally {
|
|
48
|
-
try {
|
|
49
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
50
|
-
}
|
|
51
|
-
finally { if (e) throw e.error; }
|
|
52
|
-
}
|
|
53
|
-
return ar;
|
|
54
|
-
};
|
|
55
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56
|
-
exports.GridviewComponent = void 0;
|
|
57
|
-
var gridview_1 = require("./gridview");
|
|
58
|
-
var array_1 = require("../array");
|
|
59
|
-
var lifecycle_1 = require("../lifecycle");
|
|
60
|
-
var baseComponentGridview_1 = require("./baseComponentGridview");
|
|
61
|
-
var events_1 = require("../events");
|
|
62
|
-
var GridviewComponent = /** @class */ (function (_super) {
|
|
63
|
-
__extends(GridviewComponent, _super);
|
|
64
|
-
function GridviewComponent(container, options) {
|
|
65
|
-
var _a;
|
|
66
|
-
var _this = _super.call(this, container, {
|
|
67
|
-
proportionalLayout: (_a = options.proportionalLayout) !== null && _a !== void 0 ? _a : true,
|
|
68
|
-
orientation: options.orientation,
|
|
69
|
-
styles: options.hideBorders
|
|
70
|
-
? { separatorBorder: 'transparent' }
|
|
71
|
-
: undefined,
|
|
72
|
-
disableAutoResizing: options.disableAutoResizing,
|
|
73
|
-
className: options.className,
|
|
74
|
-
}) || this;
|
|
75
|
-
_this._onDidLayoutfromJSON = new events_1.Emitter();
|
|
76
|
-
_this.onDidLayoutFromJSON = _this._onDidLayoutfromJSON.event;
|
|
77
|
-
_this._onDidRemoveGroup = new events_1.Emitter();
|
|
78
|
-
_this.onDidRemoveGroup = _this._onDidRemoveGroup.event;
|
|
79
|
-
_this._onDidAddGroup = new events_1.Emitter();
|
|
80
|
-
_this.onDidAddGroup = _this._onDidAddGroup.event;
|
|
81
|
-
_this._onDidActiveGroupChange = new events_1.Emitter();
|
|
82
|
-
_this.onDidActiveGroupChange = _this._onDidActiveGroupChange.event;
|
|
83
|
-
_this._options = options;
|
|
84
|
-
_this.addDisposables(_this._onDidAddGroup, _this._onDidRemoveGroup, _this._onDidActiveGroupChange, _this.onDidAdd(function (event) {
|
|
85
|
-
_this._onDidAddGroup.fire(event);
|
|
86
|
-
}), _this.onDidRemove(function (event) {
|
|
87
|
-
_this._onDidRemoveGroup.fire(event);
|
|
88
|
-
}), _this.onDidActiveChange(function (event) {
|
|
89
|
-
_this._onDidActiveGroupChange.fire(event);
|
|
90
|
-
}));
|
|
91
|
-
return _this;
|
|
92
|
-
}
|
|
93
|
-
Object.defineProperty(GridviewComponent.prototype, "orientation", {
|
|
94
|
-
get: function () {
|
|
95
|
-
return this.gridview.orientation;
|
|
96
|
-
},
|
|
97
|
-
set: function (value) {
|
|
98
|
-
this.gridview.orientation = value;
|
|
99
|
-
},
|
|
100
|
-
enumerable: false,
|
|
101
|
-
configurable: true
|
|
102
|
-
});
|
|
103
|
-
Object.defineProperty(GridviewComponent.prototype, "options", {
|
|
104
|
-
get: function () {
|
|
105
|
-
return this._options;
|
|
106
|
-
},
|
|
107
|
-
enumerable: false,
|
|
108
|
-
configurable: true
|
|
109
|
-
});
|
|
110
|
-
Object.defineProperty(GridviewComponent.prototype, "deserializer", {
|
|
111
|
-
get: function () {
|
|
112
|
-
return this._deserializer;
|
|
113
|
-
},
|
|
114
|
-
set: function (value) {
|
|
115
|
-
this._deserializer = value;
|
|
116
|
-
},
|
|
117
|
-
enumerable: false,
|
|
118
|
-
configurable: true
|
|
119
|
-
});
|
|
120
|
-
GridviewComponent.prototype.updateOptions = function (options) {
|
|
121
|
-
_super.prototype.updateOptions.call(this, options);
|
|
122
|
-
var hasOrientationChanged = typeof options.orientation === 'string' &&
|
|
123
|
-
this.gridview.orientation !== options.orientation;
|
|
124
|
-
this._options = __assign(__assign({}, this.options), options);
|
|
125
|
-
if (hasOrientationChanged) {
|
|
126
|
-
this.gridview.orientation = options.orientation;
|
|
127
|
-
}
|
|
128
|
-
this.layout(this.gridview.width, this.gridview.height, true);
|
|
129
|
-
};
|
|
130
|
-
GridviewComponent.prototype.removePanel = function (panel) {
|
|
131
|
-
this.removeGroup(panel);
|
|
132
|
-
};
|
|
133
|
-
/**
|
|
134
|
-
* Serialize the current state of the layout
|
|
135
|
-
*
|
|
136
|
-
* @returns A JSON respresentation of the layout
|
|
137
|
-
*/
|
|
138
|
-
GridviewComponent.prototype.toJSON = function () {
|
|
139
|
-
var _a;
|
|
140
|
-
var data = this.gridview.serialize();
|
|
141
|
-
return {
|
|
142
|
-
grid: data,
|
|
143
|
-
activePanel: (_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.id,
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
GridviewComponent.prototype.setVisible = function (panel, visible) {
|
|
147
|
-
this.gridview.setViewVisible((0, gridview_1.getGridLocation)(panel.element), visible);
|
|
148
|
-
};
|
|
149
|
-
GridviewComponent.prototype.setActive = function (panel) {
|
|
150
|
-
this._groups.forEach(function (value, _key) {
|
|
151
|
-
value.value.setActive(panel === value.value);
|
|
152
|
-
});
|
|
153
|
-
};
|
|
154
|
-
GridviewComponent.prototype.focus = function () {
|
|
155
|
-
var _a;
|
|
156
|
-
(_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.focus();
|
|
157
|
-
};
|
|
158
|
-
GridviewComponent.prototype.fromJSON = function (serializedGridview) {
|
|
159
|
-
var e_1, _a;
|
|
160
|
-
var _this = this;
|
|
161
|
-
this.clear();
|
|
162
|
-
var grid = serializedGridview.grid, activePanel = serializedGridview.activePanel;
|
|
163
|
-
try {
|
|
164
|
-
var queue_1 = [];
|
|
165
|
-
// take note of the existing dimensions
|
|
166
|
-
var width = this.width;
|
|
167
|
-
var height = this.height;
|
|
168
|
-
this.gridview.deserialize(grid, {
|
|
169
|
-
fromJSON: function (node) {
|
|
170
|
-
var data = node.data;
|
|
171
|
-
var view = _this.options.createComponent({
|
|
172
|
-
id: data.id,
|
|
173
|
-
name: data.component,
|
|
174
|
-
});
|
|
175
|
-
queue_1.push(function () {
|
|
176
|
-
return view.init({
|
|
177
|
-
params: data.params,
|
|
178
|
-
minimumWidth: data.minimumWidth,
|
|
179
|
-
maximumWidth: data.maximumWidth,
|
|
180
|
-
minimumHeight: data.minimumHeight,
|
|
181
|
-
maximumHeight: data.maximumHeight,
|
|
182
|
-
priority: data.priority,
|
|
183
|
-
snap: !!data.snap,
|
|
184
|
-
accessor: _this,
|
|
185
|
-
isVisible: node.visible,
|
|
186
|
-
});
|
|
187
|
-
});
|
|
188
|
-
_this._onDidAddGroup.fire(view);
|
|
189
|
-
_this.registerPanel(view);
|
|
190
|
-
return view;
|
|
191
|
-
},
|
|
192
|
-
});
|
|
193
|
-
this.layout(width, height, true);
|
|
194
|
-
queue_1.forEach(function (f) { return f(); });
|
|
195
|
-
if (typeof activePanel === 'string') {
|
|
196
|
-
var panel = this.getPanel(activePanel);
|
|
197
|
-
if (panel) {
|
|
198
|
-
this.doSetGroupActive(panel);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
catch (err) {
|
|
203
|
-
try {
|
|
204
|
-
/**
|
|
205
|
-
* To remove a group we cannot call this.removeGroup(...) since this makes assumptions about
|
|
206
|
-
* the underlying HTMLElement existing in the Gridview.
|
|
207
|
-
*/
|
|
208
|
-
for (var _b = __values(this.groups), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
209
|
-
var group = _c.value;
|
|
210
|
-
group.dispose();
|
|
211
|
-
this._groups.delete(group.id);
|
|
212
|
-
this._onDidRemoveGroup.fire(group);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
216
|
-
finally {
|
|
217
|
-
try {
|
|
218
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
219
|
-
}
|
|
220
|
-
finally { if (e_1) throw e_1.error; }
|
|
221
|
-
}
|
|
222
|
-
// fires clean-up events and clears the underlying HTML gridview.
|
|
223
|
-
this.clear();
|
|
224
|
-
/**
|
|
225
|
-
* even though we have cleaned-up we still want to inform the caller of their error
|
|
226
|
-
* and we'll do this through re-throwing the original error since afterall you would
|
|
227
|
-
* expect trying to load a corrupted layout to result in an error and not silently fail...
|
|
228
|
-
*/
|
|
229
|
-
throw err;
|
|
230
|
-
}
|
|
231
|
-
this._onDidLayoutfromJSON.fire();
|
|
232
|
-
};
|
|
233
|
-
GridviewComponent.prototype.clear = function () {
|
|
234
|
-
var e_2, _a;
|
|
235
|
-
var hasActiveGroup = this.activeGroup;
|
|
236
|
-
var groups = Array.from(this._groups.values()); // reassign since group panels will mutate
|
|
237
|
-
try {
|
|
238
|
-
for (var groups_1 = __values(groups), groups_1_1 = groups_1.next(); !groups_1_1.done; groups_1_1 = groups_1.next()) {
|
|
239
|
-
var group = groups_1_1.value;
|
|
240
|
-
group.disposable.dispose();
|
|
241
|
-
this.doRemoveGroup(group.value, { skipActive: true });
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
245
|
-
finally {
|
|
246
|
-
try {
|
|
247
|
-
if (groups_1_1 && !groups_1_1.done && (_a = groups_1.return)) _a.call(groups_1);
|
|
248
|
-
}
|
|
249
|
-
finally { if (e_2) throw e_2.error; }
|
|
250
|
-
}
|
|
251
|
-
if (hasActiveGroup) {
|
|
252
|
-
this.doSetGroupActive(undefined);
|
|
253
|
-
}
|
|
254
|
-
this.gridview.clear();
|
|
255
|
-
};
|
|
256
|
-
GridviewComponent.prototype.movePanel = function (panel, options) {
|
|
257
|
-
var _a;
|
|
258
|
-
var relativeLocation;
|
|
259
|
-
var removedPanel = this.gridview.remove(panel);
|
|
260
|
-
var referenceGroup = (_a = this._groups.get(options.reference)) === null || _a === void 0 ? void 0 : _a.value;
|
|
261
|
-
if (!referenceGroup) {
|
|
262
|
-
throw new Error("reference group ".concat(options.reference, " does not exist"));
|
|
263
|
-
}
|
|
264
|
-
var target = (0, baseComponentGridview_1.toTarget)(options.direction);
|
|
265
|
-
if (target === 'center') {
|
|
266
|
-
throw new Error("".concat(target, " not supported as an option"));
|
|
267
|
-
}
|
|
268
|
-
else {
|
|
269
|
-
var location_1 = (0, gridview_1.getGridLocation)(referenceGroup.element);
|
|
270
|
-
relativeLocation = (0, gridview_1.getRelativeLocation)(this.gridview.orientation, location_1, target);
|
|
271
|
-
}
|
|
272
|
-
this.doAddGroup(removedPanel, relativeLocation, options.size);
|
|
273
|
-
};
|
|
274
|
-
GridviewComponent.prototype.addPanel = function (options) {
|
|
275
|
-
var _a, _b, _c, _d;
|
|
276
|
-
var relativeLocation = (_a = options.location) !== null && _a !== void 0 ? _a : [0];
|
|
277
|
-
if ((_b = options.position) === null || _b === void 0 ? void 0 : _b.referencePanel) {
|
|
278
|
-
var referenceGroup = (_c = this._groups.get(options.position.referencePanel)) === null || _c === void 0 ? void 0 : _c.value;
|
|
279
|
-
if (!referenceGroup) {
|
|
280
|
-
throw new Error("reference group ".concat(options.position.referencePanel, " does not exist"));
|
|
281
|
-
}
|
|
282
|
-
var target = (0, baseComponentGridview_1.toTarget)(options.position.direction);
|
|
283
|
-
if (target === 'center') {
|
|
284
|
-
throw new Error("".concat(target, " not supported as an option"));
|
|
285
|
-
}
|
|
286
|
-
else {
|
|
287
|
-
var location_2 = (0, gridview_1.getGridLocation)(referenceGroup.element);
|
|
288
|
-
relativeLocation = (0, gridview_1.getRelativeLocation)(this.gridview.orientation, location_2, target);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
var view = this.options.createComponent({
|
|
292
|
-
id: options.id,
|
|
293
|
-
name: options.component,
|
|
294
|
-
});
|
|
295
|
-
view.init({
|
|
296
|
-
params: (_d = options.params) !== null && _d !== void 0 ? _d : {},
|
|
297
|
-
minimumWidth: options.minimumWidth,
|
|
298
|
-
maximumWidth: options.maximumWidth,
|
|
299
|
-
minimumHeight: options.minimumHeight,
|
|
300
|
-
maximumHeight: options.maximumHeight,
|
|
301
|
-
priority: options.priority,
|
|
302
|
-
snap: !!options.snap,
|
|
303
|
-
accessor: this,
|
|
304
|
-
isVisible: true,
|
|
305
|
-
});
|
|
306
|
-
this.doAddGroup(view, relativeLocation, options.size);
|
|
307
|
-
this.registerPanel(view);
|
|
308
|
-
this.doSetGroupActive(view);
|
|
309
|
-
return view;
|
|
310
|
-
};
|
|
311
|
-
GridviewComponent.prototype.registerPanel = function (panel) {
|
|
312
|
-
var _this = this;
|
|
313
|
-
var disposable = new lifecycle_1.CompositeDisposable(panel.api.onDidFocusChange(function (event) {
|
|
314
|
-
if (!event.isFocused) {
|
|
315
|
-
return;
|
|
316
|
-
}
|
|
317
|
-
_this._groups.forEach(function (groupItem) {
|
|
318
|
-
var group = groupItem.value;
|
|
319
|
-
group.setActive(group === panel);
|
|
320
|
-
});
|
|
321
|
-
}));
|
|
322
|
-
this._groups.set(panel.id, {
|
|
323
|
-
value: panel,
|
|
324
|
-
disposable: disposable,
|
|
325
|
-
});
|
|
326
|
-
};
|
|
327
|
-
GridviewComponent.prototype.moveGroup = function (referenceGroup, groupId, target) {
|
|
328
|
-
var sourceGroup = this.getPanel(groupId);
|
|
329
|
-
if (!sourceGroup) {
|
|
330
|
-
throw new Error('invalid operation');
|
|
331
|
-
}
|
|
332
|
-
var referenceLocation = (0, gridview_1.getGridLocation)(referenceGroup.element);
|
|
333
|
-
var targetLocation = (0, gridview_1.getRelativeLocation)(this.gridview.orientation, referenceLocation, target);
|
|
334
|
-
var _a = __read((0, array_1.tail)(targetLocation), 2), targetParentLocation = _a[0], to = _a[1];
|
|
335
|
-
var sourceLocation = (0, gridview_1.getGridLocation)(sourceGroup.element);
|
|
336
|
-
var _b = __read((0, array_1.tail)(sourceLocation), 2), sourceParentLocation = _b[0], from = _b[1];
|
|
337
|
-
if ((0, array_1.sequenceEquals)(sourceParentLocation, targetParentLocation)) {
|
|
338
|
-
// special case when 'swapping' two views within same grid location
|
|
339
|
-
// if a group has one tab - we are essentially moving the 'group'
|
|
340
|
-
// which is equivalent to swapping two views in this case
|
|
341
|
-
this.gridview.moveView(sourceParentLocation, from, to);
|
|
342
|
-
return;
|
|
343
|
-
}
|
|
344
|
-
// source group will become empty so delete the group
|
|
345
|
-
var targetGroup = this.doRemoveGroup(sourceGroup, {
|
|
346
|
-
skipActive: true,
|
|
347
|
-
skipDispose: true,
|
|
348
|
-
});
|
|
349
|
-
// after deleting the group we need to re-evaulate the ref location
|
|
350
|
-
var updatedReferenceLocation = (0, gridview_1.getGridLocation)(referenceGroup.element);
|
|
351
|
-
var location = (0, gridview_1.getRelativeLocation)(this.gridview.orientation, updatedReferenceLocation, target);
|
|
352
|
-
this.doAddGroup(targetGroup, location);
|
|
353
|
-
};
|
|
354
|
-
GridviewComponent.prototype.removeGroup = function (group) {
|
|
355
|
-
_super.prototype.removeGroup.call(this, group);
|
|
356
|
-
};
|
|
357
|
-
GridviewComponent.prototype.dispose = function () {
|
|
358
|
-
_super.prototype.dispose.call(this);
|
|
359
|
-
this._onDidLayoutfromJSON.dispose();
|
|
360
|
-
};
|
|
361
|
-
return GridviewComponent;
|
|
362
|
-
}(baseComponentGridview_1.BaseGrid));
|
|
363
|
-
exports.GridviewComponent = GridviewComponent;
|
|
@@ -1,249 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.GridviewPanel = void 0;
|
|
30
|
-
var basePanelView_1 = require("./basePanelView");
|
|
31
|
-
var gridviewPanelApi_1 = require("../api/gridviewPanelApi");
|
|
32
|
-
var events_1 = require("../events");
|
|
33
|
-
var GridviewPanel = /** @class */ (function (_super) {
|
|
34
|
-
__extends(GridviewPanel, _super);
|
|
35
|
-
function GridviewPanel(id, component, options, api) {
|
|
36
|
-
var _this = _super.call(this, id, component, api !== null && api !== void 0 ? api : new gridviewPanelApi_1.GridviewPanelApiImpl(id, component)) || this;
|
|
37
|
-
_this._evaluatedMinimumWidth = 0;
|
|
38
|
-
_this._evaluatedMaximumWidth = Number.MAX_SAFE_INTEGER;
|
|
39
|
-
_this._evaluatedMinimumHeight = 0;
|
|
40
|
-
_this._evaluatedMaximumHeight = Number.MAX_SAFE_INTEGER;
|
|
41
|
-
_this._minimumWidth = 0;
|
|
42
|
-
_this._minimumHeight = 0;
|
|
43
|
-
_this._maximumWidth = Number.MAX_SAFE_INTEGER;
|
|
44
|
-
_this._maximumHeight = Number.MAX_SAFE_INTEGER;
|
|
45
|
-
_this._snap = false;
|
|
46
|
-
_this._onDidChange = new events_1.Emitter();
|
|
47
|
-
_this.onDidChange = _this._onDidChange.event;
|
|
48
|
-
if (typeof (options === null || options === void 0 ? void 0 : options.minimumWidth) === 'number') {
|
|
49
|
-
_this._minimumWidth = options.minimumWidth;
|
|
50
|
-
}
|
|
51
|
-
if (typeof (options === null || options === void 0 ? void 0 : options.maximumWidth) === 'number') {
|
|
52
|
-
_this._maximumWidth = options.maximumWidth;
|
|
53
|
-
}
|
|
54
|
-
if (typeof (options === null || options === void 0 ? void 0 : options.minimumHeight) === 'number') {
|
|
55
|
-
_this._minimumHeight = options.minimumHeight;
|
|
56
|
-
}
|
|
57
|
-
if (typeof (options === null || options === void 0 ? void 0 : options.maximumHeight) === 'number') {
|
|
58
|
-
_this._maximumHeight = options.maximumHeight;
|
|
59
|
-
}
|
|
60
|
-
_this.api.initialize(_this); // TODO: required to by-pass 'super before this' requirement
|
|
61
|
-
_this.addDisposables(_this.api.onWillVisibilityChange(function (event) {
|
|
62
|
-
var isVisible = event.isVisible;
|
|
63
|
-
var accessor = _this._params.accessor;
|
|
64
|
-
accessor.setVisible(_this, isVisible);
|
|
65
|
-
}), _this.api.onActiveChange(function () {
|
|
66
|
-
var accessor = _this._params.accessor;
|
|
67
|
-
accessor.doSetGroupActive(_this);
|
|
68
|
-
}), _this.api.onDidConstraintsChangeInternal(function (event) {
|
|
69
|
-
if (typeof event.minimumWidth === 'number' ||
|
|
70
|
-
typeof event.minimumWidth === 'function') {
|
|
71
|
-
_this._minimumWidth = event.minimumWidth;
|
|
72
|
-
}
|
|
73
|
-
if (typeof event.minimumHeight === 'number' ||
|
|
74
|
-
typeof event.minimumHeight === 'function') {
|
|
75
|
-
_this._minimumHeight = event.minimumHeight;
|
|
76
|
-
}
|
|
77
|
-
if (typeof event.maximumWidth === 'number' ||
|
|
78
|
-
typeof event.maximumWidth === 'function') {
|
|
79
|
-
_this._maximumWidth = event.maximumWidth;
|
|
80
|
-
}
|
|
81
|
-
if (typeof event.maximumHeight === 'number' ||
|
|
82
|
-
typeof event.maximumHeight === 'function') {
|
|
83
|
-
_this._maximumHeight = event.maximumHeight;
|
|
84
|
-
}
|
|
85
|
-
}), _this.api.onDidSizeChange(function (event) {
|
|
86
|
-
_this._onDidChange.fire({
|
|
87
|
-
height: event.height,
|
|
88
|
-
width: event.width,
|
|
89
|
-
});
|
|
90
|
-
}), _this._onDidChange);
|
|
91
|
-
return _this;
|
|
92
|
-
}
|
|
93
|
-
Object.defineProperty(GridviewPanel.prototype, "priority", {
|
|
94
|
-
get: function () {
|
|
95
|
-
return this._priority;
|
|
96
|
-
},
|
|
97
|
-
enumerable: false,
|
|
98
|
-
configurable: true
|
|
99
|
-
});
|
|
100
|
-
Object.defineProperty(GridviewPanel.prototype, "snap", {
|
|
101
|
-
get: function () {
|
|
102
|
-
return this._snap;
|
|
103
|
-
},
|
|
104
|
-
enumerable: false,
|
|
105
|
-
configurable: true
|
|
106
|
-
});
|
|
107
|
-
Object.defineProperty(GridviewPanel.prototype, "minimumWidth", {
|
|
108
|
-
get: function () {
|
|
109
|
-
/**
|
|
110
|
-
* defer to protected function to allow subclasses to override easily.
|
|
111
|
-
* see https://github.com/microsoft/TypeScript/issues/338
|
|
112
|
-
*/
|
|
113
|
-
return this.__minimumWidth();
|
|
114
|
-
},
|
|
115
|
-
enumerable: false,
|
|
116
|
-
configurable: true
|
|
117
|
-
});
|
|
118
|
-
Object.defineProperty(GridviewPanel.prototype, "minimumHeight", {
|
|
119
|
-
get: function () {
|
|
120
|
-
/**
|
|
121
|
-
* defer to protected function to allow subclasses to override easily.
|
|
122
|
-
* see https://github.com/microsoft/TypeScript/issues/338
|
|
123
|
-
*/
|
|
124
|
-
return this.__minimumHeight();
|
|
125
|
-
},
|
|
126
|
-
enumerable: false,
|
|
127
|
-
configurable: true
|
|
128
|
-
});
|
|
129
|
-
Object.defineProperty(GridviewPanel.prototype, "maximumHeight", {
|
|
130
|
-
get: function () {
|
|
131
|
-
/**
|
|
132
|
-
* defer to protected function to allow subclasses to override easily.
|
|
133
|
-
* see https://github.com/microsoft/TypeScript/issues/338
|
|
134
|
-
*/
|
|
135
|
-
return this.__maximumHeight();
|
|
136
|
-
},
|
|
137
|
-
enumerable: false,
|
|
138
|
-
configurable: true
|
|
139
|
-
});
|
|
140
|
-
Object.defineProperty(GridviewPanel.prototype, "maximumWidth", {
|
|
141
|
-
get: function () {
|
|
142
|
-
/**
|
|
143
|
-
* defer to protected function to allow subclasses to override easily.
|
|
144
|
-
* see https://github.com/microsoft/TypeScript/issues/338
|
|
145
|
-
*/
|
|
146
|
-
return this.__maximumWidth();
|
|
147
|
-
},
|
|
148
|
-
enumerable: false,
|
|
149
|
-
configurable: true
|
|
150
|
-
});
|
|
151
|
-
GridviewPanel.prototype.__minimumWidth = function () {
|
|
152
|
-
var width = typeof this._minimumWidth === 'function'
|
|
153
|
-
? this._minimumWidth()
|
|
154
|
-
: this._minimumWidth;
|
|
155
|
-
if (width !== this._evaluatedMinimumWidth) {
|
|
156
|
-
this._evaluatedMinimumWidth = width;
|
|
157
|
-
this.updateConstraints();
|
|
158
|
-
}
|
|
159
|
-
return width;
|
|
160
|
-
};
|
|
161
|
-
GridviewPanel.prototype.__maximumWidth = function () {
|
|
162
|
-
var width = typeof this._maximumWidth === 'function'
|
|
163
|
-
? this._maximumWidth()
|
|
164
|
-
: this._maximumWidth;
|
|
165
|
-
if (width !== this._evaluatedMaximumWidth) {
|
|
166
|
-
this._evaluatedMaximumWidth = width;
|
|
167
|
-
this.updateConstraints();
|
|
168
|
-
}
|
|
169
|
-
return width;
|
|
170
|
-
};
|
|
171
|
-
GridviewPanel.prototype.__minimumHeight = function () {
|
|
172
|
-
var height = typeof this._minimumHeight === 'function'
|
|
173
|
-
? this._minimumHeight()
|
|
174
|
-
: this._minimumHeight;
|
|
175
|
-
if (height !== this._evaluatedMinimumHeight) {
|
|
176
|
-
this._evaluatedMinimumHeight = height;
|
|
177
|
-
this.updateConstraints();
|
|
178
|
-
}
|
|
179
|
-
return height;
|
|
180
|
-
};
|
|
181
|
-
GridviewPanel.prototype.__maximumHeight = function () {
|
|
182
|
-
var height = typeof this._maximumHeight === 'function'
|
|
183
|
-
? this._maximumHeight()
|
|
184
|
-
: this._maximumHeight;
|
|
185
|
-
if (height !== this._evaluatedMaximumHeight) {
|
|
186
|
-
this._evaluatedMaximumHeight = height;
|
|
187
|
-
this.updateConstraints();
|
|
188
|
-
}
|
|
189
|
-
return height;
|
|
190
|
-
};
|
|
191
|
-
Object.defineProperty(GridviewPanel.prototype, "isActive", {
|
|
192
|
-
get: function () {
|
|
193
|
-
return this.api.isActive;
|
|
194
|
-
},
|
|
195
|
-
enumerable: false,
|
|
196
|
-
configurable: true
|
|
197
|
-
});
|
|
198
|
-
Object.defineProperty(GridviewPanel.prototype, "isVisible", {
|
|
199
|
-
get: function () {
|
|
200
|
-
return this.api.isVisible;
|
|
201
|
-
},
|
|
202
|
-
enumerable: false,
|
|
203
|
-
configurable: true
|
|
204
|
-
});
|
|
205
|
-
GridviewPanel.prototype.setVisible = function (isVisible) {
|
|
206
|
-
this.api._onDidVisibilityChange.fire({ isVisible: isVisible });
|
|
207
|
-
};
|
|
208
|
-
GridviewPanel.prototype.setActive = function (isActive) {
|
|
209
|
-
this.api._onDidActiveChange.fire({ isActive: isActive });
|
|
210
|
-
};
|
|
211
|
-
GridviewPanel.prototype.init = function (parameters) {
|
|
212
|
-
if (parameters.maximumHeight) {
|
|
213
|
-
this._maximumHeight = parameters.maximumHeight;
|
|
214
|
-
}
|
|
215
|
-
if (parameters.minimumHeight) {
|
|
216
|
-
this._minimumHeight = parameters.minimumHeight;
|
|
217
|
-
}
|
|
218
|
-
if (parameters.maximumWidth) {
|
|
219
|
-
this._maximumWidth = parameters.maximumWidth;
|
|
220
|
-
}
|
|
221
|
-
if (parameters.minimumWidth) {
|
|
222
|
-
this._minimumWidth = parameters.minimumWidth;
|
|
223
|
-
}
|
|
224
|
-
this._priority = parameters.priority;
|
|
225
|
-
this._snap = !!parameters.snap;
|
|
226
|
-
_super.prototype.init.call(this, parameters);
|
|
227
|
-
if (typeof parameters.isVisible === 'boolean') {
|
|
228
|
-
this.setVisible(parameters.isVisible);
|
|
229
|
-
}
|
|
230
|
-
};
|
|
231
|
-
GridviewPanel.prototype.updateConstraints = function () {
|
|
232
|
-
this.api._onDidConstraintsChange.fire({
|
|
233
|
-
minimumWidth: this._evaluatedMinimumWidth,
|
|
234
|
-
maximumWidth: this._evaluatedMaximumWidth,
|
|
235
|
-
minimumHeight: this._evaluatedMinimumHeight,
|
|
236
|
-
maximumHeight: this._evaluatedMaximumHeight,
|
|
237
|
-
});
|
|
238
|
-
};
|
|
239
|
-
GridviewPanel.prototype.toJSON = function () {
|
|
240
|
-
var state = _super.prototype.toJSON.call(this);
|
|
241
|
-
var maximum = function (value) {
|
|
242
|
-
return value === Number.MAX_SAFE_INTEGER ? undefined : value;
|
|
243
|
-
};
|
|
244
|
-
var minimum = function (value) { return (value <= 0 ? undefined : value); };
|
|
245
|
-
return __assign(__assign({}, state), { minimumHeight: minimum(this.minimumHeight), maximumHeight: maximum(this.maximumHeight), minimumWidth: minimum(this.minimumWidth), maximumWidth: maximum(this.maximumWidth), snap: this.snap, priority: this.priority });
|
|
246
|
-
};
|
|
247
|
-
return GridviewPanel;
|
|
248
|
-
}(basePanelView_1.BasePanelView));
|
|
249
|
-
exports.GridviewPanel = GridviewPanel;
|