@refinitiv-ui/efx-grid 6.0.124 → 6.0.126

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/grid/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import {Grid} from "./lib/efx-grid.js";
2
2
  export {Grid}
3
- window.EFX_GRID = { version: "6.0.124" };
3
+ window.EFX_GRID = { version: "6.0.126" };
@@ -60,6 +60,8 @@ declare class Popup extends EventDispatcher {
60
60
 
61
61
  public setZIndexReference(elem: Element|null): void;
62
62
 
63
+ public updateZIndex(): void;
64
+
63
65
  public show(opt_shown?: boolean|null, parentElement?: Element|null): void;
64
66
 
65
67
  public hide(opt_hidden?: boolean|null): void;
@@ -508,6 +508,25 @@ let _setElementZIndex = function (elem, zIndex) {
508
508
  }
509
509
  }
510
510
  };
511
+ /** Recalculate popup's z-index based on existing elements and references.
512
+ * @public
513
+ */
514
+ Popup.prototype.updateZIndex = function () {
515
+ let zIndex = _getElementZIndex(this._elem.parentNode);
516
+ let aez = _getElementZIndex(this._attachedElem);
517
+ let rez = _getElementZIndex(this._zIndexRef);
518
+ if(zIndex < aez) {
519
+ zIndex = aez;
520
+ }
521
+ if(zIndex < rez) {
522
+ zIndex = rez;
523
+ }
524
+ if(zIndex) {
525
+ ++zIndex;
526
+ }
527
+ _setElementZIndex(this._elem, zIndex);
528
+ _setElementZIndex(this._overlay, zIndex);
529
+ };
511
530
  /** @public
512
531
  * @param {boolean=} opt_shown
513
532
  * @param {Element=} parentElement
@@ -540,26 +559,12 @@ Popup.prototype.show = function (opt_shown, parentElement) {
540
559
  if (shown) {
541
560
  t._inDoc = true;
542
561
 
543
- let zIndex = _getElementZIndex(parentElement);
544
562
  if (!(parentElement instanceof Element)) {
545
563
  parentElement = t._parentElement;
546
564
  }
547
565
  if (t._uiBlocking) {
548
566
  t._attachOverlay(parentElement);
549
567
  }
550
- let aez = _getElementZIndex(t._attachedElem);
551
- let rez = _getElementZIndex(t._zIndexRef);
552
- if(zIndex < aez) {
553
- zIndex = aez;
554
- }
555
- if(zIndex < rez) {
556
- zIndex = rez;
557
- }
558
- if(zIndex) {
559
- ++zIndex;
560
- }
561
- _setElementZIndex(t._elem, zIndex);
562
- _setElementZIndex(t._overlay, zIndex);
563
568
 
564
569
  parentElement.appendChild(t._elem);
565
570
  parentElement.addEventListener("scroll", t._onScroll, true); // TODO: Remove the listener
@@ -583,12 +588,15 @@ Popup.prototype.show = function (opt_shown, parentElement) {
583
588
  Dom.removeParent(t._overlay);
584
589
  }
585
590
 
586
- evtType = shown ? "shown" : "hidden";
587
- t._evtArg["type"] = evtType;
588
- t._dispatch(evtType, t._evtArg);
591
+
589
592
 
590
593
  if (shown) {
591
594
  t.updatePosition(); // Position has to be updated after firing the event, for client element to be resized
595
+ t._evtArg["type"] = "shown";
596
+ t._dispatch("shown", t._evtArg);
597
+ } else {
598
+ t._evtArg["type"] = "hidden";
599
+ t._dispatch("hidden", t._evtArg);
592
600
  }
593
601
  };
594
602
  /** @public
@@ -720,6 +728,8 @@ Popup.prototype.updatePosition = function (fallback) {
720
728
 
721
729
  if (!t._inDoc) { return; }
722
730
 
731
+ t.updateZIndex();
732
+
723
733
  if (t._attachedElem) {
724
734
  if (!t._attachedElem.offsetWidth) { // Check if attached element is visible in the DOM
725
735
  return; // If the element has has no parent
@@ -21,7 +21,8 @@ declare namespace RowSegmentingPlugin {
21
21
  nonSegmentSeparatorBinding?: ((...params: any[]) => any)|null,
22
22
  sortingLogic?: ((...params: any[]) => any)|null,
23
23
  rowSpanningField?: string|null,
24
- segmentIdField?: string|null
24
+ segmentIdField?: string|null,
25
+ displayColumn?: (string|number)|null
25
26
  };
26
27
 
27
28
  }
@@ -48,6 +49,8 @@ declare class RowSegmentingPlugin extends GridPlugin {
48
49
 
49
50
  public getSegmentParentRowId(rowRef: string|number|null): string;
50
51
 
52
+ public _resolveDisplayColumn(): number;
53
+
51
54
  public setSegmentSeparator(rowRef: string|number|null, enabled?: boolean|null): boolean;
52
55
 
53
56
  public setSegmentClassification(rowRef: string|number|null, fields: string|(string)[]|null): boolean;
package/lib/versions.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "tr-grid-util": "1.3.159",
2
+ "tr-grid-util": "1.3.160",
3
3
  "tr-grid-printer": "1.0.18",
4
4
  "@grid/column-dragging": "1.0.21",
5
5
  "@grid/row-segmenting": "1.0.34",
package/package.json CHANGED
@@ -69,5 +69,5 @@
69
69
  "publishConfig": {
70
70
  "access": "public"
71
71
  },
72
- "version": "6.0.124"
72
+ "version": "6.0.126"
73
73
  }