-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in feature/SHIBUI-581 (pull request #100)
SHIBUI-581 Implemented reloading attributes form * SHIBUI-581 Adding autocomplete component * SHIBUI-581 Implemented reloading attributes form Approved-by: Shibui Jenkins <shibui.jenkins@gmail.com>
- Loading branch information
Showing
13 changed files
with
134 additions
and
24 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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 @@ | ||
export interface OneOf { | ||
enum: string[]; | ||
description: string; | ||
} |
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
22 changes: 22 additions & 0 deletions
22
ui/src/app/schema-form/widget/datalist/datalist.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,22 @@ | ||
<div class="widget form-group"> | ||
<label [attr.for]="id" class="d-flex justify-content-between control-label"> | ||
<span>{{ schema.title }}</span> | ||
<span *ngIf="schema.description"> | ||
<ng-template #tooltip i18n="@@tooltip--description">{{ schema.description }}</ng-template> | ||
<i class="info-icon fa fa-fw fa-info-circle text-primary fa-lg" | ||
[ngbPopover]="tooltip" | ||
i18n-aria-label="@@tooltip--instruction" | ||
aria-label="Information icon - press spacebar to read additional information for this form field"></i> | ||
</span> | ||
</label> | ||
<span *ngIf="schema.description" class="sr-only">{{ schema.description }}</span> | ||
<auto-complete | ||
[attr.id]="id" | ||
[formControl]="control" | ||
[matches]="schema.widget.data" | ||
[required]="true" | ||
[dropdown]="true" | ||
role="textbox" | ||
aria-label="Name ID Format (type for auto-complete)"> | ||
</auto-complete> | ||
</div> |
10 changes: 10 additions & 0 deletions
10
ui/src/app/schema-form/widget/datalist/datalist.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,10 @@ | ||
import { Component, OnChanges } from '@angular/core'; | ||
|
||
import { ControlWidget } from 'ngx-schema-form'; | ||
import { OneOf } from '../../model/one-of'; | ||
|
||
@Component({ | ||
selector: 'datalist-component', | ||
templateUrl: `./datalist.component.html` | ||
}) | ||
export class DatalistComponent extends ControlWidget {} |
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: 25 additions & 14 deletions
39
ui/src/app/shared/autocomplete/autocomplete.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
@import "~bootstrap/scss/functions"; | ||
@import "~bootstrap/scss/variables"; | ||
|
||
.dropdown.form-group { | ||
margin-bottom: 0px; | ||
} | ||
|
||
.dropdown-menu { | ||
min-width: 100%; | ||
width: auto; | ||
} | ||
|
||
:host { | ||
.btn-outline-secondary { | ||
border-color: $input-border-color; | ||
} | ||
} |
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