igniteui-dockmanager 1.12.2-beta.0 → 1.12.2-beta.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 (48) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cjs/igc-button-component_20.cjs.entry.js +82 -19
  3. package/dist/cjs/igniteui-dockmanager.cjs.js +1 -1
  4. package/dist/cjs/index.cjs.js +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/{locale-d4a89130.js → locale-758076f2.js} +2 -4
  7. package/dist/collection/components/context-menu/context-menu-component.js +4 -2
  8. package/dist/collection/components/dockmanager/docking/joystick-icon-component.js +31 -4
  9. package/dist/collection/components/dockmanager/docking/joystick-indicator-component.js +8 -2
  10. package/dist/collection/components/dockmanager/dockmanager-component.js +8 -4
  11. package/dist/collection/components/dockmanager/dockmanager.public-interfaces.js +2 -10
  12. package/dist/collection/components/dockmanager/dockmanager.service.js +25 -8
  13. package/dist/collection/components/sample-component/sample-component.css +23 -1
  14. package/dist/collection/components/tabs/tabs-component.js +2 -0
  15. package/dist/collection/utils/test-utils.js +1 -0
  16. package/dist/collection/utils/utils.js +23 -0
  17. package/dist/esm/igc-button-component_20.entry.js +82 -19
  18. package/dist/esm/igniteui-dockmanager.js +1 -1
  19. package/dist/esm/index.js +1 -1
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/esm/{locale-505757c0.js → locale-7d22d721.js} +2 -4
  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.js +1 -1
  25. package/dist/esm-es5/loader.js +1 -1
  26. package/dist/esm-es5/locale-7d22d721.js +1 -0
  27. package/dist/igniteui-dockmanager/igniteui-dockmanager.esm.js +1 -1
  28. package/dist/igniteui-dockmanager/index.esm.js +1 -1
  29. package/dist/igniteui-dockmanager/p-324d7384.system.entry.js +1 -0
  30. package/dist/igniteui-dockmanager/{p-a48673a3.system.js → p-41c42898.system.js} +1 -1
  31. package/dist/igniteui-dockmanager/p-84fcfd98.entry.js +1 -0
  32. package/dist/igniteui-dockmanager/p-db0ed18d.system.js +1 -0
  33. package/dist/igniteui-dockmanager/p-f8e35aef.system.js +1 -1
  34. package/dist/igniteui-dockmanager/p-fdf33b6f.js +1 -0
  35. package/dist/types/components/dockmanager/docking/joystick-icon-component.d.ts +1 -0
  36. package/dist/types/components/dockmanager/docking/joystick-indicator-component.d.ts +2 -0
  37. package/dist/types/components/dockmanager/dockmanager.public-interfaces.d.ts +6 -0
  38. package/dist/types/components.d.ts +2 -0
  39. package/dist/types/utils/test-utils.d.ts +1 -0
  40. package/dist/types/utils/utils.d.ts +2 -0
  41. package/loader/cdn.js +2 -2
  42. package/loader/index.cjs.js +2 -2
  43. package/package.json +1 -1
  44. package/dist/esm-es5/locale-505757c0.js +0 -1
  45. package/dist/igniteui-dockmanager/p-142ceb4c.system.entry.js +0 -1
  46. package/dist/igniteui-dockmanager/p-8ebc07f3.js +0 -1
  47. package/dist/igniteui-dockmanager/p-9474145a.system.js +0 -1
  48. package/dist/igniteui-dockmanager/p-dd94290a.entry.js +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable changes for each version of this project will be documented in this file.
4
4
 
