@syncfusion/ej2-base 25.2.7 → 26.1.35

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 (108) hide show
  1. package/.eslintrc.json +3 -2
  2. package/bin/syncfusion-license.js +1 -1
  3. package/dist/ej2-base.min.js +2 -2
  4. package/dist/ej2-base.umd.min.js +2 -2
  5. package/dist/ej2-base.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-base.es2015.js +197 -423
  7. package/dist/es6/ej2-base.es2015.js.map +1 -1
  8. package/dist/es6/ej2-base.es5.js +182 -405
  9. package/dist/es6/ej2-base.es5.js.map +1 -1
  10. package/dist/global/ej2-base.min.js +2 -2
  11. package/dist/global/ej2-base.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +72 -8
  14. package/src/ajax.d.ts +1 -1
  15. package/src/ajax.js +3 -7
  16. package/src/animation.d.ts +1 -1
  17. package/src/animation.js +1 -3
  18. package/src/base.d.ts +2 -1
  19. package/src/base.js +4 -13
  20. package/src/browser.d.ts +1 -1
  21. package/src/browser.js +3 -4
  22. package/src/child-property.d.ts +1 -0
  23. package/src/child-property.js +2 -2
  24. package/src/component.d.ts +4 -0
  25. package/src/component.js +9 -17
  26. package/src/dom.js +4 -11
  27. package/src/draggable.js +1 -22
  28. package/src/droppable.js +0 -1
  29. package/src/event-handler.js +2 -6
  30. package/src/fetch.js +1 -2
  31. package/src/hijri-parser.js +3 -3
  32. package/src/internationalization.js +0 -5
  33. package/src/intl/date-formatter.js +19 -33
  34. package/src/intl/date-parser.js +33 -62
  35. package/src/intl/intl-base.d.ts +7 -0
  36. package/src/intl/intl-base.js +16 -16
  37. package/src/intl/number-formatter.js +5 -5
  38. package/src/intl/number-parser.js +2 -6
  39. package/src/intl/parser-base.js +6 -11
  40. package/src/keyboard.js +0 -1
  41. package/src/module-loader.js +1 -0
  42. package/src/notify-property-change.d.ts +0 -20
  43. package/src/notify-property-change.js +16 -55
  44. package/src/observer.js +3 -6
  45. package/src/sanitize-helper.js +0 -1
  46. package/src/template-engine.js +1 -7
  47. package/src/template.js +13 -18
  48. package/src/touch.js +3 -8
  49. package/src/util.d.ts +4 -4
  50. package/src/util.js +13 -38
  51. package/src/validate-lic.js +4 -3
  52. package/styles/_bootstrap5.3-dark-definition.scss +8 -0
  53. package/styles/_bootstrap5.3-definition.scss +8 -0
  54. package/styles/_fluent2-dark-definition.scss +9 -0
  55. package/styles/_fluent2-definition.scss +9 -0
  56. package/styles/_fluent2-highcontrast-definition.scss +9 -0
  57. package/styles/animation/_all.scss +0 -1
  58. package/styles/bootstrap-dark.css +865 -143
  59. package/styles/bootstrap.css +865 -143
  60. package/styles/bootstrap4.css +865 -143
  61. package/styles/bootstrap5-dark.css +865 -143
  62. package/styles/bootstrap5.css +865 -143
  63. package/styles/common/_core.scss +3 -7
  64. package/styles/definition/_bds-dark.scss +45 -156
  65. package/styles/definition/_bds.scss +71 -202
  66. package/styles/definition/_bootstrap-dark.scss +1 -13
  67. package/styles/definition/_bootstrap.scss +0 -13
  68. package/styles/definition/_bootstrap4.scss +24 -38
  69. package/styles/definition/_bootstrap5-dark.scss +69 -88
  70. package/styles/definition/_bootstrap5.3-dark.scss +853 -0
  71. package/styles/definition/_bootstrap5.3.scss +1486 -0
  72. package/styles/definition/_bootstrap5.scss +64 -84
  73. package/styles/definition/_fabric-dark.scss +0 -12
  74. package/styles/definition/_fabric.scss +0 -12
  75. package/styles/definition/_fluent-dark.scss +27 -96
  76. package/styles/definition/_fluent.scss +27 -97
  77. package/styles/definition/_fluent2-dark.scss +1506 -0
  78. package/styles/definition/_fluent2-highcontrast.scss +1506 -0
  79. package/styles/definition/_fluent2.scss +2264 -0
  80. package/styles/definition/_fusionnew-dark.scss +40 -78
  81. package/styles/definition/_fusionnew.scss +36 -75
  82. package/styles/definition/_highcontrast-light.scss +0 -10
  83. package/styles/definition/_highcontrast.scss +0 -12
  84. package/styles/definition/_material-dark.scss +0 -11
  85. package/styles/definition/_material.scss +1 -13
  86. package/styles/definition/_material3-dark.scss +15 -71
  87. package/styles/definition/_material3.scss +15 -84
  88. package/styles/definition/_tailwind-dark.scss +17 -66
  89. package/styles/definition/_tailwind.scss +18 -66
  90. package/styles/fabric-dark.css +865 -143
  91. package/styles/fabric.css +865 -143
  92. package/styles/fluent-dark.css +865 -143
  93. package/styles/fluent.css +865 -143
  94. package/styles/fluent2.css +3825 -0
  95. package/styles/fluent2.scss +3 -0
  96. package/styles/highcontrast-light.css +865 -143
  97. package/styles/highcontrast.css +865 -143
  98. package/styles/material-dark.css +865 -143
  99. package/styles/material.css +865 -143
  100. package/styles/material3-dark.css +865 -144
  101. package/styles/material3.css +865 -144
  102. package/styles/offline-theme/material-dark.css +865 -143
  103. package/styles/offline-theme/material.css +865 -143
  104. package/styles/offline-theme/tailwind-dark.css +866 -144
  105. package/styles/offline-theme/tailwind.css +866 -144
  106. package/styles/tailwind-dark.css +866 -144
  107. package/styles/tailwind.css +866 -144
  108. package/CHANGELOG.md +0 -649
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types */
1
2
  import { defaultCurrencyCode } from '../internationalization';
