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,275 +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 __read = (this && this.__read) || function (o, n) {
|
|
29
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
30
|
-
if (!m) return o;
|
|
31
|
-
var i = m.call(o), r, ar = [], e;
|
|
32
|
-
try {
|
|
33
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
34
|
-
}
|
|
35
|
-
catch (error) { e = { error: error }; }
|
|
36
|
-
finally {
|
|
37
|
-
try {
|
|
38
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
39
|
-
}
|
|
40
|
-
finally { if (e) throw e.error; }
|
|
41
|
-
}
|
|
42
|
-
return ar;
|
|
43
|
-
};
|
|
44
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
exports.PaneviewPanel = void 0;
|
|
46
|
-
var paneviewPanelApi_1 = require("../api/paneviewPanelApi");
|
|
47
|
-
var dom_1 = require("../dom");
|
|
48
|
-
var events_1 = require("../events");
|
|
49
|
-
var basePanelView_1 = require("../gridview/basePanelView");
|
|
50
|
-
var splitview_1 = require("../splitview/splitview");
|
|
51
|
-
var PaneviewPanel = /** @class */ (function (_super) {
|
|
52
|
-
__extends(PaneviewPanel, _super);
|
|
53
|
-
function PaneviewPanel(options) {
|
|
54
|
-
var _this = _super.call(this, options.id, options.component, new paneviewPanelApi_1.PaneviewPanelApiImpl(options.id, options.component)) || this;
|
|
55
|
-
_this._onDidChangeExpansionState = new events_1.Emitter({ replay: true });
|
|
56
|
-
_this.onDidChangeExpansionState = _this._onDidChangeExpansionState.event;
|
|
57
|
-
_this._onDidChange = new events_1.Emitter();
|
|
58
|
-
_this.onDidChange = _this._onDidChange.event;
|
|
59
|
-
_this._orthogonalSize = 0;
|
|
60
|
-
_this._size = 0;
|
|
61
|
-
_this._isExpanded = false;
|
|
62
|
-
_this.api.pane = _this; // TODO cannot use 'this' before 'super'
|
|
63
|
-
_this.api.initialize(_this);
|
|
64
|
-
_this.headerSize = options.headerSize;
|
|
65
|
-
_this.headerComponent = options.headerComponent;
|
|
66
|
-
_this._minimumBodySize = options.minimumBodySize;
|
|
67
|
-
_this._maximumBodySize = options.maximumBodySize;
|
|
68
|
-
_this._isExpanded = options.isExpanded;
|
|
69
|
-
_this._headerVisible = options.isHeaderVisible;
|
|
70
|
-
_this._onDidChangeExpansionState.fire(_this.isExpanded()); // initialize value
|
|
71
|
-
_this._orientation = options.orientation;
|
|
72
|
-
_this.element.classList.add('dv-pane');
|
|
73
|
-
_this.addDisposables(_this.api.onWillVisibilityChange(function (event) {
|
|
74
|
-
var isVisible = event.isVisible;
|
|
75
|
-
var accessor = _this._params.accessor;
|
|
76
|
-
accessor.setVisible(_this, isVisible);
|
|
77
|
-
}), _this.api.onDidSizeChange(function (event) {
|
|
78
|
-
_this._onDidChange.fire({ size: event.size });
|
|
79
|
-
}), (0, events_1.addDisposableListener)(_this.element, 'mouseenter', function (ev) {
|
|
80
|
-
_this.api._onMouseEnter.fire(ev);
|
|
81
|
-
}), (0, events_1.addDisposableListener)(_this.element, 'mouseleave', function (ev) {
|
|
82
|
-
_this.api._onMouseLeave.fire(ev);
|
|
83
|
-
}));
|
|
84
|
-
_this.addDisposables(_this._onDidChangeExpansionState, _this.onDidChangeExpansionState(function (isPanelExpanded) {
|
|
85
|
-
_this.api._onDidExpansionChange.fire({
|
|
86
|
-
isExpanded: isPanelExpanded,
|
|
87
|
-
});
|
|
88
|
-
}), _this.api.onDidFocusChange(function (e) {
|
|
89
|
-
if (!_this.header) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
if (e.isFocused) {
|
|
93
|
-
(0, dom_1.addClasses)(_this.header, 'focused');
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
(0, dom_1.removeClasses)(_this.header, 'focused');
|
|
97
|
-
}
|
|
98
|
-
}));
|
|
99
|
-
_this.renderOnce();
|
|
100
|
-
return _this;
|
|
101
|
-
}
|
|
102
|
-
Object.defineProperty(PaneviewPanel.prototype, "orientation", {
|
|
103
|
-
get: function () {
|
|
104
|
-
return this._orientation;
|
|
105
|
-
},
|
|
106
|
-
set: function (value) {
|
|
107
|
-
this._orientation = value;
|
|
108
|
-
},
|
|
109
|
-
enumerable: false,
|
|
110
|
-
configurable: true
|
|
111
|
-
});
|
|
112
|
-
Object.defineProperty(PaneviewPanel.prototype, "minimumSize", {
|
|
113
|
-
get: function () {
|
|
114
|
-
var headerSize = this.headerSize;
|
|
115
|
-
var expanded = this.isExpanded();
|
|
116
|
-
var minimumBodySize = expanded ? this._minimumBodySize : 0;
|
|
117
|
-
return headerSize + minimumBodySize;
|
|
118
|
-
},
|
|
119
|
-
enumerable: false,
|
|
120
|
-
configurable: true
|
|
121
|
-
});
|
|
122
|
-
Object.defineProperty(PaneviewPanel.prototype, "maximumSize", {
|
|
123
|
-
get: function () {
|
|
124
|
-
var headerSize = this.headerSize;
|
|
125
|
-
var expanded = this.isExpanded();
|
|
126
|
-
var maximumBodySize = expanded ? this._maximumBodySize : 0;
|
|
127
|
-
return headerSize + maximumBodySize;
|
|
128
|
-
},
|
|
129
|
-
enumerable: false,
|
|
130
|
-
configurable: true
|
|
131
|
-
});
|
|
132
|
-
Object.defineProperty(PaneviewPanel.prototype, "size", {
|
|
133
|
-
get: function () {
|
|
134
|
-
return this._size;
|
|
135
|
-
},
|
|
136
|
-
enumerable: false,
|
|
137
|
-
configurable: true
|
|
138
|
-
});
|
|
139
|
-
Object.defineProperty(PaneviewPanel.prototype, "orthogonalSize", {
|
|
140
|
-
get: function () {
|
|
141
|
-
return this._orthogonalSize;
|
|
142
|
-
},
|
|
143
|
-
set: function (size) {
|
|
144
|
-
this._orthogonalSize = size;
|
|
145
|
-
},
|
|
146
|
-
enumerable: false,
|
|
147
|
-
configurable: true
|
|
148
|
-
});
|
|
149
|
-
Object.defineProperty(PaneviewPanel.prototype, "minimumBodySize", {
|
|
150
|
-
get: function () {
|
|
151
|
-
return this._minimumBodySize;
|
|
152
|
-
},
|
|
153
|
-
set: function (value) {
|
|
154
|
-
this._minimumBodySize = typeof value === 'number' ? value : 0;
|
|
155
|
-
},
|
|
156
|
-
enumerable: false,
|
|
157
|
-
configurable: true
|
|
158
|
-
});
|
|
159
|
-
Object.defineProperty(PaneviewPanel.prototype, "maximumBodySize", {
|
|
160
|
-
get: function () {
|
|
161
|
-
return this._maximumBodySize;
|
|
162
|
-
},
|
|
163
|
-
set: function (value) {
|
|
164
|
-
this._maximumBodySize =
|
|
165
|
-
typeof value === 'number' ? value : Number.POSITIVE_INFINITY;
|
|
166
|
-
},
|
|
167
|
-
enumerable: false,
|
|
168
|
-
configurable: true
|
|
169
|
-
});
|
|
170
|
-
Object.defineProperty(PaneviewPanel.prototype, "headerVisible", {
|
|
171
|
-
get: function () {
|
|
172
|
-
return this._headerVisible;
|
|
173
|
-
},
|
|
174
|
-
set: function (value) {
|
|
175
|
-
this._headerVisible = value;
|
|
176
|
-
this.header.style.display = value ? '' : 'none';
|
|
177
|
-
},
|
|
178
|
-
enumerable: false,
|
|
179
|
-
configurable: true
|
|
180
|
-
});
|
|
181
|
-
PaneviewPanel.prototype.setVisible = function (isVisible) {
|
|
182
|
-
this.api._onDidVisibilityChange.fire({ isVisible: isVisible });
|
|
183
|
-
};
|
|
184
|
-
PaneviewPanel.prototype.setActive = function (isActive) {
|
|
185
|
-
this.api._onDidActiveChange.fire({ isActive: isActive });
|
|
186
|
-
};
|
|
187
|
-
PaneviewPanel.prototype.isExpanded = function () {
|
|
188
|
-
return this._isExpanded;
|
|
189
|
-
};
|
|
190
|
-
PaneviewPanel.prototype.setExpanded = function (expanded) {
|
|
191
|
-
var _this = this;
|
|
192
|
-
if (this._isExpanded === expanded) {
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
this._isExpanded = expanded;
|
|
196
|
-
if (expanded) {
|
|
197
|
-
if (this.animationTimer) {
|
|
198
|
-
clearTimeout(this.animationTimer);
|
|
199
|
-
}
|
|
200
|
-
if (this.body) {
|
|
201
|
-
this.element.appendChild(this.body);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
else {
|
|
205
|
-
this.animationTimer = setTimeout(function () {
|
|
206
|
-
var _a;
|
|
207
|
-
(_a = _this.body) === null || _a === void 0 ? void 0 : _a.remove();
|
|
208
|
-
}, 200);
|
|
209
|
-
}
|
|
210
|
-
this._onDidChange.fire(expanded ? { size: this.width } : {});
|
|
211
|
-
this._onDidChangeExpansionState.fire(expanded);
|
|
212
|
-
};
|
|
213
|
-
PaneviewPanel.prototype.layout = function (size, orthogonalSize) {
|
|
214
|
-
this._size = size;
|
|
215
|
-
this._orthogonalSize = orthogonalSize;
|
|
216
|
-
var _a = __read(this.orientation === splitview_1.Orientation.HORIZONTAL
|
|
217
|
-
? [size, orthogonalSize]
|
|
218
|
-
: [orthogonalSize, size], 2), width = _a[0], height = _a[1];
|
|
219
|
-
_super.prototype.layout.call(this, width, height);
|
|
220
|
-
};
|
|
221
|
-
PaneviewPanel.prototype.init = function (parameters) {
|
|
222
|
-
var _a, _b;
|
|
223
|
-
_super.prototype.init.call(this, parameters);
|
|
224
|
-
if (typeof parameters.minimumBodySize === 'number') {
|
|
225
|
-
this.minimumBodySize = parameters.minimumBodySize;
|
|
226
|
-
}
|
|
227
|
-
if (typeof parameters.maximumBodySize === 'number') {
|
|
228
|
-
this.maximumBodySize = parameters.maximumBodySize;
|
|
229
|
-
}
|
|
230
|
-
this.bodyPart = this.getBodyComponent();
|
|
231
|
-
this.headerPart = this.getHeaderComponent();
|
|
232
|
-
this.bodyPart.init(__assign(__assign({}, parameters), { api: this.api }));
|
|
233
|
-
this.headerPart.init(__assign(__assign({}, parameters), { api: this.api }));
|
|
234
|
-
(_a = this.body) === null || _a === void 0 ? void 0 : _a.append(this.bodyPart.element);
|
|
235
|
-
(_b = this.header) === null || _b === void 0 ? void 0 : _b.append(this.headerPart.element);
|
|
236
|
-
if (typeof parameters.isExpanded === 'boolean') {
|
|
237
|
-
this.setExpanded(parameters.isExpanded);
|
|
238
|
-
}
|
|
239
|
-
};
|
|
240
|
-
PaneviewPanel.prototype.toJSON = function () {
|
|
241
|
-
var params = this._params;
|
|
242
|
-
return __assign(__assign({}, _super.prototype.toJSON.call(this)), { headerComponent: this.headerComponent, title: params.title });
|
|
243
|
-
};
|
|
244
|
-
PaneviewPanel.prototype.renderOnce = function () {
|
|
245
|
-
this.header = document.createElement('div');
|
|
246
|
-
this.header.tabIndex = 0;
|
|
247
|
-
this.header.className = 'dv-pane-header';
|
|
248
|
-
this.header.style.height = "".concat(this.headerSize, "px");
|
|
249
|
-
this.header.style.lineHeight = "".concat(this.headerSize, "px");
|
|
250
|
-
this.header.style.minHeight = "".concat(this.headerSize, "px");
|
|
251
|
-
this.header.style.maxHeight = "".concat(this.headerSize, "px");
|
|
252
|
-
this.element.appendChild(this.header);
|
|
253
|
-
this.body = document.createElement('div');
|
|
254
|
-
this.body.className = 'dv-pane-body';
|
|
255
|
-
this.element.appendChild(this.body);
|
|
256
|
-
};
|
|
257
|
-
// TODO slightly hacky by-pass of the component to create a body and header component
|
|
258
|
-
PaneviewPanel.prototype.getComponent = function () {
|
|
259
|
-
var _this = this;
|
|
260
|
-
return {
|
|
261
|
-
update: function (params) {
|
|
262
|
-
var _a, _b;
|
|
263
|
-
(_a = _this.bodyPart) === null || _a === void 0 ? void 0 : _a.update({ params: params });
|
|
264
|
-
(_b = _this.headerPart) === null || _b === void 0 ? void 0 : _b.update({ params: params });
|
|
265
|
-
},
|
|
266
|
-
dispose: function () {
|
|
267
|
-
var _a, _b;
|
|
268
|
-
(_a = _this.bodyPart) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
269
|
-
(_b = _this.headerPart) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
270
|
-
},
|
|
271
|
-
};
|
|
272
|
-
};
|
|
273
|
-
return PaneviewPanel;
|
|
274
|
-
}(basePanelView_1.BasePanelView));
|
|
275
|
-
exports.PaneviewPanel = PaneviewPanel;
|
package/dist/cjs/popoutWindow.js
DELETED
|
@@ -1,244 +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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
-
function step(op) {
|
|
31
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
-
switch (op[0]) {
|
|
36
|
-
case 0: case 1: t = op; break;
|
|
37
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
-
default:
|
|
41
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
-
if (t[2]) _.ops.pop();
|
|
46
|
-
_.trys.pop(); continue;
|
|
47
|
-
}
|
|
48
|
-
op = body.call(thisArg, _);
|
|
49
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
54
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
55
|
-
if (!m) return o;
|
|
56
|
-
var i = m.call(o), r, ar = [], e;
|
|
57
|
-
try {
|
|
58
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
59
|
-
}
|
|
60
|
-
catch (error) { e = { error: error }; }
|
|
61
|
-
finally {
|
|
62
|
-
try {
|
|
63
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
64
|
-
}
|
|
65
|
-
finally { if (e) throw e.error; }
|
|
66
|
-
}
|
|
67
|
-
return ar;
|
|
68
|
-
};
|
|
69
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70
|
-
exports.PopoutWindow = void 0;
|
|
71
|
-
exports.assertSameOriginPopoutUrl = assertSameOriginPopoutUrl;
|
|
72
|
-
var dom_1 = require("./dom");
|
|
73
|
-
var events_1 = require("./events");
|
|
74
|
-
var lifecycle_1 = require("./lifecycle");
|
|
75
|
-
/**
|
|
76
|
-
* Reject popout URLs that aren't same-origin http(s). Blocks `javascript:`,
|
|
77
|
-
* `data:`, `blob:`, `vbscript:`, and cross-origin URLs that would otherwise
|
|
78
|
-
* execute in a context the browser still associates with the opener via
|
|
79
|
-
* `window.opener`.
|
|
80
|
-
*/
|
|
81
|
-
function assertSameOriginPopoutUrl(url) {
|
|
82
|
-
var resolved;
|
|
83
|
-
try {
|
|
84
|
-
resolved = new URL(url, globalThis.location.href);
|
|
85
|
-
}
|
|
86
|
-
catch (_a) {
|
|
87
|
-
throw new Error("dockview: invalid popout URL: ".concat(url));
|
|
88
|
-
}
|
|
89
|
-
var protocolOk = resolved.protocol === 'http:' || resolved.protocol === 'https:';
|
|
90
|
-
if (!protocolOk || resolved.origin !== globalThis.location.origin) {
|
|
91
|
-
throw new Error("dockview: popout URL must be same-origin http(s); got: ".concat(url));
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
var PopoutWindow = /** @class */ (function (_super) {
|
|
95
|
-
__extends(PopoutWindow, _super);
|
|
96
|
-
function PopoutWindow(target, className, options) {
|
|
97
|
-
var _this = _super.call(this) || this;
|
|
98
|
-
_this.target = target;
|
|
99
|
-
_this.className = className;
|
|
100
|
-
_this.options = options;
|
|
101
|
-
_this._onWillClose = new events_1.Emitter();
|
|
102
|
-
_this.onWillClose = _this._onWillClose.event;
|
|
103
|
-
_this._onDidClose = new events_1.Emitter();
|
|
104
|
-
_this.onDidClose = _this._onDidClose.event;
|
|
105
|
-
_this._window = null;
|
|
106
|
-
_this.addDisposables(_this._onWillClose, _this._onDidClose, {
|
|
107
|
-
dispose: function () {
|
|
108
|
-
_this.close();
|
|
109
|
-
},
|
|
110
|
-
});
|
|
111
|
-
return _this;
|
|
112
|
-
}
|
|
113
|
-
Object.defineProperty(PopoutWindow.prototype, "window", {
|
|
114
|
-
get: function () {
|
|
115
|
-
var _a, _b;
|
|
116
|
-
return (_b = (_a = this._window) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : null;
|
|
117
|
-
},
|
|
118
|
-
enumerable: false,
|
|
119
|
-
configurable: true
|
|
120
|
-
});
|
|
121
|
-
PopoutWindow.prototype.dimensions = function () {
|
|
122
|
-
if (!this._window) {
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
var left = this._window.value.screenX;
|
|
126
|
-
var top = this._window.value.screenY;
|
|
127
|
-
var width = this._window.value.innerWidth;
|
|
128
|
-
var height = this._window.value.innerHeight;
|
|
129
|
-
return { top: top, left: left, width: width, height: height };
|
|
130
|
-
};
|
|
131
|
-
PopoutWindow.prototype.close = function () {
|
|
132
|
-
var _a, _b;
|
|
133
|
-
if (this._window) {
|
|
134
|
-
this._onWillClose.fire();
|
|
135
|
-
(_b = (_a = this.options).onWillClose) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
136
|
-
id: this.target,
|
|
137
|
-
window: this._window.value,
|
|
138
|
-
});
|
|
139
|
-
this._window.disposable.dispose();
|
|
140
|
-
this._window = null;
|
|
141
|
-
this._onDidClose.fire();
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
PopoutWindow.prototype.open = function () {
|
|
145
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
146
|
-
var url, features, externalWindow, disposable, container;
|
|
147
|
-
var _this = this;
|
|
148
|
-
var _a, _b;
|
|
149
|
-
return __generator(this, function (_c) {
|
|
150
|
-
if (this._window) {
|
|
151
|
-
throw new Error('instance of popout window is already open');
|
|
152
|
-
}
|
|
153
|
-
url = "".concat(this.options.url);
|
|
154
|
-
assertSameOriginPopoutUrl(url);
|
|
155
|
-
features = Object.entries({
|
|
156
|
-
top: this.options.top,
|
|
157
|
-
left: this.options.left,
|
|
158
|
-
width: this.options.width,
|
|
159
|
-
height: this.options.height,
|
|
160
|
-
})
|
|
161
|
-
.map(function (_a) {
|
|
162
|
-
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
163
|
-
return "".concat(key, "=").concat(value);
|
|
164
|
-
})
|
|
165
|
-
.join(',');
|
|
166
|
-
externalWindow = window.open(url, this.target, features);
|
|
167
|
-
if (!externalWindow) {
|
|
168
|
-
/**
|
|
169
|
-
* Popup blocked
|
|
170
|
-
*/
|
|
171
|
-
return [2 /*return*/, null];
|
|
172
|
-
}
|
|
173
|
-
disposable = new lifecycle_1.CompositeDisposable();
|
|
174
|
-
this._window = { value: externalWindow, disposable: disposable };
|
|
175
|
-
disposable.addDisposables(lifecycle_1.Disposable.from(function () {
|
|
176
|
-
externalWindow.close();
|
|
177
|
-
}), (0, events_1.addDisposableListener)(globalThis.window, 'beforeunload', function () {
|
|
178
|
-
/**
|
|
179
|
-
* before the main window closes we should close this popup too
|
|
180
|
-
* to be good citizens
|
|
181
|
-
*
|
|
182
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event
|
|
183
|
-
*/
|
|
184
|
-
_this.close();
|
|
185
|
-
}));
|
|
186
|
-
container = this.createPopoutWindowContainer();
|
|
187
|
-
if (this.className) {
|
|
188
|
-
container.classList.add(this.className);
|
|
189
|
-
}
|
|
190
|
-
(_b = (_a = this.options).onDidOpen) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
191
|
-
id: this.target,
|
|
192
|
-
window: externalWindow,
|
|
193
|
-
});
|
|
194
|
-
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
195
|
-
externalWindow.addEventListener('unload', function (e) {
|
|
196
|
-
// if page fails to load before unloading
|
|
197
|
-
// this.close();
|
|
198
|
-
});
|
|
199
|
-
externalWindow.addEventListener('load', function () {
|
|
200
|
-
/**
|
|
201
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event
|
|
202
|
-
*/
|
|
203
|
-
try {
|
|
204
|
-
var externalDocument = externalWindow.document;
|
|
205
|
-
externalDocument.title = document.title;
|
|
206
|
-
externalDocument.body.appendChild(container);
|
|
207
|
-
(0, dom_1.addStyles)(externalDocument, globalThis.document.styleSheets, {
|
|
208
|
-
nonce: _this.options.nonce,
|
|
209
|
-
});
|
|
210
|
-
/**
|
|
211
|
-
* beforeunload must be registered after load for reasons I could not determine
|
|
212
|
-
* otherwise the beforeunload event will not fire when the window is closed
|
|
213
|
-
*/
|
|
214
|
-
(0, events_1.addDisposableListener)(externalWindow, 'beforeunload', function () {
|
|
215
|
-
/**
|
|
216
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event
|
|
217
|
-
*/
|
|
218
|
-
_this.close();
|
|
219
|
-
});
|
|
220
|
-
resolve(container);
|
|
221
|
-
}
|
|
222
|
-
catch (err) {
|
|
223
|
-
// only except this is the DOM isn't setup. e.g. in a in correctly configured test
|
|
224
|
-
reject(err);
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
})];
|
|
228
|
-
});
|
|
229
|
-
});
|
|
230
|
-
};
|
|
231
|
-
PopoutWindow.prototype.createPopoutWindowContainer = function () {
|
|
232
|
-
var el = document.createElement('div');
|
|
233
|
-
el.classList.add('dv-popout-window');
|
|
234
|
-
el.id = 'dv-popout-window';
|
|
235
|
-
el.style.position = 'absolute';
|
|
236
|
-
el.style.width = '100%';
|
|
237
|
-
el.style.height = '100%';
|
|
238
|
-
el.style.top = '0px';
|
|
239
|
-
el.style.left = '0px';
|
|
240
|
-
return el;
|
|
241
|
-
};
|
|
242
|
-
return PopoutWindow;
|
|
243
|
-
}(lifecycle_1.CompositeDisposable));
|
|
244
|
-
exports.PopoutWindow = PopoutWindow;
|
package/dist/cjs/resizable.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.Resizable = void 0;
|
|
19
|
-
var dom_1 = require("./dom");
|
|
20
|
-
var lifecycle_1 = require("./lifecycle");
|
|
21
|
-
var Resizable = /** @class */ (function (_super) {
|
|
22
|
-
__extends(Resizable, _super);
|
|
23
|
-
function Resizable(parentElement, disableResizing) {
|
|
24
|
-
if (disableResizing === void 0) { disableResizing = false; }
|
|
25
|
-
var _this = _super.call(this) || this;
|
|
26
|
-
_this._lastWidth = -1;
|
|
27
|
-
_this._lastHeight = -1;
|
|
28
|
-
_this._disableResizing = disableResizing;
|
|
29
|
-
_this._element = parentElement;
|
|
30
|
-
_this.addDisposables((0, dom_1.watchElementResize)(_this._element, function (entry) {
|
|
31
|
-
if (_this.isDisposed) {
|
|
32
|
-
/**
|
|
33
|
-
* resize is delayed through requestAnimationFrame so there is a small chance
|
|
34
|
-
* the component has already been disposed of
|
|
35
|
-
*/
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (_this.disableResizing) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
if (!_this._element.offsetParent) {
|
|
42
|
-
/**
|
|
43
|
-
* offsetParent === null is equivalent to display: none being set on the element or one
|
|
44
|
-
* of it's parents. In the display: none case the size will become (0, 0) which we do
|
|
45
|
-
* not want to propagate.
|
|
46
|
-
*
|
|
47
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent
|
|
48
|
-
*
|
|
49
|
-
* You could use checkVisibility() but at the time of writing it's not supported across
|
|
50
|
-
* all Browsers
|
|
51
|
-
*
|
|
52
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility
|
|
53
|
-
*/
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
if (!(0, dom_1.isInDocument)(_this._element)) {
|
|
57
|
-
/**
|
|
58
|
-
* since the event is dispatched through requestAnimationFrame there is a small chance
|
|
59
|
-
* the component is no longer attached to the DOM, if that is the case the dimensions
|
|
60
|
-
* are mostly likely all zero and meaningless. we should skip this case.
|
|
61
|
-
*/
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
// Round to integers to absorb sub-pixel jitter from
|
|
65
|
-
// fractional devicePixelRatio (e.g. multi-monitor setups),
|
|
66
|
-
// which would otherwise re-fire layout in a feedback loop.
|
|
67
|
-
var width = Math.round(entry.contentRect.width);
|
|
68
|
-
var height = Math.round(entry.contentRect.height);
|
|
69
|
-
if (width === _this._lastWidth && height === _this._lastHeight) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
_this._lastWidth = width;
|
|
73
|
-
_this._lastHeight = height;
|
|
74
|
-
_this.layout(width, height);
|
|
75
|
-
}));
|
|
76
|
-
return _this;
|
|
77
|
-
}
|
|
78
|
-
Object.defineProperty(Resizable.prototype, "element", {
|
|
79
|
-
get: function () {
|
|
80
|
-
return this._element;
|
|
81
|
-
},
|
|
82
|
-
enumerable: false,
|
|
83
|
-
configurable: true
|
|
84
|
-
});
|
|
85
|
-
Object.defineProperty(Resizable.prototype, "disableResizing", {
|
|
86
|
-
get: function () {
|
|
87
|
-
return this._disableResizing;
|
|
88
|
-
},
|
|
89
|
-
set: function (value) {
|
|
90
|
-
this._disableResizing = value;
|
|
91
|
-
},
|
|
92
|
-
enumerable: false,
|
|
93
|
-
configurable: true
|
|
94
|
-
});
|
|
95
|
-
return Resizable;
|
|
96
|
-
}(lifecycle_1.CompositeDisposable));
|
|
97
|
-
exports.Resizable = Resizable;
|