@shivay_18/ng-crud 0.1.0 → 0.1.2
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 +27 -1
- package/dist/crud/files/module/components/__name@dasherize__-form/__name@dasherize__-form.component.ts.template +9 -2
- package/dist/crud/files/module/components/__name@dasherize__-list/__name@dasherize__-list.component.html.template +2 -0
- package/dist/crud/files/module/models/__name@dasherize__.model.ts.template +1 -1
- package/dist/crud/files/module/services/__name@dasherize__.service.ts.template +18 -10
- package/dist/crud/files/standalone/components/__name@dasherize__-form/__name@dasherize__-form.component.ts.template +9 -2
- package/dist/crud/files/standalone/components/__name@dasherize__-list/__name@dasherize__-list.component.html.template +2 -0
- package/dist/crud/files/standalone/components/__name@dasherize__-list/__name@dasherize__-list.component.ts.template +2 -1
- package/dist/crud/files/standalone/models/__name@dasherize__.model.ts.template +1 -1
- package/dist/crud/files/standalone/services/__name@dasherize__.service.ts.template +18 -10
- package/dist/crud/index.js +24 -1
- package/dist/crud/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -50,6 +50,7 @@ ng generate ng-crud:crud <name> --fields="field1:type,field2:type" --apiUrl="htt
|
|
|
50
50
|
| `string` | text input | `name:string` |
|
|
51
51
|
| `number` | number input | `price:number` |
|
|
52
52
|
| `boolean` | checkbox | `active:boolean` |
|
|
53
|
+
| `date` | date input | `createdAt:date` |
|
|
53
54
|
|
|
54
55
|
Append `*` to mark a field as required: `name*:string`
|
|
55
56
|
|
|
@@ -101,7 +102,32 @@ Same structure but without `<name>.module.ts`. Each component is standalone with
|
|
|
101
102
|
|
|
102
103
|
---
|
|
103
104
|
|
|
104
|
-
##
|
|
105
|
+
## Environment Configuration
|
|
106
|
+
|
|
107
|
+
On first run, the schematic auto-generates `src/environments/environment.ts` and `src/environments/environment.prod.ts` using the `--apiUrl` option:
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
export const environment = {
|
|
111
|
+
production: false,
|
|
112
|
+
apiUrl: 'http://localhost:3000',
|
|
113
|
+
};
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
If the files already exist, they are left untouched. Update `apiUrl` there to change the base URL for all generated services.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## API Response Format
|
|
121
|
+
|
|
122
|
+
The generated service expects wrapped API responses:
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
{ "statusCode": 200, "statusMessage": "OK", "data": [...], "message": "..." }
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The service automatically unwraps `data` before returning it to components.
|
|
129
|
+
|
|
130
|
+
---
|
|
105
131
|
|
|
106
132
|
### Module-based (Angular 14–16)
|
|
107
133
|
|
|
@@ -86,8 +86,15 @@ export class <%= classify(name) %>FormComponent implements OnInit {
|
|
|
86
86
|
},
|
|
87
87
|
error: (error) => {
|
|
88
88
|
let errorMessage = 'Save failed. Please try again.';
|
|
89
|
-
if (error.status === 400
|
|
90
|
-
|
|
89
|
+
if (error.status === 400) {
|
|
90
|
+
const body = error.error;
|
|
91
|
+
if (body?.errors && typeof body.errors === 'object') {
|
|
92
|
+
const messages = Object.values(body.errors as Record<string, string[]>)
|
|
93
|
+
.flat().join(' ');
|
|
94
|
+
errorMessage = messages || errorMessage;
|
|
95
|
+
} else if (body?.message) {
|
|
96
|
+
errorMessage = body.message;
|
|
97
|
+
}
|
|
91
98
|
} else if (error.status === 404) {
|
|
92
99
|
errorMessage = '<%= classify(name) %> not found.';
|
|
93
100
|
} else if (error.status === 500) {
|
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
<mat-chip [color]="row.<%= field.name %> ? 'primary' : ''" selected>
|
|
37
37
|
{{ row.<%= field.name %> ? 'Yes' : 'No' }}
|
|
38
38
|
</mat-chip>
|
|
39
|
+
<% } else if (field.type === 'date') { %>
|
|
40
|
+
{{ row.<%= field.name %> | date:'mediumDate' }}
|
|
39
41
|
<% } else { %>
|
|
40
42
|
{{ row.<%= field.name %> }}
|
|
41
43
|
<% } %>
|
|
@@ -1,33 +1,41 @@
|
|
|
1
1
|
import { Injectable } from '@angular/core';
|
|
2
2
|
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
|
|
3
3
|
import { Observable, throwError } from 'rxjs';
|
|
4
|
-
import { catchError } from 'rxjs/operators';
|
|
4
|
+
import { catchError, map } from 'rxjs/operators';
|
|
5
|
+
import { environment } from '../../../../environments/environment';
|
|
5
6
|
import { <%= classify(name) %> } from '../models/<%= dasherize(name) %>.model';
|
|
6
7
|
|
|
8
|
+
interface ApiResponse<T> {
|
|
9
|
+
statusCode: number;
|
|
10
|
+
statusMessage: string;
|
|
11
|
+
data: T;
|
|
12
|
+
message: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
7
15
|
@Injectable({ providedIn: 'root' })
|
|
8
16
|
export class <%= classify(name) %>Service {
|
|
9
|
-
private apiUrl =
|
|
17
|
+
private apiUrl = `${environment.apiUrl}/<%= dasherize(name) %>s`;
|
|
10
18
|
|
|
11
19
|
constructor(private http: HttpClient) {}
|
|
12
20
|
|
|
13
21
|
getAll(): Observable<<%= classify(name) %>[]> {
|
|
14
|
-
return this.http.get<<%= classify(name) %>[]
|
|
15
|
-
.pipe(catchError(this.handleError));
|
|
22
|
+
return this.http.get<ApiResponse<<%= classify(name) %>[]>>(this.apiUrl)
|
|
23
|
+
.pipe(map(res => res.data), catchError(this.handleError));
|
|
16
24
|
}
|
|
17
25
|
|
|
18
26
|
getById(id: number): Observable<<%= classify(name) %>> {
|
|
19
|
-
return this.http.get<<%= classify(name)
|
|
20
|
-
.pipe(catchError(this.handleError));
|
|
27
|
+
return this.http.get<ApiResponse<<%= classify(name) %>>>(`${this.apiUrl}/${id}`)
|
|
28
|
+
.pipe(map(res => res.data), catchError(this.handleError));
|
|
21
29
|
}
|
|
22
30
|
|
|
23
31
|
create(item: <%= classify(name) %>): Observable<<%= classify(name) %>> {
|
|
24
|
-
return this.http.post<<%= classify(name)
|
|
25
|
-
.pipe(catchError(this.handleError));
|
|
32
|
+
return this.http.post<ApiResponse<<%= classify(name) %>>>(this.apiUrl, item)
|
|
33
|
+
.pipe(map(res => res.data), catchError(this.handleError));
|
|
26
34
|
}
|
|
27
35
|
|
|
28
36
|
update(id: number, item: <%= classify(name) %>): Observable<<%= classify(name) %>> {
|
|
29
|
-
return this.http.put<<%= classify(name)
|
|
30
|
-
.pipe(catchError(this.handleError));
|
|
37
|
+
return this.http.put<ApiResponse<<%= classify(name) %>>>(`${this.apiUrl}/${id}`, item)
|
|
38
|
+
.pipe(map(res => res.data), catchError(this.handleError));
|
|
31
39
|
}
|
|
32
40
|
|
|
33
41
|
delete(id: number): Observable<void> {
|
|
@@ -107,8 +107,15 @@ export class <%= classify(name) %>FormComponent implements OnInit {
|
|
|
107
107
|
},
|
|
108
108
|
error: (error) => {
|
|
109
109
|
let errorMessage = 'Save failed. Please try again.';
|
|
110
|
-
if (error.status === 400
|
|
111
|
-
|
|
110
|
+
if (error.status === 400) {
|
|
111
|
+
const body = error.error;
|
|
112
|
+
if (body?.errors && typeof body.errors === 'object') {
|
|
113
|
+
const messages = Object.values(body.errors as Record<string, string[]>)
|
|
114
|
+
.flat().join(' ');
|
|
115
|
+
errorMessage = messages || errorMessage;
|
|
116
|
+
} else if (body?.message) {
|
|
117
|
+
errorMessage = body.message;
|
|
118
|
+
}
|
|
112
119
|
} else if (error.status === 404) {
|
|
113
120
|
errorMessage = '<%= classify(name) %> not found.';
|
|
114
121
|
} else if (error.status === 500) {
|
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
<mat-chip [color]="row.<%= field.name %> ? 'primary' : ''" selected>
|
|
37
37
|
{{ row.<%= field.name %> ? 'Yes' : 'No' }}
|
|
38
38
|
</mat-chip>
|
|
39
|
+
<% } else if (field.type === 'date') { %>
|
|
40
|
+
{{ row.<%= field.name %> | date:'mediumDate' }}
|
|
39
41
|
<% } else { %>
|
|
40
42
|
{{ row.<%= field.name %> }}
|
|
41
43
|
<% } %>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { CommonModule, DatePipe } from '@angular/common';
|
|
3
3
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
4
4
|
import { MatTableModule, MatTableDataSource } from '@angular/material/table';
|
|
5
5
|
import { MatPaginatorModule, MatPaginator } from '@angular/material/paginator';
|
|
@@ -23,6 +23,7 @@ import { <%= classify(name) %>DeleteDialogComponent } from './<%= dasherize(name
|
|
|
23
23
|
standalone: true,
|
|
24
24
|
imports: [
|
|
25
25
|
CommonModule,
|
|
26
|
+
DatePipe,
|
|
26
27
|
MatTableModule,
|
|
27
28
|
MatPaginatorModule,
|
|
28
29
|
MatSortModule,
|
|
@@ -1,33 +1,41 @@
|
|
|
1
1
|
import { Injectable } from '@angular/core';
|
|
2
2
|
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
|
|
3
3
|
import { Observable, throwError } from 'rxjs';
|
|
4
|
-
import { catchError } from 'rxjs/operators';
|
|
4
|
+
import { catchError, map } from 'rxjs/operators';
|
|
5
|
+
import { environment } from '../../../../environments/environment';
|
|
5
6
|
import { <%= classify(name) %> } from '../models/<%= dasherize(name) %>.model';
|
|
6
7
|
|
|
8
|
+
interface ApiResponse<T> {
|
|
9
|
+
statusCode: number;
|
|
10
|
+
statusMessage: string;
|
|
11
|
+
data: T;
|
|
12
|
+
message: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
7
15
|
@Injectable({ providedIn: 'root' })
|
|
8
16
|
export class <%= classify(name) %>Service {
|
|
9
|
-
private apiUrl =
|
|
17
|
+
private apiUrl = `${environment.apiUrl}/<%= dasherize(name) %>s`;
|
|
10
18
|
|
|
11
19
|
constructor(private http: HttpClient) {}
|
|
12
20
|
|
|
13
21
|
getAll(): Observable<<%= classify(name) %>[]> {
|
|
14
|
-
return this.http.get<<%= classify(name) %>[]
|
|
15
|
-
.pipe(catchError(this.handleError));
|
|
22
|
+
return this.http.get<ApiResponse<<%= classify(name) %>[]>>(this.apiUrl)
|
|
23
|
+
.pipe(map(res => res.data), catchError(this.handleError));
|
|
16
24
|
}
|
|
17
25
|
|
|
18
26
|
getById(id: number): Observable<<%= classify(name) %>> {
|
|
19
|
-
return this.http.get<<%= classify(name)
|
|
20
|
-
.pipe(catchError(this.handleError));
|
|
27
|
+
return this.http.get<ApiResponse<<%= classify(name) %>>>(`${this.apiUrl}/${id}`)
|
|
28
|
+
.pipe(map(res => res.data), catchError(this.handleError));
|
|
21
29
|
}
|
|
22
30
|
|
|
23
31
|
create(item: <%= classify(name) %>): Observable<<%= classify(name) %>> {
|
|
24
|
-
return this.http.post<<%= classify(name)
|
|
25
|
-
.pipe(catchError(this.handleError));
|
|
32
|
+
return this.http.post<ApiResponse<<%= classify(name) %>>>(this.apiUrl, item)
|
|
33
|
+
.pipe(map(res => res.data), catchError(this.handleError));
|
|
26
34
|
}
|
|
27
35
|
|
|
28
36
|
update(id: number, item: <%= classify(name) %>): Observable<<%= classify(name) %>> {
|
|
29
|
-
return this.http.put<<%= classify(name)
|
|
30
|
-
.pipe(catchError(this.handleError));
|
|
37
|
+
return this.http.put<ApiResponse<<%= classify(name) %>>>(`${this.apiUrl}/${id}`, item)
|
|
38
|
+
.pipe(map(res => res.data), catchError(this.handleError));
|
|
31
39
|
}
|
|
32
40
|
|
|
33
41
|
delete(id: number): Observable<void> {
|
package/dist/crud/index.js
CHANGED
|
@@ -8,7 +8,7 @@ function parseFields(raw) {
|
|
|
8
8
|
const [namePart, type = 'string'] = entry.trim().split(':');
|
|
9
9
|
const name = namePart.replace('*', '').trim();
|
|
10
10
|
const required = namePart.includes('*');
|
|
11
|
-
const control = type === 'boolean' ? 'checkbox' : type === 'number' ? 'number' : 'text';
|
|
11
|
+
const control = type === 'boolean' ? 'checkbox' : type === 'number' ? 'number' : type === 'date' ? 'date' : 'text';
|
|
12
12
|
const label = name.replace(/([A-Z])/g, ' $1').replace(/^./, (s) => s.toUpperCase());
|
|
13
13
|
return { name, type, label, control, required };
|
|
14
14
|
});
|
|
@@ -36,6 +36,28 @@ function getTemplateContext(name, fields, apiUrl, isStandalone, angularVersion)
|
|
|
36
36
|
classify: core_1.strings.classify,
|
|
37
37
|
dasherize: core_1.strings.dasherize,
|
|
38
38
|
camelize: core_1.strings.camelize,
|
|
39
|
+
hasDateField: fields.some(f => f.type === 'date'),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function createEnvironmentFile(apiUrl) {
|
|
43
|
+
return (tree) => {
|
|
44
|
+
const envPath = '/src/environments/environment.ts';
|
|
45
|
+
const envProdPath = '/src/environments/environment.prod.ts';
|
|
46
|
+
if (!tree.exists(envPath)) {
|
|
47
|
+
tree.create(envPath, `export const environment = {
|
|
48
|
+
production: false,
|
|
49
|
+
apiUrl: '${apiUrl}',
|
|
50
|
+
};
|
|
51
|
+
`);
|
|
52
|
+
}
|
|
53
|
+
if (!tree.exists(envProdPath)) {
|
|
54
|
+
tree.create(envProdPath, `export const environment = {
|
|
55
|
+
production: true,
|
|
56
|
+
apiUrl: '${apiUrl}',
|
|
57
|
+
};
|
|
58
|
+
`);
|
|
59
|
+
}
|
|
60
|
+
return tree;
|
|
39
61
|
};
|
|
40
62
|
}
|
|
41
63
|
function addToAppRoutes(name, isStandalone, path) {
|
|
@@ -120,6 +142,7 @@ function crud(options) {
|
|
|
120
142
|
(0, schematics_1.move)(`${targetPath}/services`),
|
|
121
143
|
]);
|
|
122
144
|
const rules = [
|
|
145
|
+
createEnvironmentFile(apiUrl),
|
|
123
146
|
(0, schematics_1.mergeWith)(componentsSource, schematics_1.MergeStrategy.Overwrite),
|
|
124
147
|
];
|
|
125
148
|
// only write model/service if they don't already exist
|
package/dist/crud/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/crud/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"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AC,CAAC;QAC9D,CAAC;QAED,IAAI,YAAY,EAAE,CAAC;YACjB,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/D,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QACjD,CAAC;QAED,OAAO,IAAA,kBAAK,EAAC,KAAK,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shivay_18/ng-crud",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Angular CRUD generator with Material UI. Generates complete CRUD operations. Safe to uninstall after generation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -30,4 +30,4 @@
|
|
|
30
30
|
"@angular/core": ">=14.0.0",
|
|
31
31
|
"@angular/material": ">=14.0.0"
|
|
32
32
|
}
|
|
33
|
-
}
|
|
33
|
+
}
|