2
3
  import { getValue, isNullOrUndefined, extend, isBlazor } from '../util';
3
4
  import { ParserBase as parser, getBlazorCurrencySymbol } from './parser-base';
@@ -29,13 +30,13 @@ export var blazorCultureFormats = {
29
30
  /**
30
31
  * Date base common constants and function for date parser and formatter.
31
32
  */
32
- // eslint-disable-next-line
33
+ // eslint-disable-next-line @typescript-eslint/no-namespace
33
34
  export var IntlBase;
34
35
  (function (IntlBase) {
35
- /* eslint-disable */
36
- // tslint:disable-next-line:max-line-length.
36
+ // eslint-disable-next-line security/detect-unsafe-regex
37
37
  IntlBase.negativeDataRegex = /^(('[^']+'|''|[^*#@0,.E])*)(\*.)?((([#,]*[0,]*0+)(\.0*[0-9]*#*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/;
38
- IntlBase.customRegex = /^(('[^']+'|''|[^*#@0,.])*)(\*.)?((([0#,]*[0,]*[0#]*[0#\ ]*)(\.[0#]*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/;
38
+ // eslint-disable-next-line security/detect-unsafe-regex
39
+ IntlBase.customRegex = /^(('[^']+'|''|[^*#@0,.])*)(\*.)?((([0#,]*[0,]*[0#]*[0# ]*)(\.[0#]*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/;
39
40
  IntlBase.latnParseRegex = /0|1|2|3|4|5|6|7|8|9/g;
40
41
  var fractionRegex = /[0-9]/g;
41
42
  IntlBase.defaultCurrency = '$';
@@ -66,8 +67,8 @@ export var IntlBase;
66
67
  'fri': 5,
67
68
  'sat': 6
68
69
  };
69
- IntlBase.formatRegex = new regExp("(^[ncpae]{1})([0-1]?[0-9]|20)?$", "i");
70
- IntlBase.currencyFormatRegex = new regExp("(^[ca]{1})([0-1]?[0-9]|20)?$", "i");
70
+ IntlBase.formatRegex = new regExp('(^[ncpae]{1})([0-1]?[0-9]|20)?$', 'i');
71
+ IntlBase.currencyFormatRegex = new regExp('(^[ca]{1})([0-1]?[0-9]|20)?$', 'i');
71
72
  IntlBase.curWithoutNumberRegex = /(c|a)$/ig;
72
73
  var typeMapper = {
73
74
  '$': 'isCurrency',
@@ -78,7 +79,6 @@ export var IntlBase;
78
79
  };
79
80
  IntlBase.dateParseRegex = /([a-z])\1*|'([^']|'')+'|''|./gi;
80
81
  IntlBase.basicPatterns = ['short', 'medium', 'long', 'full'];
81
- /* tslint:disable:quotemark */
82
82
  IntlBase.defaultObject = {
83
83
  'dates': {
84
84
  'calendars': {
@@ -629,7 +629,6 @@ export var IntlBase;
629
629
  }
630
630
  }
631
631
  };
632
- /* tslint:enable:quotemark */
633
632
  IntlBase.monthIndex = {
634
633
  3: 'abbreviated',
635
634
  4: 'wide',
@@ -773,7 +772,7 @@ export var IntlBase;
773
772
  var ret = {};
774
773
  var pattern = matches[1].toUpperCase();
775
774
  ret.isAccount = (pattern === 'A');
776
- ret.type = IntlBase.patternMatcher[pattern];
775
+ ret.type = IntlBase.patternMatcher["" + pattern];
777
776
  if (skeleton.length > 1) {
778
777
  ret.fractionDigits = parseInt(matches[2], 10);
779
778
  }
@@ -860,7 +859,7 @@ export var IntlBase;
860
859
  var formatSplit = format.split(';');
861
860
  var data = ['pData', 'nData', 'zeroData'];
862
861
  for (var i = 0; i < formatSplit.length; i++) {
863
- options[data[i]] = customNumberFormat(formatSplit[i], dOptions, obj);
862
+ options["" + data[parseInt(i.toString(), 10)]] = customNumberFormat(formatSplit[parseInt(i.toString(), 10)], dOptions, obj);
864
863
  }
865
864
  if (isNullOrUndefined(options.nData)) {
866
865
  options.nData = extend({}, options.pData);
@@ -888,8 +887,8 @@ export var IntlBase;
888
887
  cOptions.nlead = pattern[1];
889
888
  cOptions.nend = pattern[10];
890
889
  var integerPart = pattern[6];
891
- var spaceCapture = integerPart.match(/\ $/g) ? true : false;
892
- var spaceGrouping = integerPart.replace(/\ $/g, '').indexOf(' ') !== -1;
890
+ var spaceCapture = integerPart.match(/ $/g) ? true : false;
891
+ var spaceGrouping = integerPart.replace(/ $/g, '').indexOf(' ') !== -1;
893
892
  cOptions.useGrouping = integerPart.indexOf(',') !== -1 || spaceGrouping;
894
893
  integerPart = integerPart.replace(/,/g, '');
895
894
  var fractionPart = pattern[7];
@@ -943,8 +942,8 @@ export var IntlBase;
943
942
  var part = parts[parseInt(i.toString(), 10)];
944
943
  var loc = part.indexOf(actual);
945
944
  if ((loc !== -1) && ((loc < part.indexOf('\'')) || (loc > part.lastIndexOf('\'')))) {
946
- options[typeMapper[i]] = part.substr(0, loc) + symbol + part.substr(loc + 1);
947
- options[typeMapper[actual]] = true;
945
+ options["" + typeMapper[parseInt(i.toString(), 10)]] = part.substr(0, loc) + symbol + part.substr(loc + 1);
946
+ options["" + typeMapper["" + actual]] = true;
948
947
  options.type = options.isCurrency ? 'currency' : 'percent';
949
948
  break;
950
949
  }
@@ -960,7 +959,7 @@ export var IntlBase;
960
959
  * @returns {string} ?
961
960
  */
962
961
  function getDateSeparator(dateObj) {
963
- var value = (getValue('dateFormats.short', dateObj) || '').match(/[d‏M‏]([^d‏M])[d‏M‏]/i);
962
+ var value = (getValue('dateFormats.short', dateObj) || '').match(/[dM]([^dM])[dM]/i);
964
963
  return value ? value[1] : '/';
965
964
  }
966
965
  IntlBase.getDateSeparator = getDateSeparator;
@@ -982,7 +981,7 @@ export var IntlBase;
982
981
  var actualPattern = options.format || getResultantPattern(options.skeleton, dependable.dateObject, options.type);
983
982
  if (isExcelFormat) {
984
983
  actualPattern = actualPattern.replace(patternRegex, function (pattern) {
985
- return patternMatch[pattern];
984
+ return patternMatch["" + pattern];
986
985
  });
987
986
  if (actualPattern.indexOf('z') !== -1) {
988
987
  var tLength = actualPattern.match(/z/g).length;
@@ -1025,6 +1024,7 @@ export var IntlBase;
1025
1024
  }
1026
1025
  return actual;
1027
1026
  }
1027
+ IntlBase.processSymbol = processSymbol;
1028
1028
  /**
1029
1029
  * Returns Native Number pattern
1030
1030
  *
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
1
2
  import { isUndefined, throwError, isNullOrUndefined, extend, isBlazor, getValue } from '../util';
2
3
  import { defaultCurrencyCode } from '../internationalization';
3
4
  import { IntlBase as base } from './intl-base';
@@ -38,7 +39,6 @@ var NumberFormat = /** @class */ (function () {
38
39
  dOptions.numberMapper = isBlazor() ? extend({}, numObject) :
39
40
  parser.getNumberMapper(dependable.parserObject, parser.getNumberingSystem(cldr), true);
40
41
  dOptions.currencySymbol = isBlazor() ? getValue('currencySymbol', numObject) : base.getCurrencySymbol(dependable.numericObject, fOptions.currency || defaultCurrencyCode, option.altSymbol);
41
- /* eslint-disable @typescript-eslint/no-explicit-any */
42
42
  dOptions.percentSymbol = isBlazor() ? getValue('numberSymbols.percentSign', numObject) :
43
43
  dOptions.numberMapper.numberSymbols["" + percentSign];
44
44
  dOptions.minusSymbol = isBlazor() ? getValue('numberSymbols.minusSign', numObject) :
@@ -46,6 +46,9 @@ var NumberFormat = /** @class */ (function () {
46
46
  var symbols = dOptions.numberMapper.numberSymbols;
47
47
  if ((option.format) && !(base.formatRegex.test(option.format))) {
48
48
  cOptions = base.customFormat(option.format, dOptions, dependable.numericObject);
49
+ if (!isUndefined(fOptions.useGrouping) && fOptions.useGrouping) {
50
+ fOptions.useGrouping = cOptions.pData.useGrouping;
51
+ }
49
52
  }
50
53
  else {
51
54
  extend(fOptions, base.getProperNumericSkeleton(option.format || 'N'));
@@ -145,7 +148,6 @@ var NumberFormat = /** @class */ (function () {
145
148
  var decide = isFraction ? 'f' : 's';
146
149
  var dint = 0;
147
150
  var str1 = errorText['l' + decide];
148
- // eslint-disable-next-line
149
151
  var str2 = errorText['m' + decide];
150
152
  if (!isUndefined(val1)) {
151
153
  this.checkRange(val1, str1, isFraction);
@@ -225,7 +227,7 @@ var NumberFormat = /** @class */ (function () {
225
227
  var decimalPart = temp[1];
226
228
  var len = decimalPart.length;
227
229
  for (var i = len - 1; i >= 0; i--) {
228
- if (decimalPart["" + i] === '0' && i >= curData.minimumFractionDigits) {
230
+ if (decimalPart[parseInt(i.toString(), 10)] === '0' && i >= curData.minimumFractionDigits) {
229
231
  decimalPart = decimalPart.slice(0, i);
230
232
  }
231
233
  else {
@@ -242,7 +244,6 @@ var NumberFormat = /** @class */ (function () {
242
244
  fValue = fValue.replace('.', dOptions.numberMapper.numberSymbols[mapper[3]]);
243
245
  fValue = curData.format === '#,###,,;(#,###,,)' ? this.customPivotFormat(parseInt(fValue, 10)) : fValue;
244
246
  if (curData.useGrouping) {
245
- /* eslint-disable @typescript-eslint/no-explicit-any */
246
247
  fValue = this.groupNumbers(fValue, curData.groupData.primary, curData.groupSeparator || ',', dOptions.numberMapper.numberSymbols[mapper[3]] || '.', curData.groupData.secondary);
247
248
  }
248
249
  fValue = parser.convertValueParts(fValue, base.latnParseRegex, dOptions.numberMapper.mapper);
@@ -369,7 +370,6 @@ var NumberFormat = /** @class */ (function () {
369
370
  NumberFormat.customPivotFormat = function (value) {
370
371
  if (value >= 500000) {
371
372
  value /= 1000000;
372
- // eslint-disable-next-line
373
373
  var _a = value.toString().split('.'), integer = _a[0], decimal = _a[1];
374
374
  return decimal && +decimal.substring(0, 1) >= 5
375
375
  ? Math.ceil(value).toString()
@@ -2,8 +2,7 @@ import { extend, isNullOrUndefined, isBlazor, getValue } from '../util';
2
2
  import { ParserBase as parser } from './parser-base';
3
3
  import { IntlBase as base } from './intl-base';
4
4
  var regExp = RegExp;
5
- // eslint-disable-next-line
6
- var parseRegex = new regExp('^([^0-9]*)' + '(([0-9,]*[0-9]+)(\.[0-9]+)?)' + '([Ee][+-]?[0-9]+)?([^0-9]*)$');
5
+ var parseRegex = new regExp('^([^0-9]*)' + '(([0-9,]*[0-9]+)(.[0-9]+)?)' + '([Ee][+-]?[0-9]+)?([^0-9]*)$');
7
6
  var groupRegex = /,/g;
8
7
  var keys = ['minusSign', 'infinity'];
9
8
  /**
@@ -26,7 +25,6 @@ var NumberParser = /** @class */ (function () {
26
25
  var _this = this;
27
26
  var dependable = base.getDependables(cldr, culture, '', true);
28
27
  var parseOptions = { custom: true };
29
- var numOptions;
30
28
  if ((base.formatRegex.test(option.format)) || !(option.format)) {
31
29
  extend(parseOptions, base.getProperNumericSkeleton(option.format || 'N'));
32
30
  parseOptions.custom = false;
@@ -40,10 +38,8 @@ var NumberParser = /** @class */ (function () {
40
38
  extend(parseOptions, base.customFormat(option.format, null, null));
41
39
  }
42
40
  var numbers = getValue('numbers', dependable.parserObject);
43
- // eslint-disable-next-line
44
- numOptions = parser.getCurrentNumericOptions(dependable.parserObject, parser.getNumberingSystem(cldr), true, isBlazor());
41
+ var numOptions = parser.getCurrentNumericOptions(dependable.parserObject, parser.getNumberingSystem(cldr), true, isBlazor());
45
42
  parseOptions.symbolRegex = parser.getSymbolRegex(Object.keys(numOptions.symbolMatch));
46
- // eslint-disable-next-line
47
43
  parseOptions.infinity = numOptions.symbolNumberSystem[keys[1]];
48
44
  var symbolpattern;
49
45
  if (!isBlazor()) {
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
1
2
  /**
2
3
  * Parser
3
4
  */
@@ -59,10 +60,8 @@ var ParserBase = /** @class */ (function () {
59
60
  var res = {};
60
61
  for (var _i = 0, propKeys_1 = propKeys; _i < propKeys_1.length; _i++) {
61
62
  var key = propKeys_1[_i];
62
- // eslint-disable-next-line
63
- if (!res.hasOwnProperty(prop[key])) {
64
- // eslint-disable-next-line
65
- res[prop[key]] = key;
63
+ if (!Object.prototype.hasOwnProperty.call(res, prop["" + key])) {
64
+ res[prop["" + key]] = key;
66
65
  }
67
66
  }
68
67
  return res;
@@ -90,8 +89,7 @@ var ParserBase = /** @class */ (function () {
90
89
  var ret = {};
91
90
  for (var _i = 0, matchKeys_1 = matchKeys; _i < matchKeys_1.length; _i++) {
92
91
  var key = matchKeys_1[_i];
93
- // eslint-disable-next-line
94
- ret[prop[key]] = defaultNumberSymbols[key];
92
+ ret[prop["" + key]] = defaultNumberSymbols["" + key];
95
93
  }
96
94
  return ret;
97
95
  };
@@ -124,8 +122,7 @@ var ParserBase = /** @class */ (function () {
124
122
  */
125
123
  ParserBase.convertValueParts = function (value, regex, obj) {
126
124
  return value.replace(regex, function (str) {
127
- // eslint-disable-next-line
128
- return obj[str];
125
+ return obj["" + str];
129
126
  });
130
127
  };
131
128
  /**
@@ -177,7 +174,6 @@ var ParserBase = /** @class */ (function () {
177
174
  * @param {boolean} isNumber ?
178
175
  * @returns {NumberMapper} ?
179
176
  */
180
- // eslint-disable-next-line
181
177
  ParserBase.getNumberMapper = function (curObj, numberSystem, isNumber) {
182
178
  var ret = { mapper: {} };
183
179
  var cur = this.getDefaultNumberingSystem(curObj);
@@ -189,8 +185,7 @@ var ParserBase = /** @class */ (function () {
189
185
  if (!isUndefined(digits)) {
190
186
  for (var _i = 0, latnNumberSystem_1 = latnNumberSystem; _i < latnNumberSystem_1.length; _i++) {
191
187
  var i = latnNumberSystem_1[_i];
192
- // eslint-disable-next-line
193
- ret.mapper[i] = digits[i];
188
+ ret.mapper[parseInt(i.toString(), 10)] = digits[parseInt(i.toString(), 10)];
194
189
  }
195
190
  }
196
191
  }
package/src/keyboard.js CHANGED
@@ -139,7 +139,6 @@ var KeyboardEvents = /** @class */ (function (_super) {
139
139
  * @returns {void} ?
140
140
  * @private
141
141
  */
142
- // eslint-disable-next-line
143
142
  KeyboardEvents.prototype.onPropertyChanged = function (newProp, oldProp) {
144
143
  // No code are needed
145
144
  };
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
1
2
  /**
2
3
  * Module loading operations
3
4
  */
@@ -3,10 +3,6 @@
3
3
  *
4
4
  * @param {Object} defaultValue - Specifies the default value of property.
5
5
  * @returns {PropertyDecorator} ?
6
- * ```
7
- * @Property('TypeScript')
8
- * propertyName: Type;
9
- * ```
10
6
  * @private
11
7
  */
12
8
  export declare function Property<T>(defaultValue?: T | Object): PropertyDecorator;
@@ -75,22 +71,6 @@ export declare function Event(): PropertyDecorator;
75
71
  *
76
72
  * @param {Function} classConstructor ?
77
73
  * @returns {void} ?
78
- * ```
79
- * @NotifyPropertyChanges
80
- * class DemoClass implements INotifyPropertyChanged {
81
- *
82
- * @Property()
83
- * property1: string;
84
- *
85
- * dataBind: () => void;
86
- *
87
- * constructor() { }
88
- *
89
- * onPropertyChanged(newProp: any, oldProp: any) {
90
- * // Called when property changed
91
- * }
92
- * }
93
- * ```
94
74
  * @private
95
75
  */
96
76
  export declare function NotifyPropertyChanges(classConstructor: Function): void;
@@ -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);