@syncfusion/ej2-base 20.1.61 → 20.2.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +38 -7
  2. package/{README.md → ReadMe.md} +1 -1
  3. package/bin/syncfusion-license.js +2 -0
  4. package/dist/ej2-base.umd.min.js +1 -10
  5. package/dist/ej2-base.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-base.es2015.js +131 -29
  7. package/dist/es6/ej2-base.es2015.js.map +1 -1
  8. package/dist/es6/ej2-base.es5.js +131 -29
  9. package/dist/es6/ej2-base.es5.js.map +1 -1
  10. package/dist/global/ej2-base.min.js +1 -10
  11. package/dist/global/ej2-base.min.js.map +1 -1
  12. package/dist/global/index.d.ts +0 -9
  13. package/helpers/e2e/base.js +62 -52
  14. package/helpers/e2e/index.js +8 -6
  15. package/package.json +8 -113
  16. package/src/animation.d.ts +9 -0
  17. package/src/animation.js +24 -3
  18. package/src/component.js +1 -3
  19. package/src/draggable.d.ts +3 -0
  20. package/src/draggable.js +62 -13
  21. package/src/touch.js +4 -0
  22. package/src/validate-lic.js +39 -9
  23. package/styles/_fusionnew-dark-definition.scss +9 -0
  24. package/styles/_fusionnew-definition.scss +9 -0
  25. package/styles/_material3-dark-definition.scss +10 -0
  26. package/styles/_material3-definition.scss +9 -0
  27. package/styles/bootstrap-dark.css +31 -1
  28. package/styles/bootstrap.css +31 -1
  29. package/styles/bootstrap4.css +31 -1
  30. package/styles/bootstrap5-dark.css +31 -1
  31. package/styles/bootstrap5.css +31 -1
  32. package/styles/common/_core.scss +2 -1
  33. package/styles/definition/_fluent-dark.scss +5 -5
  34. package/styles/definition/_fusionnew-dark.scss +358 -0
  35. package/styles/definition/_fusionnew.scss +357 -0
  36. package/styles/definition/_material3-dark.scss +408 -0
  37. package/styles/definition/_material3.scss +357 -0
  38. package/styles/fabric-dark.css +31 -1
  39. package/styles/fabric.css +31 -1
  40. package/styles/fluent-dark.css +31 -1
  41. package/styles/fluent.css +31 -1
  42. package/styles/highcontrast-light.css +31 -1
  43. package/styles/highcontrast.css +31 -1
  44. package/styles/material-dark.css +31 -1
  45. package/styles/material.css +31 -1
  46. package/styles/tailwind-dark.css +31 -1
  47. package/styles/tailwind.css +31 -1
  48. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -60
  49. package/.github/PULL_REQUEST_TEMPLATE/feature.md +0 -42
