vue-laravel-crud 1.4.16 → 1.4.18

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.
@@ -17017,7 +17017,7 @@ var moment = momentExports;
17017
17017
 
17018
17018
  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}}
17019
17019
 
17020
- var css = "tr td[data-v-09914f57]:last-child,\ntr td[data-v-09914f57]:first-child {\n width: 1%;\n white-space: nowrap; }\n\n.crud-pagination[data-v-09914f57] {\n display: flex;\n justify-content: center; }\n\n.crud-header[data-v-09914f57] {\n display: flex;\n justify-content: space-between;\n max-height: 3rem; }\n .crud-header[data-v-09914f57] .crud-title[data-v-09914f57] {\n margin: 0; }\n .crud-header[data-v-09914f57] .crud-search[data-v-09914f57] {\n max-width: 15rem; }\n .crud-header[data-v-09914f57] .crud-search[data-v-09914f57] .btn[data-v-09914f57] {\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-09914f57] .crud-search[data-v-09914f57] .btn[data-v-09914f57].open[data-v-09914f57] {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .crud-header[data-v-09914f57] .table-options[data-v-09914f57] {\n margin-bottom: 1rem;\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n\n.custom-control[data-v-09914f57] {\n position: relative;\n top: -15px; }\n\n@media (min-width: 992px) {\n .table[data-v-09914f57] {\n table-layout: auto; }\n .table[data-v-09914f57] tbody[data-v-09914f57] td[data-v-09914f57] {\n overflow: scroll;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */ }\n .table[data-v-09914f57] tbody[data-v-09914f57] td[data-v-09914f57]::-webkit-scrollbar {\n display: none; } }\n";
17020
+ var css = "tr td[data-v-98011f56]:last-child,\ntr td[data-v-98011f56]:first-child {\n width: 1%;\n white-space: nowrap; }\n\n.crud-pagination[data-v-98011f56] {\n display: flex;\n justify-content: center; }\n\n.crud-header[data-v-98011f56] {\n display: flex;\n justify-content: space-between;\n max-height: 3rem; }\n .crud-header[data-v-98011f56] .crud-title[data-v-98011f56] {\n margin: 0; }\n .crud-header[data-v-98011f56] .crud-search[data-v-98011f56] {\n max-width: 15rem; }\n .crud-header[data-v-98011f56] .crud-search[data-v-98011f56] .btn[data-v-98011f56] {\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-98011f56] .crud-search[data-v-98011f56] .btn[data-v-98011f56].open[data-v-98011f56] {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .crud-header[data-v-98011f56] .table-options[data-v-98011f56] {\n margin-bottom: 1rem;\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n\n.custom-control[data-v-98011f56] {\n position: relative;\n top: -15px; }\n\n@media (min-width: 992px) {\n .table[data-v-98011f56] {\n table-layout: auto; }\n .table[data-v-98011f56] tbody[data-v-98011f56] td[data-v-98011f56] {\n overflow: scroll;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */ }\n .table[data-v-98011f56] tbody[data-v-98011f56] td[data-v-98011f56]::-webkit-scrollbar {\n display: none; } }\n";
17021
17021
  n(css, {});
17022
17022
 
