vue-laravel-crud 1.7.7 → 1.7.9
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 +73 -13
- package/dist/vue-laravel-crud.min.js +1 -1
- package/dist/vue-laravel-crud.ssr.js +73 -13
- package/package.json +1 -1
- package/src/vue-laravel-crud.vue +40 -10
|
@@ -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-e5a86231]:last-child,\ntr td[data-v-e5a86231]:first-child {\n width: 1%;\n white-space: nowrap; }\n\n.crud-pagination[data-v-e5a86231] {\n display: flex;\n align-items: center;\n width: 100%;\n justify-content: center;\n margin-top: 1rem; }\n\n.crud-header[data-v-e5a86231] {\n display: flex;\n justify-content: space-between;\n max-height: 3rem; }\n .crud-header[data-v-e5a86231] .crud-title[data-v-e5a86231] {\n margin: 0; }\n .crud-header[data-v-e5a86231] .crud-search[data-v-e5a86231] {\n max-width: 15rem; }\n .crud-header[data-v-e5a86231] .crud-search[data-v-e5a86231] .btn[data-v-e5a86231] {\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-e5a86231] .crud-search[data-v-e5a86231] .btn[data-v-e5a86231].open[data-v-e5a86231] {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .crud-header[data-v-e5a86231] .table-options[data-v-e5a86231] {\n margin-bottom: 1rem;\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n\n.custom-control[data-v-e5a86231] {\n position: relative; }\n\n@media (min-width: 992px) {\n .table[data-v-e5a86231] {\n table-layout: auto; }\n .table[data-v-e5a86231] tbody[data-v-e5a86231] td[data-v-e5a86231] {\n overflow: scroll;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */ }\n .table[data-v-e5a86231] tbody[data-v-e5a86231] td[data-v-e5a86231]::-webkit-scrollbar {\n display: none; } }\n";
|
|
12119
12119
|
n(css, {});
|
|
12120
12120
|
|
|
12121
12121
|
function normalizeComponent (
|
|
@@ -12220,6 +12220,7 @@ const _sfc_main = {
|
|
|
12220
12220
|
},
|
|
12221
12221
|
data() {
|
|
12222
12222
|
return {
|
|
12223
|
+
crudUuid,
|
|
12223
12224
|
moment: moment,
|
|
12224
12225
|
loading: false,
|
|
12225
12226
|
firstLoad: false,
|
|
@@ -12253,7 +12254,8 @@ const _sfc_main = {
|
|
|
12253
12254
|
isMobile: false,
|
|
12254
12255
|
refreshing: false,
|
|
12255
12256
|
fetchError: false,
|
|
12256
|
-
principalSort: false
|
|
12257
|
+
principalSort: false,
|
|
12258
|
+
exportFormat: 'JSON'
|
|
12257
12259
|
};
|
|
12258
12260
|
},
|
|
12259
12261
|
watch: {
|
|
@@ -12564,6 +12566,7 @@ const _sfc_main = {
|
|
|
12564
12566
|
}
|
|
12565
12567
|
},
|
|
12566
12568
|
mounted() {
|
|
12569
|
+
this.crudUuid = ''.now;
|
|
12567
12570
|
this.isMobile = window.matchMedia("(max-width: 1024px)").matches;
|
|
12568
12571
|
|
|
12569
12572
|
// Agregar un oyente de eventos para actualizar isMobile cuando cambia el tamaño de la pantalla
|
|
@@ -13215,6 +13218,9 @@ const _sfc_main = {
|
|
|
13215
13218
|
});
|
|
13216
13219
|
}
|
|
13217
13220
|
},
|
|
13221
|
+
showExportModal() {
|
|
13222
|
+
this.$refs["modal-export"].show();
|
|
13223
|
+
},
|
|
13218
13224
|
exportItems() {
|
|
13219
13225
|
if (this.useVuexORM) {
|
|
13220
13226
|
return;
|
|
@@ -13236,7 +13242,7 @@ const _sfc_main = {
|
|
|
13236
13242
|
exportItems: exportItems
|
|
13237
13243
|
};
|
|
13238
13244
|
}
|
|
13239
|
-
params.format =
|
|
13245
|
+
params.format = this.exportFormat;
|
|
13240
13246
|
this.loading = true;
|
|
13241
13247
|
axios.get(this.apiUrl + "/" + this.modelName + "/export", {
|
|
13242
13248
|
params: params,
|
|
@@ -13249,6 +13255,9 @@ const _sfc_main = {
|
|
|
13249
13255
|
this.loading = false;
|
|
13250
13256
|
});
|
|
13251
13257
|
},
|
|
13258
|
+
showImportModal() {
|
|
13259
|
+
this.$refs["modal-import"].show();
|
|
13260
|
+
},
|
|
13252
13261
|
importItems() {
|
|
13253
13262
|
let formData = new FormData();
|
|
13254
13263
|
formData.append("file", this.fileImport);
|
|
@@ -13816,15 +13825,13 @@ var _sfc_render = function render() {
|
|
|
13816
13825
|
return [_vm._t("tableActionsPrepend", null, {
|
|
13817
13826
|
"loading": _vm.loading
|
|
13818
13827
|
}), _vm.showImport ? _c('b-button', {
|
|
13819
|
-
directives: [{
|
|
13820
|
-
name: "b-modal",
|
|
13821
|
-
rawName: "v-b-modal.modal-import",
|
|
13822
|
-
modifiers: {
|
|
13823
|
-
"modal-import": true
|
|
13824
|
-
}
|
|
13825
|
-
}],
|
|
13826
13828
|
attrs: {
|
|
13827
13829
|
"variant": "info"
|
|
13830
|
+
},
|
|
13831
|
+
on: {
|
|
13832
|
+
"click": function ($event) {
|
|
13833
|
+
return _vm.showImportModal();
|
|
13834
|
+
}
|
|
13828
13835
|
}
|
|
13829
13836
|
}, [_c('b-icon-cloud-upload'), _vm._v(_vm._s(_vm.messageImport) + " ")], 1) : _vm._e(), _vm.showExport ? _c('b-button', {
|
|
13830
13837
|
attrs: {
|
|
@@ -13832,7 +13839,7 @@ var _sfc_render = function render() {
|
|
|
13832
13839
|
},
|
|
13833
13840
|
on: {
|
|
13834
13841
|
"click": function ($event) {
|
|
13835
|
-
return _vm.
|
|
13842
|
+
return _vm.showExportModal();
|
|
13836
13843
|
}
|
|
13837
13844
|
}
|
|
13838
13845
|
}, [_c('b-icon-cloud-download'), _vm._v(_vm._s(_vm.messageExport) + " ")], 1) : _vm._e(), _vm.showPrincipalSortBtn ? _c('b-button', {
|
|
@@ -14585,7 +14592,6 @@ var _sfc_render = function render() {
|
|
|
14585
14592
|
}) : _vm._e()], 2), _vm.showImport ? _c('b-modal', {
|
|
14586
14593
|
ref: "modal-import",
|
|
14587
14594
|
attrs: {
|
|
14588
|
-
"id": "modal-import",
|
|
14589
14595
|
"title": "Importar",
|
|
14590
14596
|
"hide-footer": ""
|
|
14591
14597
|
}
|
|
@@ -14624,10 +14630,64 @@ var _sfc_render = function render() {
|
|
|
14624
14630
|
}, [_c('b-icon-cloud-upload'), _vm._v(" " + _vm._s(_vm.loading ? "Cargando..." : "Importar") + " ")], 1)], 1)], 1)];
|
|
14625
14631
|
}, {
|
|
14626
14632
|
"item": _vm.item
|
|
14633
|
+
}) : _vm._e()], 2) : _vm._e(), _vm.showExport ? _c('b-modal', {
|
|
14634
|
+
ref: "modal-export",
|
|
14635
|
+
attrs: {
|
|
14636
|
+
"title": "Exportar",
|
|
14637
|
+
"hide-footer": ""
|
|
14638
|
+
}
|
|
14639
|
+
}, [_vm.item ? _vm._t("export", function () {
|
|
14640
|
+
return [_c('b-overlay', {
|
|
14641
|
+
attrs: {
|
|
14642
|
+
"show": _vm.loading,
|
|
14643
|
+
"rounded": "sm"
|
|
14644
|
+
}
|
|
14645
|
+
}, [_vm.selectedItems.length ? _c('p', [_vm._v("Se exportará " + _vm._s(_vm.selectedItems.length) + " elementos.")]) : _c('p', [_vm._v("Se exportará la consulta actual.")]), _c('select', {
|
|
14646
|
+
directives: [{
|
|
14647
|
+
name: "model",
|
|
14648
|
+
rawName: "v-model",
|
|
14649
|
+
value: _vm.exportFormat,
|
|
14650
|
+
expression: "exportFormat"
|
|
14651
|
+
}],
|
|
14652
|
+
staticClass: "form-control",
|
|
14653
|
+
on: {
|
|
14654
|
+
"change": function ($event) {
|
|
14655
|
+
var $$selectedVal = Array.prototype.filter.call($event.target.options, function (o) {
|
|
14656
|
+
return o.selected;
|
|
14657
|
+
}).map(function (o) {
|
|
14658
|
+
var val = "_value" in o ? o._value : o.value;
|
|
14659
|
+
return val;
|
|
14660
|
+
});
|
|
14661
|
+
_vm.exportFormat = $event.target.multiple ? $$selectedVal : $$selectedVal[0];
|
|
14662
|
+
}
|
|
14663
|
+
}
|
|
14664
|
+
}, [_c('option', {
|
|
14665
|
+
attrs: {
|
|
14666
|
+
"value": "JSON"
|
|
14667
|
+
}
|
|
14668
|
+
}, [_vm._v("JSON")]), _c('option', {
|
|
14669
|
+
attrs: {
|
|
14670
|
+
"value": "XLSX"
|
|
14671
|
+
}
|
|
14672
|
+
}, [_vm._v("XLSX")])]), _c('div', {
|
|
14673
|
+
staticClass: "text-center mt-3"
|
|
14674
|
+
}, [_c('b-button', {
|
|
14675
|
+
attrs: {
|
|
14676
|
+
"variant": "info",
|
|
14677
|
+
"disabled": _vm.loading
|
|
14678
|
+
},
|
|
14679
|
+
on: {
|
|
14680
|
+
"click": function ($event) {
|
|
14681
|
+
return _vm.exportItems();
|
|
14682
|
+
}
|
|
14683
|
+
}
|
|
14684
|
+
}, [_c('b-icon-cloud-upload'), _vm._v(" " + _vm._s(_vm.loading ? "Cargando..." : "Exportar") + " ")], 1)], 1)])];
|
|
14685
|
+
}, {
|
|
14686
|
+
"item": _vm.item
|
|
14627
14687
|
}) : _vm._e()], 2) : _vm._e()], 1);
|
|
14628
14688
|
};
|
|
14629
14689
|
var _sfc_staticRenderFns = [];
|
|
14630
|
-
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "
|
|
14690
|
+
var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "e5a86231", null, null);
|
|
14631
14691
|
var component = __component__.exports;
|
|
14632
14692
|
|
|
14633
14693
|
// Import vue component
|