Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vuetable

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vuetable - npm Package Compare versions

Comparing version 1.5.9 to 1.5.10

2

dist/vue-table.js

@@ -939,4 +939,2 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

checkCheckboxesState: function checkCheckboxesState(fieldName) {
if (this.selectedTo.length === 0) return false;
var self = this;

@@ -943,0 +941,0 @@ var idColumn = this.extractArgs(fieldName);

2

dist/vue-table.min.js

@@ -1,1 +0,1 @@

!function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){var inserted=exports.cache={};exports.insert=function(css){if(!inserted[css]){inserted[css]=!0;var elem=document.createElement("style");return elem.setAttribute("type","text/css"),"textContent"in elem?elem.textContent=css:elem.styleSheet.cssText=css,document.getElementsByTagName("head")[0].appendChild(elem),elem}}},{}],2:[function(require,module,exports){var __vueify_insert__=require("vueify/lib/insert-css");__vueify_insert__.insert(".vuetable th.sortable:hover{color:#2185d0;cursor:pointer}.vuetable-actions{width:15%;padding:12px 0;text-align:center}.vuetable-pagination{background:#f9fafb!important}.vuetable-pagination-info{margin-top:auto;margin-bottom:auto}");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={props:{wrapperClass:{type:String,default:function(){return null}},tableWrapper:{type:String,default:function(){return null}},tableClass:{type:String,default:function(){return"ui blue striped selectable celled stackable attached table"}},loadingClass:{type:String,default:function(){return"loading"}},dataPath:{type:String,default:function(){return"data"}},paginationPath:{type:String,default:function(){return"links.pagination"}},fields:{type:Array,required:!0},apiUrl:{type:String,required:!0},sortOrder:{type:Array,default:function(){return[]}},multiSort:{type:Boolean,default:function(){return!1}},multiSortKey:{type:String,default:"alt"},perPage:{type:Number,coerce:function(val){return parseInt(val)},default:function(){return 10}},ascendingIcon:{type:String,default:function(){return"blue chevron up icon"}},descendingIcon:{type:String,default:function(){return"blue chevron down icon"}},appendParams:{type:Array,default:function(){return[]}},showPagination:{type:Boolean,default:function(){return!0}},paginationComponent:{type:String,default:function(){return"vuetable-pagination"}},paginationInfoTemplate:{type:String,default:function(){return"Displaying {from} to {to} of {total} items"}},paginationInfoNoDataTemplate:{type:String,default:function(){return"No relevant data"}},paginationClass:{type:String,default:function(){return"ui bottom attached segment grid"}},paginationInfoClass:{type:String,default:function(){return"left floated left aligned six wide column"}},paginationComponentClass:{type:String,default:function(){return"right floated right aligned six wide column"}},paginationConfig:{type:String,default:function(){return"paginationConfig"}},paginationConfigCallback:{type:String,default:function(){return"paginationConfig"}},itemActions:{type:Array,default:function(){return[]}},queryParams:{type:Object,default:function(){return{sort:"sort",page:"page",perPage:"per_page"}}},loadOnStart:{type:Boolean,default:function(){return!0}},selectedTo:{type:Array,default:function(){return[]}},httpOptions:{type:Object,default:function(){return{}}},detailRow:{type:String,default:""},detailRowCallback:{type:String,default:""},detailRowId:{type:String,default:"id"},detailRowTransition:{type:String,default:""},detailRowClass:{type:String,default:"vuetable-detail-row"},detailRowComponent:{type:String,default:""},rowClassCallback:{type:String,default:""}},data:function(){return{eventPrefix:"vuetable:",tableData:null,tablePagination:null,currentPage:1,visibleDetailRows:[]}},directives:{attr:{update:function(value){for(var i in value)this.el.setAttribute(i,value[i])}}},computed:{paginationInfo:function(){return null==this.tablePagination||0==this.tablePagination.total?this.paginationInfoNoDataTemplate:this.paginationInfoTemplate.replace("{from}",this.tablePagination.from||0).replace("{to}",this.tablePagination.to||0).replace("{total}",this.tablePagination.total||0)},useDetailRow:function(){return this.tableData&&"undefined"==typeof this.tableData[0][this.detailRowId]?(console.warn('You need to define "detail-row-id" in order for detail-row feature to work!'),!1):""!==this.detailRowCallback.trim()||""!==this.detailRowComponent},useDetailRowComponent:function(){return""!==this.detailRowComponent},countVisibleFields:function(){return this.fields.filter(function(field){return field.visible}).length}},methods:{normalizeFields:function(){var obj,self=this;this.fields.forEach(function(field,i){obj="string"==typeof field?{name:field,title:self.setTitle(field),titleClass:"",dataClass:"",callback:null,visible:!0}:{name:field.name,title:void 0===field.title?self.setTitle(field.name):field.title,sortField:field.sortField,titleClass:void 0===field.titleClass?"":field.titleClass,dataClass:void 0===field.dataClass?"":field.dataClass,callback:void 0===field.callback?"":field.callback,visible:void 0===field.visible||field.visible},self.fields.$set(i,obj)})},setTitle:function(str){return this.isSpecialField(str)?"":this.titleCase(str)},titleCase:function(str){return str.replace(/\w+/g,function(txt){return txt.charAt(0).toUpperCase()+txt.substr(1).toLowerCase()})},notIn:function(str,arr){return arr.indexOf(str)===-1},loadData:function(){var self=this,wrapper=document.querySelector(this.tableWrapper);this.showLoadingAnimation(wrapper);var url=this.apiUrl+"?"+this.getAllQueryParams();this.$http.get(url,this.httpOptions).then(function(response){var body=this.transform(response.body);self.tableData=self.getObjectValue(body,self.dataPath,null),self.tablePagination=self.getObjectValue(body,self.paginationPath,null),null===self.tablePagination&&console.warn('vuetable: pagination-path "'+self.paginationPath+'" not found. It looks like the data returned from the sever does not have pagination information or you may have set it incorrectly.'),self.$nextTick(function(){self.dispatchEvent("load-success",response),self.broadcastEvent("load-success",self.tablePagination),self.hideLoadingAnimation(wrapper)})},function(response){self.dispatchEvent("load-error",response),self.broadcastEvent("load-error",response),self.hideLoadingAnimation(wrapper)})},getAllQueryParams:function(){var params=[this.queryParams.sort+"="+this.getSortParam(),this.queryParams.page+"="+this.currentPage,this.queryParams.perPage+"="+this.perPage].join("&");return this.appendParams.length>0&&(params+="&"+this.appendParams.join("&")),params},showLoadingAnimation:function(wrapper){null!==wrapper&&this.addClass(wrapper,this.loadingClass),this.dispatchEvent("loading")},hideLoadingAnimation:function(wrapper){null!==wrapper&&this.removeClass(wrapper,this.loadingClass),this.dispatchEvent("loaded")},transform:function(data){var func="transform";return this.parentFunctionExists(func)?this.$parent[func].call(this.$parent,data):data},parentFunctionExists:function(func){return""!==func&&"function"==typeof this.$parent[func]},getTitle:function(field){return"undefined"==typeof field.title?field.name.replace("."," "):field.title},getSortParam:function(){return this.sortOrder&&""!=this.sortOrder.field?"function"==typeof this.$parent.getSortParam?this.$parent.getSortParam.call(this.$parent,this.sortOrder):this.getDefaultSortParam():""},getDefaultSortParam:function(){for(var result="",i=0;i<this.sortOrder.length;i++){var fieldName="undefined"==typeof this.sortOrder[i].sortField?this.sortOrder[i].field:this.sortOrder[i].sortField;result+=fieldName+"|"+this.sortOrder[i].direction+(i+1<this.sortOrder.length?",":"")}return result},addClass:function(el,className){el.classList?el.classList.add(className):el.className+=" "+className},removeClass:function(el,className){el.classList?el.classList.remove(className):el.className=el.className.replace(new RegExp("(^|\\b)"+className.split(" ").join("|")+"(\\b|$)","gi")," ")},dispatchEvent:function(eventName,args){this.$dispatch(this.eventPrefix+eventName,args)},broadcastEvent:function(eventName,args){this.$broadcast(this.eventPrefix+eventName,args)},orderBy:function(field,event){if(this.isSortable(field)){var key=this.multiSortKey.toLowerCase()+"Key";if(this.multiSort&&event[key]){var i=this.currentSortOrder(field);i===!1?this.sortOrder.push({field:field.sortField,direction:"asc"}):"asc"==this.sortOrder[i].direction?this.sortOrder[i].direction="desc":this.sortOrder.splice(i,1)}else 0==this.sortOrder.length&&this.sortOrder.push({field:"",direction:"asc"}),this.sortOrder.splice(1),this.sortOrder[0].field==field.sortField?this.sortOrder[0].direction="asc"==this.sortOrder[0].direction?"desc":"asc":this.sortOrder[0].direction="asc",this.sortOrder[0].field=field.sortField;this.currentPage=1,this.loadData()}},isSortable:function(field){return!("undefined"==typeof field.sortField)},isCurrentSortField:function(field){return this.currentSortOrder(field)!==!1},currentSortOrder:function(field){if(!this.isSortable(field))return!1;for(var i=0;i<this.sortOrder.length;i++)if(this.sortOrder[i].field==field.sortField)return i;return!1},sortIcon:function(field){var i=this.currentSortOrder(field);return i!==!1?"asc"==this.sortOrder[i].direction?this.ascendingIcon:this.descendingIcon:""},sortIconOpacity:function(field){var max=1,min=.3,step=.3,count=this.sortOrder.length,current=this.currentSortOrder(field);max-count*step<min&&(step=(max-min)/(count-1));var opacity=max-current*step;return opacity},gotoPreviousPage:function(){this.currentPage>1&&(this.currentPage--,this.loadData())},gotoNextPage:function(){this.currentPage<this.tablePagination.last_page&&(this.currentPage++,this.loadData())},gotoPage:function(page){page!=this.currentPage&&page>0&&page<=this.tablePagination.last_page&&(this.currentPage=page,this.loadData())},isSpecialField:function(fieldName){return"__"===fieldName.slice(0,2)},hasCallback:function(item){return!!item.callback},callCallback:function(field,item){if(this.hasCallback(field)){var args=field.callback.split("|"),func=args.shift();return"function"==typeof this.$parent[func]?args.length>0?this.$parent[func].apply(this.$parent,[this.getObjectValue(item,field.name)].concat(args)):this.$parent[func].call(this.$parent,this.getObjectValue(item,field.name)):null}},getObjectValue:function(object,path,defaultValue){defaultValue="undefined"==typeof defaultValue?null:defaultValue;var obj=object;if(""!=path.trim()){var keys=path.split(".");keys.forEach(function(key){return null===obj||"undefined"==typeof obj[key]||null===obj[key]?void(obj=defaultValue):void(obj=obj[key])})}return obj},callAction:function(action,data){this.$dispatch(this.eventPrefix+"action",action,data)},addParam:function(param){this.appendParams.push(param)},toggleCheckbox:function(isChecked,dataItem,fieldName){var idColumn=this.extractArgs(fieldName);if(void 0===idColumn)return void console.warn('You did not provide reference id column with "__checkbox:<column_name>" field!');var key=dataItem[idColumn];isChecked?this.selectId(key):this.unselectId(key)},toggleAllCheckboxes:function(isChecked,fieldName){var self=this,idColumn=this.extractArgs(fieldName);isChecked?this.tableData.forEach(function(dataItem){self.selectId(dataItem[idColumn])}):this.tableData.forEach(function(dataItem){self.unselectId(dataItem[idColumn])})},selectId:function(key){this.isSelectedRow(key)||this.selectedTo.push(key)},unselectId:function(key){this.selectedTo.$remove(key)},isSelectedRow:function(key){return this.selectedTo.indexOf(key)>=0},rowSelected:function(dataItem,fieldName){var idColumn=this.extractArgs(fieldName);return this.isSelectedRow(dataItem[idColumn])},checkCheckboxesState:function(fieldName){if(0===this.selectedTo.length)return!1;var self=this,idColumn=this.extractArgs(fieldName),selector="th.checkbox_"+idColumn+" input[type=checkbox]",els=document.querySelectorAll(selector),selected=this.tableData.filter(function(item){return self.selectedTo.indexOf(item[idColumn])>=0});return selected.length<=0?(els.forEach(function(el){el.indeterminate=!1}),!1):selected.length<this.perPage?(els.forEach(function(el){el.indeterminate=!0}),!0):(els.forEach(function(el){el.indeterminate=!1}),!0)},extractName:function(string){return string.split(":")[0].trim()},extractArgs:function(string){return string.split(":")[1]},callDetailRowCallback:function(item){var func=this.detailRowCallback.trim();return""===func?"":"function"==typeof this.$parent[func]?this.$parent[func].call(this.$parent,item):void console.error('Function "'+func+'()" does not exist!')},isVisibleDetailRow:function(rowId){return this.visibleDetailRows.indexOf(rowId)>=0},showDetailRow:function(rowId){this.isVisibleDetailRow(rowId)||this.visibleDetailRows.push(rowId)},hideDetailRow:function(rowId){this.isVisibleDetailRow(rowId)&&this.visibleDetailRows.$remove(rowId)},toggleDetailRow:function(rowId){this.isVisibleDetailRow(rowId)?this.hideDetailRow(rowId):this.showDetailRow(rowId)},onRowClass:function(dataItem,index){var func=this.rowClassCallback.trim();return""!==func&&"function"==typeof this.$parent[func]?this.$parent[func].call(this.$parent,dataItem,index):""},onRowChanged:function(dataItem){return this.dispatchEvent("row-changed",dataItem),!0},onRowClicked:function(dataItem,event){return this.$dispatch(this.eventPrefix+"row-clicked",dataItem,event),!0},onRowDoubleClicked:function(dataItem,event){this.$dispatch(this.eventPrefix+"row-dblclicked",dataItem,event)},onCellClicked:function(dataItem,field,event){this.$dispatch(this.eventPrefix+"cell-clicked",dataItem,field,event)},onCellDoubleClicked:function(dataItem,field,event){this.$dispatch(this.eventPrefix+"cell-dblclicked",dataItem,field,event)},onDetailRowClick:function(dataItem,event){this.$dispatch(this.eventPrefix+"detail-row-clicked",dataItem,event)},callPaginationConfig:function(){"function"==typeof this.$parent[this.paginationConfigCallback]&&this.$parent[this.paginationConfigCallback].call(this.$parent,this.$refs.pagination.$options.name)},logDeprecatedMessage:function(name,replacer){var msg='"{name}" prop is being deprecated and will be removed in the future. Please use "{replacer}" instead.';console.warn(msg.replace("{name}",name).replace("{replacer}",replacer))},checkForDeprecatedProps:function(){"paginationConfig"!==this.paginationConfig&&this.logDeprecatedMessage("paginationConfig","paginationConfigCallback"),""!==this.detailRow&&this.logDeprecatedMessage("detail-row","detail-row-callback"),""!==this.detailRowCallback&&this.logDeprecatedMessage("detail-row-callback","detail-row-component")}},watch:{multiSort:function(newVal,oldVal){newVal===!1&&this.sortOrder.length>1&&(this.sortOrder.splice(1),this.loadData())}},events:{"vuetable-pagination:change-page":function(page){"prev"==page?this.gotoPreviousPage():"next"==page?this.gotoNextPage():this.gotoPage(page)},"vuetable:reload":function(){this.loadData()},"vuetable:refresh":function(){this.currentPage=1,this.loadData()},"vuetable:goto-page":function(page){this.$emit("vuetable-pagination:change-page",page)},"vuetable:set-options":function(options){for(var n in options)this.$set(n,options[n])},"vuetable:toggle-detail":function(dataItem){this.toggleDetailRow(dataItem)},"vuetable:show-detail":function(dataItem){this.showDetailRow(dataItem)},"vuetable:hide-detail":function(dataItem){this.hideDetailRow(dataItem)}},created:function(){this.checkForDeprecatedProps(),this.normalizeFields(),this.loadOnStart&&this.loadData(),this.$nextTick(function(){this.callPaginationConfig()})}},module.exports.__esModule&&(module.exports=module.exports.default),("function"==typeof module.exports?module.exports.options:module.exports).template='<div class={{wrapperClass}}><table class="vuetable {{tableClass}}"><thead><tr><template v-for="field in fields"><template v-if=field.visible><template v-if=isSpecialField(field.name)><th v-if="extractName(field.name) == \'__checkbox\'" :class="[field.titleClass, \'checkbox_\'+extractArgs(field.name)]"><input type=checkbox @change="toggleAllCheckboxes($event.target.checked, field.name)" :checked=checkCheckboxesState(field.name)><th v-if="extractName(field.name) == \'__component\'" @click="orderBy(field, $event)" class="{{field.titleClass || \'\'}} {{isSortable(field) ? \'sortable\' : \'\'}}">{{field.title || \'\'}} <i v-if="isCurrentSortField(field) &amp;&amp; field.title" class="{{ sortIcon(field) }}" :style="{opacity: sortIconOpacity(field)}"></i><th v-if="notIn(extractName(field.name), [\'__checkbox\', \'__component\'])" id={{field.name}} class="{{field.titleClass || \'\'}}">{{field.title || \'\'}}</template><template v-else=""><th @click="orderBy(field, $event)" id=_{{field.name}} class="{{field.titleClass || \'\'}} {{isSortable(field) ? \'sortable\' : \'\'}}">{{getTitle(field) | capitalize}}&nbsp; <i v-if=isCurrentSortField(field) class="{{ sortIcon(field) }}" :style="{opacity: sortIconOpacity(field)}"></i></template></template></template><tbody v-cloak=""><template v-for="(itemNumber, item) in tableData"><tr @dblclick="onRowDoubleClicked(item, $event)" @click="onRowClicked(item, $event)" :render=onRowChanged(item) :class="onRowClass(item, itemNumber)"><template v-for="field in fields"><template v-if=field.visible><template v-if=isSpecialField(field.name)><td v-if="extractName(field.name) == \'__sequence\'" class="vuetable-sequence {{field.dataClass}}" v-html="tablePagination.from + itemNumber"><td v-if="extractName(field.name) == \'__checkbox\'" class="vuetable-checkboxes {{field.dataClass}}"><input type=checkbox @change="toggleCheckbox($event.target.checked, item, field.name)" :checked="rowSelected(item, field.name)"><td v-if="field.name == \'__actions\'" class="vuetable-actions {{field.dataClass}}"><template v-for="action in itemActions"><button class="{{ action.class }}" @click="callAction(action.name, item)" v-attr=action.extra><i class="{{ action.icon }}"></i> {{ action.label }}</button></template><td v-if="extractName(field.name) == \'__component\'" class={{field.dataClass}}><component :is=extractArgs(field.name) :row-data=item :row-index=itemNumber></component></template><template v-else=""><td v-if=hasCallback(field) class={{field.dataClass}} @click="onCellClicked(item, field, $event)" @dblclick="onCellDoubleClicked(item, field, $event)">{{{ callCallback(field, item) }}}<td v-else="" class={{field.dataClass}} @click="onCellClicked(item, field, $event)" @dblclick="onCellDoubleClicked(item, field, $event)">{{{ getObjectValue(item, field.name, "") }}}</template></template></template></tr><template v-if=useDetailRow><template v-if=useDetailRowComponent><tr v-if=isVisibleDetailRow(item[detailRowId]) @click="onDetailRowClick(item, $event)" :transition=detailRowTransition :class=[detailRowClass]><td :colspan=countVisibleFields><component :is=detailRowComponent :row-data=item :row-index=itemNumber></component></template><template v-else=""><tr v-if=isVisibleDetailRow(item[detailRowId]) v-html=callDetailRowCallback(item) @click="onDetailRowClick(item, $event)" :transition=detailRowTransition :class=[detailRowClass]></template></template></template></table><div v-if=showPagination class="vuetable-pagination {{paginationClass}}"><div class="vuetable-pagination-info {{paginationInfoClass}}" v-html=paginationInfo></div><div v-show="tablePagination &amp;&amp; tablePagination.last_page > 1" class="vuetable-pagination-component {{paginationComponentClass}}"><component v-ref:pagination="" :is=paginationComponent></component></div></div></div>'},{"vueify/lib/insert-css":1}],3:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _VuetablePaginationMixin=require("./VuetablePaginationMixin.vue"),_VuetablePaginationMixin2=_interopRequireDefault(_VuetablePaginationMixin);exports.default={mixins:[_VuetablePaginationMixin2.default]},module.exports.__esModule&&(module.exports=module.exports.default),("function"==typeof module.exports?module.exports.options:module.exports).template='<div class={{wrapperClass}}><a @click=loadPage(1) class="btn-nav {{linkClass}} {{isOnFirstPage ? disabledClass : \'\'}}"><i v-if="icons.first != \'\'" class={{icons.first}}></i> <span v-else="">«</span> </a><a @click="loadPage(\'prev\')" class="btn-nav {{linkClass}} {{isOnFirstPage ? disabledClass : \'\'}}"><i v-if="icons.next != \'\'" class={{icons.prev}}></i> <span v-else="">&nbsp;‹</span></a><template v-if=notEnoughPages><template v-for="n in totalPage"><a @click=loadPage(n+1) class="{{pageClass}} {{isCurrentPage(n+1) ? activeClass : \'\'}}">{{ n+1 }}</a></template></template><template v-else=""><template v-for="n in windowSize"><a @click=loadPage(windowStart+n) class="{{pageClass}} {{isCurrentPage(windowStart+n) ? activeClass : \'\'}}">{{ windowStart+n }}</a></template></template><a @click="loadPage(\'next\')" class="btn-nav {{linkClass}} {{isOnLastPage ? disabledClass : \'\'}}"><i v-if="icons.next != \'\'" class={{icons.next}}></i> <span v-else="">›&nbsp;</span> </a><a @click=loadPage(totalPage) class="btn-nav {{linkClass}} {{isOnLastPage ? disabledClass : \'\'}}"><i v-if="icons.last != \'\'" class={{icons.last}}></i> <span v-else="">»</span></a></div>'},{"./VuetablePaginationMixin.vue":5}],4:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _VuetablePaginationMixin=require("./VuetablePaginationMixin.vue"),_VuetablePaginationMixin2=_interopRequireDefault(_VuetablePaginationMixin);exports.default={mixins:[_VuetablePaginationMixin2.default],props:{dropdownClass:{type:String,default:function(){return"ui search dropdown"}},pageText:{type:String,default:function(){return"Page"}}},methods:{loadPage:function(page){"prev"!=page||this.isOnFirstPage?"next"!=page||this.isOnLastPage||this.setDropdownToPage(this.tablePagination.current_page+1):this.setDropdownToPage(this.tablePagination.current_page-1),this.$dispatch("vuetable-pagination:change-page",page)},setDropdownToPage:function(page){this.$nextTick(function(){document.getElementById("vuetable-pagination-dropdown").value=page})},selectPage:function(event){this.$dispatch("vuetable-pagination:change-page",event.target.selectedIndex+1)}},events:{"vuetable:load-success":function(tablePagination){this.tablePagination=tablePagination,this.setDropdownToPage(tablePagination.current_page)}}},module.exports.__esModule&&(module.exports=module.exports.default),("function"==typeof module.exports?module.exports.options:module.exports).template='<div class={{wrapperClass}}><a @click="loadPage(\'prev\')" class="{{linkClass}} {{isOnFirstPage ? disabledClass : \'\'}}"><i :class=icons.prev></i></a><select id=vuetable-pagination-dropdown class={{dropdownClass}} @change=selectPage($event)><template v-for="n in totalPage"><option class={{pageClass}} value={{n+1}}>{{pageText}} {{n+1}}</template></select><a @click="loadPage(\'next\')" class="{{linkClass}} {{isOnLastPage ? disabledClass : \'\'}}"><i :class=icons.next></i></a></div>'},{"./VuetablePaginationMixin.vue":5}],5:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={props:{wrapperClass:{type:String,default:function(){return"ui right floated pagination menu"}},activeClass:{type:String,default:function(){return"active large"}},disabledClass:{type:String,default:function(){return"disabled"}},pageClass:{type:String,default:function(){return"item"}},linkClass:{type:String,default:function(){return"icon item"}},icons:{type:Object,default:function(){return{first:"angle double left icon",prev:"left chevron icon",next:"right chevron icon",last:"angle double right icon"}}},onEachSide:{type:Number,coerce:function(value){return parseInt(value)},default:function(){return 2}}},data:function(){return{tablePagination:null}},computed:{totalPage:function(){return null==this.tablePagination?0:this.tablePagination.last_page},isOnFirstPage:function(){return null!=this.tablePagination&&1==this.tablePagination.current_page},isOnLastPage:function(){return null!=this.tablePagination&&this.tablePagination.current_page==this.tablePagination.last_page},notEnoughPages:function(){return this.totalPage<2*this.onEachSide+4},windowSize:function(){return 2*this.onEachSide+1},windowStart:function(){return!this.tablePagination||this.tablePagination.current_page<=this.onEachSide?1:this.tablePagination.current_page>=this.totalPage-this.onEachSide?this.totalPage-2*this.onEachSide:this.tablePagination.current_page-this.onEachSide}},methods:{loadPage:function(page){this.$dispatch("vuetable-pagination:change-page",page)},isCurrentPage:function(page){return page==this.tablePagination.current_page}},events:{"vuetable:load-success":function(tablePagination){this.tablePagination=tablePagination},"vuetable-pagination:set-options":function(options){for(var n in options)this.$set(n,options[n])}}},module.exports.__esModule&&(module.exports=module.exports.default)},{}],6:[function(require,module,exports){Vue.component("vuetable-pagination",require("./components/VuetablePagination.vue")),Vue.component("vuetable-pagination-dropdown",require("./components/VuetablePaginationDropdown.vue")),Vue.component("vuetable",require("./components/Vuetable.vue"))},{"./components/Vuetable.vue":2,"./components/VuetablePagination.vue":3,"./components/VuetablePaginationDropdown.vue":4}]},{},[6]);
!function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){var inserted=exports.cache={};exports.insert=function(css){if(!inserted[css]){inserted[css]=!0;var elem=document.createElement("style");return elem.setAttribute("type","text/css"),"textContent"in elem?elem.textContent=css:elem.styleSheet.cssText=css,document.getElementsByTagName("head")[0].appendChild(elem),elem}}},{}],2:[function(require,module,exports){var __vueify_insert__=require("vueify/lib/insert-css");__vueify_insert__.insert(".vuetable th.sortable:hover{color:#2185d0;cursor:pointer}.vuetable-actions{width:15%;padding:12px 0;text-align:center}.vuetable-pagination{background:#f9fafb!important}.vuetable-pagination-info{margin-top:auto;margin-bottom:auto}");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={props:{wrapperClass:{type:String,default:function(){return null}},tableWrapper:{type:String,default:function(){return null}},tableClass:{type:String,default:function(){return"ui blue striped selectable celled stackable attached table"}},loadingClass:{type:String,default:function(){return"loading"}},dataPath:{type:String,default:function(){return"data"}},paginationPath:{type:String,default:function(){return"links.pagination"}},fields:{type:Array,required:!0},apiUrl:{type:String,required:!0},sortOrder:{type:Array,default:function(){return[]}},multiSort:{type:Boolean,default:function(){return!1}},multiSortKey:{type:String,default:"alt"},perPage:{type:Number,coerce:function(val){return parseInt(val)},default:function(){return 10}},ascendingIcon:{type:String,default:function(){return"blue chevron up icon"}},descendingIcon:{type:String,default:function(){return"blue chevron down icon"}},appendParams:{type:Array,default:function(){return[]}},showPagination:{type:Boolean,default:function(){return!0}},paginationComponent:{type:String,default:function(){return"vuetable-pagination"}},paginationInfoTemplate:{type:String,default:function(){return"Displaying {from} to {to} of {total} items"}},paginationInfoNoDataTemplate:{type:String,default:function(){return"No relevant data"}},paginationClass:{type:String,default:function(){return"ui bottom attached segment grid"}},paginationInfoClass:{type:String,default:function(){return"left floated left aligned six wide column"}},paginationComponentClass:{type:String,default:function(){return"right floated right aligned six wide column"}},paginationConfig:{type:String,default:function(){return"paginationConfig"}},paginationConfigCallback:{type:String,default:function(){return"paginationConfig"}},itemActions:{type:Array,default:function(){return[]}},queryParams:{type:Object,default:function(){return{sort:"sort",page:"page",perPage:"per_page"}}},loadOnStart:{type:Boolean,default:function(){return!0}},selectedTo:{type:Array,default:function(){return[]}},httpOptions:{type:Object,default:function(){return{}}},detailRow:{type:String,default:""},detailRowCallback:{type:String,default:""},detailRowId:{type:String,default:"id"},detailRowTransition:{type:String,default:""},detailRowClass:{type:String,default:"vuetable-detail-row"},detailRowComponent:{type:String,default:""},rowClassCallback:{type:String,default:""}},data:function(){return{eventPrefix:"vuetable:",tableData:null,tablePagination:null,currentPage:1,visibleDetailRows:[]}},directives:{attr:{update:function(value){for(var i in value)this.el.setAttribute(i,value[i])}}},computed:{paginationInfo:function(){return null==this.tablePagination||0==this.tablePagination.total?this.paginationInfoNoDataTemplate:this.paginationInfoTemplate.replace("{from}",this.tablePagination.from||0).replace("{to}",this.tablePagination.to||0).replace("{total}",this.tablePagination.total||0)},useDetailRow:function(){return this.tableData&&"undefined"==typeof this.tableData[0][this.detailRowId]?(console.warn('You need to define "detail-row-id" in order for detail-row feature to work!'),!1):""!==this.detailRowCallback.trim()||""!==this.detailRowComponent},useDetailRowComponent:function(){return""!==this.detailRowComponent},countVisibleFields:function(){return this.fields.filter(function(field){return field.visible}).length}},methods:{normalizeFields:function(){var obj,self=this;this.fields.forEach(function(field,i){obj="string"==typeof field?{name:field,title:self.setTitle(field),titleClass:"",dataClass:"",callback:null,visible:!0}:{name:field.name,title:void 0===field.title?self.setTitle(field.name):field.title,sortField:field.sortField,titleClass:void 0===field.titleClass?"":field.titleClass,dataClass:void 0===field.dataClass?"":field.dataClass,callback:void 0===field.callback?"":field.callback,visible:void 0===field.visible||field.visible},self.fields.$set(i,obj)})},setTitle:function(str){return this.isSpecialField(str)?"":this.titleCase(str)},titleCase:function(str){return str.replace(/\w+/g,function(txt){return txt.charAt(0).toUpperCase()+txt.substr(1).toLowerCase()})},notIn:function(str,arr){return arr.indexOf(str)===-1},loadData:function(){var self=this,wrapper=document.querySelector(this.tableWrapper);this.showLoadingAnimation(wrapper);var url=this.apiUrl+"?"+this.getAllQueryParams();this.$http.get(url,this.httpOptions).then(function(response){var body=this.transform(response.body);self.tableData=self.getObjectValue(body,self.dataPath,null),self.tablePagination=self.getObjectValue(body,self.paginationPath,null),null===self.tablePagination&&console.warn('vuetable: pagination-path "'+self.paginationPath+'" not found. It looks like the data returned from the sever does not have pagination information or you may have set it incorrectly.'),self.$nextTick(function(){self.dispatchEvent("load-success",response),self.broadcastEvent("load-success",self.tablePagination),self.hideLoadingAnimation(wrapper)})},function(response){self.dispatchEvent("load-error",response),self.broadcastEvent("load-error",response),self.hideLoadingAnimation(wrapper)})},getAllQueryParams:function(){var params=[this.queryParams.sort+"="+this.getSortParam(),this.queryParams.page+"="+this.currentPage,this.queryParams.perPage+"="+this.perPage].join("&");return this.appendParams.length>0&&(params+="&"+this.appendParams.join("&")),params},showLoadingAnimation:function(wrapper){null!==wrapper&&this.addClass(wrapper,this.loadingClass),this.dispatchEvent("loading")},hideLoadingAnimation:function(wrapper){null!==wrapper&&this.removeClass(wrapper,this.loadingClass),this.dispatchEvent("loaded")},transform:function(data){var func="transform";return this.parentFunctionExists(func)?this.$parent[func].call(this.$parent,data):data},parentFunctionExists:function(func){return""!==func&&"function"==typeof this.$parent[func]},getTitle:function(field){return"undefined"==typeof field.title?field.name.replace("."," "):field.title},getSortParam:function(){return this.sortOrder&&""!=this.sortOrder.field?"function"==typeof this.$parent.getSortParam?this.$parent.getSortParam.call(this.$parent,this.sortOrder):this.getDefaultSortParam():""},getDefaultSortParam:function(){for(var result="",i=0;i<this.sortOrder.length;i++){var fieldName="undefined"==typeof this.sortOrder[i].sortField?this.sortOrder[i].field:this.sortOrder[i].sortField;result+=fieldName+"|"+this.sortOrder[i].direction+(i+1<this.sortOrder.length?",":"")}return result},addClass:function(el,className){el.classList?el.classList.add(className):el.className+=" "+className},removeClass:function(el,className){el.classList?el.classList.remove(className):el.className=el.className.replace(new RegExp("(^|\\b)"+className.split(" ").join("|")+"(\\b|$)","gi")," ")},dispatchEvent:function(eventName,args){this.$dispatch(this.eventPrefix+eventName,args)},broadcastEvent:function(eventName,args){this.$broadcast(this.eventPrefix+eventName,args)},orderBy:function(field,event){if(this.isSortable(field)){var key=this.multiSortKey.toLowerCase()+"Key";if(this.multiSort&&event[key]){var i=this.currentSortOrder(field);i===!1?this.sortOrder.push({field:field.sortField,direction:"asc"}):"asc"==this.sortOrder[i].direction?this.sortOrder[i].direction="desc":this.sortOrder.splice(i,1)}else 0==this.sortOrder.length&&this.sortOrder.push({field:"",direction:"asc"}),this.sortOrder.splice(1),this.sortOrder[0].field==field.sortField?this.sortOrder[0].direction="asc"==this.sortOrder[0].direction?"desc":"asc":this.sortOrder[0].direction="asc",this.sortOrder[0].field=field.sortField;this.currentPage=1,this.loadData()}},isSortable:function(field){return!("undefined"==typeof field.sortField)},isCurrentSortField:function(field){return this.currentSortOrder(field)!==!1},currentSortOrder:function(field){if(!this.isSortable(field))return!1;for(var i=0;i<this.sortOrder.length;i++)if(this.sortOrder[i].field==field.sortField)return i;return!1},sortIcon:function(field){var i=this.currentSortOrder(field);return i!==!1?"asc"==this.sortOrder[i].direction?this.ascendingIcon:this.descendingIcon:""},sortIconOpacity:function(field){var max=1,min=.3,step=.3,count=this.sortOrder.length,current=this.currentSortOrder(field);max-count*step<min&&(step=(max-min)/(count-1));var opacity=max-current*step;return opacity},gotoPreviousPage:function(){this.currentPage>1&&(this.currentPage--,this.loadData())},gotoNextPage:function(){this.currentPage<this.tablePagination.last_page&&(this.currentPage++,this.loadData())},gotoPage:function(page){page!=this.currentPage&&page>0&&page<=this.tablePagination.last_page&&(this.currentPage=page,this.loadData())},isSpecialField:function(fieldName){return"__"===fieldName.slice(0,2)},hasCallback:function(item){return!!item.callback},callCallback:function(field,item){if(this.hasCallback(field)){var args=field.callback.split("|"),func=args.shift();return"function"==typeof this.$parent[func]?args.length>0?this.$parent[func].apply(this.$parent,[this.getObjectValue(item,field.name)].concat(args)):this.$parent[func].call(this.$parent,this.getObjectValue(item,field.name)):null}},getObjectValue:function(object,path,defaultValue){defaultValue="undefined"==typeof defaultValue?null:defaultValue;var obj=object;if(""!=path.trim()){var keys=path.split(".");keys.forEach(function(key){return null===obj||"undefined"==typeof obj[key]||null===obj[key]?void(obj=defaultValue):void(obj=obj[key])})}return obj},callAction:function(action,data){this.$dispatch(this.eventPrefix+"action",action,data)},addParam:function(param){this.appendParams.push(param)},toggleCheckbox:function(isChecked,dataItem,fieldName){var idColumn=this.extractArgs(fieldName);if(void 0===idColumn)return void console.warn('You did not provide reference id column with "__checkbox:<column_name>" field!');var key=dataItem[idColumn];isChecked?this.selectId(key):this.unselectId(key)},toggleAllCheckboxes:function(isChecked,fieldName){var self=this,idColumn=this.extractArgs(fieldName);isChecked?this.tableData.forEach(function(dataItem){self.selectId(dataItem[idColumn])}):this.tableData.forEach(function(dataItem){self.unselectId(dataItem[idColumn])})},selectId:function(key){this.isSelectedRow(key)||this.selectedTo.push(key)},unselectId:function(key){this.selectedTo.$remove(key)},isSelectedRow:function(key){return this.selectedTo.indexOf(key)>=0},rowSelected:function(dataItem,fieldName){var idColumn=this.extractArgs(fieldName);return this.isSelectedRow(dataItem[idColumn])},checkCheckboxesState:function(fieldName){var self=this,idColumn=this.extractArgs(fieldName),selector="th.checkbox_"+idColumn+" input[type=checkbox]",els=document.querySelectorAll(selector),selected=this.tableData.filter(function(item){return self.selectedTo.indexOf(item[idColumn])>=0});return selected.length<=0?(els.forEach(function(el){el.indeterminate=!1}),!1):selected.length<this.perPage?(els.forEach(function(el){el.indeterminate=!0}),!0):(els.forEach(function(el){el.indeterminate=!1}),!0)},extractName:function(string){return string.split(":")[0].trim()},extractArgs:function(string){return string.split(":")[1]},callDetailRowCallback:function(item){var func=this.detailRowCallback.trim();return""===func?"":"function"==typeof this.$parent[func]?this.$parent[func].call(this.$parent,item):void console.error('Function "'+func+'()" does not exist!')},isVisibleDetailRow:function(rowId){return this.visibleDetailRows.indexOf(rowId)>=0},showDetailRow:function(rowId){this.isVisibleDetailRow(rowId)||this.visibleDetailRows.push(rowId)},hideDetailRow:function(rowId){this.isVisibleDetailRow(rowId)&&this.visibleDetailRows.$remove(rowId)},toggleDetailRow:function(rowId){this.isVisibleDetailRow(rowId)?this.hideDetailRow(rowId):this.showDetailRow(rowId)},onRowClass:function(dataItem,index){var func=this.rowClassCallback.trim();return""!==func&&"function"==typeof this.$parent[func]?this.$parent[func].call(this.$parent,dataItem,index):""},onRowChanged:function(dataItem){return this.dispatchEvent("row-changed",dataItem),!0},onRowClicked:function(dataItem,event){return this.$dispatch(this.eventPrefix+"row-clicked",dataItem,event),!0},onRowDoubleClicked:function(dataItem,event){this.$dispatch(this.eventPrefix+"row-dblclicked",dataItem,event)},onCellClicked:function(dataItem,field,event){this.$dispatch(this.eventPrefix+"cell-clicked",dataItem,field,event)},onCellDoubleClicked:function(dataItem,field,event){this.$dispatch(this.eventPrefix+"cell-dblclicked",dataItem,field,event)},onDetailRowClick:function(dataItem,event){this.$dispatch(this.eventPrefix+"detail-row-clicked",dataItem,event)},callPaginationConfig:function(){"function"==typeof this.$parent[this.paginationConfigCallback]&&this.$parent[this.paginationConfigCallback].call(this.$parent,this.$refs.pagination.$options.name)},logDeprecatedMessage:function(name,replacer){var msg='"{name}" prop is being deprecated and will be removed in the future. Please use "{replacer}" instead.';console.warn(msg.replace("{name}",name).replace("{replacer}",replacer))},checkForDeprecatedProps:function(){"paginationConfig"!==this.paginationConfig&&this.logDeprecatedMessage("paginationConfig","paginationConfigCallback"),""!==this.detailRow&&this.logDeprecatedMessage("detail-row","detail-row-callback"),""!==this.detailRowCallback&&this.logDeprecatedMessage("detail-row-callback","detail-row-component")}},watch:{multiSort:function(newVal,oldVal){newVal===!1&&this.sortOrder.length>1&&(this.sortOrder.splice(1),this.loadData())}},events:{"vuetable-pagination:change-page":function(page){"prev"==page?this.gotoPreviousPage():"next"==page?this.gotoNextPage():this.gotoPage(page)},"vuetable:reload":function(){this.loadData()},"vuetable:refresh":function(){this.currentPage=1,this.loadData()},"vuetable:goto-page":function(page){this.$emit("vuetable-pagination:change-page",page)},"vuetable:set-options":function(options){for(var n in options)this.$set(n,options[n])},"vuetable:toggle-detail":function(dataItem){this.toggleDetailRow(dataItem)},"vuetable:show-detail":function(dataItem){this.showDetailRow(dataItem)},"vuetable:hide-detail":function(dataItem){this.hideDetailRow(dataItem)}},created:function(){this.checkForDeprecatedProps(),this.normalizeFields(),this.loadOnStart&&this.loadData(),this.$nextTick(function(){this.callPaginationConfig()})}},module.exports.__esModule&&(module.exports=module.exports.default),("function"==typeof module.exports?module.exports.options:module.exports).template='<div class={{wrapperClass}}><table class="vuetable {{tableClass}}"><thead><tr><template v-for="field in fields"><template v-if=field.visible><template v-if=isSpecialField(field.name)><th v-if="extractName(field.name) == \'__checkbox\'" :class="[field.titleClass, \'checkbox_\'+extractArgs(field.name)]"><input type=checkbox @change="toggleAllCheckboxes($event.target.checked, field.name)" :checked=checkCheckboxesState(field.name)><th v-if="extractName(field.name) == \'__component\'" @click="orderBy(field, $event)" class="{{field.titleClass || \'\'}} {{isSortable(field) ? \'sortable\' : \'\'}}">{{field.title || \'\'}} <i v-if="isCurrentSortField(field) &amp;&amp; field.title" class="{{ sortIcon(field) }}" :style="{opacity: sortIconOpacity(field)}"></i><th v-if="notIn(extractName(field.name), [\'__checkbox\', \'__component\'])" id={{field.name}} class="{{field.titleClass || \'\'}}">{{field.title || \'\'}}</template><template v-else=""><th @click="orderBy(field, $event)" id=_{{field.name}} class="{{field.titleClass || \'\'}} {{isSortable(field) ? \'sortable\' : \'\'}}">{{getTitle(field) | capitalize}}&nbsp; <i v-if=isCurrentSortField(field) class="{{ sortIcon(field) }}" :style="{opacity: sortIconOpacity(field)}"></i></template></template></template><tbody v-cloak=""><template v-for="(itemNumber, item) in tableData"><tr @dblclick="onRowDoubleClicked(item, $event)" @click="onRowClicked(item, $event)" :render=onRowChanged(item) :class="onRowClass(item, itemNumber)"><template v-for="field in fields"><template v-if=field.visible><template v-if=isSpecialField(field.name)><td v-if="extractName(field.name) == \'__sequence\'" class="vuetable-sequence {{field.dataClass}}" v-html="tablePagination.from + itemNumber"><td v-if="extractName(field.name) == \'__checkbox\'" class="vuetable-checkboxes {{field.dataClass}}"><input type=checkbox @change="toggleCheckbox($event.target.checked, item, field.name)" :checked="rowSelected(item, field.name)"><td v-if="field.name == \'__actions\'" class="vuetable-actions {{field.dataClass}}"><template v-for="action in itemActions"><button class="{{ action.class }}" @click="callAction(action.name, item)" v-attr=action.extra><i class="{{ action.icon }}"></i> {{ action.label }}</button></template><td v-if="extractName(field.name) == \'__component\'" class={{field.dataClass}}><component :is=extractArgs(field.name) :row-data=item :row-index=itemNumber></component></template><template v-else=""><td v-if=hasCallback(field) class={{field.dataClass}} @click="onCellClicked(item, field, $event)" @dblclick="onCellDoubleClicked(item, field, $event)">{{{ callCallback(field, item) }}}<td v-else="" class={{field.dataClass}} @click="onCellClicked(item, field, $event)" @dblclick="onCellDoubleClicked(item, field, $event)">{{{ getObjectValue(item, field.name, "") }}}</template></template></template></tr><template v-if=useDetailRow><template v-if=useDetailRowComponent><tr v-if=isVisibleDetailRow(item[detailRowId]) @click="onDetailRowClick(item, $event)" :transition=detailRowTransition :class=[detailRowClass]><td :colspan=countVisibleFields><component :is=detailRowComponent :row-data=item :row-index=itemNumber></component></template><template v-else=""><tr v-if=isVisibleDetailRow(item[detailRowId]) v-html=callDetailRowCallback(item) @click="onDetailRowClick(item, $event)" :transition=detailRowTransition :class=[detailRowClass]></template></template></template></table><div v-if=showPagination class="vuetable-pagination {{paginationClass}}"><div class="vuetable-pagination-info {{paginationInfoClass}}" v-html=paginationInfo></div><div v-show="tablePagination &amp;&amp; tablePagination.last_page > 1" class="vuetable-pagination-component {{paginationComponentClass}}"><component v-ref:pagination="" :is=paginationComponent></component></div></div></div>'},{"vueify/lib/insert-css":1}],3:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _VuetablePaginationMixin=require("./VuetablePaginationMixin.vue"),_VuetablePaginationMixin2=_interopRequireDefault(_VuetablePaginationMixin);exports.default={mixins:[_VuetablePaginationMixin2.default]},module.exports.__esModule&&(module.exports=module.exports.default),("function"==typeof module.exports?module.exports.options:module.exports).template='<div class={{wrapperClass}}><a @click=loadPage(1) class="btn-nav {{linkClass}} {{isOnFirstPage ? disabledClass : \'\'}}"><i v-if="icons.first != \'\'" class={{icons.first}}></i> <span v-else="">«</span> </a><a @click="loadPage(\'prev\')" class="btn-nav {{linkClass}} {{isOnFirstPage ? disabledClass : \'\'}}"><i v-if="icons.next != \'\'" class={{icons.prev}}></i> <span v-else="">&nbsp;‹</span></a><template v-if=notEnoughPages><template v-for="n in totalPage"><a @click=loadPage(n+1) class="{{pageClass}} {{isCurrentPage(n+1) ? activeClass : \'\'}}">{{ n+1 }}</a></template></template><template v-else=""><template v-for="n in windowSize"><a @click=loadPage(windowStart+n) class="{{pageClass}} {{isCurrentPage(windowStart+n) ? activeClass : \'\'}}">{{ windowStart+n }}</a></template></template><a @click="loadPage(\'next\')" class="btn-nav {{linkClass}} {{isOnLastPage ? disabledClass : \'\'}}"><i v-if="icons.next != \'\'" class={{icons.next}}></i> <span v-else="">›&nbsp;</span> </a><a @click=loadPage(totalPage) class="btn-nav {{linkClass}} {{isOnLastPage ? disabledClass : \'\'}}"><i v-if="icons.last != \'\'" class={{icons.last}}></i> <span v-else="">»</span></a></div>'},{"./VuetablePaginationMixin.vue":5}],4:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _VuetablePaginationMixin=require("./VuetablePaginationMixin.vue"),_VuetablePaginationMixin2=_interopRequireDefault(_VuetablePaginationMixin);exports.default={mixins:[_VuetablePaginationMixin2.default],props:{dropdownClass:{type:String,default:function(){return"ui search dropdown"}},pageText:{type:String,default:function(){return"Page"}}},methods:{loadPage:function(page){"prev"!=page||this.isOnFirstPage?"next"!=page||this.isOnLastPage||this.setDropdownToPage(this.tablePagination.current_page+1):this.setDropdownToPage(this.tablePagination.current_page-1),this.$dispatch("vuetable-pagination:change-page",page)},setDropdownToPage:function(page){this.$nextTick(function(){document.getElementById("vuetable-pagination-dropdown").value=page})},selectPage:function(event){this.$dispatch("vuetable-pagination:change-page",event.target.selectedIndex+1)}},events:{"vuetable:load-success":function(tablePagination){this.tablePagination=tablePagination,this.setDropdownToPage(tablePagination.current_page)}}},module.exports.__esModule&&(module.exports=module.exports.default),("function"==typeof module.exports?module.exports.options:module.exports).template='<div class={{wrapperClass}}><a @click="loadPage(\'prev\')" class="{{linkClass}} {{isOnFirstPage ? disabledClass : \'\'}}"><i :class=icons.prev></i></a><select id=vuetable-pagination-dropdown class={{dropdownClass}} @change=selectPage($event)><template v-for="n in totalPage"><option class={{pageClass}} value={{n+1}}>{{pageText}} {{n+1}}</template></select><a @click="loadPage(\'next\')" class="{{linkClass}} {{isOnLastPage ? disabledClass : \'\'}}"><i :class=icons.next></i></a></div>'},{"./VuetablePaginationMixin.vue":5}],5:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={props:{wrapperClass:{type:String,default:function(){return"ui right floated pagination menu"}},activeClass:{type:String,default:function(){return"active large"}},disabledClass:{type:String,default:function(){return"disabled"}},pageClass:{type:String,default:function(){return"item"}},linkClass:{type:String,default:function(){return"icon item"}},icons:{type:Object,default:function(){return{first:"angle double left icon",prev:"left chevron icon",next:"right chevron icon",last:"angle double right icon"}}},onEachSide:{type:Number,coerce:function(value){return parseInt(value)},default:function(){return 2}}},data:function(){return{tablePagination:null}},computed:{totalPage:function(){return null==this.tablePagination?0:this.tablePagination.last_page},isOnFirstPage:function(){return null!=this.tablePagination&&1==this.tablePagination.current_page},isOnLastPage:function(){return null!=this.tablePagination&&this.tablePagination.current_page==this.tablePagination.last_page},notEnoughPages:function(){return this.totalPage<2*this.onEachSide+4},windowSize:function(){return 2*this.onEachSide+1},windowStart:function(){return!this.tablePagination||this.tablePagination.current_page<=this.onEachSide?1:this.tablePagination.current_page>=this.totalPage-this.onEachSide?this.totalPage-2*this.onEachSide:this.tablePagination.current_page-this.onEachSide}},methods:{loadPage:function(page){this.$dispatch("vuetable-pagination:change-page",page)},isCurrentPage:function(page){return page==this.tablePagination.current_page}},events:{"vuetable:load-success":function(tablePagination){this.tablePagination=tablePagination},"vuetable-pagination:set-options":function(options){for(var n in options)this.$set(n,options[n])}}},module.exports.__esModule&&(module.exports=module.exports.default)},{}],6:[function(require,module,exports){Vue.component("vuetable-pagination",require("./components/VuetablePagination.vue")),Vue.component("vuetable-pagination-dropdown",require("./components/VuetablePaginationDropdown.vue")),Vue.component("vuetable",require("./components/Vuetable.vue"))},{"./components/Vuetable.vue":2,"./components/VuetablePagination.vue":3,"./components/VuetablePaginationDropdown.vue":4}]},{},[6]);
{
"name": "vuetable",
"version": "1.5.9",
"version": "1.5.10",
"description": "vue.js table component that will automatically request JSON data from server and display them nicely in HTML table with swap-able/extensible pagination component",

@@ -5,0 +5,0 @@ "main": "dist/vue-table.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc