@syncfusion/ej2-base 20.1.56 → 20.1.58-106983

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 (100) hide show
  1. package/.eslintrc.json +16 -1
  2. package/CHANGELOG.md +108 -4
  3. package/{README.md → ReadMe.md} +5 -6
  4. package/bin/syncfusion-license.js +2 -0
  5. package/dist/ej2-base.min.js +1 -0
  6. package/dist/ej2-base.umd.min.js +1 -10
  7. package/dist/ej2-base.umd.min.js.map +1 -1
  8. package/dist/es6/ej2-base.es2015.js +671 -315
  9. package/dist/es6/ej2-base.es2015.js.map +1 -1
  10. package/dist/es6/ej2-base.es5.js +448 -233
  11. package/dist/es6/ej2-base.es5.js.map +1 -1
  12. package/dist/global/ej2-base.min.js +1 -10
  13. package/dist/global/ej2-base.min.js.map +1 -1
  14. package/dist/global/index.d.ts +0 -9
  15. package/e2e/modified-protractor/protractor.config.js +316 -0
  16. package/e2e/protractor.config.js +56 -24
  17. package/helpers/e2e/base.js +62 -52
  18. package/helpers/e2e/index.js +8 -6
  19. package/package.json +78 -158
  20. package/src/animation.d.ts +13 -0
  21. package/src/animation.js +31 -4
  22. package/src/base.js +12 -12
  23. package/src/browser.js +9 -9
  24. package/src/child-property.js +10 -10
  25. package/src/component-model.d.ts +1 -1
  26. package/src/component.d.ts +1 -1
  27. package/src/component.js +30 -11
  28. package/src/dom.js +10 -10
  29. package/src/draggable-model.d.ts +21 -8
  30. package/src/draggable.d.ts +31 -6
  31. package/src/draggable.js +118 -21
  32. package/src/event-handler.js +6 -6
  33. package/src/hijri-parser.js +1 -1
  34. package/src/intl/date-parser.js +4 -4
  35. package/src/intl/intl-base.js +4 -4
  36. package/src/intl/number-formatter.js +3 -3
  37. package/src/intl/parser-base.js +2 -2
  38. package/src/keyboard.js +4 -4
  39. package/src/l10n.js +5 -5
  40. package/src/module-loader.js +2 -2
  41. package/src/notify-property-change.js +28 -28
  42. package/src/observer.js +9 -9
  43. package/src/sanitize-helper.js +3 -3
  44. package/src/template-engine.js +14 -14
  45. package/src/template.js +3 -2
  46. package/src/touch.js +4 -0
  47. package/src/util.js +30 -28
  48. package/src/validate-lic.d.ts +4 -0
  49. package/src/validate-lic.js +107 -42
  50. package/styles/_all.scss +1 -2
  51. package/styles/_bootstrap4-definition.scss +0 -1
  52. package/styles/_fusionnew-dark-definition.scss +9 -0
  53. package/styles/_fusionnew-definition.scss +9 -0
  54. package/styles/_highcontrast-light-definition.scss +0 -1
  55. package/styles/_material-dark-definition.scss +1 -1
  56. package/styles/_material-definition.scss +1 -1
  57. package/styles/_material3-dark-definition.scss +10 -0
  58. package/styles/_material3-definition.scss +9 -0
  59. package/styles/_tailwind-dark-definition.scss +1 -1
  60. package/styles/_tailwind-definition.scss +1 -1
  61. package/styles/animation/_all.scss +31 -30
  62. package/styles/bootstrap-dark.css +157 -1
  63. package/styles/bootstrap.css +157 -1
  64. package/styles/bootstrap4.css +157 -1
  65. package/styles/bootstrap5-dark.css +157 -1
  66. package/styles/bootstrap5.css +157 -1
  67. package/styles/common/_core.scss +16 -4
  68. package/styles/definition/_bootstrap-dark.scss +114 -0
  69. package/styles/definition/_bootstrap.scss +115 -1
  70. package/styles/definition/_bootstrap4.scss +114 -0
  71. package/styles/definition/_bootstrap5-dark.scss +132 -24
  72. package/styles/definition/_bootstrap5.scss +124 -14
  73. package/styles/definition/_fabric-dark.scss +114 -0
  74. package/styles/definition/_fabric.scss +114 -0
  75. package/styles/definition/_fluent-dark.scss +144 -22
  76. package/styles/definition/_fluent.scss +135 -14
  77. package/styles/definition/_fusionnew-dark.scss +360 -0
  78. package/styles/definition/_fusionnew.scss +361 -0
  79. package/styles/definition/_highcontrast-light.scss +112 -0
  80. package/styles/definition/_highcontrast.scss +114 -0
  81. package/styles/definition/_material-dark.scss +114 -0
  82. package/styles/definition/_material.scss +117 -0
  83. package/styles/definition/_material3-dark.scss +421 -0
  84. package/styles/definition/_material3.scss +361 -0
  85. package/styles/definition/_tailwind-dark.scss +128 -17
  86. package/styles/definition/_tailwind.scss +130 -19
  87. package/styles/fabric-dark.css +161 -2
  88. package/styles/fabric.css +161 -2
  89. package/styles/fluent-dark.css +157 -1
  90. package/styles/fluent.css +157 -1
  91. package/styles/highcontrast-light.css +164 -2
  92. package/styles/highcontrast.css +164 -2
  93. package/styles/material-dark.css +157 -1
  94. package/styles/material.css +157 -1
  95. package/styles/offline-theme/material-dark.css +2625 -0
  96. package/styles/offline-theme/material.css +2625 -0
  97. package/styles/offline-theme/tailwind-dark.css +1899 -0
  98. package/styles/offline-theme/tailwind.css +1899 -0
  99. package/styles/tailwind-dark.css +157 -1
  100. package/styles/tailwind.css +157 -1
