@sitecore-jss/sitecore-jss-angular 20.3.1-canary.3 → 20.3.1

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 (57) hide show
  1. package/LICENSE.txt +202 -202
  2. package/README.md +8 -8
  3. package/dist/README.md +8 -8
  4. package/dist/bundles/sitecore-jss-sitecore-jss-angular.umd.js +1444 -1440
  5. package/dist/bundles/sitecore-jss-sitecore-jss-angular.umd.js.map +1 -1
  6. package/dist/bundles/sitecore-jss-sitecore-jss-angular.umd.min.js +1 -1
  7. package/dist/components/date.directive.d.ts +17 -17
  8. package/dist/components/file.directive.d.ts +14 -14
  9. package/dist/components/generic-link.directive.d.ts +18 -18
  10. package/dist/components/hidden-rendering.component.d.ts +4 -4
  11. package/dist/components/image.directive.d.ts +32 -32
  12. package/dist/components/link.directive.d.ts +22 -22
  13. package/dist/components/missing-component.component.d.ts +4 -4
  14. package/dist/components/placeholder-loading.directive.d.ts +5 -5
  15. package/dist/components/placeholder.component.d.ts +46 -46
  16. package/dist/components/placeholder.token.d.ts +31 -31
  17. package/dist/components/raw.component.d.ts +9 -9
  18. package/dist/components/render-component.component.d.ts +31 -31
  19. package/dist/components/render-each.directive.d.ts +5 -5
  20. package/dist/components/render-empty.directive.d.ts +5 -5
  21. package/dist/components/rendering-field.d.ts +40 -40
  22. package/dist/components/rendering.d.ts +5 -5
  23. package/dist/components/rich-text.directive.d.ts +12 -12
  24. package/dist/components/router-link.directive.d.ts +16 -16
  25. package/dist/components/text.directive.d.ts +13 -13
  26. package/dist/esm2015/components/date.directive.js +52 -52
  27. package/dist/esm2015/components/file.directive.js +44 -44
  28. package/dist/esm2015/components/generic-link.directive.js +57 -57
  29. package/dist/esm2015/components/hidden-rendering.component.js +16 -16
  30. package/dist/esm2015/components/image.directive.js +122 -122
  31. package/dist/esm2015/components/link.directive.js +101 -101
  32. package/dist/esm2015/components/missing-component.component.js +12 -12
  33. package/dist/esm2015/components/placeholder-loading.directive.js +14 -14
  34. package/dist/esm2015/components/placeholder.component.js +197 -197
  35. package/dist/esm2015/components/placeholder.token.js +21 -21
  36. package/dist/esm2015/components/raw.component.js +36 -36
  37. package/dist/esm2015/components/render-component.component.js +88 -88
  38. package/dist/esm2015/components/render-each.directive.js +14 -14
  39. package/dist/esm2015/components/render-empty.directive.js +14 -14
  40. package/dist/esm2015/components/rendering-field.js +1 -1
  41. package/dist/esm2015/components/rendering.js +7 -7
  42. package/dist/esm2015/components/rich-text.directive.js +40 -40
  43. package/dist/esm2015/components/router-link.directive.js +43 -43
  44. package/dist/esm2015/components/text.directive.js +53 -53
  45. package/dist/esm2015/jss-component-factory.service.js +87 -87
  46. package/dist/esm2015/lib.module.js +114 -114
  47. package/dist/esm2015/public_api.js +19 -19
  48. package/dist/esm2015/sitecore-jss-sitecore-jss-angular.js +13 -13
  49. package/dist/fesm2015/sitecore-jss-sitecore-jss-angular.js +1051 -1051
  50. package/dist/jss-component-factory.service.d.ts +21 -21
  51. package/dist/lib.module.d.ts +24 -24
  52. package/dist/package.json +2 -2
  53. package/dist/public_api.d.ts +19 -19
  54. package/dist/sitecore-jss-sitecore-jss-angular.d.ts +13 -13
  55. package/dist/sitecore-jss-sitecore-jss-angular.metadata.json +1 -1
  56. package/package.json +3 -3
  57. package/typings/README.md +2 -2
@@ -13,5 +13,5 @@
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
15
  ***************************************************************************** */
