@barcidev/ngx-autogen 0.1.3 → 0.1.5

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.
@@ -0,0 +1,200 @@
1
+ import { computed, inject } from '@angular/core';
2
+ import { patchState, signalStore, type, withComputed, withHooks, withMethods, withState } from '@ngrx/signals';
3
+ import {
4
+ addEntity,
5
+ entityConfig,
6
+ removeEntity,
7
+ setAllEntities,
8
+ updateEntity,
9
+ withEntities
10
+ } from '@ngrx/signals/entities';
11
+ import { rxMethod } from '@ngrx/signals/rxjs-interop';
12
+ import { catchError, EMPTY, pipe, switchMap, tap } from 'rxjs';
13
+
14
+ import { RequestConfig } from '@shared-state/entity.model';
15
+ import { withPagination } from '@shared-state/with-entity-pagination';
16
+ import { withEntityStatus } from '@shared-state/with-entity-status';
17
+ import {
18
+ Add<%= classify(name) %>,
19
+ <%= classify(name) %>Dto,
20
+ Update<%= classify(name) %>
21
+ } from '<%= grouped ? "./models/" + dasherize(name) + ".model" : "./" + dasherize(name) + ".model" %>';
22
+ import { <%= classify(name) %>Service } from '<%= grouped ? "./services/" + dasherize(name) + ".service" : "./" + dasherize(name) + ".service" %>';;
23
+
24
+ const config = entityConfig({
25
+ entity: type<<%= classify(name) %>Dto>(),
26
+ selectId: (entity) => entity.<%= pk %>,
27
+ });
28
+
29
+ export const <%= classify(name) %>Store = signalStore(
30
+ withEntities(config),
31
+ withEntityStatus(),
32
+ withPagination(),
33
+ withComputed(({ entities, entityMap, status: { idSelected } }) => ({
34
+ <%= camelize(pluralize(name)) %>: computed(() => entities()),
35
+ <%= camelize(name) %>Seleccionado: computed(() => {
36
+ const <%= pk %> = idSelected();
37
+ return <%= pk %> ? entityMap()[<%= pk %>] : null;
38
+ })
39
+ })),
40
+ withMethods((store, <%= camelize(name) %>Service = inject(<%= classify(name) %>Service)) => ({
41
+ add<%= classify(name) %>: rxMethod<RequestConfig<Add<%= classify(name) %>, <%= classify(name) %>Dto>>(
42
+ pipe(
43
+ tap(() => {
44
+ patchState(store, (state) => ({ status: { ...state.status, addLoading: true } }));
45
+ }),
46
+ switchMap(({ onError, onSuccess, payload }) => {
47
+ return <%= camelize(name) %>Service.add<%= classify(name) %>$(payload).pipe(
48
+ tap((<%= pk %>) => {
49
+ const new<%= classify(name) %>: <%= classify(name) %>Dto = { ...payload, <%= pk %>};
50
+ patchState(store, addEntity(new<%= classify(name) %>, config), (state) => ({
51
+ ...state,
52
+ status: { ...state.status, addError: null, addLoading: false }
53
+ }));
54
+ if (onSuccess) {
55
+ onSuccess(new<%= classify(name) %>);
56
+ }
57
+ }),
58
+ catchError(() => {
59
+ const error = new Error('');
60
+ patchState(store, (state) => ({
61
+ status: { ...state.status, addError: error, addLoading: false }
62
+ }));
63
+ if (onError) {
64
+ onError();
65
+ }
66
+ return EMPTY;
67
+ })
68
+ );
69
+ })
70
+ )
71
+ ),
72
+ load<%= classify(pluralize(name)) %>: rxMethod<void>(
73
+ pipe(
74
+ tap(() => {
75
+ patchState(store, (state) => ({ status: { ...state.status, loading: true } }));
76
+ }),
77
+ switchMap(() => {
78
+ return <%= camelize(name) %>Service.get<%= classify(pluralize(name)) %>$().pipe(
79
+ tap((response) => {
80
+ patchState(store, setAllEntities(response, config), (state) => ({
81
+ status: { ...state.status, error: null, loaded: true, loading: false }
82
+ }));
83
+ }),
84
+ catchError(() => {
85
+ patchState(store, (state) => ({
86
+ status: { ...state.status, error: new Error('Error al cargar horario-accesos'), loading: false }
87
+ }));
88
+ return EMPTY;
89
+ })
90
+ );
91
+ })
92
+ )
93
+ ),
94
+ remove<%= classify(name) %>: rxMethod<RequestConfig<number, boolean>>(
95
+ pipe(
96
+ tap(({ payload }) => {
97
+ patchState(store, (state) => ({
98
+ status: {
99
+ ...state.status,
100
+ _removeLoading: true,
101
+ idsRemoving: [...(state.status.idsRemoving || []), payload]
102
+ }
103
+ }));
104
+ }),
105
+ switchMap(({ onError, onSuccess, payload }) => {
106
+ return <%= camelize(name) %>Service.remove<%= classify(name) %>$(payload).pipe(
107
+ tap((response) => {
108
+ if (response) {
109
+ const idsRemoving = store.status.idsRemoving() || [];
110
+ patchState(store, removeEntity(payload), (state) => ({
111
+ status: {
112
+ ...state.status,
113
+ _removeLoading: false,
114
+ error: null,
115
+ idsRemoving: idsRemoving.filter((idRemoving) => idRemoving !== payload)
116
+ }
117
+ }));
118
+ if (onSuccess) {
119
+ onSuccess(response);
120
+ }
121
+ } else {
122
+ throw new Error();
123
+ }
124
+ }),
125
+ catchError(() => {
126
+ const idsRemoving = store.status.idsRemoving() || [];
127
+ patchState(store, (state) => ({
128
+ status: {
129
+ ...state.status,
130
+ _removeLoading: false,
131
+ error: new Error(),
132
+ idsRemoving: idsRemoving.filter((idRemoving) => idRemoving !== payload)
133
+ }
134
+ }));
135
+ if (onError) {
136
+ onError();
137
+ }
138
+ return EMPTY;
139
+ })
140
+ );
141
+ })
142
+ )
143
+ ),
144
+ update<%= classify(name) %>: rxMethod<RequestConfig<Update<%= classify(name) %>, boolean>>(
145
+ pipe(
146
+ tap(({ payload }) => {
147
+ patchState(store, (state) => ({
148
+ status: {
149
+ ...state.status,
150
+ _updateLoading: true,
151
+ idsUpdating: [...(state.status.idsUpdating || []), payload.<%= pk %>]
152
+ }
153
+ }));
154
+ }),
155
+ switchMap(({ onError, onSuccess, payload }) => {
156
+ return <%= camelize(name) %>Service.update<%= classify(name) %>$(payload).pipe(
157
+ tap((response) => {
158
+ if (response) {
159
+ const idsUpdating = store.status.idsUpdating() || [];
160
+ patchState(store, updateEntity({ changes: payload, id: payload.<%= pk %> }, config), (state) => ({
161
+ status: {
162
+ ...state.status,
163
+ _updateLoading: false,
164
+ error: null,
165
+ idsUpdating: idsUpdating.filter((idUpdating) => idUpdating !== payload.<%= pk %>)
166
+ }
167
+ }));
168
+ if (onSuccess) {
169
+ onSuccess(response);
170
+ }
171
+ } else {
172
+ throw new Error('');
173
+ }
174
+ }),
175
+ catchError(() => {
176
+ const idsUpdating = store.status.idsUpdating() || [];
177
+ patchState(store, (state) => ({
178
+ status: {
179
+ ...state.status,
180
+ _updateLoading: false,
181
+ error: new Error('Error al actualizar horario-acceso'),
182
+ idsUpdating: idsUpdating.filter((idUpdating) => idUpdating !== payload.<%= pk %>)
183
+ }
184
+ }));
185
+ if (onError) {
186
+ onError();
187
+ }
188
+ return EMPTY;
189
+ })
190
+ );
191
+ })
192
+ )
193
+ ),
194
+ })),
195
+ withHooks({
196
+ onInit: (store) => {
197
+ store.load<%= classify(pluralize(name)) %>();
198
+ },
199
+ })
200
+ );
@@ -37,52 +37,57 @@ const pluralizeEn = (name) => {
37
37
  }
