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.
@frxjs/ngx-timeline
Advanced tools
Readme
The main goal of this angular library is to give you the possibility to integrate a timeline in your app.
Version 17.0.7 is compatible with angular 17.
Go here and discover all possible configurations for the timeline
Fig.1 - Preview of Timeline example configuration page
Running the following command to install the library
npm install @frxjs/ngx-timeline
After installing the library and including NgxTimelineModule in your imports module you could add one of following examples to your template in order to display your timeline
<ngx-timeline [events]="events"></ngx-timeline>
<ngx-timeline [events]="events" [langCode]="it"></ngx-timeline>
<ngx-timeline [events]="events" [langCode]="it" [enableAnimation]="false"></ngx-timeline>
Input name | Explanation | Mandatory | Type/Supported Values | Default value |
---|---|---|---|---|
events | list of events to be displayed | yes | NgxTimelineEvent | no default |
langCode | language code use to format dates | no |
| 'en' |
enableAnimation | Boolean used to enable or disable the animations | no | boolean | true |
reverseOrder | Boolean used to reverse sort order (default older first) | no | boolean | false |
groupEvent | Logic to be applied in order to group events | no | enum NgxTimelineEventGroup | NgxTimelineEventGroup.MONTH_YEAR |
changeSide | Logic to be applied in order to put events on LEFT or RIGHT | no | enum NgxTimelineEventChangeSide | NgxTimelineEventChangeSide.ON_DIFFERENT_DAY_IN_GROUP |
periodCustomTemplate | Custom Template displayed before a group of events | no | TemplateRef | no default |
eventCustomTemplate | Custom Template displayed to show a single event | no | TemplateRef | no default |
centerIconCustomTemplate | Custom Template displayed to show an separator icon | no | TemplateRef | no default |
dateInstantCustomTemplate | Custom Template displayed to show the side date | no | TemplateRef | no default |
innerEventCustomTemplate | Custom Template displayed to show the inner event | no | TemplateRef | no default |
eventDescriptionCustomTemplate | Custom Template displayed to show the description | no | TemplateRef | no default |
Output name | Explanation | Mandatory | Type/Supported Values | Default value |
---|---|---|---|---|
clickEmitter | Output click event emitter | no | BehaviorSubject | no default |
interface NgxTimelineEvent {
timestamp?: Date;
title?: string;
description?: string;
id?: any;
itemPosition?: NgxTimelineItemPosition;
}
enum NgxTimelineEventGroup {
YEAR = 'YEAR',
MONTH_YEAR = 'MONTH_YEAR',
DAY_MONTH_YEAR = 'DAY_MONTH_YEAR'
}
enum NgxTimelineEventChangeSide {
ALL = 'ALL',
ALL_IN_GROUP = 'ALL_IN_GROUP',
ON_DIFFERENT_DAY_IN_GROUP = 'ON_DIFFERENT_DAY_IN_GROUP',
ON_DIFFERENT_HMS_IN_GROUP = 'ON_DIFFERENT_HMS_IN_GROUP',
ON_DIFFERENT_MONTH_IN_GROUP = 'ON_DIFFERENT_MONTH_IN_GROUP'
}
<ng-template #periodCustomTemplate let-period=period let-index=index let-event=event>
<div [ngClass]="{'transparent first-line': !index}" class="line"></div>
<div class="period-container">
<p>
{{index}} - {{period | json }}
</p>
</div>
<div class="line"></div>
</ng-template>
<ng-template #centerIconCustomTemplate let-index=index let-event=event>
<div class="icon-container">
<img src="assets/image.png">
</div>
</ng-template>
<ng-template #innerEventCustomTemplate let-event=event>
<div class="event" (click)="handleClick(event)">
{{event | json}}
</div>
</ng-template>
<ng-template #eventDescriptionCustomTemplate let-event=event>
<p class="event-info-description">{{event?.eventInfo?.description}}</p>
</ng-template>
<ng-template #eventCustomTemplate let-event=event let-colSidePosition=colSidePosition>
<div class="event" (click)="handleClick(event)">
{{event | json}}
</div>
</ng-template>
<ng-template #dateInstantCustomTemplate let-item=item>
<span>
{{item | json}}
</span>
</ng-template>
First of all, in order to track everything, open an issue describing the problem or a missing functionality you would like to add to the lib.
To start the contribution:
npm run watch-lib
(you are building the lib with --watch options)npm run start-dev
(you are linking the lib and starting the demo app )Every time you will change the code in your lib, any update will trigger the re-load of the app. When your code will be ready, create a Pull Request and put the link in a comment under the issue you opened before. Now is time to enjoy and start to code.
Thanks in advance for your contribution
After testing the fix or the new feature with 100% test coverage:
FAQs
The main goal of this angular library is to give you the possibility to integrate a timeline in your app. Version 17.0.7 is compatible with angular 17. Go [here](https://emanuelefricano93.github.io/frxjs-Ngx-Timeline/) and discover all possible
The npm package @frxjs/ngx-timeline receives a total of 458 weekly downloads. As such, @frxjs/ngx-timeline popularity was classified as not popular.
We found that @frxjs/ngx-timeline 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.