@verisoft/store 18.5.0 → 18.7.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/README.md +52 -3
- package/package.json +2 -2
- package/project.json +0 -7
- package/src/lib/table-state/effects.ts +2 -3
- package/tsconfig.json +1 -3
- package/tsconfig.lib.prod.json +1 -2
package/README.md
CHANGED
|
@@ -1,7 +1,56 @@
|
|
|
1
1
|
# store
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The `store` library provides state management utilities and shared store logic for the Verisoft Frontend workspace.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Features
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- Centralized state management for applications and libraries
|
|
8
|
+
- Shared selectors, actions, and reducers
|
|
9
|
+
- Utilities for working with NgRx or other state management solutions
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
This package is intended for internal use within the monorepo. To use it in another library or app, add it as a dependency in your `project.json`:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"store": "*"
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
Import the required modules, services, or utilities from `store`:
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { StoreModule } from '@verisoft/store';
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Development
|
|
30
|
+
|
|
31
|
+
### Building
|
|
32
|
+
|
|
33
|
+
Run the following command to build the library:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
nx build store
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Running Unit Tests
|
|
40
|
+
|
|
41
|
+
To execute the unit tests for this library:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
nx test store
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Contributing
|
|
48
|
+
|
|
49
|
+
1. Fork the repository and create your branch from `master`.
|
|
50
|
+
2. Make your changes and add tests if needed.
|
|
51
|
+
3. Run `nx test store` to ensure all tests pass.
|
|
52
|
+
4. Submit a pull request.
|
|
53
|
+
|
|
54
|
+
## License
|
|
55
|
+
|
|
56
|
+
This project is licensed under the MIT License.
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verisoft/store",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.7.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@ngrx/store": "^18.0.2",
|
|
6
|
-
"@verisoft/core": "18.
|
|
6
|
+
"@verisoft/core": "18.7.0",
|
|
7
7
|
"@ngrx/effects": "18.0.2",
|
|
8
8
|
"rxjs": "~7.8.0",
|
|
9
9
|
"@angular/router": "18.2.8"
|
package/project.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
|
2
|
-
import {
|
|
2
|
+
import { createFeatureSelector, createSelector, Store } from '@ngrx/store';
|
|
3
3
|
import { BaseHttpService, DEFAULT_SEARCH_LIMIT, Page, RequestParams } from '@verisoft/core';
|
|
4
4
|
import { catchError, map, Observable, of, switchMap, withLatestFrom } from 'rxjs';
|
|
5
5
|
import {
|
|
@@ -87,8 +87,7 @@ export function createRemoveRangeTableEffect<T>(
|
|
|
87
87
|
switchMap(([, { selectedItems }]) => {
|
|
88
88
|
return config.service!.removeRange(selectedItems).pipe(
|
|
89
89
|
map(() => {
|
|
90
|
-
return createGetPageTableAction(tableRepository)
|
|
91
|
-
({ page: 0, size: DEFAULT_SEARCH_LIMIT })
|
|
90
|
+
return createGetPageTableAction(tableRepository)({ page: 0, size: DEFAULT_SEARCH_LIMIT })
|
|
92
91
|
}),
|
|
93
92
|
catchError(error => {
|
|
94
93
|
return of(createDataLoadErrorTableAction(tableRepository)({ error }))
|
package/tsconfig.json
CHANGED