-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Repeating group summary2 table mode (#2712)
* add table view of repeating group summary * support text, date and number in repeating group * fix expression tests * show data, text and number by default if included in repeating group * add mobile view * remove unused const * fix edit button * add test for rep group table summary
- Loading branch information
Showing
15 changed files
with
401 additions
and
7 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
src/features/expressions/shared-tests/functions/displayValue/date.json
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,32 @@ | ||
{ | ||
"name": "Display value of Date component", | ||
"expression": [ | ||
"displayValue", | ||
"dag" | ||
], | ||
"context": { | ||
"component": "dag", | ||
"currentLayout": "Page" | ||
}, | ||
"expects": "21.07.2023", | ||
"layouts": { | ||
"Page": { | ||
"$schema": "https://altinncdn.no/schemas/json/layout/layout.schema.v1.json", | ||
"data": { | ||
"layout": [ | ||
{ | ||
"id": "dag", | ||
"type": "Date", | ||
"value": ["dataModel", "Skjema.Dag"], | ||
"format": "dd.MM.yyyy" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"dataModel": { | ||
"Skjema": { | ||
"Dag": "2023-07-21" | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/features/expressions/shared-tests/functions/displayValue/number.json
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,31 @@ | ||
{ | ||
"name": "Display value of Number component", | ||
"expression": [ | ||
"displayValue", | ||
"penger" | ||
], | ||
"context": { | ||
"component": "penger", | ||
"currentLayout": "Page" | ||
}, | ||
"expects": "1200", | ||
"layouts": { | ||
"Page": { | ||
"$schema": "https://altinncdn.no/schemas/json/layout/layout.schema.v1.json", | ||
"data": { | ||
"layout": [ | ||
{ | ||
"id": "penger", | ||
"type": "Number", | ||
"value": ["dataModel", "Skjema.Penger"] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"dataModel": { | ||
"Skjema": { | ||
"Penger": "1200" | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/features/expressions/shared-tests/functions/displayValue/text.json
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,31 @@ | ||
{ | ||
"name": "Display value of Text component", | ||
"expression": [ | ||
"displayValue", | ||
"navn" | ||
], | ||
"context": { | ||
"component": "navn", | ||
"currentLayout": "Page" | ||
}, | ||
"expects": "Per", | ||
"layouts": { | ||
"Page": { | ||
"$schema": "https://altinncdn.no/schemas/json/layout/layout.schema.v1.json", | ||
"data": { | ||
"layout": [ | ||
{ | ||
"id": "navn", | ||
"type": "Text", | ||
"value": ["dataModel", "Skjema.Navn"] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"dataModel": { | ||
"Skjema": { | ||
"Navn": "Per" | ||
} | ||
} | ||
} |
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
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
78 changes: 78 additions & 0 deletions
78
.../RepeatingGroup/Summary2/RepeatingGroupTableSummary/RepeatingGroupTableSummary.module.css
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,78 @@ | ||
.mobileTable { | ||
display: block; | ||
} | ||
|
||
.mobileTable caption { | ||
display: block; | ||
} | ||
|
||
.mobileTable thead { | ||
display: none; | ||
} | ||
|
||
.mobileTable th { | ||
display: block; | ||
border: none; | ||
} | ||
|
||
.mobileTable tbody, | ||
.mobileTable tr { | ||
display: block; | ||
} | ||
|
||
.mobileTable td { | ||
display: flex; | ||
flex-direction: column; | ||
border: none; | ||
padding: var(--fds-spacing-2) 0; | ||
} | ||
|
||
.mobileTable td .contentWrapper { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
width: 100%; | ||
} | ||
|
||
.mobileTable tbody tr:last-child { | ||
border-bottom: 2px solid var(--fds-semantic-border-neutral-default); | ||
} | ||
|
||
.mobileTable tbody tr:first-child { | ||
border-top: 2px solid var(--fds-semantic-border-neutral-default); | ||
} | ||
|
||
.mobileTable tr { | ||
border-bottom: 1px solid var(--fds-semantic-border-neutral-default); | ||
padding-top: var(--fds-spacing-3); | ||
padding-bottom: var(--fds-spacing-3); | ||
} | ||
|
||
.mobileTable tr:hover td { | ||
background-color: unset; | ||
} | ||
|
||
.mobileTable td[data-header-title]:not([data-header-title=''])::before, | ||
.mobileTable th[data-header-title]:not([data-header-title=''])::before { | ||
content: attr(data-header-title); | ||
display: block; | ||
text-align: left; | ||
font-weight: 500; | ||
} | ||
|
||
.mobileTable .buttonCell { | ||
align-items: start; | ||
} | ||
|
||
.visuallyHidden { | ||
border: none; | ||
padding: 0; | ||
margin: 0; | ||
position: absolute; | ||
height: 1px; | ||
width: 1px; | ||
overflow: hidden; | ||
clip: rect(1px 1px 1px 1px); | ||
clip-path: inset(50%); | ||
white-space: nowrap; | ||
} |
Oops, something went wrong.