vue-laravel-crud 1.6.4 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue-laravel-crud.esm.js +40 -5
- package/dist/vue-laravel-crud.min.js +3 -3
- package/dist/vue-laravel-crud.ssr.js +226 -190
- package/package.json +1 -1
- package/src/vue-laravel-crud.vue +35 -2
|
@@ -12115,7 +12115,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
12115
12115
|
|
|
12116
12116
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
12117
12117
|
|
|
12118
|
-
var css = "tr td[data-v-
|
|
12118
|
+
var css = "tr td[data-v-a4bec9a9]:last-child,\ntr td[data-v-a4bec9a9]:first-child {\n width: 1%;\n white-space: nowrap; }\n\n.crud-pagination[data-v-a4bec9a9] {\n display: flex;\n align-items: center;\n width: 100%;\n justify-content: center;\n margin-top: 1rem; }\n\n.crud-header[data-v-a4bec9a9] {\n display: flex;\n justify-content: space-between;\n max-height: 3rem; }\n .crud-header[data-v-a4bec9a9] .crud-title[data-v-a4bec9a9] {\n margin: 0; }\n .crud-header[data-v-a4bec9a9] .crud-search[data-v-a4bec9a9] {\n max-width: 15rem; }\n .crud-header[data-v-a4bec9a9] .crud-search[data-v-a4bec9a9] .btn[data-v-a4bec9a9] {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-top-right-radius: 0.375rem;\n border-bottom-right-radius: 0.375rem; }\n .crud-header[data-v-a4bec9a9] .crud-search[data-v-a4bec9a9] .btn[data-v-a4bec9a9].open[data-v-a4bec9a9] {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .crud-header[data-v-a4bec9a9] .table-options[data-v-a4bec9a9] {\n margin-bottom: 1rem;\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n\n.custom-control[data-v-a4bec9a9] {\n position: relative;\n top: -15px; }\n\n@media (min-width: 992px) {\n .table[data-v-a4bec9a9] {\n table-layout: auto; }\n .table[data-v-a4bec9a9] tbody[data-v-a4bec9a9] td[data-v-a4bec9a9] {\n overflow: scroll;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */ }\n .table[data-v-a4bec9a9] tbody[data-v-a4bec9a9] td[data-v-a4bec9a9]::-webkit-scrollbar {\n display: none; } }\n";
|
|
12119
12119
|
n(css, {});
|
|
12120
12120
|
|
|
12121
12121
|
function normalizeComponent (
|
|
@@ -12377,6 +12377,10 @@ const _sfc_main = {
|
|
|
12377
12377
|
type: Boolean,
|
|
12378
12378
|
default: true
|
|
12379
12379
|
},
|
|
12380
|
+
showPrincipalSortBtn: {
|
|
12381
|
+
type: Boolean,
|
|
12382
|
+
default: false
|
|
12383
|
+
},
|
|
12380
12384
|
showHeader: {
|
|
12381
12385
|
type: Boolean,
|
|
12382
12386
|
default: true
|
|
@@ -12414,7 +12418,7 @@ const _sfc_main = {
|
|
|
12414
12418
|
type: Number
|
|
12415
12419
|
},
|
|
12416
12420
|
colXl: {
|
|
12417
|
-
default:
|
|
12421
|
+
default: 4,
|
|
12418
12422
|
type: Number
|
|
12419
12423
|
},
|
|
12420
12424
|
selectHover: {
|
|
@@ -12524,6 +12528,10 @@ const _sfc_main = {
|
|
|
12524
12528
|
masonryColumns: {
|
|
12525
12529
|
type: Number,
|
|
12526
12530
|
default: 3
|
|
12531
|
+
},
|
|
12532
|
+
principalSortColumn: {
|
|
12533
|
+
type: String,
|
|
12534
|
+
default: "id"
|
|
12527
12535
|
}
|
|
12528
12536
|
},
|
|
12529
12537
|
mounted() {
|
|
@@ -12607,7 +12615,18 @@ const _sfc_main = {
|
|
|
12607
12615
|
return this.paginationIndexStart + this.pagination.per_page;
|
|
12608
12616
|
},
|
|
12609
12617
|
finalFilters() {
|
|
12610
|
-
return [...this.filters, ...this.filter, ...this.internalFilter];
|
|
12618
|
+
return [...this.filters, ...this.filter, ...this.internalFilter, ...this.sortFilter];
|
|
12619
|
+
},
|
|
12620
|
+
sortFilter() {
|
|
12621
|
+
if (this.showPrincipalSortBtn) {
|
|
12622
|
+
if (this.principalSort) {
|
|
12623
|
+
return [[this.principalSortColumn, 'SORTASC', '']];
|
|
12624
|
+
} else {
|
|
12625
|
+
return [[this.principalSortColumn, 'SORTDESC', '']];
|
|
12626
|
+
}
|
|
12627
|
+
} else {
|
|
12628
|
+
return [];
|
|
12629
|
+
}
|
|
12611
12630
|
},
|
|
12612
12631
|
internalFilter() {
|
|
12613
12632
|
let filter = [];
|
|
@@ -12631,6 +12650,12 @@ const _sfc_main = {
|
|
|
12631
12650
|
// Actualizar isMobile cuando cambia el tamaño de la pantalla
|
|
12632
12651
|
this.isMobile = window.matchMedia("(max-width: 1024px)").matches;
|
|
12633
12652
|
},
|
|
12653
|
+
togglePrincipalSort() {
|
|
12654
|
+
this.principalSort = !this.principalSort;
|
|
12655
|
+
setTimeout(() => {
|
|
12656
|
+
this.refresh();
|
|
12657
|
+
}, 1);
|
|
12658
|
+
},
|
|
12634
12659
|
infiniteHandler($state) {
|
|
12635
12660
|
const hasNextPage = (this.pagination.total > 0 || !this.firstLoad) && (!this.firstLoad || this.pagination.current_page * this.pagination.per_page <= this.pagination.total);
|
|
12636
12661
|
console.debug("Has next page", hasNextPage, this.pagination);
|
|
@@ -13548,7 +13573,17 @@ var _sfc_render = function render() {
|
|
|
13548
13573
|
}, [_vm._t("tableActions", function () {
|
|
13549
13574
|
return [_vm._t("tableActionsPrepend", null, {
|
|
13550
13575
|
"loading": _vm.loading
|
|
13551
|
-
}), _vm.
|
|
13576
|
+
}), _vm.showPrincipalSortBtn ? _c('b-button', {
|
|
13577
|
+
attrs: {
|
|
13578
|
+
"variant": "success",
|
|
13579
|
+
"disabled": _vm.loading
|
|
13580
|
+
},
|
|
13581
|
+
on: {
|
|
13582
|
+
"click": function ($event) {
|
|
13583
|
+
return _vm.togglePrincipalSort();
|
|
13584
|
+
}
|
|
13585
|
+
}
|
|
13586
|
+
}, [_vm.principalSort ? _c('b-icon-sort-numeric-down') : _c('b-icon-sort-numeric-up')], 1) : _vm._e(), _vm.showCreateBtn ? _c('b-button', {
|
|
13552
13587
|
attrs: {
|
|
13553
13588
|
"variant": "success",
|
|
13554
13589
|
"disabled": _vm.loading
|
|
@@ -14253,7 +14288,7 @@ var _sfc_render = function render() {
|
|
|
14253
14288
|
}) : _vm._e()], 2)], 1);
|
|
14254
14289
|
};
|
|
14255
14290
|
var _sfc_staticRenderFns = [];
|
|
14256
|
-
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "
|
|
14291
|
+
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "a4bec9a9", null, null);
|
|
14257
14292
|
var component = __component__.exports;
|
|
14258
14293
|
|
|
14259
14294
|
// Import vue component
|