@syncfusion/ej2-base 25.2.7 → 26.1.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.
Files changed (109) hide show
  1. package/.eslintrc.json +3 -2
  2. package/{README.md → ReadMe.md} +1 -1
  3. package/bin/syncfusion-license.js +1 -1
  4. package/dist/ej2-base.min.js +1 -10
  5. package/dist/ej2-base.umd.min.js +1 -10
  6. package/dist/ej2-base.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-base.es2015.js +340 -566
  8. package/dist/es6/ej2-base.es2015.js.map +1 -1
  9. package/dist/es6/ej2-base.es5.js +181 -404
  10. package/dist/es6/ej2-base.es5.js.map +1 -1
  11. package/dist/global/ej2-base.min.js +1 -10
  12. package/dist/global/ej2-base.min.js.map +1 -1
  13. package/dist/global/index.d.ts +0 -9
  14. package/package.json +225 -161
  15. package/src/ajax.d.ts +1 -1
  16. package/src/ajax.js +3 -7
  17. package/src/animation.d.ts +1 -1
  18. package/src/animation.js +1 -3
  19. package/src/base.d.ts +2 -1
  20. package/src/base.js +4 -13
  21. package/src/browser.d.ts +1 -1
  22. package/src/browser.js +3 -4
  23. package/src/child-property.d.ts +1 -0
  24. package/src/child-property.js +2 -2
  25. package/src/component.d.ts +4 -0
  26. package/src/component.js +9 -17
  27. package/src/dom.js +4 -11
  28. package/src/draggable.js +1 -22
  29. package/src/droppable.js +0 -1
  30. package/src/event-handler.js +2 -6
  31. package/src/fetch.js +1 -2
  32. package/src/hijri-parser.js +3 -3
  33. package/src/internationalization.js +0 -5
  34. package/src/intl/date-formatter.js +19 -33
  35. package/src/intl/date-parser.js +33 -62
  36. package/src/intl/intl-base.d.ts +7 -0
  37. package/src/intl/intl-base.js +16 -16
  38. package/src/intl/number-formatter.js +5 -5
  39. package/src/intl/number-parser.js +2 -6
  40. package/src/intl/parser-base.js +6 -11
  41. package/src/keyboard.js +0 -1
  42. package/src/module-loader.js +1 -0
  43. package/src/notify-property-change.d.ts +0 -20
  44. package/src/notify-property-change.js +16 -55
  45. package/src/observer.js +3 -6
  46. package/src/sanitize-helper.js +0 -1
  47. package/src/template-engine.js +1 -7
  48. package/src/template.js +13 -18
  49. package/src/touch.js +3 -8
  50. package/src/util.d.ts +4 -4
  51. package/src/util.js +12 -37
  52. package/src/validate-lic.js +4 -3
  53. package/styles/_bootstrap5.3-dark-definition.scss +8 -0
  54. package/styles/_bootstrap5.3-definition.scss +8 -0
  55. package/styles/_fluent2-dark-definition.scss +9 -0
  56. package/styles/_fluent2-definition.scss +9 -0
  57. package/styles/_fluent2-highcontrast-definition.scss +9 -0
  58. package/styles/animation/_all.scss +0 -1
  59. package/styles/bootstrap-dark.css +865 -143
  60. package/styles/bootstrap.css +865 -143
  61. package/styles/bootstrap4.css +865 -143
  62. package/styles/bootstrap5-dark.css +865 -143
  63. package/styles/bootstrap5.css +865 -143
  64. package/styles/common/_core.scss +3 -7
  65. package/styles/definition/_bds-dark.scss +45 -156
  66. package/styles/definition/_bds.scss +71 -202
  67. package/styles/definition/_bootstrap-dark.scss +1 -13
  68. package/styles/definition/_bootstrap.scss +0 -13
  69. package/styles/definition/_bootstrap4.scss +24 -38
  70. package/styles/definition/_bootstrap5-dark.scss +69 -88
  71. package/styles/definition/_bootstrap5.3-dark.scss +853 -0
  72. package/styles/definition/_bootstrap5.3.scss +1486 -0
  73. package/styles/definition/_bootstrap5.scss +64 -84
  74. package/styles/definition/_fabric-dark.scss +0 -12
  75. package/styles/definition/_fabric.scss +0 -12
  76. package/styles/definition/_fluent-dark.scss +27 -96
  77. package/styles/definition/_fluent.scss +27 -97
  78. package/styles/definition/_fluent2-dark.scss +1506 -0
  79. package/styles/definition/_fluent2-highcontrast.scss +1506 -0
  80. package/styles/definition/_fluent2.scss +2264 -0
  81. package/styles/definition/_fusionnew-dark.scss +40 -78
  82. package/styles/definition/_fusionnew.scss +36 -75
  83. package/styles/definition/_highcontrast-light.scss +0 -10
  84. package/styles/definition/_highcontrast.scss +0 -12
  85. package/styles/definition/_material-dark.scss +0 -11
  86. package/styles/definition/_material.scss +1 -13
  87. package/styles/definition/_material3-dark.scss +15 -71
  88. package/styles/definition/_material3.scss +15 -84
  89. package/styles/definition/_tailwind-dark.scss +17 -66
  90. package/styles/definition/_tailwind.scss +18 -66
  91. package/styles/fabric-dark.css +865 -143
  92. package/styles/fabric.css +865 -143
  93. package/styles/fluent-dark.css +865 -143
  94. package/styles/fluent.css +865 -143
  95. package/styles/fluent2.css +3825 -0
  96. package/styles/fluent2.scss +3 -0
  97. package/styles/highcontrast-light.css +865 -143
  98. package/styles/highcontrast.css +865 -143
  99. package/styles/material-dark.css +865 -143
  100. package/styles/material.css +865 -143
  101. package/styles/material3-dark.css +865 -144
  102. package/styles/material3.css +865 -144
  103. package/styles/offline-theme/material-dark.css +865 -143
  104. package/styles/offline-theme/material.css +865 -143
  105. package/styles/offline-theme/tailwind-dark.css +866 -144
  106. package/styles/offline-theme/tailwind.css +866 -144
  107. package/styles/tailwind-dark.css +866 -144
  108. package/styles/tailwind.css +866 -144
  109. package/CHANGELOG.md +0 -649
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
1
2
  import { createInstance, isUndefined, merge, extend, getValue } from './util';