@@ -6,7 +6,7 @@ var errorText = {
6
6
  'ms': 'minimumSignificantDigits',
7
7
  'ls': 'maximumSignificantDigits',
8
8
  'mf': 'minimumFractionDigits',
9
- 'lf': 'maximumFractionDigits',
9
+ 'lf': 'maximumFractionDigits'
10
10
  };
11
11
  var integerError = 'minimumIntegerDigits';
12
12
  var percentSign = 'percentSign';
@@ -44,9 +44,9 @@ var NumberFormat = /** @class */ (function () {
44
44
  dOptions.currencySymbol = isBlazor() ? getValue('currencySymbol', numObject) : base.getCurrencySymbol(dependable.numericObject, fOptions.currency || defaultCurrencyCode, option.altSymbol);
45
45
  /* eslint-disable @typescript-eslint/no-explicit-any */
46
46
  dOptions.percentSymbol = isBlazor() ? getValue('numberSymbols.percentSign', numObject) :
47
- dOptions.numberMapper.numberSymbols[percentSign];
47
+ dOptions.numberMapper.numberSymbols["" + percentSign];
48
48
  dOptions.minusSymbol = isBlazor() ? getValue('numberSymbols.minusSign', numObject) :
49
- dOptions.numberMapper.numberSymbols[minusSign];
49
+ dOptions.numberMapper.numberSymbols["" + minusSign];
50
50
  var symbols = dOptions.numberMapper.numberSymbols;
51
51
  if ((option.format) && !(base.formatRegex.test(option.format))) {
52
52
  cOptions = base.customFormat(option.format, dOptions, dependable.numericObject);
@@ -105,10 +105,10 @@ var ParserBase = /** @class */ (function () {
105
105
  var ret = '';
106
106
  for (var i = 0; i < len; i++) {
107
107
  if (i !== len - 1) {
108
- ret += val[i] + '|';
108
+ ret += val[parseInt(i.toString(), 10)] + '|';
109
109
  }
110
110
  else {
111
- ret += val[i];
111
+ ret += val[parseInt(i.toString(), 10)];
112
112
  }
113
113
  }
114
114
  return ret;
package/src/keyboard.js CHANGED
@@ -104,7 +104,7 @@ var KeyboardEvents = /** @class */ (function (_super) {
104
104
  var keys = Object.keys(_this.keyConfigs);
105
105
  for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
106
106
  var key = keys_1[_i];
107
- var configCollection = _this.keyConfigs[key].split(',');
107
+ var configCollection = _this.keyConfigs["" + key].split(',');
108
108
  for (var _a = 0, configCollection_1 = configCollection; _a < configCollection_1.length; _a++) {
109
109
  var rconfig = configCollection_1[_a];
110
110
  var rKeyObj = KeyboardEvents_1.getKeyConfigData(rconfig.trim());
@@ -181,7 +181,7 @@ var KeyboardEvents = /** @class */ (function (_super) {
181
181
  */
182
182
  KeyboardEvents.getKeyConfigData = function (config) {
183
183
  if (config in this.configCache) {
184
- return this.configCache[config];
184
+ return this.configCache["" + config];
185
185
  }
186
186
  var keys = config.toLowerCase().split('+');
187
187
  var keyData = {
@@ -196,12 +196,12 @@ var KeyboardEvents = /** @class */ (function (_super) {
196
196
  else {
197
197
  keyData.keyCode = KeyboardEvents_1.getKeyCode(keys[keys.length - 1]);
198
198
  }
199
- KeyboardEvents_1.configCache[config] = keyData;
199
+ KeyboardEvents_1.configCache["" + config] = keyData;
200
200
  return keyData;
201
201
  };
202
202
  // Return the keycode value as string
203
203
  KeyboardEvents.getKeyCode = function (keyVal) {
204
- return keyCode[keyVal] || keyVal.toUpperCase().charCodeAt(0);
204
+ return keyCode["" + keyVal] || keyVal.toUpperCase().charCodeAt(0);
205
205
  };
206
206
  var KeyboardEvents_1;
207
207
  KeyboardEvents.configCache = {};
package/src/l10n.js CHANGED
@@ -63,11 +63,11 @@ var L10n = /** @class */ (function () {
63
63
  */
64
64
  L10n.prototype.getConstant = function (prop) {
65
65
  // Removed conditional operator because this method does not return correct value when passing 0 as value in localization
66
- if (!isNullOrUndefined(this.currentLocale[prop])) {
67
- return this.currentLocale[prop];
66
+ if (!isNullOrUndefined(this.currentLocale["" + prop])) {
67
+ return this.currentLocale["" + prop];
68
68
  }
69
69
  else {
70
- return this.localeStrings[prop] || '';
70
+ return this.localeStrings["" + prop] || '';
71
71
  }
72
72
  };
73
73
  /**
@@ -78,8 +78,8 @@ var L10n = /** @class */ (function () {
78
78
  * @returns {Object} ?
79
79
  */
80
80
  L10n.prototype.intGetControlConstant = function (curObject, locale) {
81
- if ((curObject)[locale]) {
82
- return (curObject)[locale][this.controlName];
81
+ if ((curObject)["" + locale]) {
82
+ return (curObject)["" + locale][this.controlName];
83
83
  }
84
84
  return null;
85
85
  };
@@ -25,11 +25,11 @@ var ModuleLoader = /** @class */ (function () {
25
25
  this.clearUnusedModule(requiredModules);
26
26
  }
27
27
  for (var i = 0; i < reqLength; i++) {
28
- var modl = requiredModules[i];
28
+ var modl = requiredModules[parseInt(i.toString(), 10)];
29
29
  for (var _i = 0, moduleList_1 = moduleList; _i < moduleList_1.length; _i++) {
30
30
  var module = moduleList_1[_i];
31
31
  var modName = modl.member;
32
- if (module.prototype.getModuleName() === modl.member && !this.isModuleLoaded(modName)) {
32
+ if (module && module.prototype.getModuleName() === modl.member && !this.isModuleLoaded(modName)) {
33
33
  var moduleObject = createInstance(module, modl.args);
34
34
  var memberName = this.getMemberName(modName);
35
35
  if (modl.isProperty) {
@@ -12,9 +12,9 @@ import { createInstance, isUndefined, merge, extend, getValue } from './util';
12
12
  function getObject(instance, curKey, defaultValue, type) {
13
13
  // eslint-disable-next-line
14
14
  if (!instance.properties.hasOwnProperty(curKey) || !(instance.properties[curKey] instanceof type)) {
15
- instance.properties[curKey] = createInstance(type, [instance, curKey, defaultValue]);
15
+ instance.properties["" + curKey] = createInstance(type, [instance, curKey, defaultValue]);
16
16
  }
17
- return instance.properties[curKey];
17
+ return instance.properties["" + curKey];
18
18
  }
19
19
  /**
20
20
  * Returns object array
@@ -34,15 +34,15 @@ function getObjectArray(instance, curKey, defaultValue, type, isSetter, isFactor
34
34
  for (var i = 0; i < len; i++) {
35
35
  var curType = type;
36
36
  if (isFactory) {
37
- curType = type(defaultValue[i], instance);
37
+ curType = type(defaultValue[parseInt(i.toString(), 10)], instance);
38
38
  }
39
39
  if (isSetter) {
40
40
  var inst = createInstance(curType, [instance, curKey, {}, true]);
41
- inst.setProperties(defaultValue[i], true);
41
+ inst.setProperties(defaultValue[parseInt(i.toString(), 10)], true);
42
42
  result.push(inst);
43
43
  }
44
44
  else {
45
- result.push(createInstance(curType, [instance, curKey, defaultValue[i], false]));
45
+ result.push(createInstance(curType, [instance, curKey, defaultValue[parseInt(i.toString(), 10)], false]));
46
46
  }
47
47
  }
48
48
  return result;
@@ -58,9 +58,9 @@ function propertyGetter(defaultValue, curKey) {
58
58
  return function () {
59
59
  // eslint-disable-next-line
60
60
  if (!this.properties.hasOwnProperty(curKey)) {
61
- this.properties[curKey] = defaultValue;
61
+ this.properties["" + curKey] = defaultValue;
62
62
  }
63
- return this.properties[curKey];
63
+ return this.properties["" + curKey];
64
64
  };
65
65
  }
66
66
  /**
@@ -72,11 +72,11 @@ function propertyGetter(defaultValue, curKey) {
72
72
  */
73
73
  function propertySetter(defaultValue, curKey) {
74
74
  return function (newValue) {
75
- if (this.properties[curKey] !== newValue) {
75
+ if (this.properties["" + curKey] !== newValue) {
76
76
  // eslint-disable-next-line
77
77
  var oldVal = this.properties.hasOwnProperty(curKey) ? this.properties[curKey] : defaultValue;
78
78
  this.saveChanges(curKey, newValue, oldVal);
79
- this.properties[curKey] = newValue;
79
+ this.properties["" + curKey] = newValue;
80
80
  }
81
81
  };
82
82
  }
@@ -120,7 +120,7 @@ function complexFactoryGetter(defaultValue, curKey, type) {
120
120
  var curType = type({});
121
121
  // eslint-disable-next-line
122
122
  if (this.properties.hasOwnProperty(curKey)) {
123
- return this.properties[curKey];
123
+ return this.properties["" + curKey];
124
124
  }
125
125
  else {
126
126
  return getObject(this, curKey, defaultValue, curType);
@@ -153,7 +153,7 @@ function complexArrayGetter(defaultValue, curKey, type) {
153
153
  // eslint-disable-next-line
154
154
  if (!this.properties.hasOwnProperty(curKey)) {
155
155
  var defCollection = getObjectArray(this, curKey, defaultValue, type, false);
156
- this.properties[curKey] = defCollection;
156
+ this.properties["" + curKey] = defCollection;
157
157
  }
158
158
  var ignore = ((this.controlParent !== undefined && this.controlParent.ignoreCollectionWatch)
159
159
  || this.ignoreCollectionWatch);
@@ -161,17 +161,17 @@ function complexArrayGetter(defaultValue, curKey, type) {
161
161
  if (!this.properties[curKey].hasOwnProperty('push') && !ignore) {
162
162
  ['push', 'pop'].forEach(function (extendFunc) {
163
163
  var descriptor = {
164
- value: complexArrayDefinedCallback(extendFunc, curKey, type, _this.properties[curKey]).bind(_this),
164
+ value: complexArrayDefinedCallback(extendFunc, curKey, type, _this.properties["" + curKey]).bind(_this),
165
165
  configurable: true
166
166
  };
167
- Object.defineProperty(_this.properties[curKey], extendFunc, descriptor);
167
+ Object.defineProperty(_this.properties["" + curKey], extendFunc, descriptor);
168
168
  });
169
169
  }
170
170
  // eslint-disable-next-line
171
171
  if (!this.properties[curKey].hasOwnProperty('isComplexArray')) {
172
- Object.defineProperty(this.properties[curKey], 'isComplexArray', { value: true });
172
+ Object.defineProperty(this.properties["" + curKey], 'isComplexArray', { value: true });
173
173
  }
174
- return this.properties[curKey];
174
+ return this.properties["" + curKey];
175
175
  };
176
176
  }
177
177
  /**
@@ -188,7 +188,7 @@ function complexArraySetter(defaultValue, curKey, type) {
188
188
  var newValCollection = getObjectArray(this, curKey, newValue, type, true);
189
189
  this.isComplexArraySetter = false;
190
190
  this.saveChanges(curKey, newValCollection, oldValueCollection);
191
- this.properties[curKey] = newValCollection;
191
+ this.properties["" + curKey] = newValCollection;
192
192
  };
193
193
  }
194
194
  /**
@@ -204,7 +204,7 @@ function complexArrayFactorySetter(defaultValue, curKey, type) {
204
204
  var oldValueCollection = this.properties.hasOwnProperty(curKey) ? this.properties[curKey] : defaultValue;
205
205
  var newValCollection = getObjectArray(this, curKey, newValue, type, true, true);
206
206
  this.saveChanges(curKey, newValCollection, oldValueCollection);
207
- this.properties[curKey] = newValCollection;
207
+ this.properties["" + curKey] = newValCollection;
208
208
  };
209
209
  }
210
210
  /**
@@ -220,9 +220,9 @@ function complexArrayFactoryGetter(defaultValue, curKey, type) {
220
220
  // eslint-disable-next-line
221
221
  if (!this.properties.hasOwnProperty(curKey)) {
222
222
  var defCollection = getObjectArray(this, curKey, defaultValue, curType, false);
223
- this.properties[curKey] = defCollection;
223
+ this.properties["" + curKey] = defCollection;
224
224
  }
225
- return this.properties[curKey];
225
+ return this.properties["" + curKey];
226
226
  };
227
227
  }
228
228
  /**
@@ -244,13 +244,13 @@ function complexArrayDefinedCallback(dFunc, curKey, type, prop) {
244
244
  switch (dFunc) {
245
245
  case 'push':
246
246
  for (var i = 0; i < newValue.length; i++) {
247
- Array.prototype[dFunc].apply(prop, [newValue[i]]);
248
- var model_1 = getArrayModel(keyString + (prop.length - 1), newValue[i], !this.controlParent, dFunc);
249
- this.serverDataBind(model_1, newValue[i], false, dFunc);
247
+ Array.prototype["" + dFunc].apply(prop, [newValue[parseInt(i.toString(), 10)]]);
248
+ var model_1 = getArrayModel(keyString + (prop.length - 1), newValue[parseInt(i.toString(), 10)], !this.controlParent, dFunc);
249
+ this.serverDataBind(model_1, newValue[parseInt(i.toString(), 10)], false, dFunc);
250
250
  }
251
251
  break;
252
252
  case 'pop':
253
- Array.prototype[dFunc].apply(prop);
253
+ Array.prototype["" + dFunc].apply(prop);
254
254
  // eslint-disable-next-line
255
255
  var model = getArrayModel(keyString + prop.length, null, !this.controlParent, dFunc);
256
256
  this.serverDataBind(model, { ejsAction: 'pop' }, false, dFunc);
@@ -271,10 +271,10 @@ function getArrayModel(keyString, value, isControlParent, arrayFunction) {
271
271
  var modelObject = keyString;
272
272
  if (isControlParent) {
273
273
  modelObject = {};
274
- modelObject[keyString] = value;
274
+ modelObject["" + keyString] = value;
275
275
  if (value && typeof value === 'object') {
276
276
  var action = 'ejsAction';
277
- modelObject[keyString][action] = arrayFunction;
277
+ modelObject["" + keyString]["" + action] = arrayFunction;
278
278
  }
279
279
  }
280
280
  return modelObject;
@@ -415,14 +415,14 @@ export function Event() {
415
415
  return function (target, key) {
416
416
  var eventDescriptor = {
417
417
  set: function (newValue) {
418
- var oldValue = this.properties[key];
418
+ var oldValue = this.properties["" + key];
419
419
  if (oldValue !== newValue) {
420
420
  var finalContext = getParentContext(this, key);
421
421
  if (isUndefined(oldValue) === false) {
422
422
  finalContext.context.removeEventListener(finalContext.prefix, oldValue);
423
423
  }
424
424
  finalContext.context.addEventListener(finalContext.prefix, newValue);
425
- this.properties[key] = newValue;
425
+ this.properties["" + key] = newValue;
426
426
  }
427
427
  },
428
428
  get: propertyGetter(undefined, key),
@@ -538,7 +538,7 @@ function getBuilderProperties(component) {
538
538
  };
539
539
  }
540
540
  };
541
- for (var _b = 0, _c = component.prototype.propList[key]; _b < _c.length; _b++) {
541
+ for (var _b = 0, _c = component.prototype.propList["" + key]; _b < _c.length; _b++) {
542
542
  var prop = _c[_b];
543
543
  _loop_1(prop);
544
544
  }
package/src/observer.js CHANGED
@@ -23,17 +23,17 @@ var Observer = /** @class */ (function () {
23
23
  }
24
24
  var cntxt = context || this.context;
25
25
  if (this.notExist(property)) {
26
- this.boundedEvents[property] = [{ handler: handler, context: cntxt }];
26
+ this.boundedEvents["" + property] = [{ handler: handler, context: cntxt }];
27
27
  return;
28
28
  }
29
29
  if (!isNullOrUndefined(id)) {
30
30
  if (this.ranArray.indexOf(id) === -1) {
31
31
  this.ranArray.push(id);
32
- this.boundedEvents[property].push({ handler: handler, context: cntxt, id: id });
32
+ this.boundedEvents["" + property].push({ handler: handler, context: cntxt, id: id });
33
33
  }
34
34
  }
35
- else if (!this.isHandlerPresent(this.boundedEvents[property], handler)) {
36
- this.boundedEvents[property].push({ handler: handler, context: cntxt });
35
+ else if (!this.isHandlerPresent(this.boundedEvents["" + property], handler)) {
36
+ this.boundedEvents["" + property].push({ handler: handler, context: cntxt });
37
37
  }
38
38
  };
39
39
  /**
@@ -52,7 +52,7 @@ var Observer = /** @class */ (function () {
52
52
  if (handler) {
53
53
  for (var i = 0; i < curObject.length; i++) {
54
54
  if (id) {
55
- if (curObject[i].id === id) {
55
+ if (curObject[parseInt(i.toString(), 10)].id === id) {
56
56
  curObject.splice(i, 1);
57
57
  var indexLocation = this.ranArray.indexOf(id);
58
58
  if (indexLocation !== -1) {
@@ -61,14 +61,14 @@ var Observer = /** @class */ (function () {
61
61
  break;
62
62
  }
63
63
  }
64
- else if (handler === curObject[i].handler) {
64
+ else if (handler === curObject[parseInt(i.toString(), 10)].handler) {
65
65
  curObject.splice(i, 1);
66
66
  break;
67
67
  }
68
68
  }
69
69
  }
70
70
  else {
71
- delete this.boundedEvents[property];
71
+ delete this.boundedEvents["" + property];
72
72
  }
73
73
  };
74
74
  /**
@@ -92,7 +92,7 @@ var Observer = /** @class */ (function () {
92
92
  }
93
93
  var blazor = 'Blazor';
94
94
  var curObject = getValue(property, this.boundedEvents).slice(0);
95
- if (window[blazor]) {
95
+ if (window["" + blazor]) {
96
96
  return this.blazorCallback(curObject, argument, successHandler, errorHandler, 0);
97
97
  }
98
98
  else {
@@ -109,7 +109,7 @@ var Observer = /** @class */ (function () {
109
109
  var _this = this;
110
110
  var isTrigger = index === objs.length - 1;
111
111
  if (index < objs.length) {
112
- var obj_1 = objs[index];
112
+ var obj_1 = objs[parseInt(index.toString(), 10)];
113
113
  var promise = obj_1.handler.call(obj_1.context, argument);
114
114
  if (promise && typeof promise.then === 'function') {
115
115
  if (!successHandler) {
@@ -136,15 +136,15 @@ var SanitizeHtmlHelper = /** @class */ (function () {
136
136
  this.removeXssAttrs();
137
137
  var tempEleValue = this.wrapElement.innerHTML;
138
138
  this.removeElement();
139
- return tempEleValue;
139
+ return tempEleValue.replace('&amp;', '&');
140
140
  };
141
141
  SanitizeHtmlHelper.removeElement = function () {
142
142
  // Removes an element's attibute to avoid html tag validation
143
143
  var nodes = this.wrapElement.children;
144
144
  for (var j = 0; j < nodes.length; j++) {
145
- var attribute = nodes[j].attributes;
145
+ var attribute = nodes[parseInt(j.toString(), 10)].attributes;
146
146
  for (var i = 0; i < attribute.length; i++) {
147
- this.wrapElement.children[j].removeAttribute(attribute[i].localName);
147
+ this.wrapElement.children[parseInt(j.toString(), 10)].removeAttribute(attribute[parseInt(i.toString(), 10)].localName);
148
148
  }
149
149
  }
150
150
  };
@@ -33,24 +33,24 @@ export function compile(templateString, helper, ignorePrefix) {
33
33
  if (isBlazor() && !isStringTemplate) {
34
34
  var randomId = getRandomId();
35
35
  var blazorId = templateId + randomId;
36
- if (!blazorTemplates[templateId]) {
37
- blazorTemplates[templateId] = [];
36
+ if (!blazorTemplates["" + templateId]) {
37
+ blazorTemplates["" + templateId] = [];
38
38
  }
39
39
  if (!isNullOrUndefined(index)) {
40
- var keys = Object.keys(blazorTemplates[templateId][index]);
40
+ var keys = Object.keys(blazorTemplates["" + templateId][parseInt(index.toString(), 10)]);
41
41
  for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
42
42
  var key = keys_1[_i];
43
- if (key !== blazorTemplateId && data[key]) {
44
- blazorTemplates[templateId][index][key] = data[key];
43
+ if (key !== blazorTemplateId && data["" + key]) {
44
+ blazorTemplates["" + templateId][parseInt(index.toString(), 10)]["" + key] = data["" + key];
45
45
  }
46
46
  if (key === blazorTemplateId) {
47
- blazorId = blazorTemplates[templateId][index][key];
47
+ blazorId = blazorTemplates["" + templateId][parseInt(index.toString(), 10)]["" + key];
48
48
  }
49
49
  }
50
50
  }
51
51
  else {
52
- data[blazorTemplateId] = blazorId;
53
- blazorTemplates[templateId].push(data);
52
+ data["" + blazorTemplateId] = blazorId;
53
+ blazorTemplates["" + templateId].push(data);
54
54
  }
55
55
  // eslint-disable-next-line
56
56
  return propName === 'rowTemplate' ? [createElement('tr', { id: blazorId, className: 'e-blazor-template' })] :
@@ -84,9 +84,9 @@ export function compile(templateString, helper, ignorePrefix) {
84
84
  export function updateBlazorTemplate(templateId, templateName, comp, isEmpty, callBack) {
85
85
  if (isBlazor()) {
86
86
  var ejsIntrop = 'sfBlazor';
87
- window[ejsIntrop].updateTemplate(templateName, blazorTemplates[templateId], templateId, comp, callBack);
87
+ window["" + ejsIntrop].updateTemplate(templateName, blazorTemplates["" + templateId], templateId, comp, callBack);
88
88
  if (isEmpty !== false) {
89
- blazorTemplates[templateId] = [];
89
+ blazorTemplates["" + templateId] = [];
90
90
  }
91
91
  }
92
92
  }
@@ -105,21 +105,21 @@ export function resetBlazorTemplate(templateId, templateName, index) {
105
105
  for (var i = 0; i < innerTemplates.length; i++) {
106
106
  var tempId = ' ';
107
107
  if (!isNullOrUndefined(index)) {
108
- tempId = innerTemplates[index].getAttribute('data-templateId');
108
+ tempId = innerTemplates[parseInt(index.toString(), 10)].getAttribute('data-templateId');
109
109
  }
110
110
  else {
111
- tempId = innerTemplates[i].getAttribute('data-templateId');
111
+ tempId = innerTemplates[parseInt(i.toString(), 10)].getAttribute('data-templateId');
112
112
  }
113
113
  var tempElement = document.getElementById(tempId);
114
114
  if (tempElement) {
115
115
  var length_1 = tempElement.childNodes.length;
116
116
  for (var j = 0; j < length_1; j++) {
117
117
  if (!isNullOrUndefined(index)) {
118
- innerTemplates[index].appendChild(tempElement.childNodes[0]);
118
+ innerTemplates[parseInt(index.toString(), 10)].appendChild(tempElement.childNodes[0]);
119
119
  i = innerTemplates.length;
120
120
  }
121
121
  else {
122
- innerTemplates[i].appendChild(tempElement.childNodes[0]);
122
+ innerTemplates[parseInt(i.toString(), 10)].appendChild(tempElement.childNodes[0]);
123
123
  }
124
124
  }
125
125
  }
package/src/template.js CHANGED
@@ -61,8 +61,9 @@ export function expression(value) {
61
61
  export function compile(template, helper, ignorePrefix) {
62
62
  var argName = 'data';
63
63
  var evalExpResult = evalExp(template, argName, helper, ignorePrefix);
64
+ // eslint-disable-next-line
64
65
  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 ";
65
- var fnCode = "var str=\"" + evalExpResult + "\";" + condtion + " return str;";
66
+ var fnCode = 'var str=\"' + evalExpResult + '\";' + condtion + ' return str;';
66
67
  var fn = new Function(argName, fnCode);
67
68
  return fn.bind(helper);
68
69
  }
@@ -175,7 +176,7 @@ function evalExp(str, nameSpace, helper, ignorePrefix) {
175
176
  }
176
177
  else {
177
178
  // evaluate normal expression
178
- cnt = '"+' + addNameSpace(cnt.replace(/,/gi, '+' + nameSpace + '.'), (localKeys.indexOf(cnt) === -1), nameSpace, localKeys, ignorePrefix) + '+"';
179
+ cnt = cnt !== '' ? '"+' + addNameSpace(cnt.replace(/,/gi, '+' + nameSpace + '.'), (localKeys.indexOf(cnt) === -1), nameSpace, localKeys, ignorePrefix) + '+"' : ' ';
179
180
  }
180
181
  }
181
182
  return cnt;
package/src/touch.js CHANGED
@@ -157,6 +157,10 @@ var Touch = /** @class */ (function (_super) {
157
157
  diffX = Math.floor(diffX < 0 ? -1 * diffX : diffX);
158
158
  diffY = Math.floor(diffY < 0 ? -1 * diffY : diffX);
159
159
  _this.isTouchMoved = diffX > 1 || diffY > 1;
160
+ var isFirefox = (/Firefox/).test(Browser.userAgent);
161
+ if (isFirefox && point.clientX === 0 && point.clientY === 0 && evt.type === 'mouseup') {
162
+ _this.isTouchMoved = false;
163
+ }
160
164
  _this.endPoint = point;
161
165
  _this.calcPoints(evt);
162
166
  var swipeArgs = {
package/src/util.js CHANGED
@@ -66,7 +66,7 @@ export function getValue(nameSpace, obj) {
66
66
  var value = obj;
67
67
  var splits = nameSpace.replace(/\[/g, '.').replace(/\]/g, '').split('.');
68
68
  for (var i = 0; i < splits.length && !isUndefined(value); i++) {
69
- value = value[splits[i]];
69
+ value = value[splits[parseInt(i.toString(), 10)]];
70
70
  }
71
71
  return value;
72
72
  }
@@ -90,14 +90,14 @@ export function setValue(nameSpace, value, obj) {
90
90
  var length = keys.length;
91
91
  var key;
92
92
  for (i = 0; i < length; i++) {
93
- key = keys[i];
93
+ key = keys[parseInt(i.toString(), 10)];
94
94
  if (i + 1 === length) {
95
- fromObj[key] = value === undefined ? {} : value;
95
+ fromObj["" + key] = value === undefined ? {} : value;
96
96
  }
97
- else if (isNullOrUndefined(fromObj[key])) {
98
- fromObj[key] = {};
97
+ else if (isNullOrUndefined(fromObj["" + key])) {
98
+ fromObj["" + key] = {};
99
99
  }
100
- fromObj = fromObj[key];
100
+ fromObj = fromObj["" + key];
101
101
  }
102
102
  return start;
103
103
  }
@@ -111,12 +111,13 @@ export function setValue(nameSpace, value, obj) {
111
111
  */
112
112
  // eslint-disable-next-line
113
113
  export function deleteObject(obj, key) {
114
- delete obj[key];
114
+ delete obj["" + key];
115
115
  }
116
116
  /**
117
117
  *@private
118
118
  */
119
- export var containerObject = typeof window !== "undefined" ? window : {};
119
+ // eslint-disable-next-line
120
+ export var containerObject = typeof window !== 'undefined' ? window : {};
120
121
  /**
121
122
  * Check weather the given argument is only object.
122
123
  *
@@ -158,12 +159,12 @@ export function merge(source, destination) {
158
159
  var deepmerge = 'deepMerge';
159
160
  for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
160
161
  var key = keys_1[_i];
161
- if (!isNullOrUndefined(temrObj[deepmerge]) && (temrObj[deepmerge].indexOf(key) !== -1) &&
162
- (isObject(tempProp[key]) || Array.isArray(tempProp[key]))) {
163
- extend(temrObj[key], temrObj[key], tempProp[key], true);
162
+ if (!isNullOrUndefined(temrObj["" + deepmerge]) && (temrObj["" + deepmerge].indexOf(key) !== -1) &&
163
+ (isObject(tempProp["" + key]) || Array.isArray(tempProp["" + key]))) {
164
+ extend(temrObj["" + key], temrObj["" + key], tempProp["" + key], true);
164
165
  }
165
166
  else {
166
- temrObj[key] = tempProp[key];
167
+ temrObj["" + key] = tempProp["" + key];
167
168
  }
168
169
  }
169
170
  }
@@ -192,8 +193,8 @@ export function extend(copied, first, second, deep) {
192
193
  // eslint-disable-next-line
193
194
  var obj1 = arguments_1[i];
194
195
  Object.keys(obj1).forEach(function (key) {
195
- var src = result[key];
196
- var copy = obj1[key];
196
+ var src = result["" + key];
197
+ var copy = obj1["" + key];
197
198
  var clone;
198
199
  var isArrayChanged = Array.isArray(copy) && Array.isArray(src) && (copy.length !== src.length);
199
200
  // eslint-disable-next-line
@@ -206,17 +207,18 @@ export function extend(copied, first, second, deep) {
206
207
  extend(clone, {}, copy, deep);
207
208
  }
208
209
  else {
209
- result[key] = extend(clone, {}, copy, deep);
210
+ result["" + key] = extend(clone, {}, copy, deep);
210
211
  }
211
212
  }
212
213
  else {
213
214
  /* istanbul ignore next */
214
215
  clone = isBlazor() ? src && Object.keys(copy).length : src ? src : [];
215
- result[key] = extend([], clone, copy, deep);
216
+ // eslint-disable-next-line
217
+ result["" + key] = extend([], clone, copy, (clone && clone.length) || (copy && copy.length));
216
218
  }
217
219
  }
218
220
  else {
219
- result[key] = copy;
221
+ result["" + key] = copy;
220
222
  }
221
223
  });
222
224
  };
@@ -292,7 +294,7 @@ export function queryParams(data) {
292
294
  var keys = Object.keys(data);
293
295
  for (var _i = 0, keys_2 = keys; _i < keys_2.length; _i++) {
294
296
  var key = keys_2[_i];
295
- array.push(encodeURIComponent(key) + '=' + encodeURIComponent('' + data[key]));
297
+ array.push(encodeURIComponent(key) + '=' + encodeURIComponent('' + data["" + key]));
296
298
  }
297
299
  return array.join('&');
298
300
  }
@@ -362,7 +364,7 @@ export function print(element, printWindow) {
362
364
  var blinks = [].slice.call(document.getElementsByTagName('body')[0].querySelectorAll('link, style'));
363
365
  if (blinks.length) {
364
366
  for (var l = 0, len = blinks.length; l < len; l++) {
365
- links.push(blinks[l]);
367
+ links.push(blinks[parseInt(l.toString(), 10)]);
366
368
  }
367
369
  }
368
370
  var reference = '';
@@ -371,7 +373,7 @@ export function print(element, printWindow) {
371
373
  }
372
374
  div.appendChild(element.cloneNode(true));
373
375
  for (var i = 0, len = links.length; i < len; i++) {
374
- reference += links[i].outerHTML;
376
+ reference += links[parseInt(i.toString(), 10)].outerHTML;
375
377
  }
376
378
  printWindow.document.write('<!DOCTYPE html> <html><head>' + reference + '</head><body>' + div.innerHTML +
377
379
  '<script> (function() { window.ready = true; })(); </script>' + '</body></html>');
@@ -428,8 +430,8 @@ export function isBlazor() {
428
430
  */
429
431
  export function getElement(element) {
430
432
  var xPath = 'xPath';
431
- if (!(element instanceof Node) && isBlazor() && !isNullOrUndefined(element[xPath])) {
432
- return document.evaluate(element[xPath], document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
433
+ if (!(element instanceof Node) && isBlazor() && !isNullOrUndefined(element["" + xPath])) {
434
+ return document.evaluate(element["" + xPath], document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
433
435
  }
434
436
  return element;
435
437
  }
@@ -445,8 +447,8 @@ export function getElement(element) {
445
447
  export function getInstance(element, component) {
446
448
  // eslint-disable-next-line
447
449
  var elem = (typeof (element) === 'string') ? document.querySelector(element) : element;
448
- if (elem[instances]) {
449
- for (var _i = 0, _a = elem[instances]; _i < _a.length; _i++) {
450
+ if (elem["" + instances]) {
451
+ for (var _i = 0, _a = elem["" + instances]; _i < _a.length; _i++) {
450
452
  var inst = _a[_i];
451
453
  if (inst instanceof component) {
452
454
  return inst;
@@ -466,11 +468,11 @@ export function getInstance(element, component) {
466
468
  export function addInstance(element, instance) {
467
469
  // eslint-disable-next-line
468
470
  var elem = (typeof (element) === 'string') ? document.querySelector(element) : element;
469
- if (elem[instances]) {
470
- elem[instances].push(instance);
471
+ if (elem["" + instances]) {
472
+ elem["" + instances].push(instance);
471
473
  }
472
474
  else {
473
- elem[instances] = [instance];
475
+ elem["" + instances] = [instance];
474
476
  }
475
477
  }
476
478
  /**
@@ -497,7 +499,7 @@ export function uniqueID() {
497
499
  function combineArray(num) {
498
500
  var ret = '';
499
501
  for (var i = 0; i < 5; i++) {
500
- ret += (i ? ',' : '') + num[i];
502
+ ret += (i ? ',' : '') + num[parseInt(i.toString(), 10)];
501
503
  }
502
504
  return ret;
503
505
  }