@frxjs/ngx-timeline 1.0.12 → 1.1.0

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 (87) hide show
  1. package/README.md +1 -1
  2. package/bundles/frxjs-ngx-timeline.umd.js +701 -0
  3. package/bundles/frxjs-ngx-timeline.umd.js.map +1 -0
  4. package/esm2015/frxjs-ngx-timeline.js +8 -0
  5. package/esm2015/lib/components/index.js +3 -0
  6. package/esm2015/lib/components/ngx-timeline-event/ngx-timeline-event.component.js +55 -0
  7. package/esm2015/lib/components/ngx-timeline.component.js +146 -0
  8. package/esm2015/lib/models/NgxConfigObj.js +93 -0
  9. package/esm2015/lib/models/NgxTimelineEvent.js +6 -0
  10. package/esm2015/lib/models/index.js +3 -0
  11. package/esm2015/lib/ngx-timeline.module.js +23 -0
  12. package/esm2015/lib/pipes/index.js +2 -0
  13. package/esm2015/lib/pipes/ngx-date-pipe.js +28 -0
  14. package/esm2015/public-api.js +8 -0
  15. package/fesm2015/frxjs-ngx-timeline.js +349 -0
  16. package/fesm2015/frxjs-ngx-timeline.js.map +1 -0
  17. package/frxjs-ngx-timeline.d.ts +7 -0
  18. package/frxjs-ngx-timeline.metadata.json +1 -0
  19. package/{projects/ngx-timeline/src/lib/components/index.ts → lib/components/index.d.ts} +0 -0
  20. package/lib/components/ngx-timeline-event/ngx-timeline-event.component.d.ts +35 -0
  21. package/lib/components/ngx-timeline.component.d.ts +76 -0
  22. package/lib/models/NgxConfigObj.d.ts +59 -0
  23. package/lib/models/NgxTimelineEvent.d.ts +29 -0
  24. package/{projects/ngx-timeline/src/lib/models/index.ts → lib/models/index.d.ts} +0 -0
  25. package/lib/ngx-timeline.module.d.ts +2 -0
  26. package/{projects/ngx-timeline/src/lib/pipes/index.ts → lib/pipes/index.d.ts} +0 -0
  27. package/lib/pipes/ngx-date-pipe.d.ts +7 -0
  28. package/package.json +16 -51
  29. package/{projects/ngx-timeline/src/public-api.ts → public-api.d.ts} +0 -3
  30. package/.editorconfig +0 -16
  31. package/.github/workflows/CI-main.yml +0 -48
  32. package/angular.json +0 -178
  33. package/docs/3rdpartylicenses.txt +0 -268
  34. package/docs/assets/inter.png +0 -0
  35. package/docs/favicon.ico +0 -0
  36. package/docs/index.html +0 -13
  37. package/docs/main.6005a10000c87d7095d3.js +0 -1
  38. package/docs/polyfills.f8ddde825b13760c1743.js +0 -1
  39. package/docs/runtime.0e49e2b53282f40c8925.js +0 -1
  40. package/docs/styles.09e2c710755c8867a460.css +0 -0
  41. package/projects/demo-app/.browserslistrc +0 -17
  42. package/projects/demo-app/e2e/protractor.conf.js +0 -37
  43. package/projects/demo-app/e2e/src/app.e2e-spec.ts +0 -23
  44. package/projects/demo-app/e2e/src/app.po.ts +0 -11
  45. package/projects/demo-app/e2e/tsconfig.json +0 -13
  46. package/projects/demo-app/karma.conf.js +0 -44
  47. package/projects/demo-app/src/app/app.component.html +0 -90
  48. package/projects/demo-app/src/app/app.component.scss +0 -417
  49. package/projects/demo-app/src/app/app.component.spec.ts +0 -24
  50. package/projects/demo-app/src/app/app.component.ts +0 -147
  51. package/projects/demo-app/src/app/app.module.ts +0 -20
  52. package/projects/demo-app/src/assets/.gitkeep +0 -0
  53. package/projects/demo-app/src/assets/inter.png +0 -0
  54. package/projects/demo-app/src/environments/environment.prod.ts +0 -3
  55. package/projects/demo-app/src/environments/environment.ts +0 -16
  56. package/projects/demo-app/src/favicon.ico +0 -0
  57. package/projects/demo-app/src/index.html +0 -13
  58. package/projects/demo-app/src/main.ts +0 -12
  59. package/projects/demo-app/src/polyfills.ts +0 -63
  60. package/projects/demo-app/src/styles.scss +0 -1
  61. package/projects/demo-app/src/test.ts +0 -25
  62. package/projects/demo-app/tsconfig.app.json +0 -26
  63. package/projects/demo-app/tsconfig.spec.json +0 -18
  64. package/projects/demo-app/tslint.json +0 -17
  65. package/projects/ngx-timeline/README.md +0 -136
  66. package/projects/ngx-timeline/karma.conf.js +0 -44
  67. package/projects/ngx-timeline/ng-package.json +0 -7
  68. package/projects/ngx-timeline/package.json +0 -20
  69. package/projects/ngx-timeline/src/lib/components/ngx-timeline-event/ngx-timeline-event.component.html +0 -37
  70. package/projects/ngx-timeline/src/lib/components/ngx-timeline-event/ngx-timeline-event.component.scss +0 -197
  71. package/projects/ngx-timeline/src/lib/components/ngx-timeline-event/ngx-timeline-event.component.spec.ts +0 -89
  72. package/projects/ngx-timeline/src/lib/components/ngx-timeline-event/ngx-timeline-event.component.ts +0 -66
  73. package/projects/ngx-timeline/src/lib/components/ngx-timeline.component.html +0 -98
  74. package/projects/ngx-timeline/src/lib/components/ngx-timeline.component.spec.ts +0 -160
  75. package/projects/ngx-timeline/src/lib/components/ngx-timeline.component.ts +0 -187
  76. package/projects/ngx-timeline/src/lib/components/ngx-timeline.scss +0 -226
  77. package/projects/ngx-timeline/src/lib/models/NgxConfigObj.ts +0 -110
  78. package/projects/ngx-timeline/src/lib/models/NgxTimelineEvent.ts +0 -32
  79. package/projects/ngx-timeline/src/lib/ngx-timeline.module.ts +0 -21
  80. package/projects/ngx-timeline/src/lib/pipes/ngx-date-pipe.ts +0 -29
  81. package/projects/ngx-timeline/src/test.ts +0 -26
  82. package/projects/ngx-timeline/tsconfig.lib.json +0 -25
  83. package/projects/ngx-timeline/tsconfig.lib.prod.json +0 -10
  84. package/projects/ngx-timeline/tsconfig.spec.json +0 -17
  85. package/projects/ngx-timeline/tslint.json +0 -17
  86. package/tsconfig.json +0 -35
  87. package/tslint.json +0 -140
