UNPKG

9.73 kBJavaScriptView Raw
1var __spreadArrays=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),o=0,e=0;e<n;e++)for(var i=arguments[e],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r};System.register(["./p-5f60bc91.system.js"],(function(t){"use strict";var e,n;return{setters:[function(t){e=t.r;n=t.h}],execute:function(){var r=["inputs","outputs","props","events","methods"];var o=t("ad_api",function(){function t(t){e(this,t)}t.prototype.hasApi=function(){if(!this.doc){return false}for(var t=0,e=r;t<e.length;t++){var n=e[t];if(this.doc[n]&&this.doc[n].length>0){return true}}};t.prototype.angular=function(){return[this.doc.inputs?this.doc.inputs.map((function(t){return n("ad-input-def",{input:t})})):undefined,this.doc.outputs?this.doc.outputs.map((function(t){return n("ad-output-def",{output:t})})):undefined,this.doc.props?this.doc.props.map((function(t){return n("ad-prop-def",{prop:t})})):undefined]};t.prototype.stencil=function(){return[this.doc.props?this.doc.props.map((function(t){return n("ad-prop-def",{prop:t})})):undefined,this.doc.events?this.doc.events.map((function(t){return n("ad-event-def",{event:t})})):undefined]};t.prototype.render=function(){if(!this.hasApi()){return undefined}var t=!this.doc.tag;return n("article",{id:"api",class:"api"},n("h2",null,"API"),t?this.angular():this.stencil(),this.doc.methods?this.doc.methods.map((function(t){return n("ad-method-def",{method:t})})):undefined)};Object.defineProperty(t,"style",{get:function(){return".sc-ad-api-h{display:block;font-size:.875rem;font-family:var(--anj-font-family);font-weight:400;line-height:1.5;outline:none}.sc-ad-api-h, .sc-ad-api-h:after, .sc-ad-api-h:before{-webkit-box-sizing:border-box;box-sizing:border-box;outline:none}.sc-ad-api-h:active, .sc-ad-api-h .sc-ad-api:active, .sc-ad-api-h:focus, .sc-ad-api-h .sc-ad-api:focus{outline:none}.sc-ad-api-h .api.sc-ad-api{border-bottom:1px solid var(--anj-border);margin-bottom:3rem;padding-bottom:3rem}.sc-ad-api-h .api.sc-ad-api h2.sc-ad-api{margin-bottom:1.5rem}"},enumerable:true,configurable:true});return t}());var i=t("ad_api_name",function(){function t(t){e(this,t)}Object.defineProperty(t,"style",{get:function(){return"ad-api-name{display:inline;font-size:.875rem;font-family:var(--anj-font-family);font-weight:400;line-height:1.5;outline:none}ad-api-name,ad-api-name:after,ad-api-name:before{-webkit-box-sizing:border-box;box-sizing:border-box;outline:none}ad-api-name:active,ad-api-name :active,ad-api-name:focus,ad-api-name :focus{outline:none}ad-api-name:after{color:var(--anj-secondary-dark);content:\":\";margin-right:.5rem}"},enumerable:true,configurable:true});return t}());var u=t("ad_arg_def",function(){function t(t){e(this,t)}t.prototype.render=function(){return[n("ad-api-name",null,this.arg.name),n("ad-type-def",null,this.arg.type)]};Object.defineProperty(t,"style",{get:function(){return"ad-arg-def{display:inline;font-size:.875rem;font-family:var(--anj-font-family);font-weight:400;line-height:1.5;outline:none}ad-arg-def,ad-arg-def:after,ad-arg-def:before{-webkit-box-sizing:border-box;box-sizing:border-box;outline:none}ad-arg-def:active,ad-arg-def :active,ad-arg-def:focus,ad-arg-def :focus{outline:none}ad-arg-def:after{color:var(--anj-secondary-dark);content:\",\";margin-right:.5rem}ad-arg-def:last-child:after{content:none;margin-right:0}"},enumerable:true,configurable:true});return t}());var a=t("ad_decorator",function(){function t(t){e(this,t)}Object.defineProperty(t,"style",{get:function(){return"ad-decorator{color:var(--anj-secondary-dark)}.api.ng ad-method-def ad-decorator,.api.ng ad-prop-def ad-decorator{display:none}"},enumerable:true,configurable:true});return t}());var c=t("ad_event_def",function(){function t(t){e(this,t)}t.prototype.render=function(){return[n("h4",null,n("ad-decorator",null,"@Event")," ",n("ad-api-name",null,this.event.event),n("ad-type-def",null,"<",this.event.detail,">")),n("p",null,this.event.docs)]};Object.defineProperty(t,"style",{get:function(){return"ad-event-def,ad-input-def,ad-method-def,ad-output-def,ad-prop-def{display:block;margin-bottom:1.5rem}ad-event-def h4,ad-input-def h4,ad-method-def h4,ad-output-def h4,ad-prop-def h4{color:var(--anj-dark);font-size:1rem;font-weight:400;margin:0 0 .5rem;padding:0}"},enumerable:true,configurable:true});return t}());var d=t("ad_input_def",function(){function t(t){e(this,t)}t.prototype.render=function(){return[n("h4",null,n("ad-decorator",null,"@Input "),n("ad-api-name",null,this.input.name),n("ad-type-def",null,this.input.type)),n("p",null,this.input.docs)]};Object.defineProperty(t,"style",{get:function(){return"ad-event-def,ad-input-def,ad-method-def,ad-output-def,ad-prop-def{display:block;margin-bottom:1.5rem}ad-event-def h4,ad-input-def h4,ad-method-def h4,ad-output-def h4,ad-prop-def h4{color:var(--anj-dark);font-size:1rem;font-weight:400;margin:0 0 .5rem;padding:0}"},enumerable:true,configurable:true});return t}());var s=t("ad_method_def",function(){function t(t){e(this,t)}t.prototype.nameless=function(t){return"("+t.split("(")[1]};t.prototype.render=function(){return[n("h4",null,n("ad-decorator",null,"@Method "),n("ad-api-name",null,this.method.name),n("ad-type-def",null,this.nameless(this.method.signature))),n("p",null,this.method.docs)]};Object.defineProperty(t,"style",{get:function(){return"ad-event-def,ad-input-def,ad-method-def,ad-output-def,ad-prop-def{display:block;margin-bottom:1.5rem}ad-event-def h4,ad-input-def h4,ad-method-def h4,ad-output-def h4,ad-prop-def h4{color:var(--anj-dark);font-size:1rem;font-weight:400;margin:0 0 .5rem;padding:0}"},enumerable:true,configurable:true});return t}());var f=t("ad_output_def",function(){function t(t){e(this,t)}t.prototype.render=function(){return[n("h4",null,n("ad-decorator",null,"@Output "),n("ad-api-name",null,this.output.name),n("ad-type-def",null,this.output.type)),n("p",null,this.output.docs)]};Object.defineProperty(t,"style",{get:function(){return"ad-event-def,ad-input-def,ad-method-def,ad-output-def,ad-prop-def{display:block;margin-bottom:1.5rem}ad-event-def h4,ad-input-def h4,ad-method-def h4,ad-output-def h4,ad-prop-def h4{color:var(--anj-dark);font-size:1rem;font-weight:400;margin:0 0 .5rem;padding:0}"},enumerable:true,configurable:true});return t}());var p=t("ad_prop_def",function(){function t(t){e(this,t)}t.prototype.render=function(){return[n("h4",null,n("ad-decorator",null,"@Prop "),n("ad-api-name",null,this.prop.name),n("ad-type-def",null,this.prop.type)),n("p",null,this.prop.docs)]};Object.defineProperty(t,"style",{get:function(){return"ad-event-def,ad-input-def,ad-method-def,ad-output-def,ad-prop-def{display:block;margin-bottom:1.5rem}ad-event-def h4,ad-input-def h4,ad-method-def h4,ad-output-def h4,ad-prop-def h4{color:var(--anj-dark);font-size:1rem;font-weight:400;margin:0 0 .5rem;padding:0}"},enumerable:true,configurable:true});return t}());var l=t("ad_real_time",function(){function t(t){e(this,t)}Object.defineProperty(t,"style",{get:function(){return"ad-real-time{border:1px dashed var(--anj-border);border-radius:.25rem;display:block;margin-top:1.5rem;overflow-x:auto;padding:1rem;width:100%}"},enumerable:true,configurable:true});return t}());var h=t("ad_toc",function(){function t(t){e(this,t);this.activeId="#overview";this.docs={};this.keys=[]}t.prototype.onDemosChange=function(){this.sectionIds=["#overview"].concat(this.keys.map((function(t){return"#"+t}))).concat("#api")};t.prototype.connectedCallback=function(){this.navigate=y(this.navigate.bind(this),100);this.onScroll=y(this.onScroll.bind(this),25);this.onDemosChange();if(window.location.hash){this.navigate()}};t.prototype.onScroll=function(){var t=this.sectionIds.map((function(t){return document.querySelector(t)}));var e=t[0];t.slice(1).forEach((function(t){if(t&&Math.abs(window.scrollY-t.offsetTop)<Math.abs(window.scrollY-e.offsetTop)){e=t}}));this.activeId="#"+e.getAttribute("id")};t.prototype.parseTitle=function(t){var e=t.replace("#","");var n=this.docs[e];return n?n.split(/##(.*?)\n/).find((function(t){return t!==""})).trim():e};t.prototype.anchorClass=function(t){return t===this.activeId?"anj-active":""};t.prototype.navigate=function(){var t=this;return new Promise((function(e){window.setTimeout((function(){t.activeId=window.location.hash;var n=document.querySelector(t.activeId);if(n){window.scrollTo(0,n.offsetTop)}e()}),500)}))};t.prototype.render=function(){var t=this;if(!this.sectionIds){return}var e=window.location.pathname;return n("div",{class:"anj-toc"},this.sectionIds.map((function(r){return n("a",{href:""+e+r,onClick:function(){return t.activeId=r},class:t.anchorClass(r)},t.parseTitle(r))})))};Object.defineProperty(t,"watchers",{get:function(){return{keys:["onDemosChange"]}},enumerable:true,configurable:true});Object.defineProperty(t,"style",{get:function(){return"ad-toc{display:block;position:relative}ad-toc .anj-toc{padding:1rem 0;position:fixed;top:3rem}ad-toc a{display:block;font-size:.75rem;margin-bottom:.5rem;text-transform:capitalize;-webkit-transition:color .2s ease;transition:color .2s ease}ad-toc a:focus{text-decoration:underline}ad-toc a:active{text-decoration:none}ad-toc a.anj-active,ad-toc a.anj-active:focus,ad-toc a.anj-active:hover{color:var(--anj-primary);text-decoration:none}"},enumerable:true,configurable:true});return t}());var y=function(t,e){if(e===void 0){e=0}var n;return function(){var r=[];for(var o=0;o<arguments.length;o++){r[o]=arguments[o]}clearTimeout(n);n=setTimeout.apply(void 0,__spreadArrays([t,e],r))}};var v=t("ad_type_def",function(){function t(t){e(this,t)}Object.defineProperty(t,"style",{get:function(){return"ad-type-def{color:var(--anj-neutral-dark);font-size:.75rem}"},enumerable:true,configurable:true});return t}())}}}));
\No newline at end of file