38
38
  return name + "s";
39
39
  };
40
- function mergeFilesSmart(urlPath, destPath, options) {
40
+ function mergeFilesSmart(urlPath, destPath, options, tree) {
41
41
  return (0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)(urlPath), [
42
42
  (0, schematics_1.applyTemplates)(Object.assign(Object.assign({}, core_1.strings), options)),
43
43
  (0, schematics_1.move)(destPath),
44
44
  (0, schematics_1.forEach)((fileEntry) => {
45
- // Si el archivo ya existe en el árbol
46
- if (treeRef.exists(fileEntry.path)) {
47
- const existingContent = treeRef.read(fileEntry.path).toString();
48
- const newContent = fileEntry.content.toString();
49
- // Solo escribimos si el contenido nuevo no está ya incluido (basado en una cadena clave o firma)
50
- // Puedes ajustar esta condición según lo que necesites verificar
51
- if (existingContent.includes(newContent.trim())) {
52
- return null; // Descarta el archivo del proceso de merge (no hace nada)
45
+ if (tree.exists(fileEntry.path)) {
46
+ const existingContent = tree.read(fileEntry.path).toString();
47
+ if (existingContent.includes(fileEntry.content.toString().trim())) {
48
+ return null;
53
49
  }
54
- // Si el archivo existe pero queremos añadir contenido al final (opcional)
55
- // treeRef.overwrite(fileEntry.path, existingContent + '\n' + newContent);
56
- return null;
57
50
  }
58
51
  return fileEntry;
59
52
  }),
60
53
  ]));
61
54
  }
62
- let treeRef;
63
55
  function signalStore(options) {
64
56
  return (tree) => __awaiter(this, void 0, void 0, function* () {
65
57
  var _a;
66
58
  const workspace = yield (0, workspace_1.getWorkspace)(tree);
67
- const globalConfig = (_a = workspace.extensions.schematics) === null || _a === void 0 ? void 0 : _a["@barcidev/ngx-autogen:all"];
68
- if (globalConfig) {
69
- if (globalConfig.pk && !options.pk) {
70
- options.pk = globalConfig.pk;
71
- }
72
- if (globalConfig.path && !options.path) {
73
- options.path = globalConfig.path;
74
- }
59
+ const globalConfig = (_a = workspace.extensions.schematics) === null || _a === void 0 ? void 0 : _a["ngx-autogen:all"];
60
+ if (globalConfig && globalConfig.pk && !options.pk) {
61
+ options.pk = globalConfig.pk;
62
+ }
63
+ // En tu función signalStore
64
+ // 1. Obtener la ruta absoluta del sistema donde se ejecuta el comando
65
+ const fullPath = process.cwd();
66
+ // 2. Buscar la posición de 'src' para limpiar la ruta
67
+ const srcIndex = fullPath.lastIndexOf("src");
68
+ let relativePath = "";
69
+ if (srcIndex !== -1) {
70
+ // Extraemos de 'src' en adelante (ej: src/app/features/billing)
71
+ relativePath = fullPath.substring(srcIndex);
72
+ }
73
+ else {
74
+ // Si no encuentra 'src' (estás en la raíz), usamos el path por defecto
75
+ relativePath = (0, core_1.join)((0, core_1.normalize)("src"), "app");
76
+ }
77
+ // 3. Normalizar y asegurar que termine en 'state'
78
+ let movePath = (0, core_1.normalize)(relativePath);
79
+ if (!movePath.endsWith("state")) {
80
+ movePath = (0, core_1.join)(movePath, "state");
75
81
  }
76
- treeRef = tree;
77
- const movePath = (0, core_1.normalize)(options.path);
82
+ options.path = movePath;
78
83
  const indexPath = (0, core_1.join)(movePath, "index.ts");
79
84
  const nameDash = core_1.strings.dasherize(options.name);
80
85
  const entityName = core_1.strings.classify(options.name);
81
86
  const entityHeader = `/* ${entityName.toUpperCase()} */`;
82
87
  const exportBlock = [
83
88
  entityHeader,
84
- `export * from './${nameDash}/${nameDash}.model';`,
85
- `export * from './${nameDash}/${nameDash}.service';`,
89
+ `export * from './${nameDash}${options.grouped ? "/models" : ""}/${nameDash}.model';`,
90
+ `export * from './${nameDash}${options.grouped ? "/services" : ""}/${nameDash}.service';`,
86
91
  `export * from './${nameDash}/${nameDash}.store';`,
87
92
  "",
88
93
  ].join("\n");
@@ -108,7 +113,35 @@ function signalStore(options) {
108
113
  else {
109
114
  tree.create(indexPath, content);
110
115
  }
111
- const templateStoreSource = (0, schematics_1.apply)((0, schematics_1.url)("./files/store"), [
116
+ // Generar archivos en las carpetas store, services y models
117
+ const namePath = (0, core_1.join)(movePath, core_1.strings.dasherize(options.name));
118
+ const rules = [];
119
+ // store
120
+ rules.push((0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)("./files/state/store"), [
121
+ (0, schematics_1.applyTemplates)(Object.assign(Object.assign(Object.assign({}, core_1.strings), options), { pluralize: (word) => {
122
+ switch (options.lang) {
123
+ case "es":
124
+ return pluralizeEs(word);
125
+ default:
126
+ return pluralizeEn(word);
127
+ }
128
+ }, pk: options.pk || "id" })),
129
+ (0, schematics_1.move)(namePath),
130
+ ])));
131
+ // services
132
+ rules.push((0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)("./files/state/services"), [
133
+ (0, schematics_1.applyTemplates)(Object.assign(Object.assign(Object.assign({}, core_1.strings), options), { pluralize: (word) => {
134
+ switch (options.lang) {
135
+ case "es":
136
+ return pluralizeEs(word);
137
+ default:
138
+ return pluralizeEn(word);
139
+ }
140
+ }, pk: options.pk || "id" })),
141
+ (0, schematics_1.move)((0, core_1.join)(namePath, options.grouped ? "services" : "")),
142
+ ])));
143
+ // models
144
+ rules.push((0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)("./files/state/models"), [
112
145
  (0, schematics_1.applyTemplates)(Object.assign(Object.assign(Object.assign({}, core_1.strings), options), { pluralize: (word) => {
113
146
  switch (options.lang) {
114
147
  case "es":
@@ -117,10 +150,11 @@ function signalStore(options) {
117
150
  return pluralizeEn(word);
118
151
  }
119
152
  }, pk: options.pk || "id" })),
120
- (0, schematics_1.move)((0, core_1.join)(movePath, core_1.strings.dasherize(options.name))),
121
- ]);
122
- const commonEntityRule = mergeFilesSmart("./files/entity", (0, core_1.join)(movePath, "common/entity"), options);
123
- return (0, schematics_1.chain)([(0, schematics_1.mergeWith)(templateStoreSource), commonEntityRule]);
153
+ (0, schematics_1.move)((0, core_1.join)(namePath, options.grouped ? "models" : "")),
154
+ ])));
155
+ // common entity
156
+ rules.push(mergeFilesSmart("./files/entity", "src/app/shared/state", options, tree));
157
+ return (0, schematics_1.chain)(rules);
124
158
  });