@@ -5964,11 +5964,21 @@ let Animation = Animation_1 = class Animation extends Base {
5964
5964
  * @returns {void}
5965
5965
  */
5966
5966
  static delayAnimation(model) {
5967
- if (model.delay) {
5968
- setTimeout(() => { Animation_1.applyAnimation(model); }, model.delay);
5967
+ if (animationMode === 'Disable') {
5968
+ if (model.begin) {
5969
+ model.begin.call(this, model);
5970
+ }
5971
+ if (model.end) {
5972
+ model.end.call(this, model);
5973
+ }
5969
5974
  }
5970
5975
  else {
5971
- Animation_1.applyAnimation(model);
5976
+ if (model.delay) {
5977
+ setTimeout(() => { Animation_1.applyAnimation(model); }, model.delay);
5978
+ }
5979
+ else {
5980
+ Animation_1.applyAnimation(model);
5981
+ }
5972
5982
  }
5973
5983
  }
5974
5984
  /**
@@ -6270,6 +6280,17 @@ function enableRipple(isRipple) {
6270
6280
  isRippleEnabled = isRipple;
6271
6281
  return isRippleEnabled;
6272
6282
  }
6283
+ /**
6284
+ * Defines the Modes of Global animation.
6285
+ * @private
6286
+ */
6287
+ let animationMode = '';
6288
+ /**
6289
+ * Method for set the Global animation modes for Syncfusion Blazor components.
6290
+ */
6291
+ function setGlobalAnimation(value) {
6292
+ animationMode = value;
6293
+ }
6273
6294
 
6274
6295
  /**
6275
6296
  * Module loading operations
@@ -6557,7 +6578,7 @@ const bypassKey = [115, 121, 110, 99, 102, 117, 115, 105,
6557
6578
  class LicenseValidator {
6558
6579
  constructor(key) {
6559
6580
  this.isValidated = false;
6560
- this.version = '20.1';
6581
+ this.version = '20.2';
6561
6582
  this.platform = /JavaScript|ASPNET|ASPNETCORE|ASPNETMVC|FileFormats/i;
6562
6583
  this.errors = {
6563
6584
  noLicense: 'This application was built using a trial version of Syncfusion Essential Studio.' +
@@ -6590,6 +6611,16 @@ class LicenseValidator {
6590
6611
  getKey: get
6591
6612
  };
6592
6613
  })();
6614
+ /**
6615
+ * To manage npx licensing operation.
6616
+ */
6617
+ this.npxManager = (() => {
6618
+ let npxLicKey = "npxKeyReplace";
6619
+ function get() { return npxLicKey; }
6620
+ return {
6621
+ getKey: get
6622
+ };
6623
+ })();
6593
6624
  this.manager.setKey(key);
6594
6625
  }
6595
6626
  /**
@@ -6598,7 +6629,7 @@ class LicenseValidator {
6598
6629
  validate() {
6599
6630
  if (!this.isValidated && (containerObject && !getValue(convertToChar(bypassKey), containerObject) && !getValue('Blazor', containerObject))) {
6600
6631
  let validateMsg;
6601
- if (this.manager && this.manager.getKey()) {
6632
+ if ((this.manager && this.manager.getKey()) || (this.npxManager && this.npxManager.getKey() != 'npxKeyReplace')) {
6602
6633
  let result = this.getInfoFromKey();
6603
6634
  if (result && result.length) {
6604
6635
  for (let res of result) {
@@ -6663,14 +6694,22 @@ class LicenseValidator {
6663
6694
  */
6664
6695
  getInfoFromKey() {
6665
6696
  try {
6666
- let licKey = this.manager.getKey();
6667
- let licKeySplit = licKey.split(';');
6697
+ let licKey = '';
6668
6698
  let pkey = [5439488, 7929856, 5111808, 6488064, 4587520, 7667712, 5439488,
6669
6699
  6881280, 5177344, 7208960, 4194304, 4456448, 6619136, 7733248, 5242880, 7077888,
6670
6700
  6356992, 7602176, 4587520, 7274496, 7471104, 7143424];
6671
6701
  let decryptedStr = [];
6672
6702
  let resultArray = [];
6673
6703
  let invalidPlatform = false;
6704
+ let isNpxKey = false;
6705
+ if (this.manager.getKey()) {
6706
+ licKey = this.manager.getKey();
6707
+ }
6708
+ else {
6709
+ isNpxKey = true;
6710
+ licKey = this.npxManager.getKey().split('npxKeyReplace')[1];
6711
+ }
6712
+ let licKeySplit = licKey.split(';');
6674
6713
  for (let lKey of licKeySplit) {
6675
6714
  let decodeStr = this.getDecryptedData(lKey);
6676
6715
  if (!decodeStr) {
@@ -6678,12 +6717,24 @@ class LicenseValidator {
6678
6717
  }
6679
6718
  let k = 0;
6680
6719
  let buffr = '';
6681
- for (let i = 0; i < decodeStr.length; i++, k++) {
6682
- if (k === pkey.length) {
6683
- k = 0;
6720
+ if (!isNpxKey) {
6721
+ for (let i = 0; i < decodeStr.length; i++, k++) {
6722
+ if (k === pkey.length) {
6723
+ k = 0;
6724
+ }
6725
+ let c = decodeStr.charCodeAt(i);
6726
+ buffr += String.fromCharCode(c ^ (pkey[k] >> 16));
6727
+ }
6728
+ }
6729
+ else {
6730
+ let charKey = decodeStr[decodeStr.length - 1];
6731
+ let decryptedKey = [];
6732
+ for (let i = 0; i < decodeStr.length; i++) {
6733
+ decryptedKey[i] = decodeStr[i].charCodeAt(0) - charKey.charCodeAt(0);
6734
+ }
6735
+ for (let i = 0; i < decryptedKey.length; i++) {
6736
+ buffr += String.fromCharCode(decryptedKey[i]);
6684
6737
  }
6685
- let c = decodeStr.charCodeAt(i);
6686
- buffr += String.fromCharCode(c ^ (pkey[k] >> 16));
6687
6738
  }
6688
6739
  if (this.platform.test(buffr)) {
6689
6740
  decryptedStr = buffr.split(';');
@@ -6786,9 +6837,7 @@ let Component = class Component extends Base {
6786
6837
  this.localObserver = new Observer(this);
6787
6838
  // tslint:disable-next-line:no-function-constructor-with-string-args
6788
6839
  onIntlChange.on('notifyExternalChange', this.detectFunction, this, this.randomId);
6789
- if (typeof window !== "undefined" && typeof document !== "undefined") {
6790
- validateLicense();
6791
- }
6840
+ validateLicense();
6792
6841
  if (!isUndefined(selector)) {
6793
6842
  this.appendTo();
6794
6843
  }
@@ -7650,23 +7699,30 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7650
7699
  draEleTop -= this.parentScrollY;
7651
7700
  draEleLeft -= this.parentScrollX;
7652
7701
  }
7653
- if (this.helperElement.classList.contains('e-treeview')) {
7654
- let body = document.body;
7655
- let html = document.documentElement;
7656
- let tempHeight = Math.max(body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
7657
- let tempWidth = Math.max(body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
7658
- if (draEleTop > tempHeight) {
7659
- draEleTop = tempHeight;
7660
- }
7661
- if (draEleLeft > tempWidth) {
7662
- draEleLeft = tempWidth;
7663
- }
7664
- }
7665
7702
  let dragValue = this.getProcessedPositionValue({ top: draEleTop + 'px', left: draEleLeft + 'px' });
7666
7703
  setStyleAttribute(helperElement, this.getDragPosition(dragValue));
7667
- if (!this.elementInViewport(helperElement) && this.enableAutoScroll) {
7704
+ if (!this.elementInViewport(helperElement) && this.enableAutoScroll && !this.helperElement.classList.contains('e-treeview')) {
7668
7705
  this.helperElement.scrollIntoView();
7669
7706
  }
7707
+ let elements = document.querySelectorAll(':hover');
7708
+ if (this.enableAutoScroll && this.helperElement.classList.contains('e-treeview')) {
7709
+ if (elements.length === 0) {
7710
+ elements = this.getPathElements(evt);
7711
+ }
7712
+ /* tslint:disable no-any */
7713
+ let scrollParent = this.getScrollParent(elements, false);
7714
+ if (this.elementInViewport(this.helperElement)) {
7715
+ this.getScrollPosition(scrollParent, draEleTop);
7716
+ }
7717
+ else if (!this.elementInViewport(this.helperElement)) {
7718
+ elements = [].slice.call(document.querySelectorAll(':hover'));
7719
+ if (elements.length === 0) {
7720
+ elements = this.getPathElements(evt);
7721
+ }
7722
+ scrollParent = this.getScrollParent(elements, true);
7723
+ this.getScrollPosition(scrollParent, draEleTop);
7724
+ }
7725
+ }
7670
7726
  this.dragProcessStarted = true;
7671
7727
  this.prevLeft = left;
7672
7728
  this.prevTop = top;
@@ -7675,6 +7731,48 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7675
7731
  this.pageX = pagex;
7676
7732
  this.pageY = pagey;
7677
7733
  }
7734
+ /* tslint:disable no-any */
7735
+ getScrollParent(node, reverse) {
7736
+ /* tslint:disable no-any */
7737
+ const nodeEl = reverse ? node.reverse() : node;
7738
+ let hasScroll;
7739
+ for (let i = nodeEl.length - 1; i >= 0; i--) {
7740
+ hasScroll = window.getComputedStyle(nodeEl[i])['overflow-y'];
7741
+ if ((hasScroll === 'auto' || hasScroll === 'scroll')
7742
+ && nodeEl[i].scrollHeight > nodeEl[i].clientHeight) {
7743
+ return nodeEl[i];
7744
+ }
7745
+ }
7746
+ hasScroll = window.getComputedStyle(document.scrollingElement)['overflow-y'];
7747
+ if (hasScroll === 'visible') {
7748
+ document.scrollingElement.style.overflow = 'auto';
7749
+ return document.scrollingElement;
7750
+ }
7751
+ }
7752
+ getScrollPosition(nodeEle, draEleTop) {
7753
+ if (nodeEle && nodeEle === document.scrollingElement) {
7754
+ if ((nodeEle.clientHeight - nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight) < draEleTop
7755
+ && nodeEle.getBoundingClientRect().height > draEleTop) {
7756
+ nodeEle.scrollTop += this.helperElement.clientHeight;
7757
+ }
7758
+ else if (nodeEle.scrollHeight - nodeEle.clientHeight > draEleTop) {
7759
+ nodeEle.scrollTop -= this.helperElement.clientHeight;
7760
+ }
7761
+ }
7762
+ else if (nodeEle && nodeEle !== document.scrollingElement) {
7763
+ if ((nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight) < draEleTop) {
7764
+ nodeEle.scrollTop += this.helperElement.clientHeight;
7765
+ }
7766
+ else if (nodeEle.getBoundingClientRect().top > (draEleTop - this.helperElement.clientHeight)) {
7767
+ nodeEle.scrollTop -= this.helperElement.clientHeight;
7768
+ }
7769
+ }
7770
+ }
7771
+ getPathElements(evt) {
7772
+ const elementTop = evt.clientX > 0 ? evt.clientX : 0;
7773
+ const elementLeft = evt.clientY > 0 ? evt.clientY : 0;
7774
+ return document.elementsFromPoint(elementTop, elementLeft);
7775
+ }
7678
7776
  triggerOutFunction(evt, eleObj) {
7679
7777
  this.hoverObject.instance.intOut(evt, eleObj.target);
7680
7778
  this.hoverObject.instance.dragData[this.scope] = null;
@@ -8508,6 +8606,10 @@ let Touch = class Touch extends Base {
8508
8606
  diffX = Math.floor(diffX < 0 ? -1 * diffX : diffX);
8509
8607
  diffY = Math.floor(diffY < 0 ? -1 * diffY : diffX);
8510
8608
  this.isTouchMoved = diffX > 1 || diffY > 1;
8609
+ const isFirefox = (/Firefox/).test(Browser.userAgent);
8610
+ if (isFirefox && point.clientX === 0 && point.clientY === 0 && evt.type === 'mouseup') {
8611
+ this.isTouchMoved = false;
8612
+ }
8511
8613
  this.endPoint = point;
8512
8614
  this.calcPoints(evt);
8513
8615
  const swipeArgs = {
@@ -9329,5 +9431,5 @@ class SanitizeHtmlHelper {
9329
9431
  * Base modules
9330
9432
  */
9331
9433
 
9332
- export { blazorCultureFormats, IntlBase, Ajax, Animation, rippleEffect, isRippleEnabled, enableRipple, Base, getComponent, removeChildInstance, Browser, versionBasedStatePersistence, enableVersionBasedPersistence, Component, ChildProperty, Position, Draggable, Droppable, EventHandler, onIntlChange, rightToLeft, cldrData, defaultCulture, defaultCurrencyCode, Internationalization, setCulture, setCurrencyCode, loadCldr, enableRtl, getNumericObject, getNumberDependable, getDefaultDateObject, KeyboardEvents, L10n, ModuleLoader, Property, Complex, ComplexFactory, Collection, CollectionFactory, Event$1 as Event, NotifyPropertyChanges, CreateBuilder, SwipeSettings, Touch, HijriParser, blazorTemplates, getRandomId, compile$$1 as compile, updateBlazorTemplate, resetBlazorTemplate, setTemplateEngine, getTemplateEngine, disableBlazorMode, createInstance, setImmediate, getValue, setValue, deleteObject, containerObject, isObject, getEnumValue, merge, extend, isNullOrUndefined, isUndefined, getUniqueID, debounce, queryParams, isObjectArray, compareElementParent, throwError, print, formatUnit, enableBlazorMode, isBlazor, getElement, getInstance, addInstance, uniqueID, createElement, addClass, removeClass, isVisible, prepend, append, detach, remove, attributes, select, selectAll, closest, siblings, getAttributeOrDefault, setStyleAttribute, classList, matches, includeInnerHTML, containsClass, cloneNode, Observer, SanitizeHtmlHelper, registerLicense, validateLicense, getVersion };
9434
+ export { blazorCultureFormats, IntlBase, Ajax, Animation, rippleEffect, isRippleEnabled, enableRipple, animationMode, setGlobalAnimation, Base, getComponent, removeChildInstance, Browser, versionBasedStatePersistence, enableVersionBasedPersistence, Component, ChildProperty, Position, Draggable, Droppable, EventHandler, onIntlChange, rightToLeft, cldrData, defaultCulture, defaultCurrencyCode, Internationalization, setCulture, setCurrencyCode, loadCldr, enableRtl, getNumericObject, getNumberDependable, getDefaultDateObject, KeyboardEvents, L10n, ModuleLoader, Property, Complex, ComplexFactory, Collection, CollectionFactory, Event$1 as Event, NotifyPropertyChanges, CreateBuilder, SwipeSettings, Touch, HijriParser, blazorTemplates, getRandomId, compile$$1 as compile, updateBlazorTemplate, resetBlazorTemplate, setTemplateEngine, getTemplateEngine, disableBlazorMode, createInstance, setImmediate, getValue, setValue, deleteObject, containerObject, isObject, getEnumValue, merge, extend, isNullOrUndefined, isUndefined, getUniqueID, debounce, queryParams, isObjectArray, compareElementParent, throwError, print, formatUnit, enableBlazorMode, isBlazor, getElement, getInstance, addInstance, uniqueID, createElement, addClass, removeClass, isVisible, prepend, append, detach, remove, attributes, select, selectAll, closest, siblings, getAttributeOrDefault, setStyleAttribute, classList, matches, includeInnerHTML, containsClass, cloneNode, Observer, SanitizeHtmlHelper, registerLicense, validateLicense, getVersion };
9333
9435
  //# sourceMappingURL=ej2-base.es2015.js.map