-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
186 additions
and
6 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
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
44 changes: 44 additions & 0 deletions
44
src/app/bindings/decimal-binding/decimal-binding.component.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,44 @@ | ||
.chip { | ||
display: inline-flex; | ||
flex-direction: row; | ||
background-color: sandybrown; | ||
border: none; | ||
cursor: default; | ||
height: 36px; | ||
outline: none; | ||
padding: 0; | ||
font-size: 14px; | ||
color: white; | ||
font-family:"Open Sans", sans-serif; | ||
white-space: nowrap; | ||
align-items: center; | ||
border-radius: 16px; | ||
vertical-align: middle; | ||
text-decoration: none; | ||
justify-content: center; | ||
margin-right: 20px; | ||
} | ||
|
||
.chip-content{ | ||
cursor: inherit; | ||
display: flex; | ||
align-items: center; | ||
user-select: none; | ||
white-space: nowrap; | ||
padding-left: 12px; | ||
padding-right: 12px; | ||
} | ||
|
||
mat-form-field { | ||
width: 100%; | ||
} | ||
|
||
.code { | ||
font-size: small; | ||
font-weight: lighter; | ||
margin-right: 15px; | ||
} | ||
|
||
mat-hint { | ||
font-size: 12px; | ||
} |
13 changes: 13 additions & 0 deletions
13
src/app/bindings/decimal-binding/decimal-binding.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,13 @@ | ||
<mat-form-field class="example-full-width"> | ||
<mat-label>{{ binding.title }}</mat-label> | ||
<input matInput | ||
type="number" | ||
placeholder="Enter decimal value..." | ||
[(ngModel)]="value" | ||
(ngModelChange)="onValueChange($event)" | ||
pattern="^-?[0-9]*\.?[0-9]+$" | ||
title="Only decimal values are allowed" | ||
step="any"> | ||
<mat-hint>{{ binding.note }}</mat-hint> | ||
</mat-form-field> | ||
|
29 changes: 29 additions & 0 deletions
29
src/app/bindings/decimal-binding/decimal-binding.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,29 @@ | ||
import { Component, EventEmitter, Input, Output } from '@angular/core'; | ||
import { TerminologyService } from 'src/app/services/terminology.service'; | ||
|
||
@Component({ | ||
selector: 'app-decimal-binding', | ||
templateUrl: './decimal-binding.component.html', | ||
styleUrls: ['./decimal-binding.component.css'] | ||
}) | ||
export class DecimalBindingComponent { | ||
@Input() binding: any; | ||
@Output() textChange = new EventEmitter<any>(); | ||
|
||
options: any[] | undefined; | ||
selectedOptions: any[] | undefined; | ||
|
||
value: number = 0; | ||
|
||
constructor(private terminologyService: TerminologyService) { } | ||
|
||
ngOnInit(): void { | ||
// this.terminologyService.expandValueSet(this.binding.ecl, '').subscribe(response => this.options = response.expansion.contains) | ||
} | ||
|
||
onValueChange(newValue: number) { | ||
this.value = newValue; | ||
this.textChange.emit(newValue); | ||
} | ||
|
||
} |
44 changes: 44 additions & 0 deletions
44
src/app/bindings/integer-binding/integer-binding.component.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,44 @@ | ||
.chip { | ||
display: inline-flex; | ||
flex-direction: row; | ||
background-color: sandybrown; | ||
border: none; | ||
cursor: default; | ||
height: 36px; | ||
outline: none; | ||
padding: 0; | ||
font-size: 14px; | ||
color: white; | ||
font-family:"Open Sans", sans-serif; | ||
white-space: nowrap; | ||
align-items: center; | ||
border-radius: 16px; | ||
vertical-align: middle; | ||
text-decoration: none; | ||
justify-content: center; | ||
margin-right: 20px; | ||
} | ||
|
||
.chip-content{ | ||
cursor: inherit; | ||
display: flex; | ||
align-items: center; | ||
user-select: none; | ||
white-space: nowrap; | ||
padding-left: 12px; | ||
padding-right: 12px; | ||
} | ||
|
||
mat-form-field { | ||
width: 100%; | ||
} | ||
|
||
.code { | ||
font-size: small; | ||
font-weight: lighter; | ||
margin-right: 15px; | ||
} | ||
|
||
mat-hint { | ||
font-size: 12px; | ||
} |
12 changes: 12 additions & 0 deletions
12
src/app/bindings/integer-binding/integer-binding.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,12 @@ | ||
<mat-form-field class="example-full-width"> | ||
<mat-label>{{ binding.title }}</mat-label> | ||
<!-- <input matInput placeholder="Enter integer value..." [(ngModel)]="value" (ngModelChange)="onTextChange($event)"> --> | ||
<input matInput | ||
type="number" | ||
placeholder="Enter integer value..." | ||
[(ngModel)]="value" | ||
(ngModelChange)="onValueChange($event)" | ||
pattern="^-?[0-9]\d*$" | ||
title="Only integer values are allowed"> | ||
<mat-hint>{{ binding.note }}</mat-hint> | ||
</mat-form-field> |
29 changes: 29 additions & 0 deletions
29
src/app/bindings/integer-binding/integer-binding.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,29 @@ | ||
import { Component, EventEmitter, Input, Output } from '@angular/core'; | ||
import { TerminologyService } from 'src/app/services/terminology.service'; | ||
|
||
@Component({ | ||
selector: 'app-integer-binding', | ||
templateUrl: './integer-binding.component.html', | ||
styleUrls: ['./integer-binding.component.css'] | ||
}) | ||
export class IntegerBindingComponent { | ||
@Input() binding: any; | ||
@Output() textChange = new EventEmitter<any>(); | ||
|
||
options: any[] | undefined; | ||
selectedOptions: any[] | undefined; | ||
|
||
value: number = 0; | ||
|
||
constructor(private terminologyService: TerminologyService) { } | ||
|
||
ngOnInit(): void { | ||
// this.terminologyService.expandValueSet(this.binding.ecl, '').subscribe(response => this.options = response.expansion.contains) | ||
} | ||
|
||
onValueChange(newValue: number) { | ||
this.value = newValue; | ||
this.textChange.emit(newValue); | ||
} | ||
|
||
} |