Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
ngx-timeline-albe
Advanced tools
Readme
Albe Timeline is a simple yet highly customizable component that helps you render a responsive horizontal (or vertical) timeline from JSON data. The data will be automatically grouped by year and the events will be sorted by date.
Version history:
Library | Angular |
---|---|
Lastet | 17.3.0 |
1.5.0 | 16.0.0 |
1.4.1 | 15.2.6 |
1.3.0 | 14.2.0 |
1.2.11 | 11.2.4 |
1.2.0 | 10.1.2 |
1.1.0 | 8.0.0 |
The component is open source and released for free commercial use at no cost. Donations are welcome.
$ npm install ngx-timeline-albe
import { NgxTimelineAlbeModule } from 'ngx-timeline-albe';
@NgModule({
imports: [ NgxTimelineAlbeModule ],
...
})
export class AppModule {}
<ngx-timeline [itens]="data"></ngx-timeline>
<ngx-timeline [itens]="data"
[formatDate]="'dd MMMM'"
[sortDesc]="true"
[showMenu]="true"
[showGroup]="true"
[theme]="'basic'">
</ngx-timeline>
import { TimelineItem } from 'ngx-timeline-albe';
//The Json object is also accepted in string format.
data: Array<TimelineItem> | String;
ngOnInit() {
//Object type
this.data = [
{
datetime: new Date('2020-03-29 23:59:59'),
header: 'Sample of header',
body: [
{
tag: 'h1',
content: "Lorem ipsum"
},
{
tag: 'p',
content: 'Lorem ipsum dolor sit amet, nisl lorem, wisi egestas orci tempus class massa.'
}],
footer: 'Sample of footer. See <a href=\"https://github.com/Albejr/ngx-timeline\" target=\"_blank\">more details</a>'
}
];
//OR Json format
this.data = `[{
"datetime": "2020-03-29 23:59:59",
"header": "Sample of header",
"body": [{
"tag": "h1",
"content": "Lorem ipsum"
},
{
"tag": "p",
"content": "Lorem ipsum dolor sit amet, nisl lorem, wisi egestas orci tempus class massa."
}
],
"footer": "Sample of footer. See <a href='https://github.com/Albejr/jquery-albe-timeline' target='_blank'>more details</a>"
}]`;
}
Name | Type | Default | Description | |
---|---|---|---|---|
[itens] | required | Array<TimelineItem> or String Json | [ ] | List of itens to be displayed. |
[showGroup] | optional | Boolean | true | Sets the visibility of the annual grouper. |
[showMenu] | optional | Boolean | true | Sets the anchor menu visibility for annual groupings (depends on 'showGroup'). |
[sortDesc] | optional | Boolean | true | Defines ordering of items, true: Descendente, false: Ascendente. |
[formatDate] | optional | String | 'dd MMMM' | Sets the date display format:
|
[language] | optional | String | 'pt-BR' | Specifies manually the display language of texts (i18n), if the token LocaleID is not configured. |
[theme] | optional | String | 'basic' | Defines the style:
|
Name | Type | Description | |
---|---|---|---|
datetime | required | Date | |
icon | optional | string | |
header | optional | string | |
body | required | Array<ItemBody> | |
footer | optional | string |
Name | Type | Description | |
---|---|---|---|
tag | required | string | |
content | required | string | |
attr | optional | TagAttribute |
Name | Type | Description | |
---|---|---|---|
href | optional | string | |
target | optional | string | |
title | optional | string | |
src | optional | string | |
width | optional | string | |
cssclass | optional | string |
We'll have a similar result:
<ngx-timeline>
<div id="timeline-albe" class="clasic">
<section>
<header class="group">2020</header>
<div class="item">
<div class="badge">
<span>29/03</span>
</div>
<article>
<header>Sample of header</header>
<div class="body">
<span>2017-03-29 23:59:59</span>
<h1>Lorem ipsum</h1>
<p>Lorem ipsum dolor sit amet, nisl lorem, wisi egestas orci tempus class massa.</p>
</div>
<footer>Sample of footer.</footer>
</article>
<div class="badge last">
</div>
</div>
</section>
</div>
<ngx-timeline>
There are several classes that help you to create your custom styles
app.component.css
:host ::ng-deep #timeline-albe.minimalist {
color: inherit;
font-size: inherit;
width: inherit;
margin: 10px;
}
Follow these instructions to run the demo:
npm i
to install all required dependenciesng b ngx-timeline-albe
to build in dist folder.ng s
to serve the project from a live-updating server.localhost:4200
to see the demo siteInspired on the plug-in: https://github.com/Albejr/jquery-albe-timeline
FAQs
Component for rendering timelines from the your data.
The npm package ngx-timeline-albe receives a total of 26 weekly downloads. As such, ngx-timeline-albe popularity was classified as not popular.
We found that ngx-timeline-albe demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.