Upgrade to Angular 12

This commit is contained in:
Jose Alberto Hernandez
2022-06-30 18:32:26 -05:00
parent 16d29e2ec5
commit 0e71c2464e
17 changed files with 7699 additions and 8453 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ jobs:
# lts/gallium node v16.15.1 (npm v8.11.0)
node-version: '16.15.1'
- name: Angular CLI install
run : npm install -g --silent @angular/cli@11.2.14
run : npm install -g --silent @angular/cli@12.2.17
- name: Npm install
run: npm install
+2 -2
View File
@@ -1,4 +1,4 @@
FROM node:12-alpine as builder
FROM node:16-alpine as builder
WORKDIR /usr/src/app
@@ -6,7 +6,7 @@ ENV PATH /usr/src/app/node_modules/.bin:$PATH
COPY package.json /usr/src/app/package.json
RUN npm install -g @angular/cli@9.1.12
RUN npm install -g @angular/cli@12.2.17
RUN npm install
+7613 -8369
View File
File diff suppressed because it is too large Load Diff
+23 -22
View File
@@ -26,22 +26,23 @@
"postinstall": "ngcc"
},
"dependencies": {
"@angular/animations": "11.2.14",
"@angular/cdk": "11.2.13",
"@angular/common": "11.2.14",
"@angular/compiler": "11.2.14",
"@angular/core": "11.2.14",
"@angular/flex-layout": "11.0.0-beta.33",
"@angular/forms": "11.2.14",
"@angular/localize": "11.2.14",
"@angular/material": "11.2.13",
"@angular/platform-browser": "11.2.14",
"@angular/platform-browser-dynamic": "11.2.14",
"@angular/router": "11.2.14",
"@angular/service-worker": "11.2.14",
"@angular-devkit/schematics": "^14.0.4",
"@angular/animations": "^12.2.16",
"@angular/cdk": "12.2.13",
"@angular/common": "12.2.16",
"@angular/compiler": "12.2.16",
"@angular/core": "12.2.16",
"@angular/flex-layout": "12.0.0-beta.35",
"@angular/forms": "12.2.16",
"@angular/localize": "12.2.16",
"@angular/material": "12.2.13",
"@angular/platform-browser": "12.2.16",
"@angular/platform-browser-dynamic": "12.2.16",
"@angular/router": "12.2.16",
"@angular/service-worker": "12.2.16",
"@ckeditor/ckeditor5-angular": "1.2.3",
"@ckeditor/ckeditor5-build-classic": "21.0.0",
"@fortawesome/angular-fontawesome": "^0.8.2",
"@fortawesome/angular-fontawesome": "^0.9.0",
"@fortawesome/fontawesome-svg-core": "^1.2.32",
"@fortawesome/free-solid-svg-icons": "5.8.2",
"@ngx-translate/core": "13.0.0",
@@ -54,13 +55,13 @@
"moment": "^2.29.3",
"rxjs": "6.6.2",
"tslib": "^2.0.0",
"zone.js": "0.10.3"
"zone.js": "0.11.6"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.1102.19",
"@angular/cli": "11.2.19",
"@angular/compiler-cli": "11.2.14",
"@angular/language-service": "11.2.14",
"@angular-devkit/build-angular": "12.2.17",
"@angular/cli": "12.2.17",
"@angular/compiler-cli": "12.2.16",
"@angular/language-service": "12.2.16",
"@biesbjerg/ngx-translate-extract": "^7.0.4",
"@ngx-rocket/scripts": "3.0.3",
"@types/jasmine": "3.3.13",
@@ -86,7 +87,7 @@
"stylelint-scss": "3.6.1",
"ts-node": "8.2.0",
"tslint": "~6.1.0",
"typescript": "4.0.8"
"typescript": "4.3.5"
},
"repository": {
"type": "git",
@@ -97,6 +98,6 @@
},
"engines": {
"node": ">= 16.15.1",
"npm": ">= 9.11.0"
"npm": ">= 8.11.0"
}
}
}
@@ -1,4 +1,4 @@
@import "~@angular/material/theming";
@use '~@angular/material' as mat;
@mixin centers-view-component-theme($theme) {
$primary: map-get($theme, primary);
@@ -6,7 +6,7 @@
mifosx-centers-view {
.center-card {
.header {
background-color: mat-color($primary, 500);
background-color: mat.get-color-from-palette($primary, 500);
}
}
}
@@ -1,4 +1,4 @@
@import "~@angular/material/theming";
@use '~@angular/material' as mat;
@mixin clients-view-component-theme($theme) {
$primary: map-get($theme, primary);
@@ -6,7 +6,7 @@
mifosx-clients-view {
.client-card {
.header {
background-color: mat-color($primary, 500);
background-color: mat.get-color-from-palette($primary, 500);
}
}
}
@@ -1,15 +1,15 @@
@import "~@angular/material/theming";
@use '~@angular/material' as mat;
@mixin fixed-deposits-account-view-component-theme($theme) {
$primary: map-get($theme, primary);
mifosx-fixed-deposit-account-view {
.fixed-deposits-account-card {
.header {
background-color: mat-color($primary, 500);
background-color: mat.get-color-from-palette($primary, 500);
}
.table-headers {
background-color: mat-color($primary, 500);
color: mat-contrast($primary, 500);
background-color: mat.get-color-from-palette($primary, 500);
color: mat.get-contrast-color-from-palette($primary, 500);
}
}
}
@@ -1,15 +1,15 @@
@import "~@angular/material/theming";
@use '~@angular/material' as mat;
@mixin recurring-deposits-account-view-component-theme($theme) {
$primary: map-get($theme, primary);
mifosx-recurring-deposits-account-view {
.recurringDeposits-account-card {
.header {
background-color: mat-color($primary, 500);
background-color: mat.get-color-from-palette($primary, 500);
}
.table-headers {
background-color: mat-color($primary, 500);
color: mat-contrast($primary, 500);
background-color: mat.get-color-from-palette($primary, 500);
color: mat.get-contrast-color-from-palette($primary, 500);
}
}
}
@@ -1,11 +1,11 @@
@import "~@angular/material/theming";
@use '~@angular/material' as mat;
@mixin groups-view-component-theme($theme) {
$primary: map-get($theme, primary);
mifosx-groups-view {
.group-card {
.header {
background-color: mat-color($primary, 500);
background-color: mat.get-color-from-palette($primary, 500);
}
}
}
@@ -1,4 +1,4 @@
@import "~@angular/material/theming";
@use '~@angular/material' as mat;
@mixin dashboard-component-theme($theme) {
$primary: map-get($theme, primary);
@@ -7,8 +7,8 @@
.recent-activities, .frequent-activities {
.header {
background-color: mat-color($primary, 500);
color: mat-contrast($primary, 500);
background-color: mat.get-color-from-palette($primary, 500);
color: mat.get-contrast-color-from-palette($primary, 500);
}
}
@@ -17,16 +17,16 @@
mifosx-client-trends-bar {
.card {
.header {
background-color: mat-color($primary, 500);
color: mat-contrast($primary, 500);
background-color: mat.get-color-from-palette($primary, 500);
color: mat.get-contrast-color-from-palette($primary, 500);
mat-label,
.mat-select-value,
.mat-select-arrow {
color: mat-contrast($primary, 500);
color: mat.get-contrast-color-from-palette($primary, 500);
}
.mat-form-field-underline,
.mat-form-field-ripple {
background-color: mat-contrast($primary, 500);
background-color: mat.get-contrast-color-from-palette($primary, 500);
}
}
}
@@ -1,4 +1,4 @@
@import "~@angular/material/theming";
@use '~@angular/material' as mat;
@mixin loans-view-component-theme($theme) {
$primary: map-get($theme, primary);
@@ -6,7 +6,7 @@
mifosx-loans-view {
.loan-card {
.header {
background-color: mat-color($primary, 500);
background-color: mat.get-color-from-palette($primary, 500);
}
}
}
@@ -1,15 +1,15 @@
@import "~@angular/material/theming";
@use '~@angular/material' as mat;
@mixin savings-account-view-component-theme($theme) {
$primary: map-get($theme, primary);
mifosx-savings-account-view {
.savings-account-card {
.header {
background-color: mat-color($primary, 500);
background-color: mat.get-color-from-palette($primary, 500);
}
.table-headers {
background-color: mat-color($primary, 500);
color: mat-contrast($primary, 500);
background-color: mat.get-color-from-palette($primary, 500);
color: mat.get-contrast-color-from-palette($primary, 500);
}
}
}
@@ -1,3 +1,5 @@
@use "sass:math";
$theme-picker-menu-padding: 8px;
$theme-picker-grid-cell-size: 48px;
$theme-picker-grid-cells-per-row: 2;
@@ -19,7 +21,7 @@ $theme-picker-accent-stripe-size: 6px;
position: relative;
width: $theme-picker-swatch-size;
height: $theme-picker-swatch-size;
margin: ($theme-picker-grid-cell-size - $theme-picker-swatch-size) / 2;
margin: math.div($theme-picker-grid-cell-size - $theme-picker-swatch-size, 2);
border-radius: 50%;
overflow: hidden;
@@ -1,15 +1,15 @@
@import "~@angular/material/theming";
@use '~@angular/material' as mat;
@mixin shares-account-view-component-theme($theme) {
$primary: map-get($theme, primary);
mifosx-shares-account-view {
.shares-account-card {
.header {
background-color: mat-color($primary, 500);
background-color: mat.get-color-from-palette($primary, 500);
}
.table-headers {
background-color: mat-color($primary, 500);
color: mat-contrast($primary, 500);
background-color: mat.get-color-from-palette($primary, 500);
color: mat.get-contrast-color-from-palette($primary, 500);
}
}
}
@@ -1,5 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { constructor } from 'lodash';
import { ActivatedRoute } from '@angular/router';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import * as _ from 'lodash';
+13 -13
View File
@@ -1,4 +1,4 @@
@import '~@angular/material/theming';
@use '~@angular/material' as mat;
// Plus imports for other components in your app.
@import '../../app/clients/clients-view/clients-view.component-theme.scss';
@import '../../app/groups/groups-view/groups-view.component-theme.scss';
@@ -16,9 +16,9 @@ $mat-denim: (
500: #1074b9,
700: #004989,
contrast: (
100: $dark-primary-text,
500: $light-primary-text,
700: $light-primary-text
100: rgba(black, 0.87),
500: white,
700: white
)
);
@@ -27,33 +27,33 @@ $mat-yellow-green: (
500: #b4d575,
700: #83a447,
contrast: (
100: $dark-primary-text,
500: $dark-primary-text,
700: $dark-primary-text
100: rgba(black, 0.87),
500: rgba(black, 0.87),
700: rgba(black, 0.87)
)
);
// Include the common styles for Angular Material. We include this here so that you only
// have to load a single css file for Angular Material in your app.
// Be sure that you only ever include this mixin once!
@include mat-core();
@include mat.core();
// Define the palettes for your theme using the Material Design palettes available in palette.scss
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
// hue. Available color palettes: https://material.io/design/color/
$mifosx-app-primary: mat-palette($mat-denim);
$mifosx-app-accent: mat-palette($mat-yellow-green);
$mifosx-app-primary: mat.define-palette($mat-denim);
$mifosx-app-accent: mat.define-palette($mat-yellow-green);
// The warn palette is optional (defaults to red).
$mifosx-app-warn: mat-palette($mat-red);
$mifosx-app-warn: mat.define-palette(mat.$red-palette);
// Create the theme object (a Sass map containing all of the palettes).
$mifosx-app-theme: mat-light-theme($mifosx-app-primary, $mifosx-app-accent, $mifosx-app-warn);
$mifosx-app-theme: mat.define-light-theme($mifosx-app-primary, $mifosx-app-accent, $mifosx-app-warn);
// Include theme styles for core and each component used in your app.
// Alternatively, you can import and @include the theme mixins for each component
// that you are using.
@include angular-material-theme($mifosx-app-theme);
@include mat.all-component-themes($mifosx-app-theme);
@include clients-view-component-theme($mifosx-app-theme);
@include groups-view-component-theme($mifosx-app-theme);
@include centers-view-component-theme($mifosx-app-theme);
+13 -13
View File
@@ -1,4 +1,4 @@
@import '~@angular/material/theming';
@use '~@angular/material' as mat;
// Plus imports for other components in your app.
@import '../../app/clients/clients-view/clients-view.component-theme.scss';
@import '../../app/groups/groups-view/groups-view.component-theme.scss';
@@ -16,9 +16,9 @@ $mat-picton-blue: (
500: #1daeec,
700: #007fb9,
contrast: (
100: $dark-primary-text,
500: $dark-primary-text,
700: $dark-primary-text
100: rgba(black, 0.87),
500: rgba(black, 0.87),
700: rgba(black, 0.87)
)
);
@@ -27,33 +27,33 @@ $mat-yellow-green: (
500: #b4d575,
700: #83a447,
contrast: (
100: $dark-primary-text,
500: $dark-primary-text,
700: $dark-primary-text
100: rgba(black, 0.87),
500: rgba(black, 0.87),
700: rgba(black, 0.87)
)
);
// Include the common styles for Angular Material. We include this here so that you only
// have to load a single css file for Angular Material in your app.
// Be sure that you only ever include this mixin once!
@include mat-core();
@include mat.core();
// Define the palettes for your theme using the Material Design palettes available in palette.scss
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
// hue. Available color palettes: https://material.io/design/color/
$mifosx-app-primary: mat-palette($mat-picton-blue);
$mifosx-app-accent: mat-palette($mat-yellow-green);
$mifosx-app-primary: mat.define-palette($mat-picton-blue);
$mifosx-app-accent: mat.define-palette($mat-yellow-green);
// The warn palette is optional (defaults to red).
$mifosx-app-warn: mat-palette($mat-red);
$mifosx-app-warn: mat.define-palette(mat.$red-palette);
// Create the theme object (a Sass map containing all of the palettes).
$mifosx-app-theme: mat-light-theme($mifosx-app-primary, $mifosx-app-accent, $mifosx-app-warn);
$mifosx-app-theme: mat.define-light-theme($mifosx-app-primary, $mifosx-app-accent, $mifosx-app-warn);
// Include theme styles for core and each component used in your app.
// Alternatively, you can import and @include the theme mixins for each component
// that you are using.
@include angular-material-theme($mifosx-app-theme);
@include mat.all-component-themes($mifosx-app-theme);
@include clients-view-component-theme($mifosx-app-theme);
@include groups-view-component-theme($mifosx-app-theme);
@include centers-view-component-theme($mifosx-app-theme);