Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

Upgrade angular #177

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 36 additions & 6 deletions angular.json
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/rvm",
"index": "src/index.html",
"main": "src/main.ts",
@@ -24,14 +25,19 @@
"src/manifest.json"
],
"styles": [
"node_modules/custom-select-dropdown/dist/assets/style.css",
"src/styles.scss",
"src/assets/scss/style.scss"
],
"scripts": []
},
"configurations": {
"local": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"sourceMap": true,
"fileReplacements": [
{
@@ -41,6 +47,12 @@
]
},
"development": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"sourceMap": true,
"aot": true,
"fileReplacements": [
@@ -51,6 +63,12 @@
]
},
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"sourceMap": true,
"aot": true,
"fileReplacements": [
@@ -61,6 +79,12 @@
]
},
"stage": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"sourceMap": true,
"aot": true,
"fileReplacements": [
@@ -106,7 +130,9 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": ["src/styles.scss"],
"styles": [
"src/styles.scss"
],
"scripts": [],
"assets": [
"src/favicon.ico",
@@ -122,7 +148,9 @@
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
"exclude": [
"**/node_modules/**"
]
}
}
}
@@ -147,7 +175,9 @@
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": ["**/node_modules/**"]
"exclude": [
"**/node_modules/**"
]
}
}
}
@@ -157,10 +187,10 @@
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"styleext": "scss"
"style": "scss"
},
"@schematics/angular:directive": {
"prefix": "app"
}
}
}
}
23,589 changes: 15,500 additions & 8,089 deletions package-lock.json

Large diffs are not rendered by default.

167 changes: 85 additions & 82 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,84 +1,87 @@
{
"name": "rvm-client",
"version": "1.0.0",
"description": "client side integration of RVM",
"scripts": {
"ng": "ng",
"start": "ng serve --configuration=local --o",
"start:dev": "ng serve --configuration=development",
"start:prod": "ng serve --configuration=production",
"build:local": "ng build --configuration=local && cp .htaccess dist/rvm/.htaccess",
"build:dev": "ng build --prod --configuration=development && cp .htaccess dist/rvm/.htaccess",
"build:prod": "ng build --prod && cp .htaccess dist/rvm/.htaccess",
"build:stage": "ng build --prod --configuration=stage && cp .htaccess dist/rvm/.htaccess",
"pwa:build:local": "ng build --configuration=local && sw-precache --root=dist --config=precache-config.js",
"pwa:build:dev": "ng build --prod --configuration=development && sw-precache --root=dist --config=precache-config.js",
"pwa:build:prod": "ng build --prod && sw-precache --root=dist --config=precache-config.js",
"test": "ng test",
"e2e": "ng e2e",
"generate": "ng generate",
"compodoc:gen": "./node_modules/.bin/compodoc -p src/tsconfig.app.json",
"compodoc:serve": "./node_modules/.bin/compodoc -s -p src/tsconfig.app.json -w",
"compodoc": "npm run compodoc:gen && npm run compodoc:serve",
"precommit": "lint-staged",
"lint": "tslint --fix --config tslint.json --project tsconfig.json",
"format:fix": "pretty-quick --staged"
},
"lint-staged": {
"src/**/*.ts": [
"npm run format:fix",
"npm run lint"
]
},
"private": true,
"dependencies": {
"@angular/animations": "^8.2.4",
"@angular/cdk": "~8.0.2",
"@angular/common": "^8.2.4",
"@angular/compiler": "^8.2.4",
"@angular/core": "^8.2.4",
"@angular/forms": "^8.2.4",
"@angular/http": "^7.2.15",
"@angular/material": "^8.1.4",
"@angular/platform-browser": "^8.2.4",
"@angular/platform-browser-dynamic": "^8.2.4",
"@angular/router": "^8.2.4",
"@angular/service-worker": "^8.2.4",
"@ngtools/webpack": "^8.3.2",
"@ngx-lib/multiselect": "^1.0.3",
"@ng-bootstrap/ng-bootstrap": "5.0.0",
"bootstrap": "^4.3.1",
"core-js": "^3.2.1",
"custom-select-dropdown": "^1.0.11",
"font-awesome": "^4.7.0",
"moment": "^2.24.0",
"rxjs": "^6.5.3",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.800.6",
"@angular/cli": "^8.3.2",
"@angular/compiler-cli": "^8.2.4",
"@angular/language-service": "^8.2.4",
"@compodoc/compodoc": "^1.1.10",
"@types/jasmine": "^3.4.0",
"@types/jasminewd2": "~2.0.6",
"@types/node": "^12.7.4",
"codelyzer": "~5.1.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^4.3.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^2.1.0",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"lint-staged": "^8.2.1",
"prettier": "^1.18.2",
"pretty-quick": "^1.11.1",
"protractor": "^5.4.2",
"sw-precache-webpack-plugin": "^0.11.5",
"ts-node": "~8.2.0",
"tslint": "~5.17.0",
"typescript": "3.4.4"
}
"name": "rvm-client",
"version": "1.0.0",
"description": "client side integration of RVM",
"scripts": {
"ng": "ng",
"start": "ng serve --configuration=local --o",
"start:dev": "ng serve --configuration=development",
"start:prod": "ng serve --configuration=production",
"build:local": "ng build --configuration=local && cp .htaccess dist/rvm/.htaccess",
"build:dev": "ng build --prod --configuration=development && cp .htaccess dist/rvm/.htaccess",
"build:prod": "ng build --prod && cp .htaccess dist/rvm/.htaccess",
"build:stage": "ng build --prod --configuration=stage && cp .htaccess dist/rvm/.htaccess",
"pwa:build:local": "ng build --configuration=local && sw-precache --root=dist --config=precache-config.js",
"pwa:build:dev": "ng build --prod --configuration=development && sw-precache --root=dist --config=precache-config.js",
"pwa:build:prod": "ng build --prod && sw-precache --root=dist --config=precache-config.js",
"test": "ng test",
"e2e": "ng e2e",
"generate": "ng generate",
"compodoc:gen": "./node_modules/.bin/compodoc -p src/tsconfig.app.json",
"compodoc:serve": "./node_modules/.bin/compodoc -s -p src/tsconfig.app.json -w",
"compodoc": "npm run compodoc:gen && npm run compodoc:serve",
"precommit": "lint-staged",
"lint": "tslint --fix --config tslint.json --project tsconfig.json",
"format:fix": "pretty-quick --staged"
},
"lint-staged": {
"src/**/*.ts": [
"npm run format:fix",
"npm run lint"
]
},
"private": true,
"dependencies": {
"@angular/animations": "^9.1.13",
"@angular/cdk": "~9.2.4",
"@angular/common": "^9.1.13",
"@angular/compiler": "^9.1.13",
"@angular/core": "^9.1.13",
"@angular/forms": "^9.1.13",
"@angular/localize": "^9.0.0",
"@angular/material": "^9.2.4",
"@angular/platform-browser": "^9.1.13",
"@angular/platform-browser-dynamic": "^9.1.13",
"@angular/router": "^9.1.13",
"@angular/service-worker": "^9.1.13",
"@babel/core": "^7.13.0",
"@ng-bootstrap/ng-bootstrap": "^6.2.0",
"@ngtools/webpack": "^9.1.15",
"@ngx-lib/multiselect": "^1.0.7",
"bootstrap": "^4.3.1",
"core-js": "^3.2.1",
"custom-select-dropdown": "^1.0.24",
"font-awesome": "^4.7.0",
"moment": "^2.24.0",
"rxjs": "^6.6.7",
"tslib": "^1.14.1",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.901.15",
"@angular/cli": "^9.1.15",
"@angular/compiler-cli": "^9.1.13",
"@angular/language-service": "^9.1.13",
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.16.7",
"@compodoc/compodoc": "^1.1.19",
"@types/jasmine": "^3.4.0",
"@types/jasminewd2": "~2.0.6",
"@types/node": "^12.11.1",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^4.3.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^2.1.0",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"lint-staged": "^8.2.1",
"prettier": "^1.18.2",
"pretty-quick": "^1.11.1",
"protractor": "^5.4.2",
"sw-precache-webpack-plugin": "^0.11.5",
"ts-node": "~8.2.0",
"tslint": "~5.17.0",
"typescript": "3.8.3"
}
}
14 changes: 7 additions & 7 deletions src/app/app.routing.ts
Original file line number Diff line number Diff line change
@@ -12,45 +12,45 @@ const AppRoutes: Routes = [
children: [
{
path: 'volunteers',
loadChildren: './pages/volunteers/volunteers.module#VolunteersModule',
loadChildren: () => import('./pages/volunteers/volunteers.module').then(m => m.VolunteersModule),
canActivate: [RoleGuard],
data: {roles: ['DSU', 'NGO', 'INS']}
},
{
path: 'resources',
loadChildren: './pages/resources/resources.module#ResourcesModule',
loadChildren: () => import('./pages/resources/resources.module').then(m => m.ResourcesModule),
canActivate: [RoleGuard],
data: {roles: ['DSU', 'NGO']}
},
{
path: 'organisations',
loadChildren: './pages/organisations/organisations.module#OrganisationsModule',
loadChildren: () => import('./pages/organisations/organisations.module').then(m => m.OrganisationsModule),
canActivate: [RoleGuard],
data: {roles: ['DSU', 'NGO']}
},
{
path: 'map',
loadChildren: './pages/map/map.module#MapModule',
loadChildren: () => import('./pages/map/map.module').then(m => m.MapModule),
canActivate: [RoleGuard],
data: {roles: ['DSU']}
},
{
path: 'info',
loadChildren: './pages/info/info.module#InfoModule',
loadChildren: () => import('./pages/info/info.module').then(m => m.InfoModule),
canActivate: [RoleGuard],
data: {roles: ['DSU', 'NGO', 'INS']}
},
{
path: 'users',
loadChildren: './pages/users/users.module#UsersModule',
loadChildren: () => import('./pages/users/users.module').then(m => m.UsersModule),
canActivate: [RoleGuard],
data: {roles: ['DSU', 'NGO', 'INS']}
}
]
},
{
path: '',
loadChildren: './pages/authentication/authentication.module#AuthenticationModule'
loadChildren: () => import('./pages/authentication/authentication.module').then(m => m.AuthenticationModule)
},
{
path: '404',
2 changes: 1 addition & 1 deletion src/app/core/authentication/authentication.service.ts
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable} from 'rxjs';
import { map } from 'rxjs/operators';

