(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{"6jYb":function(e,t,a){"use strict";var n=a("mrSG"),r=a("q1tI"),c=a.n(r),i=a("Wu7z"),s=a("EKT6"),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.searchQuery,a=e.layoutMode,r=e.onSetLayoutMode,u=e.linkButton,l=e.setSearchQuery,o=e.target,m={href:u.href};return o&&(m.target=o),c.a.createElement("div",{className:"page-action-bar"},c.a.createElement("div",{className:"gf-form gf-form--grow"},c.a.createElement(s.a,{labelClassName:"gf-form--has-input-icon",inputClassName:"gf-form-input width-20",value:t,onChange:l,placeholder:"Filter by name or type"}),c.a.createElement(i.b,{mode:a,onLayoutModeChanged:function(e){return r(e)}})),c.a.createElement("div",{className:"page-action-bar__spacer"}),c.a.createElement("a",Object(n.__assign)({className:"btn btn-primary"},m),u.title))},t}(r.PureComponent);t.a=u},EKT6:function(e,t,a){"use strict";a.d(t,"a",function(){return i});var n=a("q1tI"),r=a.n(n),c=a("Obii"),i=Object(n.forwardRef)(function(e,t){return r.a.createElement("label",{className:e.labelClassName},r.a.createElement("input",{ref:t,type:"text",className:e.inputClassName,value:Object(c.unEscapeStringFromRegex)(e.value),onChange:function(t){return e.onChange(Object(c.escapeStringForRegex)(t.target.value))},placeholder:e.placeholder?e.placeholder:null}),r.a.createElement("i",{className:"gf-form-input-icon fa fa-search"}))})},KFLF:function(e,t,a){"use strict";var n=a("q1tI"),r=a.n(n),c=a("TSYQ"),i=a.n(c),s=function(e){var t=e.plugin;return r.a.createElement("li",{className:"card-item-wrapper"},r.a.createElement("a",{className:"card-item",href:"plugins/"+t.id+"/"},r.a.createElement("div",{className:"card-item-header"},r.a.createElement("div",{className:"card-item-type"},t.type),t.hasUpdate&&r.a.createElement("div",{className:"card-item-notice"},r.a.createElement("span",{"bs-tooltip":"plugin.latestVersion"},"Update available!"))),r.a.createElement("div",{className:"card-item-body"},r.a.createElement("figure",{className:"card-item-figure"},r.a.createElement("img",{src:t.info.logos.small})),r.a.createElement("div",{className:"card-item-details"},r.a.createElement("div",{className:"card-item-name"},t.name),r.a.createElement("div",{className:"card-item-sub-name"},"By "+t.info.author.name)))))},u=a("Wu7z");t.a=function(e){var t=e.plugins,a=e.layoutMode,n=i()({"card-section":!0,"card-list-layout-grid":a===u.a.Grid,"card-list-layout-list":a===u.a.List});return r.a.createElement("section",{className:n},r.a.createElement("ol",{className:"card-list"},t.map(function(e,t){return r.a.createElement(s,{plugin:e,key:e.name+"-"+t})})))}},mGjS:function(e,t,a){"use strict";a.r(t),function(e){a.d(t,"PluginListPage",function(){return g});var n=a("mrSG"),r=a("q1tI"),c=a.n(r),i=a("0cfB"),s=a("/MKj"),u=a("ZGyg"),l=a("6jYb"),o=a("KFLF"),m=a("jGYO"),d=a("lzJ5"),p=a("y6t6"),f=a("y6L2"),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){this.fetchPlugins()},t.prototype.fetchPlugins=function(){return Object(n.__awaiter)(this,void 0,void 0,function(){return Object(n.__generator)(this,function(e){switch(e.label){case 0:return[4,this.props.loadPlugins()];case 1:return e.sent(),[2]}})})},t.prototype.render=function(){var e=this.props,t=e.hasFetched,a=e.navModel,n=e.plugins,r=e.layoutMode,i=e.setPluginsLayoutMode,s=e.setPluginsSearchQuery,m=e.searchQuery;return c.a.createElement(u.a,{navModel:a},c.a.createElement(u.a.Contents,{isLoading:!t},c.a.createElement(c.a.Fragment,null,c.a.createElement(l.a,{searchQuery:m,layoutMode:r,onSetLayoutMode:function(e){return i(e)},setSearchQuery:function(e){return s(e)},linkButton:{href:"https://grafana.com/plugins?utm_source=grafana_plugin_list",title:"Find more plugins on Grafana.com"}}),t&&n&&n&&c.a.createElement(o.a,{plugins:n,layoutMode:r}))))},t}(r.PureComponent);var h={loadPlugins:m.b,setPluginsLayoutMode:f.e,setPluginsSearchQuery:f.f};t.default=Object(i.hot)(e)(Object(s.connect)(function(e){return{navModel:Object(d.a)(e.navIndex,"plugins"),plugins:Object(p.b)(e.plugins),layoutMode:Object(p.a)(e.plugins),searchQuery:Object(p.c)(e.plugins),hasFetched:e.plugins.hasFetched}},h)(g))}.call(this,a("3UD+")(e))},y6t6:function(e,t,a){"use strict";a.d(t,"b",function(){return n}),a.d(t,"c",function(){return r}),a.d(t,"a",function(){return c});var n=function(e){var t=new RegExp(e.searchQuery,"i");return e.plugins.filter(function(e){return t.test(e.name)||t.test(e.info.author.name)||t.test(e.info.description)})},r=function(e){return e.searchQuery},c=function(e){return e.layoutMode}}}]);
//# sourceMappingURL=PluginListPage.4d0490a94b199a11f40c.js.map