Skip to content

build: upgrade angular version to v19 #1832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
319d0ce
update package-lock
Junjiequan Apr 23, 2025
5501518
ng update @angular/cli@17 @angular/core@17 --force
Junjiequan Apr 23, 2025
cd7d788
Refactor policies and proposals components to use updated API methods…
Junjiequan Apr 23, 2025
42144ec
chore: remove outdated datetime-picker dependency and update @angular…
Junjiequan Apr 23, 2025
c16ccae
chore: update @ngrx dependencies to version 17.2.0 and enhance StoreD…
Junjiequan Apr 23, 2025
d490ed5
feat: add @ngxmc/datetime-picker dependency and update imports in the…
Junjiequan Apr 23, 2025
9547694
chore: upgrade Angular dependencies to version 18.x
Junjiequan Apr 23, 2025
51cb959
update @ngrx and @angular to v18
Junjiequan Apr 23, 2025
4879d91
replace date time picker with new library
Junjiequan Apr 24, 2025
33cb9d5
update @angular-eslint/schematics@18
Junjiequan Apr 24, 2025
90d87c4
update @angular/material@18
Junjiequan Apr 24, 2025
5b0998e
update package-lock.json
Junjiequan Apr 24, 2025
cb6e3ae
update package-lock.json
Junjiequan Apr 24, 2025
a554770
update @angular/core@19 @angular/cli@19
Junjiequan Apr 24, 2025
38f9a4f
update @angular/material@19
Junjiequan Apr 24, 2025
76e25b6
update @ngrx/store@19
Junjiequan Apr 24, 2025
a7608a5
update @angular-eslint/schematics" to 19
Junjiequan Apr 24, 2025
a7317c9
remove random JSON.stringify in the selector for consistency
Junjiequan Apr 25, 2025
6be2a9d
update typescript 5.8.3
Junjiequan Apr 25, 2025
c6c872e
set proper params for fullQuery api call
Junjiequan Apr 28, 2025
617e7c0
fix tests
Junjiequan Apr 28, 2025
a5a411c
remove unused card-container styles from dataset detail component
Junjiequan Apr 29, 2025
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
35 changes: 18 additions & 17 deletions CI/to_be_deleted/ESS/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@
@use "./app/shared/modules/table/table-theme" as table;
@use "./app/users/user-settings/user-settings-theme" as user-settings;

$custom-typography: mat.define-typography-config(
$custom-typography: mat.m2-define-typography-config(
$font-family: '"Titillium Web", Calibri, sans-serif;',
);
// 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.typography-hierarchy($custom-typography);
@include mat.core();
@include mat.elevation-classes();
@include mat.app-background();

// 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
Expand Down Expand Up @@ -204,17 +205,17 @@ $red: (
),
);

$primary: mat.define-palette($cyan, 1000, 400, 800);
$accent: mat.define-palette($grass, 1000, 400, 800);
$warn: mat.define-palette($red, 100, 50, 200);
$warn-2: mat.define-palette($yellow, 100, 50, 200);
$header-1: mat.define-palette($navy, 1000, 400, 800);
$header-2: mat.define-palette($forest, 1000, 400, 800);
$header-3: mat.define-palette($orange, 1000, 400, 800);
$header-4: mat.define-palette($purple, 1000, 400, 800);
$hover: mat.define-palette($grey, 500, 100, 300);
$primary: mat.m2-define-palette($cyan, 1000, 400, 800);
$accent: mat.m2-define-palette($grass, 1000, 400, 800);
$warn: mat.m2-define-palette($red, 100, 50, 200);
$warn-2: mat.m2-define-palette($yellow, 100, 50, 200);
$header-1: mat.m2-define-palette($navy, 1000, 400, 800);
$header-2: mat.m2-define-palette($forest, 1000, 400, 800);
$header-3: mat.m2-define-palette($orange, 1000, 400, 800);
$header-4: mat.m2-define-palette($purple, 1000, 400, 800);
$hover: mat.m2-define-palette($grey, 500, 100, 300);

