-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(timeline): refactoring timeline components
Closes: #345
- Loading branch information
1 parent
140f646
commit 1c96358
Showing
10 changed files
with
107 additions
and
78 deletions.
There are no files selected for viewing
21 changes: 0 additions & 21 deletions
21
.../src/lib/components/core/timeline/timeline-container/timeline-container.component.spec.ts
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
...r-kit/src/lib/components/core/timeline/timeline-container/timeline-container.component.ts
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
21 changes: 21 additions & 0 deletions
21
projects/design-angular-kit/src/lib/components/core/timeline/timeline.component.spec.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,21 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ItTimelineComponent } from './timeline.component'; | ||
import { tb_base } from '../../../../test'; | ||
|
||
describe('ItTimelineComponent', () => { | ||
let component: ItTimelineComponent; | ||
let fixture: ComponentFixture<ItTimelineComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule(tb_base).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(ItTimelineComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
31 changes: 31 additions & 0 deletions
31
projects/design-angular-kit/src/lib/components/core/timeline/timeline.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,31 @@ | ||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; | ||
import { ItTimelineItemComponent } from './timeline-item/timeline-item.component'; | ||
import { ItIconComponent } from '../../utils/icon/icon.component'; | ||
import { TranslateModule } from '@ngx-translate/core'; | ||
import { ItAbstractComponent } from '../../../abstracts/abstract.component'; | ||
import { TimelineElement } from '../../../interfaces/core'; | ||
|
||
/** | ||
* Timeline | ||
* @description Build timeline for chronological representation of events. | ||
*/ | ||
@Component({ | ||
standalone: true, | ||
selector: 'it-timeline', | ||
templateUrl: './timeline.component.html', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
imports: [ItIconComponent, TranslateModule, ItTimelineItemComponent], | ||
}) | ||
export class ItTimelineComponent extends ItAbstractComponent { | ||
/** | ||
* Timeline elements array | ||
* @default [] | ||
*/ | ||
@Input() timelineElements: TimelineElement[] = []; | ||
|
||
/** | ||
* Default date format for timeline element reference date | ||
* @default dd/MM/yyyy | ||
*/ | ||
@Input() dateFormat: string = 'dd/MM/yyyy'; | ||
} |
4 changes: 2 additions & 2 deletions
4
projects/design-angular-kit/src/lib/components/core/timeline/timeline.module.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
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