@syncfusion/ej2-base 21.1.38 → 21.1.39

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.
@@ -1578,6 +1578,21 @@ class NumberFormat {
1578
1578
  if (curData.minimumIntegerDigits) {
1579
1579
  fValue = this.processMinimumIntegers(fValue, curData.minimumIntegerDigits);
1580
1580
  }
1581
+ if (dOptions.isCustomFormat && curData.minimumFractionDigits < curData.maximumFractionDigits
1582
+ && /\d+\.\d+/.test(fValue)) {
1583
+ const temp = fValue.split('.');
1584
+ let decimalPart = temp[1];
1585
+ const len = decimalPart.length;
1586
+ for (let i = len - 1; i >= 0; i--) {
1587
+ if (decimalPart[`${i}`] === '0' && i >= curData.minimumFractionDigits) {
1588
+ decimalPart = decimalPart.slice(0, i);
1589
+ }
1590
+ else {
1591
+ break;
1592
+ }
1593
+ }
1594
+ fValue = temp[0] + '.' + decimalPart;
1595
+ }
1581
1596
  }
1582
1597
  if (curData.type === 'scientific') {
1583
1598
  fValue = value.toExponential(curData.maximumFractionDigits);
@@ -3624,6 +3639,7 @@ var IntlBase;
3624
3639
  }
3625
3640
  }
3626
3641
  if (!isNullOrUndefined(dOptions)) {
3642
+ dOptions.isCustomFormat = true;
3627
3643
  extend(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], '$', dOptions.currencySymbol));
3628
3644
  if (!cOptions.isCurrency) {
3629
3645
  extend(cOptions, isCurrencyPercent([cOptions.nlead, cOptions.nend], '%', dOptions.percentSymbol));
@@ -4244,8 +4260,9 @@ class Browser {
4244
4260
  */
4245
4261
  static getValue(key, regX) {
4246
4262
  const browserDetails = typeof window !== 'undefined' ? window.browserDetails : {};
4247
- if (typeof navigator !== 'undefined' && navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 && Browser.isTouch === true) {
4248
- browserDetails['isIos'] = true;
4263
+ const isSurfaceDevice = typeof navigator !== 'undefined' && navigator.userAgent.indexOf('Windows') > -1 && screen && screen.width < 1360;
4264
+ if (typeof navigator !== 'undefined' && (navigator.platform === 'MacIntel' || isSurfaceDevice) && navigator.maxTouchPoints > 1 && Browser.isTouch === true) {
4265
+ browserDetails['isIos'] = navigator.platform === 'MacIntel';
4249
4266
  browserDetails['isDevice'] = true;
4250
4267
  browserDetails['isTouch'] = true;
4251
4268
  browserDetails['isPointer'] = true;
@@ -7914,9 +7931,11 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7914
7931
  }
7915
7932
  else {
7916
7933
  if (this.dragArea) {
7934
+ let isDialogEle = this.helperElement.classList.contains('e-dialog');
7917
7935
  this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
7918
7936
  draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - iTop);
7919
- draEleLeft = (left - iLeft) < 0 ? this.dragElePosition.left : (left - iLeft);
7937
+ draEleLeft = (left - iLeft) < 0 ? isDialogEle ? (left - (iLeft - this.borderWidth.left)) :
7938
+ this.dragElePosition.left : (left - iLeft);
7920
7939
  }
7921
7940
  else {
7922
7941
  draEleTop = top - iTop;