16
- var f=function(e,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},f(e,t)};function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function h(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}Object.create;var g=function(){function e(e,t,n,r){this.viewContainer=e,this.templateRef=t,this.renderer=n,this.elementRef=r,this.inlineRef=null,this.editable=!0,this.urlParams={},this.attrs={}}return e.prototype.ngOnChanges=function(e){(e.field||e.editable||e.urlParams||e.attrs)&&(this.viewContainer.clear(),this.inlineRef&&(this.inlineRef.remove(),this.inlineRef=null),this.updateView())},e.prototype.updateView=function(){var e=Object.assign(Object.assign({},this.getElementAttrs()),this.attrs),t=this.field;if(t&&(t.editable||t.value||t.src)){var r={};if(this.editable&&t.editable){var i=n.mediaApi.findEditorImageTag(t.editable);if(!i)return this.renderInlineWrapper(t.editable);if(!(r=this.getImageAttrs(i.attrs,e,this.urlParams)))return this.renderInlineWrapper(t.editable);var o=this.renderer.createElement("img");Object.entries(r).forEach((function(e){var t=h(e,2),n=t[0],r=t[1];return o.setAttribute(n,r)}));var s=t.editable.replace(i.imgTag,o.outerHTML);return this.renderInlineWrapper(s)}var a=t.src?t:t.value;if(!a)return null;(r=this.getImageAttrs(a,e,this.urlParams))&&this.renderTemplate(r)}},e.prototype.getImageAttrs=function(e,t,r){var i=Object.assign(Object.assign({},e),t),o=i.src,s=i.srcSet,a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(i,["src","srcSet"]);if(!o)return null;var c=Object.assign({},a);return o=n.mediaApi.updateImageUrl(o,r,this.mediaUrlPrefix),s?c.srcSet=n.mediaApi.getSrcSet(o,s,r,this.mediaUrlPrefix):c.src=o,c},e.prototype.renderTemplate=function(e){var t=this;this.viewContainer.createEmbeddedView(this.templateRef).rootNodes.forEach((function(n){Object.entries(e).forEach((function(e){var r=h(e,2),i=r[0],o=r[1];return t.renderer.setAttribute(n,i,o)}))}))},e.prototype.getElementAttrs=function(){var e=this.templateRef.createEmbeddedView(null).rootNodes[0];if(!e)return{};for(var t={},n=0;n<e.attributes.length;n++){var r=e.attributes.item(n);r&&(t[r.name]=r.value)}return t},e.prototype.renderInlineWrapper=function(e){var t=this.renderer.createElement("span");t.className="sc-image-wrapper",t.innerHTML=e;var n=this.renderer.parentNode(this.elementRef.nativeElement);this.renderer.insertBefore(n,t,this.elementRef.nativeElement),n.removeChild(this.elementRef.nativeElement),this.inlineRef=t},e}();g.decorators=[{type:t.Directive,args:[{selector:"[scImage]"}]}],g.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:t.Renderer2},{type:t.ElementRef}]},g.propDecorators={field:[{type:t.Input,args:["scImage"]}],editable:[{type:t.Input,args:["scImageEditable"]}],mediaUrlPrefix:[{type:t.Input,args:["scImageMediaUrlPrefix"]}],urlParams:[{type:t.Input,args:["scImageUrlParams"]}],attrs:[{type:t.Input,args:["scImageAttrs"]}]};var v=function(){function e(e,t,n,r){this.viewContainer=e,this.templateRef=t,this.renderer=n,this.elementRef=r,this.inlineRef=null,this.editable=!0,this.attrs={}}return e.prototype.ngOnChanges=function(e){(e.field||e.editable||e.attrs)&&(this.viewContainer.clear(),this.inlineRef&&(this.inlineRef.remove(),this.inlineRef=null),this.updateView())},e.prototype.updateView=function(){var e,t,n=this.field;if(this.editable&&n&&n.editableFirstPart&&n.editableLastPart)this.renderInlineWrapper(n.editableFirstPart,n.editableLastPart);else if(n&&(n.href||n.value)){var r=n.href?n:n.value,i=n.text||(null===(e=n.value)||void 0===e?void 0:e.text)||n.href||(null===(t=n.value)||void 0===t?void 0:t.href),o=Object.assign(Object.assign({},r),this.attrs);this.renderTemplate(o,i)}},e.prototype.renderTemplate=function(e,t){var n=this;this.viewContainer.createEmbeddedView(this.templateRef).rootNodes.forEach((function(r){Object.entries(e).forEach((function(e){var t=h(e,2),i=t[0],o=t[1];if("string"==typeof o){if("href"===i)if(!o||/^https?:\/\/$/.test(o)){if(!r.href)return;o=r.href}"class"===i&&r.className&&(o+=" "+r.className),n.renderer.setAttribute(r,i,o)}})),r.childNodes&&0===r.childNodes.length&&t&&(r.textContent=t)}))},e.prototype.renderInlineWrapper=function(e,t){var n=this,r=this.renderer.createElement("span");r.className="sc-link-wrapper",r.innerHTML=e+t;var i=Object.assign(Object.assign({},this.getElementAttrs()),this.attrs);Object.entries(i).forEach((function(e){var t=h(e,2),i=t[0],o=t[1];return n.renderer.setAttribute(r,i,o)})),this.viewContainer.createEmbeddedView(this.templateRef);var o=this.renderer.parentNode(this.elementRef.nativeElement);this.renderer.insertBefore(o,r,this.elementRef.nativeElement),this.inlineRef=r},e.prototype.getElementAttrs=function(){var e=this.templateRef.createEmbeddedView(null).rootNodes[0];if(!e)return{};for(var t={},n=0;n<e.attributes.length;n++){var r=e.attributes.item(n);r&&(t[r.name]=r.value)}return t},e}();v.decorators=[{type:t.Directive,args:[{selector:"[scLink]"}]}],v.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:t.Renderer2},{type:t.ElementRef}]},v.propDecorators={editable:[{type:t.Input,args:["scLinkEditable"]}],attrs:[{type:t.Input,args:["scLinkAttrs"]}],field:[{type:t.Input,args:["scLink"]}]};var b=function(e){function t(t,n,r,i,o){var s=e.call(this,t,n,r,i)||this;return s.router=o,s.editable=!0,s.attrs={},s}return m(t,e),t.prototype.renderTemplate=function(e,t){var n=this;this.viewContainer.createEmbeddedView(this.templateRef).rootNodes.forEach((function(r){Object.entries(e).forEach((function(e){var t=h(e,2),i=t[0],o=t[1];n.renderer.setAttribute(r,i,o),"href"===i&&n.renderer.listen(r,"click",(function(e){n.router.navigateByUrl(o),e.preventDefault()}))})),r.childNodes&&0===r.childNodes.length&&t&&(r.textContent=t)}))},t}(v);b.decorators=[{type:t.Directive,args:[{selector:"[scRouterLink]"}]}],b.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:t.Renderer2},{type:t.ElementRef},{type:r.Router}]},b.propDecorators={editable:[{type:t.Input,args:["scRouterLinkEditable"]}],attrs:[{type:t.Input,args:["scRouterLinkAttrs"]}],field:[{type:t.Input,args:["scRouterLink"]}]};var C=function(e){function t(t,n,r,i,o){var s=e.call(this,t,n,r,i)||this;return s.router=o,s.editable=!0,s.attrs={},s}return m(t,e),t.prototype.renderTemplate=function(e,t){var n=this;this.viewContainer.createEmbeddedView(this.templateRef).rootNodes.forEach((function(r){Object.entries(e).forEach((function(e){var t=h(e,2),i=t[0],o=t[1];if("href"!==i||n.isAbsoluteUrl(o))n.renderer.setAttribute(r,i,o);else{var s=n.router.createUrlTree([o],n.extras);n.renderer.setAttribute(r,i,n.router.serializeUrl(s)),n.renderer.listen(r,"click",(function(e){n.router.navigate([o],n.extras),e.preventDefault()}))}})),r.childNodes&&0===r.childNodes.length&&t&&(r.textContent=t)}))},t.prototype.isAbsoluteUrl=function(e){if(null===e)return!1;if("string"!=typeof e)throw new TypeError("Expected a string");return/^[a-z][a-z0-9+.-]*:/.test(e)},t}(v);C.decorators=[{type:t.Directive,args:[{selector:"[scGenericLink]"}]}],C.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:t.Renderer2},{type:t.ElementRef},{type:r.Router}]},C.propDecorators={editable:[{type:t.Input,args:["scGenericLinkEditable"]}],attrs:[{type:t.Input,args:["scGenericLinkAttrs"]}],field:[{type:t.Input,args:["scGenericLink"]}],extras:[{type:t.Input,args:["scGenericLinkExtras"]}]};var R=function(){};var w=new t.InjectionToken("Sc.placeholder.components"),E=new t.InjectionToken("Sc.placeholder.lazyComponents"),j=new t.InjectionToken("Sc.placeholder.missingComponentComponent"),I=new t.InjectionToken("Sc.placeholder.hiddenRenderingComponent"),O=new t.InjectionToken("Sc.placeholder.dynamicComponent"),P=function(){function e(e,t){this.renderer=e,this.elementRef=t}return e.prototype.ngOnInit=function(){var e=this.renderer.createElement(this.rendering.name),t=this.renderer.createText(this.rendering.contents||""),n=this.rendering.attributes;for(var r in n)if(n.hasOwnProperty(r)){var i=n[r];this.renderer.setAttribute(e,r,i||"")}this.renderer.appendChild(e,t);var o=this.renderer.parentNode(this.elementRef.nativeElement);this.renderer.insertBefore(o,e,this.elementRef.nativeElement),o.removeChild(this.elementRef.nativeElement)},e}();function D(e){return!e.componentName&&void 0!==e.name}P.decorators=[{type:t.Component,args:[{selector:"sc-raw",template:""}]}],P.ctorParameters=function(){return[{type:t.Renderer2},{type:t.ElementRef}]},P.propDecorators={rendering:[{type:t.Input}]};var T=function(){function e(e,t,n,r){var i=this;this.injector=e,this.compiler=t,this.components=n,this.lazyComponents=r,this.componentMap=new Map,this.lazyComponentMap=new Map,this.components.forEach((function(e){return i.componentMap.set(e.name,e.type)})),this.lazyComponents&&this.lazyComponents.forEach((function(e){return i.lazyComponentMap.set(e.path,e)}))}return e.prototype.loadModuleFactory=function(e){var n=this;return e.loadChildren().then((function(e){return e instanceof t.NgModuleFactory?e:n.compiler.compileModuleAsync(e)}))},e.prototype.getComponent=function(e){var t=this;if(this.componentMap.get(e.componentName))return Promise.resolve({componentDefinition:e,componentImplementation:this.componentMap.get(e.componentName)});var n=this.lazyComponentMap.get(e.componentName);return n?this.loadModuleFactory(n).then((function(r){var i=null,o=r.create(t.injector),s=o.injector.get(O);if(!s)throw new Error('JssComponentFactoryService: Lazy load module for component "'+n.path+'" missing DYNAMIC_COMPONENT provider. Missing JssModule.forChild()?');if(e.componentName in s)i=s[e.componentName];else{if("function"!=typeof s)throw new Error('JssComponentFactoryService: Lazy load module for component "'+n.path+'" missing DYNAMIC_COMPONENT provider. Missing JssModule.forChild()?');i=s}return{componentDefinition:e,componentImplementation:i,componentFactory:o.componentFactoryResolver.resolveComponentFactory(i)}})):Promise.resolve({componentDefinition:e})},e.prototype.getComponents=function(e){var t=this;return Promise.all(e.map((function(e){return D(e)?t.getRawComponent(e):t.getComponent(e)})))},e.prototype.getRawComponent=function(e){return Promise.resolve({componentImplementation:P,componentDefinition:e})},e}();T.decorators=[{type:t.Injectable}],T.ctorParameters=function(){return[{type:t.Injector},{type:t.Compiler},{type:Array,decorators:[{type:t.Inject,args:[w]}]},{type:Array,decorators:[{type:t.Inject,args:[E]}]}]};var _=function(){function e(){}return Object.defineProperty(e.prototype,"style",{get:function(){return"display: block; height: 100px; background-image: linear-gradient(45deg, #ffffff 25%, #dcdcdc 25%, #dcdcdc 50%, #ffffff 50%, #ffffff 75%, #dcdcdc 75%, #dcdcdc 100%); background-size: 3px 3px;"},enumerable:!1,configurable:!0}),e}();_.decorators=[{type:t.Component,args:[{selector:"sc-hidden-rendering",template:""}]}],_.propDecorators={style:[{type:t.HostBinding,args:["style"]}]};var N=function(e){this.templateRef=e};N.decorators=[{type:t.Directive,args:[{selector:"[scPlaceholderLoading]"}]}],N.ctorParameters=function(){return[{type:t.TemplateRef}]};var x=function(e){this.templateRef=e};x.decorators=[{type:t.Directive,args:[{selector:"[renderEach]"}]}],x.ctorParameters=function(){return[{type:t.TemplateRef}]};var A=function(e){this.templateRef=e};A.decorators=[{type:t.Directive,args:[{selector:"[renderEmpty]"}]}],A.ctorParameters=function(){return[{type:t.TemplateRef}]};var V=function(){function e(e,n,r,i,o,s,a,c){this.componentFactoryResolver=e,this.differs=n,this.componentFactory=r,this.changeDetectorRef=i,this.elementRef=o,this.renderer=s,this.missingComponentComponent=a,this.hiddenRenderingComponent=c,this._componentInstances=[],this.destroyed=!1,this.parentStyleAttribute="",this.isLoading=!0,this.loaded=new t.EventEmitter}return Object.defineProperty(e.prototype,"inputs",{set:function(e){this._inputs=e,!this._differ&&e&&(this._differ=this.differs.find(e).create())},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e=this.elementRef.nativeElement;if(e)for(var t=e.attributes,n=0;n<t.length;n++){var r=t.item(n);r&&-1!==r.name.indexOf("_ngcontent")&&(this.parentStyleAttribute=r.name)}},e.prototype.ngOnDestroy=function(){this.destroyed=!0,this._componentInstances=[]},e.prototype.ngOnChanges=function(e){(e.rendering||e.renderings)&&this._render()},e.prototype.ngDoCheck=function(){var e=this;if(this._differ&&this._inputs&&0!==this._componentInstances.length){var t=this._differ.diff(this._inputs);if(t){var n={};t.forEachRemovedItem((function(e){return n[e.key]=null})),t.forEachAddedItem((function(e){return n[e.key]=e.currentValue})),t.forEachChangedItem((function(e){return n[e.key]=e.currentValue})),this._componentInstances.forEach((function(t){return e._setComponentInputs(t,n)}))}}},e.prototype._setComponentInputs=function(e,t){Object.entries(t).forEach((function(t){var n=h(t,2),r=n[0],i=n[1];return e[r]=i}))},e.prototype._subscribeComponentOutputs=function(e,t){var n=this;Object.keys(t).filter((function(t){return e[t]&&e[t]instanceof i.Observable})).forEach((function(r){return e[r].pipe(o.takeWhile((function(){return!n.destroyed}))).subscribe(t[r])}))},e.prototype._render=function(){var e=this;if(this._componentInstances=[],this.view.clear(),this.rendering||this.renderings){if(!this.name&&!this.renderings)return console.warn("Placeholder name was not specified, and explicit renderings array was not passed. Placeholder requires either name and rendering, or renderings."),void(this.isLoading=!1);var t,n,r=this.renderings||(t=this.rendering,n=this.name||"",t&&t.placeholders&&Object.keys(t.placeholders).length>0?t.placeholders[n]:null);if(!r)return console.warn("Placeholder '"+this.name+"' was not found in the current rendering data",JSON.stringify(this.rendering,null,2)),void(this.isLoading=!1);var i=r.every((function(e){return D(e)}));this.renderEmptyTemplate&&i?(this.view.createEmbeddedView(this.renderEmptyTemplate.templateRef,{renderings:r}),this.isLoading=!1):this.componentFactory.getComponents(r).then((function(t){return t.forEach((function(t,n){e.renderEachTemplate&&!D(t.componentDefinition)?e._renderTemplatedComponent(t.componentDefinition,n):e._renderEmbeddedComponent(t,n),e.isLoading=!1}))})).then((function(){e.changeDetectorRef.markForCheck(),e.loaded.emit(e.name)}))}},e.prototype._renderTemplatedComponent=function(e,t){this.view.createEmbeddedView(this.renderEachTemplate.templateRef,{rendering:e,index:t})},e.prototype._renderEmbeddedComponent=function(e,t){if("Hidden Rendering"===e.componentDefinition.componentName&&(e.componentImplementation=this.hiddenRenderingComponent),!e.componentImplementation){var n=e.componentDefinition.componentName;console.error("Placeholder "+this.name+" contains unknown component "+n+".","Ensure component is mapped, like:\n JssModule.withComponents([\n { name: '"+n+"', type: "+n+"Component }\n ])"),e.componentImplementation=this.missingComponentComponent}var r=e.componentFactory||this.componentFactoryResolver.resolveComponentFactory(e.componentImplementation),i=this.view.createComponent(r,t);this.parentStyleAttribute&&this.renderer.setAttribute(i.location.nativeElement,this.parentStyleAttribute,"");var o=i.instance;o.rendering=e.componentDefinition,this._inputs&&this._setComponentInputs(o,this._inputs),this.outputs&&this._subscribeComponentOutputs(o,this.outputs),this._componentInstances.push(o)},e}();V.decorators=[{type:t.Component,args:[{selector:"sc-placeholder,[sc-placeholder]",template:'\n <ng-template\n *ngIf="isLoading"\n [ngTemplateOutlet]="placeholderLoading?.templateRef"\n ></ng-template>\n <ng-template #view></ng-template>\n '}]}],V.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.KeyValueDiffers},{type:T},{type:t.ChangeDetectorRef},{type:t.ElementRef},{type:t.Renderer2},{type:t.Type,decorators:[{type:t.Inject,args:[j]}]},{type:t.Type,decorators:[{type:t.Inject,args:[I]}]}]},V.propDecorators={name:[{type:t.Input}],rendering:[{type:t.Input}],renderings:[{type:t.Input}],outputs:[{type:t.Input}],loaded:[{type:t.Output}],view:[{type:t.ViewChild,args:["view",{read:t.ViewContainerRef,static:!0}]}],renderEachTemplate:[{type:t.ContentChild,args:[x,{static:!0}]}],renderEmptyTemplate:[{type:t.ContentChild,args:[A,{static:!0}]}],placeholderLoading:[{type:t.ContentChild,args:[N,{static:!0}]}],inputs:[{type:t.Input}]};var L=function(){function e(e,t){this.viewContainer=e,this.templateRef=t,this.editable=!0}return e.prototype.ngOnChanges=function(e){(e.field||e.editable)&&(this.viewRef||(this.viewContainer.clear(),this.viewRef=this.viewContainer.createEmbeddedView(this.templateRef)),this.updateView())},e.prototype.updateView=function(){var e=this.field;if(e&&(e.editable||e.value)){var t=e.editable&&this.editable?e.editable:e.value;this.viewRef.rootNodes.forEach((function(e){e.innerHTML=t}))}},e}();L.decorators=[{type:t.Directive,args:[{selector:"[scRichText]"}]}],L.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef}]},L.propDecorators={editable:[{type:t.Input,args:["scRichTextEditable"]}],field:[{type:t.Input,args:["scRichText"]}]};var k=function(){function e(e,t){this.viewContainer=e,this.templateRef=t,this.editable=!0,this.encode=!0}return e.prototype.ngOnChanges=function(e){(e.field||e.editable||e.encode)&&(this.viewRef||(this.viewContainer.clear(),this.viewRef=this.viewContainer.createEmbeddedView(this.templateRef)),this.updateView())},e.prototype.updateView=function(){var e=this.field,t=this.editable;if(e&&(e.editable||void 0!==e.value&&""!==e.value)){this.encode||(t=!1);var n=e.editable&&t?e.editable:e.value,r=e.editable&&t||!this.encode;this.viewRef.rootNodes.forEach((function(e){r?e.innerHTML=n:e.textContent=n}))}},e}();k.decorators=[{type:t.Directive,args:[{selector:"[scText]"}]}],k.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef}]},k.propDecorators={editable:[{type:t.Input,args:["scTextEditable"]}],encode:[{type:t.Input,args:["scTextEncode"]}],field:[{type:t.Input,args:["scText"]}]};var M=function(){function e(e,t,n){this.viewContainer=e,this.templateRef=t,this.datePipe=n,this.editable=!0}return e.prototype.ngOnChanges=function(e){(e.field||e.format)&&(this.viewRef||(this.viewContainer.clear(),this.viewRef=this.viewContainer.createEmbeddedView(this.templateRef)),this.updateView())},e.prototype.updateView=function(){var e=this,t=this.field;if(t&&(t.editable||t.value)){var n=t.editable&&this.editable?t.editable:t.value,r=t.editable&&this.editable;this.viewRef.rootNodes.forEach((function(t){r?t.innerHTML=n:t.textContent=e.datePipe.transform(n,e.format,e.timezone,e.locale)}))}},e}();M.decorators=[{type:t.Directive,args:[{selector:"[scDate]"}]}],M.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:s.DatePipe}]},M.propDecorators={format:[{type:t.Input,args:["scDateFormat"]}],timezone:[{type:t.Input,args:["scDateTimezone"]}],locale:[{type:t.Input,args:["scDateLocale"]}],editable:[{type:t.Input,args:["scDateEditable"]}],field:[{type:t.Input,args:["scDate"]}]};var S=function(){};S.decorators=[{type:t.Component,args:[{selector:"sc-missing-component",template:'\n <div\n style="background: darkorange; outline: 5px solid orange; padding: 10px; color: white; max-width: 500px;"\n >\n <h2>{{ rendering.componentName }}</h2>\n <p>JSS component is missing Angular component implementation.</p>\n </div>\n '}]}],S.propDecorators={rendering:[{type:t.Input}]};var F=function(){function e(e,t,n,r){this.componentFactoryResolver=e,this.differs=t,this.componentFactory=n,this.missingComponentComponent=r,this.destroyed=!1}return Object.defineProperty(e.prototype,"inputs",{set:function(e){this._inputs=e,!this._differ&&e&&(this._differ=this.differs.find(e).create())},enumerable:!1,configurable:!0}),e.prototype.ngOnChanges=function(e){e.rendering&&this._render()},e.prototype._setComponentInputs=function(e,t){Object.entries(t).forEach((function(t){var n=h(t,2),r=n[0],i=n[1];return e[r]=i}))},e.prototype._subscribeComponentOutputs=function(e,t){var n=this;Object.keys(t).filter((function(t){return e[t]&&e[t]instanceof i.Observable})).forEach((function(r){return e[r].pipe(o.takeWhile((function(){return!n.destroyed}))).subscribe(t[r])}))},e.prototype._render=function(){var e=this;(this.view.clear(),this.rendering)&&(D(this.rendering)?Promise.resolve({componentImplementation:P,componentDefinition:this.rendering}):this.componentFactory.getComponent(this.rendering)).then((function(t){if(!t.componentImplementation){var n=t.componentDefinition.componentName;console.error("Attempted to render unknown component "+n+".","Ensure component is mapped, like:\n JssModule.withComponents([\n { name: '"+n+"', type: "+n+"Component }\n ])"),t.componentImplementation=e.missingComponentComponent}var r=t.componentFactory||e.componentFactoryResolver.resolveComponentFactory(t.componentImplementation),i=e.view.createComponent(r,0).instance;i.rendering=t.componentDefinition,e._inputs&&e._setComponentInputs(i,e._inputs),e.outputs&&e._subscribeComponentOutputs(i,e.outputs)}))},e}();F.decorators=[{type:t.Component,args:[{selector:"sc-render-component",template:"\n <ng-template #view></ng-template>\n "}]}],F.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.KeyValueDiffers},{type:T},{type:t.Type,decorators:[{type:t.Inject,args:[j]}]}]},F.propDecorators={rendering:[{type:t.Input}],outputs:[{type:t.Input}],view:[{type:t.ViewChild,args:["view",{read:t.ViewContainerRef,static:!0}]}],inputs:[{type:t.Input}]};var z=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[s.DatePipe,T]}},e.forChild=function(n){return{ngModule:e,providers:[{provide:t.ANALYZE_FOR_ENTRY_COMPONENTS,useValue:n,multi:!0},{provide:r.ROUTES,useValue:[],multi:!0},{provide:O,useValue:n}]}},e.withComponents=function(n,i){return{ngModule:e,providers:y([{provide:t.ANALYZE_FOR_ENTRY_COMPONENTS,useValue:n,multi:!0},{provide:w,useValue:n},{provide:E,useValue:i||[]},{provide:r.ROUTES,useValue:i||[],multi:!0},{provide:j,useValue:S},{provide:I,useValue:_}],e.forRoot().providers)}},e}();z.decorators=[{type:t.NgModule,args:[{imports:[s.CommonModule],declarations:[d,g,v,b,C,M,x,A,N,F,V,P,L,k,S,_],exports:[d,g,M,v,b,C,x,A,F,V,_,N,L,k],entryComponents:[P,S]}]}],Object.defineProperty(e,"mediaApi",{enumerable:!0,get:function(){return n.mediaApi}}),Object.defineProperty(e,"GraphQLDictionaryService",{enumerable:!0,get:function(){return a.GraphQLDictionaryService}}),Object.defineProperty(e,"RestDictionaryService",{enumerable:!0,get:function(){return a.RestDictionaryService}}),Object.defineProperty(e,"GraphQLLayoutService",{enumerable:!0,get:function(){return c.GraphQLLayoutService}}),Object.defineProperty(e,"RestLayoutService",{enumerable:!0,get:function(){return c.RestLayoutService}}),Object.defineProperty(e,"getChildPlaceholder",{enumerable:!0,get:function(){return c.getChildPlaceholder}}),Object.defineProperty(e,"getFieldValue",{enumerable:!0,get:function(){return c.getFieldValue}}),Object.defineProperty(e,"DefaultRetryStrategy",{enumerable:!0,get:function(){return p.DefaultRetryStrategy}}),Object.defineProperty(e,"constants",{enumerable:!0,get:function(){return l.constants}}),Object.defineProperty(e,"handleEditorAnchors",{enumerable:!0,get:function(){return u.handleEditorAnchors}}),Object.defineProperty(e,"isEditorActive",{enumerable:!0,get:function(){return u.isEditorActive}}),Object.defineProperty(e,"isExperienceEditorActive",{enumerable:!0,get:function(){return u.isExperienceEditorActive}}),Object.defineProperty(e,"isServer",{enumerable:!0,get:function(){return u.isServer}}),Object.defineProperty(e,"resetEditorChromes",{enumerable:!0,get:function(){return u.resetEditorChromes}}),Object.defineProperty(e,"resetExperienceEditorChromes",{enumerable:!0,get:function(){return u.resetExperienceEditorChromes}}),e.ComponentNameAndType=R,e.DYNAMIC_COMPONENT=O,e.FileDirective=d,e.GenericLinkDirective=C,e.ImageDirective=g,e.JssModule=z,e.LinkDirective=v,e.PlaceholderComponent=V,e.PlaceholderLoadingDirective=N,e.RichTextDirective=L,e.RouterLinkDirective=b,e.TextDirective=k,e.isRawRendering=D,e["ɵb"]=w,e["ɵc"]=E,e["ɵd"]=j,e["ɵe"]=I,e["ɵf"]=x,e["ɵg"]=A,e["ɵh"]=T,e["ɵi"]=M,e["ɵj"]=F,e["ɵk"]=P,e["ɵl"]=S,e["ɵm"]=_,Object.defineProperty(e,"__esModule",{value:!0})}));
16
+ var f=function(e,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},f(e,t)};function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function h(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}Object.create;var g=function(){function e(e,t,n,r){this.viewContainer=e,this.templateRef=t,this.renderer=n,this.elementRef=r,this.inlineRef=null,this.editable=!0,this.urlParams={},this.attrs={}}return e.prototype.ngOnChanges=function(e){(e.field||e.editable||e.urlParams||e.attrs)&&(this.viewContainer.clear(),this.inlineRef&&(this.inlineRef.remove(),this.inlineRef=null),this.updateView())},e.prototype.updateView=function(){var e=Object.assign(Object.assign({},this.getElementAttrs()),this.attrs),t=this.field;if(t&&(t.editable||t.value||t.src)){var r={};if(this.editable&&t.editable){var i=n.mediaApi.findEditorImageTag(t.editable);if(!i)return this.renderInlineWrapper(t.editable);if(!(r=this.getImageAttrs(i.attrs,e,this.urlParams)))return this.renderInlineWrapper(t.editable);var o=this.renderer.createElement("img");Object.entries(r).forEach((function(e){var t=h(e,2),n=t[0],r=t[1];return o.setAttribute(n,r)}));var s=t.editable.replace(i.imgTag,o.outerHTML);return this.renderInlineWrapper(s)}var a=t.src?t:t.value;if(!a)return null;(r=this.getImageAttrs(a,e,this.urlParams))&&this.renderTemplate(r)}},e.prototype.getImageAttrs=function(e,t,r){var i=Object.assign(Object.assign({},e),t),o=i.src,s=i.srcSet,a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(i,["src","srcSet"]);if(!o)return null;var c=Object.assign({},a);return o=n.mediaApi.updateImageUrl(o,r,this.mediaUrlPrefix),s?c.srcSet=n.mediaApi.getSrcSet(o,s,r,this.mediaUrlPrefix):c.src=o,c},e.prototype.renderTemplate=function(e){var t=this;this.viewContainer.createEmbeddedView(this.templateRef).rootNodes.forEach((function(n){Object.entries(e).forEach((function(e){var r=h(e,2),i=r[0],o=r[1];return t.renderer.setAttribute(n,i,o)}))}))},e.prototype.getElementAttrs=function(){var e=this.templateRef.createEmbeddedView(null).rootNodes[0];if(!e)return{};for(var t={},n=0;n<e.attributes.length;n++){var r=e.attributes.item(n);r&&(t[r.name]=r.value)}return t},e.prototype.renderInlineWrapper=function(e){var t=this.renderer.createElement("span");t.className="sc-image-wrapper",t.innerHTML=e;var n=this.renderer.parentNode(this.elementRef.nativeElement);this.renderer.insertBefore(n,t,this.elementRef.nativeElement),n.removeChild(this.elementRef.nativeElement),this.inlineRef=t},e}();g.decorators=[{type:t.Directive,args:[{selector:"[scImage]"}]}],g.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:t.Renderer2},{type:t.ElementRef}]},g.propDecorators={field:[{type:t.Input,args:["scImage"]}],editable:[{type:t.Input,args:["scImageEditable"]}],mediaUrlPrefix:[{type:t.Input,args:["scImageMediaUrlPrefix"]}],urlParams:[{type:t.Input,args:["scImageUrlParams"]}],attrs:[{type:t.Input,args:["scImageAttrs"]}]};var v=function(){function e(e,t,n,r){this.viewContainer=e,this.templateRef=t,this.renderer=n,this.elementRef=r,this.inlineRef=null,this.editable=!0,this.attrs={}}return e.prototype.ngOnChanges=function(e){(e.field||e.editable||e.attrs)&&(this.viewContainer.clear(),this.inlineRef&&(this.inlineRef.remove(),this.inlineRef=null),this.updateView())},e.prototype.updateView=function(){var e,t,n=this.field;if(this.editable&&n&&n.editableFirstPart&&n.editableLastPart)this.renderInlineWrapper(n.editableFirstPart,n.editableLastPart);else if(n&&(n.href||n.value)){var r=n.href?n:n.value,i=n.text||(null===(e=n.value)||void 0===e?void 0:e.text)||n.href||(null===(t=n.value)||void 0===t?void 0:t.href),o=Object.assign(Object.assign({},r),this.attrs);this.renderTemplate(o,i)}},e.prototype.renderTemplate=function(e,t){var n=this;this.viewContainer.createEmbeddedView(this.templateRef).rootNodes.forEach((function(r){Object.entries(e).forEach((function(e){var t=h(e,2),i=t[0],o=t[1];if("string"==typeof o){if("href"===i)if(!o||/^https?:\/\/$/.test(o)){if(!r.href)return;o=r.href}"class"===i&&r.className&&(o+=" "+r.className),n.renderer.setAttribute(r,i,o)}})),r.childNodes&&0===r.childNodes.length&&t&&(r.textContent=t)}))},e.prototype.renderInlineWrapper=function(e,t){var n=this,r=this.renderer.createElement("span");r.className="sc-link-wrapper",r.innerHTML=e+t;var i=Object.assign(Object.assign({},this.getElementAttrs()),this.attrs);Object.entries(i).forEach((function(e){var t=h(e,2),i=t[0],o=t[1];return n.renderer.setAttribute(r,i,o)})),this.viewContainer.createEmbeddedView(this.templateRef);var o=this.renderer.parentNode(this.elementRef.nativeElement);this.renderer.insertBefore(o,r,this.elementRef.nativeElement),this.inlineRef=r},e.prototype.getElementAttrs=function(){var e=this.templateRef.createEmbeddedView(null).rootNodes[0];if(!e)return{};for(var t={},n=0;n<e.attributes.length;n++){var r=e.attributes.item(n);r&&(t[r.name]=r.value)}return t},e}();v.decorators=[{type:t.Directive,args:[{selector:"[scLink]"}]}],v.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:t.Renderer2},{type:t.ElementRef}]},v.propDecorators={editable:[{type:t.Input,args:["scLinkEditable"]}],attrs:[{type:t.Input,args:["scLinkAttrs"]}],field:[{type:t.Input,args:["scLink"]}]};var b=function(e){function t(t,n,r,i,o){var s=e.call(this,t,n,r,i)||this;return s.router=o,s.editable=!0,s.attrs={},s}return m(t,e),t.prototype.renderTemplate=function(e,t){var n=this;this.viewContainer.createEmbeddedView(this.templateRef).rootNodes.forEach((function(r){Object.entries(e).forEach((function(e){var t=h(e,2),i=t[0],o=t[1];n.renderer.setAttribute(r,i,o),"href"===i&&n.renderer.listen(r,"click",(function(e){n.router.navigateByUrl(o),e.preventDefault()}))})),r.childNodes&&0===r.childNodes.length&&t&&(r.textContent=t)}))},t}(v);b.decorators=[{type:t.Directive,args:[{selector:"[scRouterLink]"}]}],b.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:t.Renderer2},{type:t.ElementRef},{type:r.Router}]},b.propDecorators={editable:[{type:t.Input,args:["scRouterLinkEditable"]}],attrs:[{type:t.Input,args:["scRouterLinkAttrs"]}],field:[{type:t.Input,args:["scRouterLink"]}]};var C=function(e){function t(t,n,r,i,o){var s=e.call(this,t,n,r,i)||this;return s.router=o,s.editable=!0,s.attrs={},s}return m(t,e),t.prototype.renderTemplate=function(e,t){var n=this;this.viewContainer.createEmbeddedView(this.templateRef).rootNodes.forEach((function(r){Object.entries(e).forEach((function(e){var t=h(e,2),i=t[0],o=t[1];if("href"!==i||n.isAbsoluteUrl(o))n.renderer.setAttribute(r,i,o);else{var s=n.router.createUrlTree([o],n.extras);n.renderer.setAttribute(r,i,n.router.serializeUrl(s)),n.renderer.listen(r,"click",(function(e){n.router.navigate([o],n.extras),e.preventDefault()}))}})),r.childNodes&&0===r.childNodes.length&&t&&(r.textContent=t)}))},t.prototype.isAbsoluteUrl=function(e){if(null===e)return!1;if("string"!=typeof e)throw new TypeError("Expected a string");return/^[a-z][a-z0-9+.-]*:/.test(e)},t}(v);C.decorators=[{type:t.Directive,args:[{selector:"[scGenericLink]"}]}],C.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:t.Renderer2},{type:t.ElementRef},{type:r.Router}]},C.propDecorators={editable:[{type:t.Input,args:["scGenericLinkEditable"]}],attrs:[{type:t.Input,args:["scGenericLinkAttrs"]}],field:[{type:t.Input,args:["scGenericLink"]}],extras:[{type:t.Input,args:["scGenericLinkExtras"]}]};var R=function(){};var w=new t.InjectionToken("Sc.placeholder.components"),E=new t.InjectionToken("Sc.placeholder.lazyComponents"),j=new t.InjectionToken("Sc.placeholder.missingComponentComponent"),I=new t.InjectionToken("Sc.placeholder.hiddenRenderingComponent"),O=new t.InjectionToken("Sc.placeholder.dynamicComponent"),P=function(){function e(e,t){this.renderer=e,this.elementRef=t}return e.prototype.ngOnInit=function(){var e=this.renderer.createElement(this.rendering.name),t=this.renderer.createText(this.rendering.contents||""),n=this.rendering.attributes;for(var r in n)if(n.hasOwnProperty(r)){var i=n[r];this.renderer.setAttribute(e,r,i||"")}this.renderer.appendChild(e,t);var o=this.renderer.parentNode(this.elementRef.nativeElement);this.renderer.insertBefore(o,e,this.elementRef.nativeElement),o.removeChild(this.elementRef.nativeElement)},e}();function D(e){return!e.componentName&&void 0!==e.name}P.decorators=[{type:t.Component,args:[{selector:"sc-raw",template:""}]}],P.ctorParameters=function(){return[{type:t.Renderer2},{type:t.ElementRef}]},P.propDecorators={rendering:[{type:t.Input}]};var T=function(){function e(e,t,n,r){var i=this;this.injector=e,this.compiler=t,this.components=n,this.lazyComponents=r,this.componentMap=new Map,this.lazyComponentMap=new Map,this.components.forEach((function(e){return i.componentMap.set(e.name,e.type)})),this.lazyComponents&&this.lazyComponents.forEach((function(e){return i.lazyComponentMap.set(e.path,e)}))}return e.prototype.loadModuleFactory=function(e){var n=this;return e.loadChildren().then((function(e){return e instanceof t.NgModuleFactory?e:n.compiler.compileModuleAsync(e)}))},e.prototype.getComponent=function(e){var t=this;if(this.componentMap.get(e.componentName))return Promise.resolve({componentDefinition:e,componentImplementation:this.componentMap.get(e.componentName)});var n=this.lazyComponentMap.get(e.componentName);return n?this.loadModuleFactory(n).then((function(r){var i=null,o=r.create(t.injector),s=o.injector.get(O);if(!s)throw new Error('JssComponentFactoryService: Lazy load module for component "'+n.path+'" missing DYNAMIC_COMPONENT provider. Missing JssModule.forChild()?');if(e.componentName in s)i=s[e.componentName];else{if("function"!=typeof s)throw new Error('JssComponentFactoryService: Lazy load module for component "'+n.path+'" missing DYNAMIC_COMPONENT provider. Missing JssModule.forChild()?');i=s}return{componentDefinition:e,componentImplementation:i,componentFactory:o.componentFactoryResolver.resolveComponentFactory(i)}})):Promise.resolve({componentDefinition:e})},e.prototype.getComponents=function(e){var t=this;return Promise.all(e.map((function(e){return D(e)?t.getRawComponent(e):t.getComponent(e)})))},e.prototype.getRawComponent=function(e){return Promise.resolve({componentImplementation:P,componentDefinition:e})},e}();T.decorators=[{type:t.Injectable}],T.ctorParameters=function(){return[{type:t.Injector},{type:t.Compiler},{type:Array,decorators:[{type:t.Inject,args:[w]}]},{type:Array,decorators:[{type:t.Inject,args:[E]}]}]};var _=function(){function e(){}return Object.defineProperty(e.prototype,"style",{get:function(){return"display: block; height: 100px; background-image: linear-gradient(45deg, #ffffff 25%, #dcdcdc 25%, #dcdcdc 50%, #ffffff 50%, #ffffff 75%, #dcdcdc 75%, #dcdcdc 100%); background-size: 3px 3px;"},enumerable:!1,configurable:!0}),e}();_.decorators=[{type:t.Component,args:[{selector:"sc-hidden-rendering",template:""}]}],_.propDecorators={style:[{type:t.HostBinding,args:["style"]}]};var N=function(e){this.templateRef=e};N.decorators=[{type:t.Directive,args:[{selector:"[scPlaceholderLoading]"}]}],N.ctorParameters=function(){return[{type:t.TemplateRef}]};var x=function(e){this.templateRef=e};x.decorators=[{type:t.Directive,args:[{selector:"[renderEach]"}]}],x.ctorParameters=function(){return[{type:t.TemplateRef}]};var A=function(e){this.templateRef=e};A.decorators=[{type:t.Directive,args:[{selector:"[renderEmpty]"}]}],A.ctorParameters=function(){return[{type:t.TemplateRef}]};var V=function(){function e(e,n,r,i,o,s,a,c){this.componentFactoryResolver=e,this.differs=n,this.componentFactory=r,this.changeDetectorRef=i,this.elementRef=o,this.renderer=s,this.missingComponentComponent=a,this.hiddenRenderingComponent=c,this._componentInstances=[],this.destroyed=!1,this.parentStyleAttribute="",this.isLoading=!0,this.loaded=new t.EventEmitter}return Object.defineProperty(e.prototype,"inputs",{set:function(e){this._inputs=e,!this._differ&&e&&(this._differ=this.differs.find(e).create())},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e=this.elementRef.nativeElement;if(e)for(var t=e.attributes,n=0;n<t.length;n++){var r=t.item(n);r&&-1!==r.name.indexOf("_ngcontent")&&(this.parentStyleAttribute=r.name)}},e.prototype.ngOnDestroy=function(){this.destroyed=!0,this._componentInstances=[]},e.prototype.ngOnChanges=function(e){(e.rendering||e.renderings)&&this._render()},e.prototype.ngDoCheck=function(){var e=this;if(this._differ&&this._inputs&&0!==this._componentInstances.length){var t=this._differ.diff(this._inputs);if(t){var n={};t.forEachRemovedItem((function(e){return n[e.key]=null})),t.forEachAddedItem((function(e){return n[e.key]=e.currentValue})),t.forEachChangedItem((function(e){return n[e.key]=e.currentValue})),this._componentInstances.forEach((function(t){return e._setComponentInputs(t,n)}))}}},e.prototype._setComponentInputs=function(e,t){Object.entries(t).forEach((function(t){var n=h(t,2),r=n[0],i=n[1];return e[r]=i}))},e.prototype._subscribeComponentOutputs=function(e,t){var n=this;Object.keys(t).filter((function(t){return e[t]&&e[t]instanceof i.Observable})).forEach((function(r){return e[r].pipe(o.takeWhile((function(){return!n.destroyed}))).subscribe(t[r])}))},e.prototype._render=function(){var e=this;if(this._componentInstances=[],this.view.clear(),this.rendering||this.renderings){if(!this.name&&!this.renderings)return console.warn("Placeholder name was not specified, and explicit renderings array was not passed. Placeholder requires either name and rendering, or renderings."),void(this.isLoading=!1);var t,n,r=this.renderings||(t=this.rendering,n=this.name||"",t&&t.placeholders&&Object.keys(t.placeholders).length>0?t.placeholders[n]:null);if(!r)return console.warn("Placeholder '"+this.name+"' was not found in the current rendering data",JSON.stringify(this.rendering,null,2)),void(this.isLoading=!1);var i=r.every((function(e){return D(e)}));this.renderEmptyTemplate&&i?(this.view.createEmbeddedView(this.renderEmptyTemplate.templateRef,{renderings:r}),this.isLoading=!1):this.componentFactory.getComponents(r).then((function(t){return t.forEach((function(t,n){e.renderEachTemplate&&!D(t.componentDefinition)?e._renderTemplatedComponent(t.componentDefinition,n):e._renderEmbeddedComponent(t,n),e.isLoading=!1}))})).then((function(){e.changeDetectorRef.markForCheck(),e.loaded.emit(e.name)}))}},e.prototype._renderTemplatedComponent=function(e,t){this.view.createEmbeddedView(this.renderEachTemplate.templateRef,{rendering:e,index:t})},e.prototype._renderEmbeddedComponent=function(e,t){if("Hidden Rendering"===e.componentDefinition.componentName&&(e.componentImplementation=this.hiddenRenderingComponent),!e.componentImplementation){var n=e.componentDefinition.componentName;console.error("Placeholder "+this.name+" contains unknown component "+n+".","Ensure component is mapped, like:\n JssModule.withComponents([\n { name: '"+n+"', type: "+n+"Component }\n ])"),e.componentImplementation=this.missingComponentComponent}var r=e.componentFactory||this.componentFactoryResolver.resolveComponentFactory(e.componentImplementation),i=this.view.createComponent(r,t);this.parentStyleAttribute&&this.renderer.setAttribute(i.location.nativeElement,this.parentStyleAttribute,"");var o=i.instance;o.rendering=e.componentDefinition,this._inputs&&this._setComponentInputs(o,this._inputs),this.outputs&&this._subscribeComponentOutputs(o,this.outputs),this._componentInstances.push(o)},e}();V.decorators=[{type:t.Component,args:[{selector:"sc-placeholder,[sc-placeholder]",template:'\n <ng-template\n *ngIf="isLoading"\n [ngTemplateOutlet]="placeholderLoading?.templateRef"\n ></ng-template>\n <ng-template #view></ng-template>\n '}]}],V.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.KeyValueDiffers},{type:T},{type:t.ChangeDetectorRef},{type:t.ElementRef},{type:t.Renderer2},{type:t.Type,decorators:[{type:t.Inject,args:[j]}]},{type:t.Type,decorators:[{type:t.Inject,args:[I]}]}]},V.propDecorators={name:[{type:t.Input}],rendering:[{type:t.Input}],renderings:[{type:t.Input}],outputs:[{type:t.Input}],loaded:[{type:t.Output}],view:[{type:t.ViewChild,args:["view",{read:t.ViewContainerRef,static:!0}]}],renderEachTemplate:[{type:t.ContentChild,args:[x,{static:!0}]}],renderEmptyTemplate:[{type:t.ContentChild,args:[A,{static:!0}]}],placeholderLoading:[{type:t.ContentChild,args:[N,{static:!0}]}],inputs:[{type:t.Input}]};var L=function(){function e(e,t){this.viewContainer=e,this.templateRef=t,this.editable=!0}return e.prototype.ngOnChanges=function(e){(e.field||e.editable)&&(this.viewRef||(this.viewContainer.clear(),this.viewRef=this.viewContainer.createEmbeddedView(this.templateRef)),this.updateView())},e.prototype.updateView=function(){var e=this.field;if(e&&(e.editable||e.value)){var t=e.editable&&this.editable?e.editable:e.value;this.viewRef.rootNodes.forEach((function(e){e.innerHTML=t}))}},e}();L.decorators=[{type:t.Directive,args:[{selector:"[scRichText]"}]}],L.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef}]},L.propDecorators={editable:[{type:t.Input,args:["scRichTextEditable"]}],field:[{type:t.Input,args:["scRichText"]}]};var k=function(){function e(e,t){this.viewContainer=e,this.templateRef=t,this.editable=!0,this.encode=!0}return e.prototype.ngOnChanges=function(e){(e.field||e.editable||e.encode)&&(this.viewRef||(this.viewContainer.clear(),this.viewRef=this.viewContainer.createEmbeddedView(this.templateRef)),this.updateView())},e.prototype.updateView=function(){var e=this.field,t=this.editable;if(e&&(e.editable||void 0!==e.value&&""!==e.value)){this.encode||(t=!1);var n=e.editable&&t?e.editable:e.value,r=e.editable&&t||!this.encode;this.viewRef.rootNodes.forEach((function(e){r?e.innerHTML=n:e.textContent=n}))}},e}();k.decorators=[{type:t.Directive,args:[{selector:"[scText]"}]}],k.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef}]},k.propDecorators={editable:[{type:t.Input,args:["scTextEditable"]}],encode:[{type:t.Input,args:["scTextEncode"]}],field:[{type:t.Input,args:["scText"]}]};var M=function(){function e(e,t,n){this.viewContainer=e,this.templateRef=t,this.datePipe=n,this.editable=!0}return e.prototype.ngOnChanges=function(e){(e.field||e.format)&&(this.viewRef||(this.viewContainer.clear(),this.viewRef=this.viewContainer.createEmbeddedView(this.templateRef)),this.updateView())},e.prototype.updateView=function(){var e=this,t=this.field;if(t&&(t.editable||t.value)){var n=t.editable&&this.editable?t.editable:t.value,r=t.editable&&this.editable;this.viewRef.rootNodes.forEach((function(t){r?t.innerHTML=n:t.textContent=e.datePipe.transform(n,e.format,e.timezone,e.locale)}))}},e}();M.decorators=[{type:t.Directive,args:[{selector:"[scDate]"}]}],M.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:s.DatePipe}]},M.propDecorators={format:[{type:t.Input,args:["scDateFormat"]}],timezone:[{type:t.Input,args:["scDateTimezone"]}],locale:[{type:t.Input,args:["scDateLocale"]}],editable:[{type:t.Input,args:["scDateEditable"]}],field:[{type:t.Input,args:["scDate"]}]};var S=function(){};S.decorators=[{type:t.Component,args:[{selector:"sc-missing-component",template:'\n <div\n style="background: darkorange; outline: 5px solid orange; padding: 10px; color: white; max-width: 500px;"\n >\n <h2>{{ rendering.componentName }}</h2>\n <p>JSS component is missing Angular component implementation.</p>\n </div>\n '}]}],S.propDecorators={rendering:[{type:t.Input}]};var F=function(){function e(e,t,n,r){this.componentFactoryResolver=e,this.differs=t,this.componentFactory=n,this.missingComponentComponent=r,this.destroyed=!1}return Object.defineProperty(e.prototype,"inputs",{set:function(e){this._inputs=e,!this._differ&&e&&(this._differ=this.differs.find(e).create())},enumerable:!1,configurable:!0}),e.prototype.ngOnChanges=function(e){e.rendering&&this._render()},e.prototype._setComponentInputs=function(e,t){Object.entries(t).forEach((function(t){var n=h(t,2),r=n[0],i=n[1];return e[r]=i}))},e.prototype._subscribeComponentOutputs=function(e,t){var n=this;Object.keys(t).filter((function(t){return e[t]&&e[t]instanceof i.Observable})).forEach((function(r){return e[r].pipe(o.takeWhile((function(){return!n.destroyed}))).subscribe(t[r])}))},e.prototype._render=function(){var e=this;(this.view.clear(),this.rendering)&&(D(this.rendering)?Promise.resolve({componentImplementation:P,componentDefinition:this.rendering}):this.componentFactory.getComponent(this.rendering)).then((function(t){if(!t.componentImplementation){var n=t.componentDefinition.componentName;console.error("Attempted to render unknown component "+n+".","Ensure component is mapped, like:\n JssModule.withComponents([\n { name: '"+n+"', type: "+n+"Component }\n ])"),t.componentImplementation=e.missingComponentComponent}var r=t.componentFactory||e.componentFactoryResolver.resolveComponentFactory(t.componentImplementation),i=e.view.createComponent(r,0).instance;i.rendering=t.componentDefinition,e._inputs&&e._setComponentInputs(i,e._inputs),e.outputs&&e._subscribeComponentOutputs(i,e.outputs)}))},e}();F.decorators=[{type:t.Component,args:[{selector:"sc-render-component",template:"\n <ng-template #view></ng-template>\n "}]}],F.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.KeyValueDiffers},{type:T},{type:t.Type,decorators:[{type:t.Inject,args:[j]}]}]},F.propDecorators={rendering:[{type:t.Input}],outputs:[{type:t.Input}],view:[{type:t.ViewChild,args:["view",{read:t.ViewContainerRef,static:!0}]}],inputs:[{type:t.Input}]};var z=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[s.DatePipe,T]}},e.forChild=function(n){return{ngModule:e,providers:[{provide:t.ANALYZE_FOR_ENTRY_COMPONENTS,useValue:n,multi:!0},{provide:r.ROUTES,useValue:[],multi:!0},{provide:O,useValue:n}]}},e.withComponents=function(n,i){return{ngModule:e,providers:y([{provide:t.ANALYZE_FOR_ENTRY_COMPONENTS,useValue:n,multi:!0},{provide:w,useValue:n},{provide:E,useValue:i||[]},{provide:r.ROUTES,useValue:i||[],multi:!0},{provide:j,useValue:S},{provide:I,useValue:_}],e.forRoot().providers)}},e}();z.decorators=[{type:t.NgModule,args:[{imports:[s.CommonModule],declarations:[d,g,v,b,C,M,x,A,N,F,V,P,L,k,S,_],exports:[d,g,M,v,b,C,x,A,F,V,_,N,L,k],entryComponents:[P,S]}]}],Object.defineProperty(e,"mediaApi",{enumerable:!0,get:function(){return n.mediaApi}}),Object.defineProperty(e,"GraphQLDictionaryService",{enumerable:!0,get:function(){return a.GraphQLDictionaryService}}),Object.defineProperty(e,"RestDictionaryService",{enumerable:!0,get:function(){return a.RestDictionaryService}}),Object.defineProperty(e,"GraphQLLayoutService",{enumerable:!0,get:function(){return c.GraphQLLayoutService}}),Object.defineProperty(e,"RestLayoutService",{enumerable:!0,get:function(){return c.RestLayoutService}}),Object.defineProperty(e,"getChildPlaceholder",{enumerable:!0,get:function(){return c.getChildPlaceholder}}),Object.defineProperty(e,"getFieldValue",{enumerable:!0,get:function(){return c.getFieldValue}}),Object.defineProperty(e,"DefaultRetryStrategy",{enumerable:!0,get:function(){return p.DefaultRetryStrategy}}),Object.defineProperty(e,"ClientError",{enumerable:!0,get:function(){return l.ClientError}}),Object.defineProperty(e,"constants",{enumerable:!0,get:function(){return l.constants}}),Object.defineProperty(e,"handleEditorAnchors",{enumerable:!0,get:function(){return u.handleEditorAnchors}}),Object.defineProperty(e,"isEditorActive",{enumerable:!0,get:function(){return u.isEditorActive}}),Object.defineProperty(e,"isExperienceEditorActive",{enumerable:!0,get:function(){return u.isExperienceEditorActive}}),Object.defineProperty(e,"isServer",{enumerable:!0,get:function(){return u.isServer}}),Object.defineProperty(e,"resetEditorChromes",{enumerable:!0,get:function(){return u.resetEditorChromes}}),Object.defineProperty(e,"resetExperienceEditorChromes",{enumerable:!0,get:function(){return u.resetExperienceEditorChromes}}),e.ComponentNameAndType=R,e.DYNAMIC_COMPONENT=O,e.FileDirective=d,e.GenericLinkDirective=C,e.ImageDirective=g,e.JssModule=z,e.LinkDirective=v,e.PlaceholderComponent=V,e.PlaceholderLoadingDirective=N,e.RichTextDirective=L,e.RouterLinkDirective=b,e.TextDirective=k,e.isRawRendering=D,e["ɵb"]=w,e["ɵc"]=E,e["ɵd"]=j,e["ɵe"]=I,e["ɵf"]=x,e["ɵg"]=A,e["ɵh"]=T,e["ɵi"]=M,e["ɵj"]=F,e["ɵk"]=P,e["ɵl"]=S,e["ɵm"]=_,Object.defineProperty(e,"__esModule",{value:!0})}));
17
17
  //# sourceMappingURL=sitecore-jss-sitecore-jss-angular.umd.min.js.map
