@twreporter/redux 7.10.0 → 7.10.1-rc.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 +22 -0
- package/lib/reducers/entities.js +25 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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
|
+
## [7.10.1-rc.1](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/redux@7.10.1-rc.0...@twreporter/redux@7.10.1-rc.1) (2024-01-25)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* force update post entity after get post on latest page ([0031d69](https://github.com/twreporter/twreporter-npm-packages/commit/0031d69db0da0eb05a9d13e00785f2d947539b9f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [7.10.1-rc.0](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/redux@7.10.0...@twreporter/redux@7.10.1-rc.0) (2024-01-24)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* update bookmarkId in post entity after get single bookmark ([cfedcc6](https://github.com/twreporter/twreporter-npm-packages/commit/cfedcc6a8a918f06bcbe46bdb3809165b7cf6d8e))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
# [7.10.0](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/redux@7.10.0-rc.3...@twreporter/redux@7.10.0) (2024-01-24)
|
|
7
29
|
|
|
8
30
|
**Note:** Version bump only for package @twreporter/redux
|
package/lib/reducers/entities.js
CHANGED
|
@@ -215,13 +215,12 @@ function entities() {
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
case _actionTypes["default"].postsByListId.read.success:
|
|
218
|
-
case _actionTypes["default"].relatedPosts.read.success:
|
|
219
218
|
{
|
|
220
219
|
var _allPostIds2 = state.posts.allIds;
|
|
221
220
|
|
|
222
221
|
var _posts = _.get(action, 'payload.items', []);
|
|
223
222
|
|
|
224
|
-
var _buildState5 = _buildState(_allPostIds2, _posts),
|
|
223
|
+
var _buildState5 = _buildState(_allPostIds2, _posts, true),
|
|
225
224
|
_allIds3 = _buildState5.allIds,
|
|
226
225
|
_byId3 = _buildState5.byId,
|
|
227
226
|
_slugToId3 = _buildState5.slugToId;
|
|
@@ -235,16 +234,36 @@ function entities() {
|
|
|
235
234
|
});
|
|
236
235
|
}
|
|
237
236
|
|
|
238
|
-
case _actionTypes["default"].
|
|
237
|
+
case _actionTypes["default"].relatedPosts.read.success:
|
|
239
238
|
{
|
|
240
239
|
var _allPostIds3 = state.posts.allIds;
|
|
240
|
+
|
|
241
|
+
var _posts2 = _.get(action, 'payload.items', []);
|
|
242
|
+
|
|
243
|
+
var _buildState6 = _buildState(_allPostIds3, _posts2),
|
|
244
|
+
_allIds4 = _buildState6.allIds,
|
|
245
|
+
_byId4 = _buildState6.byId,
|
|
246
|
+
_slugToId4 = _buildState6.slugToId;
|
|
247
|
+
|
|
248
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
249
|
+
posts: {
|
|
250
|
+
allIds: _allIds4,
|
|
251
|
+
byId: Object.assign({}, state.posts.byId, _byId4),
|
|
252
|
+
slugToId: Object.assign({}, state.posts.slugToId, _slugToId4)
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
case _actionTypes["default"].featureTopic.read.success:
|
|
258
|
+
{
|
|
259
|
+
var _allPostIds4 = state.posts.allIds;
|
|
241
260
|
var _allTopicIds3 = state.topics.allIds;
|
|
242
261
|
|
|
243
|
-
var
|
|
262
|
+
var _posts3 = _.get(action, 'payload.lastThreeRelatedPosts', []);
|
|
244
263
|
|
|
245
264
|
var _topics2 = [_.get(action, 'payload.topic', {})];
|
|
246
265
|
|
|
247
|
-
var _newStateForPosts = _buildState(
|
|
266
|
+
var _newStateForPosts = _buildState(_allPostIds4, _posts3);
|
|
248
267
|
|
|
249
268
|
var _newStateForTopics = _buildState(_allTopicIds3, _topics2);
|
|
250
269
|
|
|
@@ -281,6 +300,7 @@ function entities() {
|
|
|
281
300
|
return state;
|
|
282
301
|
}
|
|
283
302
|
|
|
303
|
+
case _actionTypes["default"].singleBookmark.read.success:
|
|
284
304
|
case _actionTypes["default"].singleBookmark.create.success:
|
|
285
305
|
{
|
|
286
306
|
var _bookmarkId = _.get(action, 'payload.data.record.id');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twreporter/redux",
|
|
3
|
-
"version": "7.10.
|
|
3
|
+
"version": "7.10.1-rc.1",
|
|
4
4
|
"description": "redux actions and reducers for twreporter website",
|
|
5
5
|
"repository": "https://github.com/twreporter/twreporter-npm-packages.git",
|
|
6
6
|
"author": "twreporter <developer@twreporter.org>",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"files": [
|
|
46
46
|
"lib"
|
|
47
47
|
],
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "96ee1e6fcb830faf4727a1222735ce881453ea38"
|
|
49
49
|
}
|