Skip to content

Commit 60965b3

Browse files
committed
feat: more upgrading to latest versions
1 parent 72ab411 commit 60965b3

File tree

90 files changed

+2645
-3461
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+2645
-3461
lines changed

apps/badman/src/badman.theme.scss

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// info: https://material.angular.io/guide/theming-your-components
22

33
@use 'sass:map';
4+
@use 'sass:color';
45
@use '@angular/material' as mat;
56

67
@mixin color($theme) {
@@ -18,17 +19,17 @@
1819

1920
::-webkit-scrollbar-thumb {
2021
@if $isDark {
21-
background-color: lighten($background-color, 30%);
22+
background-color: color.scale($background-color, $lightness: 30%);
2223
} @else {
23-
background-color: darken($background-color, 30%);
24+
background-color: color.scale($background-color, $lightness: -30%);
2425
}
2526
}
2627

2728
::-webkit-scrollbar-thumb:hover {
2829
@if $isDark {
29-
background-color: lighten($background-color, 20%);
30+
background-color: color.scale($background-color, $lightness: 20%);
3031
} @else {
31-
background-color: darken($background-color, 20%);
32+
background-color: color.scale($background-color, $lightness: -20%);
3233
}
3334
}
3435

apps/badman/src/theme-functions.scss

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@use '@angular/material' as mat;
2+
@use 'sass:map';
23

34
/// Defines a dark color theme with success and danger colors.
45
/// @param {Map} $primary The primary color map.
@@ -32,7 +33,7 @@
3233
success: $success,
3334
danger: $danger,
3435
);
35-
@return map-merge($dark-theme, $danger-success);
36+
@return map.merge($dark-theme, $danger-success);
3637
}
3738

3839
/// Defines a light color theme with success and danger colors.
@@ -65,5 +66,5 @@
6566
success: $success,
6667
danger: $danger,
6768
);
68-
@return map-merge($light-theme, $danger-success);
69+
@return map.merge($light-theme, $danger-success);
6970
}

apps/scripts/src/app/scripts/assign-clubs-to-players/assign-clubs-to-players.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,19 @@ export class AssignClubToPlayers {
8787

8888
// Enable filtering
8989
ws1['!autofilter'] = {
90-
ref: xlsx.utils.encode_range(xlsx.utils.decode_range(ws1['!ref'] as string)),
90+
ref: xlsx.utils.encode_range(xlsx.utils.decode_range(ws1['!ref'])),
9191
};
9292
xlsx.utils.book_append_sheet(wb, ws1, 'Log');
9393

9494
const ws2 = xlsx.utils.json_to_sheet(this.unkownClubs);
9595
ws2['!autofilter'] = {
96-
ref: xlsx.utils.encode_range(xlsx.utils.decode_range(ws2['!ref'] as string)),
96+
ref: xlsx.utils.encode_range(xlsx.utils.decode_range(ws2['!ref'])),
9797
};
9898
xlsx.utils.book_append_sheet(wb, ws2, 'Unknown Clubs');
9999

100100
const ws3 = xlsx.utils.json_to_sheet(this.unkownPlayers);
101101
ws3['!autofilter'] = {
102-
ref: xlsx.utils.encode_range(xlsx.utils.decode_range(ws3['!ref'] as string)),
102+
ref: xlsx.utils.encode_range(xlsx.utils.decode_range(ws3['!ref'])),
103103
};
104104
xlsx.utils.book_append_sheet(wb, ws3, 'Unknown Players');
105105

apps/worker/sync/src/app/processors/sync-events/tournament-sync/processors/game.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export class TournamentSyncGameProcessor extends StepProcessor {
106106
xmlMatch.Sets.Set = [xmlMatch.Sets.Set];
107107
}
108108

109-
let gameStatus = GameStatus.NORMAL;
109+
let gameStatus: GameStatus;
110110
switch (xmlMatch.ScoreStatus) {
111111
case XmlScoreStatus.Retirement:
112112
gameStatus = GameStatus.RETIREMENT;
@@ -120,8 +120,8 @@ export class TournamentSyncGameProcessor extends StepProcessor {
120120
case XmlScoreStatus.Walkover:
121121
gameStatus = GameStatus.WALKOVER;
122122
break;
123-
default:
124123
case XmlScoreStatus.Normal:
124+
default:
125125
// This is the case when the tournament didn't configured their score status
126126
if (
127127
// No scores

eslint.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = [
3232
files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'],
3333
rules: {
3434
...config.rules,
35-
'@typescript-eslint/no-extra-semi': 'error',
35+
'@/no-extra-semi': 'error',
3636
'no-extra-semi': 'off',
3737
},
3838
})),
@@ -41,7 +41,7 @@ module.exports = [
4141
files: ['**/*.js', '**/*.jsx', '**/*.cjs', '**/*.mjs'],
4242
rules: {
4343
...config.rules,
44-
'@typescript-eslint/no-extra-semi': 'error',
44+
'@/no-extra-semi': 'error',
4545
'no-extra-semi': 'off',
4646
},
4747
})),

