@syncfusion/ej2-base 19.3.53 → 19.4.38

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 (51) hide show
  1. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +60 -0
  2. package/.github/PULL_REQUEST_TEMPLATE/feature.md +42 -0
  3. package/CHANGELOG.md +0 -2
  4. package/README.md +1 -1
  5. package/dist/ej2-base.umd.min.js +2 -2
  6. package/dist/ej2-base.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-base.es2015.js +52 -45
  8. package/dist/es6/ej2-base.es2015.js.map +1 -1
  9. package/dist/es6/ej2-base.es5.js +42 -37
  10. package/dist/es6/ej2-base.es5.js.map +1 -1
  11. package/dist/global/ej2-base.min.js +2 -2
  12. package/dist/global/ej2-base.min.js.map +1 -1
  13. package/dist/global/index.d.ts +1 -1
  14. package/package.json +6 -6
  15. package/src/animation.js +1 -1
  16. package/src/draggable-model.d.ts +1 -0
  17. package/src/draggable.d.ts +4 -2
  18. package/src/draggable.js +38 -33
  19. package/src/intl/intl-base.js +2 -2
  20. package/src/template.js +1 -1
  21. package/styles/_fluent-dark-definition.scss +10 -0
  22. package/styles/_fluent-definition.scss +10 -0
  23. package/styles/bootstrap-dark.css +31 -0
  24. package/styles/bootstrap.css +31 -0
  25. package/styles/bootstrap4.css +31 -0
  26. package/styles/bootstrap5-dark.css +31 -0
  27. package/styles/bootstrap5.css +31 -0
  28. package/styles/common/_core.scss +36 -0
  29. package/styles/definition/_bootstrap-dark.scss +1 -0
  30. package/styles/definition/_bootstrap.scss +1 -0
  31. package/styles/definition/_bootstrap4.scss +1 -0
  32. package/styles/definition/_bootstrap5-dark.scss +1 -0
  33. package/styles/definition/_bootstrap5.scss +2 -1
  34. package/styles/definition/_fabric-dark.scss +1 -0
  35. package/styles/definition/_fabric.scss +1 -0
  36. package/styles/definition/_fluent-dark.scss +408 -0
  37. package/styles/definition/_fluent.scss +410 -0
  38. package/styles/definition/_highcontrast-light.scss +1 -0
  39. package/styles/definition/_highcontrast.scss +1 -0
  40. package/styles/definition/_material-dark.scss +1 -0
  41. package/styles/definition/_material.scss +1 -0
  42. package/styles/definition/_tailwind-dark.scss +1 -0
  43. package/styles/definition/_tailwind.scss +1 -0
  44. package/styles/fabric-dark.css +31 -0
  45. package/styles/fabric.css +31 -0
  46. package/styles/highcontrast-light.css +31 -0
  47. package/styles/highcontrast.css +31 -0
  48. package/styles/material-dark.css +31 -0
  49. package/styles/material.css +31 -0
  50. package/styles/tailwind-dark.css +32 -629
  51. package/styles/tailwind.css +32 -629
@@ -3867,7 +3867,7 @@ var IntlBase;
3867
3867
  }
3868
3868
  iCulture = iCulture.slice(0, 2).toUpperCase() + iCulture.substr(2);
3869
3869
  if (mapper) {
3870
- firstDay = mapper[iCulture] || defaultFirstDay;
3870
+ firstDay = mapper[iCulture] || mapper[iCulture.slice(0, 2)] || defaultFirstDay;
3871
3871
  }
3872
3872
  return firstDayMapper[firstDay];
3873
3873
  }
