Skip to content

Commit 5885e9a

Browse files
committed
feat(lib): update to angular 7
1 parent 54ac829 commit 5885e9a

37 files changed

+23756
-480
lines changed

.angular-cli.json

-66
This file was deleted.

.gitignore

+36-20
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,46 @@
1-
!.vscode/extensions.json
2-
!.vscode/launch.json
3-
!.vscode/settings.json
4-
!.vscode/tasks.json
5-
*.launch
6-
*.metadata.json
7-
*.sublime-workspace
8-
.c9/
9-
.classpath
10-
.DS_Store
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/documentation
6+
/tmp
7+
/out-tsc
8+
9+
# dependencies
10+
/node_modules
11+
12+
# IDEs and editors
13+
/.idea
1114
.project
15+
.classpath
16+
.c9/
17+
*.launch
1218
.settings/
19+
*.sublime-workspace
20+
21+
# IDE - VSCode
1322
.vscode/*
14-
/.idea
23+
!.vscode/settings.json
24+
!.vscode/tasks.json
25+
!.vscode/launch.json
26+
!.vscode/extensions.json
27+
28+
# misc
1529
/.sass-cache
1630
/connect.lock
1731
/coverage
18-
/dist
19-
/documentation
20-
/e2e/*.js
21-
/e2e/*.map
2232
/libpeerconnection.log
23-
/node_modules
24-
/out-tsc
25-
/tmp
26-
/typings
27-
dist.tgz
2833
npm-debug.log
34+
yarn-error.log
2935
testem.log
36+
/typings
37+
38+
# System Files
39+
.DS_Store
3040
Thumbs.db
41+
42+
/e2e/*.js
43+
!/e2e/protractor.conf.js
44+
/e2e/*.map
45+
46+
*.metadata.json

README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Angular 5+ bootstrap date & time picker
1+
# Angular 7+ bootstrap date & time picker
22

33
Native Angular (5+) datetime picker component styled by Twitter Bootstrap 4.
44

@@ -30,8 +30,8 @@ I know this is a tiny component but many people use it in production (high 5 to
3030
## Peer Dependencies
3131

3232
Peer dependencies:
33-
* AngularJS 5.x or higher (1.x will not work)
34-
* moment.js 2.8.3 or higher for date parsing and formatting
33+
* Angular 7.x or higher (1.x will not work)
34+
* moment.js 2.22.2 or higher for date parsing and formatting
3535
* bootstrap 4.x for css/layout
3636
* open-iconic for the default icon's (you can use any icon libary you like)
3737

@@ -54,7 +54,7 @@ import { AppComponent } from './app.component';
5454
import { BrowserModule } from '@angular/platform-browser';
5555
import { FormsModule } from '@angular/forms';
5656
import { NgModule } from '@angular/core';
57-
import { DlDateTimePickerDateModule } from 'angular-bootstrap-datetimepicker';
57+
import { DlDateTimeDateModule, DlDateTimePickerModule } from 'angular-bootstrap-datetimepicker';
5858

5959
@NgModule({
6060
declarations: [
@@ -63,7 +63,8 @@ import { DlDateTimePickerDateModule } from 'angular-bootstrap-datetimepicker';
6363
imports: [
6464
BrowserModule,
6565
FormsModule,
66-
DlDateTimePickerDateModule,
66+
DlDateTimeDateModule, // <--- Determines the data type of the model
67+
DlDateTimePickerModule,
6768
],
6869
providers: [FormsModule],
6970
bootstrap: [AppComponent]

angular.json

+139
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"angular-bootstrap-datetimepicker": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "application",
10+
"prefix": "app",
11+
"schematics": {
12+
"@schematics/angular:component": {
13+
"styleext": "scss"
14+
}
15+
},
16+
"architect": {
17+
"build": {
18+
"builder": "@angular-devkit/build-angular:browser",
19+
"options": {
20+
"outputPath": "dist/angular-bootstrap-datetimepicker",
21+
"index": "src/index.html",
22+
"main": "src/main.ts",
23+
"polyfills": "src/polyfills.ts",
24+
"tsConfig": "src/tsconfig.app.json",
25+
"assets": [
26+
"src/favicon.ico",
27+
"src/assets"
28+
],
29+
"styles": [
30+
"src/styles.scss"
31+
],
32+
"scripts": []
33+
},
34+
"configurations": {
35+
"production": {
36+
"fileReplacements": [
37+
{
38+
"replace": "src/environments/environment.ts",
39+
"with": "src/environments/environment.prod.ts"
40+
}
41+
],
42+
"optimization": true,
43+
"outputHashing": "all",
44+
"sourceMap": false,
45+
"extractCss": true,
46+
"namedChunks": false,
47+
"aot": true,
48+
"extractLicenses": true,
49+
"vendorChunk": false,
50+
"buildOptimizer": true,
51+
"budgets": [
52+
{
53+
"type": "initial",
54+
"maximumWarning": "2mb",
55+
"maximumError": "5mb"
56+
}
57+
]
58+
}
59+
}
60+
},
61+
"serve": {
62+
"builder": "@angular-devkit/build-angular:dev-server",
63+
"options": {
64+
"browserTarget": "angular-bootstrap-datetimepicker:build"
65+
},
66+
"configurations": {
67+
"production": {
68+
"browserTarget": "angular-bootstrap-datetimepicker:build:production"
69+
}
70+
}
71+
},
72+
"extract-i18n": {
73+
"builder": "@angular-devkit/build-angular:extract-i18n",
74+
"options": {
75+
"browserTarget": "angular-bootstrap-datetimepicker:build"
76+
}
77+
},
78+
"test": {
79+
"builder": "@angular-devkit/build-angular:karma",
80+
"options": {
81+
"main": "src/test.ts",
82+
"polyfills": "src/polyfills.ts",
83+
"tsConfig": "src/tsconfig.spec.json",
84+
"karmaConfig": "src/karma.conf.js",
85+
"styles": [
86+
"src/styles.scss"
87+
],
88+
"scripts": [],
89+
"assets": [
90+
"src/favicon.ico",
91+
"src/assets"
92+
]
93+
}
94+
},
95+
"lint": {
96+
"builder": "@angular-devkit/build-angular:tslint",
97+
"options": {
98+
"tsConfig": [
99+
"src/tsconfig.app.json",
100+
"src/tsconfig.spec.json"
101+
],
102+
"exclude": [
103+
"**/node_modules/**"
104+
]
105+
}
106+
}
107+
}
108+
},
109+
"angular-bootstrap-datetimepicker-e2e": {
110+
"root": "e2e/",
111+
"projectType": "application",
112+
"prefix": "",
113+
"architect": {
114+
"e2e": {
115+
"builder": "@angular-devkit/build-angular:protractor",
116+
"options": {
117+
"protractorConfig": "e2e/protractor.conf.js",
118+
"devServerTarget": "angular-bootstrap-datetimepicker:serve"
119+
},
120+
"configurations": {
121+
"production": {
122+
"devServerTarget": "angular-bootstrap-datetimepicker:serve:production"
123+
}
124+
}
125+
},
126+
"lint": {
127+
"builder": "@angular-devkit/build-angular:tslint",
128+
"options": {
129+
"tsConfig": "e2e/tsconfig.e2e.json",
130+
"exclude": [
131+
"**/node_modules/**"
132+
]
133+
}
134+
}
135+
}
136+
}
137+
},
138+
"defaultProject": "angular-bootstrap-datetimepicker"
139+
}

e2e/app.e2e-spec.ts

-17
This file was deleted.

e2e/app.po.ts

-17
This file was deleted.

e2e/dl-date-time-picker.po.ts

-17
This file was deleted.

e2e/lib/dl-date-time-picker/en/dl-date-time-picker.component.e2e-spec.ts

-7
This file was deleted.

0 commit comments

Comments
 (0)