@syncfusion/ej2-base 21.1.37 → 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;
@@ -4719,8 +4736,15 @@ function prepend(fromElements, toElement, isEval) {
4719
4736
  */
4720
4737
  function append(fromElements, toElement, isEval) {
4721
4738
  const docFrag = document.createDocumentFragment();
4722
- for (const ele of fromElements) {
4723
- docFrag.appendChild(ele);
4739
+ if (fromElements instanceof NodeList) {
4740
+ while (fromElements.length > 0) {
4741
+ docFrag.appendChild(fromElements[0]);
4742
+ }
4743
+ }
4744
+ else {
4745
+ for (const ele of fromElements) {
4746
+ docFrag.appendChild(ele);
4747
+ }
4724
4748
  }
4725
4749
  toElement.appendChild(docFrag);
4726
4750
  if (isEval) {
@@ -7907,9 +7931,11 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7907
7931
  }
7908
7932
  else {
7909
7933
  if (this.dragArea) {
7934
+ let isDialogEle = this.helperElement.classList.contains('e-dialog');
7910
7935
  this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
7911
7936
  draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - iTop);
7912
- 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);
7913
7939
  }
7914
7940
  else {
7915
7941
  draEleTop = top - iTop;