@@ -0,0 +1,59 @@
1
+ export declare let supportedLanguageCodes: string[];
2
+ export interface NgxConfigDate {
3
+ code: string;
4
+ dayMonthYear: string;
5
+ fullDate: string;
6
+ hoursMinutes: string;
7
+ monthYear: string;
8
+ year: string;
9
+ }
10
+ export interface NgxDateObjMap {
11
+ [key: string]: NgxConfigDate;
12
+ }
13
+ export declare let dateConfigMap: NgxDateObjMap;
14
+ export declare enum NgxDateFormat {
15
+ DAY_MONTH_YEAR = "DAY_MONTH_YEAR",
16
+ FULL_DATE = "FULL_DATE",
17
+ MONTH_YEAR = "MONTH_YEAR",
18
+ HOURS_MINUTES = "HOURS_MINUTES",
19
+ YEAR = "YEAR"
20
+ }
21
+ export declare let fieldConfigDate: {
22
+ MONTH_YEAR: string;
23
+ YEAR: string;
24
+ HOURS_MINUTES: string;
25
+ FULL_DATE: string;
26
+ DAY_MONTH_YEAR: string;
27
+ };
28
+ /**
29
+ * Enum used to set the group event logic
30
+ */
31
+ export declare enum NgxTimelineEventGroup {
32
+ YEAR = "YEAR",
33
+ MONTH_YEAR = "MONTH_YEAR",
34
+ DAY_MONTH_YEAR = "DAY_MONTH_YEAR"
35
+ }
36
+ export declare let fieldsToAddEventGroup: {
37
+ YEAR: string[];
38
+ MONTH_YEAR: string[];
39
+ DAY_MONTH_YEAR: string[];
40
+ };
41
+ export declare let periodKeyDateFormat: {
42
+ YEAR: NgxDateFormat;
43
+ MONTH_YEAR: NgxDateFormat;
44
+ DAY_MONTH_YEAR: NgxDateFormat;
45
+ };
46
+ /**
47
+ * Enum used to set the change side event logic
48
+ */
49
+ export declare enum NgxTimelineEventChangeSideInGroup {
50
+ ALL = "ALL",
51
+ ON_DIFFERENT_HMS = "ON_DIFFERENT_HMS",
52
+ ON_DIFFERENT_DAY = "ON_DIFFERENT_DAY",
53
+ ON_DIFFERENT_MONTH = "ON_DIFFERENT_MONTH"
54
+ }
55
+ export declare let fieldsToCheckEventChangeSideInGroup: {
56
+ ON_DIFFERENT_MONTH: string[];
57
+ ON_DIFFERENT_DAY: string[];
58
+ ON_DIFFERENT_HMS: string[];
59
+ };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Event to be provided from outside the timeline
3
+ */
4
+ export interface NgxTimelineEvent {
5
+ timestamp?: Date;
6
+ title?: string;
7
+ description?: string;
8
+ id?: any;
9
+ }
10
+ export interface NgxTimelinePeriodInfo {
11
+ periodKey?: string;
12
+ year?: number;
13
+ month?: number;
14
+ day?: number;
15
+ firstDate?: any;
16
+ }
17
+ /**
18
+ * Item used inside the timeline
19
+ */
20
+ export interface NgxTimelineItem {
21
+ type?: string;
22
+ position?: NgxTimelineItemPosition.ON_LEFT | NgxTimelineItemPosition.ON_RIGHT;
23
+ periodInfo?: NgxTimelinePeriodInfo;
24
+ eventInfo?: NgxTimelineEvent;
25
+ }
26
+ export declare enum NgxTimelineItemPosition {
27
+ ON_LEFT = "ON_LEFT",
28
+ ON_RIGHT = "ON_RIGHT"
29
+ }
@@ -0,0 +1,2 @@
1
+ export declare class NgxTimelineModule {
2
+ }
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ export declare class NgxDatePipe implements PipeTransform {
3
+ constructor();
4
+ transform(date: Date | string, dateFormat?: string, langCode?: string): string;
5
+ private dateFormat;
6
+ private getDateConfig;
7
+ }
package/package.json CHANGED
@@ -1,66 +1,31 @@
1
1
  {
2
2
  "name": "@frxjs/ngx-timeline",
3
- "version": "1.0.12",
3
+ "version": "1.1.0",
4
4
  "keywords": [
5
5
  "angular",
6
6
  "timeline"
7
7
  ],
8
- "repository": {
9
- "url": "https://github.com/emanuelefricano93/frxjs-Ngx-Timeline"
10
- },
11
8
  "author": {
12
9
  "name": "Emanuele Fricano",
13
10
  "email": "emanuelefricano93@gmail.com"
14
11
  },
12
+ "repository": {
13
+ "url": "https://github.com/emanuelefricano93/frxjs-Ngx-Timeline"
14
+ },
15
15
  "license": "MIT",
16
- "scripts": {
17
- "ng": "ng",
18
- "start": "ng serve",
19
- "build": "ng build",
20
- "build:prod": "ng build --configuration production",
21
- "watch-lib": "ng build --watch",
22
- "start-dev": "npm run link && npm run link-lib && npm run start",
23
- "test": "ng test",
24
- "lint": "ng lint",
25
- "lint:fix": "ng lint --fix",
26
- "e2e": "ng e2e",
27
- "link": "cd dist/ngx-timeline && npm link",
28
- "link-lib": "npm link @frxjs/ngx-timeline",
29
- "prepare-github-pages": "ng build demo-app --configuration production --baseHref=https://emanuelefricano93.github.io/frxjs-Ngx-Timeline/",
30
- "publish": "ng build --configuration production && cd dist/ngx-timeline && npm publish --access public"
16
+ "peerDependencies": {
17
+ "@angular/common": "~12.2.16",
18
+ "@angular/core": "~12.2.16"
31
19
  },
32
- "private": false,
33
20
  "dependencies": {
34
- "@angular/animations": "~12.2.16",
35
- "@angular/common": "~12.2.16",
36
- "@angular/compiler": "~12.2.16",
37
- "@angular/core": "~12.2.16",
38
- "@angular/forms": "~12.2.16",
39
- "@angular/platform-browser": "~12.2.16",
40
- "@angular/platform-browser-dynamic": "~12.2.16",
41
- "@angular/router": "~12.2.16",
42
- "rxjs": "~6.6.0",
43
- "tslib": "^2.0.0",
44
- "zone.js": "~0.11.4"
21
+ "tslib": "^2.0.0"
45
22
  },
46
- "devDependencies": {
47
- "@angular-devkit/build-angular": "~12.2.16",
48
- "@angular/cli": "~12.2.16",
49
- "@angular/compiler-cli": "~12.2.16",
50
- "@types/jasmine": "~3.8.0",
51
- "@types/node": "^12.11.1",
52
- "codelyzer": "^6.0.0",
53
- "jasmine-core": "~3.8.0",
54
- "jasmine-spec-reporter": "~5.0.0",
55
- "karma": "~6.3.13",
56
- "karma-chrome-launcher": "~3.1.0",
57
- "karma-coverage": "~2.0.3",
58
- "karma-jasmine": "~4.0.0",
59
- "karma-jasmine-html-reporter": "^1.5.0",
60
- "ng-packagr": "^12.2.7",
61
- "protractor": "~7.0.0",
62
- "ts-node": "~8.3.0",
63
- "tslint": "~6.1.0",
64
- "typescript": "~4.3.5"
65
- }
23
+ "main": "bundles/frxjs-ngx-timeline.umd.js",
24
+ "module": "fesm2015/frxjs-ngx-timeline.js",
25
+ "es2015": "fesm2015/frxjs-ngx-timeline.js",
26
+ "esm2015": "esm2015/frxjs-ngx-timeline.js",
27
+ "fesm2015": "fesm2015/frxjs-ngx-timeline.js",
28
+ "typings": "frxjs-ngx-timeline.d.ts",
29
+ "metadata": "frxjs-ngx-timeline.metadata.json",
30
+ "sideEffects": false
66
31
  }
@@ -1,6 +1,3 @@
1
- /*
2
- * Public API Surface of ngx-timeline
3
- */
4
1
  export * from './lib/components';
5
2
  export * from './lib/models';
6
3
  export * from './lib/pipes/';
package/.editorconfig DELETED
@@ -1,16 +0,0 @@
1
- # Editor configuration, see https://editorconfig.org
2
- root = true
3
-
4
- [*]
5
- charset = utf-8
6
- indent_style = space
7
- indent_size = 2
8
- insert_final_newline = true
9
- trim_trailing_whitespace = true
10
-
11
- [*.ts]
12
- quote_type = single
13
-
14
- [*.md]
15
- max_line_length = off
16
- trim_trailing_whitespace = false
@@ -1,48 +0,0 @@
1
- name: CI
2
-
3
- # Controls when the workflow will run
4
- on:
5
- # Triggers the workflow on push or pull request events but only for the master branch
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- branches: [ master ]
10
-
11
- # Allows you to run this workflow manually from the Actions tab
12
- workflow_dispatch:
13
-
14
- # A workflow run is made up of one or more jobs that can run sequentially or in parallel
15
- jobs:
16
- build:
17
- # The type of runner that the job will run on
18
- runs-on: ubuntu-latest
19
-
20
- # Steps represent a sequence of tasks that will be executed as part of the job
21
- steps:
22
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
23
- - uses: actions/checkout@v2
24
-
25
- # Runs a single command using the runners shell
26
- - name: Run npm install
27
- run: npm install
28
-
29
- - name: Run build prod
30
- run: npm run build:prod
31
-
32
- - name: Run test
33
- run: node --max_old_space_size=4096 node_modules/@angular/cli/bin/ng test
34
-
35
- #if the version will be updated in package.json to 1.2.3 with the commit message Release 1.2.3 this job action will perform a new tag before publishing
36
- # npm-publish:
37
- # name: npm-publish
38
- # needs: build
39
- # runs-on: ubuntu-latest
40
- # steps:
41
- # - uses: actions/checkout@v1
42
- # - uses: actions/setup-node@v1
43
- # with:
44
- # node-version: 12
45
- # registry-url: https://registry.npmjs.org/
46
- # - run: npm run publish
47
- # env:
48
- # NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
package/angular.json DELETED
@@ -1,178 +0,0 @@
1
- {
2
- "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
- "version": 1,
4
- "newProjectRoot": "projects",
5
- "projects": {
6
- "ngx-timeline": {
7
- "projectType": "library",
8
- "root": "projects/ngx-timeline",
9
- "sourceRoot": "projects/ngx-timeline/src",
10
- "prefix": "lib",
11
- "architect": {
12
- "build": {
13
- "builder": "@angular-devkit/build-angular:ng-packagr",
14
- "options": {
15
- "tsConfig": "projects/ngx-timeline/tsconfig.lib.json",
16
- "project": "projects/ngx-timeline/ng-package.json"
17
- },
18
- "configurations": {
19
- "production": {
20
- "tsConfig": "projects/ngx-timeline/tsconfig.lib.prod.json"
21
- }
22
- }
23
- },
24
- "test": {
25
- "builder": "@angular-devkit/build-angular:karma",
26
- "options": {
27
- "main": "projects/ngx-timeline/src/test.ts",
28
- "tsConfig": "projects/ngx-timeline/tsconfig.spec.json",
29
- "codeCoverage": true,
30
- "karmaConfig": "projects/ngx-timeline/karma.conf.js"
31
- }
32
- },
33
- "lint": {
34
- "builder": "@angular-devkit/build-angular:tslint",
35
- "options": {
36
- "tsConfig": [
37
- "projects/ngx-timeline/tsconfig.lib.json",
38
- "projects/ngx-timeline/tsconfig.spec.json"
39
- ],
40
- "exclude": [
41
- "**/node_modules/**"
42
- ]
43
- }
44
- }
45
- }
46
- },
47
- "demo-app": {
48
- "projectType": "application",
49
- "schematics": {
50
- "@schematics/angular:component": {
51
- "style": "scss"
52
- }
53
- },
54
- "root": "projects/demo-app",
55
- "sourceRoot": "projects/demo-app/src",
56
- "prefix": "app",
57
- "architect": {
58
- "build": {
59
- "builder": "@angular-devkit/build-angular:browser",
60
- "options": {
61
- "outputPath": "docs",
62
- "index": "projects/demo-app/src/index.html",
63
- "main": "projects/demo-app/src/main.ts",
64
- "polyfills": "projects/demo-app/src/polyfills.ts",
65
- "tsConfig": "projects/demo-app/tsconfig.app.json",
66
- "assets": [
67
- "projects/demo-app/src/favicon.ico",
68
- "projects/demo-app/src/assets"
69
- ],
70
- "styles": [
71
- "projects/demo-app/src/styles.scss"
72
- ],
73
- "scripts": [],
74
- "vendorChunk": true,
75
- "extractLicenses": false,
76
- "buildOptimizer": false,
77
- "sourceMap": true,
78
- "optimization": false,
79
- "namedChunks": true
80
- },
81
- "configurations": {
82
- "production": {
83
- "fileReplacements": [
84
- {
85
- "replace": "projects/demo-app/src/environments/environment.ts",
86
- "with": "projects/demo-app/src/environments/environment.prod.ts"
87
- }
88
- ],
89
- "optimization": true,
90
- "outputHashing": "all",
91
- "sourceMap": false,
92
- "namedChunks": false,
93
- "extractLicenses": true,
94
- "vendorChunk": false,
95
- "buildOptimizer": true,
96
- "budgets": [
97
- {
98
- "type": "initial",
99
- "maximumWarning": "2mb",
100
- "maximumError": "5mb"
101
- },
102
- {
103
- "type": "anyComponentStyle",
104
- "maximumWarning": "6kb",
105
- "maximumError": "10kb"
106
- }
107
- ]
108
- }
109
- },
110
- "defaultConfiguration": ""
111
- },
112
- "serve": {
113
- "builder": "@angular-devkit/build-angular:dev-server",
114
- "options": {
115
- "browserTarget": "demo-app:build"
116
- },
117
- "configurations": {
118
- "production": {
119
- "browserTarget": "demo-app:build:production"
120
- }
121
- }
122
- },
123
- "extract-i18n": {
124
- "builder": "@angular-devkit/build-angular:extract-i18n",
125
- "options": {
126
- "browserTarget": "demo-app:build"
127
- }
128
- },
129
- "test": {
130
- "builder": "@angular-devkit/build-angular:karma",
131
- "options": {
132
- "main": "projects/demo-app/src/test.ts",
133
- "polyfills": "projects/demo-app/src/polyfills.ts",
134
- "tsConfig": "projects/demo-app/tsconfig.spec.json",
135
- "karmaConfig": "projects/demo-app/karma.conf.js",
136
- "assets": [
137
- "projects/demo-app/src/favicon.ico",
138
- "projects/demo-app/src/assets"
139
- ],
140
- "styles": [
141
- "projects/demo-app/src/styles.scss"
142
- ],
143
- "scripts": []
144
- }
145
- },
146
- "lint": {
147
- "builder": "@angular-devkit/build-angular:tslint",
148
- "options": {
149
- "tsConfig": [
150
- "projects/demo-app/tsconfig.app.json",
151
- "projects/demo-app/tsconfig.spec.json",
152
- "projects/demo-app/e2e/tsconfig.json"
153
- ],
154
- "exclude": [
155
- "**/node_modules/**"
156
- ]
157
- }
158
- },
159
- "e2e": {
160
- "builder": "@angular-devkit/build-angular:protractor",
161
- "options": {
162
- "protractorConfig": "projects/demo-app/e2e/protractor.conf.js",
163
- "devServerTarget": "demo-app:serve"
164
- },
165
- "configurations": {
166
- "production": {
167
- "devServerTarget": "demo-app:serve:production"
168
- }
169
- }
170
- }
171
- }
172
- }
173
- },
174
- "defaultProject": "ngx-timeline",
175
- "cli": {
176
- "analytics": false
177
- }
178
- }