@ngdux/list 1.4.0 → 3.0.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.
Files changed (39) hide show
  1. package/{esm2020 → esm2022}/index.mjs +11 -11
  2. package/{esm2020 → esm2022}/lib/+state/effects.mjs +23 -23
  3. package/esm2022/lib/+state/state.service.mjs +55 -0
  4. package/esm2022/lib/models/list.model.mjs +7 -0
  5. package/{esm2020 → esm2022}/lib/ngdux-list-state.module.mjs +53 -53
  6. package/{esm2020 → esm2022}/lib/services/list-notification-service.mjs +21 -21
  7. package/esm2022/lib/state-generator/abstract-list-effects.mjs +50 -0
  8. package/esm2022/lib/state-generator/abstract-list-state.service.mjs +44 -0
  9. package/{esm2020 → esm2022}/lib/state-generator/abstract-list.facade.mjs +85 -91
  10. package/{esm2020 → esm2022}/lib/state-generator/list-actions.mjs +58 -63
  11. package/esm2022/lib/state-generator/list-reducer.mjs +104 -0
  12. package/esm2022/lib/state-generator/list-selectors.mjs +80 -0
  13. package/{esm2020 → esm2022}/lib/state-generator/list-state.mjs +17 -17
  14. package/{esm2020 → esm2022}/ngdux-list.mjs +4 -4
  15. package/{fesm2020 → fesm2022}/ngdux-list.mjs +523 -550
  16. package/fesm2022/ngdux-list.mjs.map +1 -0
  17. package/index.d.ts +11 -11
  18. package/lib/+state/effects.d.ts +14 -14
  19. package/lib/+state/state.service.d.ts +22 -22
  20. package/lib/models/list.model.d.ts +191 -195
  21. package/lib/ngdux-list-state.module.d.ts +23 -23
  22. package/lib/services/list-notification-service.d.ts +13 -13
  23. package/lib/state-generator/abstract-list-effects.d.ts +49 -59
  24. package/lib/state-generator/abstract-list-state.service.d.ts +21 -21
  25. package/lib/state-generator/abstract-list.facade.d.ts +45 -49
  26. package/lib/state-generator/list-actions.d.ts +2 -2
  27. package/lib/state-generator/list-reducer.d.ts +10 -10
  28. package/lib/state-generator/list-selectors.d.ts +4 -4
  29. package/lib/state-generator/list-state.d.ts +12 -12
  30. package/package.json +11 -120
  31. package/esm2020/lib/+state/state.service.mjs +0 -55
  32. package/esm2020/lib/models/list.model.mjs +0 -7
  33. package/esm2020/lib/state-generator/abstract-list-effects.mjs +0 -66
  34. package/esm2020/lib/state-generator/abstract-list-state.service.mjs +0 -44
  35. package/esm2020/lib/state-generator/list-reducer.mjs +0 -104
  36. package/esm2020/lib/state-generator/list-selectors.mjs +0 -80
  37. package/fesm2015/ngdux-list.mjs +0 -537
  38. package/fesm2015/ngdux-list.mjs.map +0 -1
  39. package/fesm2020/ngdux-list.mjs.map +0 -1
