@verisoft/store 18.1.0 → 18.3.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/.eslintrc.json +43 -43
- package/README.md +7 -7
- package/jest.config.ts +22 -22
- package/ng-package.json +7 -7
- package/package.json +13 -12
- package/project.json +36 -36
- package/src/index.ts +12 -9
- package/src/lib/binding-state/binding.actions.ts +76 -0
- package/src/lib/binding-state/binding.effects.ts +472 -0
- package/src/lib/detail-state/detail.actions.ts +89 -63
- package/src/lib/detail-state/detail.effects.ts +283 -131
- package/src/lib/detail-state/detail.models.ts +42 -32
- package/src/lib/detail-state/detail.reducer.ts +147 -122
- package/src/lib/table-state/actions.ts +92 -92
- package/src/lib/table-state/effects.ts +100 -100
- package/src/lib/table-state/models.ts +19 -19
- package/src/lib/table-state/reducers.ts +126 -126
- package/src/test-setup.ts +8 -8
- package/tsconfig.json +29 -29
- package/tsconfig.lib.json +17 -17
- package/tsconfig.lib.prod.json +9 -9
- package/tsconfig.spec.json +16 -16
package/.eslintrc.json
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": ["../../../.eslintrc.base.json"],
|
|
3
|
-
"ignorePatterns": ["!**/*"],
|
|
4
|
-
"overrides": [
|
|
5
|
-
{
|
|
6
|
-
"files": ["*.ts"],
|
|
7
|
-
"extends": [
|
|
8
|
-
"plugin:@nx/angular",
|
|
9
|
-
"plugin:@angular-eslint/template/process-inline-templates"
|
|
10
|
-
],
|
|
11
|
-
"rules": {
|
|
12
|
-
"@angular-eslint/directive-selector": [
|
|
13
|
-
"error",
|
|
14
|
-
{
|
|
15
|
-
"type": "attribute",
|
|
16
|
-
"prefix": "lib",
|
|
17
|
-
"style": "camelCase"
|
|
18
|
-
}
|
|
19
|
-
],
|
|
20
|
-
"@angular-eslint/component-selector": [
|
|
21
|
-
"error",
|
|
22
|
-
{
|
|
23
|
-
"type": "element",
|
|
24
|
-
"prefix": "lib",
|
|
25
|
-
"style": "kebab-case"
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"files": ["*.html"],
|
|
32
|
-
"extends": ["plugin:@nx/angular-template"],
|
|
33
|
-
"rules": {}
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"files": ["*.json"],
|
|
37
|
-
"parser": "jsonc-eslint-parser",
|
|
38
|
-
"rules": {
|
|
39
|
-
"@nx/dependency-checks": "error"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": ["../../../.eslintrc.base.json"],
|
|
3
|
+
"ignorePatterns": ["!**/*"],
|
|
4
|
+
"overrides": [
|
|
5
|
+
{
|
|
6
|
+
"files": ["*.ts"],
|
|
7
|
+
"extends": [
|
|
8
|
+
"plugin:@nx/angular",
|
|
9
|
+
"plugin:@angular-eslint/template/process-inline-templates"
|
|
10
|
+
],
|
|
11
|
+
"rules": {
|
|
12
|
+
"@angular-eslint/directive-selector": [
|
|
13
|
+
"error",
|
|
14
|
+
{
|
|
15
|
+
"type": "attribute",
|
|
16
|
+
"prefix": "lib",
|
|
17
|
+
"style": "camelCase"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"@angular-eslint/component-selector": [
|
|
21
|
+
"error",
|
|
22
|
+
{
|
|
23
|
+
"type": "element",
|
|
24
|
+
"prefix": "lib",
|
|
25
|
+
"style": "kebab-case"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"files": ["*.html"],
|
|
32
|
+
"extends": ["plugin:@nx/angular-template"],
|
|
33
|
+
"rules": {}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"files": ["*.json"],
|
|
37
|
+
"parser": "jsonc-eslint-parser",
|
|
38
|
+
"rules": {
|
|
39
|
+
"@nx/dependency-checks": "error"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# store
|
|
2
|
-
|
|
3
|
-
This library was generated with [Nx](https://nx.dev).
|
|
4
|
-
|
|
5
|
-
## Running unit tests
|
|
6
|
-
|
|
7
|
-
Run `nx test store` to execute the unit tests.
|
|
1
|
+
# store
|
|
2
|
+
|
|
3
|
+
This library was generated with [Nx](https://nx.dev).
|
|
4
|
+
|
|
5
|
+
## Running unit tests
|
|
6
|
+
|
|
7
|
+
Run `nx test store` to execute the unit tests.
|
package/jest.config.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
export default {
|
|
3
|
-
displayName: 'store',
|
|
4
|
-
preset: '../../../jest.preset.js',
|
|
5
|
-
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
|
6
|
-
coverageDirectory: '../../../coverage/src/libs/store',
|
|
7
|
-
transform: {
|
|
8
|
-
'^.+\\.(ts|mjs|js|html)$': [
|
|
9
|
-
'jest-preset-angular',
|
|
10
|
-
{
|
|
11
|
-
tsconfig: '<rootDir>/tsconfig.spec.json',
|
|
12
|
-
stringifyContentPathRegex: '\\.(html|svg)$',
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
},
|
|
16
|
-
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
|
|
17
|
-
snapshotSerializers: [
|
|
18
|
-
'jest-preset-angular/build/serializers/no-ng-attributes',
|
|
19
|
-
'jest-preset-angular/build/serializers/ng-snapshot',
|
|
20
|
-
'jest-preset-angular/build/serializers/html-comment',
|
|
21
|
-
],
|
|
22
|
-
};
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
export default {
|
|
3
|
+
displayName: 'store',
|
|
4
|
+
preset: '../../../jest.preset.js',
|
|
5
|
+
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
|
6
|
+
coverageDirectory: '../../../coverage/src/libs/store',
|
|
7
|
+
transform: {
|
|
8
|
+
'^.+\\.(ts|mjs|js|html)$': [
|
|
9
|
+
'jest-preset-angular',
|
|
10
|
+
{
|
|
11
|
+
tsconfig: '<rootDir>/tsconfig.spec.json',
|
|
12
|
+
stringifyContentPathRegex: '\\.(html|svg)$',
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
|
|
17
|
+
snapshotSerializers: [
|
|
18
|
+
'jest-preset-angular/build/serializers/no-ng-attributes',
|
|
19
|
+
'jest-preset-angular/build/serializers/ng-snapshot',
|
|
20
|
+
'jest-preset-angular/build/serializers/html-comment',
|
|
21
|
+
],
|
|
22
|
+
};
|
package/ng-package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
|
|
3
|
-
"dest": "../../../dist/src/libs/store",
|
|
4
|
-
"lib": {
|
|
5
|
-
"entryFile": "src/index.ts"
|
|
6
|
-
}
|
|
7
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
|
|
3
|
+
"dest": "../../../dist/src/libs/store",
|
|
4
|
+
"lib": {
|
|
5
|
+
"entryFile": "src/index.ts"
|
|
6
|
+
}
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@verisoft/store",
|
|
3
|
-
"version": "18.1
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@ngrx/store": "^18.0.2",
|
|
6
|
-
"@
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@verisoft/store",
|
|
3
|
+
"version": "18.3.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@ngrx/store": "^18.0.2",
|
|
6
|
+
"@verisoft/core": "18.3.1",
|
|
7
|
+
"@ngrx/effects": "18.0.2",
|
|
8
|
+
"rxjs": "~7.8.0",
|
|
9
|
+
"@angular/router": "18.2.8"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {},
|
|
12
|
+
"sideEffects": false
|
|
13
|
+
}
|
package/project.json
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "store",
|
|
3
|
-
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
-
"sourceRoot": "src/libs/store/src",
|
|
5
|
-
"prefix": "lib",
|
|
6
|
-
"projectType": "library",
|
|
7
|
-
"tags": [],
|
|
8
|
-
"targets": {
|
|
9
|
-
"build": {
|
|
10
|
-
"executor": "@nx/angular:package",
|
|
11
|
-
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
|
|
12
|
-
"options": {
|
|
13
|
-
"project": "src/libs/store/ng-package.json"
|
|
14
|
-
},
|
|
15
|
-
"configurations": {
|
|
16
|
-
"production": {
|
|
17
|
-
"tsConfig": "src/libs/store/tsconfig.lib.prod.json"
|
|
18
|
-
},
|
|
19
|
-
"development": {
|
|
20
|
-
"tsConfig": "src/libs/store/tsconfig.lib.json"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"defaultConfiguration": "production"
|
|
24
|
-
},
|
|
25
|
-
"test": {
|
|
26
|
-
"executor": "@nx/jest:jest",
|
|
27
|
-
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
|
28
|
-
"options": {
|
|
29
|
-
"jestConfig": "src/libs/store/jest.config.ts"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"lint": {
|
|
33
|
-
"executor": "@nx/eslint:lint"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "store",
|
|
3
|
+
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
+
"sourceRoot": "src/libs/store/src",
|
|
5
|
+
"prefix": "lib",
|
|
6
|
+
"projectType": "library",
|
|
7
|
+
"tags": [],
|
|
8
|
+
"targets": {
|
|
9
|
+
"build": {
|
|
10
|
+
"executor": "@nx/angular:package",
|
|
11
|
+
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
|
|
12
|
+
"options": {
|
|
13
|
+
"project": "src/libs/store/ng-package.json"
|
|
14
|
+
},
|
|
15
|
+
"configurations": {
|
|
16
|
+
"production": {
|
|
17
|
+
"tsConfig": "src/libs/store/tsconfig.lib.prod.json"
|
|
18
|
+
},
|
|
19
|
+
"development": {
|
|
20
|
+
"tsConfig": "src/libs/store/tsconfig.lib.json"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"defaultConfiguration": "production"
|
|
24
|
+
},
|
|
25
|
+
"test": {
|
|
26
|
+
"executor": "@nx/jest:jest",
|
|
27
|
+
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
|
28
|
+
"options": {
|
|
29
|
+
"jestConfig": "src/libs/store/jest.config.ts"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"lint": {
|
|
33
|
+
"executor": "@nx/eslint:lint"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
export * from './lib/detail-state/detail.actions';
|
|
2
|
-
export * from './lib/detail-state/detail.reducer';
|
|
3
|
-
export * from './lib/detail-state/detail.effects';
|
|
4
|
-
export * from './lib/detail-state/detail.models';
|
|
5
|
-
|
|
6
|
-
export * from './lib/table-state/actions';
|
|
7
|
-
export * from './lib/table-state/reducers';
|
|
8
|
-
export * from './lib/table-state/effects';
|
|
9
|
-
export * from './lib/table-state/models';
|
|
1
|
+
export * from './lib/detail-state/detail.actions';
|
|
2
|
+
export * from './lib/detail-state/detail.reducer';
|
|
3
|
+
export * from './lib/detail-state/detail.effects';
|
|
4
|
+
export * from './lib/detail-state/detail.models';
|
|
5
|
+
|
|
6
|
+
export * from './lib/table-state/actions';
|
|
7
|
+
export * from './lib/table-state/reducers';
|
|
8
|
+
export * from './lib/table-state/effects';
|
|
9
|
+
export * from './lib/table-state/models';
|
|
10
|
+
|
|
11
|
+
export * from './lib/binding-state/binding.actions';
|
|
12
|
+
export * from './lib/binding-state/binding.effects';
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { createAction, props } from '@ngrx/store';
|
|
2
|
+
|
|
3
|
+
export function createAddBindingAction<TCreate>(bindingsRepository: string) {
|
|
4
|
+
return createAction(
|
|
5
|
+
`[${bindingsRepository}/API] Add bindings`,
|
|
6
|
+
props<{ binding: TCreate }>()
|
|
7
|
+
);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function createAddBindingsAction<TCreate>(bindingsRepository: string) {
|
|
11
|
+
return createAction(
|
|
12
|
+
`[${bindingsRepository}/API] Add bindings`,
|
|
13
|
+
props<{ bindings: TCreate[] }>()
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function createAddBindingsFailureAction(bindingsRepository: string) {
|
|
18
|
+
return createAction(
|
|
19
|
+
`[${bindingsRepository}/API] Add bindings failure`,
|
|
20
|
+
props<{ error: any }>()
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function createAddBindingsSuccessAction(bindingsRepository: string) {
|
|
25
|
+
return createAction(
|
|
26
|
+
`[${bindingsRepository}/API] Add bindings success`
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function createEditBindingAction<TEdit>(bindingsRepository: string) {
|
|
31
|
+
return createAction(
|
|
32
|
+
`[${bindingsRepository}/API] Edit binding`,
|
|
33
|
+
props<{ binding: TEdit }>()
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function createEditBindingFailureAction(bindingsRepository: string) {
|
|
38
|
+
return createAction(
|
|
39
|
+
`[${bindingsRepository}/API] Edit binding failure`,
|
|
40
|
+
props<{ error: any }>()
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function createEditBindingSuccessAction(bindingsRepository: string) {
|
|
45
|
+
return createAction(
|
|
46
|
+
`[${bindingsRepository}/API] Edit binding success`
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function createDeleteBindingAction(bindingsRepository: string) {
|
|
51
|
+
return createAction(
|
|
52
|
+
`[${bindingsRepository}/API] Delete binding`,
|
|
53
|
+
props<{ id: number | string }>()
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function createDeleteBindingsAction(bindingsRepository: string) {
|
|
58
|
+
return createAction(
|
|
59
|
+
`[${bindingsRepository}/API] Delete bindings`,
|
|
60
|
+
props<{ bindingIds: number[] }>()
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function createDeleteBindingsFailureAction(bindingsRepository: string) {
|
|
65
|
+
return createAction(
|
|
66
|
+
`[${bindingsRepository}/API] Delete bindings failure`,
|
|
67
|
+
props<{ error: any }>()
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function createDeleteBindingsSuccessAction(bindingsRepository: string) {
|
|
72
|
+
return createAction(
|
|
73
|
+
`[${bindingsRepository}/API] Delete bindings success`
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|