import { Authentication } from '@core/model/authentication.model';
import { LocalStorageService } from '@app/core/local-storage.service';

/**
2 changes: 1 addition & 1 deletion src/app/core/model/authentication.model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare namespace Authentication {
export namespace Authentication {
/**
* Login payload model to be sent to server
*/
2 changes: 1 addition & 1 deletion src/app/core/model/error.model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare namespace ErrorModel {
export namespace ErrorModel {
/**
* Error object model for consistency
*/
2 changes: 2 additions & 0 deletions src/app/core/service/error-message.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { EventEmitter, Injectable } from '@angular/core';
import { ErrorModel } from '@core/model/error.model';

@Injectable()
/**
* Error service to show http error message in console
1 change: 1 addition & 0 deletions src/app/pages/authentication/signup/signup.component.ts
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ import { AuthenticationService } from '@app/core';
import { finalize } from 'rxjs/operators';
import { EmailValidation } from '@app/core/validators/email-validation';
import { PhoneValidation } from '@app/core/validators/phone-validation';
import { Authentication } from '@core/model/authentication.model';

@Component({
selector: 'app-signup',
4 changes: 4 additions & 0 deletions src/polyfills.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/***************************************************************************************************
* Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
*/
import '@angular/localize/init';
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
11 changes: 6 additions & 5 deletions src/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -4,10 +4,11 @@
"outDir": "../out-tsc/app",
"types": []
},
"exclude": [
"test.ts",
"environments/*",
"assets/**/*",
"**/*.spec.ts"
"files": [
"main.ts",
"polyfills.ts"
],
"include": [
"src/**/*.d.ts"
]
}
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compileOnSave": false,
"compilerOptions": {
"module": "esnext",
"outDir": "./dist/out-tsc",
"noImplicitAny": true,
"sourceMap": true,