@@ -3904,7 +3904,7 @@ var IntlBase;
3904
3904
  if (day < 4) {
3905
3905
  weeknum = Math.floor((daynum + day - 1) / 7) + 1;
3906
3906
  if (weeknum > 52) {
3907
- const nYear = new Date(this.getFullYear() + 1, 0, 1);
3907
+ const nYear = new Date(date.getFullYear() + 1, 0, 1);
3908
3908
  let nday = nYear.getDay();
3909
3909
  nday = nday >= 0 ? nday : nday + 7;
3910
3910
  weeknum = nday < 4 ? 1 : 53;
@@ -6122,7 +6122,7 @@ Animation = Animation_1 = __decorate([
6122
6122
  function rippleEffect(element, rippleOptions, done) {
6123
6123
  const rippleModel = getRippleModel(rippleOptions);
6124
6124
  if (rippleModel.rippleFlag === false || (rippleModel.rippleFlag === undefined && !isRippleEnabled)) {
6125
- return Function;
6125
+ return (() => { });
6126
6126
  }
6127
6127
  element.setAttribute('data-ripple', 'true');
6128
6128
  EventHandler.add(element, 'mousedown', rippleHandler, { parent: element, rippleOptions: rippleModel });
@@ -7020,6 +7020,7 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7020
7020
  this.prevTop = 0;
7021
7021
  this.dragProcessStarted = false;
7022
7022
  /* tslint:disable no-any */
7023
+ this.eleTop = 0;
7023
7024
  this.tapHoldTimer = 0;
7024
7025
  this.externalInitialize = false;
7025
7026
  this.diffY = 0;
@@ -7240,6 +7241,11 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7240
7241
  if (this.clone && marginTop !== 0) {
7241
7242
  pos.top += marginTop;
7242
7243
  }
7244
+ this.eleTop = !isNaN(parseFloat(styles.top)) ? parseFloat(styles.top) - this.offset.top : 0;
7245
+ /* istanbul ignore next */
7246
+ // if (this.eleTop > 0) {
7247
+ // pos.top += this.eleTop;
7248
+ // }
7243
7249
  if (this.enableScrollHandler && !this.clone) {
7244
7250
  pos.top -= this.parentScrollY;
7245
7251
  pos.left -= this.parentScrollX;
@@ -7351,7 +7357,6 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7351
7357
  let dLeft = this.position.left - this.diffX;
7352
7358
  let dTop = this.position.top - this.diffY;
7353
7359
  let styles = getComputedStyle(helperElement);
7354
- let marginTop = parseFloat(styles.marginTop);
7355
7360
  if (this.dragArea) {
7356
7361
  if (this.pageX !== pagex || this.skipDistanceCheck) {
7357
7362
  let helperWidth = helperElement.offsetWidth + (parseFloat(styles.marginLeft)
@@ -7400,41 +7405,46 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7400
7405
  this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
7401
7406
  draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - iTop);
7402
7407
  draEleLeft = (left - iLeft) < 0 ? this.dragElePosition.left : (left - iLeft);
7403
- // when drag-element has margin-top
7404
- /* istanbul ignore next */
7405
- if (marginTop > 0) {
7406
- if (this.clone) {
7407
- draEleTop += this.element.offsetTop;
7408
- if (dTop < 0) {
7409
- if ((this.element.offsetTop + dTop) >= 0) {
7410
- draEleTop = this.element.offsetTop + dTop;
7411
- }
7412
- else {
7413
- draEleTop -= this.element.offsetTop;
7414
- }
7408
+ }
7409
+ else {
7410
+ draEleTop = top - iTop;
7411
+ draEleLeft = left - iLeft;
7412
+ }
7413
+ let marginTop = parseFloat(getComputedStyle(this.element).marginTop);
7414
+ // when drag-element has margin-top
7415
+ /* istanbul ignore next */
7416
+ if (marginTop > 0) {
7417
+ if (this.clone) {
7418
+ draEleTop += marginTop;
7419
+ if (dTop < 0) {
7420
+ if ((marginTop + dTop) >= 0) {
7421
+ draEleTop = marginTop + dTop;
7422
+ }
7423
+ else {
7424
+ draEleTop -= marginTop;
7415
7425
  }
7416
- draEleTop = (this.dragLimit.bottom < draEleTop) ? this.dragLimit.bottom : draEleTop;
7417
7426
  }
7418
- if ((top - iTop) < 0) {
7419
- if (dTop + marginTop + (helperElement.offsetHeight - iTop) >= 0) {
7420
- let tempDraEleTop = this.dragLimit.top + dTop - iTop;
7421
- if ((tempDraEleTop + marginTop + iTop) < 0) {
7422
- draEleTop -= marginTop + iTop;
7423
- }
7424
- else {
7425
- draEleTop = tempDraEleTop;
7426
- }
7427
+ draEleTop = (this.dragLimit.bottom < draEleTop) ? this.dragLimit.bottom : draEleTop;
7428
+ }
7429
+ if ((top - iTop) < 0) {
7430
+ if (dTop + marginTop + (helperElement.offsetHeight - iTop) >= 0) {
7431
+ let tempDraEleTop = this.dragLimit.top + dTop - iTop;
7432
+ if ((tempDraEleTop + marginTop + iTop) < 0) {
7433
+ draEleTop -= marginTop + iTop;
7427
7434
  }
7428
7435
  else {
7429
- draEleTop -= marginTop + iTop;
7436
+ draEleTop = tempDraEleTop;
7430
7437
  }
7431
7438
  }
7439
+ else {
7440
+ draEleTop -= marginTop + iTop;
7441
+ }
7432
7442
  }
7433
7443
  }
7434
- else {
7435
- draEleTop = top - iTop;
7436
- draEleLeft = left - iLeft;
7437
- }
7444
+ /* istanbul ignore next */
7445
+ // if(this.eleTop > 0) {
7446
+ // draEleTop += this.eleTop;
7447
+ // }
7438
7448
  if (this.enableScrollHandler && !this.clone) {
7439
7449
  draEleTop -= this.parentScrollY;
7440
7450
  draEleLeft -= this.parentScrollX;
@@ -7607,11 +7617,6 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7607
7617
  pageX = this.clone ? intCoord.pageX : (intCoord.pageX + window.pageXOffset) - this.relativeXPosition;
7608
7618
  pageY = this.clone ? intCoord.pageY : (intCoord.pageY + window.pageYOffset) - this.relativeYPosition;
7609
7619
  }
7610
- if (!this.clone && this.dragArea && !isdragscroll) {
7611
- this.getScrollableValues();
7612
- pageY -= this.tempScrollHeight ? this.parentScrollY : 0;
7613
- pageX -= this.tempScrollWidth ? this.parentScrollX : 0;
7614
- }
7615
7620
  return {
7616
7621
  left: pageX - (this.margin.left + this.cursorAt.left),
7617
7622
  top: pageY - (this.margin.top + this.cursorAt.top)
@@ -8553,16 +8558,18 @@ function compile$1(template, helper, ignorePrefix) {
8553
8558
  }
8554
8559
  str = str.replace(str, str1);
8555
8560
  }
8556
- else if(str.match(hrefRegex)) {
8557
- var check = str.match(hrefRegex);
8558
- var str1 = str;
8559
- for (var i=0; i < check.length; i++) {
8560
- var check1 = str.match(hrefRegex)[i].split('href=')[1];
8561
- var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;
8562
- change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;
8563
- str1 = str1.replace(check1, change);
8561
+ else if (str.match(/(?:href='')/) === null) {
8562
+ if(str.match(hrefRegex)) {
8563
+ var check = str.match(hrefRegex);
8564
+ var str1 = str;
8565
+ for (var i=0; i < check.length; i++) {
8566
+ var check1 = str.match(hrefRegex)[i].split('href=')[1];
8567
+ var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;
8568
+ change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;
8569
+ str1 = str1.replace(check1, change);
8570
+ }
8571
+ str = str.replace(str, str1);
8564
8572
  }
8565
- str = str.replace(str, str1);
8566
8573
  }
8567
8574
  `;
8568
8575
  const fnCode = "var str=\"" + evalExpResult + "\";" + condtion + " return str;";