@builder.io/angular
Advanced tools
Comparing version 0.0.35 to 0.0.36
@@ -335,3 +335,3 @@ (function (global, factory) { | ||
var /** @type {?} */ rootNode = ((this._viewRef)).rootNodes[0]; | ||
this.renderer.setElementAttribute(rootNode, 'builder-model', model); | ||
this.renderer.setElementAttribute(rootNode, 'builder-model', model.replace(/-/g, ' ')); | ||
this.renderer.listen(rootNode, 'click', function () { return _this.onClick(); }); | ||
@@ -338,0 +338,0 @@ }, |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@builder.io/sdk"),require("@angular/router"),require("@nguniversal/express-engine/tokens"),require("@builder.io/sdk/dist/clients/js/src/builder.class"),require("url"),require("@angular/common/http"),require("rxjs/add/operator/toPromise"),require("cookies"),require("@angular/platform-browser"),require("lodash"),require("@angular/common")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@builder.io/sdk","@angular/router","@nguniversal/express-engine/tokens","@builder.io/sdk/dist/clients/js/src/builder.class","url","@angular/common/http","rxjs/add/operator/toPromise","cookies","@angular/platform-browser","lodash","@angular/common"],t):t((e.builder=e.builder||{},e.builder.io=e.builder.io||{},e.builder.io.angular={}),e.ng.core,e.sdk,e.ng.router,e.tokens,e.builder_class,e.url,e.ng.common.http,e.Rx.Observable.prototype,e.Cookies,e.ng.platformBrowser,e.lodash,e.ng.common)}(this,function(e,t,n,o,r,i,s,a,c,p,l,u,d){"use strict";var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};function f(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,n,s):r(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}var h=function(){return function(){}}();h.decorators=[{type:t.Injectable}],h.ctorParameters=function(){return[]};var b=function(){function e(e,n,o,r){this.builder=e,this.renderer=n,this.element=o,this.builderContentService=r,this.contentLoad=new t.EventEmitter,this.contentError=new t.EventEmitter,r.componentInstance=this}return Object.defineProperty(e.prototype,"editingMode",{get:function(){return n.Builder.editingPage},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){var e=this.element.nativeElement&&this.element.nativeElement.getAttribute&&this.element.nativeElement.getAttribute("builder-model");e&&(this.modelName=e,this.builder.componentInstances[e]=this)},e.prototype.ngOnDestroy=function(){this.modelName&&this.builder.componentInstances[this.modelName]===this&&delete this.builder.componentInstances[this.modelName]},e}();b.decorators=[{type:t.Component,args:[{selector:"builder-content",template:"<ng-content>\n</ng-content>\n",styles:[":host{\n display:block;\n position:relative;\n}\nbody.builder-editing :host::after{\n content:'';\n display:-webkit-box;\n display:-ms-flexbox;\n display:flex;\n position:absolute;\n top:0;\n left:0;\n bottom:0;\n right:0;\n -webkit-box-pack:center;\n -ms-flex-pack:center;\n justify-content:center;\n -webkit-box-align:center;\n -ms-flex-align:center;\n align-items:center;\n text-align:center;\n color:black;\n font-size:26px;\n -webkit-font-smoothing:antialiased;\n font-weight:bold;\n letter-spacing:1px;\n text-transform:uppercase;\n color:white;\n text-shadow:1px 1px 3px black;\n}\nbody.builder-editing :host:hover::after{\n background-color:rgba(70, 172, 194, 0.2);\n cursor:pointer;\n content:attr(builder-model);\n}\n"]}]}],b.ctorParameters=function(){return[{type:x},{type:t.Renderer},{type:t.ElementRef},{type:h}]},b.propDecorators={contentLoad:[{type:t.Output}],contentError:[{type:t.Output}]};var y="BUILDER_API_KEY",g="EXPRESS_REQUEST",v="EXPRESS_RESPONSE",x=function(e){function t(t,n,o,r,s,a,c){var l=e.call(this)||this;return l.expressRequest=n,l.expressEngineRequest=o,l.expressResponse=r,l.expressEngineResponse=s,l.router=a,l.http=c,l.autoTrack=i.Builder.isBrowser&&!l.isDevelopment,l.componentInstances={},l.expressEngineRequest&&(l.expressRequest=l.expressEngineRequest),l.expressEngineResponse&&(l.expressResponse=l.expressEngineResponse),t&&l.init(t),l.expressRequest?(l.setUserAgent(l.expressRequest.get("user-agent")),l.cookies=new p(l.expressRequest,l.expressResponse)):i.Builder.isBrowser||console.warn("No express request set! Builder cannot target appropriately without this, please contact steve@builder.io to learn how to set this as required"),l}return function(e,t){function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),Object.defineProperty(t.prototype,"isDevelopment",{get:function(){return i.Builder.isBrowser&&("localhost"===location.hostname||""!==location.port)},enumerable:!0,configurable:!0}),t.prototype.getLocation=function(){return s.parse(this.router.url)},t.prototype.requestUrl=function(t){return this.http?this.http.get(t).toPromise():e.prototype.requestUrl.call(this,t)},t.prototype.getCookie=function(t){return i.Builder.isBrowser?e.prototype.getCookie.call(this,t):this.cookies&&this.cookies.get(t)},t.prototype.setCookie=function(t,n,o){return i.Builder.isBrowser?e.prototype.setCookie.call(this,t,n,o):this.cookies&&this.cookies.set(t,n,o)},t}(i.Builder);x.decorators=[{type:t.Injectable}],x.ctorParameters=function(){return[{type:undefined,decorators:[{type:t.Optional},{type:t.Inject,args:[y]}]},{type:undefined,decorators:[{type:t.Optional},{type:t.Inject,args:[g]}]},{type:undefined,decorators:[{type:t.Optional},{type:t.Inject,args:[r.REQUEST]}]},{type:undefined,decorators:[{type:t.Optional},{type:t.Inject,args:[v]}]},{type:undefined,decorators:[{type:t.Optional},{type:t.Inject,args:[r.RESPONSE]}]},{type:o.Router},{type:a.HttpClient,decorators:[{type:t.Optional}]}]};var w=function(){function e(e,t,n,o,r,i){this._viewContainer=e,this.renderer=t,this.builder=n,this.builderContentService=o,this.transferState=r,this._context=new k,this._templateRef=null,this._viewRef=null,this.matchId="",this.clickTracked=!1,o.directiveInstance=this,this._templateRef=i}return Object.defineProperty(e.prototype,"component",{get:function(){return this.builder.componentInstances[this._context.model]},enumerable:!0,configurable:!0}),e.prototype.onClick=function(){if(this.matchId&&!this.clickTracked){var e=this.match;this.builder.autoTrack&&this.builder.trackInteraction(this.matchId,e&&e.variationId),this.clickTracked=!0}document.body.classList.contains("builder-editing")&&(this.matchId?window.top.postMessage({type:"builder.clickContent",data:{id:this.matchId,model:this._context.model}},"*"):window.top.postMessage({type:"builder.clickModel",data:{model:this._context.model}},"*"))},Object.defineProperty(e.prototype,"builderModel",{set:function(e){var t=this;if(e){this._context.model=e,this._updateView(),this.stateKey=l.makeStateKey("builder:"+e),this.request();var n=this._viewRef.rootNodes[0];this.renderer.setElementAttribute(n,"builder-model",e),this.renderer.listen(n,"click",function(){return t.onClick()})}},enumerable:!0,configurable:!0}),e.prototype.request=function(){var e=this,t=this._context.model,n=this.transferState&&this.transferState.get(this.stateKey,null);this.builder.queueGetContent(t,{initialContent:n}).subscribe(function(t){e.transferState&&e.transferState.set(e.stateKey,t);var n=e._viewRef;e._context.loading=!1;var o=t[0];if(e.component?e.component.contentLoad.next(o):console.warn("no component!"),o){var r=e._viewRef.rootNodes[0];e.matchId=o.id,e.renderer.setElementAttribute(r,"builder-content-entry-id",o.id),e.match=o,n.context.$implicit=o.data,n.context.results=t.map(function(e){return Object.assign({},e.data,{$id:e.id})}),e.builder.autoTrack&&e.builder.trackImpression(o.id,o.variationId)}n.detectChanges()},function(t){e.component?e.component.contentError.next(t):console.warn("no component!")})},e.prototype._updateView=function(){this._context.model&&(this._viewContainer.clear(),this._templateRef&&(this._viewRef=this._viewContainer.createEmbeddedView(this._templateRef,this._context)))},e}();w.decorators=[{type:t.Directive,args:[{selector:"[builderModel]",providers:[h],queries:{testing:new t.ContentChild(b),testing2:new t.ViewChild(b)}}]}],w.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.Renderer},{type:x},{type:h},{type:l.TransferState,decorators:[{type:t.Optional}]},{type:t.TemplateRef}]},w.propDecorators={builderModel:[{type:t.Input}]};var k=function(){return function(){this.loading=!0,this.results=[]}}(),R=function(){function e(e){this.componentFactoryResolver=e,this.componentOptions=null}return Object.defineProperty(e.prototype,"component",{set:function(e){this.componentName=e},enumerable:!0,configurable:!0}),e.prototype.onClick=function(e){if(n.Builder.editingPage&&n.Builder.isIframe){e.stopPropagation();var t=this.componentInfo;t&&window.top.postMessage({type:"builder.clickComponent",data:{component:u.omit(t,"class")}},"*")}},Object.defineProperty(e.prototype,"componentInfo",{get:function(){var e=this;return n.Builder.components.find(function(t){return t.name===e.componentName})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{set:function(e){this.componentOptions=e},enumerable:!0,configurable:!0}),e.prototype.loadComponent=function(){var e=this.componentInfo,t=e&&e["class"];if(t){var n=this.componentFactoryResolver.resolveComponentFactory(t);if(n){var o=this.container;o.clear();var r=o.createComponent(n);this.componentOptions&&Object.assign(r.instance,this.componentOptions)}}},e.prototype.ngOnInit=function(){this.loadComponent()},e}();R.decorators=[{type:t.Component,args:[{selector:"builder-render",template:"<div #container></div>\n",styles:[":host{\n display:block;\n}\nbody.builder-editing-page :host{\n position:relative;\n width:100%;\n}\nbody.builder-editing-page :host::after{\n content:'';\n display:-webkit-box;\n display:-ms-flexbox;\n display:flex;\n position:absolute;\n top:0;\n left:0;\n bottom:0;\n right:0;\n pointer-events:none;\n -webkit-box-shadow:inset 0 0 0 1px rgba(70, 172, 194, 0.1);\n box-shadow:inset 0 0 0 1px rgba(70, 172, 194, 0.1);\n}\nbody.builder-editing-page :host:hover::after{\n content:'';\n cursor:pointer;\n -webkit-box-shadow:inset 0 0 0 1px rgba(70, 172, 194, 0.5);\n box-shadow:inset 0 0 0 1px rgba(70, 172, 194, 0.5);\n}\n"]}]}],R.ctorParameters=function(){return[{type:t.ComponentFactoryResolver}]},R.propDecorators={container:[{type:t.ViewChild,args:["container",{read:t.ViewContainerRef}]}],component:[{type:t.Input}],onClick:[{type:t.HostListener,args:["click",["$event"]]}],options:[{type:t.Input}]},e.ɵf=function(){function e(){}return e.prototype.ngOnInit=function(){},e}(),e.ɵf.decorators=[{type:t.Component,args:[{selector:"builder-builder-rich-text",template:'<div [innerHTML]="content">\n',styles:[""]}]}],e.ɵf.ctorParameters=function(){return[]},e.ɵf.propDecorators={content:[{type:t.Input}]},e.ɵf=f([i.BuilderComponent({name:"Rich Text",inputs:[{name:"content",type:"html"}]})],e.ɵf),e.ɵg=function(){function e(){this.gutterSize=10,this.columns=[]}return Object.defineProperty(e.prototype,"numColumns",{get:function(){return this.columns.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gridTemplateColumns",{get:function(){var e=100/this.columns.length;return this.columns.map(function(t){return e+"%"}).join(" ")},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){},e}(),e.ɵg.decorators=[{type:t.Component,args:[{selector:"builder-builder-columns",template:'<div class="container" [ngStyle]="{ gridGap: gutterSize + \'px\', gridTemplateColumns: gridTemplateColumns }">\n <div *ngFor="let column of columns" class="column">\n <builder-render *ngFor="let component of column.content" [component]="component.component?.component" [options]="component.component?.options"></builder-render>\n </div>\n</div>\n',styles:[".container{\n display:grid;\n}\n"]}]}],e.ɵg.ctorParameters=function(){return[]},e.ɵg.propDecorators={gutterSize:[{type:t.Input}],columns:[{type:t.Input}]},e.ɵg=f([i.BuilderComponent({name:"Columns",inputs:[{name:"gutterSize",type:"number"},{name:"columns",type:"list",subFields:[{name:"content",type:"list",subFields:[{name:"component",type:"component"}]}]}]}),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[])],e.ɵg);var C=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:y,useValue:t}]}},e}();C.decorators=[{type:t.NgModule,args:[{imports:[d.CommonModule],providers:[x,h],declarations:[b,w,R,e.ɵf,e.ɵg],exports:[b,w,R,e.ɵf],entryComponents:[e.ɵg,e.ɵf]}]}],C.ctorParameters=function(){return[]},e.BuilderComponent=i.BuilderComponent,e.BuilderModule=C,e.BUILDER_API_KEY=y,e.EXPRESS_REQUEST=g,e.EXPRESS_RESPONSE=v,e.BuilderService=x,e.ɵb=b,e.ɵe=R,e.ɵd=k,e.ɵc=w,e.ɵa=h,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@builder.io/sdk"),require("@angular/router"),require("@nguniversal/express-engine/tokens"),require("@builder.io/sdk/dist/clients/js/src/builder.class"),require("url"),require("@angular/common/http"),require("rxjs/add/operator/toPromise"),require("cookies"),require("@angular/platform-browser"),require("lodash"),require("@angular/common")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@builder.io/sdk","@angular/router","@nguniversal/express-engine/tokens","@builder.io/sdk/dist/clients/js/src/builder.class","url","@angular/common/http","rxjs/add/operator/toPromise","cookies","@angular/platform-browser","lodash","@angular/common"],t):t((e.builder=e.builder||{},e.builder.io=e.builder.io||{},e.builder.io.angular={}),e.ng.core,e.sdk,e.ng.router,e.tokens,e.builder_class,e.url,e.ng.common.http,e.Rx.Observable.prototype,e.Cookies,e.ng.platformBrowser,e.lodash,e.ng.common)}(this,function(e,t,n,o,r,i,s,a,c,p,l,u,d){"use strict";var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};function f(e,t,n,o){var r,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,n,s):r(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}var h=function(){return function(){}}();h.decorators=[{type:t.Injectable}],h.ctorParameters=function(){return[]};var b=function(){function e(e,n,o,r){this.builder=e,this.renderer=n,this.element=o,this.builderContentService=r,this.contentLoad=new t.EventEmitter,this.contentError=new t.EventEmitter,r.componentInstance=this}return Object.defineProperty(e.prototype,"editingMode",{get:function(){return n.Builder.editingPage},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){var e=this.element.nativeElement&&this.element.nativeElement.getAttribute&&this.element.nativeElement.getAttribute("builder-model");e&&(this.modelName=e,this.builder.componentInstances[e]=this)},e.prototype.ngOnDestroy=function(){this.modelName&&this.builder.componentInstances[this.modelName]===this&&delete this.builder.componentInstances[this.modelName]},e}();b.decorators=[{type:t.Component,args:[{selector:"builder-content",template:"<ng-content>\n</ng-content>\n",styles:[":host{\n display:block;\n position:relative;\n}\nbody.builder-editing :host::after{\n content:'';\n display:-webkit-box;\n display:-ms-flexbox;\n display:flex;\n position:absolute;\n top:0;\n left:0;\n bottom:0;\n right:0;\n -webkit-box-pack:center;\n -ms-flex-pack:center;\n justify-content:center;\n -webkit-box-align:center;\n -ms-flex-align:center;\n align-items:center;\n text-align:center;\n color:black;\n font-size:26px;\n -webkit-font-smoothing:antialiased;\n font-weight:bold;\n letter-spacing:1px;\n text-transform:uppercase;\n color:white;\n text-shadow:1px 1px 3px black;\n}\nbody.builder-editing :host:hover::after{\n background-color:rgba(70, 172, 194, 0.2);\n cursor:pointer;\n content:attr(builder-model);\n}\n"]}]}],b.ctorParameters=function(){return[{type:x},{type:t.Renderer},{type:t.ElementRef},{type:h}]},b.propDecorators={contentLoad:[{type:t.Output}],contentError:[{type:t.Output}]};var g="BUILDER_API_KEY",y="EXPRESS_REQUEST",v="EXPRESS_RESPONSE",x=function(e){function t(t,n,o,r,s,a,c){var l=e.call(this)||this;return l.expressRequest=n,l.expressEngineRequest=o,l.expressResponse=r,l.expressEngineResponse=s,l.router=a,l.http=c,l.autoTrack=i.Builder.isBrowser&&!l.isDevelopment,l.componentInstances={},l.expressEngineRequest&&(l.expressRequest=l.expressEngineRequest),l.expressEngineResponse&&(l.expressResponse=l.expressEngineResponse),t&&l.init(t),l.expressRequest?(l.setUserAgent(l.expressRequest.get("user-agent")),l.cookies=new p(l.expressRequest,l.expressResponse)):i.Builder.isBrowser||console.warn("No express request set! Builder cannot target appropriately without this, please contact steve@builder.io to learn how to set this as required"),l}return function(e,t){function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),Object.defineProperty(t.prototype,"isDevelopment",{get:function(){return i.Builder.isBrowser&&("localhost"===location.hostname||""!==location.port)},enumerable:!0,configurable:!0}),t.prototype.getLocation=function(){return s.parse(this.router.url)},t.prototype.requestUrl=function(t){return this.http?this.http.get(t).toPromise():e.prototype.requestUrl.call(this,t)},t.prototype.getCookie=function(t){return i.Builder.isBrowser?e.prototype.getCookie.call(this,t):this.cookies&&this.cookies.get(t)},t.prototype.setCookie=function(t,n,o){return i.Builder.isBrowser?e.prototype.setCookie.call(this,t,n,o):this.cookies&&this.cookies.set(t,n,o)},t}(i.Builder);x.decorators=[{type:t.Injectable}],x.ctorParameters=function(){return[{type:undefined,decorators:[{type:t.Optional},{type:t.Inject,args:[g]}]},{type:undefined,decorators:[{type:t.Optional},{type:t.Inject,args:[y]}]},{type:undefined,decorators:[{type:t.Optional},{type:t.Inject,args:[r.REQUEST]}]},{type:undefined,decorators:[{type:t.Optional},{type:t.Inject,args:[v]}]},{type:undefined,decorators:[{type:t.Optional},{type:t.Inject,args:[r.RESPONSE]}]},{type:o.Router},{type:a.HttpClient,decorators:[{type:t.Optional}]}]};var w=function(){function e(e,t,n,o,r,i){this._viewContainer=e,this.renderer=t,this.builder=n,this.builderContentService=o,this.transferState=r,this._context=new k,this._templateRef=null,this._viewRef=null,this.matchId="",this.clickTracked=!1,o.directiveInstance=this,this._templateRef=i}return Object.defineProperty(e.prototype,"component",{get:function(){return this.builder.componentInstances[this._context.model]},enumerable:!0,configurable:!0}),e.prototype.onClick=function(){if(this.matchId&&!this.clickTracked){var e=this.match;this.builder.autoTrack&&this.builder.trackInteraction(this.matchId,e&&e.variationId),this.clickTracked=!0}document.body.classList.contains("builder-editing")&&(this.matchId?window.top.postMessage({type:"builder.clickContent",data:{id:this.matchId,model:this._context.model}},"*"):window.top.postMessage({type:"builder.clickModel",data:{model:this._context.model}},"*"))},Object.defineProperty(e.prototype,"builderModel",{set:function(e){var t=this;if(e){this._context.model=e,this._updateView(),this.stateKey=l.makeStateKey("builder:"+e),this.request();var n=this._viewRef.rootNodes[0];this.renderer.setElementAttribute(n,"builder-model",e.replace(/-/g," ")),this.renderer.listen(n,"click",function(){return t.onClick()})}},enumerable:!0,configurable:!0}),e.prototype.request=function(){var e=this,t=this._context.model,n=this.transferState&&this.transferState.get(this.stateKey,null);this.builder.queueGetContent(t,{initialContent:n}).subscribe(function(t){e.transferState&&e.transferState.set(e.stateKey,t);var n=e._viewRef;e._context.loading=!1;var o=t[0];if(e.component?e.component.contentLoad.next(o):console.warn("no component!"),o){var r=e._viewRef.rootNodes[0];e.matchId=o.id,e.renderer.setElementAttribute(r,"builder-content-entry-id",o.id),e.match=o,n.context.$implicit=o.data,n.context.results=t.map(function(e){return Object.assign({},e.data,{$id:e.id})}),e.builder.autoTrack&&e.builder.trackImpression(o.id,o.variationId)}n.detectChanges()},function(t){e.component?e.component.contentError.next(t):console.warn("no component!")})},e.prototype._updateView=function(){this._context.model&&(this._viewContainer.clear(),this._templateRef&&(this._viewRef=this._viewContainer.createEmbeddedView(this._templateRef,this._context)))},e}();w.decorators=[{type:t.Directive,args:[{selector:"[builderModel]",providers:[h],queries:{testing:new t.ContentChild(b),testing2:new t.ViewChild(b)}}]}],w.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.Renderer},{type:x},{type:h},{type:l.TransferState,decorators:[{type:t.Optional}]},{type:t.TemplateRef}]},w.propDecorators={builderModel:[{type:t.Input}]};var k=function(){return function(){this.loading=!0,this.results=[]}}(),R=function(){function e(e){this.componentFactoryResolver=e,this.componentOptions=null}return Object.defineProperty(e.prototype,"component",{set:function(e){this.componentName=e},enumerable:!0,configurable:!0}),e.prototype.onClick=function(e){if(n.Builder.editingPage&&n.Builder.isIframe){e.stopPropagation();var t=this.componentInfo;t&&window.top.postMessage({type:"builder.clickComponent",data:{component:u.omit(t,"class")}},"*")}},Object.defineProperty(e.prototype,"componentInfo",{get:function(){var e=this;return n.Builder.components.find(function(t){return t.name===e.componentName})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{set:function(e){this.componentOptions=e},enumerable:!0,configurable:!0}),e.prototype.loadComponent=function(){var e=this.componentInfo,t=e&&e["class"];if(t){var n=this.componentFactoryResolver.resolveComponentFactory(t);if(n){var o=this.container;o.clear();var r=o.createComponent(n);this.componentOptions&&Object.assign(r.instance,this.componentOptions)}}},e.prototype.ngOnInit=function(){this.loadComponent()},e}();R.decorators=[{type:t.Component,args:[{selector:"builder-render",template:"<div #container></div>\n",styles:[":host{\n display:block;\n}\nbody.builder-editing-page :host{\n position:relative;\n width:100%;\n}\nbody.builder-editing-page :host::after{\n content:'';\n display:-webkit-box;\n display:-ms-flexbox;\n display:flex;\n position:absolute;\n top:0;\n left:0;\n bottom:0;\n right:0;\n pointer-events:none;\n -webkit-box-shadow:inset 0 0 0 1px rgba(70, 172, 194, 0.1);\n box-shadow:inset 0 0 0 1px rgba(70, 172, 194, 0.1);\n}\nbody.builder-editing-page :host:hover::after{\n content:'';\n cursor:pointer;\n -webkit-box-shadow:inset 0 0 0 1px rgba(70, 172, 194, 0.5);\n box-shadow:inset 0 0 0 1px rgba(70, 172, 194, 0.5);\n}\n"]}]}],R.ctorParameters=function(){return[{type:t.ComponentFactoryResolver}]},R.propDecorators={container:[{type:t.ViewChild,args:["container",{read:t.ViewContainerRef}]}],component:[{type:t.Input}],onClick:[{type:t.HostListener,args:["click",["$event"]]}],options:[{type:t.Input}]},e.ɵf=function(){function e(){}return e.prototype.ngOnInit=function(){},e}(),e.ɵf.decorators=[{type:t.Component,args:[{selector:"builder-builder-rich-text",template:'<div [innerHTML]="content">\n',styles:[""]}]}],e.ɵf.ctorParameters=function(){return[]},e.ɵf.propDecorators={content:[{type:t.Input}]},e.ɵf=f([i.BuilderComponent({name:"Rich Text",inputs:[{name:"content",type:"html"}]})],e.ɵf),e.ɵg=function(){function e(){this.gutterSize=10,this.columns=[]}return Object.defineProperty(e.prototype,"numColumns",{get:function(){return this.columns.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gridTemplateColumns",{get:function(){var e=100/this.columns.length;return this.columns.map(function(t){return e+"%"}).join(" ")},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){},e}(),e.ɵg.decorators=[{type:t.Component,args:[{selector:"builder-builder-columns",template:'<div class="container" [ngStyle]="{ gridGap: gutterSize + \'px\', gridTemplateColumns: gridTemplateColumns }">\n <div *ngFor="let column of columns" class="column">\n <builder-render *ngFor="let component of column.content" [component]="component.component?.component" [options]="component.component?.options"></builder-render>\n </div>\n</div>\n',styles:[".container{\n display:grid;\n}\n"]}]}],e.ɵg.ctorParameters=function(){return[]},e.ɵg.propDecorators={gutterSize:[{type:t.Input}],columns:[{type:t.Input}]},e.ɵg=f([i.BuilderComponent({name:"Columns",inputs:[{name:"gutterSize",type:"number"},{name:"columns",type:"list",subFields:[{name:"content",type:"list",subFields:[{name:"component",type:"component"}]}]}]}),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[])],e.ɵg);var C=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:g,useValue:t}]}},e}();C.decorators=[{type:t.NgModule,args:[{imports:[d.CommonModule],providers:[x,h],declarations:[b,w,R,e.ɵf,e.ɵg],exports:[b,w,R,e.ɵf],entryComponents:[e.ɵg,e.ɵf]}]}],C.ctorParameters=function(){return[]},e.BuilderComponent=i.BuilderComponent,e.BuilderModule=C,e.BUILDER_API_KEY=g,e.EXPRESS_REQUEST=y,e.EXPRESS_RESPONSE=v,e.BuilderService=x,e.ɵb=b,e.ɵe=R,e.ɵd=k,e.ɵc=w,e.ɵa=h,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=builder.io-angular.umd.min.js.map |
@@ -328,3 +328,3 @@ import { Injectable, Component, Output, EventEmitter, ElementRef, Renderer, Inject, Optional, Directive, Input, TemplateRef, ViewContainerRef, ContentChild, ViewChild, ComponentFactoryResolver, HostListener, NgModule } from '@angular/core'; | ||
const /** @type {?} */ rootNode = /** @type {?} */ ((this._viewRef)).rootNodes[0]; | ||
this.renderer.setElementAttribute(rootNode, 'builder-model', model); | ||
this.renderer.setElementAttribute(rootNode, 'builder-model', model.replace(/-/g, ' ')); | ||
this.renderer.listen(rootNode, 'click', () => this.onClick()); | ||
@@ -331,0 +331,0 @@ } |
@@ -310,3 +310,3 @@ import * as tslib_1 from "tslib"; | ||
var /** @type {?} */ rootNode = ((this._viewRef)).rootNodes[0]; | ||
this.renderer.setElementAttribute(rootNode, 'builder-model', model); | ||
this.renderer.setElementAttribute(rootNode, 'builder-model', model.replace(/-/g, ' ')); | ||
this.renderer.listen(rootNode, 'click', function () { return _this.onClick(); }); | ||
@@ -313,0 +313,0 @@ }, |
{ | ||
"name": "@builder.io/angular", | ||
"version": "0.0.35", | ||
"version": "0.0.36", | ||
"scripts": { | ||
@@ -24,3 +24,3 @@ "ng": "ng", | ||
"@angular/router": "^5.2.9", | ||
"@builder.io/sdk": "0.0.39", | ||
"@builder.io/sdk": "0.0.40", | ||
"cookies": "^0.7.1", | ||
@@ -27,0 +27,0 @@ "core-js": "^2.4.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
252548
+ Added@builder.io/sdk@0.0.40(transitive)
- Removed@builder.io/sdk@0.0.39(transitive)
Updated@builder.io/sdk@0.0.40