Skip to content

Commit

Permalink
yarn upgrade and build bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
ratiw committed Jun 2, 2017
1 parent 25fa17e commit e6c2e2e
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 49 deletions.
1 change: 1 addition & 0 deletions dist/[object Object]

Large diffs are not rendered by default.

126 changes: 101 additions & 25 deletions dist/vuetable-2-full.js
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ var Component = __webpack_require__(1)(
/* moduleIdentifier (server only) */
null
)
Component.options.__file = "C:\\work\\Github\\vuetable-2\\src\\components\\VuetablePaginationMixin.vue"
Component.options.__file = "/Users/ratiw/Code/vuetable-2/src/components/VuetablePaginationMixin.vue"
if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}

/* hot reload */
Expand Down Expand Up @@ -910,7 +910,7 @@ var Component = __webpack_require__(1)(
/* moduleIdentifier (server only) */
null
)
Component.options.__file = "C:\\work\\Github\\vuetable-2\\src\\components\\Vuetable.vue"
Component.options.__file = "/Users/ratiw/Code/vuetable-2/src/components/Vuetable.vue"
if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
if (Component.options.functional) {console.error("[vue-loader] Vuetable.vue: functional components are not supported with templates, they should use render functions.")}

Expand Down Expand Up @@ -950,7 +950,7 @@ var Component = __webpack_require__(1)(
/* moduleIdentifier (server only) */
null
)
Component.options.__file = "C:\\work\\Github\\vuetable-2\\src\\components\\VuetablePagination.vue"
Component.options.__file = "/Users/ratiw/Code/vuetable-2/src/components/VuetablePagination.vue"
if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
if (Component.options.functional) {console.error("[vue-loader] VuetablePagination.vue: functional components are not supported with templates, they should use render functions.")}

Expand Down Expand Up @@ -990,7 +990,7 @@ var Component = __webpack_require__(1)(
/* moduleIdentifier (server only) */
null
)
Component.options.__file = "C:\\work\\Github\\vuetable-2\\src\\components\\VuetablePaginationDropdown.vue"
Component.options.__file = "/Users/ratiw/Code/vuetable-2/src/components/VuetablePaginationDropdown.vue"
if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
if (Component.options.functional) {console.error("[vue-loader] VuetablePaginationDropdown.vue: functional components are not supported with templates, they should use render functions.")}

Expand Down Expand Up @@ -1030,7 +1030,7 @@ var Component = __webpack_require__(1)(
/* moduleIdentifier (server only) */
null
)
Component.options.__file = "C:\\work\\Github\\vuetable-2\\src\\components\\VuetablePaginationInfo.vue"
Component.options.__file = "/Users/ratiw/Code/vuetable-2/src/components/VuetablePaginationInfo.vue"
if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
if (Component.options.functional) {console.error("[vue-loader] VuetablePaginationInfo.vue: functional components are not supported with templates, they should use render functions.")}