125
159
  }
126
160
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,7 @@
1
- export interface StoreSchemaOptions {
2
- name: string;
3
- path: string;
4
- pk?: string;
5
- lang: "en" | "es";
6
- }
1
+ export interface StoreSchemaOptions {
2
+ name: string;
3
+ path?: string;
4
+ grouped: boolean;
5
+ pk?: string;
6
+ lang: "en" | "es";
7
+ }
@@ -1,30 +1,34 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "SignalStoreSchematic",
4
- "title": "Signal Store Schema",
5
- "type": "object",
6
- "properties": {
7
- "name": {
8
- "type": "string",
9
- "description": "Name of the entity.",
10
- "x-prompt": "What's the name of the entity?",
11
- "priority": 1
12
- },
13
- "path": {
14
- "type": "string",
15
- "description": "Destination path.",
16
- "default": "src/app/core"
17
- },
18
- "lang": {
19
- "type": "string",
20
- "description": "Language for pluralization ('en' for English, 'es' for Spanish).",
21
- "enum": ["en", "es"],
22
- "default": "en"
23
- },
24
- "pk": {
25
- "type": "string",
26
- "description": "Name of the primary key."
27
- }
28
- },
29
- "required": ["name"]
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "SignalStoreSchematic",
4
+ "title": "Signal Store Schema",
5
+ "type": "object",
6
+ "properties": {
7
+ "name": {
8
+ "type": "string",
9
+ "description": "Name of the entity.",
10
+ "x-prompt": "What's the name of the entity?",
11
+ "priority": 1
12
+ },
13
+ "path": {
14
+ "type": "string",
15
+ "description": "Destination path."
16
+ },
17
+ "grouped": {
18
+ "type": "boolean",
19
+ "description": "Whether the files should be grouped in subfolders.",
20
+ "default": false
21
+ },
22
+ "lang": {
23
+ "type": "string",
24
+ "description": "Language for pluralization ('en' for English, 'es' for Spanish).",
25
+ "enum": ["en", "es"],
26
+ "default": "en"
27
+ },
28
+ "pk": {
29
+ "type": "string",
30
+ "description": "Name of the primary key."
31
+ }
32
+ },
33
+ "required": ["name"]
30
34
  }
