igniteui-dockmanager 2.0.1 → 2.0.2-alpha.2

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.
Files changed (139) hide show
  1. package/{dist/CHANGELOG.md → CHANGELOG.md} +15 -6
  2. package/{dist/components → components}/dockmanager/dockmanager-component.d.ts +74 -1
  3. package/{dist/components → components}/dockmanager/dockmanager-component.js +149 -10
  4. package/{dist/components → components}/dockmanager/dockmanager.interfaces.d.ts +15 -0
  5. package/{dist/components → components}/dockmanager/dockmanager.service.d.ts +8 -0
  6. package/{dist/components → components}/dockmanager/dockmanager.service.js +95 -8
  7. package/{dist/components → components}/sample-component/sample-component.d.ts +1 -0
  8. package/{dist/components → components}/sample-component/sample-component.js +7 -0
  9. package/custom-elements.json +121 -21
  10. package/igniteui-dockmanager.html-data.json +5 -0
  11. package/package.json +57 -133
  12. package/{dist/utils → utils}/test-utils.d.ts +3 -2
  13. package/{dist/utils → utils}/test-utils.js +4 -0
  14. package/web-types.json +14 -0
  15. package/dist/LICENSE +0 -13
  16. package/dist/README.md +0 -84
  17. package/dist/custom-elements.json +0 -13890
  18. package/dist/igniteui-dockmanager.html-data.json +0 -5
  19. package/dist/package.json +0 -51
  20. package/dist/web-types.json +0 -14
  21. /package/{dist/common → common}/decorators/blazorSuppressComponent.d.ts +0 -0
  22. /package/{dist/common → common}/decorators/blazorSuppressComponent.js +0 -0
  23. /package/{dist/common → common}/decorators/watch.d.ts +0 -0
  24. /package/{dist/common → common}/decorators/watch.js +0 -0
  25. /package/{dist/common → common}/definitions/defineAllComponents.d.ts +0 -0
  26. /package/{dist/common → common}/definitions/defineAllComponents.js +0 -0
  27. /package/{dist/common → common}/definitions/defineComponents.d.ts +0 -0
  28. /package/{dist/common → common}/definitions/defineComponents.js +0 -0
  29. /package/{dist/common → common}/definitions/register.d.ts +0 -0
  30. /package/{dist/common → common}/definitions/register.js +0 -0
  31. /package/{dist/common → common}/mixins/constructor.d.ts +0 -0
  32. /package/{dist/common → common}/mixins/constructor.js +0 -0
  33. /package/{dist/common → common}/mixins/event-emitter.d.ts +0 -0
  34. /package/{dist/common → common}/mixins/event-emitter.js +0 -0
  35. /package/{dist/common → common}/util.d.ts +0 -0
  36. /package/{dist/common → common}/util.js +0 -0
  37. /package/{dist/components → components}/button/button-component.css.d.ts +0 -0
  38. /package/{dist/components → components}/button/button-component.css.js +0 -0
  39. /package/{dist/components → components}/button/button-component.d.ts +0 -0
  40. /package/{dist/components → components}/button/button-component.js +0 -0
  41. /package/{dist/components → components}/context-menu/context-menu.css.d.ts +0 -0
  42. /package/{dist/components → components}/context-menu/context-menu.css.js +0 -0
  43. /package/{dist/components → components}/context-menu/context-menu.d.ts +0 -0
  44. /package/{dist/components → components}/context-menu/context-menu.js +0 -0
  45. /package/{dist/components → components}/dockmanager/backfill-types-dockmanager.d.ts +0 -0
  46. /package/{dist/components → components}/dockmanager/backfill-types-dockmanager.js +0 -0
  47. /package/{dist/components → components}/dockmanager/docking/edge-docking-indicator-component.css.d.ts +0 -0
  48. /package/{dist/components → components}/dockmanager/docking/edge-docking-indicator-component.css.js +0 -0
  49. /package/{dist/components → components}/dockmanager/docking/edge-docking-indicator-component.d.ts +0 -0
  50. /package/{dist/components → components}/dockmanager/docking/edge-docking-indicator-component.js +0 -0
  51. /package/{dist/components → components}/dockmanager/docking/joystick-icon-component.css.d.ts +0 -0
  52. /package/{dist/components → components}/dockmanager/docking/joystick-icon-component.css.js +0 -0
  53. /package/{dist/components → components}/dockmanager/docking/joystick-icon-component.d.ts +0 -0
  54. /package/{dist/components → components}/dockmanager/docking/joystick-icon-component.js +0 -0
  55. /package/{dist/components → components}/dockmanager/docking/joystick-indicator-component.css.d.ts +0 -0
  56. /package/{dist/components → components}/dockmanager/docking/joystick-indicator-component.css.js +0 -0
  57. /package/{dist/components → components}/dockmanager/docking/joystick-indicator-component.d.ts +0 -0
  58. /package/{dist/components → components}/dockmanager/docking/joystick-indicator-component.js +0 -0
  59. /package/{dist/components → components}/dockmanager/docking/root-docking-indicator-component.css.d.ts +0 -0
  60. /package/{dist/components → components}/dockmanager/docking/root-docking-indicator-component.css.js +0 -0
  61. /package/{dist/components → components}/dockmanager/docking/root-docking-indicator-component.d.ts +0 -0
  62. /package/{dist/components → components}/dockmanager/docking/root-docking-indicator-component.js +0 -0
  63. /package/{dist/components → components}/dockmanager/docking/splitter-docking-indicator-component.css.d.ts +0 -0
  64. /package/{dist/components → components}/dockmanager/docking/splitter-docking-indicator-component.css.js +0 -0
  65. /package/{dist/components → components}/dockmanager/docking/splitter-docking-indicator-component.d.ts +0 -0
  66. /package/{dist/components → components}/dockmanager/docking/splitter-docking-indicator-component.js +0 -0
  67. /package/{dist/components → components}/dockmanager/dockmanager-component.css.d.ts +0 -0
  68. /package/{dist/components → components}/dockmanager/dockmanager-component.css.js +0 -0
  69. /package/{dist/components → components}/dockmanager/dockmanager.interfaces.js +0 -0
  70. /package/{dist/components → components}/dockmanager/keyboard/keyboard.service.d.ts +0 -0
  71. /package/{dist/components → components}/dockmanager/keyboard/keyboard.service.js +0 -0
  72. /package/{dist/components → components}/dockmanager/pane-navigator/pane-navigator-component.css.d.ts +0 -0
  73. /package/{dist/components → components}/dockmanager/pane-navigator/pane-navigator-component.css.js +0 -0
  74. /package/{dist/components → components}/dockmanager/pane-navigator/pane-navigator-component.d.ts +0 -0
  75. /package/{dist/components → components}/dockmanager/pane-navigator/pane-navigator-component.js +0 -0
  76. /package/{dist/components → components}/dockmanager/panes/content-pane-component.base.css.d.ts +0 -0
  77. /package/{dist/components → components}/dockmanager/panes/content-pane-component.base.css.js +0 -0
  78. /package/{dist/components → components}/dockmanager/panes/content-pane-component.d.ts +0 -0
  79. /package/{dist/components → components}/dockmanager/panes/content-pane-component.js +0 -0
  80. /package/{dist/components → components}/dockmanager/panes/document-host-component.base.css.d.ts +0 -0
  81. /package/{dist/components → components}/dockmanager/panes/document-host-component.base.css.js +0 -0
  82. /package/{dist/components → components}/dockmanager/panes/document-host-component.d.ts +0 -0
  83. /package/{dist/components → components}/dockmanager/panes/document-host-component.js +0 -0
  84. /package/{dist/components → components}/dockmanager/panes/floating-pane-component.css.d.ts +0 -0
  85. /package/{dist/components → components}/dockmanager/panes/floating-pane-component.css.js +0 -0
  86. /package/{dist/components → components}/dockmanager/panes/floating-pane-component.d.ts +0 -0
  87. /package/{dist/components → components}/dockmanager/panes/floating-pane-component.js +0 -0
  88. /package/{dist/components → components}/dockmanager/panes/pane-header-component.base.css.d.ts +0 -0
  89. /package/{dist/components → components}/dockmanager/panes/pane-header-component.base.css.js +0 -0
  90. /package/{dist/components → components}/dockmanager/panes/pane-header-component.d.ts +0 -0
  91. /package/{dist/components → components}/dockmanager/panes/pane-header-component.js +0 -0
  92. /package/{dist/components → components}/dockmanager/panes/resizer-component.d.ts +0 -0
  93. /package/{dist/components → components}/dockmanager/panes/resizer-component.js +0 -0
  94. /package/{dist/components → components}/dockmanager/panes/split-pane-component.base.css.d.ts +0 -0
  95. /package/{dist/components → components}/dockmanager/panes/split-pane-component.base.css.js +0 -0
  96. /package/{dist/components → components}/dockmanager/panes/split-pane-component.d.ts +0 -0
  97. /package/{dist/components → components}/dockmanager/panes/split-pane-component.js +0 -0
  98. /package/{dist/components → components}/dockmanager/panes/splitter-component.css.d.ts +0 -0
  99. /package/{dist/components → components}/dockmanager/panes/splitter-component.css.js +0 -0
  100. /package/{dist/components → components}/dockmanager/panes/splitter-component.d.ts +0 -0
  101. /package/{dist/components → components}/dockmanager/panes/splitter-component.js +0 -0
  102. /package/{dist/components → components}/dockmanager/panes/unpinned-pane-header-component.base.css.d.ts +0 -0
  103. /package/{dist/components → components}/dockmanager/panes/unpinned-pane-header-component.base.css.js +0 -0
  104. /package/{dist/components → components}/dockmanager/panes/unpinned-pane-header-component.d.ts +0 -0
  105. /package/{dist/components → components}/dockmanager/panes/unpinned-pane-header-component.js +0 -0
  106. /package/{dist/components → components}/drag-drop/drag.service.d.ts +0 -0
  107. /package/{dist/components → components}/drag-drop/drag.service.js +0 -0
  108. /package/{dist/components → components}/icon/icon-component.css.d.ts +0 -0
  109. /package/{dist/components → components}/icon/icon-component.css.js +0 -0
  110. /package/{dist/components → components}/icon/icon-component.d.ts +0 -0
  111. /package/{dist/components → components}/icon/icon-component.js +0 -0
  112. /package/{dist/components → components}/icon/icons.d.ts +0 -0
  113. /package/{dist/components → components}/icon/icons.js +0 -0
  114. /package/{dist/components → components}/tabs/tab-header-component.css.d.ts +0 -0
  115. /package/{dist/components → components}/tabs/tab-header-component.css.js +0 -0
  116. /package/{dist/components → components}/tabs/tab-header-component.d.ts +0 -0
  117. /package/{dist/components → components}/tabs/tab-header-component.js +0 -0
  118. /package/{dist/components → components}/tabs/tab-panel-component.css.d.ts +0 -0
  119. /package/{dist/components → components}/tabs/tab-panel-component.css.js +0 -0
  120. /package/{dist/components → components}/tabs/tab-panel-component.d.ts +0 -0
  121. /package/{dist/components → components}/tabs/tab-panel-component.js +0 -0
  122. /package/{dist/components → components}/tabs/tabs-component.css.d.ts +0 -0
  123. /package/{dist/components → components}/tabs/tabs-component.css.js +0 -0
  124. /package/{dist/components → components}/tabs/tabs-component.d.ts +0 -0
  125. /package/{dist/components → components}/tabs/tabs-component.js +0 -0
  126. /package/{dist/igniteui-dockmanager.css-data.json → igniteui-dockmanager.css-data.json} +0 -0
  127. /package/{dist/index.d.ts → index.d.ts} +0 -0
  128. /package/{dist/index.js → index.js} +0 -0
  129. /package/{dist/loader.d.ts → loader.d.ts} +0 -0
  130. /package/{dist/loader.js → loader.js} +0 -0
  131. /package/{dist/styles → styles}/igc.theme.default.css +0 -0
  132. /package/{dist/styles → styles}/igc.themes.css +0 -0
  133. /package/{dist/styles → styles}/index.css +0 -0
  134. /package/{dist/utils → utils}/locale.d.ts +0 -0
  135. /package/{dist/utils → utils}/locale.js +0 -0
  136. /package/{dist/utils → utils}/two-way-map.d.ts +0 -0
  137. /package/{dist/utils → utils}/two-way-map.js +0 -0
  138. /package/{dist/utils → utils}/utils.d.ts +0 -0
  139. /package/{dist/utils → utils}/utils.js +0 -0
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes for each version of this project will be documented in this file.
4
4
 
