-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
2099bd5
commit ab26495
Showing
21 changed files
with
226 additions
and
73 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 |
---|---|---|
|
@@ -8,5 +8,6 @@ | |
"typeahead", | ||
"Ecoacoustics", | ||
"datetime" | ||
] | ||
], | ||
"compile-hero.disable-compile-files-on-did-save-code": false | ||
} |
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
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
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
7 changes: 7 additions & 0 deletions
7
src/app/components/shared/datetime/abstract-datetime.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,7 @@ | ||
<!-- | ||
This is a shared template used by datetime, zoned datetime, duration, and time since components | ||
and should be used in conjunction with the AbstractDatetimeComponent. | ||
--> | ||
<time [dateTime]="rawDateTime" [ngbTooltip]="tooltipValue()"> | ||
{{ formattedValue() }}{{ suffix() }} | ||
</time> |
28 changes: 28 additions & 0 deletions
28
src/app/components/shared/datetime/abstract-datetime.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,28 @@ | ||
export interface IAbstractDatetimeComponent { | ||
formattedValue: () => string; | ||
tooltipValue: () => string; | ||
rawDateTime: () => string; | ||
suffix: () => string; | ||
} | ||
|
||
/** | ||
* An abstract component that should be used in conjunction with the abstract-datetime.component.html template | ||
* | ||
* @requires formattedValue | ||
* @requires tooltipValue | ||
* @requires rawDateTime | ||
*/ | ||
export abstract class AbstractDatetimeComponent | ||
implements IAbstractDatetimeComponent | ||
{ | ||
public constructor() {} | ||
|
||
public abstract formattedValue(): string; | ||
public abstract tooltipValue(): string; | ||
public abstract rawDateTime(): string; | ||
|
||
// I have implemented this method so that each datetime component will default to having no suffix | ||
public suffix(): string { | ||
return ""; | ||
} | ||
} |
3 changes: 0 additions & 3 deletions
3
src/app/components/shared/datetime/datetime/datetime.component.html
This file was deleted.
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
3 changes: 0 additions & 3 deletions
3
src/app/components/shared/datetime/duration/duration.component.html
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.