igniteui-dockmanager 1.12.4 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/cjs/igc-button-component_20.cjs.entry.js +151 -38
  2. package/dist/cjs/igniteui-dockmanager.cjs.js +2 -2
  3. package/dist/cjs/{index-f11f2141.js → index-2e72b990.js} +8 -0
  4. package/dist/cjs/index.cjs.js +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/{locale-758076f2.js → locale-17d229ad.js} +6 -0
  7. package/dist/collection/components/context-menu/context-menu-component.js +12 -3
  8. package/dist/collection/components/dockmanager/docking/joystick-indicator-component.js +29 -1
  9. package/dist/collection/components/dockmanager/dockmanager-component.js +107 -6
  10. package/dist/collection/components/dockmanager/dockmanager.public-interfaces.js +7 -0
  11. package/dist/collection/components/dockmanager/dockmanager.service.js +15 -0
  12. package/dist/collection/components/dockmanager/keyboard/keyboard.service.js +18 -8
  13. package/dist/collection/components/sample-component/sample-component.js +23 -4
  14. package/dist/collection/components/tabs/tabs-component.js +26 -14
  15. package/dist/collection/utils/test-utils.js +1 -0
  16. package/dist/esm/igc-button-component_20.entry.js +151 -38
  17. package/dist/esm/igniteui-dockmanager.js +2 -2
  18. package/dist/esm/{index-cbe7fc41.js → index-bd1fe64b.js} +8 -0
  19. package/dist/esm/index.js +1 -1
  20. package/dist/esm/loader.js +2 -2
  21. package/dist/esm/{locale-7d22d721.js → locale-a0672ab3.js} +6 -0
  22. package/dist/esm-es5/igc-button-component_20.entry.js +1 -1
  23. package/dist/esm-es5/igniteui-dockmanager.js +1 -1
  24. package/dist/esm-es5/{index-cbe7fc41.js → index-bd1fe64b.js} +1 -1
  25. package/dist/esm-es5/index.js +1 -1
  26. package/dist/esm-es5/loader.js +1 -1
  27. package/dist/esm-es5/locale-a0672ab3.js +1 -0
  28. package/dist/igniteui-dockmanager/igniteui-dockmanager.esm.js +1 -1
  29. package/dist/igniteui-dockmanager/igniteui-dockmanager.js +1 -1
  30. package/dist/igniteui-dockmanager/index.esm.js +1 -1
  31. package/dist/igniteui-dockmanager/p-383f3cf9.entry.js +1 -0
  32. package/dist/igniteui-dockmanager/p-63ab8da6.system.js +1 -0
  33. package/dist/igniteui-dockmanager/p-7fcd25e9.system.entry.js +1 -0
  34. package/dist/igniteui-dockmanager/p-940b5e72.js +1 -0
  35. package/dist/igniteui-dockmanager/p-bb001bb5.system.js +1 -0
  36. package/dist/igniteui-dockmanager/{p-972bb54a.system.js → p-c98cb661.system.js} +1 -1
  37. package/dist/igniteui-dockmanager/{p-41c42898.system.js → p-d8198e0d.system.js} +1 -1
  38. package/dist/igniteui-dockmanager/p-e84a170b.js +1 -0
  39. package/dist/types/components/context-menu/context-menu-component.d.ts +1 -0
  40. package/dist/types/components/dockmanager/docking/joystick-indicator-component.d.ts +3 -0
  41. package/dist/types/components/dockmanager/dockmanager-component.d.ts +6 -1
  42. package/dist/types/components/dockmanager/dockmanager.interfaces.d.ts +2 -1
  43. package/dist/types/components/dockmanager/dockmanager.public-interfaces.d.ts +38 -0
  44. package/dist/types/components/dockmanager/dockmanager.service.d.ts +3 -0
  45. package/dist/types/components/sample-component/sample-component.d.ts +2 -0
  46. package/dist/types/components/tabs/tabs-component.d.ts +3 -1
  47. package/dist/types/components.d.ts +7 -1
  48. package/dist/types/utils/test-utils.d.ts +2 -1
  49. package/loader/cdn.js +2 -2
  50. package/loader/index.cjs.js +2 -2
  51. package/package.json +1 -1
  52. package/CHANGELOG.md +0 -183
  53. package/dist/esm-es5/locale-7d22d721.js +0 -1
  54. package/dist/igniteui-dockmanager/p-5de92891.js +0 -1
  55. package/dist/igniteui-dockmanager/p-6aad9699.entry.js +0 -1
  56. package/dist/igniteui-dockmanager/p-abc689a4.system.entry.js +0 -1
  57. package/dist/igniteui-dockmanager/p-db0ed18d.system.js +0 -1
  58. package/dist/igniteui-dockmanager/p-f8e35aef.system.js +0 -1
  59. package/dist/igniteui-dockmanager/p-fdf33b6f.js +0 -1
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f11f2141.js');
6
- const locale = require('./locale-758076f2.js');
5
+ const index = require('./index-2e72b990.js');
6
+ const locale = require('./locale-17d229ad.js');
7
7
 
8
8
  const buttonComponentCss = "button{position:static;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:auto;height:100%;min-width:10px;padding:2px 4px;border-radius:2px;color:var(--igc-button-text, rgba(0, 0, 0, 0.72));cursor:pointer;outline-style:none;font-size:14px;font-family:inherit;background:transparent;border:none;-webkit-tap-highlight-color:transparent;opacity:0.7;-webkit-transition:background 0.25s ease-out, opacity 0.25s ease-out, -webkit-box-shadow 0.25s ease-out;transition:background 0.25s ease-out, opacity 0.25s ease-out, -webkit-box-shadow 0.25s ease-out;transition:background 0.25s ease-out, opacity 0.25s ease-out, box-shadow 0.25s ease-out;transition:background 0.25s ease-out, opacity 0.25s ease-out, box-shadow 0.25s ease-out, -webkit-box-shadow 0.25s ease-out}:host([disabled]){pointer-events:none}:host{display:-ms-flexbox;display:flex}button{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}button:hover{opacity:1}button:focus{background:var(--igc-accent-color, #fff);-webkit-box-shadow:inset 0 0 0 1px var(--igc-active-color, cornflowerblue);box-shadow:inset 0 0 0 1px var(--igc-active-color, cornflowerblue);opacity:1}button[disabled]{opacity:0.54}";
9
9
 
