@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
@@ -6129,11 +6129,21 @@ var Animation = /** @__PURE__ @class */ (function (_super) {
6129
6129
  * @returns {void}
6130
6130
  */
6131
6131
  Animation.delayAnimation = function (model) {
6132
- if (model.delay) {
6133
- setTimeout(function () { Animation_1.applyAnimation(model); }, model.delay);
6132
+ if (animationMode === 'Disable') {
6133
+ if (model.begin) {
6134
+ model.begin.call(this, model);
6135
+ }
6136
+ if (model.end) {
6137
+ model.end.call(this, model);
6138
+ }
6134
6139
  }
6135
6140
  else {
6136
- Animation_1.applyAnimation(model);
6141
+ if (model.delay) {
6142
+ setTimeout(function () { Animation_1.applyAnimation(model); }, model.delay);
6143
+ }
6144
+ else {
6145
+ Animation_1.applyAnimation(model);
6146
+ }
6137
6147
  }
6138
6148
  };
6139
6149
  /**
@@ -6438,6 +6448,17 @@ function enableRipple(isRipple) {
6438
6448
  isRippleEnabled = isRipple;
6439
6449
  return isRippleEnabled;
6440
6450
  }
6451
+ /**
6452
+ * Defines the Modes of Global animation.
6453
+ * @private
6454
+ */
6455
+ var animationMode = '';
6456
+ /**
6457
+ * Method for set the Global animation modes for Syncfusion Blazor components.
6458
+ */
6459
+ function setGlobalAnimation(value) {
6460
+ animationMode = value;
6461
+ }
6441
6462
 
6442
6463
  /**
6443
6464
  * Module loading operations
@@ -6732,7 +6753,7 @@ var bypassKey = [115, 121, 110, 99, 102, 117, 115, 105,
6732
6753
  var LicenseValidator = /** @__PURE__ @class */ (function () {
6733
6754
  function LicenseValidator(key) {
6734
6755
  this.isValidated = false;
6735
- this.version = '20.1';
6756
+ this.version = '20.2';
6736
6757
  this.platform = /JavaScript|ASPNET|ASPNETCORE|ASPNETMVC|FileFormats/i;
6737
6758
  this.errors = {
6738
6759
  noLicense: 'This application was built using a trial version of Syncfusion Essential Studio.' +
@@ -6765,6 +6786,16 @@ var LicenseValidator = /** @__PURE__ @class */ (function () {
6765
6786
  getKey: get
6766
6787
  };
6767
6788
  })();
6789
+ /**
6790
+ * To manage npx licensing operation.
6791
+ */
6792
+ this.npxManager = (function () {
6793
+ var npxLicKey = "npxKeyReplace";
6794
+ function get() { return npxLicKey; }
6795
+ return {
6796
+ getKey: get
6797
+ };
6798
+ })();
6768
6799
  this.manager.setKey(key);
6769
6800
  }
6770
6801
  /**
@@ -6773,7 +6804,7 @@ var LicenseValidator = /** @__PURE__ @class */ (function () {
6773
6804
  LicenseValidator.prototype.validate = function () {
6774
6805
  if (!this.isValidated && (containerObject && !getValue(convertToChar(bypassKey), containerObject) && !getValue('Blazor', containerObject))) {
6775
6806
  var validateMsg = void 0;
6776
- if (this.manager && this.manager.getKey()) {
6807
+ if ((this.manager && this.manager.getKey()) || (this.npxManager && this.npxManager.getKey() != 'npxKeyReplace')) {
6777
6808
  var result = this.getInfoFromKey();
6778
6809
  if (result && result.length) {
6779
6810
  for (var _i = 0, result_1 = result; _i < result_1.length; _i++) {
@@ -6839,14 +6870,22 @@ var LicenseValidator = /** @__PURE__ @class */ (function () {
6839
6870
  */
6840
6871
  LicenseValidator.prototype.getInfoFromKey = function () {
6841
6872
  try {
6842
- var licKey = this.manager.getKey();
6843
- var licKeySplit = licKey.split(';');
6873
+ var licKey = '';
6844
6874
  var pkey = [5439488, 7929856, 5111808, 6488064, 4587520, 7667712, 5439488,
6845
6875
  6881280, 5177344, 7208960, 4194304, 4456448, 6619136, 7733248, 5242880, 7077888,
6846
6876
  6356992, 7602176, 4587520, 7274496, 7471104, 7143424];
6847
6877
  var decryptedStr = [];
6848
6878
  var resultArray = [];
6849
6879
  var invalidPlatform = false;
6880
+ var isNpxKey = false;
6881
+ if (this.manager.getKey()) {
6882
+ licKey = this.manager.getKey();
6883
+ }
6884
+ else {
6885
+ isNpxKey = true;
6886
+ licKey = this.npxManager.getKey().split('npxKeyReplace')[1];
6887
+ }
6888
+ var licKeySplit = licKey.split(';');
6850
6889
  for (var _i = 0, licKeySplit_1 = licKeySplit; _i < licKeySplit_1.length; _i++) {
6851
6890
  var lKey = licKeySplit_1[_i];
6852
6891
  var decodeStr = this.getDecryptedData(lKey);
@@ -6855,12 +6894,24 @@ var LicenseValidator = /** @__PURE__ @class */ (function () {
6855
6894
  }
6856
6895
  var k = 0;
6857
6896
  var buffr = '';
6858
- for (var i = 0; i < decodeStr.length; i++, k++) {
6859
- if (k === pkey.length) {
6860
- k = 0;
6897
+ if (!isNpxKey) {
6898
+ for (var i = 0; i < decodeStr.length; i++, k++) {
6899
+ if (k === pkey.length) {
6900
+ k = 0;
6901
+ }
6902
+ var c = decodeStr.charCodeAt(i);
6903
+ buffr += String.fromCharCode(c ^ (pkey[k] >> 16));
6904
+ }
6905
+ }
6906
+ else {
6907
+ var charKey = decodeStr[decodeStr.length - 1];
6908
+ var decryptedKey = [];
6909
+ for (var i = 0; i < decodeStr.length; i++) {
6910
+ decryptedKey[i] = decodeStr[i].charCodeAt(0) - charKey.charCodeAt(0);
6911
+ }
6912
+ for (var i = 0; i < decryptedKey.length; i++) {
6913
+ buffr += String.fromCharCode(decryptedKey[i]);
6861
6914
  }
6862
- var c = decodeStr.charCodeAt(i);
6863
- buffr += String.fromCharCode(c ^ (pkey[k] >> 16));
6864
6915
  }
6865
6916
  if (this.platform.test(buffr)) {
6866
6917
  decryptedStr = buffr.split(';');
@@ -6979,9 +7030,7 @@ var Component = /** @__PURE__ @class */ (function (_super) {
6979
7030
  _this.localObserver = new Observer(_this);
6980
7031
  // tslint:disable-next-line:no-function-constructor-with-string-args
6981
7032
  onIntlChange.on('notifyExternalChange', _this.detectFunction, _this, _this.randomId);
6982
- if (typeof window !== "undefined" && typeof document !== "undefined") {
6983
- validateLicense();
6984
- }
7033
+ validateLicense();
6985
7034
  if (!isUndefined(selector)) {
6986
7035
  _this.appendTo();
6987
7036
  }
@@ -7879,23 +7928,30 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
7879
7928
  draEleTop -= this.parentScrollY;
7880
7929
  draEleLeft -= this.parentScrollX;
7881
7930
  }
7882
- if (this.helperElement.classList.contains('e-treeview')) {
7883
- var body = document.body;
7884
- var html = document.documentElement;
7885
- var tempHeight = Math.max(body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
7886
- var tempWidth = Math.max(body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
7887
- if (draEleTop > tempHeight) {
7888
- draEleTop = tempHeight;
7889
- }
7890
- if (draEleLeft > tempWidth) {
7891
- draEleLeft = tempWidth;
7892
- }
7893
- }
7894
7931
  var dragValue = this.getProcessedPositionValue({ top: draEleTop + 'px', left: draEleLeft + 'px' });
7895
7932
  setStyleAttribute(helperElement, this.getDragPosition(dragValue));
7896
- if (!this.elementInViewport(helperElement) && this.enableAutoScroll) {
7933
+ if (!this.elementInViewport(helperElement) && this.enableAutoScroll && !this.helperElement.classList.contains('e-treeview')) {
7897
7934
  this.helperElement.scrollIntoView();
7898
7935
  }
7936
+ var elements = document.querySelectorAll(':hover');
7937
+ if (this.enableAutoScroll && this.helperElement.classList.contains('e-treeview')) {
7938
+ if (elements.length === 0) {
7939
+ elements = this.getPathElements(evt);
7940
+ }
7941
+ /* tslint:disable no-any */
7942
+ var scrollParent = this.getScrollParent(elements, false);
7943
+ if (this.elementInViewport(this.helperElement)) {
7944
+ this.getScrollPosition(scrollParent, draEleTop);
7945
+ }
7946
+ else if (!this.elementInViewport(this.helperElement)) {
7947
+ elements = [].slice.call(document.querySelectorAll(':hover'));
7948
+ if (elements.length === 0) {
7949
+ elements = this.getPathElements(evt);
7950
+ }
7951
+ scrollParent = this.getScrollParent(elements, true);
7952
+ this.getScrollPosition(scrollParent, draEleTop);
7953
+ }
7954
+ }
7899
7955
  this.dragProcessStarted = true;
7900
7956
  this.prevLeft = left;
7901
7957
  this.prevTop = top;
@@ -7904,6 +7960,48 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
7904
7960
  this.pageX = pagex;
7905
7961
  this.pageY = pagey;
7906
7962
  };
7963
+ /* tslint:disable no-any */
7964
+ Draggable.prototype.getScrollParent = function (node, reverse) {
7965
+ /* tslint:disable no-any */
7966
+ var nodeEl = reverse ? node.reverse() : node;
7967
+ var hasScroll;
7968
+ for (var i = nodeEl.length - 1; i >= 0; i--) {
7969
+ hasScroll = window.getComputedStyle(nodeEl[i])['overflow-y'];
7970
+ if ((hasScroll === 'auto' || hasScroll === 'scroll')
7971
+ && nodeEl[i].scrollHeight > nodeEl[i].clientHeight) {
7972
+ return nodeEl[i];
7973
+ }
7974
+ }
7975
+ hasScroll = window.getComputedStyle(document.scrollingElement)['overflow-y'];
7976
+ if (hasScroll === 'visible') {
7977
+ document.scrollingElement.style.overflow = 'auto';
7978
+ return document.scrollingElement;
7979
+ }
7980
+ };
7981
+ Draggable.prototype.getScrollPosition = function (nodeEle, draEleTop) {
7982
+ if (nodeEle && nodeEle === document.scrollingElement) {
7983
+ if ((nodeEle.clientHeight - nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight) < draEleTop
7984
+ && nodeEle.getBoundingClientRect().height > draEleTop) {
7985
+ nodeEle.scrollTop += this.helperElement.clientHeight;
7986
+ }
7987
+ else if (nodeEle.scrollHeight - nodeEle.clientHeight > draEleTop) {
7988
+ nodeEle.scrollTop -= this.helperElement.clientHeight;
7989
+ }
7990
+ }
7991
+ else if (nodeEle && nodeEle !== document.scrollingElement) {
7992
+ if ((nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight) < draEleTop) {
7993
+ nodeEle.scrollTop += this.helperElement.clientHeight;
7994
+ }
7995
+ else if (nodeEle.getBoundingClientRect().top > (draEleTop - this.helperElement.clientHeight)) {
7996
+ nodeEle.scrollTop -= this.helperElement.clientHeight;
7997
+ }
7998
+ }
7999
+ };
8000
+ Draggable.prototype.getPathElements = function (evt) {
8001
+ var elementTop = evt.clientX > 0 ? evt.clientX : 0;
8002
+ var elementLeft = evt.clientY > 0 ? evt.clientY : 0;
8003
+ return document.elementsFromPoint(elementTop, elementLeft);
8004
+ };
7907
8005
  Draggable.prototype.triggerOutFunction = function (evt, eleObj) {
7908
8006
  this.hoverObject.instance.intOut(evt, eleObj.target);
7909
8007
  this.hoverObject.instance.dragData[this.scope] = null;
@@ -8795,6 +8893,10 @@ var Touch = /** @__PURE__ @class */ (function (_super) {
8795
8893
  diffX = Math.floor(diffX < 0 ? -1 * diffX : diffX);
8796
8894
  diffY = Math.floor(diffY < 0 ? -1 * diffY : diffX);
8797
8895
  _this.isTouchMoved = diffX > 1 || diffY > 1;
8896
+ var isFirefox = (/Firefox/).test(Browser.userAgent);
8897
+ if (isFirefox && point.clientX === 0 && point.clientY === 0 && evt.type === 'mouseup') {
8898
+ _this.isTouchMoved = false;
8899
+ }
8798
8900
  _this.endPoint = point;
8799
8901
  _this.calcPoints(evt);
8800
8902
  var swipeArgs = {
@@ -9599,5 +9701,5 @@ var SanitizeHtmlHelper = /** @__PURE__ @class */ (function () {
9599
9701
  * Base modules
9600
9702
  */
9601
9703
 
9602
- 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 };
9704
+ 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 };
9603
9705
  //# sourceMappingURL=ej2-base.es5.js.map