UNPKG

@stencil/core

Version:

A Compiler for Web Components and Progressive Web Apps

1 lines 3.17 kB
System.register(["./p-459b95cc.system.js"],function(e){"use strict";var t,i,r;return{setters:[function(e){t=e.r;i=e.d;r=e.h}],execute:function(){var s=function(){function e(e){t(this,e);this.filterChange=i(this,"filterChange",7)}e.prototype.render=function(){var e=this;if(!this.diffs||this.diffs.length===0||!this.filter){return}var t=this.diffs.reduce(function(e,t){if(!e.some(function(e){return e.value===t.device})){e.push({text:t.device,value:t.device})}return e},[{text:"All Devices",value:""}]);return r("section",null,r("div",{class:"showing"},"Showing ",this.diffs.filter(function(e){return e.show}).length),r("div",{class:"search"},r("input",{type:"search",onInput:function(t){e.filterChange.emit({search:t.target.value})},value:this.filter.search||""})),t.length>1?r("div",{class:"device"},r("select",{onInput:function(t){e.filterChange.emit({device:t.target.value})}},t.map(function(t){return r("option",{key:t.value,selected:t.value===e.filter.device,value:t.value},t.text)}))):null,r("div",{class:"mismatch"},r("select",{onInput:function(t){e.filterChange.emit({mismatch:t.target.value})}},r("option",{value:"",selected:this.filter.mismatch===""},"> 0"),r("option",{value:"100",selected:this.filter.mismatch==="100"},"> 100"),r("option",{value:"250",selected:this.filter.mismatch==="250"},"> 250"),r("option",{value:"500",selected:this.filter.mismatch==="500"},"> 500"),r("option",{value:"1000",selected:this.filter.mismatch==="1000"},"> 1,000"),r("option",{value:"2500",selected:this.filter.mismatch==="2500"},"> 2,500"),r("option",{value:"5000",selected:this.filter.mismatch==="5000"},"> 5,000"),r("option",{value:"10000",selected:this.filter.mismatch==="10000"},"> 10,000"),r("option",{value:"25000",selected:this.filter.mismatch==="25000"},"> 25,000"),r("option",{value:"50000",selected:this.filter.mismatch==="50000"},"> 50,000"),r("option",{value:"all",selected:this.filter.mismatch==="all"},"All Screenshots"))))};Object.defineProperty(e,"style",{get:function(){return"input,select{font-size:10px}.showing{font-size:12px;white-space:nowrap;margin:17px 8px 0 0;color:var(--analysis-data-color)}section{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.device,.mismatch,.search{margin:13px 8px 0 0}"},enumerable:true,configurable:true});return e}();e("compare_filter",s);var l=function(){function e(e){t(this,e)}e.prototype.render=function(){return[r("header",null,r("div",{class:"logo"},r("a",{href:"/"},r("img",{src:this.appSrcUrl+"/assets/logo.png?1"}))),r("compare-filter",{diffs:this.diffs,filter:this.filter}))]};Object.defineProperty(e,"style",{get:function(){return":host{background:#fff;-webkit-box-shadow:var(--header-box-shadow);box-shadow:var(--header-box-shadow)}nav{padding:4px 4px}nav a{font-size:14px;text-decoration:none;color:var(--breadcrumb-color);display:inline-block;padding:0 4px 0 4px}nav a:hover{text-decoration:underline}header{display:-ms-flexbox;display:flex;width:calc(100% - 115px);padding:8px}img{width:174px;height:32px}.logo{padding:7px}.logo,compare-filter{-ms-flex:1;flex:1}h1{margin:0;padding:0;font-size:18px}"},enumerable:true,configurable:true});return e}();e("compare_header",l)}}});