5
+ ## 1.12.2
6
+
7
+ ### Bug fixes
8
+ - Docking indicator left/right arrows positions are reversed in RTL mode [#54](https://github.com/IgniteUI/igniteui-dockmanager/issues/54)
9
+ - Context menu not positioning correctly
10
+ - Missing overloads for `addEventListener` and `removeEventListener`
11
+
12
+ ### Enhancements
13
+ - Add `tabs-more-menu-content` and `tabs-more-menu-item` CSS parts
14
+
5
15
  ## 1.12.1
6
16
 
7
17
  ### Enhancements
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f11f2141.js');
6
- const locale = require('./locale-d4a89130.js');
6
+ const locale = require('./locale-758076f2.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
 
@@ -33,6 +33,12 @@ class Utils {
33
33
  position === locale.IgcDockingIndicatorPosition.outerTop ||
34
34
  position === locale.IgcDockingIndicatorPosition.outerLeft;
35
35
  }
36
+ static isDockingIndicatorBeforeRTL(position) {
37
+ return position === locale.IgcDockingIndicatorPosition.top ||
38
+ position === locale.IgcDockingIndicatorPosition.right ||
39
+ position === locale.IgcDockingIndicatorPosition.outerTop ||
40
+ position === locale.IgcDockingIndicatorPosition.outerRight;
41
+ }
36
42
  static isDockingIndicatorOuter(position) {
37
43
  return position === locale.IgcDockingIndicatorPosition.outerLeft ||
38
44
  position === locale.IgcDockingIndicatorPosition.outerRight ||
@@ -53,6 +59,23 @@ class Utils {
53
59
  .filter(key => partNameInfo[key])
54
60
  .join(delimiter);
55
61
  }
62
+ static getDirection(element) {
63
+ let direction = '';
64
+ if (element.dir !== '') {
65
+ direction = element.dir;
66
+ }
67
+ else {
68
+ let parent = element.parentElement;
69
+ while (parent) {
70
+ if (parent.dir !== '') {
71
+ direction = parent.dir;
72
+ break;
73
+ }
74
+ parent = parent.parentElement;
75
+ }
76
+ }
77
+ return direction;
78
+ }
56
79
  }
57
80
 
58
81
  /**
@@ -156,6 +179,7 @@ let IgcContextMenuComponent = class {
156
179
  document.defaultView.removeEventListener('mousedown', this.handleDocumentMouseDown, false);
157
180
  }
158
181
  componentDidLoad() {
182
+ const isTabsMoreButton = this.target.querySelector('slot[name="tabsMoreButton"]') !== null;
159
183
  const menuItemsDivRect = this.menuItemsDiv.getBoundingClientRect();
160
184
  const hostRect = this.elem.getBoundingClientRect();
161
185
  const rootNodeShadowHost = this.target.getRootNode();
@@ -166,8 +190,9 @@ let IgcContextMenuComponent = class {
166
190
  const tabsContentRect = tabsContentHost.querySelector('div[part~="tabs-content"]').getBoundingClientRect();
167
191
  const tabStripArea = tabsContentHost.querySelector('div[part~="tab-strip-area"]').getBoundingClientRect();
168
192
  const isRTL = rootHostRect.right - menuItemsDivRect.right <= 0;
169
- const shouldChangeOpenOrientation = tabRect.bottom + menuItemsDivRect.height >= window.innerHeight
170
- || tabRect.height + menuItemsDivRect.height >= window.innerHeight;
193
+ const shouldChangeOpenOrientation = tabRect.bottom + menuItemsDivRect.bottom >= window.innerHeight
194
+ || tabRect.height + menuItemsDivRect.bottom >= window.innerHeight
195
+ || (isTabsMoreButton && tabsContentRect.height - menuItemsDivRect.height > 0);
171
196
  const menuToBottom = shouldChangeOpenOrientation
172
197
  ? tabsContentRect.top + (tabsContentRect.height - menuItemsDivRect.bottom)
173
198
  : rootHostRect.top - menuItemsDivRect.top + rootHostRect.height;
@@ -614,6 +639,7 @@ class IgcDockManagerService {
614
639
  const paneIndex = targetParent.panes.indexOf(targetPane);
615
640
  const isIndicatorVertical = Utils.isDockingIndicatorVertical(position);
616
641
  const isSplitPaneVertical = Utils.isSplitPaneVertical(targetParent);
642
+ const isRTL = this.dockingIndicator && this.dockingIndicator.direction === 'rtl';
617
643
  let draggedPane = this.dockManager.draggedPane;
618
644
  if ((draggedPane === null || draggedPane === void 0 ? void 0 : draggedPane.type) === locale.IgcDockManagerPaneType.splitPane &&
619
645
  this.dockManager.documentOnlyDrag &&
@@ -634,7 +660,8 @@ class IgcDockManagerService {
634
660
  }
635
661
  const paneToDock = draggedPane ? this.getPaneToDock(draggedPane) : this.dockManager.activePane;
636
662
  if ((isIndicatorVertical && isSplitPaneVertical) || (!isIndicatorVertical && !isSplitPaneVertical)) {
637
- const insertIndex = Utils.isDockingIndicatorBefore(position) ?
663
+ const insertIndex = Utils.isDockingIndicatorBefore(position) && !isRTL ||
664
+ Utils.isDockingIndicatorBeforeRTL(position) && isRTL ?
638
665
  paneIndex :
639
666
  paneIndex + 1;
640
667
  targetParent.panes.splice(insertIndex, 0, paneToDock);
@@ -643,7 +670,8 @@ class IgcDockManagerService {
643
670
  const newSplitPane = {
644
671
  type: locale.IgcDockManagerPaneType.splitPane,
645
672
  orientation: isSplitPaneVertical ? locale.IgcSplitPaneOrientation.horizontal : locale.IgcSplitPaneOrientation.vertical,
646
- panes: Utils.isDockingIndicatorBefore(position) ?
673
+ panes: Utils.isDockingIndicatorBefore(position) && !isRTL ||
674
+ Utils.isDockingIndicatorBeforeRTL(position) && isRTL ?
647
675
  [paneToDock, targetPane] :
648
676
  [targetPane, paneToDock],
649
677
  size: targetPane.size
@@ -1013,8 +1041,11 @@ class IgcDockManagerService {
1013
1041
  this.removePane(paneToDock);
1014
1042
  const isIndicatorVertical = position === locale.IgcDockingIndicatorPosition.top || position === locale.IgcDockingIndicatorPosition.bottom;
1015
1043
  const isSplitPaneVertical = Utils.isSplitPaneVertical(rootPane);
1044
+ const isRTL = this.dockingIndicator && this.dockingIndicator.direction === 'rtl';
1016
1045
  if ((isIndicatorVertical && isSplitPaneVertical) || (!isIndicatorVertical && !isSplitPaneVertical)) {
1017
- const insertIndex = (position === locale.IgcDockingIndicatorPosition.left || position === locale.IgcDockingIndicatorPosition.top) ?
1046
+ const insertIndex = position === locale.IgcDockingIndicatorPosition.left && !isRTL ||
1047
+ position === locale.IgcDockingIndicatorPosition.right && isRTL ||
1048
+ position === locale.IgcDockingIndicatorPosition.top ?
1018
1049
  0 :
1019
1050
  rootPane.panes.length;
1020
1051
  rootPane.panes.splice(insertIndex, 0, paneToDock);
@@ -1023,7 +1054,9 @@ class IgcDockManagerService {
1023
1054
  const newRootPane = {
1024
1055
  type: locale.IgcDockManagerPaneType.splitPane,
1025
1056
  orientation: isSplitPaneVertical ? locale.IgcSplitPaneOrientation.horizontal : locale.IgcSplitPaneOrientation.vertical,
1026
- panes: (position === locale.IgcDockingIndicatorPosition.left || position === locale.IgcDockingIndicatorPosition.top) ?
1057
+ panes: position === locale.IgcDockingIndicatorPosition.left && !isRTL ||
1058
+ position === locale.IgcDockingIndicatorPosition.right && isRTL ||
1059
+ position === locale.IgcDockingIndicatorPosition.top ?
1027
1060
  [paneToDock, rootPane] :
1028
1061
  [rootPane, paneToDock],
1029
1062
  };
@@ -1473,9 +1506,14 @@ class IgcDockManagerService {
1473
1506
  const isIndicatorVertical = Utils.isDockingIndicatorVertical(this.dockingIndicator.position);
1474
1507
  const isSplitPaneVertical = Utils.isSplitPaneVertical(targetParent);
1475
1508
  const isSameSplitPane = ((isIndicatorVertical && isSplitPaneVertical) || (!isIndicatorVertical && !isSplitPaneVertical));
1509
+ const isRTL = this.dockingIndicator.direction === 'rtl';
1476
1510
  const panesTotalSize = panes.reduce((a, b) => a + (b.size || IGC_DEFAULT_PANE_SIZE), 0);
1477
- const beforePanesTotalSize = panes.slice(0, dropTargetIndex).reduce((a, b) => a + (b.size || IGC_DEFAULT_PANE_SIZE), 0);
1478
- const afterPanesTotalSize = panes.slice(0, dropTargetIndex + 1).reduce((a, b) => a + (b.size || IGC_DEFAULT_PANE_SIZE), 0);
1511
+ const beforePanesTotalSize = !isRTL || isIndicatorVertical
1512
+ ? panes.slice(0, dropTargetIndex).reduce((a, b) => a + (b.size || IGC_DEFAULT_PANE_SIZE), 0)
1513
+ : panes.slice(dropTargetIndex, panes.length).reduce((a, b) => a + (b.size || IGC_DEFAULT_PANE_SIZE), 0);
1514
+ const afterPanesTotalSize = !isRTL || isIndicatorVertical
1515
+ ? panes.slice(0, dropTargetIndex + 1).reduce((a, b) => a + (b.size || IGC_DEFAULT_PANE_SIZE), 0)
1516
+ : panes.slice(dropTargetIndex + 1, panes.length).reduce((a, b) => a + (b.size || IGC_DEFAULT_PANE_SIZE), 0);
1479
1517
  switch (this.dockingIndicator.position) {
1480
1518
  case locale.IgcDockingIndicatorPosition.left:
1481
1519
  case locale.IgcDockingIndicatorPosition.outerLeft:
@@ -1484,7 +1522,9 @@ class IgcDockManagerService {
1484
1522
  shadowRect.height = baseRect.height;
1485
1523
  if (isSameSplitPane) {
1486
1524
  shadowRect.width = (draggedPaneSize / (draggedPaneSize + panesTotalSize)) * parentRect.width;
1487
- shadowRect.x = parentRect.left + beforePanesTotalSize / (draggedPaneSize + panesTotalSize) * parentRect.width;
1525
+ !isRTL
1526
+ ? shadowRect.x = parentRect.left + beforePanesTotalSize / (draggedPaneSize + panesTotalSize) * parentRect.width
1527
+ : shadowRect.x = parentRect.left + afterPanesTotalSize / (draggedPaneSize + panesTotalSize) * parentRect.width;
1488
1528
  }
1489
1529
  else {
1490
1530
  shadowRect.width = parentRect.width / 2;
@@ -1496,7 +1536,9 @@ class IgcDockManagerService {
1496
1536
  shadowRect.height = baseRect.height;
1497
1537
  if (isSameSplitPane) {
1498
1538
  shadowRect.width = (draggedPaneSize / (draggedPaneSize + panesTotalSize)) * parentRect.width;
1499
- shadowRect.x = parentRect.left + afterPanesTotalSize / (draggedPaneSize + panesTotalSize) * parentRect.width;
1539
+ !isRTL
1540
+ ? shadowRect.x = parentRect.left + afterPanesTotalSize / (draggedPaneSize + panesTotalSize) * parentRect.width
1541
+ : shadowRect.x = parentRect.left + beforePanesTotalSize / (draggedPaneSize + panesTotalSize) * parentRect.width;
1500
1542
  }
1501
1543
  else {
1502
1544
  shadowRect.width = parentRect.width / 2;
@@ -2519,7 +2561,8 @@ let IgcDockManager = class {
2519
2561
  if (dockingIndicatorElement) {
2520
2562
  this.service.dockingIndicator = {
2521
2563
  position: dockingIndicatorElement.position,
2522
- isRoot: true
2564
+ isRoot: true,
2565
+ direction: Utils.getDirection(this.element)
2523
2566
  };
2524
2567
  }
2525
2568
  if (!dockingIndicatorElement) {
@@ -2528,7 +2571,8 @@ let IgcDockManager = class {
2528
2571
  dockingIndicatorElement = joystickIcon;
2529
2572
  this.service.dockingIndicator = {
2530
2573
  position: joystickIcon.position,
2531
- isRoot: false
2574
+ isRoot: false,
2575
+ direction: Utils.getDirection(this.element)
2532
2576
  };
2533
2577
  const joystickIndicator = joystickIcon.closest('igc-joystick-indicator-component');
2534
2578
  indicatorTarget = joystickIndicator.dropTargetPaneInfo;
@@ -2939,6 +2983,8 @@ let IgcDockManager = class {
2939
2983
  return (index.h("igc-root-docking-indicator-component", { position: position }));
2940
2984
  }
2941
2985
  renderDockingIndicators() {
2986
+ const startPosition = Utils.getDirection(this.element) !== 'rtl' ? locale.IgcDockingIndicatorPosition.left : locale.IgcDockingIndicatorPosition.right;
2987
+ const endPosition = Utils.getDirection(this.element) !== 'rtl' ? locale.IgcDockingIndicatorPosition.right : locale.IgcDockingIndicatorPosition.left;
2942
2988
  return (index.h("div", { class: "docking-indicators-container", style: {
2943
2989
  display: this.showDockingIndicators ? 'flex' : 'none'
2944
2990
  } }, !this.documentOnlyDrag && this.renderRootDockingIndicator(locale.IgcDockingIndicatorPosition.top), index.h("div", { style: {
@@ -2946,7 +2992,7 @@ let IgcDockManager = class {
2946
2992
  display: 'flex',
2947
2993
  flexDirection: 'row',
2948
2994
  justifyContent: 'space-between'
2949
- } }, !this.documentOnlyDrag && this.renderRootDockingIndicator(locale.IgcDockingIndicatorPosition.left), !this.documentOnlyDrag && this.renderRootDockingIndicator(locale.IgcDockingIndicatorPosition.right)), !this.documentOnlyDrag && this.renderRootDockingIndicator(locale.IgcDockingIndicatorPosition.bottom), this.dropTargetPaneInfo &&
2995
+ } }, !this.documentOnlyDrag && this.renderRootDockingIndicator(startPosition), !this.documentOnlyDrag && this.renderRootDockingIndicator(endPosition)), !this.documentOnlyDrag && this.renderRootDockingIndicator(locale.IgcDockingIndicatorPosition.bottom), this.dropTargetPaneInfo &&
2950
2996
  index.h("igc-joystick-indicator-component", { dropTargetPaneInfo: this.dropTargetPaneInfo, documentOnlyDrag: this.documentOnlyDrag })));
2951
2997
  }
2952
2998
  renderContextMenu() {
@@ -3207,9 +3253,14 @@ let IgcJoystickIconComponent = class {
3207
3253
  resolveGridColumn() {
3208
3254
  switch (this.position) {
3209
3255
  case locale.IgcDockingIndicatorPosition.outerLeft:
3210
- return '1';
3256
+ return this.direction !== 'rtl' ? '1' : '5';
3211
3257
  case locale.IgcDockingIndicatorPosition.left:
3212
- return this.isDocHost ? '2' : '1';
3258
+ if (this.direction !== 'rtl') {
3259
+ return this.isDocHost ? '2' : '1';
3260
+ }
3261
+ else {
3262
+ return this.isDocHost ? '4' : '3';
3263
+ }
3213
3264
  case locale.IgcDockingIndicatorPosition.center:
3214
3265
  return this.isDocHost ? '3' : '2';
3215
3266
  case locale.IgcDockingIndicatorPosition.outerTop:
@@ -3219,9 +3270,14 @@ let IgcJoystickIconComponent = class {
3219
3270
  case locale.IgcDockingIndicatorPosition.bottom:
3220
3271
  return this.isDocHost ? '3' : '2';
3221
3272
  case locale.IgcDockingIndicatorPosition.outerRight:
3222
- return '5';
3273
+ return this.direction !== 'rtl' ? '5' : '1';
3223
3274
  case locale.IgcDockingIndicatorPosition.right:
3224
- return this.isDocHost ? '4' : '3';
3275
+ if (this.direction !== 'rtl') {
3276
+ return this.isDocHost ? '4' : '3';
3277
+ }
3278
+ else {
3279
+ return this.isDocHost ? '2' : '1';
3280
+ }
3225
3281
  }
3226
3282
  }
3227
3283
  renderIcon() {
@@ -3284,8 +3340,12 @@ let IgcJoystickIndicatorComponent = class {
3284
3340
  && position !== locale.IgcDockingIndicatorPosition.center
3285
3341
  && this.dropTargetPaneInfo.pane.type === locale.IgcDockManagerPaneType.documentHost;
3286
3342
  }
3343
+ closestElement(selector, el) {
3344
+ return ((el && el.closest(selector)) ||
3345
+ this.closestElement(selector, el.getRootNode().host));
3346
+ }
3287
3347
  renderIndicator(position) {
3288
- return (index.h("igc-joystick-icon-component", { isDocHost: this.isDocHost, position: position, empty: this.isEmptyCenter(position) || this.isEmptyEdge(position) }));
3348
+ 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) }));
3289
3349
  }
3290
3350
  render() {
3291
3351
  this.isDocHost = !!this.dropTargetPaneInfo.docHost;
@@ -3299,6 +3359,7 @@ let IgcJoystickIndicatorComponent = class {
3299
3359
  'indicators-container--doc-host': this.isDocHost
3300
3360
  } }, 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))));
3301
3361
  }
3362
+ get element() { return index.getElement(this); }
3302
3363
  };
3303
3364
  IgcJoystickIndicatorComponent.style = joystickIndicatorComponentCss;
3304
3365
 
@@ -4376,6 +4437,8 @@ let IgcTabsComponent = class {
4376
4437
  'tabs-more-button': true,
4377
4438
  'tabs-maximize-button': true,
4378
4439
  'tabs-minimize-button': true,
4440
+ 'context-menu-content: tabs-more-menu-content': true,
4441
+ 'context-menu-item: tabs-more-menu-item': true,
4379
4442
  document: top,
4380
4443
  top,
4381
4444
  bottom
@@ -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],"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"],"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);
19
19
  });
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const locale = require('./locale-d4a89130.js');
5
+ const locale = require('./locale-758076f2.js');
6
6
 
7
7
 
8
8
 
@@ -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],"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"],"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
18
  });
19
19
  };
20
20
 
@@ -56,10 +56,8 @@ class IgcDockManagerComponent extends HTMLElement {
56
56
  removePane(pane) {
57
57
  return null;
58
58
  }
59
- addEventListener(type, listener, options) {
60
- }
61
- removeEventListener(type, listener, options) {
62
- }
59
+ addEventListener() { }
60
+ removeEventListener() { }
63
61
  }
64
62
  exports.IgcResizerLocation = void 0;
65
63
  (function (IgcResizerLocation) {
@@ -29,6 +29,7 @@ export class IgcContextMenuComponent {
29
29
  document.defaultView.removeEventListener('mousedown', this.handleDocumentMouseDown, false);
30
30
  }
31
31
  componentDidLoad() {
32
+ const isTabsMoreButton = this.target.querySelector('slot[name="tabsMoreButton"]') !== null;
32
33
  const menuItemsDivRect = this.menuItemsDiv.getBoundingClientRect();
33
34
  const hostRect = this.elem.getBoundingClientRect();
34
35
  const rootNodeShadowHost = this.target.getRootNode();
@@ -39,8 +40,9 @@ export class IgcContextMenuComponent {
39
40
  const tabsContentRect = tabsContentHost.querySelector('div[part~="tabs-content"]').getBoundingClientRect();
40
41
  const tabStripArea = tabsContentHost.querySelector('div[part~="tab-strip-area"]').getBoundingClientRect();
41
42
  const isRTL = rootHostRect.right - menuItemsDivRect.right <= 0;
42
- const shouldChangeOpenOrientation = tabRect.bottom + menuItemsDivRect.height >= window.innerHeight
43
- || tabRect.height + menuItemsDivRect.height >= window.innerHeight;
43
+ const shouldChangeOpenOrientation = tabRect.bottom + menuItemsDivRect.bottom >= window.innerHeight
44
+ || tabRect.height + menuItemsDivRect.bottom >= window.innerHeight
45
+ || (isTabsMoreButton && tabsContentRect.height - menuItemsDivRect.height > 0);
44
46
  const menuToBottom = shouldChangeOpenOrientation
45
47
  ? tabsContentRect.top + (tabsContentRect.height - menuItemsDivRect.bottom)
46
48
  : rootHostRect.top - menuItemsDivRect.top + rootHostRect.height;
@@ -78,9 +78,14 @@ export class IgcJoystickIconComponent {
78
78
  resolveGridColumn() {
79
79
  switch (this.position) {
80
80
  case IgcDockingIndicatorPosition.outerLeft:
81
- return '1';
81
+ return this.direction !== 'rtl' ? '1' : '5';
82
82
  case IgcDockingIndicatorPosition.left:
83
- return this.isDocHost ? '2' : '1';
83
+ if (this.direction !== 'rtl') {
84
+ return this.isDocHost ? '2' : '1';
85
+ }
86
+ else {
87
+ return this.isDocHost ? '4' : '3';
88
+ }
84
89
  case IgcDockingIndicatorPosition.center:
85
90
  return this.isDocHost ? '3' : '2';
86
91
  case IgcDockingIndicatorPosition.outerTop:
@@ -90,9 +95,14 @@ export class IgcJoystickIconComponent {
90
95
  case IgcDockingIndicatorPosition.bottom:
91
96
  return this.isDocHost ? '3' : '2';
92
97
  case IgcDockingIndicatorPosition.outerRight:
93
- return '5';
98
+ return this.direction !== 'rtl' ? '5' : '1';
94
99
  case IgcDockingIndicatorPosition.right:
95
- return this.isDocHost ? '4' : '3';
100
+ if (this.direction !== 'rtl') {
101
+ return this.isDocHost ? '4' : '3';
102
+ }
103
+ else {
104
+ return this.isDocHost ? '2' : '1';
105
+ }
96
106
  }
97
107
  }
98
108
  renderIcon() {
@@ -184,6 +194,23 @@ export class IgcJoystickIconComponent {
184
194
  "attribute": "position",
185
195
  "reflect": false
186
196
  },
197
+ "direction": {
198
+ "type": "string",
199
+ "mutable": false,
200
+ "complexType": {
201
+ "original": "string",
202
+ "resolved": "string",
203
+ "references": {}
204
+ },
205
+ "required": false,
206
+ "optional": false,
207
+ "docs": {
208
+ "tags": [],
209
+ "text": ""
210
+ },
211
+ "attribute": "direction",
212
+ "reflect": false
213
+ },
187
214
  "empty": {
188
215
  "type": "boolean",
189
216
  "mutable": false,
@@ -1,4 +1,5 @@
1
- import { Component, Host, Prop, h } from '@stencil/core';
1
+ import { Component, Element, Host, Prop, h } from '@stencil/core';
2
+ import { Utils } from '../../../utils/utils';
2
3
  import { IgcDockManagerPaneType, IgcDockingIndicatorPosition } from '../dockmanager.public-interfaces';
3
4
  /**
4
5
  * @hidden
@@ -14,8 +15,12 @@ export class IgcJoystickIndicatorComponent {
14
15
  && position !== IgcDockingIndicatorPosition.center
15
16
  && this.dropTargetPaneInfo.pane.type === IgcDockManagerPaneType.documentHost;
16
17
  }
18
+ closestElement(selector, el) {
19
+ return ((el && el.closest(selector)) ||
20
+ this.closestElement(selector, el.getRootNode().host));
21
+ }
17
22
  renderIndicator(position) {
18
- return (h("igc-joystick-icon-component", { isDocHost: this.isDocHost, position: position, empty: this.isEmptyCenter(position) || this.isEmptyEdge(position) }));
23
+ return (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) }));
19
24
  }
20
25
  render() {
21
26
  this.isDocHost = !!this.dropTargetPaneInfo.docHost;
@@ -86,4 +91,5 @@ export class IgcJoystickIndicatorComponent {
86
91
  "reflect": false
87
92
  }
88
93
  }; }
94
+ static get elementRef() { return "element"; }
89
95
  }
@@ -737,7 +737,8 @@ export class IgcDockManager {
737
737
  if (dockingIndicatorElement) {
738
738
  this.service.dockingIndicator = {
739
739
  position: dockingIndicatorElement.position,
740
- isRoot: true
740
+ isRoot: true,
741
+ direction: Utils.getDirection(this.element)
741
742
  };
742
743
  }
743
744
  if (!dockingIndicatorElement) {
@@ -746,7 +747,8 @@ export class IgcDockManager {
746
747
  dockingIndicatorElement = joystickIcon;
747
748
  this.service.dockingIndicator = {
748
749
  position: joystickIcon.position,
749
- isRoot: false
750
+ isRoot: false,
751
+ direction: Utils.getDirection(this.element)
750
752
  };
751
753
  const joystickIndicator = joystickIcon.closest('igc-joystick-indicator-component');
752
754
  indicatorTarget = joystickIndicator.dropTargetPaneInfo;
@@ -1174,6 +1176,8 @@ export class IgcDockManager {
1174
1176
  return (h("igc-root-docking-indicator-component", { position: position }));
1175
1177
  }
1176
1178
  renderDockingIndicators() {
1179
+ const startPosition = Utils.getDirection(this.element) !== 'rtl' ? IgcDockingIndicatorPosition.left : IgcDockingIndicatorPosition.right;
1180
+ const endPosition = Utils.getDirection(this.element) !== 'rtl' ? IgcDockingIndicatorPosition.right : IgcDockingIndicatorPosition.left;
1177
1181
  return (h("div", { class: "docking-indicators-container", style: {
1178
1182
  display: this.showDockingIndicators ? 'flex' : 'none'
1179
1183
  } },
@@ -1184,8 +1188,8 @@ export class IgcDockManager {
1184
1188
  flexDirection: 'row',
1185
1189
  justifyContent: 'space-between'
1186
1190
  } },
1187
- !this.documentOnlyDrag && this.renderRootDockingIndicator(IgcDockingIndicatorPosition.left),
1188
- !this.documentOnlyDrag && this.renderRootDockingIndicator(IgcDockingIndicatorPosition.right)),
1191
+ !this.documentOnlyDrag && this.renderRootDockingIndicator(startPosition),
1192
+ !this.documentOnlyDrag && this.renderRootDockingIndicator(endPosition)),
1189
1193
  !this.documentOnlyDrag && this.renderRootDockingIndicator(IgcDockingIndicatorPosition.bottom),
1190
1194
  this.dropTargetPaneInfo &&
1191
1195
  h("igc-joystick-indicator-component", { dropTargetPaneInfo: this.dropTargetPaneInfo, documentOnlyDrag: this.documentOnlyDrag })));
@@ -55,16 +55,8 @@ export class IgcDockManagerComponent extends HTMLElement {
55
55
  pane = pane;
56
56
  return null;
57
57
  }
58
- addEventListener(type, listener, options) {
59
- type = type;
60
- listener = listener;
61
- options = options;
62
- }
63
- removeEventListener(type, listener, options) {
64
- type = type;
65
- listener = listener;
66
- options = options;
67
- }
58
+ addEventListener() { }
59
+ removeEventListener() { }
68
60
  }
69
61
  export var IgcResizerLocation;
70
62
  (function (IgcResizerLocation) {
@@ -317,6 +317,7 @@ export class IgcDockManagerService {
317
317
  const paneIndex = targetParent.panes.indexOf(targetPane);
318
318
  const isIndicatorVertical = Utils.isDockingIndicatorVertical(position);
319
319
  const isSplitPaneVertical = Utils.isSplitPaneVertical(targetParent);
320
+ const isRTL = this.dockingIndicator && this.dockingIndicator.direction === 'rtl';
320
321
  let draggedPane = this.dockManager.draggedPane;
321
322
  if ((draggedPane === null || draggedPane === void 0 ? void 0 : draggedPane.type) === IgcDockManagerPaneType.splitPane &&
322
323
  this.dockManager.documentOnlyDrag &&
@@ -337,7 +338,8 @@ export class IgcDockManagerService {
337
338
  }
338
339
  const paneToDock = draggedPane ? this.getPaneToDock(draggedPane) : this.dockManager.activePane;
339
340
  if ((isIndicatorVertical && isSplitPaneVertical) || (!isIndicatorVertical && !isSplitPaneVertical)) {
340
- const insertIndex = Utils.isDockingIndicatorBefore(position) ?
341
+ const insertIndex = Utils.isDockingIndicatorBefore(position) && !isRTL ||
342
+ Utils.isDockingIndicatorBeforeRTL(position) && isRTL ?
341
343
  paneIndex :
342
344
  paneIndex + 1;
343
345
  targetParent.panes.splice(insertIndex, 0, paneToDock);
@@ -346,7 +348,8 @@ export class IgcDockManagerService {
346
348
  const newSplitPane = {
347
349
  type: IgcDockManagerPaneType.splitPane,
348
350
  orientation: isSplitPaneVertical ? IgcSplitPaneOrientation.horizontal : IgcSplitPaneOrientation.vertical,
349
- panes: Utils.isDockingIndicatorBefore(position) ?
351
+ panes: Utils.isDockingIndicatorBefore(position) && !isRTL ||
352
+ Utils.isDockingIndicatorBeforeRTL(position) && isRTL ?
350
353
  [paneToDock, targetPane] :
351
354
  [targetPane, paneToDock],
352
355
  size: targetPane.size
@@ -716,8 +719,11 @@ export class IgcDockManagerService {
716
719
  this.removePane(paneToDock);
717
720
  const isIndicatorVertical = position === IgcDockingIndicatorPosition.top || position === IgcDockingIndicatorPosition.bottom;
718
721
  const isSplitPaneVertical = Utils.isSplitPaneVertical(rootPane);
722
+ const isRTL = this.dockingIndicator && this.dockingIndicator.direction === 'rtl';
719
723
  if ((isIndicatorVertical && isSplitPaneVertical) || (!isIndicatorVertical && !isSplitPaneVertical)) {
720
- const insertIndex = (position === IgcDockingIndicatorPosition.left || position === IgcDockingIndicatorPosition.top) ?
724
+ const insertIndex = position === IgcDockingIndicatorPosition.left && !isRTL ||
725
+ position === IgcDockingIndicatorPosition.right && isRTL ||
726
+ position === IgcDockingIndicatorPosition.top ?
721
727
  0 :
722
728
  rootPane.panes.length;
723
729
  rootPane.panes.splice(insertIndex, 0, paneToDock);
@@ -726,7 +732,9 @@ export class IgcDockManagerService {
726
732
  const newRootPane = {
727
733
  type: IgcDockManagerPaneType.splitPane,
728
734
  orientation: isSplitPaneVertical ? IgcSplitPaneOrientation.horizontal : IgcSplitPaneOrientation.vertical,
729
- panes: (position === IgcDockingIndicatorPosition.left || position === IgcDockingIndicatorPosition.top) ?
735
+ panes: position === IgcDockingIndicatorPosition.left && !isRTL ||
736
+ position === IgcDockingIndicatorPosition.right && isRTL ||
737
+ position === IgcDockingIndicatorPosition.top ?
730
738
  [paneToDock, rootPane] :
731
739
  [rootPane, paneToDock],
732
740
  };
@@ -1176,9 +1184,14 @@ export class IgcDockManagerService {
1176
1184
  const isIndicatorVertical = Utils.isDockingIndicatorVertical(this.dockingIndicator.position);
1177
1185
  const isSplitPaneVertical = Utils.isSplitPaneVertical(targetParent);
1178
1186
  const isSameSplitPane = ((isIndicatorVertical && isSplitPaneVertical) || (!isIndicatorVertical && !isSplitPaneVertical));
1187
+ const isRTL = this.dockingIndicator.direction === 'rtl';
1179
1188
  const panesTotalSize = panes.reduce((a, b) => a + (b.size || IGC_DEFAULT_PANE_SIZE), 0);
1180
- const beforePanesTotalSize = panes.slice(0, dropTargetIndex).reduce((a, b) => a + (b.size || IGC_DEFAULT_PANE_SIZE), 0);
1181
- const afterPanesTotalSize = panes.slice(0, dropTargetIndex + 1).reduce((a, b) => a + (b.size || IGC_DEFAULT_PANE_SIZE), 0);
1189
+ const beforePanesTotalSize = !isRTL || isIndicatorVertical
1190
+ ? panes.slice(0, dropTargetIndex).reduce((a, b) => a + (b.size || IGC_DEFAULT_PANE_SIZE), 0)
1191
+ : panes.slice(dropTargetIndex, panes.length).reduce((a, b) => a + (b.size || IGC_DEFAULT_PANE_SIZE), 0);
1192
+ const afterPanesTotalSize = !isRTL || isIndicatorVertical
1193
+ ? panes.slice(0, dropTargetIndex + 1).reduce((a, b) => a + (b.size || IGC_DEFAULT_PANE_SIZE), 0)
1194
+ : panes.slice(dropTargetIndex + 1, panes.length).reduce((a, b) => a + (b.size || IGC_DEFAULT_PANE_SIZE), 0);
1182
1195
  switch (this.dockingIndicator.position) {
1183
1196
  case IgcDockingIndicatorPosition.left:
1184
1197
  case IgcDockingIndicatorPosition.outerLeft:
@@ -1187,7 +1200,9 @@ export class IgcDockManagerService {
1187
1200
  shadowRect.height = baseRect.height;
1188
1201
  if (isSameSplitPane) {
1189
1202
  shadowRect.width = (draggedPaneSize / (draggedPaneSize + panesTotalSize)) * parentRect.width;
1190
- shadowRect.x = parentRect.left + beforePanesTotalSize / (draggedPaneSize + panesTotalSize) * parentRect.width;
1203
+ !isRTL
1204
+ ? shadowRect.x = parentRect.left + beforePanesTotalSize / (draggedPaneSize + panesTotalSize) * parentRect.width
1205
+ : shadowRect.x = parentRect.left + afterPanesTotalSize / (draggedPaneSize + panesTotalSize) * parentRect.width;
1191
1206
  }
1192
1207
  else {
1193
1208
  shadowRect.width = parentRect.width / 2;
@@ -1199,7 +1214,9 @@ export class IgcDockManagerService {
1199
1214
  shadowRect.height = baseRect.height;
1200
1215
  if (isSameSplitPane) {
1201
1216
  shadowRect.width = (draggedPaneSize / (draggedPaneSize + panesTotalSize)) * parentRect.width;
1202
- shadowRect.x = parentRect.left + afterPanesTotalSize / (draggedPaneSize + panesTotalSize) * parentRect.width;
1217
+ !isRTL
1218
+ ? shadowRect.x = parentRect.left + afterPanesTotalSize / (draggedPaneSize + panesTotalSize) * parentRect.width
1219
+ : shadowRect.x = parentRect.left + beforePanesTotalSize / (draggedPaneSize + panesTotalSize) * parentRect.width;
1203
1220
  }
1204
1221
  else {
1205
1222
  shadowRect.width = parentRect.width / 2;