vue-laravel-crud 1.4.47 → 1.4.49
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 +31 -55
- package/dist/vue-laravel-crud.min.js +2 -2
- package/dist/vue-laravel-crud.ssr.js +31 -55
- package/package.json +1 -1
- package/src/vue-laravel-crud.vue +19 -16
|
@@ -17035,7 +17035,7 @@ var InfiniteLoading = /*@__PURE__*/getDefaultExportFromCjs(vueInfiniteLoadingExp
|
|
|
17035
17035
|
|
|
17036
17036
|
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}}
|
|
17037
17037
|
|
|
17038
|
-
var css = "tr td[data-v-
|
|
17038
|
+
var css = "tr td[data-v-4ec08e12]:last-child,\ntr td[data-v-4ec08e12]:first-child {\n width: 1%;\n white-space: nowrap; }\n\n.crud-pagination[data-v-4ec08e12] {\n display: flex;\n justify-content: center; }\n\n.crud-header[data-v-4ec08e12] {\n display: flex;\n justify-content: space-between;\n max-height: 3rem; }\n .crud-header[data-v-4ec08e12] .crud-title[data-v-4ec08e12] {\n margin: 0; }\n .crud-header[data-v-4ec08e12] .crud-search[data-v-4ec08e12] {\n max-width: 15rem; }\n .crud-header[data-v-4ec08e12] .crud-search[data-v-4ec08e12] .btn[data-v-4ec08e12] {\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-4ec08e12] .crud-search[data-v-4ec08e12] .btn[data-v-4ec08e12].open[data-v-4ec08e12] {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .crud-header[data-v-4ec08e12] .table-options[data-v-4ec08e12] {\n margin-bottom: 1rem;\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n\n.custom-control[data-v-4ec08e12] {\n position: relative;\n top: -15px; }\n\n@media (min-width: 992px) {\n .table[data-v-4ec08e12] {\n table-layout: auto; }\n .table[data-v-4ec08e12] tbody[data-v-4ec08e12] td[data-v-4ec08e12] {\n overflow: scroll;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */ }\n .table[data-v-4ec08e12] tbody[data-v-4ec08e12] td[data-v-4ec08e12]::-webkit-scrollbar {\n display: none; } }\n";
|
|
17039
17039
|
n(css, {});
|
|
17040
17040
|
|
|
17041
17041
|
function normalizeComponent (
|
|
@@ -17469,14 +17469,20 @@ const _sfc_main = {
|
|
|
17469
17469
|
},
|
|
17470
17470
|
methods: {
|
|
17471
17471
|
infiniteHandler($state) {
|
|
17472
|
-
|
|
17472
|
+
console.debug("infinite handler");
|
|
17473
|
+
const hasNextPage = this.pagination.current_page * this.pagination.per_page <= this.pagination.total;
|
|
17473
17474
|
if (hasNextPage) {
|
|
17474
17475
|
const page = this.pagination.current_page + 1;
|
|
17475
17476
|
this.fetchItems(page, true).then(() => {
|
|
17476
17477
|
$state.loaded();
|
|
17478
|
+
console.debug("infinite handler loaded");
|
|
17479
|
+
}).catch(error => {
|
|
17480
|
+
console.debug("infinite handler error", error);
|
|
17481
|
+
$state.error();
|
|
17477
17482
|
});
|
|
17478
17483
|
} else {
|
|
17479
17484
|
$state.complete();
|
|
17485
|
+
console.debug("infinite handler complete", this.pagination, this.pagination.current_page * this.pagination.per_page, this.pagination.total);
|
|
17480
17486
|
}
|
|
17481
17487
|
const iref = this.$refs.infiniteLoading;
|
|
17482
17488
|
console.debug("iref", iref);
|
|
@@ -18664,40 +18670,9 @@ var _sfc_render = function render() {
|
|
|
18664
18670
|
}, {
|
|
18665
18671
|
"item": item
|
|
18666
18672
|
})], 2);
|
|
18667
|
-
}), 0)], 1), _vm.infiniteScroll ? _c('
|
|
18668
|
-
ref: "infiniteLoading",
|
|
18669
|
-
attrs: {
|
|
18670
|
-
"forceUseInfiniteWrapper": true
|
|
18671
|
-
},
|
|
18672
|
-
on: {
|
|
18673
|
-
"infinite": _vm.infiniteHandler
|
|
18674
|
-
}
|
|
18675
|
-
}, [_c('div', {
|
|
18676
|
-
attrs: {
|
|
18677
|
-
"slot": "spinner"
|
|
18678
|
-
},
|
|
18679
|
-
slot: "spinner"
|
|
18680
|
-
}, [_c('div', {
|
|
18681
|
-
staticClass: "text-center"
|
|
18682
|
-
}, [_vm._v(_vm._s(_vm.messageLoading))])]), _c('div', {
|
|
18683
|
-
attrs: {
|
|
18684
|
-
"slot": "no-more"
|
|
18685
|
-
},
|
|
18686
|
-
slot: "no-more"
|
|
18687
|
-
}, [!_vm.loading ? _c('div', {
|
|
18688
|
-
staticClass: "text-center"
|
|
18689
|
-
}, [_vm._v(_vm._s(_vm.messageNoMore))]) : _vm._e()]), _c('div', {
|
|
18690
|
-
attrs: {
|
|
18691
|
-
"slot": "no-results"
|
|
18692
|
-
},
|
|
18693
|
-
slot: "no-results"
|
|
18694
|
-
}, [!_vm.loading ? _c('div', {
|
|
18695
|
-
staticClass: "text-center"
|
|
18696
|
-
}, [_vm._v(_vm._s(_vm.items.length == 0 ? _vm.messageEmptyResults : _vm.messageNoMore))]) : _vm._e()])]) : _vm._e(), !_vm.loading && _vm.items.length == 0 && !_vm.infiniteScroll ? _c('p', {
|
|
18697
|
-
staticClass: "p-3"
|
|
18698
|
-
}, [_vm._v(" " + _vm._s(_vm.messageEmptyResults) + " ")]) : _vm._e()], 1) : _vm._e(), _vm.displayMode == _vm.displayModes.MODE_CARDS ? _c('div', [!_vm.loading && _vm.items.length == 0 && !_vm.infiniteScroll ? _c('p', {
|
|
18673
|
+
}), 0)], 1), !_vm.loading && _vm.items.length == 0 && !_vm.infiniteScroll ? _c('p', {
|
|
18699
18674
|
staticClass: "p-3"
|
|
18700
|
-
}, [_vm._v(" " + _vm._s(_vm.messageEmptyResults) + " ")]) : _vm._e(), _c('draggable', {
|
|
18675
|
+
}, [_vm._v(" " + _vm._s(_vm.messageEmptyResults) + " ")]) : _vm._e()]) : _vm._e(), _vm.displayMode == _vm.displayModes.MODE_CARDS ? _c('div', [_c('draggable', {
|
|
18701
18676
|
staticClass: "row",
|
|
18702
18677
|
attrs: {
|
|
18703
18678
|
"group": _vm.draggableGroup,
|
|
@@ -18813,9 +18788,26 @@ var _sfc_render = function render() {
|
|
|
18813
18788
|
}, {
|
|
18814
18789
|
"item": item
|
|
18815
18790
|
})], 2)], 1);
|
|
18816
|
-
}), 1), _vm.infiniteScroll ? _c('
|
|
18791
|
+
}), 1), !_vm.loading && _vm.items.length == 0 && !_vm.infiniteScroll ? _c('p', {
|
|
18792
|
+
staticClass: "p-3"
|
|
18793
|
+
}, [_vm._v(" " + _vm._s(_vm.messageEmptyResults) + " ")]) : _vm._e()], 1) : _vm._e(), _vm.displayMode == _vm.displayModes.MODE_CUSTOM ? _c('div', [_c('div', {
|
|
18794
|
+
class: _vm.listContainerClass
|
|
18795
|
+
}, [!_vm.loading && _vm.items.length == 0 && !_vm.infiniteScroll ? _c('p', {
|
|
18796
|
+
staticClass: "p-3"
|
|
18797
|
+
}, [_vm._v(" " + _vm._s(_vm.messageEmptyResults) + " ")]) : _vm._e(), _vm._l(_vm.itemsList, function (item, index) {
|
|
18798
|
+
return _c('div', {
|
|
18799
|
+
key: index,
|
|
18800
|
+
class: _vm.listItemClass
|
|
18801
|
+
}, [_vm._t("card", null, {
|
|
18802
|
+
"item": item
|
|
18803
|
+
})], 2);
|
|
18804
|
+
})], 2)]) : _vm._e(), _c('b-overlay', {
|
|
18805
|
+
attrs: {
|
|
18806
|
+
"show": _vm.loading,
|
|
18807
|
+
"rounded": "sm"
|
|
18808
|
+
}
|
|
18809
|
+
}), _vm.infiniteScroll ? _c('infinite-loading', {
|
|
18817
18810
|
ref: "infiniteLoading",
|
|
18818
|
-
staticClass: "my-2",
|
|
18819
18811
|
attrs: {
|
|
18820
18812
|
"forceUseInfiniteWrapper": true
|
|
18821
18813
|
},
|
|
@@ -18843,23 +18835,7 @@ var _sfc_render = function render() {
|
|
|
18843
18835
|
slot: "no-results"
|
|
18844
18836
|
}, [!_vm.loading ? _c('div', {
|
|
18845
18837
|
staticClass: "text-center"
|
|
18846
|
-
}, [_vm._v(_vm._s(_vm.items.length == 0 ? _vm.messageEmptyResults : _vm.messageNoMore))]) : _vm._e()])]) : _vm._e()
|
|
18847
|
-
class: _vm.listContainerClass
|
|
18848
|
-
}, [_vm.items.length == 0 ? _c('p', {
|
|
18849
|
-
staticClass: "p-3"
|
|
18850
|
-
}, [_vm._v(" " + _vm._s(_vm.messageEmptyResults) + " ")]) : _vm._e(), _vm._l(_vm.itemsList, function (item, index) {
|
|
18851
|
-
return _c('div', {
|
|
18852
|
-
key: index,
|
|
18853
|
-
class: _vm.listItemClass
|
|
18854
|
-
}, [_vm._t("card", null, {
|
|
18855
|
-
"item": item
|
|
18856
|
-
})], 2);
|
|
18857
|
-
})], 2)]) : _vm._e(), _c('b-overlay', {
|
|
18858
|
-
attrs: {
|
|
18859
|
-
"show": _vm.loading,
|
|
18860
|
-
"rounded": "sm"
|
|
18861
|
-
}
|
|
18862
|
-
}), !_vm.infiniteScroll ? _c('div', {
|
|
18838
|
+
}, [_vm._v(_vm._s(_vm.items.length == 0 ? _vm.messageEmptyResults : _vm.messageNoMore))]) : _vm._e()])]) : _vm._e(), !_vm.infiniteScroll ? _c('div', {
|
|
18863
18839
|
staticClass: "crud-paginator"
|
|
18864
18840
|
}, [_vm.showPaginator ? _c('b-pagination', {
|
|
18865
18841
|
attrs: {
|
|
@@ -18995,7 +18971,7 @@ var _sfc_render = function render() {
|
|
|
18995
18971
|
}) : _vm._e()], 2)], 1);
|
|
18996
18972
|
};
|
|
18997
18973
|
var _sfc_staticRenderFns = [];
|
|
18998
|
-
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "
|
|
18974
|
+
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "4ec08e12", null, null);
|
|
18999
18975
|
var component = __component__.exports;
|
|
19000
18976
|
|
|
19001
18977
|
// Import vue component
|