@@ -1,195 +1,191 @@
1
- import { InjectionToken, Type } from '@angular/core';
2
- import { ErrorDto, FilteringOptions, ListNotificationService, ListService, PagingOptions, RequestOptions, RequestState, SortingOptions } from '@ngdux/data-model-common';
3
- import { ApiRequestState, LoadingState } from '@ngdux/store-common';
4
- import { EntityState } from '@ngrx/entity';
5
- import { ActionCreator, MemoizedSelector } from '@ngrx/store';
6
- import { TypedAction } from '@ngrx/store/src/models';
7
- export declare const LIST_FEATURE_KEY: InjectionToken<string>;
8
- export declare const LIST_FEATURE_KEYS: InjectionToken<string>;
9
- export declare const LIST_SERVICES: InjectionToken<string>;
10
- export declare const LIST_NOTIFICATION_SERVICES: InjectionToken<string>;
11
- export interface ListState<T, E = unknown, Params = Record<string, string>> extends EntityState<T>, RequestOptions<Params>, ApiRequestState<E>, LoadingState {
12
- selectedResourceIds: string[];
13
- lastPageNumber?: number;
14
- }
15
- export interface ListSelectors<T, E = unknown, Params = Record<string, string>> {
16
- getAll: MemoizedSelector<object, T[]>;
17
- getRequestOptions: MemoizedSelector<object, RequestOptions>;
18
- isLastPage: MemoizedSelector<object, boolean>;
19
- getCurrentPageData: MemoizedSelector<object, T[]>;
20
- getPagingOptions: MemoizedSelector<object, PagingOptions>;
21
- getSortingOptions: MemoizedSelector<object, SortingOptions>;
22
- getFilteringOptions: MemoizedSelector<object, FilteringOptions>;
23
- getRequestParameters: MemoizedSelector<object, Params | undefined>;
24
- getCurrentPageNumber: MemoizedSelector<object, number>;
25
- getLastPageNumber: MemoizedSelector<object, number | undefined>;
26
- getLoadingState: MemoizedSelector<object, RequestState>;
27
- getSelectedResourceIds: MemoizedSelector<object, string[]>;
28
- getSelectedItems: MemoizedSelector<object, T[]>;
29
- getSelectionRecord: MemoizedSelector<object, Record<string, T>>;
30
- getRequestState: MemoizedSelector<object, RequestState>;
31
- getErrors: MemoizedSelector<object, E | undefined>;
32
- areSelectedReady: MemoizedSelector<object, boolean>;
33
- isReady: MemoizedSelector<object, boolean>;
34
- isDeleteDisabled: MemoizedSelector<object, boolean>;
35
- isCopyDisabled: MemoizedSelector<object, boolean>;
36
- getTotalCount: MemoizedSelector<object, number>;
37
- }
38
- export interface ListActions<Entity, Error = unknown, Summary = Entity, Params = Record<string, string>> {
39
- /**
40
- * Set the page size without reloading the list
41
- */
42
- setPageSize: ActionCreator<string, (props: {
43
- pageSize: number;
44
- }) => {
45
- pageSize: number;
46
- } & TypedAction<string>>;
47
- /**
48
- * Set the sorting options without reloading the list
49
- */
50
- setSorting: ActionCreator<string, (props: {
51
- sortingOptions: SortingOptions;
52
- }) => {
53
- sortingOptions: SortingOptions;
54
- } & TypedAction<string>>;
55
- /**
56
- * Set the filtering options without reloading the list
57
- */
58
- setFiltering: ActionCreator<string, (props: {
59
- filteringOptions: FilteringOptions;
60
- }) => {
61
- filteringOptions: FilteringOptions;
62
- } & TypedAction<string>>;
63
- /**
64
- * Set the request parameters without reloading the list
65
- */
66
- setRequestParams: ActionCreator<string, (props: {
67
- params: Params;
68
- }) => {
69
- params: Params;
70
- } & TypedAction<string>>;
71
- /**
72
- * Change the paging options and reload the list
73
- */
74
- changePagingOptions: ActionCreator<string, (props: {
75
- pagingOptions: PagingOptions;
76
- }) => {
77
- pagingOptions: PagingOptions;
78
- } & TypedAction<string>>;
79
- /**
80
- * Change the page number and reload the list
81
- */
82
- changePageNumber: ActionCreator<string, (props: {
83
- pageNumber: number;
84
- }) => {
85
- pageNumber: number;
86
- } & TypedAction<string>>;
87
- /**
88
- * Change the page size and reload the list
89
- */
90
- changePageSize: ActionCreator<string, (props: {
91
- pageSize: number;
92
- }) => {
93
- pageSize: number;
94
- } & TypedAction<string>>;
95
- /**
96
- * Change the sorting options and reload the list
97
- */
98
- changeSorting: ActionCreator<string, (props: {
99
- sortingOptions: SortingOptions;
100
- }) => {
101
- sortingOptions: SortingOptions;
102
- } & TypedAction<string>>;
103
- /**
104
- * Change the filtering options and reload the list
105
- */
106
- changeFiltering: ActionCreator<string, (props: {
107
- filteringOptions: FilteringOptions;
108
- }) => {
109
- filteringOptions: FilteringOptions;
110
- } & TypedAction<string>>;
111
- /**
112
- * Change the request parameters and reload the list
113
- */
114
- changeRequestParams: ActionCreator<string, (props: {
115
- params: Params;
116
- }) => {
117
- params: Params;
118
- } & TypedAction<string>>;
119
- changeSelectedResources: ActionCreator<string, (props: {
120
- selectedResourceIds: string[];
121
- }) => {
122
- selectedResourceIds: string[];
123
- } & TypedAction<string>>;
124
- loadPage: ActionCreator<string, () => TypedAction<string>>;
125
- loadPageSuccess: ActionCreator<string, (props: {
126
- resources: Summary[];
127
- pagingOptions: PagingOptions;
128
- }) => {
129
- resources: Summary[];
130
- pagingOptions: PagingOptions;
131
- } & TypedAction<string>>;
132
- loadPageFailure: ActionCreator<string, (props: {
133
- errors: Error;
134
- }) => {
135
- errors: Error;
136
- } & TypedAction<string>>;
137
- delete: ActionCreator<string, (props: {
138
- resourceIds: string[];
139
- }) => {
140
- resourceIds: string[];
141
- } & TypedAction<string>>;
142
- deleteSuccess: ActionCreator<string, (props: {
143
- resourceIds: string[];
144
- }) => {
145
- resourceIds: string[];
146
- } & TypedAction<string>>;
147
- deleteFailure: ActionCreator<string, (props: {
148
- errors: Error;
149
- }) => {
150
- errors: Error;
151
- } & TypedAction<string>>;
152
- patch: ActionCreator<string, (props: {
153
- resourceIds: string[];
154
- resource: Partial<Entity>;
155
- }) => {
156
- resourceIds: string[];
157
- resource: Partial<Entity>;
158
- } & TypedAction<string>>;
159
- patchSuccess: ActionCreator<string, (props: {
160
- resources: (Entity | ErrorDto)[];
161
- }) => {
162
- resources: (Entity | ErrorDto)[];
163
- } & TypedAction<string>>;
164
- patchFailure: ActionCreator<string, (props: {
165
- errors: Error;
166
- }) => {
167
- errors: Error;
168
- } & TypedAction<string>>;
169
- loadNextPage: ActionCreator<string, () => TypedAction<string>>;
170
- /**
171
- * Remove the current data, set the page number to 1 and deselect resources.
172
- * Keep all the rest, like filteringOptions and sortingOptions
173
- */
174
- initialize: ActionCreator<string, () => TypedAction<string>>;
175
- /**
176
- * Reset to the initial state
177
- */
178
- reset: ActionCreator<string, () => TypedAction<string>>;
179
- loadPreviousPage: ActionCreator<string, () => TypedAction<string>>;
180
- loadFirstPage: ActionCreator<string, () => TypedAction<string>>;
181
- /**
182
- * Reset the request state to idle
183
- */
184
- resetRequestState: ActionCreator<string, () => TypedAction<string>>;
185
- /**
186
- * @deprecated The method will be removed. THe AbstractEffect will not be responsible for it anymore
187
- */
188
- showRemovalsConfirmation: ActionCreator<string, () => TypedAction<string>>;
189
- }
190
- export interface NgduxListStateModuleConfig<T extends {
191
- [key: string]: any;
192
- }, E, S = T, Params = Record<string, string>> {
193
- service: Type<ListService<T, S, Params>>;
194
- notificationService?: Type<ListNotificationService<E>>;
195
- }
1
+ import { InjectionToken, Type } from '@angular/core';
2
+ import { ErrorDto, FilteringOptions, ListNotificationService, ListService, PagingOptions, RequestOptions, RequestState, SortingField } from '@ngdux/data-model-common';
3
+ import { ApiRequestState, LoadingState } from '@ngdux/store-common';
4
+ import { EntityState } from '@ngrx/entity';
5
+ import { ActionCreator, MemoizedSelector } from '@ngrx/store';
6
+ import { TypedAction } from '@ngrx/store/src/models';
7
+ export declare const LIST_FEATURE_KEY: InjectionToken<string>;
8
+ export declare const LIST_FEATURE_KEYS: InjectionToken<string>;
9
+ export declare const LIST_SERVICES: InjectionToken<string>;
10
+ export declare const LIST_NOTIFICATION_SERVICES: InjectionToken<string>;
11
+ export interface ListState<T, E = unknown, Params = Record<string, string>> extends EntityState<T>, RequestOptions<Params>, ApiRequestState<E>, LoadingState {
12
+ selectedResourceIds: string[];
13
+ lastPageNumber?: number;
14
+ }
15
+ export interface ListSelectors<T, E = unknown, Params = Record<string, string>> {
16
+ getAll: MemoizedSelector<object, T[]>;
17
+ getRequestOptions: MemoizedSelector<object, RequestOptions>;
18
+ isLastPage: MemoizedSelector<object, boolean>;
19
+ getCurrentPageData: MemoizedSelector<object, T[]>;
20
+ getPagingOptions: MemoizedSelector<object, PagingOptions>;
21
+ getSortingOptions: MemoizedSelector<object, SortingField[]>;
22
+ getFilteringOptions: MemoizedSelector<object, FilteringOptions>;
23
+ getRequestParameters: MemoizedSelector<object, Params | undefined>;
24
+ getCurrentPageNumber: MemoizedSelector<object, number>;
25
+ getLastPageNumber: MemoizedSelector<object, number | undefined>;
26
+ getLoadingState: MemoizedSelector<object, RequestState>;
27
+ getSelectedResourceIds: MemoizedSelector<object, string[]>;
28
+ getSelectedItems: MemoizedSelector<object, T[]>;
29
+ getSelectionRecord: MemoizedSelector<object, Record<string, T>>;
30
+ getRequestState: MemoizedSelector<object, RequestState>;
31
+ getErrors: MemoizedSelector<object, E | undefined>;
32
+ areSelectedReady: MemoizedSelector<object, boolean>;
33
+ isReady: MemoizedSelector<object, boolean>;
34
+ isDeleteDisabled: MemoizedSelector<object, boolean>;
35
+ isCopyDisabled: MemoizedSelector<object, boolean>;
36
+ getTotalCount: MemoizedSelector<object, number>;
37
+ }
38
+ export interface ListActions<Entity, Error = unknown, Summary = Entity, Params = Record<string, string>> {
39
+ /**
40
+ * Set the page size without reloading the list
41
+ */
42
+ setPageSize: ActionCreator<string, (props: {
43
+ pageSize: number;
44
+ }) => {
45
+ pageSize: number;
46
+ } & TypedAction<string>>;
47
+ /**
48
+ * Set the sorting options without reloading the list
49
+ */
50
+ setSorting: ActionCreator<string, (props: {
51
+ sortingOptions: SortingField[];
52
+ }) => {
53
+ sortingOptions: SortingField[];
54
+ } & TypedAction<string>>;
55
+ /**
56
+ * Set the filtering options without reloading the list
57
+ */
58
+ setFiltering: ActionCreator<string, (props: {
59
+ filteringOptions: FilteringOptions;
60
+ }) => {
61
+ filteringOptions: FilteringOptions;
62
+ } & TypedAction<string>>;
63
+ /**
64
+ * Set the request parameters without reloading the list
65
+ */
66
+ setRequestParams: ActionCreator<string, (props: {
67
+ params: Params;
68
+ }) => {
69
+ params: Params;
70
+ } & TypedAction<string>>;
71
+ /**
72
+ * Change the paging options and reload the list
73
+ */
74
+ changePagingOptions: ActionCreator<string, (props: {
75
+ pagingOptions: PagingOptions;
76
+ }) => {
77
+ pagingOptions: PagingOptions;
78
+ } & TypedAction<string>>;
79
+ /**
80
+ * Change the page number and reload the list
81
+ */
82
+ changePageNumber: ActionCreator<string, (props: {
83
+ pageNumber: number;
84
+ }) => {
85
+ pageNumber: number;
86
+ } & TypedAction<string>>;
87
+ /**
88
+ * Change the page size and reload the list
89
+ */
90
+ changePageSize: ActionCreator<string, (props: {
91
+ pageSize: number;
92
+ }) => {
93
+ pageSize: number;
94
+ } & TypedAction<string>>;
95
+ /**
96
+ * Change the sorting options and reload the list
97
+ */
98
+ changeSorting: ActionCreator<string, (props: {
99
+ sortingOptions: SortingField[];
100
+ }) => {
101
+ sortingOptions: SortingField[];
102
+ } & TypedAction<string>>;
103
+ /**
104
+ * Change the filtering options and reload the list
105
+ */
106
+ changeFiltering: ActionCreator<string, (props: {
107
+ filteringOptions: FilteringOptions;
108
+ }) => {
109
+ filteringOptions: FilteringOptions;
110
+ } & TypedAction<string>>;
111
+ /**
112
+ * Change the request parameters and reload the list
113
+ */
114
+ changeRequestParams: ActionCreator<string, (props: {
115
+ params: Params;
116
+ }) => {
117
+ params: Params;
118
+ } & TypedAction<string>>;
119
+ changeSelectedResources: ActionCreator<string, (props: {
120
+ selectedResourceIds: string[];
121
+ }) => {
122
+ selectedResourceIds: string[];
123
+ } & TypedAction<string>>;
124
+ loadPage: ActionCreator<string, () => TypedAction<string>>;
125
+ loadPageSuccess: ActionCreator<string, (props: {
126
+ resources: Summary[];
127
+ pagingOptions: PagingOptions;
128
+ }) => {
129
+ resources: Summary[];
130
+ pagingOptions: PagingOptions;
131
+ } & TypedAction<string>>;
132
+ loadPageFailure: ActionCreator<string, (props: {
133
+ errors: Error;
134
+ }) => {
135
+ errors: Error;
136
+ } & TypedAction<string>>;
137
+ delete: ActionCreator<string, (props: {
138
+ resourceIds: string[];
139
+ }) => {
140
+ resourceIds: string[];
141
+ } & TypedAction<string>>;
142
+ deleteSuccess: ActionCreator<string, (props: {
143
+ resourceIds: string[];
144
+ }) => {
145
+ resourceIds: string[];
146
+ } & TypedAction<string>>;
147
+ deleteFailure: ActionCreator<string, (props: {
148
+ errors: Error;
149
+ }) => {
150
+ errors: Error;
151
+ } & TypedAction<string>>;
152
+ patch: ActionCreator<string, (props: {
153
+ resourceIds: string[];
154
+ resource: Partial<Entity>;
155
+ }) => {
156
+ resourceIds: string[];
157
+ resource: Partial<Entity>;
158
+ } & TypedAction<string>>;
159
+ patchSuccess: ActionCreator<string, (props: {
160
+ resources: (Entity | ErrorDto)[];
161
+ }) => {
162
+ resources: (Entity | ErrorDto)[];
163
+ } & TypedAction<string>>;
164
+ patchFailure: ActionCreator<string, (props: {
165
+ errors: Error;
166
+ }) => {
167
+ errors: Error;
168
+ } & TypedAction<string>>;
169
+ loadNextPage: ActionCreator<string, () => TypedAction<string>>;
170
+ /**
171
+ * Remove the current data, set the page number to 1 and deselect resources.
172
+ * Keep all the rest, like filteringOptions and sortingOptions
173
+ */
174
+ initialize: ActionCreator<string, () => TypedAction<string>>;
175
+ /**
176
+ * Reset to the initial state
177
+ */
178
+ reset: ActionCreator<string, () => TypedAction<string>>;
179
+ loadPreviousPage: ActionCreator<string, () => TypedAction<string>>;
180
+ loadFirstPage: ActionCreator<string, () => TypedAction<string>>;
181
+ /**
182
+ * Reset the request state to idle
183
+ */
184
+ resetRequestState: ActionCreator<string, () => TypedAction<string>>;
185
+ }
186
+ export interface NgduxListStateModuleConfig<T extends {
187
+ [key: string]: any;
188
+ }, E, S = T, Params = Record<string, string>> {
189
+ service: Type<ListService<T, S, Params>>;
190
+ notificationService?: Type<ListNotificationService<E>>;
191
+ }
@@ -1,23 +1,23 @@
1
- import { ModuleWithProviders } from '@angular/core';
2
- import { ListNotificationService, ListService } from '@ngdux/data-model-common';
3
- import { RegisterEffectsService } from '@ngdux/store-common';
4
- import { Actions } from '@ngrx/effects';
5
- import { Store } from '@ngrx/store';
6
- import { ListStateService } from './+state/state.service';
7
- import { NgduxListStateModuleConfig } from './models/list.model';
8
- import * as i0 from "@angular/core";
9
- export declare class NgduxListStateModule<T extends {
10
- [key: string]: any;
11
- }, Error = unknown, S extends {
12
- [key: string]: any;
13
- } = T, Params = Record<string, string>> {
14
- constructor(registerEffectsService: RegisterEffectsService, actions$: Actions, store: Store, listStateService: ListStateService<T, Error, S, Params>, featureKeys: string[], services: ListService<T, S, Params>[], notificationServices: ListNotificationService<Error>[]);
15
- static config<T extends {
16
- [key: string]: any;
17
- }, Error = unknown, S extends {
18
- [key: string]: any;
19
- } = T, Params = Record<string, string>>(config: NgduxListStateModuleConfig<T, Error, S, Params>): ModuleWithProviders<NgduxListStateModule<T, Error, S, Params>>;
20
- static ɵfac: i0.ɵɵFactoryDeclaration<NgduxListStateModule, never>;
21
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgduxListStateModule, never, never, never>;
22
- static ɵinj: i0.ɵɵInjectorDeclaration<NgduxListStateModule>;
23
- }
1
+ import { ModuleWithProviders } from '@angular/core';
2
+ import { ListNotificationService, ListService } from '@ngdux/data-model-common';
3
+ import { RegisterEffectsService } from '@ngdux/store-common';
4
+ import { Actions } from '@ngrx/effects';
5
+ import { Store } from '@ngrx/store';
6
+ import { ListStateService } from './+state/state.service';
7
+ import { NgduxListStateModuleConfig } from './models/list.model';
8
+ import * as i0 from "@angular/core";
9
+ export declare class NgduxListStateModule<T extends {
10
+ [key: string]: any;
11
+ }, Error = unknown, S extends {
12
+ [key: string]: any;
13
+ } = T, Params = Record<string, string>> {
14
+ constructor(registerEffectsService: RegisterEffectsService, actions$: Actions, store: Store, listStateService: ListStateService<T, Error, S, Params>, featureKeys: string[], services: ListService<T, S, Params>[], notificationServices: ListNotificationService<Error>[]);
15
+ static config<T extends {
16
+ [key: string]: any;
17
+ }, Error = unknown, S extends {
18
+ [key: string]: any;
19
+ } = T, Params = Record<string, string>>(config: NgduxListStateModuleConfig<T, Error, S, Params>): ModuleWithProviders<NgduxListStateModule<T, Error, S, Params>>;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgduxListStateModule, never>;
21
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgduxListStateModule, never, never, never>;
22
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgduxListStateModule>;
23
+ }
@@ -1,13 +1,13 @@
1
- import { ErrorDto, ListNotificationService } from '@ngdux/data-model-common';
2
- import { Observable } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- export declare class NotificationServicePlaceholder implements ListNotificationService<ErrorDto> {
5
- onListErrors(errors: ErrorDto): void;
6
- onListDelete(ids: string[]): void;
7
- openConfirmationDialog(data: {
8
- message: string;
9
- title: string;
10
- }): Observable<boolean>;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<NotificationServicePlaceholder, never>;
12
- static ɵprov: i0.ɵɵInjectableDeclaration<NotificationServicePlaceholder>;
13
- }
1
+ import { ErrorDto, ListNotificationService } from '@ngdux/data-model-common';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export declare class NotificationServicePlaceholder implements ListNotificationService<ErrorDto> {
5
+ onListErrors(errors: ErrorDto): void;
6
+ onListDelete(ids: string[]): void;
7
+ openConfirmationDialog(data: {
8
+ message: string;
9
+ title: string;
10
+ }): Observable<boolean>;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationServicePlaceholder, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<NotificationServicePlaceholder>;
13
+ }
@@ -1,59 +1,49 @@
1
- import { ListNotificationService, ListService } from '@ngdux/data-model-common';
2
- import { Actions } from '@ngrx/effects';
3
- import { Store } from '@ngrx/store';
4
- import { ListActions, ListSelectors } from '../models/list.model';
5
- export declare abstract class AbstractListEffects<T, E = unknown, S = T, Params = Record<string, string>> {
6
- protected readonly actions$: Actions;
7
- protected readonly store: Store;
8
- protected readonly service: ListService<T, S, Params>;
9
- protected readonly listActions: ListActions<T, E, S, Params>;
10
- protected readonly listSelectors: ListSelectors<S, E, Params>;
11
- protected readonly notificationService?: ListNotificationService<E> | undefined;
12
- texts: {
13
- deleteConfirmationTitle: string;
14
- deleteConfirmationMessage: string;
15
- };
16
- reload$: import("rxjs").Observable<import("@ngrx/store/src/models").TypedAction<string>> & import("@ngrx/effects").CreateEffectMetadata;
17
- loadFirstPage$: import("rxjs").Observable<{
18
- pageNumber: number;
19
- } & import("@ngrx/store/src/models").TypedAction<string>> & import("@ngrx/effects").CreateEffectMetadata;
20
- loadPreviousPage$: import("rxjs").Observable<{
21
- pageNumber: number;
22
- } & import("@ngrx/store/src/models").TypedAction<string>> & import("@ngrx/effects").CreateEffectMetadata;
23
- loadNextPage$: import("rxjs").Observable<{
24
- pageNumber: number;
25
- } & import("@ngrx/store/src/models").TypedAction<string>> & import("@ngrx/effects").CreateEffectMetadata;
26
- loadPage$: import("rxjs").Observable<({
27
- resources: S[];
28
- pagingOptions: import("@ngdux/data-model-common").PagingOptions;
29
- } & import("@ngrx/store/src/models").TypedAction<string>) | ({
30
- errors: E;
31
- } & import("@ngrx/store/src/models").TypedAction<string>)> & import("@ngrx/effects").CreateEffectMetadata;
32
- patch$: import("rxjs").Observable<({
33
- resources: (import("@ngdux/data-model-common").ErrorDto | T)[];
34
- } & import("@ngrx/store/src/models").TypedAction<string>) | ({
35
- errors: E;
36
- } & import("@ngrx/store/src/models").TypedAction<string>)> & import("@ngrx/effects").CreateEffectMetadata;
37
- /**
38
- * @deprecated The method will be removed. THe AbstractEffect will not be responsible for it anymore
39
- */
40
- showRemovalsDialog$: import("rxjs").Observable<{
41
- resourceIds: string[];
42
- } & import("@ngrx/store/src/models").TypedAction<string>> & import("@ngrx/effects").CreateEffectMetadata;
43
- delete$: import("rxjs").Observable<({
44
- resourceIds: string[];
45
- } & import("@ngrx/store/src/models").TypedAction<string>) | ({
46
- errors: E;
47
- } & import("@ngrx/store/src/models").TypedAction<string>)> & import("@ngrx/effects").CreateEffectMetadata;
48
- deleteSuccess$: import("rxjs").Observable<{
49
- resourceIds: string[];
50
- } & import("@ngrx/store/src/models").TypedAction<string>> & import("@ngrx/effects").CreateEffectMetadata;
51
- errorsHandler$: import("rxjs").Observable<({
52
- errors: E;
53
- } & import("@ngrx/store/src/models").TypedAction<string>) | ({
54
- errors: E;
55
- } & import("@ngrx/store/src/models").TypedAction<string>) | ({
56
- errors: E;
57
- } & import("@ngrx/store/src/models").TypedAction<string>)> & import("@ngrx/effects").CreateEffectMetadata;
58
- protected constructor(actions$: Actions, store: Store, service: ListService<T, S, Params>, listActions: ListActions<T, E, S, Params>, listSelectors: ListSelectors<S, E, Params>, notificationService?: ListNotificationService<E> | undefined);
59
- }
1
+ import { ListNotificationService, ListService } from '@ngdux/data-model-common';
2
+ import { Actions } from '@ngrx/effects';
3
+ import { Store } from '@ngrx/store';
4
+ import { ListActions, ListSelectors } from '../models/list.model';
5
+ export declare abstract class AbstractListEffects<T, E = unknown, S = T, Params = Record<string, string>> {
6
+ protected readonly actions$: Actions;
7
+ protected readonly store: Store;
8
+ protected readonly service: ListService<T, S, Params>;
9
+ protected readonly listActions: ListActions<T, E, S, Params>;
10
+ protected readonly listSelectors: ListSelectors<S, E, Params>;
11
+ protected readonly notificationService?: ListNotificationService<E> | undefined;
12
+ reload$: import("rxjs").Observable<import("@ngrx/store/src/models").TypedAction<string>> & import("@ngrx/effects").CreateEffectMetadata;
13
+ loadFirstPage$: import("rxjs").Observable<{
14
+ pageNumber: number;
15
+ } & import("@ngrx/store/src/models").TypedAction<string>> & import("@ngrx/effects").CreateEffectMetadata;
16
+ loadPreviousPage$: import("rxjs").Observable<{
17
+ pageNumber: number;
18
+ } & import("@ngrx/store/src/models").TypedAction<string>> & import("@ngrx/effects").CreateEffectMetadata;
19
+ loadNextPage$: import("rxjs").Observable<{
20
+ pageNumber: number;
21
+ } & import("@ngrx/store/src/models").TypedAction<string>> & import("@ngrx/effects").CreateEffectMetadata;
22
+ loadPage$: import("rxjs").Observable<({
23
+ resources: S[];
24
+ pagingOptions: import("@ngdux/data-model-common").PagingOptions;
25
+ } & import("@ngrx/store/src/models").TypedAction<string>) | ({
26
+ errors: E;
27
+ } & import("@ngrx/store/src/models").TypedAction<string>)> & import("@ngrx/effects").CreateEffectMetadata;
28
+ patch$: import("rxjs").Observable<({
29
+ resources: (import("@ngdux/data-model-common").ErrorDto | T)[];
30
+ } & import("@ngrx/store/src/models").TypedAction<string>) | ({
31
+ errors: E;
32
+ } & import("@ngrx/store/src/models").TypedAction<string>)> & import("@ngrx/effects").CreateEffectMetadata;
33
+ delete$: import("rxjs").Observable<({
34
+ resourceIds: string[];
35
+ } & import("@ngrx/store/src/models").TypedAction<string>) | ({
36
+ errors: E;
37
+ } & import("@ngrx/store/src/models").TypedAction<string>)> & import("@ngrx/effects").CreateEffectMetadata;
38
+ deleteSuccess$: import("rxjs").Observable<{
39
+ resourceIds: string[];
40
+ } & import("@ngrx/store/src/models").TypedAction<string>> & import("@ngrx/effects").CreateEffectMetadata;
41
+ errorsHandler$: import("rxjs").Observable<({
42
+ errors: E;
43
+ } & import("@ngrx/store/src/models").TypedAction<string>) | ({
44
+ errors: E;
45
+ } & import("@ngrx/store/src/models").TypedAction<string>) | ({
46
+ errors: E;
47
+ } & import("@ngrx/store/src/models").TypedAction<string>)> & import("@ngrx/effects").CreateEffectMetadata;
48
+ protected constructor(actions$: Actions, store: Store, service: ListService<T, S, Params>, listActions: ListActions<T, E, S, Params>, listSelectors: ListSelectors<S, E, Params>, notificationService?: ListNotificationService<E> | undefined);
49
+ }
@@ -1,21 +1,21 @@
1
- import { ReducerManager } from '@ngrx/store';
2
- import { ListActions, ListSelectors } from '../models/list.model';
3
- import * as i0 from "@angular/core";
4
- export declare abstract class AbstractListReducerManager<T extends {
5
- [key: string]: any;
6
- }, E, S extends {
7
- [key: string]: any;
8
- } = T, Params = Record<string, string>> {
9
- private readonly reducerManager;
10
- private readonly featureKey;
11
- actions: ListActions<T, E, S, Params>;
12
- selectors: ListSelectors<S, E, Params>;
13
- private entityAdapter;
14
- constructor(reducerManager: ReducerManager, featureKey: string);
15
- protected getActions(): ListActions<T, E, S, Params>;
16
- private getEntityAdapter;
17
- protected addReducer(): void;
18
- protected getSelectors(): ListSelectors<S, E, Params>;
19
- static ɵfac: i0.ɵɵFactoryDeclaration<AbstractListReducerManager<any, any, any, any>, never>;
20
- static ɵprov: i0.ɵɵInjectableDeclaration<AbstractListReducerManager<any, any, any, any>>;
21
- }
1
+ import { ReducerManager } from '@ngrx/store';
2
+ import { ListActions, ListSelectors } from '../models/list.model';
3
+ import * as i0 from "@angular/core";
4
+ export declare abstract class AbstractListReducerManager<T extends {
5
+ [key: string]: any;
6
+ }, E, S extends {
7
+ [key: string]: any;
8
+ } = T, Params = Record<string, string>> {
9
+ private readonly reducerManager;
10
+ private readonly featureKey;
11
+ actions: ListActions<T, E, S, Params>;
12
+ selectors: ListSelectors<S, E, Params>;
13
+ private entityAdapter;
14
+ constructor(reducerManager: ReducerManager, featureKey: string);
15
+ protected getActions(): ListActions<T, E, S, Params>;
16
+ private getEntityAdapter;
17
+ protected addReducer(): void;
18
+ protected getSelectors(): ListSelectors<S, E, Params>;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<AbstractListReducerManager<any, any, any, any>, never>;
20
+ static ɵprov: i0.ɵɵInjectableDeclaration<AbstractListReducerManager<any, any, any, any>>;
21
+ }