@@ -1,212 +0,0 @@
1
- import { computed, inject } from '@angular/core';
2
- import { patchState, signalStore, type, withComputed, withHooks, withMethods, withState } from '@ngrx/signals';
3
- import {
4
- addEntity,
5
- entityConfig,
6
- removeEntity,
7
- setAllEntities,
8
- updateEntity,
9
- withEntities
10
- } from '@ngrx/signals/entities';
11
- import { rxMethod } from '@ngrx/signals/rxjs-interop';
12
- import { catchError, of, pipe, switchMap, tap } from 'rxjs';
13
-
14
- import { EntityStatus } from '../common/entity/entity.model';
15
- import {
16
- <%= classify(name) %>Dto,
17
- Add<%= classify(name) %>,
18
- Update<%= classify(name) %>
19
- } from './<%= dasherize(name) %>.model';
20
- import { <%= classify(name) %>Service } from './<%= dasherize(name) %>.service';
21
-
22
- const initialStatus: EntityStatus = {
23
- error: null,
24
- loaded: false,
25
- loading: false,
26
- };
27
-
28
- const config = entityConfig({
29
- entity: type<<%= classify(name) %>Dto>(),
30
- selectId: (entity) => entity.<%= pk %>,
31
- });
32
-
33
- export const <%= classify(name) %>Store = signalStore(
34
- withEntities(config),
35
- withState({
36
- _status: initialStatus,
37
- }),
38
- withComputed(({ entityMap, _status }) => ({
39
- <%= camelize(pluralize(name)) %>: computed(() => Object.values(entityMap())),
40
- <%= camelize(name) %>Seleccionado: computed(() => {
41
- const <%= pk %> = _status().idSelected;
42
- return <%= pk %> ? entityMap()[<%= pk %>] : null;
43
- }),
44
- error: computed(() => _status().error),
45
- loaded: computed(() => _status().loaded),
46
- loading: computed(() => _status().loading),
47
- loadingRemove: computed(
48
- () => (<%= pk %>?: number) =>
49
- (<%= pk %> ? _status().idsRemoving?.includes(<%= pk %>) : _status().removeLoading) || false
50
- ),
51
- loadingUpdate: computed(
52
- () => (<%= pk %>?: number) =>
53
- (<%= pk %> ? _status().idsUpdating?.includes(<%= pk %>) : _status().updateLoading) || false
54
- ),
55
- })),
56
- withMethods((store, <%= camelize(name) %>Service = inject(<%= classify(name) %>Service)) => ({
57
- add<%= classify(name) %>: rxMethod<Add<%= classify(name) %>>(
58
- pipe(
59
- tap(() => {
60
- patchState(store, { _status: { ...store._status(), addLoading: true } });
61
- }),
62
- switchMap((entity) => {
63
- return <%= camelize(name) %>Service.add<%= classify(name) %>$(entity).pipe(
64
- tap((<%= pk %>) => {
65
- patchState(store, addEntity({ ...entity, <%= pk %> }, config), {
66
- _status: {
67
- ...store._status(),
68
- addLoading: false,
69
- error: null,
70
- },
71
- });
72
- }),
73
- catchError(() => {
74
- patchState(store, {
75
- _status: {
76
- ...store._status(),
77
- addLoading: false,
78
- error: new Error('Error al agregar <%= name %>'),
79
- },
80
- });
81
- return of(entity);
82
- })
83
- );
84
- })
85
- )
86
- ),
87
- load<%= classify(pluralize(name)) %>: rxMethod<void>(
88
- pipe(
89
- tap(() => {
90
- patchState(store, { _status: { ...store._status(), loading: true } });
91
- }),
92
- switchMap(() => {
93
- return <%= camelize(name) %>Service.get<%= classify(pluralize(name)) %>$().pipe(
94
- tap((response) => {
95
- patchState(store, setAllEntities(response, config), {
96
- _status: {
97
- ...store._status(),
98
- error: null,
99
- loaded: true,
100
- loading: false,
101
- },
102
- });
103
- }),
104
- catchError(() => {
105
- patchState(store, {
106
- _status: {
107
- ...store._status(),
108
- error: new Error('Error al cargar <%= pluralize(name) %>'),
109
- loading: false,
110
- },
111
- });
112
- return of([]);
113
- })
114
- );
115
- })
116
- )
117
- ),
118
- remove<%= classify(name) %>: rxMethod<number>(
119
- pipe(
120
- tap((<%= pk %>) => {
121
- patchState(store, {
122
- _status: {
123
- ...store._status(),
124
- removeLoading: true,
125
- idsRemoving: [...(store._status().idsRemoving || []), <%= pk %>],
126
- },
127
- });
128
- }),
129
- switchMap((<%= pk %>) => {
130
- return <%= camelize(name) %>Service.remove<%= classify(name) %>$(<%= pk %>).pipe(
131
- tap((success) => {
132
- if (success) {
133
- const idsRemoving = store._status().idsRemoving || [];
134
- patchState(store, removeEntity(<%= pk %>), {
135
- _status: {
136
- ...store._status(),
137
- removeLoading: false,
138
- error: null,
139
- idsRemoving: idsRemoving.filter((idRemoving) => idRemoving !== <%= pk %>),
140
- },
141
- });
142
- } else {
143
- throw new Error('Error al eliminar <%= name %>');
144
- }
145
- }),
146
- catchError(() => {
147
- const idsRemoving = store._status().idsRemoving || [];
148
- patchState(store, {
149
- _status: {
150
- ...store._status(),
151
- removeLoading: false,
152
- error: new Error('Error al eliminar <%= name %>'),
153
- idsRemoving: idsRemoving.filter((idRemoving) => idRemoving !== <%= pk %>),
154
- },
155
- });
156
- return of(false);
157
- })
158
- );
159
- })
160
- )
161
- ),
162
- update<%= classify(name) %>: rxMethod<Update<%= classify(name) %>>(
163
- pipe(
164
- tap((entity) => {
165
- patchState(store, {
166
- _status: {
167
- ...store._status(),
168
- idsUpdating: [...(store._status().idsUpdating || []), entity.<%= pk %>],
169
- updateLoading: true,
170
- },
171
- });
172
- }),
173
- switchMap((entity) => {
174
- return <%= camelize(name) %>Service.update<%= classify(name) %>$(entity).pipe(
175
- tap((success) => {
176
- if (success) {
177
- const idsUpdating = store._status().idsUpdating || [];
178
- patchState(store, updateEntity({ changes: entity, id: entity.<%= pk %> }, config), {
179
- _status: {
180
- ...store._status(),
181
- error: null,
182
- idsUpdating: idsUpdating.filter((idUpdating) => idUpdating !== entity.<%= pk %>),
183
- updateLoading: false,
184
- },
185
- });
186
- } else {
187
- throw new Error('Error al actualizar <%= name %>');
188
- }
189
- }),
190
- catchError(() => {
191
- const idsUpdating = store._status().idsUpdating || [];
192
- patchState(store, {
193
- _status: {
194
- ...store._status(),
195
- error: new Error('Error al actualizar <%= name %>'),
196
- idsUpdating: idsUpdating.filter((idUpdating) => idUpdating !== entity.<%= pk %>),
197
- updateLoading: false,
198
- },
199
- });
200
- return of(false);
201
- })
202
- );
203
- })
204
- )
205
- ),
206
- })),
207
- withHooks({
208
- onInit: (store) => {
209
- store.load<%= classify(pluralize(name)) %>();
210
- },
211
- })
212
- );