Skip to content

Commit 9fbe23a

Browse files
authored
Add export-table-dialog.component.ts (#13)
Signed-off-by: Pavel Shalamkov <[email protected]>
1 parent 43ebe56 commit 9fbe23a

File tree

6 files changed

+479
-1
lines changed

6 files changed

+479
-1
lines changed

libs/schematic/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"@angular/common": "^20.3.0",
1414
"@angular/core": "^20.3.0",
1515
"@angular/forms": "^20.3.0",
16-
"@angular/material": "^20.2.0"
16+
"@angular/material": "^20.2.0",
17+
"@jsverse/transloco": "^7.5.1"
1718
},
1819
"sideEffects": false,
1920
"nx-migrations": {
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<div mat-dialog-title class="dialog-title">
2+
{{ 'exportData.title' | transloco }}
3+
<mat-icon class="close-dialog-icon" [mat-dialog-close]="{action: Actions.Cancel}">close</mat-icon>
4+
</div>
5+
6+
<div mat-dialog-content>
7+
<section data-test="dialogDescription" class="dialog-description">{{ dialogDescription() }}</section>
8+
<section>
9+
<div class="checkbox-container">
10+
<mat-checkbox data-test="exportAllPages" #exportAllPages (change)="setDialogDescription()">
11+
{{ 'exportData.exportAllPages' | transloco : {maxExportRows: data.maxExportRows} }}
12+
</mat-checkbox>
13+
</div>
14+
<div class="checkbox-container">
15+
@if (!showAllColumnsBox()) {
16+
<mat-checkbox data-test="exportAllColumns" #exportAllColumns (change)="setDialogDescription()">
17+
{{ 'exportData.exportAllColumns' | transloco : {allColumns: data.allColumns} }}
18+
</mat-checkbox>
19+
}
20+
</div>
21+
</section>
22+
</div>
23+
24+
<div mat-dialog-actions class="dialog-button-container">
25+
<button mat-button data-test="closeDialog" [mat-dialog-close]="{action: Actions.Cancel}">{{ 'cancel' | transloco }}</button>
26+
<button mat-button data-test="exportData" mat-raised-button class="mat-primary export-button" (click)="exportData()">
27+
<span>{{ 'export' | transloco }}</span>
28+
</button>
29+
</div>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.dialog-button-container {
2+
justify-content: flex-end;
3+
}
4+
5+
.dialog-title {
6+
justify-content: space-between;
7+
display: flex;
8+
align-items: center;
9+
margin-top: 1rem;
10+
margin-bottom: 1rem;
11+
font-weight: bold;
12+
}
13+
14+
.close-dialog-icon {
15+
background: none;
16+
border: none;
17+
font-size: 1.3rem;
18+
cursor: pointer;
19+
margin-left: auto;
20+
}
21+
22+
.dialog-description {
23+
font-size: 1.2rem;
24+
height: 3rem;
25+
margin-right: 2rem;
26+
margin-bottom: 1.5rem;
27+
float: left;
28+
}
29+
30+
.checkbox-container {
31+
margin: -20px 0 0.5rem -11px;
32+
}

0 commit comments

Comments
 (0)