@lossendae/vue-table
Version:
Simple table component for Vue.js 2.x with pagination and sortable columns
1,587 lines (1,275 loc) • 47.6 kB
JavaScript
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["VueTable"] = factory();
else
root["VueTable"] = factory();
})(typeof self !== 'undefined' ? self : this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "+xUi");
/******/ })
/************************************************************************/
/******/ ({
/***/ "+rLv":
/***/ (function(module, exports, __webpack_require__) {
var document = __webpack_require__("dyZX").document;
module.exports = document && document.documentElement;
/***/ }),
/***/ "+xUi":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
;
__webpack_require__.r(__webpack_exports__);
// EXTERNAL MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
var setPublicPath = __webpack_require__("HrLf");
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"/home/styx/Projets/vue-table/node_modules/.cache/vue-loader","cacheIdentifier":"b3fca2dc-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/VueTable.vue?vue&type=template&id=29b122a0
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('table',{staticClass:"table table-hover"},[_c('thead',[_c('tr',_vm._l((_vm.columns),function(column,index){return _c('th',{key:(column + "_" + index)},[_vm._t(("header__" + (column.name)),[((column.sortable || false) && _vm.rows.length > 0)?_c('a',{staticClass:"d-flex align-items-center sortable-link",attrs:{"href":""},on:{"click":function($event){$event.preventDefault();_vm.sort(column)}}},[_vm._v("\n "+_vm._s(column.title || column.name)+"\n "),(_vm.isSorted(column))?_c('i',{staticClass:"fa ml-2",class:{'fa-caret-up': _vm.sortDirection === 'asc', 'fa-caret-down': _vm.sortDirection === 'desc'}}):_vm._e()]):[_vm._v(_vm._s(column.title || column.name))]],{column:column})],2)}))]),_c('tbody',[_vm._l((_vm.rows),function(row){return _c('tr',_vm._l((_vm.column_names),function(name,index){return _c('td',{key:((row[name]) + "_" + index)},[(_vm.fieldExistsInRow(row, name))?[_vm._t(name,[_vm._v(_vm._s(row[name]))],{row:row})]:[_vm._t(name,[_vm._v("[slot: "+_vm._s(name)+"]")],{row:row})]],2)}))}),(_vm.rows.length === 0)?_c('tr',[_vm._t("no_result",[_c('td',{staticClass:"text-center pt-4 p-3",attrs:{"colspan":_vm.columns.length}},[_vm._t("empty",[_vm._v("No results found")])],2)],{columns:_vm.columns})],2):_vm._e()],2)])}
var staticRenderFns = []
// CONCATENATED MODULE: ./src/VueTable.vue?vue&type=template&id=29b122a0
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.function.name.js
var es6_function_name = __webpack_require__("f3/d");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es7.array.includes.js
var es7_array_includes = __webpack_require__("Z2Ku");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.string.includes.js
var es6_string_includes = __webpack_require__("L9s1");
// CONCATENATED MODULE: ./src/mixins/vueTableMixin.js
/* harmony default export */ var vueTableMixin = ({
props: {
columns: {
type: Array,
required: true
},
rows: {
type: Array,
required: true
},
sortBy: {
type: String
},
sortDirection: {
type: String,
default: function _default() {
return 'asc';
},
validator: function validator(value) {
// The value must match one of these strings
return ['asc', 'desc'].includes(value);
}
}
},
data: function data() {
return {
column_names: []
};
},
methods: {
fieldExistsInRow: function fieldExistsInRow(row, name) {
return row.hasOwnProperty(name);
},
getSortKey: function getSortKey(column) {
return typeof column.sortable === 'string' ? column.sortable : column.name;
},
isSorted: function isSorted(column) {
// If a column is marked as sortable, sortBy props should be defined
// If not the user should be warned as it might have forgotten to set the prop
if (typeof this.sortBy === 'undefined') {
console.warn("\"sortBy\" prop was not defined, but column \"%s\" is marked as sortable", column.name);
}
return this.getSortKey(column) === this.sortBy;
},
sort: function sort(column) {
// emit event to parent to change the sort parameters
this.$emit('column:sort', {
sortBy: this.getSortKey(column),
sortDirection: this.sortDirection === 'asc' ? 'desc' : 'asc'
});
}
},
mounted: function mounted() {
// map column names
this.column_names = this.columns.map(function (f) {
return f.name;
});
}
});
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/VueTable.vue?vue&type=script&lang=js
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var VueTablevue_type_script_lang_js = ({
name: 'vue-table',
mixins: [vueTableMixin]
});
// CONCATENATED MODULE: ./src/VueTable.vue?vue&type=script&lang=js
/* harmony default export */ var src_VueTablevue_type_script_lang_js = (VueTablevue_type_script_lang_js);
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
/* globals __VUE_SSR_CONTEXT__ */
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.
function normalizeComponent (
scriptExports,
render,
staticRenderFns,
functionalTemplate,
injectStyles,
scopeId,
moduleIdentifier, /* server only */
shadowMode /* vue-cli only */
) {
// Vue.extend constructor export interop
var options = typeof scriptExports === 'function'
? scriptExports.options
: scriptExports
// render functions
if (render) {
options.render = render
options.staticRenderFns = staticRenderFns
options._compiled = true
}
// functional template
if (functionalTemplate) {
options.functional = true
}
// scopedId
if (scopeId) {
options._scopeId = 'data-v-' + scopeId
}
var hook
if (moduleIdentifier) { // server build
hook = function (context) {
// 2.3 injection
context =
context || // cached call
(this.$vnode && this.$vnode.ssrContext) || // stateful
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
// 2.2 with runInNewContext: true
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
context = __VUE_SSR_CONTEXT__
}
// inject component styles
if (injectStyles) {
injectStyles.call(this, context)
}
// register component module identifier for async chunk inferrence
if (context && context._registeredComponents) {
context._registeredComponents.add(moduleIdentifier)
}
}
// used by ssr in case component is cached and beforeCreate
// never gets called
options._ssrRegister = hook
} else if (injectStyles) {
hook = shadowMode
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
: injectStyles
}
if (hook) {
if (options.functional) {
// for template-only hot-reload because in that case the render fn doesn't
// go through the normalizer
options._injectStyles = hook
// register for functioal component in vue file
var originalRender = options.render
options.render = function renderWithStyleInjection (h, context) {
hook.call(context)
return originalRender(h, context)
}
} else {
// inject component registration as beforeCreate hook
var existing = options.beforeCreate
options.beforeCreate = existing
? [].concat(existing, hook)
: [hook]
}
}
return {
exports: scriptExports,
options: options
}
}
// CONCATENATED MODULE: ./src/VueTable.vue
/* normalize component */
var component = normalizeComponent(
src_VueTablevue_type_script_lang_js,
render,
staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var VueTable = (component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"/home/styx/Projets/vue-table/node_modules/.cache/vue-loader","cacheIdentifier":"b3fca2dc-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/VueTablePagination.vue?vue&type=template&id=4dc728dc
var VueTablePaginationvue_type_template_id_4dc728dc_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"d-flex bg-light p-2 align-items-center"},[_c('div',[_vm._t("info",[(_vm.totalItems > 0)?[_vm._v("\n From "+_vm._s(_vm.from)+" to "+_vm._s(_vm.to)+" on "+_vm._s(_vm.totalItems)+" result(s)\n ")]:[_vm._v("\n No results\n ")]],{from:_vm.from,to:_vm.to,totalItems:_vm.totalItems})],2),_c('div',{staticClass:"ml-auto d-flex"},[(_vm.showRefreshButton)?[_c('button',{staticClass:"btn btn-sm btn-outline-secondary mr-2",on:{"click":function($event){$event.preventDefault();_vm.selectPage(_vm.currentPage)}}},[_c('i',{staticClass:"fa fa-refresh pl-1 pr-1"})])]:_vm._e(),(_vm.total_pages > 1)?_c('ul',{staticClass:"pagination"},[(_vm.useFirstLastLinks)?_c('li',{staticClass:"page-item",class:{ disabled: _vm.is_first_page }},[_c('a',{staticClass:"page-link",attrs:{"href":""},domProps:{"innerHTML":_vm._s(_vm.firstText)},on:{"click":function($event){$event.preventDefault();_vm.selectPage(1)}}})]):_vm._e(),(_vm.useNextPrevLinks)?_c('li',{staticClass:"page-item",class:{ disabled: _vm.is_first_page }},[_c('a',{staticClass:"page-link",attrs:{"href":""},domProps:{"innerHTML":_vm._s(_vm.previousText)},on:{"click":function($event){$event.preventDefault();_vm.selectPage(_vm.currentPage - 1)}}})]):_vm._e(),_vm._l((_vm.pages),function(page,index){return _c('li',{key:index,staticClass:"page-item",class:{ active: page.active }},[_c('a',{staticClass:"page-link",attrs:{"disabled":!page.active,"href":""},on:{"click":function($event){$event.preventDefault();_vm.selectPage(page.number)}}},[_vm._v(_vm._s(page.label))])])}),(_vm.useNextPrevLinks)?_c('li',{staticClass:"page-item",class:{ disabled: _vm.is_last_page }},[_c('a',{staticClass:"page-link",attrs:{"href":""},domProps:{"innerHTML":_vm._s(_vm.nextText)},on:{"click":function($event){$event.preventDefault();_vm.selectPage(_vm.currentPage + 1)}}})]):_vm._e(),(_vm.useFirstLastLinks)?_c('li',{staticClass:"page-item",class:{ disabled: _vm.is_last_page }},[_c('a',{staticClass:"page-link",attrs:{"href":""},domProps:{"innerHTML":_vm._s(_vm.lastText )},on:{"click":function($event){$event.preventDefault();_vm.selectPage(_vm.total_pages)}}})]):_vm._e()],2):_vm._e()],2)])}
var VueTablePaginationvue_type_template_id_4dc728dc_staticRenderFns = []
// CONCATENATED MODULE: ./src/VueTablePagination.vue?vue&type=template&id=4dc728dc
// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.number.constructor.js
var es6_number_constructor = __webpack_require__("xfY5");
// CONCATENATED MODULE: ./src/mixins/vueTablePaginationMixin.js
/* harmony default export */ var vueTablePaginationMixin = ({
props: {
showRefreshButton: {
type: Boolean,
default: true
},
useFirstLastLinks: {
type: Boolean,
default: true
},
useBoundariesNumbersLinks: {
type: Boolean,
default: false
},
useNextPrevLinks: {
type: Boolean,
default: false
},
firstText: {
type: String,
default: "«"
},
lastText: {
type: String,
default: "»"
},
nextText: {
type: String,
default: "<"
},
previousText: {
type: String,
default: ">"
},
useEllipses: {
type: Boolean,
default: true
},
rotate: {
type: Boolean,
default: true
},
maxPageItems: {
type: Number,
default: 5
},
itemsPerPage: {
type: Number,
default: 15
},
totalItems: {
type: Number,
required: true
},
currentPage: {
type: Number,
required: true
}
},
computed: {
is_last_page: function is_last_page() {
return this.currentPage === this.total_pages;
},
is_first_page: function is_first_page() {
return this.currentPage === 1;
},
total_pages: function total_pages() {
var total_pages = this.itemsPerPage < 1 ? 1 : Math.ceil(this.totalItems / this.itemsPerPage);
return Math.max(total_pages || 0, 1);
},
from: function from() {
return this.is_first_page ? 1 : this.itemsPerPage * (this.currentPage - 1) + 1;
},
to: function to() {
return this.is_last_page ? this.totalItems : this.itemsPerPage * this.currentPage;
},
pages: function pages() {
var pages = [];
if (this.currentPage <= 0 || this.currentPage > this.total_pages) {
return pages;
} // Default page limits
var start_page = 1;
var end_page = this.total_pages;
var limit_page_items = this.isDefined(this.maxPageItems) && this.maxPageItems < this.total_pages; // recompute if maxPageItems
if (limit_page_items) {
if (this.rotate) {
// Current page is displayed in the middle of the visible ones
start_page = Math.max(this.currentPage - Math.floor(this.maxPageItems / 2), 1);
end_page = start_page + this.maxPageItems - 1; // Adjust if limit is exceeded
if (end_page > this.total_pages) {
end_page = this.total_pages;
start_page = end_page - this.maxPageItems + 1;
}
} else {
// Visible pages are paginated with maxPageItems
start_page = (Math.ceil(this.currentPage / this.maxPageItems) - 1) * this.maxPageItems + 1; // Adjust last page if limit is exceeded
end_page = Math.min(start_page + this.maxPageItems - 1, this.total_pages);
}
} // Add page number links
for (var number = start_page; number <= end_page; number++) {
var page = this.makePage(number, number, number === this.currentPage);
pages.push(page);
} // Add links to move between page sets
if (limit_page_items && this.maxPageItems > 0 && (!this.rotate || this.useEllipses || this.useBoundariesNumbersLinks)) {
if (start_page > 1) {
if (!this.useBoundariesNumbersLinks || start_page > 3) {
//need ellipsis for all options unless range is too close to beginning
var previous_ellipsis_page_item = this.makePage(start_page - 1, '...', false);
pages.unshift(previous_ellipsis_page_item);
}
if (this.useBoundariesNumbersLinks) {
if (start_page === 3) {
//need to replace ellipsis when the buttons would be sequential
var second_page_item = this.makePage(2, '2', false);
pages.unshift(second_page_item);
} //add the first page
var first_page_item = this.makePage(1, '1', false);
pages.unshift(first_page_item);
}
}
if (end_page < this.total_pages) {
if (!this.useBoundariesNumbersLinks || end_page < this.total_pages - 2) {
//need ellipsis for all options unless range is too close to end
var next_ellipsis_page_item = this.makePage(end_page + 1, '...', false);
pages.push(next_ellipsis_page_item);
}
if (this.useBoundariesNumbersLinks) {
if (end_page === this.total_pages - 2) {
//need to replace ellipsis when the buttons would be sequential
var second_to_last_page_item = this.makePage(this.total_pages - 1, this.total_pages - 1, false);
pages.push(second_to_last_page_item);
} //add the last page
var last_page_item = this.makePage(this.total_pages, this.total_pages, false);
pages.push(last_page_item);
}
}
}
return pages;
}
},
methods: {
selectPage: function selectPage(page) {
this.$emit('pagination:change', page);
},
isDefined: function isDefined(value) {
return typeof value !== "undefined";
},
makePage: function makePage(number, label, active) {
return {
number: number,
label: label,
active: active
};
}
}
});
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/VueTablePagination.vue?vue&type=script&lang=js
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var VueTablePaginationvue_type_script_lang_js = ({
mixins: [vueTablePaginationMixin]
});
// CONCATENATED MODULE: ./src/VueTablePagination.vue?vue&type=script&lang=js
/* harmony default export */ var src_VueTablePaginationvue_type_script_lang_js = (VueTablePaginationvue_type_script_lang_js);
// CONCATENATED MODULE: ./src/VueTablePagination.vue
/* normalize component */
var VueTablePagination_component = normalizeComponent(
src_VueTablePaginationvue_type_script_lang_js,
VueTablePaginationvue_type_template_id_4dc728dc_render,
VueTablePaginationvue_type_template_id_4dc728dc_staticRenderFns,
false,
null,
null,
null
)
/* harmony default export */ var VueTablePagination = (VueTablePagination_component.exports);
// CONCATENATED MODULE: ./src/main.js
/* harmony default export */ var main = (VueTable);
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "VueTable", function() { return VueTable; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "vueTableMixin", function() { return vueTableMixin; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "VueTablePagination", function() { return VueTablePagination; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "vueTablePaginationMixin", function() { return vueTablePaginationMixin; });
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (main);
/***/ }),
/***/ "/e88":
/***/ (function(module, exports) {
module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
'\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
/***/ }),
/***/ "0/R4":
/***/ (function(module, exports) {
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/***/ "0sh+":
/***/ (function(module, exports, __webpack_require__) {
// helper for String#{startsWith, endsWith, includes}
var isRegExp = __webpack_require__("quPj");
var defined = __webpack_require__("vhPU");
module.exports = function (that, searchString, NAME) {
if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
return String(defined(that));
};
/***/ }),
/***/ "2OiF":
/***/ (function(module, exports) {
module.exports = function (it) {
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
return it;
};
/***/ }),
/***/ "4R4u":
/***/ (function(module, exports) {
// IE 8- don't enum bug keys
module.exports = (
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');
/***/ }),
/***/ "DVgA":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__("zhAb");
var enumBugKeys = __webpack_require__("4R4u");
module.exports = Object.keys || function keys(O) {
return $keys(O, enumBugKeys);
};
/***/ }),
/***/ "EemH":
/***/ (function(module, exports, __webpack_require__) {
var pIE = __webpack_require__("UqcF");
var createDesc = __webpack_require__("RjD/");
var toIObject = __webpack_require__("aCFj");
var toPrimitive = __webpack_require__("apmT");
var has = __webpack_require__("aagx");
var IE8_DOM_DEFINE = __webpack_require__("xpql");
var gOPD = Object.getOwnPropertyDescriptor;
exports.f = __webpack_require__("nh4g") ? gOPD : function getOwnPropertyDescriptor(O, P) {
O = toIObject(O);
P = toPrimitive(P, true);
if (IE8_DOM_DEFINE) try {
return gOPD(O, P);
} catch (e) { /* empty */ }
if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
};
/***/ }),
/***/ "FJW5":
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__("hswa");
var anObject = __webpack_require__("y3w9");
var getKeys = __webpack_require__("DVgA");
module.exports = __webpack_require__("nh4g") ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);
var keys = getKeys(Properties);
var length = keys.length;
var i = 0;
var P;
while (length > i) dP.f(O, P = keys[i++], Properties[P]);
return O;
};
/***/ }),
/***/ "HrLf":
/***/ (function(module, exports, __webpack_require__) {
// This file is imported into lib/wc client bundles.
if (typeof window !== 'undefined') {
let i
if ((i = window.document.currentScript) && (i = i.src.match(/(.+\/)[^/]+\.js$/))) {
__webpack_require__.p = i[1] // eslint-disable-line
}
}
/***/ }),
/***/ "Iw71":
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__("0/R4");
var document = __webpack_require__("dyZX").document;
// typeof document.createElement is 'object' in old IE
var is = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
return is ? document.createElement(it) : {};
};
/***/ }),
/***/ "K0xU":
/***/ (function(module, exports, __webpack_require__) {
var store = __webpack_require__("VTer")('wks');
var uid = __webpack_require__("ylqs");
var Symbol = __webpack_require__("dyZX").Symbol;
var USE_SYMBOL = typeof Symbol == 'function';
var $exports = module.exports = function (name) {
return store[name] || (store[name] =
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};
$exports.store = store;
/***/ }),
/***/ "KroJ":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("dyZX");
var hide = __webpack_require__("Mukb");
var has = __webpack_require__("aagx");
var SRC = __webpack_require__("ylqs")('src');
var TO_STRING = 'toString';
var $toString = Function[TO_STRING];
var TPL = ('' + $toString).split(TO_STRING);
__webpack_require__("g3g5").inspectSource = function (it) {
return $toString.call(it);
};
(module.exports = function (O, key, val, safe) {
var isFunction = typeof val == 'function';
if (isFunction) has(val, 'name') || hide(val, 'name', key);
if (O[key] === val) return;
if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
if (O === global) {
O[key] = val;
} else if (!safe) {
delete O[key];
hide(O, key, val);
} else if (O[key]) {
O[key] = val;
} else {
hide(O, key, val);
}
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, TO_STRING, function toString() {
return typeof this == 'function' && this[SRC] || $toString.call(this);
});
/***/ }),
/***/ "Kuth":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__("y3w9");
var dPs = __webpack_require__("FJW5");
var enumBugKeys = __webpack_require__("4R4u");
var IE_PROTO = __webpack_require__("YTvA")('IE_PROTO');
var Empty = function () { /* empty */ };
var PROTOTYPE = 'prototype';
// Create object with fake `null` prototype: use iframe Object with cleared prototype
var createDict = function () {
// Thrash, waste and sodomy: IE GC bug
var iframe = __webpack_require__("Iw71")('iframe');
var i = enumBugKeys.length;
var lt = '<';
var gt = '>';
var iframeDocument;
iframe.style.display = 'none';
__webpack_require__("+rLv").appendChild(iframe);
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
// createDict = iframe.contentWindow.Object;
// html.removeChild(iframe);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
iframeDocument.close();
createDict = iframeDocument.F;
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
return createDict();
};
module.exports = Object.create || function create(O, Properties) {
var result;
if (O !== null) {
Empty[PROTOTYPE] = anObject(O);
result = new Empty();
Empty[PROTOTYPE] = null;
// add "__proto__" for Object.getPrototypeOf polyfill
result[IE_PROTO] = O;
} else result = createDict();
return Properties === undefined ? result : dPs(result, Properties);
};
/***/ }),
/***/ "L9s1":
/***/ (function(module, exports, __webpack_require__) {
;
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
var $export = __webpack_require__("XKFU");
var context = __webpack_require__("0sh+");
var INCLUDES = 'includes';
$export($export.P + $export.F * __webpack_require__("UUeW")(INCLUDES), 'String', {
includes: function includes(searchString /* , position = 0 */) {
return !!~context(this, searchString, INCLUDES)
.indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "LQAc":
/***/ (function(module, exports) {
module.exports = false;
/***/ }),
/***/ "LZWt":
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = function (it) {
return toString.call(it).slice(8, -1);
};
/***/ }),
/***/ "Mukb":
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__("hswa");
var createDesc = __webpack_require__("RjD/");
module.exports = __webpack_require__("nh4g") ? function (object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/***/ "RYi7":
/***/ (function(module, exports) {
// 7.1.4 ToInteger
var ceil = Math.ceil;
var floor = Math.floor;
module.exports = function (it) {
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};
/***/ }),
/***/ "RjD/":
/***/ (function(module, exports) {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/***/ "UUeW":
/***/ (function(module, exports, __webpack_require__) {
var MATCH = __webpack_require__("K0xU")('match');
module.exports = function (KEY) {
var re = /./;
try {
'/./'[KEY](re);
} catch (e) {
try {
re[MATCH] = false;
return !'/./'[KEY](re);
} catch (f) { /* empty */ }
} return true;
};
/***/ }),
/***/ "UqcF":
/***/ (function(module, exports) {
exports.f = {}.propertyIsEnumerable;
/***/ }),
/***/ "VTer":
/***/ (function(module, exports, __webpack_require__) {
var core = __webpack_require__("g3g5");
var global = __webpack_require__("dyZX");
var SHARED = '__core-js_shared__';
var store = global[SHARED] || (global[SHARED] = {});
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: core.version,
mode: __webpack_require__("LQAc") ? 'pure' : 'global',
copyright: '© 2018 Denis Pushkarev (zloirock.ru)'
});
/***/ }),
/***/ "XKFU":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("dyZX");
var core = __webpack_require__("g3g5");
var hide = __webpack_require__("Mukb");
var redefine = __webpack_require__("KroJ");
var ctx = __webpack_require__("m0Pp");
var PROTOTYPE = 'prototype';
var $export = function (type, name, source) {
var IS_FORCED = type & $export.F;
var IS_GLOBAL = type & $export.G;
var IS_STATIC = type & $export.S;
var IS_PROTO = type & $export.P;
var IS_BIND = type & $export.B;
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
var key, own, out, exp;
if (IS_GLOBAL) source = name;
for (key in source) {
// contains in native
own = !IS_FORCED && target && target[key] !== undefined;
// export native or passed
out = (own ? target : source)[key];
// bind timers to global for call from export context
exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
// extend global
if (target) redefine(target, key, out, type & $export.U);
// export
if (exports[key] != out) hide(exports, key, exp);
if (IS_PROTO && expProto[key] != out) expProto[key] = out;
}
};
global.core = core;
// type bitmap
$export.F = 1; // forced
$export.G = 2; // global
$export.S = 4; // static
$export.P = 8; // proto
$export.B = 16; // bind
$export.W = 32; // wrap
$export.U = 64; // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;
/***/ }),
/***/ "Xbzi":
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__("0/R4");
var setPrototypeOf = __webpack_require__("i5dc").set;
module.exports = function (that, target, C) {
var S = target.constructor;
var P;
if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
setPrototypeOf(that, P);
} return that;
};
/***/ }),
/***/ "YTvA":
/***/ (function(module, exports, __webpack_require__) {
var shared = __webpack_require__("VTer")('keys');
var uid = __webpack_require__("ylqs");
module.exports = function (key) {
return shared[key] || (shared[key] = uid(key));
};
/***/ }),
/***/ "Ymqv":
/***/ (function(module, exports, __webpack_require__) {
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__("LZWt");
// eslint-disable-next-line no-prototype-builtins
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
return cof(it) == 'String' ? it.split('') : Object(it);
};
/***/ }),
/***/ "Z2Ku":
/***/ (function(module, exports, __webpack_require__) {
;
// https://github.com/tc39/Array.prototype.includes
var $export = __webpack_require__("XKFU");
var $includes = __webpack_require__("w2a5")(true);
$export($export.P, 'Array', {
includes: function includes(el /* , fromIndex = 0 */) {
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
}
});
__webpack_require__("nGyu")('includes');
/***/ }),
/***/ "aCFj":
/***/ (function(module, exports, __webpack_require__) {
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__("Ymqv");
var defined = __webpack_require__("vhPU");
module.exports = function (it) {
return IObject(defined(it));
};
/***/ }),
/***/ "aagx":
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/***/ "apmT":
/***/ (function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__("0/R4");
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (it, S) {
if (!isObject(it)) return it;
var fn, val;
if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
throw TypeError("Can't convert object to primitive value");
};
/***/ }),
/***/ "d/Gc":
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__("RYi7");
var max = Math.max;
var min = Math.min;
module.exports = function (index, length) {
index = toInteger(index);
return index < 0 ? max(index + length, 0) : min(index, length);
};
/***/ }),
/***/ "dyZX":
/***/ (function(module, exports) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
? window : typeof self != 'undefined' && self.Math == Math ? self
// eslint-disable-next-line no-new-func
: Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
/***/ }),
/***/ "eeVq":
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return !!exec();
} catch (e) {
return true;
}
};
/***/ }),
/***/ "f3/d":
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__("hswa").f;
var FProto = Function.prototype;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';
// 19.2.4.2 name
NAME in FProto || __webpack_require__("nh4g") && dP(FProto, NAME, {
configurable: true,
get: function () {
try {
return ('' + this).match(nameRE)[1];
} catch (e) {
return '';
}
}
});
/***/ }),
/***/ "g3g5":
/***/ (function(module, exports) {
var core = module.exports = { version: '2.5.7' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
/***/ }),
/***/ "hswa":
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__("y3w9");
var IE8_DOM_DEFINE = __webpack_require__("xpql");
var toPrimitive = __webpack_require__("apmT");
var dP = Object.defineProperty;
exports.f = __webpack_require__("nh4g") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if (IE8_DOM_DEFINE) try {
return dP(O, P, Attributes);
} catch (e) { /* empty */ }
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
if ('value' in Attributes) O[P] = Attributes.value;
return O;
};
/***/ }),
/***/ "i5dc":
/***/ (function(module, exports, __webpack_require__) {
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
var isObject = __webpack_require__("0/R4");
var anObject = __webpack_require__("y3w9");
var check = function (O, proto) {
anObject(O);
if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
};
module.exports = {
set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
function (test, buggy, set) {
try {
set = __webpack_require__("m0Pp")(Function.call, __webpack_require__("EemH").f(Object.prototype, '__proto__').set, 2);
set(test, []);
buggy = !(test instanceof Array);
} catch (e) { buggy = true; }
return function setPrototypeOf(O, proto) {
check(O, proto);
if (buggy) O.__proto__ = proto;
else set(O, proto);
return O;
};
}({}, false) : undefined),
check: check
};
/***/ }),
/***/ "kJMx":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
var $keys = __webpack_require__("zhAb");
var hiddenKeys = __webpack_require__("4R4u").concat('length', 'prototype');
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return $keys(O, hiddenKeys);
};
/***/ }),
/***/ "m0Pp":
/***/ (function(module, exports, __webpack_require__) {
// optional / simple context binding
var aFunction = __webpack_require__("2OiF");
module.exports = function (fn, that, length) {
aFunction(fn);
if (that === undefined) return fn;
switch (length) {
case 1: return function (a) {
return fn.call(that, a);
};
case 2: return function (a, b) {
return fn.call(that, a, b);
};
case 3: return function (a, b, c) {
return fn.call(that, a, b, c);
};
}
return function (/* ...args */) {
return fn.apply(that, arguments);
};
};
/***/ }),
/***/ "nGyu":
/***/ (function(module, exports, __webpack_require__) {
// 22.1.3.31 Array.prototype[@@unscopables]
var UNSCOPABLES = __webpack_require__("K0xU")('unscopables');
var ArrayProto = Array.prototype;
if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__("Mukb")(ArrayProto, UNSCOPABLES, {});
module.exports = function (key) {
ArrayProto[UNSCOPABLES][key] = true;
};
/***/ }),
/***/ "ne8i":
/***/ (function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
var toInteger = __webpack_require__("RYi7");
var min = Math.min;
module.exports = function (it) {
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
/***/ }),
/***/ "nh4g":
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__("eeVq")(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ "qncB":
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__("XKFU");
var defined = __webpack_require__("vhPU");
var fails = __webpack_require__("eeVq");
var spaces = __webpack_require__("/e88");
var space = '[' + spaces + ']';
var non = '\u200b\u0085';
var ltrim = RegExp('^' + space + space + '*');
var rtrim = RegExp(space + space + '*$');
var exporter = function (KEY, exec, ALIAS) {
var exp = {};
var FORCE = fails(function () {
return !!spaces[KEY]() || non[KEY]() != non;
});
var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
if (ALIAS) exp[ALIAS] = fn;
$export($export.P + $export.F * FORCE, 'String', exp);
};
// 1 -> String#trimLeft
// 2 -> String#trimRight
// 3 -> String#trim
var trim = exporter.trim = function (string, TYPE) {
string = String(defined(string));
if (TYPE & 1) string = string.replace(ltrim, '');
if (TYPE & 2) string = string.replace(rtrim, '');
return string;
};
module.exports = exporter;
/***/ }),
/***/ "quPj":
/***/ (function(module, exports, __webpack_require__) {
// 7.2.8 IsRegExp(argument)
var isObject = __webpack_require__("0/R4");
var cof = __webpack_require__("LZWt");
var MATCH = __webpack_require__("K0xU")('match');
module.exports = function (it) {
var isRegExp;
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
};
/***/ }),
/***/ "vhPU":
/***/ (function(module, exports) {
// 7.2.1 RequireObjectCoercible(argument)
module.exports = function (it) {
if (it == undefined) throw TypeError("Can't call method on " + it);
return it;
};
/***/ }),
/***/ "w2a5":
/***/ (function(module, exports, __webpack_require__) {
// false -> Array#indexOf
// true -> Array#includes
var toIObject = __webpack_require__("aCFj");
var toLength = __webpack_require__("ne8i");
var toAbsoluteIndex = __webpack_require__("d/Gc");
module.exports = function (IS_INCLUDES) {
return function ($this, el, fromIndex) {
var O = toIObject($this);
var length = toLength(O.length);
var index = toAbsoluteIndex(fromIndex, length);
var value;
// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare
if (IS_INCLUDES && el != el) while (length > index) {
value = O[index++];
// eslint-disable-next-line no-self-compare
if (value != value) return true;
// Array#indexOf ignores holes, Array#includes - not
} else for (;length > index; index++) if (IS_INCLUDES || index in O) {
if (O[index] === el) return IS_INCLUDES || index || 0;
} return !IS_INCLUDES && -1;
};
};
/***/ }),
/***/ "xfY5":
/***/ (function(module, exports, __webpack_require__) {
;
var global = __webpack_require__("dyZX");
var has = __webpack_require__("aagx");
var cof = __webpack_require__("LZWt");
var inheritIfRequired = __webpack_require__("Xbzi");
var toPrimitive = __webpack_require__("apmT");
var fails = __webpack_require__("eeVq");
var gOPN = __webpack_require__("kJMx").f;
var gOPD = __webpack_require__("EemH").f;
var dP = __webpack_require__("hswa").f;
var $trim = __webpack_require__("qncB").trim;
var NUMBER = 'Number';
var $Number = global[NUMBER];
var Base = $Number;
var proto = $Number.prototype;
// Opera ~12 has broken Object#toString
var BROKEN_COF = cof(__webpack_require__("Kuth")(proto)) == NUMBER;
var TRIM = 'trim' in String.prototype;
// 7.1.3 ToNumber(argument)
var toNumber = function (argument) {
var it = toPrimitive(argument, false);
if (typeof it == 'string' && it.length > 2) {
it = TRIM ? it.trim() : $trim(it, 3);
var first = it.charCodeAt(0);
var third, radix, maxCode;
if (first === 43 || first === 45) {
third = it.charCodeAt(2);
if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
} else if (first === 48) {
switch (it.charCodeAt(1)) {
case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
default: return +it;
}
for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {
code = digits.charCodeAt(i);
// parseInt parses a string to a first unavailable symbol
// but ToNumber should return NaN if a string contains unavailable symbols
if (code < 48 || code > maxCode) return NaN;
} return parseInt(digits, radix);
}
} return +it;
};
if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
$Number = function Number(value) {
var it = arguments.length < 1 ? 0 : value;
var that = this;
return that instanceof $Number
// check on 1..constructor(foo) case
&& (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)
? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
};
for (var keys = __webpack_require__("nh4g") ? gOPN(Base) : (
// ES3:
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
// ES6 (in case, if modules with ES6 Number statics required before):
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
).split(','), j = 0, key; keys.length > j; j++) {
if (has(Base, key = keys[j]) && !has($Number, key)) {
dP($Number, key, gOPD(Base, key));
}
}
$Number.prototype = proto;
proto.constructor = $Number;
__webpack_require__("KroJ")(global, NUMBER, $Number);
}
/***/ }),
/***/ "xpql":
/***/ (function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__("nh4g") && !__webpack_require__("eeVq")(function () {
return Object.defineProperty(__webpack_require__("Iw71")('div'), 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ "y3w9":
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__("0/R4");
module.exports = function (it) {
if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
};
/***/ }),
/***/ "ylqs":
/***/ (function(module, exports) {
var id = 0;
var px = Math.random();
module.exports = function (key) {
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
/***/ }),
/***/ "zhAb":
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__("aagx");
var toIObject = __webpack_require__("aCFj");
var arrayIndexOf = __webpack_require__("w2a5")(false);
var IE_PROTO = __webpack_require__("YTvA")('IE_PROTO');
module.exports = function (object, names) {
var O = toIObject(object);
var i = 0;
var result = [];
var key;
for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
// Don't enum bug & hidden keys
while (names.length > i) if (has(O, key = names[i++])) {
~arrayIndexOf(result, key) || result.push(key);
}
return result;
};
/***/ })
/******/ });
});
//# sourceMappingURL=VueTable.umd.js.map