Skip to content

Commit 54d2ebe

Browse files
authored
Merge pull request #33 from formio/Update-to-Angular-12
FIO-2857: Upgrade to Angular 12
2 parents 0db3ed2 + e1ced0f commit 54d2ebe

18 files changed

+66
-74
lines changed

package.json

+38-41
Original file line numberDiff line numberDiff line change
@@ -13,50 +13,47 @@
1313
},
1414
"private": true,
1515
"dependencies": {
16-
"@angular/animations": "^7.2.14",
17-
"@angular/common": "^7.2.14",
18-
"@angular/compiler": "^7.2.14",
19-
"@angular/core": "^7.2.14",
20-
"@angular/elements": "^7.2.14",
21-
"@angular/forms": "^7.2.14",
22-
"@angular/http": "^7.2.15",
23-
"@angular/platform-browser": "^7.2.14",
24-
"@angular/platform-browser-dynamic": "^7.2.14",
25-
"@angular/router": "^7.2.14",
26-
"angular-formio": "^4.4.3",
27-
"bootstrap": "^4.4.1",
28-
"bootswatch": "^4.4.1",
29-
"core-js": "^2.6.0",
16+
"@angular/animations": "^12.0.0",
17+
"@angular/common": "^12.0.0",
18+
"@angular/compiler": "^12.0.0",
19+
"@angular/core": "^12.0.0",
20+
"@angular/elements": "^12.0.0",
21+
"@angular/forms": "^12.0.0",
22+
"@angular/platform-browser": "^12.0.0",
23+
"@angular/platform-browser-dynamic": "^12.0.0",
24+
"@angular/router": "^12.0.0",
25+
"@formio/angular": "^5.0.0",
26+
"bootstrap": "^4.5.3",
27+
"bootswatch": "^4.5.3",
28+
"core-js": "^3.8.1",
3029
"font-awesome": "^4.7.0",
31-
"formiojs": "^4.8.0-rc.12",
32-
"lodash": "^4.17.15",
33-
"node-sass": "^4.13.0",
34-
"rxjs": "^6.5.4",
35-
"zone.js": "^0.10.2"
36-
},
37-
"browser": {
38-
"vm": false
30+
"formiojs": "^4.12.4",
31+
"jquery": "^3.5.1",
32+
"ngx-bootstrap": "^6.2.0",
33+
"prism-themes": "^1.5.0",
34+
"prismjs": "^1.22.0",
35+
"rxjs": "^6.6.3",
36+
"zone.js": "~0.11.4"
3937
},
4038
"devDependencies": {
41-
"@angular-devkit/build-angular": "^0.803.21",
42-
"@angular/cli": "^7.3.9",
43-
"@angular/compiler-cli": "^7.2.14",
44-
"@angular/language-service": "^7.2.14",
45-
"@types/jasmine": "^3.5.0",
39+
"@angular-devkit/build-angular": "^12.0.0",
40+
"@angular/cli": "^12.0.0",
41+
"@angular/compiler-cli": "^12.0.0",
42+
"@angular/language-service": "^12.0.0",
43+
"@types/jasmine": "^3.6.2",
4644
"@types/jasminewd2": "^2.0.8",
47-
"@types/node": "^10.12.12",
48-
"codelyzer": "^4.5.0",
49-
"jasmine-core": "^3.5.0",
50-
"jasmine-spec-reporter": "^4.2.1",
51-
"karma": "^3.1.3",
52-
"karma-chrome-launcher": "^2.2.0",
53-
"karma-cli": "^2.0.0",
54-
"karma-coverage-istanbul-reporter": "^2.1.1",
55-
"karma-jasmine": "^2.0.1",
56-
"karma-jasmine-html-reporter": "^1.5.1",
57-
"protractor": "^5.4.2",
58-
"ts-node": "^7.0.1",
59-
"tslint": "^5.20.1",
60-
"typescript": "<3.2.0"
45+
"@types/node": "^14.14.14",
46+
"codelyzer": "^6.0.1",
47+
"jasmine-core": "^3.6.0",
48+
"jasmine-spec-reporter": "^6.0.0",
49+
"karma": "^6.3.2",
50+
"karma-chrome-launcher": "~3.1.0",
51+
"karma-coverage-istanbul-reporter": "~3.0.2",
52+
"karma-jasmine": "~4.0.0",
53+
"karma-jasmine-html-reporter": "^1.5.0",
54+
"protractor": "~7.0.0",
55+
"ts-node": "^9.1.1",
56+
"tslint": "^6.1.3",
57+
"typescript": "~4.2.4"
6158
}
6259
}

