-
Notifications
You must be signed in to change notification settings - Fork 5
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
25 changed files
with
566 additions
and
309 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
{} | ||
{ | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"printWidth": 80, | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"singleAttributePerLine": true, | ||
"bracketSameLine": true, | ||
"htmlWhitespaceSensitivity": "css" | ||
} |
38 changes: 38 additions & 0 deletions
38
client/src/app/components/shared/empty-value/empty-value.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,38 @@ | ||
<ng-container [ngSwitch]="cvcEmptyCategory"> | ||
<span | ||
*ngSwitchCase="'not-applicable'" | ||
class="empty-symbol not-applicable" | ||
nz-tooltip | ||
nzTooltipTitle="Value is not applicable"> | ||
<ng-container [ngSwitch]="cvcDisplayMode"> | ||
<ng-container *ngSwitchCase="'small'"> N/A </ng-container> | ||
<ng-container *ngSwitchDefault> Not applicable </ng-container> | ||
</ng-container> | ||
</span> | ||
<span | ||
*ngSwitchCase="'unspecified'" | ||
nz-tooltip | ||
nzTooltipTitle="Unspecified" | ||
class="empty-symbol unspecified" | ||
nz-tooltip | ||
nzTooltipTitle="Value is unspecified"> | ||
<ng-container [ngSwitch]="cvcDisplayMode"> | ||
<ng-container *ngSwitchCase="'small'"> | ||
– – | ||
</ng-container> | ||
<ng-container *ngSwitchDefault>Not specified</ng-container> | ||
</ng-container> | ||
</span> | ||
<span | ||
*ngSwitchCase="'invalid'" | ||
nz-tooltip | ||
nzTooltipTitle="INVALID" | ||
class="empty-symbol invalid" | ||
nz-tooltip | ||
nzTooltipTitle="Error: value requires specification"> | ||
<ng-container [ngSwitch]="cvcDisplayMode"> | ||
<ng-container *ngSwitchCase="'small'">!?</ng-container> | ||
<ng-container *ngSwitchDefault>Unspecified</ng-container> | ||
</ng-container> | ||
</span> | ||
</ng-container> |
21 changes: 21 additions & 0 deletions
21
client/src/app/components/shared/empty-value/empty-value.component.less
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,21 @@ | ||
.empty-symbol { | ||
font-style: oblique; | ||
display: inline-block; | ||
cursor: help; | ||
white-space: no-wrap; | ||
&.not-applicable { | ||
color: #ccc; | ||
font-weight: 500; | ||
} | ||
&.unspecified { | ||
display: inline-block; | ||
color: #ccc; | ||
font-weight: 500; | ||
padding: 0 3px; | ||
} | ||
&.invalid { | ||
display: inline-block; | ||
color: #FF4D4F; | ||
font-weight: 700; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
client/src/app/components/shared/empty-value/empty-value.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,14 @@ | ||
import { Component, Input } from '@angular/core' | ||
|
||
export type CvcEmptyValueCategory = 'not-applicable' | 'unspecified' | 'invalid' | ||
|
||
@Component({ | ||
selector: 'cvc-empty-value', | ||
templateUrl: './empty-value.component.html', | ||
styleUrls: ['./empty-value.component.less'], | ||
}) | ||
export class EmptyValueComponent { | ||
@Input() cvcEmptyCategory: CvcEmptyValueCategory = | ||
'not-applicable' | ||
@Input() cvcDisplayMode: 'default' | 'small' = 'default' | ||
} |
12 changes: 12 additions & 0 deletions
12
client/src/app/components/shared/empty-value/empty-value.module.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,12 @@ | ||
import { CommonModule } from '@angular/common' | ||
import { NgModule } from '@angular/core' | ||
import { NzIconModule } from 'ng-zorro-antd/icon' | ||
import { NzToolTipModule } from 'ng-zorro-antd/tooltip' | ||
import { EmptyValueComponent } from './empty-value.component' | ||
|
||
@NgModule({ | ||
declarations: [EmptyValueComponent], | ||
imports: [CommonModule, NzToolTipModule, NzIconModule], | ||
exports: [EmptyValueComponent], | ||
}) | ||
export class CvcEmptyValueModule {} |
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
Oops, something went wrong.