diff --git a/.gitignore b/.gitignore
index 41aa071..051cb59 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
.DS_Store
node_modules/
-npm-debug.log
\ No newline at end of file
+npm-debug.log
+.idea
\ No newline at end of file
diff --git a/dist/example.js b/dist/example.js
index 97e0d74..5e2140a 100644
--- a/dist/example.js
+++ b/dist/example.js
@@ -51,56 +51,56 @@
/* 1 */
/***/ function(module, exports) {
- /*
- MIT License http://www.opensource.org/licenses/mit-license.php
- Author Tobias Koppers @sokra
- */
- // css base code, injected by the css-loader
- module.exports = function() {
- var list = [];
-
- // return the list of modules as css string
- list.toString = function toString() {
- var result = [];
- for(var i = 0; i < this.length; i++) {
- var item = this[i];
- if(item[2]) {
- result.push("@media " + item[2] + "{" + item[1] + "}");
- } else {
- result.push(item[1]);
- }
- }
- return result.join("");
- };
-
- // import a list of modules into the list
- list.i = function(modules, mediaQuery) {
- if(typeof modules === "string")
- modules = [[null, modules, ""]];
- var alreadyImportedModules = {};
- for(var i = 0; i < this.length; i++) {
- var id = this[i][0];
- if(typeof id === "number")
- alreadyImportedModules[id] = true;
- }
- for(i = 0; i < modules.length; i++) {
- var item = modules[i];
- // skip already imported module
- // this implementation is not 100% perfect for weird media query combinations
- // when a module is imported multiple times with different media queries.
- // I hope this will never occur (Hey this way we have smaller bundles)
- if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
- if(mediaQuery && !item[2]) {
- item[2] = mediaQuery;
- } else if(mediaQuery) {
- item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
- }
- list.push(item);
- }
- }
- };
- return list;
- };
+ /*
+ MIT License http://www.opensource.org/licenses/mit-license.php
+ Author Tobias Koppers @sokra
+ */
+ // css base code, injected by the css-loader
+ module.exports = function() {
+ var list = [];
+
+ // return the list of modules as css string
+ list.toString = function toString() {
+ var result = [];
+ for(var i = 0; i < this.length; i++) {
+ var item = this[i];
+ if(item[2]) {
+ result.push("@media " + item[2] + "{" + item[1] + "}");
+ } else {
+ result.push(item[1]);
+ }
+ }
+ return result.join("");
+ };
+
+ // import a list of modules into the list
+ list.i = function(modules, mediaQuery) {
+ if(typeof modules === "string")
+ modules = [[null, modules, ""]];
+ var alreadyImportedModules = {};
+ for(var i = 0; i < this.length; i++) {
+ var id = this[i][0];
+ if(typeof id === "number")
+ alreadyImportedModules[id] = true;
+ }
+ for(i = 0; i < modules.length; i++) {
+ var item = modules[i];
+ // skip already imported module
+ // this implementation is not 100% perfect for weird media query combinations
+ // when a module is imported multiple times with different media queries.
+ // I hope this will never occur (Hey this way we have smaller bundles)
+ if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
+ if(mediaQuery && !item[2]) {
+ item[2] = mediaQuery;
+ } else if(mediaQuery) {
+ item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
+ }
+ list.push(item);
+ }
+ }
+ };
+ return list;
+ };
/***/ },
@@ -332,7 +332,7 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
var _DatasourceUtils = __webpack_require__(7);
@@ -350,81 +350,81 @@
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = {
- components: {
- Pagination: _Pagination2.default
+ components: {
+ Pagination: _Pagination2.default
+ },
+ props: {
+ tableData: {
+ type: Array,
+ required: true
},
- props: {
- tableData: {
- type: Array,
- required: true
- },
-
- language: {
- type: String,
- default: 'es'
- },
-
- columns: {
- type: Array,
- required: true
- },
-
- pagination: {
- type: Object,
- default: function _default() {
- return {
- total: 0,
- to: 0,
- from: 0,
- per_page: 15
- };
- }
- },
- actions: {
- type: Array,
- default: function _default() {
- return [];
- }
- }
+ language: {
+ type: String,
+ default: 'es'
+ },
+
+ columns: {
+ type: Array,
+ required: true
},
- data: function data() {
+
+ pagination: {
+ type: Object,
+ default: function _default() {
return {
- limits: [1, 5, 10, 15, 20],
- perpage: 15,
- selected: null,
- indexSelected: -1,
- search: '' };
+ total: 0,
+ to: 0,
+ from: 0,
+ per_page: 15
+ };
+ }
},
- computed: {
- translation: function translation() {
- return _DatasourceLanguage2.default.translations[this.language];
- },
+ actions: {
+ type: Array,
+ default: function _default() {
+ return [];
+ }
+ }
+ },
+ data: function data() {
+ return {
+ limits: [1, 5, 10, 15, 20],
+ perpage: 15,
+ selected: null,
+ indexSelected: -1,
+ search: '' };
+ },
- tableInfo: _DatasourceUtils2.default.tableInfo
+ computed: {
+ translation: function translation() {
+ return _DatasourceLanguage2.default.translations[this.language];
},
- methods: {
- fetchFromObject: _DatasourceUtils2.default.fetchFromObject,
- changePage: _DatasourceUtils2.default.changePage,
- selectRow: _DatasourceUtils2.default.selectRow,
- searching: function searching() {
- this.selected = null;
- this.indexSelected = -1;
- this.$emit('searching', this.search);
- }
+
+ tableInfo: _DatasourceUtils2.default.tableInfo
+ },
+ methods: {
+ fetchFromObject: _DatasourceUtils2.default.fetchFromObject,
+ changePage: _DatasourceUtils2.default.changePage,
+ selectRow: _DatasourceUtils2.default.selectRow,
+ searching: function searching() {
+ this.selected = null;
+ this.indexSelected = -1;
+ this.$emit('searching', this.search);
+ }
+ },
+ watch: {
+ perpage: function perpage() {
+ this.selected = null;
+ this.indexSelected = -1;
+ this.$emit('change', { perpage: this.perpage, page: 1 });
},
- watch: {
- perpage: function perpage() {
- this.selected = null;
- this.indexSelected = -1;
- this.$emit('change', { perpage: this.perpage, page: 1 });
- },
- tableData: function tableData() {
- this.selected = null;
- this.indexSelected = -1;
- }
+ tableData: function tableData() {
+ this.selected = null;
+ this.indexSelected = -1;
}
+ }
};
/***/ },
@@ -434,71 +434,86 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
exports.default = {
- props: ['pages', 'translation'],
- computed: {
- items: function items() {
- var temp = [],
- bottomLimit = this.pages.current_page - 2,
- topLimit = this.pages.current_page + 2,
- showing = 5;
-
- if (bottomLimit <= 0) {
- bottomLimit = 1;
- topLimit = 5;
- }
+ props: ['pages', 'translation'],
+ computed: {
+ items: function items() {
+ var temp = [],
+ bottomLimit = this.pages.current_page - 2,
+ topLimit = this.pages.current_page + 2,
+ showing = 5;
- if (topLimit >= this.pages.last_page) {
- bottomLimit = this.pages.last_page - 4;
- topLimit = this.pages.last_page;
- }
+ if (bottomLimit <= 0) {
+ bottomLimit = 1;
+ topLimit = 5;
+ }
- if (this.pages.last_page < 5) {
- showing = this.pages.last_page;
- }
+ if (topLimit >= this.pages.last_page) {
+ bottomLimit = this.pages.last_page - 4;
+ topLimit = this.pages.last_page;
+ }
- if (bottomLimit <= 0) {
- bottomLimit = 1;
- }
+ if (this.pages.last_page < 5) {
+ showing = this.pages.last_page;
+ }
- if (this.pages.last_page == 0 || this.pages.last_page == 1) {
- showing = 1;
- }
+ if (bottomLimit <= 0) {
+ bottomLimit = 1;
+ }
- for (var i = 0; i < showing; i++) {
- temp[i] = i + bottomLimit;
- }
+ if (this.pages.last_page == 0 || this.pages.last_page == 1) {
+ showing = 1;
+ }
- return temp;
- }
+ for (var i = 0; i < showing; i++) {
+ temp[i] = i + bottomLimit;
+ }
+
+ return temp;
+ }
+ },
+ methods: {
+ firstPage: function firstPage() {
+ if (this.pages.current_page != 1) {
+ this.change(1);
+ }
},
- methods: {
- firstPage: function firstPage() {
- if (this.pages.current_page != 1) {
- this.change(1);
- }
- },
- previous: function previous() {
- if (this.pages.current_page != 1) {
- this.change(--this.pages.current_page);
- }
- },
- change: function change(page) {
- this.$emit('change', page);
- },
- next: function next() {
- if (this.pages.current_page != this.pages.last_page) {
- this.change(++this.pages.current_page);
- }
- },
- lastPage: function lastPage(page) {
- if (this.pages.current_page != this.pages.last_page) {
- this.change(page);
- }
- }
+ previous: function previous() {
+ if (this.pages.current_page != 1) {
+ this.change(--this.pages.current_page);
+ }
+ },
+ change: function change(page) {
+ this.$emit('change', page);
+ },
+ next: function next() {
+ if (this.pages.current_page != this.pages.last_page) {
+ this.change(++this.pages.current_page);
+ }
+ },
+ lastPage: function lastPage(page) {
+ if (this.pages.current_page != this.pages.last_page) {
+ this.change(page);
+ }
+ },
+ changePageWithKeyBoard: function changePageWithKeyBoard(key) {
+ if (key === 'ArrowLeft') {
+ this.previous();
+ } else if (key === 'ArrowRight') {
+ this.next();
+ }
}
+ },
+ created: function created() {
+ var _this = this;
+
+ window.addEventListener('keyup', function (_ref) {
+ var key = _ref.key;
+ return _this.changePageWithKeyBoard(key);
+ });
+ }
};
/***/ },
@@ -688,44 +703,44 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
exports.default = {
- translations: {
- 'en': {
- 'table': {
- 'label_limits': 'Show',
- 'label_search': 'Search',
- 'placeholder_search': 'Type to search..',
- 'records_not_found': 'No records found'
- },
- 'pagination': {
- 'label_show': 'Showing',
- 'label_to': 'to',
- 'label_of': 'of',
- 'label_entries': 'entries',
- 'btn_first': 'First',
- 'btn_last': 'Latest'
- }
- },
-
- 'es': {
- 'table': {
- 'label_limits': 'Mostrar',
- 'label_search': 'Buscar',
- 'placeholder_search': 'Buscar ..',
- 'records_not_found': 'No se encontraron registros.'
- },
- 'pagination': {
- 'label_show': 'Mostrando',
- 'label_to': 'a',
- 'label_of': 'de',
- 'label_entries': 'registros',
- 'btn_first': 'Primero',
- 'btn_last': 'Último'
- }
- }
+ translations: {
+ 'en': {
+ 'table': {
+ 'label_limits': 'Show',
+ 'label_search': 'Search',
+ 'placeholder_search': 'Type to search..',
+ 'records_not_found': 'No records found'
+ },
+ 'pagination': {
+ 'label_show': 'Showing',
+ 'label_to': 'to',
+ 'label_of': 'of',
+ 'label_entries': 'entries',
+ 'btn_first': 'First',
+ 'btn_last': 'Latest'
+ }
+ },
+
+ 'es': {
+ 'table': {
+ 'label_limits': 'Mostrar',
+ 'label_search': 'Buscar',
+ 'placeholder_search': 'Buscar ..',
+ 'records_not_found': 'No se encontraron registros.'
+ },
+ 'pagination': {
+ 'label_show': 'Mostrando',
+ 'label_to': 'a',
+ 'label_of': 'de',
+ 'label_entries': 'registros',
+ 'btn_first': 'Primero',
+ 'btn_last': 'Último'
+ }
}
+ }
};
/***/ },
@@ -735,48 +750,48 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
exports.default = {
- fetchFromObject: function fetchFromObject(obj, column, render) {
- if (typeof obj === 'undefined') return false;
- var _index = column.indexOf('.');
- if (_index > -1) {
- return this.fetchFromObject(obj[column.substring(0, _index)], column.substr(_index + 1));
- }
- if (typeof render != 'undefined') {
- return render(obj[column]);
- }
- return obj[column];
- },
- changePage: function changePage(page) {
- this.selected = null;
- this.indexSelected = -1;
- this.$emit('change', { perpage: this.perpage, page: page });
- },
- selectRow: function selectRow(row, index) {
- if (this.indexSelected == index) {
- this.indexSelected = -1;
- this.selected = null;
- } else {
- this.indexSelected = index;
- this.selected = {
- 'row': row,
- 'index': index
- };
- }
- },
- tableInfo: function tableInfo() {
- var label_show = this.translation.pagination.label_show;
- var from = this.pagination.from == null ? 0 : this.pagination.from;
- var label_to = this.translation.pagination.label_to;
- var to = this.pagination.to == null ? 0 : this.pagination.to;
- var label_of = this.translation.pagination.label_of;
- var total = this.pagination.total;
- var label_entries = this.translation.pagination.label_entries;
-
- return label_show + ' ' + from + ' ' + label_to + ' ' + to + ' ' + label_of + ' ' + total + ' ' + label_entries;
+ fetchFromObject: function fetchFromObject(obj, column, render) {
+ if (typeof obj === 'undefined') return false;
+ var _index = column.indexOf('.');
+ if (_index > -1) {
+ return this.fetchFromObject(obj[column.substring(0, _index)], column.substr(_index + 1));
+ }
+ if (typeof render != 'undefined') {
+ return render(obj[column]);
+ }
+ return obj[column];
+ },
+ changePage: function changePage(page) {
+ this.selected = null;
+ this.indexSelected = -1;
+ this.$emit('change', { perpage: this.perpage, page: page });
+ },
+ selectRow: function selectRow(row, index) {
+ if (this.indexSelected == index) {
+ this.indexSelected = -1;
+ this.selected = null;
+ } else {
+ this.indexSelected = index;
+ this.selected = {
+ 'row': row,
+ 'index': index
+ };
}
+ },
+ tableInfo: function tableInfo() {
+ var label_show = this.translation.pagination.label_show;
+ var from = this.pagination.from == null ? 0 : this.pagination.from;
+ var label_to = this.translation.pagination.label_to;
+ var to = this.pagination.to == null ? 0 : this.pagination.to;
+ var label_of = this.translation.pagination.label_of;
+ var total = this.pagination.total;
+ var label_entries = this.translation.pagination.label_entries;
+
+ return label_show + ' ' + from + ' ' + label_to + ' ' + to + ' ' + label_of + ' ' + total + ' ' + label_entries;
+ }
};
/***/ },
@@ -811,7 +826,7 @@
// module
- exports.push([module.id, "\n.Vue__pagination nav .pagination[data-v-60636b2c] {\n margin: 10px 0 !important;\n}\n", ""]);
+ exports.push([module.id, "\n.vue-datasource .Vue__panel-body[data-v-49bf9548] {\n padding: 0;\n}\n.vue-datasource .Vue__panel-body .Vue__table[data-v-49bf9548] {\n margin-bottom: 0;\n}\n.vue-datasource .Vue__panel-footer .Vue__datasource_actions[data-v-49bf9548] {\n margin: 10px 0;\n}\n", ""]);
// exports
@@ -825,7 +840,7 @@
// module
- exports.push([module.id, "\n.vue-datasource .Vue__panel-body[data-v-ea4606ae] {\n padding: 0;\n}\n.vue-datasource .Vue__panel-body .Vue__table[data-v-ea4606ae] {\n margin-bottom: 0;\n}\n.vue-datasource .Vue__panel-footer .Vue__datasource_actions[data-v-ea4606ae] {\n margin: 10px 0;\n}\n", ""]);
+ exports.push([module.id, "\n.Vue__pagination nav .pagination[data-v-6bdbb1a8] {\n margin: 10px 0 !important;\n}\n", ""]);
// exports
@@ -838,13 +853,13 @@
var __vue_styles__ = {}
/* styles */
- __webpack_require__(18)
+ __webpack_require__(17)
/* script */
__vue_exports__ = __webpack_require__(3)
/* template */
- var __vue_template__ = __webpack_require__(16)
+ var __vue_template__ = __webpack_require__(15)
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
if (
typeof __vue_exports__.default === "object" ||
@@ -858,7 +873,7 @@
__vue_options__.render = __vue_template__.render
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
- __vue_options__._scopeId = "data-v-ea4606ae"
+ __vue_options__._scopeId = "data-v-49bf9548"
module.exports = __vue_exports__
@@ -871,13 +886,13 @@
var __vue_styles__ = {}
/* styles */
- __webpack_require__(17)
+ __webpack_require__(18)
/* script */
__vue_exports__ = __webpack_require__(4)
/* template */
- var __vue_template__ = __webpack_require__(15)
+ var __vue_template__ = __webpack_require__(16)
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
if (
typeof __vue_exports__.default === "object" ||
@@ -891,101 +906,13 @@
__vue_options__.render = __vue_template__.render
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
- __vue_options__._scopeId = "data-v-60636b2c"
+ __vue_options__._scopeId = "data-v-6bdbb1a8"
module.exports = __vue_exports__
/***/ },
/* 15 */
-/***/ function(module, exports) {
-
- module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
- return _c('div', {
- staticClass: "Vue__pagination"
- }, [_c('nav', {
- attrs: {
- "aria-label": "Page navigation"
- }
- }, [_c('ul', {
- staticClass: "pagination"
- }, [_c('li', {
- class: (_vm.pages.current_page == 1) ? 'disabled' : ''
- }, [_c('a', {
- attrs: {
- "href": "#"
- },
- on: {
- "click": function($event) {
- $event.preventDefault();
- _vm.firstPage($event)
- }
- }
- }, [_vm._v(_vm._s(_vm.translation.btn_first))])]), _vm._v(" "), _c('li', {
- class: (_vm.pages.current_page == 1) ? 'disabled' : ''
- }, [_c('a', {
- attrs: {
- "href": "#",
- "aria-label": "Previous"
- },
- on: {
- "click": function($event) {
- $event.preventDefault();
- _vm.previous($event)
- }
- }
- }, [_c('span', {
- attrs: {
- "aria-hidden": "true"
- }
- }, [_vm._v("«")])])]), _vm._v(" "), _vm._l((_vm.items), function(n) {
- return _c('li', {
- class: (_vm.pages.current_page == n) ? 'active' : ''
- }, [_c('a', {
- attrs: {
- "href": "#"
- },
- on: {
- "click": function($event) {
- $event.preventDefault();
- _vm.change(n)
- }
- }
- }, [_vm._v(_vm._s(n))])])
- }), _vm._v(" "), _c('li', {
- class: (_vm.pages.current_page == _vm.pages.last_page) ? 'disabled' : ''
- }, [_c('a', {
- attrs: {
- "href": "#",
- "aria-label": "Next"
- },
- on: {
- "click": function($event) {
- $event.preventDefault();
- _vm.next($event)
- }
- }
- }, [_c('span', {
- attrs: {
- "aria-hidden": "true"
- }
- }, [_vm._v("»")])])]), _vm._v(" "), _c('li', {
- class: (_vm.pages.current_page == _vm.pages.last_page) ? 'disabled' : ''
- }, [_c('a', {
- attrs: {
- "href": "#"
- },
- on: {
- "click": function($event) {
- $event.preventDefault();
- _vm.lastPage(_vm.pages.last_page)
- }
- }
- }, [_vm._v(_vm._s(_vm.translation.btn_last))])])], 2)])])
- },staticRenderFns: []}
-
-/***/ },
-/* 16 */
/***/ function(module, exports) {
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
@@ -1062,7 +989,7 @@
_vm.searching($event)
}
}
- }, [_vm._v(_vm._s(_vm.translation.table.label_search))])]), _vm._v(" "), _c('div', {
+ }, [_vm._v(_vm._s(_vm.translation.table.label_search) + "\n ")])]), _vm._v(" "), _c('div', {
staticClass: "clearfix"
})])]), _vm._v(" "), _c('div', {
staticClass: "panel-body Vue__panel-body"
@@ -1086,14 +1013,14 @@
}
}
}, _vm._l((_vm.columns), function(k) {
- return _c('td', [_vm._v("\n " + _vm._s(_vm.fetchFromObject(row, k.key, k.render)) + "\n ")])
+ return _c('td', [_vm._v("\n " + _vm._s(_vm.fetchFromObject(row, k.key, k.render)) + "\n ")])
}))
}), _vm._v(" "), _c('tr', [_c('td', {
staticClass: "text-center",
attrs: {
"colspan": _vm.columns.length
}
- }, [_vm._v("\n " + _vm._s(_vm.tableInfo) + "\n ")])])], 2)])]), _vm._v(" "), _c('div', {
+ }, [_vm._v("\n " + _vm._s(_vm.tableInfo) + "\n ")])])], 2)])]), _vm._v(" "), _c('div', {
staticClass: "panel-footer Vue__panel-footer"
}, [_c('div', {
staticClass: "pull-left"
@@ -1114,7 +1041,7 @@
}, [(btn.icon) ? _c('i', {
staticClass: "pr1",
class: btn.icon
- }) : _vm._e(), _vm._v("\n " + _vm._s(btn.text) + "\n ")])
+ }) : _vm._e(), _vm._v("\n " + _vm._s(btn.text) + "\n ")])
}))]), _vm._v(" "), _c('div', {
staticClass: "pull-right"
}, [_c('pagination', {
@@ -1131,72 +1058,160 @@
},staticRenderFns: []}
/***/ },
-/* 17 */
-/***/ function(module, exports, __webpack_require__) {
-
- // style-loader: Adds some css to the DOM by adding a \n\n\n// WEBPACK FOOTER //\n// Datasource.vue?1f051aaa","\r\n \r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// Pagination.vue?7ebfad58","import Vue from 'vue/dist/vue.js';\r\nimport Datasource from './Datasource.vue';\r\n\r\nvar data = {\r\n \"pagination\": {\r\n \"total\": 4,\r\n \"per_page\": 15,\r\n \"current_page\": 1,\r\n \"last_page\": 1,\r\n \"next_page_url\": null,\r\n \"prev_page_url\": null,\r\n \"from\": 1,\r\n \"to\": 4\r\n },\r\n \"data\": [\r\n {\r\n \"id_grupo\": 1,\r\n \"tipo_grupo\": \"1\",\r\n \"nombre_grupo\": \"All\",\r\n \"estado_grupo\": \"1\",\r\n \"created_at\": \"2016-12-06 14:18:54\",\r\n \"updated_at\": \"2016-12-06 14:18:54\",\r\n \"deleted_at\": null,\r\n \"detalle_grupos_count\": \"4\"\r\n },\r\n {\r\n \"id_grupo\": 2,\r\n \"tipo_grupo\": \"1\",\r\n \"nombre_grupo\": \"Ladies\",\r\n \"estado_grupo\": \"1\",\r\n \"created_at\": \"2016-12-06 14:18:54\",\r\n \"updated_at\": \"2016-12-06 14:18:54\",\r\n \"deleted_at\": null,\r\n \"detalle_grupos_count\": \"1\"\r\n },\r\n {\r\n \"id_grupo\": 3,\r\n \"tipo_grupo\": \"2\",\r\n \"nombre_grupo\": \"Mens\",\r\n \"estado_grupo\": \"2\",\r\n \"created_at\": \"2016-12-06 14:18:54\",\r\n \"updated_at\": \"2016-12-06 14:18:54\",\r\n \"deleted_at\": null,\r\n \"detalle_grupos_count\": \"3\"\r\n },\r\n {\r\n \"id_grupo\": 4,\r\n \"tipo_grupo\": \"1\",\r\n \"nombre_grupo\": \"Chiefs\",\r\n \"estado_grupo\": \"1\",\r\n \"created_at\": \"2016-12-06 14:18:54\",\r\n \"updated_at\": \"2016-12-06 14:18:54\",\r\n \"deleted_at\": null,\r\n \"detalle_grupos_count\": \"1\"\r\n },\r\n {\r\n \"id_grupo\": 5,\r\n \"tipo_grupo\": \"2\",\r\n \"nombre_grupo\": \"Operators\",\r\n \"estado_grupo\": \"1\",\r\n \"created_at\": \"2016-12-06 14:18:54\",\r\n \"updated_at\": \"2016-12-06 14:18:54\",\r\n \"deleted_at\": null,\r\n \"detalle_grupos_count\": \"1\"\r\n }\r\n ]\r\n};\r\n\r\nnew Vue({\r\n el: '#app',\r\n components: {\r\n Datasource\r\n },\r\n data() {\r\n return {\r\n groups: {\r\n pagination: {},\r\n data: []\r\n },\r\n columns: [\r\n {\r\n name: 'Id',\r\n key: 'id_grupo',\r\n filter: false,\r\n render(value) {\r\n return `# ${value}`;\r\n }\r\n },\r\n {\r\n name: 'Name',\r\n key: 'nombre_grupo',\r\n filter: false\r\n },\r\n {\r\n name: 'Type',\r\n key: 'tipo_grupo',\r\n filter: false,\r\n render(value) {\r\n switch (value) {\r\n case '1':\r\n return 'Global';\r\n break;\r\n case '2':\r\n return 'General';\r\n break;\r\n case '3':\r\n return 'Personal';\r\n break;\r\n }\r\n }\r\n },\r\n {\r\n name: 'Total',\r\n key: 'detalle_grupos_count',\r\n filter: false,\r\n },\r\n {\r\n name: 'Date',\r\n key: 'created_at',\r\n filter: false\r\n },\r\n ],\r\n actions: [\r\n {\r\n text: 'Edit',\r\n icon: 'glyphicon glyphicon-pencil',\r\n class: 'btn-primary',\r\n event(e, row) {\r\n console.warn('Did clicked me?', e);\r\n if(row == null) {\r\n console.info('Ups.. data not found :(')\r\n } else {\r\n console.info('Yeeei, I found this :)', JSON.stringify(row));\r\n }\r\n }\r\n },\r\n {\r\n text: 'Delete',\r\n icon: 'glyphicon glyphicon-trash',\r\n class: 'btn-danger',\r\n event(e, row) {\r\n console.warn('Are you clicked me?', e);\r\n if(row == null) {\r\n console.info('Ups.. data not found :(')\r\n } else {\r\n console.info('Yeeei, I found this :)', JSON.stringify(row));\r\n }\r\n }\r\n },\r\n {\r\n text: 'Show',\r\n icon: 'glyphicon glyphicon-eye-open',\r\n class: 'btn-info',\r\n event(e, row) {\r\n console.warn('Are you clicked me?', e);\r\n if(row == null) {\r\n console.info('Ups.. data not found :(')\r\n } else {\r\n console.info('Yeeei, I found this :)', JSON.stringify(row));\r\n }\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n mounted() {\r\n this.groups = data;\r\n },\r\n methods: {\r\n changePage(values) {\r\n alert(`Show limit changed, the new limit is ${values.perpage} and the current page is ${values.page}`);\r\n },\r\n onSearch(searchQuery) {\r\n alert(`Did you find this? ${searchQuery}`);\r\n }\r\n }\r\n});\n\n\n// WEBPACK FOOTER //\n// ./src/example.js","export default {\r\n translations: {\r\n // English translation\r\n 'en': {\r\n 'table': {\r\n 'label_limits': 'Show',\r\n 'label_search': 'Search',\r\n 'placeholder_search': 'Type to search..',\r\n 'records_not_found': 'No records found'\r\n },\r\n 'pagination': {\r\n 'label_show': 'Showing',\r\n 'label_to': 'to',\r\n 'label_of': 'of',\r\n 'label_entries': 'entries',\r\n 'btn_first': 'First',\r\n 'btn_last': 'Latest'\r\n }\r\n },\r\n // Spanish translation\r\n 'es': {\r\n 'table': {\r\n 'label_limits': 'Mostrar',\r\n 'label_search': 'Buscar',\r\n 'placeholder_search': 'Buscar ..',\r\n 'records_not_found': 'No se encontraron registros.'\r\n },\r\n 'pagination': {\r\n 'label_show': 'Mostrando',\r\n 'label_to': 'a',\r\n 'label_of': 'de',\r\n 'label_entries': 'registros',\r\n 'btn_first': 'Primero',\r\n 'btn_last': 'Último'\r\n }\r\n }\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/utils/DatasourceLanguage.js","export default {\r\n /**\r\n * Find the element value using Recursive Method and return the value rendered if it's defined\r\n * @param obj\r\n * @param column\r\n * @param render\r\n * @returns {*}\r\n */\r\n fetchFromObject(obj, column, render) {\r\n if(typeof obj === 'undefined') return false;\r\n let _index = column.indexOf('.');\r\n if(_index > -1) {\r\n return this.fetchFromObject(obj[column.substring(0, _index)], column.substr(_index + 1));\r\n }\r\n if(typeof render != 'undefined') {\r\n return render(obj[column]);\r\n }\r\n return obj[column];\r\n },\r\n\r\n /**\r\n * Emit event to change page from pagination\r\n * @param page\r\n * @return {void}\r\n */\r\n changePage(page) {\r\n this.selected = null;\r\n this.indexSelected = -1;\r\n this.$emit('change', { perpage: this.perpage, page: page });\r\n },\r\n\r\n /**\r\n * Effect toggle to selected row\r\n * @param row\r\n * @param index\r\n * @return {void}\r\n */\r\n selectRow(row, index) {\r\n if(this.indexSelected == index) {\r\n this.indexSelected = -1;\r\n this.selected = null;\r\n } else {\r\n this.indexSelected = index;\r\n this.selected = {\r\n 'row': row,\r\n 'index': index\r\n };\r\n }\r\n },\r\n\r\n /**\r\n * Computed property: Building custom string information with translation\r\n * @returns {String}\r\n */\r\n tableInfo() {\r\n let label_show = this.translation.pagination.label_show;\r\n let from = (this.pagination.from == null) ? 0 : this.pagination.from;\r\n let label_to = this.translation.pagination.label_to;\r\n let to = (this.pagination.to == null) ? 0 : this.pagination.to;\r\n let label_of = this.translation.pagination.label_of;\r\n let total = this.pagination.total;\r\n let label_entries = this.translation.pagination.label_entries;\r\n\r\n return `${label_show} ${from} ${label_to} ${to} ${label_of} ${total} ${label_entries}`;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/utils/DatasourceUtils.js","module.exports = { \"default\": require(\"core-js/library/fn/json/stringify\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/json/stringify.js\n// module id = 8\n// module chunks = 0","var core = require('../../modules/_core')\n , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify});\nmodule.exports = function stringify(it){ // eslint-disable-line no-unused-vars\n return $JSON.stringify.apply($JSON, arguments);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/fn/json/stringify.js\n// module id = 9\n// module chunks = 0","var core = module.exports = {version: '2.4.0'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_core.js\n// module id = 10\n// module chunks = 0","exports = module.exports = require(\"./../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"\\n.Vue__pagination nav .pagination[data-v-60636b2c] {\\n margin: 10px 0 !important;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-60636b2c&scoped=true!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/components/Pagination.vue\n// module id = 11\n// module chunks = 0","exports = module.exports = require(\"./../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"\\n.vue-datasource .Vue__panel-body[data-v-ea4606ae] {\\n padding: 0;\\n}\\n.vue-datasource .Vue__panel-body .Vue__table[data-v-ea4606ae] {\\n margin-bottom: 0;\\n}\\n.vue-datasource .Vue__panel-footer .Vue__datasource_actions[data-v-ea4606ae] {\\n margin: 10px 0;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-ea4606ae&scoped=true!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/Datasource.vue\n// module id = 12\n// module chunks = 0","var __vue_exports__, __vue_options__\nvar __vue_styles__ = {}\n\n/* styles */\nrequire(\"!!vue-style-loader!css-loader!vue-loader/lib/style-rewriter?id=data-v-ea4606ae&scoped=true!sass-loader!vue-loader/lib/selector?type=styles&index=0!./Datasource.vue\")\n\n/* script */\n__vue_exports__ = require(\"!!babel-loader!vue-loader/lib/selector?type=script&index=0!./Datasource.vue\")\n\n/* template */\nvar __vue_template__ = require(\"!!vue-loader/lib/template-compiler?id=data-v-ea4606ae!vue-loader/lib/selector?type=template&index=0!./Datasource.vue\")\n__vue_options__ = __vue_exports__ = __vue_exports__ || {}\nif (\n typeof __vue_exports__.default === \"object\" ||\n typeof __vue_exports__.default === \"function\"\n) {\n__vue_options__ = __vue_exports__ = __vue_exports__.default\n}\nif (typeof __vue_options__ === \"function\") {\n __vue_options__ = __vue_options__.options\n}\n\n__vue_options__.render = __vue_template__.render\n__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\n__vue_options__._scopeId = \"data-v-ea4606ae\"\n\nmodule.exports = __vue_exports__\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Datasource.vue\n// module id = 13\n// module chunks = 0","var __vue_exports__, __vue_options__\nvar __vue_styles__ = {}\n\n/* styles */\nrequire(\"!!vue-style-loader!css-loader!vue-loader/lib/style-rewriter?id=data-v-60636b2c&scoped=true!sass-loader!vue-loader/lib/selector?type=styles&index=0!./Pagination.vue\")\n\n/* script */\n__vue_exports__ = require(\"!!babel-loader!vue-loader/lib/selector?type=script&index=0!./Pagination.vue\")\n\n/* template */\nvar __vue_template__ = require(\"!!vue-loader/lib/template-compiler?id=data-v-60636b2c!vue-loader/lib/selector?type=template&index=0!./Pagination.vue\")\n__vue_options__ = __vue_exports__ = __vue_exports__ || {}\nif (\n typeof __vue_exports__.default === \"object\" ||\n typeof __vue_exports__.default === \"function\"\n) {\n__vue_options__ = __vue_exports__ = __vue_exports__.default\n}\nif (typeof __vue_options__ === \"function\") {\n __vue_options__ = __vue_options__.options\n}\n\n__vue_options__.render = __vue_template__.render\n__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\n__vue_options__._scopeId = \"data-v-60636b2c\"\n\nmodule.exports = __vue_exports__\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/Pagination.vue\n// module id = 14\n// module chunks = 0","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"Vue__pagination\"\n }, [_c('nav', {\n attrs: {\n \"aria-label\": \"Page navigation\"\n }\n }, [_c('ul', {\n staticClass: \"pagination\"\n }, [_c('li', {\n class: (_vm.pages.current_page == 1) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.firstPage($event)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.btn_first))])]), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == 1) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\",\n \"aria-label\": \"Previous\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.previous($event)\n }\n }\n }, [_c('span', {\n attrs: {\n \"aria-hidden\": \"true\"\n }\n }, [_vm._v(\"«\")])])]), _vm._v(\" \"), _vm._l((_vm.items), function(n) {\n return _c('li', {\n class: (_vm.pages.current_page == n) ? 'active' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.change(n)\n }\n }\n }, [_vm._v(_vm._s(n))])])\n }), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == _vm.pages.last_page) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\",\n \"aria-label\": \"Next\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.next($event)\n }\n }\n }, [_c('span', {\n attrs: {\n \"aria-hidden\": \"true\"\n }\n }, [_vm._v(\"»\")])])]), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == _vm.pages.last_page) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.lastPage(_vm.pages.last_page)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.btn_last))])])], 2)])])\n},staticRenderFns: []}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler.js?id=data-v-60636b2c!./~/vue-loader/lib/selector.js?type=template&index=0!./src/components/Pagination.vue\n// module id = 15\n// module chunks = 0","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"vue-datasource\"\n }, [_c('div', {\n staticClass: \"panel panel-default\"\n }, [_c('div', {\n staticClass: \"panel-heading\"\n }, [_c('div', {\n staticClass: \"form-inline\"\n }, [_c('div', {\n staticClass: \"form-group pull-left\"\n }, [_c('label', {\n staticClass: \"control-label pr2\"\n }, [_vm._v(_vm._s(_vm.translation.table.label_limits))]), _vm._v(\" \"), _c('select', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.perpage),\n expression: \"perpage\"\n }],\n staticClass: \"form-control\",\n attrs: {\n \"number\": \"\"\n },\n on: {\n \"change\": function($event) {\n _vm.perpage = Array.prototype.filter.call($event.target.options, function(o) {\n return o.selected\n }).map(function(o) {\n var val = \"_value\" in o ? o._value : o.value;\n return val\n })[0]\n }\n }\n }, _vm._l((_vm.limits), function(limit) {\n return _c('option', {\n domProps: {\n \"value\": limit\n }\n }, [_vm._v(_vm._s(limit))])\n }))]), _vm._v(\" \"), _c('div', {\n staticClass: \"form-group pull-right\"\n }, [_c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.search),\n expression: \"search\"\n }],\n staticClass: \"form-control\",\n attrs: {\n \"type\": \"text\",\n \"placeholder\": _vm.translation.table.placeholder_search\n },\n domProps: {\n \"value\": _vm._s(_vm.search)\n },\n on: {\n \"input\": function($event) {\n if ($event.target.composing) { return; }\n _vm.search = $event.target.value\n }\n }\n }), _vm._v(\" \"), _c('button', {\n staticClass: \"btn btn-primary\",\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.searching($event)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.table.label_search))])]), _vm._v(\" \"), _c('div', {\n staticClass: \"clearfix\"\n })])]), _vm._v(\" \"), _c('div', {\n staticClass: \"panel-body Vue__panel-body\"\n }, [_c('table', {\n staticClass: \"table table-striped Vue__table\"\n }, [_c('thead', [_c('tr', _vm._l((_vm.columns), function(column) {\n return _c('th', [_vm._v(_vm._s(column.name))])\n }))]), _vm._v(\" \"), _c('tbody', [(_vm.pagination.total == 0) ? _c('tr', [_c('td', {\n attrs: {\n \"colspan\": _vm.columns.length\n }\n }, [_vm._v(_vm._s(_vm.translation.table.records_not_found))])]) : _vm._l((_vm.tableData), function(row, index) {\n return _c('tr', {\n class: {\n 'success': (index == _vm.indexSelected)\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.selectRow(row, index)\n }\n }\n }, _vm._l((_vm.columns), function(k) {\n return _c('td', [_vm._v(\"\\n \" + _vm._s(_vm.fetchFromObject(row, k.key, k.render)) + \"\\n \")])\n }))\n }), _vm._v(\" \"), _c('tr', [_c('td', {\n staticClass: \"text-center\",\n attrs: {\n \"colspan\": _vm.columns.length\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.tableInfo) + \"\\n \")])])], 2)])]), _vm._v(\" \"), _c('div', {\n staticClass: \"panel-footer Vue__panel-footer\"\n }, [_c('div', {\n staticClass: \"pull-left\"\n }, [_c('div', {\n staticClass: \"btn-group Vue__datasource_actions\"\n }, _vm._l((_vm.actions), function(btn) {\n return _c('button', {\n staticClass: \"btn btn-default\",\n class: btn.class,\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": function($event) {\n btn.event($event, _vm.selected)\n }\n }\n }, [(btn.icon) ? _c('i', {\n staticClass: \"pr1\",\n class: btn.icon\n }) : _vm._e(), _vm._v(\"\\n \" + _vm._s(btn.text) + \"\\n \")])\n }))]), _vm._v(\" \"), _c('div', {\n staticClass: \"pull-right\"\n }, [_c('pagination', {\n attrs: {\n \"pages\": _vm.pagination,\n \"translation\": _vm.translation.pagination\n },\n on: {\n \"change\": _vm.changePage\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"clearfix\"\n })])])])\n},staticRenderFns: []}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler.js?id=data-v-ea4606ae!./~/vue-loader/lib/selector.js?type=template&index=0!./src/Datasource.vue\n// module id = 16\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a \n\n\n// WEBPACK FOOTER //\n// Datasource.vue?28dd5f97","\n \n\n\n\n\n\n// WEBPACK FOOTER //\n// Pagination.vue?633c2b7c","import Vue from 'vue/dist/vue.js';\nimport Datasource from './Datasource.vue';\n\nvar data = {\n \"pagination\": {\n \"total\": 4,\n \"per_page\": 15,\n \"current_page\": 1,\n \"last_page\": 1,\n \"next_page_url\": null,\n \"prev_page_url\": null,\n \"from\": 1,\n \"to\": 4\n },\n \"data\": [\n {\n \"id_grupo\": 1,\n \"tipo_grupo\": \"1\",\n \"nombre_grupo\": \"All\",\n \"estado_grupo\": \"1\",\n \"created_at\": \"2016-12-06 14:18:54\",\n \"updated_at\": \"2016-12-06 14:18:54\",\n \"deleted_at\": null,\n \"detalle_grupos_count\": \"4\"\n },\n {\n \"id_grupo\": 2,\n \"tipo_grupo\": \"1\",\n \"nombre_grupo\": \"Ladies\",\n \"estado_grupo\": \"1\",\n \"created_at\": \"2016-12-06 14:18:54\",\n \"updated_at\": \"2016-12-06 14:18:54\",\n \"deleted_at\": null,\n \"detalle_grupos_count\": \"1\"\n },\n {\n \"id_grupo\": 3,\n \"tipo_grupo\": \"2\",\n \"nombre_grupo\": \"Mens\",\n \"estado_grupo\": \"2\",\n \"created_at\": \"2016-12-06 14:18:54\",\n \"updated_at\": \"2016-12-06 14:18:54\",\n \"deleted_at\": null,\n \"detalle_grupos_count\": \"3\"\n },\n {\n \"id_grupo\": 4,\n \"tipo_grupo\": \"1\",\n \"nombre_grupo\": \"Chiefs\",\n \"estado_grupo\": \"1\",\n \"created_at\": \"2016-12-06 14:18:54\",\n \"updated_at\": \"2016-12-06 14:18:54\",\n \"deleted_at\": null,\n \"detalle_grupos_count\": \"1\"\n },\n {\n \"id_grupo\": 5,\n \"tipo_grupo\": \"2\",\n \"nombre_grupo\": \"Operators\",\n \"estado_grupo\": \"1\",\n \"created_at\": \"2016-12-06 14:18:54\",\n \"updated_at\": \"2016-12-06 14:18:54\",\n \"deleted_at\": null,\n \"detalle_grupos_count\": \"1\"\n }\n ]\n};\n\nnew Vue({\n el: '#app',\n components: {\n Datasource\n },\n data() {\n return {\n groups: {\n pagination: {},\n data: []\n },\n columns: [\n {\n name: 'Id',\n key: 'id_grupo',\n filter: false,\n render(value) {\n return `# ${value}`;\n }\n },\n {\n name: 'Name',\n key: 'nombre_grupo',\n filter: false\n },\n {\n name: 'Type',\n key: 'tipo_grupo',\n filter: false,\n render(value) {\n switch (value) {\n case '1':\n return 'Global';\n break;\n case '2':\n return 'General';\n break;\n case '3':\n return 'Personal';\n break;\n }\n }\n },\n {\n name: 'Total',\n key: 'detalle_grupos_count',\n filter: false,\n },\n {\n name: 'Date',\n key: 'created_at',\n filter: false\n },\n ],\n actions: [\n {\n text: 'Edit',\n icon: 'glyphicon glyphicon-pencil',\n class: 'btn-primary',\n event(e, row) {\n console.warn('Did clicked me?', e);\n if (row == null) {\n console.info('Ups.. data not found :(')\n } else {\n console.info('Yeeei, I found this :)', JSON.stringify(row));\n }\n }\n },\n {\n text: 'Delete',\n icon: 'glyphicon glyphicon-trash',\n class: 'btn-danger',\n event(e, row) {\n console.warn('Are you clicked me?', e);\n if (row == null) {\n console.info('Ups.. data not found :(')\n } else {\n console.info('Yeeei, I found this :)', JSON.stringify(row));\n }\n }\n },\n {\n text: 'Show',\n icon: 'glyphicon glyphicon-eye-open',\n class: 'btn-info',\n event(e, row) {\n console.warn('Are you clicked me?', e);\n if (row == null) {\n console.info('Ups.. data not found :(')\n } else {\n console.info('Yeeei, I found this :)', JSON.stringify(row));\n }\n }\n }\n ]\n }\n },\n mounted() {\n this.groups = data;\n },\n methods: {\n changePage(values) {\n alert(`Show limit changed, the new limit is ${values.perpage} and the current page is ${values.page}`);\n },\n onSearch(searchQuery) {\n alert(`Did you find this? ${searchQuery}`);\n }\n }\n});\n\n\n// WEBPACK FOOTER //\n// ./src/example.js","export default {\n translations: {\n // English translation\n 'en': {\n 'table': {\n 'label_limits': 'Show',\n 'label_search': 'Search',\n 'placeholder_search': 'Type to search..',\n 'records_not_found': 'No records found'\n },\n 'pagination': {\n 'label_show': 'Showing',\n 'label_to': 'to',\n 'label_of': 'of',\n 'label_entries': 'entries',\n 'btn_first': 'First',\n 'btn_last': 'Latest'\n }\n },\n // Spanish translation\n 'es': {\n 'table': {\n 'label_limits': 'Mostrar',\n 'label_search': 'Buscar',\n 'placeholder_search': 'Buscar ..',\n 'records_not_found': 'No se encontraron registros.'\n },\n 'pagination': {\n 'label_show': 'Mostrando',\n 'label_to': 'a',\n 'label_of': 'de',\n 'label_entries': 'registros',\n 'btn_first': 'Primero',\n 'btn_last': 'Último'\n }\n }\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/utils/DatasourceLanguage.js","export default {\n /**\n * Find the element value using Recursive Method and return the value rendered if it's defined\n * @param obj\n * @param column\n * @param render\n * @returns {*}\n */\n fetchFromObject(obj, column, render) {\n if (typeof obj === 'undefined') return false;\n let _index = column.indexOf('.');\n if (_index > -1) {\n return this.fetchFromObject(obj[column.substring(0, _index)], column.substr(_index + 1));\n }\n if (typeof render != 'undefined') {\n return render(obj[column]);\n }\n return obj[column];\n },\n\n /**\n * Emit event to change page from pagination\n * @param page\n * @return {void}\n */\n changePage(page) {\n this.selected = null;\n this.indexSelected = -1;\n this.$emit('change', {perpage: this.perpage, page: page});\n },\n\n /**\n * Effect toggle to selected row\n * @param row\n * @param index\n * @return {void}\n */\n selectRow(row, index) {\n if (this.indexSelected == index) {\n this.indexSelected = -1;\n this.selected = null;\n } else {\n this.indexSelected = index;\n this.selected = {\n 'row': row,\n 'index': index\n };\n }\n },\n\n /**\n * Computed property: Building custom string information with translation\n * @returns {String}\n */\n tableInfo() {\n let label_show = this.translation.pagination.label_show;\n let from = (this.pagination.from == null) ? 0 : this.pagination.from;\n let label_to = this.translation.pagination.label_to;\n let to = (this.pagination.to == null) ? 0 : this.pagination.to;\n let label_of = this.translation.pagination.label_of;\n let total = this.pagination.total;\n let label_entries = this.translation.pagination.label_entries;\n\n return `${label_show} ${from} ${label_to} ${to} ${label_of} ${total} ${label_entries}`;\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/utils/DatasourceUtils.js","module.exports = { \"default\": require(\"core-js/library/fn/json/stringify\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-runtime/core-js/json/stringify.js\n// module id = 8\n// module chunks = 0","var core = require('../../modules/_core')\n , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify});\nmodule.exports = function stringify(it){ // eslint-disable-line no-unused-vars\n return $JSON.stringify.apply($JSON, arguments);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/fn/json/stringify.js\n// module id = 9\n// module chunks = 0","var core = module.exports = {version: '2.4.0'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/core-js/library/modules/_core.js\n// module id = 10\n// module chunks = 0","exports = module.exports = require(\"./../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"\\n.vue-datasource .Vue__panel-body[data-v-49bf9548] {\\n padding: 0;\\n}\\n.vue-datasource .Vue__panel-body .Vue__table[data-v-49bf9548] {\\n margin-bottom: 0;\\n}\\n.vue-datasource .Vue__panel-footer .Vue__datasource_actions[data-v-49bf9548] {\\n margin: 10px 0;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-49bf9548&scoped=true!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/Datasource.vue\n// module id = 11\n// module chunks = 0","exports = module.exports = require(\"./../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"\\n.Vue__pagination nav .pagination[data-v-6bdbb1a8] {\\n margin: 10px 0 !important;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-6bdbb1a8&scoped=true!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/components/Pagination.vue\n// module id = 12\n// module chunks = 0","var __vue_exports__, __vue_options__\nvar __vue_styles__ = {}\n\n/* styles */\nrequire(\"!!vue-style-loader!css-loader!vue-loader/lib/style-rewriter?id=data-v-49bf9548&scoped=true!sass-loader!vue-loader/lib/selector?type=styles&index=0!./Datasource.vue\")\n\n/* script */\n__vue_exports__ = require(\"!!babel-loader!vue-loader/lib/selector?type=script&index=0!./Datasource.vue\")\n\n/* template */\nvar __vue_template__ = require(\"!!vue-loader/lib/template-compiler?id=data-v-49bf9548!vue-loader/lib/selector?type=template&index=0!./Datasource.vue\")\n__vue_options__ = __vue_exports__ = __vue_exports__ || {}\nif (\n typeof __vue_exports__.default === \"object\" ||\n typeof __vue_exports__.default === \"function\"\n) {\n__vue_options__ = __vue_exports__ = __vue_exports__.default\n}\nif (typeof __vue_options__ === \"function\") {\n __vue_options__ = __vue_options__.options\n}\n\n__vue_options__.render = __vue_template__.render\n__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\n__vue_options__._scopeId = \"data-v-49bf9548\"\n\nmodule.exports = __vue_exports__\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Datasource.vue\n// module id = 13\n// module chunks = 0","var __vue_exports__, __vue_options__\nvar __vue_styles__ = {}\n\n/* styles */\nrequire(\"!!vue-style-loader!css-loader!vue-loader/lib/style-rewriter?id=data-v-6bdbb1a8&scoped=true!sass-loader!vue-loader/lib/selector?type=styles&index=0!./Pagination.vue\")\n\n/* script */\n__vue_exports__ = require(\"!!babel-loader!vue-loader/lib/selector?type=script&index=0!./Pagination.vue\")\n\n/* template */\nvar __vue_template__ = require(\"!!vue-loader/lib/template-compiler?id=data-v-6bdbb1a8!vue-loader/lib/selector?type=template&index=0!./Pagination.vue\")\n__vue_options__ = __vue_exports__ = __vue_exports__ || {}\nif (\n typeof __vue_exports__.default === \"object\" ||\n typeof __vue_exports__.default === \"function\"\n) {\n__vue_options__ = __vue_exports__ = __vue_exports__.default\n}\nif (typeof __vue_options__ === \"function\") {\n __vue_options__ = __vue_options__.options\n}\n\n__vue_options__.render = __vue_template__.render\n__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\n__vue_options__._scopeId = \"data-v-6bdbb1a8\"\n\nmodule.exports = __vue_exports__\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/Pagination.vue\n// module id = 14\n// module chunks = 0","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"vue-datasource\"\n }, [_c('div', {\n staticClass: \"panel panel-default\"\n }, [_c('div', {\n staticClass: \"panel-heading\"\n }, [_c('div', {\n staticClass: \"form-inline\"\n }, [_c('div', {\n staticClass: \"form-group pull-left\"\n }, [_c('label', {\n staticClass: \"control-label pr2\"\n }, [_vm._v(_vm._s(_vm.translation.table.label_limits))]), _vm._v(\" \"), _c('select', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.perpage),\n expression: \"perpage\"\n }],\n staticClass: \"form-control\",\n attrs: {\n \"number\": \"\"\n },\n on: {\n \"change\": function($event) {\n _vm.perpage = Array.prototype.filter.call($event.target.options, function(o) {\n return o.selected\n }).map(function(o) {\n var val = \"_value\" in o ? o._value : o.value;\n return val\n })[0]\n }\n }\n }, _vm._l((_vm.limits), function(limit) {\n return _c('option', {\n domProps: {\n \"value\": limit\n }\n }, [_vm._v(_vm._s(limit))])\n }))]), _vm._v(\" \"), _c('div', {\n staticClass: \"form-group pull-right\"\n }, [_c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.search),\n expression: \"search\"\n }],\n staticClass: \"form-control\",\n attrs: {\n \"type\": \"text\",\n \"placeholder\": _vm.translation.table.placeholder_search\n },\n domProps: {\n \"value\": _vm._s(_vm.search)\n },\n on: {\n \"input\": function($event) {\n if ($event.target.composing) { return; }\n _vm.search = $event.target.value\n }\n }\n }), _vm._v(\" \"), _c('button', {\n staticClass: \"btn btn-primary\",\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.searching($event)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.table.label_search) + \"\\n \")])]), _vm._v(\" \"), _c('div', {\n staticClass: \"clearfix\"\n })])]), _vm._v(\" \"), _c('div', {\n staticClass: \"panel-body Vue__panel-body\"\n }, [_c('table', {\n staticClass: \"table table-striped Vue__table\"\n }, [_c('thead', [_c('tr', _vm._l((_vm.columns), function(column) {\n return _c('th', [_vm._v(_vm._s(column.name))])\n }))]), _vm._v(\" \"), _c('tbody', [(_vm.pagination.total == 0) ? _c('tr', [_c('td', {\n attrs: {\n \"colspan\": _vm.columns.length\n }\n }, [_vm._v(_vm._s(_vm.translation.table.records_not_found))])]) : _vm._l((_vm.tableData), function(row, index) {\n return _c('tr', {\n class: {\n 'success': (index == _vm.indexSelected)\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.selectRow(row, index)\n }\n }\n }, _vm._l((_vm.columns), function(k) {\n return _c('td', [_vm._v(\"\\n \" + _vm._s(_vm.fetchFromObject(row, k.key, k.render)) + \"\\n \")])\n }))\n }), _vm._v(\" \"), _c('tr', [_c('td', {\n staticClass: \"text-center\",\n attrs: {\n \"colspan\": _vm.columns.length\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.tableInfo) + \"\\n \")])])], 2)])]), _vm._v(\" \"), _c('div', {\n staticClass: \"panel-footer Vue__panel-footer\"\n }, [_c('div', {\n staticClass: \"pull-left\"\n }, [_c('div', {\n staticClass: \"btn-group Vue__datasource_actions\"\n }, _vm._l((_vm.actions), function(btn) {\n return _c('button', {\n staticClass: \"btn btn-default\",\n class: btn.class,\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": function($event) {\n btn.event($event, _vm.selected)\n }\n }\n }, [(btn.icon) ? _c('i', {\n staticClass: \"pr1\",\n class: btn.icon\n }) : _vm._e(), _vm._v(\"\\n \" + _vm._s(btn.text) + \"\\n \")])\n }))]), _vm._v(\" \"), _c('div', {\n staticClass: \"pull-right\"\n }, [_c('pagination', {\n attrs: {\n \"pages\": _vm.pagination,\n \"translation\": _vm.translation.pagination\n },\n on: {\n \"change\": _vm.changePage\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"clearfix\"\n })])])])\n},staticRenderFns: []}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler.js?id=data-v-49bf9548!./~/vue-loader/lib/selector.js?type=template&index=0!./src/Datasource.vue\n// module id = 15\n// module chunks = 0","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"Vue__pagination\"\n }, [_c('nav', {\n attrs: {\n \"aria-label\": \"Page navigation\"\n }\n }, [_c('ul', {\n staticClass: \"pagination\"\n }, [_c('li', {\n class: (_vm.pages.current_page == 1) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.firstPage($event)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.btn_first))])]), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == 1) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\",\n \"aria-label\": \"Previous\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.previous($event)\n }\n }\n }, [_c('span', {\n attrs: {\n \"aria-hidden\": \"true\"\n }\n }, [_vm._v(\"«\")])])]), _vm._v(\" \"), _vm._l((_vm.items), function(n) {\n return _c('li', {\n class: (_vm.pages.current_page == n) ? 'active' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.change(n)\n }\n }\n }, [_vm._v(_vm._s(n))])])\n }), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == _vm.pages.last_page) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\",\n \"aria-label\": \"Next\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.next($event)\n }\n }\n }, [_c('span', {\n attrs: {\n \"aria-hidden\": \"true\"\n }\n }, [_vm._v(\"»\")])])]), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == _vm.pages.last_page) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.lastPage(_vm.pages.last_page)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.btn_last))])])], 2)])])\n},staticRenderFns: []}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler.js?id=data-v-6bdbb1a8!./~/vue-loader/lib/selector.js?type=template&index=0!./src/components/Pagination.vue\n// module id = 16\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a \n\n\n// WEBPACK FOOTER //\n// Datasource.vue?1f051aaa","\r\n \r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// Pagination.vue?7ebfad58","export default {\r\n translations: {\r\n // English translation\r\n 'en': {\r\n 'table': {\r\n 'label_limits': 'Show',\r\n 'label_search': 'Search',\r\n 'placeholder_search': 'Type to search..',\r\n 'records_not_found': 'No records found'\r\n },\r\n 'pagination': {\r\n 'label_show': 'Showing',\r\n 'label_to': 'to',\r\n 'label_of': 'of',\r\n 'label_entries': 'entries',\r\n 'btn_first': 'First',\r\n 'btn_last': 'Latest'\r\n }\r\n },\r\n // Spanish translation\r\n 'es': {\r\n 'table': {\r\n 'label_limits': 'Mostrar',\r\n 'label_search': 'Buscar',\r\n 'placeholder_search': 'Buscar ..',\r\n 'records_not_found': 'No se encontraron registros.'\r\n },\r\n 'pagination': {\r\n 'label_show': 'Mostrando',\r\n 'label_to': 'a',\r\n 'label_of': 'de',\r\n 'label_entries': 'registros',\r\n 'btn_first': 'Primero',\r\n 'btn_last': 'Último'\r\n }\r\n }\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/utils/DatasourceLanguage.js","export default {\r\n /**\r\n * Find the element value using Recursive Method and return the value rendered if it's defined\r\n * @param obj\r\n * @param column\r\n * @param render\r\n * @returns {*}\r\n */\r\n fetchFromObject(obj, column, render) {\r\n if(typeof obj === 'undefined') return false;\r\n let _index = column.indexOf('.');\r\n if(_index > -1) {\r\n return this.fetchFromObject(obj[column.substring(0, _index)], column.substr(_index + 1));\r\n }\r\n if(typeof render != 'undefined') {\r\n return render(obj[column]);\r\n }\r\n return obj[column];\r\n },\r\n\r\n /**\r\n * Emit event to change page from pagination\r\n * @param page\r\n * @return {void}\r\n */\r\n changePage(page) {\r\n this.selected = null;\r\n this.indexSelected = -1;\r\n this.$emit('change', { perpage: this.perpage, page: page });\r\n },\r\n\r\n /**\r\n * Effect toggle to selected row\r\n * @param row\r\n * @param index\r\n * @return {void}\r\n */\r\n selectRow(row, index) {\r\n if(this.indexSelected == index) {\r\n this.indexSelected = -1;\r\n this.selected = null;\r\n } else {\r\n this.indexSelected = index;\r\n this.selected = {\r\n 'row': row,\r\n 'index': index\r\n };\r\n }\r\n },\r\n\r\n /**\r\n * Computed property: Building custom string information with translation\r\n * @returns {String}\r\n */\r\n tableInfo() {\r\n let label_show = this.translation.pagination.label_show;\r\n let from = (this.pagination.from == null) ? 0 : this.pagination.from;\r\n let label_to = this.translation.pagination.label_to;\r\n let to = (this.pagination.to == null) ? 0 : this.pagination.to;\r\n let label_of = this.translation.pagination.label_of;\r\n let total = this.pagination.total;\r\n let label_entries = this.translation.pagination.label_entries;\r\n\r\n return `${label_show} ${from} ${label_to} ${to} ${label_of} ${total} ${label_entries}`;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/utils/DatasourceUtils.js","exports = module.exports = require(\"./../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"\\n.Vue__pagination nav .pagination[data-v-60636b2c] {\\n margin: 10px 0 !important;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-60636b2c&scoped=true!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/components/Pagination.vue\n// module id = 7\n// module chunks = 0","exports = module.exports = require(\"./../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"\\n.vue-datasource .Vue__panel-body[data-v-ea4606ae] {\\n padding: 0;\\n}\\n.vue-datasource .Vue__panel-body .Vue__table[data-v-ea4606ae] {\\n margin-bottom: 0;\\n}\\n.vue-datasource .Vue__panel-footer .Vue__datasource_actions[data-v-ea4606ae] {\\n margin: 10px 0;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-ea4606ae&scoped=true!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/Datasource.vue\n// module id = 8\n// module chunks = 0","var __vue_exports__, __vue_options__\nvar __vue_styles__ = {}\n\n/* styles */\nrequire(\"!!vue-style-loader!css-loader!vue-loader/lib/style-rewriter?id=data-v-ea4606ae&scoped=true!sass-loader!vue-loader/lib/selector?type=styles&index=0!./Datasource.vue\")\n\n/* script */\n__vue_exports__ = require(\"!!babel-loader!vue-loader/lib/selector?type=script&index=0!./Datasource.vue\")\n\n/* template */\nvar __vue_template__ = require(\"!!vue-loader/lib/template-compiler?id=data-v-ea4606ae!vue-loader/lib/selector?type=template&index=0!./Datasource.vue\")\n__vue_options__ = __vue_exports__ = __vue_exports__ || {}\nif (\n typeof __vue_exports__.default === \"object\" ||\n typeof __vue_exports__.default === \"function\"\n) {\n__vue_options__ = __vue_exports__ = __vue_exports__.default\n}\nif (typeof __vue_options__ === \"function\") {\n __vue_options__ = __vue_options__.options\n}\n\n__vue_options__.render = __vue_template__.render\n__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\n__vue_options__._scopeId = \"data-v-ea4606ae\"\n\nmodule.exports = __vue_exports__\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Datasource.vue\n// module id = 9\n// module chunks = 0","var __vue_exports__, __vue_options__\nvar __vue_styles__ = {}\n\n/* styles */\nrequire(\"!!vue-style-loader!css-loader!vue-loader/lib/style-rewriter?id=data-v-60636b2c&scoped=true!sass-loader!vue-loader/lib/selector?type=styles&index=0!./Pagination.vue\")\n\n/* script */\n__vue_exports__ = require(\"!!babel-loader!vue-loader/lib/selector?type=script&index=0!./Pagination.vue\")\n\n/* template */\nvar __vue_template__ = require(\"!!vue-loader/lib/template-compiler?id=data-v-60636b2c!vue-loader/lib/selector?type=template&index=0!./Pagination.vue\")\n__vue_options__ = __vue_exports__ = __vue_exports__ || {}\nif (\n typeof __vue_exports__.default === \"object\" ||\n typeof __vue_exports__.default === \"function\"\n) {\n__vue_options__ = __vue_exports__ = __vue_exports__.default\n}\nif (typeof __vue_options__ === \"function\") {\n __vue_options__ = __vue_options__.options\n}\n\n__vue_options__.render = __vue_template__.render\n__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\n__vue_options__._scopeId = \"data-v-60636b2c\"\n\nmodule.exports = __vue_exports__\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/Pagination.vue\n// module id = 10\n// module chunks = 0","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"Vue__pagination\"\n }, [_c('nav', {\n attrs: {\n \"aria-label\": \"Page navigation\"\n }\n }, [_c('ul', {\n staticClass: \"pagination\"\n }, [_c('li', {\n class: (_vm.pages.current_page == 1) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.firstPage($event)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.btn_first))])]), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == 1) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\",\n \"aria-label\": \"Previous\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.previous($event)\n }\n }\n }, [_c('span', {\n attrs: {\n \"aria-hidden\": \"true\"\n }\n }, [_vm._v(\"«\")])])]), _vm._v(\" \"), _vm._l((_vm.items), function(n) {\n return _c('li', {\n class: (_vm.pages.current_page == n) ? 'active' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.change(n)\n }\n }\n }, [_vm._v(_vm._s(n))])])\n }), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == _vm.pages.last_page) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\",\n \"aria-label\": \"Next\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.next($event)\n }\n }\n }, [_c('span', {\n attrs: {\n \"aria-hidden\": \"true\"\n }\n }, [_vm._v(\"»\")])])]), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == _vm.pages.last_page) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.lastPage(_vm.pages.last_page)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.btn_last))])])], 2)])])\n},staticRenderFns: []}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler.js?id=data-v-60636b2c!./~/vue-loader/lib/selector.js?type=template&index=0!./src/components/Pagination.vue\n// module id = 11\n// module chunks = 0","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"vue-datasource\"\n }, [_c('div', {\n staticClass: \"panel panel-default\"\n }, [_c('div', {\n staticClass: \"panel-heading\"\n }, [_c('div', {\n staticClass: \"form-inline\"\n }, [_c('div', {\n staticClass: \"form-group pull-left\"\n }, [_c('label', {\n staticClass: \"control-label pr2\"\n }, [_vm._v(_vm._s(_vm.translation.table.label_limits))]), _vm._v(\" \"), _c('select', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.perpage),\n expression: \"perpage\"\n }],\n staticClass: \"form-control\",\n attrs: {\n \"number\": \"\"\n },\n on: {\n \"change\": function($event) {\n _vm.perpage = Array.prototype.filter.call($event.target.options, function(o) {\n return o.selected\n }).map(function(o) {\n var val = \"_value\" in o ? o._value : o.value;\n return val\n })[0]\n }\n }\n }, _vm._l((_vm.limits), function(limit) {\n return _c('option', {\n domProps: {\n \"value\": limit\n }\n }, [_vm._v(_vm._s(limit))])\n }))]), _vm._v(\" \"), _c('div', {\n staticClass: \"form-group pull-right\"\n }, [_c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.search),\n expression: \"search\"\n }],\n staticClass: \"form-control\",\n attrs: {\n \"type\": \"text\",\n \"placeholder\": _vm.translation.table.placeholder_search\n },\n domProps: {\n \"value\": _vm._s(_vm.search)\n },\n on: {\n \"input\": function($event) {\n if ($event.target.composing) { return; }\n _vm.search = $event.target.value\n }\n }\n }), _vm._v(\" \"), _c('button', {\n staticClass: \"btn btn-primary\",\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.searching($event)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.table.label_search))])]), _vm._v(\" \"), _c('div', {\n staticClass: \"clearfix\"\n })])]), _vm._v(\" \"), _c('div', {\n staticClass: \"panel-body Vue__panel-body\"\n }, [_c('table', {\n staticClass: \"table table-striped Vue__table\"\n }, [_c('thead', [_c('tr', _vm._l((_vm.columns), function(column) {\n return _c('th', [_vm._v(_vm._s(column.name))])\n }))]), _vm._v(\" \"), _c('tbody', [(_vm.pagination.total == 0) ? _c('tr', [_c('td', {\n attrs: {\n \"colspan\": _vm.columns.length\n }\n }, [_vm._v(_vm._s(_vm.translation.table.records_not_found))])]) : _vm._l((_vm.tableData), function(row, index) {\n return _c('tr', {\n class: {\n 'success': (index == _vm.indexSelected)\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.selectRow(row, index)\n }\n }\n }, _vm._l((_vm.columns), function(k) {\n return _c('td', [_vm._v(\"\\n \" + _vm._s(_vm.fetchFromObject(row, k.key, k.render)) + \"\\n \")])\n }))\n }), _vm._v(\" \"), _c('tr', [_c('td', {\n staticClass: \"text-center\",\n attrs: {\n \"colspan\": _vm.columns.length\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.tableInfo) + \"\\n \")])])], 2)])]), _vm._v(\" \"), _c('div', {\n staticClass: \"panel-footer Vue__panel-footer\"\n }, [_c('div', {\n staticClass: \"pull-left\"\n }, [_c('div', {\n staticClass: \"btn-group Vue__datasource_actions\"\n }, _vm._l((_vm.actions), function(btn) {\n return _c('button', {\n staticClass: \"btn btn-default\",\n class: btn.class,\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": function($event) {\n btn.event($event, _vm.selected)\n }\n }\n }, [(btn.icon) ? _c('i', {\n staticClass: \"pr1\",\n class: btn.icon\n }) : _vm._e(), _vm._v(\"\\n \" + _vm._s(btn.text) + \"\\n \")])\n }))]), _vm._v(\" \"), _c('div', {\n staticClass: \"pull-right\"\n }, [_c('pagination', {\n attrs: {\n \"pages\": _vm.pagination,\n \"translation\": _vm.translation.pagination\n },\n on: {\n \"change\": _vm.changePage\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"clearfix\"\n })])])])\n},staticRenderFns: []}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler.js?id=data-v-ea4606ae!./~/vue-loader/lib/selector.js?type=template&index=0!./src/Datasource.vue\n// module id = 12\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a \n\n\n// WEBPACK FOOTER //\n// Datasource.vue?28dd5f97","\n \n\n\n\n\n\n// WEBPACK FOOTER //\n// Pagination.vue?633c2b7c","export default {\n translations: {\n // English translation\n 'en': {\n 'table': {\n 'label_limits': 'Show',\n 'label_search': 'Search',\n 'placeholder_search': 'Type to search..',\n 'records_not_found': 'No records found'\n },\n 'pagination': {\n 'label_show': 'Showing',\n 'label_to': 'to',\n 'label_of': 'of',\n 'label_entries': 'entries',\n 'btn_first': 'First',\n 'btn_last': 'Latest'\n }\n },\n // Spanish translation\n 'es': {\n 'table': {\n 'label_limits': 'Mostrar',\n 'label_search': 'Buscar',\n 'placeholder_search': 'Buscar ..',\n 'records_not_found': 'No se encontraron registros.'\n },\n 'pagination': {\n 'label_show': 'Mostrando',\n 'label_to': 'a',\n 'label_of': 'de',\n 'label_entries': 'registros',\n 'btn_first': 'Primero',\n 'btn_last': 'Último'\n }\n }\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/utils/DatasourceLanguage.js","export default {\n /**\n * Find the element value using Recursive Method and return the value rendered if it's defined\n * @param obj\n * @param column\n * @param render\n * @returns {*}\n */\n fetchFromObject(obj, column, render) {\n if (typeof obj === 'undefined') return false;\n let _index = column.indexOf('.');\n if (_index > -1) {\n return this.fetchFromObject(obj[column.substring(0, _index)], column.substr(_index + 1));\n }\n if (typeof render != 'undefined') {\n return render(obj[column]);\n }\n return obj[column];\n },\n\n /**\n * Emit event to change page from pagination\n * @param page\n * @return {void}\n */\n changePage(page) {\n this.selected = null;\n this.indexSelected = -1;\n this.$emit('change', {perpage: this.perpage, page: page});\n },\n\n /**\n * Effect toggle to selected row\n * @param row\n * @param index\n * @return {void}\n */\n selectRow(row, index) {\n if (this.indexSelected == index) {\n this.indexSelected = -1;\n this.selected = null;\n } else {\n this.indexSelected = index;\n this.selected = {\n 'row': row,\n 'index': index\n };\n }\n },\n\n /**\n * Computed property: Building custom string information with translation\n * @returns {String}\n */\n tableInfo() {\n let label_show = this.translation.pagination.label_show;\n let from = (this.pagination.from == null) ? 0 : this.pagination.from;\n let label_to = this.translation.pagination.label_to;\n let to = (this.pagination.to == null) ? 0 : this.pagination.to;\n let label_of = this.translation.pagination.label_of;\n let total = this.pagination.total;\n let label_entries = this.translation.pagination.label_entries;\n\n return `${label_show} ${from} ${label_to} ${to} ${label_of} ${total} ${label_entries}`;\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/utils/DatasourceUtils.js","exports = module.exports = require(\"./../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"\\n.vue-datasource .Vue__panel-body[data-v-49bf9548] {\\n padding: 0;\\n}\\n.vue-datasource .Vue__panel-body .Vue__table[data-v-49bf9548] {\\n margin-bottom: 0;\\n}\\n.vue-datasource .Vue__panel-footer .Vue__datasource_actions[data-v-49bf9548] {\\n margin: 10px 0;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-49bf9548&scoped=true!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/Datasource.vue\n// module id = 7\n// module chunks = 0","exports = module.exports = require(\"./../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"\\n.Vue__pagination nav .pagination[data-v-6bdbb1a8] {\\n margin: 10px 0 !important;\\n}\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-6bdbb1a8&scoped=true!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/components/Pagination.vue\n// module id = 8\n// module chunks = 0","var __vue_exports__, __vue_options__\nvar __vue_styles__ = {}\n\n/* styles */\nrequire(\"!!vue-style-loader!css-loader!vue-loader/lib/style-rewriter?id=data-v-49bf9548&scoped=true!sass-loader!vue-loader/lib/selector?type=styles&index=0!./Datasource.vue\")\n\n/* script */\n__vue_exports__ = require(\"!!babel-loader!vue-loader/lib/selector?type=script&index=0!./Datasource.vue\")\n\n/* template */\nvar __vue_template__ = require(\"!!vue-loader/lib/template-compiler?id=data-v-49bf9548!vue-loader/lib/selector?type=template&index=0!./Datasource.vue\")\n__vue_options__ = __vue_exports__ = __vue_exports__ || {}\nif (\n typeof __vue_exports__.default === \"object\" ||\n typeof __vue_exports__.default === \"function\"\n) {\n__vue_options__ = __vue_exports__ = __vue_exports__.default\n}\nif (typeof __vue_options__ === \"function\") {\n __vue_options__ = __vue_options__.options\n}\n\n__vue_options__.render = __vue_template__.render\n__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\n__vue_options__._scopeId = \"data-v-49bf9548\"\n\nmodule.exports = __vue_exports__\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Datasource.vue\n// module id = 9\n// module chunks = 0","var __vue_exports__, __vue_options__\nvar __vue_styles__ = {}\n\n/* styles */\nrequire(\"!!vue-style-loader!css-loader!vue-loader/lib/style-rewriter?id=data-v-6bdbb1a8&scoped=true!sass-loader!vue-loader/lib/selector?type=styles&index=0!./Pagination.vue\")\n\n/* script */\n__vue_exports__ = require(\"!!babel-loader!vue-loader/lib/selector?type=script&index=0!./Pagination.vue\")\n\n/* template */\nvar __vue_template__ = require(\"!!vue-loader/lib/template-compiler?id=data-v-6bdbb1a8!vue-loader/lib/selector?type=template&index=0!./Pagination.vue\")\n__vue_options__ = __vue_exports__ = __vue_exports__ || {}\nif (\n typeof __vue_exports__.default === \"object\" ||\n typeof __vue_exports__.default === \"function\"\n) {\n__vue_options__ = __vue_exports__ = __vue_exports__.default\n}\nif (typeof __vue_options__ === \"function\") {\n __vue_options__ = __vue_options__.options\n}\n\n__vue_options__.render = __vue_template__.render\n__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\n__vue_options__._scopeId = \"data-v-6bdbb1a8\"\n\nmodule.exports = __vue_exports__\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/Pagination.vue\n// module id = 10\n// module chunks = 0","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"vue-datasource\"\n }, [_c('div', {\n staticClass: \"panel panel-default\"\n }, [_c('div', {\n staticClass: \"panel-heading\"\n }, [_c('div', {\n staticClass: \"form-inline\"\n }, [_c('div', {\n staticClass: \"form-group pull-left\"\n }, [_c('label', {\n staticClass: \"control-label pr2\"\n }, [_vm._v(_vm._s(_vm.translation.table.label_limits))]), _vm._v(\" \"), _c('select', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.perpage),\n expression: \"perpage\"\n }],\n staticClass: \"form-control\",\n attrs: {\n \"number\": \"\"\n },\n on: {\n \"change\": function($event) {\n _vm.perpage = Array.prototype.filter.call($event.target.options, function(o) {\n return o.selected\n }).map(function(o) {\n var val = \"_value\" in o ? o._value : o.value;\n return val\n })[0]\n }\n }\n }, _vm._l((_vm.limits), function(limit) {\n return _c('option', {\n domProps: {\n \"value\": limit\n }\n }, [_vm._v(_vm._s(limit))])\n }))]), _vm._v(\" \"), _c('div', {\n staticClass: \"form-group pull-right\"\n }, [_c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.search),\n expression: \"search\"\n }],\n staticClass: \"form-control\",\n attrs: {\n \"type\": \"text\",\n \"placeholder\": _vm.translation.table.placeholder_search\n },\n domProps: {\n \"value\": _vm._s(_vm.search)\n },\n on: {\n \"input\": function($event) {\n if ($event.target.composing) { return; }\n _vm.search = $event.target.value\n }\n }\n }), _vm._v(\" \"), _c('button', {\n staticClass: \"btn btn-primary\",\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.searching($event)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.table.label_search) + \"\\n \")])]), _vm._v(\" \"), _c('div', {\n staticClass: \"clearfix\"\n })])]), _vm._v(\" \"), _c('div', {\n staticClass: \"panel-body Vue__panel-body\"\n }, [_c('table', {\n staticClass: \"table table-striped Vue__table\"\n }, [_c('thead', [_c('tr', _vm._l((_vm.columns), function(column) {\n return _c('th', [_vm._v(_vm._s(column.name))])\n }))]), _vm._v(\" \"), _c('tbody', [(_vm.pagination.total == 0) ? _c('tr', [_c('td', {\n attrs: {\n \"colspan\": _vm.columns.length\n }\n }, [_vm._v(_vm._s(_vm.translation.table.records_not_found))])]) : _vm._l((_vm.tableData), function(row, index) {\n return _c('tr', {\n class: {\n 'success': (index == _vm.indexSelected)\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.selectRow(row, index)\n }\n }\n }, _vm._l((_vm.columns), function(k) {\n return _c('td', [_vm._v(\"\\n \" + _vm._s(_vm.fetchFromObject(row, k.key, k.render)) + \"\\n \")])\n }))\n }), _vm._v(\" \"), _c('tr', [_c('td', {\n staticClass: \"text-center\",\n attrs: {\n \"colspan\": _vm.columns.length\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.tableInfo) + \"\\n \")])])], 2)])]), _vm._v(\" \"), _c('div', {\n staticClass: \"panel-footer Vue__panel-footer\"\n }, [_c('div', {\n staticClass: \"pull-left\"\n }, [_c('div', {\n staticClass: \"btn-group Vue__datasource_actions\"\n }, _vm._l((_vm.actions), function(btn) {\n return _c('button', {\n staticClass: \"btn btn-default\",\n class: btn.class,\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": function($event) {\n btn.event($event, _vm.selected)\n }\n }\n }, [(btn.icon) ? _c('i', {\n staticClass: \"pr1\",\n class: btn.icon\n }) : _vm._e(), _vm._v(\"\\n \" + _vm._s(btn.text) + \"\\n \")])\n }))]), _vm._v(\" \"), _c('div', {\n staticClass: \"pull-right\"\n }, [_c('pagination', {\n attrs: {\n \"pages\": _vm.pagination,\n \"translation\": _vm.translation.pagination\n },\n on: {\n \"change\": _vm.changePage\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"clearfix\"\n })])])])\n},staticRenderFns: []}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler.js?id=data-v-49bf9548!./~/vue-loader/lib/selector.js?type=template&index=0!./src/Datasource.vue\n// module id = 11\n// module chunks = 0","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"Vue__pagination\"\n }, [_c('nav', {\n attrs: {\n \"aria-label\": \"Page navigation\"\n }\n }, [_c('ul', {\n staticClass: \"pagination\"\n }, [_c('li', {\n class: (_vm.pages.current_page == 1) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.firstPage($event)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.btn_first))])]), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == 1) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\",\n \"aria-label\": \"Previous\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.previous($event)\n }\n }\n }, [_c('span', {\n attrs: {\n \"aria-hidden\": \"true\"\n }\n }, [_vm._v(\"«\")])])]), _vm._v(\" \"), _vm._l((_vm.items), function(n) {\n return _c('li', {\n class: (_vm.pages.current_page == n) ? 'active' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.change(n)\n }\n }\n }, [_vm._v(_vm._s(n))])])\n }), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == _vm.pages.last_page) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\",\n \"aria-label\": \"Next\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.next($event)\n }\n }\n }, [_c('span', {\n attrs: {\n \"aria-hidden\": \"true\"\n }\n }, [_vm._v(\"»\")])])]), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == _vm.pages.last_page) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.lastPage(_vm.pages.last_page)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.btn_last))])])], 2)])])\n},staticRenderFns: []}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler.js?id=data-v-6bdbb1a8!./~/vue-loader/lib/selector.js?type=template&index=0!./src/components/Pagination.vue\n// module id = 12\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a \n\n\n// WEBPACK FOOTER //\n// Datasource.vue?1f051aaa","\r\n \r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// Pagination.vue?7ebfad58","export default {\r\n translations: {\r\n // English translation\r\n 'en': {\r\n 'table': {\r\n 'label_limits': 'Show',\r\n 'label_search': 'Search',\r\n 'placeholder_search': 'Type to search..',\r\n 'records_not_found': 'No records found'\r\n },\r\n 'pagination': {\r\n 'label_show': 'Showing',\r\n 'label_to': 'to',\r\n 'label_of': 'of',\r\n 'label_entries': 'entries',\r\n 'btn_first': 'First',\r\n 'btn_last': 'Latest'\r\n }\r\n },\r\n // Spanish translation\r\n 'es': {\r\n 'table': {\r\n 'label_limits': 'Mostrar',\r\n 'label_search': 'Buscar',\r\n 'placeholder_search': 'Buscar ..',\r\n 'records_not_found': 'No se encontraron registros.'\r\n },\r\n 'pagination': {\r\n 'label_show': 'Mostrando',\r\n 'label_to': 'a',\r\n 'label_of': 'de',\r\n 'label_entries': 'registros',\r\n 'btn_first': 'Primero',\r\n 'btn_last': 'Último'\r\n }\r\n }\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/utils/DatasourceLanguage.js","export default {\r\n /**\r\n * Find the element value using Recursive Method and return the value rendered if it's defined\r\n * @param obj\r\n * @param column\r\n * @param render\r\n * @returns {*}\r\n */\r\n fetchFromObject(obj, column, render) {\r\n if(typeof obj === 'undefined') return false;\r\n let _index = column.indexOf('.');\r\n if(_index > -1) {\r\n return this.fetchFromObject(obj[column.substring(0, _index)], column.substr(_index + 1));\r\n }\r\n if(typeof render != 'undefined') {\r\n return render(obj[column]);\r\n }\r\n return obj[column];\r\n },\r\n\r\n /**\r\n * Emit event to change page from pagination\r\n * @param page\r\n * @return {void}\r\n */\r\n changePage(page) {\r\n this.selected = null;\r\n this.indexSelected = -1;\r\n this.$emit('change', { perpage: this.perpage, page: page });\r\n },\r\n\r\n /**\r\n * Effect toggle to selected row\r\n * @param row\r\n * @param index\r\n * @return {void}\r\n */\r\n selectRow(row, index) {\r\n if(this.indexSelected == index) {\r\n this.indexSelected = -1;\r\n this.selected = null;\r\n } else {\r\n this.indexSelected = index;\r\n this.selected = {\r\n 'row': row,\r\n 'index': index\r\n };\r\n }\r\n },\r\n\r\n /**\r\n * Computed property: Building custom string information with translation\r\n * @returns {String}\r\n */\r\n tableInfo() {\r\n let label_show = this.translation.pagination.label_show;\r\n let from = (this.pagination.from == null) ? 0 : this.pagination.from;\r\n let label_to = this.translation.pagination.label_to;\r\n let to = (this.pagination.to == null) ? 0 : this.pagination.to;\r\n let label_of = this.translation.pagination.label_of;\r\n let total = this.pagination.total;\r\n let label_entries = this.translation.pagination.label_entries;\r\n\r\n return `${label_show} ${from} ${label_to} ${to} ${label_of} ${total} ${label_entries}`;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/utils/DatasourceUtils.js","exports = module.exports = require(\"./../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \".Vue__pagination nav .pagination[data-v-60636b2c]{margin:10px 0!important}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-60636b2c&scoped=true!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/components/Pagination.vue\n// module id = 7\n// module chunks = 0","exports = module.exports = require(\"./../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \".vue-datasource .Vue__panel-body[data-v-ea4606ae]{padding:0}.vue-datasource .Vue__panel-body .Vue__table[data-v-ea4606ae]{margin-bottom:0}.vue-datasource .Vue__panel-footer .Vue__datasource_actions[data-v-ea4606ae]{margin:10px 0}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-ea4606ae&scoped=true!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/Datasource.vue\n// module id = 8\n// module chunks = 0","var __vue_exports__, __vue_options__\nvar __vue_styles__ = {}\n\n/* styles */\nrequire(\"!!vue-style-loader!css-loader!vue-loader/lib/style-rewriter?id=data-v-ea4606ae&scoped=true!sass-loader!vue-loader/lib/selector?type=styles&index=0!./Datasource.vue\")\n\n/* script */\n__vue_exports__ = require(\"!!babel-loader!vue-loader/lib/selector?type=script&index=0!./Datasource.vue\")\n\n/* template */\nvar __vue_template__ = require(\"!!vue-loader/lib/template-compiler?id=data-v-ea4606ae!vue-loader/lib/selector?type=template&index=0!./Datasource.vue\")\n__vue_options__ = __vue_exports__ = __vue_exports__ || {}\nif (\n typeof __vue_exports__.default === \"object\" ||\n typeof __vue_exports__.default === \"function\"\n) {\n__vue_options__ = __vue_exports__ = __vue_exports__.default\n}\nif (typeof __vue_options__ === \"function\") {\n __vue_options__ = __vue_options__.options\n}\n\n__vue_options__.render = __vue_template__.render\n__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\n__vue_options__._scopeId = \"data-v-ea4606ae\"\n\nmodule.exports = __vue_exports__\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Datasource.vue\n// module id = 9\n// module chunks = 0","var __vue_exports__, __vue_options__\nvar __vue_styles__ = {}\n\n/* styles */\nrequire(\"!!vue-style-loader!css-loader!vue-loader/lib/style-rewriter?id=data-v-60636b2c&scoped=true!sass-loader!vue-loader/lib/selector?type=styles&index=0!./Pagination.vue\")\n\n/* script */\n__vue_exports__ = require(\"!!babel-loader!vue-loader/lib/selector?type=script&index=0!./Pagination.vue\")\n\n/* template */\nvar __vue_template__ = require(\"!!vue-loader/lib/template-compiler?id=data-v-60636b2c!vue-loader/lib/selector?type=template&index=0!./Pagination.vue\")\n__vue_options__ = __vue_exports__ = __vue_exports__ || {}\nif (\n typeof __vue_exports__.default === \"object\" ||\n typeof __vue_exports__.default === \"function\"\n) {\n__vue_options__ = __vue_exports__ = __vue_exports__.default\n}\nif (typeof __vue_options__ === \"function\") {\n __vue_options__ = __vue_options__.options\n}\n\n__vue_options__.render = __vue_template__.render\n__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\n__vue_options__._scopeId = \"data-v-60636b2c\"\n\nmodule.exports = __vue_exports__\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/Pagination.vue\n// module id = 10\n// module chunks = 0","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"Vue__pagination\"\n }, [_c('nav', {\n attrs: {\n \"aria-label\": \"Page navigation\"\n }\n }, [_c('ul', {\n staticClass: \"pagination\"\n }, [_c('li', {\n class: (_vm.pages.current_page == 1) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.firstPage($event)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.btn_first))])]), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == 1) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\",\n \"aria-label\": \"Previous\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.previous($event)\n }\n }\n }, [_c('span', {\n attrs: {\n \"aria-hidden\": \"true\"\n }\n }, [_vm._v(\"«\")])])]), _vm._v(\" \"), _vm._l((_vm.items), function(n) {\n return _c('li', {\n class: (_vm.pages.current_page == n) ? 'active' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.change(n)\n }\n }\n }, [_vm._v(_vm._s(n))])])\n }), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == _vm.pages.last_page) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\",\n \"aria-label\": \"Next\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.next($event)\n }\n }\n }, [_c('span', {\n attrs: {\n \"aria-hidden\": \"true\"\n }\n }, [_vm._v(\"»\")])])]), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == _vm.pages.last_page) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.lastPage(_vm.pages.last_page)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.btn_last))])])], 2)])])\n},staticRenderFns: []}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler.js?id=data-v-60636b2c!./~/vue-loader/lib/selector.js?type=template&index=0!./src/components/Pagination.vue\n// module id = 11\n// module chunks = 0","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"vue-datasource\"\n }, [_c('div', {\n staticClass: \"panel panel-default\"\n }, [_c('div', {\n staticClass: \"panel-heading\"\n }, [_c('div', {\n staticClass: \"form-inline\"\n }, [_c('div', {\n staticClass: \"form-group pull-left\"\n }, [_c('label', {\n staticClass: \"control-label pr2\"\n }, [_vm._v(_vm._s(_vm.translation.table.label_limits))]), _vm._v(\" \"), _c('select', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.perpage),\n expression: \"perpage\"\n }],\n staticClass: \"form-control\",\n attrs: {\n \"number\": \"\"\n },\n on: {\n \"change\": function($event) {\n _vm.perpage = Array.prototype.filter.call($event.target.options, function(o) {\n return o.selected\n }).map(function(o) {\n var val = \"_value\" in o ? o._value : o.value;\n return val\n })[0]\n }\n }\n }, _vm._l((_vm.limits), function(limit) {\n return _c('option', {\n domProps: {\n \"value\": limit\n }\n }, [_vm._v(_vm._s(limit))])\n }))]), _vm._v(\" \"), _c('div', {\n staticClass: \"form-group pull-right\"\n }, [_c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.search),\n expression: \"search\"\n }],\n staticClass: \"form-control\",\n attrs: {\n \"type\": \"text\",\n \"placeholder\": _vm.translation.table.placeholder_search\n },\n domProps: {\n \"value\": _vm._s(_vm.search)\n },\n on: {\n \"input\": function($event) {\n if ($event.target.composing) { return; }\n _vm.search = $event.target.value\n }\n }\n }), _vm._v(\" \"), _c('button', {\n staticClass: \"btn btn-primary\",\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.searching($event)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.table.label_search))])]), _vm._v(\" \"), _c('div', {\n staticClass: \"clearfix\"\n })])]), _vm._v(\" \"), _c('div', {\n staticClass: \"panel-body Vue__panel-body\"\n }, [_c('table', {\n staticClass: \"table table-striped Vue__table\"\n }, [_c('thead', [_c('tr', _vm._l((_vm.columns), function(column) {\n return _c('th', [_vm._v(_vm._s(column.name))])\n }))]), _vm._v(\" \"), _c('tbody', [(_vm.pagination.total == 0) ? _c('tr', [_c('td', {\n attrs: {\n \"colspan\": _vm.columns.length\n }\n }, [_vm._v(_vm._s(_vm.translation.table.records_not_found))])]) : _vm._l((_vm.tableData), function(row, index) {\n return _c('tr', {\n class: {\n 'success': (index == _vm.indexSelected)\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.selectRow(row, index)\n }\n }\n }, _vm._l((_vm.columns), function(k) {\n return _c('td', [_vm._v(\"\\n \" + _vm._s(_vm.fetchFromObject(row, k.key, k.render)) + \"\\n \")])\n }))\n }), _vm._v(\" \"), _c('tr', [_c('td', {\n staticClass: \"text-center\",\n attrs: {\n \"colspan\": _vm.columns.length\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.tableInfo) + \"\\n \")])])], 2)])]), _vm._v(\" \"), _c('div', {\n staticClass: \"panel-footer Vue__panel-footer\"\n }, [_c('div', {\n staticClass: \"pull-left\"\n }, [_c('div', {\n staticClass: \"btn-group Vue__datasource_actions\"\n }, _vm._l((_vm.actions), function(btn) {\n return _c('button', {\n staticClass: \"btn btn-default\",\n class: btn.class,\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": function($event) {\n btn.event($event, _vm.selected)\n }\n }\n }, [(btn.icon) ? _c('i', {\n staticClass: \"pr1\",\n class: btn.icon\n }) : _vm._e(), _vm._v(\"\\n \" + _vm._s(btn.text) + \"\\n \")])\n }))]), _vm._v(\" \"), _c('div', {\n staticClass: \"pull-right\"\n }, [_c('pagination', {\n attrs: {\n \"pages\": _vm.pagination,\n \"translation\": _vm.translation.pagination\n },\n on: {\n \"change\": _vm.changePage\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"clearfix\"\n })])])])\n},staticRenderFns: []}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler.js?id=data-v-ea4606ae!./~/vue-loader/lib/selector.js?type=template&index=0!./src/Datasource.vue\n// module id = 12\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a \n\n\n// WEBPACK FOOTER //\n// Datasource.vue?28dd5f97","\n \n\n\n\n\n\n// WEBPACK FOOTER //\n// Pagination.vue?633c2b7c","export default {\n translations: {\n // English translation\n 'en': {\n 'table': {\n 'label_limits': 'Show',\n 'label_search': 'Search',\n 'placeholder_search': 'Type to search..',\n 'records_not_found': 'No records found'\n },\n 'pagination': {\n 'label_show': 'Showing',\n 'label_to': 'to',\n 'label_of': 'of',\n 'label_entries': 'entries',\n 'btn_first': 'First',\n 'btn_last': 'Latest'\n }\n },\n // Spanish translation\n 'es': {\n 'table': {\n 'label_limits': 'Mostrar',\n 'label_search': 'Buscar',\n 'placeholder_search': 'Buscar ..',\n 'records_not_found': 'No se encontraron registros.'\n },\n 'pagination': {\n 'label_show': 'Mostrando',\n 'label_to': 'a',\n 'label_of': 'de',\n 'label_entries': 'registros',\n 'btn_first': 'Primero',\n 'btn_last': 'Último'\n }\n }\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/utils/DatasourceLanguage.js","export default {\n /**\n * Find the element value using Recursive Method and return the value rendered if it's defined\n * @param obj\n * @param column\n * @param render\n * @returns {*}\n */\n fetchFromObject(obj, column, render) {\n if (typeof obj === 'undefined') return false;\n let _index = column.indexOf('.');\n if (_index > -1) {\n return this.fetchFromObject(obj[column.substring(0, _index)], column.substr(_index + 1));\n }\n if (typeof render != 'undefined') {\n return render(obj[column]);\n }\n return obj[column];\n },\n\n /**\n * Emit event to change page from pagination\n * @param page\n * @return {void}\n */\n changePage(page) {\n this.selected = null;\n this.indexSelected = -1;\n this.$emit('change', {perpage: this.perpage, page: page});\n },\n\n /**\n * Effect toggle to selected row\n * @param row\n * @param index\n * @return {void}\n */\n selectRow(row, index) {\n if (this.indexSelected == index) {\n this.indexSelected = -1;\n this.selected = null;\n } else {\n this.indexSelected = index;\n this.selected = {\n 'row': row,\n 'index': index\n };\n }\n },\n\n /**\n * Computed property: Building custom string information with translation\n * @returns {String}\n */\n tableInfo() {\n let label_show = this.translation.pagination.label_show;\n let from = (this.pagination.from == null) ? 0 : this.pagination.from;\n let label_to = this.translation.pagination.label_to;\n let to = (this.pagination.to == null) ? 0 : this.pagination.to;\n let label_of = this.translation.pagination.label_of;\n let total = this.pagination.total;\n let label_entries = this.translation.pagination.label_entries;\n\n return `${label_show} ${from} ${label_to} ${to} ${label_of} ${total} ${label_entries}`;\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/utils/DatasourceUtils.js","exports = module.exports = require(\"./../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \".vue-datasource .Vue__panel-body[data-v-49bf9548]{padding:0}.vue-datasource .Vue__panel-body .Vue__table[data-v-49bf9548]{margin-bottom:0}.vue-datasource .Vue__panel-footer .Vue__datasource_actions[data-v-49bf9548]{margin:10px 0}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-49bf9548&scoped=true!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/Datasource.vue\n// module id = 7\n// module chunks = 0","exports = module.exports = require(\"./../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \".Vue__pagination nav .pagination[data-v-6bdbb1a8]{margin:10px 0!important}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-loader!./~/vue-loader/lib/style-rewriter.js?id=data-v-6bdbb1a8&scoped=true!./~/sass-loader!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/components/Pagination.vue\n// module id = 8\n// module chunks = 0","var __vue_exports__, __vue_options__\nvar __vue_styles__ = {}\n\n/* styles */\nrequire(\"!!vue-style-loader!css-loader!vue-loader/lib/style-rewriter?id=data-v-49bf9548&scoped=true!sass-loader!vue-loader/lib/selector?type=styles&index=0!./Datasource.vue\")\n\n/* script */\n__vue_exports__ = require(\"!!babel-loader!vue-loader/lib/selector?type=script&index=0!./Datasource.vue\")\n\n/* template */\nvar __vue_template__ = require(\"!!vue-loader/lib/template-compiler?id=data-v-49bf9548!vue-loader/lib/selector?type=template&index=0!./Datasource.vue\")\n__vue_options__ = __vue_exports__ = __vue_exports__ || {}\nif (\n typeof __vue_exports__.default === \"object\" ||\n typeof __vue_exports__.default === \"function\"\n) {\n__vue_options__ = __vue_exports__ = __vue_exports__.default\n}\nif (typeof __vue_options__ === \"function\") {\n __vue_options__ = __vue_options__.options\n}\n\n__vue_options__.render = __vue_template__.render\n__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\n__vue_options__._scopeId = \"data-v-49bf9548\"\n\nmodule.exports = __vue_exports__\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Datasource.vue\n// module id = 9\n// module chunks = 0","var __vue_exports__, __vue_options__\nvar __vue_styles__ = {}\n\n/* styles */\nrequire(\"!!vue-style-loader!css-loader!vue-loader/lib/style-rewriter?id=data-v-6bdbb1a8&scoped=true!sass-loader!vue-loader/lib/selector?type=styles&index=0!./Pagination.vue\")\n\n/* script */\n__vue_exports__ = require(\"!!babel-loader!vue-loader/lib/selector?type=script&index=0!./Pagination.vue\")\n\n/* template */\nvar __vue_template__ = require(\"!!vue-loader/lib/template-compiler?id=data-v-6bdbb1a8!vue-loader/lib/selector?type=template&index=0!./Pagination.vue\")\n__vue_options__ = __vue_exports__ = __vue_exports__ || {}\nif (\n typeof __vue_exports__.default === \"object\" ||\n typeof __vue_exports__.default === \"function\"\n) {\n__vue_options__ = __vue_exports__ = __vue_exports__.default\n}\nif (typeof __vue_options__ === \"function\") {\n __vue_options__ = __vue_options__.options\n}\n\n__vue_options__.render = __vue_template__.render\n__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\n__vue_options__._scopeId = \"data-v-6bdbb1a8\"\n\nmodule.exports = __vue_exports__\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/Pagination.vue\n// module id = 10\n// module chunks = 0","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"vue-datasource\"\n }, [_c('div', {\n staticClass: \"panel panel-default\"\n }, [_c('div', {\n staticClass: \"panel-heading\"\n }, [_c('div', {\n staticClass: \"form-inline\"\n }, [_c('div', {\n staticClass: \"form-group pull-left\"\n }, [_c('label', {\n staticClass: \"control-label pr2\"\n }, [_vm._v(_vm._s(_vm.translation.table.label_limits))]), _vm._v(\" \"), _c('select', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.perpage),\n expression: \"perpage\"\n }],\n staticClass: \"form-control\",\n attrs: {\n \"number\": \"\"\n },\n on: {\n \"change\": function($event) {\n _vm.perpage = Array.prototype.filter.call($event.target.options, function(o) {\n return o.selected\n }).map(function(o) {\n var val = \"_value\" in o ? o._value : o.value;\n return val\n })[0]\n }\n }\n }, _vm._l((_vm.limits), function(limit) {\n return _c('option', {\n domProps: {\n \"value\": limit\n }\n }, [_vm._v(_vm._s(limit))])\n }))]), _vm._v(\" \"), _c('div', {\n staticClass: \"form-group pull-right\"\n }, [_c('input', {\n directives: [{\n name: \"model\",\n rawName: \"v-model\",\n value: (_vm.search),\n expression: \"search\"\n }],\n staticClass: \"form-control\",\n attrs: {\n \"type\": \"text\",\n \"placeholder\": _vm.translation.table.placeholder_search\n },\n domProps: {\n \"value\": _vm._s(_vm.search)\n },\n on: {\n \"input\": function($event) {\n if ($event.target.composing) { return; }\n _vm.search = $event.target.value\n }\n }\n }), _vm._v(\" \"), _c('button', {\n staticClass: \"btn btn-primary\",\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.searching($event)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.table.label_search) + \"\\n \")])]), _vm._v(\" \"), _c('div', {\n staticClass: \"clearfix\"\n })])]), _vm._v(\" \"), _c('div', {\n staticClass: \"panel-body Vue__panel-body\"\n }, [_c('table', {\n staticClass: \"table table-striped Vue__table\"\n }, [_c('thead', [_c('tr', _vm._l((_vm.columns), function(column) {\n return _c('th', [_vm._v(_vm._s(column.name))])\n }))]), _vm._v(\" \"), _c('tbody', [(_vm.pagination.total == 0) ? _c('tr', [_c('td', {\n attrs: {\n \"colspan\": _vm.columns.length\n }\n }, [_vm._v(_vm._s(_vm.translation.table.records_not_found))])]) : _vm._l((_vm.tableData), function(row, index) {\n return _c('tr', {\n class: {\n 'success': (index == _vm.indexSelected)\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.selectRow(row, index)\n }\n }\n }, _vm._l((_vm.columns), function(k) {\n return _c('td', [_vm._v(\"\\n \" + _vm._s(_vm.fetchFromObject(row, k.key, k.render)) + \"\\n \")])\n }))\n }), _vm._v(\" \"), _c('tr', [_c('td', {\n staticClass: \"text-center\",\n attrs: {\n \"colspan\": _vm.columns.length\n }\n }, [_vm._v(\"\\n \" + _vm._s(_vm.tableInfo) + \"\\n \")])])], 2)])]), _vm._v(\" \"), _c('div', {\n staticClass: \"panel-footer Vue__panel-footer\"\n }, [_c('div', {\n staticClass: \"pull-left\"\n }, [_c('div', {\n staticClass: \"btn-group Vue__datasource_actions\"\n }, _vm._l((_vm.actions), function(btn) {\n return _c('button', {\n staticClass: \"btn btn-default\",\n class: btn.class,\n attrs: {\n \"type\": \"button\"\n },\n on: {\n \"click\": function($event) {\n btn.event($event, _vm.selected)\n }\n }\n }, [(btn.icon) ? _c('i', {\n staticClass: \"pr1\",\n class: btn.icon\n }) : _vm._e(), _vm._v(\"\\n \" + _vm._s(btn.text) + \"\\n \")])\n }))]), _vm._v(\" \"), _c('div', {\n staticClass: \"pull-right\"\n }, [_c('pagination', {\n attrs: {\n \"pages\": _vm.pagination,\n \"translation\": _vm.translation.pagination\n },\n on: {\n \"change\": _vm.changePage\n }\n })], 1), _vm._v(\" \"), _c('div', {\n staticClass: \"clearfix\"\n })])])])\n},staticRenderFns: []}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler.js?id=data-v-49bf9548!./~/vue-loader/lib/selector.js?type=template&index=0!./src/Datasource.vue\n// module id = 11\n// module chunks = 0","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"Vue__pagination\"\n }, [_c('nav', {\n attrs: {\n \"aria-label\": \"Page navigation\"\n }\n }, [_c('ul', {\n staticClass: \"pagination\"\n }, [_c('li', {\n class: (_vm.pages.current_page == 1) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.firstPage($event)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.btn_first))])]), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == 1) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\",\n \"aria-label\": \"Previous\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.previous($event)\n }\n }\n }, [_c('span', {\n attrs: {\n \"aria-hidden\": \"true\"\n }\n }, [_vm._v(\"«\")])])]), _vm._v(\" \"), _vm._l((_vm.items), function(n) {\n return _c('li', {\n class: (_vm.pages.current_page == n) ? 'active' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.change(n)\n }\n }\n }, [_vm._v(_vm._s(n))])])\n }), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == _vm.pages.last_page) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\",\n \"aria-label\": \"Next\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.next($event)\n }\n }\n }, [_c('span', {\n attrs: {\n \"aria-hidden\": \"true\"\n }\n }, [_vm._v(\"»\")])])]), _vm._v(\" \"), _c('li', {\n class: (_vm.pages.current_page == _vm.pages.last_page) ? 'disabled' : ''\n }, [_c('a', {\n attrs: {\n \"href\": \"#\"\n },\n on: {\n \"click\": function($event) {\n $event.preventDefault();\n _vm.lastPage(_vm.pages.last_page)\n }\n }\n }, [_vm._v(_vm._s(_vm.translation.btn_last))])])], 2)])])\n},staticRenderFns: []}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler.js?id=data-v-6bdbb1a8!./~/vue-loader/lib/selector.js?type=template&index=0!./src/components/Pagination.vue\n// module id = 12\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a
\ No newline at end of file
diff --git a/src/components/Pagination.vue b/src/components/Pagination.vue
index 7efdb7e..1f89899 100644
--- a/src/components/Pagination.vue
+++ b/src/components/Pagination.vue
@@ -1,102 +1,116 @@
-
+
\ No newline at end of file
diff --git a/src/example.js b/src/example.js
index b1d2c67..af25301 100644
--- a/src/example.js
+++ b/src/example.js
@@ -127,7 +127,7 @@ new Vue({
class: 'btn-primary',
event(e, row) {
console.warn('Did clicked me?', e);
- if(row == null) {
+ if (row == null) {
console.info('Ups.. data not found :(')
} else {
console.info('Yeeei, I found this :)', JSON.stringify(row));
@@ -140,7 +140,7 @@ new Vue({
class: 'btn-danger',
event(e, row) {
console.warn('Are you clicked me?', e);
- if(row == null) {
+ if (row == null) {
console.info('Ups.. data not found :(')
} else {
console.info('Yeeei, I found this :)', JSON.stringify(row));
@@ -153,7 +153,7 @@ new Vue({
class: 'btn-info',
event(e, row) {
console.warn('Are you clicked me?', e);
- if(row == null) {
+ if (row == null) {
console.info('Ups.. data not found :(')
} else {
console.info('Yeeei, I found this :)', JSON.stringify(row));
diff --git a/src/utils/DatasourceLanguage.js b/src/utils/DatasourceLanguage.js
index ac196c9..01ffb2b 100644
--- a/src/utils/DatasourceLanguage.js
+++ b/src/utils/DatasourceLanguage.js
@@ -1,38 +1,38 @@
export default {
- translations: {
- // English translation
- 'en': {
- 'table': {
- 'label_limits': 'Show',
- 'label_search': 'Search',
- 'placeholder_search': 'Type to search..',
- 'records_not_found': 'No records found'
- },
- 'pagination': {
- 'label_show': 'Showing',
- 'label_to': 'to',
- 'label_of': 'of',
- 'label_entries': 'entries',
- 'btn_first': 'First',
- 'btn_last': 'Latest'
- }
- },
- // Spanish translation
- 'es': {
- 'table': {
- 'label_limits': 'Mostrar',
- 'label_search': 'Buscar',
- 'placeholder_search': 'Buscar ..',
- 'records_not_found': 'No se encontraron registros.'
- },
- 'pagination': {
- 'label_show': 'Mostrando',
- 'label_to': 'a',
- 'label_of': 'de',
- 'label_entries': 'registros',
- 'btn_first': 'Primero',
- 'btn_last': 'Último'
- }
- }
+ translations: {
+ // English translation
+ 'en': {
+ 'table': {
+ 'label_limits': 'Show',
+ 'label_search': 'Search',
+ 'placeholder_search': 'Type to search..',
+ 'records_not_found': 'No records found'
+ },
+ 'pagination': {
+ 'label_show': 'Showing',
+ 'label_to': 'to',
+ 'label_of': 'of',
+ 'label_entries': 'entries',
+ 'btn_first': 'First',
+ 'btn_last': 'Latest'
+ }
+ },
+ // Spanish translation
+ 'es': {
+ 'table': {
+ 'label_limits': 'Mostrar',
+ 'label_search': 'Buscar',
+ 'placeholder_search': 'Buscar ..',
+ 'records_not_found': 'No se encontraron registros.'
+ },
+ 'pagination': {
+ 'label_show': 'Mostrando',
+ 'label_to': 'a',
+ 'label_of': 'de',
+ 'label_entries': 'registros',
+ 'btn_first': 'Primero',
+ 'btn_last': 'Último'
+ }
}
+ }
}
\ No newline at end of file
diff --git a/src/utils/DatasourceUtils.js b/src/utils/DatasourceUtils.js
index b4f1fb8..3e80c5c 100644
--- a/src/utils/DatasourceUtils.js
+++ b/src/utils/DatasourceUtils.js
@@ -1,66 +1,66 @@
export default {
- /**
- * Find the element value using Recursive Method and return the value rendered if it's defined
- * @param obj
- * @param column
- * @param render
- * @returns {*}
- */
- fetchFromObject(obj, column, render) {
- if(typeof obj === 'undefined') return false;
- let _index = column.indexOf('.');
- if(_index > -1) {
- return this.fetchFromObject(obj[column.substring(0, _index)], column.substr(_index + 1));
- }
- if(typeof render != 'undefined') {
- return render(obj[column]);
- }
- return obj[column];
- },
+ /**
+ * Find the element value using Recursive Method and return the value rendered if it's defined
+ * @param obj
+ * @param column
+ * @param render
+ * @returns {*}
+ */
+ fetchFromObject(obj, column, render) {
+ if (typeof obj === 'undefined') return false;
+ let _index = column.indexOf('.');
+ if (_index > -1) {
+ return this.fetchFromObject(obj[column.substring(0, _index)], column.substr(_index + 1));
+ }
+ if (typeof render != 'undefined') {
+ return render(obj[column]);
+ }
+ return obj[column];
+ },
- /**
- * Emit event to change page from pagination
- * @param page
- * @return {void}
- */
- changePage(page) {
- this.selected = null;
- this.indexSelected = -1;
- this.$emit('change', { perpage: this.perpage, page: page });
- },
+ /**
+ * Emit event to change page from pagination
+ * @param page
+ * @return {void}
+ */
+ changePage(page) {
+ this.selected = null;
+ this.indexSelected = -1;
+ this.$emit('change', {perpage: this.perpage, page: page});
+ },
- /**
- * Effect toggle to selected row
- * @param row
- * @param index
- * @return {void}
- */
- selectRow(row, index) {
- if(this.indexSelected == index) {
- this.indexSelected = -1;
- this.selected = null;
- } else {
- this.indexSelected = index;
- this.selected = {
- 'row': row,
- 'index': index
- };
- }
- },
+ /**
+ * Effect toggle to selected row
+ * @param row
+ * @param index
+ * @return {void}
+ */
+ selectRow(row, index) {
+ if (this.indexSelected == index) {
+ this.indexSelected = -1;
+ this.selected = null;
+ } else {
+ this.indexSelected = index;
+ this.selected = {
+ 'row': row,
+ 'index': index
+ };
+ }
+ },
- /**
- * Computed property: Building custom string information with translation
- * @returns {String}
- */
- tableInfo() {
- let label_show = this.translation.pagination.label_show;
- let from = (this.pagination.from == null) ? 0 : this.pagination.from;
- let label_to = this.translation.pagination.label_to;
- let to = (this.pagination.to == null) ? 0 : this.pagination.to;
- let label_of = this.translation.pagination.label_of;
- let total = this.pagination.total;
- let label_entries = this.translation.pagination.label_entries;
+ /**
+ * Computed property: Building custom string information with translation
+ * @returns {String}
+ */
+ tableInfo() {
+ let label_show = this.translation.pagination.label_show;
+ let from = (this.pagination.from == null) ? 0 : this.pagination.from;
+ let label_to = this.translation.pagination.label_to;
+ let to = (this.pagination.to == null) ? 0 : this.pagination.to;
+ let label_of = this.translation.pagination.label_of;
+ let total = this.pagination.total;
+ let label_entries = this.translation.pagination.label_entries;
- return `${label_show} ${from} ${label_to} ${to} ${label_of} ${total} ${label_entries}`;
- }
+ return `${label_show} ${from} ${label_to} ${to} ${label_of} ${total} ${label_entries}`;
+ }
}
\ No newline at end of file