5
+ ## 2.1.0
6
+
7
+ ### New features
8
+ - Added `paneFlyoutToggle` event that fires when an unpinned pane's flyout opens or closes (distinct from pin/unpin operations).
9
+
10
+ ### Bug Fixes
11
+ - The hover area for showing pane headers when `showPaneHeaders` is set to `onHoverOnly` now correctly accounts for the actual pane header height, including custom heights set via `::part(pane-header)` styles. Note that when customizing the header height, the `min-height` property should also be overridden, as it defaults to 40px to ensure header elements are properly displayed.
12
+
5
13
  ## 2.0.0
6
14
 
7
15
  ### Breaking Changes
@@ -44,7 +52,8 @@ All notable changes for each version of this project will be documented in this
44
52
  ]
45
53
  }
46
54
  };
47
-
55
+ ```
56
+
48
57
  ## 1.18.0
49
58
 
50
59
  ### New features
@@ -84,12 +93,12 @@ All notable changes for each version of this project will be documented in this
84
93
  - `useFixedSizeOnDock`, which specifies which docking orientations should apply the `FixedSize` sizing mode when split panes are dynamically created via docking.
85
94
  - `allowRootDock`, which defaults to true, and enables or disables docking into the root-level container.
86
95
  - Adding automatic scrolling of the root container during drag-and-drop operations.
87
- - Introduced a new `autoScrollConfig` property for finer control over scroll behavior.
96
+ - Introduced a new `autoScrollConfig` property for finer control over scroll behavior.
88
97
 
89
98
  ### Bug fixes
90
99
  - Placeholder panes are no longer present in Pane Navigator
91
100
  - Dark theme is now properly applied to scrollbars
92
-
101
+
93
102
  ## 1.16.1
94
103
 
95
104
  ### Bug fixes
@@ -99,7 +108,7 @@ All notable changes for each version of this project will be documented in this
99
108
 
100
109
  ### New features
101
110
  - Introduced a new docking behavior that allows docking directly in a split pane by dragging a pane over one of its splitters. It can be switched on via the new `allowSplitterDock` property of the `IgcDockManagerComponent`.
102
- - Introduced the `useFixedSize` property of Split Panes - a new resizing behavior where child panes are sized in pixels and can be resized beyond the viewport, allowing scrollable overflow within the container.
111
+ - Introduced the `useFixedSize` property of Split Panes - a new resizing behavior where child panes are sized in pixels and can be resized beyond the viewport, allowing scrollable overflow within the container.
103
112
 
104
113
  ### Bug fixes
105
114
  - The `showHeaderIconOnHover` property now defaults to `'none'` instead of `undefined` and has correct type
@@ -157,7 +166,7 @@ All notable changes for each version of this project will be documented in this
157
166
  - Add `containedInBoundaries` property [#68](https://github.com/IgniteUI/igniteui-dockmanager/issues/68)
158
167
 
159
168
  ### Enhancements
160
- - Add `contentId` of elements as CSS parts [#32](https://github.com/IgniteUI/igniteui-dockmanager/issues/32)
169
+ - Add `contentId` of elements as CSS parts [#32](https://github.com/IgniteUI/igniteui-dockmanager/issues/32)
161
170
 
162
171
  ### Bug fixes
163
172
  - Maximizing and unpinning panes leads to unclickable panes [#72](https://github.com/IgniteUI/igniteui-dockmanager/issues/72)
@@ -178,7 +187,7 @@ All notable changes for each version of this project will be documented in this
178
187
  ## 1.12.5
179
188
 
180
189
  ### New features
181
- - Add `paneScroll` event [#51](https://github.com/IgniteUI/igniteui-dockmanager/issues/51)
190
+ - Add `paneScroll` event [#51](https://github.com/IgniteUI/igniteui-dockmanager/issues/51)
182
191
 
183
192
  ### Bug fixes
184
193
  - ТabGroupPane: Pinning one of several unpinned panes results in all the panes getting pinned [#62](https://github.com/IgniteUI/igniteui-dockmanager/issues/62)
@@ -1,7 +1,7 @@
1
1
  import { LitElement, type TemplateResult } from 'lit';
2
2
  import type { Constructor } from '../../common/mixins/constructor.js';
3
3
  import type { ContextMenuPosition, PaneActionBehavior } from './backfill-types-dockmanager.js';
4
- import { type IgcActivePaneEventArgs, type IgcContentPane, type IgcContextMenuMetadata, type IgcDockManagerComponentBase, type IgcDockManagerLayout, type IgcDockManagerPane, type IgcDockManagerPoint, type IgcDockManagerResourceStrings, type IgcDropTargetPaneInfo, type IgcFloatingPaneResizeEventArgs, type IgcFloatingPaneResizeMoveEventArgs, type IgcPaneCloseEventArgs, type IgcPaneDragEndEventArgs, type IgcPaneDragOverEventArgs, type IgcPaneDragStartEventArgs, type IgcPaneHeaderConnectionEventArgs, type IgcPaneNavigatorMetadata, type IgcPanePinnedEventArgs, type IgcPaneScrollEventArgs, type IgcSplitPane, type IgcSplitterResizeEventArgs, type IgcTabGroupPane, type IgcTabHeaderConnectionEventArgs } from './dockmanager.interfaces.js';
4
+ import { type IgcActivePaneEventArgs, type IgcContentPane, type IgcContextMenuMetadata, type IgcDockManagerComponentBase, type IgcDockManagerLayout, type IgcDockManagerPane, type IgcDockManagerPoint, type IgcDockManagerResourceStrings, type IgcDropTargetPaneInfo, type IgcFloatingPaneResizeEventArgs, type IgcFloatingPaneResizeMoveEventArgs, type IgcPaneCloseEventArgs, type IgcPaneDragEndEventArgs, type IgcPaneDragOverEventArgs, type IgcPaneDragStartEventArgs, type IgcPaneFlyoutEventArgs, type IgcPaneHeaderConnectionEventArgs, type IgcPaneNavigatorMetadata, type IgcPanePinnedEventArgs, type IgcPaneScrollEventArgs, type IgcSplitPane, type IgcSplitterResizeEventArgs, type IgcTabGroupPane, type IgcTabHeaderConnectionEventArgs } from './dockmanager.interfaces.js';
5
5
  export interface IgcDockManagerEventMap {
6
6
  activePaneChanged: CustomEvent<IgcActivePaneEventArgs>;
7
7
  floatingPaneResizeEnd: CustomEvent<IgcFloatingPaneResizeEventArgs>;
@@ -15,6 +15,7 @@ export interface IgcDockManagerEventMap {
15
15
  paneHeaderDisconnected: CustomEvent<IgcPaneHeaderConnectionEventArgs>;
16
16
  paneClose: CustomEvent<IgcPaneCloseEventArgs>;
17
17
  panePinnedToggle: CustomEvent<IgcPanePinnedEventArgs>;
18
+ paneFlyoutToggle: CustomEvent<IgcPaneFlyoutEventArgs>;
18
19
  paneScroll: CustomEvent<IgcPaneScrollEventArgs>;
19
20
  splitterResizeStart: CustomEvent<IgcSplitterResizeEventArgs>;
20
21
  splitterResizeEnd: CustomEvent<IgcSplitterResizeEventArgs>;
@@ -56,6 +57,7 @@ declare const IgcDockManagerComponent_base: Constructor<import("../../common/mix
56
57
  * @fires splitterResizeEnd - Emitted when a splitter resize ends
57
58
  * @fires tabHeaderConnected - Emitted when an `<igc-tab-header>` is connected
58
59
  * @fires tabHeaderDisconnected - Emitted when an `<igc-tab-header>` is disconnected
60
+ * @fires paneFlyoutToggle - Emitted when an unpinned pane's flyout state changes (opens or closes).
59
61
  */
60
62
  export default class IgcDockManagerComponent extends IgcDockManagerComponent_base implements IgcDockManagerComponentBase {
61
63
  static readonly tagName = "igc-dockmanager";
@@ -100,6 +102,7 @@ export default class IgcDockManagerComponent extends IgcDockManagerComponent_bas
100
102
  private loaded;
101
103
  private _isValidDrop;
102
104
  private draggedTab;
105
+ private cachedHeaderHeight;
103
106
  private templatableComponents;
104
107
  private readonly _resourceChangeHandler;
105
108
  documentOnlyDrag: boolean;
@@ -353,6 +356,8 @@ export default class IgcDockManagerComponent extends IgcDockManagerComponent_bas
353
356
  private splitterResizeAndScroll;
354
357
  private processTemplates;
355
358
  private removeCustomContentEventListeners;
359
+ private restoreDraggedPanes;
360
+ private clearDragState;
356
361
  private handleCustomContentFocusIn;
357
362
  private mutationCallback;
358
363
  private handleShadowRootFocusOut;
@@ -374,6 +379,45 @@ export default class IgcDockManagerComponent extends IgcDockManagerComponent_bas
374
379
  private renderDocumentHost;
375
380
  private renderSplitter;
376
381
  private removeHoveredPane;
382
+ /**
383
+ * Gets the actual pane header height, using a cached value when available.
384
+ * All pane headers share the same height so the result is cached globally.
385
+ *
386
+ * Resolution order:
387
+ * 1. Cached value
388
+ * 2. Any currently visible header's offsetHeight
389
+ * 3. Stand-in measurement (handles hidden headers and ::part overrides)
390
+ * 4. PANE_HEADER_HEIGHT constant (40 px)
391
+ *
392
+ * @param pane - The content pane to get header height for
393
+ * @returns The header height in pixels
394
+ * @internal
395
+ */
396
+ private getPaneHeaderHeight;
397
+ /**
398
+ * Measures the intended header height by creating a lightweight stand-in element
399
+ * that replicates the pane header's styling without instantiating a Lit component.
400
+ *
401
+ * The stand-in is placed off-screen inside the dock manager's shadow root and
402
+ * measured, then immediately removed.
403
+ *
404
+ * @returns The measured height in pixels, or 0 when measurement is not possible.
405
+ * @internal
406
+ */
407
+ private measureHeaderHeight;
408
+ /**
409
+ * Determines if the header should be shown based on pointer position within the pane.
410
+ * Used only when showPaneHeaders is set to 'onHoverOnly'.
411
+ *
412
+ * Detection logic:
413
+ * - Shows header if pointer Y is within the pane's top edge and header height
414
+ * - When header is already visible, adds a 25% buffer zone to prevent flickering
415
+ * at the boundary (the "leave" threshold is larger than the "enter" threshold)
416
+ *
417
+ * @param pane - The content pane being hovered
418
+ * @param event - The pointer move event
419
+ * @internal
420
+ */
377
421
  private togglePaneHeaderVisibility;
378
422
  private handleContentPaneFocus;
379
423
  private resolveAllowMaximize;
@@ -426,6 +470,35 @@ export default class IgcDockManagerComponent extends IgcDockManagerComponent_bas
426
470
  paneClose(args: IgcPaneCloseEventArgs): CustomEvent<IgcPaneCloseEventArgs>;
427
471
  paneScroll(args: IgcPaneScrollEventArgs): CustomEvent<IgcPaneScrollEventArgs>;
428
472
  panePinnedToggle(args: IgcPanePinnedEventArgs): CustomEvent<IgcPanePinnedEventArgs>;
473
+ /**
474
+ * Emitted when an unpinned pane's flyout state changes (opens or closes).
475
+ *
476
+ * This event fires when:
477
+ * - An unpinned pane is clicked and its flyout opens to display content
478
+ * - An unpinned pane's flyout closes (user clicks elsewhere, switches to another unpinned pane, etc.)
479
+ * - Switching between unpinned panes (fires twice: close event for old pane, open event for new pane)
480
+ *
481
+ * This event does NOT fire when:
482
+ * - A pane is pinned or unpinned using the pin button (use panePinnedToggle for that)
483
+ * - A pane is initially unpinned (only subsequent flyout open/close actions)
484
+ *
485
+ * Use this event to show/hide auxiliary UI, update summary views, or respond to unpinned pane visibility changes.
486
+ *
487
+ * @example
488
+ * ```typescript
489
+ * dockManager.addEventListener('paneFlyoutToggle', (event) => {
490
+ * const { pane, isOpen } = event.detail;
491
+ * if (isOpen) {
492
+ * // Unpinned pane opened - show related UI
493
+ * summaryPanel.style.display = 'none';
494
+ * } else {
495
+ * // Unpinned pane closed - hide related UI
496
+ * summaryPanel.style.display = 'block';
497
+ * }
498
+ * });
499
+ * ```
500
+ */
501
+ paneFlyoutToggle(args: IgcPaneFlyoutEventArgs): CustomEvent<IgcPaneFlyoutEventArgs>;
429
502
  paneDragStart(args: IgcPaneDragStartEventArgs): CustomEvent<IgcPaneDragStartEventArgs>;
430
503
  paneDragOver(args: IgcPaneDragOverEventArgs): CustomEvent<IgcPaneDragOverEventArgs>;
431
504
  paneDragEnd(args: IgcPaneDragEndEventArgs): CustomEvent<IgcPaneDragEndEventArgs>;
@@ -143,6 +143,7 @@ class IgcDockManagerComponent extends EventEmitterMixin(LitElement) {
143
143
  this.updateLayout();
144
144
  }
145
145
  this.service.processLayout();
146
+ this.restoreDraggedPanes();
146
147
  if (!this.isDragging) {
147
148
  this.emitEvent('layoutChange');
148
149
  }
@@ -186,6 +187,7 @@ class IgcDockManagerComponent extends EventEmitterMixin(LitElement) {
186
187
  this.loaded = false;
187
188
  this._isValidDrop = true;
188
189
  this.draggedTab = null;
190
+ this.cachedHeaderHeight = null;
189
191
  this.templatableComponents = [
190
192
  {
191
193
  slot: 'paneHeaderCloseButton',
@@ -417,6 +419,7 @@ class IgcDockManagerComponent extends EventEmitterMixin(LitElement) {
417
419
  this.removeCustomContentEventListeners();
418
420
  this.domObserver.disconnect();
419
421
  this.resizeObserver.disconnect();
422
+ this.cachedHeaderHeight = null;
420
423
  }
421
424
  focusElement() {
422
425
  this.focus();
@@ -650,6 +653,43 @@ class IgcDockManagerComponent extends EventEmitterMixin(LitElement) {
650
653
  child.removeEventListener('focusin', this.handleCustomContentFocusIn);
651
654
  }
652
655
  }
656
+ restoreDraggedPanes() {
657
+ const draggedPaneId = this.isDragging && this.draggedPane ? this.draggedPane.id : null;
658
+ const draggedTabId = this.isDragging && this.draggedTab ? this.draggedTab.id : null;
659
+ let paneRestored = true;
660
+ let tabRestored = true;
661
+ if (draggedPaneId) {
662
+ const restoredPane = this.service.findPaneById(draggedPaneId);
663
+ if (restoredPane) {
664
+ this.draggedPane = restoredPane;
665
+ }
666
+ else {
667
+ paneRestored = false;
668
+ }
669
+ }
670
+ if (draggedTabId) {
671
+ const restoredTab = this.service.findPaneById(draggedTabId);
672
+ if (restoredTab && restoredTab.type === 'contentPane') {
673
+ this.draggedTab = restoredTab;
674
+ }
675
+ else {
676
+ tabRestored = false;
677
+ }
678
+ }
679
+ const paneNotFound = draggedPaneId && !paneRestored;
680
+ const tabNotFound = draggedTabId && !tabRestored;
681
+ if (paneNotFound || tabNotFound) {
682
+ this.clearDragState();
683
+ }
684
+ }
685
+ clearDragState() {
686
+ this.isDragging = false;
687
+ this.draggedPane = null;
688
+ this.draggedTab = null;
689
+ this.dropTargetPaneInfo = null;
690
+ this.dropShadowRect = null;
691
+ this.setSplitterDockingIndicatorVisibility('hidden');
692
+ }
653
693
  mutationCallback(records) {
654
694
  const filteredRecords = records.filter((rec) => rec.type === 'childList');
655
695
  for (const child of filteredRecords) {
@@ -1022,15 +1062,94 @@ class IgcDockManagerComponent extends EventEmitterMixin(LitElement) {
1022
1062
  removeHoveredPane() {
1023
1063
  this.hoveredPane = null;
1024
1064
  }
1065
+ getPaneHeaderHeight(pane) {
1066
+ if (this.cachedHeaderHeight !== null && this.cachedHeaderHeight > 0) {
1067
+ return this.cachedHeaderHeight;
1068
+ }
1069
+ if (!this.contentPanesElementMap) {
1070
+ return PANE_HEADER_HEIGHT;
1071
+ }
1072
+ const preferred = this.contentPanesElementMap.get(pane);
1073
+ const elements = preferred
1074
+ ? [
1075
+ preferred,
1076
+ ...Array.from(this.contentPanesElementMap.values()).filter((el) => el !== preferred),
1077
+ ]
1078
+ : Array.from(this.contentPanesElementMap.values());
1079
+ for (const el of elements) {
1080
+ const header = el.querySelector('igc-pane-header');
1081
+ if (header &&
1082
+ !header.classList.contains('hidden') &&
1083
+ header.offsetHeight > 0) {
1084
+ this.cachedHeaderHeight = header.offsetHeight;
1085
+ return header.offsetHeight;
1086
+ }
1087
+ }
1088
+ const measured = this.measureHeaderHeight();
1089
+ if (measured > 0) {
1090
+ this.cachedHeaderHeight = measured;
1091
+ return measured;
1092
+ }
1093
+ return PANE_HEADER_HEIGHT;
1094
+ }
1095
+ measureHeaderHeight() {
1096
+ if (!this.shadowRoot || !this.contentPanesElementMap)
1097
+ return 0;
1098
+ let header = null;
1099
+ for (const [, el] of this.contentPanesElementMap) {
1100
+ header = el.querySelector('igc-pane-header');
1101
+ if (header)
1102
+ break;
1103
+ }
1104
+ if (!header?.shadowRoot)
1105
+ return 0;
1106
+ const standin = document.createElement('div');
1107
+ const partAttr = header.getAttribute('part');
1108
+ if (partAttr) {
1109
+ standin.setAttribute('part', partAttr);
1110
+ }
1111
+ const shadow = standin.attachShadow({ mode: 'open' });
1112
+ for (const node of Array.from(header.shadowRoot.childNodes)) {
1113
+ shadow.appendChild(node.cloneNode(true));
1114
+ }
1115
+ if (header.shadowRoot.adoptedStyleSheets?.length) {
1116
+ shadow.adoptedStyleSheets = [...header.shadowRoot.adoptedStyleSheets];
1117
+ }
1118
+ const wrapper = document.createElement('div');
1119
+ wrapper.style.position = 'absolute';
1120
+ wrapper.style.left = '-9999px';
1121
+ wrapper.style.top = '0';
1122
+ wrapper.style.visibility = 'hidden';
1123
+ const sourceRect = header.getBoundingClientRect();
1124
+ const sourceWidth = sourceRect?.width || header.offsetWidth;
1125
+ if (sourceWidth > 0) {
1126
+ wrapper.style.width = `${sourceWidth}px`;
1127
+ }
1128
+ wrapper.appendChild(standin);
1129
+ this.shadowRoot.appendChild(wrapper);
1130
+ try {
1131
+ const offsetHeight = standin.offsetHeight;
1132
+ const computedStyle = getComputedStyle(standin);
1133
+ const maxHeight = Number.parseFloat(computedStyle.maxHeight);
1134
+ const effectiveHeight = Math.max(offsetHeight, !Number.isNaN(maxHeight) ? maxHeight : 0);
1135
+ return effectiveHeight > 0 ? effectiveHeight : 0;
1136
+ }
1137
+ finally {
1138
+ wrapper.remove();
1139
+ }
1140
+ }
1025
1141
  togglePaneHeaderVisibility(pane, event) {
1026
1142
  if (!this.contentPanesElementMap)
1027
1143
  return;
1028
1144
  const paneRect = this.contentPanesElementMap
1029
1145
  .get(pane)
1030
1146
  ?.getBoundingClientRect();
1031
- const withinPane = paneRect &&
1032
- event.clientY >= paneRect.top &&
1033
- event.clientY < paneRect.top + PANE_HEADER_HEIGHT;
1147
+ if (!paneRect)
1148
+ return;
1149
+ const paneHeaderHeight = this.getPaneHeaderHeight(pane);
1150
+ const buffer = this.hoveredPane === pane ? paneHeaderHeight * 0.25 : 0;
1151
+ const withinPane = event.clientY >= paneRect.top &&
1152
+ event.clientY < paneRect.top + paneHeaderHeight + buffer;
1034
1153
  if (withinPane) {
1035
1154
  this.hoveredPane = pane;
1036
1155
  }
@@ -1048,7 +1167,13 @@ class IgcDockManagerComponent extends EventEmitterMixin(LitElement) {
1048
1167
  const isPinned = this.service.getActualIsPinned(pane);
1049
1168
  const unpinBehavior = !isPinned ? 'selectedPane' : this.unpinBehavior;
1050
1169
  this.shouldClearActivePane = false;
1051
- this.service.togglePin(pane, unpinBehavior);
1170
+ this.service.isPinToggling = true;
1171
+ try {
1172
+ this.service.togglePin(pane, unpinBehavior);
1173
+ }
1174
+ finally {
1175
+ this.service.isPinToggling = false;
1176
+ }
1052
1177
  this.scheduleAfterRender(() => {
1053
1178
  this.shouldClearActivePane = true;
1054
1179
  this.setFocus(pane);
@@ -1310,6 +1435,17 @@ class IgcDockManagerComponent extends EventEmitterMixin(LitElement) {
1310
1435
  ? this.layout.floatingPanes.indexOf(dropPaneRoot) !== -1 &&
1311
1436
  !this.service.getChildDocHostRecursive(dropPaneRoot)
1312
1437
  : false;
1438
+ const draggedPanes = this.draggedPane?.type === 'contentPane'
1439
+ ? [this.draggedPane]
1440
+ : this.service.getChildContentPanes(this.draggedPane);
1441
+ const disableFloatingDrop = draggedPanes.some((pane) => pane.allowFloating === false) &&
1442
+ (this.layout.floatingPanes
1443
+ ? this.layout.floatingPanes.indexOf(dropPaneRoot) !== -1
1444
+ : false);
1445
+ if (disableFloatingDrop) {
1446
+ this.dropTargetPaneInfo = null;
1447
+ return;
1448
+ }
1313
1449
  if (!this.documentOnlyDrag ||
1314
1450
  docHost ||
1315
1451
  floatingPaneWithoutDocHost ||
@@ -2131,6 +2267,11 @@ class IgcDockManagerComponent extends EventEmitterMixin(LitElement) {
2131
2267
  cancelable: true,
2132
2268
  });
2133
2269
  }
2270
+ paneFlyoutToggle(args) {
2271
+ return this.createAndDispatchEvent('paneFlyoutToggle', args, {
2272
+ cancelable: true,
2273
+ });
2274
+ }
2134
2275
  paneDragStart(args) {
2135
2276
  return this.createAndDispatchEvent('paneDragStart', args, {
2136
2277
  cancelable: true,
@@ -2530,12 +2671,10 @@ class IgcDockManagerComponent extends EventEmitterMixin(LitElement) {
2530
2671
  }
2531
2672
  })}
2532
2673
  >
2533
- ${isSingleTab
2534
- ? this.renderTabPanel(tabs[0], false, isFloating)
2535
- : tabs.map((p) => html `
2536
- ${this.renderTabHeader(p, position, isFloating)}
2537
- ${this.renderTabPanel(p, isInDocumentHost, isFloating)}
2538
- `)}
2674
+ ${tabs.map((p) => html `
2675
+ ${this.renderTabHeader(p, position, isFloating)}
2676
+ ${this.renderTabPanel(p, isInDocumentHost, isFloating)}
2677
+ `)}
2539
2678
  </igc-tabs-component>
2540
2679
  `;
