@coaction/vue 1.3.0 → 1.4.0
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/index.js +7 -7
- package/dist/index.mjs +7 -7
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ var import_vue = require("vue");
|
|
|
35
35
|
__reExport(src_exports, require("coaction"));
|
|
36
36
|
var createStateProxy = (store, version) => new Proxy({}, {
|
|
37
37
|
get(_, key) {
|
|
38
|
-
version.value;
|
|
38
|
+
void version.value;
|
|
39
39
|
const state = store.getState();
|
|
40
40
|
const value = state[key];
|
|
41
41
|
if (typeof value === "function") {
|
|
@@ -44,15 +44,15 @@ var createStateProxy = (store, version) => new Proxy({}, {
|
|
|
44
44
|
return value;
|
|
45
45
|
},
|
|
46
46
|
has(_, key) {
|
|
47
|
-
version.value;
|
|
47
|
+
void version.value;
|
|
48
48
|
return key in store.getState();
|
|
49
49
|
},
|
|
50
50
|
ownKeys() {
|
|
51
|
-
version.value;
|
|
51
|
+
void version.value;
|
|
52
52
|
return Reflect.ownKeys(store.getState());
|
|
53
53
|
},
|
|
54
54
|
getOwnPropertyDescriptor(_, key) {
|
|
55
|
-
version.value;
|
|
55
|
+
void version.value;
|
|
56
56
|
const descriptor = Object.getOwnPropertyDescriptor(store.getState(), key);
|
|
57
57
|
if (!descriptor) {
|
|
58
58
|
return void 0;
|
|
@@ -74,7 +74,7 @@ var createAutoSelector = (store, version) => {
|
|
|
74
74
|
autoSelector2[key] = descriptor.value.bind(state);
|
|
75
75
|
} else {
|
|
76
76
|
autoSelector2[key] = (0, import_vue.computed)(() => {
|
|
77
|
-
version.value;
|
|
77
|
+
void version.value;
|
|
78
78
|
return store.getState()[key];
|
|
79
79
|
});
|
|
80
80
|
}
|
|
@@ -95,7 +95,7 @@ var createAutoSelector = (store, version) => {
|
|
|
95
95
|
sliceAutoSelector[key] = descriptor.value.bind(slice);
|
|
96
96
|
} else {
|
|
97
97
|
sliceAutoSelector[key] = (0, import_vue.computed)(() => {
|
|
98
|
-
version.value;
|
|
98
|
+
void version.value;
|
|
99
99
|
return store.getState()[sliceKey][key];
|
|
100
100
|
});
|
|
101
101
|
}
|
|
@@ -120,7 +120,7 @@ var create = (createState, options) => {
|
|
|
120
120
|
const useStore = (0, import_coaction.wrapStore)(store, (selector) => {
|
|
121
121
|
if (typeof selector === "function") {
|
|
122
122
|
return (0, import_vue.computed)(() => {
|
|
123
|
-
version.value;
|
|
123
|
+
void version.value;
|
|
124
124
|
return selector(store.getState());
|
|
125
125
|
});
|
|
126
126
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -33,7 +33,7 @@ import { computed, ref } from "vue";
|
|
|
33
33
|
import * as coaction_star from "coaction";
|
|
34
34
|
var createStateProxy = (store, version) => new Proxy({}, {
|
|
35
35
|
get(_, key) {
|
|
36
|
-
version.value;
|
|
36
|
+
void version.value;
|
|
37
37
|
const state = store.getState();
|
|
38
38
|
const value = state[key];
|
|
39
39
|
if (typeof value === "function") {
|
|
@@ -42,15 +42,15 @@ var createStateProxy = (store, version) => new Proxy({}, {
|
|
|
42
42
|
return value;
|
|
43
43
|
},
|
|
44
44
|
has(_, key) {
|
|
45
|
-
version.value;
|
|
45
|
+
void version.value;
|
|
46
46
|
return key in store.getState();
|
|
47
47
|
},
|
|
48
48
|
ownKeys() {
|
|
49
|
-
version.value;
|
|
49
|
+
void version.value;
|
|
50
50
|
return Reflect.ownKeys(store.getState());
|
|
51
51
|
},
|
|
52
52
|
getOwnPropertyDescriptor(_, key) {
|
|
53
|
-
version.value;
|
|
53
|
+
void version.value;
|
|
54
54
|
const descriptor = Object.getOwnPropertyDescriptor(store.getState(), key);
|
|
55
55
|
if (!descriptor) {
|
|
56
56
|
return void 0;
|
|
@@ -72,7 +72,7 @@ var createAutoSelector = (store, version) => {
|
|
|
72
72
|
autoSelector2[key] = descriptor.value.bind(state);
|
|
73
73
|
} else {
|
|
74
74
|
autoSelector2[key] = computed(() => {
|
|
75
|
-
version.value;
|
|
75
|
+
void version.value;
|
|
76
76
|
return store.getState()[key];
|
|
77
77
|
});
|
|
78
78
|
}
|
|
@@ -93,7 +93,7 @@ var createAutoSelector = (store, version) => {
|
|
|
93
93
|
sliceAutoSelector[key] = descriptor.value.bind(slice);
|
|
94
94
|
} else {
|
|
95
95
|
sliceAutoSelector[key] = computed(() => {
|
|
96
|
-
version.value;
|
|
96
|
+
void version.value;
|
|
97
97
|
return store.getState()[sliceKey][key];
|
|
98
98
|
});
|
|
99
99
|
}
|
|
@@ -118,7 +118,7 @@ var create = (createState, options) => {
|
|
|
118
118
|
const useStore = wrapStore(store, (selector) => {
|
|
119
119
|
if (typeof selector === "function") {
|
|
120
120
|
return computed(() => {
|
|
121
|
-
version.value;
|
|
121
|
+
void version.value;
|
|
122
122
|
return selector(store.getState());
|
|
123
123
|
});
|
|
124
124
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coaction/vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "A Coaction integration tool for Vue",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"coaction",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"url": "https://github.com/unadlib/coaction/issues"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"coaction": "^1.
|
|
42
|
+
"coaction": "^1.4.0",
|
|
43
43
|
"vue": "^3.0.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependenciesMeta": {
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@testing-library/vue": "^8.1.0",
|
|
52
|
-
"vue": "^3.5.
|
|
53
|
-
"coaction": "1.
|
|
52
|
+
"vue": "^3.5.30",
|
|
53
|
+
"coaction": "1.4.0"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public",
|