@frxjs/ngx-timeline 1.0.7 → 1.0.12

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.
Files changed (89) hide show
  1. package/.editorconfig +16 -0
  2. package/.github/workflows/CI-main.yml +48 -0
  3. package/README.md +136 -136
  4. package/angular.json +178 -0
  5. package/docs/3rdpartylicenses.txt +268 -0
  6. package/docs/assets/inter.png +0 -0
  7. package/docs/favicon.ico +0 -0
  8. package/docs/index.html +13 -0
  9. package/docs/main.6005a10000c87d7095d3.js +1 -0
  10. package/docs/polyfills.f8ddde825b13760c1743.js +1 -0
  11. package/docs/runtime.0e49e2b53282f40c8925.js +1 -0
  12. package/docs/styles.09e2c710755c8867a460.css +0 -0
  13. package/package.json +51 -16
  14. package/projects/demo-app/.browserslistrc +17 -0
  15. package/projects/demo-app/e2e/protractor.conf.js +37 -0
  16. package/projects/demo-app/e2e/src/app.e2e-spec.ts +23 -0
  17. package/projects/demo-app/e2e/src/app.po.ts +11 -0
  18. package/projects/demo-app/e2e/tsconfig.json +13 -0
  19. package/projects/demo-app/karma.conf.js +44 -0
  20. package/projects/demo-app/src/app/app.component.html +90 -0
  21. package/projects/demo-app/src/app/app.component.scss +417 -0
  22. package/projects/demo-app/src/app/app.component.spec.ts +24 -0
  23. package/projects/demo-app/src/app/app.component.ts +147 -0
  24. package/projects/demo-app/src/app/app.module.ts +20 -0
  25. package/projects/demo-app/src/assets/.gitkeep +0 -0
  26. package/projects/demo-app/src/assets/inter.png +0 -0
  27. package/projects/demo-app/src/environments/environment.prod.ts +3 -0
  28. package/projects/demo-app/src/environments/environment.ts +16 -0
  29. package/projects/demo-app/src/favicon.ico +0 -0
  30. package/projects/demo-app/src/index.html +13 -0
  31. package/projects/demo-app/src/main.ts +12 -0
  32. package/projects/demo-app/src/polyfills.ts +63 -0
  33. package/projects/demo-app/src/styles.scss +1 -0
  34. package/projects/demo-app/src/test.ts +25 -0
  35. package/projects/demo-app/tsconfig.app.json +26 -0
  36. package/projects/demo-app/tsconfig.spec.json +18 -0
  37. package/projects/demo-app/tslint.json +17 -0
  38. package/projects/ngx-timeline/README.md +136 -0
  39. package/projects/ngx-timeline/karma.conf.js +44 -0
  40. package/projects/ngx-timeline/ng-package.json +7 -0
  41. package/projects/ngx-timeline/package.json +20 -0
  42. package/{lib/components/index.d.ts → projects/ngx-timeline/src/lib/components/index.ts} +2 -2
  43. package/projects/ngx-timeline/src/lib/components/ngx-timeline-event/ngx-timeline-event.component.html +37 -0
  44. package/projects/ngx-timeline/src/lib/components/ngx-timeline-event/ngx-timeline-event.component.scss +197 -0
  45. package/projects/ngx-timeline/src/lib/components/ngx-timeline-event/ngx-timeline-event.component.spec.ts +89 -0
  46. package/projects/ngx-timeline/src/lib/components/ngx-timeline-event/ngx-timeline-event.component.ts +66 -0
  47. package/projects/ngx-timeline/src/lib/components/ngx-timeline.component.html +98 -0
  48. package/projects/ngx-timeline/src/lib/components/ngx-timeline.component.spec.ts +160 -0
  49. package/projects/ngx-timeline/src/lib/components/ngx-timeline.component.ts +187 -0
  50. package/projects/ngx-timeline/src/lib/components/ngx-timeline.scss +226 -0
  51. package/projects/ngx-timeline/src/lib/models/NgxConfigObj.ts +110 -0
  52. package/projects/ngx-timeline/src/lib/models/NgxTimelineEvent.ts +32 -0
  53. package/{lib/models/index.d.ts → projects/ngx-timeline/src/lib/models/index.ts} +2 -2
  54. package/projects/ngx-timeline/src/lib/ngx-timeline.module.ts +21 -0
  55. package/{lib/pipes/index.d.ts → projects/ngx-timeline/src/lib/pipes/index.ts} +1 -1
  56. package/projects/ngx-timeline/src/lib/pipes/ngx-date-pipe.ts +29 -0
  57. package/{public-api.d.ts → projects/ngx-timeline/src/public-api.ts} +7 -4
  58. package/projects/ngx-timeline/src/test.ts +26 -0
  59. package/projects/ngx-timeline/tsconfig.lib.json +25 -0
  60. package/projects/ngx-timeline/tsconfig.lib.prod.json +10 -0
  61. package/projects/ngx-timeline/tsconfig.spec.json +17 -0
  62. package/projects/ngx-timeline/tslint.json +17 -0
  63. package/tsconfig.json +35 -0
  64. package/tslint.json +140 -0
  65. package/bundles/frxjs-ngx-timeline.umd.js +0 -696
  66. package/bundles/frxjs-ngx-timeline.umd.js.map +0 -1
  67. package/bundles/frxjs-ngx-timeline.umd.min.js +0 -2
  68. package/bundles/frxjs-ngx-timeline.umd.min.js.map +0 -1
  69. package/esm2015/frxjs-ngx-timeline.js +0 -8
  70. package/esm2015/lib/components/index.js +0 -3
  71. package/esm2015/lib/components/ngx-timeline-event/ngx-timeline-event.component.js +0 -55
  72. package/esm2015/lib/components/ngx-timeline.component.js +0 -147
  73. package/esm2015/lib/models/NgxConfigObj.js +0 -93
  74. package/esm2015/lib/models/NgxTimelineEvent.js +0 -6
  75. package/esm2015/lib/models/index.js +0 -3
  76. package/esm2015/lib/ngx-timeline.module.js +0 -23
  77. package/esm2015/lib/pipes/index.js +0 -2
  78. package/esm2015/lib/pipes/ngx-date-pipe.js +0 -28
  79. package/esm2015/public-api.js +0 -8
  80. package/fesm2015/frxjs-ngx-timeline.js +0 -350
  81. package/fesm2015/frxjs-ngx-timeline.js.map +0 -1
  82. package/frxjs-ngx-timeline.d.ts +0 -7
  83. package/frxjs-ngx-timeline.metadata.json +0 -1
  84. package/lib/components/ngx-timeline-event/ngx-timeline-event.component.d.ts +0 -35
  85. package/lib/components/ngx-timeline.component.d.ts +0 -76
  86. package/lib/models/NgxConfigObj.d.ts +0 -59
  87. package/lib/models/NgxTimelineEvent.d.ts +0 -29
  88. package/lib/ngx-timeline.module.d.ts +0 -2
  89. package/lib/pipes/ngx-date-pipe.d.ts +0 -7
