@syncfusion/ej2-angular-base 25.2.7-18564 → 26.1.39

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 (44) hide show
  1. package/.eslintrc.json +261 -0
  2. package/dist/ej2-angular-base.umd.min.js +2 -2
  3. package/dist/ej2-angular-base.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-angular-base.es2015.js +233 -213
  5. package/dist/es6/ej2-angular-base.es2015.js.map +1 -1
  6. package/dist/es6/ej2-angular-base.es5.js +157 -137
  7. package/dist/es6/ej2-angular-base.es5.js.map +1 -1
  8. package/dist/global/ej2-angular-base.min.js +2 -2
  9. package/dist/global/ej2-angular-base.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +10 -13
  12. package/schematics/generators/component-builder.d.ts +3 -0
  13. package/schematics/generators/component-builder.js +23 -22
  14. package/schematics/generators/index.js +1 -0
  15. package/schematics/index.d.ts +0 -4
  16. package/schematics/index.js +21 -9
  17. package/schematics/ng-add/index.d.ts +3 -0
  18. package/schematics/ng-add/index.js +14 -12
  19. package/schematics/ng-add/theme.d.ts +3 -0
  20. package/schematics/ng-add/theme.js +10 -8
  21. package/schematics/utils/ast.d.ts +3 -2
  22. package/schematics/utils/ast.js +8 -8
  23. package/schematics/utils/get-project.d.ts +4 -2
  24. package/schematics/utils/get-project.js +3 -2
  25. package/schematics/utils/helpers/helpers.js +19 -18
  26. package/schematics/utils/package.js +1 -0
  27. package/schematics/utils/project-style-file.d.ts +5 -3
  28. package/schematics/utils/project-style-file.js +4 -3
  29. package/src/complex-array-base.d.ts +1 -0
  30. package/src/complex-array-base.js +31 -28
  31. package/src/component-base.d.ts +1 -0
  32. package/src/component-base.js +38 -52
  33. package/src/form-base.d.ts +3 -3
  34. package/src/form-base.js +0 -4
  35. package/src/template.d.ts +8 -1
  36. package/src/template.js +23 -5
  37. package/src/util.d.ts +26 -3
  38. package/src/util.js +51 -28
  39. package/styles/fluent2.css +1033 -0
  40. package/styles/fluent2.scss +1 -0
  41. package/styles/material3-dark.css +1 -1
  42. package/styles/material3.css +1 -1
  43. package/tslint.json +111 -0
  44. package/CHANGELOG.md +0 -710
@@ -1,27 +1,42 @@
1
- import { attributes, createElement, getTemplateEngine, getValue, isNullOrUndefined, isObject, isUndefined, setTemplateEngine, setValue } from '@syncfusion/ej2-base';
1
+ import { isNullOrUndefined, getValue, setValue as setValue$1, createElement, attributes, isUndefined, isObject, getTemplateEngine, setTemplateEngine } from '@syncfusion/ej2-base';
2
2
  import { EventEmitter } from '@angular/core';
3
3
 
4
+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types */
4
5
  /**
5
6
  * Angular Utility Module
7
+ *
8
+ * @param {Function} derivedClass The derived class to which mixins are applied.
9
+ * @param {Function[]} baseClass An array of base classes whose methods are applied as mixins.
10
+ * @returns {void}
6
11
  */
