vue-laravel-crud 1.6.8 → 1.6.10

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.
@@ -12532,7 +12532,7 @@ Plugin.install = function (Vue, options) {
12532
12532
 
12533
12533
  if (typeof window !== 'undefined' && window.Vue) {
12534
12534
  window.Vue.use(Plugin);
12535
- }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}}var css = "tr td[data-v-d24c9f33]:last-child,\ntr td[data-v-d24c9f33]:first-child {\n width: 1%;\n white-space: nowrap; }\n\n.crud-pagination[data-v-d24c9f33] {\n display: flex;\n align-items: center;\n width: 100%;\n justify-content: center;\n margin-top: 1rem; }\n\n.crud-header[data-v-d24c9f33] {\n display: flex;\n justify-content: space-between;\n max-height: 3rem; }\n .crud-header[data-v-d24c9f33] .crud-title[data-v-d24c9f33] {\n margin: 0; }\n .crud-header[data-v-d24c9f33] .crud-search[data-v-d24c9f33] {\n max-width: 15rem; }\n .crud-header[data-v-d24c9f33] .crud-search[data-v-d24c9f33] .btn[data-v-d24c9f33] {\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-d24c9f33] .crud-search[data-v-d24c9f33] .btn[data-v-d24c9f33].open[data-v-d24c9f33] {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .crud-header[data-v-d24c9f33] .table-options[data-v-d24c9f33] {\n margin-bottom: 1rem;\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n\n.custom-control[data-v-d24c9f33] {\n position: relative;\n top: -15px; }\n\n@media (min-width: 992px) {\n .table[data-v-d24c9f33] {\n table-layout: auto; }\n .table[data-v-d24c9f33] tbody[data-v-d24c9f33] td[data-v-d24c9f33] {\n overflow: scroll;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */ }\n .table[data-v-d24c9f33] tbody[data-v-d24c9f33] td[data-v-d24c9f33]::-webkit-scrollbar {\n display: none; } }\n";
12535
+ }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}}var css = "tr td[data-v-ed7ab1fe]:last-child,\ntr td[data-v-ed7ab1fe]:first-child {\n width: 1%;\n white-space: nowrap; }\n\n.crud-pagination[data-v-ed7ab1fe] {\n display: flex;\n align-items: center;\n width: 100%;\n justify-content: center;\n margin-top: 1rem; }\n\n.crud-header[data-v-ed7ab1fe] {\n display: flex;\n justify-content: space-between;\n max-height: 3rem; }\n .crud-header[data-v-ed7ab1fe] .crud-title[data-v-ed7ab1fe] {\n margin: 0; }\n .crud-header[data-v-ed7ab1fe] .crud-search[data-v-ed7ab1fe] {\n max-width: 15rem; }\n .crud-header[data-v-ed7ab1fe] .crud-search[data-v-ed7ab1fe] .btn[data-v-ed7ab1fe] {\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-ed7ab1fe] .crud-search[data-v-ed7ab1fe] .btn[data-v-ed7ab1fe].open[data-v-ed7ab1fe] {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n .crud-header[data-v-ed7ab1fe] .table-options[data-v-ed7ab1fe] {\n margin-bottom: 1rem;\n display: flex;\n align-items: center;\n justify-content: flex-end; }\n\n.custom-control[data-v-ed7ab1fe] {\n position: relative; }\n\n@media (min-width: 992px) {\n .table[data-v-ed7ab1fe] {\n table-layout: auto; }\n .table[data-v-ed7ab1fe] tbody[data-v-ed7ab1fe] td[data-v-ed7ab1fe] {\n overflow: scroll;\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */ }\n .table[data-v-ed7ab1fe] tbody[data-v-ed7ab1fe] td[data-v-ed7ab1fe]::-webkit-scrollbar {\n display: none; } }\n";
12536
12536
  n(css, {});function normalizeComponent (
12537
12537
  scriptExports,
12538
12538
  render,
@@ -13486,7 +13486,7 @@ n(css, {});function normalizeComponent (
13486
13486
  ids: ids
13487
13487
  }).then(function (response) {
13488
13488
  _this14.items = _this14.items.filter(function (it) {
13489
- return ids.includes(it.id);
13489
+ return !ids.includes(it.id);
13490
13490
  });
13491
13491
  _this14.toastSuccess("Elemento/s eliminado.");
13492
13492
  _this14.$emit("itemDeleted", {});
@@ -13507,7 +13507,7 @@ n(css, {});function normalizeComponent (
13507
13507
  return it.id;
13508
13508
  });
13509
13509
  _this15.items = _this15.items.filter(function (it) {
13510
- return ids.includes(it.id);
13510
+ return !ids.includes(it.id);
13511
13511
  });
13512
13512
  _this15.item = null;
13513
13513
  _this15.toastSuccess("Elemento Eliminado");
@@ -14561,7 +14561,16 @@ var _sfc_render = function render() {
14561
14561
  "column": column,
14562
14562
  "filter": _vm.filter,
14563
14563
  "internalFilterByProp": _vm.internalFilterByProp
14564
- }) : _c('span', [_vm._v(_vm._s(column.label))]), _vm.sortable && _vm.internalFilterByProp(column.prop + '_sort') ? _c('span', {
14564
+ }) : column.type == 'select' ? _c('span', [_c('b-form-checkbox', {
14565
+ attrs: {
14566
+ "name": "select-all"
14567
+ },
14568
+ on: {
14569
+ "change": function change($event) {
14570
+ return _vm.toggleAll();
14571
+ }
14572
+ }
14573
+ })], 1) : _c('span', [_vm._v(_vm._s(column.label))]), _vm.sortable && _vm.internalFilterByProp(column.prop + '_sort') ? _c('span', {
14565
14574
  staticClass: "sort-filter",
14566
14575
  on: {
14567
14576
  "click": function click($event) {
@@ -15003,7 +15012,7 @@ var _sfc_render = function render() {
15003
15012
  }) : _vm._e()], 2)], 1);