src/app/app.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component } from '@angular/core';
22
import { Router } from '@angular/router';
3-
import { FormioResources } from 'angular-formio/resource';
4-
import { FormioAuthService } from 'angular-formio/auth';
3+
import { FormioResources } from '@formio/angular/resource';
4+
import { FormioAuthService } from '@formio/angular/auth';
55

66
@Component({
77
selector: 'app-root',

src/app/app.module.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { BrowserModule } from '@angular/platform-browser';
22
import { NgModule } from '@angular/core';
33
import { RouterModule } from '@angular/router';
4-
import { FormioModule, FormioAppConfig } from 'angular-formio';
5-
import { FormManagerService, FormManagerConfig } from 'angular-formio/manager';
6-
import { FormioAuthService, FormioAuthConfig } from 'angular-formio/auth';
7-
import { FormioResources } from 'angular-formio/resource';
4+
import { FormioModule, FormioAppConfig } from '@formio/angular';
5+
import { FormManagerService, FormManagerConfig } from '@formio/angular/manager';
6+
import { FormioAuthService, FormioAuthConfig } from '@formio/angular/auth';
7+
import { FormioResources } from '@formio/angular/resource';
88
import { AuthConfig, AppConfig } from '../config';
99

1010
import { AppComponent } from './app.component';
@@ -36,19 +36,19 @@ import { HeroComponent } from './hero/hero.component';
3636
},
3737
{
3838
path: 'auth',
39-
loadChildren: './auth/auth.module#AuthModule'
39+
loadChildren: () => import('./auth/auth.module').then(m => m.AuthModule)
4040
},
4141
{
4242
path: 'form',
43-
loadChildren: './form/form.module#FormModule'
43+
loadChildren: () => import('./form/form.module').then(m => m.FormModule)
4444
},
4545
{
4646
path: 'event',
47-
loadChildren: './event/event.module#EventModule'
47+
loadChildren: () => import('./event/event.module').then(m => m.EventModule)
4848
},
4949
{
5050
path: 'employee',
51-
loadChildren: './employee/employee.module#EmployeeModule'
51+
loadChildren: () => import('./employee/employee.module').then(m => m.EmployeeModule)
5252
}
5353
], {useHash: true})
5454
],

src/app/auth/auth.module.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { NgModule } from '@angular/core';
22
import { RouterModule } from '@angular/router';
33
import { CommonModule } from '@angular/common';
44
import { LoginComponent } from './login/login.component';
5-
import { FormioModule } from 'angular-formio';
6-
import { FormioAuth, FormioAuthRoutes } from 'angular-formio/auth';
5+
import { FormioModule } from '@formio/angular';
6+
import { FormioAuth, FormioAuthRoutes } from '@formio/angular/auth';
77

88
export const authRoutes = FormioAuthRoutes({
99
login: LoginComponent

src/app/auth/login/login.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component } from '@angular/core';
2-
import { FormioAuthLoginComponent } from 'angular-formio/auth';
2+
import { FormioAuthLoginComponent } from '@formio/angular/auth';
33
@Component({
44
templateUrl: './login.component.html'
55
})

src/app/employee/employee.module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
FormioResourceConfig,
77
FormioResourceRoutes,
88
FormioResourceService
9-
} from 'angular-formio/resource';
9+
} from '@formio/angular/resource';
1010