7
- /* tslint:disable */
8
12
  function applyMixins(derivedClass, baseClass) {
9
13
  baseClass.forEach(function (baseClass) {
10
14
  Object.getOwnPropertyNames(baseClass.prototype).forEach(function (name) {
11
- if (!derivedClass.prototype.hasOwnProperty(name) || (baseClass.isFormBase && name !== 'constructor')) {
12
- derivedClass.prototype[name] = baseClass.prototype[name];
15
+ if (!Object.prototype.hasOwnProperty.call(derivedClass.prototype, name) || (baseClass.isFormBase && name !== 'constructor')) {
16
+ derivedClass.prototype["".concat(name)] = baseClass.prototype["".concat(name)];
13
17
  }
14
18
  });
15
19
  });
16
20
  }
17
- /* tslint:disable */
21
+ /**
22
+ * Decorator function to apply mixins to a derived class.
23
+ *
24
+ * @param {Function[]} baseClass - An array of mixin classes to be applied to the derived class.
25
+ * @returns {ClassDecorator} The decorator function.
26
+ */
18
27
  function ComponentMixins(baseClass) {
19
28
  return function (derivedClass) {
20
29
  applyMixins(derivedClass, baseClass);
21
30
  };
22
31
  }
23
32
  /**
33
+ * Registers events.
34
+ *
24
35
  * @private
36
+ * @param {string[]} eventList - The list of events to register.
37
+ * @param {any} obj - The object on which to register the events.
38
+ * @param {boolean} [direct] - Whether to register events directly on the object or not.
39
+ * @returns {void}
25
40
  */
26
41
  function registerEvents(eventList, obj, direct) {
27
42
  var ngEventsEmitter = {};
@@ -29,11 +44,11 @@ function registerEvents(eventList, obj, direct) {
29
44
  for (var _i = 0, eventList_1 = eventList; _i < eventList_1.length; _i++) {
30
45
  var event_1 = eventList_1[_i];
31
46
  if (direct === true) {
32
- obj.propCollection[event_1] = new EventEmitter(false);
33
- obj[event_1] = obj.propCollection[event_1];
47
+ obj.propCollection["".concat(event_1)] = new EventEmitter(false);
48
+ obj["".concat(event_1)] = obj.propCollection["".concat(event_1)];
34
49
  }
35
50
  else {
36
- ngEventsEmitter[event_1] = new EventEmitter(false);
51
+ ngEventsEmitter["".concat(event_1)] = new EventEmitter(false);
37
52
  }
38
53
  }
39
54
  if (direct !== true) {
@@ -42,7 +57,13 @@ function registerEvents(eventList, obj, direct) {
42
57
  }
43
58
  }
44
59
  /**
60
+ * Clears registered templates.
61
+ *
45
62
  * @private
63
+ * @param {any} _this - The context object.
64
+ * @param {string[]} [templateNames] - Optional. An array of template names to clear.
65
+ * @param {any[]} [index] - Optional. An array of indices specifying templates to clear.
66
+ * @returns {void}
46
67
  */
47
68
  function clearTemplate(_this, templateNames, index) {
48
69
  var regTemplates = Object.keys(_this.registeredTemplate);
@@ -58,35 +79,35 @@ function clearTemplate(_this, templateNames, index) {
58
79
  if (index && index.length) {
59
80
  for (var e = 0; e < index.length; e++) {
60
81
  if (tabaccordionTemp) {
61
- for (var m = 0; m < _this.registeredTemplate[registeredTemplate].length; m++) {
62
- var value = _this.registeredTemplate[registeredTemplate][m];
63
- if (value && value === index[e]) {
82
+ for (var m = 0; m < _this.registeredTemplate["".concat(registeredTemplate)].length; m++) {
83
+ var value = _this.registeredTemplate["".concat(registeredTemplate)][parseInt(m.toString(), 10)];
84
+ if (value && value === index["".concat(e)]) {
64
85
  value.destroy();
65
- _this.registeredTemplate[registeredTemplate].splice(m, 1);
86
+ _this.registeredTemplate["".concat(registeredTemplate)].splice(m, 1);
66
87
  }
67
88
  }
68
89
  }
69
90
  else {
70
91
  for (var m = 0; m < _this.registeredTemplate.template.length; m++) {
71
- var value = _this.registeredTemplate.template[m].rootNodes[0];
72
- if (value === index[e]) {
73
- var rt = _this.registeredTemplate[registeredTemplate];
74
- rt[m].destroy();
92
+ var value = _this.registeredTemplate.template[parseInt(m.toString(), 10)].rootNodes[0];
93
+ if (value === index["".concat(e)]) {
94
+ var rt = _this.registeredTemplate["".concat(registeredTemplate)];
95
+ rt[parseInt(m.toString(), 10)].destroy();
75
96
  }
76
97
  }
77
98
  }
78
99
  }
79
100
  }
80
101
  else {
81
- if (_this.registeredTemplate[registeredTemplate]) {
82
- for (var _b = 0, _c = _this.registeredTemplate[registeredTemplate]; _b < _c.length; _b++) {
102
+ if (_this.registeredTemplate["".concat(registeredTemplate)]) {
103
+ for (var _b = 0, _c = _this.registeredTemplate["".concat(registeredTemplate)]; _b < _c.length; _b++) {
83
104
  var rt = _c[_b];
84
105
  if (!rt.destroyed) {
85
106
  if (rt._view) {
86
107
  var pNode = rt._view.renderer.parentNode(rt.rootNodes[0]);
87
108
  if (!isNullOrUndefined(pNode)) {
88
109
  for (var m = 0; m < rt.rootNodes.length; m++) {
89
- pNode.appendChild(rt.rootNodes[m]);
110
+ pNode.appendChild(rt.rootNodes[parseInt(m.toString(), 10)]);
90
111
  }
91
112
  }
92
113
  }
@@ -96,7 +117,7 @@ function clearTemplate(_this, templateNames, index) {
96
117
  }
97
118
  }
98
119
  if (!tabaccordionTemp || !index) {
99
- delete _this.registeredTemplate[registeredTemplate];
120
+ delete _this.registeredTemplate["".concat(registeredTemplate)];
100
121
  }
101
122
  }
102
123
  }
@@ -104,7 +125,8 @@ function clearTemplate(_this, templateNames, index) {
104
125
  if (tagObject.instance) {
105
126
  /* istanbul ignore next */
106
127
  tagObject.instance.clearTemplate((templateNames && templateNames.filter(function (val) {
107
- return (new RegExp(tagObject.name).test(val) ? true : false);
128
+ var regExp = RegExp;
129
+ return (new regExp(tagObject.name).test(val) ? true : false);
108
130
  })));
109
131
  }
110
132
  };
@@ -115,25 +137,26 @@ function clearTemplate(_this, templateNames, index) {
115
137
  }
116
138
  /**
117
139
  * To set value for the nameSpace in desired object.
118
- * @param {string} nameSpace - String value to the get the inner object
140
+ *
141
+ * @param {string} nameSpace - String value to get the inner object.
119
142
  * @param {any} value - Value that you need to set.
120
- * @param {any} obj - Object to get the inner object value.
121
- * @return {void}
143
+ * @param {any} object - Object to get the inner object value.
144
+ * @returns {void}
122
145
  * @private
123
146
  */
124
- function setValue$1(nameSpace, value, object) {
147
+ function setValue(nameSpace, value, object) {
125
148
  var keys = nameSpace.replace(/\[/g, '.').replace(/\]/g, '').split('.');
126
149
  /* istanbul ignore next */
127
150
  var fromObj = object || {};
128
151
  for (var i = 0; i < keys.length; i++) {
129
- var key = keys[i];
152
+ var key = keys[parseInt(i.toString(), 10)];
130
153
  if (i + 1 === keys.length) {
131
- fromObj[key] = value === undefined ? {} : value;
154
+ fromObj["".concat(key)] = value === undefined ? {} : value;
132
155
  }
133
- else if (fromObj[key] === undefined) {
134
- fromObj[key] = {};
156
+ else if (fromObj["".concat(key)] === undefined) {
157
+ fromObj["".concat(key)] = {};
135
158
  }
136
- fromObj = fromObj[key];
159
+ fromObj = fromObj["".concat(key)];
137
160
  }
138
161
  return fromObj;
139
162
  }
@@ -158,14 +181,14 @@ var ComplexBase = /** @__PURE__ @class */ (function () {
158
181
  }
159
182
  var templateProperties = Object.keys(this);
160
183
  for (var i = 0; i < templateProperties.length; i++) {
161
- var tempProp = getValue(templateProperties[i], this);
184
+ var tempProp = getValue(templateProperties[parseInt(i.toString(), 10)], this);
162
185
  if (typeof tempProp === 'object' && tempProp && tempProp.elementRef) {
163
- if (!getValue(templateProperties[i].indexOf('Ref') !== -1 ? templateProperties[i] : templateProperties[i] + 'Ref', this)) {
164
- setValue(templateProperties[i].indexOf('Ref') !== -1 ? templateProperties[i] : templateProperties[i] + 'Ref', tempProp, this);
186
+ if (!getValue(templateProperties[parseInt(i.toString(), 10)].indexOf('Ref') !== -1 ? templateProperties[parseInt(i.toString(), 10)] : templateProperties[parseInt(i.toString(), 10)] + 'Ref', this)) {
187
+ setValue$1(templateProperties[parseInt(i.toString(), 10)].indexOf('Ref') !== -1 ? templateProperties[parseInt(i.toString(), 10)] : templateProperties[parseInt(i.toString(), 10)] + 'Ref', tempProp, this);
165
188
  }
166
- if (getValue("viewContainerRef", this) && !getValue("_viewContainerRef", tempProp.elementRef.nativeElement) && !getValue("propName", tempProp.elementRef.nativeElement)) {
167
- setValue("_viewContainerRef", getValue("viewContainerRef", this), tempProp.elementRef.nativeElement);
168
- setValue("propName", templateProperties[i].replace("Ref", ''), tempProp.elementRef.nativeElement);
189
+ if (getValue('viewContainerRef', this) && !getValue('_viewContainerRef', tempProp.elementRef.nativeElement) && !getValue('propName', tempProp.elementRef.nativeElement)) {
190
+ setValue$1('_viewContainerRef', getValue('viewContainerRef', this), tempProp.elementRef.nativeElement);
191
+ setValue$1('propName', templateProperties[parseInt(i.toString(), 10)].replace('Ref', ''), tempProp.elementRef.nativeElement);
169
192
  }
170
193
  }
171
194
  }
@@ -176,7 +199,7 @@ var ComplexBase = /** @__PURE__ @class */ (function () {
176
199
  for (var _b = 0, templateProperties_1 = templateProperties; _b < templateProperties_1.length; _b++) {
177
200
  var tempName = templateProperties_1[_b];
178
201
  var propName = tempName.replace('Ref', '');
179
- setValue(propName.replace('_', '.'), getValue(propName, this), this.propCollection);
202
+ setValue$1(propName.replace('_', '.'), getValue(propName, this), this.propCollection);
180
203
  }
181
204
  // Angular 9 compatibility to overcome ngOnchange not get triggered issue
182
205
  // To Update properties to "this.propCollection"
@@ -184,9 +207,9 @@ var ComplexBase = /** @__PURE__ @class */ (function () {
184
207
  /* istanbul ignore next */
185
208
  if (this.directivePropList) {
186
209
  for (var k = 0; k < this.directivePropList.length; k++) {
187
- var dirPropName = this.directivePropList[k];
210
+ var dirPropName = this.directivePropList[parseInt(k.toString(), 10)];
188
211
  if (propList.indexOf(dirPropName) !== -1 && (getValue(dirPropName, this) === false || getValue(dirPropName, this))) {
189
- setValue(dirPropName, getValue(dirPropName, this), this.propCollection);
212
+ setValue$1(dirPropName, getValue(dirPropName, this), this.propCollection);
190
213
  }
191
214
  }
192
215
  this.hasChanges = true;
@@ -199,8 +222,8 @@ var ComplexBase = /** @__PURE__ @class */ (function () {
199
222
  ComplexBase.prototype.ngOnChanges = function (changes) {
200
223
  for (var _i = 0, _a = Object.keys(changes); _i < _a.length; _i++) {
201
224
  var propName = _a[_i];
202
- var changedVal = changes[propName];
203
- this.propCollection[propName] = changedVal.currentValue;
225
+ var changedVal = changes["".concat(propName)];
226
+ this.propCollection["".concat(propName)] = changedVal.currentValue;
204
227
  }
205
228
  this.isUpdated = false;
206
229
  this.hasChanges = true;
@@ -223,13 +246,13 @@ var ComplexBase = /** @__PURE__ @class */ (function () {
223
246
  var tempProps = this.propCollection[this.property];
224
247
  var props = Object.keys(tempProps[0]);
225
248
  for (var d = 0; d < props.length; d++) {
226
- if (!isNullOrUndefined(this.propCollection[props[d]])) {
227
- var val = getValue(props[d], this);
228
- var propVal = this.propCollection[this.property][0][props[d]];
229
- if (!isNullOrUndefined(val) && this.propCollection[props[d]] !== val
249
+ if (!isNullOrUndefined(this.propCollection[props[parseInt(d.toString(), 10)]])) {
250
+ var val = getValue(props[parseInt(d.toString(), 10)], this);
251
+ var propVal = this.propCollection[this.property][0][props[parseInt(d.toString(), 10)]];
252
+ if (!isNullOrUndefined(val) && this.propCollection[props[parseInt(d.toString(), 10)]] !== val
230
253
  && propVal !== val) {
231
- setValue(props[d], val, this.propCollection[this.property][0]);
232
- setValue(props[d], val, this.propCollection);
254
+ setValue$1(props[parseInt(d.toString(), 10)], val, this.propCollection[this.property][0]);
255
+ setValue$1(props[parseInt(d.toString(), 10)], val, this.propCollection);
233
256
  this.hasChanges = true;
234
257
  this.isUpdated = false;
235
258
  }
@@ -253,7 +276,7 @@ var ComplexBase = /** @__PURE__ @class */ (function () {
253
276
  for (var _i = 0, templateProperties_2 = templateProperties; _i < templateProperties_2.length; _i++) {
254
277
  var tempName = templateProperties_2[_i];
255
278
  var propName = tempName.replace('Ref', '');
256
- setValue(propName.replace('_', '.'), getValue(propName, this), this.propCollection);
279
+ setValue$1(propName.replace('_', '.'), getValue(propName, this), this.propCollection);
257
280
  }
258
281
  }
259
282
  };
@@ -306,24 +329,26 @@ var ArrayBase = /** @__PURE__ @class */ (function () {
306
329
  var result = false;
307
330
  var index = 0;
308
331
  var isSourceChanged = false;
309
- // tslint:disable-next-line
310
332
  var childrenDataSource = this.children.map(function (child) {
311
333
  return child;
312
334
  });
313
335
  /* istanbul ignore next */
314
336
  if (this.list.length === this.children.length) {
315
337
  for (var i = 0; i < this.list.length; i++) {
316
- if (this.list[i].propCollection.dataSource) {
317
- if (this.list[i].dataSource && this.list[i].propCollection.dataSource !== this.list[i].dataSource) {
318
- this.list[i].propCollection.dataSource = this.list[i].dataSource;
319
- this.list[i].hasChanges = true;
338
+ if (this.list[parseInt(i.toString(), 10)].propCollection.dataSource) {
339
+ if (this.list[parseInt(i.toString(), 10)].dataSource &&
340
+ this.list[parseInt(i.toString(), 10)].propCollection.dataSource
341
+ !== this.list[parseInt(i.toString(), 10)].dataSource) {
342
+ this.list[parseInt(i.toString(), 10)].propCollection.dataSource = this.list[parseInt(i.toString(), 10)].dataSource;
343
+ this.list[parseInt(i.toString(), 10)].hasChanges = true;
320
344
  }
321
- if (this.list[i].property !== "series") {
322
- isSourceChanged = (JSON.stringify(this.list[i].propCollection.dataSource) !==
323
- JSON.stringify(childrenDataSource[i].propCollection.dataSource));
345
+ if (this.list[parseInt(i.toString(), 10)].property !== 'series') {
346
+ isSourceChanged = (JSON.stringify(this.list[parseInt(i.toString(), 10)].propCollection.dataSource) !==
347
+ JSON.stringify(childrenDataSource[parseInt(i.toString(), 10)].propCollection.dataSource));
324
348
  }
325
349
  }
326
- isSourceChanged = this.list[i].hasChanges !== childrenDataSource[i].hasChanges;
350
+ isSourceChanged = this.list[parseInt(i.toString(), 10)].hasChanges
351
+ !== childrenDataSource[parseInt(i.toString(), 10)].hasChanges;
327
352
  }
328
353
  }
329
354
  this.hasNewChildren = (this.list.length !== this.children.length || isSourceChanged) ? true : null;
@@ -347,17 +372,18 @@ var ArrayBase = /** @__PURE__ @class */ (function () {
347
372
  for (var _i = 0, _a = this.list; _i < _a.length; _i++) {
348
373
  var item = _a[_i];
349
374
  item.clearTemplate(templateNames && templateNames.map(function (val) {
350
- return new RegExp(_this.propertyName).test(val) ? val.replace(_this.propertyName + '.', '') : val;
375
+ var regExp = RegExp;
376
+ return new regExp(_this.propertyName).test(val) ? val.replace(_this.propertyName + '.', '') : val;
351
377
  }));
352
378
  }
353
379
  };
354
380
  ArrayBase.prototype.ngAfterContentChecked = function () {
355
381
  this.hasChanges = this.isChanged();
356
382
  for (var i = 0; i < this.list.length; i++) {
357
- if (getValue('childColumns', this.list[i]) && getValue('property', this.list[i]) === 'columns') {
358
- setValue('columns', getValue('childColumns', this.list[i]).getProperties(), this.list[i].propCollection);
383
+ if (getValue('childColumns', this.list[parseInt(i.toString(), 10)]) && getValue('property', this.list[parseInt(i.toString(), 10)]) === 'columns') {
384
+ setValue$1('columns', getValue('childColumns', this.list[parseInt(i.toString(), 10)]).getProperties(), this.list[parseInt(i.toString(), 10)].propCollection);
359
385
  }
360
- this.list[i].isUpdated = true;
386
+ this.list[parseInt(i.toString(), 10)].isUpdated = true;
361
387
  }
362
388
  };
363
389
  ArrayBase.prototype.ngAfterViewInit = function () {
@@ -369,9 +395,7 @@ var ArrayBase = /** @__PURE__ @class */ (function () {
369
395
  return ArrayBase;
370
396
  }());
371
397
 
372
- /**
373
- * Angular Component Base Module
374
- */
398
+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types */
375
399
  var ComponentBase = /** @__PURE__ @class */ (function () {
376
400
  function ComponentBase() {
377
401
  this.isProtectedOnChange = true;
@@ -381,20 +405,16 @@ var ComponentBase = /** @__PURE__ @class */ (function () {
381
405
  if (this.isProtectedOnChange) {
382
406
  return;
383
407
  }
384
- this.oldProperties[key] = oldValue;
385
- this.changedProperties[key] = newValue;
408
+ this.oldProperties["".concat(key)] = oldValue;
409
+ this.changedProperties["".concat(key)] = newValue;
386
410
  this.finalUpdate();
387
- // tslint:disable-next-line:no-any
388
411
  var changeTime = setTimeout(this.dataBind.bind(this));
389
412
  var clearUpdate = function () {
390
413
  clearTimeout(changeTime);
391
414
  };
392
415
  this.finalUpdate = clearUpdate;
393
416
  };
394
-
395
- // tslint:disable-next-line:no-any
396
417
  ComponentBase.prototype.ngOnInit = function (isTempRef) {
397
- // tslint:disable-next-line:no-any
398
418
  var tempOnThis = isTempRef || this;
399
419
  tempOnThis.registeredTemplate = {};
400
420
  tempOnThis.ngBoundedEvents = {};
@@ -410,7 +430,6 @@ var ComponentBase = /** @__PURE__ @class */ (function () {
410
430
  tempOnThis.ngAttr = this.getAngularAttr(tempOnThis.element);
411
431
  /* istanbul ignore next */
412
432
  tempOnThis.createElement = function (tagName, prop) {
413
- //tslint:disable-next-line
414
433
  var ele = tempOnThis.srenderer ? tempOnThis.srenderer.createElement(tagName) : createElement(tagName);
415
434
  if (typeof (prop) === 'undefined') {
416
435
  return ele;
@@ -443,45 +462,42 @@ var ComponentBase = /** @__PURE__ @class */ (function () {
443
462
  }
444
463
  var complexTemplates = Object.keys(tempOnThis);
445
464
  for (var i = 0; i < complexTemplates.length; i++) {
446
- var compProp = getValue(complexTemplates[i], tempOnThis);
465
+ var compProp = getValue(complexTemplates[parseInt(i.toString(), 10)], tempOnThis);
447
466
  if (typeof compProp === 'object' && compProp && compProp.elementRef) {
448
- if (typeof compProp === 'object' && compProp && compProp.elementRef && complexTemplates[i].indexOf('_') !== -1 && complexTemplates[i].indexOf('Ref') === -1) {
449
- setValue(complexTemplates[i] + 'Ref', compProp, tempOnThis);
467
+ if (typeof compProp === 'object' && compProp && compProp.elementRef && complexTemplates[parseInt(i.toString(), 10)].indexOf('_') !== -1 && complexTemplates[parseInt(i.toString(), 10)].indexOf('Ref') === -1) {
468
+ setValue$1(complexTemplates[parseInt(i.toString(), 10)] + 'Ref', compProp, tempOnThis);
450
469
  }
451
- if (tempOnThis.viewContainerRef && !getValue("_viewContainerRef", compProp.elementRef.nativeElement) && !getValue("propName", compProp.elementRef.nativeElement)) {
452
- setValue("_viewContainerRef", tempOnThis.viewContainerRef, compProp.elementRef.nativeElement);
453
- setValue("propName", complexTemplates[i].replace("Ref", ''), compProp.elementRef.nativeElement);
470
+ if (tempOnThis.viewContainerRef && !getValue('_viewContainerRef', compProp.elementRef.nativeElement) && !getValue('propName', compProp.elementRef.nativeElement)) {
471
+ setValue$1('_viewContainerRef', tempOnThis.viewContainerRef, compProp.elementRef.nativeElement);
472
+ setValue$1('propName', complexTemplates[parseInt(i.toString(), 10)].replace('Ref', ''), compProp.elementRef.nativeElement);
454
473
  }
455
474
  }
456
475
  }
457
476
  complexTemplates = Object.keys(tempOnThis);
458
477
  complexTemplates = complexTemplates.filter(function (val) {
459
- return /Ref$/i.test(val) && /\_/i.test(val);
478
+ return /Ref$/i.test(val) && /_/i.test(val);
460
479
  });
461
480
  for (var _b = 0, complexTemplates_1 = complexTemplates; _b < complexTemplates_1.length; _b++) {
462
481
  var tempName = complexTemplates_1[_b];
463
482
  var propName = tempName.replace('Ref', '');
464
483
  var val = {};
465
- setValue(propName.replace('_', '.'), getValue(propName, tempOnThis), val);
484
+ setValue$1(propName.replace('_', '.'), getValue(propName, tempOnThis), val);
466
485
  tempOnThis.setProperties(val, true);
467
486
  }
468
487
  };
469
488
  ComponentBase.prototype.getAngularAttr = function (ele) {
470
- var attributes$$1 = ele.attributes;
471
- var length = attributes$$1.length;
489
+ var attributes = ele.attributes;
490
+ var length = attributes.length;
472
491
  var ngAr;
473
492
  for (var i = 0; i < length; i++) {
474
493
  /* istanbul ignore next */
475
- if (/_ngcontent/g.test(attributes$$1[i].name)) {
476
- ngAr = attributes$$1[i].name;
494
+ if (/_ngcontent/g.test(attributes[parseInt(i.toString(), 10)].name)) {
495
+ ngAr = attributes[parseInt(i.toString(), 10)].name;
477
496
  }
478
497
  }
479
498
  return ngAr;
480
499
  };
481
-
482
- // tslint:disable-next-line:no-any
483
500
  ComponentBase.prototype.ngAfterViewInit = function (isTempRef) {
484
- // tslint:disable-next-line:no-any
485
501
  var tempAfterViewThis = isTempRef || this;
486
502
  var regExp = /ejs-tab|ejs-accordion/g;
487
503
  /* istanbul ignore next */
@@ -508,7 +524,7 @@ var ComponentBase = /** @__PURE__ @class */ (function () {
508
524
  for (var _i = 0, templateProperties_1 = templateProperties; _i < templateProperties_1.length; _i++) {
509
525
  var tempName = templateProperties_1[_i];
510
526
  var propName = tempName.replace('Ref', '');
511
- setValue(propName.replace('_', '.'), getValue(propName + 'Ref', tempAfterViewThis), tempAfterViewThis);
527
+ setValue$1(propName.replace('_', '.'), getValue(propName + 'Ref', tempAfterViewThis), tempAfterViewThis);
512
528
  }
513
529
  // Used setTimeout for template binding
514
530
  // Refer Link: https://github.com/angular/angular/issues/6005
@@ -528,9 +544,7 @@ var ComponentBase = /** @__PURE__ @class */ (function () {
528
544
  appendToComponent(tempAfterViewThis);
529
545
  }
530
546
  };
531
- // tslint:disable-next-line:no-any
532
547
  ComponentBase.prototype.ngOnDestroy = function (isTempRef) {
533
- // tslint:disable-next-line:no-any
534
548
  var tempOnDestroyThis = isTempRef || this;
535
549
  /* istanbul ignore else */
536
550
  setTimeout(function () {
@@ -541,20 +555,20 @@ var ComponentBase = /** @__PURE__ @class */ (function () {
541
555
  setTimeout(function () {
542
556
  for (var _i = 0, _a = Object.keys(tempOnDestroyThis); _i < _a.length; _i++) {
543
557
  var key = _a[_i];
544
- var value = tempOnDestroyThis[key];
558
+ var value = tempOnDestroyThis["".concat(key)];
545
559
  if (value && /object/.test(typeof value) && Object.keys(value).length !== 0) {
546
560
  if (/properties|changedProperties|childChangedProperties|oldProperties|moduleLoader/.test(key)) {
547
- for (var _b = 0, _c = Object.keys(tempOnDestroyThis[key]); _b < _c.length; _b++) {
561
+ for (var _b = 0, _c = Object.keys(tempOnDestroyThis["".concat(key)]); _b < _c.length; _b++) {
548
562
  var propKey = _c[_b];
549
- var propValue = value[propKey];
563
+ var propValue = value["".concat(propKey)];
550
564
  if (propValue && /object/.test(typeof propValue) && Object.keys(propValue).length !== 0 && (propValue.parent || propValue.parentObj)) {
551
- tempOnDestroyThis[key][propKey] = null;
565
+ tempOnDestroyThis["".concat(key)]["".concat(propKey)] = null;
552
566
  }
553
567
  }
554
568
  }
555
569
  else {
556
570
  if (value.parent || value.parentObj) {
557
- tempOnDestroyThis[key] = null;
571
+ tempOnDestroyThis["".concat(key)] = null;
558
572
  }
559
573
  }
560
574
  }
@@ -563,14 +577,10 @@ var ComponentBase = /** @__PURE__ @class */ (function () {
563
577
  }
564
578
  });
565
579
  };
566
- //tslint:disable-next-line
567
580
  ComponentBase.prototype.clearTemplate = function (templateNames, index) {
568
581
  clearTemplate(this, templateNames, index);
569
582
  };
570
-
571
- // tslint:disable-next-line:no-any
572
583
  ComponentBase.prototype.ngAfterContentChecked = function (isTempRef) {
573
- // tslint:disable-next-line:no-any
574
584
  var tempAfterContentThis = isTempRef || this;
575
585
  for (var _i = 0, _a = tempAfterContentThis.tagObjects; _i < _a.length; _i++) {
576
586
  var tagObject = _a[_i];
@@ -593,17 +603,17 @@ var ComponentBase = /** @__PURE__ @class */ (function () {
593
603
  if (complexDirProps && skip && complexDirProps.indexOf(tagObject.instance.propertyName) === -1) {
594
604
  var compDirPropList = Object.keys(tagObject.instance.list[0].propCollection);
595
605
  for (var h = 0; h < tagObject.instance.list.length; h++) {
596
- tagObject.instance.list[h].propCollection[tagObject.instance.propertyName] = [];
606
+ tagObject.instance.list["".concat(h)].propCollection[tagObject.instance.propertyName] = [];
597
607
  var obj = {};
598
608
  for (var k = 0; k < compDirPropList.length; k++) {
599
- var complexPropName = compDirPropList[k];
600
- obj[complexPropName] = tagObject.instance.list[h].propCollection[complexPropName];
609
+ var complexPropName = compDirPropList[parseInt(k.toString(), 10)];
610
+ obj["".concat(complexPropName)] = tagObject.instance.list["".concat(h)].propCollection["".concat(complexPropName)];
601
611
  }
602
612
  var _loop_1 = function (i) {
603
- var tag = tagObject.instance.list[h].tags[i];
604
- var childObj = getValue('child' + tag.substring(0, 1).toUpperCase() + tag.substring(1), tagObject.instance.list[h]);
613
+ var tag = tagObject.instance.list["".concat(h)].tags[parseInt(i.toString(), 10)];
614
+ var childObj = getValue('child' + tag.substring(0, 1).toUpperCase() + tag.substring(1), tagObject.instance.list["".concat(h)]);
605
615
  if (childObj) {
606
- var innerchildObj = tagObject.instance.list[h]['child' + tag.substring(0, 1).toUpperCase() + tag.substring(1)];
616
+ var innerchildObj = tagObject.instance.list["".concat(h)]['child' + tag.substring(0, 1).toUpperCase() + tag.substring(1)];
607
617
  // Update the inner child tag objects
608
618
  var updateChildTag_1 = function (innerchild) {
609
619
  var innerLevelTag = [];
@@ -611,9 +621,10 @@ var ComponentBase = /** @__PURE__ @class */ (function () {
611
621
  for (var j = 0; j < innerchild.list.length; j++) {
612
622
  var innerTag = innerchild.list[0].tags[0];
613
623
  if (innerTag) {
614
- var innerchildTag = getValue('child' + innerTag.substring(0, 1).toUpperCase() + innerTag.substring(1), innerchild.list[j]);
624
+ var innerchildTag = getValue('child' + innerTag.substring(0, 1).toUpperCase() + innerTag.substring(1), innerchild.list[parseInt(j.toString(), 10)]);
615
625
  if (innerchildTag) {
616
- innerchild.list[j].tagObjects.push({ instance: innerchildTag, name: innerTag });
626
+ innerchild.list[parseInt(j.toString(), 10)].tagObjects
627
+ .push({ instance: innerchildTag, name: innerTag });
617
628
  innerLevelTag.push(innerchildTag);
618
629
  }
619
630
  }
@@ -622,19 +633,18 @@ var ComponentBase = /** @__PURE__ @class */ (function () {
622
633
  // check for inner level tag
623
634
  if (innerLevelTag.length !== 0) {
624
635
  for (var l = 0; l < innerLevelTag.length; l++) {
625
- updateChildTag_1(innerLevelTag[l]);
636
+ updateChildTag_1(innerLevelTag[parseInt(l.toString(), 10)]);
626
637
  }
627
638
  }
628
-
629
639
  };
630
640
  updateChildTag_1(innerchildObj);
631
- tagObject.instance.list[h].tagObjects.push({ instance: childObj, name: tag });
641
+ tagObject.instance.list["".concat(h)].tagObjects.push({ instance: childObj, name: tag });
632
642
  }
633
643
  };
634
- for (var i = 0; i < tagObject.instance.list[h].tags.length; i++) {
644
+ for (var i = 0; i < tagObject.instance.list["".concat(h)].tags.length; i++) {
635
645
  _loop_1(i);
636
646
  }
637
- tagObject.instance.list[h].propCollection[tagObject.instance.propertyName].push(obj);
647
+ tagObject.instance.list["".concat(h)].propCollection[tagObject.instance.propertyName].push(obj);
638
648
  }
639
649
  }
640
650
  // End angular 9 compatibility
@@ -651,7 +661,7 @@ var ComponentBase = /** @__PURE__ @class */ (function () {
651
661
  for (var _b = 0, _c = tagObject.instance.list; _b < _c.length; _b++) {
652
662
  var list = _c[_b];
653
663
  var curIndex = tagObject.instance.list.indexOf(list);
654
- var curChild = getValue(tagObject.name, tempAfterContentThis)[curIndex];
664
+ var curChild = getValue(tagObject.name, tempAfterContentThis)["".concat(curIndex)];
655
665
  var complexTemplates = Object.keys(curChild);
656
666
  complexTemplates = complexTemplates.filter(function (val) {
657
667
  return /Ref$/i.test(val);
@@ -660,8 +670,8 @@ var ComponentBase = /** @__PURE__ @class */ (function () {
660
670
  for (var _d = 0, complexTemplates_2 = complexTemplates; _d < complexTemplates_2.length; _d++) {
661
671
  var complexPropName = complexTemplates_2[_d];
662
672
  complexPropName = complexPropName.replace(/Ref/, '');
663
- curChild.properties[complexPropName] = !curChild.properties[complexPropName] ?
664
- curChild.propCollection[complexPropName] : curChild.properties[complexPropName];
673
+ curChild.properties["".concat(complexPropName)] = !curChild.properties["".concat(complexPropName)] ?
674
+ curChild.propCollection["".concat(complexPropName)] : curChild.properties["".concat(complexPropName)];
665
675
  }
666
676
  }
667
677
  if (!isUndefined(curChild) && !isUndefined(curChild.setProperties)) {
@@ -674,7 +684,7 @@ var ComponentBase = /** @__PURE__ @class */ (function () {
674
684
  }
675
685
  list.isUpdated = true;
676
686
  }
677
- if ((/grid/.test(tempAfterContentThis.getModuleName()) && hasDiffLength) || /chart/.test(tempAfterContentThis.getModuleName())) {
687
+ if ((/grid/.test(tempAfterContentThis.getModuleName()) && hasDiffLength) || tempAfterContentThis.getModuleName() === 'chart') {
678
688
  propObj[tagObject.name] = tagObject.instance.getProperties();
679
689
  tempAfterContentThis.setProperties(propObj, tagObject.instance.isInitChanges);
680
690
  }
@@ -691,7 +701,7 @@ var ComponentBase = /** @__PURE__ @class */ (function () {
691
701
  return;
692
702
  }
693
703
  this.saveChanges(prop, newVal, oldVal);
694
- setValue(prop, (isNullOrUndefined(newVal) ? null : newVal), this.properties);
704
+ setValue$1(prop, (isNullOrUndefined(newVal) ? null : newVal), this.properties);
695
705
  getValue(prop + 'Change', this).emit(newVal);
696
706
  };
697
707
  ComponentBase.prototype.addTwoWay = function (propList) {
@@ -704,7 +714,7 @@ var ComponentBase = /** @__PURE__ @class */ (function () {
704
714
  },
705
715
  set: function (newVal) { return _this.twoWaySetter(newVal, prop); }
706
716
  });
707
- setValue(prop + 'Change', new EventEmitter(), this_1);
717
+ setValue$1(prop + 'Change', new EventEmitter(), this_1);
708
718
  };
709
719
  var this_1 = this;
710
720
  for (var _i = 0, propList_1 = propList; _i < propList_1.length; _i++) {
@@ -715,16 +725,16 @@ var ComponentBase = /** @__PURE__ @class */ (function () {
715
725
  ComponentBase.prototype.addEventListener = function (eventName, handler) {
716
726
  var eventObj = getValue(eventName, this);
717
727
  if (!isUndefined(eventObj)) {
718
- if (!this.ngBoundedEvents[eventName]) {
719
- this.ngBoundedEvents[eventName] = new Map();
728
+ if (!this.ngBoundedEvents["".concat(eventName)]) {
729
+ this.ngBoundedEvents["".concat(eventName)] = new Map();
720
730
  }
721
- this.ngBoundedEvents[eventName].set(handler, eventObj.subscribe(handler));
731
+ this.ngBoundedEvents["".concat(eventName)].set(handler, eventObj.subscribe(handler));
722
732
  }
723
733
  };
724
734
  ComponentBase.prototype.removeEventListener = function (eventName, handler) {
725
735
  var eventObj = getValue(eventName, this);
726
736
  if (!isUndefined(eventObj)) {
727
- this.ngBoundedEvents[eventName].get(handler).unsubscribe();
737
+ this.ngBoundedEvents["".concat(eventName)].get(handler).unsubscribe();
728
738
  }
729
739
  };
730
740
  ComponentBase.prototype.trigger = function (eventName, eventArgs, success) {
@@ -761,7 +771,6 @@ var FormBase = /** @__PURE__ @class */ (function () {
761
771
  FormBase.prototype.propagateChange = function (_) { return; };
762
772
  FormBase.prototype.propagateTouch = function () { return; };
763
773
  FormBase.prototype.localChange = function (e) {
764
- //tslint:disable-next-line
765
774
  var value = (e.checked === undefined ? e.value : e.checked);
766
775
  this.objCheck = isObject(value);
767
776
  if (this.isUpdated === true) {
@@ -785,7 +794,6 @@ var FormBase = /** @__PURE__ @class */ (function () {
785
794
  this.angularValue = value;
786
795
  }
787
796
  else {
788
- //tslint:disable-next-line
789
797
  var optionalValue = value;
790
798
  this.propagateChange(optionalValue);
791
799
  this.angularValue = value;
@@ -808,12 +816,10 @@ var FormBase = /** @__PURE__ @class */ (function () {
808
816
  return;
809
817
  }
810
818
  this.saveChanges(prop, newVal, oldVal);
811
- setValue(prop, (isNullOrUndefined(newVal) ? null : newVal), this.properties);
819
+ setValue$1(prop, (isNullOrUndefined(newVal) ? null : newVal), this.properties);
812
820
  getValue(prop + 'Change', this).emit(newVal);
813
821
  };
814
- // tslint:disable-next-line:no-any
815
822
  FormBase.prototype.ngAfterViewInit = function (isTempRef) {
816
- // tslint:disable-next-line:no-any
817
823
  var tempFormAfterViewThis = isTempRef || this;
818
824
  // Used setTimeout for template binding
819
825
  // Refer Link: https://github.com/angular/angular/issues/6005
@@ -893,6 +899,10 @@ var FormBase = /** @__PURE__ @class */ (function () {
893
899
  var stringCompiler = getTemplateEngine();
894
900
  /**
895
901
  * Angular Template Compiler
902
+ *
903
+ * @param {AngularElementType} templateEle - The element representing the template.
904
+ * @param {Object} [helper] - Optional helper object.
905
+ * @returns {Function} A function that compiles the template.
896
906
  */
897
907
  function compile(templateEle, helper) {
898
908
  if (typeof templateEle === 'string' || (typeof templateEle === 'function' && templateEle.prototype && templateEle.prototype.CSPTemplate)) {
@@ -901,7 +911,6 @@ function compile(templateEle, helper) {
901
911
  else {
902
912
  var contRef_1 = templateEle.elementRef.nativeElement._viewContainerRef;
903
913
  var pName_1 = templateEle.elementRef.nativeElement.propName;
904
- //tslint:disable-next-line
905
914
  return function (data, component, propName) {
906
915
  var context = { $implicit: data };
907
916
  /* istanbul ignore next */
@@ -917,16 +926,19 @@ function compile(templateEle, helper) {
917
926
  var viewCollection = (component && component.registeredTemplate) ?
918
927
  component.registeredTemplate : getValue('currentInstance.registeredTemplate', conRef);
919
928
  propName = (propName && component.registeredTemplate) ? propName : pName_1;
920
- if (typeof viewCollection[propName] === 'undefined') {
921
- viewCollection[propName] = [];
929
+ if (typeof viewCollection["".concat(propName)] === 'undefined') {
930
+ viewCollection["".concat(propName)] = [];
922
931
  }
923
- viewCollection[propName].push(viewRef);
932
+ viewCollection["".concat(propName)].push(viewRef);
924
933
  return viewRef.rootNodes;
925
934
  };
926
935
  }
927
936
  }
928
937
  /**
929
938
  * Property decorator for angular.
939
+ *
940
+ * @param {Object} [defaultValue] - Default value for the property.
941
+ * @returns {PropertyDecorator} The decorator function.
930
942
  */
931
943
  function Template(defaultValue) {
932
944
  return function (target, key) {
@@ -939,12 +951,18 @@ function Template(defaultValue) {
939
951
  Object.defineProperty(target, key, propertyDescriptor);
940
952
  };
941
953
  }
954
+ /**
955
+ * Creates a setter function for a given property key.
956
+ *
957
+ * @param {string} key - The property key.
958
+ * @returns {Function} The setter function.
959
+ */
942
960
  function setter(key) {
943
961
  return function (val) {
944
962
  if (val === undefined) {
945
963
  return;
946
964
  }
947
- setValue(key + 'Ref', val, this);
965
+ setValue$1(key + 'Ref', val, this);
948
966
  if (typeof val !== 'string') {
949
967
  val.elementRef.nativeElement._viewContainerRef = this.viewContainerRef;
950
968
  val.elementRef.nativeElement.propName = key;
@@ -957,18 +975,20 @@ function setter(key) {
957
975
  }
958
976
  };
959
977
  }
978
+ /**
979
+ * Returns a getter function for the specified key and default value.
980
+ *
981
+ * @param {string} key - The key for the property.
982
+ * @param {Object} defaultValue - The default value for the property.
983
+ * @returns {Function} The getter function.
984
+ */
960
985
  function getter(key, defaultValue) {
961
986
  return function () {
962
987
  /* istanbul ignore next */
963
988
  return getValue(key + 'Ref', this) || defaultValue;
964
989
  };
965
990
  }
966
- //tslint:disable-next-line
967
991
  setTemplateEngine({ compile: compile });
968
992
 
969
- /**
970
- * Index
971
- */
972
-
973
- export { ComplexBase, ArrayBase, ComponentBase, FormBase, applyMixins, ComponentMixins, registerEvents, clearTemplate, setValue$1 as setValue, compile, Template };
993
+ export { ArrayBase, ComplexBase, ComponentBase, ComponentMixins, FormBase, Template, applyMixins, clearTemplate, compile, registerEvents, setValue };
974
994
  //# sourceMappingURL=ej2-angular-base.es5.js.map