15004
15013
  };
15005
15014
  var _sfc_staticRenderFns = [];
15006
- var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "d24c9f33", null, null);
15015
+ var __component__ = /*#__PURE__*/normalizeComponent(_sfc_main, _sfc_render, _sfc_staticRenderFns, false, null, "ed7ab1fe", null, null);
15007
15016
  var component$1 = __component__.exports;// Import vue component
15008
15017
 
15009
15018
  // Default export is installable instance of component.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-laravel-crud",
3
- "version": "1.6.8",
3
+ "version": "1.6.10",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/clonixdev/vue-laravel-crud",
6
6
  "main": "dist/vue-laravel-crud.ssr.js",
@@ -895,7 +895,7 @@ export default /*#__PURE__*/ {
895
895
  axios
896
896
  .delete(this.apiUrl + "/" + this.modelName + "/bulk-destroy", {ids: ids} )
897
897
  .then((response) => {
898
- this.items = this.items.filter(it => ids.includes(it.id));
898
+ this.items = this.items.filter(it => !ids.includes(it.id));
899
899
  this.toastSuccess("Elemento/s eliminado.");
900
900
  this.$emit("itemDeleted", {});
901
901
  this.loading = false;
@@ -907,7 +907,7 @@ export default /*#__PURE__*/ {
907
907
  },
908
908
  async deleteItemBulkLocal() {
909
909
  let ids = this.selectedItems.map(it => it.id);
910
- this.items = this.items.filter(it => ids.includes(it.id));
910
+ this.items = this.items.filter(it => !ids.includes(it.id));
911
911
  this.item = null;
912
912
  this.toastSuccess("Elemento Eliminado");
913
913
  this.$emit("itemDeleted", {});
@@ -1569,9 +1569,10 @@ export default /*#__PURE__*/ {
1569
1569
 
1570
1570
  </div>
1571
1571
  </slot>
1572
-
1572
+ <span v-else-if="column.type == 'select'">
1573
+ <b-form-checkbox name="select-all" @change="toggleAll()"></b-form-checkbox>
1574
+ </span>
1573
1575
  <span v-else>{{ column.label }}</span>
1574
-
1575
1576
  <span v-if="sortable && internalFilterByProp(column.prop + '_sort')" class="sort-filter"
1576
1577
  @click="toggleSortFilter(column)"><b-icon-sort-down
1577
1578
  v-if="!internalFilterByProp(column.prop + '_sort').value"></b-icon-sort-down><b-icon-sort-up
@@ -1865,7 +1866,6 @@ tr td:first-child {
1865
1866
 
1866
1867
  .custom-control {
1867
1868
  position: relative;
1868
- top: -15px;
1869
1869
  }
1870
1870
 
1871
1871