$basetheme: mat.define-light-theme(
$basetheme: mat.m2-define-light-theme(
(
color: (
primary: $primary,
Expand All @@ -226,8 +227,8 @@ $basetheme: mat.define-light-theme(
)
);

$newcolor: map-merge(
map-get($basetheme, "color"),
$newcolor: map.merge(
map.get($basetheme, "color"),
(
warn-2: $warn-2,
header-1: $header-1,
Expand All @@ -238,7 +239,7 @@ $newcolor: map-merge(
)
);

$theme: map-merge(
$theme: map.merge(
$basetheme,
(
color: $newcolor,
Expand Down Expand Up @@ -300,15 +301,15 @@ a:hover {
}

.snackbar-success {
background-color: mat.get-color-from-palette($primary, "default");
background-color: mat.m2-get-color-from-palette($primary, "default");

button {
color: white;
}
}

.snackbar-error {
background-color: mat.get-color-from-palette($warn, "default");
background-color: mat.m2-get-color-from-palette($warn, "default");

button {
color: white;
Expand Down
31 changes: 16 additions & 15 deletions CI/to_be_deleted/MAXIV/maxiv-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@
@use "./app/shared/modules/table/table-theme" as table;
@use "./app/users/user-settings/user-settings-theme" as user-settings;

$custom-typography: mat.define-typography-config(
$custom-typography: mat.m2-define-typography-config(
$font-family: '"Titillium Web", Calibri, sans-serif;',
);
// 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($custom-typography);
@include mat.elevation-classes();
@include mat.app-background();

// 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
Expand Down Expand Up @@ -249,15 +250,15 @@ $max-iv-orange-palette: (
),
);

$primary: mat.define-palette($max-iv-green-palette, 700);
$accent: mat.define-palette($max-iv-orange-palette, 500, 300, 700);
$warn: mat.define-palette($red, 100, 50, 200);
$warn-2: mat.define-palette($yellow, 100, 50, 200);
$header-1: mat.define-palette($navy, 1000, 400, 800);
$header-2: mat.define-palette($forest, 1000, 400, 800);
$header-3: mat.define-palette($orange, 1000, 400, 800);
$header-4: mat.define-palette($purple, 1000, 400, 800);
$hover: mat.define-palette($grey, 500, 100, 300);
$primary: mat.m2-define-palette($max-iv-green-palette, 700);
$accent: mat.m2-define-palette($max-iv-orange-palette, 500, 300, 700);
$warn: mat.m2-define-palette($red, 100, 50, 200);
$warn-2: mat.m2-define-palette($yellow, 100, 50, 200);
$header-1: mat.m2-define-palette($navy, 1000, 400, 800);
$header-2: mat.m2-define-palette($forest, 1000, 400, 800);
$header-3: mat.m2-define-palette($orange, 1000, 400, 800);
$header-4: mat.m2-define-palette($purple, 1000, 400, 800);
$hover: mat.m2-define-palette($grey, 500, 100, 300);

@function custom-light-theme(
$primary,
Expand All @@ -270,8 +271,8 @@ $hover: mat.define-palette($grey, 500, 100, 300);
$header-4,
$hover
) {
@return map-merge(
mat.define-light-theme($primary, $accent, $warn),
@return map.merge(
mat.m2-define-light-theme($primary, $accent, $warn),
(
warn-2: $warn-2,
header-1: $header-1,
Expand Down Expand Up @@ -348,9 +349,9 @@ a:hover {
}

.snackbar-success {
background-color: mat.get-color-from-palette($primary, "default");
background-color: mat.m2-get-color-from-palette($primary, "default");
}

.snackbar-error {
background-color: mat.get-color-from-palette($warn, "default");
background-color: mat.m2-get-color-from-palette($warn, "default");
}
48 changes: 27 additions & 21 deletions CI/to_be_deleted/RFI/theme.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
// Custom Theming for Angular Material
// For more information: https://material.angular.io/guide/theming
@use '@angular/material' as mat;
@use "@angular/material" as mat;
@use "./app/app-theme" as app;
@use "./app/_layout/app-header/app-header-theme" as app-header;
@use "./app/datasets/batch-view/batch-view-theme" as batch-view;
@use "./app/datasets/dashboard/dashboard-theme" as dashboard;
@use "./app/datasets/datafiles/datafiles-theme" as datafiles;
@use "./app/datasets/dataset-detail/dataset-detail-theme" as dataset-detail;
@use "./app/datasets/dataset-details-dashboard/dataset-details-dashboard-theme" as dataset-details-dashboard;
@use "./app/datasets/dataset-lifecycle/dataset-lifecycle-theme" as dataset-lifecycle;
@use "./app/datasets/dataset-details-dashboard/dataset-details-dashboard-theme"
as dataset-details-dashboard;
@use "./app/datasets/dataset-lifecycle/dataset-lifecycle-theme" as
dataset-lifecycle;
@use "./app/datasets/dataset-table/dataset-table-theme" as dataset-table;
@use "./app/datasets/dataset-table-settings/dataset-table-settings-theme" as dataset-table-settings;
@use "./app/datasets/dataset-table-settings/dataset-table-settings-theme" as
dataset-table-settings;
@use "./app/datasets/reduce/reduce-theme" as reduce;
@use "./app/instruments/instrument-details/instrument-details-theme" as instrument-details;
@use "./app/instruments/instrument-details/instrument-details-theme" as
instrument-details;
@use "./app/logbooks/logbooks-detail/logbooks-detail-theme" as logbooks-detail;
@use "./app/logbooks/logbooks-table/logbooks-table-theme" as logbooks-table;
@use "./app/proposals/proposal-detail/proposal-detail-theme" as proposal-detail;
@use "./app/publisheddata/publisheddata-details/publisheddata-details-theme" as publisheddata-details;
@use "./app/publisheddata/publisheddata-details/publisheddata-details-theme" as
publisheddata-details;
@use "./app/samples/sample-dashboard/sample-dashboard-theme" as sample-dashboard;
@use "./app/samples/sample-detail/sample-detail-theme" as sample-detail;
@use "./app/shared/modules/breadcrumb/breadcrumb-theme" as breadcrumb;
Expand All @@ -25,13 +30,14 @@
@use "./app/shared/modules/table/table-theme" as table;
@use "./app/users/user-settings/user-settings-theme" as user-settings;

$custom-typography: mat.define-typography-config(
$custom-typography: mat.m2-define-typography-config(
$font-family: '"Titillium Web", Calibri, sans-serif;',
);
// 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($custom-typography);
@include mat.elevation-classes();
@include mat.app-background();

// 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
Expand Down Expand Up @@ -198,15 +204,15 @@ $red: (
),
);

$primary: mat.define-palette($cyan, 1000, 400, 800);
$accent: mat.define-palette($grass, 1000, 400, 800);
$warn: mat.define-palette($red, 100, 50, 200);
$warn-2: mat.define-palette($yellow, 100, 50, 200);
$header-1: mat.define-palette($navy, 1000, 400, 800);
$header-2: mat.define-palette($forest, 1000, 400, 800);
$header-3: mat.define-palette($orange, 1000, 400, 800);
$header-4: mat.define-palette($purple, 1000, 400, 800);
$hover: mat.define-palette($grey, 500, 100, 300);
$primary: mat.m2-define-palette($cyan, 1000, 400, 800);
$accent: mat.m2-define-palette($grass, 1000, 400, 800);
$warn: mat.m2-define-palette($red, 100, 50, 200);
$warn-2: mat.m2-define-palette($yellow, 100, 50, 200);
$header-1: mat.m2-define-palette($navy, 1000, 400, 800);
$header-2: mat.m2-define-palette($forest, 1000, 400, 800);
$header-3: mat.m2-define-palette($orange, 1000, 400, 800);
$header-4: mat.m2-define-palette($purple, 1000, 400, 800);
$hover: mat.m2-define-palette($grey, 500, 100, 300);

@function custom-light-theme(
$primary,
Expand All @@ -219,8 +225,8 @@ $hover: mat.define-palette($grey, 500, 100, 300);
$header-4,
$hover
) {
@return map-merge(
mat.define-light-theme($primary, $accent, $warn),
@return map.merge(
mat.m2-define-light-theme($primary, $accent, $warn),
(
warn-2: $warn-2,
header-1: $header-1,
Expand Down Expand Up @@ -297,9 +303,9 @@ a:hover {
}

.snackbar-success {
background-color: mat.get-color-from-palette($primary, "default");
background-color: mat.m2-get-color-from-palette($primary, "default");
}

.snackbar-error {
background-color: mat.get-color-from-palette($warn, "default");
background-color: mat.m2-get-color-from-palette($warn, "default");
}
20 changes: 10 additions & 10 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,19 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"allowedCommonJsDependencies": [
"deep-equal",
"exceljs",
"file-saver",
"socket.io-client"
],
"outputPath": "dist",
"outputPath": {
"base": "dist"
},
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"polyfills": ["src/polyfills.ts"],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
Expand All @@ -46,7 +47,8 @@
"src/manifest.json"
],
"styles": ["src/styles.scss"],
"scripts": []
"scripts": [],
"browser": "src/main.ts"
},
"configurations": {
"production": {
Expand Down Expand Up @@ -77,9 +79,7 @@
"outputHashing": "all"
},
"default": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
Expand All @@ -91,10 +91,10 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "scicat-frontend:build:production"
"buildTarget": "scicat-frontend:build:production"
},
"default": {
"browserTarget": "scicat-frontend:build:default"
"buildTarget": "scicat-frontend:build:default"
}
},
"options": {
Expand All @@ -107,7 +107,7 @@
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "scicat-frontend:build"
"buildTarget": "scicat-frontend:build"
}
},
"test": {
Expand Down
Loading