@frxjs/ngx-timeline 18.0.7 → 19.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -31
- package/fesm2022/frxjs-ngx-timeline.mjs +221 -200
- package/fesm2022/frxjs-ngx-timeline.mjs.map +1 -1
- package/lib/components/ngx-timeline-event/ngx-timeline-event.component.d.ts +22 -20
- package/lib/components/ngx-timeline.component.d.ts +52 -40
- package/lib/models/NgxConfigObj.d.ts +8 -29
- package/lib/models/NgxTimelineEvent.d.ts +5 -6
- package/lib/ngx-timeline.module.d.ts +2 -3
- package/lib/pipes/ngx-date-pipe.d.ts +2 -3
- package/package.json +8 -9
- package/esm2022/frxjs-ngx-timeline.mjs +0 -5
- package/esm2022/lib/components/index.mjs +0 -3
- package/esm2022/lib/components/ngx-timeline-event/ngx-timeline-event.component.mjs +0 -74
- package/esm2022/lib/components/ngx-timeline.component.mjs +0 -202
- package/esm2022/lib/models/NgxConfigObj.mjs +0 -143
- package/esm2022/lib/models/NgxTimelineEvent.mjs +0 -6
- package/esm2022/lib/models/index.mjs +0 -3
- package/esm2022/lib/ngx-timeline.module.mjs +0 -37
- package/esm2022/lib/pipes/index.mjs +0 -2
- package/esm2022/lib/pipes/ngx-date-pipe.mjs +0 -34
- package/esm2022/public-api.mjs +0 -8
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The main goal of this angular library is to give you the possibility to integrate a timeline in your app.
|
|
4
4
|
<br>
|
|
5
|
-
Version
|
|
5
|
+
Version 19.0.1 is compatible with angular 18.
|
|
6
6
|
<br>
|
|
7
7
|
Go [here](https://emanuelefricano93.github.io/frxjs-Ngx-Timeline/) and discover all possible configurations for the timeline
|
|
8
8
|
|
|
@@ -18,9 +18,6 @@ Running the following command to install the library
|
|
|
18
18
|
```
|
|
19
19
|
npm install @frxjs/ngx-timeline
|
|
20
20
|
```
|
|
21
|
-
<br><br>
|
|
22
|
-
|
|
23
|
-
|
|
24
21
|
|
|
25
22
|
## Examples of Usage
|
|
26
23
|
|
|
@@ -31,38 +28,41 @@ After installing the library and including NgxTimelineModule in your imports mod
|
|
|
31
28
|
<ngx-timeline [events]="events" [langCode]="'it'"></ngx-timeline>
|
|
32
29
|
<ngx-timeline [events]="events" [langCode]="'it'" [enableAnimation]="false"></ngx-timeline>
|
|
33
30
|
```
|
|
34
|
-
<br><br>
|
|
35
31
|
|
|
36
32
|
## Configuration
|
|
37
33
|
|
|
38
34
|
### Input
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<
|
|
35
|
+
|
|
36
|
+
| Input name | Explanation | Mandatory | Type/Supported Values | Default value |
|
|
37
|
+
|--------------------------------|-------------------------------------------------------------|-----------|---------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------|
|
|
38
|
+
| events | list of events to be displayed | yes | NgxTimelineEvent | no default |
|
|
39
|
+
| langCode | language code use to format dates | no | <ul><li>'en'</li><li>'it'</li><li>'fr'</li><li>'de'</li><li>'es'</li><li>'sl'</li><li>'tr'</li><li>'pl'</li><li>'pt'</li><li>'ru'</li></ul> | 'en' |
|
|
40
|
+
| enableAnimation | Boolean used to enable or disable the animations | no | boolean | true |
|
|
41
|
+
| reverseOrder | Boolean used to reverse sort order (default older first) | no | boolean | false |
|
|
42
|
+
| virtualScroll | Boolean used to enable or disable the virtual scroll | no | boolean | false |
|
|
43
|
+
| virtualScrollItemSize | Number of pixels of a single item used for virtual scroll | no | number | 100 |
|
|
44
|
+
| virtualScrollMaxBufferPx | Number of max pixels the buffer for the virtual scroll has | no | number | 200 |
|
|
45
|
+
| virtualScrollMinBufferPx | Minimum ammount of the buffer rendered beyond the viewport | no | number | 100 |
|
|
46
|
+
| groupEvent | Logic to be applied in order to group events | no | enum NgxTimelineEventGroup | NgxTimelineEventGroup.MONTH_YEAR |
|
|
47
|
+
| orientation | Orientation of the timeline | no | enum NgxTimelineOrientation | NgxTimelineOrientation.VERTICAL |
|
|
48
|
+
| changeSide | Logic to be applied in order to put events on LEFT or RIGHT | no | enum NgxTimelineEventChangeSide | NgxTimelineEventChangeSide.ON_DIFFERENT_DAY_IN_GROUP |
|
|
49
|
+
| periodCustomTemplate | Custom Template displayed before a group of events | no | `TemplateRef<unknown>` | no default |
|
|
50
|
+
| eventCustomTemplate | Custom Template displayed to show a single event | no | `TemplateRef<unknown>` | no default |
|
|
51
|
+
| centerIconCustomTemplate | Custom Template displayed to show an separator icon | no | `TemplateRef<unknown>` | no default |
|
|
52
|
+
| dateInstantCustomTemplate | Custom Template displayed to show the side date | no | `TemplateRef<unknown>` | no default |
|
|
53
|
+
| innerEventCustomTemplate | Custom Template displayed to show the inner event | no | `TemplateRef<unknown>` | no default |
|
|
54
|
+
| eventDescriptionCustomTemplate | Custom Template displayed to show the description | no | `TemplateRef<unknown>` | no default |
|
|
55
55
|
|
|
56
56
|
### Output
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
<
|
|
57
|
+
|
|
58
|
+
| Output name | Explanation | Mandatory | Type/Supported Values | Default value |
|
|
59
|
+
|--------------|----------------------------|-----------|-------------------------------------|---------------|
|
|
60
|
+
| clickEmitter | Output click event emitter | no | `OutputEmitterRef<NgxTimelineItem>` | no default |
|
|
61
61
|
|
|
62
62
|
### Types and Enums
|
|
63
63
|
```typescript
|
|
64
64
|
interface NgxTimelineEvent {
|
|
65
|
-
timestamp
|
|
65
|
+
timestamp: Date;
|
|
66
66
|
title?: string;
|
|
67
67
|
description?: string;
|
|
68
68
|
id?: any;
|
|
@@ -91,11 +91,10 @@ enum NgxTimelineEventChangeSide {
|
|
|
91
91
|
ON_DIFFERENT_MONTH_IN_GROUP = 'ON_DIFFERENT_MONTH_IN_GROUP'
|
|
92
92
|
}
|
|
93
93
|
```
|
|
94
|
-
<br>
|
|
95
94
|
|
|
96
95
|
### Custom Theme supported
|
|
97
96
|
|
|
98
|
-
This is an example of custom-theme that can be applied for
|
|
97
|
+
This is an example of custom-theme that can be applied for instance via an ng-class directive to the container of the library. In this way you are redefine some variables that are defined and used inside the library and it is easier to override some properties
|
|
99
98
|
```scss
|
|
100
99
|
.custom-theme {
|
|
101
100
|
--ngx-timeline-icon: black;
|
|
@@ -110,7 +109,7 @@ This is an example of custom-theme that can be applied for istance via an ng-cla
|
|
|
110
109
|
<div [ngClass]="{'transparent first-line': !index}" class="line"></div>
|
|
111
110
|
<div class="period-container">
|
|
112
111
|
<p>
|
|
113
|
-
{{index}} - {{period | json
|
|
112
|
+
{{index}} - {{period | json}}
|
|
114
113
|
</p>
|
|
115
114
|
</div>
|
|
116
115
|
<div class="line"></div>
|
|
@@ -148,9 +147,9 @@ This is an example of custom-theme that can be applied for istance via an ng-cla
|
|
|
148
147
|
{{item | json}}
|
|
149
148
|
</span>
|
|
150
149
|
</ng-template>
|
|
151
|
-
```
|
|
150
|
+
```
|
|
152
151
|
<br><br>
|
|
153
|
-
|
|
152
|
+
|
|
154
153
|
## How to contribute
|
|
155
154
|
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.
|
|
156
155
|
|