text: (window.webpackJsonp=window.webpackJsonp||[]).push([[4],{286:function(e,t,c){"use strict";c.r(t);var n=c(18),r=c(22),l=c(27),o=c(28),d=c(19),h=c(108),m=(c(10),c(4),c(6),c(106)),f=c(2),v=(c(68),c(7),c(5),c(34));function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(object);e&&(c=c.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,c)}return t}function O(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?y(Object(source),!0).forEach((function(t){Object(f.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):y(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var j=function(e,t,c,desc){var n,r=arguments.length,l=r<3?t:null===desc?desc=Object.getOwnPropertyDescriptor(t,c):desc;if("object"===("undefined"==typeof Reflect?"undefined":Object(d.a)(Reflect))&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,c,desc);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(l=(r<3?n(l):r>3?n(t,c,l):n(t,c))||l);return r>3&&l&&Object.defineProperty(t,c,l),l},_=function(e){function t(){var e;return Object(n.a)(this,t),(e=Object(r.a)(this,Object(l.a)(t).apply(this,arguments))).selected=[],e.computedItems=e.createComputedItems(),e.computedItemsLength=e.computedItems.reduce((function(e,t){return t.isChild?e:e+1}),0),e}return Object(o.a)(t,e),Object(v.a)(t,[{key:"select",value:function(i){this.computedItems[i].selected=!this.computedItems[i].selected,this.selected=this.computedItems.filter((function(e){return e.selected})).map((function(e){return e.value})),this.$emit("input",this.selected)}},{key:"selectOne",value:function(i){if(!this.computedItems[i].selected){var e=!0,t=!1,c=void 0;try{for(var n,r=this.computedItems[Symbol.iterator]();!(e=(n=r.next()).done);e=!0){n.value.selected=!1}}catch(e){t=!0,c=e}finally{try{e||null==r.return||r.return()}finally{if(t)throw c}}}this.computedItems[i].selected=!this.computedItems[i].selected,this.selected=[this.computedItems[i].value],this.$emit("input",this.selected)}},{key:"selectAll",value:function(){if(this.computedItemsLength===this.selected.length){this.selected=[];var e=!0,t=!1,c=void 0;try{for(var n,r=this.computedItems[Symbol.iterator]();!(e=(n=r.next()).done);e=!0){n.value.selected=!1}}catch(e){t=!0,c=e}finally{try{e||null==r.return||r.return()}finally{if(t)throw c}}}else{this.selected=[];var l=!0,o=!1,d=void 0;try{for(var h,m=this.computedItems[Symbol.iterator]();!(l=(h=m.next()).done);l=!0){var f=h.value;f.selected=!0,this.selected.push(f.value)}}catch(e){o=!0,d=e}finally{try{l||null==m.return||m.return()}finally{if(o)throw d}}}this.$emit("input",this.selected)}},{key:"createComputedItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],l=this.headers.reduce((function(e,header){return O({},e,Object(f.a)({},header,""))}),{});return{expandedItems:t,expanded:c,value:O({},l,{},e),isChild:n,selected:r}}},{key:"expandRow",value:function(i){var e,t=this;if(this.computedItems[i].expanded=!this.computedItems[i].expanded,!this.computedItems[i].expanded)return this.computedItems.splice(i+1,this.computedItems[i].expandedItems.length);var c=this.computedItems[i].expandedItems.map((function(e){return t.createComputedItem(e,[],!1,!0)}));return(e=this.computedItems).splice.apply(e,[i+1,0].concat(Object(m.a)(c)))}},{key:"createComputedItems",value:function(){var e=this,t=[];return this.items.map((function(c,i){var n=[];if(e.deduplicate)for(var r=i+1;r<e.items.length;r++){var l=!0,o=!0,d=!1,h=void 0;try{for(var m,f=e.deduplicate[Symbol.iterator]();!(o=(m=f.next()).done);o=!0){var v=m.value;if(e.items[i][v]!==e.items[r][v]){l=!1;break}}}catch(e){d=!0,h=e}finally{try{o||null==f.return||f.return()}finally{if(d)throw h}}if(l){var y=e.items.splice(r,1)[0];n.push(y),r--}}t.push(e.createComputedItem(e.items[i],n))})),t}}]),t}(h.Vue);j([Object(h.Prop)({default:[]})],_.prototype,"headers",void 0),j([Object(h.Prop)({default:function(){return[]}})],_.prototype,"items",void 0),j([Object(h.Prop)({default:function(){return[]}})],_.prototype,"deduplicate",void 0),j([Object(h.Prop)({default:function(){return[]}})],_.prototype,"value",void 0),j([Object(h.Prop)({default:!1,type:Boolean})],_.prototype,"showSelect",void 0),j([Object(h.Prop)({default:!1,type:Boolean})],_.prototype,"singleSelect",void 0);var w=_=j([h.Component],_),I=c(56),x=c(96),k=c.n(x),C=c(124),component=Object(I.a)(w,(function(){var e=this,t=e.$createElement,c=e._self._c||t;return c("table",{staticClass:"table table-sm table-striped table-borderless"},[c("thead",{staticClass:"table-primary"},[e.headers.length?c("tr",[e.showSelect?c("th",{staticStyle:{width:"20px"}},[e.singleSelect?e._e():c("input",{attrs:{type:"checkbox"},domProps:{checked:e.selected.length===e.computedItemsLength},on:{click:function(t){return e.selectAll()}}})]):e._e(),e._v(" "),e.deduplicate.length?c("th",{staticStyle:{width:"20px"}}):e._e(),e._v(" "),e._l(e.headers,(function(header,i){return c("th",{key:i},[e._v(e._s(header))])}))],2):e._e()]),e._v(" "),c("tbody",e._l(e.computedItems,(function(t,i){return c("tr",{key:i,class:[t.isChild?"":"shadow-sm p-3 mb-5 bg-white rounded"]},[e.showSelect?c("td",{staticStyle:{width:"10px"}},[t.isChild?e._e():c("input",{attrs:{type:"checkbox"},domProps:{checked:t.selected},on:{click:function(t){e.singleSelect?e.selectOne(i):e.select(i)}}})]):e._e(),e._v(" "),e.deduplicate.length?c("td",{staticStyle:{width:"10px"}},[t.expandedItems.length?c("button",{on:{click:function(t){return e.expandRow(i)}}},[c("v-icon",[e._v(e._s(t.expanded?"mdi-chevron-up":"mdi-chevron-down"))])],1):e._e()]):e._e(),e._v(" "),e._l(t.value,(function(col,t){return c("td",{key:t},[e._v(e._s(col))])}))],2)})),0)])}),[],!1,null,null,null),P=component.exports;k()(component,{VIcon:C.a});var S=function(e,t,c,desc){var n,r=arguments.length,l=r<3?t:null===desc?desc=Object.getOwnPropertyDescriptor(t,c):desc;if("object"===("undefined"==typeof Reflect?"undefined":Object(d.a)(Reflect))&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,c,desc);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(l=(r<3?n(l):r>3?n(t,c,l):n(t,c))||l);return r>3&&l&&Object.defineProperty(t,c,l),l},R=function(e){function t(){var e;return Object(n.a)(this,t),(e=Object(r.a)(this,Object(l.a)(t).apply(this,arguments))).selected=[],e.headers=["a","b","c"],e.items=[{a:"and",c:"cat"},{a:"ant",b:"bat",c:"can"},{a:"ant",b:"bat",c:"can"},{a:"ant",b:"bat",c:"can"},{a:"ant",b:"bat",c:"can"},{a:"ant",b:"bat",c:"can"},{a:"ant",b:"bat",c:"can"},{a:"ant",b:"boy",c:"can"},{a:"all",b:"bop",c:"con"},{a:"all",b:"big",c:"con"},{a:"act",b:"bop",c:"con"},{a:"apt",b:"bop"},{a:"apt",b:"biz"},{a:"apt",b:"biz",c:"can"}],e}return Object(o.a)(t,e),t}(h.Vue),D=R=S([Object(h.Component)({components:{SimSimpleTable:P}})],R),$=Object(I.a)(D,(function(){var e=this,t=e.$createElement,c=e._self._c||t;return c("div",{staticClass:"container-fluid"},[c("div",{staticClass:"row"},[c("div",{staticClass:"col-lg"},[c("sim-simple-table",{staticClass:"col-lg",attrs:{items:e.items,headers:e.headers,deduplicate:["a","c"],"show-select":""},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}})],1),e._v(" "),c("div",{staticClass:"col-lg-2"},[e._m(0),e._v(" "),e._l(e.selected,(function(t,i){return c("div",{key:i,staticClass:"row mx-auto"},[e._v("\n        "+e._s(t.a)+"\n      ")])}))],2)])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"row bg-primary"},[t("h3",{staticClass:"m-auto text-light"},[this._v("Selected")])])}],!1,null,null,null);t.default=$.exports}}]);