@syncfusion/ej2-angular-base 19.3.59 → 19.3.60

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 (52) hide show
  1. package/.github/PULL_REQUEST_TEMPLATE/bug.md +60 -0
  2. package/.github/PULL_REQUEST_TEMPLATE/feature.md +37 -0
  3. package/CHANGELOG.md +74 -13
  4. package/dist/ej2-angular-base.umd.min.js +1 -10
  5. package/dist/ej2-angular-base.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-angular-base.es2015.js +122 -33
  7. package/dist/es6/ej2-angular-base.es2015.js.map +1 -1
  8. package/dist/es6/ej2-angular-base.es5.js +130 -36
  9. package/dist/es6/ej2-angular-base.es5.js.map +1 -1
  10. package/dist/global/ej2-angular-base.min.js +1 -10
  11. package/dist/global/ej2-angular-base.min.js.map +1 -1
  12. package/dist/global/index.d.ts +0 -9
  13. package/package.json +71 -71
  14. package/schematics/generators/component-builder.js +14 -14
  15. package/schematics/generators/template/schema.json +1 -1
  16. package/schematics/ng-add/index.js +2 -2
  17. package/schematics/ng-add/schema.json +1 -1
  18. package/schematics/ng-add/theme.js +5 -4
  19. package/schematics/utils/get-project.js +3 -0
  20. package/schematics/utils/helpers/helpers.d.ts +1 -1
  21. package/schematics/utils/project-style-file.js +2 -2
  22. package/src/complex-array-base.js +14 -5
  23. package/src/component-base.js +76 -19
  24. package/src/form-base.d.ts +2 -1
  25. package/src/form-base.js +12 -3
  26. package/src/template.js +7 -2
  27. package/src/util.js +21 -7
  28. package/styles/bootstrap-dark.scss +1 -1
  29. package/styles/bootstrap.scss +1 -1
  30. package/styles/bootstrap4.scss +1 -1
  31. package/styles/bootstrap5-dark.scss +1 -1
  32. package/styles/bootstrap5.scss +1 -1
  33. package/styles/fabric-dark.scss +1 -1
  34. package/styles/fabric.scss +1 -1
  35. package/styles/fluent-dark.css +0 -0
  36. package/styles/fluent-dark.scss +1 -0
  37. package/styles/fluent.css +0 -0
  38. package/styles/fluent.scss +1 -0
  39. package/styles/highcontrast-light.scss +1 -1
  40. package/styles/highcontrast.scss +1 -1
  41. package/styles/material-dark.css +0 -1
  42. package/styles/material-dark.scss +1 -1
  43. package/styles/material.css +0 -1
  44. package/styles/material.scss +1 -1
  45. package/styles/material3-dark.css +54 -0
  46. package/styles/material3-dark.scss +1 -0
  47. package/styles/material3.css +110 -0
  48. package/styles/material3.scss +1 -0
  49. package/styles/tailwind-dark.css +0 -1
  50. package/styles/tailwind-dark.scss +1 -1
  51. package/styles/tailwind.css +0 -1
  52. package/styles/tailwind.scss +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ej2-angular-base.umd.min.js","sources":["../src/util.js","../src/template.js","../src/complex-array-base.js","../src/component-base.js","../src/form-base.js"],"sourcesContent":["import { EventEmitter } from '@angular/core';\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\n/**\n * Angular Utility Module\n */\n/* tslint:disable */\nexport function applyMixins(derivedClass, baseClass) {\n baseClass.forEach(function (baseClass) {\n Object.getOwnPropertyNames(baseClass.prototype).forEach(function (name) {\n if (!derivedClass.prototype.hasOwnProperty(name) || baseClass.isFormBase) {\n derivedClass.prototype[name] = baseClass.prototype[name];\n }\n });\n });\n}\n/* tslint:disable */\nexport function ComponentMixins(baseClass) {\n return function (derivedClass) {\n applyMixins(derivedClass, baseClass);\n };\n}\n/**\n * @private\n */\nexport function registerEvents(eventList, obj, direct) {\n var ngEventsEmitter = {};\n if (eventList && eventList.length) {\n for (var _i = 0, eventList_1 = eventList; _i < eventList_1.length; _i++) {\n var event_1 = eventList_1[_i];\n if (direct === true) {\n obj.propCollection[event_1] = new EventEmitter(false);\n obj[event_1] = obj.propCollection[event_1];\n }\n else {\n ngEventsEmitter[event_1] = new EventEmitter(false);\n }\n }\n if (direct !== true) {\n obj.setProperties(ngEventsEmitter, true);\n }\n }\n}\n/**\n * @private\n */\nexport function clearTemplate(_this, templateNames, index) {\n var regTemplates = Object.keys(_this.registeredTemplate);\n if (regTemplates.length) {\n /* istanbul ignore next */\n var regProperties = templateNames && templateNames.filter(function (val) {\n return (/\\./g.test(val) ? false : true);\n });\n for (var _i = 0, _a = (regProperties && regProperties || regTemplates); _i < _a.length; _i++) {\n var registeredTemplate = _a[_i];\n /* istanbul ignore next */\n if (index && index.length) {\n for (var e = 0; e < index.length; e++) {\n for (var m = 0; m < _this.registeredTemplate.template.length; m++) {\n var value = _this.registeredTemplate.template[m].rootNodes[0];\n if (value === index[e]) {\n var rt = _this.registeredTemplate[registeredTemplate];\n rt[m].destroy();\n }\n }\n }\n }\n else {\n if (_this.registeredTemplate[registeredTemplate]) {\n for (var _b = 0, _c = _this.registeredTemplate[registeredTemplate]; _b < _c.length; _b++) {\n var rt = _c[_b];\n if (!rt.destroyed) {\n if (rt._view) {\n var pNode = rt._view.renderer.parentNode(rt.rootNodes[0]);\n if (!isNullOrUndefined(pNode)) {\n for (var m = 0; m < rt.rootNodes.length; m++) {\n pNode.appendChild(rt.rootNodes[m]);\n }\n }\n }\n rt.destroy();\n }\n }\n }\n }\n delete _this.registeredTemplate[registeredTemplate];\n }\n }\n var _loop_1 = function (tagObject) {\n if (tagObject.instance) {\n /* istanbul ignore next */\n tagObject.instance.clearTemplate((templateNames && templateNames.filter(function (val) {\n return (new RegExp(tagObject.name).test(val) ? true : false);\n })));\n }\n };\n for (var _d = 0, _e = _this.tagObjects; _d < _e.length; _d++) {\n var tagObject = _e[_d];\n _loop_1(tagObject);\n }\n}\n/**\n * To set value for the nameSpace in desired object.\n * @param {string} nameSpace - String value to the get the inner object\n * @param {any} value - Value that you need to set.\n * @param {any} obj - Object to get the inner object value.\n * @return {void}\n * @private\n */\nexport function setValue(nameSpace, value, object) {\n var keys = nameSpace.replace(/\\[/g, '.').replace(/\\]/g, '').split('.');\n /* istanbul ignore next */\n var fromObj = object || {};\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (i + 1 === keys.length) {\n fromObj[key] = value === undefined ? {} : value;\n }\n else if (fromObj[key] === undefined) {\n fromObj[key] = {};\n }\n fromObj = fromObj[key];\n }\n return fromObj;\n}\n","import { setTemplateEngine, getTemplateEngine } from '@syncfusion/ej2-base';\nimport { setValue, getValue } from '@syncfusion/ej2-base';\nvar stringCompiler = getTemplateEngine();\n/**\n * Angular Template Compiler\n */\nexport function compile(templateEle, helper) {\n if (typeof templateEle === 'string') {\n return stringCompiler(templateEle, helper);\n }\n else {\n var contRef_1 = templateEle.elementRef.nativeElement._viewContainerRef;\n var pName_1 = templateEle.elementRef.nativeElement.propName;\n //tslint:disable-next-line \n return function (data, component, propName) {\n var context = { $implicit: data };\n /* istanbul ignore next */\n var conRef = contRef_1 ? contRef_1 : component.viewContainerRef;\n var viewRef = conRef.createEmbeddedView(templateEle, context);\n viewRef.markForCheck();\n /* istanbul ignore next */\n var viewCollection = (component && component.registeredTemplate) ?\n component.registeredTemplate : getValue('currentInstance.registeredTemplate', conRef);\n propName = (propName && component.registeredTemplate) ? propName : pName_1;\n if (typeof viewCollection[propName] === 'undefined') {\n viewCollection[propName] = [];\n }\n viewCollection[propName].push(viewRef);\n return viewRef.rootNodes;\n };\n }\n}\n/**\n * Property decorator for angular.\n */\nexport function Template(defaultValue) {\n return function (target, key) {\n var propertyDescriptor = {\n set: setter(key),\n get: getter(key, defaultValue),\n enumerable: true,\n configurable: true\n };\n Object.defineProperty(target, key, propertyDescriptor);\n };\n}\nfunction setter(key) {\n return function (val) {\n if (val === undefined) {\n return;\n }\n setValue(key + 'Ref', val, this);\n if (typeof val !== 'string') {\n val.elementRef.nativeElement._viewContainerRef = this.viewContainerRef;\n val.elementRef.nativeElement.propName = key;\n }\n else {\n if (this.saveChanges) {\n this.saveChanges(key, val, undefined);\n this.dataBind();\n }\n }\n };\n}\nfunction getter(key, defaultValue) {\n return function () {\n /* istanbul ignore next */\n return getValue(key + 'Ref', this) || defaultValue;\n };\n}\n//tslint:disable-next-line\nsetTemplateEngine({ compile: compile });\n","import { getValue, setValue, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { clearTemplate, registerEvents } from './util';\nvar refRegex = /Ref$/;\nvar ComplexBase = /** @class */ (function () {\n function ComplexBase() {\n this.hasChanges = false;\n this.propCollection = {};\n this.dataSource = {};\n this.tags = [];\n this.tagObjects = [];\n }\n ComplexBase.prototype.ngOnInit = function () {\n this.registeredTemplate = {};\n for (var _i = 0, _a = this.tags; _i < _a.length; _i++) {\n var tag = _a[_i];\n var objInstance = getValue('child' + tag.substring(0, 1).toUpperCase() + tag.substring(1), this);\n if (objInstance) {\n this.tagObjects.push({ instance: objInstance, name: tag });\n }\n }\n var templateProperties = Object.keys(this);\n for (var i = 0; i < templateProperties.length; i++) {\n var tempProp = getValue(templateProperties[i], this);\n if (typeof tempProp === 'object' && tempProp.elementRef && !getValue(templateProperties[i].indexOf('Ref') !== -1 ? templateProperties[i] : templateProperties[i] + 'Ref', this)) {\n setValue(templateProperties[i].indexOf('Ref') !== -1 ? templateProperties[i] : templateProperties[i] + 'Ref', tempProp, this);\n }\n }\n templateProperties = Object.keys(this);\n templateProperties = templateProperties.filter(function (val) {\n return /Ref$/i.test(val);\n });\n for (var _b = 0, templateProperties_1 = templateProperties; _b < templateProperties_1.length; _b++) {\n var tempName = templateProperties_1[_b];\n var propName = tempName.replace('Ref', '');\n setValue(propName.replace('_', '.'), getValue(propName, this), this.propCollection);\n }\n // Angular 9 compatibility to overcome ngOnchange not get triggered issue\n // To Update properties to \"this.propCollection\"\n var propList = Object.keys(this);\n /* istanbul ignore next */\n if (this.directivePropList) {\n for (var k = 0; k < this.directivePropList.length; k++) {\n var dirPropName = this.directivePropList[k];\n if (propList.indexOf(dirPropName) !== -1 && getValue(dirPropName, this)) {\n setValue(dirPropName, getValue(dirPropName, this), this.propCollection);\n }\n }\n this.hasChanges = true;\n }\n this.isInitChanges = true;\n };\n ComplexBase.prototype.registerEvents = function (eventList) {\n registerEvents(eventList, this, true);\n };\n ComplexBase.prototype.ngOnChanges = function (changes) {\n for (var _i = 0, _a = Object.keys(changes); _i < _a.length; _i++) {\n var propName = _a[_i];\n var changedVal = changes[propName];\n this.propCollection[propName] = changedVal.currentValue;\n }\n this.isUpdated = false;\n this.hasChanges = true;\n };\n /* istanbul ignore next */\n ComplexBase.prototype.clearTemplate = function (templateNames) {\n clearTemplate(this, templateNames);\n };\n ComplexBase.prototype.getProperties = function () {\n /* istanbul ignore next */\n for (var _i = 0, _a = this.tagObjects; _i < _a.length; _i++) {\n var tagObject = _a[_i];\n this.propCollection[tagObject.name] = tagObject.instance.getProperties();\n }\n return this.propCollection;\n };\n ComplexBase.prototype.isChanged = function () {\n var result = this.hasChanges;\n if (!isNullOrUndefined(this.propCollection[this.property])) {\n var tempProps = this.propCollection[this.property];\n var props = Object.keys(tempProps[0]);\n for (var d = 0; d < props.length; d++) {\n if (!isNullOrUndefined(this.propCollection[props[d]])) {\n var val = getValue(props[d], this);\n var propVal = this.propCollection[this.property][0][props[d]];\n if (!isNullOrUndefined(val) && this.propCollection[props[d]] !== val\n && propVal !== val) {\n setValue(props[d], val, this.propCollection[this.property][0]);\n setValue(props[d], val, this.propCollection);\n this.hasChanges = true;\n this.isUpdated = false;\n }\n }\n }\n }\n /* istanbul ignore next */\n for (var _i = 0, _a = this.tagObjects; _i < _a.length; _i++) {\n var item = _a[_i];\n result = result || item.instance.hasChanges;\n }\n return result || this.hasChanges;\n };\n ComplexBase.prototype.ngAfterContentChecked = function () {\n this.hasChanges = this.isChanged();\n if (this.isInitChanges || this.hasChanges) {\n var templateProperties = Object.keys(this);\n templateProperties = templateProperties.filter(function (val) {\n return refRegex.test(val);\n });\n for (var _i = 0, templateProperties_2 = templateProperties; _i < templateProperties_2.length; _i++) {\n var tempName = templateProperties_2[_i];\n var propName = tempName.replace('Ref', '');\n setValue(propName.replace('_', '.'), getValue(propName, this), this.propCollection);\n }\n }\n };\n ComplexBase.prototype.ngAfterViewChecked = function () {\n /* istanbul ignore next */\n if (this.isUpdated) {\n this.hasChanges = false;\n }\n };\n ComplexBase.prototype.ngAfterViewInit = function () {\n /* istanbul ignore next */\n this.isInitChanges = false;\n };\n ComplexBase.prototype.ngOnDestroy = function () {\n /* istanbul ignore next */\n this.directivePropList = [];\n };\n return ComplexBase;\n}());\nexport { ComplexBase };\nvar ArrayBase = /** @class */ (function () {\n function ArrayBase(propertyName) {\n this.list = [];\n this.hasChanges = false;\n this.propertyName = propertyName;\n }\n ArrayBase.prototype.ngOnInit = function () {\n this.isInitChanges = true;\n };\n ArrayBase.prototype.ngAfterContentInit = function () {\n var _this = this;\n var index = 0;\n /* istanbul ignore next */\n this.list = this.children.map(function (child) {\n child.dirIndex = index++;\n child.property = _this.propertyName;\n return child;\n });\n this.hasChanges = true;\n };\n ArrayBase.prototype.getProperties = function () {\n var onlyProp = [];\n for (var _i = 0, _a = this.list; _i < _a.length; _i++) {\n var item = _a[_i];\n onlyProp.push(item.getProperties());\n }\n return onlyProp;\n };\n ArrayBase.prototype.isChanged = function () {\n var _this = this;\n var result = false;\n var index = 0;\n var isSourceChanged = false;\n // tslint:disable-next-line\n var childrenDataSource = this.children.map(function (child) {\n return child;\n });\n /* istanbul ignore next */\n if (this.list.length === this.children.length) {\n for (var i = 0; i < this.list.length; i++) {\n if (this.list[i].propCollection.dataSource) {\n if (this.list[i].dataSource && this.list[i].propCollection.dataSource !== this.list[i].dataSource) {\n this.list[i].propCollection.dataSource = this.list[i].dataSource;\n this.list[i].hasChanges = true;\n }\n isSourceChanged = (JSON.stringify(this.list[i].propCollection.dataSource) !==\n JSON.stringify(childrenDataSource[i].propCollection.dataSource));\n }\n }\n }\n this.hasNewChildren = (this.list.length !== this.children.length || isSourceChanged) ? true : null;\n if (this.hasNewChildren) {\n this.list = this.children.map(function (child) {\n child.dirIndex = index++;\n child.property = _this.propertyName;\n return child;\n });\n }\n /* istanbul ignore end */\n for (var _i = 0, _a = this.list; _i < _a.length; _i++) {\n var item = _a[_i];\n result = result || item.hasChanges;\n }\n return !!this.list.length && result;\n };\n ArrayBase.prototype.clearTemplate = function (templateNames) {\n var _this = this;\n /* istanbul ignore next */\n for (var _i = 0, _a = this.list; _i < _a.length; _i++) {\n var item = _a[_i];\n item.clearTemplate(templateNames && templateNames.map(function (val) {\n return new RegExp(_this.propertyName).test(val) ? val.replace(_this.propertyName + '.', '') : val;\n }));\n }\n };\n ArrayBase.prototype.ngAfterContentChecked = function () {\n this.hasChanges = this.isChanged();\n for (var i = 0; i < this.list.length; i++) {\n if (getValue('childColumns', this.list[i]) && getValue('property', this.list[i]) === 'columns') {\n setValue('columns', getValue('childColumns', this.list[i]).getProperties(), this.list[i].propCollection);\n }\n this.list[i].isUpdated = true;\n }\n };\n ArrayBase.prototype.ngAfterViewInit = function () {\n this.isInitChanges = false;\n };\n ArrayBase.prototype.ngOnDestroy = function () {\n this.list = [];\n };\n return ArrayBase;\n}());\nexport { ArrayBase };\n","/**\n * Angular Component Base Module\n */\nimport { getValue, isUndefined, setValue, isNullOrUndefined, attributes, createElement } from '@syncfusion/ej2-base';\nimport { EventEmitter } from '@angular/core';\nimport { clearTemplate, registerEvents } from './util';\nvar SVG_REG = /^svg|^path|^g/;\nvar ComponentBase = /** @class */ (function () {\n function ComponentBase() {\n this.isProtectedOnChange = true;\n this.isFormInit = true;\n }\n ComponentBase.prototype.saveChanges = function (key, newValue, oldValue) {\n if (this.isProtectedOnChange) {\n return;\n }\n this.oldProperties[key] = oldValue;\n this.changedProperties[key] = newValue;\n this.finalUpdate();\n // tslint:disable-next-line:no-any\n var changeTime = setTimeout(this.dataBind.bind(this));\n var clearUpdate = function () {\n clearTimeout(changeTime);\n };\n this.finalUpdate = clearUpdate;\n };\n ;\n // tslint:disable-next-line:no-any\n ComponentBase.prototype.ngOnInit = function (isTempRef) {\n // tslint:disable-next-line:no-any\n var tempOnThis = isTempRef || this;\n tempOnThis.registeredTemplate = {};\n tempOnThis.ngBoundedEvents = {};\n tempOnThis.isAngular = true;\n tempOnThis.isFormInit = true;\n /* istanbul ignore next */\n if (isTempRef) {\n this.tags = isTempRef.tags;\n }\n tempOnThis.tags = this.tags || [];\n tempOnThis.complexTemplate = this.complexTemplate || [];\n tempOnThis.tagObjects = [];\n tempOnThis.ngAttr = this.getAngularAttr(tempOnThis.element);\n /* istanbul ignore next */\n tempOnThis.createElement = function (tagName, prop) {\n //tslint:disable-next-line\n var ele = tempOnThis.srenderer ? tempOnThis.srenderer.createElement(tagName) : createElement(tagName);\n if (typeof (prop) === 'undefined') {\n return ele;\n }\n ele.innerHTML = (prop.innerHTML ? prop.innerHTML : '');\n if (prop.className !== undefined) {\n ele.className = prop.className;\n }\n if (prop.id !== undefined) {\n ele.id = prop.id;\n }\n if (prop.styles !== undefined) {\n ele.setAttribute('style', prop.styles);\n }\n if (tempOnThis.ngAttr !== undefined) {\n ele.setAttribute(tempOnThis.ngAttr, '');\n }\n if (prop.attrs !== undefined) {\n attributes(ele, prop.attrs);\n }\n return ele;\n };\n for (var _i = 0, _a = tempOnThis.tags; _i < _a.length; _i++) {\n var tag = _a[_i];\n var tagObject = {\n instance: getValue('child' + tag.substring(0, 1).toUpperCase() + tag.substring(1), tempOnThis),\n name: tag\n };\n tempOnThis.tagObjects.push(tagObject);\n }\n var complexTemplates = Object.keys(tempOnThis);\n complexTemplates = complexTemplates.filter(function (val) {\n return /Ref$/i.test(val) && /\\_/i.test(val);\n });\n for (var _b = 0, complexTemplates_1 = complexTemplates; _b < complexTemplates_1.length; _b++) {\n var tempName = complexTemplates_1[_b];\n var propName = tempName.replace('Ref', '');\n var val = {};\n setValue(propName.replace('_', '.'), getValue(propName, tempOnThis), val);\n tempOnThis.setProperties(val, true);\n }\n };\n ComponentBase.prototype.getAngularAttr = function (ele) {\n var attributes = ele.attributes;\n var length = attributes.length;\n var ngAr;\n for (var i = 0; i < length; i++) {\n /* istanbul ignore next */\n if (/_ngcontent/g.test(attributes[i].name)) {\n ngAr = attributes[i].name;\n }\n }\n return ngAr;\n };\n ;\n // tslint:disable-next-line:no-any\n ComponentBase.prototype.ngAfterViewInit = function (isTempRef) {\n // tslint:disable-next-line:no-any\n var tempAfterViewThis = isTempRef || this;\n var regExp = /ejs-tab|ejs-accordion/g;\n /* istanbul ignore next */\n if (regExp.test(tempAfterViewThis.ngEle.nativeElement.outerHTML)) {\n tempAfterViewThis.ngEle.nativeElement.style.visibility = 'hidden';\n }\n /**\n * Root level template properties are not getting rendered,\n * Due to ngonchanges not get triggered.\n * so that we have set template value for root level template properties,\n * for example: refer below syntax\n * ```html\n * <ejs-grid>\n * <e-column></e-column>\n * <ng-template #editSettingsTemplate></ng-template>\n * </ejs-grid>\n * ```\n */\n var templateProperties = Object.keys(tempAfterViewThis);\n templateProperties = templateProperties.filter(function (val) {\n return /Ref$/i.test(val);\n });\n for (var _i = 0, templateProperties_1 = templateProperties; _i < templateProperties_1.length; _i++) {\n var tempName = templateProperties_1[_i];\n var propName = tempName.replace('Ref', '');\n setValue(propName.replace('_', '.'), getValue(propName + 'Ref', tempAfterViewThis), tempAfterViewThis);\n }\n // Used setTimeout for template binding\n // Refer Link: https://github.com/angular/angular/issues/6005\n setTimeout(function () {\n /* istanbul ignore else */\n if (typeof window !== 'undefined' && document.body.contains(tempAfterViewThis.element) || tempAfterViewThis.getModuleName() === 'btn') {\n tempAfterViewThis.appendTo(tempAfterViewThis.element);\n tempAfterViewThis.ngEle.nativeElement.style.visibility = '';\n }\n });\n };\n // tslint:disable-next-line:no-any\n ComponentBase.prototype.ngOnDestroy = function (isTempRef) {\n // tslint:disable-next-line:no-any\n var tempOnDestroyThis = isTempRef || this;\n /* istanbul ignore else */\n setTimeout(function () {\n if (typeof window !== 'undefined' && (tempOnDestroyThis.element.classList.contains('e-control'))) {\n tempOnDestroyThis.destroy();\n tempOnDestroyThis.clearTemplate(null);\n // removing bounded events and tagobjects from component after destroy\n tempOnDestroyThis.ngBoundedEvents = {};\n tempOnDestroyThis.tagObjects = {};\n tempOnDestroyThis.ngEle = null;\n }\n });\n };\n //tslint:disable-next-line\n ComponentBase.prototype.clearTemplate = function (templateNames, index) {\n clearTemplate(this, templateNames, index);\n };\n ;\n // tslint:disable-next-line:no-any\n ComponentBase.prototype.ngAfterContentChecked = function (isTempRef) {\n // tslint:disable-next-line:no-any\n var tempAfterContentThis = isTempRef || this;\n for (var _i = 0, _a = tempAfterContentThis.tagObjects; _i < _a.length; _i++) {\n var tagObject = _a[_i];\n if (!isUndefined(tagObject.instance) &&\n (tagObject.instance.isInitChanges || tagObject.instance.hasChanges || tagObject.instance.hasNewChildren)) {\n if (tagObject.instance.isInitChanges) {\n var propObj = {};\n // For angular 9 compatibility\n // Not able to get complex directive properties reference ni Onint hook\n // So we have constructed property here and used\n var complexDirProps = void 0;\n var list = getValue('instance.list', tagObject);\n if (list && list.length) {\n complexDirProps = list[0].directivePropList;\n }\n var skip = true;\n if (tempAfterContentThis.getModuleName && tempAfterContentThis.getModuleName() === 'gantt') {\n skip = false;\n }\n if (complexDirProps && skip && complexDirProps.indexOf(tagObject.instance.propertyName) === -1) {\n var compDirPropList = Object.keys(tagObject.instance.list[0].propCollection);\n for (var h = 0; h < tagObject.instance.list.length; h++) {\n tagObject.instance.list[h].propCollection[tagObject.instance.propertyName] = [];\n var obj = {};\n for (var k = 0; k < compDirPropList.length; k++) {\n var complexPropName = compDirPropList[k];\n obj[complexPropName] = tagObject.instance.list[h].propCollection[complexPropName];\n }\n for (var i = 0; i < tagObject.instance.list[h].tags.length; i++) {\n var tag = tagObject.instance.list[h].tags[i];\n var childObj = getValue('child' + tag.substring(0, 1).toUpperCase() + tag.substring(1), tagObject.instance.list[h]);\n if (childObj) {\n var innerchildObj = tagObject.instance.list[h]['child' + tag.substring(0, 1).toUpperCase() + tag.substring(1)];\n if (innerchildObj) {\n for (var j = 0; j < innerchildObj.list.length; j++) {\n var innerTag = innerchildObj.list[0].tags[0];\n if (innerTag) {\n var innerchildTag = getValue('child' + innerTag.substring(0, 1).toUpperCase() + innerTag.substring(1), innerchildObj.list[j]);\n if (innerchildTag) {\n innerchildObj.list[j].tagObjects.push({ instance: innerchildTag, name: innerTag });\n }\n }\n }\n }\n tagObject.instance.list[h].tagObjects.push({ instance: childObj, name: tag });\n }\n }\n tagObject.instance.list[h].propCollection[tagObject.instance.propertyName].push(obj);\n }\n }\n // End angular 9 compatibility\n propObj[tagObject.name] = tagObject.instance.getProperties();\n tempAfterContentThis.setProperties(propObj, tagObject.instance.isInitChanges);\n }\n else {\n /* istanbul ignore next */\n if ((tempAfterContentThis[tagObject.name].length !== tagObject.instance.list.length) || (tempAfterContentThis.getModuleName() === 'diagram')) {\n tempAfterContentThis[tagObject.name] = tagObject.instance.list;\n }\n for (var _b = 0, _c = tagObject.instance.list; _b < _c.length; _b++) {\n var list = _c[_b];\n var curIndex = tagObject.instance.list.indexOf(list);\n var curChild = getValue(tagObject.name, tempAfterContentThis)[curIndex];\n var complexTemplates = Object.keys(curChild);\n complexTemplates = complexTemplates.filter(function (val) {\n return /Ref$/i.test(val);\n });\n if (curChild.properties && Object.keys(curChild.properties).length !== 0 && /chart/.test(tempAfterContentThis.getModuleName())) {\n for (var _d = 0, complexTemplates_2 = complexTemplates; _d < complexTemplates_2.length; _d++) {\n var complexPropName = complexTemplates_2[_d];\n complexPropName = complexPropName.replace(/Ref/, '');\n curChild.properties[complexPropName] = !curChild.properties[complexPropName] ?\n curChild.propCollection[complexPropName] : curChild.properties[complexPropName];\n }\n }\n if (!isUndefined(curChild) && !isUndefined(curChild.setProperties)) {\n if (/diagram|DashboardLayout/.test(tempAfterContentThis.getModuleName())) {\n curChild.setProperties(list.getProperties(), true);\n }\n else {\n curChild.setProperties(list.getProperties());\n }\n }\n list.isUpdated = true;\n }\n }\n }\n }\n };\n ComponentBase.prototype.registerEvents = function (eventList) {\n registerEvents(eventList, this);\n };\n ComponentBase.prototype.twoWaySetter = function (newVal, prop) {\n var oldVal = getValue(prop, this.properties);\n if (oldVal === newVal) {\n return;\n }\n this.saveChanges(prop, newVal, oldVal);\n setValue(prop, (isNullOrUndefined(newVal) ? null : newVal), this.properties);\n getValue(prop + 'Change', this).emit(newVal);\n };\n ComponentBase.prototype.addTwoWay = function (propList) {\n var _this = this;\n var _loop_1 = function (prop) {\n getValue(prop, this_1);\n Object.defineProperty(this_1, prop, {\n get: function () {\n return getValue(prop, _this.properties);\n },\n set: function (newVal) { return _this.twoWaySetter(newVal, prop); }\n });\n setValue(prop + 'Change', new EventEmitter(), this_1);\n };\n var this_1 = this;\n for (var _i = 0, propList_1 = propList; _i < propList_1.length; _i++) {\n var prop = propList_1[_i];\n _loop_1(prop);\n }\n };\n ComponentBase.prototype.addEventListener = function (eventName, handler) {\n var eventObj = getValue(eventName, this);\n if (!isUndefined(eventObj)) {\n if (!this.ngBoundedEvents[eventName]) {\n this.ngBoundedEvents[eventName] = new Map();\n }\n this.ngBoundedEvents[eventName].set(handler, eventObj.subscribe(handler));\n }\n };\n ComponentBase.prototype.removeEventListener = function (eventName, handler) {\n var eventObj = getValue(eventName, this);\n if (!isUndefined(eventObj)) {\n this.ngBoundedEvents[eventName].get(handler).unsubscribe();\n }\n };\n ComponentBase.prototype.trigger = function (eventName, eventArgs, success) {\n var eventObj = getValue(eventName, this);\n var prevDetection = this.isProtectedOnChange;\n this.isProtectedOnChange = false;\n if (eventArgs) {\n eventArgs.name = eventName;\n }\n if (!isUndefined(eventObj)) {\n eventObj.next(eventArgs);\n }\n var localEventObj = getValue('local' + eventName.charAt(0).toUpperCase() + eventName.slice(1), this);\n if (!isUndefined(localEventObj)) {\n localEventObj.call(this, eventArgs);\n }\n this.isProtectedOnChange = prevDetection;\n /* istanbul ignore else */\n if (success) {\n this.preventChange = this.isPreventChange;\n success.call(this, eventArgs);\n }\n this.isPreventChange = false;\n };\n return ComponentBase;\n}());\nexport { ComponentBase };\n","import { getValue, setValue, isNullOrUndefined, isObject } from '@syncfusion/ej2-base';\n/**\n * Angular Form Base Module\n */\nvar FormBase = /** @class */ (function () {\n function FormBase() {\n }\n FormBase.prototype.propagateChange = function (_) { return; };\n FormBase.prototype.propagateTouch = function () { return; };\n FormBase.prototype.localChange = function (e) {\n //tslint:disable-next-line\n var value = (e.checked === undefined ? e.value : e.checked);\n this.objCheck = isObject(value);\n if (this.isUpdated === true) {\n this.angularValue = this.oldValue;\n }\n if (this.objCheck === true) {\n this.duplicateValue = JSON.stringify(value);\n this.duplicateAngularValue = JSON.stringify(this.angularValue);\n if (this.duplicateValue !== this.duplicateAngularValue && this.propagateChange !== undefined && value !== undefined) {\n // Update angular from our control\n this.propagateChange(value);\n this.angularValue = value;\n }\n }\n else {\n if (value !== this.angularValue && this.propagateChange !== undefined && value !== undefined) {\n // While reset form using reset() method ng-dirty not get updated, so while value is empty just update angularValue only\n if (value !== '' && value !== null) {\n // Update angular from our control\n this.propagateChange(value);\n this.angularValue = value;\n }\n else {\n //tslint:disable-next-line\n var optionalValue = value;\n this.propagateChange(optionalValue);\n this.angularValue = value;\n }\n }\n }\n };\n FormBase.prototype.registerOnChange = function (registerFunction) {\n this.propagateChange = registerFunction;\n };\n FormBase.prototype.registerOnTouched = function (registerFunction) {\n this.propagateTouch = registerFunction;\n };\n FormBase.prototype.twoWaySetter = function (newVal, prop) {\n var oldVal = this.oldValue || getValue(prop, this.properties);\n var ele = this.inputElement || this.element;\n if (ele && oldVal === newVal && this.value === newVal &&\n (ele.value === undefined || ele.value === '')) {\n return;\n }\n this.saveChanges(prop, newVal, oldVal);\n setValue(prop, (isNullOrUndefined(newVal) ? null : newVal), this.properties);\n getValue(prop + 'Change', this).emit(newVal);\n };\n // tslint:disable-next-line:no-any\n FormBase.prototype.ngAfterViewInit = function (isTempRef) {\n // tslint:disable-next-line:no-any\n var tempFormAfterViewThis = isTempRef || this;\n // Used setTimeout for template binding\n // Refer Link: https://github.com/angular/angular/issues/6005\n // Removed setTimeout, Because we have called markForCheck() method in Angular Template Compiler\n // setTimeout(() => {\n /* istanbul ignore else */\n if (typeof window !== 'undefined') {\n tempFormAfterViewThis.appendTo(tempFormAfterViewThis.element);\n var ele = tempFormAfterViewThis.inputElement || tempFormAfterViewThis.element;\n ele.addEventListener('focus', tempFormAfterViewThis.ngOnFocus.bind(tempFormAfterViewThis));\n ele.addEventListener('blur', tempFormAfterViewThis.ngOnBlur.bind(tempFormAfterViewThis));\n }\n this.isFormInit = false;\n // });\n };\n FormBase.prototype.setDisabledState = function (disabled) {\n this.enabled = !disabled;\n this.disabled = disabled;\n };\n FormBase.prototype.writeValue = function (value) {\n var regExp = /ejs-radiobutton/g;\n //update control value from angular\n if (this.checked === undefined) {\n this.value = value;\n }\n else {\n // To resolve boolean type formControl value is not working for radio button control.\n /* istanbul ignore next */\n if (this.ngEle) {\n if (typeof value === 'boolean') {\n if (regExp.test(this.ngEle.nativeElement.outerHTML)) {\n this.checked = value === this.value;\n }\n else {\n this.checked = value;\n }\n }\n else {\n this.checked = value === this.value;\n }\n }\n }\n this.angularValue = value;\n this.isUpdated = true;\n // When binding Html textbox value to syncfusion textbox, change event triggered dynamically.\n // To prevent change event, trigger change in component side based on `preventChange` value\n this.preventChange = this.isFormInit ? false : true;\n if (value === null) {\n return;\n }\n };\n FormBase.prototype.ngOnFocus = function (e) {\n /* istanbul ignore else */\n if (this.skipFromEvent !== true) {\n this.focus.emit(e);\n }\n };\n FormBase.prototype.ngOnBlur = function (e) {\n this.propagateTouch();\n /* istanbul ignore else */\n if (this.skipFromEvent !== true) {\n this.blur.emit(e);\n }\n };\n FormBase.isFormBase = true;\n return FormBase;\n}());\nexport { FormBase };\n"],"names":["applyMixins","derivedClass","baseClass","forEach","Object","getOwnPropertyNames","prototype","name","hasOwnProperty","isFormBase","registerEvents","eventList","obj","direct","ngEventsEmitter","length","_i","eventList_1","event_1","propCollection","EventEmitter","setProperties","clearTemplate","_this","templateNames","index","regTemplates","keys","registeredTemplate","regProperties","filter","val","test","_a","e","m","template","rootNodes","rt","destroy","_b","_c","destroyed","_view","pNode","renderer","parentNode","isNullOrUndefined","appendChild","_loop_1","tagObject","instance","RegExp","_d","_e","tagObjects","compile","templateEle","helper","stringCompiler","contRef_1","elementRef","nativeElement","_viewContainerRef","pName_1","propName","data","component","context","$implicit","conRef","viewContainerRef","viewRef","createEmbeddedView","markForCheck","viewCollection","getValue","push","refRegex","ComplexBase","this","hasChanges","dataSource","tags","ngOnInit","tag","objInstance","substring","toUpperCase","templateProperties","i","tempProp","indexOf","setValue","templateProperties_1","replace","propList","directivePropList","k","dirPropName","isInitChanges","ngOnChanges","changes","changedVal","currentValue","isUpdated","getProperties","isChanged","result","property","tempProps","props","d","propVal","item","ngAfterContentChecked","templateProperties_2","ngAfterViewChecked","ngAfterViewInit","ngOnDestroy","ArrayBase","propertyName","list","ngAfterContentInit","children","map","child","dirIndex","onlyProp","isSourceChanged","childrenDataSource","JSON","stringify","hasNewChildren","ComponentBase","isProtectedOnChange","isFormInit","saveChanges","key","newValue","oldValue","oldProperties","changedProperties","finalUpdate","changeTime","setTimeout","dataBind","bind","clearTimeout","isTempRef","tempOnThis","ngBoundedEvents","isAngular","complexTemplate","ngAttr","getAngularAttr","element","createElement","tagName","prop","ele","srenderer","innerHTML","undefined","className","id","styles","setAttribute","attrs","attributes","complexTemplates","complexTemplates_1","ngAr","tempAfterViewThis","ngEle","outerHTML","style","visibility","window","document","body","contains","getModuleName","appendTo","tempOnDestroyThis","classList","tempAfterContentThis","isUndefined","propObj","complexDirProps","skip","compDirPropList","h","complexPropName","childObj","innerchildObj","j","innerTag","innerchildTag","curIndex","curChild","properties","complexTemplates_2","twoWaySetter","newVal","oldVal","emit","addTwoWay","this_1","defineProperty","get","set","propList_1","addEventListener","eventName","handler","eventObj","Map","subscribe","removeEventListener","unsubscribe","trigger","eventArgs","success","prevDetection","next","localEventObj","charAt","slice","call","preventChange","isPreventChange","FormBase","propagateChange","_","propagateTouch","localChange","value","checked","objCheck","isObject","angularValue","duplicateValue","duplicateAngularValue","optionalValue","registerOnChange","registerFunction","registerOnTouched","inputElement","tempFormAfterViewThis","ngOnFocus","ngOnBlur","setDisabledState","disabled","enabled","writeValue","skipFromEvent","focus","blur","getTemplateEngine","setTemplateEngine","nameSpace","object","split","fromObj","defaultValue","target","propertyD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3O,EAAO0O,EAAUtK,QAAQ,MAAO,KAAKA,QAAQ,MAAO,IAAIwK,MAAM,KAE9DC,EAAUF,MACL5K,EAAI,EAAGA,EAAI/D,EAAKZ,OAAQ2E,IAAK,CAClC,IAAIgD,EAAM/G,EAAK+D,GACXA,EAAI,IAAM/D,EAAKZ,OACfyP,EAAQ9H,QAAiByB,IAAV0E,KAA2BA,OAEpB1E,IAAjBqG,EAAQ9H,KACb8H,EAAQ9H,OAEZ8H,EAAUA,EAAQ9H,GAEtB,OAAO8H,0BCvFX,SAAyBC,GACrB,OAAO,SAAUC,EAAQhI,GACrB,IAAIiI,GACAxD,IAQZ,SAAgBzE,GACZ,OAAO,SAAU3G,QACDoI,IAARpI,IAGJ8D,WAAS6C,EAAM,MAAO3G,EAAKiD,MACR,iBAARjD,GACPA,EAAI8B,WAAWC,cAAcC,kBAAoBiB,KAAKT,iBACtDxC,EAAI8B,WAAWC,cAAcG,SAAWyE,GAGpC1D,KAAKyD,cACLzD,KAAKyD,YAAYC,EAAK3G,OAAKoI,GAC3BnF,KAAKkE,cArBJ0H,CAAOlI,GACZwE,IAyBZ,SAAgBxE,EAAK+H,GACjB,OAAO,WAEH,OAAO7L,WAAS8D,EAAM,MAAO1D,OAASyL,GA5B7BI,CAAOnI,EAAK+H,GACjBK,YAAY,EACZC,cAAc,GAElB3Q,OAAO6M,eAAeyD,EAAQhI,EAAKiI"}
1
+ {"version":3,"file":"ej2-angular-base.umd.min.js","sources":["../src/util.js","../src/template.js","../src/complex-array-base.js","../src/component-base.js","../src/form-base.js"],"sourcesContent":["import { EventEmitter } from '@angular/core';\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\n/**\n * Angular Utility Module\n */\n/* tslint:disable */\nexport function applyMixins(derivedClass, baseClass) {\n baseClass.forEach(function (baseClass) {\n Object.getOwnPropertyNames(baseClass.prototype).forEach(function (name) {\n if (!derivedClass.prototype.hasOwnProperty(name) || (baseClass.isFormBase && name !== 'constructor')) {\n derivedClass.prototype[name] = baseClass.prototype[name];\n }\n });\n });\n}\n/* tslint:disable */\nexport function ComponentMixins(baseClass) {\n return function (derivedClass) {\n applyMixins(derivedClass, baseClass);\n };\n}\n/**\n * @private\n */\nexport function registerEvents(eventList, obj, direct) {\n var ngEventsEmitter = {};\n if (eventList && eventList.length) {\n for (var _i = 0, eventList_1 = eventList; _i < eventList_1.length; _i++) {\n var event_1 = eventList_1[_i];\n if (direct === true) {\n obj.propCollection[event_1] = new EventEmitter(false);\n obj[event_1] = obj.propCollection[event_1];\n }\n else {\n ngEventsEmitter[event_1] = new EventEmitter(false);\n }\n }\n if (direct !== true) {\n obj.setProperties(ngEventsEmitter, true);\n }\n }\n}\n/**\n * @private\n */\nexport function clearTemplate(_this, templateNames, index) {\n var regTemplates = Object.keys(_this.registeredTemplate);\n if (regTemplates.length) {\n /* istanbul ignore next */\n var regProperties = templateNames && templateNames.filter(function (val) {\n return (/\\./g.test(val) ? false : true);\n });\n var tabaccordionTemp = /tab|accordion|toolbar/.test(_this.getModuleName());\n for (var _i = 0, _a = (regProperties && regProperties || regTemplates); _i < _a.length; _i++) {\n var registeredTemplate = _a[_i];\n /* istanbul ignore next */\n if (index && index.length) {\n for (var e = 0; e < index.length; e++) {\n if (tabaccordionTemp) {\n for (var m = 0; m < _this.registeredTemplate[registeredTemplate].length; m++) {\n var value = _this.registeredTemplate[registeredTemplate][m];\n if (value && value === index[e]) {\n value.destroy();\n _this.registeredTemplate[registeredTemplate].splice(m, 1);\n }\n }\n }\n else {\n for (var m = 0; m < _this.registeredTemplate.template.length; m++) {\n var value = _this.registeredTemplate.template[m].rootNodes[0];\n if (value === index[e]) {\n var rt = _this.registeredTemplate[registeredTemplate];\n rt[m].destroy();\n }\n }\n }\n }\n }\n else {\n if (_this.registeredTemplate[registeredTemplate]) {\n for (var _b = 0, _c = _this.registeredTemplate[registeredTemplate]; _b < _c.length; _b++) {\n var rt = _c[_b];\n if (!rt.destroyed) {\n if (rt._view) {\n var pNode = rt._view.renderer.parentNode(rt.rootNodes[0]);\n if (!isNullOrUndefined(pNode)) {\n for (var m = 0; m < rt.rootNodes.length; m++) {\n pNode.appendChild(rt.rootNodes[m]);\n }\n }\n }\n rt.destroy();\n }\n }\n }\n }\n if (!tabaccordionTemp || !index) {\n delete _this.registeredTemplate[registeredTemplate];\n }\n }\n }\n var _loop_1 = function (tagObject) {\n if (tagObject.instance) {\n /* istanbul ignore next */\n tagObject.instance.clearTemplate((templateNames && templateNames.filter(function (val) {\n return (new RegExp(tagObject.name).test(val) ? true : false);\n })));\n }\n };\n for (var _d = 0, _e = _this.tagObjects; _d < _e.length; _d++) {\n var tagObject = _e[_d];\n _loop_1(tagObject);\n }\n}\n/**\n * To set value for the nameSpace in desired object.\n * @param {string} nameSpace - String value to the get the inner object\n * @param {any} value - Value that you need to set.\n * @param {any} obj - Object to get the inner object value.\n * @return {void}\n * @private\n */\nexport function setValue(nameSpace, value, object) {\n var keys = nameSpace.replace(/\\[/g, '.').replace(/\\]/g, '').split('.');\n /* istanbul ignore next */\n var fromObj = object || {};\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (i + 1 === keys.length) {\n fromObj[key] = value === undefined ? {} : value;\n }\n else if (fromObj[key] === undefined) {\n fromObj[key] = {};\n }\n fromObj = fromObj[key];\n }\n return fromObj;\n}\n","import { setTemplateEngine, getTemplateEngine } from '@syncfusion/ej2-base';\nimport { setValue, getValue } from '@syncfusion/ej2-base';\nvar stringCompiler = getTemplateEngine();\n/**\n * Angular Template Compiler\n */\nexport function compile(templateEle, helper) {\n if (typeof templateEle === 'string' || (typeof templateEle === 'function' && templateEle.prototype && templateEle.prototype.CSPTemplate)) {\n return stringCompiler(templateEle, helper);\n }\n else {\n var contRef_1 = templateEle.elementRef.nativeElement._viewContainerRef;\n var pName_1 = templateEle.elementRef.nativeElement.propName;\n //tslint:disable-next-line \n return function (data, component, propName) {\n var context = { $implicit: data };\n /* istanbul ignore next */\n var conRef = contRef_1 ? contRef_1 : component.viewContainerRef;\n var viewRef = conRef.createEmbeddedView(templateEle, context);\n if (getValue('currentInstance.element.nodeName', conRef) === 'EJS-MENTION') {\n viewRef.detectChanges();\n }\n else {\n viewRef.markForCheck();\n }\n /* istanbul ignore next */\n var viewCollection = (component && component.registeredTemplate) ?\n component.registeredTemplate : getValue('currentInstance.registeredTemplate', conRef);\n propName = (propName && component.registeredTemplate) ? propName : pName_1;\n if (typeof viewCollection[propName] === 'undefined') {\n viewCollection[propName] = [];\n }\n viewCollection[propName].push(viewRef);\n return viewRef.rootNodes;\n };\n }\n}\n/**\n * Property decorator for angular.\n */\nexport function Template(defaultValue) {\n return function (target, key) {\n var propertyDescriptor = {\n set: setter(key),\n get: getter(key, defaultValue),\n enumerable: true,\n configurable: true\n };\n Object.defineProperty(target, key, propertyDescriptor);\n };\n}\nfunction setter(key) {\n return function (val) {\n if (val === undefined) {\n return;\n }\n setValue(key + 'Ref', val, this);\n if (typeof val !== 'string') {\n val.elementRef.nativeElement._viewContainerRef = this.viewContainerRef;\n val.elementRef.nativeElement.propName = key;\n }\n else {\n if (this.saveChanges) {\n this.saveChanges(key, val, undefined);\n this.dataBind();\n }\n }\n };\n}\nfunction getter(key, defaultValue) {\n return function () {\n /* istanbul ignore next */\n return getValue(key + 'Ref', this) || defaultValue;\n };\n}\n//tslint:disable-next-line\nsetTemplateEngine({ compile: compile });\n","import { getValue, setValue, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { clearTemplate, registerEvents } from './util';\nvar refRegex = /Ref$/;\nvar ComplexBase = /** @class */ (function () {\n function ComplexBase() {\n this.hasChanges = false;\n this.propCollection = {};\n this.dataSource = {};\n this.tags = [];\n this.tagObjects = [];\n }\n ComplexBase.prototype.ngOnInit = function () {\n this.registeredTemplate = {};\n for (var _i = 0, _a = this.tags; _i < _a.length; _i++) {\n var tag = _a[_i];\n var objInstance = getValue('child' + tag.substring(0, 1).toUpperCase() + tag.substring(1), this);\n if (objInstance) {\n this.tagObjects.push({ instance: objInstance, name: tag });\n }\n }\n var templateProperties = Object.keys(this);\n for (var i = 0; i < templateProperties.length; i++) {\n var tempProp = getValue(templateProperties[i], this);\n if (typeof tempProp === 'object' && tempProp && tempProp.elementRef) {\n if (!getValue(templateProperties[i].indexOf('Ref') !== -1 ? templateProperties[i] : templateProperties[i] + 'Ref', this)) {\n setValue(templateProperties[i].indexOf('Ref') !== -1 ? templateProperties[i] : templateProperties[i] + 'Ref', tempProp, this);\n }\n if (getValue(\"viewContainerRef\", this) && !getValue(\"_viewContainerRef\", tempProp.elementRef.nativeElement) && !getValue(\"propName\", tempProp.elementRef.nativeElement)) {\n setValue(\"_viewContainerRef\", getValue(\"viewContainerRef\", this), tempProp.elementRef.nativeElement);\n setValue(\"propName\", templateProperties[i].replace(\"Ref\", ''), tempProp.elementRef.nativeElement);\n }\n }\n }\n templateProperties = Object.keys(this);\n templateProperties = templateProperties.filter(function (val) {\n return /Ref$/i.test(val);\n });\n for (var _b = 0, templateProperties_1 = templateProperties; _b < templateProperties_1.length; _b++) {\n var tempName = templateProperties_1[_b];\n var propName = tempName.replace('Ref', '');\n setValue(propName.replace('_', '.'), getValue(propName, this), this.propCollection);\n }\n // Angular 9 compatibility to overcome ngOnchange not get triggered issue\n // To Update properties to \"this.propCollection\"\n var propList = Object.keys(this);\n /* istanbul ignore next */\n if (this.directivePropList) {\n for (var k = 0; k < this.directivePropList.length; k++) {\n var dirPropName = this.directivePropList[k];\n if (propList.indexOf(dirPropName) !== -1 && (getValue(dirPropName, this) === false || getValue(dirPropName, this))) {\n setValue(dirPropName, getValue(dirPropName, this), this.propCollection);\n }\n }\n this.hasChanges = true;\n }\n this.isInitChanges = true;\n };\n ComplexBase.prototype.registerEvents = function (eventList) {\n registerEvents(eventList, this, true);\n };\n ComplexBase.prototype.ngOnChanges = function (changes) {\n for (var _i = 0, _a = Object.keys(changes); _i < _a.length; _i++) {\n var propName = _a[_i];\n var changedVal = changes[propName];\n this.propCollection[propName] = changedVal.currentValue;\n }\n this.isUpdated = false;\n this.hasChanges = true;\n };\n /* istanbul ignore next */\n ComplexBase.prototype.clearTemplate = function (templateNames) {\n clearTemplate(this, templateNames);\n };\n ComplexBase.prototype.getProperties = function () {\n /* istanbul ignore next */\n for (var _i = 0, _a = this.tagObjects; _i < _a.length; _i++) {\n var tagObject = _a[_i];\n this.propCollection[tagObject.name] = tagObject.instance.getProperties();\n }\n return this.propCollection;\n };\n ComplexBase.prototype.isChanged = function () {\n var result = this.hasChanges;\n if (!isNullOrUndefined(this.propCollection[this.property])) {\n var tempProps = this.propCollection[this.property];\n var props = Object.keys(tempProps[0]);\n for (var d = 0; d < props.length; d++) {\n if (!isNullOrUndefined(this.propCollection[props[d]])) {\n var val = getValue(props[d], this);\n var propVal = this.propCollection[this.property][0][props[d]];\n if (!isNullOrUndefined(val) && this.propCollection[props[d]] !== val\n && propVal !== val) {\n setValue(props[d], val, this.propCollection[this.property][0]);\n setValue(props[d], val, this.propCollection);\n this.hasChanges = true;\n this.isUpdated = false;\n }\n }\n }\n }\n /* istanbul ignore next */\n for (var _i = 0, _a = this.tagObjects; _i < _a.length; _i++) {\n var item = _a[_i];\n result = result || item.instance.hasChanges;\n }\n return result || this.hasChanges;\n };\n ComplexBase.prototype.ngAfterContentChecked = function () {\n this.hasChanges = this.isChanged();\n if (this.isInitChanges || this.hasChanges) {\n var templateProperties = Object.keys(this);\n templateProperties = templateProperties.filter(function (val) {\n return refRegex.test(val);\n });\n for (var _i = 0, templateProperties_2 = templateProperties; _i < templateProperties_2.length; _i++) {\n var tempName = templateProperties_2[_i];\n var propName = tempName.replace('Ref', '');\n setValue(propName.replace('_', '.'), getValue(propName, this), this.propCollection);\n }\n }\n };\n ComplexBase.prototype.ngAfterViewChecked = function () {\n /* istanbul ignore next */\n if (this.isUpdated) {\n this.hasChanges = false;\n }\n };\n ComplexBase.prototype.ngAfterViewInit = function () {\n /* istanbul ignore next */\n this.isInitChanges = false;\n };\n ComplexBase.prototype.ngOnDestroy = function () {\n /* istanbul ignore next */\n this.directivePropList = [];\n };\n return ComplexBase;\n}());\nexport { ComplexBase };\nvar ArrayBase = /** @class */ (function () {\n function ArrayBase(propertyName) {\n this.list = [];\n this.hasChanges = false;\n this.propertyName = propertyName;\n }\n ArrayBase.prototype.ngOnInit = function () {\n this.isInitChanges = true;\n };\n ArrayBase.prototype.ngAfterContentInit = function () {\n var _this = this;\n var index = 0;\n /* istanbul ignore next */\n this.list = this.children.map(function (child) {\n child.dirIndex = index++;\n child.property = _this.propertyName;\n return child;\n });\n this.hasChanges = true;\n };\n ArrayBase.prototype.getProperties = function () {\n var onlyProp = [];\n for (var _i = 0, _a = this.list; _i < _a.length; _i++) {\n var item = _a[_i];\n onlyProp.push(item.getProperties());\n }\n return onlyProp;\n };\n ArrayBase.prototype.isChanged = function () {\n var _this = this;\n var result = false;\n var index = 0;\n var isSourceChanged = false;\n // tslint:disable-next-line\n var childrenDataSource = this.children.map(function (child) {\n return child;\n });\n /* istanbul ignore next */\n if (this.list.length === this.children.length) {\n for (var i = 0; i < this.list.length; i++) {\n if (this.list[i].propCollection.dataSource) {\n if (this.list[i].dataSource && this.list[i].propCollection.dataSource !== this.list[i].dataSource) {\n this.list[i].propCollection.dataSource = this.list[i].dataSource;\n this.list[i].hasChanges = true;\n }\n if (this.list[i].property !== \"series\") {\n isSourceChanged = (JSON.stringify(this.list[i].propCollection.dataSource) !==\n JSON.stringify(childrenDataSource[i].propCollection.dataSource));\n }\n }\n isSourceChanged = this.list[i].hasChanges !== childrenDataSource[i].hasChanges;\n }\n }\n this.hasNewChildren = (this.list.length !== this.children.length || isSourceChanged) ? true : null;\n if (this.hasNewChildren) {\n this.list = this.children.map(function (child) {\n child.dirIndex = index++;\n child.property = _this.propertyName;\n return child;\n });\n }\n /* istanbul ignore end */\n for (var _i = 0, _a = this.list; _i < _a.length; _i++) {\n var item = _a[_i];\n result = result || item.hasChanges;\n }\n return !!this.list.length && result;\n };\n ArrayBase.prototype.clearTemplate = function (templateNames) {\n var _this = this;\n /* istanbul ignore next */\n for (var _i = 0, _a = this.list; _i < _a.length; _i++) {\n var item = _a[_i];\n item.clearTemplate(templateNames && templateNames.map(function (val) {\n return new RegExp(_this.propertyName).test(val) ? val.replace(_this.propertyName + '.', '') : val;\n }));\n }\n };\n ArrayBase.prototype.ngAfterContentChecked = function () {\n this.hasChanges = this.isChanged();\n for (var i = 0; i < this.list.length; i++) {\n if (getValue('childColumns', this.list[i]) && getValue('property', this.list[i]) === 'columns') {\n setValue('columns', getValue('childColumns', this.list[i]).getProperties(), this.list[i].propCollection);\n }\n this.list[i].isUpdated = true;\n }\n };\n ArrayBase.prototype.ngAfterViewInit = function () {\n this.isInitChanges = false;\n };\n ArrayBase.prototype.ngOnDestroy = function () {\n this.list = [];\n };\n return ArrayBase;\n}());\nexport { ArrayBase };\n","/**\n * Angular Component Base Module\n */\nimport { getValue, isUndefined, setValue, isNullOrUndefined, attributes, createElement } from '@syncfusion/ej2-base';\nimport { EventEmitter } from '@angular/core';\nimport { clearTemplate, registerEvents } from './util';\nvar SVG_REG = /^svg|^path|^g/;\nvar ComponentBase = /** @class */ (function () {\n function ComponentBase() {\n this.isProtectedOnChange = true;\n this.isFormInit = true;\n }\n ComponentBase.prototype.saveChanges = function (key, newValue, oldValue) {\n if (this.isProtectedOnChange) {\n return;\n }\n this.oldProperties[key] = oldValue;\n this.changedProperties[key] = newValue;\n this.finalUpdate();\n // tslint:disable-next-line:no-any\n var changeTime = setTimeout(this.dataBind.bind(this));\n var clearUpdate = function () {\n clearTimeout(changeTime);\n };\n this.finalUpdate = clearUpdate;\n };\n ;\n // tslint:disable-next-line:no-any\n ComponentBase.prototype.ngOnInit = function (isTempRef) {\n // tslint:disable-next-line:no-any\n var tempOnThis = isTempRef || this;\n tempOnThis.registeredTemplate = {};\n tempOnThis.ngBoundedEvents = {};\n tempOnThis.isAngular = true;\n tempOnThis.isFormInit = true;\n /* istanbul ignore next */\n if (isTempRef) {\n this.tags = isTempRef.tags;\n }\n tempOnThis.tags = this.tags || [];\n tempOnThis.complexTemplate = this.complexTemplate || [];\n tempOnThis.tagObjects = [];\n tempOnThis.ngAttr = this.getAngularAttr(tempOnThis.element);\n /* istanbul ignore next */\n tempOnThis.createElement = function (tagName, prop) {\n //tslint:disable-next-line\n var ele = tempOnThis.srenderer ? tempOnThis.srenderer.createElement(tagName) : createElement(tagName);\n if (typeof (prop) === 'undefined') {\n return ele;\n }\n ele.innerHTML = (prop.innerHTML ? prop.innerHTML : '');\n if (prop.className !== undefined) {\n ele.className = prop.className;\n }\n if (prop.id !== undefined) {\n ele.id = prop.id;\n }\n if (prop.styles !== undefined) {\n ele.setAttribute('style', prop.styles);\n }\n if (tempOnThis.ngAttr !== undefined) {\n ele.setAttribute(tempOnThis.ngAttr, '');\n }\n if (prop.attrs !== undefined) {\n attributes(ele, prop.attrs);\n }\n return ele;\n };\n for (var _i = 0, _a = tempOnThis.tags; _i < _a.length; _i++) {\n var tag = _a[_i];\n var tagObject = {\n instance: getValue('child' + tag.substring(0, 1).toUpperCase() + tag.substring(1), tempOnThis),\n name: tag\n };\n tempOnThis.tagObjects.push(tagObject);\n }\n var complexTemplates = Object.keys(tempOnThis);\n for (var i = 0; i < complexTemplates.length; i++) {\n var compProp = getValue(complexTemplates[i], tempOnThis);\n if (typeof compProp === 'object' && compProp && compProp.elementRef) {\n if (typeof compProp === 'object' && compProp && compProp.elementRef && complexTemplates[i].indexOf('_') !== -1 && complexTemplates[i].indexOf('Ref') === -1) {\n setValue(complexTemplates[i] + 'Ref', compProp, tempOnThis);\n }\n if (tempOnThis.viewContainerRef && !getValue(\"_viewContainerRef\", compProp.elementRef.nativeElement) && !getValue(\"propName\", compProp.elementRef.nativeElement)) {\n setValue(\"_viewContainerRef\", tempOnThis.viewContainerRef, compProp.elementRef.nativeElement);\n setValue(\"propName\", complexTemplates[i].replace(\"Ref\", ''), compProp.elementRef.nativeElement);\n }\n }\n }\n complexTemplates = Object.keys(tempOnThis);\n complexTemplates = complexTemplates.filter(function (val) {\n return /Ref$/i.test(val) && /\\_/i.test(val);\n });\n for (var _b = 0, complexTemplates_1 = complexTemplates; _b < complexTemplates_1.length; _b++) {\n var tempName = complexTemplates_1[_b];\n var propName = tempName.replace('Ref', '');\n var val = {};\n setValue(propName.replace('_', '.'), getValue(propName, tempOnThis), val);\n tempOnThis.setProperties(val, true);\n }\n };\n ComponentBase.prototype.getAngularAttr = function (ele) {\n var attributes = ele.attributes;\n var length = attributes.length;\n var ngAr;\n for (var i = 0; i < length; i++) {\n /* istanbul ignore next */\n if (/_ngcontent/g.test(attributes[i].name)) {\n ngAr = attributes[i].name;\n }\n }\n return ngAr;\n };\n ;\n // tslint:disable-next-line:no-any\n ComponentBase.prototype.ngAfterViewInit = function (isTempRef) {\n // tslint:disable-next-line:no-any\n var tempAfterViewThis = isTempRef || this;\n var regExp = /ejs-tab|ejs-accordion/g;\n /* istanbul ignore next */\n if (regExp.test(tempAfterViewThis.ngEle.nativeElement.outerHTML)) {\n tempAfterViewThis.ngEle.nativeElement.style.visibility = 'hidden';\n }\n /**\n * Root level template properties are not getting rendered,\n * Due to ngonchanges not get triggered.\n * so that we have set template value for root level template properties,\n * for example: refer below syntax\n * ```html\n * <ejs-grid>\n * <e-column></e-column>\n * <ng-template #editSettingsTemplate></ng-template>\n * </ejs-grid>\n * ```\n */\n var templateProperties = Object.keys(tempAfterViewThis);\n templateProperties = templateProperties.filter(function (val) {\n return /Ref$/i.test(val);\n });\n var ngtempRef = tempAfterViewThis.getModuleName() === 'DocumentEditor';\n for (var _i = 0, templateProperties_1 = templateProperties; _i < templateProperties_1.length; _i++) {\n var tempName = templateProperties_1[_i];\n var propName = tempName.replace('Ref', '');\n setValue(propName.replace('_', '.'), getValue(propName + 'Ref', tempAfterViewThis), tempAfterViewThis);\n }\n // Used setTimeout for template binding\n // Refer Link: https://github.com/angular/angular/issues/6005\n var appendToComponent = function (tempAfterViewThis) {\n /* istanbul ignore else */\n if (typeof window !== 'undefined' && tempAfterViewThis.element || tempAfterViewThis.getModuleName().includes('btn')) {\n tempAfterViewThis.appendTo(tempAfterViewThis.element);\n tempAfterViewThis.ngEle.nativeElement.style.visibility = '';\n }\n };\n if (!ngtempRef) {\n setTimeout(function () {\n appendToComponent(tempAfterViewThis);\n });\n }\n else {\n appendToComponent(tempAfterViewThis);\n }\n };\n // tslint:disable-next-line:no-any\n ComponentBase.prototype.ngOnDestroy = function (isTempRef) {\n // tslint:disable-next-line:no-any\n var tempOnDestroyThis = isTempRef || this;\n /* istanbul ignore else */\n setTimeout(function () {\n if (typeof window !== 'undefined' && (tempOnDestroyThis.element.classList.contains('e-control'))) {\n tempOnDestroyThis.destroy();\n tempOnDestroyThis.clearTemplate(null);\n // removing bounded events and tagobjects from component after destroy\n setTimeout(function () {\n for (var _i = 0, _a = Object.keys(tempOnDestroyThis); _i < _a.length; _i++) {\n var key = _a[_i];\n var value = tempOnDestroyThis[key];\n if (value && /object/.test(typeof value) && Object.keys(value).length !== 0) {\n if (/properties|changedProperties|childChangedProperties|oldProperties|moduleLoader/.test(key)) {\n for (var _b = 0, _c = Object.keys(tempOnDestroyThis[key]); _b < _c.length; _b++) {\n var propKey = _c[_b];\n var propValue = value[propKey];\n if (propValue && /object/.test(typeof propValue) && Object.keys(propValue).length !== 0 && (propValue.parent || propValue.parentObj)) {\n tempOnDestroyThis[key][propKey] = null;\n }\n }\n }\n else {\n if (value.parent || value.parentObj) {\n tempOnDestroyThis[key] = null;\n }\n }\n }\n }\n });\n }\n });\n };\n //tslint:disable-next-line\n ComponentBase.prototype.clearTemplate = function (templateNames, index) {\n clearTemplate(this, templateNames, index);\n };\n ;\n // tslint:disable-next-line:no-any\n ComponentBase.prototype.ngAfterContentChecked = function (isTempRef) {\n // tslint:disable-next-line:no-any\n var tempAfterContentThis = isTempRef || this;\n for (var _i = 0, _a = tempAfterContentThis.tagObjects; _i < _a.length; _i++) {\n var tagObject = _a[_i];\n if (!isUndefined(tagObject.instance) &&\n (tagObject.instance.isInitChanges || tagObject.instance.hasChanges || tagObject.instance.hasNewChildren)) {\n if (tagObject.instance.isInitChanges) {\n var propObj = {};\n // For angular 9 compatibility\n // Not able to get complex directive properties reference ni Onint hook\n // So we have constructed property here and used\n var complexDirProps = void 0;\n var list = getValue('instance.list', tagObject);\n if (list && list.length) {\n complexDirProps = list[0].directivePropList;\n }\n var skip = true;\n if (tempAfterContentThis.getModuleName && tempAfterContentThis.getModuleName() === 'gantt') {\n skip = false;\n }\n if (complexDirProps && skip && complexDirProps.indexOf(tagObject.instance.propertyName) === -1) {\n var compDirPropList = Object.keys(tagObject.instance.list[0].propCollection);\n for (var h = 0; h < tagObject.instance.list.length; h++) {\n tagObject.instance.list[h].propCollection[tagObject.instance.propertyName] = [];\n var obj = {};\n for (var k = 0; k < compDirPropList.length; k++) {\n var complexPropName = compDirPropList[k];\n obj[complexPropName] = tagObject.instance.list[h].propCollection[complexPropName];\n }\n var _loop_1 = function (i) {\n var tag = tagObject.instance.list[h].tags[i];\n var childObj = getValue('child' + tag.substring(0, 1).toUpperCase() + tag.substring(1), tagObject.instance.list[h]);\n if (childObj) {\n var innerchildObj = tagObject.instance.list[h]['child' + tag.substring(0, 1).toUpperCase() + tag.substring(1)];\n // Update the inner child tag objects\n var updateChildTag_1 = function (innerchild) {\n var innerLevelTag = [];\n if (innerchild) {\n for (var j = 0; j < innerchild.list.length; j++) {\n var innerTag = innerchild.list[0].tags[0];\n if (innerTag) {\n var innerchildTag = getValue('child' + innerTag.substring(0, 1).toUpperCase() + innerTag.substring(1), innerchild.list[j]);\n if (innerchildTag) {\n innerchild.list[j].tagObjects.push({ instance: innerchildTag, name: innerTag });\n innerLevelTag.push(innerchildTag);\n }\n }\n }\n }\n // check for inner level tag\n if (innerLevelTag.length !== 0) {\n for (var l = 0; l < innerLevelTag.length; l++) {\n updateChildTag_1(innerLevelTag[l]);\n }\n }\n ;\n };\n updateChildTag_1(innerchildObj);\n tagObject.instance.list[h].tagObjects.push({ instance: childObj, name: tag });\n }\n };\n for (var i = 0; i < tagObject.instance.list[h].tags.length; i++) {\n _loop_1(i);\n }\n tagObject.instance.list[h].propCollection[tagObject.instance.propertyName].push(obj);\n }\n }\n // End angular 9 compatibility\n propObj[tagObject.name] = tagObject.instance.getProperties();\n tempAfterContentThis.setProperties(propObj, tagObject.instance.isInitChanges);\n }\n else {\n /* istanbul ignore next */\n if ((tempAfterContentThis[tagObject.name].length !== tagObject.instance.list.length) || (/diagram|DashboardLayout/.test(tempAfterContentThis.getModuleName()))) {\n tempAfterContentThis[tagObject.name] = tagObject.instance.list;\n }\n for (var _b = 0, _c = tagObject.instance.list; _b < _c.length; _b++) {\n var list = _c[_b];\n var curIndex = tagObject.instance.list.indexOf(list);\n var curChild = getValue(tagObject.name, tempAfterContentThis)[curIndex];\n var complexTemplates = Object.keys(curChild);\n complexTemplates = complexTemplates.filter(function (val) {\n return /Ref$/i.test(val);\n });\n if (curChild.properties && Object.keys(curChild.properties).length !== 0) {\n for (var _d = 0, complexTemplates_2 = complexTemplates; _d < complexTemplates_2.length; _d++) {\n var complexPropName = complexTemplates_2[_d];\n complexPropName = complexPropName.replace(/Ref/, '');\n curChild.properties[complexPropName] = !curChild.properties[complexPropName] ?\n curChild.propCollection[complexPropName] : curChild.properties[complexPropName];\n }\n }\n if (!isUndefined(curChild) && !isUndefined(curChild.setProperties)) {\n if (/diagram|DashboardLayout/.test(tempAfterContentThis.getModuleName())) {\n curChild.setProperties(list.getProperties(), true);\n }\n else {\n curChild.setProperties(list.getProperties());\n }\n }\n list.isUpdated = true;\n }\n }\n }\n }\n };\n ComponentBase.prototype.registerEvents = function (eventList) {\n registerEvents(eventList, this);\n };\n ComponentBase.prototype.twoWaySetter = function (newVal, prop) {\n var oldVal = getValue(prop, this.properties);\n if (oldVal === newVal) {\n return;\n }\n this.saveChanges(prop, newVal, oldVal);\n setValue(prop, (isNullOrUndefined(newVal) ? null : newVal), this.properties);\n getValue(prop + 'Change', this).emit(newVal);\n };\n ComponentBase.prototype.addTwoWay = function (propList) {\n var _this = this;\n var _loop_2 = function (prop) {\n getValue(prop, this_1);\n Object.defineProperty(this_1, prop, {\n get: function () {\n return getValue(prop, _this.properties);\n },\n set: function (newVal) { return _this.twoWaySetter(newVal, prop); }\n });\n setValue(prop + 'Change', new EventEmitter(), this_1);\n };\n var this_1 = this;\n for (var _i = 0, propList_1 = propList; _i < propList_1.length; _i++) {\n var prop = propList_1[_i];\n _loop_2(prop);\n }\n };\n ComponentBase.prototype.addEventListener = function (eventName, handler) {\n var eventObj = getValue(eventName, this);\n if (!isUndefined(eventObj)) {\n if (!this.ngBoundedEvents[eventName]) {\n this.ngBoundedEvents[eventName] = new Map();\n }\n this.ngBoundedEvents[eventName].set(handler, eventObj.subscribe(handler));\n }\n };\n ComponentBase.prototype.removeEventListener = function (eventName, handler) {\n var eventObj = getValue(eventName, this);\n if (!isUndefined(eventObj)) {\n this.ngBoundedEvents[eventName].get(handler).unsubscribe();\n }\n };\n ComponentBase.prototype.trigger = function (eventName, eventArgs, success) {\n var eventObj = getValue(eventName, this);\n var prevDetection = this.isProtectedOnChange;\n this.isProtectedOnChange = false;\n if (eventArgs) {\n eventArgs.name = eventName;\n }\n if (!isUndefined(eventObj)) {\n eventObj.next(eventArgs);\n }\n var localEventObj = getValue('local' + eventName.charAt(0).toUpperCase() + eventName.slice(1), this);\n if (!isUndefined(localEventObj)) {\n localEventObj.call(this, eventArgs);\n }\n this.isProtectedOnChange = prevDetection;\n /* istanbul ignore else */\n if (success) {\n this.preventChange = this.isPreventChange;\n success.call(this, eventArgs);\n }\n this.isPreventChange = false;\n };\n return ComponentBase;\n}());\nexport { ComponentBase };\n","import { getValue, setValue, isNullOrUndefined, isObject } from '@syncfusion/ej2-base';\n/**\n * Angular Form Base Module\n */\nvar FormBase = /** @class */ (function () {\n function FormBase() {\n }\n FormBase.prototype.propagateChange = function (_) { return; };\n FormBase.prototype.propagateTouch = function () { return; };\n FormBase.prototype.localChange = function (e) {\n //tslint:disable-next-line\n var value = (e.checked === undefined ? e.value : e.checked);\n this.objCheck = isObject(value);\n if (this.isUpdated === true) {\n this.angularValue = this.oldValue;\n }\n if (this.objCheck === true) {\n this.duplicateValue = JSON.stringify(value);\n this.duplicateAngularValue = JSON.stringify(this.angularValue);\n if (this.duplicateValue !== this.duplicateAngularValue && this.propagateChange !== undefined && value !== undefined) {\n // Update angular from our control\n this.propagateChange(value);\n this.angularValue = value;\n }\n }\n else {\n if (value !== this.angularValue && this.propagateChange !== undefined && value !== undefined) {\n // While reset form using reset() method ng-dirty not get updated, so while value is empty just update angularValue only\n if (value !== '' && value !== null) {\n // Update angular from our control\n this.propagateChange(value);\n this.angularValue = value;\n }\n else {\n //tslint:disable-next-line\n var optionalValue = value;\n this.propagateChange(optionalValue);\n this.angularValue = value;\n }\n }\n }\n this.cdr.markForCheck();\n };\n FormBase.prototype.registerOnChange = function (registerFunction) {\n this.propagateChange = registerFunction;\n };\n FormBase.prototype.registerOnTouched = function (registerFunction) {\n this.propagateTouch = registerFunction;\n };\n FormBase.prototype.twoWaySetter = function (newVal, prop) {\n var oldVal = this.oldValue || getValue(prop, this.properties);\n var ele = this.inputElement || this.element;\n if (ele && oldVal === newVal && this.value === newVal &&\n (ele.value === undefined || ele.value === '')) {\n return;\n }\n this.saveChanges(prop, newVal, oldVal);\n setValue(prop, (isNullOrUndefined(newVal) ? null : newVal), this.properties);\n getValue(prop + 'Change', this).emit(newVal);\n };\n // tslint:disable-next-line:no-any\n FormBase.prototype.ngAfterViewInit = function (isTempRef) {\n // tslint:disable-next-line:no-any\n var tempFormAfterViewThis = isTempRef || this;\n // Used setTimeout for template binding\n // Refer Link: https://github.com/angular/angular/issues/6005\n // Removed setTimeout, Because we have called markForCheck() method in Angular Template Compiler\n /* istanbul ignore else */\n if (typeof window !== 'undefined') {\n if ((tempFormAfterViewThis.getModuleName()).includes('dropdown')) {\n setTimeout(function () {\n tempFormAfterViewThis.appendTo(tempFormAfterViewThis.element);\n });\n }\n else {\n tempFormAfterViewThis.appendTo(tempFormAfterViewThis.element);\n }\n var ele = tempFormAfterViewThis.inputElement || tempFormAfterViewThis.element;\n ele.addEventListener('focus', tempFormAfterViewThis.ngOnFocus.bind(tempFormAfterViewThis));\n ele.addEventListener('blur', tempFormAfterViewThis.ngOnBlur.bind(tempFormAfterViewThis));\n }\n this.isFormInit = false;\n };\n FormBase.prototype.setDisabledState = function (disabled) {\n this.enabled = !disabled;\n this.disabled = disabled;\n };\n FormBase.prototype.writeValue = function (value) {\n var regExp = /ejs-radiobutton/g;\n //update control value from angular\n if (this.checked === undefined) {\n this.value = value;\n }\n else {\n // To resolve boolean type formControl value is not working for radio button control.\n /* istanbul ignore next */\n if (this.ngEle) {\n if (typeof value === 'boolean') {\n if (regExp.test(this.ngEle.nativeElement.outerHTML)) {\n this.checked = value === this.value;\n }\n else {\n this.checked = value;\n }\n }\n else {\n this.checked = value === this.value;\n }\n }\n }\n this.angularValue = value;\n this.isUpdated = true;\n // When binding Html textbox value to syncfusion textbox, change event triggered dynamically.\n // To prevent change event, trigger change in component side based on `preventChange` value\n this.preventChange = this.isFormInit ? false : true;\n this.cdr.markForCheck();\n if (value === null) {\n return;\n }\n };\n FormBase.prototype.ngOnFocus = function (e) {\n /* istanbul ignore else */\n if (this.skipFromEvent !== true) {\n this.focus.emit(e);\n }\n this.cdr.markForCheck();\n };\n FormBase.prototype.ngOnBlur = function (e) {\n this.propagateTouch();\n /* istanbul ignore else */\n if (this.skipFromEvent !== true) {\n this.blur.emit(e);\n }\n this.cdr.markForCheck();\n };\n FormBase.isFormBase = true;\n return FormBase;\n}());\nexport { FormBase };\n"],"names":["applyMixins","derivedClass","baseClass","forEach","Object","getOwnPropertyNames","prototype","name","hasOwnProperty","isFormBase","registerEvents","eventList","obj","direct","ngEventsEmitter","length","_i","eventList_1","event_1","propCollection","EventEmitter","setProperties","clearTemplate","_this","templateNames","index","regTemplates","keys","registeredTemplate","regProperties","filter","val","test","tabaccordionTemp","getModuleName","_a","e","m","value","destroy","splice","template","rootNodes","rt","_b","_c","destroyed","_view","pNode","renderer","parentNode","isNullOrUndefined","appendChild","_loop_1","tagObject","instance","RegExp","_d","_e","tagObjects","compile","templateEle","helper","CSPTemplate","stringCompiler","contRef_1","elementRef","nativeElement","_viewContainerRef","pName_1","propName","data","component","context","$implicit","conRef","viewContainerRef","viewRef","createEmbeddedView","getValue","detectChanges","markForCheck","viewCollection","push","refRegex","ComplexBase","this","hasChanges","dataSource","tags","ngOnInit","tag","objInstance","substring","toUpperCase","templateProperties","i","tempProp","indexOf","setValue","replace","templateProperties_1","propList","directivePropList","k","dirPropName","isInitChanges","ngOnChanges","changes","changedVal","currentValue","isUpdated","getProperties","isChanged","result","property","tempProps","props","d","propVal","item","ngAfterContentChecked","templateProperties_2","ngAfterViewChecked","ngAfterViewInit","ngOnDestroy","ArrayBase","propertyName","list","ngAfterContentInit","children","map","child","dirIndex","onlyProp","isSourceChanged","childrenDataSource","JSON","stringify","hasNewChildren","ComponentBase","isProtectedOnChange","isFormInit","saveChanges","key","newValue","oldValue","oldProperties","changedProperties","finalUpdate","changeTime","setTimeout","dataBind","bind","clearTimeout","isTempRef","tempOnThis","ngBoundedEvents","isAngular","complexTemplate","ngAttr","getAngularAttr","element","createElement","tagName","prop","ele","srenderer","innerHTML","undefined","className","id","styles","setAttribute","attrs","attributes","complexTemplates","compProp","complexTemplates_1","ngAr","tempAfterViewThis","ngEle","outerHTML","style","visibility","ngtempRef","appendToComponent","window","includes","appendTo","tempOnDestroyThis","classList","contains","propKey","propValue","parent","parentObj","tempAfterContentThis","isUndefined","propObj","complexDirProps","skip","compDirPropList","h","complexPropName","childObj","innerchildObj","updateChildTag_1","innerchild","innerLevelTag","j","innerTag","innerchildTag","l","curIndex","curChild","properties","complexTemplates_2","twoWaySetter","newVal","oldVal","emit","addTwoWay","_loop_2","this_1","defineProperty","get","set","propList_1","addEventListener","eventName","handler","eventObj","Map","subscribe","removeEventListener","unsubscribe","trigger","eventArgs","success","prevDetection","next","localEventObj","charAt","slice","call","preventChange","isPreventChange","FormBase","propagateChange","_","propagateTouch","localChange","checked","objCheck","isObject","angularValue","duplicateValue","duplicateAngularValue","optionalValue","cdr","registerOnChange","registerFunction","registerOnTouched","inputElement","tempFormAfterViewThis","ngOnFocus","ngOnBlur","setDisabledState","disabled","enabled","writeValue","skipFromEvent","focus","blur","getTemplateEngine","setTemplateEngine","nameSpace","object","split","fromObj","defaultValue","target","propertyDescriptor","setter","getter","enumerable","configurable"],"mappings":"0SAMA,SAAgBA,EAAYC,EAAcC,GACtCA,EAAUC,QAAQ,SAAUD,GACxBE,OAAOC,oBAAoBH,EAAUI,WAAWH,QAAQ,SAAUI,KACzDN,EAAaK,UAAUE,eAAeD,IAAUL,EAAUO,YAAuB,gBAATF,KACzEN,EAAaK,UAAUC,GAAQL,EAAUI,UAAUC,QAcnE,SAAgBG,EAAeC,EAAWC,EAAKC,GAC3C,IAAIC,KACJ,GAAIH,GAAaA,EAAUI,OAAQ,CAC/B,IAAK,IAAIC,EAAK,EAAGC,EAAcN,EAAWK,EAAKC,EAAYF,OAAQC,IAAM,CACrE,IAAIE,EAAUD,EAAYD,IACX,IAAXH,GACAD,EAAIO,eAAeD,GAAW,IAAIE,gBAAa,GAC/CR,EAAIM,GAAWN,EAAIO,eAAeD,IAGlCJ,EAAgBI,GAAW,IAAIE,gBAAa,IAGrC,IAAXP,GACAD,EAAIS,cAAcP,GAAiB,IAO/C,SAAgBQ,EAAcC,EAAOC,EAAeC,GAChD,IAAIC,EAAetB,OAAOuB,KAAKJ,EAAMK,oBACrC,GAAIF,EAAaX,OAMb,IAAK,IAJDc,EAAgBL,GAAiBA,EAAcM,OAAO,SAAUC,GAChE,OAAQ,MAAMC,KAAKD,KAEnBE,EAAmB,wBAAwBD,KAAKT,EAAMW,iBACjDlB,EAAK,EAAGmB,EAAMN,GAAiBA,GAAiBH,EAAeV,EAAKmB,EAAGpB,OAAQC,IAAM,CAC1F,IAAIY,EAAqBO,EAAGnB,GAE5B,GAAIS,GAASA,EAAMV,OACf,IAAK,IAAIqB,EAAI,EA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