@@ -183,12 +183,13 @@ let IgcContextMenuComponent = class {
183
183
  const menuItemsDivRect = this.menuItemsDiv.getBoundingClientRect();
184
184
  const hostRect = this.elem.getBoundingClientRect();
185
185
  const rootNodeShadowHost = this.target.getRootNode();
186
+ const isFloating = this.isFloating(rootNodeShadowHost.host);
186
187
  const rootHostRect = rootNodeShadowHost.host.getBoundingClientRect();
187
188
  const isTabs = rootNodeShadowHost.host.tagName.toLowerCase() === 'igc-tab-header-component';
188
189
  const tabsContentHost = isTabs ? rootNodeShadowHost.host.parentElement.shadowRoot : rootNodeShadowHost;
189
190
  const tabRect = tabsContentHost.host.getBoundingClientRect();
190
191
  const tabsContentRect = tabsContentHost.querySelector('div[part~="tabs-content"]').getBoundingClientRect();
191
- const isRTL = rootHostRect.right - menuItemsDivRect.right <= 0;
192
+ const isRTL = rootHostRect.right - menuItemsDivRect.right < 1;
192
193
  const shouldChangeOpenOrientation = tabRect.bottom + menuItemsDivRect.bottom >= window.innerHeight
193
194
  || tabRect.height + menuItemsDivRect.bottom >= window.innerHeight
194
195
  || (isTabsMoreButton && tabsContentRect.height - menuItemsDivRect.height > 0);
@@ -197,7 +198,7 @@ let IgcContextMenuComponent = class {
197
198
  : rootHostRect.top - menuItemsDivRect.top + rootHostRect.height;
198
199
  const menuToTop = tabsContentRect.top - menuItemsDivRect.top;
199
200
  const menuToStart = isRTL ? rootHostRect.right - menuItemsDivRect.width : rootHostRect.left;
200
- const menuToEnd = isRTL ? rootHostRect.left : rootHostRect.right - menuItemsDivRect.width;
201
+ const menuToEnd = isRTL && !isFloating ? rootHostRect.left : rootHostRect.right - menuItemsDivRect.right;
201
202
  const menuToCenter = rootHostRect.left + (rootHostRect.width - menuItemsDivRect.width) / 2;
202
203
  let menuLeft = !isRTL ? menuToStart : menuToEnd;
203
204
  let menuTop = this.orientation === IgcContextMenuOrientation.bottom
@@ -224,7 +225,6 @@ let IgcContextMenuComponent = class {
224
225
  if (this.orientation === IgcContextMenuOrientation.bottom && menuBottom > hostRect.height) {
225
226
  menuTop = menuToTop;
226
227
  }
227
- menuLeft = menuLeft - menuItemsDivRect.left;
228
228
  this.menuItemsDiv.style.left = `${menuLeft}px`;
229
229
  this.menuItemsDiv.style.top = `${menuTop}px`;
230
230
  this.menuItemsDiv.style.visibility = 'visible';
@@ -235,6 +235,15 @@ let IgcContextMenuComponent = class {
235
235
  const firstMenuItem = this.menuItemsDiv.querySelector('div[part="menu-item"]');
236
236
  (_a = firstMenuItem) === null || _a === void 0 ? void 0 : _a.focus();
237
237
  }
238
+ isFloating(host) {
239
+ while (host) {
240
+ if (host.tagName && host.tagName.toLowerCase() === 'igc-floating-pane-component') {
241
+ return true;
242
+ }
243
+ host = host.parentNode;
244
+ }
245
+ return false;
246
+ }
238
247
  handleKeyboardEvents(item, ev) {
239
248
  const menuItemChildren = this.menuItemsDiv.querySelectorAll('div[part="menu-item"]');
240
249
  if (ev.key === 'ArrowDown') {
@@ -329,6 +338,7 @@ class IgcDockManagerService {
329
338
  constructor(dockManager) {
330
339
  this.dockManager = dockManager;
331
340
  this.unpinnedLocationMap = new Map();
341
+ this.keyboardDockPane = null;
332
342
  }
333
343
  getContent(contentId) {
334
344
  return this.clientContentPanesMap.get(contentId);
@@ -683,6 +693,14 @@ class IgcDockManagerService {
683
693
  updateLayout() {
684
694
  this.dockManager.layout = Object.assign({}, this.dockManager.layout);
685
695
  }
696
+ hasMaximizedProp(pane) {
697
+ return 'isMaximized' in pane;
698
+ }
699
+ getLastMaximizedPane() {
700
+ const keys = Array.from(this.paneParentMap.keys());
701
+ const maximizedPane = keys.filter(this.hasMaximizedProp).filter(i => i.isMaximized)[0];
702
+ return maximizedPane;
703
+ }
686
704
  processLayout() {
687
705
  this.paneParentMap = new Map();
688
706
  this.unpinnedLocationMap = new Map();
@@ -837,6 +855,12 @@ class IgcDockManagerService {
837
855
  const parent = this.getParent(pane);
838
856
  const targetPane = parent && parent.type === locale.IgcDockManagerPaneType.tabGroupPane && pane !== this.dockManager.flyoutPane ? parent : pane;
839
857
  this.dockManager.maximizedPane = this.dockManager.maximizedPane === targetPane ? null : targetPane;
858
+ if (this.dockManager.maximizedPane) {
859
+ targetPane.isMaximized = true;
860
+ }
861
+ else {
862
+ targetPane.isMaximized = false;
863
+ }
840
864
  }
841
865
  moveFloatingPane(pane, location) {
842
866
  pane.floatingLocation = location;
@@ -1750,36 +1774,46 @@ class IgcDockManagerKeyboardService {
1750
1774
  }
1751
1775
  }
1752
1776
  handleRootDockPane(key) {
1777
+ let position;
1753
1778
  switch (key) {
1754
1779
  case 'ArrowUp':
1755
- this.service.rootDockPane(locale.IgcDockingIndicatorPosition.top);
1780
+ position = locale.IgcDockingIndicatorPosition.top;
1756
1781
  break;
1757
1782
  case 'ArrowDown':
1758
- this.service.rootDockPane(locale.IgcDockingIndicatorPosition.bottom);
1783
+ position = locale.IgcDockingIndicatorPosition.bottom;
1759
1784
  break;
1760
1785
  case 'ArrowLeft':
1761
- this.service.rootDockPane(locale.IgcDockingIndicatorPosition.left);
1786
+ position = locale.IgcDockingIndicatorPosition.left;
1762
1787
  break;
1763
1788
  case 'ArrowRight':
1764
- this.service.rootDockPane(locale.IgcDockingIndicatorPosition.right);
1789
+ position = locale.IgcDockingIndicatorPosition.right;
1765
1790
  break;
1766
1791
  }
1792
+ if (position) {
1793
+ this.service.keyboardDockPane = this.service.dockManager.activePane;
1794
+ this.service.rootDockPane(position);
1795
+ }
1767
1796
  }
1768
1797
  handleInnerDockPane(key) {
1798
+ let position;
1769
1799
  switch (key) {
1770
1800
  case 'ArrowUp':
1771
- this.service.dockPane(locale.IgcDockingIndicatorPosition.top);
1801
+ position = locale.IgcDockingIndicatorPosition.top;
1772
1802
  break;
1773
1803
  case 'ArrowDown':
1774
- this.service.dockPane(locale.IgcDockingIndicatorPosition.bottom);
1804
+ position = locale.IgcDockingIndicatorPosition.bottom;
1775
1805
  break;
1776
1806
  case 'ArrowLeft':
1777
- this.service.dockPane(locale.IgcDockingIndicatorPosition.left);
1807
+ position = locale.IgcDockingIndicatorPosition.left;
1778
1808
  break;
1779
1809
  case 'ArrowRight':
1780
- this.service.dockPane(locale.IgcDockingIndicatorPosition.right);
1810
+ position = locale.IgcDockingIndicatorPosition.right;
1781
1811
  break;
1782
1812
  }
1813
+ if (position) {
1814
+ this.service.keyboardDockPane = this.service.dockManager.activePane;
1815
+ this.service.dockPane(position);
1816
+ }
1783
1817
  }
1784
1818
  setPaneNavigatorMeta(altKey, ctrlOrMetaKey, shiftKey) {
1785
1819
  let initIndex = 0;
@@ -1832,6 +1866,7 @@ let IgcDockManager = class {
1832
1866
  this.splitterResizeStart = index.createEvent(this, "splitterResizeStart", 7);
1833
1867
  this.splitterResizeEnd = index.createEvent(this, "splitterResizeEnd", 7);
1834
1868
  this.paneClose = index.createEvent(this, "paneClose", 7);
1869
+ this.paneScroll = index.createEvent(this, "paneScroll", 7);
1835
1870
  this.panePinnedToggle = index.createEvent(this, "panePinnedToggle", 7);
1836
1871
  this.activePaneChanged = index.createEvent(this, "activePaneChanged", 7);
1837
1872
  this.paneDragStart = index.createEvent(this, "paneDragStart", 7);
@@ -1954,6 +1989,7 @@ let IgcDockManager = class {
1954
1989
  this.allowMaximize = true;
1955
1990
  this.allowFloatingPanesResize = true;
1956
1991
  this.disableKeyboardNavigation = false;
1992
+ this.allowInnerDock = true;
1957
1993
  this.activePane = null;
1958
1994
  this.updateTemplates = () => {
1959
1995
  if (this.templates.size > 0) {
@@ -2111,6 +2147,22 @@ let IgcDockManager = class {
2111
2147
  async removePane(pane) {
2112
2148
  this.service.removePane(pane);
2113
2149
  }
2150
+ async focusPane(contentId) {
2151
+ const contentPane = this.service.getContent(contentId);
2152
+ const parentPane = this.service.getRootParent(contentPane);
2153
+ const isFloating = this.service.isFloatingPane(parentPane);
2154
+ const isUnpinned = contentPane.isPinned !== undefined && !contentPane.isPinned;
2155
+ if (isFloating) {
2156
+ this.service.bringFloatingPaneOnTop(parentPane);
2157
+ this.activePane = contentPane;
2158
+ }
2159
+ else if (isUnpinned) {
2160
+ this.handlePaneFlyout(contentPane);
2161
+ }
2162
+ else {
2163
+ this.activePane = contentPane;
2164
+ }
2165
+ }
2114
2166
  connectedCallback() {
2115
2167
  this.element.shadowRoot.addEventListener('focusout', this.handleShadowRootFocusOut);
2116
2168
  this.domObserver.observe(this.element, { attributes: true, subtree: true, childList: true });
@@ -2132,11 +2184,26 @@ let IgcDockManager = class {
2132
2184
  this.resourceStrings = locale.resourceStringsMap.has(lang) ? locale.resourceStringsMap.get(lang) : locale.resourceStringsMap.get('en');
2133
2185
  }
2134
2186
  }
2187
+ componentWillRender() {
2188
+ const lastMaximizedPane = this.service.getLastMaximizedPane();
2189
+ if (lastMaximizedPane && this.maximizedPane !== lastMaximizedPane) {
2190
+ const shouldFlyout = 'isPinned' in lastMaximizedPane && !lastMaximizedPane.isPinned;
2191
+ if (shouldFlyout) {
2192
+ this.handlePaneFlyout(lastMaximizedPane);
2193
+ }
2194
+ this.handleMaximize(lastMaximizedPane);
2195
+ }
2196
+ }
2135
2197
  componentDidRender() {
2136
2198
  while (this.scheduledCallbacks.length) {
2137
2199
  const callback = this.scheduledCallbacks.shift();
2138
2200
  callback();
2139
2201
  }
2202
+ if (this.service.keyboardDockPane) {
2203
+ this.setActivePane(this.service.keyboardDockPane);
2204
+ this.setFocus(this.service.keyboardDockPane);
2205
+ this.service.keyboardDockPane = null;
2206
+ }
2140
2207
  this.processTemplates();
2141
2208
  }
2142
2209
  disconnectedCallback() {
@@ -2357,8 +2424,10 @@ let IgcDockManager = class {
2357
2424
  }
2358
2425
  }
2359
2426
  handlePinToggle(pane) {
2427
+ const isPinned = this.service.getActualIsPinned(pane);
2428
+ const pinBehavior = !isPinned ? IgcPinBehavior.selectedPane : IgcPinBehavior.allPanes;
2360
2429
  this.shouldClearActivePane = false;
2361
- this.service.togglePin(pane);
2430
+ this.service.togglePin(pane, pinBehavior);
2362
2431
  this.scheduleAfterRender(() => {
2363
2432
  this.shouldClearActivePane = true;
2364
2433
  this.setFocus(pane);
@@ -2537,6 +2606,7 @@ let IgcDockManager = class {
2537
2606
  this.service.resizeFloatingPaneEnd(pane, event.detail.resizerLocation);
2538
2607
  }
2539
2608
  handleDropPositionChange(clientX, clientY, target) {
2609
+ var _a;
2540
2610
  const elements = clientX && clientY ?
2541
2611
  this.element.shadowRoot.elementsFromPoint(clientX, clientY) :
2542
2612
  null;
@@ -2547,7 +2617,7 @@ let IgcDockManager = class {
2547
2617
  const adjacentElement = elements[splitterIndex - 1];
2548
2618
  isOverSplitter = adjacentElement &&
2549
2619
  adjacentElement.tagName.toLowerCase() === 'igc-floating-pane-component' &&
2550
- adjacentElement.floatingId === this.draggedPane.id; // if not equal - splitter is below another element, not directly over
2620
+ adjacentElement.floatingId === ((_a = this.draggedPane) === null || _a === void 0 ? void 0 : _a.id); // if not equal - splitter is below another element, not directly over
2551
2621
  }
2552
2622
  if (!elements || !elements.length || isOverSplitter) {
2553
2623
  this.service.dockingIndicator = null;
@@ -2671,6 +2741,11 @@ let IgcDockManager = class {
2671
2741
  }
2672
2742
  });
2673
2743
  }
2744
+ handlePaneContentScroll(pane, event) {
2745
+ const contentElement = event.target;
2746
+ const args = { pane, contentElement: contentElement };
2747
+ this.paneScroll.emit(args);
2748
+ }
2674
2749
  handlePaneHeaderMouseDown(pane) {
2675
2750
  const rootNode = this.getRootNode();
2676
2751
  requestAnimationFrame(() => {
@@ -2842,7 +2917,7 @@ let IgcDockManager = class {
2842
2917
  'maximized': this.maximizedPane === pane
2843
2918
  }, header: pane.header, onFocusin: this.handleContentPaneFocus.bind(this, pane) }, index.h("igc-pane-header-component", { slot: "header", pane: pane, isActive: pane === this.activePane, disabled: pane.disabled && !isSingleFloatingContentPane, pinned: this.service.getActualIsPinned(pane), allowMaximize: this.resolveAllowMaximize(pane), maximized: maximized, allowClose: this.service.getActualAllowClose(pane), allowPinning: pane.allowPinning !== false, isFloating: isFloating, forcedDrag: forceDrag, resourceStrings: this.resourceStrings, onPinToggle: this.handlePinToggle.bind(this, pane), onMaximize: this.handleMaximize.bind(this, pane), onDragMoved: this.handlePaneDragMove.bind(this), onDragStarted: this.handlePaneDragStart.bind(this, isSingleFloatingContentPane ? floatingPane : pane), onDragEnded: this.handlePaneDragEnd.bind(this), onClose: this.handlePaneClose.bind(this, pane), onElementConnected: this.emitPaneHeaderConnected.bind(this, pane), onElementDisconnected: this.emitPaneHeaderDisconnected.bind(this, pane), onMouseDown: this.handlePaneHeaderMouseDown.bind(this, pane) }, (isFloating && pane.floatingHeaderId) ? index.h("slot", { name: pane.floatingHeaderId }) :
2844
2919
  pane.headerId ? index.h("slot", { name: pane.headerId }) :
2845
- pane.header), index.h("div", { class: "content", onMouseDown: this.handlePaneContentMouseDown.bind(this, pane) }, index.h("slot", { name: pane.contentId }))));
2920
+ 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 }))));
2846
2921
  }
2847
2922
  renderSplitter(parentPane, pane) {
2848
2923
  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) }));
@@ -2879,7 +2954,7 @@ let IgcDockManager = class {
2879
2954
  })));
2880
2955
  }
2881
2956
  renderTabPanel(pane, isInDocumentHost, isFloating) {
2882
- return (index.h("igc-tab-panel-component", { key: pane.id, disabled: pane.disabled, onMouseDown: isInDocumentHost ? this.handlePaneContentMouseDown.bind(this, pane) : null, onSelectedChanged: this.handleTabSelectedChanged.bind(this, pane) }, isInDocumentHost ?
2957
+ return (index.h("igc-tab-panel-component", { key: pane.id, disabled: pane.disabled, onMouseDown: isInDocumentHost ? this.handlePaneContentMouseDown.bind(this, pane) : null, onSelectedChanged: this.handleTabSelectedChanged.bind(this, pane), onScroll: isInDocumentHost ? this.handlePaneContentScroll.bind(this, pane) : null }, isInDocumentHost ?
2883
2958
  index.h("slot", { name: pane.contentId }) :
2884
2959
  this.renderContentPane(pane, isFloating, false)));
2885
2960
  }
@@ -3010,7 +3085,7 @@ let IgcDockManager = class {
3010
3085
  flexDirection: 'row',
3011
3086
  justifyContent: 'space-between'
3012
3087
  } }, !this.documentOnlyDrag && this.renderRootDockingIndicator(startPosition), !this.documentOnlyDrag && this.renderRootDockingIndicator(endPosition)), !this.documentOnlyDrag && this.renderRootDockingIndicator(locale.IgcDockingIndicatorPosition.bottom), this.dropTargetPaneInfo &&
3013
- index.h("igc-joystick-indicator-component", { dropTargetPaneInfo: this.dropTargetPaneInfo, documentOnlyDrag: this.documentOnlyDrag })));
3088
+ index.h("igc-joystick-indicator-component", { dropTargetPaneInfo: this.dropTargetPaneInfo, documentOnlyDrag: this.documentOnlyDrag, allowCenterDock: this.allowInnerDock })));
3014
3089
  }
