-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NAS-123587 / 24.04 / Refactored tables (#8659)
- Loading branch information
Showing
109 changed files
with
952 additions
and
616 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...s/ix-table2/components/ix-table-body/cells/ix-cell-actions/ix-cell-actions.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div class="actions"> | ||
<ng-container | ||
*ngFor="let action of actions" | ||
> | ||
<button | ||
*ngIf="action.hidden ? !(action.hidden(row) | async) : true" | ||
mat-icon-button | ||
ixTest="row-edit" | ||
[matTooltip]="action.tooltip || ''" | ||
(click)="$event.stopPropagation(); action.onClick(row)" | ||
> | ||
<ix-icon [name]="action.iconName"></ix-icon> | ||
</button> | ||
</ng-container> | ||
</div> |
4 changes: 4 additions & 0 deletions
4
...s/ix-table2/components/ix-table-body/cells/ix-cell-actions/ix-cell-actions.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.actions { | ||
display: flex; | ||
gap: 1; | ||
} |
20 changes: 20 additions & 0 deletions
20
...les/ix-table2/components/ix-table-body/cells/ix-cell-actions/ix-cell-actions.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Component } from '@angular/core'; | ||
import { Observable } from 'rxjs'; | ||
import { Column, ColumnComponent } from 'app/modules/ix-table2/interfaces/table-column.interface'; | ||
|
||
@Component({ | ||
templateUrl: './ix-cell-actions.component.html', | ||
styleUrls: ['./ix-cell-actions.component.scss'], | ||
}) | ||
export class IxCellActionsComponent<T> extends ColumnComponent<T> { | ||
actions: { | ||
iconName: string; | ||
onClick: (row: T) => void; | ||
tooltip?: string; | ||
hidden?: (row: T) => Observable<boolean>; | ||
}[]; | ||
} | ||
|
||
export function actionsColumn<T>(options: Partial<IxCellActionsComponent<T>>): Column<T, IxCellActionsComponent<T>> { | ||
return { type: IxCellActionsComponent, ...options }; | ||
} |
7 changes: 0 additions & 7 deletions
7
...les/ix-table2/components/ix-table-body/cells/ix-cell-delete/ix-cell-delete.component.html
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
.../ix-table2/components/ix-table-body/cells/ix-cell-delete/ix-cell-delete.component.spec.ts
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
...dules/ix-table2/components/ix-table-body/cells/ix-cell-delete/ix-cell-delete.component.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/app/pages/directory-service/components/idmap-list/idmap-list.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<ng-template ixPageHeader> | ||
<ix-page-title-header> | ||
<ix-search-input (search)="onListFiltered($event)"></ix-search-input> | ||
<button mat-button color="primary" ixTest="add-idmap" (click)="doAdd()"> | ||
{{ 'Add' | translate }} | ||
</button> | ||
</ix-page-title-header> | ||
</ng-template> | ||
|
||
<div class="table-container"> | ||
<mat-toolbar *ngIf="toolbar" class="table-header"> | ||
<div class="heading" [routerLink]="['/', 'directoryservice', 'idmap']"> | ||
<h3>{{ 'Idmap' | translate }}</h3> | ||
<ix-icon name="open_in_new"></ix-icon> | ||
</div> | ||
<div class="action"> | ||
<button mat-button ixTest="add-idmap" (click)="doAdd()"> | ||
{{ 'Add' | translate }} | ||
</button> | ||
</div> | ||
</mat-toolbar> | ||
<ix-table2 | ||
[ix-table2-empty]="!dataProvider.rows.length" | ||
[emptyConfig]="emptyService.defaultEmptyConfig(emptyType$ | async)" | ||
> | ||
<thead | ||
ix-table-head | ||
[columns]="columns" | ||
[dataProvider]="dataProvider" | ||
></thead> | ||
<tbody | ||
ix-table-body | ||
[columns]="columns" | ||
[dataProvider]="dataProvider" | ||
> | ||
</tbody> | ||
</ix-table2> | ||
<ix-table-pager *ngIf="paginator" [dataProvider]="dataProvider"></ix-table-pager> | ||
</div> |
38 changes: 38 additions & 0 deletions
38
src/app/pages/directory-service/components/idmap-list/idmap-list.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.table-container { | ||
margin: 0.3333rem; | ||
|
||
::ng-deep ix-empty-row { | ||
background: var(--bg2); | ||
border-left: 1px solid var(--contrast-lighter); | ||
border-right: 1px solid var(--contrast-lighter); | ||
} | ||
} | ||
|
||
.table-header { | ||
background: var(--bg2); | ||
border-left: solid 1px var(--lines); | ||
border-right: solid 1px var(--lines); | ||
border-top: solid 1px var(--lines); | ||
border-top-left-radius: 6px; | ||
border-top-right-radius: 6px; | ||
} | ||
|
||
.heading { | ||
cursor: pointer; | ||
display: flex; | ||
gap: 5px; | ||
} | ||
|
||
.mat-toolbar-row, | ||
.mat-toolbar-single-row { | ||
height: 48px; | ||
} | ||
|
||
.mat-mdc-card { | ||
margin: 0.333333rem; | ||
} | ||
|
||
.table-header { | ||
display: flex; | ||
justify-content: space-between; | ||
} |
Oops, something went wrong.