@syncfusion/ej2-angular-base 19.4.38 → 19.4.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.
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* filename: ej2-angular-base.umd.min.js
|
|
3
|
-
* version : 19.4.38
|
|
4
|
-
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
|
-
* Use of this code is subject to the terms of our license.
|
|
6
|
-
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
|
-
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
|
-
* applicable laws.
|
|
9
|
-
*/
|
|
10
1
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@angular/core")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@angular/core"],t):t(e.ej={},e.ej2Base,e.core)}(this,function(e,t,i){"use strict";function n(e,t){t.forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(i){e.prototype.hasOwnProperty(i)&&!t.isFormBase||(e.prototype[i]=t.prototype[i])})})}function s(e,t,n){var s={};if(e&&e.length){for(var r=0,a=e;r<a.length;r++){var o=a[r];!0===n?(t.propCollection[o]=new i.EventEmitter(!1),t[o]=t.propCollection[o]):s[o]=new i.EventEmitter(!1)}!0!==n&&t.setProperties(s,!0)}}function r(e,i,n){var s=Object.keys(e.registeredTemplate);if(s.length)for(var r=i&&i.filter(function(e){return!/\./g.test(e)}),a=0,o=r&&r||s;a<o.length;a++){var l=o[a];if(n&&n.length)for(var h=0;h<n.length;h++)for(var p=0;p<e.registeredTemplate.template.length;p++){if(e.registeredTemplate.template[p].rootNodes[0]===n[h]){(g=e.registeredTemplate[l])[p].destroy()}}else if(e.registeredTemplate[l])for(var c=0,u=e.registeredTemplate[l];c<u.length;c++){var g;if(!(g=u[c]).destroyed){if(g._view){var f=g._view.renderer.parentNode(g.rootNodes[0]);if(!t.isNullOrUndefined(f))for(p=0;p<g.rootNodes.length;p++)f.appendChild(g.rootNodes[p])}g.destroy()}}delete e.registeredTemplate[l]}for(var d=function(e){e.instance&&e.instance.clearTemplate(i&&i.filter(function(t){return!!new RegExp(e.name).test(t)}))},v=0,m=e.tagObjects;v<m.length;v++){d(m[v])}}function a(e,i){if("string"==typeof e)return u(e,i);var n=e.elementRef.nativeElement._viewContainerRef,s=e.elementRef.nativeElement.propName;return function(i,r,a){var o={$implicit:i},l=n||r.viewContainerRef,h=l.createEmbeddedView(e,o);h.markForCheck();var p=r&&r.registeredTemplate?r.registeredTemplate:t.getValue("currentInstance.registeredTemplate",l);return a=a&&r.registeredTemplate?a:s,void 0===p[a]&&(p[a]=[]),p[a].push(h),h.rootNodes}}var o=/Ref$/,l=function(){function e(){this.hasChanges=!1,this.propCollection={},this.dataSource={},this.tags=[],this.tagObjects=[]}return e.prototype.ngOnInit=function(){this.registeredTemplate={};for(var e=0,i=this.tags;e<i.length;e++){var n=i[e],s=t.getValue("child"+n.substring(0,1).toUpperCase()+n.substring(1),this);s&&this.tagObjects.push({instance:s,name:n})}for(var r=Object.keys(this),a=0;a<r.length;a++){var o=t.getValue(r[a],this);"object"==typeof o&&o.elementRef&&!t.getValue(-1!==r[a].indexOf("Ref")?r[a]:r[a]+"Ref",this)&&t.setValue(-1!==r[a].indexOf("Ref")?r[a]:r[a]+"Ref",o,this)}for(var l=0,h=r=(r=Object.keys(this)).filter(function(e){return/Ref$/i.test(e)});l<h.length;l++){var p=h[l].replace("Ref","");t.setValue(p.replace("_","."),t.getValue(p,this),this.propCollection)}var c=Object.keys(this);if(this.directivePropList){for(var u=0;u<this.directivePropList.length;u++){var g=this.directivePropList[u];-1!==c.indexOf(g)&&t.getValue(g,this)&&t.setValue(g,t.getValue(g,this),this.propCollection)}this.hasChanges=!0}this.isInitChanges=!0},e.prototype.registerEvents=function(e){s(e,this,!0)},e.prototype.ngOnChanges=function(e){for(var t=0,i=Object.keys(e);t<i.length;t++){var n=i[t],s=e[n];this.propCollection[n]=s.currentValue}this.isUpdated=!1,this.hasChanges=!0},e.prototype.clearTemplate=function(e){r(this,e)},e.prototype.getProperties=function(){for(var e=0,t=this.tagObjects;e<t.length;e++){var i=t[e];this.propCollection[i.name]=i.instance.getProperties()}return this.propCollection},e.prototype.isChanged=function(){var e=this.hasChanges;if(!t.isNullOrUndefined(this.propCollection[this.property]))for(var i=this.propCollection[this.property],n=Object.keys(i[0]),s=0;s<n.length;s++)if(!t.isNullOrUndefined(this.propCollection[n[s]])){var r=t.getValue(n[s],this),a=this.propCollection[this.property][0][n[s]];t.isNullOrUndefined(r)||this.propCollection[n[s]]===r||a===r||(t.setValue(n[s],r,this.propCollection[this.property][0]),t.setValue(n[s],r,this.propCollection),this.hasChanges=!0,this.isUpdated=!1)}for(var o=0,l=this.tagObjects;o<l.length;o++){var h=l[o];e=e||h.instance.hasChanges}return e||this.hasChanges},e.prototype.ngAfterContentChecked=function(){if(this.hasChanges=this.isChanged(),this.isInitChanges||this.hasChanges)for(var e=Object.keys(this),i=0,n=e=e.filter(function(e){return o.test(e)});i<n.length;i++){var s=n[i].replace("Ref","");t.setValue(s.replace("_","."),t.getValue(s,this),this.propCollection)}},e.prototype.ngAfterViewChecked=function(){this.isUpdated&&(this.hasChanges=!1)},e.prototype.ngAfterViewInit=function(){this.isInitChanges=!1},e.prototype.ngOnDestroy=function(){this.directivePropList=[]},e}(),h=function(){function e(e){this.list=[],this.hasChanges=!1,this.propertyName=e}return e.prototype.ngOnInit=function(){this.isInitChanges=!0},e.prototype.ngAfterContentInit=function(){var e=this,t=0;this.list=this.children.map(function(i){return i.dirIndex=t++,i.property=e.propertyName,i}),this.hasChanges=!0},e.prototype.getProperties=function(){for(var e=[],t=0,i=this.list;t<i.length;t++){var n=i[t];e.push(n.getProperties())}return e},e.prototype.isChanged=function(){var e=this,t=!1,i=0,n=!1,s=this.children.map(function(e){return e});if(this.list.length===this.children.length)for(var r=0;r<this.list.length;r++)this.list[r].propCollection.dataSource&&(this.list[r].dataSource&&this.list[r].propCollection.dataSource!==this.list[r].dataSource&&(this.list[r].propCollection.dataSource=this.list[r].dataSource,this.list[r].hasChanges=!0),n=JSON.stringify(this.list[r].propCollection.dataSource)!==JSON.stringify(s[r].propCollection.dataSource));this.hasNewChildren=!(this.list.length===this.children.length&&!n)||null,this.hasNewChildren&&(this.list=this.children.map(function(t){return t.dirIndex=i++,t.property=e.propertyName,t}));for(var a=0,o=this.list;a<o.length;a++){var l=o[a];t=t||l.hasChanges}return!!this.list.length&&t},e.prototype.clearTemplate=function(e){for(var t=this,i=0,n=this.list;i<n.length;i++){n[i].clearTemplate(e&&e.map(function(e){return new RegExp(t.propertyName).test(e)?e.replace(t.propertyName+".",""):e}))}},e.prototype.ngAfterContentChecked=function(){this.hasChanges=this.isChanged();for(var e=0;e<this.list.length;e++)t.getValue("childColumns",this.list[e])&&"columns"===t.getValue("property",this.list[e])&&t.setValue("columns",t.getValue("childColumns",this.list[e]).getProperties(),this.list[e].propCollection),this.list[e].isUpdated=!0},e.prototype.ngAfterViewInit=function(){this.isInitChanges=!1},e.prototype.ngOnDestroy=function(){this.list=[]},e}(),p=function(){function e(){this.isProtectedOnChange=!0,this.isFormInit=!0}return e.prototype.saveChanges=function(e,t,i){if(!this.isProtectedOnChange){this.oldProperties[e]=i,this.changedProperties[e]=t,this.finalUpdate();var n=setTimeout(this.dataBind.bind(this));this.finalUpdate=function(){clearTimeout(n)}}},e.prototype.ngOnInit=function(e){var i=e||this;i.registeredTemplate={},i.ngBoundedEvents={},i.isAngular=!0,i.isFormInit=!0,e&&(this.tags=e.tags),i.tags=this.tags||[],i.complexTemplate=this.complexTemplate||[],i.tagObjects=[],i.ngAttr=this.getAngularAttr(i.element),i.createElement=function(e,n){var s=i.srenderer?i.srenderer.createElement(e):t.createElement(e);return void 0===n?s:(s.innerHTML=n.innerHTML?n.innerHTML:"",void 0!==n.className&&(s.className=n.className),void 0!==n.id&&(s.id=n.id),void 0!==n.styles&&s.setAttribute("style",n.styles),void 0!==i.ngAttr&&s.setAttribute(i.ngAttr,""),void 0!==n.attrs&&t.attributes(s,n.attrs),s)};for(var n=0,s=i.tags;n<s.length;n++){var r=s[n],a={instance:t.getValue("child"+r.substring(0,1).toUpperCase()+r.substring(1),i),name:r};i.tagObjects.push(a)}for(var o=Object.keys(i),l=0,h=o=o.filter(function(e){return/Ref$/i.test(e)&&/\_/i.test(e)});l<h.length;l++){var p=h[l].replace("Ref",""),c={};t.setValue(p.replace("_","."),t.getValue(p,i),c),i.setProperties(c,!0)}},e.prototype.getAngularAttr=function(e){for(var t,i=e.attributes,n=i.length,s=0;s<n;s++)/_ngcontent/g.test(i[s].name)&&(t=i[s].name);return t},e.prototype.ngAfterViewInit=function(e){var i=e||this;/ejs-tab|ejs-accordion/g.test(i.ngEle.nativeElement.outerHTML)&&(i.ngEle.nativeElement.style.visibility="hidden");for(var n=Object.keys(i),s=0,r=n=n.filter(function(e){return/Ref$/i.test(e)});s<r.length;s++){var a=r[s].replace("Ref","");t.setValue(a.replace("_","."),t.getValue(a+"Ref",i),i)}setTimeout(function(){("undefined"!=typeof window&&document.body.contains(i.element)||"btn"===i.getModuleName())&&(i.appendTo(i.element),i.ngEle.nativeElement.style.visibility="")})},e.prototype.ngOnDestroy=function(e){var t=e||this;setTimeout(function(){"undefined"!=typeof window&&t.element.classList.contains("e-control")&&(t.destroy(),t.clearTemplate(null),t.ngBoundedEvents={},t.tagObjects={},t.ngEle=null)})},e.prototype.clearTemplate=function(e,t){r(this,e,t)},e.prototype.ngAfterContentChecked=function(e){for(var i=e||this,n=0,s=i.tagObjects;n<s.length;n++){var r=s[n];if(!t.isUndefined(r.instance)&&(r.instance.isInitChanges||r.instance.hasChanges||r.instance.hasNewChildren))if(r.instance.isInitChanges){var a={},o=void 0;(O=t.getValue("instance.list",r))&&O.length&&(o=O[0].directivePropList);var l=!0;if(i.getModuleName&&"gantt"===i.getModuleName()&&(l=!1),o&&l&&-1===o.indexOf(r.instance.propertyName))for(var h=Object.keys(r.instance.list[0].propCollection),p=0;p<r.instance.list.length;p++){r.instance.list[p].propCollection[r.instance.propertyName]=[];for(var c={},u=0;u<h.length;u++){c[P=h[u]]=r.instance.list[p].propCollection[P]}for(var g=0;g<r.instance.list[p].tags.length;g++){var f=r.instance.list[p].tags[g],d=t.getValue("child"+f.substring(0,1).toUpperCase()+f.substring(1),r.instance.list[p]);if(d){var v=r.instance.list[p]["child"+f.substring(0,1).toUpperCase()+f.substring(1)];if(v)for(var m=0;m<v.list.length;m++){var y=v.list[0].tags[0];if(y){var C=t.getValue("child"+y.substring(0,1).toUpperCase()+y.substring(1),v.list[m]);C&&v.list[m].tagObjects.push({instance:C,name:y})}}r.instance.list[p].tagObjects.push({instance:d,name:f})}}r.instance.list[p].propCollection[r.instance.propertyName].push(c)}a[r.name]=r.instance.getProperties(),i.setProperties(a,r.instance.isInitChanges)}else{i[r.name].length===r.instance.list.length&&"diagram"!==i.getModuleName()||(i[r.name]=r.instance.list);for(var b=0,V=r.instance.list;b<V.length;b++){var O=V[b],E=r.instance.list.indexOf(O),T=t.getValue(r.name,i)[E],j=Object.keys(T);if(j=j.filter(function(e){return/Ref$/i.test(e)}),T.properties&&0!==Object.keys(T.properties).length&&/chart/.test(i.getModuleName()))for(var N=0,w=j;N<w.length;N++){var P;P=(P=w[N]).replace(/Ref/,""),T.properties[P]=T.properties[P]?T.properties[P]:T.propCollection[P]}t.isUndefined(T)||t.isUndefined(T.setProperties)||(/diagram|DashboardLayout/.test(i.getModuleName())?T.setProperties(O.getProperties(),!0):T.setProperties(O.getProperties())),O.isUpdated=!0}}}},e.prototype.registerEvents=function(e){s(e,this)},e.prototype.twoWaySetter=function(e,i){var n=t.getValue(i,this.properties);n!==e&&(this.saveChanges(i,e,n),t.setValue(i,t.isNullOrUndefined(e)?null:e,this.properties),t.getValue(i+"Change",this).emit(e))},e.prototype.addTwoWay=function(e){for(var n=this,s=function(e){t.getValue(e,r),Object.defineProperty(r,e,{get:function(){return t.getValue(e,n.properties)},set:function(t){return n.twoWaySetter(t,e)}}),t.setValue(e+"Change",new i.EventEmitter,r)},r=this,a=0,o=e;a<o.length;a++){s(o[a])}},e.prototype.addEventListener=function(e,i){var n=t.getValue(e,this);t.isUndefined(n)||(this.ngBoundedEvents[e]||(this.ngBoundedEvents[e]=new Map),this.ngBoundedEvents[e].set(i,n.subscribe(i)))},e.prototype.removeEventListener=function(e,i){var n=t.getValue(e,this);t.isUndefined(n)||this.ngBoundedEvents[e].get(i).unsubscribe()},e.prototype.trigger=function(e,i,n){var s=t.getValue(e,this),r=this.isProtectedOnChange;this.isProtectedOnChange=!1,i&&(i.name=e),t.isUndefined(s)||s.next(i);var a=t.getValue("local"+e.charAt(0).toUpperCase()+e.slice(1),this);t.isUndefined(a)||a.call(this,i),this.isProtectedOnChange=r,n&&(this.preventChange=this.isPreventChange,n.call(this,i)),this.isPreventChange=!1},e}(),c=function(){function e(){}return e.prototype.propagateChange=function(e){},e.prototype.propagateTouch=function(){},e.prototype.localChange=function(e){var i=void 0===e.checked?e.value:e.checked;if(this.objCheck=t.isObject(i),!0===this.isUpdated&&(this.angularValue=this.oldValue),!0===this.objCheck)this.duplicateValue=JSON.stringify(i),this.duplicateAngularValue=JSON.stringify(this.angularValue),this.duplicateValue!==this.duplicateAngularValue&&void 0!==this.propagateChange&&void 0!==i&&(this.propagateChange(i),this.angularValue=i);else if(i!==this.angularValue&&void 0!==this.propagateChange&&void 0!==i)if(""!==i&&null!==i)this.propagateChange(i),this.angularValue=i;else{var n=i;this.propagateChange(n),this.angularValue=i}},e.prototype.registerOnChange=function(e){this.propagateChange=e},e.prototype.registerOnTouched=function(e){this.propagateTouch=e},e.prototype.twoWaySetter=function(e,i){var n=this.oldValue||t.getValue(i,this.properties),s=this.inputElement||this.element;(!s||n!==e||this.value!==e||void 0!==s.value&&""!==s.value)&&(this.saveChanges(i,e,n),t.setValue(i,t.isNullOrUndefined(e)?null:e,this.properties),t.getValue(i+"Change",this).emit(e))},e.prototype.ngAfterViewInit=function(e){var t=e||this;if("undefined"!=typeof window){t.appendTo(t.element);var i=t.inputElement||t.element;i.addEventListener("focus",t.ngOnFocus.bind(t)),i.addEventListener("blur",t.ngOnBlur.bind(t))}this.isFormInit=!1},e.prototype.setDisabledState=function(e){this.enabled=!e,this.disabled=e},e.prototype.writeValue=function(e){void 0===this.checked?this.value=e:this.ngEle&&("boolean"==typeof e?/ejs-radiobutton/g.test(this.ngEle.nativeElement.outerHTML)?this.checked=e===this.value:this.checked=e:this.checked=e===this.value),this.angularValue=e,this.isUpdated=!0,this.preventChange=!this.isFormInit},e.prototype.ngOnFocus=function(e){!0!==this.skipFromEvent&&this.focus.emit(e)},e.prototype.ngOnBlur=function(e){this.propagateTouch(),!0!==this.skipFromEvent&&this.blur.emit(e)},e.isFormBase=!0,e}(),u=t.getTemplateEngine();t.setTemplateEngine({compile:a}),e.ComplexBase=l,e.ArrayBase=h,e.ComponentBase=p,e.FormBase=c,e.applyMixins=n,e.ComponentMixins=function(e){return function(t){n(t,e)}},e.registerEvents=s,e.clearTemplate=r,e.setValue=function(e,t,i){for(var n=e.replace(/\[/g,".").replace(/\]/g,"").split("."),s=i||{},r=0;r<n.length;r++){var a=n[r];r+1===n.length?s[a]=void 0===t?{}:t:void 0===s[a]&&(s[a]={}),s=s[a]}return s},e.compile=a,e.Template=function(e){return function(i,n){var s={set:function(e){return function(i){void 0!==i&&(t.setValue(e+"Ref",i,this),"string"!=typeof i?(i.elementRef.nativeElement._viewContainerRef=this.viewContainerRef,i.elementRef.nativeElement.propName=e):this.saveChanges&&(this.saveChanges(e,i,void 0),this.dataBind()))}}(n),get:function(e,i){return function(){return t.getValue(e+"Ref",this)||i}}(n,e),enumerable:!0,configurable:!0};Object.defineProperty(i,n,s)}},Object.defineProperty(e,"__esModule",{value:!0})});
|
|
11
2
|
//# sourceMappingURL=ej2-angular-base.umd.min.js.map
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* filename: ej2-angular-base.min.js
|
|
3
|
-
* version : 19.4.38
|
|
4
|
-
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
|
-
* Use of this code is subject to the terms of our license.
|
|
6
|
-
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
|
-
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
|
-
* applicable laws.
|
|
9
|
-
*/
|
|
10
1
|
this.ej=this.ej||{},this.ej.angularbase=function(e,t,i){"use strict";function n(e,t){t.forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(i){e.prototype.hasOwnProperty(i)&&!t.isFormBase||(e.prototype[i]=t.prototype[i])})})}function s(e){return function(t){n(t,e)}}function r(e,t,n){var s={};if(e&&e.length){for(var r=0,a=e;r<a.length;r++){var o=a[r];!0===n?(t.propCollection[o]=new i.EventEmitter(!1),t[o]=t.propCollection[o]):s[o]=new i.EventEmitter(!1)}!0!==n&&t.setProperties(s,!0)}}function a(e,i,n){var s=Object.keys(e.registeredTemplate);if(s.length)for(var r=i&&i.filter(function(e){return!/\./g.test(e)}),a=0,o=r&&r||s;a<o.length;a++){var l=o[a];if(n&&n.length)for(var h=0;h<n.length;h++)for(f=0;f<e.registeredTemplate.template.length;f++)e.registeredTemplate.template[f].rootNodes[0]===n[h]&&(u=e.registeredTemplate[l])[f].destroy();else if(e.registeredTemplate[l])for(var p=0,c=e.registeredTemplate[l];p<c.length;p++){var u=c[p];if(!u.destroyed){if(u._view){var g=u._view.renderer.parentNode(u.rootNodes[0]);if(!t.isNullOrUndefined(g))for(var f=0;f<u.rootNodes.length;f++)g.appendChild(u.rootNodes[f])}u.destroy()}}delete e.registeredTemplate[l]}for(var d=0,v=e.tagObjects;d<v.length;d++)!function(e){e.instance&&e.instance.clearTemplate(i&&i.filter(function(t){return!!new RegExp(e.name).test(t)}))}(v[d])}function o(e,t,i){for(var n=e.replace(/\[/g,".").replace(/\]/g,"").split("."),s=i||{},r=0;r<n.length;r++){var a=n[r];r+1===n.length?s[a]=void 0===t?{}:t:void 0===s[a]&&(s[a]={}),s=s[a]}return s}function l(e,i){if("string"==typeof e)return m(e,i);var n=e.elementRef.nativeElement._viewContainerRef,s=e.elementRef.nativeElement.propName;return function(i,r,a){var o={$implicit:i},l=n||r.viewContainerRef,h=l.createEmbeddedView(e,o);h.markForCheck();var p=r&&r.registeredTemplate?r.registeredTemplate:t.getValue("currentInstance.registeredTemplate",l);return a=a&&r.registeredTemplate?a:s,void 0===p[a]&&(p[a]=[]),p[a].push(h),h.rootNodes}}function h(e){return function(t,i){var n={set:p(i),get:c(i,e),enumerable:!0,configurable:!0};Object.defineProperty(t,i,n)}}function p(e){return function(i){void 0!==i&&(t.setValue(e+"Ref",i,this),"string"!=typeof i?(i.elementRef.nativeElement._viewContainerRef=this.viewContainerRef,i.elementRef.nativeElement.propName=e):this.saveChanges&&(this.saveChanges(e,i,void 0),this.dataBind()))}}function c(e,i){return function(){return t.getValue(e+"Ref",this)||i}}var u=/Ref$/,g=function(){function e(){this.hasChanges=!1,this.propCollection={},this.dataSource={},this.tags=[],this.tagObjects=[]}return e.prototype.ngOnInit=function(){this.registeredTemplate={};for(var e=0,i=this.tags;e<i.length;e++){var n=i[e],s=t.getValue("child"+n.substring(0,1).toUpperCase()+n.substring(1),this);s&&this.tagObjects.push({instance:s,name:n})}for(var r=Object.keys(this),a=0;a<r.length;a++){var o=t.getValue(r[a],this);"object"==typeof o&&o.elementRef&&!t.getValue(-1!==r[a].indexOf("Ref")?r[a]:r[a]+"Ref",this)&&t.setValue(-1!==r[a].indexOf("Ref")?r[a]:r[a]+"Ref",o,this)}for(var l=0,h=r=(r=Object.keys(this)).filter(function(e){return/Ref$/i.test(e)});l<h.length;l++){var p=h[l].replace("Ref","");t.setValue(p.replace("_","."),t.getValue(p,this),this.propCollection)}var c=Object.keys(this);if(this.directivePropList){for(var u=0;u<this.directivePropList.length;u++){var g=this.directivePropList[u];-1!==c.indexOf(g)&&t.getValue(g,this)&&t.setValue(g,t.getValue(g,this),this.propCollection)}this.hasChanges=!0}this.isInitChanges=!0},e.prototype.registerEvents=function(e){r(e,this,!0)},e.prototype.ngOnChanges=function(e){for(var t=0,i=Object.keys(e);t<i.length;t++){var n=i[t],s=e[n];this.propCollection[n]=s.currentValue}this.isUpdated=!1,this.hasChanges=!0},e.prototype.clearTemplate=function(e){a(this,e)},e.prototype.getProperties=function(){for(var e=0,t=this.tagObjects;e<t.length;e++){var i=t[e];this.propCollection[i.name]=i.instance.getProperties()}return this.propCollection},e.prototype.isChanged=function(){var e=this.hasChanges;if(!t.isNullOrUndefined(this.propCollection[this.property]))for(var i=this.propCollection[this.property],n=Object.keys(i[0]),s=0;s<n.length;s++)if(!t.isNullOrUndefined(this.propCollection[n[s]])){var r=t.getValue(n[s],this),a=this.propCollection[this.property][0][n[s]];t.isNullOrUndefined(r)||this.propCollection[n[s]]===r||a===r||(t.setValue(n[s],r,this.propCollection[this.property][0]),t.setValue(n[s],r,this.propCollection),this.hasChanges=!0,this.isUpdated=!1)}for(var o=0,l=this.tagObjects;o<l.length;o++){var h=l[o];e=e||h.instance.hasChanges}return e||this.hasChanges},e.prototype.ngAfterContentChecked=function(){if(this.hasChanges=this.isChanged(),this.isInitChanges||this.hasChanges)for(var e=Object.keys(this),i=0,n=e=e.filter(function(e){return u.test(e)});i<n.length;i++){var s=n[i].replace("Ref","");t.setValue(s.replace("_","."),t.getValue(s,this),this.propCollection)}},e.prototype.ngAfterViewChecked=function(){this.isUpdated&&(this.hasChanges=!1)},e.prototype.ngAfterViewInit=function(){this.isInitChanges=!1},e.prototype.ngOnDestroy=function(){this.directivePropList=[]},e}(),f=function(){function e(e){this.list=[],this.hasChanges=!1,this.propertyName=e}return e.prototype.ngOnInit=function(){this.isInitChanges=!0},e.prototype.ngAfterContentInit=function(){var e=this,t=0;this.list=this.children.map(function(i){return i.dirIndex=t++,i.property=e.propertyName,i}),this.hasChanges=!0},e.prototype.getProperties=function(){for(var e=[],t=0,i=this.list;t<i.length;t++){var n=i[t];e.push(n.getProperties())}return e},e.prototype.isChanged=function(){var e=this,t=!1,i=0,n=!1,s=this.children.map(function(e){return e});if(this.list.length===this.children.length)for(var r=0;r<this.list.length;r++)this.list[r].propCollection.dataSource&&(this.list[r].dataSource&&this.list[r].propCollection.dataSource!==this.list[r].dataSource&&(this.list[r].propCollection.dataSource=this.list[r].dataSource,this.list[r].hasChanges=!0),n=JSON.stringify(this.list[r].propCollection.dataSource)!==JSON.stringify(s[r].propCollection.dataSource));this.hasNewChildren=!(this.list.length===this.children.length&&!n)||null,this.hasNewChildren&&(this.list=this.children.map(function(t){return t.dirIndex=i++,t.property=e.propertyName,t}));for(var a=0,o=this.list;a<o.length;a++){var l=o[a];t=t||l.hasChanges}return!!this.list.length&&t},e.prototype.clearTemplate=function(e){for(var t=this,i=0,n=this.list;i<n.length;i++)n[i].clearTemplate(e&&e.map(function(e){return new RegExp(t.propertyName).test(e)?e.replace(t.propertyName+".",""):e}))},e.prototype.ngAfterContentChecked=function(){this.hasChanges=this.isChanged();for(var e=0;e<this.list.length;e++)t.getValue("childColumns",this.list[e])&&"columns"===t.getValue("property",this.list[e])&&t.setValue("columns",t.getValue("childColumns",this.list[e]).getProperties(),this.list[e].propCollection),this.list[e].isUpdated=!0},e.prototype.ngAfterViewInit=function(){this.isInitChanges=!1},e.prototype.ngOnDestroy=function(){this.list=[]},e}(),d=function(){function e(){this.isProtectedOnChange=!0,this.isFormInit=!0}return e.prototype.saveChanges=function(e,t,i){if(!this.isProtectedOnChange){this.oldProperties[e]=i,this.changedProperties[e]=t,this.finalUpdate();var n=setTimeout(this.dataBind.bind(this)),s=function(){clearTimeout(n)};this.finalUpdate=s}},e.prototype.ngOnInit=function(e){var i=e||this;i.registeredTemplate={},i.ngBoundedEvents={},i.isAngular=!0,i.isFormInit=!0,e&&(this.tags=e.tags),i.tags=this.tags||[],i.complexTemplate=this.complexTemplate||[],i.tagObjects=[],i.ngAttr=this.getAngularAttr(i.element),i.createElement=function(e,n){var s=i.srenderer?i.srenderer.createElement(e):t.createElement(e);return void 0===n?s:(s.innerHTML=n.innerHTML?n.innerHTML:"",void 0!==n.className&&(s.className=n.className),void 0!==n.id&&(s.id=n.id),void 0!==n.styles&&s.setAttribute("style",n.styles),void 0!==i.ngAttr&&s.setAttribute(i.ngAttr,""),void 0!==n.attrs&&t.attributes(s,n.attrs),s)};for(var n=0,s=i.tags;n<s.length;n++){var r=s[n],a={instance:t.getValue("child"+r.substring(0,1).toUpperCase()+r.substring(1),i),name:r};i.tagObjects.push(a)}for(var o=Object.keys(i),l=0,h=o=o.filter(function(e){return/Ref$/i.test(e)&&/\_/i.test(e)});l<h.length;l++){var p=h[l].replace("Ref",""),c={};t.setValue(p.replace("_","."),t.getValue(p,i),c),i.setProperties(c,!0)}},e.prototype.getAngularAttr=function(e){for(var t,i=e.attributes,n=i.length,s=0;s<n;s++)/_ngcontent/g.test(i[s].name)&&(t=i[s].name);return t},e.prototype.ngAfterViewInit=function(e){var i=e||this;/ejs-tab|ejs-accordion/g.test(i.ngEle.nativeElement.outerHTML)&&(i.ngEle.nativeElement.style.visibility="hidden");for(var n=Object.keys(i),s=0,r=n=n.filter(function(e){return/Ref$/i.test(e)});s<r.length;s++){var a=r[s].replace("Ref","");t.setValue(a.replace("_","."),t.getValue(a+"Ref",i),i)}setTimeout(function(){("undefined"!=typeof window&&document.body.contains(i.element)||"btn"===i.getModuleName())&&(i.appendTo(i.element),i.ngEle.nativeElement.style.visibility="")})},e.prototype.ngOnDestroy=function(e){var t=e||this;setTimeout(function(){"undefined"!=typeof window&&t.element.classList.contains("e-control")&&(t.destroy(),t.clearTemplate(null),t.ngBoundedEvents={},t.tagObjects={},t.ngEle=null)})},e.prototype.clearTemplate=function(e,t){a(this,e,t)},e.prototype.ngAfterContentChecked=function(e){for(var i=e||this,n=0,s=i.tagObjects;n<s.length;n++){var r=s[n];if(!t.isUndefined(r.instance)&&(r.instance.isInitChanges||r.instance.hasChanges||r.instance.hasNewChildren))if(r.instance.isInitChanges){var a={},o=void 0;(O=t.getValue("instance.list",r))&&O.length&&(o=O[0].directivePropList);var l=!0;if(i.getModuleName&&"gantt"===i.getModuleName()&&(l=!1),o&&l&&-1===o.indexOf(r.instance.propertyName))for(var h=Object.keys(r.instance.list[0].propCollection),p=0;p<r.instance.list.length;p++){r.instance.list[p].propCollection[r.instance.propertyName]=[];for(var c={},u=0;u<h.length;u++)c[P=h[u]]=r.instance.list[p].propCollection[P];for(var g=0;g<r.instance.list[p].tags.length;g++){var f=r.instance.list[p].tags[g],d=t.getValue("child"+f.substring(0,1).toUpperCase()+f.substring(1),r.instance.list[p]);if(d){var v=r.instance.list[p]["child"+f.substring(0,1).toUpperCase()+f.substring(1)];if(v)for(var m=0;m<v.list.length;m++){var C=v.list[0].tags[0];if(C){var y=t.getValue("child"+C.substring(0,1).toUpperCase()+C.substring(1),v.list[m]);y&&v.list[m].tagObjects.push({instance:y,name:C})}}r.instance.list[p].tagObjects.push({instance:d,name:f})}}r.instance.list[p].propCollection[r.instance.propertyName].push(c)}a[r.name]=r.instance.getProperties(),i.setProperties(a,r.instance.isInitChanges)}else{i[r.name].length===r.instance.list.length&&"diagram"!==i.getModuleName()||(i[r.name]=r.instance.list);for(var b=0,V=r.instance.list;b<V.length;b++){var O=V[b],E=r.instance.list.indexOf(O),T=t.getValue(r.name,i)[E],j=Object.keys(T);if(j=j.filter(function(e){return/Ref$/i.test(e)}),T.properties&&0!==Object.keys(T.properties).length&&/chart/.test(i.getModuleName()))for(var N=0,w=j;N<w.length;N++){var P=w[N];P=P.replace(/Ref/,""),T.properties[P]=T.properties[P]?T.properties[P]:T.propCollection[P]}t.isUndefined(T)||t.isUndefined(T.setProperties)||(/diagram|DashboardLayout/.test(i.getModuleName())?T.setProperties(O.getProperties(),!0):T.setProperties(O.getProperties())),O.isUpdated=!0}}}},e.prototype.registerEvents=function(e){r(e,this)},e.prototype.twoWaySetter=function(e,i){var n=t.getValue(i,this.properties);n!==e&&(this.saveChanges(i,e,n),t.setValue(i,t.isNullOrUndefined(e)?null:e,this.properties),t.getValue(i+"Change",this).emit(e))},e.prototype.addTwoWay=function(e){for(var n=this,s=this,r=0,a=e;r<a.length;r++)!function(e){t.getValue(e,s),Object.defineProperty(s,e,{get:function(){return t.getValue(e,n.properties)},set:function(t){return n.twoWaySetter(t,e)}}),t.setValue(e+"Change",new i.EventEmitter,s)}(a[r])},e.prototype.addEventListener=function(e,i){var n=t.getValue(e,this);t.isUndefined(n)||(this.ngBoundedEvents[e]||(this.ngBoundedEvents[e]=new Map),this.ngBoundedEvents[e].set(i,n.subscribe(i)))},e.prototype.removeEventListener=function(e,i){var n=t.getValue(e,this);t.isUndefined(n)||this.ngBoundedEvents[e].get(i).unsubscribe()},e.prototype.trigger=function(e,i,n){var s=t.getValue(e,this),r=this.isProtectedOnChange;this.isProtectedOnChange=!1,i&&(i.name=e),t.isUndefined(s)||s.next(i);var a=t.getValue("local"+e.charAt(0).toUpperCase()+e.slice(1),this);t.isUndefined(a)||a.call(this,i),this.isProtectedOnChange=r,n&&(this.preventChange=this.isPreventChange,n.call(this,i)),this.isPreventChange=!1},e}(),v=function(){function e(){}return e.prototype.propagateChange=function(e){},e.prototype.propagateTouch=function(){},e.prototype.localChange=function(e){var i=void 0===e.checked?e.value:e.checked;if(this.objCheck=t.isObject(i),!0===this.isUpdated&&(this.angularValue=this.oldValue),!0===this.objCheck)this.duplicateValue=JSON.stringify(i),this.duplicateAngularValue=JSON.stringify(this.angularValue),this.duplicateValue!==this.duplicateAngularValue&&void 0!==this.propagateChange&&void 0!==i&&(this.propagateChange(i),this.angularValue=i);else if(i!==this.angularValue&&void 0!==this.propagateChange&&void 0!==i)if(""!==i&&null!==i)this.propagateChange(i),this.angularValue=i;else{var n=i;this.propagateChange(n),this.angularValue=i}},e.prototype.registerOnChange=function(e){this.propagateChange=e},e.prototype.registerOnTouched=function(e){this.propagateTouch=e},e.prototype.twoWaySetter=function(e,i){var n=this.oldValue||t.getValue(i,this.properties),s=this.inputElement||this.element;(!s||n!==e||this.value!==e||void 0!==s.value&&""!==s.value)&&(this.saveChanges(i,e,n),t.setValue(i,t.isNullOrUndefined(e)?null:e,this.properties),t.getValue(i+"Change",this).emit(e))},e.prototype.ngAfterViewInit=function(e){var t=e||this;if("undefined"!=typeof window){t.appendTo(t.element);var i=t.inputElement||t.element;i.addEventListener("focus",t.ngOnFocus.bind(t)),i.addEventListener("blur",t.ngOnBlur.bind(t))}this.isFormInit=!1},e.prototype.setDisabledState=function(e){this.enabled=!e,this.disabled=e},e.prototype.writeValue=function(e){var t=/ejs-radiobutton/g;void 0===this.checked?this.value=e:this.ngEle&&("boolean"==typeof e?t.test(this.ngEle.nativeElement.outerHTML)?this.checked=e===this.value:this.checked=e:this.checked=e===this.value),this.angularValue=e,this.isUpdated=!0,this.preventChange=!this.isFormInit},e.prototype.ngOnFocus=function(e){!0!==this.skipFromEvent&&this.focus.emit(e)},e.prototype.ngOnBlur=function(e){this.propagateTouch(),!0!==this.skipFromEvent&&this.blur.emit(e)},e.isFormBase=!0,e}(),m=t.getTemplateEngine();return t.setTemplateEngine({compile:l}),e.ComplexBase=g,e.ArrayBase=f,e.ComponentBase=d,e.FormBase=v,e.applyMixins=n,e.ComponentMixins=s,e.registerEvents=r,e.clearTemplate=a,e.setValue=o,e.compile=l,e.Template=h,e}({},ej.base,core),this.ejs=ej;
|
|
11
2
|
//# sourceMappingURL=ej2-angular-base.min.js.map
|
package/dist/global/index.d.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* filename: index.d.ts
|
|
3
|
-
* version : 19.4.38
|
|
4
|
-
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
|
-
* Use of this code is subject to the terms of our license.
|
|
6
|
-
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
|
-
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
|
-
* applicable laws.
|
|
9
|
-
*/
|
|
10
1
|
import * as _angularbase from '@syncfusion/ej2-angular-base';
|
|
11
2
|
|
|
12
3
|
export declare namespace ej {
|
package/package.json
CHANGED
|
@@ -1,109 +1,72 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
"deprecated": false,
|
|
75
|
-
"description": "A common package of Essential JS 2 base Angular libraries, methods and class definitions",
|
|
76
|
-
"devDependencies": {},
|
|
77
|
-
"homepage": "https://www.syncfusion.com/angular-ui-components",
|
|
78
|
-
"keywords": [
|
|
79
|
-
"ej2",
|
|
80
|
-
"syncfusion",
|
|
81
|
-
"web-components",
|
|
82
|
-
"ej2-angular-base",
|
|
83
|
-
"angular",
|
|
84
|
-
"ng"
|
|
85
|
-
],
|
|
86
|
-
"license": "SEE LICENSE IN license",
|
|
87
|
-
"main": "./dist/ej2-angular-base.umd.min.js",
|
|
88
|
-
"module": "./index.js",
|
|
89
|
-
"name": "@syncfusion/ej2-angular-base",
|
|
90
|
-
"peerDependencies": {
|
|
91
|
-
"@angular/common": "4.10.0 - 11.1.1",
|
|
92
|
-
"@angular/compiler": "4.10.0 - 11.1.1",
|
|
93
|
-
"@angular/core": "4.10.0 - 11.1.1",
|
|
94
|
-
"@angular/forms": "4.10.0 - 11.1.1",
|
|
95
|
-
"@angular/platform-browser": "4.10.0 - 11.1.1",
|
|
96
|
-
"@angular/platform-browser-dynamic": "4.10.0 - 11.1.1"
|
|
97
|
-
},
|
|
98
|
-
"repository": {
|
|
99
|
-
"type": "git",
|
|
100
|
-
"url": "git+https://github.com/syncfusion/ej2-angular-ui-components.git"
|
|
101
|
-
},
|
|
102
|
-
"schematics": "./schematics/collection.json",
|
|
103
|
-
"scripts": {
|
|
104
|
-
"postinstall": "node ./postinstall.js"
|
|
105
|
-
},
|
|
106
|
-
"typings": "index.d.ts",
|
|
107
|
-
"version": "19.4.38",
|
|
108
|
-
"sideEffects": true
|
|
109
|
-
}
|
|
2
|
+
"_from": "@syncfusion/ej2-angular-base@*",
|
|
3
|
+
"_id": "@syncfusion/ej2-angular-base@19.3.55",
|
|
4
|
+
"_inBundle": false,
|
|
5
|
+
"_integrity": "sha512-0ELdBZkrOdSKrbtawZC1/DH4JgdnnjYCdWvZoNiCJMQfbpkeQlH2R702lS6TQ8cV7xWuvwJD1qJnSgjvKhDyeA==",
|
|
6
|
+
"_location": "/@syncfusion/ej2-angular-base",
|
|
7
|
+
"_phantomChildren": {},
|
|
8
|
+
"_requested": {
|
|
9
|
+
"type": "range",
|
|
10
|
+
"registry": true,
|
|
11
|
+
"raw": "@syncfusion/ej2-angular-base@*",
|
|
12
|
+
"name": "@syncfusion/ej2-angular-base",
|
|
13
|
+
"escapedName": "@syncfusion%2fej2-angular-base",
|
|
14
|
+
"scope": "@syncfusion",
|
|
15
|
+
"rawSpec": "*",
|
|
16
|
+
"saveSpec": null,
|
|
17
|
+
"fetchSpec": "*"
|
|
18
|
+
},
|
|
19
|
+
"_requiredBy": [
|
|
20
|
+
"/",
|
|
21
|
+
"/@syncfusion/ej2-angular-charts",
|
|
22
|
+
"/@syncfusion/ej2-angular-diagrams",
|
|
23
|
+
"/@syncfusion/ej2-angular-spreadsheet"
|
|
24
|
+
],
|
|
25
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-angular-base/-/ej2-angular-base-19.3.55.tgz",
|
|
26
|
+
"_shasum": "9807c36b3ea8c01049614d024ae824b3443e5876",
|
|
27
|
+
"_spec": "@syncfusion/ej2-angular-base@*",
|
|
28
|
+
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
29
|
+
"author": {
|
|
30
|
+
"name": "Syncfusion Inc."
|
|
31
|
+
},
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/syncfusion/ej2-angular-ui-components/issues"
|
|
34
|
+
},
|
|
35
|
+
"bundleDependencies": false,
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@syncfusion/ej2-base": "~19.4.38",
|
|
38
|
+
"@syncfusion/ej2-icons": "~19.4.38",
|
|
39
|
+
"core-js": "^3.4.8",
|
|
40
|
+
"reflect-metadata": "^0.1.9",
|
|
41
|
+
"rxjs": "^6.5.4",
|
|
42
|
+
"rxjs-compat": "^6.5.4",
|
|
43
|
+
"zone.js": "^0.10.2"
|
|
44
|
+
},
|
|
45
|
+
"deprecated": false,
|
|
46
|
+
"description": "A common package of Essential JS 2 base Angular libraries, methods and class definitions",
|
|
47
|
+
"devDependencies": {},
|
|
48
|
+
"homepage": "https://www.syncfusion.com/angular-ui-components",
|
|
49
|
+
"keywords": [
|
|
50
|
+
"ej2",
|
|
51
|
+
"syncfusion",
|
|
52
|
+
"web-components",
|
|
53
|
+
"ej2-angular-base",
|
|
54
|
+
"angular",
|
|
55
|
+
"ng"
|
|
56
|
+
],
|
|
57
|
+
"license": "SEE LICENSE IN license",
|
|
58
|
+
"main": "./dist/ej2-angular-base.umd.min.js",
|
|
59
|
+
"module": "./index.js",
|
|
60
|
+
"name": "@syncfusion/ej2-angular-base",
|
|
61
|
+
"repository": {
|
|
62
|
+
"type": "git",
|
|
63
|
+
"url": "git+https://github.com/syncfusion/ej2-angular-ui-components.git"
|
|
64
|
+
},
|
|
65
|
+
"schematics": "./schematics/collection.json",
|
|
66
|
+
"scripts": {
|
|
67
|
+
"postinstall": "node ./postinstall.js"
|
|
68
|
+
},
|
|
69
|
+
"typings": "index.d.ts",
|
|
70
|
+
"version": "19.4.39",
|
|
71
|
+
"sideEffects": true
|
|
72
|
+
}
|
package/src/form-base.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare class FormBase<T> implements ControlValueAccessor {
|
|
|
7
7
|
value: T;
|
|
8
8
|
checked: boolean;
|
|
9
9
|
private skipFromEvent;
|
|
10
|
-
static readonly isFormBase
|
|
10
|
+
static readonly isFormBase = true;
|
|
11
11
|
propagateChange(_: T): void;
|
|
12
12
|
propagateTouch(): void;
|
|
13
13
|
enabled: Object;
|