Expand Down Expand Up @@ -1925,12 +1925,33 @@ exports.default = {
type: String,
default: ''
},
httpMethod: {
type: String,
default: 'get',
validator: function validator(value) {
return ['get', 'post'].indexOf(value) > -1;
}
},
reactiveApiUrl: {
type: Boolean,
default: true
},
apiMode: {
type: Boolean,
default: true
},
data: {
type: Array,
type: [Array, Object],
default: function _default() {
return null;
}
},
dataTotal: {
type: Number,
default: 0
},
dataManager: {
type: Function,
default: function _default() {
return null;
}
Expand Down Expand Up @@ -2009,10 +2030,7 @@ exports.default = {
type: String,
default: 'id'
},
renderIcon: {
type: Function,
default: null
},

css: {
type: Object,
default: function _default() {
Expand Down Expand Up @@ -2058,12 +2076,9 @@ exports.default = {
this.fireEvent('initialized', this.tableFields);
});

if (this.apiMode && this.loadOnStart) {
if (this.loadOnStart) {
this.loadData();
}
if (this.apiMode == false && this.data.length > 0) {
this.setData(this.data);
}
},

computed: {
Expand All @@ -2089,7 +2104,6 @@ exports.default = {
displayEmptyDataRow: function displayEmptyDataRow() {
return this.countTableData === 0 && this.noDataTemplate.length > 0;
},

lessThanMinRows: function lessThanMinRows() {
if (this.tableData === null || this.tableData.length === 0) {
return true;
Expand All @@ -2105,6 +2119,12 @@ exports.default = {
}

return this.minRows - this.tableData.length;
},
isApiMode: function isApiMode() {
return this.apiMode;
},
isDataMode: function isDataMode() {
return !this.apiMode;
}
},
methods: {
Expand Down Expand Up @@ -2143,7 +2163,20 @@ exports.default = {
},
setData: function setData(data) {
this.apiMode = false;
this.tableData = data;
if (Array.isArray(data)) {
this.tableData = data;
return;
}

this.fireEvent('loading');

this.tableData = this.getObjectValue(data, this.dataPath, null);
this.tablePagination = this.getObjectValue(data, this.paginationPath, null);

this.$nextTick(function () {
this.fireEvent('pagination-data', this.tablePagination);
this.fireEvent('loaded');
});
},
setTitle: function setTitle(str) {
if (this.isSpecialField(str)) {
Expand All @@ -2162,6 +2195,9 @@ exports.default = {

return title;
},
renderSequence: function renderSequence(index) {
return this.tablePagination ? this.tablePagination.from + index : index;
},
isSpecialField: function isSpecialField(fieldName) {
return fieldName.slice(0, 2) === '__';
},
Expand All @@ -2185,13 +2221,18 @@ exports.default = {
var success = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.loadSuccess;
var failed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.loadFailed;

if (!this.apiMode) return;
if (this.isDataMode) {
this.callDataManager();
return;
}

this.fireEvent('loading');

this.httpOptions['params'] = this.getAllQueryParams();

_axios2.default.get(this.apiUrl, this.httpOptions).then(success, failed);
_axios2.default[this.httpMethod](this.apiUrl, this.httpOptions).then(success, failed).catch(function () {
return failed();
});
},
loadSuccess: function loadSuccess(response) {
this.fireEvent('load-success', response);
Expand Down Expand Up @@ -2307,7 +2348,7 @@ exports.default = {
return this.sortOrder[i].field === field.name && this.sortOrder[i].sortField === field.sortField;
},
orderBy: function orderBy(field, event) {
if (!this.isSortable(field) || !this.apiMode) return;
if (!this.isSortable(field)) return;

var key = this.multiSortKey.toLowerCase() + 'Key';

Expand Down Expand Up @@ -2564,7 +2605,39 @@ exports.default = {
renderIconTag: function renderIconTag(classes) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';

return this.renderIcon === null ? '<i class="' + classes.join(' ') + '" ' + options + '></i>' : this.renderIcon(classes, options);
return typeof this.css.renderIcon === 'undefined' ? '<i class="' + classes.join(' ') + '" ' + options + '></i>' : this.css.renderIcon(classes, options);
},
makePagination: function makePagination() {
var total = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
var perPage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var currentPage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;

var pagination = {};
total = total === null ? this.dataTotal : total;
perPage = perPage === null ? this.perPage : perPage;
currentPage = currentPage === null ? this.currentPage : currentPage;

return {
'total': total,
'per_page': perPage,
'current_page': currentPage,
'last_page': Math.ceil(total / perPage) || 0,
'next_page_url': '',
'prev_page_url': '',
'from': (currentPage - 1) * perPage + 1,
'to': Math.min(currentPage * perPage, total)
};
},
normalizeSortOrder: function normalizeSortOrder() {
this.sortOrder.forEach(function (item) {
item.sortField = item.sortField || item.field;
});
},
callDataManager: function callDataManager() {
if (this.dataManager === null) return;

this.normalizeSortOrder();
this.setData(this.dataManager(this.sortOrder, this.makePagination()));
},
onRowClass: function onRowClass(dataItem, index) {
if (this.rowClassCallback !== '') {
Expand Down Expand Up @@ -2627,9 +2700,8 @@ exports.default = {
this.loadData();
}
},

'apiUrl': function apiUrl(newVal, oldVal) {
if (newVal !== oldVal) this.refresh();
if (this.reactiveApiUrl && newVal !== oldVal) this.refresh();
}
}
};
Expand Down Expand Up @@ -3175,6 +3247,10 @@ process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;

process.listeners = function (name) { return [] }

process.binding = function (name) {
throw new Error('process.binding is not supported');
Expand Down Expand Up @@ -3204,7 +3280,7 @@ var Component = __webpack_require__(1)(
/* moduleIdentifier (server only) */
null
)
Component.options.__file = "C:\\work\\Github\\vuetable-2\\src\\components\\VuetablePaginationInfoMixin.vue"
Component.options.__file = "/Users/ratiw/Code/vuetable-2/src/components/VuetablePaginationInfoMixin.vue"
if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}

/* hot reload */
Expand Down Expand Up @@ -3368,10 +3444,10 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
}
}
}, [_vm._l((_vm.tableFields), function(field) {
return [(field.visible) ? [(_vm.isSpecialField(field.name)) ? [(_vm.apiMode && _vm.extractName(field.name) == '__sequence') ? _c('td', {
return [(field.visible) ? [(_vm.isSpecialField(field.name)) ? [(_vm.extractName(field.name) == '__sequence') ? _c('td', {
class: ['vuetable-sequence', field.dataClass],
domProps: {
"innerHTML": _vm._s(_vm.tablePagination.from + index)
"innerHTML": _vm._s(_vm.renderSequence(index))
}
}) : _vm._e(), _vm._v(" "), (_vm.extractName(field.name) == '__handle') ? _c('td', {
class: ['vuetable-handle', field.dataClass],
Expand Down
2 changes: 1 addition & 1 deletion dist/vuetable-2.js

Large diffs are not rendered by default.

44 changes: 21 additions & 23 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ [email protected]:
resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f"

agent-base@2:
version "2.1.0"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-2.1.0.tgz#193455e4347bca6b05847cb81e939bb325446da8"
version "2.1.1"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-2.1.1.tgz#d6de10d5af6132d5bd692427d46fc538539094c7"
dependencies:
extend "~3.0.0"
semver "~5.0.1"
Expand Down Expand Up @@ -854,8 +854,8 @@ babelify@^7.3.0:
object-assign "^4.0.0"

babylon@^6.11.0, babylon@^6.13.0, babylon@^6.15.0:
version "6.17.1"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.1.tgz#17f14fddf361b695981fe679385e4f1c01ebd86f"
version "6.17.2"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.2.tgz#201d25ef5f892c41bae49488b08db0dd476e9f5c"

[email protected]:
version "1.0.2"
Expand Down Expand Up @@ -1042,10 +1042,6 @@ browserslist@^2.1.2:
caniuse-lite "^1.0.30000670"
electron-to-chromium "^1.3.11"

buffer-shims@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51"

buffer-xor@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9"
Expand Down Expand Up @@ -1114,8 +1110,8 @@ caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000676.tgz#82ea578237637c8ff34a28acaade373b624c4ea8"

caniuse-lite@^1.0.30000670:
version "1.0.30000674"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000674.tgz#3eabc5e40ae2dce6375dd292f116b9e25bd505a7"
version "1.0.30000676"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000676.tgz#1e962123f48073f0c51c4ea0651dd64d25786498"

caseless@~0.11.0:
version "0.11.0"
Expand Down Expand Up @@ -2825,8 +2821,8 @@ is-directory@^0.3.1:
resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1"

is-dotfile@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d"
version "1.0.3"
resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"

is-equal-shallow@^0.1.3:
version "0.1.3"
Expand Down Expand Up @@ -3703,8 +3699,8 @@ no-case@^2.2.0:
lower-case "^1.1.1"

node-dir@^0.1.10:
version "0.1.16"
resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.16.tgz#d2ef583aa50b90d93db8cdd26fcea58353957fe4"
version "0.1.17"
resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5"
dependencies:
minimatch "^3.0.2"

Expand Down Expand Up @@ -3737,8 +3733,8 @@ node-libs-browser@^2.0.0:
vm-browserify "0.0.4"

node-pre-gyp@^0.6.29:
version "0.6.34"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.34.tgz#94ad1c798a11d7fc67381b50d47f8cc18d9799f7"
version "0.6.36"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz#db604112cb74e0d477554e9b505b17abddfab786"
dependencies:
mkdirp "^0.5.1"
nopt "^4.0.1"
Expand Down Expand Up @@ -4526,8 +4522,10 @@ randomatic@^1.1.3:
kind-of "^3.0.2"

randombytes@^2.0.0, randombytes@^2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.3.tgz#674c99760901c3c4112771a31e521dc349cc09ec"
version "2.0.4"
resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.4.tgz#9551df208422c8f80eb58e2326dd0b840ff22efd"
dependencies:
safe-buffer "^5.0.1"

range-parser@^1.0.3, range-parser@^1.2.0, range-parser@~1.2.0:
version "1.2.0"
Expand Down Expand Up @@ -4584,14 +4582,14 @@ [email protected]:
string_decoder "~0.10.x"

readable-stream@2, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.2.6:
version "2.2.9"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8"
version "2.2.10"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.10.tgz#effe72bb7c884c0dd335e2379d526196d9d011ee"
dependencies:
buffer-shims "~1.0.0"
core-util-is "~1.0.0"
inherits "~2.0.1"
isarray "~1.0.0"
process-nextick-args "~1.0.6"
safe-buffer "^5.0.1"
string_decoder "~1.0.0"
util-deprecate "~1.0.1"

Expand Down Expand Up @@ -5465,8 +5463,8 @@ [email protected]:
yargs "~3.10.0"

[email protected]:
version "3.0.13"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.13.tgz#1871d736aa1e550c728d7e5a6556579e70925d68"
version "3.0.15"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.15.tgz#aacb323a846b234602270dead8a32441a8806f42"
dependencies:
commander "~2.9.0"
source-map "~0.5.1"
Expand Down

0 comments on commit e6c2e2e

Please sign in to comment.