@syncfusion/ej2-base 20.1.57 → 20.2.36

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.
@@ -211,7 +211,7 @@ function extend(copied, first, second, deep) {
211
211
  else {
212
212
  /* istanbul ignore next */
213
213
  clone = isBlazor() ? src && Object.keys(copy).length : src ? src : [];
214
- result[key] = extend([], clone, copy, deep);
214
+ result[key] = extend([], clone, copy, (clone && clone.length) || (copy && copy.length));
215
215
  }
216
216
  }
217
217
  else {
@@ -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,6 +7699,18 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7650
7699
  draEleTop -= this.parentScrollY;
7651
7700
  draEleLeft -= this.parentScrollX;
7652
7701
  }
7702
+ if (this.helperElement.classList.contains('e-treeview')) {
7703
+ let body = document.body;
7704
+ let html = document.documentElement;
7705
+ let tempHeight = Math.max(body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
7706
+ let tempWidth = Math.max(body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
7707
+ if (draEleTop > tempHeight) {
7708
+ draEleTop = tempHeight;
7709
+ }
7710
+ if (draEleLeft > tempWidth) {
7711
+ draEleLeft = tempWidth;
7712
+ }
7713
+ }
7653
7714
  let dragValue = this.getProcessedPositionValue({ top: draEleTop + 'px', left: draEleLeft + 'px' });
7654
7715
  setStyleAttribute(helperElement, this.getDragPosition(dragValue));
7655
7716
  if (!this.elementInViewport(helperElement) && this.enableAutoScroll) {
@@ -9317,5 +9378,5 @@ class SanitizeHtmlHelper {
9317
9378
  * Base modules
9318
9379
  */
9319
9380
 
9320
- 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 };
9381
+ 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 };
9321
9382
  //# sourceMappingURL=ej2-base.es2015.js.map