From 9ac580fd5ed893afcb2b07f98024554d9bd1cb3a Mon Sep 17 00:00:00 2001 From: mentaiko <69947910+speak-mentaiko@users.noreply.github.com> Date: Wed, 23 Oct 2024 23:21:14 +0900 Subject: [PATCH 01/27] =?UTF-8?q?feat:=E8=A9=A6=E5=90=88=E8=A1=A8=E3=81=AE?= =?UTF-8?q?=E7=94=9F=E6=88=90=E5=BE=8C=E3=81=AE=E3=82=A8=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=83=AA=E3=83=BC=E3=82=92=E5=8F=97=E3=81=91=E4=BB=98=E3=81=91?= =?UTF-8?q?=E3=81=AA=E3=81=84=20(#551)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/kcms/src/team/main.ts | 15 +++++- packages/kcms/src/team/service/entry.test.ts | 56 +++++++++++++++++--- packages/kcms/src/team/service/entry.ts | 31 +++++++++-- packages/kcms/src/testData/entry.ts | 36 +++++++------ 4 files changed, 109 insertions(+), 29 deletions(-) diff --git a/packages/kcms/src/team/main.ts b/packages/kcms/src/team/main.ts index 8e1ad61f..c2d026ae 100644 --- a/packages/kcms/src/team/main.ts +++ b/packages/kcms/src/team/main.ts @@ -19,6 +19,11 @@ import { TeamID } from './models/team.js'; import { apiReference } from '@scalar/hono-api-reference'; import { SnowflakeIDGenerator } from '../id/main'; +import { DummyMainMatchRepository } from '../match/adaptor/dummy/mainMatchRepository'; +import { DummyPreMatchRepository } from '../match/adaptor/dummy/preMatchRepository'; +import { PrismaMainMatchRepository } from '../match/adaptor/prisma/mainMatchRepository'; +import { PrismaPreMatchRepository } from '../match/adaptor/prisma/preMatchRepository'; +import { GetMatchService } from '../match/service/get'; import { CreateTeamService } from './service/createTeam'; import { DeleteTeamService } from './service/delete'; import { EntryService } from './service/entry'; @@ -29,12 +34,20 @@ const isProduction = process.env.NODE_ENV === 'production'; const teamRepository = isProduction ? new PrismaTeamRepository(prismaClient) : new DummyRepository(); +const preMatchRepository = isProduction + ? new PrismaPreMatchRepository(prismaClient) + : new DummyPreMatchRepository(); +const mainMatchRepository = isProduction + ? new PrismaMainMatchRepository(prismaClient) + : new DummyMainMatchRepository(); const idGenerator = new SnowflakeIDGenerator(1, () => BigInt(new Date().getTime())); +const getMatchService = new GetMatchService(preMatchRepository, mainMatchRepository); + const fetchTeamService = new FetchTeamService(teamRepository); const createTeamService = new CreateTeamService(teamRepository, idGenerator); const deleteTeamService = new DeleteTeamService(teamRepository); -const entryService = new EntryService(teamRepository); +const entryService = new EntryService(teamRepository, getMatchService); export const controller = new TeamController( createTeamService, diff --git a/packages/kcms/src/team/service/entry.test.ts b/packages/kcms/src/team/service/entry.test.ts index b1c16b5e..cc8372c8 100644 --- a/packages/kcms/src/team/service/entry.test.ts +++ b/packages/kcms/src/team/service/entry.test.ts @@ -1,26 +1,66 @@ -import { Option } from '@mikuroxina/mini-fn'; -import { describe, expect, it } from 'vitest'; +import { Option, Result } from '@mikuroxina/mini-fn'; +import { beforeEach, describe, expect, it } from 'vitest'; +import { DummyMainMatchRepository } from '../../match/adaptor/dummy/mainMatchRepository'; +import { DummyPreMatchRepository } from '../../match/adaptor/dummy/preMatchRepository'; +import { GetMatchService } from '../../match/service/get'; import { TestEntryData } from '../../testData/entry'; +import { testCreateRunResultPreData } from '../../testData/match'; import { DummyRepository } from '../adaptor/repository/dummyRepository'; import { EntryService } from './entry'; describe('EntryService', () => { - const teamRepository = new DummyRepository([TestEntryData.NotEntered, TestEntryData.Entered]); - const service = new EntryService(teamRepository); + const teamRepository = new DummyRepository(); + const preMatchRepository = new DummyPreMatchRepository(); + const mainMatchRepository = new DummyMainMatchRepository(); + const getMatchService = new GetMatchService(preMatchRepository, mainMatchRepository); + const service = new EntryService(teamRepository, getMatchService); + + const enteredTeamID = TestEntryData.Entered().getId(); + const notEnteredTeamID = TestEntryData.NotEntered().getId(); + + beforeEach(() => { + teamRepository.reset([TestEntryData.Entered(), TestEntryData.NotEntered()]); + }); it('エントリーできる', async () => { - await service.enter(TestEntryData.NotEntered.getId()); + preMatchRepository.clear([]); + await service.enter(notEnteredTeamID); - const res = await teamRepository.findByID(TestEntryData.NotEntered.getId()); + const res = await teamRepository.findByID(notEnteredTeamID); expect(Option.isNone(res)).toBe(false); expect(Option.unwrap(res).getIsEntered()).toBe(true); }); it('エントリーをキャンセルできる', async () => { - await service.cancel(TestEntryData.Entered.getId()); + preMatchRepository.clear([]); + await service.cancel(enteredTeamID); - const res = await teamRepository.findByID(TestEntryData.Entered.getId()); + const res = await teamRepository.findByID(enteredTeamID); expect(Option.isNone(res)).toBe(false); expect(Option.unwrap(res).getIsEntered()).toBe(false); }); + + it('試合表生成後はエントリーできない', async () => { + preMatchRepository.clear(testCreateRunResultPreData); + const res = await service.enter(notEnteredTeamID); + + expect(Result.isErr(res)).toBe(true); + expect(Result.unwrapErr(res)).toStrictEqual(new Error('Cannot modify entry now')); + + const teamRes = await teamRepository.findByID(notEnteredTeamID); + expect(Option.isNone(teamRes)).toBe(false); + expect(Option.unwrap(teamRes).getIsEntered()).toBe(false); + }); + + it('試合表生成後はエントリーをキャンセルできない', async () => { + preMatchRepository.clear(testCreateRunResultPreData); + const res = await service.cancel(enteredTeamID); + + expect(Result.isErr(res)).toBe(true); + expect(Result.unwrapErr(res)).toStrictEqual(new Error('Cannot modify entry now')); + + const teamRes = await teamRepository.findByID(enteredTeamID); + expect(Option.isNone(teamRes)).toBe(false); + expect(Option.unwrap(teamRes).getIsEntered()).toBe(true); + }); }); diff --git a/packages/kcms/src/team/service/entry.ts b/packages/kcms/src/team/service/entry.ts index d5159e9a..a3e1b7b9 100644 --- a/packages/kcms/src/team/service/entry.ts +++ b/packages/kcms/src/team/service/entry.ts @@ -1,4 +1,5 @@ import { Option, Result } from '@mikuroxina/mini-fn'; +import { GetMatchService } from '../../match/service/get'; import { TeamRepository } from '../models/repository'; import { Team, TeamID } from '../models/team'; @@ -6,7 +7,10 @@ import { Team, TeamID } from '../models/team'; * 当日参加を行うService */ export class EntryService { - constructor(private readonly teamRepository: TeamRepository) {} + constructor( + private readonly teamRepository: TeamRepository, + private readonly preMatch: GetMatchService + ) {} /** * チームの出欠を登録します @@ -18,8 +22,13 @@ export class EntryService { if (Option.isNone(teamRes)) { return Result.err(new Error('Team not found')); } - const team = Option.unwrap(teamRes); + const isEntryModifiable = await this.isEntryModifiable(); + if (Result.isErr(isEntryModifiable)) { + return isEntryModifiable; + } + + const team = Option.unwrap(teamRes); team.enter(); const res = await this.teamRepository.update(team); if (Result.isErr(res)) { @@ -38,8 +47,13 @@ export class EntryService { if (Option.isNone(teamRes)) { return Result.err(new Error('Team not found')); } - const team = Option.unwrap(teamRes); + const isEntryModifiable = await this.isEntryModifiable(); + if (Result.isErr(isEntryModifiable)) { + return isEntryModifiable; + } + + const team = Option.unwrap(teamRes); team.cancelEntry(); const res = await this.teamRepository.update(team); if (Result.isErr(res)) { @@ -48,4 +62,15 @@ export class EntryService { return Result.ok(team); } + + /** + * 試合表が生成されているかを確認する + */ + private async isEntryModifiable(): Promise> { + const matchRes = await this.preMatch.findAllPreMatch(); + if (Result.isOk(matchRes) && Result.unwrap(matchRes).length > 0) { + return Result.err(new Error('Cannot modify entry now')); + } + return Result.ok(undefined); + } } diff --git a/packages/kcms/src/testData/entry.ts b/packages/kcms/src/testData/entry.ts index b05ea1f5..907f5a93 100644 --- a/packages/kcms/src/testData/entry.ts +++ b/packages/kcms/src/testData/entry.ts @@ -1,4 +1,4 @@ -import { DepartmentType } from 'config'; +import { config, DepartmentType } from 'config'; import { Team, TeamID } from '../team/models/team.js'; export const TestEntryData = { @@ -32,22 +32,24 @@ export const TestEntryData = { robotType: 'wheel', departmentType: 'elementary', }), - NotEntered: Team.reconstruct({ - id: '6' as TeamID, - teamName: 'TestTeam6', - members: ['TestTaro6'], - robotType: 'leg', - departmentType: 'elementary', - isEntered: false, - }), - Entered: Team.reconstruct({ - id: '7' as TeamID, - teamName: 'TestTeam7', - members: ['TestTaro7'], - robotType: 'leg', - departmentType: 'elementary', - isEntered: true, - }), + NotEntered: () => + Team.reconstruct({ + id: '6' as TeamID, + teamName: 'TestTeam6', + members: ['TestTaro6'], + robotType: config.robotTypes[0], + departmentType: config.departmentTypes[0], + isEntered: false, + }), + Entered: () => + Team.reconstruct({ + id: '7' as TeamID, + teamName: 'TestTeam7', + members: ['TestTaro7'], + robotType: config.robotTypes[0], + departmentType: config.departmentTypes[0], + isEntered: true, + }), }; const testDataGenerator = (args: { From 4949538735c7bb43fc2e62de23037a25b48b545a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 17:24:44 +0000 Subject: [PATCH 02/27] chore(deps): update dependency react-timer-hook to v3.0.8 --- pnpm-lock.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9a01fd21..d66ea297 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -166,7 +166,7 @@ importers: version: 6.27.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-timer-hook: specifier: ^3.0.7 - version: 3.0.7(react@18.3.1) + version: 3.0.8(react@18.3.1) devDependencies: '@eslint/compat': specifier: ^1.1.1 @@ -2649,8 +2649,8 @@ packages: peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-timer-hook@3.0.7: - resolution: {integrity: sha512-ATpNcU+PQRxxfNBPVqce2+REtjGAlwmfoNQfcEBMZFxPj0r3GYdKhyPHdStvqrejejEi0QvqaJZjy2lBlFvAsA==} + react-timer-hook@3.0.8: + resolution: {integrity: sha512-bi2e7DhPBU1MRPU4ZHaVqBmgM9e2HK0ae8O2AIqwqjcPo4/qR7lVGQonOQLAKOZPQCJSYfV8F5aBWzOLXElzqQ==} peerDependencies: react: '>=16.8.0' @@ -5326,7 +5326,7 @@ snapshots: transitivePeerDependencies: - '@types/react' - react-timer-hook@3.0.7(react@18.3.1): + react-timer-hook@3.0.8(react@18.3.1): dependencies: react: 18.3.1 From 7f8aa0f22f27892d1bb292d8c970c3b07e4e8e5c Mon Sep 17 00:00:00 2001 From: tufusa Date: Thu, 24 Oct 2024 08:13:03 +0900 Subject: [PATCH 03/27] =?UTF-8?q?feat:=20=E8=A9=A6=E5=90=88=E4=B8=80?= =?UTF-8?q?=E8=A6=A7=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=A7=E6=9C=AC=E6=88=A6?= =?UTF-8?q?=E8=A9=A6=E5=90=88=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B?= =?UTF-8?q?=20(#572)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: SegmentedControlをコンポーネント化 * feat: 本戦試合を表示 --- .../components/DepartmentSegmentedControl.tsx | 20 ++ .../components/LabeledSegmentedControl.tsx | 23 +++ .../components/MatchTypeSegmentedControl.tsx | 20 ++ packages/kcmsf/src/components/matchStatus.tsx | 3 +- packages/kcmsf/src/pages/matchList.tsx | 180 +++++++++++------- packages/kcmsf/src/pages/ranking.tsx | 79 ++------ 6 files changed, 191 insertions(+), 134 deletions(-) create mode 100644 packages/kcmsf/src/components/DepartmentSegmentedControl.tsx create mode 100644 packages/kcmsf/src/components/LabeledSegmentedControl.tsx create mode 100644 packages/kcmsf/src/components/MatchTypeSegmentedControl.tsx diff --git a/packages/kcmsf/src/components/DepartmentSegmentedControl.tsx b/packages/kcmsf/src/components/DepartmentSegmentedControl.tsx new file mode 100644 index 00000000..e7658cba --- /dev/null +++ b/packages/kcmsf/src/components/DepartmentSegmentedControl.tsx @@ -0,0 +1,20 @@ +import { config, DepartmentType } from "config"; +import { LabeledSegmentedControl } from "./LabeledSegmentedControl"; + +export const DepartmentSegmentedControl = ({ + departmentType, + setDepartmentType, +}: { + departmentType: DepartmentType; + setDepartmentType: (departmentType: DepartmentType) => void; +}) => ( + ({ + label: name, + value: type, + }))} + value={departmentType} + onChange={(value) => setDepartmentType(value as DepartmentType)} + /> +); diff --git a/packages/kcmsf/src/components/LabeledSegmentedControl.tsx b/packages/kcmsf/src/components/LabeledSegmentedControl.tsx new file mode 100644 index 00000000..b200e7c2 --- /dev/null +++ b/packages/kcmsf/src/components/LabeledSegmentedControl.tsx @@ -0,0 +1,23 @@ +import { + Group, + SegmentedControl, + SegmentedControlItem, + Text, +} from "@mantine/core"; + +export const LabeledSegmentedControl = ({ + label, + data, + value, + onChange, +}: { + label: string; + data: (string | SegmentedControlItem)[]; + value: string; + onChange: (value: string) => void; +}) => ( + + {label} + + +); diff --git a/packages/kcmsf/src/components/MatchTypeSegmentedControl.tsx b/packages/kcmsf/src/components/MatchTypeSegmentedControl.tsx new file mode 100644 index 00000000..b1743287 --- /dev/null +++ b/packages/kcmsf/src/components/MatchTypeSegmentedControl.tsx @@ -0,0 +1,20 @@ +import { config, MatchType } from "config"; +import { LabeledSegmentedControl } from "./LabeledSegmentedControl"; + +export const MatchSegmentedControl = ({ + matchType, + setMatchType, +}: { + matchType: MatchType; + setMatchType: (matchType: MatchType) => void; +}) => ( + ({ + label: name, + value: type, + }))} + value={matchType} + onChange={(value) => setMatchType(value as MatchType)} + /> +); diff --git a/packages/kcmsf/src/components/matchStatus.tsx b/packages/kcmsf/src/components/matchStatus.tsx index ecf2a3d4..4fff6ec2 100644 --- a/packages/kcmsf/src/components/matchStatus.tsx +++ b/packages/kcmsf/src/components/matchStatus.tsx @@ -1,7 +1,8 @@ import { Button, MantineColor, Text } from "@mantine/core"; import { MatchInfo } from "config"; import { LinkToMatch } from "./linkToMatch"; -type StatusButtonProps = { + +export type StatusButtonProps = { id: string; status: "now" | "future" | "end"; matchType: MatchInfo["matchType"]; diff --git a/packages/kcmsf/src/pages/matchList.tsx b/packages/kcmsf/src/pages/matchList.tsx index 5f957a09..2d3cb905 100644 --- a/packages/kcmsf/src/pages/matchList.tsx +++ b/packages/kcmsf/src/pages/matchList.tsx @@ -10,36 +10,59 @@ import { } from "@mantine/core"; import { useDisclosure } from "@mantine/hooks"; import { notifications } from "@mantine/notifications"; +import { Cat } from "@mikuroxina/mini-fn"; import { IconRefresh } from "@tabler/icons-react"; -import { config, DepartmentType, MatchType } from "config"; +import { config, DepartmentType, isMatchType, MatchType } from "config"; import { useCallback, useEffect, useMemo, useState } from "react"; +import { useSearchParams } from "react-router-dom"; import { CourseSelector } from "../components/courseSelector"; import { GenerateMatchButton } from "../components/GenerateMatchButton"; -import { MatchStatusButton } from "../components/matchStatus"; -import { Match, PreMatch } from "../types/match"; +import { + MatchStatusButton, + StatusButtonProps, +} from "../components/matchStatus"; +import { MatchSegmentedControl } from "../components/MatchTypeSegmentedControl"; +import { GetMatchesResponse } from "../types/api/match"; +import { Match } from "../types/match"; export const MatchList = () => { - const [preMatches, setPreMatches] = useState([]); + const [matches, setMatches] = useState({ + pre: [], + main: [], + }); const [courses, setCourses] = useState([]); - const [select, setSelect] = useState("all"); + const [selectedCourse, setSelectedCourse] = useState("all"); const [loading, { open: startLoading, close: finishLoading }] = useDisclosure(false); const [error, setError] = useState(false); - const processedPreMatches = useMemo( + + const [searchParams] = useSearchParams(); + const [matchType, setMatchType] = useState( + Cat.cat(searchParams.get("match_type")).feed((value) => + value && isMatchType(value) ? value : "pre" + ).value + ); + + const processedMatches = useMemo( () => - select == "all" - ? preMatches - : preMatches.filter( - (match) => Number(match.matchCode.split("-")[0]) == select - ), - [preMatches, select] + Cat.cat(matches) + .feed((matches) => matches[matchType]) + .feed((matches) => + selectedCourse == "all" + ? matches + : matches.filter( + (match) => + Number(match.matchCode.split("-")[0]) == selectedCourse + ) + ).value, + [matches, matchType, selectedCourse] ); - const fetchPre = useCallback(async () => { + const fetchMatches = useCallback(async () => { setError(false); startLoading(); - const res = await fetch(`${import.meta.env.VITE_API_URL}/match/pre`, { + const res = await fetch(`${import.meta.env.VITE_API_URL}/match`, { method: "GET", }).catch(() => undefined); @@ -49,12 +72,14 @@ export const MatchList = () => { return; } - const data = (await res.json()) as PreMatch[]; + const data = (await res.json()) as GetMatchesResponse; - setPreMatches(data); + setMatches(data); setCourses([ ...new Set( - data.map((match: Match) => Number(match.matchCode.split("-")[0])) + Object.values(data) + .flat() + .map((match: Match) => Number(match.matchCode.split("-")[0])) ), ]); @@ -82,7 +107,7 @@ export const MatchList = () => { ); useEffect(() => { - fetchPre(); + fetchMatches(); }, []); // eslint-disable-line react-hooks/exhaustive-deps return ( @@ -97,26 +122,20 @@ export const MatchList = () => { 試合表 - {preMatches.length > 0 && ( + + {processedMatches.length > 0 && ( <> - + - - - 試合番号 - コート番号 - 左コート - 右コート - -
状態
-
-
-
+ - {processedPreMatches.map((match) => ( - + {processedMatches.map((match) => ( + ))}
@@ -133,13 +152,13 @@ export const MatchList = () => { サーバーからのフェッチに失敗しました。 - )} - {preMatches.length === 0 && !loading && !error && ( + {processedMatches.length === 0 && !loading && !error && ( <> 現在試合はありません。 { generateMatch("pre", departmentType) ) ); - fetchPre(); + fetchMatches(); }} modalTitle="予選試合表生成確認" modalDetail={ @@ -172,36 +191,61 @@ export const MatchList = () => { ); }; -const PreMatchRow = ({ match }: { match: PreMatch }) => ( - - -
- {match.matchCode} -
-
- -
- {Number(match.matchCode.split("-")[0])} -
-
- - - {match.leftTeam?.teamName} - - - - - {match.rightTeam?.teamName} - - - -
- -
-
-
+const MatchHead = ({ matchType }: { matchType: MatchType }) => ( + + + 試合番号 + コース番号 + {matchType == "pre" ? "左チーム" : "チーム1"} + {matchType == "pre" ? "右チーム" : "チーム2"} + 状態 + + ); + +const MatchColumn = ({ match }: { match: Match }) => { + const matchStatus: StatusButtonProps["status"] = useMemo(() => { + if (match.runResults.length == 0) return "future"; + + const maxRunResultLength = { pre: 2, main: 4 }[match.matchType]; + return match.runResults.length < maxRunResultLength ? "now" : "end"; + }, [match.runResults, match.matchType]); + + return ( + + + + {match.matchCode} + + + + + {Number(match.matchCode.split("-")[0])} + + + + + {match.matchType == "pre" + ? match.leftTeam?.teamName + : match.team1?.teamName} + + + + + {match.matchType == "pre" + ? match.rightTeam?.teamName + : match.team2?.teamName} + + + +
+ +
+
+
+ ); +}; diff --git a/packages/kcmsf/src/pages/ranking.tsx b/packages/kcmsf/src/pages/ranking.tsx index 278a556b..dffeb23a 100644 --- a/packages/kcmsf/src/pages/ranking.tsx +++ b/packages/kcmsf/src/pages/ranking.tsx @@ -4,7 +4,7 @@ import { Flex, List, Paper, - SegmentedControl, + Stack, Table, Text, Title, @@ -14,7 +14,9 @@ import { notifications } from "@mantine/notifications"; import { config, DepartmentType, MatchType } from "config"; import { useCallback, useEffect, useState } from "react"; import { useNavigate } from "react-router-dom"; +import { DepartmentSegmentedControl } from "../components/DepartmentSegmentedControl"; import { GenerateMatchButton } from "../components/GenerateMatchButton"; +import { MatchSegmentedControl } from "../components/MatchTypeSegmentedControl"; import { useInterval } from "../hooks/useInterval"; import { GetRankingResponse } from "../types/api/contest"; import { GeneratePreMatchManualRequest } from "../types/api/match"; @@ -71,7 +73,7 @@ export const Ranking = () => { color: isSucceeded ? "green" : "red", }); - if (isSucceeded) navigate("/matchlist"); + if (isSucceeded) navigate("/matchlist?match_type=main"); }, [departmentType, navigate] ); @@ -85,12 +87,16 @@ export const Ranking = () => { return ( ランキング - + + + + { ); }; -const Control = ({ - matchType, - departmentType, - setMatchType, - setDepartmentType, -}: { - matchType: MatchType; - departmentType: DepartmentType; - setMatchType: (matchType: MatchType) => void; - setDepartmentType: (departmentType: DepartmentType) => void; -}) => { - const theme = useMantineTheme(); - - return ( - - - - - - 試合の種別: - - - - ({ - label: match.name, - value: match.type, - }))} - value={matchType} - onChange={(value) => setMatchType(value as MatchType)} - fullWidth - /> - - - - - - 部門: - - - - ({ - label: department.name, - value: department.type, - }))} - value={departmentType} - onChange={(value) => setDepartmentType(value as DepartmentType)} - fullWidth - /> - - - -
- ); -}; - const RankingRow = ({ record, selectable, From d8ac225f83e7a82be223c47aa4a3f16951e8e366 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 23:13:47 +0000 Subject: [PATCH 04/27] chore(deps): update dependency @scalar/hono-api-reference to v0.5.156 --- pnpm-lock.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d66ea297..4dc7d8f6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,7 +63,7 @@ importers: version: 5.21.1(prisma@5.21.1) '@scalar/hono-api-reference': specifier: ^0.5.152 - version: 0.5.155(hono@4.6.5) + version: 0.5.156(hono@4.6.5) config: specifier: workspace:^ version: link:../config @@ -1325,18 +1325,18 @@ packages: cpu: [x64] os: [win32] - '@scalar/hono-api-reference@0.5.155': - resolution: {integrity: sha512-7sUxr/EFUyO3suACAIN5dUXKAyZAI3XEW/J/qSkMZHyWPBfhJb/ZhvaU+hNQlR0GEb3zg5aC6D9qK3Z3zEXjAA==} + '@scalar/hono-api-reference@0.5.156': + resolution: {integrity: sha512-/byPVH0rs40qxuOInnikDeq+19wQZ0NIq0K3WJMNBeZvr0lpGqsBf4frj0soon8UAVq/uZnOMcK6jwcC50a0bg==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 - '@scalar/openapi-types@0.1.3': - resolution: {integrity: sha512-UPUquC/ZSAdeSDbpdqMzeBVcgeytqJTj9P3QR4X9IRti5I1jXoCOUBY84CGGLXfcWquB7wfwHxn3DqQEnQmBVw==} + '@scalar/openapi-types@0.1.4': + resolution: {integrity: sha512-+wRXgmqzgDnj8Dxqf4OOPMPo4or/LRd1Bsy4pnrIW0yBt8rKSdtBb+jH/aRnhgDDmKVjWxJ+KFk7WlSKvZwNTw==} engines: {node: '>=18'} - '@scalar/types@0.0.16': - resolution: {integrity: sha512-9Pcp4xdQuRGwf4bZmx1e6NKz5QD06kG4S8kxryD3UfVCtnDDqBG6vUWJjjkFzlUK/jvAx7Rl92C4mK5GrauTng==} + '@scalar/types@0.0.17': + resolution: {integrity: sha512-wUrvNnYFMULsHENX/9TP3oyECRTtZsP06mOZU+RlWg9sRtzWVTjlBCahkgUETL93J+Bz2RLFSKVgPyNN4fpIpA==} engines: {node: '>=18'} '@swc/core-darwin-arm64@1.7.26': @@ -3906,16 +3906,16 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.24.0': optional: true - '@scalar/hono-api-reference@0.5.155(hono@4.6.5)': + '@scalar/hono-api-reference@0.5.156(hono@4.6.5)': dependencies: - '@scalar/types': 0.0.16 + '@scalar/types': 0.0.17 hono: 4.6.5 - '@scalar/openapi-types@0.1.3': {} + '@scalar/openapi-types@0.1.4': {} - '@scalar/types@0.0.16': + '@scalar/types@0.0.17': dependencies: - '@scalar/openapi-types': 0.1.3 + '@scalar/openapi-types': 0.1.4 '@unhead/schema': 1.11.10 '@swc/core-darwin-arm64@1.7.26': From 9b0e097c1a5b7018722666b967614e8c65afded3 Mon Sep 17 00:00:00 2001 From: tufusa Date: Thu, 24 Oct 2024 13:44:44 +0900 Subject: [PATCH 05/27] =?UTF-8?q?feat:=20=E8=A9=A6=E5=90=88=E7=94=9F?= =?UTF-8?q?=E6=88=90=E3=83=9C=E3=82=BF=E3=83=B3=E3=82=92=E4=BA=88=E9=81=B8?= =?UTF-8?q?=E9=81=B8=E6=8A=9E=E6=99=82=E3=81=AB=E3=81=97=E3=81=8B=E6=8A=BC?= =?UTF-8?q?=E3=81=9B=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=20(#578)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/kcmsf/src/pages/matchList.tsx | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/packages/kcmsf/src/pages/matchList.tsx b/packages/kcmsf/src/pages/matchList.tsx index 2d3cb905..47bae46f 100644 --- a/packages/kcmsf/src/pages/matchList.tsx +++ b/packages/kcmsf/src/pages/matchList.tsx @@ -4,6 +4,7 @@ import { Flex, List, Loader, + Stack, Table, Text, Title, @@ -111,17 +112,8 @@ export const MatchList = () => { }, []); // eslint-disable-line react-hooks/exhaustive-deps return ( - - - 試合表 - + + 試合表 { generate={async () => { await Promise.all( config.departmentTypes.map((departmentType) => - generateMatch("pre", departmentType) + generateMatch(matchType, departmentType) ) ); fetchMatches(); }} - modalTitle="予選試合表生成確認" + modalTitle={`${config.match[matchType].name}試合表生成確認`} modalDetail={ <> 以下の試合表を生成します: {config.departmentTypes.map((departmentType) => ( - {config.match.pre.name}  + {config.match[matchType].name}  {config.department[departmentType].name} ))} } + disabled={matchType != "pre"} // TODO: 本戦試合も生成できるように /> )} - + ); }; From bac2ca304aeaef623de48dc82526a4492675fda7 Mon Sep 17 00:00:00 2001 From: tufusa Date: Thu, 24 Oct 2024 14:21:17 +0900 Subject: [PATCH 06/27] =?UTF-8?q?feat:=20=E6=9C=AC=E6=88=A6=E8=A9=A6?= =?UTF-8?q?=E5=90=88=E3=82=92=E7=94=9F=E6=88=90=E3=81=A7=E3=81=8D=E3=82=8B?= =?UTF-8?q?=E3=81=8B=E3=82=92=E7=A2=BA=E8=AA=8D=E3=81=99=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=20(#576)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/GenerateMainMatchCard.tsx | 138 ++++++++++++++++++ packages/kcmsf/src/pages/ranking.tsx | 61 +------- 2 files changed, 142 insertions(+), 57 deletions(-) create mode 100644 packages/kcmsf/src/components/GenerateMainMatchCard.tsx diff --git a/packages/kcmsf/src/components/GenerateMainMatchCard.tsx b/packages/kcmsf/src/components/GenerateMainMatchCard.tsx new file mode 100644 index 00000000..348ce1f2 --- /dev/null +++ b/packages/kcmsf/src/components/GenerateMainMatchCard.tsx @@ -0,0 +1,138 @@ +import { + Button, + Divider, + List, + LoadingOverlay, + Paper, + Stack, + Text, + Title, +} from "@mantine/core"; +import { useFetch } from "@mantine/hooks"; +import { IconRefresh } from "@tabler/icons-react"; +import { DepartmentType } from "config"; +import { useMemo } from "react"; +import { RankingRecord } from "../types/contest"; +import { MainMatch } from "../types/match"; +import { GenerateMatchButton } from "./GenerateMatchButton"; + +export const GenerateMainMatchCard = ({ + requiredTeamCount, + selectedTeams, + departmentType, + generate, +}: { + requiredTeamCount: number; + selectedTeams: RankingRecord[]; + departmentType: DepartmentType; + generate: (team1ID: string, team2ID: string) => Promise; +}) => { + const { + data: mainMatches, + error, + loading, + refetch, + } = useFetch(`${import.meta.env.VITE_API_URL}/match/main`); + + const remainingTeamCount = requiredTeamCount - selectedTeams.length; + const processedMainMatch = useMemo( + () => + mainMatches?.filter((match) => match.departmentType == departmentType), + [mainMatches, departmentType] + ); + + const isGenerable = !loading && processedMainMatch?.length === 0 && !error; + + return ( + + + 本戦試合生成 + + {isGenerable ? ( + + ) : ( + + )} + + + ); +}; + +const NotGenerableBody = ({ + loading, + matches, + isError, + refetch, +}: { + loading: boolean; + matches?: MainMatch[]; + isError?: boolean; + refetch: () => void; +}) => ( + + 本戦試合は現在生成できません。 + + {isError && データフェッチに失敗しました。} + {matches?.length === 0 && ( + 本戦試合が既に存在しています。 + )} + + +); + +const GenerableBody = ({ + selectedTeams, + remainingTeamCount, + generate, +}: { + selectedTeams: RankingRecord[]; + remainingTeamCount: number; + generate: (team1ID: string, team2ID: string) => Promise; +}) => ( + <> + 現在選択しているチーム: + + {selectedTeams.map(({ teamID, teamName }) => ( + {teamName} + ))} + + {remainingTeamCount > 0 && ( + + 本戦試合の生成にはあと{remainingTeamCount} + チームの選択が必要です。 + + )} + + generate(selectedTeams[0].teamID, selectedTeams[1].teamID) + } + disabled={remainingTeamCount > 0} + modalTitle="本戦試合表生成確認" + modalDetail={ + <> + 以下のチームによる本戦試合を生成します: + + {selectedTeams.map(({ teamID, teamName }) => ( + {teamName} + ))} + + + } + /> + +); diff --git a/packages/kcmsf/src/pages/ranking.tsx b/packages/kcmsf/src/pages/ranking.tsx index dffeb23a..1bb02bca 100644 --- a/packages/kcmsf/src/pages/ranking.tsx +++ b/packages/kcmsf/src/pages/ranking.tsx @@ -1,12 +1,8 @@ import { Checkbox, - Divider, Flex, - List, - Paper, Stack, Table, - Text, Title, useMantineTheme, } from "@mantine/core"; @@ -15,7 +11,7 @@ import { config, DepartmentType, MatchType } from "config"; import { useCallback, useEffect, useState } from "react"; import { useNavigate } from "react-router-dom"; import { DepartmentSegmentedControl } from "../components/DepartmentSegmentedControl"; -import { GenerateMatchButton } from "../components/GenerateMatchButton"; +import { GenerateMainMatchCard } from "../components/GenerateMainMatchCard"; import { MatchSegmentedControl } from "../components/MatchTypeSegmentedControl"; import { useInterval } from "../hooks/useInterval"; import { GetRankingResponse } from "../types/api/contest"; @@ -125,7 +121,7 @@ export const Ranking = () => { {ranking?.map((record) => ( - { )} @@ -155,7 +152,7 @@ export const Ranking = () => { ); }; -const RankingRow = ({ +const RankingColumn = ({ record, selectable, selected, @@ -195,53 +192,3 @@ const RankingRow = ({ ); }; - -const GenerateMainMatchCard = ({ - requiredTeamCount, - selectedTeams, - generate, -}: { - requiredTeamCount: number; - selectedTeams: RankingRecord[]; - generate: (team1ID: string, team2ID: string) => Promise; -}) => { - const remainingTeamCount = requiredTeamCount - selectedTeams.length; - - return ( - - - 本戦試合生成 - - 現在選択しているチーム: - - {selectedTeams.map(({ teamID, teamName }) => ( - {teamName} - ))} - - {remainingTeamCount > 0 && ( - - 本戦試合の生成にはあと{remainingTeamCount} - チームの選択が必要です。 - - )} - - generate(selectedTeams[0].teamID, selectedTeams[1].teamID) - } - disabled={remainingTeamCount > 0} - modalTitle="本戦試合表生成確認" - modalDetail={ - <> - 以下のチームによる本戦試合を生成します: - - {selectedTeams.map(({ teamID, teamName }) => ( - {teamName} - ))} - - - } - /> - - - ); -}; From 3370b91a4ea42113ef4dad1adeb0dd83e27c8b43 Mon Sep 17 00:00:00 2001 From: tufusa Date: Thu, 24 Oct 2024 16:16:59 +0900 Subject: [PATCH 07/27] =?UTF-8?q?fix:=20=E6=9C=AC=E6=88=A6=E8=A9=A6?= =?UTF-8?q?=E5=90=88=E3=81=8C=E5=AD=98=E5=9C=A8=E3=81=99=E3=82=8B=E3=81=93?= =?UTF-8?q?=E3=81=A8=E3=82=92=E8=A6=8B=E3=82=8B=E6=9D=A1=E4=BB=B6=E5=BC=8F?= =?UTF-8?q?=E3=82=92=E6=AD=A3=E3=81=97=E3=81=84=E3=82=82=E3=81=AE=E3=81=AB?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20(#581)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/kcmsf/src/components/GenerateMainMatchCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kcmsf/src/components/GenerateMainMatchCard.tsx b/packages/kcmsf/src/components/GenerateMainMatchCard.tsx index 348ce1f2..16161dfc 100644 --- a/packages/kcmsf/src/components/GenerateMainMatchCard.tsx +++ b/packages/kcmsf/src/components/GenerateMainMatchCard.tsx @@ -86,7 +86,7 @@ const NotGenerableBody = ({ overlayProps={{ radius: "sm", blur: 2 }} /> {isError && データフェッチに失敗しました。} - {matches?.length === 0 && ( + {matches && matches.length > 0 && ( 本戦試合が既に存在しています。 )} @@ -161,7 +73,7 @@ export const Match = () => { leftSection={} size="xl" fw="normal" - onClick={() => resetPointState("left")} + onClick={() => onClickReset("left")} > リセット @@ -185,7 +97,7 @@ export const Match = () => { leftSection={} size="xl" fw="normal" - onClick={() => resetPointState("right")} + onClick={() => onClickReset("right")} > リセット @@ -243,6 +155,13 @@ export const Match = () => { teamName: matchInfo.teams.right.teamName, }, }} + onSubmit={(isSucceeded) => { + if (!isSucceeded) return; + + navigate(`/matchlist?match_type=${matchType}`, { + viewTransition: true, + }); + }} /> )}
From 291e1bcf81ca6414ce1839fd963f99ff68197031 Mon Sep 17 00:00:00 2001 From: tufusa Date: Sat, 26 Oct 2024 22:10:31 +0900 Subject: [PATCH 25/27] Revert "chore(deps): update dependency @tabler/icons-react to v3.20.0" (#606) This reverts commit bedb77b9ec91775e5298cdf4892b33fcd659cbe7. --- packages/kcmsf/package.json | 2 +- pnpm-lock.yaml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/kcmsf/package.json b/packages/kcmsf/package.json index 0b778867..cae8e7ab 100644 --- a/packages/kcmsf/package.json +++ b/packages/kcmsf/package.json @@ -20,7 +20,7 @@ "@mantine/hooks": "^7.3.1", "@mantine/notifications": "7.13.3", "@mikuroxina/mini-fn": "^6.0.0", - "@tabler/icons-react": "3.20.0", + "@tabler/icons-react": "3.17.0", "config": "workspace:^", "embla-carousel-autoplay": "^8.0.0", "embla-carousel-react": "^8.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d7fca2cc..dd88ae92 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -144,8 +144,8 @@ importers: specifier: ^6.0.0 version: 6.6.0 '@tabler/icons-react': - specifier: 3.20.0 - version: 3.20.0(react@18.3.1) + specifier: 3.17.0 + version: 3.17.0(react@18.3.1) config: specifier: workspace:^ version: link:../config @@ -1418,13 +1418,13 @@ packages: '@swc/types@0.1.12': resolution: {integrity: sha512-wBJA+SdtkbFhHjTMYH+dEH1y4VpfGdAc2Kw/LK09i9bXd/K6j6PkDcFCEzb6iVfZMkPRrl/q0e3toqTAJdkIVA==} - '@tabler/icons-react@3.20.0': - resolution: {integrity: sha512-a47oaL48bb5Cx/WUVfg/NZrsWwFExrcDQO8thUZ7S6h/OQYFu7sm4E5pZsmUtGCjikB3lRzjtmMD+C4s7mr9yw==} + '@tabler/icons-react@3.17.0': + resolution: {integrity: sha512-Ndm9Htv7KpIU1PYYrzs5EMhyA3aZGcgaxUp9Q1XOxcRZ+I0X+Ub2WS5f4bkRyDdL1s0++k2T9XRgmg2pG113sw==} peerDependencies: react: '>= 16' - '@tabler/icons@3.20.0': - resolution: {integrity: sha512-nXSeUzsCOxX/Of+kdUVQfxL9bG+ck8XCWNf9dGSpE+nhVexRwk/4HiDQDxFDysfT7vfgSut6GXnrZsU5M5dSlA==} + '@tabler/icons@3.17.0': + resolution: {integrity: sha512-sCSfAQ0w93KSnSL7tS08n73CdIKpuHP8foeLMWgDKiZaCs8ZE//N3ytazCk651ZtruTtByI3b+ZDj7nRf+hHvA==} '@testing-library/dom@10.4.0': resolution: {integrity: sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==} @@ -4017,12 +4017,12 @@ snapshots: dependencies: '@swc/counter': 0.1.3 - '@tabler/icons-react@3.20.0(react@18.3.1)': + '@tabler/icons-react@3.17.0(react@18.3.1)': dependencies: - '@tabler/icons': 3.20.0 + '@tabler/icons': 3.17.0 react: 18.3.1 - '@tabler/icons@3.20.0': {} + '@tabler/icons@3.17.0': {} '@testing-library/dom@10.4.0': dependencies: From 68bb028cc580fe727d353ffe1b4dc60500e61543 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 26 Oct 2024 15:57:50 +0000 Subject: [PATCH 26/27] chore(deps): update dependency @types/node to v20.17.0 --- pnpm-lock.yaml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dd88ae92..1bb64338 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -88,7 +88,7 @@ importers: version: 9.13.0 '@types/node': specifier: ^20.10.2 - version: 20.16.15 + version: 20.17.0 '@typescript-eslint/eslint-plugin': specifier: ^8.0.0 version: 8.11.0(@typescript-eslint/parser@8.11.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3) @@ -121,7 +121,7 @@ importers: version: 4.19.1 vitest: specifier: ^2.0.0 - version: 2.1.3(@types/node@20.16.15)(@vitest/ui@2.1.3)(jsdom@25.0.1)(sugarss@4.0.1(postcss@8.4.47)) + version: 2.1.3(@types/node@20.17.0)(@vitest/ui@2.1.3)(jsdom@25.0.1)(sugarss@4.0.1(postcss@8.4.47)) packages/kcmsf: dependencies: @@ -1479,8 +1479,8 @@ packages: '@types/node-forge@1.3.11': resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} - '@types/node@20.16.15': - resolution: {integrity: sha512-DV58qQz9dBMqVVn+qnKwGa51QzCD4YM/tQM16qLKxdf5tqz5W4QwtrMzjSTbabN1cFTSuyxVYBy+QWHjWW8X/g==} + '@types/node@20.17.0': + resolution: {integrity: sha512-a7zRo0f0eLo9K5X9Wp5cAqTUNGzuFLDG2R7C4HY2BhcMAsxgSPuRvAC1ZB6QkuUQXf0YZAgfOX2ZyrBa2n4nHQ==} '@types/node@22.8.1': resolution: {integrity: sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg==} @@ -4090,7 +4090,7 @@ snapshots: dependencies: '@types/node': 22.8.1 - '@types/node@20.16.15': + '@types/node@20.17.0': dependencies: undici-types: 6.19.8 @@ -4276,13 +4276,13 @@ snapshots: chai: 5.1.1 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.3(@vitest/spy@2.1.3)(vite@5.4.9(@types/node@20.16.15)(sugarss@4.0.1(postcss@8.4.47)))': + '@vitest/mocker@2.1.3(@vitest/spy@2.1.3)(vite@5.4.9(@types/node@20.17.0)(sugarss@4.0.1(postcss@8.4.47)))': dependencies: '@vitest/spy': 2.1.3 estree-walker: 3.0.3 magic-string: 0.30.12 optionalDependencies: - vite: 5.4.9(@types/node@20.16.15)(sugarss@4.0.1(postcss@8.4.47)) + vite: 5.4.9(@types/node@20.17.0)(sugarss@4.0.1(postcss@8.4.47)) '@vitest/mocker@2.1.3(@vitest/spy@2.1.3)(vite@5.4.9(@types/node@22.8.1)(sugarss@4.0.1(postcss@8.4.47)))': dependencies: @@ -5684,12 +5684,12 @@ snapshots: util-deprecate@1.0.2: {} - vite-node@2.1.3(@types/node@20.16.15)(sugarss@4.0.1(postcss@8.4.47)): + vite-node@2.1.3(@types/node@20.17.0)(sugarss@4.0.1(postcss@8.4.47)): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 - vite: 5.4.9(@types/node@20.16.15)(sugarss@4.0.1(postcss@8.4.47)) + vite: 5.4.9(@types/node@20.17.0)(sugarss@4.0.1(postcss@8.4.47)) transitivePeerDependencies: - '@types/node' - less @@ -5728,13 +5728,13 @@ snapshots: fsevents: 2.3.3 sugarss: 4.0.1(postcss@8.4.47) - vite@5.4.9(@types/node@20.16.15)(sugarss@4.0.1(postcss@8.4.47)): + vite@5.4.9(@types/node@20.17.0)(sugarss@4.0.1(postcss@8.4.47)): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.0 optionalDependencies: - '@types/node': 20.16.15 + '@types/node': 20.17.0 fsevents: 2.3.3 sugarss: 4.0.1(postcss@8.4.47) @@ -5748,10 +5748,10 @@ snapshots: fsevents: 2.3.3 sugarss: 4.0.1(postcss@8.4.47) - vitest@2.1.3(@types/node@20.16.15)(@vitest/ui@2.1.3)(jsdom@25.0.1)(sugarss@4.0.1(postcss@8.4.47)): + vitest@2.1.3(@types/node@20.17.0)(@vitest/ui@2.1.3)(jsdom@25.0.1)(sugarss@4.0.1(postcss@8.4.47)): dependencies: '@vitest/expect': 2.1.3 - '@vitest/mocker': 2.1.3(@vitest/spy@2.1.3)(vite@5.4.9(@types/node@20.16.15)(sugarss@4.0.1(postcss@8.4.47))) + '@vitest/mocker': 2.1.3(@vitest/spy@2.1.3)(vite@5.4.9(@types/node@20.17.0)(sugarss@4.0.1(postcss@8.4.47))) '@vitest/pretty-format': 2.1.3 '@vitest/runner': 2.1.3 '@vitest/snapshot': 2.1.3 @@ -5766,11 +5766,11 @@ snapshots: tinyexec: 0.3.1 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.9(@types/node@20.16.15)(sugarss@4.0.1(postcss@8.4.47)) - vite-node: 2.1.3(@types/node@20.16.15)(sugarss@4.0.1(postcss@8.4.47)) + vite: 5.4.9(@types/node@20.17.0)(sugarss@4.0.1(postcss@8.4.47)) + vite-node: 2.1.3(@types/node@20.17.0)(sugarss@4.0.1(postcss@8.4.47)) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 20.16.15 + '@types/node': 20.17.0 '@vitest/ui': 2.1.3(vitest@2.1.3) jsdom: 25.0.1 transitivePeerDependencies: From 2fe3977ec4625d93f419e5e7edcae924feb7687a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 26 Oct 2024 18:44:57 +0000 Subject: [PATCH 27/27] chore(deps): update mantine monorepo to v7.13.4 --- packages/kcmsf/package.json | 2 +- pnpm-lock.yaml | 92 +++++++++++++++++-------------------- 2 files changed, 43 insertions(+), 51 deletions(-) diff --git a/packages/kcmsf/package.json b/packages/kcmsf/package.json index cae8e7ab..06080166 100644 --- a/packages/kcmsf/package.json +++ b/packages/kcmsf/package.json @@ -18,7 +18,7 @@ "@mantine/core": "^7.3.1", "@mantine/dropzone": "^7.11.2", "@mantine/hooks": "^7.3.1", - "@mantine/notifications": "7.13.3", + "@mantine/notifications": "7.13.4", "@mikuroxina/mini-fn": "^6.0.0", "@tabler/icons-react": "3.17.0", "config": "workspace:^", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1bb64338..f56c9e39 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -127,19 +127,19 @@ importers: dependencies: '@mantine/carousel': specifier: ^7.3.1 - version: 7.13.3(@mantine/core@7.13.3(@mantine/hooks@7.13.3(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.13.3(react@18.3.1))(embla-carousel-react@8.3.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 7.13.4(@mantine/core@7.13.4(@mantine/hooks@7.13.4(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.13.4(react@18.3.1))(embla-carousel-react@8.3.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mantine/core': specifier: ^7.3.1 - version: 7.13.3(@mantine/hooks@7.13.3(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 7.13.4(@mantine/hooks@7.13.4(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mantine/dropzone': specifier: ^7.11.2 - version: 7.13.3(@mantine/core@7.13.3(@mantine/hooks@7.13.3(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.13.3(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 7.13.4(@mantine/core@7.13.4(@mantine/hooks@7.13.4(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.13.4(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mantine/hooks': specifier: ^7.3.1 - version: 7.13.3(react@18.3.1) + version: 7.13.4(react@18.3.1) '@mantine/notifications': - specifier: 7.13.3 - version: 7.13.3(@mantine/core@7.13.3(@mantine/hooks@7.13.3(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.13.3(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 7.13.4 + version: 7.13.4(@mantine/core@7.13.4(@mantine/hooks@7.13.4(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.13.4(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mikuroxina/mini-fn': specifier: ^6.0.0 version: 6.6.0 @@ -379,10 +379,6 @@ packages: resolution: {integrity: sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==} engines: {node: '>=6.9.0'} - '@babel/runtime@7.25.7': - resolution: {integrity: sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==} - engines: {node: '>=6.9.0'} - '@babel/runtime@7.26.0': resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} engines: {node: '>=6.9.0'} @@ -1157,45 +1153,45 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - '@mantine/carousel@7.13.3': - resolution: {integrity: sha512-FMJIRQJ2/HpnzKfiOnK2DHBxz6PT7ckFEYtaQHeGkSUl5VIyONUk1+brm8uwaFNNPKn8qjUD1ad9/6ePGQMsiA==} + '@mantine/carousel@7.13.4': + resolution: {integrity: sha512-moSwQzzShCNJRu2rKZIjvCJ9pt6uaIdqOEakZbWBmOcFVJaztnMwypxmmUpGiaDQ/9BCvfyLsFbCKlO+r+SQdQ==} peerDependencies: - '@mantine/core': 7.13.3 - '@mantine/hooks': 7.13.3 + '@mantine/core': 7.13.4 + '@mantine/hooks': 7.13.4 embla-carousel-react: '>=7.0.0' react: ^18.2.0 react-dom: ^18.2.0 - '@mantine/core@7.13.3': - resolution: {integrity: sha512-IV8xSr6rFQefKr2iOEhYYkJ6rZTDEp71qNkAfn90toSNjgT/2bgnqOxXwxqZ3bwo9DyNOAbEDzs1EfdIzln5aA==} + '@mantine/core@7.13.4': + resolution: {integrity: sha512-9I6+SqTq90pnI3WPmOQzQ1PL7IkhQg/5ft8Awhgut8tvk1VaKruDm/K5ysUG3ncHrP+QTI2UHYjNlUrux6HKlw==} peerDependencies: - '@mantine/hooks': 7.13.3 + '@mantine/hooks': 7.13.4 react: ^18.2.0 react-dom: ^18.2.0 - '@mantine/dropzone@7.13.3': - resolution: {integrity: sha512-N3MxrDiMlshqbVQjA52QZqPYhWFs8HPnB48zfHF9Vo+PEPeKT+Kf2q4SR/PSIubFKOyzJkW78kKzAjXmBdqmCw==} + '@mantine/dropzone@7.13.4': + resolution: {integrity: sha512-RmiBfi+u16vh0ZUjJvn8cUfsgScN0o/F/P4mZUFm7AE4ap7jUdIyBWr4aBiHu0v5DXKywNO6ZrsSaoZnpbiUgQ==} peerDependencies: - '@mantine/core': 7.13.3 - '@mantine/hooks': 7.13.3 + '@mantine/core': 7.13.4 + '@mantine/hooks': 7.13.4 react: ^18.2.0 react-dom: ^18.2.0 - '@mantine/hooks@7.13.3': - resolution: {integrity: sha512-r2c+Z8CdvPKFeOwg6mSJmxOp9K/ave5ZFR7eJbgv4wQU8K1CAS5f5ven9K5uUX8Vf9B5dFnSaSgYp9UY3vOWTw==} + '@mantine/hooks@7.13.4': + resolution: {integrity: sha512-B2QCegQyWlLdenVNaLNK8H9cTAjLW9JKJ3xWg+ShhpjZDHT2hjZz4L0Nt071Z7mPvyAaOwKGM0FyqTcTjdECfg==} peerDependencies: react: ^18.2.0 - '@mantine/notifications@7.13.3': - resolution: {integrity: sha512-G01Bf0g6zA+K6ZdBOIxhGIlpi3qITs6W5Z0fYTSQkzLcJSfECdR5KgRvNpzcx2ESTT8BfJJMsLySwh+WTzcoxw==} + '@mantine/notifications@7.13.4': + resolution: {integrity: sha512-CKd3tDGDAegkJYJIMHtF0St4hBpBVAujdmtsEin7UYeVq5N0YYe7j2T1Xu7Ry6dfObkuxeig6csxiJyBrZ2bew==} peerDependencies: - '@mantine/core': 7.13.3 - '@mantine/hooks': 7.13.3 + '@mantine/core': 7.13.4 + '@mantine/hooks': 7.13.4 react: ^18.2.0 react-dom: ^18.2.0 - '@mantine/store@7.13.3': - resolution: {integrity: sha512-95nAgH6APhak1OwP2W3ogdWBiWkIDhDSbQEm2G9LTJLIJxzWSm1mLe5uDWluVEPZW2XFx137McuJb58i1A+QhQ==} + '@mantine/store@7.13.4': + resolution: {integrity: sha512-DUlnXizE7aCjbVg2J3XLLKsOzt2c2qfQl2Xmx9l/BPE4FFZZKUqGDkYaTDbTAmnN3FVZ9xXycL7bAlq9udO8mA==} peerDependencies: react: ^18.2.0 @@ -3319,10 +3315,6 @@ snapshots: dependencies: regenerator-runtime: 0.14.1 - '@babel/runtime@7.25.7': - dependencies: - regenerator-runtime: 0.14.1 - '@babel/runtime@7.26.0': dependencies: regenerator-runtime: 0.14.1 @@ -3812,18 +3804,18 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@mantine/carousel@7.13.3(@mantine/core@7.13.3(@mantine/hooks@7.13.3(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.13.3(react@18.3.1))(embla-carousel-react@8.3.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mantine/carousel@7.13.4(@mantine/core@7.13.4(@mantine/hooks@7.13.4(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.13.4(react@18.3.1))(embla-carousel-react@8.3.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@mantine/core': 7.13.3(@mantine/hooks@7.13.3(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mantine/hooks': 7.13.3(react@18.3.1) + '@mantine/core': 7.13.4(@mantine/hooks@7.13.4(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mantine/hooks': 7.13.4(react@18.3.1) embla-carousel-react: 8.3.0(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@mantine/core@7.13.3(@mantine/hooks@7.13.3(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mantine/core@7.13.4(@mantine/hooks@7.13.4(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@floating-ui/react': 0.26.25(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mantine/hooks': 7.13.3(react@18.3.1) + '@mantine/hooks': 7.13.4(react@18.3.1) clsx: 2.1.1 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -3834,28 +3826,28 @@ snapshots: transitivePeerDependencies: - '@types/react' - '@mantine/dropzone@7.13.3(@mantine/core@7.13.3(@mantine/hooks@7.13.3(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.13.3(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mantine/dropzone@7.13.4(@mantine/core@7.13.4(@mantine/hooks@7.13.4(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.13.4(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@mantine/core': 7.13.3(@mantine/hooks@7.13.3(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mantine/hooks': 7.13.3(react@18.3.1) + '@mantine/core': 7.13.4(@mantine/hooks@7.13.4(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mantine/hooks': 7.13.4(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) react-dropzone-esm: 15.0.1(react@18.3.1) - '@mantine/hooks@7.13.3(react@18.3.1)': + '@mantine/hooks@7.13.4(react@18.3.1)': dependencies: react: 18.3.1 - '@mantine/notifications@7.13.3(@mantine/core@7.13.3(@mantine/hooks@7.13.3(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.13.3(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mantine/notifications@7.13.4(@mantine/core@7.13.4(@mantine/hooks@7.13.4(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.13.4(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@mantine/core': 7.13.3(@mantine/hooks@7.13.3(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mantine/hooks': 7.13.3(react@18.3.1) - '@mantine/store': 7.13.3(react@18.3.1) + '@mantine/core': 7.13.4(@mantine/hooks@7.13.4(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mantine/hooks': 7.13.4(react@18.3.1) + '@mantine/store': 7.13.4(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) react-transition-group: 4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mantine/store@7.13.3(react@18.3.1)': + '@mantine/store@7.13.4(react@18.3.1)': dependencies: react: 18.3.1 @@ -4556,7 +4548,7 @@ snapshots: dom-helpers@5.2.1: dependencies: - '@babel/runtime': 7.25.7 + '@babel/runtime': 7.26.0 csstype: 3.1.3 eastasianwidth@0.2.0: {} @@ -5370,7 +5362,7 @@ snapshots: react-textarea-autosize@8.5.3(@types/react@18.3.12)(react@18.3.1): dependencies: - '@babel/runtime': 7.25.7 + '@babel/runtime': 7.26.0 react: 18.3.1 use-composed-ref: 1.3.0(react@18.3.1) use-latest: 1.2.1(@types/react@18.3.12)(react@18.3.1) @@ -5383,7 +5375,7 @@ snapshots: react-transition-group@4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@babel/runtime': 7.25.7 + '@babel/runtime': 7.26.0 dom-helpers: 5.2.1 loose-envify: 1.4.0 prop-types: 15.8.1