17023
17023
  function normalizeComponent (
@@ -17701,6 +17701,7 @@ const _sfc_main = {
17701
17701
  axios.delete(this.apiUrl + "/" + this.modelName + "/" + id).then(response => {
17702
17702
  this.items.splice(index, 1);
17703
17703
  this.toastSuccess("Elemento eliminado.");
17704
+ this.$emit("itemDeleted", {});
17704
17705
  this.loading = false;
17705
17706
  }).catch(error => {
17706
17707
  this.toastError(error);
@@ -17816,6 +17817,12 @@ const _sfc_main = {
17816
17817
  this.loading = false;
17817
17818
  if (this.refreshAfterSave) this.refresh();
17818
17819
  this.toastSuccess("Elemento Modificado");
17820
+ this.$emit("itemSaved", {
17821
+ item: this.item
17822
+ });
17823
+ this.$emit("itemUpdated", {
17824
+ item: this.item
17825
+ });
17819
17826
  }).catch(error => {
17820
17827
  this.toastError(error);
17821
17828
  this.loading = false;
@@ -17847,6 +17854,12 @@ const _sfc_main = {
17847
17854
  this.item = itemSv;
17848
17855
  if (this.refreshAfterSave) this.refresh();
17849
17856
  this.toastSuccess("Elemento Creado");
17857
+ this.$emit("itemSaved", {
17858
+ item: this.item
17859
+ });
17860
+ this.$emit("itemCreated", {
17861
+ item: this.item
17862
+ });
17850
17863
  }).catch(error => {
17851
17864
  this.toastError(error);
17852
17865
  this.loading = false;
@@ -17868,6 +17881,12 @@ const _sfc_main = {
17868
17881
  this.item = itemSv;
17869
17882
  if (this.refreshAfterSave) this.refresh();
17870
17883
  this.toastSuccess("Elemento Creado");
17884
+ this.$emit("itemSaved", {
17885
+ item: this.item
17886
+ });
17887
+ this.$emit("itemCreated", {
17888
+ item: this.item
17889
+ });
17871
17890
  }).catch(error => {
17872
17891
  this.toastError(error);
17873
17892
  this.loading = false;
@@ -18260,7 +18279,9 @@ var _sfc_render = function render() {
18260
18279
  "scope": "col"
18261
18280
  }
18262
18281
  }, [_vm.enableFilters && _vm.filtersVisible && _vm.isColumnHasFilter(column) && _vm.internalFilterByProp(column.prop) ? _vm._t('filter-' + column.prop, function () {
18263
- return [column.type == 'boolean' ? _c('select', {
18282
+ return [_c('div', {
18283
+ staticClass: "form-group"
18284
+ }, [column.type == 'boolean' ? _c('select', {
18264
18285
  directives: [{
18265
18286
  name: "model",
18266
18287
  rawName: "v-model",
@@ -18309,7 +18330,7 @@ var _sfc_render = function render() {
18309
18330
  callback: function ($$v) {
18310
18331
  _vm.$set(_vm.internalFilterByProp(column.prop + '_from'), "value", $$v);
18311
18332
  },
18312
- expression: "\n internalFilterByProp(column.prop + '_from').value\n "
18333
+ expression: "\n internalFilterByProp(column.prop + '_from').value\n "
18313
18334
  }
18314
18335
  })], 1), _c('div', {
18315
18336
  staticClass: "col-6"
@@ -18325,7 +18346,7 @@ var _sfc_render = function render() {
18325
18346
  callback: function ($$v) {
18326
18347
  _vm.$set(_vm.internalFilterByProp(column.prop + '_to'), "value", $$v);
18327
18348
  },
18328
- expression: "\n internalFilterByProp(column.prop + '_to').value\n "
18349
+ expression: "\n internalFilterByProp(column.prop + '_to').value\n "
18329
18350
  }
18330
18351
  })], 1)]) : column.type == 'state' ? _c('select', {
18331
18352
  directives: [{
@@ -18423,7 +18444,7 @@ var _sfc_render = function render() {
18423
18444
  _vm.$set(_vm.internalFilterByProp(column.prop), "value", $event.target.value);
18424
18445
  }
18425
18446
  }
18426
- })];
18447
+ })], 1)];
18427
18448
  }, {
18428
18449
  "column": column,
18429
18450
  "filter": _vm.filter,
@@ -18712,7 +18733,7 @@ var _sfc_render = function render() {
18712
18733
  on: {
18713
18734
  "submit": _vm.saveItem
18714
18735
  }
18715
- }, [_vm._t("form", function () {
18736
+ }, [_vm.item ? _vm._t("form", function () {
18716
18737
  return [_c('b-form-group', {
18717
18738
  attrs: {
18718
18739
  "label": "Nombre:",
@@ -18734,7 +18755,7 @@ var _sfc_render = function render() {
18734
18755
  })], 1)];
18735
18756
  }, {
18736
18757
  "item": _vm.item
18737
- }), _c('b-button', {
18758
+ }) : _vm._e(), _c('b-button', {
18738
18759
  attrs: {
18739
18760
  "block": "",
18740
18761
  "type": "submit",
@@ -18745,29 +18766,30 @@ var _sfc_render = function render() {
18745
18766
  attrs: {
18746
18767
  "small": ""
18747
18768
  }
18748
- }) : _vm._e(), _vm._v(_vm._s(_vm.messageSave) + " ")], 1)], 2)] : _vm._e(), !_vm.validate ? [_vm._t("form", function () {
18749
- return [_c('b-form-group', {
18750
- attrs: {
18751
- "label": "Nombre:",
18752
- "description": "Nombre "
18753
- }
18754
- }, [_c('b-form-input', {
18755
- attrs: {
18756
- "type": "text",
18757
- "required": "",
18758
- "placeholder": "Nombre"
18759
- },
18760
- model: {
18761
- value: _vm.item.title,
18762
- callback: function ($$v) {
18763
- _vm.$set(_vm.item, "title", $$v);
18769
+ }) : _vm._e(), _vm._v(_vm._s(_vm.messageSave) + " ")], 1)], 2)] : _vm._e(), !_vm.validate ? [_vm.item ? _vm._t("form", function () {
18770
+ return _vm._l(_vm.item, function (value, key) {
18771
+ return _c('b-form-group', {
18772
+ key: key,
18773
+ attrs: {
18774
+ "label": key
18775
+ }
18776
+ }, [_c('b-form-input', {
18777
+ attrs: {
18778
+ "type": "text",
18779
+ "required": ""
18764
18780
  },
18765
- expression: "item.title"
18766
- }
18767
- })], 1)];
18781
+ model: {
18782
+ value: _vm.item[key],
18783
+ callback: function ($$v) {
18784
+ _vm.$set(_vm.item, key, $$v);
18785
+ },
18786
+ expression: "item[key]"
18787
+ }
18788
+ })], 1);
18789
+ });
18768
18790
  }, {
18769
18791
  "item": _vm.item
18770
- }), _c('b-button', {
18792
+ }) : _vm._e(), _c('b-button', {
18771
18793
  attrs: {
18772
18794
  "block": "",
18773
18795
  "type": "submit",
@@ -18791,16 +18813,27 @@ var _sfc_render = function render() {
18791
18813
  "title": _vm.title,
18792
18814
  "no-close-on-backdrop": ""
18793
18815
  }
18794
- }, [_vm._t("show", function () {
18795
- return [_c('p', {
18796
- staticClass: "my-4"
18797
- }, [_vm._v("Show")])];
18816
+ }, [_vm.item ? _vm._t("show", function () {
18817
+ return [_c('b-list-group', _vm._l(_vm.item, function (value, key) {
18818
+ return _c('b-list-group-item', {
18819
+ key: key
18820
+ }, [_c('b-row', [_c('b-col', {
18821
+ staticClass: "font-weight-bold",
18822
+ attrs: {
18823
+ "cols": "4"
18824
+ }
18825
+ }, [_vm._v(_vm._s(key))]), _c('b-col', {
18826
+ attrs: {
18827
+ "cols": "8"
18828
+ }
18829
+ }, [_vm._v(_vm._s(JSON.stringify(value)))])], 1)], 1);
18830
+ }), 1)];
18798
18831
  }, {
18799
18832
  "item": _vm.item
18800
- })], 2)], 1);
18833
+ }) : _vm._e()], 2)], 1);
18801
18834
  };
18802
18835
  var _sfc_staticRenderFns = [];
18803
- var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "09914f57", null, null);
18836
+ var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "98011f56", null, null);
18804
18837
  var component = __component__.exports;
18805
18838
 
18806
18839
  // Import vue component