ng-tablekit 1.0.1 → 1.0.3
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/PUBLISHING.md +1 -1
- package/README.md +6 -6
- package/bin/tablekit.mjs +5 -5
- package/package.json +1 -1
- package/src/app/templates/master-page/master-page.component.css +3 -0
- package/src/app/templates/master-page/master-page.component.html +1 -1
- package/src/app/templates/master-page/master-page.component.ts +5 -0
- package/src/app/templates/report-page/report-page.component.css +3 -0
- package/src/app/templates/report-page/report-page.component.html +1 -1
- package/src/app/templates/report-page/report-page.component.ts +5 -0
package/PUBLISHING.md
CHANGED
|
@@ -40,7 +40,7 @@ The package is configured for public npm distribution as `ng-tablekit`.
|
|
|
40
40
|
5. Verify the public command from a clean Angular 19 workspace:
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
npx ng-tablekit
|
|
43
|
+
npx --yes ng-tablekit add report-page
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
For later releases, update the version with `npm version patch`, `minor`, or `major` before publishing. Never reuse an npm version that has already been published.
|
package/README.md
CHANGED
|
@@ -15,13 +15,13 @@ The CLI runs on Windows, macOS, and Linux. It detects the nearest Angular worksp
|
|
|
15
15
|
Add a report page with filter, Excel export, PDF export, global search, sorting, and pagination:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
npx ng-tablekit
|
|
18
|
+
npx --yes ng-tablekit add report-page
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Or add a master page with global search, Add/Edit drawers, row actions, role mapping, sorting, and pagination:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npx ng-tablekit
|
|
24
|
+
npx --yes ng-tablekit add master-page
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Then start the Angular application and open `/report-page` or `/master-page`.
|
|
@@ -38,9 +38,9 @@ The CLI automatically:
|
|
|
38
38
|
## Commands
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
npx ng-tablekit
|
|
42
|
-
npx ng-tablekit
|
|
43
|
-
npx ng-tablekit
|
|
41
|
+
npx --yes ng-tablekit list
|
|
42
|
+
npx --yes ng-tablekit --help
|
|
43
|
+
npx --yes ng-tablekit --version
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
Options for `add`:
|
|
@@ -57,7 +57,7 @@ Options for `add`:
|
|
|
57
57
|
Example with a custom destination and route:
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
npx ng-tablekit
|
|
60
|
+
npx --yes ng-tablekit add master-page --path src/app/admin/users --route users
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
## Optional project installation
|
package/bin/tablekit.mjs
CHANGED
|
@@ -71,8 +71,8 @@ function printHelp() {
|
|
|
71
71
|
console.log(`TableKit CLI
|
|
72
72
|
|
|
73
73
|
Usage:
|
|
74
|
-
npx ng-tablekit
|
|
75
|
-
npx ng-tablekit
|
|
74
|
+
npx --yes ng-tablekit list
|
|
75
|
+
npx --yes ng-tablekit add <report-page|master-page> [options]
|
|
76
76
|
|
|
77
77
|
Options:
|
|
78
78
|
--project <directory> Angular workspace root (default: nearest parent workspace)
|
|
@@ -86,9 +86,9 @@ Options:
|
|
|
86
86
|
-h, --help Show this help
|
|
87
87
|
|
|
88
88
|
Examples:
|
|
89
|
-
npx ng-tablekit
|
|
90
|
-
npx ng-tablekit
|
|
91
|
-
npx ng-tablekit
|
|
89
|
+
npx --yes ng-tablekit add report-page
|
|
90
|
+
npx --yes ng-tablekit add master-page --path src/app/admin/master-page
|
|
91
|
+
npx --yes ng-tablekit add report-page --skip-install
|
|
92
92
|
`);
|
|
93
93
|
}
|
|
94
94
|
|
package/package.json
CHANGED
|
@@ -229,8 +229,11 @@
|
|
|
229
229
|
/* Pagination */
|
|
230
230
|
:host ::ng-deep .ant-pagination {
|
|
231
231
|
margin-top: 12px !important;
|
|
232
|
+
margin-bottom: 0 !important;
|
|
232
233
|
display: flex;
|
|
234
|
+
flex-wrap: wrap;
|
|
233
235
|
justify-content: flex-end;
|
|
236
|
+
row-gap: 8px;
|
|
234
237
|
}
|
|
235
238
|
|
|
236
239
|
:host ::ng-deep .ant-pagination-item,
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
</form>
|
|
64
64
|
}
|
|
65
65
|
<nz-table #table nzBordered nzSize="small" [nzData]="records" [(nzPageIndex)]="pageIndex" [nzPageSize]="10"
|
|
66
|
-
[nzShowSizeChanger]="true" [nzPageSizeOptions]="pageSizeOptions" [nzScroll]="{
|
|
66
|
+
[nzShowSizeChanger]="true" [nzPageSizeOptions]="pageSizeOptions" [nzScroll]="{ x: '920px', y: tableScrollY }"
|
|
67
67
|
(nzQueryParams)="onQueryParamsChange($event)">
|
|
68
68
|
<thead>
|
|
69
69
|
<tr>
|
|
@@ -90,6 +90,11 @@ export class MasterPageComponent {
|
|
|
90
90
|
protected filterVisible = false;
|
|
91
91
|
protected searchText = '';
|
|
92
92
|
protected pageIndex = 1;
|
|
93
|
+
protected get tableScrollY(): string {
|
|
94
|
+
return this.filterVisible
|
|
95
|
+
? 'clamp(120px, calc(100dvh - 640px), 38dvh)'
|
|
96
|
+
: 'clamp(140px, calc(100dvh - 430px), 52dvh)';
|
|
97
|
+
}
|
|
93
98
|
private allRecords: TableRecord[] = TABLE_RECORDS.map(record => ({ ...record }));
|
|
94
99
|
protected records: TableRecord[] = [...this.allRecords];
|
|
95
100
|
protected currentSort: { key: string | null; value: string | null } = { key: null, value: null };
|
|
@@ -229,8 +229,11 @@
|
|
|
229
229
|
/* Pagination */
|
|
230
230
|
:host ::ng-deep .ant-pagination {
|
|
231
231
|
margin-top: 12px !important;
|
|
232
|
+
margin-bottom: 0 !important;
|
|
232
233
|
display: flex;
|
|
234
|
+
flex-wrap: wrap;
|
|
233
235
|
justify-content: flex-end;
|
|
236
|
+
row-gap: 8px;
|
|
234
237
|
}
|
|
235
238
|
|
|
236
239
|
:host ::ng-deep .ant-pagination-item,
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
</form>
|
|
53
53
|
}
|
|
54
54
|
<nz-table #table nzBordered nzSize="small" [nzData]="records" [(nzPageIndex)]="pageIndex" [nzPageSize]="10"
|
|
55
|
-
[nzShowSizeChanger]="true" [nzPageSizeOptions]="pageSizeOptions" [nzScroll]="{
|
|
55
|
+
[nzShowSizeChanger]="true" [nzPageSizeOptions]="pageSizeOptions" [nzScroll]="{ x: '770px', y: tableScrollY }"
|
|
56
56
|
(nzQueryParams)="onQueryParamsChange($event)">
|
|
57
57
|
<thead>
|
|
58
58
|
<tr>@for(column of columns; track column.key){
|
|
@@ -59,6 +59,11 @@ export class ReportPageComponent {
|
|
|
59
59
|
protected filterVisible = false;
|
|
60
60
|
protected searchText = '';
|
|
61
61
|
protected pageIndex = 1;
|
|
62
|
+
protected get tableScrollY(): string {
|
|
63
|
+
return this.filterVisible
|
|
64
|
+
? 'clamp(120px, calc(100dvh - 640px), 38dvh)'
|
|
65
|
+
: 'clamp(140px, calc(100dvh - 430px), 52dvh)';
|
|
66
|
+
}
|
|
62
67
|
protected records: TableRecord[] = TABLE_RECORDS;
|
|
63
68
|
protected currentSort: { key: string | null; value: string | null } = { key: null, value: null };
|
|
64
69
|
|