@syncfusion/ej2-dropdowns 23.1.41 → 23.1.42

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 23.1.41
3
+ * version : 23.1.42
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-dropdowns@*",
3
- "_id": "@syncfusion/ej2-dropdowns@23.1.40",
3
+ "_id": "@syncfusion/ej2-dropdowns@23.1.41",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-bpXzM3yvl5Rn59H3dMIpZP4JmY2pjttfsNEbyEDxAvdMtGuM6WzFb0PG34FTLijMqc5pLKLn2vaK4p6Tcnw6Jg==",
5
+ "_integrity": "sha512-y//3VH/5+habVL6F0DziqbiYzeCU3yvRE5/8YmQRKStz0qg/N0emXUiW/y2uerMFcEuWYUHAz6zIobX28fiA8Q==",
6
6
  "_location": "/@syncfusion/ej2-dropdowns",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -34,8 +34,8 @@
34
34
  "/@syncfusion/ej2-spreadsheet",
35
35
  "/@syncfusion/ej2-vue-dropdowns"
36
36
  ],
37
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-23.1.40.tgz",
38
- "_shasum": "1951d0d86e8127368968282a415bafe26540c010",
37
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-23.1.41.tgz",
38
+ "_shasum": "b4d93ee08b3b0bf0ed2cc3efe64f19e33255a6f6",
39
39
  "_spec": "@syncfusion/ej2-dropdowns@*",
40
40
  "_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
41
41
  "author": {
@@ -45,8 +45,8 @@
45
45
  "dependencies": {
46
46
  "@syncfusion/ej2-base": "~23.1.41",
47
47
  "@syncfusion/ej2-data": "~23.1.36",
48
- "@syncfusion/ej2-inputs": "~23.1.40",
49
- "@syncfusion/ej2-lists": "~23.1.36",
48
+ "@syncfusion/ej2-inputs": "~23.1.42",
49
+ "@syncfusion/ej2-lists": "~23.1.42",
50
50
  "@syncfusion/ej2-navigations": "~23.1.41",
51
51
  "@syncfusion/ej2-notifications": "~23.1.40",
52
52
  "@syncfusion/ej2-popups": "~23.1.38"
@@ -74,7 +74,7 @@
74
74
  "module": "./index.js",
75
75
  "name": "@syncfusion/ej2-dropdowns",
76
76
  "typings": "index.d.ts",
77
- "version": "23.1.41",
77
+ "version": "23.1.42",
78
78
  "sideEffects": false,
79
79
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
80
80
  }
@@ -49,6 +49,7 @@ export declare class Mention extends DropDownBase {
49
49
  private range;
50
50
  private displayTempElement;
51
51
  private isCollided;
52
+ private collision;
52
53
  private spinnerElement;
53
54
  private spinnerTemplateElement;
54
55
  private lineBreak;
@@ -693,6 +693,8 @@ var Mention = /** @class */ (function (_super) {
693
693
  _this.initializePopup(popupEle_1, offsetValue, left);
694
694
  _this.checkCollision(popupEle_1);
695
695
  popupEle_1.style.visibility = 'visible';
696
+ var popupLeft_1 = popupEle_1.parentElement.offsetWidth - popupEle_1.offsetWidth;
697
+ var popupHeight_1 = popupEle_1.offsetHeight;
696
698
  addClass([popupEle_1], ['e-mention', 'e-popup', 'e-popup-close']);
697
699
  if (!isNullOrUndefined(_this.list)) {
698
700
  _this.unWireListEvents();
@@ -721,9 +723,23 @@ var Mention = /** @class */ (function (_super) {
721
723
  popupEle_1.style.cssText = 'top: '.concat(coordinates_1.top.toString(), 'px;\n left: ').concat(coordinates_1.left.toString(), 'px;\nposition: absolute;\n display: block;');
722
724
  }
723
725
  else {
724
- popupEle_1.style.left = formatUnit(coordinates_1.left);
725
- popupEle_1.style.top = formatUnit(coordinates_1.top - parseInt(_this.popupHeight.toString()));
726
+ if (_this.collision.length > 0 && _this.collision.indexOf('right') > -1 && _this.collision.indexOf('bottom') === -1) {
727
+ popupEle_1.style.cssText = 'top: '.concat(coordinates_1.top.toString(), 'px;\n left: ').concat(popupLeft_1.toString(), 'px;\nposition: absolute;\n display: block;');
728
+ }
729
+ else if (_this.collision && _this.collision.length > 0 && _this.collision.indexOf('bottom') > -1 && _this.collision.indexOf('right') === -1) {
730
+ popupEle_1.style.left = formatUnit(coordinates_1.left);
731
+ popupEle_1.style.top = formatUnit(coordinates_1.top - parseInt(popupHeight_1.toString()));
732
+ }
733
+ else if (_this.collision && _this.collision.length > 0 && _this.collision.indexOf('bottom') > -1 && _this.collision.indexOf('right') > -1) {
734
+ popupEle_1.style.left = formatUnit(popupLeft_1);
735
+ popupEle_1.style.top = formatUnit(coordinates_1.top - parseInt(popupHeight_1.toString()));
736
+ }
737
+ else {
738
+ popupEle_1.style.left = formatUnit(coordinates_1.left);
739
+ popupEle_1.style.top = formatUnit(coordinates_1.top - parseInt(_this.popupHeight.toString()));
740
+ }
726
741
  _this.isCollided = false;
742
+ _this.collision = [];
727
743
  }
728
744
  popupEle_1.style.width = _this.popupWidth !== '100%' && !isNullOrUndefined(_this.popupWidth) ? formatUnit(_this.popupWidth) : 'auto';
729
745
  _this.setHeight(popupEle_1);
@@ -752,8 +768,8 @@ var Mention = /** @class */ (function (_super) {
752
768
  Mention.prototype.checkCollision = function (popupEle) {
753
769
  if (!Browser.isDevice || (Browser.isDevice && !(this.getModuleName() === 'mention'))) {
754
770
  var coordinates = this.getCoordinates(this.inputElement, this.getTriggerCharPosition());
755
- var collision = isCollide(popupEle, null, coordinates.left, coordinates.top);
756
- if (collision.length > 0) {
771
+ this.collision = isCollide(popupEle, null, coordinates.left, coordinates.top);
772
+ if (this.collision.length > 0) {
757
773
  popupEle.style.marginTop = -parseInt(getComputedStyle(popupEle).marginTop, 10) + 'px';
758
774
  this.isCollided = true;
759
775
  }
@@ -888,10 +904,18 @@ var Mention = /** @class */ (function (_super) {
888
904
  document.body.removeChild(div);
889
905
  }
890
906
  else {
891
- coordinates = {
892
- top: rect.top + windowTop + parseInt(getComputedStyle(this.inputElement).fontSize, 10) - (this.isCollided ? 10 : 0),
893
- left: rect.left + windowLeft + width
894
- };
907
+ if (this.collision && this.collision.length > 0 && this.collision.indexOf('right') > -1 && this.collision.indexOf('bottom') === -1) {
908
+ coordinates = {
909
+ top: rect.top + windowTop + parseInt(getComputedStyle(this.inputElement).fontSize, 10),
910
+ left: rect.left + windowLeft + width
911
+ };
912
+ }
913
+ else {
914
+ coordinates = {
915
+ top: rect.top + windowTop + parseInt(getComputedStyle(this.inputElement).fontSize, 10) - (this.isCollided ? 10 : 0),
916
+ left: rect.left + windowLeft + width
917
+ };
918
+ }
895
919
  }
896
920
  return coordinates;
897
921
  };