3015
3090
  renderContextMenu() {
3016
3091
  return this.contextMenuMeta && (index.h("igc-context-menu-component", { onMenuClosed: this.handleContextMenuClosed.bind(this), orientation: IgcContextMenuOrientation.bottom, items: this.contextMenuMeta.menuItems, target: this.contextMenuMeta.target, position: this.contextMenuMeta.position }));
@@ -3361,6 +3436,16 @@ let IgcJoystickIndicatorComponent = class {
3361
3436
  return ((el && el.closest(selector)) ||
3362
3437
  this.closestElement(selector, el.getRootNode().host));
3363
3438
  }
3439
+ shouldAllowCenterDock() {
3440
+ let targetPane = this.dropTargetPaneInfo.pane;
3441
+ targetPane = targetPane.type === locale.IgcDockManagerPaneType.tabGroupPane && targetPane.selectedIndex > -1 ? targetPane.panes[targetPane.selectedIndex] : targetPane;
3442
+ return targetPane.type === locale.IgcDockManagerPaneType.contentPane && targetPane.acceptsInnerDock !== undefined
3443
+ ? targetPane.acceptsInnerDock
3444
+ : this.allowCenterDock;
3445
+ }
3446
+ renderBlankIndicator(position) {
3447
+ return (index.h("igc-joystick-icon-component", { isDocHost: this.isDocHost, position: position, direction: Utils.getDirection(this.closestElement('igc-dockmanager', this.element)), empty: true }));
3448
+ }
3364
3449
  renderIndicator(position) {
3365
3450
  return (index.h("igc-joystick-icon-component", { isDocHost: this.isDocHost, position: position, direction: Utils.getDirection(this.closestElement('igc-dockmanager', this.element)), empty: this.isEmptyCenter(position) || this.isEmptyEdge(position) }));
3366
3451
  }
@@ -3374,7 +3459,7 @@ let IgcJoystickIndicatorComponent = class {
3374
3459
  } }, index.h("div", { class: {
3375
3460
  'indicators-container': true,
3376
3461
  'indicators-container--doc-host': this.isDocHost
3377
- } }, this.isDocHost && !this.documentOnlyDrag && this.renderIndicator(locale.IgcDockingIndicatorPosition.outerLeft), this.renderIndicator(locale.IgcDockingIndicatorPosition.left), this.isDocHost && !this.documentOnlyDrag && this.renderIndicator(locale.IgcDockingIndicatorPosition.outerTop), this.renderIndicator(locale.IgcDockingIndicatorPosition.top), this.renderIndicator(locale.IgcDockingIndicatorPosition.center), this.renderIndicator(locale.IgcDockingIndicatorPosition.right), this.isDocHost && !this.documentOnlyDrag && this.renderIndicator(locale.IgcDockingIndicatorPosition.outerRight), this.renderIndicator(locale.IgcDockingIndicatorPosition.bottom), this.isDocHost && !this.documentOnlyDrag && this.renderIndicator(locale.IgcDockingIndicatorPosition.outerBottom))));
3462
+ } }, this.isDocHost && !this.documentOnlyDrag && this.renderIndicator(locale.IgcDockingIndicatorPosition.outerLeft), this.renderIndicator(locale.IgcDockingIndicatorPosition.left), this.isDocHost && !this.documentOnlyDrag && this.renderIndicator(locale.IgcDockingIndicatorPosition.outerTop), this.renderIndicator(locale.IgcDockingIndicatorPosition.top), !this.shouldAllowCenterDock() && this.renderBlankIndicator(locale.IgcDockingIndicatorPosition.center), this.shouldAllowCenterDock() && this.renderIndicator(locale.IgcDockingIndicatorPosition.center), this.renderIndicator(locale.IgcDockingIndicatorPosition.right), this.isDocHost && !this.documentOnlyDrag && this.renderIndicator(locale.IgcDockingIndicatorPosition.outerRight), this.renderIndicator(locale.IgcDockingIndicatorPosition.bottom), this.isDocHost && !this.documentOnlyDrag && this.renderIndicator(locale.IgcDockingIndicatorPosition.outerBottom))));
3378
3463
  }
