2016-11-21 03:39:30 +00:00
( function webpackUniversalModuleDefinition ( root , factory ) {
if ( typeof exports === 'object' && typeof module === 'object' )
module . exports = factory ( ) ;
else if ( typeof define === 'function' && define . amd )
define ( [ ] , factory ) ;
else if ( typeof exports === 'object' )
exports [ "VueMaterial" ] = factory ( ) ;
else
root [ "VueMaterial" ] = factory ( ) ;
} ) ( this , function ( ) {
return /******/ ( function ( modules ) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = { } ;
/******/
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/
/******/ // Check if module is in cache
/******/ if ( installedModules [ moduleId ] )
/******/ return installedModules [ moduleId ] . exports ;
/******/
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules [ moduleId ] = {
/******/ exports : { } ,
/******/ id : moduleId ,
/******/ loaded : false
/******/ } ;
/******/
/******/ // Execute the module function
/******/ modules [ moduleId ] . call ( module . exports , module , module . exports , _ _webpack _require _ _ ) ;
/******/
/******/ // Flag the module as loaded
/******/ module . loaded = true ;
/******/
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ _ _webpack _require _ _ . m = modules ;
/******/
/******/ // expose the module cache
/******/ _ _webpack _require _ _ . c = installedModules ;
/******/
/******/ // __webpack_public_path__
/******/ _ _webpack _require _ _ . p = "/" ;
/******/
/******/ // Load entry module and return exports
/******/ return _ _webpack _require _ _ ( 0 ) ;
/******/ } )
/************************************************************************/
/******/ ( {
/***/ 0 :
/***/ function ( module , exports , _ _webpack _require _ _ ) {
2016-12-05 03:53:41 +00:00
module . exports = _ _webpack _require _ _ ( 182 ) ;
2016-11-21 03:39:30 +00:00
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 119 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
var getClosestVueParent = function getClosestVueParent ( $parent , cssClass ) {
2016-12-05 03:53:41 +00:00
if ( ! $parent || ! $parent . $el ) {
2016-11-21 03:39:30 +00:00
return false ;
}
if ( $parent . _uid === 0 ) {
return false ;
}
if ( $parent . $el . classList . contains ( cssClass ) ) {
return $parent ;
}
return getClosestVueParent ( $parent . $parent , cssClass ) ;
} ;
exports . default = getClosestVueParent ;
module . exports = exports [ "default" ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 182 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
'use strict' ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
exports . default = install ;
2016-12-05 03:53:41 +00:00
var _mdTable = _ _webpack _require _ _ ( 183 ) ;
2016-11-21 03:39:30 +00:00
var _mdTable2 = _interopRequireDefault ( _mdTable ) ;
2016-12-05 03:53:41 +00:00
var _mdTableRow = _ _webpack _require _ _ ( 187 ) ;
2016-11-21 03:39:30 +00:00
var _mdTableRow2 = _interopRequireDefault ( _mdTableRow ) ;
2016-12-05 03:53:41 +00:00
var _mdTableHead = _ _webpack _require _ _ ( 190 ) ;
2016-11-21 03:39:30 +00:00
var _mdTableHead2 = _interopRequireDefault ( _mdTableHead ) ;
2016-12-05 03:53:41 +00:00
var _mdTableCell = _ _webpack _require _ _ ( 193 ) ;
2016-11-21 03:39:30 +00:00
var _mdTableCell2 = _interopRequireDefault ( _mdTableCell ) ;
2016-12-05 03:53:41 +00:00
var _mdTableEdit = _ _webpack _require _ _ ( 196 ) ;
2016-11-21 03:39:30 +00:00
var _mdTableEdit2 = _interopRequireDefault ( _mdTableEdit ) ;
2016-12-05 03:53:41 +00:00
var _mdTableCard = _ _webpack _require _ _ ( 199 ) ;
2016-11-21 03:39:30 +00:00
var _mdTableCard2 = _interopRequireDefault ( _mdTableCard ) ;
2016-12-05 03:53:41 +00:00
var _mdTableAlternateHeader = _ _webpack _require _ _ ( 201 ) ;
2016-11-21 03:39:30 +00:00
var _mdTableAlternateHeader2 = _interopRequireDefault ( _mdTableAlternateHeader ) ;
2016-12-05 03:53:41 +00:00
var _mdTablePagination = _ _webpack _require _ _ ( 204 ) ;
2016-11-21 03:39:30 +00:00
var _mdTablePagination2 = _interopRequireDefault ( _mdTablePagination ) ;
2016-12-05 03:53:41 +00:00
var _mdTable3 = _ _webpack _require _ _ ( 207 ) ;
2016-11-21 03:39:30 +00:00
var _mdTable4 = _interopRequireDefault ( _mdTable3 ) ;
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { default : obj } ; }
function install ( Vue ) {
Vue . component ( 'md-table' , Vue . extend ( _mdTable2 . default ) ) ;
Vue . component ( 'md-table-header' , {
functional : true ,
render : function render ( h , scope ) {
return h ( 'thead' , {
staticClass : 'md-table-header'
} , scope . children ) ;
}
} ) ;
Vue . component ( 'md-table-body' , {
functional : true ,
render : function render ( h , scope ) {
return h ( 'tbody' , {
staticClass : 'md-table-body'
} , scope . children ) ;
}
} ) ;
Vue . component ( 'md-table-row' , Vue . extend ( _mdTableRow2 . default ) ) ;
Vue . component ( 'md-table-head' , Vue . extend ( _mdTableHead2 . default ) ) ;
Vue . component ( 'md-table-cell' , Vue . extend ( _mdTableCell2 . default ) ) ;
Vue . component ( 'md-table-edit' , Vue . extend ( _mdTableEdit2 . default ) ) ;
Vue . component ( 'md-table-card' , Vue . extend ( _mdTableCard2 . default ) ) ;
Vue . component ( 'md-table-pagination' , Vue . extend ( _mdTablePagination2 . default ) ) ;
Vue . component ( 'md-table-alternate-header' , Vue . extend ( _mdTableAlternateHeader2 . default ) ) ;
Vue . material . styles . push ( _mdTable4 . default ) ;
}
module . exports = exports [ 'default' ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 183 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
var _ _vue _exports _ _ , _ _vue _options _ _
var _ _vue _styles _ _ = { }
/* styles */
2016-12-05 03:53:41 +00:00
_ _webpack _require _ _ ( 184 )
2016-11-21 03:39:30 +00:00
/* script */
2016-12-05 03:53:41 +00:00
_ _vue _exports _ _ = _ _webpack _require _ _ ( 185 )
2016-11-21 03:39:30 +00:00
/* template */
2016-12-05 03:53:41 +00:00
var _ _vue _template _ _ = _ _webpack _require _ _ ( 186 )
2016-11-21 03:39:30 +00:00
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ || { }
if (
typeof _ _vue _exports _ _ . default === "object" ||
typeof _ _vue _exports _ _ . default === "function"
) {
if ( Object . keys ( _ _vue _exports _ _ ) . some ( function ( key ) { return key !== "default" && key !== "__esModule" } ) ) { console . error ( "named exports are not supported in *.vue files." ) }
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ . default
}
if ( typeof _ _vue _options _ _ === "function" ) {
_ _vue _options _ _ = _ _vue _options _ _ . options
}
2016-12-09 15:59:35 +00:00
_ _vue _options _ _ . _ _file = "/Users/mrufino/Projects/personal/github/vue-material/src/components/mdTable/mdTable.vue"
2016-11-21 03:39:30 +00:00
_ _vue _options _ _ . render = _ _vue _template _ _ . render
_ _vue _options _ _ . staticRenderFns = _ _vue _template _ _ . staticRenderFns
/* hot reload */
if ( false ) { ( function ( ) {
var hotAPI = require ( "vue-hot-reload-api" )
hotAPI . install ( require ( "vue" ) , false )
if ( ! hotAPI . compatible ) return
module . hot . accept ( )
if ( ! module . hot . data ) {
2016-12-09 15:59:35 +00:00
hotAPI . createRecord ( "data-v-26549e33" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
} else {
2016-12-09 15:59:35 +00:00
hotAPI . reload ( "data-v-26549e33" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
}
} ) ( ) }
if ( _ _vue _options _ _ . functional ) { console . error ( "[vue-loader] mdTable.vue: functional components are not supported and should be defined in plain js files using render functions." ) }
module . exports = _ _vue _exports _ _
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 184 :
/***/ function ( module , exports ) {
// removed by extract-text-webpack-plugin
/***/ } ,
/***/ 185 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
'use strict' ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
2016-12-05 03:53:41 +00:00
var _getClosestVueParent = _ _webpack _require _ _ ( 119 ) ;
2016-11-21 03:39:30 +00:00
var _getClosestVueParent2 = _interopRequireDefault ( _getClosestVueParent ) ;
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { default : obj } ; }
exports . default = {
props : {
mdSortType : String ,
mdSort : String
} ,
data : function data ( ) {
return {
sortType : this . mdSortType ,
sortBy : this . mdSort ,
hasRowSelection : false ,
data : [ ] ,
numberOfRows : 0 ,
numberOfSelected : 0 ,
selectedRows : { }
} ;
} ,
methods : {
emitSort : function emitSort ( name ) {
this . sortBy = name ;
this . $emit ( 'sort' , {
name : name ,
type : this . sortType
} ) ;
} ,
emitSelection : function emitSelection ( ) {
this . $emit ( 'select' , this . selectedRows ) ;
}
} ,
mounted : function mounted ( ) {
this . parentCard = ( 0 , _getClosestVueParent2 . default ) ( this . $parent , 'md-table-card' ) ;
if ( this . parentCard ) {
this . parentCard . tableInstance = this ;
}
}
} ; //
//
//
//
//
//
//
//
//
//
module . exports = exports [ 'default' ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 186 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
2016-12-05 03:53:41 +00:00
module . exports = { render : function ( ) { var _vm = this ; var _h = _vm . $createElement ;
return _h ( 'div' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-table"
2016-12-05 03:53:41 +00:00
} , [ _h ( 'table' , [ _vm . _t ( "default" ) ] ) ] )
2016-11-21 03:39:30 +00:00
} , staticRenderFns : [ ] }
2016-12-05 03:53:41 +00:00
module . exports . render . _withStripped = true
2016-11-21 03:39:30 +00:00
if ( false ) {
module . hot . accept ( )
if ( module . hot . data ) {
2016-12-09 15:59:35 +00:00
require ( "vue-hot-reload-api" ) . rerender ( "data-v-26549e33" , module . exports )
2016-11-21 03:39:30 +00:00
}
}
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 187 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
var _ _vue _exports _ _ , _ _vue _options _ _
var _ _vue _styles _ _ = { }
/* script */
2016-12-05 03:53:41 +00:00
_ _vue _exports _ _ = _ _webpack _require _ _ ( 188 )
2016-11-21 03:39:30 +00:00
/* template */
2016-12-05 03:53:41 +00:00
var _ _vue _template _ _ = _ _webpack _require _ _ ( 189 )
2016-11-21 03:39:30 +00:00
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ || { }
if (
typeof _ _vue _exports _ _ . default === "object" ||
typeof _ _vue _exports _ _ . default === "function"
) {
if ( Object . keys ( _ _vue _exports _ _ ) . some ( function ( key ) { return key !== "default" && key !== "__esModule" } ) ) { console . error ( "named exports are not supported in *.vue files." ) }
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ . default
}
if ( typeof _ _vue _options _ _ === "function" ) {
_ _vue _options _ _ = _ _vue _options _ _ . options
}
2016-12-09 15:59:35 +00:00
_ _vue _options _ _ . _ _file = "/Users/mrufino/Projects/personal/github/vue-material/src/components/mdTable/mdTableRow.vue"
2016-11-21 03:39:30 +00:00
_ _vue _options _ _ . render = _ _vue _template _ _ . render
_ _vue _options _ _ . staticRenderFns = _ _vue _template _ _ . staticRenderFns
/* hot reload */
if ( false ) { ( function ( ) {
var hotAPI = require ( "vue-hot-reload-api" )
hotAPI . install ( require ( "vue" ) , false )
if ( ! hotAPI . compatible ) return
module . hot . accept ( )
if ( ! module . hot . data ) {
2016-12-09 15:59:35 +00:00
hotAPI . createRecord ( "data-v-14ed9c52" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
} else {
2016-12-09 15:59:35 +00:00
hotAPI . reload ( "data-v-14ed9c52" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
}
} ) ( ) }
if ( _ _vue _options _ _ . functional ) { console . error ( "[vue-loader] mdTableRow.vue: functional components are not supported and should be defined in plain js files using render functions." ) }
module . exports = _ _vue _exports _ _
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 188 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
'use strict' ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
2016-12-05 03:53:41 +00:00
var _getClosestVueParent = _ _webpack _require _ _ ( 119 ) ;
2016-11-21 03:39:30 +00:00
var _getClosestVueParent2 = _interopRequireDefault ( _getClosestVueParent ) ;
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { default : obj } ; }
var transitionClass = 'md-transition-off' ; //
//
//
//
//
//
//
//
//
//
exports . default = {
props : {
mdAutoSelect : Boolean ,
mdSelection : Boolean ,
mdItem : Object
} ,
data : function data ( ) {
return {
parentTable : { } ,
headRow : false ,
checkbox : false ,
index : 0
} ;
} ,
computed : {
isDisabled : function isDisabled ( ) {
return ! this . mdSelection && ! this . headRow ;
} ,
hasSelection : function hasSelection ( ) {
return this . mdSelection || this . headRow && this . parentTable . hasRowSelection ;
} ,
classes : function classes ( ) {
return {
'md-selected' : this . checkbox
} ;
}
} ,
2016-12-05 03:53:41 +00:00
watch : {
mdItem : function mdItem ( newValue , oldValue ) {
this . parentTable . data [ this . index ] = this . mdItem ;
this . handleMultipleSelection ( newValue === oldValue ) ;
}
} ,
2016-11-21 03:39:30 +00:00
methods : {
setSelectedRow : function setSelectedRow ( value , index ) {
if ( value ) {
this . parentTable . selectedRows [ index ] = this . parentTable . data [ index ] ;
++ this . parentTable . numberOfSelected ;
} else {
delete this . parentTable . selectedRows [ index ] ;
-- this . parentTable . numberOfSelected ;
}
} ,
handleSingleSelection : function handleSingleSelection ( value ) {
this . setSelectedRow ( value , this . index - 1 ) ;
this . parentTable . $children [ 0 ] . checkbox = this . parentTable . numberOfSelected === this . parentTable . numberOfRows ;
} ,
handleMultipleSelection : function handleMultipleSelection ( value ) {
var _this = this ;
if ( this . parentTable . numberOfRows > 25 ) {
this . parentTable . $el . classList . add ( transitionClass ) ;
}
this . parentTable . $children . forEach ( function ( row , index ) {
row . checkbox = value ;
if ( ! row . headRow ) {
_this . setSelectedRow ( value , index - 1 ) ;
}
} ) ;
if ( value ) {
this . parentTable . numberOfSelected = this . parentTable . numberOfRows ;
} else {
this . parentTable . numberOfSelected = 0 ;
}
window . setTimeout ( function ( ) {
return _this . parentTable . $el . classList . remove ( transitionClass ) ;
} ) ;
} ,
select : function select ( value ) {
if ( this . hasSelection ) {
if ( this . headRow ) {
this . handleMultipleSelection ( value ) ;
} else {
this . handleSingleSelection ( value ) ;
}
this . parentTable . emitSelection ( ) ;
}
} ,
autoSelect : function autoSelect ( ) {
if ( this . mdAutoSelect && this . hasSelection ) {
this . checkbox = ! this . checkbox ;
this . handleSingleSelection ( this . checkbox ) ;
this . parentTable . emitSelection ( ) ;
}
}
} ,
mounted : function mounted ( ) {
this . parentTable = ( 0 , _getClosestVueParent2 . default ) ( this . $parent , 'md-table' ) ;
if ( this . $el . parentNode . tagName . toLowerCase ( ) === 'thead' ) {
this . headRow = true ;
} else {
this . parentTable . numberOfRows ++ ;
this . index = this . parentTable . numberOfRows ;
if ( this . mdSelection ) {
this . parentTable . hasRowSelection = true ;
}
if ( this . mdItem ) {
this . parentTable . data . push ( this . mdItem ) ;
}
}
}
} ;
module . exports = exports [ 'default' ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 189 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
2016-12-05 03:53:41 +00:00
module . exports = { render : function ( ) { var _vm = this ; var _h = _vm . $createElement ;
return _h ( 'tr' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-table-row" ,
class : _vm . classes ,
on : {
"click" : _vm . autoSelect
}
2016-12-05 03:53:41 +00:00
} , [ ( _vm . hasSelection ) ? _h ( 'md-table-cell' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-table-selection"
2016-12-05 03:53:41 +00:00
} , [ _h ( 'md-checkbox' , {
2016-11-21 03:39:30 +00:00
directives : [ {
name : "model" ,
rawName : "v-model" ,
value : ( _vm . checkbox ) ,
expression : "checkbox"
} ] ,
attrs : {
"disabled" : _vm . isDisabled
} ,
domProps : {
"value" : ( _vm . checkbox )
} ,
on : {
"change" : _vm . select ,
"input" : function ( $event ) {
_vm . checkbox = $event
}
}
} ) ] ) : _vm . _e ( ) , " " , _vm . _t ( "default" ) ] )
} , staticRenderFns : [ ] }
2016-12-05 03:53:41 +00:00
module . exports . render . _withStripped = true
2016-11-21 03:39:30 +00:00
if ( false ) {
module . hot . accept ( )
if ( module . hot . data ) {
2016-12-09 15:59:35 +00:00
require ( "vue-hot-reload-api" ) . rerender ( "data-v-14ed9c52" , module . exports )
2016-11-21 03:39:30 +00:00
}
}
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 190 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
var _ _vue _exports _ _ , _ _vue _options _ _
var _ _vue _styles _ _ = { }
/* script */
2016-12-05 03:53:41 +00:00
_ _vue _exports _ _ = _ _webpack _require _ _ ( 191 )
2016-11-21 03:39:30 +00:00
/* template */
2016-12-05 03:53:41 +00:00
var _ _vue _template _ _ = _ _webpack _require _ _ ( 192 )
2016-11-21 03:39:30 +00:00
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ || { }
if (
typeof _ _vue _exports _ _ . default === "object" ||
typeof _ _vue _exports _ _ . default === "function"
) {
if ( Object . keys ( _ _vue _exports _ _ ) . some ( function ( key ) { return key !== "default" && key !== "__esModule" } ) ) { console . error ( "named exports are not supported in *.vue files." ) }
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ . default
}
if ( typeof _ _vue _options _ _ === "function" ) {
_ _vue _options _ _ = _ _vue _options _ _ . options
}
2016-12-09 15:59:35 +00:00
_ _vue _options _ _ . _ _file = "/Users/mrufino/Projects/personal/github/vue-material/src/components/mdTable/mdTableHead.vue"
2016-11-21 03:39:30 +00:00
_ _vue _options _ _ . render = _ _vue _template _ _ . render
_ _vue _options _ _ . staticRenderFns = _ _vue _template _ _ . staticRenderFns
/* hot reload */
if ( false ) { ( function ( ) {
var hotAPI = require ( "vue-hot-reload-api" )
hotAPI . install ( require ( "vue" ) , false )
if ( ! hotAPI . compatible ) return
module . hot . accept ( )
if ( ! module . hot . data ) {
2016-12-09 15:59:35 +00:00
hotAPI . createRecord ( "data-v-79209ab3" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
} else {
2016-12-09 15:59:35 +00:00
hotAPI . reload ( "data-v-79209ab3" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
}
} ) ( ) }
if ( _ _vue _options _ _ . functional ) { console . error ( "[vue-loader] mdTableHead.vue: functional components are not supported and should be defined in plain js files using render functions." ) }
module . exports = _ _vue _exports _ _
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 191 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
'use strict' ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
2016-12-05 03:53:41 +00:00
var _getClosestVueParent = _ _webpack _require _ _ ( 119 ) ;
2016-11-21 03:39:30 +00:00
var _getClosestVueParent2 = _interopRequireDefault ( _getClosestVueParent ) ;
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { default : obj } ; }
exports . default = {
props : {
mdNumeric : Boolean ,
mdSortBy : String ,
mdTooltip : String
} ,
data : function data ( ) {
return {
sortType : null ,
sorted : false ,
parentTable : { }
} ;
} ,
computed : {
classes : function classes ( ) {
var matchSort = this . hasMatchSort ( ) ;
if ( ! matchSort ) {
this . sorted = false ;
}
return {
'md-numeric' : this . mdNumeric ,
'md-sortable' : this . mdSortBy ,
'md-sorted' : matchSort && this . sorted ,
'md-sorted-descending' : matchSort && this . sortType === 'desc'
} ;
}
} ,
methods : {
hasMatchSort : function hasMatchSort ( ) {
return this . parentTable . sortBy === this . mdSortBy ;
} ,
changeSort : function changeSort ( ) {
if ( this . mdSortBy ) {
if ( this . sortType === 'asc' && this . sorted ) {
this . sortType = 'desc' ;
} else {
this . sortType = 'asc' ;
}
this . sorted = true ;
this . parentTable . sortType = this . sortType ;
this . parentTable . emitSort ( this . mdSortBy ) ;
}
}
} ,
mounted : function mounted ( ) {
this . parentTable = ( 0 , _getClosestVueParent2 . default ) ( this . $parent , 'md-table' ) ;
if ( this . hasMatchSort ( ) ) {
this . sorted = true ;
this . sortType = this . parentTable . sortType ;
}
}
} ; //
//
//
//
//
//
//
//
//
//
//
//
//
//
module . exports = exports [ 'default' ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 192 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
2016-12-05 03:53:41 +00:00
module . exports = { render : function ( ) { var _vm = this ; var _h = _vm . $createElement ;
return _h ( 'th' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-table-head" ,
class : _vm . classes ,
on : {
"click" : _vm . changeSort
}
2016-12-05 03:53:41 +00:00
} , [ _h ( 'div' , {
2016-11-21 03:39:30 +00:00
directives : [ {
name : "md-ink-ripple" ,
rawName : "v-md-ink-ripple" ,
value : ( ! _vm . mdSortBy ) ,
expression : "!mdSortBy"
} ] ,
staticClass : "md-table-head-container"
2016-12-05 03:53:41 +00:00
} , [ _h ( 'div' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-table-head-text md-test"
2016-12-05 03:53:41 +00:00
} , [ ( _vm . mdSortBy ) ? _h ( 'md-icon' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-sortable-icon"
2016-12-05 03:53:41 +00:00
} , [ "arrow_downward" ] ) : _vm . _e ( ) , " " , _vm . _t ( "default" ) , " " , ( _vm . mdTooltip ) ? _h ( 'md-tooltip' , [ _vm . _s ( _vm . mdTooltip ) ] ) : _vm . _e ( ) ] ) ] ) ] )
2016-11-21 03:39:30 +00:00
} , staticRenderFns : [ ] }
2016-12-05 03:53:41 +00:00
module . exports . render . _withStripped = true
2016-11-21 03:39:30 +00:00
if ( false ) {
module . hot . accept ( )
if ( module . hot . data ) {
2016-12-09 15:59:35 +00:00
require ( "vue-hot-reload-api" ) . rerender ( "data-v-79209ab3" , module . exports )
2016-11-21 03:39:30 +00:00
}
}
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 193 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
var _ _vue _exports _ _ , _ _vue _options _ _
var _ _vue _styles _ _ = { }
/* script */
2016-12-05 03:53:41 +00:00
_ _vue _exports _ _ = _ _webpack _require _ _ ( 194 )
2016-11-21 03:39:30 +00:00
/* template */
2016-12-05 03:53:41 +00:00
var _ _vue _template _ _ = _ _webpack _require _ _ ( 195 )
2016-11-21 03:39:30 +00:00
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ || { }
if (
typeof _ _vue _exports _ _ . default === "object" ||
typeof _ _vue _exports _ _ . default === "function"
) {
if ( Object . keys ( _ _vue _exports _ _ ) . some ( function ( key ) { return key !== "default" && key !== "__esModule" } ) ) { console . error ( "named exports are not supported in *.vue files." ) }
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ . default
}
if ( typeof _ _vue _options _ _ === "function" ) {
_ _vue _options _ _ = _ _vue _options _ _ . options
}
2016-12-09 15:59:35 +00:00
_ _vue _options _ _ . _ _file = "/Users/mrufino/Projects/personal/github/vue-material/src/components/mdTable/mdTableCell.vue"
2016-11-21 03:39:30 +00:00
_ _vue _options _ _ . render = _ _vue _template _ _ . render
_ _vue _options _ _ . staticRenderFns = _ _vue _template _ _ . staticRenderFns
/* hot reload */
if ( false ) { ( function ( ) {
var hotAPI = require ( "vue-hot-reload-api" )
hotAPI . install ( require ( "vue" ) , false )
if ( ! hotAPI . compatible ) return
module . hot . accept ( )
if ( ! module . hot . data ) {
2016-12-09 15:59:35 +00:00
hotAPI . createRecord ( "data-v-f61e7596" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
} else {
2016-12-09 15:59:35 +00:00
hotAPI . reload ( "data-v-f61e7596" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
}
} ) ( ) }
if ( _ _vue _options _ _ . functional ) { console . error ( "[vue-loader] mdTableCell.vue: functional components are not supported and should be defined in plain js files using render functions." ) }
module . exports = _ _vue _exports _ _
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 194 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports ) {
'use strict' ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
//
//
//
//
//
//
//
//
exports . default = {
props : {
mdNumeric : Boolean
} ,
2016-12-05 03:53:41 +00:00
data : function data ( ) {
return {
hasAction : false
} ;
} ,
2016-11-21 03:39:30 +00:00
computed : {
classes : function classes ( ) {
return {
2016-12-05 03:53:41 +00:00
'md-numeric' : this . mdNumeric ,
'md-has-action' : this . hasAction
2016-11-21 03:39:30 +00:00
} ;
}
2016-12-05 03:53:41 +00:00
} ,
mounted : function mounted ( ) {
if ( this . $children . length > 0 ) {
this . hasAction = true ;
}
2016-11-21 03:39:30 +00:00
}
} ;
module . exports = exports [ 'default' ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 195 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
2016-12-05 03:53:41 +00:00
module . exports = { render : function ( ) { var _vm = this ; var _h = _vm . $createElement ;
return _h ( 'td' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-table-cell" ,
class : _vm . classes
2016-12-05 03:53:41 +00:00
} , [ _h ( 'div' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-table-cell-container"
} , [ _vm . _t ( "default" ) ] ) ] )
} , staticRenderFns : [ ] }
2016-12-05 03:53:41 +00:00
module . exports . render . _withStripped = true
2016-11-21 03:39:30 +00:00
if ( false ) {
module . hot . accept ( )
if ( module . hot . data ) {
2016-12-09 15:59:35 +00:00
require ( "vue-hot-reload-api" ) . rerender ( "data-v-f61e7596" , module . exports )
2016-11-21 03:39:30 +00:00
}
}
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 196 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
var _ _vue _exports _ _ , _ _vue _options _ _
var _ _vue _styles _ _ = { }
/* script */
2016-12-05 03:53:41 +00:00
_ _vue _exports _ _ = _ _webpack _require _ _ ( 197 )
2016-11-21 03:39:30 +00:00
/* template */
2016-12-05 03:53:41 +00:00
var _ _vue _template _ _ = _ _webpack _require _ _ ( 198 )
2016-11-21 03:39:30 +00:00
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ || { }
if (
typeof _ _vue _exports _ _ . default === "object" ||
typeof _ _vue _exports _ _ . default === "function"
) {
if ( Object . keys ( _ _vue _exports _ _ ) . some ( function ( key ) { return key !== "default" && key !== "__esModule" } ) ) { console . error ( "named exports are not supported in *.vue files." ) }
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ . default
}
if ( typeof _ _vue _options _ _ === "function" ) {
_ _vue _options _ _ = _ _vue _options _ _ . options
}
2016-12-09 15:59:35 +00:00
_ _vue _options _ _ . _ _file = "/Users/mrufino/Projects/personal/github/vue-material/src/components/mdTable/mdTableEdit.vue"
2016-11-21 03:39:30 +00:00
_ _vue _options _ _ . render = _ _vue _template _ _ . render
_ _vue _options _ _ . staticRenderFns = _ _vue _template _ _ . staticRenderFns
/* hot reload */
if ( false ) { ( function ( ) {
var hotAPI = require ( "vue-hot-reload-api" )
hotAPI . install ( require ( "vue" ) , false )
if ( ! hotAPI . compatible ) return
module . hot . accept ( )
if ( ! module . hot . data ) {
2016-12-09 15:59:35 +00:00
hotAPI . createRecord ( "data-v-1b1f15dd" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
} else {
2016-12-09 15:59:35 +00:00
hotAPI . reload ( "data-v-1b1f15dd" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
}
} ) ( ) }
if ( _ _vue _options _ _ . functional ) { console . error ( "[vue-loader] mdTableEdit.vue: functional components are not supported and should be defined in plain js files using render functions." ) }
module . exports = _ _vue _exports _ _
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 197 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports ) {
'use strict' ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
exports . default = {
props : {
2016-12-05 03:53:41 +00:00
value : [ String , Number ] ,
2016-11-21 03:39:30 +00:00
mdLarge : Boolean ,
mdId : String ,
mdName : String ,
mdPlaceholder : String ,
mdMaxlength : [ Number , String ]
} ,
data : function data ( ) {
return {
active : false
} ;
} ,
computed : {
triggerClasses : function triggerClasses ( ) {
return {
'md-edited' : this . value
} ;
} ,
dialogClasses : function dialogClasses ( ) {
return {
'md-active' : this . active ,
'md-large' : this . mdLarge
} ;
} ,
realValue : function realValue ( ) {
console . log ( this . value ) ;
}
} ,
methods : {
openDialog : function openDialog ( ) {
this . active = true ;
this . $refs . input . $el . focus ( ) ;
document . addEventListener ( 'click' , this . closeDialogOnOffClick ) ;
} ,
closeDialog : function closeDialog ( ) {
if ( this . active ) {
this . active = false ;
this . $refs . input . $el . blur ( ) ;
document . removeEventListener ( 'click' , this . closeDialogOnOffClick ) ;
}
} ,
closeDialogOnOffClick : function closeDialogOnOffClick ( event ) {
if ( ! this . $refs . dialog . contains ( event . target ) ) {
this . closeDialog ( ) ;
}
} ,
confirmDialog : function confirmDialog ( ) {
var value = this . $refs . input . $el . value ;
this . closeDialog ( ) ;
this . $emit ( 'input' , value ) ;
this . $emit ( 'edited' , value ) ;
}
}
} ;
module . exports = exports [ 'default' ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 198 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
2016-12-05 03:53:41 +00:00
module . exports = { render : function ( ) { var _vm = this ; var _h = _vm . $createElement ;
return _h ( 'div' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-table-edit" ,
on : {
"keydown" : function ( $event ) {
2016-12-05 03:53:41 +00:00
if ( _vm . _k ( $event . keyCode , "esc" , 27 ) ) { return ; }
2016-11-21 03:39:30 +00:00
_vm . closeDialog ( $event )
}
}
2016-12-05 03:53:41 +00:00
} , [ _h ( 'div' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-table-edit-trigger" ,
class : _vm . triggerClasses ,
on : {
"click" : function ( $event ) {
$event . stopPropagation ( ) ;
_vm . openDialog ( $event )
}
}
2016-12-05 03:53:41 +00:00
} , [ "\n " + _vm . _s ( _vm . value || _vm . mdPlaceholder ) + "\n " ] ) , " " , _h ( 'div' , {
2016-11-21 03:39:30 +00:00
ref : "dialog" ,
staticClass : "md-table-dialog" ,
class : _vm . dialogClasses
2016-12-05 03:53:41 +00:00
} , [ _h ( 'md-input-container' , [ _h ( 'md-input' , {
2016-11-21 03:39:30 +00:00
ref : "input" ,
attrs : {
"id" : _vm . mdId ,
"name" : _vm . mdName ,
"maxlength" : _vm . mdMaxlength ,
"value" : _vm . value ,
"placeholder" : _vm . mdPlaceholder
} ,
nativeOn : {
"keydown" : function ( $event ) {
2016-12-05 03:53:41 +00:00
if ( _vm . _k ( $event . keyCode , "enter" , 13 ) ) { return ; }
2016-11-21 03:39:30 +00:00
_vm . confirmDialog ( $event )
}
}
} ) ] ) ] ) ] )
} , staticRenderFns : [ ] }
2016-12-05 03:53:41 +00:00
module . exports . render . _withStripped = true
2016-11-21 03:39:30 +00:00
if ( false ) {
module . hot . accept ( )
if ( module . hot . data ) {
2016-12-09 15:59:35 +00:00
require ( "vue-hot-reload-api" ) . rerender ( "data-v-1b1f15dd" , module . exports )
2016-11-21 03:39:30 +00:00
}
}
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 199 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
var _ _vue _exports _ _ , _ _vue _options _ _
var _ _vue _styles _ _ = { }
/* template */
2016-12-05 03:53:41 +00:00
var _ _vue _template _ _ = _ _webpack _require _ _ ( 200 )
2016-11-21 03:39:30 +00:00
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ || { }
if (
typeof _ _vue _exports _ _ . default === "object" ||
typeof _ _vue _exports _ _ . default === "function"
) {
if ( Object . keys ( _ _vue _exports _ _ ) . some ( function ( key ) { return key !== "default" && key !== "__esModule" } ) ) { console . error ( "named exports are not supported in *.vue files." ) }
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ . default
}
if ( typeof _ _vue _options _ _ === "function" ) {
_ _vue _options _ _ = _ _vue _options _ _ . options
}
2016-12-09 15:59:35 +00:00
_ _vue _options _ _ . _ _file = "/Users/mrufino/Projects/personal/github/vue-material/src/components/mdTable/mdTableCard.vue"
2016-11-21 03:39:30 +00:00
_ _vue _options _ _ . render = _ _vue _template _ _ . render
_ _vue _options _ _ . staticRenderFns = _ _vue _template _ _ . staticRenderFns
/* hot reload */
if ( false ) { ( function ( ) {
var hotAPI = require ( "vue-hot-reload-api" )
hotAPI . install ( require ( "vue" ) , false )
if ( ! hotAPI . compatible ) return
module . hot . accept ( )
if ( ! module . hot . data ) {
2016-12-09 15:59:35 +00:00
hotAPI . createRecord ( "data-v-89b7a03a" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
} else {
2016-12-09 15:59:35 +00:00
hotAPI . reload ( "data-v-89b7a03a" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
}
} ) ( ) }
if ( _ _vue _options _ _ . functional ) { console . error ( "[vue-loader] mdTableCard.vue: functional components are not supported and should be defined in plain js files using render functions." ) }
module . exports = _ _vue _exports _ _
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 200 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
2016-12-05 03:53:41 +00:00
module . exports = { render : function ( ) { var _vm = this ; var _h = _vm . $createElement ;
return _h ( 'md-card' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-table-card"
} , [ _vm . _t ( "default" ) ] )
} , staticRenderFns : [ ] }
2016-12-05 03:53:41 +00:00
module . exports . render . _withStripped = true
2016-11-21 03:39:30 +00:00
if ( false ) {
module . hot . accept ( )
if ( module . hot . data ) {
2016-12-09 15:59:35 +00:00
require ( "vue-hot-reload-api" ) . rerender ( "data-v-89b7a03a" , module . exports )
2016-11-21 03:39:30 +00:00
}
}
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 201 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
var _ _vue _exports _ _ , _ _vue _options _ _
var _ _vue _styles _ _ = { }
/* script */
2016-12-05 03:53:41 +00:00
_ _vue _exports _ _ = _ _webpack _require _ _ ( 202 )
2016-11-21 03:39:30 +00:00
/* template */
2016-12-05 03:53:41 +00:00
var _ _vue _template _ _ = _ _webpack _require _ _ ( 203 )
2016-11-21 03:39:30 +00:00
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ || { }
if (
typeof _ _vue _exports _ _ . default === "object" ||
typeof _ _vue _exports _ _ . default === "function"
) {
if ( Object . keys ( _ _vue _exports _ _ ) . some ( function ( key ) { return key !== "default" && key !== "__esModule" } ) ) { console . error ( "named exports are not supported in *.vue files." ) }
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ . default
}
if ( typeof _ _vue _options _ _ === "function" ) {
_ _vue _options _ _ = _ _vue _options _ _ . options
}
2016-12-09 15:59:35 +00:00
_ _vue _options _ _ . _ _file = "/Users/mrufino/Projects/personal/github/vue-material/src/components/mdTable/mdTableAlternateHeader.vue"
2016-11-21 03:39:30 +00:00
_ _vue _options _ _ . render = _ _vue _template _ _ . render
_ _vue _options _ _ . staticRenderFns = _ _vue _template _ _ . staticRenderFns
/* hot reload */
if ( false ) { ( function ( ) {
var hotAPI = require ( "vue-hot-reload-api" )
hotAPI . install ( require ( "vue" ) , false )
if ( ! hotAPI . compatible ) return
module . hot . accept ( )
if ( ! module . hot . data ) {
2016-12-09 15:59:35 +00:00
hotAPI . createRecord ( "data-v-8918b4b8" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
} else {
2016-12-09 15:59:35 +00:00
hotAPI . reload ( "data-v-8918b4b8" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
}
} ) ( ) }
if ( _ _vue _options _ _ . functional ) { console . error ( "[vue-loader] mdTableAlternateHeader.vue: functional components are not supported and should be defined in plain js files using render functions." ) }
module . exports = _ _vue _exports _ _
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 202 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
'use strict' ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
2016-12-05 03:53:41 +00:00
var _getClosestVueParent = _ _webpack _require _ _ ( 119 ) ;
2016-11-21 03:39:30 +00:00
var _getClosestVueParent2 = _interopRequireDefault ( _getClosestVueParent ) ;
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { default : obj } ; }
exports . default = {
props : {
2016-12-05 03:53:41 +00:00
mdSelectedLabel : {
type : String ,
default : 'selected'
}
2016-11-21 03:39:30 +00:00
} ,
data : function data ( ) {
return {
classes : { } ,
tableInstance : { }
} ;
} ,
mounted : function mounted ( ) {
var _this = this ;
this . parentCard = ( 0 , _getClosestVueParent2 . default ) ( this . $parent , 'md-table-card' ) ;
this . $nextTick ( function ( ) {
_this . tableInstance = _this . parentCard . tableInstance ;
_this . $watch ( 'tableInstance.numberOfSelected' , function ( ) {
_this . $refs . counter . textContent = _this . tableInstance . numberOfSelected ;
_this . classes = {
'md-active' : _this . tableInstance . numberOfSelected > 0
} ;
} ) ;
} ) ;
}
} ; //
//
//
//
//
//
//
//
//
//
//
//
//
module . exports = exports [ 'default' ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 203 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
2016-12-05 03:53:41 +00:00
module . exports = { render : function ( ) { var _vm = this ; var _h = _vm . $createElement ;
return _h ( 'div' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-table-alternate-header" ,
class : _vm . classes
2016-12-05 03:53:41 +00:00
} , [ _h ( 'md-toolbar' , [ _h ( 'div' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-counter"
2016-12-05 03:53:41 +00:00
} , [ _h ( 'span' , {
2016-11-21 03:39:30 +00:00
ref : "counter"
2016-12-05 03:53:41 +00:00
} , [ _vm . _s ( _vm . tableInstance . numberOfSelected ) ] ) , " " , _h ( 'span' , [ _vm . _s ( _vm . mdSelectedLabel ) ] ) ] ) , " " , _vm . _t ( "default" ) ] ) ] )
2016-11-21 03:39:30 +00:00
} , staticRenderFns : [ ] }
2016-12-05 03:53:41 +00:00
module . exports . render . _withStripped = true
2016-11-21 03:39:30 +00:00
if ( false ) {
module . hot . accept ( )
if ( module . hot . data ) {
2016-12-09 15:59:35 +00:00
require ( "vue-hot-reload-api" ) . rerender ( "data-v-8918b4b8" , module . exports )
2016-11-21 03:39:30 +00:00
}
}
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 204 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
var _ _vue _exports _ _ , _ _vue _options _ _
var _ _vue _styles _ _ = { }
/* script */
2016-12-05 03:53:41 +00:00
_ _vue _exports _ _ = _ _webpack _require _ _ ( 205 )
2016-11-21 03:39:30 +00:00
/* template */
2016-12-05 03:53:41 +00:00
var _ _vue _template _ _ = _ _webpack _require _ _ ( 206 )
2016-11-21 03:39:30 +00:00
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ || { }
if (
typeof _ _vue _exports _ _ . default === "object" ||
typeof _ _vue _exports _ _ . default === "function"
) {
if ( Object . keys ( _ _vue _exports _ _ ) . some ( function ( key ) { return key !== "default" && key !== "__esModule" } ) ) { console . error ( "named exports are not supported in *.vue files." ) }
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ . default
}
if ( typeof _ _vue _options _ _ === "function" ) {
_ _vue _options _ _ = _ _vue _options _ _ . options
}
2016-12-09 15:59:35 +00:00
_ _vue _options _ _ . _ _file = "/Users/mrufino/Projects/personal/github/vue-material/src/components/mdTable/mdTablePagination.vue"
2016-11-21 03:39:30 +00:00
_ _vue _options _ _ . render = _ _vue _template _ _ . render
_ _vue _options _ _ . staticRenderFns = _ _vue _template _ _ . staticRenderFns
/* hot reload */
if ( false ) { ( function ( ) {
var hotAPI = require ( "vue-hot-reload-api" )
hotAPI . install ( require ( "vue" ) , false )
if ( ! hotAPI . compatible ) return
module . hot . accept ( )
if ( ! module . hot . data ) {
2016-12-09 15:59:35 +00:00
hotAPI . createRecord ( "data-v-2149bf2d" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
} else {
2016-12-09 15:59:35 +00:00
hotAPI . reload ( "data-v-2149bf2d" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
}
} ) ( ) }
if ( _ _vue _options _ _ . functional ) { console . error ( "[vue-loader] mdTablePagination.vue: functional components are not supported and should be defined in plain js files using render functions." ) }
module . exports = _ _vue _exports _ _
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 205 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports ) {
'use strict' ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
exports . default = {
props : {
mdSize : {
type : [ Number , String ] ,
default : 10
} ,
mdPageOptions : [ Array , Boolean ] ,
mdPage : {
type : [ Number , String ] ,
default : 1
} ,
mdTotal : {
type : [ Number , String ] ,
default : 'Many'
} ,
mdLabel : {
type : String ,
default : 'Rows per page'
} ,
mdSeparator : {
type : String ,
default : 'of'
}
} ,
data : function data ( ) {
return {
2016-12-09 15:59:35 +00:00
subTotal : 0 ,
2016-11-21 03:39:30 +00:00
currentSize : parseInt ( this . mdSize , 10 ) ,
2016-12-05 03:53:41 +00:00
currentPage : parseInt ( this . mdPage , 10 ) ,
totalItems : ! isNaN ( this . mdTotal ) && Number . MAX _SAFE _INTEGER
2016-11-21 03:39:30 +00:00
} ;
} ,
computed : {
lastPage : function lastPage ( ) {
return false ;
}
} ,
methods : {
emitPaginationEvent : function emitPaginationEvent ( ) {
if ( this . canFireEvents ) {
2016-12-09 15:59:35 +00:00
var sub = this . currentPage * this . currentSize ;
this . subTotal = sub > this . mdTotal ? this . mdTotal : sub ;
2016-11-21 03:39:30 +00:00
this . $emit ( 'pagination' , {
size : this . currentSize ,
page : this . currentPage
} ) ;
}
} ,
changeSize : function changeSize ( ) {
if ( this . canFireEvents ) {
this . $emit ( 'size' , this . currentSize ) ;
this . emitPaginationEvent ( ) ;
}
} ,
2016-12-09 15:59:35 +00:00
previousPage : function previousPage ( ) {
if ( this . canFireEvents ) {
this . currentPage -- ;
this . $emit ( 'page' , this . currentPage ) ;
this . emitPaginationEvent ( ) ;
}
} ,
nextPage : function nextPage ( ) {
2016-11-21 03:39:30 +00:00
if ( this . canFireEvents ) {
2016-12-09 15:59:35 +00:00
this . currentPage ++ ;
2016-11-21 03:39:30 +00:00
this . $emit ( 'page' , this . currentPage ) ;
this . emitPaginationEvent ( ) ;
}
}
} ,
mounted : function mounted ( ) {
var _this = this ;
this . $nextTick ( function ( ) {
2016-12-09 15:59:35 +00:00
_this . subTotal = _this . currentPage * _this . currentSize ;
2016-11-21 03:39:30 +00:00
_this . mdPageOptions = _this . mdPageOptions || [ 10 , 25 , 50 , 100 ] ;
_this . currentSize = _this . mdPageOptions [ 0 ] ;
_this . canFireEvents = true ;
} ) ;
}
} ;
module . exports = exports [ 'default' ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 206 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
2016-12-05 03:53:41 +00:00
module . exports = { render : function ( ) { var _vm = this ; var _h = _vm . $createElement ;
return _h ( 'div' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-table-pagination"
2016-12-05 03:53:41 +00:00
} , [ _h ( 'span' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-table-pagination-label"
2016-12-05 03:53:41 +00:00
} , [ _vm . _s ( _vm . mdLabel ) + ":" ] ) , " " , ( _vm . mdPageOptions ) ? _h ( 'md-select' , {
2016-11-21 03:39:30 +00:00
directives : [ {
name : "model" ,
rawName : "v-model" ,
value : ( _vm . currentSize ) ,
expression : "currentSize"
} ] ,
attrs : {
"md-menu-class" : "md-pagination-select"
} ,
domProps : {
"value" : ( _vm . currentSize )
} ,
on : {
"change" : _vm . changeSize ,
"input" : function ( $event ) {
_vm . currentSize = $event
}
}
} , [ _vm . _l ( ( _vm . mdPageOptions ) , function ( amount ) {
2016-12-05 03:53:41 +00:00
return _h ( 'md-option' , {
2016-11-21 03:39:30 +00:00
attrs : {
"value" : amount
}
} , [ _vm . _s ( amount ) ] )
2016-12-09 15:59:35 +00:00
} ) ] ) : _vm . _e ( ) , " " , _h ( 'span' , [ _vm . _s ( ( ( _vm . currentPage - 1 ) * _vm . currentSize ) + 1 ) + "-" + _vm . _s ( _vm . subTotal ) + " " + _vm . _s ( _vm . mdSeparator ) + " " + _vm . _s ( _vm . totalItems ) ] ) , " " , _h ( 'md-button' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-icon-button md-table-pagination-previous" ,
attrs : {
"disabled" : _vm . currentPage === 1
} ,
on : {
2016-12-09 15:59:35 +00:00
"click" : _vm . previousPage
2016-11-21 03:39:30 +00:00
}
2016-12-05 03:53:41 +00:00
} , [ _h ( 'md-icon' , [ "keyboard_arrow_left" ] ) ] ) , " " , _h ( 'md-button' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-icon-button md-table-pagination-next" ,
attrs : {
2016-12-05 03:53:41 +00:00
"disabled" : _vm . currentSize * _vm . currentPage >= _vm . totalItems
2016-11-21 03:39:30 +00:00
} ,
on : {
2016-12-09 15:59:35 +00:00
"click" : _vm . nextPage
2016-11-21 03:39:30 +00:00
}
2016-12-05 03:53:41 +00:00
} , [ _h ( 'md-icon' , [ "keyboard_arrow_right" ] ) ] ) ] )
2016-11-21 03:39:30 +00:00
} , staticRenderFns : [ ] }
2016-12-05 03:53:41 +00:00
module . exports . render . _withStripped = true
2016-11-21 03:39:30 +00:00
if ( false ) {
module . hot . accept ( )
if ( module . hot . data ) {
2016-12-09 15:59:35 +00:00
require ( "vue-hot-reload-api" ) . rerender ( "data-v-2149bf2d" , module . exports )
2016-11-21 03:39:30 +00:00
}
}
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 207 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports ) {
module . exports = ".THEME_NAME .md-table-card .md-toolbar, .THEME_NAME.md-table-card .md-toolbar {\n background-color: BACKGROUND-COLOR-A100;\n color: BACKGROUND-CONTRAST-A100; }\n\n.THEME_NAME .md-table-alternate-header, .THEME_NAME.md-table-alternate-header {\n background-color: BACKGROUND-COLOR-A100; }\n .THEME_NAME .md-table-alternate-header .md-toolbar, .THEME_NAME.md-table-alternate-header .md-toolbar {\n background-color: ACCENT-COLOR-A100-0.2;\n color: ACCENT-CONTRAST-A100; }\n .THEME_NAME .md-table-alternate-header .md-counter, .THEME_NAME.md-table-alternate-header .md-counter {\n color: ACCENT-COLOR; }\n"
/***/ }
/******/ } )
} ) ;
;
//# sourceMappingURL=index.debug.js.map