-
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-132667 / 25.04 / Come up with a reusable component for master-det…
…ail view (#11096) * NAS-132667: Come up with a reusable component for master-detail view * NAS-132667: Come up with a reusable component for master-detail view * NAS-132667: Come up with a reusable component for master-detail view * NAS-132667: Come up with a reusable component for master-detail view * NAS-132667: Come up with a reusable component for master-detail view * NAS-132667: PR update * NAS-132667: PR update * NAS-132667: PR update
- Loading branch information
1 parent
89e16bd
commit 95d6d15
Showing
32 changed files
with
462 additions
and
582 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
2 changes: 1 addition & 1 deletion
2
src/app/modules/buttons/mobile-back-button/mobile-back-button.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
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
37 changes: 37 additions & 0 deletions
37
src/app/modules/master-detail-view/master-detail-view.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,37 @@ | ||
<div class="container"> | ||
<div class="table-container"> | ||
<ng-content select="[master]"></ng-content> | ||
</div> | ||
|
||
@if (selectedItem()) { | ||
<div | ||
class="details-container" | ||
ixDetailsHeight | ||
[class.details-container-mobile]="showMobileDetails()" | ||
> | ||
<div class="header"> | ||
<h3 class="title"> | ||
<div class="mobile-prefix"> | ||
<ix-mobile-back-button | ||
(onClose)="toggleShowMobileDetails(false)" | ||
></ix-mobile-back-button> | ||
{{ 'Details for' | translate }} | ||
</div> | ||
|
||
<span class="prefix"> | ||
{{ 'Details for' | translate }} | ||
</span> | ||
|
||
<span class="name"> | ||
<ng-content select="[detail-name]"></ng-content> | ||
</span> | ||
</h3> | ||
</div> | ||
|
||
<div> | ||
<ng-content select="[detail]"></ng-content> | ||
</div> | ||
</div> | ||
} | ||
</div> | ||
|
93 changes: 93 additions & 0 deletions
93
src/app/modules/master-detail-view/master-detail-view.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,93 @@ | ||
@import 'scss-imports/variables'; | ||
@import 'mixins/layout'; | ||
@import 'mixins/cards'; | ||
|
||
:host { | ||
&::ng-deep { | ||
@include tree-node-with-details-container; | ||
|
||
.cards { | ||
@include details-cards(); | ||
|
||
@media (max-width: $breakpoint-tablet) { | ||
overflow: hidden; | ||
} | ||
|
||
.card { | ||
@include details-card(); | ||
margin: 0; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.details-container { | ||
flex-direction: column; | ||
overflow: auto; | ||
} | ||
|
||
.header { | ||
background: var(--bg1); | ||
color: var(--fg1); | ||
position: sticky; | ||
top: 0; | ||
z-index: 5; | ||
|
||
@media (max-width: calc($breakpoint-hidden - 1px)) { | ||
border-bottom: solid 1px var(--lines); | ||
margin: 0 16px 16px 0; | ||
position: static; | ||
} | ||
} | ||
|
||
.title { | ||
align-items: center; | ||
color: var(--fg2); | ||
display: flex; | ||
gap: 8px; | ||
margin-bottom: 12px; | ||
margin-top: 20px; | ||
min-height: 36px; | ||
|
||
@media (max-width: $breakpoint-tablet) { | ||
align-items: flex-start; | ||
flex-direction: column; | ||
gap: unset; | ||
max-width: 100%; | ||
width: 100%; | ||
} | ||
|
||
@media (max-width: calc($breakpoint-hidden - 1px)) { | ||
margin-top: 0; | ||
} | ||
|
||
.mobile-prefix { | ||
align-items: center; | ||
display: none; | ||
|
||
@media (max-width: $breakpoint-hidden) { | ||
display: flex; | ||
max-width: 50%; | ||
opacity: 0.85; | ||
} | ||
|
||
@media (max-width: $breakpoint-tablet) { | ||
max-width: 100%; | ||
width: 100%; | ||
} | ||
} | ||
|
||
.prefix { | ||
display: inline; | ||
|
||
@media (max-width: $breakpoint-hidden) { | ||
display: none; | ||
} | ||
} | ||
|
||
.name { | ||
@media (max-width: $breakpoint-tablet) { | ||
margin-left: 40px; | ||
} | ||
} | ||
} |
Oops, something went wrong.