3379
3464
  get element() { return index.getElement(this); }
3380
3465
  };
@@ -4237,6 +4322,7 @@ let IgcTabsComponent = class {
4237
4322
  this.selectedTabOutOfView = index.createEvent(this, "selectedTabOutOfView", 3);
4238
4323
  this.rendered = index.createEvent(this, "rendered", 7);
4239
4324
  this.forcedUpdate = false;
4325
+ this.selectionOrder = [];
4240
4326
  this.hasHiddenTabs = false;
4241
4327
  this.allowMaximize = true;
4242
4328
  this.tabHeadersPosition = IgcTabHeadersPosition.top;
@@ -4244,8 +4330,9 @@ let IgcTabsComponent = class {
4244
4330
  this.showHiddenTabsMenu = true;
4245
4331
  this.resizeObserver = new ResizeObserver(this.tabHeadersDivResized.bind(this));
4246
4332
  this.slotChanged = () => {
4247
- this.updateSelectedIndex();
4248
4333
  this.setTabsAttributes();
4334
+ this.updateSelection();
4335
+ this.handleSelectedIndexChanged(this.selectedIndex);
4249
4336
  this.forceUpdate();
4250
4337
  };
4251
4338
  this.onTabKeyDown = (ev) => {
@@ -4285,9 +4372,31 @@ let IgcTabsComponent = class {
4285
4372
  }
4286
4373
  componentWillLoad() {
4287
4374
  this.hiddenTabsMenuMeta = null;
4288
- this.updateSelectedIndex();
4375
+ this.handleSelectedIndexChanged(this.selectedIndex);
4289
4376
  this.checkForActivePane();
4290
4377
  }
4378
+ componentWillUpdate() {
4379
+ this.updateSelection();
4380
+ }
4381
+ updateSelection() {
4382
+ var _a;
4383
+ const headers = this.tabHeaders;
4384
+ // if any header is removed - delete its id from selection order & update selected index
4385
+ const missingMatchIndex = this.selectionOrder.findIndex(s => headers.findIndex(h => h.id === s) < 0);
4386
+ if (missingMatchIndex > -1) {
4387
+ this.selectionOrder.splice(missingMatchIndex, 1);
4388
+ const newSelectedIndex = headers.findIndex(h => h.id === this.selectionOrder[this.selectionOrder.length - 1]);
4389
+ this.selectedIndex = newSelectedIndex > -1 ? newSelectedIndex : 0;
4390
+ }
4391
+ const currentSelectionId = (_a = headers[this.selectedIndex]) === null || _a === void 0 ? void 0 : _a.id;
4392
+ const existingMatchIndex = this.selectionOrder.indexOf(currentSelectionId);
4393
+ if (existingMatchIndex > -1) {
4394
+ this.selectionOrder.splice(existingMatchIndex, 1);
4395
+ }
4396
+ if (currentSelectionId) {
4397
+ this.selectionOrder.push(currentSelectionId);
4398
+ }
4399
+ }
4291
4400
  componentDidRender() {
4292
4401
  this.rendered.emit();
4293
4402
  }
@@ -4326,18 +4435,6 @@ let IgcTabsComponent = class {
4326
4435
  this.forcedUpdate = true;
4327
4436
  index.forceUpdate(this);
4328
4437
  }
4329
- updateSelectedIndex() {
4330
- const tabPanels = this.tabPanels;
4331
- if (tabPanels.length === 0) {
4332
- return;
4333
- }
4334
- if (this.selectedIndex > tabPanels.length - 1) {
4335
- this.selectedIndex = tabPanels.length - 1;
4336
- }
4337
- else {
4338
- this.handleSelectedIndexChanged(this.selectedIndex);
4339
- }
4340
- }
4341
4438
  get tabPanels() {
4342
4439
  return Array.from(this.el.querySelectorAll('igc-tab-panel-component'));
4343
4440
  }
@@ -4579,7 +4676,8 @@ let SampleComponent = class {
4579
4676
  type: locale.IgcDockManagerPaneType.contentPane,
4580
4677
  header: 'App.xaml',
4581
4678
  contentId: 'content8',
4582
- allowMaximize: true
4679
+ allowMaximize: true,
4680
+ acceptsInnerDock: false
4583
4681
  }
4584
4682
  ]
4585
4683
  }
@@ -4661,7 +4759,8 @@ let SampleComponent = class {
4661
4759
  {
4662
4760
  type: locale.IgcDockManagerPaneType.contentPane,
4663
4761
  header: 'Floating 1',
4664
- contentId: 'content10'
4762
+ contentId: 'content10',
4763
+ acceptsInnerDock: false
4665
4764
  },
4666
4765
  {
4667
4766
  type: locale.IgcDockManagerPaneType.contentPane,
@@ -4865,6 +4964,9 @@ let SampleComponent = class {
4865
4964
  tabGroupPane.panes[0].disabled = true;
4866
4965
  this.dockManager.layout = Object.assign({}, this.layout);
4867
4966
  }
4967
+ focusPane() {
4968
+ this.dockManager.focusPane('content12');
4969
+ }
4868
4970
  findElement(pane, type) {
4869
4971
  if (!pane) {
4870
4972
  return;
@@ -4939,6 +5041,17 @@ let SampleComponent = class {
4939
5041
  // event.preventDefault();
4940
5042
  // }
4941
5043
  }
5044
+ handlePaneScroll(event) {
5045
+ this.log(event);
5046
+ // // check if the pane content is scrolled to bottom
5047
+ // let scrolledToBottom = false;
5048
+ // const contentEl = event.detail.contentElement;
5049
+ // if (contentEl.scrollHeight - contentEl.scrollTop - contentEl.clientHeight < 1)
5050
+ // {
5051
+ // scrolledToBottom = true;
5052
+ // }
5053
+ // this.log("Scrolled to bottom: " + scrolledToBottom);
5054
+ }
4942
5055
  handlePinnedToggle(event) {
4943
5056
  this.log(event);
4944
5057
  // if (event.detail.sourcePane.type === IgcDockManagerPaneType.contentPane) {
@@ -4997,13 +5110,13 @@ let SampleComponent = class {
4997
5110
  }
4998
5111
  }
4999
5112
  render() {
5000
- return (index.h(index.Host, null, index.h("div", null, index.h("button", { onClick: () => this.saveLayout() }, "Save Layout"), index.h("button", { onClick: () => this.loadLayout() }, "Load Layout"), index.h("button", { onClick: () => this.setActivePane() }, "Set Active Pane"), index.h("button", { onClick: () => this.addPane() }, "Add Floating Pane"), index.h("button", { onClick: () => this.addTab() }, "Add Tab Pane"), index.h("button", { onClick: () => this.disableContentPane() }, "Disable Tab Pane"), index.h("input", { id: "hideOnClose", type: "checkbox", style: { marginLeft: '20px' }, ref: el => this.hideOnCloseCheckbox = el }), index.h("label", { htmlFor: "hideOnClose" }, "Hide on close"), index.h("span", { style: { marginLeft: '20px' } }, "Hidden Panes:"), index.h("select", { style: { width: '150px' }, ref: el => this.hiddenPanesSelect = el }, this.hiddenPanes.map(p => {
5113
+ return (index.h(index.Host, null, index.h("div", null, index.h("button", { onClick: () => this.saveLayout() }, "Save Layout"), index.h("button", { onClick: () => this.loadLayout() }, "Load Layout"), index.h("button", { onClick: () => this.setActivePane() }, "Set Active Pane"), index.h("button", { onClick: () => this.addPane() }, "Add Floating Pane"), index.h("button", { onClick: () => this.addTab() }, "Add Tab Pane"), index.h("button", { onClick: () => this.disableContentPane() }, "Disable Tab Pane"), index.h("button", { onClick: () => this.focusPane() }, "Focus Pane"), index.h("input", { id: "hideOnClose", type: "checkbox", style: { marginLeft: '20px' }, ref: el => this.hideOnCloseCheckbox = el }), index.h("label", { htmlFor: "hideOnClose" }, "Hide on close"), index.h("span", { style: { marginLeft: '20px' } }, "Hidden Panes:"), index.h("select", { style: { width: '150px' }, ref: el => this.hiddenPanesSelect = el }, this.hiddenPanes.map(p => {
5001
5114
  return (index.h("option", { value: p.id }, p.header));
5002
- })), index.h("button", { onClick: () => this.showPane() }, "Show Pane"), index.h("button", { onClick: () => this.showAllPanes() }, "Show All Panes")), index.h("igc-dockmanager", { layout: this.layout, onPaneClose: this.handlePaneClose.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),
5115
+ })), index.h("button", { onClick: () => this.showPane() }, "Show Pane"), index.h("button", { onClick: () => this.showAllPanes() }, "Show All Panes")), 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),
5003
5116
  // resourceStrings={this.getCustomResourceStrings()}
5004
5117
  ref: el => this.dockManager = el,
5005
5118
  // allowFloatingPanesResize={false}
5006
- 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("button", { style: { background: 'pink' }, slot: "tabHeaderCloseButton" }, "Y"), index.h("div", { slot: "content1", style: { width: '100%', height: '100%' } }, "Content 1"), index.h("div", { slot: "content2", style: { width: '100%', height: '100%' } }, index.h("button", null, "Tests")), index.h("div", { slot: "content3", style: { width: '100%', height: '100%' } }, "Content 3"), index.h("div", { slot: "content4" }, "Content 4"), index.h("div", { slot: "content5", style: { width: '100%', height: '100%' } }, "Content 5"), index.h("div", { slot: "content6", style: { width: '100%', height: '100%' } }, "Content 6"), index.h("div", { slot: "content7", style: { width: '100%', height: '100%' } }, "Content 7"), index.h("div", { slot: "content8" }, "Content 8"), index.h("div", { slot: "content9", style: { width: '100%', height: '100%' } }, "Content 9"), index.h("div", { slot: "content10", style: { width: '100%', height: '100%' } }, index.h("button", null, "Test")), index.h("div", { slot: "content11", style: { width: '100%', height: '100%' } }, index.h("input", null)), index.h("div", { slot: "content12", style: { width: '100%', height: '100%' } }, "Content 12"), index.h("div", { slot: "content13", style: { width: '100%', height: '100%' } }, "Content 13"), index.h("div", { slot: "content14", style: { width: '100%', height: '100%' } }, "Content 14"), index.h("div", { slot: "toolboxHeader" }, index.h("span", null, "[U] Toolbox")), index.h("div", { slot: "teamExplorerHeader" }, index.h("span", null, "[U] Team Explorer")))));
5119
+ 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("button", { style: { background: 'pink' }, slot: "tabHeaderCloseButton" }, "Y"), index.h("div", { slot: "content1", style: { width: '100%', height: '100%' } }, "Content 1"), index.h("div", { slot: "content2", style: { width: '100%', height: '100%' } }, index.h("button", null, "Tests")), index.h("div", { slot: "content3", style: { width: '100%', height: '100%' } }, "Content 3"), index.h("div", { slot: "content4" }, "Content 4"), index.h("div", { slot: "content5", style: { width: '100%', height: '100%' } }, "Content 5"), index.h("div", { slot: "content6", style: { width: '100%', height: '100%' } }, "Content 6"), index.h("div", { slot: "content7", style: { width: '100%', height: '100%' } }, "Content 7"), index.h("div", { slot: "content8" }, "Content 8"), index.h("div", { slot: "content9", style: { width: '100%', height: '100%' } }, "Content 9"), index.h("div", { slot: "content10", style: { width: '100%', height: '100%' } }, index.h("button", null, "Test")), index.h("div", { slot: "content11", style: { width: '100%', height: '100%' } }, index.h("input", null)), index.h("div", { slot: "content12", style: { width: '100%', height: '100%' } }, index.h("p", null, "Content 12 "), index.h("p", null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ")), index.h("div", { slot: "content13", style: { width: '100%', height: '100%' } }, "Content 13"), index.h("div", { slot: "content14", style: { width: '100%', height: '100%' } }, "Content 14"), index.h("div", { slot: "toolboxHeader" }, index.h("span", null, "[U] Toolbox")), index.h("div", { slot: "teamExplorerHeader" }, index.h("span", null, "[U] Team Explorer")))));
5007
5120
  }
5008
5121
  };
5009
5122
  SampleComponent.style = sampleComponentCss;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-f11f2141.js');
3
+ const index = require('./index-2e72b990.js');
4
4
 
5
5
  /*
6
6
  Stencil Client Patch Browser v2.12.1 | MIT Licensed | https://stenciljs.com
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["igc-button-component_20.cjs",[[2,"sample-component",{"hiddenPanes":[1040]}],[1,"igc-dockmanager",{"navigationPaneMeta":[1040],"allowMaximize":[4,"allow-maximize"],"showHeaderIconOnHover":[1,"show-header-icon-on-hover"],"maximizedPane":[1040],"resourceStrings":[1040],"allowFloatingPanesResize":[4,"allow-floating-panes-resize"],"disableKeyboardNavigation":[4,"disable-keyboard-navigation"],"contextMenuPosition":[1,"context-menu-position"],"layout":[1040],"draggedPane":[1040],"dropPosition":[16],"activePane":[1040],"dropTargetPaneInfo":[32],"flyoutPane":[32],"floatingPaneZIndicesMap":[32],"contextMenuMeta":[32],"dropShadowRect":[32],"templates":[32],"hasCustomMaximizeButton":[32],"hasCustomMinimizeButton":[32],"dropPane":[64],"removePane":[64]},[[0,"focusout","handleFocusOut"],[0,"keydown","handleKeyDown"],[1,"pointerdown","handlePointerDown"],[1,"pointerup","handlePointerUp"]]],[1,"igc-tabs-component",{"size":[2],"maximized":[4],"allowMaximize":[4,"allow-maximize"],"tabHeadersPosition":[1,"tab-headers-position"],"selectedIndex":[1026,"selected-index"],"hasHeaders":[4,"has-headers"],"showHiddenTabsMenu":[4,"show-hidden-tabs-menu"],"resourceStrings":[16],"hiddenTabsMenuMeta":[32],"hasHiddenTabs":[32]},[[0,"tabMouseDown","handleTabMouseDown"]]],[2,"igc-joystick-indicator-component",{"dropTargetPaneInfo":[16],"documentOnlyDrag":[4,"document-only-drag"]}],[1,"igc-pane-header-component",{"dragService":[1040],"pinned":[4],"maximized":[4],"isFloating":[4,"is-floating"],"forcedDrag":[4,"forced-drag"],"isFloatingPaneHeader":[4,"is-floating-pane-header"],"allowClose":[4,"allow-close"],"allowMaximize":[4,"allow-maximize"],"allowPinning":[4,"allow-pinning"],"pane":[16],"isActive":[4,"is-active"],"disabled":[4],"resourceStrings":[16]}],[1,"igc-tab-header-component",{"dragService":[1040],"selected":[4],"hovered":[4],"position":[1],"iconName":[1,"icon-name"],"header":[1],"isActive":[4,"is-active"],"resourceStrings":[16],"forcedDrag":[4,"forced-drag"],"disabled":[4],"showHeaderIconOnHover":[1,"show-header-icon-on-hover"]},[[1,"mousedown","handleMouseDown"],[1,"mouseenter","handleMouseEnter"],[1,"mouseleave","handleMouseLeave"]]],[1,"igc-floating-pane-component",{"allowResize":[4,"allow-resize"],"floatingLocation":[16],"floatingWidth":[2,"floating-width"],"floatingHeight":[2,"floating-height"],"hasHeader":[4,"has-header"],"maximized":[4],"floatingMinHeight":[2,"floating-min-height"],"floatingMinWidth":[2,"floating-min-width"],"floatingId":[1,"floating-id"]}],[2,"igc-root-docking-indicator-component",{"position":[1]}],[1,"igc-content-pane-component",{"size":[2],"isFlyout":[4,"is-flyout"],"unpinnedSize":[2,"unpinned-size"],"header":[1],"disabled":[4],"isSingleFloating":[4,"is-single-floating"]}],[2,"igc-document-host-component",{"size":[2]}],[1,"igc-pane-navigator-component",{"activeDocuments":[16],"activePanes":[16],"selectedIndex":[1026,"selected-index"],"previousActivePaneIndex":[2,"previous-active-pane-index"],"resourceStrings":[16]},[[0,"keyup","handleKeyUp"],[0,"keydown","handleKeydown"]]],[2,"igc-split-pane-component",{"orientation":[1],"size":[2]}],[1,"igc-splitter-component",{"showDragGhost":[4,"show-drag-ghost"],"splitPaneOrientation":[1,"split-pane-orientation"],"flyoutLocation":[1,"flyout-location"],"dragOffset":[32],"hasCustomSplitterHandle":[32]},[[0,"keydown","handleKeydownEvent"],[1,"mousedown","handleMouseDown"]]],[1,"igc-tab-panel-component",{"selected":[4],"disabled":[4]}],[1,"igc-unpinned-pane-header-component",{"location":[1],"isActive":[4,"is-active"],"disabled":[4]}],[1,"igc-context-menu-component",{"orientation":[1],"position":[1],"target":[16],"items":[16],"activeIndex":[1026,"active-index"]},[[0,"focusout","emitMenuClosed"]]],[2,"igc-joystick-icon-component",{"isDocHost":[4,"is-doc-host"],"position":[1],"direction":[1],"empty":[4]}],[2,"igc-resizer-component",{"orientation":[1],"dragOffsetX":[32],"dragOffsetY":[32]}],[1,"igc-button-component",{"disabled":[4],"name":[513],"type":[513],"value":[513]}],[2,"igc-icon-component",{"name":[1]}]]]], options);
18
+ return index.bootstrapLazy([["igc-button-component_20.cjs",[[2,"sample-component",{"hiddenPanes":[1040]}],[1,"igc-dockmanager",{"navigationPaneMeta":[1040],"allowMaximize":[4,"allow-maximize"],"showHeaderIconOnHover":[1,"show-header-icon-on-hover"],"maximizedPane":[1040],"resourceStrings":[1040],"allowFloatingPanesResize":[4,"allow-floating-panes-resize"],"disableKeyboardNavigation":[4,"disable-keyboard-navigation"],"contextMenuPosition":[1,"context-menu-position"],"allowInnerDock":[4,"allow-inner-dock"],"layout":[1040],"draggedPane":[1040],"dropPosition":[16],"activePane":[1040],"dropTargetPaneInfo":[32],"flyoutPane":[32],"floatingPaneZIndicesMap":[32],"contextMenuMeta":[32],"dropShadowRect":[32],"templates":[32],"hasCustomMaximizeButton":[32],"hasCustomMinimizeButton":[32],"dropPane":[64],"removePane":[64],"focusPane":[64]},[[0,"focusout","handleFocusOut"],[0,"keydown","handleKeyDown"],[1,"pointerdown","handlePointerDown"],[1,"pointerup","handlePointerUp"]]],[1,"igc-tabs-component",{"size":[2],"maximized":[4],"allowMaximize":[4,"allow-maximize"],"tabHeadersPosition":[1,"tab-headers-position"],"selectedIndex":[1026,"selected-index"],"hasHeaders":[4,"has-headers"],"showHiddenTabsMenu":[4,"show-hidden-tabs-menu"],"resourceStrings":[16],"hiddenTabsMenuMeta":[32],"hasHiddenTabs":[32]},[[0,"tabMouseDown","handleTabMouseDown"]]],[2,"igc-joystick-indicator-component",{"dropTargetPaneInfo":[16],"documentOnlyDrag":[4,"document-only-drag"],"allowCenterDock":[4,"allow-center-dock"]}],[1,"igc-pane-header-component",{"dragService":[1040],"pinned":[4],"maximized":[4],"isFloating":[4,"is-floating"],"forcedDrag":[4,"forced-drag"],"isFloatingPaneHeader":[4,"is-floating-pane-header"],"allowClose":[4,"allow-close"],"allowMaximize":[4,"allow-maximize"],"allowPinning":[4,"allow-pinning"],"pane":[16],"isActive":[4,"is-active"],"disabled":[4],"resourceStrings":[16]}],[1,"igc-tab-header-component",{"dragService":[1040],"selected":[4],"hovered":[4],"position":[1],"iconName":[1,"icon-name"],"header":[1],"isActive":[4,"is-active"],"resourceStrings":[16],"forcedDrag":[4,"forced-drag"],"disabled":[4],"showHeaderIconOnHover":[1,"show-header-icon-on-hover"]},[[1,"mousedown","handleMouseDown"],[1,"mouseenter","handleMouseEnter"],[1,"mouseleave","handleMouseLeave"]]],[1,"igc-floating-pane-component",{"allowResize":[4,"allow-resize"],"floatingLocation":[16],"floatingWidth":[2,"floating-width"],"floatingHeight":[2,"floating-height"],"hasHeader":[4,"has-header"],"maximized":[4],"floatingMinHeight":[2,"floating-min-height"],"floatingMinWidth":[2,"floating-min-width"],"floatingId":[1,"floating-id"]}],[2,"igc-root-docking-indicator-component",{"position":[1]}],[1,"igc-content-pane-component",{"size":[2],"isFlyout":[4,"is-flyout"],"unpinnedSize":[2,"unpinned-size"],"header":[1],"disabled":[4],"isSingleFloating":[4,"is-single-floating"]}],[2,"igc-document-host-component",{"size":[2]}],[1,"igc-pane-navigator-component",{"activeDocuments":[16],"activePanes":[16],"selectedIndex":[1026,"selected-index"],"previousActivePaneIndex":[2,"previous-active-pane-index"],"resourceStrings":[16]},[[0,"keyup","handleKeyUp"],[0,"keydown","handleKeydown"]]],[2,"igc-split-pane-component",{"orientation":[1],"size":[2]}],[1,"igc-splitter-component",{"showDragGhost":[4,"show-drag-ghost"],"splitPaneOrientation":[1,"split-pane-orientation"],"flyoutLocation":[1,"flyout-location"],"dragOffset":[32],"hasCustomSplitterHandle":[32]},[[0,"keydown","handleKeydownEvent"],[1,"mousedown","handleMouseDown"]]],[1,"igc-tab-panel-component",{"selected":[4],"disabled":[4]}],[1,"igc-unpinned-pane-header-component",{"location":[1],"isActive":[4,"is-active"],"disabled":[4]}],[1,"igc-context-menu-component",{"orientation":[1],"position":[1],"target":[16],"items":[16],"activeIndex":[1026,"active-index"]},[[0,"focusout","emitMenuClosed"]]],[2,"igc-joystick-icon-component",{"isDocHost":[4,"is-doc-host"],"position":[1],"direction":[1],"empty":[4]}],[2,"igc-resizer-component",{"orientation":[1],"dragOffsetX":[32],"dragOffsetY":[32]}],[1,"igc-button-component",{"disabled":[4],"name":[513],"type":[513],"value":[513]}],[2,"igc-icon-component",{"name":[1]}]]]], options);
19
19
  });
@@ -758,6 +758,14 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
758
758
  promise = safeCall(instance, 'componentWillLoad');
759
759
  }
760
760
  }
761
+ else {
762
+ {
763
+ promise = safeCall(instance, 'componentWillUpdate');
764
+ }
765
+ }
766
+ {
767
+ promise = then(promise, () => safeCall(instance, 'componentWillRender'));
768
+ }
761
769
  endSchedule();
762
770
  return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
763
771
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const locale = require('./locale-758076f2.js');
5
+ const locale = require('./locale-17d229ad.js');
6
6
 
7
7
 
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f11f2141.js');
5
+ const index = require('./index-2e72b990.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Esm v2.12.1 | MIT Licensed | https://stenciljs.com
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["igc-button-component_20.cjs",[[2,"sample-component",{"hiddenPanes":[1040]}],[1,"igc-dockmanager",{"navigationPaneMeta":[1040],"allowMaximize":[4,"allow-maximize"],"showHeaderIconOnHover":[1,"show-header-icon-on-hover"],"maximizedPane":[1040],"resourceStrings":[1040],"allowFloatingPanesResize":[4,"allow-floating-panes-resize"],"disableKeyboardNavigation":[4,"disable-keyboard-navigation"],"contextMenuPosition":[1,"context-menu-position"],"layout":[1040],"draggedPane":[1040],"dropPosition":[16],"activePane":[1040],"dropTargetPaneInfo":[32],"flyoutPane":[32],"floatingPaneZIndicesMap":[32],"contextMenuMeta":[32],"dropShadowRect":[32],"templates":[32],"hasCustomMaximizeButton":[32],"hasCustomMinimizeButton":[32],"dropPane":[64],"removePane":[64]},[[0,"focusout","handleFocusOut"],[0,"keydown","handleKeyDown"],[1,"pointerdown","handlePointerDown"],[1,"pointerup","handlePointerUp"]]],[1,"igc-tabs-component",{"size":[2],"maximized":[4],"allowMaximize":[4,"allow-maximize"],"tabHeadersPosition":[1,"tab-headers-position"],"selectedIndex":[1026,"selected-index"],"hasHeaders":[4,"has-headers"],"showHiddenTabsMenu":[4,"show-hidden-tabs-menu"],"resourceStrings":[16],"hiddenTabsMenuMeta":[32],"hasHiddenTabs":[32]},[[0,"tabMouseDown","handleTabMouseDown"]]],[2,"igc-joystick-indicator-component",{"dropTargetPaneInfo":[16],"documentOnlyDrag":[4,"document-only-drag"]}],[1,"igc-pane-header-component",{"dragService":[1040],"pinned":[4],"maximized":[4],"isFloating":[4,"is-floating"],"forcedDrag":[4,"forced-drag"],"isFloatingPaneHeader":[4,"is-floating-pane-header"],"allowClose":[4,"allow-close"],"allowMaximize":[4,"allow-maximize"],"allowPinning":[4,"allow-pinning"],"pane":[16],"isActive":[4,"is-active"],"disabled":[4],"resourceStrings":[16]}],[1,"igc-tab-header-component",{"dragService":[1040],"selected":[4],"hovered":[4],"position":[1],"iconName":[1,"icon-name"],"header":[1],"isActive":[4,"is-active"],"resourceStrings":[16],"forcedDrag":[4,"forced-drag"],"disabled":[4],"showHeaderIconOnHover":[1,"show-header-icon-on-hover"]},[[1,"mousedown","handleMouseDown"],[1,"mouseenter","handleMouseEnter"],[1,"mouseleave","handleMouseLeave"]]],[1,"igc-floating-pane-component",{"allowResize":[4,"allow-resize"],"floatingLocation":[16],"floatingWidth":[2,"floating-width"],"floatingHeight":[2,"floating-height"],"hasHeader":[4,"has-header"],"maximized":[4],"floatingMinHeight":[2,"floating-min-height"],"floatingMinWidth":[2,"floating-min-width"],"floatingId":[1,"floating-id"]}],[2,"igc-root-docking-indicator-component",{"position":[1]}],[1,"igc-content-pane-component",{"size":[2],"isFlyout":[4,"is-flyout"],"unpinnedSize":[2,"unpinned-size"],"header":[1],"disabled":[4],"isSingleFloating":[4,"is-single-floating"]}],[2,"igc-document-host-component",{"size":[2]}],[1,"igc-pane-navigator-component",{"activeDocuments":[16],"activePanes":[16],"selectedIndex":[1026,"selected-index"],"previousActivePaneIndex":[2,"previous-active-pane-index"],"resourceStrings":[16]},[[0,"keyup","handleKeyUp"],[0,"keydown","handleKeydown"]]],[2,"igc-split-pane-component",{"orientation":[1],"size":[2]}],[1,"igc-splitter-component",{"showDragGhost":[4,"show-drag-ghost"],"splitPaneOrientation":[1,"split-pane-orientation"],"flyoutLocation":[1,"flyout-location"],"dragOffset":[32],"hasCustomSplitterHandle":[32]},[[0,"keydown","handleKeydownEvent"],[1,"mousedown","handleMouseDown"]]],[1,"igc-tab-panel-component",{"selected":[4],"disabled":[4]}],[1,"igc-unpinned-pane-header-component",{"location":[1],"isActive":[4,"is-active"],"disabled":[4]}],[1,"igc-context-menu-component",{"orientation":[1],"position":[1],"target":[16],"items":[16],"activeIndex":[1026,"active-index"]},[[0,"focusout","emitMenuClosed"]]],[2,"igc-joystick-icon-component",{"isDocHost":[4,"is-doc-host"],"position":[1],"direction":[1],"empty":[4]}],[2,"igc-resizer-component",{"orientation":[1],"dragOffsetX":[32],"dragOffsetY":[32]}],[1,"igc-button-component",{"disabled":[4],"name":[513],"type":[513],"value":[513]}],[2,"igc-icon-component",{"name":[1]}]]]], options);
17
+ return index.bootstrapLazy([["igc-button-component_20.cjs",[[2,"sample-component",{"hiddenPanes":[1040]}],[1,"igc-dockmanager",{"navigationPaneMeta":[1040],"allowMaximize":[4,"allow-maximize"],"showHeaderIconOnHover":[1,"show-header-icon-on-hover"],"maximizedPane":[1040],"resourceStrings":[1040],"allowFloatingPanesResize":[4,"allow-floating-panes-resize"],"disableKeyboardNavigation":[4,"disable-keyboard-navigation"],"contextMenuPosition":[1,"context-menu-position"],"allowInnerDock":[4,"allow-inner-dock"],"layout":[1040],"draggedPane":[1040],"dropPosition":[16],"activePane":[1040],"dropTargetPaneInfo":[32],"flyoutPane":[32],"floatingPaneZIndicesMap":[32],"contextMenuMeta":[32],"dropShadowRect":[32],"templates":[32],"hasCustomMaximizeButton":[32],"hasCustomMinimizeButton":[32],"dropPane":[64],"removePane":[64],"focusPane":[64]},[[0,"focusout","handleFocusOut"],[0,"keydown","handleKeyDown"],[1,"pointerdown","handlePointerDown"],[1,"pointerup","handlePointerUp"]]],[1,"igc-tabs-component",{"size":[2],"maximized":[4],"allowMaximize":[4,"allow-maximize"],"tabHeadersPosition":[1,"tab-headers-position"],"selectedIndex":[1026,"selected-index"],"hasHeaders":[4,"has-headers"],"showHiddenTabsMenu":[4,"show-hidden-tabs-menu"],"resourceStrings":[16],"hiddenTabsMenuMeta":[32],"hasHiddenTabs":[32]},[[0,"tabMouseDown","handleTabMouseDown"]]],[2,"igc-joystick-indicator-component",{"dropTargetPaneInfo":[16],"documentOnlyDrag":[4,"document-only-drag"],"allowCenterDock":[4,"allow-center-dock"]}],[1,"igc-pane-header-component",{"dragService":[1040],"pinned":[4],"maximized":[4],"isFloating":[4,"is-floating"],"forcedDrag":[4,"forced-drag"],"isFloatingPaneHeader":[4,"is-floating-pane-header"],"allowClose":[4,"allow-close"],"allowMaximize":[4,"allow-maximize"],"allowPinning":[4,"allow-pinning"],"pane":[16],"isActive":[4,"is-active"],"disabled":[4],"resourceStrings":[16]}],[1,"igc-tab-header-component",{"dragService":[1040],"selected":[4],"hovered":[4],"position":[1],"iconName":[1,"icon-name"],"header":[1],"isActive":[4,"is-active"],"resourceStrings":[16],"forcedDrag":[4,"forced-drag"],"disabled":[4],"showHeaderIconOnHover":[1,"show-header-icon-on-hover"]},[[1,"mousedown","handleMouseDown"],[1,"mouseenter","handleMouseEnter"],[1,"mouseleave","handleMouseLeave"]]],[1,"igc-floating-pane-component",{"allowResize":[4,"allow-resize"],"floatingLocation":[16],"floatingWidth":[2,"floating-width"],"floatingHeight":[2,"floating-height"],"hasHeader":[4,"has-header"],"maximized":[4],"floatingMinHeight":[2,"floating-min-height"],"floatingMinWidth":[2,"floating-min-width"],"floatingId":[1,"floating-id"]}],[2,"igc-root-docking-indicator-component",{"position":[1]}],[1,"igc-content-pane-component",{"size":[2],"isFlyout":[4,"is-flyout"],"unpinnedSize":[2,"unpinned-size"],"header":[1],"disabled":[4],"isSingleFloating":[4,"is-single-floating"]}],[2,"igc-document-host-component",{"size":[2]}],[1,"igc-pane-navigator-component",{"activeDocuments":[16],"activePanes":[16],"selectedIndex":[1026,"selected-index"],"previousActivePaneIndex":[2,"previous-active-pane-index"],"resourceStrings":[16]},[[0,"keyup","handleKeyUp"],[0,"keydown","handleKeydown"]]],[2,"igc-split-pane-component",{"orientation":[1],"size":[2]}],[1,"igc-splitter-component",{"showDragGhost":[4,"show-drag-ghost"],"splitPaneOrientation":[1,"split-pane-orientation"],"flyoutLocation":[1,"flyout-location"],"dragOffset":[32],"hasCustomSplitterHandle":[32]},[[0,"keydown","handleKeydownEvent"],[1,"mousedown","handleMouseDown"]]],[1,"igc-tab-panel-component",{"selected":[4],"disabled":[4]}],[1,"igc-unpinned-pane-header-component",{"location":[1],"isActive":[4,"is-active"],"disabled":[4]}],[1,"igc-context-menu-component",{"orientation":[1],"position":[1],"target":[16],"items":[16],"activeIndex":[1026,"active-index"]},[[0,"focusout","emitMenuClosed"]]],[2,"igc-joystick-icon-component",{"isDocHost":[4,"is-doc-host"],"position":[1],"direction":[1],"empty":[4]}],[2,"igc-resizer-component",{"orientation":[1],"dragOffsetX":[32],"dragOffsetY":[32]}],[1,"igc-button-component",{"disabled":[4],"name":[513],"type":[513],"value":[513]}],[2,"igc-icon-component",{"name":[1]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -56,6 +56,12 @@ class IgcDockManagerComponent extends HTMLElement {
56
56
  removePane(pane) {
57
57
  return null;
58
58
  }
59
+ /**
60
+ * Focuses a pane from the layout.
61
+ */
62
+ focusPane(contentId) {
63
+ return null;
64
+ }
59
65
  addEventListener() { }
60
66
  removeEventListener() { }
61
67
  }
@@ -33,12 +33,13 @@ export class IgcContextMenuComponent {
33
33
  const menuItemsDivRect = this.menuItemsDiv.getBoundingClientRect();
34
34
  const hostRect = this.elem.getBoundingClientRect();
35
35
  const rootNodeShadowHost = this.target.getRootNode();
36
+ const isFloating = this.isFloating(rootNodeShadowHost.host);
36
37
  const rootHostRect = rootNodeShadowHost.host.getBoundingClientRect();
37
38
  const isTabs = rootNodeShadowHost.host.tagName.toLowerCase() === 'igc-tab-header-component';
38
39
  const tabsContentHost = isTabs ? rootNodeShadowHost.host.parentElement.shadowRoot : rootNodeShadowHost;
39
40
  const tabRect = tabsContentHost.host.getBoundingClientRect();
40
41
  const tabsContentRect = tabsContentHost.querySelector('div[part~="tabs-content"]').getBoundingClientRect();
41
- const isRTL = rootHostRect.right - menuItemsDivRect.right <= 0;
42
+ const isRTL = rootHostRect.right - menuItemsDivRect.right < 1;
42
43
  const shouldChangeOpenOrientation = tabRect.bottom + menuItemsDivRect.bottom >= window.innerHeight
43
44
  || tabRect.height + menuItemsDivRect.bottom >= window.innerHeight
44
45
  || (isTabsMoreButton && tabsContentRect.height - menuItemsDivRect.height > 0);
@@ -47,7 +48,7 @@ export class IgcContextMenuComponent {
47
48
  : rootHostRect.top - menuItemsDivRect.top + rootHostRect.height;
48
49
  const menuToTop = tabsContentRect.top - menuItemsDivRect.top;
49
50
  const menuToStart = isRTL ? rootHostRect.right - menuItemsDivRect.width : rootHostRect.left;
50
- const menuToEnd = isRTL ? rootHostRect.left : rootHostRect.right - menuItemsDivRect.width;
51
+ const menuToEnd = isRTL && !isFloating ? rootHostRect.left : rootHostRect.right - menuItemsDivRect.right;
51
52
  const menuToCenter = rootHostRect.left + (rootHostRect.width - menuItemsDivRect.width) / 2;
52
53
  let menuLeft = !isRTL ? menuToStart : menuToEnd;
53
54
  let menuTop = this.orientation === IgcContextMenuOrientation.bottom
@@ -74,7 +75,6 @@ export class IgcContextMenuComponent {
74
75
  if (this.orientation === IgcContextMenuOrientation.bottom && menuBottom > hostRect.height) {
75
76
  menuTop = menuToTop;
76
77
  }
77
- menuLeft = menuLeft - menuItemsDivRect.left;
78
78
  this.menuItemsDiv.style.left = `${menuLeft}px`;
79
79
  this.menuItemsDiv.style.top = `${menuTop}px`;
80
80
  this.menuItemsDiv.style.visibility = 'visible';
@@ -85,6 +85,15 @@ export class IgcContextMenuComponent {
85
85
  const firstMenuItem = this.menuItemsDiv.querySelector('div[part="menu-item"]');
86
86
  (_a = firstMenuItem) === null || _a === void 0 ? void 0 : _a.focus();
87
87
  }
88
+ isFloating(host) {
89
+ while (host) {
90
+ if (host.tagName && host.tagName.toLowerCase() === 'igc-floating-pane-component') {
91
+ return true;
92
+ }
93
+ host = host.parentNode;
94
+ }
95
+ return false;
96
+ }
88
97
  handleKeyboardEvents(item, ev) {
89
98
  const menuItemChildren = this.menuItemsDiv.querySelectorAll('div[part="menu-item"]');
90
99
  if (ev.key === 'ArrowDown') {