libs/backend/belgium/flanders/places/src/services/belgium-flanders-places.service.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ export class BelgiumFlandersPlacesService {
142142

143143
const { upgrade, downgrade } = this._calculatePoints(
144144
system,
145-
(games?.map((g) => g.rankingPoints?.[0])?.filter((g) => g != undefined) ??
146-
[]) as RankingPoint[],
145+
games?.map((g) => g.rankingPoints?.[0])?.filter((g) => g != undefined) ?? [],
147146
gameType,
148147
);
149148

@@ -165,8 +164,8 @@ export class BelgiumFlandersPlacesService {
165164
case 'freeze':
166165
level = lastRanking;
167166
break;
168-
default:
169167
case 'decrease':
168+
default:
170169
level = lastRankingInactive ? lastRanking : lastRanking + 2;
171170
break;
172171
}

libs/backend/compile/src/services/compile.service.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ export class CompileService implements CompileInterface, OnModuleInit {
182182

183183
await page.close();
184184

185-
return pdf;
185+
return Buffer.from(pdf);
186+
186187
}
187188

188189
private getTemplatePath(template: string, { root, extension, engine }: ViewOptions): string {

libs/frontend/components/src/block/block.component.theme.scss

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// info: https://material.angular.io/guide/theming-your-components
22

33
@use 'sass:map';
4+
@use 'sass:color';
45
@use '@angular/material' as mat;
56

67
@mixin color($theme) {
@@ -10,9 +11,9 @@
1011
$caption-color: null;
1112

1213
@if ($isDark) {
13-
$caption-color: darken(mat.get-theme-color($theme, foreground, 'base'), 40%);
14+
$caption-color: color.scale(mat.get-theme-color($theme, foreground, 'base'), $lightness: -40%);
1415
} @else {
15-
$caption-color: lighten(mat.get-theme-color($theme, foreground, 'base'), 60%);
16+
$caption-color: color.scale(mat.get-theme-color($theme, foreground, 'base'), $lightness: 60%);
1617
}
1718

1819
.badman-block-title {

libs/frontend/components/src/games/recent-games/list-encounters/list-encounters.component.ts

+13-15
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,23 @@ import { Apollo, gql } from 'apollo-angular';
2222
import moment from 'moment';
2323
import { MomentModule } from 'ngx-moment';
2424
import { injectDestroy } from 'ngxtension/inject-destroy';
25-
import { TrackByProp } from 'ngxtension/trackby-id-prop';
2625
import { map, takeUntil } from 'rxjs';
2726
import { LoadingBlockComponent } from '../../../loading-block';
2827

2928
@Component({
30-
imports: [
31-
CommonModule,
32-
RouterModule,
33-
TranslateModule,
34-
MomentModule,
35-
TrackByProp,
36-
MatButtonModule,
37-
MatListModule,
38-
LoadingBlockComponent,
39-
],
40-
selector: 'badman-list-encounters',
41-
templateUrl: './list-encounters.component.html',
42-
styleUrls: ['./list-encounters.component.scss'],
43-
changeDetection: ChangeDetectionStrategy.OnPush
29+
imports: [
30+
CommonModule,
31+
RouterModule,
32+
TranslateModule,
33+
MomentModule,
34+
MatButtonModule,
35+
MatListModule,
36+
LoadingBlockComponent,
37+
],
38+
selector: 'badman-list-encounters',
39+
templateUrl: './list-encounters.component.html',
40+
styleUrls: ['./list-encounters.component.scss'],
41+
changeDetection: ChangeDetectionStrategy.OnPush,
4442
})
4543
export class ListEncountersComponent implements OnInit, OnChanges {
4644
private apollo = inject(Apollo);

libs/frontend/components/src/games/recent-games/list-games/list-games.component.theme.scss

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// info: https://material.angular.io/guide/theming-your-components
22

33
@use 'sass:map';
4+
@use 'sass:color';
45
@use '@angular/material' as mat;
56

67
@mixin color($theme) {
@@ -47,9 +48,9 @@
4748

4849
.game__points {
4950
@if ($isDark) {
50-
color: darken(mat.get-theme-color($theme, foreground, 'base'), 40%);
51+
color: color.scale(mat.get-theme-color($theme, foreground, 'base'), $lightness: -40%);
5152
} @else {
52-
color: lighten(mat.get-theme-color($theme, foreground, 'base'), 60%);
53+
color: color.scale(mat.get-theme-color($theme, foreground, 'base'), $lightness: 60%);
5354
}
5455
}
5556

libs/frontend/components/src/games/recent-games/recent-games.component.theme.scss

+10-12
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
// info: https://material.angular.io/guide/theming-your-components
22

33
@use 'sass:map';
4+
@use 'sass:color';
45
@use '@angular/material' as mat;
56

67
@use './list-games/list-games.component.theme.scss' as list-games;
78

89
@mixin color($theme) {
910
badman-recent-games {
1011
@include list-games.color($theme);
11-
12+
1213
$isDark: map.get($theme, 'is-dark');
1314
$background-color: mat.get-theme-color($theme, 'background', 'app-bar');
1415

@@ -36,23 +37,21 @@
3637
}
3738

3839
.loading-row {
39-
// background: darkgray;
40-
// background: linear-gradient(to right, #eeeeee 10%, #dddddd 18%, #eeeeee 33%);
4140
@if $isDark {
42-
background: lighten($background-color, 20%);
41+
background: color.scale($background-color, $lightness: 20%);
4342
background-image: linear-gradient(
4443
to right,
45-
lighten($background-color, 20%) 10%,
46-
lighten($background-color, 30%) 18%,
47-
lighten($background-color, 20%) 33%
44+
color.scale($background-color, $lightness: 20%) 10%,
45+
color.scale($background-color, $lightness: 30%) 18%,
46+
color.scale($background-color, $lightness: 20%) 33%
4847
);
4948
} @else {
50-
background: darken($background-color, 20%);
49+
background: color.scale($background-color, $lightness: -20%);
5150
background-image: linear-gradient(
5251
to right,
53-
darken($background-color, 20%) 10%,
54-
darken($background-color, 30%) 18%,
55-
darken($background-color, 20%) 33%
52+
color.scale($background-color, $lightness: -20%) 10%,
53+
color.scale($background-color, $lightness: -30%) 18%,
54+
color.scale($background-color, $lightness: -20%) 33%
5655
);
5756
}
5857
}
@@ -62,7 +61,6 @@
6261
@mixin typography($theme) {
6362
badman-recent-games {
6463
@include list-games.typography($theme);
65-
6664

6765
.header {
6866
.date {

libs/frontend/components/src/games/upcoming-games/upcoming-games.component.ts

+13-18
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,26 @@
11
import { CommonModule } from '@angular/common';
2-
import { Component, OnChanges, OnInit, SimpleChanges, inject } from '@angular/core';
2+
import { Component, OnChanges, OnInit, SimpleChanges, inject, input } from '@angular/core';
33
import { MatButtonModule } from '@angular/material/button';
44
import { MatListModule } from '@angular/material/list';
5-
6-
import { input } from '@angular/core';
75
import { RouterModule } from '@angular/router';
86
import { Team } from '@badman/frontend-models';
97
import { TranslateModule } from '@ngx-translate/core';
108
import { MomentModule } from 'ngx-moment';
11-
import { TrackByProp } from 'ngxtension/trackby-id-prop';
129
import { LoadingBlockComponent } from '../../loading-block';
1310
import { UpcommingGamesService } from './upcomming-games.service';
14-
1511
@Component({
16-
selector: 'badman-upcoming-games',
17-
imports: [
18-
TrackByProp,
19-
CommonModule,
20-
MatListModule,
21-
MomentModule,
22-
TranslateModule,
23-
MatButtonModule,
24-
RouterModule,
25-
LoadingBlockComponent,
26-
],
27-
templateUrl: './upcoming-games.component.html',
28-
styleUrls: ['./upcoming-games.component.scss']
12+
selector: 'badman-upcoming-games',
13+
imports: [
14+
CommonModule,
15+
MatListModule,
16+
MomentModule,
17+
TranslateModule,
18+
MatButtonModule,
19+
RouterModule,
20+
LoadingBlockComponent,
21+
],
22+
templateUrl: './upcoming-games.component.html',
23+
styleUrls: ['./upcoming-games.component.scss'],
2924
})
3025
export class UpcomingGamesComponent implements OnInit, OnChanges {
3126
upcommingGames = inject(UpcommingGamesService);

libs/frontend/components/src/landing/landing.component.scss

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
:host {
22
display: flex;
33
padding: 1rem 1rem 0;
4+
flex-direction: column;
5+
gap: 1rem;
6+
47
@media (max-width: 760px) {
58
padding: 0.5rem 0.5rem 0;
69
}
7-
flex-direction: column;
8-
gap: 1rem;
910
}
1011

1112
.content {
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
// info: https://material.angular.io/guide/theming-your-components
22

33
@use 'sass:map';
4+
@use 'sass:color';
45
@use '@angular/material' as mat;
56

67
@mixin color($theme) {
78
badman-loading-block {
8-
9-
109
$isDark: map.get($theme, 'is-dark');
1110
$background-color: mat.get-theme-color($theme, 'background', 'app-bar');
1211

@@ -18,16 +17,16 @@
1817
@if $isDark {
1918
background: linear-gradient(
2019
to right,
21-
lighten($background-color, 20%) 10%,
22-
lighten($background-color, 30%) 18%,
23-
lighten($background-color, 20%) 33%
20+
color.scale($background-color, $lightness: 20%) 10%,
21+
color.scale($background-color, $lightness: 30%) 18%,
22+
color.scale($background-color, $lightness: 20%) 33%
2423
);
2524
} @else {
2625
background: linear-gradient(
2726
to right,
28-
darken($background-color, 20%) 10%,
29-
darken($background-color, 30%) 18%,
30-
darken($background-color, 20%) 33%
27+
color.scale($background-color, $lightness: -20%) 10%,
28+
color.scale($background-color, $lightness: -30%) 18%,
29+
color.scale($background-color, $lightness: -20%) 33%
3130
);
3231
}
3332
}
@@ -36,6 +35,6 @@
3635

3736
@mixin typography($theme) {
3837
// badman-loading-block {
39-
38+
4039
// }
4140
}

0 commit comments

Comments
 (0)