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 {Directive, ElementRef, Input, Renderer} from '@angular/core'; | |
import 'jquery-mousewheel'; | |
import 'malihu-custom-scrollbar-plugin'; | |
@Directive({ | |
selector: "[app-scrollbar]" | |
}) | |
export class ScrollbarDirective { |
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 { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'mapToKeyValue' | |
}) | |
export class MapToKeyValuePipe implements PipeTransform { | |
transform(obj: Object) { | |
let modifiedArray = []; | |
for (let key in obj) { |
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 { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'mapFromKeyValue' | |
}) | |
export class MapFromKeyValuePipe implements PipeTransform { | |
transform(objArr) { | |
console.log('obj array looks like this: ', objArr); | |
let mappingObject = {}; |
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 { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'getInitials' | |
}) | |
export class GetInitialsPipe implements PipeTransform { | |
transform(value: string) { | |
return value.replace(/[a-z]/g, '').replace(' ', ''); | |
} |
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 { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'maxLength' | |
}) | |
export class MaxLengthPipe implements PipeTransform { | |
transform(value: string, limit: number){ | |
if (value.length > limit) return value.substring(0, limit) + '...'; | |
else return value; | |
} |
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 ItemsConsts { | |
export const INIT_ITEM_TIMER = 'INIT_ITEM_TIMER'; | |
} |
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'; |
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 {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
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 |
OlderNewer