@@ -0,0 +1,417 @@
1
+ :host {
2
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
3
+ font-size: 14px;
4
+ color: #333;
5
+ box-sizing: border-box;
6
+ -webkit-font-smoothing: antialiased;
7
+ -moz-osx-font-smoothing: grayscale;
8
+ }
9
+
10
+ h1,
11
+ h2,
12
+ h3,
13
+ h4,
14
+ h5,
15
+ h6 {
16
+ margin: 8px 0;
17
+ }
18
+
19
+ p {
20
+ margin: 0;
21
+ }
22
+
23
+ .spacer {
24
+ flex: 1;
25
+ }
26
+
27
+ .toolbar {
28
+ position: absolute;
29
+ top: 0;
30
+ left: 0;
31
+ right: 0;
32
+ height: 60px;
33
+ display: flex;
34
+ align-items: center;
35
+ background-color: #1976d2;
36
+ color: white;
37
+ font-weight: 600;
38
+ }
39
+
40
+ .toolbar img {
41
+ margin: 0 16px;
42
+ }
43
+
44
+ .toolbar #twitter-logo {
45
+ height: 40px;
46
+ margin: 0 16px;
47
+ }
48
+
49
+ .toolbar #twitter-logo:hover {
50
+ opacity: 0.8;
51
+ }
52
+
53
+ .content {
54
+ display: flex;
55
+ margin: 82px auto 32px;
56
+ padding: 0 16px;
57
+ flex-direction: column;
58
+ align-items: center;
59
+
60
+ .title {
61
+ margin-bottom: 2rem;
62
+ }
63
+ }
64
+
65
+ svg.material-icons {
66
+ height: 24px;
67
+ width: auto;
68
+ }
69
+
70
+ svg.material-icons:not(:last-child) {
71
+ margin-right: 8px;
72
+ }
73
+
74
+ .card svg.material-icons path {
75
+ fill: #888;
76
+ }
77
+
78
+ .card-container {
79
+ display: flex;
80
+ flex-wrap: wrap;
81
+ justify-content: center;
82
+ margin-top: 16px;
83
+ }
84
+
85
+ .card {
86
+ border-radius: 4px;
87
+ border: 1px solid #eee;
88
+ background-color: #fafafa;
89
+ height: 40px;
90
+ width: 200px;
91
+ margin: 0 8px 16px;
92
+ padding: 16px;
93
+ display: flex;
94
+ flex-direction: row;
95
+ justify-content: center;
96
+ align-items: center;
97
+ transition: all 0.2s ease-in-out;
98
+ line-height: 24px;
99
+ }
100
+
101
+ .card-container .card:not(:last-child) {
102
+ margin-right: 0;
103
+ }
104
+
105
+ .card.card-small {
106
+ height: 16px;
107
+ width: 168px;
108
+ }
109
+
110
+ .card-container .card:not(.highlight-card) {
111
+ cursor: pointer;
112
+ }
113
+
114
+ .card-container .card:not(.highlight-card):hover {
115
+ transform: translateY(-3px);
116
+ box-shadow: 0 4px 17px rgba(0, 0, 0, 0.35);
117
+ }
118
+
119
+ .card-container .card:not(.highlight-card):hover .material-icons path {
120
+ fill: rgb(105, 103, 103);
121
+ }
122
+
123
+ .card.highlight-card {
124
+ background-color: #1976d2;
125
+ color: white;
126
+ font-weight: 600;
127
+ border: none;
128
+ width: auto;
129
+ min-width: 30%;
130
+ position: relative;
131
+ }
132
+
133
+ .card.card.highlight-card span {
134
+ margin-left: 60px;
135
+ }
136
+
137
+ svg#rocket {
138
+ width: 80px;
139
+ position: absolute;
140
+ left: -10px;
141
+ top: -24px;
142
+ }
143
+
144
+ svg#rocket-smoke {
145
+ height: calc(100vh - 95px);
146
+ position: absolute;
147
+ top: 10px;
148
+ right: 180px;
149
+ z-index: -10;
150
+ }
151
+
152
+ a,
153
+ a:visited,
154
+ a:hover {
155
+ color: #1976d2;
156
+ text-decoration: none;
157
+ }
158
+
159
+ a:hover {
160
+ color: #125699;
161
+ }
162
+
163
+ .terminal {
164
+ position: relative;
165
+ width: 80%;
166
+ max-width: 600px;
167
+ border-radius: 6px;
168
+ padding-top: 45px;
169
+ margin-top: 8px;
170
+ overflow: hidden;
171
+ background-color: rgb(15, 15, 16);
172
+ }
173
+
174
+ .terminal::before {
175
+ content: "\2022 \2022 \2022";
176
+ position: absolute;
177
+ top: 0;
178
+ left: 0;
179
+ height: 4px;
180
+ background: rgb(58, 58, 58);
181
+ color: #c2c3c4;
182
+ width: 100%;
183
+ font-size: 2rem;
184
+ line-height: 0;
185
+ padding: 14px 0;
186
+ text-indent: 4px;
187
+ }
188
+
189
+ .terminal pre {
190
+ font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;
191
+ color: white;
192
+ padding: 0 1rem 1rem;
193
+ margin: 0;
194
+ }
195
+
196
+ .circle-link {
197
+ height: 40px;
198
+ width: 40px;
199
+ border-radius: 40px;
200
+ margin: 8px;
201
+ background-color: white;
202
+ border: 1px solid #eeeeee;
203
+ display: flex;
204
+ justify-content: center;
205
+ align-items: center;
206
+ cursor: pointer;
207
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
208
+ transition: 1s ease-out;
209
+ }
210
+
211
+ .circle-link:hover {
212
+ transform: translateY(-0.25rem);
213
+ box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.2);
214
+ }
215
+
216
+ footer {
217
+ margin-top: 8px;
218
+ display: flex;
219
+ align-items: center;
220
+ line-height: 20px;
221
+ }
222
+
223
+ footer a {
224
+ display: flex;
225
+ align-items: center;
226
+ }
227
+
228
+ .github-star-badge {
229
+ color: #24292e;
230
+ display: flex;
231
+ align-items: center;
232
+ font-size: 12px;
233
+ padding: 3px 10px;
234
+ border: 1px solid rgba(27,31,35,.2);
235
+ border-radius: 3px;
236
+ background-image: linear-gradient(-180deg,#fafbfc,#eff3f6 90%);
237
+ margin-left: 4px;
238
+ font-weight: 600;
239
+ font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;
240
+ }
241
+
242
+ .github-star-badge:hover {
243
+ background-image: linear-gradient(-180deg,#f0f3f6,#e6ebf1 90%);
244
+ border-color: rgba(27,31,35,.35);
245
+ background-position: -.5em;
246
+ }
247
+
248
+ .github-star-badge .material-icons {
249
+ height: 16px;
250
+ width: 16px;
251
+ margin-right: 4px;
252
+ }
253
+
254
+ svg#clouds {
255
+ position: fixed;
256
+ bottom: -160px;
257
+ left: -230px;
258
+ z-index: -10;
259
+ width: 1920px;
260
+ }
261
+
262
+ .form-container {
263
+ display: flex;
264
+ flex-direction: column;
265
+
266
+ .form-select {
267
+ display: flex;
268
+ justify-content: space-between;
269
+ margin-bottom: 0.5rem;
270
+
271
+ select {
272
+ min-width: 15.625rem;
273
+ padding: 0.5rem 0.25rem;
274
+ }
275
+ }
276
+ }
277
+
278
+ .line {
279
+ min-height: 50%;
280
+ max-height: 50%;
281
+ height: 50%;
282
+ background: #464646;
283
+ width: 0.1rem;
284
+
285
+ &.transparent {
286
+ background: transparent;
287
+ }
288
+ }
289
+
290
+ .period-container {
291
+ display: flex;
292
+ justify-content: center;
293
+ align-items: center;
294
+ width: max-content;
295
+ padding: 0.25rem;
296
+ color: lightgrey;
297
+ }
298
+
299
+ /* Responsive Styles */
300
+ @media screen and (max-width: 767px) {
301
+
302
+ .card-container > *:not(.circle-link) ,
303
+ .terminal {
304
+ width: 100%;
305
+ }
306
+
307
+ .card:not(.highlight-card) {
308
+ height: 16px;
309
+ margin: 8px 0;
310
+ }
311
+
312
+ .card.highlight-card span {
313
+ margin-left: 72px;
314
+ }
315
+
316
+ svg#rocket-smoke {
317
+ right: 120px;
318
+ transform: rotate(-5deg);
319
+ }
320
+ }
321
+
322
+ .inner-container {
323
+ display: flex;
324
+ width: 100%;
325
+ justify-content: space-evenly;
326
+ align-items: center;
327
+
328
+ form {
329
+ display: flex;
330
+ align-items: flex-start;
331
+ flex: 0 0 20%;
332
+ height: 100vh;
333
+
334
+ label {
335
+ font-weight: bold;
336
+ }
337
+ }
338
+
339
+ ngx-timeline {
340
+ max-width: 900px;
341
+ display: flex;
342
+ flex: 0 0 80%;
343
+ }
344
+
345
+ }
346
+
347
+ .event {
348
+ border: solid 1px red;
349
+ }
350
+
351
+ .icon-container {
352
+ padding: .8rem 0;
353
+ display: flex;
354
+ justify-content: center;
355
+ align-items: center;
356
+ position: absolute;
357
+ height: 10px;
358
+ width: 10px;
359
+ background: white;
360
+
361
+ .icon {
362
+ height: 1rem;
363
+ width: 1rem;
364
+ border-radius: 50%;
365
+ background: red;
366
+ margin: 0;
367
+ position: absolute;
368
+ }
369
+ img {
370
+ max-width: 1.25rem;
371
+ max-height: 1.25rem;
372
+ }
373
+ }
374
+
375
+ ::ng-deep ngx-timeline.inter {
376
+ .period-container {
377
+ background: blue !important;
378
+ .period-inner-container {
379
+ background: blue !important;
380
+ }
381
+ }
382
+ .line:not(.first-line):not(.last-line) {
383
+ background-color: lightgrey !important;
384
+ }
385
+ .center-icon-container .icon {
386
+ background: blue !important;
387
+ }
388
+ }
389
+
390
+ @media screen and (max-width: 1300px) {
391
+ svg#rocket-smoke {
392
+ display: none;
393
+ visibility: hidden;
394
+ }
395
+
396
+ .inner-container {
397
+ display: flex;
398
+ width: 100%;
399
+ flex-direction: column;
400
+ justify-content: space-evenly;
401
+ align-items: center;
402
+
403
+ form {
404
+ justify-content: space-between;
405
+ height: auto;
406
+
407
+ .form-container {
408
+ min-width: 60vw;
409
+ }
410
+ }
411
+
412
+ ngx-timeline {
413
+ min-width: 80vw;
414
+ }
415
+
416
+ }
417
+ }
@@ -0,0 +1,24 @@
1
+ import { TestBed } from '@angular/core/testing';
2
+ import { AppComponent } from './app.component';
3
+
4
+ describe('AppComponent', () => {
5
+ beforeEach(async () => {
6
+ await TestBed.configureTestingModule({
7
+ declarations: [
8
+ AppComponent
9
+ ],
10
+ }).compileComponents();
11
+ });
12
+
13
+ it('should create the app', () => {
14
+ const fixture = TestBed.createComponent(AppComponent);
15
+ const app = fixture.componentInstance;
16
+ expect(app).toBeTruthy();
17
+ });
18
+
19
+ it(`should have as title 'testing-app'`, () => {
20
+ const fixture = TestBed.createComponent(AppComponent);
21
+ const app = fixture.componentInstance;
22
+ expect(app.title).toEqual('demo-app');
23
+ });
24
+ });
@@ -0,0 +1,147 @@
1
+ import { Component } from '@angular/core';
2
+ import { NgxTimelineEvent, NgxTimelineEventGroup, NgxTimelineEventChangeSideInGroup, NgxDateFormat } from 'ngx-timeline';
3
+ import { BehaviorSubject } from 'rxjs';
4
+ import { FormGroup, FormControl } from '@angular/forms';
5
+
6
+ @Component({
7
+ selector: 'app-root',
8
+ templateUrl: './app.component.html',
9
+ styleUrls: ['./app.component.scss']
10
+ })
11
+ export class AppComponent {
12
+ title = 'demo-app';
13
+ events: NgxTimelineEvent[];
14
+ events$: BehaviorSubject<NgxTimelineEvent[]> = new BehaviorSubject(null);
15
+ color = 0;
16
+ backgroundColor = 'red';
17
+ form: FormGroup;
18
+ ngxDateFormat = NgxDateFormat;
19
+
20
+ configurations = [
21
+ {
22
+ label: 'Language code',
23
+ formControlName: 'langCode',
24
+ options: [
25
+ {name: 'English', value: 'en'},
26
+ {name: 'French', value: 'fr'},
27
+ {name: 'German', value: 'de'},
28
+ {name: 'Spanish', value: 'es'},
29
+ {name: 'Italian', value: 'it'}
30
+ ]
31
+ },
32
+ {
33
+ label: 'Enable animation',
34
+ formControlName: 'enableAnimation',
35
+ options: [
36
+ {name: 'Enable animation', value: true},
37
+ {name: 'Disable animation', value: false}
38
+ ]
39
+ },
40
+ {
41
+ label: 'Custom class',
42
+ formControlName: 'customClass',
43
+ options: [
44
+ {name: 'No Custom Class', value: false},
45
+ {name: 'Custom Class', value: true}
46
+ ]
47
+ },
48
+ {
49
+ label: 'Group events by',
50
+ formControlName: 'groupEvent',
51
+ options: [
52
+ {name: 'Month Year', value: NgxTimelineEventGroup.MONTH_YEAR},
53
+ {name: 'Day Month Year', value: NgxTimelineEventGroup.DAY_MONTH_YEAR},
54
+ {name: 'Year', value: NgxTimelineEventGroup.YEAR}
55
+ ]
56
+ },
57
+ {
58
+ label: 'Change event side in group',
59
+ formControlName: 'changeSideInGroup',
60
+ options: [
61
+ {name: 'On different day', value: NgxTimelineEventChangeSideInGroup.ON_DIFFERENT_DAY},
62
+ {name: 'All', value: NgxTimelineEventChangeSideInGroup.ALL},
63
+ {name: 'On different hours, minutes and seconds', value: NgxTimelineEventChangeSideInGroup.ON_DIFFERENT_HMS},
64
+ {name: 'On different month', value: NgxTimelineEventChangeSideInGroup.ON_DIFFERENT_MONTH}
65
+ ]
66
+ },
67
+ {
68
+ label: 'Date instant custom template',
69
+ formControlName: 'dateInstantCustomTemplate',
70
+ options: [
71
+ {name: 'No Custom template', value: false},
72
+ {name: 'Custom Date Instant Template', value: true}
73
+ ]
74
+ },
75
+ {
76
+ label: 'Event custom template',
77
+ formControlName: 'eventCustomTemplate',
78
+ options: [
79
+ {name: 'No Custom template', value: false},
80
+ {name: 'Custom Event Template', value: true}
81
+ ]
82
+ },
83
+ {
84
+ label: 'Inner event custom template',
85
+ formControlName: 'innerEventCustomTemplate',
86
+ options: [
87
+ {name: 'No Custom template', value: false},
88
+ {name: 'Custom Inner Event Template', value: true}
89
+ ]
90
+ },
91
+ {
92
+ label: 'Center icon custom template',
93
+ formControlName: 'centerIconCustomTemplate',
94
+ options: [
95
+ {name: 'No Custom Template', value: false},
96
+ {name: 'Custom Icon Template', value: true}
97
+ ]
98
+ },
99
+ {
100
+ label: 'Period custom template',
101
+ formControlName: 'periodCustomTemplate',
102
+ options: [
103
+ {name: 'No Custom Template', value: false},
104
+ {name: 'Custom Period Template', value: true}
105
+ ]
106
+ },
107
+ {
108
+ label: 'Click emitter',
109
+ formControlName: 'clickEmitter',
110
+ options: [
111
+ {name: 'No emitter', value: false},
112
+ {name: 'Handle click (open console)', value: true}
113
+ ]
114
+ }
115
+ ];
116
+ constructor() {
117
+ this.form = new FormGroup({});
118
+ this.configurations.forEach(configuration =>
119
+ this.form.addControl(configuration.formControlName, new FormControl(configuration.options[0].value)));
120
+ this.initEvents();
121
+ }
122
+
123
+ private initEvents(): void {
124
+ const today = new Date();
125
+ const tomorrow = new Date();
126
+ tomorrow.setDate(today.getDate() + 1);
127
+ const nextMonth = new Date();
128
+ nextMonth.setMonth(today.getMonth() + 1);
129
+ const nextYear = new Date();
130
+ nextYear.setFullYear(today.getFullYear() + 1);
131
+
132
+ this.events = [
133
+ { id: 5, description: 'This is the description of the event 5', timestamp: nextYear, title: 'title 5' },
134
+ { id: 0, description: 'This is the description of the event 0', timestamp: today, title: 'title 0' },
135
+ { id: 1, description: 'This is the description of the event 1', timestamp: tomorrow, title: 'title 1' },
136
+ { id: 2, description: 'This is the description of the event 2', timestamp: today, title: 'title 2' },
137
+ { id: 3, description: 'This is the description of the event 3', timestamp: tomorrow, title: 'title 3' },
138
+ { id: 4, description: 'This is the description of the event 4', timestamp: nextMonth, title: 'title 4' },
139
+ ];
140
+ }
141
+
142
+ handleClick(event: any): void {
143
+ if (event) {
144
+ window.console.log('', event);
145
+ }
146
+ }
147
+ }
@@ -0,0 +1,20 @@
1
+ import { BrowserModule } from '@angular/platform-browser';
2
+ import { NgModule } from '@angular/core';
3
+ import { ReactiveFormsModule } from '@angular/forms';
4
+
5
+ import { AppComponent } from './app.component';
6
+ import { NgxTimelineModule } from 'ngx-timeline';
7
+
8
+ @NgModule({
9
+ declarations: [
10
+ AppComponent
11
+ ],
12
+ imports: [
13
+ BrowserModule,
14
+ ReactiveFormsModule,
15
+ NgxTimelineModule
16
+ ],
17
+ providers: [],
18
+ bootstrap: [AppComponent]
19
+ })
20
+ export class AppModule { }
File without changes
@@ -0,0 +1,3 @@
1
+ export const environment = {
2
+ production: true
3
+ };
@@ -0,0 +1,16 @@
1
+ // This file can be replaced during build by using the `fileReplacements` array.
2
+ // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
3
+ // The list of file replacements can be found in `angular.json`.
4
+
5
+ export const environment = {
6
+ production: false
7
+ };
8
+
9
+ /*
10
+ * For easier debugging in development mode, you can import the following file
11
+ * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
12
+ *
13
+ * This import should be commented out in production mode because it will have a negative impact
14
+ * on performance if an error is thrown.
15
+ */
16
+ // import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>DemoApp</title>
6
+ <base href="/">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1">
8
+ <link rel="icon" type="image/x-icon" href="favicon.ico">
9
+ </head>
10
+ <body>
11
+ <app-root></app-root>
12
+ </body>
13
+ </html>
@@ -0,0 +1,12 @@
1
+ import { enableProdMode } from '@angular/core';
2
+ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3
+
4
+ import { AppModule } from './app/app.module';
5
+ import { environment } from './environments/environment';
6
+
7
+ if (environment.production) {
8
+ enableProdMode();
9
+ }
10
+
11
+ platformBrowserDynamic().bootstrapModule(AppModule)
12
+ .catch(err => console.error(err));