@elementor/store 0.7.0 → 0.7.1
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/CHANGELOG.md +8 -0
- package/package.json +4 -4
- package/src/__tests__/store.test.tsx +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.7.1](https://github.com/elementor/elementor-packages/compare/@elementor/store@0.7.0...@elementor/store@0.7.1) (2023-10-19)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @elementor/store
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [0.7.0](https://github.com/elementor/elementor-packages/compare/@elementor/store@0.6.1...@elementor/store@0.7.0) (2023-09-11)
|
|
7
15
|
|
|
8
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/store",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Elementor Team",
|
|
6
6
|
"homepage": "https://elementor.com/",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"react": "18.x"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@reduxjs/toolkit": "^1.9.
|
|
39
|
-
"react-redux": "^8.1.
|
|
38
|
+
"@reduxjs/toolkit": "^1.9.7",
|
|
39
|
+
"react-redux": "^8.1.3"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "c692bd825e856d1ac04f671b425a57c1b8466512"
|
|
42
42
|
}
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
__dispatch,
|
|
11
11
|
__deleteStore,
|
|
12
12
|
__StoreProvider as StoreProvider,
|
|
13
|
-
__useSelector,
|
|
14
|
-
__useDispatch,
|
|
13
|
+
__useSelector as useSelector,
|
|
14
|
+
__useDispatch as useDispatch,
|
|
15
15
|
Dispatch,
|
|
16
16
|
AnyAction,
|
|
17
17
|
} from '../index';
|
|
@@ -61,7 +61,7 @@ describe( '@elementor/store', () => {
|
|
|
61
61
|
// Arrange.
|
|
62
62
|
const { wrapper } = createStoreEntities();
|
|
63
63
|
|
|
64
|
-
const { result } = renderHook( () =>
|
|
64
|
+
const { result } = renderHook( () => useSelector( ( state: SliceStateRoot ) => state.slice.value ), { wrapper } );
|
|
65
65
|
|
|
66
66
|
// Assert.
|
|
67
67
|
expect( result.current ).toBe( 1 );
|
|
@@ -73,11 +73,11 @@ describe( '@elementor/store', () => {
|
|
|
73
73
|
|
|
74
74
|
// Act.
|
|
75
75
|
const { result } = renderHook( () => {
|
|
76
|
-
const dispatchAction =
|
|
76
|
+
const dispatchAction = useDispatch();
|
|
77
77
|
|
|
78
78
|
dispatchAction( slice.actions.setValue( 3 ) );
|
|
79
79
|
|
|
80
|
-
return
|
|
80
|
+
return useSelector( ( state: SliceStateRoot ) => state.slice.value );
|
|
81
81
|
}, { wrapper } );
|
|
82
82
|
|
|
83
83
|
// Assert.
|
|
@@ -130,11 +130,11 @@ describe( '@elementor/store', () => {
|
|
|
130
130
|
|
|
131
131
|
// Act.
|
|
132
132
|
const { result } = renderHook( () => {
|
|
133
|
-
const dispatchAction =
|
|
133
|
+
const dispatchAction = useDispatch();
|
|
134
134
|
|
|
135
135
|
dispatchAction( slice.actions.setValue( 4 ) );
|
|
136
136
|
|
|
137
|
-
return
|
|
137
|
+
return useSelector( ( state: SliceStateRoot ) => state.slice.value );
|
|
138
138
|
}, { wrapper } );
|
|
139
139
|
|
|
140
140
|
// Assert.
|
|
@@ -155,11 +155,11 @@ describe( '@elementor/store', () => {
|
|
|
155
155
|
|
|
156
156
|
// Act.
|
|
157
157
|
const { result } = renderHook( () => {
|
|
158
|
-
const dispatchAction =
|
|
158
|
+
const dispatchAction = useDispatch();
|
|
159
159
|
|
|
160
160
|
dispatchAction( slice.actions.setValue( 4 ) );
|
|
161
161
|
|
|
162
|
-
return
|
|
162
|
+
return useSelector( ( state: SliceStateRoot ) => state.slice.value );
|
|
163
163
|
}, { wrapper } );
|
|
164
164
|
|
|
165
165
|
// Assert.
|
|
@@ -201,7 +201,7 @@ describe( '@elementor/store', () => {
|
|
|
201
201
|
|
|
202
202
|
const { wrapper } = createStoreEntities();
|
|
203
203
|
|
|
204
|
-
const { result } = renderHook( () =>
|
|
204
|
+
const { result } = renderHook( () => useSelector( ( state: SliceStateRoot ) => state.slice.value ), { wrapper } );
|
|
205
205
|
|
|
206
206
|
// Assert.
|
|
207
207
|
expect( result.current ).toBe( 7 );
|
|
@@ -241,7 +241,7 @@ describe( '@elementor/store', () => {
|
|
|
241
241
|
</StoreProvider>
|
|
242
242
|
);
|
|
243
243
|
|
|
244
|
-
const { result } = renderHook( () =>
|
|
244
|
+
const { result } = renderHook( () => useSelector( ( state: SliceStateRoot ) => state.slice ), { wrapper } );
|
|
245
245
|
|
|
246
246
|
// Assert.
|
|
247
247
|
expect( result.current ).toBeUndefined();
|
|
@@ -263,11 +263,11 @@ describe( '@elementor/store', () => {
|
|
|
263
263
|
const { slice, wrapper } = createStoreEntities();
|
|
264
264
|
|
|
265
265
|
const { result } = renderHook( () => {
|
|
266
|
-
const dispatchAction =
|
|
266
|
+
const dispatchAction = useDispatch();
|
|
267
267
|
|
|
268
268
|
dispatchAction( slice.actions.setValue( 8 ) );
|
|
269
269
|
|
|
270
|
-
return
|
|
270
|
+
return useSelector( ( state: SliceStateRoot ) => state.slice.value );
|
|
271
271
|
}, { wrapper } );
|
|
272
272
|
|
|
273
273
|
// Assert.
|