vue-laravel-crud 1.4.49 → 1.4.51
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.
|
@@ -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-cefd5e40]:last-child,\ntr td[data-v-cefd5e40]:first-child {\n width: 1%;\n white-space: nowrap; }\n\n.crud-pagination[data-v-cefd5e40] {\n display: flex;\n justify-content: center; }\n\n.crud-header[data-v-cefd5e40] {\n display: flex;\n justify-content: space-between;\n max-height: 3rem; }\n .crud-header[data-v-cefd5e40] .crud-title[data-v-cefd5e40] {\n margin: 0; }\n .crud-header[data-v-cefd5e40] .crud-search[data-v-cefd5e40] {\n max-width: 15rem; }\n .crud-header[data-v-cefd5e40] .crud-search[data-v-cefd5e40] .btn[data-v-cefd5e40] {\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-cefd5e40] .crud-search[data-v-cefd5e40] .btn[data-v-cefd5e40].open[data-v-cefd5e40] {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .crud-header[data-v-cefd5e40] .table-options[data-v-cefd5e40] {\n margin-bottom: 1rem;\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n\n.custom-control[data-v-cefd5e40] {\n position: relative;\n top: -15px; }\n\n@media (min-width: 992px) {\n .table[data-v-cefd5e40] {\n table-layout: auto; }\n .table[data-v-cefd5e40] tbody[data-v-cefd5e40] td[data-v-cefd5e40] {\n overflow: scroll;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */ }\n .table[data-v-cefd5e40] tbody[data-v-cefd5e40] td[data-v-cefd5e40]::-webkit-scrollbar {\n display: none; } }\n";
|
|
17039
17039
|
n(css, {});
|
|
17040
17040
|
|
|
17041
17041
|
function normalizeComponent (
|
|
@@ -17141,6 +17141,7 @@ const _sfc_main = {
|
|
|
17141
17141
|
return {
|
|
17142
17142
|
moment: moment,
|
|
17143
17143
|
loading: false,
|
|
17144
|
+
firstLoad: false,
|
|
17144
17145
|
item: {
|
|
17145
17146
|
id: null
|
|
17146
17147
|
},
|
|
@@ -17469,33 +17470,23 @@ const _sfc_main = {
|
|
|
17469
17470
|
},
|
|
17470
17471
|
methods: {
|
|
17471
17472
|
infiniteHandler($state) {
|
|
17472
|
-
|
|
17473
|
-
const hasNextPage = this.pagination.current_page * this.pagination.per_page <= this.pagination.total;
|
|
17473
|
+
const hasNextPage = !this.firstLoad || this.pagination.current_page * this.pagination.per_page <= this.pagination.total;
|
|
17474
17474
|
if (hasNextPage) {
|
|
17475
17475
|
const page = this.pagination.current_page + 1;
|
|
17476
17476
|
this.fetchItems(page, true).then(() => {
|
|
17477
17477
|
$state.loaded();
|
|
17478
|
-
console.debug("infinite handler loaded");
|
|
17479
17478
|
}).catch(error => {
|
|
17480
17479
|
console.debug("infinite handler error", error);
|
|
17481
17480
|
$state.error();
|
|
17482
17481
|
});
|
|
17483
17482
|
} else {
|
|
17484
17483
|
$state.complete();
|
|
17485
|
-
console.debug("infinite handler complete", this.pagination, this.pagination.current_page * this.pagination.per_page, this.pagination.total);
|
|
17486
|
-
}
|
|
17487
|
-
const iref = this.$refs.infiniteLoading;
|
|
17488
|
-
console.debug("iref", iref);
|
|
17489
|
-
if (iref) {
|
|
17490
|
-
console.debug(iref.getCurrentDistance(), iref.getScrollParent(), iref.status, iref.$el);
|
|
17491
17484
|
}
|
|
17492
17485
|
},
|
|
17493
17486
|
onDraggableAdded(event) {
|
|
17494
|
-
console.log('Se agregó un nuevo elemento a la lista', event);
|
|
17495
17487
|
this.$emit("draggableAdded", event);
|
|
17496
17488
|
},
|
|
17497
17489
|
onDraggableChange(event) {
|
|
17498
|
-
console.log('Lista change', event);
|
|
17499
17490
|
this.$emit("draggableChange", event);
|
|
17500
17491
|
},
|
|
17501
17492
|
setupFilters() {
|
|
@@ -17660,6 +17651,7 @@ const _sfc_main = {
|
|
|
17660
17651
|
if (!this.ajax) {
|
|
17661
17652
|
return;
|
|
17662
17653
|
}
|
|
17654
|
+
if (this.infiniteScroll) this.pagination.current_page = 1;
|
|
17663
17655
|
this.fetchItems(this.pagination.current_page);
|
|
17664
17656
|
},
|
|
17665
17657
|
isColumnHasFilter(column) {
|
|
@@ -17687,6 +17679,7 @@ const _sfc_main = {
|
|
|
17687
17679
|
this.items = result.entities[this.model.entity];
|
|
17688
17680
|
console.debug("fetch page vuex ", page, this.items);
|
|
17689
17681
|
this.loading = false;
|
|
17682
|
+
this.firstLoad = true;
|
|
17690
17683
|
},
|
|
17691
17684
|
fetchItems() {
|
|
17692
17685
|
let page = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
@@ -17747,6 +17740,7 @@ const _sfc_main = {
|
|
|
17747
17740
|
}
|
|
17748
17741
|
}
|
|
17749
17742
|
this.loading = false;
|
|
17743
|
+
this.firstLoad = true;
|
|
17750
17744
|
this.$emit("afterFetch", {});
|
|
17751
17745
|
}).catch(error => {
|
|
17752
17746
|
//console.debug(error);
|
|
@@ -18971,7 +18965,7 @@ var _sfc_render = function render() {
|
|
|
18971
18965
|
}) : _vm._e()], 2)], 1);
|
|
18972
18966
|
};
|
|
18973
18967
|
var _sfc_staticRenderFns = [];
|
|
18974
|
-
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "
|
|
18968
|
+
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "cefd5e40", null, null);
|
|
18975
18969
|
var component = __component__.exports;
|
|
18976
18970
|
|
|
18977
18971
|
// Import vue component
|