@syncfusion/ej2-base 23.1.41 → 23.2.6

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.
@@ -2332,7 +2332,7 @@ var Observer = /** @__PURE__ @class */ (function () {
2332
2332
  }
2333
2333
  var cntxt = context || this.context;
2334
2334
  if (this.notExist(property)) {
2335
- this.boundedEvents["" + property] = [{ handler: handler, context: cntxt }];
2335
+ this.boundedEvents["" + property] = [{ handler: handler, context: cntxt, id: id }];
2336
2336
  return;
2337
2337
  }
2338
2338
  if (!isNullOrUndefined(id)) {
@@ -2473,6 +2473,26 @@ var Observer = /** @__PURE__ @class */ (function () {
2473
2473
  Observer.prototype.destroy = function () {
2474
2474
  this.boundedEvents = this.context = undefined;
2475
2475
  };
2476
+ /**
2477
+ * To remove internationalization events
2478
+ *
2479
+ * @returns {void} ?
2480
+ */
2481
+ Observer.prototype.offIntlEvents = function () {
2482
+ var eventsArr = this.boundedEvents['notifyExternalChange'];
2483
+ if (eventsArr) {
2484
+ for (var i = 0; i < eventsArr.length; i++) {
2485
+ var curContext = eventsArr[0].context;
2486
+ if (curContext && curContext.detectFunction && curContext.randomId && !curContext.isRendered) {
2487
+ this.off('notifyExternalChange', curContext.detectFunction, curContext.randomId);
2488
+ i--;
2489
+ }
2490
+ }
2491
+ if (!this.boundedEvents['notifyExternalChange'].length) {
2492
+ delete this.boundedEvents['notifyExternalChange'];
2493
+ }
2494
+ }
2495
+ };
2476
2496
  /**
2477
2497
  * Returns if the property exists.
2478
2498
  *
@@ -3610,7 +3630,8 @@ var IntlBase;
3610
3630
  */
3611
3631
  function changeCurrencySymbol(val, sym) {
3612
3632
  if (val) {
3613
- return val.replace(IntlBase.defaultCurrency, sym);
3633
+ val = val.replace(IntlBase.defaultCurrency, sym);
3634
+ return (sym === '') ? val.trim() : val;
3614
3635
  }
3615
3636
  return '';
3616
3637
  }
@@ -5554,7 +5575,8 @@ var Base = /** @__PURE__ @class */ (function () {
5554
5575
  var _this = this;
5555
5576
  // eslint-disable-next-line
5556
5577
  this.element.ej2_instances =
5557
- this.element.ej2_instances.filter(function (i) { return i !== _this; });
5578
+ this.element.ej2_instances ? this.element.ej2_instances.filter(function (i) { return i !== _this; })
5579
+ : [];
5558
5580
  removeClass([this.element], ['e-' + this.getModuleName()]);
5559
5581
  if (this.element.ej2_instances.length === 0) {
5560
5582
  // Remove module class from the root element
@@ -9420,7 +9442,7 @@ var Touch = /** @__PURE__ @class */ (function (_super) {
9420
9442
  /**
9421
9443
  * Template Engine
9422
9444
  */
9423
- var LINES = new RegExp('\\n|\\r|\\s\\s+', 'g');
9445
+ var LINES = new RegExp('[\\n\\r\\s]+', 'g');
9424
9446
  var QUOTES = new RegExp(/'|"/g);
9425
9447
  var IF_STMT = new RegExp('if ?\\(');
9426
9448
  var ELSEIF_STMT = new RegExp('else if ?\\(');
@@ -9508,7 +9530,7 @@ function evalExp(str, nameSpace, helper, ignorePrefix) {
9508
9530
  str = str.replace(value, singleSpace);
9509
9531
  });
9510
9532
  }
9511
- return str.replace(LINES, '').replace(DBL_QUOTED_STR, '\'$1\'').replace(exp,
9533
+ return str.replace(LINES, ' ').replace(DBL_QUOTED_STR, '\'$1\'').replace(exp,
9512
9534
  // eslint-disable-next-line
9513
9535
  function (match, cnt, offset, matchStr) {
9514
9536
  var SPECIAL_CHAR = /@|#|\$/gm;