2541
2680
  }
@@ -84,6 +84,7 @@ export interface IgcDockManagerComponentBase {
84
84
  paneClose(eventArgs: IgcPaneCloseEventArgs): CustomEvent<IgcPaneCloseEventArgs>;
85
85
  paneScroll(eventArgs: IgcPaneScrollEventArgs): CustomEvent<IgcPaneScrollEventArgs>;
86
86
  panePinnedToggle(eventArgs: IgcPanePinnedEventArgs): CustomEvent<IgcPanePinnedEventArgs>;
87
+ paneFlyoutToggle(eventArgs: IgcPaneFlyoutEventArgs): CustomEvent<IgcPaneFlyoutEventArgs>;
87
88
  paneDragStart(eventArgs: IgcPaneDragStartEventArgs): CustomEvent<IgcPaneDragStartEventArgs>;
88
89
  paneDragOver(eventArgs: IgcPaneDragOverEventArgs): CustomEvent<IgcPaneDragOverEventArgs>;
89
90
  paneDragEnd(eventArgs: IgcPaneDragEndEventArgs): CustomEvent<IgcPaneDragEndEventArgs>;
@@ -293,6 +294,20 @@ export interface IgcPanePinnedEventArgs {
293
294
  */
294
295
  readonly location: IgcUnpinnedLocation;
295
296
  }
297
+ export interface IgcPaneFlyoutEventArgs {
298
+ /**
299
+ * Gets the unpinned pane that is being opened or closed.
300
+ * This is the content pane whose flyout state is changing.
301
+ */
302
+ readonly pane: IgcContentPane;
303
+ /**
304
+ * Gets whether the unpinned pane is being opened (true) or closed (false).
305
+ *
306
+ * - `true`: The unpinned pane's flyout is opening and its content will be displayed.
307
+ * - `false`: The unpinned pane's flyout is closing and its content will be hidden.
308
+ */
309
+ readonly isOpen: boolean;
310
+ }
296
311
  export interface IgcPaneDragStartEventArgs {
297
312
  /**
298
313
  * Gets the source pane that triggers the drag start.
@@ -38,6 +38,7 @@ export declare class IgcDockManagerService {
38
38
  pane: any;
39
39
  index: number;
40
40
  };
41
+ isPinToggling: boolean;
41
42
  constructor(dockManager: IgcDockManagerComponentBase);
42
43
  getContent(contentId: string): IgcDockManagerPane;
43
44
  private generateUuid;
@@ -55,6 +56,7 @@ export declare class IgcDockManagerService {
55
56
  private getChildContentPanesRecursive;
56
57
  getChildDocHostRecursive(pane: IgcSplitPane): IgcDocumentHost | null;
57
58
  getVisibleContentPanes(parent: IgcTabGroupPane): IgcContentPane[];
59
+ findPaneById(paneId: string | undefined): IgcDockManagerPane | null;
58
60
  private getPaneToDock;
59
61
  private removeDocumentHost;
60
62
  private dockToCenter;
@@ -98,6 +100,12 @@ export declare class IgcDockManagerService {
98
100
  private emitPaneClose;
99
101
  private removeAllowedPanes;
100
102
  flyoutPane(pane: IgcContentPane): void;
103
+ /**
104
+ * Sets the flyout pane and emits paneFlyoutToggle event if needed.
105
+ * @param newValue The new flyout pane value
106
+ * @param oldValue The previous flyout pane value
107
+ */
108
+ setFlyoutPane(newValue: IgcContentPane | null, oldValue: IgcContentPane | null): void;
101
109
  maximizePane(pane: IgcContentPane | IgcSplitPane | IgcTabGroupPane | null): void;
102
110
  moveFloatingPane(pane: IgcSplitPane, location: IgcDockManagerPoint): void;
103
111
  resizeFloatingPaneStart(pane: IgcSplitPane, resizerLocation: ResizerLocation): boolean;
@@ -20,6 +20,7 @@ export class IgcDockManagerService {
20
20
  this.forceDragTabHeader = null;
21
21
  this.unpinnedLocationMap = new Map();
22
22
  this.keyboardDockPane = null;
23
+ this.isPinToggling = false;
23
24
  }
24
25
  getContent(contentId) {
25
26
  return this.clientContentPanesMap.get(contentId);
@@ -300,6 +301,42 @@ export class IgcDockManagerService {
300
301
  getVisibleContentPanes(parent) {
301
302
  return parent.panes.filter((t) => this.isContentPaneVisible(t));
302
303
  }
304
+ findPaneById(paneId) {
305
+ const layout = this.dockManager.layout;
306
+ if (!layout || !paneId)
307
+ return null;
308
+ const searchPane = (pane) => {
309
+ if (!pane)
310
+ return null;
311
+ if (pane.id === paneId) {
312
+ return pane;
313
+ }
314
+ if (pane.type === 'splitPane' || pane.type === 'tabGroupPane') {
315
+ if (pane.panes) {
316
+ for (const childPane of pane.panes) {
317
+ const found = searchPane(childPane);
318
+ if (found)
319
+ return found;
320
+ }
321
+ }
322
+ }
323
+ if (pane.type === 'documentHost' && pane.rootPane) {
324
+ return searchPane(pane.rootPane);
325
+ }
326
+ return null;
327
+ };
328
+ let found = searchPane(layout.rootPane);
329
+ if (found)
330
+ return found;
331
+ if (layout.floatingPanes) {
332
+ for (const floatingPane of layout.floatingPanes) {
333
+ found = searchPane(floatingPane);
334
+ if (found)
335
+ return found;
336
+ }
337
+ }
338
+ return null;
339
+ }
303
340
  getPaneToDock(draggedPane) {
304
341
  return draggedPane?.type === 'contentPane'
305
342
  ? draggedPane
@@ -557,6 +594,10 @@ export class IgcDockManagerService {
557
594
  return null;
558
595
  }
559
596
  processLayout() {
597
+ const draggedTabId = this.draggedTab ? this.draggedTab.id : null;
598
+ const draggedPaneIds = this.draggedPanes
599
+ .filter((pane) => pane && pane.id != null)
600
+ .map((pane) => pane.id);
560
601
  this.paneParentMap = new Map();
561
602
  this.unpinnedLocationMap = new Map();
562
603
  this.clientContentPanesMap = new Map();
@@ -577,6 +618,7 @@ export class IgcDockManagerService {
577
618
  else {
578
619
  this.dockManager.floatingPaneZIndicesMap.set(pane, i);
579
620
  }
621
+ this.populatePinLocations(pane);
580
622
  }
581
623
  for (const key of indicesToDelete.keys()) {
582
624
  this.dockManager.floatingPaneZIndicesMap.delete(key);
@@ -585,7 +627,25 @@ export class IgcDockManagerService {
585
627
  this.populatePinLocations(layout.rootPane);
586
628
  if (this.dockManager.flyoutPane &&
587
629
  !this.unpinnedLocationMap.has(this.dockManager.flyoutPane)) {
588
- this.dockManager.flyoutPane = null;
630
+ this.setFlyoutPane(null, this.dockManager.flyoutPane);
631
+ }
632
+ if (draggedTabId) {
633
+ const restoredTab = this.findPaneById(draggedTabId);
634
+ if (restoredTab && restoredTab.type === 'contentPane') {
635
+ this.draggedTab = restoredTab;
636
+ }
637
+ else {
638
+ this.draggedTab = null;
639
+ }
640
+ }
641
+ if (draggedPaneIds.length > 0) {
642
+ this.draggedPanes = [];
643
+ for (const paneId of draggedPaneIds) {
644
+ const restoredPane = this.findPaneById(paneId);
645
+ if (restoredPane && restoredPane.type === 'contentPane') {
646
+ this.draggedPanes.push(restoredPane);
647
+ }
648
+ }
589
649
  }
590
650
  }
591
651
  }
@@ -679,14 +739,14 @@ export class IgcDockManagerService {
679
739
  cp.isMaximized = false;
680
740
  }
681
741
  if (newValue) {
682
- this.dockManager.flyoutPane = null;
742
+ this.setFlyoutPane(null, this.dockManager.flyoutPane);
683
743
  }
684
744
  else {
685
745
  this.flyoutPane(pane);
686
746
  }
687
747
  }
688
748
  else if (newValue) {
689
- this.dockManager.flyoutPane = null;
749
+ this.setFlyoutPane(null, this.dockManager.flyoutPane);
690
750
  }
691
751
  this.updateLayout();
692
752
  this.dockManager.layoutChange();
@@ -727,7 +787,7 @@ export class IgcDockManagerService {
727
787
  ? this.removeAllowedPanes(pane, paneToRemove)
728
788
  : this.emitPaneClose(pane, [paneToRemove]);
729
789
  if ((paneRemoved || pane.hidden) && pane === this.dockManager.flyoutPane) {
730
- this.dockManager.flyoutPane = null;
790
+ this.setFlyoutPane(null, this.dockManager.flyoutPane);
731
791
  }
732
792
  if (paneRemoved) {
733
793
  this.paneParentMap.delete(paneToRemove);
@@ -761,8 +821,35 @@ export class IgcDockManagerService {
761
821
  return paneRemoved;
762
822
  }
763
823
  flyoutPane(pane) {
764
- this.dockManager.flyoutPane =
765
- this.dockManager.flyoutPane === pane ? null : pane;
824
+ const oldValue = this.dockManager.flyoutPane;
825
+ const newValue = oldValue === pane ? null : pane;
826
+ this.setFlyoutPane(newValue, oldValue);
827
+ }
828
+ setFlyoutPane(newValue, oldValue) {
829
+ if (this.isPinToggling) {
830
+ this.dockManager.flyoutPane = newValue;
831
+ return;
832
+ }
833
+ if (newValue === oldValue) {
834
+ return;
835
+ }
836
+ let closePrevented = false;
837
+ let openPrevented = false;
838
+ if (oldValue) {
839
+ closePrevented = this.dockManager.paneFlyoutToggle({
840
+ pane: oldValue,
841
+ isOpen: false,
842
+ }).defaultPrevented;
843
+ }
844
+ if (!closePrevented && newValue) {
845
+ openPrevented = this.dockManager.paneFlyoutToggle({
846
+ pane: newValue,
847
+ isOpen: true,
848
+ }).defaultPrevented;
849
+ }
850
+ if (!closePrevented && !openPrevented) {
851
+ this.dockManager.flyoutPane = newValue;
852
+ }
766
853
  }
767
854
  maximizePane(pane) {
768
855
  if (!pane)
@@ -954,7 +1041,7 @@ export class IgcDockManagerService {
954
1041
  this.addFloatingPane(paneToAdd, { x, y }, width, height);
955
1042
  if (pane === this.dockManager.flyoutPane) {
956
1043
  pane.isPinned = true;
957
- this.dockManager.flyoutPane = null;
1044
+ this.setFlyoutPane(null, this.dockManager.flyoutPane);
958
1045
  }
959
1046
  this.updateLayout();
960
1047
  }
@@ -1391,7 +1478,7 @@ export class IgcDockManagerService {
1391
1478
  if (draggedPane.isPinned === false) {
1392
1479
  draggedPane.isPinned = true;
1393
1480
  if (draggedPane === this.dockManager.flyoutPane) {
1394
- this.dockManager.flyoutPane = null;
1481
+ this.setFlyoutPane(null, this.dockManager.flyoutPane);
1395
1482
  }
1396
1483
  }
1397
1484
  }
@@ -36,6 +36,7 @@ export declare class SampleComponent extends LitElement {
36
36
  private handlePinnedToggle;
37
37
  private handleActivePaneChanged;
38
38
  private handleDragStart;
39
+ private handlePaneFlyoutToggle;
39
40
  private handleDragOver;
40
41
  private handleDragEnd;
41
42
  private handleSplitterResizeStart;