vue-laravel-crud 1.4.7 → 1.4.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-laravel-crud",
3
- "version": "1.4.7",
3
+ "version": "1.4.8",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/clonixdev/vue-laravel-crud",
6
6
  "main": "dist/vue-laravel-crud.ssr.js",
@@ -44,11 +44,14 @@
44
44
  "rollup-plugin-polyfill-node": "^0.12.0",
45
45
  "rollup-plugin-styles": "^4.0.0",
46
46
  "rollup-plugin-terser": "^7.0.2",
47
- "vue": "^2.7.0",
48
- "vue-template-compiler": "^2.7.0"
47
+ "vue": "^2.7.14",
48
+ "vue-template-compiler": "^2.7.14",
49
+ "vuex": "^3.6.2",
50
+ "@vuex-orm/core": "^0.36.4",
51
+ "@vuex-orm/plugin-axios": "^0.9.4"
49
52
  },
50
53
  "peerDependencies": {
51
- "vue": "^2.7.0"
54
+ "vue": "^2.7.14"
52
55
  },
53
56
  "engines": {
54
57
  "node": ">=14"
@@ -2,7 +2,7 @@
2
2
  import draggable from "vuedraggable";
3
3
  import axios from "axios";
4
4
  import moment from "moment";
5
- //import { Model, Collection } from 'vue-mc';
5
+ import { Model } from '@vuex-orm/core';
6
6
 
7
7
  export default /*#__PURE__*/ {
8
8
  name: "VueLaravelCrud",
@@ -38,8 +38,8 @@ export default /*#__PURE__*/ {
38
38
  MODE_CARDS: 2,
39
39
  MODE_CUSTOM: 3,
40
40
  },
41
- useMc: false,
42
- collection
41
+ useVuexORM: false,
42
+
43
43
  };
44
44
  },
45
45
  watch: {
@@ -262,13 +262,12 @@ export default /*#__PURE__*/ {
262
262
 
263
263
  mounted() {
264
264
 
265
- /*if (this.model instanceof Model) {
266
- this.useMc = true;
267
- this.collection = new Collection();
268
- } else {*/
265
+ if (this.model instanceof Model) {
266
+ this.useVuexORM = true;
267
+ } else {
269
268
  this.item = this.model;
270
269
  this.itemDefault = JSON.parse(JSON.stringify(this.item));
271
- //}
270
+ }
272
271
 
273
272
  this.internalFilters = [];
274
273
  this.setupFilters();
@@ -320,7 +319,12 @@ export default /*#__PURE__*/ {
320
319
  },*/
321
320
 
322
321
  finalFilters() {
323
- return this.filters.concat(this.filter).concat(this.internalFilter);
322
+
323
+ return [
324
+ ...this.filters,
325
+ ...this.filter,
326
+ ...this.internalFilter
327
+ ];
324
328
  },
325
329
 
326
330
  internalFilter() {
@@ -541,7 +545,7 @@ export default /*#__PURE__*/ {
541
545
  return;
542
546
  }
543
547
  this.$emit("beforeFetch", {});
544
- if (this.useMc) {
548
+ if (this.useVuexORM) {
545
549
  // return this.fetchItemsMc(page);
546
550
  }
547
551
  this.loading = true;