Skip to content

Commit

Permalink
feat(render): init maturity component
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed May 8, 2020
1 parent d96bdf7 commit 8efaf05
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>ledge-maturity works!</p>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { LedgeMaturityComponent } from './ledge-maturity.component';

describe('LedgeMaturityComponent', () => {
let component: LedgeMaturityComponent;
let fixture: ComponentFixture<LedgeMaturityComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ LedgeMaturityComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(LedgeMaturityComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';
import { LedgeListItem } from '../model/ledge-chart.model';

@Component({
selector: 'ledge-maturity',
templateUrl: './ledge-maturity.component.html',
styleUrls: ['./ledge-maturity.component.scss']
})
export class LedgeMaturityComponent implements OnInit, OnChanges {
@Input()
data: LedgeListItem[];

@Input()
config: any;
checklists: any;
title: any;

ngOnInit(): void {
}

ngOnChanges(changes: SimpleChanges): void {
this.renderData();
}

private renderData() {

}
}
4 changes: 4 additions & 0 deletions projects/ledge-render/src/lib/ledge-render.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
<ledge-heatmap [data]="item.data" [config]="item.config"></ledge-heatmap>
</div>

<div *ngSwitchCase="'maturiy'">
<ledge-maturity [data]="item.data" [config]="item.config"></ledge-maturity>
</div>

<div *ngSwitchCase="'table'">
<table>
<thead>
Expand Down
1 change: 1 addition & 0 deletions projects/ledge-render/src/lib/ledge-render.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ export class LedgeRenderComponent implements OnInit, OnChanges {
case 'checklist':
case 'sunburst':
case 'fishbone':
case 'maturiy':
const {config, lists} = LedgeMarkdownConverter.toJson(codeBlock.text);
this.markdownData.push({
type: codeBlock.lang,
Expand Down
2 changes: 2 additions & 0 deletions projects/ledge-render/src/lib/ledge-render.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { LedgeMermaidComponent } from './components/ledge-mermaid/ledge-mermaid.
import { LedgeSunburstComponent } from './chart/ledge-sunburst/ledge-sunburst.component';
import { LedgeFishBoneComponent } from './chart/ledge-fish-bone/ledge-fish-bone.component';
import { LedgeHeatmapComponent } from './chart/ledge-heatmap/ledge-heatmap.component';
import { LedgeMaturityComponent } from './components/ledge-maturity/ledge-maturity.component';

const LedgeComponents = [
LedgeRenderComponent,
Expand All @@ -55,6 +56,7 @@ const LedgeComponents = [
LedgeSunburstComponent,
LedgeFishBoneComponent,
LedgeHeatmapComponent,
LedgeMaturityComponent,

ComponentTodoComponent,
ComponentChecklistComponent,
Expand Down

0 comments on commit 8efaf05

Please sign in to comment.