-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NAS-132300 / 25.04 / Create a configurable full-page form with glossary section and help #11091
base: master
Are you sure you want to change the base?
Changes from 10 commits
0a011be
01f9e38
f19660d
b9c6fba
b67d462
3ae6564
d4df88c
50240cf
b8c7526
a08540d
9788e13
bdb11ba
cbca47a
540f2cb
282538a
7392d5c
9c64de1
6c2278a
c578de1
50592df
3b8a2f8
a4b2c11
70913bd
da40c94
485ae1f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { AsyncPipe } from '@angular/common'; | ||
import { | ||
ChangeDetectionStrategy, ChangeDetectorRef, Component, HostBinding, Input, | ||
ChangeDetectionStrategy, ChangeDetectorRef, Component, HostBinding, input, Input, | ||
} from '@angular/core'; | ||
import { ControlValueAccessor, NgControl } from '@angular/forms'; | ||
import { MatButtonToggleChange, MatButtonToggleGroup, MatButtonToggle } from '@angular/material/button-toggle'; | ||
|
@@ -41,6 +41,8 @@ export class IxButtonGroupComponent implements ControlValueAccessor { | |
@HostBinding('class.inlineFields') | ||
@Input() inlineFields = false; | ||
|
||
formControlName = input<string>(); | ||
|
||
isDisabled = false; | ||
value: string; | ||
|
||
|
@@ -51,6 +53,10 @@ export class IxButtonGroupComponent implements ControlValueAccessor { | |
this.controlDirective.valueAccessor = this; | ||
} | ||
|
||
@HostBinding('attr.id') get id(): string { | ||
return this.formControlName() || ''; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also you set id here, but also set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In some cases, label might not be set. In other cases, id might not be set. So, these give more of a chance that at least one will be set and allow usage for the |
||
} | ||
|
||
onChange: (value: string) => void = (): void => {}; | ||
onTouch: () => void = (): void => {}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<div class="wrapper"> | ||
<div class="wizard-container"> | ||
<div class="mini-search-card"> | ||
<ix-input | ||
[prefixIcon]="iconMarker('search')" | ||
[formControl]="searchControl" | ||
[placeholder]="'Search Input Fields' | translate" | ||
[autocompleteOptions]="searchOptions()" | ||
></ix-input> | ||
</div> | ||
<ng-container #contentContainer></ng-container> | ||
</div> | ||
|
||
<div class="search-container"> | ||
<div class="search-card"> | ||
<ix-input | ||
[prefixIcon]="iconMarker('search')" | ||
[formControl]="searchControl" | ||
[placeholder]="'Search Input Fields' | translate" | ||
[autocompleteOptions]="searchOptions()" | ||
></ix-input> | ||
|
||
@for (section of sections(); track section) { | ||
<div class="section" (click)="onSectionClick(section.label)"> | ||
{{ section.label }} | ||
<!-- @if (!section.valid()) { | ||
<ix-icon name="warning"></ix-icon> | ||
} --> | ||
</div> | ||
} | ||
</div> | ||
</div> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
@import 'scss-imports/variables'; | ||
|
||
:host { | ||
width: 100%; | ||
} | ||
|
||
.wrapper { | ||
display: flex; | ||
} | ||
|
||
.wizard-container { | ||
width: 80%; | ||
|
||
@media (max-width: $breakpoint-sm) { | ||
width: 100%; | ||
} | ||
|
||
.actions { | ||
padding: 0 10px; | ||
|
||
@media (max-width: $breakpoint-xs) { | ||
margin: 0 10px; | ||
padding: 0; | ||
|
||
button { | ||
width: 100%; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.search-container { | ||
margin-left: 16px; | ||
min-width: 250px; | ||
width: 20%; | ||
|
||
@media (max-width: $breakpoint-xs) { | ||
display: none; | ||
} | ||
|
||
.search-card { | ||
background-color: var(--bg2); | ||
display: flex; | ||
flex-direction: column; | ||
gap: 5px; | ||
padding: 0 14px 14px; | ||
position: sticky; | ||
top: 10px; | ||
|
||
.section { | ||
color: var(--fg1); | ||
display: flex; | ||
font-family: var(--font-family-body); | ||
font-size: 15px; | ||
gap: 5px; | ||
padding: 10px; | ||
|
||
ix-icon { | ||
color: var(--red); | ||
} | ||
} | ||
|
||
.section:hover { | ||
background-color: var(--contrast-lighter); | ||
cursor: pointer; | ||
} | ||
} | ||
} | ||
|
||
.mini-search-card { | ||
background-color: var(--bg2); | ||
display: none; | ||
padding: 2px 14px; | ||
position: sticky; | ||
top: -16px; | ||
z-index: 99; | ||
|
||
@media (max-width: $breakpoint-xs) { | ||
display: block; | ||
margin: 0 9px; | ||
top: 0; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you want to use
this.controlDirective.name
orlabel
input?