igniteui-dockmanager 1.18.0-beta.2 → 1.18.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 +27 -43
- package/dist/cjs/igc-button-component_22.cjs.entry.js +114 -125
- package/dist/cjs/igc-button-component_22.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/collection/components/dockmanager/dockmanager-component.js +71 -40
- package/dist/collection/components/dockmanager/dockmanager-component.js.map +1 -1
- package/dist/collection/components/dockmanager/dockmanager.service.js +7 -39
- package/dist/collection/components/dockmanager/dockmanager.service.js.map +1 -1
- package/dist/collection/components/dockmanager/panes/splitter-component.css +5 -9
- package/dist/collection/components/dockmanager/panes/splitter-component.js +34 -67
- package/dist/collection/components/dockmanager/panes/splitter-component.js.map +1 -1
- package/dist/collection/components/sample-component/sample-component.css +3 -3
- package/dist/collection/styles/igc.themes.css +6 -6
- package/dist/esm/igc-button-component_22.entry.js +114 -125
- package/dist/esm/igc-button-component_22.entry.js.map +1 -1
- package/dist/esm/igniteui-dockmanager.js +1 -1
- package/dist/esm/loader.js +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-74fc4de0.entry.js +2 -0
- package/dist/igniteui-dockmanager/p-74fc4de0.entry.js.map +1 -0
- package/dist/igniteui-dockmanager/styles/igc.themes.css +6 -6
- package/dist/types/components/dockmanager/dockmanager.service.d.ts +1 -2
- package/dist/types/components/dockmanager/panes/splitter-component.d.ts +4 -8
- package/dist/types/components.d.ts +0 -10
- package/loader/cdn.js +2 -2
- package/loader/index.cjs.js +2 -2
- package/package.json +1 -1
- package/dist/igniteui-dockmanager/p-bc8791fb.entry.js +0 -2
- package/dist/igniteui-dockmanager/p-bc8791fb.entry.js.map +0 -1
package/custom-elements.json
CHANGED
|
@@ -5654,35 +5654,10 @@
|
|
|
5654
5654
|
"default": "false"
|
|
5655
5655
|
},
|
|
5656
5656
|
{
|
|
5657
|
-
"name": "
|
|
5657
|
+
"name": "_isRoot",
|
|
5658
5658
|
"default": "false"
|
|
5659
5659
|
}
|
|
5660
5660
|
]
|
|
5661
|
-
},
|
|
5662
|
-
{
|
|
5663
|
-
"kind": "method",
|
|
5664
|
-
"name": "shiftPlaceholderStartToNewRoot",
|
|
5665
|
-
"privacy": "private",
|
|
5666
|
-
"parameters": [
|
|
5667
|
-
{
|
|
5668
|
-
"name": "oldRootPane",
|
|
5669
|
-
"type": {
|
|
5670
|
-
"text": "IgcSplitPane"
|
|
5671
|
-
}
|
|
5672
|
-
},
|
|
5673
|
-
{
|
|
5674
|
-
"name": "newRootPane",
|
|
5675
|
-
"type": {
|
|
5676
|
-
"text": "IgcSplitPane"
|
|
5677
|
-
}
|
|
5678
|
-
},
|
|
5679
|
-
{
|
|
5680
|
-
"name": "isDockingBefore",
|
|
5681
|
-
"type": {
|
|
5682
|
-
"text": "boolean"
|
|
5683
|
-
}
|
|
5684
|
-
}
|
|
5685
|
-
]
|
|
5686
5661
|
}
|
|
5687
5662
|
],
|
|
5688
5663
|
"events": []
|
|
@@ -9091,6 +9066,14 @@
|
|
|
9091
9066
|
},
|
|
9092
9067
|
"privacy": "private"
|
|
9093
9068
|
},
|
|
9069
|
+
{
|
|
9070
|
+
"kind": "field",
|
|
9071
|
+
"name": "splitterBaseElement",
|
|
9072
|
+
"type": {
|
|
9073
|
+
"text": "HTMLElement"
|
|
9074
|
+
},
|
|
9075
|
+
"privacy": "private"
|
|
9076
|
+
},
|
|
9094
9077
|
{
|
|
9095
9078
|
"kind": "field",
|
|
9096
9079
|
"name": "flyoutMaxSize",
|
|
@@ -9108,6 +9091,15 @@
|
|
|
9108
9091
|
"privacy": "private",
|
|
9109
9092
|
"default": "false"
|
|
9110
9093
|
},
|
|
9094
|
+
{
|
|
9095
|
+
"kind": "field",
|
|
9096
|
+
"name": "isRTL",
|
|
9097
|
+
"type": {
|
|
9098
|
+
"text": "boolean"
|
|
9099
|
+
},
|
|
9100
|
+
"privacy": "private",
|
|
9101
|
+
"readonly": true
|
|
9102
|
+
},
|
|
9111
9103
|
{
|
|
9112
9104
|
"kind": "field",
|
|
9113
9105
|
"name": "element",
|
|
@@ -9158,15 +9150,6 @@
|
|
|
9158
9150
|
},
|
|
9159
9151
|
"default": "false"
|
|
9160
9152
|
},
|
|
9161
|
-
{
|
|
9162
|
-
"kind": "field",
|
|
9163
|
-
"name": "resizable",
|
|
9164
|
-
"type": {
|
|
9165
|
-
"text": "boolean"
|
|
9166
|
-
},
|
|
9167
|
-
"default": "true",
|
|
9168
|
-
"description": "Determines whether the splitter can be used to resize adjacent panes."
|
|
9169
|
-
},
|
|
9170
9153
|
{
|
|
9171
9154
|
"kind": "field",
|
|
9172
9155
|
"name": "scrollSpeed",
|
|
@@ -9273,7 +9256,15 @@
|
|
|
9273
9256
|
},
|
|
9274
9257
|
{
|
|
9275
9258
|
"kind": "method",
|
|
9276
|
-
"name": "handleMouseDown"
|
|
9259
|
+
"name": "handleMouseDown",
|
|
9260
|
+
"parameters": [
|
|
9261
|
+
{
|
|
9262
|
+
"name": "event",
|
|
9263
|
+
"type": {
|
|
9264
|
+
"text": "MouseEvent"
|
|
9265
|
+
}
|
|
9266
|
+
}
|
|
9267
|
+
]
|
|
9277
9268
|
},
|
|
9278
9269
|
{
|
|
9279
9270
|
"kind": "field",
|
|
@@ -9390,13 +9381,6 @@
|
|
|
9390
9381
|
"text": "boolean"
|
|
9391
9382
|
}
|
|
9392
9383
|
},
|
|
9393
|
-
{
|
|
9394
|
-
"name": "resizable",
|
|
9395
|
-
"fieldName": "resizable",
|
|
9396
|
-
"type": {
|
|
9397
|
-
"text": "boolean"
|
|
9398
|
-
}
|
|
9399
|
-
},
|
|
9400
9384
|
{
|
|
9401
9385
|
"name": "scroll-speed",
|
|
9402
9386
|
"fieldName": "scrollSpeed",
|
|
@@ -966,17 +966,13 @@ class IgcDockManagerService {
|
|
|
966
966
|
}
|
|
967
967
|
// If the pane to close is the last non-placeholder pane of a split pane, close the whole split pane.
|
|
968
968
|
// Also check if the pane to close is inside a split pane and close the top split pane that holds the placeholder.
|
|
969
|
-
if (parent.type === locale.IgcDockManagerPaneType.splitPane) {
|
|
970
|
-
const hasPlaceholderStart = parent.panes.some(p => p.type === locale.IgcDockManagerPaneType.contentPane && p.contentId === "placeholderStart");
|
|
969
|
+
if (parent.type === locale.IgcDockManagerPaneType.splitPane && parent.panes.length === 2) {
|
|
971
970
|
const hasPlaceholderEnd = parent.panes.some(p => p.type === locale.IgcDockManagerPaneType.contentPane && p.contentId === "placeholderEnd");
|
|
972
|
-
const
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
if ((hasPlaceholderStart || hasPlaceholderEnd) && isValidContentPane) {
|
|
978
|
-
return parent;
|
|
979
|
-
}
|
|
971
|
+
const isValidContentPane = parent.panes.every(p => p.type === locale.IgcDockManagerPaneType.contentPane ||
|
|
972
|
+
p.type === locale.IgcDockManagerPaneType.tabGroupPane ||
|
|
973
|
+
(p.type === locale.IgcDockManagerPaneType.splitPane && p.panes.length === 1 && p.panes[0].type === locale.IgcDockManagerPaneType.contentPane));
|
|
974
|
+
if (hasPlaceholderEnd && isValidContentPane) {
|
|
975
|
+
return parent;
|
|
980
976
|
}
|
|
981
977
|
}
|
|
982
978
|
return this.checkUseFixedSizeParent(parent);
|
|
@@ -1298,9 +1294,6 @@ class IgcDockManagerService {
|
|
|
1298
1294
|
[paneToDock, rootPane] :
|
|
1299
1295
|
[rootPane, paneToDock],
|
|
1300
1296
|
};
|
|
1301
|
-
if (rootPane.useFixedSize) {
|
|
1302
|
-
this.shiftPlaceholderStartToNewRoot(rootPane, newRootPane, isDockingBefore);
|
|
1303
|
-
}
|
|
1304
1297
|
layout.rootPane = newRootPane;
|
|
1305
1298
|
}
|
|
1306
1299
|
if (!rootPane.useFixedSize) {
|
|
@@ -2084,24 +2077,10 @@ class IgcDockManagerService {
|
|
|
2084
2077
|
const parent = this.getParent(pane);
|
|
2085
2078
|
return this.isSplitPaneIgnoringResizeConstraints(parent);
|
|
2086
2079
|
}
|
|
2087
|
-
checkAndAddPlaceholderPane(pane, ignoreNestedPanes = false,
|
|
2080
|
+
checkAndAddPlaceholderPane(pane, ignoreNestedPanes = false, _isRoot = false) {
|
|
2088
2081
|
//Add placeholder pane in every splitPane that ignores resize constraints
|
|
2089
2082
|
if (this.isSplitPaneIgnoringResizeConstraints(pane)) {
|
|
2090
|
-
const firstPane = pane.panes[0];
|
|
2091
2083
|
const lastPane = pane.panes.at(-1);
|
|
2092
|
-
if (firstPane && isRoot && (firstPane.type !== locale.IgcDockManagerPaneType.contentPane || firstPane.header !== 'Placeholder')) {
|
|
2093
|
-
const placeholderPaneTop = {
|
|
2094
|
-
type: locale.IgcDockManagerPaneType.contentPane,
|
|
2095
|
-
contentId: "placeholderStart",
|
|
2096
|
-
header: 'Placeholder',
|
|
2097
|
-
allowDocking: false,
|
|
2098
|
-
allowFloating: false,
|
|
2099
|
-
allowMaximize: false,
|
|
2100
|
-
allowPinning: false,
|
|
2101
|
-
size: 0
|
|
2102
|
-
};
|
|
2103
|
-
pane.panes.unshift(placeholderPaneTop);
|
|
2104
|
-
}
|
|
2105
2084
|
if (lastPane && (lastPane.type !== locale.IgcDockManagerPaneType.contentPane || lastPane.header !== 'Placeholder')) {
|
|
2106
2085
|
const placeholderPaneBottom = {
|
|
2107
2086
|
type: locale.IgcDockManagerPaneType.contentPane,
|
|
@@ -2123,17 +2102,6 @@ class IgcDockManagerService {
|
|
|
2123
2102
|
this.checkAndAddPlaceholderPane(pane.rootPane);
|
|
2124
2103
|
}
|
|
2125
2104
|
}
|
|
2126
|
-
shiftPlaceholderStartToNewRoot(oldRootPane, newRootPane, isDockingBefore) {
|
|
2127
|
-
if (!oldRootPane || oldRootPane.type !== locale.IgcDockManagerPaneType.splitPane)
|
|
2128
|
-
return;
|
|
2129
|
-
const firstPane = oldRootPane.panes[0];
|
|
2130
|
-
const firstIsPlaceholder = (firstPane === null || firstPane === void 0 ? void 0 : firstPane.type) === locale.IgcDockManagerPaneType.contentPane
|
|
2131
|
-
&& firstPane.contentId.startsWith('placeholder');
|
|
2132
|
-
if (isDockingBefore && firstIsPlaceholder) {
|
|
2133
|
-
const [placeholder] = oldRootPane.panes.splice(0, 1);
|
|
2134
|
-
newRootPane.panes.splice(0, 0, placeholder);
|
|
2135
|
-
}
|
|
2136
|
-
}
|
|
2137
2105
|
}
|
|
2138
2106
|
|
|
2139
2107
|
/**
|
|
@@ -2639,6 +2607,13 @@ const IgcDockManager = class {
|
|
|
2639
2607
|
const splitPaneEl = pathHTMLElements.filter(p => p.tagName.toLowerCase() === "igc-split-pane-component")[0];
|
|
2640
2608
|
const splitPane = this.panesElementMap.getByValue(splitPaneEl);
|
|
2641
2609
|
this.splitPaneToResize = splitPane;
|
|
2610
|
+
if (this.flyoutPane) {
|
|
2611
|
+
const splitterEl = pathHTMLElements.find((p) => p.tagName.toLowerCase() === 'igc-splitter-component');
|
|
2612
|
+
const isFlyoutSplitter = (splitterEl === null || splitterEl === void 0 ? void 0 : splitterEl.flyoutLocation) !== undefined;
|
|
2613
|
+
if (!isFlyoutSplitter) {
|
|
2614
|
+
this.service.flyoutPane(this.flyoutPane);
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2642
2617
|
}
|
|
2643
2618
|
}
|
|
2644
2619
|
handlePointerUp() {
|
|
@@ -2673,9 +2648,25 @@ const IgcDockManager = class {
|
|
|
2673
2648
|
handlePointerMove(event) {
|
|
2674
2649
|
var _a;
|
|
2675
2650
|
this.lastPointerEvent = event;
|
|
2651
|
+
// check if resize is in progress
|
|
2676
2652
|
if (this.isSplitterResizing && ((_a = this.splitPaneToResize) === null || _a === void 0 ? void 0 : _a.useFixedSize)) {
|
|
2677
|
-
|
|
2678
|
-
|
|
2653
|
+
const rect = this.getDockedPanesContainerRect();
|
|
2654
|
+
// Check if the pointer is outside the bounds
|
|
2655
|
+
const isOutsideHorizontal = event.pageX < rect.left || event.pageX > rect.right;
|
|
2656
|
+
const isOutsideVertical = event.pageY < rect.top || event.pageY > rect.bottom;
|
|
2657
|
+
const splitPaneElement = this.panesElementMap.get(this.splitPaneToResize);
|
|
2658
|
+
const isScrollable = this.splitPaneToResize.orientation === locale.IgcSplitPaneOrientation.horizontal && (splitPaneElement === null || splitPaneElement === void 0 ? void 0 : splitPaneElement.scrollWidth) > (splitPaneElement === null || splitPaneElement === void 0 ? void 0 : splitPaneElement.clientWidth) ||
|
|
2659
|
+
this.splitPaneToResize.orientation === locale.IgcSplitPaneOrientation.vertical && (splitPaneElement === null || splitPaneElement === void 0 ? void 0 : splitPaneElement.scrollHeight) > (splitPaneElement === null || splitPaneElement === void 0 ? void 0 : splitPaneElement.clientHeight);
|
|
2660
|
+
if ((isOutsideHorizontal || isOutsideVertical) && isScrollable) {
|
|
2661
|
+
if (!this.rafId)
|
|
2662
|
+
this.startResizeLoop();
|
|
2663
|
+
}
|
|
2664
|
+
else {
|
|
2665
|
+
// Stop continuous loop
|
|
2666
|
+
if (this.rafId) {
|
|
2667
|
+
cancelAnimationFrame(this.rafId);
|
|
2668
|
+
this.rafId = null;
|
|
2669
|
+
}
|
|
2679
2670
|
}
|
|
2680
2671
|
}
|
|
2681
2672
|
}
|
|
@@ -2785,18 +2776,22 @@ const IgcDockManager = class {
|
|
|
2785
2776
|
return;
|
|
2786
2777
|
const panesSizeSum = ctx.sizeSum;
|
|
2787
2778
|
const rect = parentSplitPane.getBoundingClientRect();
|
|
2788
|
-
// Config
|
|
2789
2779
|
const maxDistance = 100; // px threshold for max autoscroll speed
|
|
2790
2780
|
const baseScrollSpeed = this.autoScrollConfig.scrollSpeed;
|
|
2791
2781
|
// Distances outside container bounds
|
|
2792
2782
|
const outBottom = this.lastPointerEvent.pageY - (rect.bottom);
|
|
2793
2783
|
const outTop = (rect.top) - this.lastPointerEvent.pageY;
|
|
2794
|
-
|
|
2795
|
-
|
|
2784
|
+
let outRight = this.lastPointerEvent.pageX - (rect.right);
|
|
2785
|
+
let outLeft = (rect.left) - this.lastPointerEvent.pageX;
|
|
2786
|
+
const isRTL = this.direction === 'rtl';
|
|
2796
2787
|
// Scale factor 0 → 1 based on distance outside
|
|
2797
2788
|
const scrollFactor = (dist) => Math.min(Math.max(dist, 0), maxDistance) / maxDistance;
|
|
2798
2789
|
const verticalSpeed = scrollFactor(Math.max(outBottom, outTop)) * baseScrollSpeed;
|
|
2799
2790
|
const horizontalSpeed = scrollFactor(Math.max(outRight, outLeft)) * baseScrollSpeed;
|
|
2791
|
+
if (isRTL) {
|
|
2792
|
+
outRight *= -1;
|
|
2793
|
+
outLeft *= -1;
|
|
2794
|
+
}
|
|
2800
2795
|
// Compute resize percentage based on total drag
|
|
2801
2796
|
let deltaPercentage = 0;
|
|
2802
2797
|
if (ctx.orientation === locale.IgcSplitPaneOrientation.vertical) {
|
|
@@ -2810,20 +2805,41 @@ const IgcDockManager = class {
|
|
|
2810
2805
|
}
|
|
2811
2806
|
}
|
|
2812
2807
|
else {
|
|
2813
|
-
|
|
2808
|
+
const scrollRight = () => {
|
|
2814
2809
|
deltaPercentage += outRight / panesSizeSum;
|
|
2815
2810
|
parentSplitPane.scrollLeft = Math.min(parentSplitPane.scrollWidth - parentSplitPane.clientWidth, parentSplitPane.scrollLeft + horizontalSpeed);
|
|
2816
|
-
}
|
|
2817
|
-
|
|
2811
|
+
};
|
|
2812
|
+
const scrollLeft = () => {
|
|
2818
2813
|
deltaPercentage -= outLeft / panesSizeSum;
|
|
2819
|
-
parentSplitPane.scrollLeft =
|
|
2814
|
+
parentSplitPane.scrollLeft = isRTL ?
|
|
2815
|
+
Math.max(parentSplitPane.scrollLeft - horizontalSpeed, -parentSplitPane.scrollWidth) :
|
|
2816
|
+
Math.max(0, parentSplitPane.scrollLeft - horizontalSpeed);
|
|
2817
|
+
};
|
|
2818
|
+
if (isRTL) {
|
|
2819
|
+
// - `outRight > 0` (pointer past "right" visual edge) means scroll should go "left" (decrease scrollLeft)
|
|
2820
|
+
// - `outLeft > 0` (pointer past "left" visual edge) means scroll should go "right" (increase scrollLeft)
|
|
2821
|
+
if (outRight > 0) {
|
|
2822
|
+
scrollLeft();
|
|
2823
|
+
}
|
|
2824
|
+
if (outLeft > 0) {
|
|
2825
|
+
scrollRight();
|
|
2826
|
+
}
|
|
2827
|
+
}
|
|
2828
|
+
else { // LTR
|
|
2829
|
+
// - `outRight > 0` (pointer past right edge) means scroll should go "right" (increase scrollLeft)
|
|
2830
|
+
// - `outLeft > 0` (pointer past left edge) means scroll should go "left" (decrease scrollLeft)
|
|
2831
|
+
if (outRight > 0) {
|
|
2832
|
+
scrollRight();
|
|
2833
|
+
}
|
|
2834
|
+
if (outLeft > 0) {
|
|
2835
|
+
scrollLeft();
|
|
2836
|
+
}
|
|
2820
2837
|
}
|
|
2821
2838
|
}
|
|
2822
|
-
if (deltaPercentage
|
|
2823
|
-
ctx.splitter.applyAutoDrag();
|
|
2839
|
+
if (deltaPercentage >= 0) {
|
|
2840
|
+
ctx.splitter.applyAutoDrag(isRTL);
|
|
2824
2841
|
return;
|
|
2825
2842
|
}
|
|
2826
|
-
// Accumulate resize delta (deferred until mouseup or live-applied)
|
|
2827
2843
|
ctx.accumulatedDelta = deltaPercentage;
|
|
2828
2844
|
}
|
|
2829
2845
|
handleTabsRendered(pane) {
|
|
@@ -3009,6 +3025,9 @@ const IgcDockManager = class {
|
|
|
3009
3025
|
size = pane.getBoundingClientRect().width;
|
|
3010
3026
|
minSize = parseFloat(getComputedStyle(pane).minWidth);
|
|
3011
3027
|
maxSize = parseFloat(getComputedStyle(pane).maxWidth);
|
|
3028
|
+
if (this.direction === 'rtl') {
|
|
3029
|
+
offset *= -1;
|
|
3030
|
+
}
|
|
3012
3031
|
}
|
|
3013
3032
|
else {
|
|
3014
3033
|
size = pane.getBoundingClientRect().height;
|
|
@@ -3036,6 +3055,9 @@ const IgcDockManager = class {
|
|
|
3036
3055
|
this.isPaneSizeWithinConstraints(previousPane, event.detail, orientation, 'previous') ?
|
|
3037
3056
|
this.splitterOffset * event.detail :
|
|
3038
3057
|
0;
|
|
3058
|
+
if (this.direction === 'rtl' && orientation === locale.IgcSplitPaneOrientation.horizontal) {
|
|
3059
|
+
offset *= -1;
|
|
3060
|
+
}
|
|
3039
3061
|
this.service.resizeFlyoutPane(offset);
|
|
3040
3062
|
let rect;
|
|
3041
3063
|
rect = splitter.previousElementSibling.getBoundingClientRect();
|
|
@@ -3047,12 +3069,6 @@ const IgcDockManager = class {
|
|
|
3047
3069
|
const splitter = event.target;
|
|
3048
3070
|
const splitterEl = splitter;
|
|
3049
3071
|
const prevEl = splitterEl.previousElementSibling;
|
|
3050
|
-
const prevPane = this.panesElementMap.getByValue(prevEl);
|
|
3051
|
-
if (prevPane && prevPane.contentId === "placeholderStart") {
|
|
3052
|
-
this.splitterOffset = 0;
|
|
3053
|
-
splitter.showDragGhost = false;
|
|
3054
|
-
return;
|
|
3055
|
-
}
|
|
3056
3072
|
const orientation = splitter.splitPaneOrientation;
|
|
3057
3073
|
let rect;
|
|
3058
3074
|
rect = pane === this.flyoutPane ? splitterEl.previousElementSibling.getBoundingClientRect() : splitterEl.nextElementSibling.getBoundingClientRect();
|
|
@@ -3095,6 +3111,7 @@ const IgcDockManager = class {
|
|
|
3095
3111
|
}
|
|
3096
3112
|
}
|
|
3097
3113
|
handleSplitterResizeEnd(parentPane, pane, event) {
|
|
3114
|
+
var _a;
|
|
3098
3115
|
const splitter = event.target;
|
|
3099
3116
|
const previousPane = splitter.previousElementSibling;
|
|
3100
3117
|
const nextPane = splitter.nextElementSibling;
|
|
@@ -3108,22 +3125,9 @@ const IgcDockManager = class {
|
|
|
3108
3125
|
const offset = parentPane.useFixedSize ||
|
|
3109
3126
|
this.isPaneSizeWithinConstraints(previousPane, event.detail, parentPane.orientation, 'previous') &&
|
|
3110
3127
|
this.isPaneSizeWithinConstraints(nextPane, event.detail, parentPane.orientation) ? event.detail : 0;
|
|
3111
|
-
|
|
3112
|
-
let
|
|
3113
|
-
if (this.
|
|
3114
|
-
rtl = this.element.dir === 'rtl';
|
|
3115
|
-
}
|
|
3116
|
-
else {
|
|
3117
|
-
let parent = this.element.parentElement;
|
|
3118
|
-
while (parent) {
|
|
3119
|
-
if (parent.dir !== '') {
|
|
3120
|
-
rtl = parent.dir === 'rtl';
|
|
3121
|
-
break;
|
|
3122
|
-
}
|
|
3123
|
-
parent = parent.parentElement;
|
|
3124
|
-
}
|
|
3125
|
-
}
|
|
3126
|
-
if (rtl && parentPane.orientation === locale.IgcSplitPaneOrientation.horizontal) {
|
|
3128
|
+
const accumulatedDelta = (_a = this.splitterResizingContext.accumulatedDelta) !== null && _a !== void 0 ? _a : 0;
|
|
3129
|
+
let offsetPercentage = (this.splitterOffset + accumulatedDelta) * offset / sizeSum;
|
|
3130
|
+
if (this.direction === 'rtl' && parentPane.orientation === locale.IgcSplitPaneOrientation.horizontal) {
|
|
3127
3131
|
offsetPercentage *= -1;
|
|
3128
3132
|
}
|
|
3129
3133
|
this.service.resizePane(pane, offsetPercentage);
|
|
@@ -4053,11 +4057,8 @@ const IgcDockManager = class {
|
|
|
4053
4057
|
}
|
|
4054
4058
|
renderSplitter(parentPane, pane) {
|
|
4055
4059
|
var _a;
|
|
4056
|
-
const index$1 = parentPane.panes.indexOf(pane);
|
|
4057
|
-
const prevPane = index$1 > 0 ? parentPane.panes[index$1 - 1] : null;
|
|
4058
|
-
const resizable = !(prevPane && prevPane.contentId === 'placeholderStart');
|
|
4059
4060
|
const scrollSpeed = (_a = this.autoScrollConfig) === null || _a === void 0 ? void 0 : _a.scrollSpeed;
|
|
4060
|
-
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,
|
|
4061
|
+
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, scrollSpeed: scrollSpeed }));
|
|
4061
4062
|
}
|
|
4062
4063
|
renderDocumentHost(docHost) {
|
|
4063
4064
|
return (index.h("igc-document-host-component", { key: docHost.id, size: docHost.size, parentUseFixedSize: this.service.isParentUseFixedSize(docHost), ref: el => {
|
|
@@ -4265,7 +4266,7 @@ const IgcDockManager = class {
|
|
|
4265
4266
|
display: 'flex',
|
|
4266
4267
|
flexDirection: 'row',
|
|
4267
4268
|
justifyContent: 'space-between'
|
|
4268
|
-
} }, this.renderEdgeDockingIndicator(locale.IgcDockingIndicatorPosition.leftMost), this.renderEdgeDockingIndicator(locale.IgcDockingIndicatorPosition.rightMost))), this.dropTargetPaneInfo && !this.proximityDock && !hideJoystickIndicator && ((_c = this.splitterDockingIndicator) === null || _c === void 0 ? void 0 : _c.style.visibility) !== 'visible' && !this.autoScrollInterval &&
|
|
4269
|
+
} }, this.renderEdgeDockingIndicator(this.direction !== 'rtl' ? locale.IgcDockingIndicatorPosition.leftMost : locale.IgcDockingIndicatorPosition.rightMost), this.renderEdgeDockingIndicator(this.direction !== 'rtl' ? locale.IgcDockingIndicatorPosition.rightMost : locale.IgcDockingIndicatorPosition.leftMost))), this.dropTargetPaneInfo && !this.proximityDock && !hideJoystickIndicator && ((_c = this.splitterDockingIndicator) === null || _c === void 0 ? void 0 : _c.style.visibility) !== 'visible' && !this.autoScrollInterval &&
|
|
4269
4270
|
index.h("igc-joystick-indicator-component", { dropTargetPaneInfo: this.dropTargetPaneInfo, documentOnlyDrag: this.documentOnlyDrag, allowCenterDock: this.allowInnerDock }), this.allowSplitterDock && !this.proximityDock &&
|
|
4270
4271
|
index.h("igc-splitter-docking-indicator-component", { style: {
|
|
4271
4272
|
position: 'fixed',
|
|
@@ -5189,7 +5190,7 @@ const IgcSplitPaneComponent = class {
|
|
|
5189
5190
|
};
|
|
5190
5191
|
IgcSplitPaneComponent.style = splitPaneComponentCss;
|
|
5191
5192
|
|
|
5192
|
-
const splitterComponentCss = ":host{position:relative;display:flex;flex:0 0 var(--igc-splitter-
|
|
5193
|
+
const splitterComponentCss = ":host{position:relative;display:flex;flex:0 0 var(--igc-splitter-thickness, 4px);box-sizing:border-box;pointer-events:all}.splitter{display:flex;justify-content:center;align-items:center;width:100%;height:100%;cursor:ew-resize;background:var(--igc-splitter-background, #D3D6D9);outline-style:none}.splitter:not(.splitter--custom-handle)::after{position:absolute;content:\"\";background:var(--igc-splitter-handle, var(--igc-accent-color, #fff));top:50%;left:50%;width:var(--igc-resize-handle-thickness, var(--igc-resize-handle-width, 2px));height:var(--igc-resize-handle-size, var(--igc-resize-handle-height, 80px));max-height:100%;max-width:100%;border-radius:1px;transform:translateX(-50%) translateY(-50%)}.splitter:focus-within{background-color:var(--igc-active-color, cornflowerblue)}.splitter--vertical{cursor:ns-resize}.splitter--vertical:not(.splitter--custom-handle)::after{width:var(--igc-resize-handle-size, var(--igc-resize-handle-height, 80px));height:var(--igc-resize-handle-thickness, var(--igc-resize-handle-width, 2px))}.splitter-ghost{position:absolute;cursor:ew-resize;opacity:0.3;background:black;width:100%;height:100%;z-index:5}.splitter-ghost--vertical{cursor:ns-resize}";
|
|
5193
5194
|
|
|
5194
5195
|
const SCROLL_SPEED = 15;
|
|
5195
5196
|
const IgcSplitterComponent = class {
|
|
@@ -5236,7 +5237,7 @@ const IgcSplitterComponent = class {
|
|
|
5236
5237
|
offset = scrollFactor(args.clientY - rect.bottom) * scrollSpeed;
|
|
5237
5238
|
}
|
|
5238
5239
|
else if (this.element.parentElement.scrollWidth - this.element.parentElement.clientWidth > 0) {
|
|
5239
|
-
offset = scrollFactor(args.clientX - rect.left) * scrollSpeed;
|
|
5240
|
+
offset = (this.isRTL ? -1 : 1) * scrollFactor(args.clientX - rect.left) * scrollSpeed;
|
|
5240
5241
|
}
|
|
5241
5242
|
}
|
|
5242
5243
|
this.dragOffset += offset;
|
|
@@ -5247,13 +5248,15 @@ const IgcSplitterComponent = class {
|
|
|
5247
5248
|
this.constrainSplitPaneResize();
|
|
5248
5249
|
}
|
|
5249
5250
|
};
|
|
5250
|
-
this.applyAutoDrag = () => {
|
|
5251
|
+
this.applyAutoDrag = (isRTL = false) => {
|
|
5251
5252
|
var _a;
|
|
5252
5253
|
const scrollFactor = (dist) => Math.min(Math.max(dist, 0), 100) / 100;
|
|
5253
5254
|
const scrollSpeed = ((_a = this.scrollSpeed) !== null && _a !== void 0 ? _a : SCROLL_SPEED) / 2;
|
|
5254
|
-
if (this.element.parentElement.scrollHeight - this.element.parentElement.clientHeight > 0
|
|
5255
|
-
|
|
5256
|
-
|
|
5255
|
+
if (this.element.parentElement.scrollHeight - this.element.parentElement.clientHeight > 0) {
|
|
5256
|
+
this.dragOffset += scrollFactor(scrollSpeed) * scrollSpeed;
|
|
5257
|
+
}
|
|
5258
|
+
else if (this.element.parentElement.scrollWidth - this.element.parentElement.clientWidth > 0) {
|
|
5259
|
+
this.dragOffset += (isRTL ? -1 : 1) * scrollFactor(scrollSpeed) * scrollSpeed;
|
|
5257
5260
|
}
|
|
5258
5261
|
};
|
|
5259
5262
|
this.dragOffset = undefined;
|
|
@@ -5262,12 +5265,12 @@ const IgcSplitterComponent = class {
|
|
|
5262
5265
|
this.splitPaneOrientation = undefined;
|
|
5263
5266
|
this.flyoutLocation = undefined;
|
|
5264
5267
|
this.parentUseFixedSize = false;
|
|
5265
|
-
this.resizable = true;
|
|
5266
5268
|
this.scrollSpeed = undefined;
|
|
5267
5269
|
}
|
|
5270
|
+
get isRTL() {
|
|
5271
|
+
return Utils.getDirection(this.closestElement('igc-dockmanager', this.element)) === 'rtl';
|
|
5272
|
+
}
|
|
5268
5273
|
connectedCallback() {
|
|
5269
|
-
if (!this.resizable)
|
|
5270
|
-
return;
|
|
5271
5274
|
this.dragService = new IgcDragService(this.element, this.parentUseFixedSize);
|
|
5272
5275
|
this.dragService.dragStart = this.dragStart;
|
|
5273
5276
|
this.dragService.dragEnd = this.dragEnd;
|
|
@@ -5307,6 +5310,7 @@ const IgcSplitterComponent = class {
|
|
|
5307
5310
|
(!this.isArrowUp(event) && !this.isArrowDown(event))) {
|
|
5308
5311
|
return;
|
|
5309
5312
|
}
|
|
5313
|
+
event.preventDefault();
|
|
5310
5314
|
this.showDragGhost = false;
|
|
5311
5315
|
this.resizeEndEmitted = false;
|
|
5312
5316
|
this.dragStartHelper(this.calculateOffset(event));
|
|
@@ -5318,9 +5322,11 @@ const IgcSplitterComponent = class {
|
|
|
5318
5322
|
}
|
|
5319
5323
|
this.dragEndHelper();
|
|
5320
5324
|
}
|
|
5321
|
-
handleMouseDown() {
|
|
5322
|
-
|
|
5323
|
-
|
|
5325
|
+
handleMouseDown(event) {
|
|
5326
|
+
event.preventDefault();
|
|
5327
|
+
if (this.splitterBaseElement) {
|
|
5328
|
+
this.splitterBaseElement.focus();
|
|
5329
|
+
}
|
|
5324
5330
|
this.showDragGhost = true;
|
|
5325
5331
|
this.resizeEndEmitted = false;
|
|
5326
5332
|
document.documentElement.addEventListener('mouseup', this.handleMouseUp, false);
|
|
@@ -5370,23 +5376,11 @@ const IgcSplitterComponent = class {
|
|
|
5370
5376
|
}
|
|
5371
5377
|
}
|
|
5372
5378
|
constrainSplitPaneResize() {
|
|
5373
|
-
let rtl =
|
|
5374
|
-
const dockmanager = this.closestElement('igc-dockmanager', this.element);
|
|
5375
|
-
if (dockmanager.dir !== '') {
|
|
5376
|
-
rtl = dockmanager.dir === 'rtl';
|
|
5377
|
-
}
|
|
5378
|
-
else {
|
|
5379
|
-
let parent = dockmanager.parentElement;
|
|
5380
|
-
while (parent) {
|
|
5381
|
-
if (parent.dir !== '') {
|
|
5382
|
-
rtl = parent.dir === 'rtl';
|
|
5383
|
-
break;
|
|
5384
|
-
}
|
|
5385
|
-
parent = parent.parentElement;
|
|
5386
|
-
}
|
|
5387
|
-
}
|
|
5379
|
+
let rtl = this.isRTL;
|
|
5388
5380
|
const isVertical = this.splitPaneOrientation === locale.IgcSplitPaneOrientation.vertical;
|
|
5389
5381
|
if (this.dragOffset < 0) {
|
|
5382
|
+
if (!isVertical && this.parentUseFixedSize && rtl)
|
|
5383
|
+
return;
|
|
5390
5384
|
const referencePaneSize = !rtl || isVertical ? this.paneSizes[0] : this.paneSizes[1];
|
|
5391
5385
|
if (referencePaneSize > IGC_RESIZING_MIN_SIZE) {
|
|
5392
5386
|
if (referencePaneSize + this.dragOffset < IGC_RESIZING_MIN_SIZE) {
|
|
@@ -5398,17 +5392,19 @@ const IgcSplitterComponent = class {
|
|
|
5398
5392
|
}
|
|
5399
5393
|
}
|
|
5400
5394
|
else {
|
|
5401
|
-
if (
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
this.dragOffset = 0;
|
|
5395
|
+
if (this.parentUseFixedSize && (isVertical || (!isVertical && !rtl)))
|
|
5396
|
+
return;
|
|
5397
|
+
const referencePaneSize = !rtl || isVertical ? this.paneSizes[1] : this.paneSizes[0];
|
|
5398
|
+
if (referencePaneSize === 0)
|
|
5399
|
+
return;
|
|
5400
|
+
if (referencePaneSize > IGC_RESIZING_MIN_SIZE) {
|
|
5401
|
+
if (referencePaneSize - this.dragOffset < IGC_RESIZING_MIN_SIZE) {
|
|
5402
|
+
this.dragOffset = referencePaneSize - IGC_RESIZING_MIN_SIZE;
|
|
5410
5403
|
}
|
|
5411
5404
|
}
|
|
5405
|
+
else {
|
|
5406
|
+
this.dragOffset = 0;
|
|
5407
|
+
}
|
|
5412
5408
|
}
|
|
5413
5409
|
}
|
|
5414
5410
|
closestElement(selector, el) {
|
|
@@ -5433,7 +5429,6 @@ const IgcSplitterComponent = class {
|
|
|
5433
5429
|
const isVertical = this.splitPaneOrientation === locale.IgcSplitPaneOrientation.vertical;
|
|
5434
5430
|
const splitterClasses = {
|
|
5435
5431
|
'splitter': true,
|
|
5436
|
-
'splitter--disabled': !this.resizable,
|
|
5437
5432
|
'splitter--vertical': isVertical,
|
|
5438
5433
|
'splitter--custom-handle': this.hasCustomSplitterHandle
|
|
5439
5434
|
};
|
|
@@ -5442,18 +5437,12 @@ const IgcSplitterComponent = class {
|
|
|
5442
5437
|
'splitter-ghost--vertical': isVertical
|
|
5443
5438
|
};
|
|
5444
5439
|
return (index.h(index.Host, { part: "splitter", exportparts: "splitter,\r\n splitter-base,\r\n splitter-ghost", style: {
|
|
5445
|
-
cursor:
|
|
5446
|
-
|
|
5447
|
-
: 'default',
|
|
5448
|
-
userSelect: 'none',
|
|
5449
|
-
WebkitUserSelect: 'none',
|
|
5450
|
-
MozUserSelect: 'none',
|
|
5451
|
-
msUserSelect: 'none',
|
|
5452
|
-
} }, index.h("div", { part: "splitter-base", class: splitterClasses, tabIndex: this.resizable ? 0 : -1, role: "separator", "aria-orientation": this.splitPaneOrientation.toString(), draggable: false }, index.h("slot", { name: "splitterHandle", onSlotchange: this.handleSlotChange.bind(this) })), this.resizable && this.showDragGhost &&
|
|
5440
|
+
cursor: `${isVertical ? `ns-resize` : `ew-resize`}`
|
|
5441
|
+
} }, index.h("div", { part: "splitter-base", class: splitterClasses, tabIndex: 0, role: "separator", "aria-orientation": this.splitPaneOrientation.toString(), ref: el => this.splitterBaseElement = el }, index.h("slot", { name: "splitterHandle", onSlotchange: this.handleSlotChange.bind(this) })), this.showDragGhost &&
|
|
5453
5442
|
index.h("div", { part: "splitter-ghost", class: ghostClasses, style: {
|
|
5454
5443
|
left: `${isVertical ? 0 : this.dragOffset}px`,
|
|
5455
5444
|
top: `${isVertical ? this.dragOffset : 0}px`
|
|
5456
|
-
}, ref: el => this.ghostElement = el
|
|
5445
|
+
}, ref: el => this.ghostElement = el })));
|
|
5457
5446
|
}
|
|
5458
5447
|
get element() { return index.getElement(this); }
|
|
5459
5448
|
};
|
|
@@ -5950,7 +5939,7 @@ const IgcUnpinnedPaneHeaderComponent = class {
|
|
|
5950
5939
|
};
|
|
5951
5940
|
IgcUnpinnedPaneHeaderComponent.style = unpinnedPaneHeaderComponentCss;
|
|
5952
5941
|
|
|
5953
|
-
const sampleComponentCss = ".sc-sample-component-h{display:flex;flex-direction:column;height:100%}igc-dockmanager.sc-sample-component{--igc-resize-handle-
|
|
5942
|
+
const sampleComponentCss = ".sc-sample-component-h{display:flex;flex-direction:column;height:100%}igc-dockmanager.sc-sample-component{--igc-resize-handle-thickness:10px;--igc-resize-handle-size:150px}igc-dockmanager.sc-sample-component{margin:10px;border:1px solid black}";
|
|
5954
5943
|
|
|
5955
5944
|
/**
|
|
5956
5945
|
* @hidden
|