vue-laravel-crud 1.4.4 → 1.4.6
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 +24362 -10056
- package/dist/vue-laravel-crud.min.js +4 -3
- package/dist/vue-laravel-crud.ssr.js +24348 -10078
- package/package.json +16 -13
- package/src/vue-laravel-crud.vue +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-laravel-crud",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://github.com/clonixdev/vue-laravel-crud",
|
|
6
6
|
"main": "dist/vue-laravel-crud.ssr.js",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
+
"axios": "^1.3.5",
|
|
23
24
|
"bootstrap-vue": "^2.21.2",
|
|
24
25
|
"moment": "^2.29.1",
|
|
25
26
|
"vue-mc": "^0.6.0",
|
|
@@ -30,25 +31,27 @@
|
|
|
30
31
|
"@babel/preset-env": "^7.12.11",
|
|
31
32
|
"@rollup/plugin-alias": "^3.1.1",
|
|
32
33
|
"@rollup/plugin-babel": "^5.2.2",
|
|
33
|
-
"@rollup/plugin-commonjs": "^
|
|
34
|
+
"@rollup/plugin-commonjs": "^24.0.1",
|
|
34
35
|
"@rollup/plugin-json": "^6.0.0",
|
|
35
|
-
"@rollup/plugin-node-resolve": "^
|
|
36
|
-
"@rollup/plugin-replace": "^
|
|
37
|
-
"@
|
|
38
|
-
"@vue/cli-
|
|
39
|
-
"
|
|
36
|
+
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
37
|
+
"@rollup/plugin-replace": "^5.0.2",
|
|
38
|
+
"@vitejs/plugin-vue2": "^2.2.0",
|
|
39
|
+
"@vue/cli-plugin-babel": "^5.0.8",
|
|
40
|
+
"@vue/cli-service": "^5.0.8",
|
|
40
41
|
"cross-env": "^7.0.3",
|
|
41
42
|
"minimist": "^1.2.5",
|
|
42
|
-
"
|
|
43
|
+
"node-sass": "^8.0.0",
|
|
44
|
+
"rollup": "^2.68.0",
|
|
45
|
+
"rollup-plugin-polyfill-node": "^0.12.0",
|
|
46
|
+
"rollup-plugin-styles": "^4.0.0",
|
|
43
47
|
"rollup-plugin-terser": "^7.0.2",
|
|
44
|
-
"
|
|
45
|
-
"vue": "^2.
|
|
46
|
-
"vue-template-compiler": "^2.6.12"
|
|
48
|
+
"vue": "^2.7.0",
|
|
49
|
+
"vue-template-compiler": "^2.7.0"
|
|
47
50
|
},
|
|
48
51
|
"peerDependencies": {
|
|
49
|
-
"vue": "^2.
|
|
52
|
+
"vue": "^2.7.0"
|
|
50
53
|
},
|
|
51
54
|
"engines": {
|
|
52
|
-
"node": ">=
|
|
55
|
+
"node": ">=14"
|
|
53
56
|
}
|
|
54
57
|
}
|
package/src/vue-laravel-crud.vue
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import draggable from "vuedraggable";
|
|
3
3
|
import axios from "axios";
|
|
4
4
|
import moment from "moment";
|
|
5
|
-
|
|
5
|
+
import { Model, Collection } from 'vue-mc';
|
|
6
6
|
|
|
7
7
|
export default /*#__PURE__*/ {
|
|
8
8
|
name: "VueLaravelCrud",
|
|
@@ -262,13 +262,13 @@ export default /*#__PURE__*/ {
|
|
|
262
262
|
|
|
263
263
|
mounted() {
|
|
264
264
|
|
|
265
|
-
|
|
265
|
+
if (this.model instanceof Model) {
|
|
266
266
|
this.useMc = true;
|
|
267
267
|
this.collection = new Collection();
|
|
268
|
-
} else {
|
|
268
|
+
} else {
|
|
269
269
|
this.item = this.model;
|
|
270
270
|
this.itemDefault = JSON.parse(JSON.stringify(this.item));
|
|
271
|
-
|
|
271
|
+
}
|
|
272
272
|
|
|
273
273
|
this.internalFilters = [];
|
|
274
274
|
this.setupFilters();
|
|
@@ -524,25 +524,25 @@ export default /*#__PURE__*/ {
|
|
|
524
524
|
}, 1);
|
|
525
525
|
},
|
|
526
526
|
|
|
527
|
-
|
|
527
|
+
fetchItemsMc(page = 1) {
|
|
528
528
|
this.loading = true;
|
|
529
529
|
this.$emit("beforeFetch", {});
|
|
530
530
|
this.collection.page(page).fetch().then((response) => {
|
|
531
|
-
console.debug("fetch page ",page,response,this.collection);
|
|
531
|
+
console.debug("fetch page ", page, response, this.collection);
|
|
532
532
|
this.loading = false;
|
|
533
533
|
this.$emit("afterFetch", {});
|
|
534
534
|
}).catch((error) => {
|
|
535
535
|
this.toastError(error);
|
|
536
536
|
this.loading = false;
|
|
537
537
|
});
|
|
538
|
-
}
|
|
538
|
+
},
|
|
539
539
|
fetchItems(page = 1) {
|
|
540
540
|
if (!this.ajax) {
|
|
541
541
|
return;
|
|
542
542
|
}
|
|
543
543
|
this.$emit("beforeFetch", {});
|
|
544
544
|
if (this.useMc) {
|
|
545
|
-
|
|
545
|
+
return this.fetchItemsMc(page);
|
|
546
546
|
}
|
|
547
547
|
this.loading = true;
|
|
548
548
|
axios
|