1111
@NgModule({
1212
imports: [

src/app/event/event-resource/event-resource.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, OnInit } from '@angular/core';
2-
import { FormioResourceComponent } from 'angular-formio/resource';
2+
import { FormioResourceComponent } from '@formio/angular/resource';
33

44
@Component({
55
selector: 'app-event-resource',

src/app/event/event-view/event-view.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component } from '@angular/core';
2-
import { FormioResourceViewComponent } from 'angular-formio/resource';
2+
import { FormioResourceViewComponent } from '@formio/angular/resource';
33

44
@Component({
55
selector: 'app-event-view',

src/app/event/event.module.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { RouterModule } from '@angular/router';
4-
import { FormioModule } from 'angular-formio';
4+
import { FormioModule } from '@formio/angular';
55
import {
66
FormioResource,
77
FormioResourceConfig,
@@ -10,7 +10,7 @@ import {
1010
FormioResourceCreateComponent,
1111
FormioResourceEditComponent,
1212
FormioResourceDeleteComponent
13-
} from 'angular-formio/resource';
13+
} from '@formio/angular/resource';
1414
import { EventViewComponent } from './event-view/event-view.component';
1515
import { EventResourceComponent } from './event-resource/event-resource.component';
1616

src/app/event/participant/participant.module.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { RouterModule } from '@angular/router';
4-
import { FormioModule } from 'angular-formio';
4+
import { FormioModule } from '@formio/angular';
55
import {
66
FormioResource,
77
FormioResourceRoutes,
88
FormioResourceConfig,
99
FormioResourceService
10-
} from 'angular-formio/resource';
10+
} from '@formio/angular/resource';
1111

1212
@NgModule({
1313
imports: [

src/app/form/form.module.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { RouterModule } from '@angular/router';
4-
import { FormioGrid } from 'angular-formio/grid';
5-
import { FormManagerModule, FormManagerRoutes, FormManagerService, FormManagerConfig } from 'angular-formio/manager';
4+
import { FormioGrid } from '@formio/angular/grid';
5+
import { FormManagerModule, FormManagerRoutes, FormManagerService, FormManagerConfig } from '@formio/angular/manager';
66

77
@NgModule({
88
imports: [

src/app/header/header.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, OnInit } from '@angular/core';
2-
import { FormioAuthService } from 'angular-formio/auth';
2+
import { FormioAuthService } from '@formio/angular/auth';
33

44
@Component({
55
selector: 'app-header',

src/app/hero/hero.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h2 class="title">Welcome to your &lt;<span class="text-blue">form</span>.<span
1212
<pre><code>&lt;formio src="https://examples.form.io/example"&gt;&lt;/formio&gt;</code></pre>
1313
</div>
1414
<p class="lead">Need Help?</p>
15-
<a class="btn btn-lg btn-success" target="_blank" href="https://github.com/formio/angular-formio">Embedding</a>
15+
<a class="btn btn-lg btn-success" target="_blank" href="https://github.com/formio/angular">Embedding</a>
1616
<a class="btn btn-lg btn-success" target="_blank" href="http://help.form.io">Documentation</a>
1717
</div>
1818
</div>

src/app/home/home.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, OnInit } from '@angular/core';
2-
import { FormioAuthService } from 'angular-formio/auth';
2+
import { FormioAuthService } from '@formio/angular/auth';
33

44
@Component({
55
selector: 'app-home',

src/config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { FormioAppConfig } from 'angular-formio';
2-
import { FormioAuthConfig } from 'angular-formio/auth';
1+
import { FormioAppConfig } from '@formio/angular';
2+
import { FormioAuthConfig } from '@formio/angular/auth';
33

44
export const AppConfig: FormioAppConfig = {
55
appUrl: 'https://example.form.io',

src/styles.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ $dark: $gray-800;
3434
@import "~bootswatch/dist/cosmo/_variables.scss";
3535
@import "~bootstrap/scss/bootstrap.scss";
3636
@import "~bootswatch/dist/cosmo/_bootswatch.scss";
37-
$fa-font-path: '../node_modules/font-awesome/fonts';
37+
$fa-font-path: '~font-awesome/fonts';
3838
@import '~font-awesome/scss/font-awesome';
3939

4040
.logo {

src/tsconfig.app.json

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
"extends": "../tsconfig.json",
33
"compilerOptions": {
44
"outDir": "../out-tsc/app",
5-
"baseUrl": "./",
6-
"module": "es2015",
75
"types": ["node"]
86
},
97
"exclude": [

src/tsconfig.spec.json

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
"extends": "../tsconfig.json",
33
"compilerOptions": {
44
"outDir": "../out-tsc/spec",
5-
"baseUrl": "./",
6-
"module": "commonjs",
7-
"target": "es5",
85
"types": [
96
"jasmine",
107
"node"

0 commit comments

Comments
 (0)