This file contains hidden or 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 const ticked = (link, node, edgepaths, edgelabels) => { | |
link | |
.attr("x1", function (d) {return d.source.x;}) | |
.attr("y1", function (d) {return d.source.y;}) | |
.attr("x2", function (d) {return d.target.x;}) | |
.attr("y2", function (d) {return d.target.y;}); | |
node.attr("transform", | |
function (d) {return "translate(" + d.x + ", " + d.y + ")";}); |
This file contains hidden or 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 const forceSimulation = (d3, {width, height}) => d3.forceSimulation() | |
.force("charge", d3.forceManyBody()) | |
.force("center", d3.forceCenter(width / 2, height / 2)); | |
// use: | |
const simulation = forceSimulation(d3, {width,height}); | |
simulation.force("link", |
This file contains hidden or 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 const initDefinitions = (svg) => | |
svg.append('defs') | |
.append('marker') | |
.attrs({'id':'arrowhead', | |
'viewBox':'-0 -5 10 10', | |
'refX':34, | |
'refY':0, | |
'orient':'auto', | |
'markerWidth':8, | |
'markerHeight':8, |
This file contains hidden or 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 { BoardsService } from "../../../services/boards-service"; | |
const boardService = new BoardsService(); | |
let initailState = [{ | |
id: 1, | |
stages: [ { | |
id: 2, | |
name: 'stage name', | |
parentId: 1, | |
tasks: [ |
This file contains hidden or 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 { async, ComponentFixture, TestBed } from '@angular/core/testing'; | |
import { LoginComponent } from './login.component'; | |
import {AppTestingModule} from "../app-testing.module"; | |
import {NO_ERRORS_SCHEMA} from "@angular/core"; | |
import {LocalStorageWrapperService} from "../services/local-storage-wrapper.service"; | |
describe('LoginComponent', () => { | |
let component: LoginComponent; | |
let fixture: ComponentFixture<LoginComponent>; |
This file contains hidden or 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 { HttpClientTestingModule } from '@angular/common/http/testing'; | |
import {NgModule} from "@angular/core"; | |
import {LoginServiceStub} from "../stubs/services/login-service-stub"; | |
import {LoginService} from "./login/login.service"; | |
import {RouterTestingModule} from "@angular/router/testing"; | |
import {LocalStorageWrapperStubService} from "../stubs/services/local-storage-wrapper.stub.service"; | |
import {LocalStorageWrapperService} from "./services/local-storage-wrapper.service"; | |
import {SystemSettingsServiceStub} from "../stubs/services/system-settings-service-stub"; | |
import {SystemSettingsService} from "./services/store/system-settings.service"; | |
import {FormBuilder, ReactiveFormsModule} from "@angular/forms"; |
This file contains hidden or 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 LocalStorageWrapperStubService { | |
constructor() { } | |
private localStorage = new Map(); | |
remove(key) { |
This file contains hidden or 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({ | |
providedIn: 'root' | |
}) | |
export class LocalStorageWrapperService { | |
constructor() { } | |
private localStorage = localStorage; |
This file contains hidden or 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
declare module '*.json' { | |
const value: any; | |
export default value; | |
} |
This file contains hidden or 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
const { gitDescribeSync } = require('git-describe'); | |
const { writeFileSync } = require('fs'); | |
const path = require('path'); | |
const info = gitDescribeSync(); | |
const infoJson = JSON.stringify(info, null, 2); | |
writeFileSync(path.join(__dirname, '/src/git-version.json'), infoJson); |