2
3
  /**
3
4
  * Returns the Class Object
@@ -8,10 +9,8 @@ import { createInstance, isUndefined, merge, extend, getValue } from './util';
8
9
  * @param {Object[]} type ?
9
10
  * @returns {ClassObject} ?
10
11
  */
11
- // eslint-disable-next-line
12
12
  function getObject(instance, curKey, defaultValue, type) {
13
- // eslint-disable-next-line
14
- if (!instance.properties.hasOwnProperty(curKey) || !(instance.properties[curKey] instanceof type)) {
13
+ if (!Object.prototype.hasOwnProperty.call(instance.properties, curKey) || !(instance.properties["" + curKey] instanceof type)) {
15
14
  instance.properties["" + curKey] = createInstance(type, [instance, curKey, defaultValue]);
16
15
  }
17
16
  return instance.properties["" + curKey];
@@ -27,7 +26,6 @@ function getObject(instance, curKey, defaultValue, type) {
27
26
  * @param {boolean} isFactory ?
28
27
  * @returns {Object[]} ?
29
28
  */
30
- // eslint-disable-next-line
31
29
  function getObjectArray(instance, curKey, defaultValue, type, isSetter, isFactory) {
32
30
  var result = [];
33
31
  var len = defaultValue ? defaultValue.length : 0;
@@ -56,8 +54,7 @@ function getObjectArray(instance, curKey, defaultValue, type, isSetter, isFactor
56
54
  */
57
55
  function propertyGetter(defaultValue, curKey) {
58
56
  return function () {
59
- // eslint-disable-next-line
60
- if (!this.properties.hasOwnProperty(curKey)) {
57
+ if (!Object.prototype.hasOwnProperty.call(this.properties, curKey)) {
61
58
  this.properties["" + curKey] = defaultValue;
62
59
  }
63
60
  return this.properties["" + curKey];
@@ -73,8 +70,7 @@ function propertyGetter(defaultValue, curKey) {
73
70
  function propertySetter(defaultValue, curKey) {
74
71
  return function (newValue) {
75
72
  if (this.properties["" + curKey] !== newValue) {
76
- // eslint-disable-next-line
77
- var oldVal = this.properties.hasOwnProperty(curKey) ? this.properties[curKey] : defaultValue;
73
+ var oldVal = Object.prototype.hasOwnProperty.call(this.properties, curKey) ? this.properties["" + curKey] : defaultValue;
78
74
  this.saveChanges(curKey, newValue, oldVal);
79
75
  this.properties["" + curKey] = newValue;
80
76
  }
@@ -88,7 +84,6 @@ function propertySetter(defaultValue, curKey) {
88
84
  * @param {Object[]} type ?
89
85
  * @returns {void} ?
90
86
  */
91
- // eslint-disable-next-line
92
87
  function complexGetter(defaultValue, curKey, type) {
93
88
  return function () {
94
89
  return getObject(this, curKey, defaultValue, type);
@@ -114,12 +109,10 @@ function complexSetter(defaultValue, curKey, type) {
114
109
  * @param {FunctionConstructor} type ?
115
110
  * @returns {void} ?
116
111
  */
117
- // eslint-disable-next-line
118
112
  function complexFactoryGetter(defaultValue, curKey, type) {
119
113
  return function () {
120
114
  var curType = type({});
121
- // eslint-disable-next-line
122
- if (this.properties.hasOwnProperty(curKey)) {
115
+ if (Object.prototype.hasOwnProperty.call(this.properties, curKey)) {
123
116
  return this.properties["" + curKey];
124
117
  }
125
118
  else {
@@ -150,15 +143,13 @@ function complexFactorySetter(defaultValue, curKey, type) {
150
143
  function complexArrayGetter(defaultValue, curKey, type) {
151
144
  return function () {
152
145
  var _this = this;
153
- // eslint-disable-next-line
154
- if (!this.properties.hasOwnProperty(curKey)) {
146
+ if (!Object.prototype.hasOwnProperty.call(this.properties, curKey)) {
155
147
  var defCollection = getObjectArray(this, curKey, defaultValue, type, false);
156
148
  this.properties["" + curKey] = defCollection;
157
149
  }
158
150
  var ignore = ((this.controlParent !== undefined && this.controlParent.ignoreCollectionWatch)
159
151
  || this.ignoreCollectionWatch);
160
- // eslint-disable-next-line
161
- if (!this.properties[curKey].hasOwnProperty('push') && !ignore) {
152
+ if (!Object.prototype.hasOwnProperty.call(this.properties["" + curKey], 'push') && !ignore) {
162
153
  ['push', 'pop'].forEach(function (extendFunc) {
163
154
  var descriptor = {
164
155
  value: complexArrayDefinedCallback(extendFunc, curKey, type, _this.properties["" + curKey]).bind(_this),
@@ -167,8 +158,7 @@ function complexArrayGetter(defaultValue, curKey, type) {
167
158
  Object.defineProperty(_this.properties["" + curKey], extendFunc, descriptor);
168
159
  });
169
160
  }
170
- // eslint-disable-next-line
171
- if (!this.properties[curKey].hasOwnProperty('isComplexArray')) {
161
+ if (!Object.prototype.hasOwnProperty.call(this.properties["" + curKey], 'isComplexArray')) {
172
162
  Object.defineProperty(this.properties["" + curKey], 'isComplexArray', { value: true });
173
163
  }
174
164
  return this.properties["" + curKey];
@@ -200,8 +190,7 @@ function complexArraySetter(defaultValue, curKey, type) {
200
190
  */
201
191
  function complexArrayFactorySetter(defaultValue, curKey, type) {
202
192
  return function (newValue) {
203
- // eslint-disable-next-line
204
- var oldValueCollection = this.properties.hasOwnProperty(curKey) ? this.properties[curKey] : defaultValue;
193
+ var oldValueCollection = Object.prototype.hasOwnProperty.call(this.properties, curKey) ? this.properties["" + curKey] : defaultValue;
205
194
  var newValCollection = getObjectArray(this, curKey, newValue, type, true, true);
206
195
  this.saveChanges(curKey, newValCollection, oldValueCollection);
207
196
  this.properties["" + curKey] = newValCollection;
@@ -217,8 +206,7 @@ function complexArrayFactorySetter(defaultValue, curKey, type) {
217
206
  function complexArrayFactoryGetter(defaultValue, curKey, type) {
218
207
  return function () {
219
208
  var curType = type({});
220
- // eslint-disable-next-line
221
- if (!this.properties.hasOwnProperty(curKey)) {
209
+ if (!Object.prototype.hasOwnProperty.call(this.properties, curKey)) {
222
210
  var defCollection = getObjectArray(this, curKey, defaultValue, curType, false);
223
211
  this.properties["" + curKey] = defCollection;
224
212
  }
@@ -234,7 +222,6 @@ function complexArrayFactoryGetter(defaultValue, curKey, type) {
234
222
  * @returns {Object} ?
235
223
  */
236
224
  function complexArrayDefinedCallback(dFunc, curKey, type, prop) {
237
- /* tslint:disable no-function-expression */
238
225
  return function () {
239
226
  var newValue = [];
240
227
  for (var _i = 0; _i < arguments.length; _i++) {
@@ -246,16 +233,16 @@ function complexArrayDefinedCallback(dFunc, curKey, type, prop) {
246
233
  for (var i = 0; i < newValue.length; i++) {
247
234
  var newValueParse = newValue[parseInt(i.toString(), 10)];
248
235
  Array.prototype["" + dFunc].apply(prop, [newValueParse]);
249
- var model_1 = getArrayModel(keyString + (prop.length - 1), newValueParse, !this.controlParent, dFunc);
250
- this.serverDataBind(model_1, newValue[parseInt(i.toString(), 10)], false, dFunc);
236
+ var model = getArrayModel(keyString + (prop.length - 1), newValueParse, !this.controlParent, dFunc);
237
+ this.serverDataBind(model, newValue[parseInt(i.toString(), 10)], false, dFunc);
251
238
  }
252
239
  break;
253
- case 'pop':
240
+ case 'pop': {
254
241
  Array.prototype["" + dFunc].apply(prop);
255
- // eslint-disable-next-line
256
242
  var model = getArrayModel(keyString + prop.length, null, !this.controlParent, dFunc);
257
243
  this.serverDataBind(model, { ejsAction: 'pop' }, false, dFunc);
258
244
  break;
245
+ }
259
246
  }
260
247
  return prop;
261
248
  };
@@ -280,16 +267,11 @@ function getArrayModel(keyString, value, isControlParent, arrayFunction) {
280
267
  }
281
268
  return modelObject;
282
269
  }
283
- // eslint-disable-next-line
284
270
  /**
285
271
  * Method used to create property. General syntax below.
286
272
  *
287
273
  * @param {Object} defaultValue - Specifies the default value of property.
288
274
  * @returns {PropertyDecorator} ?
289
- * ```
290
- * @Property('TypeScript')
291
- * propertyName: Type;
292
- * ```
293
275
  * @private
294
276
  */
295
277
  export function Property(defaultValue) {
@@ -439,25 +421,8 @@ export function Event() {
439
421
  *
440
422
  * @param {Function} classConstructor ?
441
423
  * @returns {void} ?
442
- * ```
443
- * @NotifyPropertyChanges
444
- * class DemoClass implements INotifyPropertyChanged {
445
- *
446
- * @Property()
447
- * property1: string;
448
- *
449
- * dataBind: () => void;
450
- *
451
- * constructor() { }
452
- *
453
- * onPropertyChanged(newProp: any, oldProp: any) {
454
- * // Called when property changed
455
- * }
456
- * }
457
- * ```
458
424
  * @private
459
425
  */
460
- // eslint-disable-next-line
461
426
  export function NotifyPropertyChanges(classConstructor) {
462
427
  /** Need to code */
463
428
  }
@@ -485,13 +450,11 @@ function addPropertyCollection(target, key, propertyType, defaultValue, type) {
485
450
  eventNames: []
486
451
  };
487
452
  }
488
- // eslint-disable-next-line
489
453
  target.propList[propertyType + 's'].push({
490
454
  propertyName: key,
491
455
  defaultValue: defaultValue,
492
456
  type: type
493
457
  });
494
- // eslint-disable-next-line
495
458
  target.propList[propertyType + 'Names'].push(key);
496
459
  }
497
460
  /**
@@ -560,8 +523,7 @@ export function CreateBuilder(component) {
560
523
  return this;
561
524
  };
562
525
  var instanceFunction = function (element) {
563
- // eslint-disable-next-line
564
- if (!builderFunction.prototype.hasOwnProperty('create')) {
526
+ if (!Object.prototype.hasOwnProperty.call(builderFunction, 'create')) {
565
527
  builderFunction.prototype = getBuilderProperties(component);
566
528
  builderFunction.prototype.create = function () {
567
529
  var temp = extend({}, {}, this.properties);
@@ -582,8 +544,7 @@ export function CreateBuilder(component) {
582
544
  * @private
583
545
  */
584
546
  function getParentContext(context, prefix) {
585
- // eslint-disable-next-line
586
- if (context.hasOwnProperty('parentObj') === false) {
547
+ if (Object.prototype.hasOwnProperty.call(context, 'parentObj') === false) {
587
548
  return { context: context, prefix: prefix };
588
549
  }
589
550
  else {
package/src/observer.js CHANGED
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types */
1
2
  import { isNullOrUndefined, getValue, extend, isBlazor } from './util';
2
3
  var Observer = /** @class */ (function () {
3
4
  function Observer(context) {
@@ -139,7 +140,6 @@ var Observer = /** @class */ (function () {
139
140
  }
140
141
  }
141
142
  };
142
- // eslint-disable-next-line
143
143
  Observer.prototype.dateReviver = function (key, value) {
144
144
  var dPattern = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/;
145
145
  if (isBlazor && typeof value === 'string' && value.match(dPattern) !== null) {
@@ -170,12 +170,10 @@ var Observer = /** @class */ (function () {
170
170
  * @returns {void} ?
171
171
  */
172
172
  Observer.prototype.offIntlEvents = function () {
173
- // eslint-disable-next-line
174
173
  var eventsArr = this.boundedEvents['notifyExternalChange'];
175
174
  if (eventsArr) {
176
175
  for (var i = 0; i < eventsArr.length; i++) {
177
- // eslint-disable-next-line
178
- var curContext = eventsArr["" + i].context;
176
+ var curContext = eventsArr[parseInt(i.toString(), 10)].context;
179
177
  if (curContext && curContext.detectFunction && curContext.randomId && !curContext.isRendered) {
180
178
  this.off('notifyExternalChange', curContext.detectFunction, curContext.randomId);
181
179
  i--;
@@ -193,8 +191,7 @@ var Observer = /** @class */ (function () {
193
191
  * @returns {boolean} ?
194
192
  */
195
193
  Observer.prototype.notExist = function (prop) {
196
- // eslint-disable-next-line
197
- return this.boundedEvents.hasOwnProperty(prop) === false || this.boundedEvents[prop].length <= 0;
194
+ return Object.prototype.hasOwnProperty.call(this.boundedEvents, prop) === false || this.boundedEvents["" + prop].length <= 0;
198
195
  };
199
196
  /**
200
197
  * Returns if the handler is present.
@@ -179,7 +179,6 @@ var SanitizeHtmlHelper = /** @class */ (function () {
179
179
  };
180
180
  SanitizeHtmlHelper.removeXssAttrs = function () {
181
181
  var _this = this;
182
- // eslint-disable-next-line
183
182
  this.removeAttrs.forEach(function (item, index) {
184
183
  var elements = _this.wrapElement.querySelectorAll(item.selector);
185
184
  if (elements.length > 0) {
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types */
1
2
  /**
2
3
  * Template Engine Bridge
3
4
  */
@@ -23,10 +24,8 @@ export function getRandomId() {
23
24
  * @returns {NodeList} ?
24
25
  * @private
25
26
  */
26
- // eslint-disable-next-line
27
27
  export function compile(templateString, helper, ignorePrefix) {
28
28
  var compiler = engineObj.compile(templateString, helper, ignorePrefix);
29
- // eslint-disable-next-line
30
29
  return function (data, component, propName, templateId, isStringTemplate, index, element, root) {
31
30
  var result = compiler(data, component, propName, element, root);
32
31
  var blazorTemplateId = 'BlazorTemplateId';
@@ -52,9 +51,7 @@ export function compile(templateString, helper, ignorePrefix) {
52
51
  data["" + blazorTemplateId] = blazorId;
53
52
  blazorTemplates["" + templateId].push(data);
54
53
  }
55
- // eslint-disable-next-line
56
54
  return propName === 'rowTemplate' ? [createElement('tr', { id: blazorId, className: 'e-blazor-template' })] :
57
- // eslint-disable-next-line
58
55
  [createElement('div', { id: blazorId, className: 'e-blazor-template' })];
59
56
  }
60
57
  if (typeof result === 'string') {
@@ -100,7 +97,6 @@ export function updateBlazorTemplate(templateId, templateName, comp, isEmpty, ca
100
97
  export function resetBlazorTemplate(templateId, templateName, index) {
101
98
  var templateDiv = document.getElementById(templateId);
102
99
  if (templateDiv) {
103
- // eslint-disable-next-line
104
100
  var innerTemplates = templateDiv.getElementsByClassName('blazor-inner-template');
105
101
  for (var i = 0; i < innerTemplates.length; i++) {
106
102
  var tempId = ' ';
@@ -153,7 +149,6 @@ export function getTemplateEngine() {
153
149
  * @returns {Function} ?
154
150
  * @private
155
151
  */
156
- // eslint-disable-next-line
157
152
  export function initializeCSPTemplate(template, helper) {
158
153
  var boundFunc;
159
154
  template.prototype.CSPTemplate = true;
@@ -170,7 +165,6 @@ export function initializeCSPTemplate(template, helper) {
170
165
  var Engine = /** @class */ (function () {
171
166
  function Engine() {
172
167
  }
173
- // eslint-disable-next-line
174
168
  Engine.prototype.compile = function (templateString, helper, ignorePrefix) {
175
169
  if (helper === void 0) { helper = {}; }
176
170
  return render(templateString, helper);
package/src/template.js CHANGED
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
1
2
  /**
2
3
  * Template Engine
3
4
  */
@@ -65,10 +66,8 @@ export function compile(template, helper, ignorePrefix) {
65
66
  else {
66
67
  var argName = 'data';
67
68
  var evalExpResult = evalExp(template, argName, helper, ignorePrefix);
68
- /* eslint-disable */
69
69
  var condtion = "var valueRegEx = (/value=\\'([A-Za-z0-9 _]*)((.)([\\w)(!-;?-\u25A0\\s]+)['])/g);\n var hrefRegex = (/(?:href)([\\s='\"./]+)([\\w-./?=&\\\\#\"]+)((.)([\\w)(!-;/?-\u25A0\\s]+)['])/g);\n if(str.match(valueRegEx)){\n var check = str.match(valueRegEx);\n var str1 = str;\n for (var i=0; i < check.length; i++) {\n var check1 = str.match(valueRegEx)[i].split('value=')[1];\n var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;\n change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;\n str1 = str1.replace(check1, change);\n }\n str = str.replace(str, str1);\n }\n else if (str.match(/(?:href='')/) === null) {\n if(str.match(hrefRegex)) {\n var check = str.match(hrefRegex);\n var str1 = str;\n for (var i=0; i < check.length; i++) {\n var check1 = str.match(hrefRegex)[i].split('href=')[1];\n if (check1) {\n var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;\n change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;\n str1 = str1.replace(check1, change);\n }\n }\n str = str.replace(str, str1);\n }\n }\n ";
70
- var fnCode = 'var str=\"' + evalExpResult + '\";' + condtion + ' return str;';
71
- /* eslint-enable */
70
+ var fnCode = 'var str="' + evalExpResult + '";' + condtion + ' return str;';
72
71
  var fn = new Function(argName, fnCode);
73
72
  return fn.bind(helper);
74
73
  }
@@ -112,9 +111,7 @@ function evalExp(str, nameSpace, helper, ignorePrefix) {
112
111
  else {
113
112
  str = str.replace(/\\?"/g, '\\"');
114
113
  }
115
- return str.replace(LINES, '').replace(DBL_QUOTED_STR, '\'$1\'').replace(exp,
116
- // eslint-disable-next-line
117
- function (match, cnt, offset, matchStr) {
114
+ return str.replace(LINES, '').replace(DBL_QUOTED_STR, '\'$1\'').replace(exp, function (match, cnt, offset, matchStr) {
118
115
  var SPECIAL_CHAR = /@|#|\$/gm;
119
116
  var matches = cnt.match(CALL_FUNCTION);
120
117
  // matches to detect any function calls
@@ -137,12 +134,10 @@ function evalExp(str, nameSpace, helper, ignorePrefix) {
137
134
  //handling for condition
138
135
  var rlStr_1 = matches[1].split(' of ');
139
136
  // replace for each into actual JavaScript
140
- // eslint-disable-next-line
141
137
  cnt = '"; ' + cnt.replace(matches[1], function (mtc) {
142
138
  localKeys.push(rlStr_1[0]);
143
139
  localKeys.push(rlStr_1[0] + 'Index');
144
140
  varCOunt = varCOunt + 1;
145
- // tslint:disable-next-line
146
141
  return 'var i' + varCOunt + '=0; i' + varCOunt + ' < ' + addNameSpace(rlStr_1[1], true, nameSpace, localKeys, ignorePrefix) + '.length; i' + varCOunt + '++';
147
142
  }) + '{ \n ' + rlStr_1[0] + '= ' + addNameSpace(rlStr_1[1], true, nameSpace, localKeys, ignorePrefix)
148
143
  + '[i' + varCOunt + ']; \n var ' + rlStr_1[0] + 'Index=i' + varCOunt + '; \n str = str + "';
@@ -150,8 +145,7 @@ function evalExp(str, nameSpace, helper, ignorePrefix) {
150
145
  else {
151
146
  //helper function handling
152
147
  var fnStr = cnt.split('(');
153
- // eslint-disable-next-line
154
- var fNameSpace = (helper && helper.hasOwnProperty(fnStr[0]) ? 'this.' : 'global');
148
+ var fNameSpace = (helper && Object.prototype.hasOwnProperty.call(helper, fnStr[0]) ? 'this.' : 'global');
155
149
  fNameSpace = (/\./.test(fnStr[0]) ? '' : fNameSpace);
156
150
  var ftArray = matches[1].split(',');
157
151
  if (matches[1].length !== 0 && !(/data/).test(ftArray[0]) && !(/window./).test(ftArray[0])) {
@@ -162,7 +156,6 @@ function evalExp(str, nameSpace, helper, ignorePrefix) {
162
156
  if (WINDOWFUNC.test(cnt) && arrObj.test(cnt) || splRegexp.test(cnt)) {
163
157
  var splArrRegexp = /@|\$|#|\]\./gm;
164
158
  if (splArrRegexp.test(cnt)) {
165
- // tslint:disable-next-line
166
159
  cnt = '"+ ' + (fNameSpace === 'global' ? '' : fNameSpace) + cnt.replace(matches[1], rlStr.replace(WORDFUNC, function (strs) {
167
160
  return HandleSpecialCharArrObj(strs, nameSpace, localKeys, ignorePrefix);
168
161
  })) + '+ "';
@@ -178,9 +171,8 @@ function evalExp(str, nameSpace, helper, ignorePrefix) {
178
171
  else if (ELSE_STMT.test(cnt)) {
179
172
  // handling else condition
180
173
  cnt = '"; ' + cnt.replace(ELSE_STMT, '} else { \n str = str + "');
181
- // eslint-disable-next-line
182
174
  }
183
- else if (!!cnt.match(IF_OR_FOR)) {
175
+ else if (cnt.match(IF_OR_FOR)) {
184
176
  // close condition
185
177
  cnt = cnt.replace(IF_OR_FOR, '"; \n } \n str = str + "');
186
178
  }
@@ -245,17 +237,20 @@ function NameSpaceArrObj(str, addNS, nameSpace, ignoreList) {
245
237
  function NameSpaceForspecialChar(str, addNS, nameSpace, ignoreList) {
246
238
  return ((addNS && !(NOT_NUMBER.test(str)) && ignoreList.indexOf(str.split('.')[0]) === -1) ? nameSpace + '["' + str : str);
247
239
  }
248
- // eslint-disable-next-line
240
+ /**
241
+ * Replace double slashes to single slash.
242
+ *
243
+ * @param {string} tempStr ?
244
+ * @returns {any} ?
245
+ */
249
246
  function SlashReplace(tempStr) {
250
247
  var double = '\\\\';
251
248
  if (tempStr.match(DOUBLE_SLASH)) {
252
- // eslint-disable-next-line
253
- tempStr = tempStr;
249
+ return tempStr;
254
250
  }
255
251
  else {
256
- tempStr = tempStr.replace(SINGLE_SLASH, double);
252
+ return tempStr.replace(SINGLE_SLASH, double);
257
253
  }
258
- return tempStr;
259
254
  }
260
255
  /**
261
256
  *
package/src/touch.js CHANGED
@@ -17,6 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
17
17
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
18
  return c > 3 && r && Object.defineProperty(target, key, r), r;
19
19
  };
20
+ /* eslint-disable @typescript-eslint/no-explicit-any */
20
21
  import { extend } from './util';
21
22
  import { Property, Complex, NotifyPropertyChanges, Event } from './notify-property-change';
22
23
  import { Browser } from './browser';
@@ -172,10 +173,8 @@ var Touch = /** @class */ (function (_super) {
172
173
  velocity: _this.getVelocity(point)
173
174
  };
174
175
  if (_this.isTouchMoved) {
175
- var eSwipeArgs = void 0;
176
176
  var tDistance = _this.swipeSettings.swipeThresholdDistance;
177
- // eslint-disable-next-line
178
- eSwipeArgs = extend(eSwipeArgs, _this.defaultArgs, swipeArgs);
177
+ var eSwipeArgs = extend(undefined, _this.defaultArgs, swipeArgs);
179
178
  var canTrigger = false;
180
179
  var ele = _this.element;
181
180
  var scrollBool = _this.isScrollable(ele);
@@ -214,7 +213,6 @@ var Touch = /** @class */ (function (_super) {
214
213
  * @param {TouchModel} oldProp ?
215
214
  * @returns {void} ?
216
215
  */
217
- // eslint-disable-next-line
218
216
  Touch.prototype.onPropertyChanged = function (newProp, oldProp) {
219
217
  //No Code to handle
220
218
  };
@@ -271,11 +269,9 @@ var Touch = /** @class */ (function (_super) {
271
269
  Touch.prototype.tapHoldEvent = function (evt) {
272
270
  this.tapCount = 0;
273
271
  this.touchAction = true;
274
- var eTapArgs;
275
272
  EventHandler.remove(this.element, Browser.touchMoveEvent, this.moveEvent);
276
273
  EventHandler.remove(this.element, Browser.touchEndEvent, this.endEvent);
277
- // eslint-disable-next-line
278
- eTapArgs = { originalEvent: evt };
274
+ var eTapArgs = { originalEvent: evt };
279
275
  this.trigger('tapHold', eTapArgs);
280
276
  EventHandler.remove(this.element, Browser.touchCancelEvent, this.cancelEvent);
281
277
  };
@@ -314,7 +310,6 @@ var Touch = /** @class */ (function (_super) {
314
310
  var interval = newT - this.tStampStart;
315
311
  return Math.sqrt(xDist * xDist + yDist * yDist) / interval;
316
312
  };
317
- // eslint-disable-next-line
318
313
  Touch.prototype.checkSwipe = function (ele, flag) {
319
314
  var keys = ['scroll', 'offset'];
320
315
  var temp = flag ? ['Height', 'Top'] : ['Width', 'Left'];
package/src/util.d.ts CHANGED
@@ -100,19 +100,19 @@ export declare function extend(copied: Object, first: Object, second?: Object, d
100
100
  /**
101
101
  * To check whether the object is null or undefined.
102
102
  *
103
- * @param {Object} value - To check the object is null or undefined
103
+ * @param {any} value - To check the object is null or undefined
104
104
  * @returns {boolean} ?
105
105
  * @private
106
106
  */
107
- export declare function isNullOrUndefined(value: Object): boolean;
107
+ export declare function isNullOrUndefined<T>(value: T): boolean;
108
108
  /**
109
109
  * To check whether the object is undefined.
110
110
  *
111
- * @param {Object} value - To check the object is undefined
111
+ * @param {any} value - To check the object is undefined
112
112
  * @returns {boolean} ?
113
113
  * @private
114
114
  */
115
- export declare function isUndefined(value: Object): boolean;
115
+ export declare function isUndefined<T>(value: T): boolean;
116
116
  /**
117
117
  * To return the generated unique name
118
118
  *