igniteui-dockmanager 1.16.0-beta.2 → 1.16.0-beta.3
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/custom-elements.json +282 -128
- package/dist/cjs/igc-button-component_20.cjs.entry.js +824 -117
- package/dist/cjs/igc-button-component_20.cjs.entry.js.map +1 -1
- package/dist/cjs/igniteui-dockmanager.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/locale-98a30720.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/dockmanager/dockmanager-component.css +6 -1
- package/dist/collection/components/dockmanager/dockmanager-component.js +69 -16
- package/dist/collection/components/dockmanager/dockmanager-component.js.map +1 -1
- package/dist/collection/components/dockmanager/dockmanager.interfaces.js +4 -0
- package/dist/collection/components/dockmanager/dockmanager.interfaces.js.map +1 -1
- package/dist/collection/components/dockmanager/dockmanager.public-interfaces.js.map +1 -1
- package/dist/collection/components/dockmanager/dockmanager.service.js +146 -33
- package/dist/collection/components/dockmanager/dockmanager.service.js.map +1 -1
- package/dist/collection/components/dockmanager/dockmanager.service.spec.js +89 -0
- package/dist/collection/components/dockmanager/dockmanager.service.spec.js.map +1 -1
- package/dist/collection/components/dockmanager/panes/content-pane-component.js +21 -2
- package/dist/collection/components/dockmanager/panes/content-pane-component.js.map +1 -1
- package/dist/collection/components/dockmanager/panes/document-host-component.js +20 -1
- package/dist/collection/components/dockmanager/panes/document-host-component.js.map +1 -1
- package/dist/collection/components/dockmanager/panes/split-pane-component.js +39 -1
- package/dist/collection/components/dockmanager/panes/split-pane-component.js.map +1 -1
- package/dist/collection/components/dockmanager/panes/splitter-component.js +28 -7
- package/dist/collection/components/dockmanager/panes/splitter-component.js.map +1 -1
- package/dist/collection/components/sample-component/sample-component.css +39 -4
- package/dist/collection/components/sample-component/sample-component.js +578 -49
- package/dist/collection/components/sample-component/sample-component.js.map +1 -1
- package/dist/collection/components/tabs/tabs-component.js +20 -1
- package/dist/collection/components/tabs/tabs-component.js.map +1 -1
- package/dist/esm/igc-button-component_20.entry.js +818 -111
- package/dist/esm/igc-button-component_20.entry.js.map +1 -1
- package/dist/esm/igniteui-dockmanager.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/locale-81ccabef.js.map +1 -1
- package/dist/igniteui-dockmanager/igniteui-dockmanager.esm.js +1 -1
- package/dist/igniteui-dockmanager/igniteui-dockmanager.esm.js.map +1 -1
- package/dist/igniteui-dockmanager/p-0a619d82.entry.js +2 -0
- package/dist/igniteui-dockmanager/p-0a619d82.entry.js.map +1 -0
- package/dist/igniteui-dockmanager/p-f09ed94c.js.map +1 -1
- package/dist/types/components/dockmanager/dockmanager-component.d.ts +4 -0
- package/dist/types/components/dockmanager/dockmanager.interfaces.d.ts +4 -0
- package/dist/types/components/dockmanager/dockmanager.public-interfaces.d.ts +5 -0
- package/dist/types/components/dockmanager/dockmanager.service.d.ts +8 -2
- package/dist/types/components/dockmanager/panes/content-pane-component.d.ts +1 -0
- package/dist/types/components/dockmanager/panes/document-host-component.d.ts +1 -0
- package/dist/types/components/dockmanager/panes/split-pane-component.d.ts +2 -0
- package/dist/types/components/dockmanager/panes/splitter-component.d.ts +1 -0
- package/dist/types/components/sample-component/sample-component.d.ts +10 -19
- package/dist/types/components/tabs/tabs-component.d.ts +1 -0
- package/dist/types/components.d.ts +12 -0
- package/loader/cdn.js +2 -2
- package/loader/index.cjs.js +2 -2
- package/package.json +1 -1
- package/dist/igniteui-dockmanager/p-b20b97f6.entry.js +0 -2
- package/dist/igniteui-dockmanager/p-b20b97f6.entry.js.map +0 -1
|
@@ -84,6 +84,10 @@ class Utils {
|
|
|
84
84
|
* @hidden
|
|
85
85
|
*/
|
|
86
86
|
const IGC_DEFAULT_PANE_SIZE = 100;
|
|
87
|
+
/**
|
|
88
|
+
* @hidden
|
|
89
|
+
*/
|
|
90
|
+
const IGC_DEFAULT_PANE_SIZE_IN_PIXELS = 100;
|
|
87
91
|
/**
|
|
88
92
|
* @hidden
|
|
89
93
|
*/
|
|
@@ -130,13 +134,14 @@ const IgcContentPaneComponent = class {
|
|
|
130
134
|
this.disabled = false;
|
|
131
135
|
this.isSingleFloating = false;
|
|
132
136
|
this.contentId = undefined;
|
|
137
|
+
this.parentUseFixedSize = false;
|
|
133
138
|
}
|
|
134
139
|
componentDidRender() {
|
|
135
140
|
this.rendered.emit();
|
|
136
141
|
}
|
|
137
142
|
render() {
|
|
138
143
|
const size = this.size || this.size === 0 ? this.size : IGC_DEFAULT_PANE_SIZE;
|
|
139
|
-
const unpinnedSize = this.unpinnedSize ? this.unpinnedSize : IGC_DEFAULT_UNPIN_PANE_SIZE;
|
|
144
|
+
const unpinnedSize = this.unpinnedSize >= 0 ? this.unpinnedSize : IGC_DEFAULT_UNPIN_PANE_SIZE;
|
|
140
145
|
const parts = Utils.partNameMap({
|
|
141
146
|
'content-pane': true,
|
|
142
147
|
[this.contentId]: true,
|
|
@@ -144,7 +149,7 @@ const IgcContentPaneComponent = class {
|
|
|
144
149
|
'single-floating': this.isSingleFloating
|
|
145
150
|
});
|
|
146
151
|
return (index.h(index.Host, { role: "group", "aria-label": this.header, "aria-disabled": this.disabled ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, style: {
|
|
147
|
-
flex: this.isFlyout ? `0 1 ${unpinnedSize}px` : `${size} 1 ${size}px`
|
|
152
|
+
flex: this.isFlyout ? `0 1 ${unpinnedSize}px` : this.parentUseFixedSize ? `0 0 ${size}px` : `${size} 1 ${size}px`
|
|
148
153
|
}, part: parts }, index.h("slot", { name: "header" }), index.h("slot", null)));
|
|
149
154
|
}
|
|
150
155
|
};
|
|
@@ -546,7 +551,8 @@ class IgcDockManagerService {
|
|
|
546
551
|
const floatingPane = {
|
|
547
552
|
type: locale.IgcDockManagerPaneType.splitPane,
|
|
548
553
|
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
549
|
-
panes: [content]
|
|
554
|
+
panes: [content],
|
|
555
|
+
size: content.size
|
|
550
556
|
};
|
|
551
557
|
floatingPane.floatingLocation = location;
|
|
552
558
|
floatingPane.floatingWidth = width;
|
|
@@ -653,6 +659,7 @@ class IgcDockManagerService {
|
|
|
653
659
|
}
|
|
654
660
|
}
|
|
655
661
|
dockToEdge(targetPane, position) {
|
|
662
|
+
var _a, _b;
|
|
656
663
|
const targetParent = this.getParent(targetPane);
|
|
657
664
|
if (!targetParent) {
|
|
658
665
|
return this.dockToCenter(targetPane, this.dockManager.draggedPane);
|
|
@@ -682,6 +689,15 @@ class IgcDockManagerService {
|
|
|
682
689
|
};
|
|
683
690
|
}
|
|
684
691
|
const paneToDock = draggedPane ? this.getPaneToDock(draggedPane) : this.dockManager.activePane;
|
|
692
|
+
// reset dragged pane size in pixels
|
|
693
|
+
if (((_a = this.draggedPaneParent) === null || _a === void 0 ? void 0 : _a.useFixedSize) === true && targetParent.useFixedSize !== true) {
|
|
694
|
+
paneToDock.size = IGC_DEFAULT_PANE_SIZE_IN_PIXELS;
|
|
695
|
+
}
|
|
696
|
+
else if (targetParent.useFixedSize === true && ((_b = this.draggedPaneParent) === null || _b === void 0 ? void 0 : _b.orientation) !== targetParent.orientation) {
|
|
697
|
+
const floatingPane = draggedPane;
|
|
698
|
+
const floatingPaneSizeInPixels = targetParent.orientation === locale.IgcSplitPaneOrientation.horizontal ? floatingPane === null || floatingPane === void 0 ? void 0 : floatingPane.floatingWidth : floatingPane === null || floatingPane === void 0 ? void 0 : floatingPane.floatingHeight;
|
|
699
|
+
paneToDock.size = floatingPaneSizeInPixels;
|
|
700
|
+
}
|
|
685
701
|
let newSplitPane;
|
|
686
702
|
var isDockingBefore = Utils.isDockingIndicatorBefore(position) && !isRTL || Utils.isDockingIndicatorBeforeRTL(position) && isRTL;
|
|
687
703
|
const insertIndex = isDockingBefore ?
|
|
@@ -702,23 +718,41 @@ class IgcDockManagerService {
|
|
|
702
718
|
panes: isDockingBefore ?
|
|
703
719
|
[paneToDock, targetPane] :
|
|
704
720
|
[targetPane, paneToDock],
|
|
705
|
-
size: targetPane.size
|
|
721
|
+
size: targetPane.size >= 0 ? targetPane.size : targetParent.size
|
|
706
722
|
};
|
|
707
723
|
targetParent.panes[paneIndex] = newSplitPane;
|
|
708
724
|
}
|
|
709
|
-
targetPane
|
|
710
|
-
|
|
725
|
+
if (!this.shouldUseFixedSize(targetPane)) {
|
|
726
|
+
targetPane.size = undefined;
|
|
727
|
+
paneToDock.size = undefined;
|
|
728
|
+
}
|
|
729
|
+
// simplifying nested split panes
|
|
730
|
+
const parentSplitPane = this.getParent(targetParent);
|
|
731
|
+
if (parentSplitPane &&
|
|
732
|
+
parentSplitPane.type === locale.IgcDockManagerPaneType.splitPane &&
|
|
733
|
+
parentSplitPane.panes.length === 1 &&
|
|
734
|
+
parentSplitPane.allowEmpty === targetParent.allowEmpty &&
|
|
735
|
+
parentSplitPane.size === targetParent.size) {
|
|
736
|
+
parentSplitPane.orientation = targetParent.orientation;
|
|
737
|
+
parentSplitPane.panes = targetParent.panes;
|
|
738
|
+
}
|
|
711
739
|
}
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
if (
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
740
|
+
}
|
|
741
|
+
shouldUseFixedSize(pane) {
|
|
742
|
+
if (pane.type === locale.IgcDockManagerPaneType.splitPane) {
|
|
743
|
+
if (pane.useFixedSize) {
|
|
744
|
+
return true;
|
|
745
|
+
}
|
|
746
|
+
for (let i = 0; i < pane.panes.length; i++) {
|
|
747
|
+
if (this.shouldUseFixedSize(pane.panes[i])) {
|
|
748
|
+
return true;
|
|
749
|
+
}
|
|
750
|
+
}
|
|
721
751
|
}
|
|
752
|
+
else if (pane.type === locale.IgcDockManagerPaneType.documentHost) {
|
|
753
|
+
this.shouldUseFixedSize(pane.rootPane);
|
|
754
|
+
}
|
|
755
|
+
return false;
|
|
722
756
|
}
|
|
723
757
|
updateLayout() {
|
|
724
758
|
this.dockManager.layout = Object.assign({}, this.dockManager.layout);
|
|
@@ -788,7 +822,7 @@ class IgcDockManagerService {
|
|
|
788
822
|
resizeFlyoutPane(delta) {
|
|
789
823
|
const pane = this.dockManager.flyoutPane;
|
|
790
824
|
const location = this.unpinnedLocationMap.get(pane);
|
|
791
|
-
const paneSize = pane.unpinnedSize ? pane.unpinnedSize : IGC_DEFAULT_UNPIN_PANE_SIZE;
|
|
825
|
+
const paneSize = pane.unpinnedSize >= 0 ? pane.unpinnedSize : IGC_DEFAULT_UNPIN_PANE_SIZE;
|
|
792
826
|
const newSize = location === locale.IgcUnpinnedLocation.left || location === locale.IgcUnpinnedLocation.top ?
|
|
793
827
|
paneSize + delta :
|
|
794
828
|
paneSize - delta;
|
|
@@ -803,7 +837,9 @@ class IgcDockManagerService {
|
|
|
803
837
|
const sizeSum = paneSizes.reduce((p, c) => c + p, 0);
|
|
804
838
|
const calcDelta = deltaPercentage * sizeSum;
|
|
805
839
|
childPanes[paneIndex - 1].size = paneSizes[paneIndex - 1] + calcDelta;
|
|
806
|
-
|
|
840
|
+
if (!parentPane.useFixedSize) {
|
|
841
|
+
childPanes[paneIndex].size = paneSizes[paneIndex] - calcDelta;
|
|
842
|
+
}
|
|
807
843
|
this.updateLayout();
|
|
808
844
|
}
|
|
809
845
|
togglePin(pane, unpinBehavior = locale.IgcPaneActionBehavior.allPanes) {
|
|
@@ -847,16 +883,38 @@ class IgcDockManagerService {
|
|
|
847
883
|
this.updateLayout();
|
|
848
884
|
}
|
|
849
885
|
}
|
|
886
|
+
checkUseFixedSizeParent(pane) {
|
|
887
|
+
const parent = this.getParent(pane);
|
|
888
|
+
if (!parent) {
|
|
889
|
+
return null;
|
|
890
|
+
}
|
|
891
|
+
// If the pane to close is the last non-placeholder pane of a split pane, close the whole split pane.
|
|
892
|
+
// Also check if the pane to close is inside a split pane and close the top split pane that holds the placeholder.
|
|
893
|
+
if (parent.type === locale.IgcDockManagerPaneType.splitPane && parent.panes.length === 2) {
|
|
894
|
+
const isPlaceholderPresent = parent.panes.some(p => p.type === locale.IgcDockManagerPaneType.contentPane && p.contentId === "placeholder");
|
|
895
|
+
const isValidContentPane = parent.panes.every(p => p.type === locale.IgcDockManagerPaneType.contentPane ||
|
|
896
|
+
p.type === locale.IgcDockManagerPaneType.tabGroupPane ||
|
|
897
|
+
(p.type === locale.IgcDockManagerPaneType.splitPane && p.panes.length === 1 && p.panes[0].type === locale.IgcDockManagerPaneType.contentPane));
|
|
898
|
+
if (isPlaceholderPresent && isValidContentPane) {
|
|
899
|
+
return parent;
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
return this.checkUseFixedSizeParent(parent);
|
|
903
|
+
}
|
|
850
904
|
closePane(pane) {
|
|
851
905
|
let paneToRemove = pane;
|
|
852
906
|
let closeAll = this.dockManager.closeBehavior !== locale.IgcPaneActionBehavior.selectedPane;
|
|
853
907
|
if (pane.type === locale.IgcDockManagerPaneType.contentPane && pane !== this.dockManager.flyoutPane) {
|
|
854
|
-
const parent = this.
|
|
855
|
-
|
|
908
|
+
const parent = this.getParent(pane);
|
|
909
|
+
const ignoreResizeConstraintPaneTargetParent = this.checkUseFixedSizeParent(pane);
|
|
910
|
+
if (ignoreResizeConstraintPaneTargetParent !== null) {
|
|
911
|
+
paneToRemove = ignoreResizeConstraintPaneTargetParent;
|
|
912
|
+
}
|
|
913
|
+
else if (parent.type === locale.IgcDockManagerPaneType.tabGroupPane && closeAll) {
|
|
856
914
|
paneToRemove = parent;
|
|
857
915
|
}
|
|
858
916
|
}
|
|
859
|
-
const paneRemoved = paneToRemove.type === locale.IgcDockManagerPaneType.tabGroupPane ?
|
|
917
|
+
const paneRemoved = paneToRemove.type === locale.IgcDockManagerPaneType.tabGroupPane || paneToRemove.type === locale.IgcDockManagerPaneType.splitPane ?
|
|
860
918
|
this.removeAllowedPanes(pane, paneToRemove) :
|
|
861
919
|
this.emitPaneClose(pane, [paneToRemove]);
|
|
862
920
|
if ((paneRemoved || pane.hidden) && pane === this.dockManager.flyoutPane) {
|
|
@@ -1042,6 +1100,9 @@ class IgcDockManagerService {
|
|
|
1042
1100
|
let panesToRemove = [pane];
|
|
1043
1101
|
let paneToAdd = pane;
|
|
1044
1102
|
const parent = this.paneParentMap.get(pane);
|
|
1103
|
+
if (parent.type === locale.IgcDockManagerPaneType.splitPane && parent.useFixedSize === true) {
|
|
1104
|
+
this.draggedPaneParent = parent;
|
|
1105
|
+
}
|
|
1045
1106
|
if (pane !== this.dockManager.flyoutPane && parent.type === locale.IgcDockManagerPaneType.tabGroupPane) {
|
|
1046
1107
|
if (parent.allowEmpty) {
|
|
1047
1108
|
const panes = [...parent.panes];
|
|
@@ -1227,9 +1288,10 @@ class IgcDockManagerService {
|
|
|
1227
1288
|
}
|
|
1228
1289
|
return items;
|
|
1229
1290
|
}
|
|
1230
|
-
dragPaneStart(pane, rect, clientX, clientY) {
|
|
1291
|
+
dragPaneStart(pane, rect, clientX, clientY, anyPaneIgnoringResizeConstraints = false) {
|
|
1231
1292
|
var _a;
|
|
1232
|
-
if (this.dockManager.maximizedPane
|
|
1293
|
+
if (this.dockManager.maximizedPane ||
|
|
1294
|
+
(anyPaneIgnoringResizeConstraints && !this.isFloatingPane(this.getRootParent(pane)))) {
|
|
1233
1295
|
return false;
|
|
1234
1296
|
}
|
|
1235
1297
|
let panes;
|
|
@@ -1379,8 +1441,12 @@ class IgcDockManagerService {
|
|
|
1379
1441
|
this.dockPane(this.proximityDockPosition);
|
|
1380
1442
|
docked = true;
|
|
1381
1443
|
}
|
|
1444
|
+
if (!docked && this.draggedPaneParent && this.dockManager.draggedPane.type === locale.IgcDockManagerPaneType.splitPane && this.dockManager.draggedPane.panes.length === 1) {
|
|
1445
|
+
this.dockManager.draggedPane.panes[0].size = IGC_DEFAULT_PANE_SIZE_IN_PIXELS;
|
|
1446
|
+
}
|
|
1382
1447
|
this.draggedPanes = null;
|
|
1383
1448
|
this.draggedTab = null;
|
|
1449
|
+
this.draggedPaneParent = null;
|
|
1384
1450
|
this.dockManager.draggedPane = null;
|
|
1385
1451
|
this.dockManager.dropTargetPaneInfo = null;
|
|
1386
1452
|
this.dockManager.dropShadowRect = null;
|
|
@@ -1459,7 +1525,10 @@ class IgcDockManagerService {
|
|
|
1459
1525
|
this.draggedPanes = [pane];
|
|
1460
1526
|
return true;
|
|
1461
1527
|
}
|
|
1462
|
-
dragTabMove(pane, args, rects) {
|
|
1528
|
+
dragTabMove(pane, args, rects, anyPaneIgnoringResizeConstraints = false) {
|
|
1529
|
+
if (anyPaneIgnoringResizeConstraints && !this.isFloatingPane(this.getRootParent(pane))) {
|
|
1530
|
+
return false;
|
|
1531
|
+
}
|
|
1463
1532
|
const clientX = args.clientX;
|
|
1464
1533
|
const clientY = args.clientY;
|
|
1465
1534
|
const offsetX = args.offsetX;
|
|
@@ -1609,11 +1678,11 @@ class IgcDockManagerService {
|
|
|
1609
1678
|
}
|
|
1610
1679
|
}
|
|
1611
1680
|
getDropShadowRect(dockingPosition, dockingDirection) {
|
|
1612
|
-
var _a;
|
|
1681
|
+
var _a, _b;
|
|
1613
1682
|
const shadowRect = new DOMRect();
|
|
1614
1683
|
dockingPosition = dockingPosition !== null && dockingPosition !== void 0 ? dockingPosition : this.dockingIndicator.position;
|
|
1615
1684
|
dockingDirection = dockingDirection !== null && dockingDirection !== void 0 ? dockingDirection : this.dockingIndicator.direction;
|
|
1616
|
-
|
|
1685
|
+
let parentRect = this.dropTargetParentRect;
|
|
1617
1686
|
const dropTargetPaneInfo = this.dockManager.dropTargetPaneInfo;
|
|
1618
1687
|
if (dropTargetPaneInfo && !parentRect) {
|
|
1619
1688
|
const targetRect = dropTargetPaneInfo.targetRect;
|
|
@@ -1626,7 +1695,6 @@ class IgcDockManagerService {
|
|
|
1626
1695
|
else if (!dropTargetPaneInfo || !parentRect) {
|
|
1627
1696
|
return;
|
|
1628
1697
|
}
|
|
1629
|
-
const draggedPaneSize = (_a = this.getPaneToDock(this.dockManager.draggedPane).size) !== null && _a !== void 0 ? _a : IGC_DEFAULT_PANE_SIZE;
|
|
1630
1698
|
const isOuter = Utils.isDockingIndicatorOuter(dockingPosition);
|
|
1631
1699
|
const baseRect = isOuter ? parentRect : dropTargetPaneInfo.targetRect;
|
|
1632
1700
|
if (dockingPosition === locale.IgcDockingIndicatorPosition.center) {
|
|
@@ -1640,6 +1708,17 @@ class IgcDockManagerService {
|
|
|
1640
1708
|
const targetParent = this.getParent(targetPane);
|
|
1641
1709
|
const panes = this.getSplitPaneVisibleChildren(targetParent);
|
|
1642
1710
|
const draggedPaneIndex = panes.indexOf(this.dockManager.draggedPane);
|
|
1711
|
+
// reset dragged pane size for preview
|
|
1712
|
+
let draggedPaneSize = this.getPaneToDock(this.dockManager.draggedPane).size;
|
|
1713
|
+
if (((_a = this.draggedPaneParent) === null || _a === void 0 ? void 0 : _a.useFixedSize) === true && targetParent.useFixedSize !== true) {
|
|
1714
|
+
draggedPaneSize = IGC_DEFAULT_PANE_SIZE_IN_PIXELS;
|
|
1715
|
+
}
|
|
1716
|
+
if (targetParent.useFixedSize === true && ((_b = this.draggedPaneParent) === null || _b === void 0 ? void 0 : _b.orientation) !== targetParent.orientation) {
|
|
1717
|
+
const floatingPane = this.dockManager.draggedPane;
|
|
1718
|
+
const floatingPaneSizeInPixels = targetParent.orientation === locale.IgcSplitPaneOrientation.horizontal ? floatingPane === null || floatingPane === void 0 ? void 0 : floatingPane.floatingWidth : floatingPane === null || floatingPane === void 0 ? void 0 : floatingPane.floatingHeight;
|
|
1719
|
+
draggedPaneSize = floatingPaneSizeInPixels;
|
|
1720
|
+
}
|
|
1721
|
+
draggedPaneSize = draggedPaneSize >= 0 ? draggedPaneSize : IGC_DEFAULT_PANE_SIZE;
|
|
1643
1722
|
if (draggedPaneIndex > -1) {
|
|
1644
1723
|
panes.splice(draggedPaneIndex, 1);
|
|
1645
1724
|
}
|
|
@@ -1648,13 +1727,22 @@ class IgcDockManagerService {
|
|
|
1648
1727
|
const isSplitPaneVertical = Utils.isSplitPaneVertical(targetParent);
|
|
1649
1728
|
const isSameSplitPane = ((isIndicatorVertical && isSplitPaneVertical) || (!isIndicatorVertical && !isSplitPaneVertical));
|
|
1650
1729
|
const isRTL = dockingDirection === 'rtl';
|
|
1651
|
-
const panesTotalSize = panes.reduce((a, b) => a + (b.size
|
|
1730
|
+
const panesTotalSize = panes.reduce((a, b) => a + (b.size >= 0 ? b.size : IGC_DEFAULT_PANE_SIZE), 0);
|
|
1652
1731
|
const beforePanesTotalSize = !isRTL || isIndicatorVertical
|
|
1653
|
-
? panes.slice(0, dropTargetIndex).reduce((a, b) => a + (b.size
|
|
1654
|
-
: panes.slice(dropTargetIndex, panes.length).reduce((a, b) => a + (b.size
|
|
1732
|
+
? panes.slice(0, dropTargetIndex).reduce((a, b) => a + (b.size >= 0 ? b.size : IGC_DEFAULT_PANE_SIZE), 0)
|
|
1733
|
+
: panes.slice(dropTargetIndex, panes.length).reduce((a, b) => a + (b.size >= 0 ? b.size : IGC_DEFAULT_PANE_SIZE), 0);
|
|
1655
1734
|
const afterPanesTotalSize = !isRTL || isIndicatorVertical
|
|
1656
|
-
? panes.slice(0, dropTargetIndex + 1).reduce((a, b) => a + (b.size
|
|
1657
|
-
: panes.slice(dropTargetIndex + 1, panes.length).reduce((a, b) => a + (b.size
|
|
1735
|
+
? panes.slice(0, dropTargetIndex + 1).reduce((a, b) => a + (b.size >= 0 ? b.size : IGC_DEFAULT_PANE_SIZE), 0)
|
|
1736
|
+
: panes.slice(dropTargetIndex + 1, panes.length).reduce((a, b) => a + (b.size >= 0 ? b.size : IGC_DEFAULT_PANE_SIZE), 0);
|
|
1737
|
+
// update parent rect for preview when useFixedSize=true
|
|
1738
|
+
if (targetParent.useFixedSize) {
|
|
1739
|
+
const rectWithPlaceholder = parentRect;
|
|
1740
|
+
parentRect = new DOMRect();
|
|
1741
|
+
parentRect.x = rectWithPlaceholder.x;
|
|
1742
|
+
parentRect.y = rectWithPlaceholder.y;
|
|
1743
|
+
parentRect.width = isSplitPaneVertical ? rectWithPlaceholder.width : panesTotalSize + draggedPaneSize;
|
|
1744
|
+
parentRect.height = isSplitPaneVertical ? panesTotalSize + draggedPaneSize : rectWithPlaceholder.height;
|
|
1745
|
+
}
|
|
1658
1746
|
switch (dockingPosition) {
|
|
1659
1747
|
case locale.IgcDockingIndicatorPosition.left:
|
|
1660
1748
|
case locale.IgcDockingIndicatorPosition.outerLeft:
|
|
@@ -1716,16 +1804,16 @@ class IgcDockManagerService {
|
|
|
1716
1804
|
return shadowRect;
|
|
1717
1805
|
}
|
|
1718
1806
|
getDropShadowRectRoot() {
|
|
1719
|
-
var _a;
|
|
1720
1807
|
const rootRect = this.dropTargetParentRect;
|
|
1721
1808
|
const shadowRect = new DOMRect();
|
|
1722
|
-
|
|
1809
|
+
let draggedPaneSize = this.getPaneToDock(this.dockManager.draggedPane).size;
|
|
1810
|
+
draggedPaneSize = draggedPaneSize >= 0 ? draggedPaneSize : IGC_DEFAULT_PANE_SIZE;
|
|
1723
1811
|
const panes = this.getSplitPaneVisibleChildren(this.dockManager.layout.rootPane);
|
|
1724
1812
|
const draggedPaneIndex = panes.indexOf(this.dockManager.draggedPane);
|
|
1725
1813
|
if (draggedPaneIndex > -1) {
|
|
1726
1814
|
panes.splice(draggedPaneIndex, 1);
|
|
1727
1815
|
}
|
|
1728
|
-
const panesTotalSize = panes.reduce((a, b) => a + (b.size
|
|
1816
|
+
const panesTotalSize = panes.reduce((a, b) => a + (b.size >= 0 ? b.size : IGC_DEFAULT_PANE_SIZE), 0);
|
|
1729
1817
|
const isIndicatorVertical = Utils.isDockingIndicatorVertical(this.dockingIndicator.position);
|
|
1730
1818
|
const isSplitPaneVertical = Utils.isSplitPaneVertical(this.dockManager.layout.rootPane);
|
|
1731
1819
|
const isSameSplitPane = (isIndicatorVertical && isSplitPaneVertical) || (!isIndicatorVertical && !isSplitPaneVertical);
|
|
@@ -1811,6 +1899,36 @@ class IgcDockManagerService {
|
|
|
1811
1899
|
this.normalizeMaximizedPane(nextPane);
|
|
1812
1900
|
this.dockManager.activePane = nextPane;
|
|
1813
1901
|
}
|
|
1902
|
+
isSplitPaneIgnoringResizeConstraints(pane) {
|
|
1903
|
+
return pane && pane.type === locale.IgcDockManagerPaneType.splitPane && pane.useFixedSize;
|
|
1904
|
+
}
|
|
1905
|
+
isParentUseFixedSize(pane) {
|
|
1906
|
+
const parent = this.getParent(pane);
|
|
1907
|
+
return this.isSplitPaneIgnoringResizeConstraints(parent);
|
|
1908
|
+
}
|
|
1909
|
+
checkAndAddPlaceholderPane(pane) {
|
|
1910
|
+
//Add placeholder pane in every splitPane that ignores resize constraints
|
|
1911
|
+
if (this.isSplitPaneIgnoringResizeConstraints(pane)) {
|
|
1912
|
+
// this.anyPaneIgnoringResizeConstraints = true;
|
|
1913
|
+
const placeholderPane = {
|
|
1914
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
1915
|
+
contentId: "placeholder",
|
|
1916
|
+
header: 'Placeholder',
|
|
1917
|
+
allowDocking: false,
|
|
1918
|
+
allowFloating: false,
|
|
1919
|
+
allowMaximize: false,
|
|
1920
|
+
allowPinning: false,
|
|
1921
|
+
size: 0
|
|
1922
|
+
};
|
|
1923
|
+
pane.panes.push(placeholderPane);
|
|
1924
|
+
}
|
|
1925
|
+
if (pane.type !== locale.IgcDockManagerPaneType.contentPane && pane.type !== locale.IgcDockManagerPaneType.documentHost && pane.panes) {
|
|
1926
|
+
pane.panes.forEach(p => this.checkAndAddPlaceholderPane(p));
|
|
1927
|
+
}
|
|
1928
|
+
else if (pane.type === locale.IgcDockManagerPaneType.documentHost) {
|
|
1929
|
+
this.checkAndAddPlaceholderPane(pane.rootPane);
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1814
1932
|
}
|
|
1815
1933
|
|
|
1816
1934
|
/**
|
|
@@ -1966,7 +2084,7 @@ class IgcDockManagerKeyboardService {
|
|
|
1966
2084
|
}
|
|
1967
2085
|
}
|
|
1968
2086
|
|
|
1969
|
-
const dockmanagerComponentCss = ":host{position:relative;z-index:0;display:flex;overflow:hidden;box-sizing:border-box;height:100%;background:var(--igc-dock-background, var(--igc-background-color, #E5E7E9));color:var(--igc-dock-text, var(--igc-text-color, rgba(0, 0, 0, 0.72)));font-family:var(--igc-font-family, \"Titillium Web\", \"Roboto\", \"Helvetica Neue\", sans-serif);outline-style:none;--unpinned-tab-area-size:30px}:host igc-icon-component svg{width:17px;height:17px}.pane-container--vertical,.pane-container--horizontal,.pane-container{display:flex;flex-grow:1;height:100%;width:100
|
|
2087
|
+
const dockmanagerComponentCss = ":host{position:relative;z-index:0;display:flex;overflow:hidden;box-sizing:border-box;height:100%;background:var(--igc-dock-background, var(--igc-background-color, #E5E7E9));color:var(--igc-dock-text, var(--igc-text-color, rgba(0, 0, 0, 0.72)));font-family:var(--igc-font-family, \"Titillium Web\", \"Roboto\", \"Helvetica Neue\", sans-serif);outline-style:none;--unpinned-tab-area-size:30px}:host igc-icon-component svg{width:17px;height:17px}.pane-container--vertical,.pane-container--horizontal,.pane-container{display:flex;flex-grow:1;max-height:100vh;max-width:100vw;height:100%;width:100%}.pane-container--horizontal{overflow-x:auto}.pane-container--vertical{flex-direction:column;overflow-y:auto}.unpinned-tab-area{display:flex;flex-direction:column;width:var(--unpinned-tab-area-size);height:auto}.unpinned-tab-area--left{padding:8px 8px 8px 0}.unpinned-tab-area--right{padding:8px 0 8px 8px}.unpinned-tab-area--bottom{padding-top:8px}.unpinned-tab-area--horizontal{flex-direction:row;width:auto;height:var(--unpinned-tab-area-size)}.unpinned-tab-area--hidden{display:none}.flyout-pane{display:flex;flex-direction:column;position:absolute;width:100%;height:100%;pointer-events:none;z-index:2}.flyout-pane igc-content-pane-component{box-shadow:0 12px 8px var(--igc-flyout-shadow-color, rgba(0, 0, 0, 0.08))}.flyout-pane--right{flex-direction:row-reverse}.flyout-pane--right igc-content-pane-component{box-shadow:-12px 0px 8px var(--igc-flyout-shadow-color, rgba(0, 0, 0, 0.08))}.flyout-pane--bottom{flex-direction:column-reverse}.flyout-pane--bottom igc-content-pane-component{box-shadow:0 -12px 8px var(--igc-flyout-shadow-color, rgba(0, 0, 0, 0.08))}.flyout-pane--left{flex-direction:row}.flyout-pane--left igc-content-pane-component{box-shadow:12px 0px 8px var(--igc-flyout-shadow-color, rgba(0, 0, 0, 0.08))}.floating-panes{position:fixed;top:0;left:0;bottom:0;right:0;pointer-events:none;z-index:10000}.docking-indicators-container{position:absolute;display:flex;flex-direction:column;width:100%;height:100%;pointer-events:none;z-index:10004}.content{overflow:auto;height:100%;flex-grow:1;color:var(--igc-pane-content-text, var(--igc-text-color, rgba(0, 0, 0, 0.72)));background:var(--igc-pane-content-background, var(--igc-border-color, #F3F5F7));position:relative}.maximized{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10002}.drop-shadow{background-color:var(--igc-drop-shadow-background, rgba(100, 149, 237, 0.2));position:fixed;z-index:10003;display:block;pointer-events:none}.hidden{height:0;opacity:0;padding:0;pointer-events:none;min-height:0 !important;transition:opacity 0.5s ease;position:absolute}.transitioned{overflow:hidden;transition:opacity 0.5s ease;position:absolute;z-index:999;width:100%}::-webkit-scrollbar{height:var(--igc-sb-size, 12px);width:var(--igc-sb-size, 12px)}::-webkit-scrollbar-track{background:var(--igc-sb-track-bg-color, #e5e7e9)}::-webkit-scrollbar-track:hover,::-webkit-scrollbar-track:active{background:var(--igc-sb-track-bg-color-hover, #e5e7e9)}::-webkit-scrollbar-corner{background:var(--igc-sb-corner-bg, #e5e7e9);border:var(--igc-sb-corner-border-size, 0) solid var(--igc-sb-corner-border-color, transparent)}::-webkit-scrollbar-track-piece{border:var(--igc-sb-track-border-size, 0) solid var(--igc-sb-track-border-color, transparent)}::-webkit-scrollbar-button:vertical:start:decrement,::-webkit-scrollbar-button:vertical:end:increment,::-webkit-scrollbar-button:horizontal:start:decrement,::-webkit-scrollbar-button:horizontal:end:increment{display:none}::-webkit-scrollbar-thumb{min-height:var(--igc-sb-thumb-min-height, 32px);border-radius:var(--igc-sb-thumb-border-radius, 0);border:var(--igc-sb-thumb-border-size, 0) solid var(--igc-sb-thumb-border-color, transparent);background-clip:content-box;background-color:var(--igc-sb-thumb-bg-color, #d1d1d1)}::-webkit-scrollbar-thumb:hover{background-color:var(--igc-sb-thumb-bg-color-hover, #afafaf)}";
|
|
1970
2088
|
|
|
1971
2089
|
var ActionReason;
|
|
1972
2090
|
(function (ActionReason) {
|
|
@@ -2009,6 +2127,7 @@ const IgcDockManager = class {
|
|
|
2009
2127
|
this.resizeObserver = new ResizeObserver(this.restrictFloatingPaneSize.bind(this));
|
|
2010
2128
|
this.proximityDockThreshold = 50;
|
|
2011
2129
|
this.proximityOuterDockThreshold = 25;
|
|
2130
|
+
this.anyPaneIgnoringResizeConstraints = false;
|
|
2012
2131
|
this.templatableComponents = [
|
|
2013
2132
|
{
|
|
2014
2133
|
slot: 'paneHeaderCloseButton',
|
|
@@ -2202,7 +2321,7 @@ const IgcDockManager = class {
|
|
|
2202
2321
|
const panes = this.draggedPane.type === locale.IgcDockManagerPaneType.contentPane ?
|
|
2203
2322
|
[this.draggedPane] :
|
|
2204
2323
|
this.service.getChildContentPanes(this.draggedPane);
|
|
2205
|
-
this.showDockingIndicators = panes.every(p => p.allowDocking !== false);
|
|
2324
|
+
this.showDockingIndicators = panes.every(p => p.allowDocking !== false) && !this.anyPaneIgnoringResizeConstraints;
|
|
2206
2325
|
this.documentOnlyDrag = panes.some(p => p.documentOnly);
|
|
2207
2326
|
}
|
|
2208
2327
|
else {
|
|
@@ -2330,6 +2449,7 @@ const IgcDockManager = class {
|
|
|
2330
2449
|
this.contextMenuMeta = null;
|
|
2331
2450
|
this.navigationPaneMeta = null;
|
|
2332
2451
|
if (this.layout) {
|
|
2452
|
+
this.updateLayout();
|
|
2333
2453
|
this.layoutChanged();
|
|
2334
2454
|
}
|
|
2335
2455
|
if (!this.resourceStrings) {
|
|
@@ -2373,6 +2493,17 @@ const IgcDockManager = class {
|
|
|
2373
2493
|
focusElement() {
|
|
2374
2494
|
this.element.focus();
|
|
2375
2495
|
}
|
|
2496
|
+
updateLayout() {
|
|
2497
|
+
//Check for useFixedSize in the layout and create a placeholder pane for resizing.
|
|
2498
|
+
this.service.checkAndAddPlaceholderPane(this.layout.rootPane);
|
|
2499
|
+
for (const p of this.layout.floatingPanes) {
|
|
2500
|
+
// Do not add a placeholder pane for floating pane's root splitPane
|
|
2501
|
+
p.panes.forEach(cp => this.service.checkAndAddPlaceholderPane(cp));
|
|
2502
|
+
// Should we add a resolved prop instead of setting useFixedSize to false?
|
|
2503
|
+
// Used to prevent the root parent splitPane of having flex grow and shrink set to 0 which breaks floating pane resizing.
|
|
2504
|
+
p.useFixedSize = false;
|
|
2505
|
+
}
|
|
2506
|
+
}
|
|
2376
2507
|
handleTabsRendered(pane) {
|
|
2377
2508
|
var _a;
|
|
2378
2509
|
if (this.reason !== ActionReason.drop) {
|
|
@@ -2577,7 +2708,11 @@ const IgcDockManager = class {
|
|
|
2577
2708
|
pane.unpinnedSize = minSize;
|
|
2578
2709
|
}
|
|
2579
2710
|
// If new pane size does not meet the size constraints, do not resize
|
|
2580
|
-
let
|
|
2711
|
+
let parent = this.service.getParent(pane);
|
|
2712
|
+
let offset = this.service.isSplitPaneIgnoringResizeConstraints(parent) ||
|
|
2713
|
+
this.isPaneSizeWithinConstraints(previousPane, event.detail, orientation, 'previous') ?
|
|
2714
|
+
this.splitterOffset * event.detail :
|
|
2715
|
+
0;
|
|
2581
2716
|
this.service.resizeFlyoutPane(offset);
|
|
2582
2717
|
let rect;
|
|
2583
2718
|
rect = splitter.previousElementSibling.getBoundingClientRect();
|
|
@@ -2613,7 +2748,9 @@ const IgcDockManager = class {
|
|
|
2613
2748
|
const sizeProperty = parentPane.orientation === locale.IgcSplitPaneOrientation.horizontal ? 'offsetWidth' : 'offsetHeight';
|
|
2614
2749
|
const sizeSum = paneComponents.reduce((s, p) => p[sizeProperty] + s, 0);
|
|
2615
2750
|
// If the new size is smaller or bigger that the size constraints, do not resize
|
|
2616
|
-
const offset =
|
|
2751
|
+
const offset = parentPane.useFixedSize ||
|
|
2752
|
+
this.isPaneSizeWithinConstraints(previousPane, event.detail, parentPane.orientation, 'previous') &&
|
|
2753
|
+
this.isPaneSizeWithinConstraints(nextPane, event.detail, parentPane.orientation) ? event.detail : 0;
|
|
2617
2754
|
let offsetPercentage = this.splitterOffset * offset / sizeSum;
|
|
2618
2755
|
let rtl = false;
|
|
2619
2756
|
if (this.element.dir !== '') {
|
|
@@ -2701,7 +2838,7 @@ const IgcDockManager = class {
|
|
|
2701
2838
|
}
|
|
2702
2839
|
this.shouldClearActivePane = false;
|
|
2703
2840
|
this.focusElement();
|
|
2704
|
-
const dragStarted = this.service.dragPaneStart(pane, rect, event.detail.clientX, event.detail.clientY);
|
|
2841
|
+
const dragStarted = this.service.dragPaneStart(pane, rect, event.detail.clientX, event.detail.clientY, this.anyPaneIgnoringResizeConstraints);
|
|
2705
2842
|
this.isDragging = true;
|
|
2706
2843
|
this.scheduleAfterRender(() => {
|
|
2707
2844
|
this.shouldClearActivePane = true;
|
|
@@ -2741,6 +2878,22 @@ const IgcDockManager = class {
|
|
|
2741
2878
|
if (event && !dragMoved) {
|
|
2742
2879
|
event.detail.cancel = true;
|
|
2743
2880
|
}
|
|
2881
|
+
// After successfull pane drag, check if there is a splitPane with useFixedSize = true
|
|
2882
|
+
// that is left with a single placeholder pane and remove it.
|
|
2883
|
+
// This would happen only when the last non placeholder pane of a split pane gets dragged.
|
|
2884
|
+
if (dragMoved) {
|
|
2885
|
+
const elements = this.element.shadowRoot.elementsFromPoint(clientX, clientY);
|
|
2886
|
+
const splitPanes = elements.filter(e => e.tagName.toLowerCase() === 'igc-split-pane-component');
|
|
2887
|
+
for (const sp of splitPanes) {
|
|
2888
|
+
const splitPane = this.panesElementMap.getByValue(sp);
|
|
2889
|
+
if (splitPane.useFixedSize &&
|
|
2890
|
+
splitPane.panes.length === 1 &&
|
|
2891
|
+
splitPane.panes[0].type === locale.IgcDockManagerPaneType.contentPane &&
|
|
2892
|
+
splitPane.panes[0].contentId === "placeholder") {
|
|
2893
|
+
this.service.closePane(splitPane.panes[0]);
|
|
2894
|
+
}
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2744
2897
|
}
|
|
2745
2898
|
getInnerDropTargetParentRect() {
|
|
2746
2899
|
if (this.dropTargetPaneInfo && this.service.proximityDockPosition) {
|
|
@@ -2909,7 +3062,7 @@ const IgcDockManager = class {
|
|
|
2909
3062
|
tabsRect
|
|
2910
3063
|
};
|
|
2911
3064
|
this.handleDropPositionChange(event.detail.clientX, event.detail.clientY, event === null || event === void 0 ? void 0 : event.target);
|
|
2912
|
-
const tabMoved = this.service.dragTabMove(pane, event.detail, tabRectsInfo);
|
|
3065
|
+
const tabMoved = this.service.dragTabMove(pane, event.detail, tabRectsInfo, this.anyPaneIgnoringResizeConstraints);
|
|
2913
3066
|
if (event && !tabMoved) {
|
|
2914
3067
|
event.detail.cancel = true;
|
|
2915
3068
|
}
|
|
@@ -2938,6 +3091,9 @@ const IgcDockManager = class {
|
|
|
2938
3091
|
}
|
|
2939
3092
|
handleDropPositionChange(clientX, clientY, target) {
|
|
2940
3093
|
var _a;
|
|
3094
|
+
if (this.highlightedJoystick) {
|
|
3095
|
+
this.highlightedJoystick.style.boxShadow = '';
|
|
3096
|
+
}
|
|
2941
3097
|
const elements = clientX && clientY ?
|
|
2942
3098
|
this.element.shadowRoot.elementsFromPoint(clientX, clientY) :
|
|
2943
3099
|
null;
|
|
@@ -2974,13 +3130,17 @@ const IgcDockManager = class {
|
|
|
2974
3130
|
let indicatorTarget = null;
|
|
2975
3131
|
let dockingIndicatorElement = topElement.closest('igc-root-docking-indicator-component');
|
|
2976
3132
|
if (dockingIndicatorElement) {
|
|
3133
|
+
// root docking indicator
|
|
2977
3134
|
this.service.dockingIndicator = {
|
|
2978
3135
|
position: dockingIndicatorElement.position,
|
|
2979
3136
|
isRoot: true,
|
|
2980
|
-
direction: this.direction
|
|
3137
|
+
direction: this.direction,
|
|
2981
3138
|
};
|
|
3139
|
+
this.highlightedJoystick = dockingIndicatorElement;
|
|
3140
|
+
this.highlightedJoystick.style.boxShadow = 'inset 0 0 0 3px rgba(0,0,0,0.2), inset 0 0 0 25px rgba(100,149,237,0.2)';
|
|
2982
3141
|
}
|
|
2983
|
-
|
|
3142
|
+
else {
|
|
3143
|
+
// regular docking indicator
|
|
2984
3144
|
const joystickIcon = topElement.closest('igc-joystick-icon-component');
|
|
2985
3145
|
if (joystickIcon && !joystickIcon.empty) {
|
|
2986
3146
|
dockingIndicatorElement = joystickIcon;
|
|
@@ -2991,6 +3151,8 @@ const IgcDockManager = class {
|
|
|
2991
3151
|
};
|
|
2992
3152
|
const joystickIndicator = joystickIcon.closest('igc-joystick-indicator-component');
|
|
2993
3153
|
indicatorTarget = joystickIndicator.dropTargetPaneInfo;
|
|
3154
|
+
this.highlightedJoystick = joystickIcon;
|
|
3155
|
+
this.highlightedJoystick.style.boxShadow = 'inset 0 0 0 3px rgba(0,0,0,0.2), inset 0 0 0 25px rgba(100,149,237,0.2)';
|
|
2994
3156
|
}
|
|
2995
3157
|
}
|
|
2996
3158
|
if (dockingIndicatorElement &&
|
|
@@ -3272,7 +3434,7 @@ const IgcDockManager = class {
|
|
|
3272
3434
|
const maximized = this.maximizedPane === pane ||
|
|
3273
3435
|
(parentPane.type === locale.IgcDockManagerPaneType.tabGroupPane && this.maximizedPane === parentPane) ||
|
|
3274
3436
|
isFloating && isSingleFloatingContentPane && floatingPane === this.maximizedPane;
|
|
3275
|
-
return (index.h("igc-content-pane-component", { key: pane.id, contentId: pane.contentId, size: pane.size, isFlyout: isFlyout, unpinnedSize: pane.unpinnedSize, disabled: pane.disabled, isSingleFloating: isSingleFloatingContentPane, onMouseMove: this.togglePaneHeaderVisibility.bind(this, pane), onMouseLeave: this.removeHoveredPane.bind(this), ref: el => {
|
|
3437
|
+
return (index.h("igc-content-pane-component", { key: pane.id, contentId: pane.contentId, size: pane.size, isFlyout: isFlyout, unpinnedSize: pane.unpinnedSize, disabled: pane.disabled, isSingleFloating: isSingleFloatingContentPane, onMouseMove: this.togglePaneHeaderVisibility.bind(this, pane), onMouseLeave: this.removeHoveredPane.bind(this), parentUseFixedSize: this.service.isParentUseFixedSize(pane), ref: el => {
|
|
3276
3438
|
if (el) {
|
|
3277
3439
|
this.panesElementMap.set(pane, el);
|
|
3278
3440
|
this.contentPanesElementMap.set(pane, el);
|
|
@@ -3287,10 +3449,10 @@ const IgcDockManager = class {
|
|
|
3287
3449
|
pane.header), index.h("div", { class: "content", onMouseDown: this.handlePaneContentMouseDown.bind(this, pane), onScroll: this.handlePaneContentScroll.bind(this, pane) }, index.h("slot", { name: pane.contentId }))));
|
|
3288
3450
|
}
|
|
3289
3451
|
renderSplitter(parentPane, pane) {
|
|
3290
|
-
return (index.h("igc-splitter-component", { splitPaneOrientation: parentPane.orientation, onResizeStart: this.handleSplitterResizeStart.bind(this, pane), onResizeEnd: this.handleSplitterResizeEnd.bind(this, parentPane, pane), onFocusin: this.clearActivePane.bind(this) }));
|
|
3452
|
+
return (index.h("igc-splitter-component", { splitPaneOrientation: parentPane.orientation, onResizeStart: this.handleSplitterResizeStart.bind(this, pane), onResizeEnd: this.handleSplitterResizeEnd.bind(this, parentPane, pane), onFocusin: this.clearActivePane.bind(this), parentUseFixedSize: parentPane.useFixedSize }));
|
|
3291
3453
|
}
|
|
3292
3454
|
renderDocumentHost(docHost) {
|
|
3293
|
-
return (index.h("igc-document-host-component", { key: docHost.id, size: docHost.size, ref: el => {
|
|
3455
|
+
return (index.h("igc-document-host-component", { key: docHost.id, size: docHost.size, parentUseFixedSize: this.service.isParentUseFixedSize(docHost), ref: el => {
|
|
3294
3456
|
if (el) {
|
|
3295
3457
|
this.panesElementMap.set(docHost, el);
|
|
3296
3458
|
}
|
|
@@ -3314,7 +3476,7 @@ const IgcDockManager = class {
|
|
|
3314
3476
|
else {
|
|
3315
3477
|
contentIds.push(pane.contentId);
|
|
3316
3478
|
}
|
|
3317
|
-
return (allowEmpty || tabs.length > 0) && (index.h("igc-tabs-component", { key: pane.id, contentIds: contentIds, size: pane.size, selectedIndex: selectedIndex, hasHeaders: !isSingleTab, maximized: this.maximizedPane === pane, allowMaximize: position === IgcTabHeadersPosition.top && allowMaximize, onMaximizeMinimizeFocus: this.clearActivePane.bind(this), onMaximize: this.handleMaximize.bind(this, pane), onSelectedIndexChanged: this.handleTabSelectedIndexChanged.bind(this, pane), onHiddenTabSelected: this.handleHiddenTabSelected.bind(this, pane), onSelectedTabOutOfView: this.handleSelectedTabOutOfView.bind(this, pane), onRendered: this.handleTabsRendered.bind(this, pane), tabHeadersPosition: position, resourceStrings: this.resourceStrings, ref: el => {
|
|
3479
|
+
return (allowEmpty || tabs.length > 0) && (index.h("igc-tabs-component", { key: pane.id, contentIds: contentIds, size: pane.size, selectedIndex: selectedIndex, hasHeaders: !isSingleTab, parentUseFixedSize: this.service.isParentUseFixedSize(pane), maximized: this.maximizedPane === pane, allowMaximize: position === IgcTabHeadersPosition.top && allowMaximize, onMaximizeMinimizeFocus: this.clearActivePane.bind(this), onMaximize: this.handleMaximize.bind(this, pane), onSelectedIndexChanged: this.handleTabSelectedIndexChanged.bind(this, pane), onHiddenTabSelected: this.handleHiddenTabSelected.bind(this, pane), onSelectedTabOutOfView: this.handleSelectedTabOutOfView.bind(this, pane), onRendered: this.handleTabsRendered.bind(this, pane), tabHeadersPosition: position, resourceStrings: this.resourceStrings, ref: el => {
|
|
3318
3480
|
if (el) {
|
|
3319
3481
|
this.panesElementMap.set(pane, el);
|
|
3320
3482
|
}
|
|
@@ -3357,7 +3519,7 @@ const IgcDockManager = class {
|
|
|
3357
3519
|
}
|
|
3358
3520
|
renderSplitPane(splitPane, isFloating, isInDocumentHost) {
|
|
3359
3521
|
const panes = this.service.getSplitPaneVisibleChildren(splitPane);
|
|
3360
|
-
return (splitPane.allowEmpty || panes.length > 0) && (index.h("igc-split-pane-component", { key: splitPane.id, orientation: splitPane.orientation, size: splitPane.size, onRendered: this.handleSplitPaneRendered.bind(this, panes), ref: el => {
|
|
3522
|
+
return (splitPane.allowEmpty || panes.length > 0) && (index.h("igc-split-pane-component", { key: splitPane.id, orientation: splitPane.orientation, size: splitPane.size, useFixedSize: splitPane.useFixedSize, parentUseFixedSize: this.service.isParentUseFixedSize(splitPane), onRendered: this.handleSplitPaneRendered.bind(this, panes), ref: el => {
|
|
3361
3523
|
if (el) {
|
|
3362
3524
|
this.panesElementMap.set(splitPane, el);
|
|
3363
3525
|
}
|
|
@@ -3367,9 +3529,11 @@ const IgcDockManager = class {
|
|
|
3367
3529
|
paneComponent = this.renderSplitPane(p, isFloating, isInDocumentHost);
|
|
3368
3530
|
}
|
|
3369
3531
|
else if (p.type === locale.IgcDockManagerPaneType.contentPane) {
|
|
3370
|
-
paneComponent =
|
|
3371
|
-
this.
|
|
3372
|
-
|
|
3532
|
+
paneComponent = p.contentId === "placeholder" ?
|
|
3533
|
+
this.renderPlaceholder(p) :
|
|
3534
|
+
isInDocumentHost ?
|
|
3535
|
+
this.renderTabGroup(p, isFloating, true) :
|
|
3536
|
+
this.renderContentPane(p, isFloating, false);
|
|
3373
3537
|
}
|
|
3374
3538
|
else if (p.type === locale.IgcDockManagerPaneType.documentHost) {
|
|
3375
3539
|
paneComponent = this.renderDocumentHost(p);
|
|
@@ -3382,6 +3546,9 @@ const IgcDockManager = class {
|
|
|
3382
3546
|
paneComponent;
|
|
3383
3547
|
})));
|
|
3384
3548
|
}
|
|
3549
|
+
renderPlaceholder(pane) {
|
|
3550
|
+
return (index.h("igc-content-pane-component", { key: pane.id, contentId: pane.contentId, size: pane.size }));
|
|
3551
|
+
}
|
|
3385
3552
|
renderUnpinnedTabArea(location) {
|
|
3386
3553
|
const panes = [];
|
|
3387
3554
|
const isHorizontal = location === locale.IgcUnpinnedLocation.top || location === locale.IgcUnpinnedLocation.bottom;
|
|
@@ -3453,6 +3620,10 @@ const IgcDockManager = class {
|
|
|
3453
3620
|
renderDockingIndicators() {
|
|
3454
3621
|
const startPosition = this.direction !== 'rtl' ? locale.IgcDockingIndicatorPosition.left : locale.IgcDockingIndicatorPosition.right;
|
|
3455
3622
|
const endPosition = this.direction !== 'rtl' ? locale.IgcDockingIndicatorPosition.right : locale.IgcDockingIndicatorPosition.left;
|
|
3623
|
+
// Only show the joystick indicator if the target drop location is an empty split pane
|
|
3624
|
+
const hideJoystickIndicator = this.dropTargetPaneInfo &&
|
|
3625
|
+
this.dropTargetPaneInfo.pane.type == "splitPane" &&
|
|
3626
|
+
this.service.getSplitPaneVisibleChildren(this.dropTargetPaneInfo.pane).length;
|
|
3456
3627
|
return (index.h("div", { class: "docking-indicators-container", style: {
|
|
3457
3628
|
display: this.showDockingIndicators ? 'flex' : 'none'
|
|
3458
3629
|
} }, !this.documentOnlyDrag && !this.proximityDock && this.renderRootDockingIndicator(locale.IgcDockingIndicatorPosition.top), index.h("div", { style: {
|
|
@@ -3460,7 +3631,7 @@ const IgcDockManager = class {
|
|
|
3460
3631
|
display: 'flex',
|
|
3461
3632
|
flexDirection: 'row',
|
|
3462
3633
|
justifyContent: 'space-between'
|
|
3463
|
-
} }, !this.documentOnlyDrag && !this.proximityDock && this.renderRootDockingIndicator(startPosition), !this.documentOnlyDrag && !this.proximityDock && this.renderRootDockingIndicator(endPosition)), !this.documentOnlyDrag && !this.proximityDock && this.renderRootDockingIndicator(locale.IgcDockingIndicatorPosition.bottom), this.dropTargetPaneInfo && !this.proximityDock &&
|
|
3634
|
+
} }, !this.documentOnlyDrag && !this.proximityDock && this.renderRootDockingIndicator(startPosition), !this.documentOnlyDrag && !this.proximityDock && this.renderRootDockingIndicator(endPosition)), !this.documentOnlyDrag && !this.proximityDock && this.renderRootDockingIndicator(locale.IgcDockingIndicatorPosition.bottom), this.dropTargetPaneInfo && !this.proximityDock && !hideJoystickIndicator &&
|
|
3464
3635
|
index.h("igc-joystick-indicator-component", { dropTargetPaneInfo: this.dropTargetPaneInfo, documentOnlyDrag: this.documentOnlyDrag, allowCenterDock: this.allowInnerDock })));
|
|
3465
3636
|
}
|
|
3466
3637
|
renderContextMenu() {
|
|
@@ -3517,11 +3688,12 @@ const IgcDocumentHostComponent = class {
|
|
|
3517
3688
|
constructor(hostRef) {
|
|
3518
3689
|
index.registerInstance(this, hostRef);
|
|
3519
3690
|
this.size = undefined;
|
|
3691
|
+
this.parentUseFixedSize = false;
|
|
3520
3692
|
}
|
|
3521
3693
|
render() {
|
|
3522
3694
|
const size = this.size || this.size === 0 ? this.size : IGC_DEFAULT_PANE_SIZE;
|
|
3523
3695
|
return (index.h(index.Host, { role: "group", style: {
|
|
3524
|
-
flex: `${size} 1 ${size}px`
|
|
3696
|
+
flex: this.parentUseFixedSize ? `0 0 ${size}px` : `${size} 1 ${size}px`
|
|
3525
3697
|
} }));
|
|
3526
3698
|
}
|
|
3527
3699
|
};
|
|
@@ -4323,6 +4495,8 @@ const IgcSplitPaneComponent = class {
|
|
|
4323
4495
|
this.rendered = index.createEvent(this, "rendered", 7);
|
|
4324
4496
|
this.orientation = undefined;
|
|
4325
4497
|
this.size = undefined;
|
|
4498
|
+
this.useFixedSize = false;
|
|
4499
|
+
this.parentUseFixedSize = false;
|
|
4326
4500
|
}
|
|
4327
4501
|
componentDidRender() {
|
|
4328
4502
|
this.rendered.emit();
|
|
@@ -4331,7 +4505,7 @@ const IgcSplitPaneComponent = class {
|
|
|
4331
4505
|
const size = this.size || this.size === 0 ? this.size : IGC_DEFAULT_PANE_SIZE;
|
|
4332
4506
|
return (index.h(index.Host, { role: "group", style: {
|
|
4333
4507
|
flexDirection: this.orientation === locale.IgcSplitPaneOrientation.horizontal ? 'row' : 'column',
|
|
4334
|
-
flex: `${size} 1 ${size}px`
|
|
4508
|
+
flex: this.parentUseFixedSize ? `0 0 ${size}px` : `${size} 1 ${size}px`
|
|
4335
4509
|
}, part: "split-pane" }));
|
|
4336
4510
|
}
|
|
4337
4511
|
};
|
|
@@ -4383,6 +4557,7 @@ const IgcSplitterComponent = class {
|
|
|
4383
4557
|
this.showDragGhost = undefined;
|
|
4384
4558
|
this.splitPaneOrientation = undefined;
|
|
4385
4559
|
this.flyoutLocation = undefined;
|
|
4560
|
+
this.parentUseFixedSize = false;
|
|
4386
4561
|
}
|
|
4387
4562
|
connectedCallback() {
|
|
4388
4563
|
this.dragService = new IgcDragService(this.element);
|
|
@@ -4508,14 +4683,16 @@ const IgcSplitterComponent = class {
|
|
|
4508
4683
|
}
|
|
4509
4684
|
}
|
|
4510
4685
|
else {
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
if (referencePaneSize
|
|
4514
|
-
this.dragOffset
|
|
4686
|
+
if (!this.parentUseFixedSize) {
|
|
4687
|
+
const referencePaneSize = !rtl || isVertical ? this.paneSizes[1] : this.paneSizes[0];
|
|
4688
|
+
if (referencePaneSize > IGC_RESIZING_MIN_SIZE) {
|
|
4689
|
+
if (referencePaneSize - this.dragOffset < IGC_RESIZING_MIN_SIZE) {
|
|
4690
|
+
this.dragOffset = referencePaneSize - IGC_RESIZING_MIN_SIZE;
|
|
4691
|
+
}
|
|
4692
|
+
}
|
|
4693
|
+
else {
|
|
4694
|
+
this.dragOffset = 0;
|
|
4515
4695
|
}
|
|
4516
|
-
}
|
|
4517
|
-
else {
|
|
4518
|
-
this.dragOffset = 0;
|
|
4519
4696
|
}
|
|
4520
4697
|
}
|
|
4521
4698
|
}
|
|
@@ -4797,6 +4974,7 @@ const IgcTabsComponent = class {
|
|
|
4797
4974
|
this.showHiddenTabsMenu = true;
|
|
4798
4975
|
this.resourceStrings = undefined;
|
|
4799
4976
|
this.contentIds = [];
|
|
4977
|
+
this.parentUseFixedSize = false;
|
|
4800
4978
|
}
|
|
4801
4979
|
selectedIndexPropertyChanged(newValue) {
|
|
4802
4980
|
this.handleSelectedIndexChanged(newValue);
|
|
@@ -4996,7 +5174,7 @@ const IgcTabsComponent = class {
|
|
|
4996
5174
|
bottom
|
|
4997
5175
|
}, ',');
|
|
4998
5176
|
return (index.h(index.Host, { role: "tablist", style: {
|
|
4999
|
-
flex: `${size} 1 ${size}px`
|
|
5177
|
+
flex: this.parentUseFixedSize ? `0 0 ${size}px` : `${size} 1 ${size}px`
|
|
5000
5178
|
}, exportparts: exportParts, part: parts }, top && this.renderTabHeaders(top), index.h("div", { part: tabsContentParts, class: "content" }, index.h("slot", { onSlotchange: this.slotChanged.bind(this) })), bottom && this.renderTabHeaders(top), this.renderHiddenTabsMenu()));
|
|
5001
5179
|
}
|
|
5002
5180
|
get el() { return index.getElement(this); }
|
|
@@ -5035,7 +5213,7 @@ const IgcUnpinnedPaneHeaderComponent = class {
|
|
|
5035
5213
|
};
|
|
5036
5214
|
IgcUnpinnedPaneHeaderComponent.style = unpinnedPaneHeaderComponentCss;
|
|
5037
5215
|
|
|
5038
|
-
const sampleComponentCss = ".sc-sample-component-h{display:flex;flex-direction:column;height:100%}";
|
|
5216
|
+
const sampleComponentCss = ".sc-sample-component-h{display:flex;flex-direction:column;height:100%}igc-dockmanager.sc-sample-component{margin:10px;border:1px solid black}";
|
|
5039
5217
|
|
|
5040
5218
|
/**
|
|
5041
5219
|
* @hidden
|
|
@@ -5360,128 +5538,656 @@ const SampleComponent = class {
|
|
|
5360
5538
|
};
|
|
5361
5539
|
this.layout3 = {
|
|
5362
5540
|
rootPane: {
|
|
5363
|
-
id: "root",
|
|
5364
5541
|
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5365
5542
|
orientation: locale.IgcSplitPaneOrientation.horizontal,
|
|
5543
|
+
useFixedSize: true,
|
|
5366
5544
|
panes: [
|
|
5545
|
+
// {
|
|
5546
|
+
// type: IgcDockManagerPaneType.splitPane,
|
|
5547
|
+
// useFixedSize: true,
|
|
5548
|
+
// orientation: IgcSplitPaneOrientation.vertical,
|
|
5549
|
+
// size: 300, // PIXELS
|
|
5550
|
+
// panes: [
|
|
5551
|
+
// {
|
|
5552
|
+
// type: IgcDockManagerPaneType.contentPane,
|
|
5553
|
+
// contentId: 'content1',
|
|
5554
|
+
// header: 'Content Pane 1',
|
|
5555
|
+
// size: 500 // PIXELS
|
|
5556
|
+
// },
|
|
5557
|
+
// {
|
|
5558
|
+
// type: IgcDockManagerPaneType.contentPane,
|
|
5559
|
+
// contentId: 'content2',
|
|
5560
|
+
// header: 'Content Pane 2',
|
|
5561
|
+
// size: 300 // PIXELS
|
|
5562
|
+
// }
|
|
5563
|
+
// ]
|
|
5564
|
+
// },
|
|
5367
5565
|
{
|
|
5368
5566
|
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5369
5567
|
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5370
|
-
size:
|
|
5371
|
-
allowEmpty: true,
|
|
5568
|
+
size: 450,
|
|
5372
5569
|
panes: [
|
|
5570
|
+
{
|
|
5571
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5572
|
+
orientation: locale.IgcSplitPaneOrientation.horizontal,
|
|
5573
|
+
useFixedSize: true,
|
|
5574
|
+
size: 300,
|
|
5575
|
+
panes: [
|
|
5576
|
+
{
|
|
5577
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5578
|
+
contentId: 'content4',
|
|
5579
|
+
header: 'Content Pane 4',
|
|
5580
|
+
size: 400 // PIXELS
|
|
5581
|
+
}
|
|
5582
|
+
]
|
|
5583
|
+
},
|
|
5584
|
+
{
|
|
5585
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5586
|
+
contentId: 'content7',
|
|
5587
|
+
header: 'Content Pane 7',
|
|
5588
|
+
size: 450 // PIXELS
|
|
5589
|
+
}
|
|
5590
|
+
]
|
|
5591
|
+
}
|
|
5592
|
+
]
|
|
5593
|
+
},
|
|
5594
|
+
floatingPanes: [
|
|
5595
|
+
// {
|
|
5596
|
+
// type: IgcDockManagerPaneType.splitPane,
|
|
5597
|
+
// orientation: IgcSplitPaneOrientation.vertical,
|
|
5598
|
+
// useFixedSize: true,
|
|
5599
|
+
// // size: 950, // PIXELS
|
|
5600
|
+
// floatingHeight: 950,
|
|
5601
|
+
// floatingWidth: 650,
|
|
5602
|
+
// floatingLocation: { x: 200, y: 50 },
|
|
5603
|
+
// panes: [
|
|
5604
|
+
// {
|
|
5605
|
+
// type: IgcDockManagerPaneType.splitPane,
|
|
5606
|
+
// orientation: IgcSplitPaneOrientation.horizontal,
|
|
5607
|
+
// useFixedSize: true,
|
|
5608
|
+
// size: 400, // PIXELS
|
|
5609
|
+
// panes: [
|
|
5610
|
+
// {
|
|
5611
|
+
// type: IgcDockManagerPaneType.contentPane,
|
|
5612
|
+
// contentId: 'content12',
|
|
5613
|
+
// header: 'Content Pane 12',
|
|
5614
|
+
// size: 400 // PIXELS
|
|
5615
|
+
// },
|
|
5616
|
+
// {
|
|
5617
|
+
// type: IgcDockManagerPaneType.contentPane,
|
|
5618
|
+
// contentId: 'content13',
|
|
5619
|
+
// header: 'Content Pane 13',
|
|
5620
|
+
// size: 200 // PIXELS
|
|
5621
|
+
// }
|
|
5622
|
+
// ]
|
|
5623
|
+
// },
|
|
5624
|
+
// {
|
|
5625
|
+
// type: IgcDockManagerPaneType.splitPane,
|
|
5626
|
+
// orientation: IgcSplitPaneOrientation.vertical,
|
|
5627
|
+
// useFixedSize: true,
|
|
5628
|
+
// size: 500, // PIXELS
|
|
5629
|
+
// panes: [
|
|
5630
|
+
// {
|
|
5631
|
+
// type: IgcDockManagerPaneType.contentPane,
|
|
5632
|
+
// contentId: 'content11',
|
|
5633
|
+
// header: 'Content Pane 11',
|
|
5634
|
+
// size: 300 // PIXELS
|
|
5635
|
+
// },
|
|
5636
|
+
// ]
|
|
5637
|
+
// }
|
|
5638
|
+
// ]
|
|
5639
|
+
// }
|
|
5640
|
+
]
|
|
5641
|
+
};
|
|
5642
|
+
this.commonProps = {
|
|
5643
|
+
allowClose: false,
|
|
5644
|
+
allowMaximize: false,
|
|
5645
|
+
allowPinning: false,
|
|
5646
|
+
};
|
|
5647
|
+
this.bodyWidth = document.body.getBoundingClientRect().width;
|
|
5648
|
+
this.layout4 = {
|
|
5649
|
+
rootPane: {
|
|
5650
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5651
|
+
orientation: locale.IgcSplitPaneOrientation.horizontal,
|
|
5652
|
+
panes: [
|
|
5653
|
+
{
|
|
5654
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5655
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5656
|
+
useFixedSize: true,
|
|
5657
|
+
size: this.bodyWidth,
|
|
5658
|
+
panes: [
|
|
5659
|
+
{
|
|
5660
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5661
|
+
contentId: 'content1',
|
|
5662
|
+
header: 'Content 1 Header',
|
|
5663
|
+
size: 60, // PIXELS
|
|
5664
|
+
},
|
|
5665
|
+
{
|
|
5666
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5667
|
+
orientation: locale.IgcSplitPaneOrientation.horizontal,
|
|
5668
|
+
size: 240 + 10,
|
|
5669
|
+
useFixedSize: true,
|
|
5670
|
+
panes: [
|
|
5671
|
+
{
|
|
5672
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5673
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5674
|
+
size: this.bodyWidth / 3,
|
|
5675
|
+
panes: [
|
|
5676
|
+
{
|
|
5677
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5678
|
+
contentId: 'content2',
|
|
5679
|
+
header: 'Content 2 Header',
|
|
5680
|
+
size: 240, // PIXELS
|
|
5681
|
+
},
|
|
5682
|
+
],
|
|
5683
|
+
},
|
|
5684
|
+
{
|
|
5685
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5686
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5687
|
+
size: (this.bodyWidth * 2) / 3,
|
|
5688
|
+
panes: [
|
|
5689
|
+
{
|
|
5690
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5691
|
+
contentId: 'content3',
|
|
5692
|
+
header: 'Content 3 Header',
|
|
5693
|
+
size: 240, // PIXELS
|
|
5694
|
+
},
|
|
5695
|
+
],
|
|
5696
|
+
},
|
|
5697
|
+
// {
|
|
5698
|
+
// type: IgcDockManagerPaneType.contentPane,
|
|
5699
|
+
// contentId: 'content_not_used_2',
|
|
5700
|
+
// header: 'NOT USED',
|
|
5701
|
+
// // size: 0,
|
|
5702
|
+
// ...this.commonProps,
|
|
5703
|
+
// },
|
|
5704
|
+
],
|
|
5705
|
+
},
|
|
5373
5706
|
{
|
|
5374
5707
|
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5375
|
-
|
|
5376
|
-
|
|
5708
|
+
contentId: 'content4',
|
|
5709
|
+
header: 'Content 4 Header',
|
|
5710
|
+
size: 290, // PIXELS
|
|
5711
|
+
},
|
|
5712
|
+
{
|
|
5713
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5714
|
+
orientation: locale.IgcSplitPaneOrientation.horizontal,
|
|
5715
|
+
size: 240 + 10,
|
|
5716
|
+
panes: [
|
|
5717
|
+
{
|
|
5718
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5719
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5720
|
+
size: this.bodyWidth / 3,
|
|
5721
|
+
panes: [
|
|
5722
|
+
{
|
|
5723
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5724
|
+
contentId: 'content5',
|
|
5725
|
+
header: 'Content 5 Header',
|
|
5726
|
+
size: 240, // PIXELS
|
|
5727
|
+
},
|
|
5728
|
+
],
|
|
5729
|
+
},
|
|
5730
|
+
{
|
|
5731
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5732
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5733
|
+
size: (this.bodyWidth * 2) / 3,
|
|
5734
|
+
panes: [
|
|
5735
|
+
{
|
|
5736
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5737
|
+
contentId: 'content6',
|
|
5738
|
+
header: 'Content 6 Header',
|
|
5739
|
+
size: 240, // PIXELS
|
|
5740
|
+
},
|
|
5741
|
+
],
|
|
5742
|
+
},
|
|
5743
|
+
// {
|
|
5744
|
+
// type: IgcDockManagerPaneType.contentPane,
|
|
5745
|
+
// contentId: 'content_not_used_3',
|
|
5746
|
+
// header: 'NOT USED',
|
|
5747
|
+
// ...this.commonProps,
|
|
5748
|
+
// },
|
|
5749
|
+
],
|
|
5750
|
+
},
|
|
5751
|
+
{
|
|
5752
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5753
|
+
orientation: locale.IgcSplitPaneOrientation.horizontal,
|
|
5754
|
+
size: 240 + 10,
|
|
5755
|
+
panes: [
|
|
5756
|
+
{
|
|
5757
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5758
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5759
|
+
size: this.bodyWidth / 2,
|
|
5760
|
+
panes: [
|
|
5761
|
+
{
|
|
5762
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5763
|
+
contentId: 'content7',
|
|
5764
|
+
header: 'Content 7 Header',
|
|
5765
|
+
size: 240, // PIXELS
|
|
5766
|
+
},
|
|
5767
|
+
],
|
|
5768
|
+
},
|
|
5769
|
+
{
|
|
5770
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5771
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5772
|
+
size: this.bodyWidth / 2,
|
|
5773
|
+
panes: [
|
|
5774
|
+
{
|
|
5775
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5776
|
+
contentId: 'content8',
|
|
5777
|
+
header: 'Content 8 Header',
|
|
5778
|
+
size: 240, // PIXELS
|
|
5779
|
+
},
|
|
5780
|
+
],
|
|
5781
|
+
},
|
|
5782
|
+
// {
|
|
5783
|
+
// type: IgcDockManagerPaneType.contentPane,
|
|
5784
|
+
// contentId: 'content_not_used_4',
|
|
5785
|
+
// header: 'NOT USED',
|
|
5786
|
+
// ...this.commonProps,
|
|
5787
|
+
// },
|
|
5788
|
+
],
|
|
5377
5789
|
},
|
|
5378
5790
|
{
|
|
5379
5791
|
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5380
|
-
|
|
5381
|
-
|
|
5792
|
+
contentId: 'content9',
|
|
5793
|
+
header: 'Content 9 Header',
|
|
5794
|
+
size: 290, // PIXELS
|
|
5382
5795
|
},
|
|
5796
|
+
// {
|
|
5797
|
+
// type: IgcDockManagerPaneType.contentPane,
|
|
5798
|
+
// contentId: 'content_not_used_1',
|
|
5799
|
+
// header: 'NOT USED',
|
|
5800
|
+
// ...this.commonProps,
|
|
5801
|
+
// },
|
|
5802
|
+
],
|
|
5803
|
+
},
|
|
5804
|
+
],
|
|
5805
|
+
},
|
|
5806
|
+
floatingPanes: [],
|
|
5807
|
+
};
|
|
5808
|
+
this.layout5 = {
|
|
5809
|
+
rootPane: {
|
|
5810
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5811
|
+
orientation: locale.IgcSplitPaneOrientation.horizontal,
|
|
5812
|
+
panes: [
|
|
5813
|
+
{
|
|
5814
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5815
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5816
|
+
useFixedSize: true,
|
|
5817
|
+
size: this.bodyWidth,
|
|
5818
|
+
panes: [
|
|
5383
5819
|
{
|
|
5384
5820
|
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5385
|
-
|
|
5386
|
-
|
|
5821
|
+
contentId: 'content1',
|
|
5822
|
+
header: 'Content 1 Header',
|
|
5823
|
+
size: 60, // PIXELS
|
|
5824
|
+
},
|
|
5825
|
+
{
|
|
5826
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5827
|
+
orientation: locale.IgcSplitPaneOrientation.horizontal,
|
|
5828
|
+
size: 240 + 10,
|
|
5829
|
+
useFixedSize: true,
|
|
5830
|
+
panes: [
|
|
5831
|
+
{
|
|
5832
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5833
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5834
|
+
size: this.bodyWidth / 3,
|
|
5835
|
+
panes: [
|
|
5836
|
+
{
|
|
5837
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5838
|
+
contentId: 'content2',
|
|
5839
|
+
header: 'Content 2 Header',
|
|
5840
|
+
size: 240, // PIXELS
|
|
5841
|
+
},
|
|
5842
|
+
],
|
|
5843
|
+
},
|
|
5844
|
+
{
|
|
5845
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5846
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5847
|
+
size: (this.bodyWidth * 2) / 3,
|
|
5848
|
+
panes: [
|
|
5849
|
+
{
|
|
5850
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5851
|
+
contentId: 'content3',
|
|
5852
|
+
header: 'Content 3 Header',
|
|
5853
|
+
size: 240, // PIXELS
|
|
5854
|
+
},
|
|
5855
|
+
],
|
|
5856
|
+
},
|
|
5857
|
+
Object.assign({ type: locale.IgcDockManagerPaneType.contentPane, contentId: 'content_not_used_2', header: 'NOT USED' }, this.commonProps),
|
|
5858
|
+
],
|
|
5859
|
+
},
|
|
5860
|
+
{
|
|
5861
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5862
|
+
contentId: 'content4',
|
|
5863
|
+
header: 'Content 4 Header',
|
|
5864
|
+
size: 290, // PIXELS
|
|
5865
|
+
},
|
|
5866
|
+
{
|
|
5867
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5868
|
+
orientation: locale.IgcSplitPaneOrientation.horizontal,
|
|
5869
|
+
size: 240 + 10,
|
|
5870
|
+
panes: [
|
|
5871
|
+
{
|
|
5872
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5873
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5874
|
+
size: this.bodyWidth / 3,
|
|
5875
|
+
panes: [
|
|
5876
|
+
{
|
|
5877
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5878
|
+
contentId: 'content5',
|
|
5879
|
+
header: 'Content 5 Header',
|
|
5880
|
+
size: 240, // PIXELS
|
|
5881
|
+
},
|
|
5882
|
+
],
|
|
5883
|
+
},
|
|
5884
|
+
{
|
|
5885
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5886
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5887
|
+
size: (this.bodyWidth * 2) / 3,
|
|
5888
|
+
panes: [
|
|
5889
|
+
{
|
|
5890
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5891
|
+
contentId: 'content6',
|
|
5892
|
+
header: 'Content 6 Header',
|
|
5893
|
+
size: 240, // PIXELS
|
|
5894
|
+
},
|
|
5895
|
+
],
|
|
5896
|
+
},
|
|
5897
|
+
Object.assign({ type: locale.IgcDockManagerPaneType.contentPane, contentId: 'content_not_used_3', header: 'NOT USED' }, this.commonProps),
|
|
5898
|
+
],
|
|
5899
|
+
},
|
|
5900
|
+
{
|
|
5901
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5902
|
+
orientation: locale.IgcSplitPaneOrientation.horizontal,
|
|
5903
|
+
size: 240 + 10,
|
|
5904
|
+
panes: [
|
|
5905
|
+
{
|
|
5906
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5907
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5908
|
+
size: this.bodyWidth / 2,
|
|
5909
|
+
panes: [
|
|
5910
|
+
{
|
|
5911
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5912
|
+
contentId: 'content7',
|
|
5913
|
+
header: 'Content 7 Header',
|
|
5914
|
+
size: 240, // PIXELS
|
|
5915
|
+
},
|
|
5916
|
+
],
|
|
5917
|
+
},
|
|
5918
|
+
{
|
|
5919
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5920
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5921
|
+
size: this.bodyWidth / 2,
|
|
5922
|
+
panes: [
|
|
5923
|
+
{
|
|
5924
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5925
|
+
contentId: 'content8',
|
|
5926
|
+
header: 'Content 8 Header',
|
|
5927
|
+
size: 240, // PIXELS
|
|
5928
|
+
},
|
|
5929
|
+
],
|
|
5930
|
+
},
|
|
5931
|
+
Object.assign({ type: locale.IgcDockManagerPaneType.contentPane, contentId: 'content_not_used_4', header: 'NOT USED' }, this.commonProps),
|
|
5932
|
+
],
|
|
5933
|
+
},
|
|
5934
|
+
{
|
|
5935
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5936
|
+
contentId: 'content9',
|
|
5937
|
+
header: 'Content 9 Header',
|
|
5938
|
+
size: 290, // PIXELS
|
|
5939
|
+
},
|
|
5940
|
+
Object.assign({ type: locale.IgcDockManagerPaneType.contentPane, contentId: 'content_not_used_1', header: 'NOT USED' }, this.commonProps),
|
|
5941
|
+
],
|
|
5942
|
+
},
|
|
5943
|
+
],
|
|
5944
|
+
},
|
|
5945
|
+
floatingPanes: [],
|
|
5946
|
+
};
|
|
5947
|
+
this.layout6 = {
|
|
5948
|
+
rootPane: {
|
|
5949
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5950
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5951
|
+
// useFixedSize: true,
|
|
5952
|
+
panes: [
|
|
5953
|
+
{
|
|
5954
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5955
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
5956
|
+
useFixedSize: true,
|
|
5957
|
+
panes: [
|
|
5958
|
+
{
|
|
5959
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5960
|
+
contentId: "content1",
|
|
5961
|
+
header: "Content Pane 1",
|
|
5962
|
+
size: 100
|
|
5963
|
+
},
|
|
5964
|
+
{
|
|
5965
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5966
|
+
contentId: "content2",
|
|
5967
|
+
header: "Content Pane 2",
|
|
5968
|
+
size: 100
|
|
5969
|
+
},
|
|
5970
|
+
]
|
|
5971
|
+
},
|
|
5972
|
+
{
|
|
5973
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5974
|
+
orientation: locale.IgcSplitPaneOrientation.horizontal,
|
|
5975
|
+
useFixedSize: true,
|
|
5976
|
+
// size: 300,
|
|
5977
|
+
panes: [
|
|
5978
|
+
{
|
|
5979
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5980
|
+
contentId: "content3",
|
|
5981
|
+
header: "Content Pane 3",
|
|
5982
|
+
size: 400
|
|
5983
|
+
},
|
|
5984
|
+
{
|
|
5985
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
5986
|
+
contentId: "content4",
|
|
5987
|
+
header: "Content Pane 4",
|
|
5988
|
+
size: 400
|
|
5989
|
+
}
|
|
5990
|
+
]
|
|
5991
|
+
},
|
|
5992
|
+
{
|
|
5993
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
5994
|
+
orientation: locale.IgcSplitPaneOrientation.horizontal,
|
|
5995
|
+
// useFixedSize: true,
|
|
5996
|
+
// size: 300,
|
|
5997
|
+
panes: [
|
|
5998
|
+
{
|
|
5999
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
6000
|
+
contentId: "content5",
|
|
6001
|
+
header: "Content Pane 5",
|
|
6002
|
+
size: 500
|
|
6003
|
+
},
|
|
6004
|
+
{
|
|
6005
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
6006
|
+
contentId: "content6",
|
|
6007
|
+
header: "Content Pane 6",
|
|
6008
|
+
size: 800
|
|
5387
6009
|
}
|
|
5388
6010
|
]
|
|
5389
6011
|
}
|
|
5390
6012
|
]
|
|
5391
|
-
}
|
|
6013
|
+
},
|
|
6014
|
+
floatingPanes: [],
|
|
6015
|
+
};
|
|
6016
|
+
this.layout7 = {
|
|
6017
|
+
rootPane: {
|
|
6018
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
6019
|
+
orientation: locale.IgcSplitPaneOrientation.horizontal,
|
|
6020
|
+
// useFixedSize: true,
|
|
6021
|
+
panes: [
|
|
6022
|
+
{
|
|
6023
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
6024
|
+
orientation: locale.IgcSplitPaneOrientation.horizontal,
|
|
6025
|
+
useFixedSize: true,
|
|
6026
|
+
panes: [
|
|
6027
|
+
{
|
|
6028
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
6029
|
+
contentId: "content1",
|
|
6030
|
+
header: "Content Pane 1",
|
|
6031
|
+
size: 400
|
|
6032
|
+
},
|
|
6033
|
+
{
|
|
6034
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
6035
|
+
contentId: "content2",
|
|
6036
|
+
header: "Content Pane 2",
|
|
6037
|
+
size: 600
|
|
6038
|
+
},
|
|
6039
|
+
]
|
|
6040
|
+
},
|
|
6041
|
+
{
|
|
6042
|
+
type: locale.IgcDockManagerPaneType.tabGroupPane,
|
|
6043
|
+
panes: [
|
|
6044
|
+
{
|
|
6045
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
6046
|
+
contentId: "content3",
|
|
6047
|
+
header: "Content Pane 3"
|
|
6048
|
+
},
|
|
6049
|
+
{
|
|
6050
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
6051
|
+
contentId: "content4",
|
|
6052
|
+
header: "Content Pane 4"
|
|
6053
|
+
}
|
|
6054
|
+
]
|
|
6055
|
+
},
|
|
6056
|
+
]
|
|
6057
|
+
},
|
|
6058
|
+
floatingPanes: [{
|
|
6059
|
+
type: locale.IgcDockManagerPaneType.splitPane,
|
|
6060
|
+
orientation: locale.IgcSplitPaneOrientation.vertical,
|
|
6061
|
+
panes: [{
|
|
6062
|
+
type: locale.IgcDockManagerPaneType.contentPane,
|
|
6063
|
+
contentId: "content5",
|
|
6064
|
+
header: "Content Pane 5"
|
|
6065
|
+
}]
|
|
6066
|
+
}]
|
|
5392
6067
|
};
|
|
5393
|
-
this.layout = this.
|
|
6068
|
+
this.layout = this.layout7;
|
|
5394
6069
|
this.logEnabled = false;
|
|
5395
|
-
this.id = 100;
|
|
5396
|
-
this.foundElem = [];
|
|
5397
6070
|
this.hiddenPanes = [];
|
|
5398
6071
|
}
|
|
5399
|
-
|
|
6072
|
+
// private hideOnCloseCheckbox: HTMLInputElement;
|
|
6073
|
+
/*
|
|
6074
|
+
private hiddenPanesSelect: HTMLSelectElement;
|
|
6075
|
+
private savedLayout: string;
|
|
6076
|
+
|
|
6077
|
+
private saveLayout() {
|
|
5400
6078
|
this.savedLayout = JSON.stringify(this.dockManager.layout);
|
|
5401
6079
|
}
|
|
5402
|
-
|
|
6080
|
+
|
|
6081
|
+
private loadLayout() {
|
|
5403
6082
|
this.dockManager.layout = JSON.parse(this.savedLayout);
|
|
5404
6083
|
}
|
|
5405
|
-
|
|
6084
|
+
|
|
6085
|
+
private setActivePane() {
|
|
5406
6086
|
// this.dockManager.activePane = this.teamExplorerPane;
|
|
5407
6087
|
this.dockManager.activePane = this.unpinnedToolboxPane;
|
|
5408
6088
|
}
|
|
5409
|
-
|
|
6089
|
+
|
|
6090
|
+
private id = 100;
|
|
6091
|
+
private newId: string;
|
|
6092
|
+
|
|
6093
|
+
private addPane() {
|
|
5410
6094
|
this.newId = `content${this.id++}`;
|
|
5411
6095
|
const newDiv = this.createElement(this.newId, 'input');
|
|
5412
6096
|
this.dockManager.appendChild(newDiv);
|
|
6097
|
+
|
|
5413
6098
|
this.layout.floatingPanes[1].panes.push({
|
|
5414
|
-
type:
|
|
6099
|
+
type: IgcDockManagerPaneType.contentPane,
|
|
5415
6100
|
header: 'NewPane',
|
|
5416
6101
|
contentId: this.newId
|
|
5417
6102
|
});
|
|
5418
|
-
|
|
6103
|
+
|
|
6104
|
+
this.dockManager.layout = { ...this.layout };
|
|
5419
6105
|
}
|
|
5420
|
-
|
|
5421
|
-
|
|
6106
|
+
|
|
6107
|
+
private addTab() {
|
|
6108
|
+
this.findElement(this.layout.rootPane, IgcDockManagerPaneType.tabGroupPane);
|
|
6109
|
+
|
|
5422
6110
|
this.newId = `content${this.id++}`;
|
|
5423
6111
|
const newDiv = this.createElement(this.newId, 'button');
|
|
5424
6112
|
this.dockManager.appendChild(newDiv);
|
|
5425
|
-
|
|
6113
|
+
|
|
6114
|
+
const tabGroupPane = this.foundElem[0] as IgcTabGroupPane;
|
|
5426
6115
|
tabGroupPane.panes.push({
|
|
5427
|
-
type:
|
|
6116
|
+
type: IgcDockManagerPaneType.contentPane,
|
|
5428
6117
|
header: 'NewTab',
|
|
5429
6118
|
contentId: this.newId
|
|
5430
6119
|
});
|
|
5431
|
-
|
|
6120
|
+
|
|
6121
|
+
this.dockManager.layout = { ...this.layout };
|
|
5432
6122
|
}
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
6123
|
+
|
|
6124
|
+
private disableContentPane() {
|
|
6125
|
+
this.findElement(this.layout.rootPane, IgcDockManagerPaneType.tabGroupPane);
|
|
6126
|
+
|
|
6127
|
+
const tabGroupPane = this.foundElem[0] as IgcTabGroupPane;
|
|
5436
6128
|
tabGroupPane.panes[0].disabled = true;
|
|
5437
|
-
this.dockManager.layout =
|
|
6129
|
+
this.dockManager.layout = { ...this.layout };
|
|
5438
6130
|
}
|
|
5439
|
-
|
|
6131
|
+
|
|
6132
|
+
private toggleProximityDock() {
|
|
5440
6133
|
this.dockManager.proximityDock = !this.dockManager.proximityDock;
|
|
5441
6134
|
}
|
|
5442
|
-
|
|
6135
|
+
|
|
6136
|
+
private focusPane() {
|
|
5443
6137
|
this.dockManager.focusPane('content12');
|
|
5444
6138
|
}
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
}
|
|
6139
|
+
|
|
6140
|
+
private foundElem: IgcDockManagerPane[] = [];
|
|
6141
|
+
private findElement(pane: IgcDockManagerPane, type: IgcDockManagerPaneType) {
|
|
6142
|
+
if (!pane) { return; }
|
|
6143
|
+
|
|
5449
6144
|
if (pane.type === type) {
|
|
5450
6145
|
this.foundElem.push(pane);
|
|
5451
6146
|
}
|
|
5452
|
-
|
|
6147
|
+
|
|
6148
|
+
if (pane.type === IgcDockManagerPaneType.tabGroupPane || pane.type === IgcDockManagerPaneType.splitPane) {
|
|
5453
6149
|
for (const c of pane.panes) {
|
|
5454
6150
|
this.findElement(c, type);
|
|
5455
6151
|
}
|
|
5456
6152
|
}
|
|
5457
|
-
|
|
6153
|
+
|
|
6154
|
+
if (pane.type === IgcDockManagerPaneType.documentHost) {
|
|
5458
6155
|
this.findElement(pane.rootPane, type);
|
|
5459
6156
|
}
|
|
5460
6157
|
}
|
|
5461
|
-
|
|
6158
|
+
|
|
6159
|
+
private showPane() {
|
|
5462
6160
|
const index = this.hiddenPanesSelect.selectedIndex;
|
|
6161
|
+
|
|
5463
6162
|
if (index >= 0) {
|
|
5464
6163
|
this.hiddenPanes[index].hidden = false;
|
|
5465
6164
|
this.hiddenPanes.splice(index, 1);
|
|
5466
6165
|
this.hiddenPanes = [...this.hiddenPanes];
|
|
5467
|
-
this.dockManager.layout =
|
|
6166
|
+
this.dockManager.layout = { ...this.dockManager.layout };
|
|
5468
6167
|
}
|
|
5469
6168
|
}
|
|
5470
|
-
|
|
6169
|
+
|
|
6170
|
+
private showAllPanes() {
|
|
5471
6171
|
if (this.hiddenPanes.length > 0) {
|
|
5472
6172
|
for (const pane of this.hiddenPanes) {
|
|
5473
6173
|
pane.hidden = false;
|
|
5474
6174
|
}
|
|
5475
6175
|
this.hiddenPanes = [];
|
|
5476
|
-
this.dockManager.layout =
|
|
6176
|
+
this.dockManager.layout = { ...this.dockManager.layout };
|
|
5477
6177
|
}
|
|
5478
6178
|
}
|
|
5479
|
-
|
|
6179
|
+
|
|
6180
|
+
private toggleInBoundaries() {
|
|
5480
6181
|
this.dockManager.containedInBoundaries = !this.dockManager.containedInBoundaries;
|
|
5481
6182
|
}
|
|
5482
|
-
|
|
6183
|
+
|
|
6184
|
+
// private toggleUseFixedSize() {
|
|
6185
|
+
// this.dockManager.useFixedSize = !this.dockManager.useFixedSize;
|
|
6186
|
+
// }
|
|
6187
|
+
|
|
6188
|
+
private createElement(content: string, typeOfElement: string): HTMLElement {
|
|
5483
6189
|
const someContent = document.createTextNode(content);
|
|
5484
|
-
let elem;
|
|
6190
|
+
let elem: HTMLElement;
|
|
5485
6191
|
switch (typeOfElement) {
|
|
5486
6192
|
case ('button'):
|
|
5487
6193
|
elem = document.createElement('button');
|
|
@@ -5491,22 +6197,25 @@ const SampleComponent = class {
|
|
|
5491
6197
|
elem = document.createElement('input');
|
|
5492
6198
|
break;
|
|
5493
6199
|
}
|
|
6200
|
+
|
|
5494
6201
|
const divContent = document.createElement('div');
|
|
5495
6202
|
divContent.appendChild(elem ? elem : someContent);
|
|
5496
6203
|
divContent.setAttribute('slot', content);
|
|
5497
6204
|
divContent.setAttribute('style', 'width: 100%; height: 100%;');
|
|
6205
|
+
|
|
5498
6206
|
return divContent;
|
|
5499
6207
|
}
|
|
6208
|
+
*/
|
|
5500
6209
|
handlePaneClose(event) {
|
|
5501
6210
|
this.log(event);
|
|
5502
|
-
if (this.hideOnCloseCheckbox.checked) {
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
}
|
|
6211
|
+
// if (this.hideOnCloseCheckbox.checked) {
|
|
6212
|
+
// for (const pane of event.detail.panes) {
|
|
6213
|
+
// pane.hidden = true;
|
|
6214
|
+
// this.hiddenPanes.splice(0, 0, pane);
|
|
6215
|
+
// this.hiddenPanes = [...this.hiddenPanes];
|
|
6216
|
+
// }
|
|
6217
|
+
// event.preventDefault();
|
|
6218
|
+
// }
|
|
5510
6219
|
// const panes = event.detail.panes;
|
|
5511
6220
|
// const confirmed = confirm(`Are you sure you want to close panes '${panes.map(p => p.header).join(', ')}'?`);
|
|
5512
6221
|
// // event.detail.panes = [panes[0]];
|
|
@@ -5588,13 +6297,11 @@ const SampleComponent = class {
|
|
|
5588
6297
|
}
|
|
5589
6298
|
}
|
|
5590
6299
|
render() {
|
|
5591
|
-
return (index.h(index.Host, null, index.h("
|
|
5592
|
-
return (index.h("option", { value: p.id }, p.header));
|
|
5593
|
-
})), index.h("button", { onClick: () => this.showPane() }, "Show Pane"), index.h("button", { onClick: () => this.showAllPanes() }, "Show All Panes"), index.h("button", { onClick: () => this.toggleInBoundaries() }, "Toggle In Boundaries")), index.h("igc-dockmanager", { layout: this.layout, onPaneClose: this.handlePaneClose.bind(this), onPaneScroll: this.handlePaneScroll.bind(this), onPanePinnedToggle: this.handlePinnedToggle.bind(this), onActivePaneChanged: this.handleActivePaneChanged.bind(this), onPaneDragStart: this.handleDragStart.bind(this), onPaneDragOver: this.handleDragOver.bind(this), onPaneDragEnd: this.handleDragEnd.bind(this), onSplitterResizeStart: this.handleSplitterResizeStart.bind(this), onSplitterResizeEnd: this.handleSplitterResizeEnd.bind(this), onFloatingPaneResizeStart: this.handleFloatingPaneResizeStart.bind(this), onFloatingPaneResizeMove: this.handleFloatingPaneResizeMove.bind(this), onFloatingPaneResizeEnd: this.handleFloatingPaneResizeEnd.bind(this), onLayoutChange: this.handleLayoutChange.bind(this),
|
|
6300
|
+
return (index.h(index.Host, null, index.h("igc-dockmanager", { layout: this.layout, onPaneClose: this.handlePaneClose.bind(this), onPaneScroll: this.handlePaneScroll.bind(this), onPanePinnedToggle: this.handlePinnedToggle.bind(this), onActivePaneChanged: this.handleActivePaneChanged.bind(this), onPaneDragStart: this.handleDragStart.bind(this), onPaneDragOver: this.handleDragOver.bind(this), onPaneDragEnd: this.handleDragEnd.bind(this), onSplitterResizeStart: this.handleSplitterResizeStart.bind(this), onSplitterResizeEnd: this.handleSplitterResizeEnd.bind(this), onFloatingPaneResizeStart: this.handleFloatingPaneResizeStart.bind(this), onFloatingPaneResizeMove: this.handleFloatingPaneResizeMove.bind(this), onFloatingPaneResizeEnd: this.handleFloatingPaneResizeEnd.bind(this), onLayoutChange: this.handleLayoutChange.bind(this),
|
|
5594
6301
|
// resourceStrings={this.getCustomResourceStrings()}
|
|
5595
6302
|
ref: el => this.dockManager = el,
|
|
5596
6303
|
// allowFloatingPanesResize={false}
|
|
5597
|
-
showHeaderIconOnHover: 'closeOnly' }, index.h("div", { slot: "header1" }, index.h("span", { style: { color: 'red' } }, "Solution Explorer"), index.h("button", null, "H")), index.h("div", { slot: "tabHeader1" }, index.h("span", { style: { color: 'orange' } }, "Solution Explorer"), index.h("button", null, "T")), index.h("div", { slot: "unpinnedHeader1" }, index.h("span", { style: { color: 'blue' } }, "Solution Explorer"), index.h("button", null, "U")), index.h("
|
|
6304
|
+
showHeaderIconOnHover: 'closeOnly' }, index.h("div", { slot: "header1" }, index.h("span", { style: { color: 'red' } }, "Solution Explorer"), index.h("button", null, "H")), index.h("div", { slot: "tabHeader1" }, index.h("span", { style: { color: 'orange' } }, "Solution Explorer"), index.h("button", null, "T")), index.h("div", { slot: "unpinnedHeader1" }, index.h("span", { style: { color: 'blue' } }, "Solution Explorer"), index.h("button", null, "U")), index.h("div", { slot: "toolboxHeader" }, index.h("span", null, "[U] Toolbox")), index.h("div", { slot: "teamExplorerHeader" }, index.h("span", null, "[U] Team Explorer")), index.h("button", { style: { background: 'pink' }, slot: "tabHeaderCloseButton" }, "Y"), index.h("div", { slot: "content1" }, "Content 1"), index.h("div", { slot: "content2" }, "Content 2"), index.h("div", { slot: "content3" }, "Content 3"), index.h("div", { slot: "content4" }, "Content 4"), index.h("div", { slot: "content5" }, "Content 5"), index.h("div", { slot: "content6" }, "Content 6"), index.h("div", { slot: "content7" }, "Content 7"), index.h("div", { slot: "content8" }, "Content 8"), index.h("div", { slot: "content9" }, "Content 9"), index.h("div", { slot: "content_not_used_1" }), index.h("div", { slot: "content_not_used_2" }), index.h("div", { slot: "content_not_used_3" }), index.h("div", { slot: "content_not_used_4" }))));
|
|
5598
6305
|
}
|
|
5599
6306
|
};
|
|
5600
6307
|
SampleComponent.style = sampleComponentCss;
|