@@ -1,17 +1,17 @@
1
- import { DatePipe } from '@angular/common';
2
- import { OnChanges, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
3
- import { DateField } from './rendering-field';
4
- export declare class DateDirective implements OnChanges {
5
- private viewContainer;
6
- private templateRef;
7
- private datePipe;
8
- private viewRef;
9
- format?: string;
10
- timezone?: string;
11
- locale?: string;
12
- editable: boolean;
13
- field: DateField;
14
- constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<unknown>, datePipe: DatePipe);
15
- ngOnChanges(changes: SimpleChanges): void;
16
- private updateView;
17
- }
1
+ import { DatePipe } from '@angular/common';
2
+ import { OnChanges, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
3
+ import { DateField } from './rendering-field';
4
+ export declare class DateDirective implements OnChanges {
5
+ private viewContainer;
6
+ private templateRef;
7
+ private datePipe;
8
+ private viewRef;
9
+ format?: string;
10
+ timezone?: string;
11
+ locale?: string;
12
+ editable: boolean;
13
+ field: DateField;
14
+ constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<unknown>, datePipe: DatePipe);
15
+ ngOnChanges(changes: SimpleChanges): void;
16
+ private updateView;
17
+ }
@@ -1,14 +1,14 @@
1
- import { OnChanges, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
2
- import { FileField } from './rendering-field';
3
- /**
4
- * File fields cannot be managed via the EE. We never output "editable."
5
- */
6
- export declare class FileDirective implements OnChanges {
7
- private viewContainer;
8
- private templateRef;
9
- private viewRef;
10
- field: FileField;
11
- constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<unknown>);
12
- ngOnChanges(changes: SimpleChanges): void;
13
- private updateView;
14
- }
1
+ import { OnChanges, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
2
+ import { FileField } from './rendering-field';
3
+ /**
4
+ * File fields cannot be managed via the EE. We never output "editable."
5
+ */
6
+ export declare class FileDirective implements OnChanges {
7
+ private viewContainer;
8
+ private templateRef;
9
+ private viewRef;
10
+ field: FileField;
11
+ constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<unknown>);
12
+ ngOnChanges(changes: SimpleChanges): void;
13
+ private updateView;
14
+ }
@@ -1,18 +1,18 @@
1
- import { ElementRef, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core';
2
- import { Router, NavigationExtras } from '@angular/router';
3
- import { LinkDirective } from './link.directive';
4
- import { LinkField } from './rendering-field';
5
- export declare class GenericLinkDirective extends LinkDirective {
6
- private router;
7
- editable: boolean;
8
- attrs: {
9
- [key: string]: string;
10
- };
11
- field: LinkField;
12
- extras?: NavigationExtras;
13
- constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<unknown>, renderer: Renderer2, elementRef: ElementRef, router: Router);
14
- protected renderTemplate(props: {
15
- [key: string]: string;
16
- }, linkText: string): void;
17
- private isAbsoluteUrl;
18
- }
1
+ import { ElementRef, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core';
2
+ import { Router, NavigationExtras } from '@angular/router';
3
+ import { LinkDirective } from './link.directive';
4
+ import { LinkField } from './rendering-field';
5
+ export declare class GenericLinkDirective extends LinkDirective {
6
+ private router;
7
+ editable: boolean;
8
+ attrs: {
9
+ [key: string]: string;
10
+ };
11
+ field: LinkField;
12
+ extras?: NavigationExtras;
13
+ constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<unknown>, renderer: Renderer2, elementRef: ElementRef, router: Router);
14
+ protected renderTemplate(props: {
15
+ [key: string]: string;
16
+ }, linkText: string): void;
17
+ private isAbsoluteUrl;
18
+ }
@@ -1,4 +1,4 @@
1
- export declare class HiddenRenderingComponent {
2
- get style(): string;
3
- }
4
- export declare const HIDDEN_RENDERING_NAME = "Hidden Rendering";
1
+ export declare class HiddenRenderingComponent {
2
+ get style(): string;
3
+ }
4
+ export declare const HIDDEN_RENDERING_NAME = "Hidden Rendering";
@@ -1,32 +1,32 @@
1
- import { ElementRef, OnChanges, Renderer2, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
2
- import { ImageField } from './rendering-field';
3
- export declare class ImageDirective implements OnChanges {
4
- private viewContainer;
5
- private templateRef;
6
- private renderer;
7
- private elementRef;
8
- private inlineRef;
9
- field: ImageField | '';
10
- editable: boolean;
11
- /**
12
- * Custom regexp that finds media URL prefix that will be replaced by `/-/jssmedia` or `/~/jssmedia`.
13
- * @example
14
- * /\/([-~]{1})assets\//i
15
- * /-assets/website -> /-/jssmedia/website
16
- * /~assets/website -> /~/jssmedia/website
17
- */
18
- mediaUrlPrefix?: RegExp;
19
- urlParams: {
20
- [param: string]: string | number;
21
- };
22
- attrs: {
23
- [param: string]: unknown;
24
- };
25
- constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<unknown>, renderer: Renderer2, elementRef: ElementRef);
26
- ngOnChanges(changes: SimpleChanges): void;
27
- private updateView;
28
- private getImageAttrs;
29
- private renderTemplate;
30
- private getElementAttrs;
31
- private renderInlineWrapper;
32
- }
1
+ import { ElementRef, OnChanges, Renderer2, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
2
+ import { ImageField } from './rendering-field';
3
+ export declare class ImageDirective implements OnChanges {
4
+ private viewContainer;
5
+ private templateRef;
6
+ private renderer;
7
+ private elementRef;
8
+ private inlineRef;
9
+ field: ImageField | '';
10
+ editable: boolean;
11
+ /**
12
+ * Custom regexp that finds media URL prefix that will be replaced by `/-/jssmedia` or `/~/jssmedia`.
13
+ * @example
14
+ * /\/([-~]{1})assets\//i
15
+ * /-assets/website -> /-/jssmedia/website
16
+ * /~assets/website -> /~/jssmedia/website
17
+ */
18
+ mediaUrlPrefix?: RegExp;
19
+ urlParams: {
20
+ [param: string]: string | number;
21
+ };
22
+ attrs: {
23
+ [param: string]: unknown;
24
+ };
25
+ constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<unknown>, renderer: Renderer2, elementRef: ElementRef);
26
+ ngOnChanges(changes: SimpleChanges): void;
27
+ private updateView;
28
+ private getImageAttrs;
29
+ private renderTemplate;
30
+ private getElementAttrs;
31
+ private renderInlineWrapper;
32
+ }
@@ -1,22 +1,22 @@
1
- import { ElementRef, OnChanges, Renderer2, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
2
- import { LinkField } from './rendering-field';
3
- export declare class LinkDirective implements OnChanges {
4
- protected viewContainer: ViewContainerRef;
5
- protected templateRef: TemplateRef<unknown>;
6
- protected renderer: Renderer2;
7
- private elementRef;
8
- private inlineRef;
9
- editable: boolean;
10
- attrs: {
11
- [attr: string]: string;
12
- };
13
- field: LinkField;
14
- constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<unknown>, renderer: Renderer2, elementRef: ElementRef);
15
- ngOnChanges(changes: SimpleChanges): void;
16
- private updateView;
17
- protected renderTemplate(props: {
18
- [prop: string]: unknown;
19
- }, linkText?: string): void;
20
- private renderInlineWrapper;
21
- private getElementAttrs;
22
- }
1
+ import { ElementRef, OnChanges, Renderer2, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
2
+ import { LinkField } from './rendering-field';
3
+ export declare class LinkDirective implements OnChanges {
4
+ protected viewContainer: ViewContainerRef;
5
+ protected templateRef: TemplateRef<unknown>;
6
+ protected renderer: Renderer2;
7
+ private elementRef;
8
+ private inlineRef;
9
+ editable: boolean;
10
+ attrs: {
11
+ [attr: string]: string;
12
+ };
13
+ field: LinkField;
14
+ constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<unknown>, renderer: Renderer2, elementRef: ElementRef);
15
+ ngOnChanges(changes: SimpleChanges): void;
16
+ private updateView;
17
+ protected renderTemplate(props: {
18
+ [prop: string]: unknown;
19
+ }, linkText?: string): void;
20
+ private renderInlineWrapper;
21
+ private getElementAttrs;
22
+ }
@@ -1,4 +1,4 @@
1
- import { ComponentRendering } from '@sitecore-jss/sitecore-jss/layout';
2
- export declare class MissingComponentComponent {
3
- rendering: ComponentRendering;
4
- }
1
+ import { ComponentRendering } from '@sitecore-jss/sitecore-jss/layout';
2
+ export declare class MissingComponentComponent {
3
+ rendering: ComponentRendering;
4
+ }
@@ -1,5 +1,5 @@
1
- import { TemplateRef } from '@angular/core';
2
- export declare class PlaceholderLoadingDirective {
3
- templateRef: TemplateRef<unknown>;
4
- constructor(templateRef: TemplateRef<unknown>);
5
- }
1
+ import { TemplateRef } from '@angular/core';
2
+ export declare class PlaceholderLoadingDirective {
3
+ templateRef: TemplateRef<unknown>;
4
+ constructor(templateRef: TemplateRef<unknown>);
5
+ }
@@ -1,46 +1,46 @@
1
- import { ChangeDetectorRef, ComponentFactoryResolver, DoCheck, ElementRef, EventEmitter, KeyValueDiffers, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, Type } from '@angular/core';
2
- import { ComponentRendering, HtmlElementRendering } from '@sitecore-jss/sitecore-jss/layout';
3
- import { JssComponentFactoryService } from '../jss-component-factory.service';
4
- import { PlaceholderLoadingDirective } from './placeholder-loading.directive';
5
- import { RenderEachDirective } from './render-each.directive';
6
- import { RenderEmptyDirective } from './render-empty.directive';
7
- export declare class PlaceholderComponent implements OnInit, OnChanges, DoCheck, OnDestroy {
8
- private componentFactoryResolver;
9
- private differs;
10
- private componentFactory;
11
- private changeDetectorRef;
12
- private elementRef;
13
- private renderer;
14
- private missingComponentComponent;
15
- private hiddenRenderingComponent;
16
- private _inputs;
17
- private _differ;
18
- private _componentInstances;
19
- private destroyed;
20
- private parentStyleAttribute;
21
- isLoading: boolean;
22
- name?: string;
23
- rendering: ComponentRendering;
24
- renderings?: Array<ComponentRendering | HtmlElementRendering>;
25
- outputs: {
26
- [k: string]: (eventType: unknown) => void;
27
- };
28
- loaded: EventEmitter<string>;
29
- private view;
30
- renderEachTemplate: RenderEachDirective;
31
- renderEmptyTemplate: RenderEmptyDirective;
32
- placeholderLoading?: PlaceholderLoadingDirective;
33
- set inputs(value: {
34
- [key: string]: unknown;
35
- });
36
- constructor(componentFactoryResolver: ComponentFactoryResolver, differs: KeyValueDiffers, componentFactory: JssComponentFactoryService, changeDetectorRef: ChangeDetectorRef, elementRef: ElementRef, renderer: Renderer2, missingComponentComponent: Type<unknown>, hiddenRenderingComponent: Type<unknown>);
37
- ngOnInit(): void;
38
- ngOnDestroy(): void;
39
- ngOnChanges(changes: SimpleChanges): void;
40
- ngDoCheck(): void;
41
- private _setComponentInputs;
42
- private _subscribeComponentOutputs;
43
- private _render;
44
- private _renderTemplatedComponent;
45
- private _renderEmbeddedComponent;
46
- }
1
+ import { ChangeDetectorRef, ComponentFactoryResolver, DoCheck, ElementRef, EventEmitter, KeyValueDiffers, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, Type } from '@angular/core';
2
+ import { ComponentRendering, HtmlElementRendering } from '@sitecore-jss/sitecore-jss/layout';
3
+ import { JssComponentFactoryService } from '../jss-component-factory.service';
4
+ import { PlaceholderLoadingDirective } from './placeholder-loading.directive';
5
+ import { RenderEachDirective } from './render-each.directive';
6
+ import { RenderEmptyDirective } from './render-empty.directive';
7
+ export declare class PlaceholderComponent implements OnInit, OnChanges, DoCheck, OnDestroy {
8
+ private componentFactoryResolver;
9
+ private differs;
10
+ private componentFactory;
11
+ private changeDetectorRef;
12
+ private elementRef;
13
+ private renderer;
14
+ private missingComponentComponent;
15
+ private hiddenRenderingComponent;
16
+ private _inputs;
17
+ private _differ;
18
+ private _componentInstances;
19
+ private destroyed;
20
+ private parentStyleAttribute;
21
+ isLoading: boolean;
22
+ name?: string;
23
+ rendering: ComponentRendering;
24
+ renderings?: Array<ComponentRendering | HtmlElementRendering>;
25
+ outputs: {
26
+ [k: string]: (eventType: unknown) => void;
27
+ };
28
+ loaded: EventEmitter<string>;
29
+ private view;
30
+ renderEachTemplate: RenderEachDirective;
31
+ renderEmptyTemplate: RenderEmptyDirective;
32
+ placeholderLoading?: PlaceholderLoadingDirective;
33
+ set inputs(value: {
34
+ [key: string]: unknown;
35
+ });
36
+ constructor(componentFactoryResolver: ComponentFactoryResolver, differs: KeyValueDiffers, componentFactory: JssComponentFactoryService, changeDetectorRef: ChangeDetectorRef, elementRef: ElementRef, renderer: Renderer2, missingComponentComponent: Type<unknown>, hiddenRenderingComponent: Type<unknown>);
37
+ ngOnInit(): void;
38
+ ngOnDestroy(): void;
39
+ ngOnChanges(changes: SimpleChanges): void;
40
+ ngDoCheck(): void;
41
+ private _setComponentInputs;
42
+ private _subscribeComponentOutputs;
43
+ private _render;
44
+ private _renderTemplatedComponent;
45
+ private _renderEmbeddedComponent;
46
+ }
@@ -1,31 +1,31 @@
1
- import { InjectionToken, Type } from '@angular/core';
2
- /** Registers a statically loaded component */
3
- export declare class ComponentNameAndType {
4
- name: string;
5
- type: Type<unknown>;
6
- }
7
- /** Registers a lazily loaded component by name and module to lazy load when it's needed */
8
- export interface ComponentNameAndModule {
9
- /** Name of the component */
10
- path: string;
11
- /**
12
- * Dynamic import of the component,
13
- * e.g. () => import('./path/to/lazyloadedcomponent.module').then(m => m.LazyLoadedComponentModuleExportName)
14
- */
15
- loadChildren: () => Promise<Type<unknown>>;
16
- }
17
- /**
18
- * @param {unknown} object
19
- */
20
- export declare function instanceOfComponentNameAndType(object: unknown): object is ComponentNameAndType;
21
- /**
22
- * @param {unknown} object
23
- */
24
- export declare function instanceOfComponentNameAndModule(object: unknown): object is ComponentNameAndModule;
25
- export declare const PLACEHOLDER_COMPONENTS: InjectionToken<ComponentNameAndType[]>;
26
- export declare const PLACEHOLDER_LAZY_COMPONENTS: InjectionToken<ComponentNameAndType[]>;
27
- export declare const PLACEHOLDER_MISSING_COMPONENT_COMPONENT: InjectionToken<Type<unknown>>;
28
- export declare const PLACEHOLDER_HIDDEN_RENDERING_COMPONENT: InjectionToken<Type<unknown>>;
29
- export declare const DYNAMIC_COMPONENT: InjectionToken<Type<unknown> | {
30
- [s: string]: unknown;
31
- }>;
1
+ import { InjectionToken, Type } from '@angular/core';
2
+ /** Registers a statically loaded component */
3
+ export declare class ComponentNameAndType {
4
+ name: string;
5
+ type: Type<unknown>;
6
+ }
7
+ /** Registers a lazily loaded component by name and module to lazy load when it's needed */
8
+ export interface ComponentNameAndModule {
9
+ /** Name of the component */
10
+ path: string;
11
+ /**
12
+ * Dynamic import of the component,
13
+ * e.g. () => import('./path/to/lazyloadedcomponent.module').then(m => m.LazyLoadedComponentModuleExportName)
14
+ */
15
+ loadChildren: () => Promise<Type<unknown>>;
16
+ }
17
+ /**
18
+ * @param {unknown} object
19
+ */
20
+ export declare function instanceOfComponentNameAndType(object: unknown): object is ComponentNameAndType;
21
+ /**
22
+ * @param {unknown} object
23
+ */
24
+ export declare function instanceOfComponentNameAndModule(object: unknown): object is ComponentNameAndModule;
25
+ export declare const PLACEHOLDER_COMPONENTS: InjectionToken<ComponentNameAndType[]>;
26
+ export declare const PLACEHOLDER_LAZY_COMPONENTS: InjectionToken<ComponentNameAndType[]>;
27
+ export declare const PLACEHOLDER_MISSING_COMPONENT_COMPONENT: InjectionToken<Type<unknown>>;
28
+ export declare const PLACEHOLDER_HIDDEN_RENDERING_COMPONENT: InjectionToken<Type<unknown>>;
29
+ export declare const DYNAMIC_COMPONENT: InjectionToken<Type<unknown> | {
30
+ [s: string]: unknown;
31
+ }>;
@@ -1,9 +1,9 @@
1
- import { ElementRef, OnInit, Renderer2 } from '@angular/core';
2
- import { HtmlElementRendering } from '@sitecore-jss/sitecore-jss/layout';
3
- export declare class RawComponent implements OnInit {
4
- private renderer;
5
- private elementRef;
6
- rendering: HtmlElementRendering;
7
- constructor(renderer: Renderer2, elementRef: ElementRef);
8
- ngOnInit(): void;
9
- }
1
+ import { ElementRef, OnInit, Renderer2 } from '@angular/core';
2
+ import { HtmlElementRendering } from '@sitecore-jss/sitecore-jss/layout';
3
+ export declare class RawComponent implements OnInit {
4
+ private renderer;
5
+ private elementRef;
6
+ rendering: HtmlElementRendering;
7
+ constructor(renderer: Renderer2, elementRef: ElementRef);
8
+ ngOnInit(): void;
9
+ }
@@ -1,31 +1,31 @@
1
- import { ComponentFactoryResolver, KeyValueDiffers, OnChanges, SimpleChanges, Type } from '@angular/core';
2
- import { ComponentRendering, HtmlElementRendering } from '@sitecore-jss/sitecore-jss/layout';
3
- import { JssComponentFactoryService } from '../jss-component-factory.service';
4
- /**
5
- * Renders a single JSS component given a rendering definition.
6
- * Useful inside templated placeholders.
7
- */
8
- export declare class RenderComponentComponent implements OnChanges {
9
- private componentFactoryResolver;
10
- private differs;
11
- private componentFactory;
12
- private missingComponentComponent;
13
- private _inputs;
14
- private _differ;
15
- private destroyed;
16
- rendering: ComponentRendering | HtmlElementRendering;
17
- outputs: {
18
- [k: string]: (eventType: unknown) => void;
19
- };
20
- private view;
21
- set inputs(value: {
22
- [key: string]: unknown;
23
- });
24
- constructor(componentFactoryResolver: ComponentFactoryResolver, differs: KeyValueDiffers, componentFactory: JssComponentFactoryService, missingComponentComponent: Type<{
25
- [key: string]: unknown;
26
- }>);
27
- ngOnChanges(changes: SimpleChanges): void;
28
- private _setComponentInputs;
29
- private _subscribeComponentOutputs;
30
- private _render;
31
- }
1
+ import { ComponentFactoryResolver, KeyValueDiffers, OnChanges, SimpleChanges, Type } from '@angular/core';
2
+ import { ComponentRendering, HtmlElementRendering } from '@sitecore-jss/sitecore-jss/layout';
3
+ import { JssComponentFactoryService } from '../jss-component-factory.service';
4
+ /**
5
+ * Renders a single JSS component given a rendering definition.
6
+ * Useful inside templated placeholders.
7
+ */
8
+ export declare class RenderComponentComponent implements OnChanges {
9
+ private componentFactoryResolver;
10
+ private differs;
11
+ private componentFactory;
12
+ private missingComponentComponent;
13
+ private _inputs;
14
+ private _differ;
15
+ private destroyed;
16
+ rendering: ComponentRendering | HtmlElementRendering;
17
+ outputs: {
18
+ [k: string]: (eventType: unknown) => void;
19
+ };
20
+ private view;
21
+ set inputs(value: {
22
+ [key: string]: unknown;
23
+ });
24
+ constructor(componentFactoryResolver: ComponentFactoryResolver, differs: KeyValueDiffers, componentFactory: JssComponentFactoryService, missingComponentComponent: Type<{
25
+ [key: string]: unknown;
26
+ }>);
27
+ ngOnChanges(changes: SimpleChanges): void;
28
+ private _setComponentInputs;
29
+ private _subscribeComponentOutputs;
30
+ private _render;
31
+ }
@@ -1,5 +1,5 @@
1
- import { TemplateRef } from '@angular/core';
2
- export declare class RenderEachDirective {
3
- templateRef: TemplateRef<unknown>;
4
- constructor(templateRef: TemplateRef<unknown>);
5
- }
1
+ import { TemplateRef } from '@angular/core';
2
+ export declare class RenderEachDirective {
3
+ templateRef: TemplateRef<unknown>;
4
+ constructor(templateRef: TemplateRef<unknown>);
5
+ }