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
export module UIConsts { | |
export const UI_UPDATE = 'UI_UPDATE'; | |
export const TOGGLE_UI_STATE = 'TOGGLE_UI_STATE'; | |
} |
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
.app-container { | |
display: flex; | |
justify-content:center; | |
} | |
.main-content { | |
display: flex; | |
flex-direction: column; | |
align-items:center; | |
background-color: gray; |
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
.app-container { | |
display: flex; | |
justify-content:center; | |
} | |
.main-content { | |
display: flex; | |
flex-direction: column; | |
align-items:center; | |
background-color: gray; |
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
import {Injectable} from "@angular/core"; | |
@Injectable() | |
export class GeneralValidationService { | |
constructor() {} | |
getEmailValidity(email) { | |
let regex: any = /^[a-zA-Z0-9.!#$%&’*+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+((?:\.){1}[a-zA-Z0-9-]+)$/; | |
let isEmailValid = false; | |
if (email && email.match(regex).length) { | |
return isEmailValid = true; |
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
import {Injectable} from "@angular/core"; | |
@Injectable() | |
export class EmailValidationService { | |
private regex: any = /^[a-zA-Z0-9.!#$%&’*+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+((?:\.){1}[a-zA-Z0-9-]+)$/; | |
private isEmailValid = false; | |
constructor() {} | |
getEmailValidity(email) { | |
if (email && email.match(this.regex)) { | |
return this.isEmailValid = true; |
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
import {Component, OnInit} from '@angular/core'; | |
@Component({ | |
selector: 'app', | |
templateUrl: 'app.html', | |
styleUrls: ['app.scss'] | |
}) | |
export class AppComponent implements OnInit { | |
private d; | |
private dateFormat; |
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
export function format(str, argumentsArr?) { | |
let urlConstruct = str; | |
for (var i = 0; i < argumentsArr.length; i++) { | |
// g - global search, m - multiline | |
let regEx = new RegExp("\\{" + (i) + "\\}", 'gm'); | |
// Handle multiple whitespaces in STRING type arguments | |
if (typeof(argumentsArr[i]) === 'string') { | |
argumentsArr[i] = argumentsArr[i].replace(/\s/g, ''); | |
} | |
// Add to url construct |
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
import {Component, OnInit, Input, ChangeDetectionStrategy} from '@angular/core'; | |
import * as d3 from 'd3'; | |
import {Observable} from "rxjs"; | |
import {UIConsts} from "../../../../shared/app.consts"; | |
@Component({ | |
selector: 'timeline', | |
styleUrls: ['timeline.scss'], | |
template: ` | |
<div class="timeline-svg-container"> |
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
<div class="chart"></div> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.js"></script> |
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
import { ComponentFixture, TestBed, async } from '@angular/core/testing'; | |
import { By } from '@angular/platform-browser'; | |
import { DebugElement } from '@angular/core'; | |
// Component Dependencies: | |
// items: | |
import {ItemDetailsComponent} from './Item-details.component'; | |
import {ItemOverviewComponent} from './Item-overview/Item-overview.component'; | |
import {ItemFullDataViewComponent} from './Item-full-data-view/Item-full-data-view.component'; |