feat(admin-ui): RequireAuth gate + RTL component тесты

RequireAuth: гейтит весь UI по аутентификации. Anonymous юзер вместо
красного "AxiosError 401" получает immediate signinRedirect на Keycloak;
authenticated юзер с истёкшим токеном получает silent renew → fallback на
full redirect. Guards против infinite loop:
- auth.isLoading / activeNavigator — bootstrap или signin/signout уже идёт
- ?error= в URL — вернулись с провалом из Keycloak, показываем сообщение
- auth.error без isAuthenticated — Keycloak недоступен, показываем сообщение

main.tsx: RequireAuth обёрнут вокруг Router/Query, чтобы tan-stack-router и
React Query не делали запросов до auth (иначе 401-каскад на старте).

TokenSync: 401 interceptor теперь редиректит и anonymous (раньше срабатывал
только для authenticated с истёкшим токеном), с теми же guards.

RTL component тесты — 22 теста на 3 ключевых компонента:
- SchemaBuilder (7): empty state, add/remove/reorder properties
- PropertyEditor (10): kind change, required/unique toggle, kind-specific
  поля (string→pattern, integer→min/max, enum→values, array_string→uniqueItems),
  move up/down disabled на boundaries
- SchemaDrivenForm (5): identity tab с required, переключение на extra,
  isPending → save disabled, cancel callback, serverError → Alert

Setup:
- vite.config.ts: test block (jsdom env, setup file, css off)
- src/test/setup.ts: jest-dom matchers, cleanup, HTMLCanvasElement.getContext
  stub (lottie-web из @nstart/ui крашит в jsdom без canvas)
- src/test/render.tsx: renderWithI18n helper, форсит ru-RU
  (LanguageDetector в node по умолчанию даёт en-US)

Deps: +@testing-library/react +@testing-library/jest-dom
+@testing-library/user-event +jsdom
This commit is contained in:
Zimin A.N.
2026-05-06 00:11:07 +03:00
parent 01cca3a6f4
commit ab6f6cb860
11 changed files with 1098 additions and 11 deletions
+4
View File
@@ -31,9 +31,13 @@
"devDependencies": {
"@tailwindcss/vite": "^4.0.0-beta.7",
"@tanstack/router-vite-plugin": "^1.86.0",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.4",
"jsdom": "^29.1.1",
"tailwindcss": "^4.0.0-beta.7",
"typescript": "^5.7.2",
"vite": "^6.0.5",
+502 -2
View File
@@ -63,6 +63,15 @@ importers:
'@tanstack/router-vite-plugin':
specifier: ^1.86.0
version: 1.166.47(@tanstack/react-router@1.169.1(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(vite@6.4.2(jiti@2.6.1)(lightningcss@1.32.0))
'@testing-library/jest-dom':
specifier: ^6.9.1
version: 6.9.1
'@testing-library/react':
specifier: ^16.3.2
version: 16.3.2(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)
'@testing-library/user-event':
specifier: ^14.6.1
version: 14.6.1(@testing-library/dom@10.4.1)
'@types/react':
specifier: ^19.0.0
version: 19.2.14
@@ -72,6 +81,9 @@ importers:
'@vitejs/plugin-react':
specifier: ^4.3.4
version: 4.7.0(vite@6.4.2(jiti@2.6.1)(lightningcss@1.32.0))
jsdom:
specifier: ^29.1.1
version: 29.1.1
tailwindcss:
specifier: ^4.0.0-beta.7
version: 4.2.4
@@ -83,10 +95,28 @@ importers:
version: 6.4.2(jiti@2.6.1)(lightningcss@1.32.0)
vitest:
specifier: ^2.1.9
version: 2.1.9(lightningcss@1.32.0)
version: 2.1.9(jsdom@29.1.1)(lightningcss@1.32.0)
packages:
'@adobe/css-tools@4.4.4':
resolution: {integrity: sha512-Elp+iwUx5rN5+Y8xLt5/GRoG20WGoDCQ/1Fb+1LiGtvwbDavuSk0jhD/eZdckHAuzcDzccnkv+rEjyWfRx18gg==}
'@asamuzakjp/css-color@5.1.11':
resolution: {integrity: sha512-KVw6qIiCTUQhByfTd78h2yD1/00waTmm9uy/R7Ck/ctUyAPj+AEDLkQIdJW0T8+qGgj3j5bpNKK7Q3G+LedJWg==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
'@asamuzakjp/dom-selector@7.1.1':
resolution: {integrity: sha512-67RZDnYRc8H/8MLDgQCDE//zoqVFwajkepHZgmXrbwybzXOEwOWGPYGmALYl9J2DOLfFPPs6kKCqmbzV895hTQ==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
'@asamuzakjp/generational-cache@1.0.1':
resolution: {integrity: sha512-wajfB8KqzMCN2KGNFdLkReeHncd0AslUSrvHVvvYWuU8ghncRJoA50kT3zP9MVL0+9g4/67H+cdvBskj9THPzg==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
'@asamuzakjp/nwsapi@2.3.9':
resolution: {integrity: sha512-n8GuYSrI9bF7FFZ/SjhwevlHc8xaVlb/7HmHelnc/PZXBD2ZR49NnN9sMMuDdEGPeeRQ5d0hqlSlEpgCX3Wl0Q==}
'@babel/code-frame@7.29.0':
resolution: {integrity: sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==}
engines: {node: '>=6.9.0'}
@@ -186,6 +216,46 @@ packages:
resolution: {integrity: sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==}
engines: {node: '>=6.9.0'}
'@bramus/specificity@2.4.2':
resolution: {integrity: sha512-ctxtJ/eA+t+6q2++vj5j7FYX3nRu311q1wfYH3xjlLOsczhlhxAg2FWNUXhpGvAw3BWo1xBcvOV6/YLc2r5FJw==}
hasBin: true
'@csstools/color-helpers@6.0.2':
resolution: {integrity: sha512-LMGQLS9EuADloEFkcTBR3BwV/CGHV7zyDxVRtVDTwdI2Ca4it0CCVTT9wCkxSgokjE5Ho41hEPgb8OEUwoXr6Q==}
engines: {node: '>=20.19.0'}
'@csstools/css-calc@3.2.0':
resolution: {integrity: sha512-bR9e6o2BDB12jzN/gIbjHa5wLJ4UjD1CB9pM7ehlc0ddk6EBz+yYS1EV2MF55/HUxrHcB/hehAyt5vhsA3hx7w==}
engines: {node: '>=20.19.0'}
peerDependencies:
'@csstools/css-parser-algorithms': ^4.0.0
'@csstools/css-tokenizer': ^4.0.0
'@csstools/css-color-parser@4.1.0':
resolution: {integrity: sha512-U0KhLYmy2GVj6q4T3WaAe6NPuFYCPQoE3b0dRGxejWDgcPp8TP7S5rVdM5ZrFaqu4N67X8YaPBw14dQSYx3IyQ==}
engines: {node: '>=20.19.0'}
peerDependencies:
'@csstools/css-parser-algorithms': ^4.0.0
'@csstools/css-tokenizer': ^4.0.0
'@csstools/css-parser-algorithms@4.0.0':
resolution: {integrity: sha512-+B87qS7fIG3L5h3qwJ/IFbjoVoOe/bpOdh9hAjXbvx0o8ImEmUsGXN0inFOnk2ChCFgqkkGFQ+TpM5rbhkKe4w==}
engines: {node: '>=20.19.0'}
peerDependencies:
'@csstools/css-tokenizer': ^4.0.0
'@csstools/css-syntax-patches-for-csstree@1.1.3':
resolution: {integrity: sha512-SH60bMfrRCJF3morcdk57WklujF4Jr/EsQUzqkarfHXEFcAR1gg7fS/chAE922Sehgzc1/+Tz5H3Ypa1HiEKrg==}
peerDependencies:
css-tree: ^3.2.1
peerDependenciesMeta:
css-tree:
optional: true
'@csstools/css-tokenizer@4.0.0':
resolution: {integrity: sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA==}
engines: {node: '>=20.19.0'}
'@esbuild/aix-ppc64@0.21.5':
resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==}
engines: {node: '>=12'}
@@ -480,6 +550,15 @@ packages:
cpu: [x64]
os: [win32]
'@exodus/bytes@1.15.0':
resolution: {integrity: sha512-UY0nlA+feH81UGSHv92sLEPLCeZFjXOuHhrIo0HQydScuQc8s0A7kL/UdgwgDq8g8ilksmuoF35YVTNphV2aBQ==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
peerDependencies:
'@noble/hashes': ^1.8.0 || ^2.0.0
peerDependenciesMeta:
'@noble/hashes':
optional: true
'@hookform/resolvers@3.10.0':
resolution: {integrity: sha512-79Dv+3mDF7i+2ajj7SkypSKHhl1cbln1OGavqrsF7p6mbUv11xpqpacPsGDCTRvCSjEEIez2ef1NveSVL3b0Ag==}
peerDependencies:
@@ -824,6 +903,38 @@ packages:
engines: {node: '>=20.19'}
hasBin: true
'@testing-library/dom@10.4.1':
resolution: {integrity: sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==}
engines: {node: '>=18'}
'@testing-library/jest-dom@6.9.1':
resolution: {integrity: sha512-zIcONa+hVtVSSep9UT3jZ5rizo2BsxgyDYU7WFD5eICBE7no3881HGeb/QkGfsJs6JTkY1aQhT7rIPC7e+0nnA==}
engines: {node: '>=14', npm: '>=6', yarn: '>=1'}
'@testing-library/react@16.3.2':
resolution: {integrity: sha512-XU5/SytQM+ykqMnAnvB2umaJNIOsLF3PVv//1Ew4CTcpz0/BRyy/af40qqrt7SjKpDdT1saBMc42CUok5gaw+g==}
engines: {node: '>=18'}
peerDependencies:
'@testing-library/dom': ^10.0.0
'@types/react': ^18.0.0 || ^19.0.0
'@types/react-dom': ^18.0.0 || ^19.0.0
react: ^18.0.0 || ^19.0.0
react-dom: ^18.0.0 || ^19.0.0
peerDependenciesMeta:
'@types/react':
optional: true
'@types/react-dom':
optional: true
'@testing-library/user-event@14.6.1':
resolution: {integrity: sha512-vq7fv0rnt+QTXgPxr5Hjc210p6YKq2kmdziLgnsZGgLJ9e6VAShx1pACLuRjd/AS/sr7phAR58OIIpf0LlmQNw==}
engines: {node: '>=12', npm: '>=6'}
peerDependencies:
'@testing-library/dom': '>=7.21.4'
'@types/aria-query@5.0.4':
resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==}
'@types/babel__core@7.20.5':
resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==}
@@ -893,6 +1004,14 @@ packages:
ajv@8.20.0:
resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==}
ansi-regex@5.0.1:
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
engines: {node: '>=8'}
ansi-styles@5.2.0:
resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==}
engines: {node: '>=10'}
ansis@4.2.0:
resolution: {integrity: sha512-HqZ5rWlFjGiV0tDm3UxxgNRqsOTniqoKZu0pIAfh7TZQMGuZK+hH0drySty0si0QXj1ieop4+SkSfPZBPPkHig==}
engines: {node: '>=14'}
@@ -901,6 +1020,13 @@ packages:
resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
engines: {node: '>= 8'}
aria-query@5.3.0:
resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==}
aria-query@5.3.2:
resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==}
engines: {node: '>= 0.4'}
assertion-error@2.0.1:
resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==}
engines: {node: '>=12'}
@@ -919,6 +1045,9 @@ packages:
engines: {node: '>=6.0.0'}
hasBin: true
bidi-js@1.0.3:
resolution: {integrity: sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==}
binary-extensions@2.3.0:
resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==}
engines: {node: '>=8'}
@@ -965,9 +1094,20 @@ packages:
cookie-es@3.1.1:
resolution: {integrity: sha512-UaXxwISYJPTr9hwQxMFYZ7kNhSXboMXP+Z3TRX6f1/NyaGPfuNUZOWP1pUEb75B2HjfklIYLVRfWiFZJyC6Npg==}
css-tree@3.2.1:
resolution: {integrity: sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==}
engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0}
css.escape@1.5.1:
resolution: {integrity: sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==}
csstype@3.2.3:
resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==}
data-urls@7.0.0:
resolution: {integrity: sha512-23XHcCF+coGYevirZceTVD7NdJOqVn+49IHyxgszm+JIiHLoB2TkmPtsYkNWT1pvRSGkc35L6NHs0yHkN2SumA==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
debug@4.4.3:
resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==}
engines: {node: '>=6.0'}
@@ -977,6 +1117,9 @@ packages:
supports-color:
optional: true
decimal.js@10.6.0:
resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==}
deep-eql@5.0.2:
resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==}
engines: {node: '>=6'}
@@ -985,6 +1128,10 @@ packages:
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
engines: {node: '>=0.4.0'}
dequal@2.0.3:
resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==}
engines: {node: '>=6'}
detect-libc@2.1.2:
resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==}
engines: {node: '>=8'}
@@ -993,6 +1140,12 @@ packages:
resolution: {integrity: sha512-DPi0FmjiSU5EvQV0++GFDOJ9ASQUVFh5kD+OzOnYdi7n3Wpm9hWWGfB/O2blfHcMVTL5WkQXSnRiK9makhrcnw==}
engines: {node: '>=0.3.1'}
dom-accessibility-api@0.5.16:
resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==}
dom-accessibility-api@0.6.3:
resolution: {integrity: sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==}
dunder-proto@1.0.1:
resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}
engines: {node: '>= 0.4'}
@@ -1007,6 +1160,10 @@ packages:
resolution: {integrity: sha512-otxSQPw4lkOZWkHpB3zaEQs6gWYEsmX4xQF68ElXC/TWvGxGMSGOvoNbaLXm6/cS/fSfHtsEdw90y20PCd+sCA==}
engines: {node: '>=10.13.0'}
entities@8.0.0:
resolution: {integrity: sha512-zwfzJecQ/Uej6tusMqwAqU/6KL2XaB2VZ2Jg54Je6ahNBGNH6Ek6g3jjNCF0fG9EWQKGZNddNjU5F1ZQn/sBnA==}
engines: {node: '>=20.19.0'}
es-define-property@1.0.1:
resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==}
engines: {node: '>= 0.4'}
@@ -1125,6 +1282,10 @@ packages:
hls.js@1.6.16:
resolution: {integrity: sha512-VSIRpLfRwlAAdGL4wiTucx2ScRipo0ed1FBatWkyt832jC4CReKstga6yIhYVwGu9LOBjuX9wzmRMeQdBJtzEA==}
html-encoding-sniffer@6.0.0:
resolution: {integrity: sha512-CV9TW3Y3f8/wT0BRFc1/KAVQ3TUHiXmaAb6VW9vtiMFf7SLoMd1PdAc4W3KFOFETBJUb90KatHqlsZMWV+R9Gg==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
html-parse-stringify@3.0.1:
resolution: {integrity: sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==}
@@ -1139,6 +1300,10 @@ packages:
typescript:
optional: true
indent-string@4.0.0:
resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==}
engines: {node: '>=8'}
is-binary-path@2.1.0:
resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}
engines: {node: '>=8'}
@@ -1155,6 +1320,9 @@ packages:
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
engines: {node: '>=0.12.0'}
is-potential-custom-element-name@1.0.1:
resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==}
isbot@5.1.39:
resolution: {integrity: sha512-obH0yYahGXdzNxo+djmHhBYThUKDkz565cxkIlt2L9hXfv1NlaLKoDBHo6KxXsYrIXx2RK3x5vY36CfZcobxEw==}
engines: {node: '>=18'}
@@ -1166,6 +1334,15 @@ packages:
js-tokens@4.0.0:
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
jsdom@29.1.1:
resolution: {integrity: sha512-ECi4Fi2f7BdJtUKTflYRTiaMxIB0O6zfR1fX0GXpUrf6flp8QIYn1UT20YQqdSOfk2dfkCwS8LAFoJDEppNK5Q==}
engines: {node: ^20.19.0 || ^22.13.0 || >=24.0.0}
peerDependencies:
canvas: ^3.0.0
peerDependenciesMeta:
canvas:
optional: true
jsesc@3.1.0:
resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==}
engines: {node: '>=6'}
@@ -1269,9 +1446,17 @@ packages:
loupe@3.2.1:
resolution: {integrity: sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==}
lru-cache@11.3.6:
resolution: {integrity: sha512-Gf/KoL3C/MlI7Bt0PGI9I+TeTC/I6r/csU58N4BSNc4lppLBeKsOdFYkK+dX0ABDUMJNfCHTyPpzwwO21Awd3A==}
engines: {node: 20 || >=22}
lru-cache@5.1.1:
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
lz-string@1.5.0:
resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==}
hasBin: true
magic-string@0.30.21:
resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==}
@@ -1279,6 +1464,9 @@ packages:
resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
engines: {node: '>= 0.4'}
mdn-data@2.27.1:
resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==}
mime-db@1.52.0:
resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
engines: {node: '>= 0.6'}
@@ -1287,6 +1475,10 @@ packages:
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
engines: {node: '>= 0.6'}
min-indent@1.0.1:
resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==}
engines: {node: '>=4'}
ms@2.1.3:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
@@ -1306,6 +1498,9 @@ packages:
resolution: {integrity: sha512-l2q8l9CTCTOlbX+AnK4p3M+4CEpKpyQhle6blQkdFhm0IsBqsxm15bYaSa11G7pWdsYr6epdsRZxJpCyCRbT8A==}
engines: {node: '>=18'}
parse5@8.0.1:
resolution: {integrity: sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw==}
pathe@1.1.2:
resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==}
@@ -1336,10 +1531,18 @@ packages:
engines: {node: '>=14'}
hasBin: true
pretty-format@27.5.1:
resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
proxy-from-env@2.1.0:
resolution: {integrity: sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==}
engines: {node: '>=10'}
punycode@2.3.1:
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
engines: {node: '>=6'}
react-dom@19.2.5:
resolution: {integrity: sha512-J5bAZz+DXMMwW/wV3xzKke59Af6CHY7G4uYLN1OvBcKEsWOs4pQExj86BBKamxl/Ik5bx9whOrvBlSDfWzgSag==}
peerDependencies:
@@ -1367,6 +1570,9 @@ packages:
typescript:
optional: true
react-is@17.0.2:
resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==}
react-oidc-context@3.3.1:
resolution: {integrity: sha512-/Azvm9W4DhhOtSDBE73kFInh1b6zZRRfILKbgmk2syExMF0PCYJOn/dGdOOi2BFX8x0rCeUe45NXHU+/+xDcrQ==}
engines: {node: '>=18'}
@@ -1386,6 +1592,10 @@ packages:
resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
engines: {node: '>=8.10.0'}
redent@3.0.0:
resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==}
engines: {node: '>=8'}
require-from-string@2.0.2:
resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==}
engines: {node: '>=0.10.0'}
@@ -1395,6 +1605,10 @@ packages:
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true
saxes@6.0.0:
resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==}
engines: {node: '>=v12.22.7'}
scheduler@0.27.0:
resolution: {integrity: sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==}
@@ -1425,6 +1639,13 @@ packages:
std-env@3.10.0:
resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==}
strip-indent@3.0.0:
resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==}
engines: {node: '>=8'}
symbol-tree@3.2.4:
resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==}
tailwindcss@4.2.4:
resolution: {integrity: sha512-HhKppgO81FQof5m6TEnuBWCZGgfRAWbaeOaGT00KOy/Pf/j6oUihdvBpA7ltCeAvZpFhW3j0PTclkxsd4IXYDA==}
@@ -1454,10 +1675,25 @@ packages:
resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==}
engines: {node: '>=14.0.0'}
tldts-core@7.0.30:
resolution: {integrity: sha512-uiHN8PIB1VmWyS98eZYja4xzlYqeFZVjb4OuYlJQnZAuJhMw4PbKQOKgHKhBdJR3FE/t5mUQ1Kd80++B+qhD1Q==}
tldts@7.0.30:
resolution: {integrity: sha512-ELrFxuqsDdHUwoh0XxDbxuLD3Wnz49Z57IFvTtvWy1hJdcMZjXLIuonjilCiWHlT2GbE4Wlv1wKVTzDFnXH1aw==}
hasBin: true
to-regex-range@5.0.1:
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
engines: {node: '>=8.0'}
tough-cookie@6.0.1:
resolution: {integrity: sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==}
engines: {node: '>=16'}
tr46@6.0.0:
resolution: {integrity: sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw==}
engines: {node: '>=20'}
tslib@2.3.0:
resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==}
@@ -1466,6 +1702,10 @@ packages:
engines: {node: '>=14.17'}
hasBin: true
undici@7.25.0:
resolution: {integrity: sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ==}
engines: {node: '>=20.18.1'}
unplugin@3.0.0:
resolution: {integrity: sha512-0Mqk3AT2TZCXWKdcoaufeXNukv2mTrEZExeXlHIOZXdqYoHHr4n51pymnwV8x2BOVxwXbK2HLlI7usrqMpycdg==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -1586,14 +1826,37 @@ packages:
resolution: {integrity: sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==}
engines: {node: '>=0.10.0'}
w3c-xmlserializer@5.0.0:
resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==}
engines: {node: '>=18'}
webidl-conversions@8.0.1:
resolution: {integrity: sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==}
engines: {node: '>=20'}
webpack-virtual-modules@0.6.2:
resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==}
whatwg-mimetype@5.0.0:
resolution: {integrity: sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw==}
engines: {node: '>=20'}
whatwg-url@16.0.1:
resolution: {integrity: sha512-1to4zXBxmXHV3IiSSEInrreIlu02vUOvrhxJJH5vcxYTBDAx51cqZiKdyTxlecdKNSjj8EcxGBxNf6Vg+945gw==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
why-is-node-running@2.3.0:
resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==}
engines: {node: '>=8'}
hasBin: true
xml-name-validator@5.0.0:
resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==}
engines: {node: '>=18'}
xmlchars@2.2.0:
resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==}
yallist@3.1.1:
resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
@@ -1605,6 +1868,28 @@ packages:
snapshots:
'@adobe/css-tools@4.4.4': {}
'@asamuzakjp/css-color@5.1.11':
dependencies:
'@asamuzakjp/generational-cache': 1.0.1
'@csstools/css-calc': 3.2.0(@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0))(@csstools/css-tokenizer@4.0.0)
'@csstools/css-color-parser': 4.1.0(@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0))(@csstools/css-tokenizer@4.0.0)
'@csstools/css-parser-algorithms': 4.0.0(@csstools/css-tokenizer@4.0.0)
'@csstools/css-tokenizer': 4.0.0
'@asamuzakjp/dom-selector@7.1.1':
dependencies:
'@asamuzakjp/generational-cache': 1.0.1
'@asamuzakjp/nwsapi': 2.3.9
bidi-js: 1.0.3
css-tree: 3.2.1
is-potential-custom-element-name: 1.0.1
'@asamuzakjp/generational-cache@1.0.1': {}
'@asamuzakjp/nwsapi@2.3.9': {}
'@babel/code-frame@7.29.0':
dependencies:
'@babel/helper-validator-identifier': 7.28.5
@@ -1729,6 +2014,34 @@ snapshots:
'@babel/helper-string-parser': 7.27.1
'@babel/helper-validator-identifier': 7.28.5
'@bramus/specificity@2.4.2':
dependencies:
css-tree: 3.2.1
'@csstools/color-helpers@6.0.2': {}
'@csstools/css-calc@3.2.0(@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0))(@csstools/css-tokenizer@4.0.0)':
dependencies:
'@csstools/css-parser-algorithms': 4.0.0(@csstools/css-tokenizer@4.0.0)
'@csstools/css-tokenizer': 4.0.0
'@csstools/css-color-parser@4.1.0(@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0))(@csstools/css-tokenizer@4.0.0)':
dependencies:
'@csstools/color-helpers': 6.0.2
'@csstools/css-calc': 3.2.0(@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0))(@csstools/css-tokenizer@4.0.0)
'@csstools/css-parser-algorithms': 4.0.0(@csstools/css-tokenizer@4.0.0)
'@csstools/css-tokenizer': 4.0.0
'@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0)':
dependencies:
'@csstools/css-tokenizer': 4.0.0
'@csstools/css-syntax-patches-for-csstree@1.1.3(css-tree@3.2.1)':
optionalDependencies:
css-tree: 3.2.1
'@csstools/css-tokenizer@4.0.0': {}
'@esbuild/aix-ppc64@0.21.5':
optional: true
@@ -1876,6 +2189,8 @@ snapshots:
'@esbuild/win32-x64@0.25.12':
optional: true
'@exodus/bytes@1.15.0': {}
'@hookform/resolvers@3.10.0(react-hook-form@7.75.0(react@19.2.5))':
dependencies:
react-hook-form: 7.75.0(react@19.2.5)
@@ -2155,6 +2470,42 @@ snapshots:
'@tanstack/virtual-file-routes@1.161.7': {}
'@testing-library/dom@10.4.1':
dependencies:
'@babel/code-frame': 7.29.0
'@babel/runtime': 7.29.2
'@types/aria-query': 5.0.4
aria-query: 5.3.0
dom-accessibility-api: 0.5.16
lz-string: 1.5.0
picocolors: 1.1.1
pretty-format: 27.5.1
'@testing-library/jest-dom@6.9.1':
dependencies:
'@adobe/css-tools': 4.4.4
aria-query: 5.3.2
css.escape: 1.5.1
dom-accessibility-api: 0.6.3
picocolors: 1.1.1
redent: 3.0.0
'@testing-library/react@16.3.2(@testing-library/dom@10.4.1)(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)':
dependencies:
'@babel/runtime': 7.29.2
'@testing-library/dom': 10.4.1
react: 19.2.5
react-dom: 19.2.5(react@19.2.5)
optionalDependencies:
'@types/react': 19.2.14
'@types/react-dom': 19.2.3(@types/react@19.2.14)
'@testing-library/user-event@14.6.1(@testing-library/dom@10.4.1)':
dependencies:
'@testing-library/dom': 10.4.1
'@types/aria-query@5.0.4': {}
'@types/babel__core@7.20.5':
dependencies:
'@babel/parser': 7.29.3
@@ -2249,6 +2600,10 @@ snapshots:
json-schema-traverse: 1.0.0
require-from-string: 2.0.2
ansi-regex@5.0.1: {}
ansi-styles@5.2.0: {}
ansis@4.2.0: {}
anymatch@3.1.3:
@@ -2256,6 +2611,12 @@ snapshots:
normalize-path: 3.0.0
picomatch: 2.3.2
aria-query@5.3.0:
dependencies:
dequal: 2.0.3
aria-query@5.3.2: {}
assertion-error@2.0.1: {}
asynckit@0.4.0: {}
@@ -2279,6 +2640,10 @@ snapshots:
baseline-browser-mapping@2.10.27: {}
bidi-js@1.0.3:
dependencies:
require-from-string: 2.0.2
binary-extensions@2.3.0: {}
braces@3.0.3:
@@ -2332,20 +2697,42 @@ snapshots:
cookie-es@3.1.1: {}
css-tree@3.2.1:
dependencies:
mdn-data: 2.27.1
source-map-js: 1.2.1
css.escape@1.5.1: {}
csstype@3.2.3: {}
data-urls@7.0.0:
dependencies:
whatwg-mimetype: 5.0.0
whatwg-url: 16.0.1
transitivePeerDependencies:
- '@noble/hashes'
debug@4.4.3:
dependencies:
ms: 2.1.3
decimal.js@10.6.0: {}
deep-eql@5.0.2: {}
delayed-stream@1.0.0: {}
dequal@2.0.3: {}
detect-libc@2.1.2: {}
diff@8.0.4: {}
dom-accessibility-api@0.5.16: {}
dom-accessibility-api@0.6.3: {}
dunder-proto@1.0.1:
dependencies:
call-bind-apply-helpers: 1.0.2
@@ -2364,6 +2751,8 @@ snapshots:
graceful-fs: 4.2.11
tapable: 2.3.3
entities@8.0.0: {}
es-define-property@1.0.1: {}
es-errors@1.3.0: {}
@@ -2511,6 +2900,12 @@ snapshots:
hls.js@1.6.16: {}
html-encoding-sniffer@6.0.0:
dependencies:
'@exodus/bytes': 1.15.0
transitivePeerDependencies:
- '@noble/hashes'
html-parse-stringify@3.0.1:
dependencies:
void-elements: 3.1.0
@@ -2523,6 +2918,8 @@ snapshots:
optionalDependencies:
typescript: 5.9.3
indent-string@4.0.0: {}
is-binary-path@2.1.0:
dependencies:
binary-extensions: 2.3.0
@@ -2535,12 +2932,40 @@ snapshots:
is-number@7.0.0: {}
is-potential-custom-element-name@1.0.1: {}
isbot@5.1.39: {}
jiti@2.6.1: {}
js-tokens@4.0.0: {}
jsdom@29.1.1:
dependencies:
'@asamuzakjp/css-color': 5.1.11
'@asamuzakjp/dom-selector': 7.1.1
'@bramus/specificity': 2.4.2
'@csstools/css-syntax-patches-for-csstree': 1.1.3(css-tree@3.2.1)
'@exodus/bytes': 1.15.0
css-tree: 3.2.1
data-urls: 7.0.0
decimal.js: 10.6.0
html-encoding-sniffer: 6.0.0
is-potential-custom-element-name: 1.0.1
lru-cache: 11.3.6
parse5: 8.0.1
saxes: 6.0.0
symbol-tree: 3.2.4
tough-cookie: 6.0.1
undici: 7.25.0
w3c-xmlserializer: 5.0.0
webidl-conversions: 8.0.1
whatwg-mimetype: 5.0.0
whatwg-url: 16.0.1
xml-name-validator: 5.0.0
transitivePeerDependencies:
- '@noble/hashes'
jsesc@3.1.0: {}
json-schema-traverse@1.0.0: {}
@@ -2608,22 +3033,30 @@ snapshots:
loupe@3.2.1: {}
lru-cache@11.3.6: {}
lru-cache@5.1.1:
dependencies:
yallist: 3.1.1
lz-string@1.5.0: {}
magic-string@0.30.21:
dependencies:
'@jridgewell/sourcemap-codec': 1.5.5
math-intrinsics@1.1.0: {}
mdn-data@2.27.1: {}
mime-db@1.52.0: {}
mime-types@2.1.35:
dependencies:
mime-db: 1.52.0
min-indent@1.0.1: {}
ms@2.1.3: {}
nanoid@3.3.12: {}
@@ -2636,6 +3069,10 @@ snapshots:
dependencies:
jwt-decode: 4.0.0
parse5@8.0.1:
dependencies:
entities: 8.0.0
pathe@1.1.2: {}
pathe@2.0.3: {}
@@ -2656,8 +3093,16 @@ snapshots:
prettier@3.8.3: {}
pretty-format@27.5.1:
dependencies:
ansi-regex: 5.0.1
ansi-styles: 5.2.0
react-is: 17.0.2
proxy-from-env@2.1.0: {}
punycode@2.3.1: {}
react-dom@19.2.5(react@19.2.5):
dependencies:
react: 19.2.5
@@ -2678,6 +3123,8 @@ snapshots:
react-dom: 19.2.5(react@19.2.5)
typescript: 5.9.3
react-is@17.0.2: {}
react-oidc-context@3.3.1(oidc-client-ts@3.5.0)(react@19.2.5):
dependencies:
oidc-client-ts: 3.5.0
@@ -2691,6 +3138,11 @@ snapshots:
dependencies:
picomatch: 2.3.2
redent@3.0.0:
dependencies:
indent-string: 4.0.0
strip-indent: 3.0.0
require-from-string@2.0.2: {}
rollup@4.60.2:
@@ -2724,6 +3176,10 @@ snapshots:
'@rollup/rollup-win32-x64-msvc': 4.60.2
fsevents: 2.3.3
saxes@6.0.0:
dependencies:
xmlchars: 2.2.0
scheduler@0.27.0: {}
semver@6.3.1: {}
@@ -2742,6 +3198,12 @@ snapshots:
std-env@3.10.0: {}
strip-indent@3.0.0:
dependencies:
min-indent: 1.0.1
symbol-tree@3.2.4: {}
tailwindcss@4.2.4: {}
tapable@2.3.3: {}
@@ -2761,14 +3223,30 @@ snapshots:
tinyspy@3.0.2: {}
tldts-core@7.0.30: {}
tldts@7.0.30:
dependencies:
tldts-core: 7.0.30
to-regex-range@5.0.1:
dependencies:
is-number: 7.0.0
tough-cookie@6.0.1:
dependencies:
tldts: 7.0.30
tr46@6.0.0:
dependencies:
punycode: 2.3.1
tslib@2.3.0: {}
typescript@5.9.3: {}
undici@7.25.0: {}
unplugin@3.0.0:
dependencies:
'@jridgewell/remapping': 2.3.5
@@ -2825,7 +3303,7 @@ snapshots:
jiti: 2.6.1
lightningcss: 1.32.0
vitest@2.1.9(lightningcss@1.32.0):
vitest@2.1.9(jsdom@29.1.1)(lightningcss@1.32.0):
dependencies:
'@vitest/expect': 2.1.9
'@vitest/mocker': 2.1.9(vite@5.4.21(lightningcss@1.32.0))
@@ -2847,6 +3325,8 @@ snapshots:
vite: 5.4.21(lightningcss@1.32.0)
vite-node: 2.1.9(lightningcss@1.32.0)
why-is-node-running: 2.3.0
optionalDependencies:
jsdom: 29.1.1
transitivePeerDependencies:
- less
- lightningcss
@@ -2860,13 +3340,33 @@ snapshots:
void-elements@3.1.0: {}
w3c-xmlserializer@5.0.0:
dependencies:
xml-name-validator: 5.0.0
webidl-conversions@8.0.1: {}
webpack-virtual-modules@0.6.2: {}
whatwg-mimetype@5.0.0: {}
whatwg-url@16.0.1:
dependencies:
'@exodus/bytes': 1.15.0
tr46: 6.0.0
webidl-conversions: 8.0.1
transitivePeerDependencies:
- '@noble/hashes'
why-is-node-running@2.3.0:
dependencies:
siginfo: 2.0.0
stackback: 0.0.2
xml-name-validator@5.0.0: {}
xmlchars@2.2.0: {}
yallist@3.1.1: {}
zod@3.25.76: {}
+79
View File
@@ -0,0 +1,79 @@
import { useEffect, type ReactNode } from 'react'
import { useAuth } from 'react-oidc-context'
/**
* Гейтит всё содержимое приложения по аутентификации. Если юзер не залогинен —
* сразу редиректим на Keycloak (без промежуточной страницы "Вы не авторизованы"
* и без красного 401 от axios). Пока auth state ещё определяется — показываем
* нейтральный spinner.
*
* Сценарии:
* - First visit, нет токена → signinRedirect → Keycloak login → redirect_uri →
* onSigninCallback чистит URL → дети рендерятся.
* - Истёк access_token, silent renew не успел → 401 от backend ловится в
* {@link TokenSync} interceptor, который дёргает signinSilent/signinRedirect.
* - Возврат с ошибкой OIDC (?error=access_denied) → не редиректим в цикле,
* показываем сообщение.
*/
export function RequireAuth({ children }: { children: ReactNode }) {
const auth = useAuth()
const oidcError =
typeof window !== 'undefined' &&
new URLSearchParams(window.location.search).get('error')
useEffect(() => {
if (oidcError) return
if (auth.isLoading || auth.activeNavigator) return
if (auth.isAuthenticated) return
auth.signinRedirect().catch((err) => {
// Не уйти на signinRedirect = Keycloak недоступен. Логируем, дальше
// покажем сообщение об ошибке (auth.error будет выставлен).
console.error('[auth] signinRedirect failed', err)
})
}, [auth.isAuthenticated, auth.isLoading, auth.activeNavigator, oidcError])
if (oidcError) {
return (
<div className="min-h-screen flex items-center justify-center p-8">
<div className="max-w-md text-center space-y-2">
<h1 className="text-lg font-primary">Ошибка входа</h1>
<p className="text-sm text-carbon/70">
Keycloak вернул ошибку:{' '}
<code className="font-mono">{oidcError}</code>
</p>
<button
type="button"
className="mt-4 inline-flex items-center justify-center rounded-sm border border-ultramarain text-ultramarain px-4 py-2 text-sm hover:bg-orbit"
onClick={() => {
window.location.href = '/'
}}
>
Попробовать снова
</button>
</div>
</div>
)
}
if (auth.error && !auth.isAuthenticated) {
return (
<div className="min-h-screen flex items-center justify-center p-8">
<div className="max-w-md text-center space-y-2">
<h1 className="text-lg font-primary">Не удалось подключиться к авторизации</h1>
<p className="text-sm text-carbon/70">{auth.error.message}</p>
</div>
</div>
)
}
if (!auth.isAuthenticated) {
return (
<div className="min-h-screen flex items-center justify-center">
<div className="text-sm text-carbon/60 font-secondary">Перенаправление на вход</div>
</div>
)
}
return <>{children}</>
}
+16 -2
View File
@@ -24,13 +24,27 @@ export function TokenSync() {
}
}, [auth.user?.access_token])
// Авто-логин на 401 — токен мог истечь и silent renew не успел.
// 401 → автоматический редирект на Keycloak login. Покрывает два случая:
// 1. anonymous пользователь открыл UI (нет токена вовсе) — сразу на логин
// вместо красного "AxiosError 401".
// 2. authenticated юзер у которого истёк access_token и silent renew не
// успел — пробуем silent, если не вышло — full redirect.
// Guard против infinite loop: не редиректим пока auth.isLoading (initial OIDC
// bootstrap), пока activeNavigator (signin/signout уже идёт), и если url
// содержит ?error= (вернулись с провалом из Keycloak — даём UI показать ошибку).
useEffect(() => {
const id = apiClient.interceptors.response.use(
(r) => r,
(err) => {
if (err.response?.status === 401 && auth.isAuthenticated) {
if (err.response?.status !== 401) return Promise.reject(err)
if (auth.isLoading || auth.activeNavigator) return Promise.reject(err)
if (typeof window !== 'undefined' && window.location.search.includes('error=')) {
return Promise.reject(err)
}
if (auth.isAuthenticated) {
auth.signinSilent().catch(() => auth.signinRedirect())
} else {
auth.signinRedirect()
}
return Promise.reject(err)
},
@@ -0,0 +1,110 @@
import { describe, it, expect, vi } from 'vitest'
import { screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { renderWithI18n } from '@/test/render'
import { SchemaDrivenForm } from './SchemaDrivenForm'
import type { JsonSchema } from '@/api/client'
const minimalSchema: JsonSchema = {
$schema: 'http://json-schema.org/draft-07/schema#',
type: 'object',
additionalProperties: false,
required: ['code', 'name'],
'x-id-source': 'code',
properties: {
code: { type: 'string', minLength: 1, 'x-unique': true },
name: { type: 'string', minLength: 1 },
description: { type: 'string' },
},
} as JsonSchema
describe('SchemaDrivenForm', () => {
it('рендерит идентификационный таб с required-полями', () => {
renderWithI18n(
<SchemaDrivenForm
schema={minimalSchema}
supportedLocales={['ru-RU', 'en-US']}
defaultLocale="ru-RU"
mode="create"
isPending={false}
onSubmit={() => {}}
onCancel={() => {}}
/>,
)
// x-id-source: 'code' → бизнес-ключ автогенерится, показывается hint
expect(screen.getByText(/Бизнес-ключ создастся автоматически/)).toBeInTheDocument()
// Required-поля code/name на табе "Идентификация". i18n field.code=Код,
// field.name=Наименование (см. src/i18n.ts).
expect(screen.getByText('Код')).toBeInTheDocument()
expect(screen.getByText('Наименование')).toBeInTheDocument()
})
it('переключение на таб "Дополнительно" показывает optional поля', async () => {
const user = userEvent.setup()
renderWithI18n(
<SchemaDrivenForm
schema={minimalSchema}
supportedLocales={['ru-RU']}
defaultLocale="ru-RU"
mode="create"
isPending={false}
onSubmit={() => {}}
onCancel={() => {}}
/>,
)
// @nstart/ui Tabs использует role="button" не "tab".
await user.click(screen.getByRole('button', { name: /Дополнительно/i }))
// description (optional) теперь виден. i18n field.description=Описание.
expect(screen.getByText('Описание')).toBeInTheDocument()
})
it('disabled Save кнопка пока isPending', () => {
renderWithI18n(
<SchemaDrivenForm
schema={minimalSchema}
supportedLocales={['ru-RU']}
defaultLocale="ru-RU"
mode="create"
isPending={true}
onSubmit={() => {}}
onCancel={() => {}}
/>,
)
const saveBtn = screen.getByRole('button', { name: /Сохранение/i })
expect(saveBtn).toBeDisabled()
})
it('Cancel вызывает onCancel', async () => {
const user = userEvent.setup()
const onCancel = vi.fn()
renderWithI18n(
<SchemaDrivenForm
schema={minimalSchema}
supportedLocales={['ru-RU']}
defaultLocale="ru-RU"
mode="create"
isPending={false}
onSubmit={() => {}}
onCancel={onCancel}
/>,
)
await user.click(screen.getByRole('button', { name: 'Отмена' }))
expect(onCancel).toHaveBeenCalledTimes(1)
})
it('serverError рендерится как Alert', () => {
renderWithI18n(
<SchemaDrivenForm
schema={minimalSchema}
supportedLocales={['ru-RU']}
defaultLocale="ru-RU"
mode="create"
isPending={false}
serverError="Дубликат business_key"
onSubmit={() => {}}
onCancel={() => {}}
/>,
)
expect(screen.getByText('Дубликат business_key')).toBeInTheDocument()
})
})
@@ -0,0 +1,194 @@
import { describe, it, expect, vi } from 'vitest'
import { screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { renderWithI18n } from '@/test/render'
import { PropertyEditor } from './PropertyEditor'
import type { PropertyDef } from './types'
const baseProp = (overrides: Partial<PropertyDef> = {}): PropertyDef => ({
id: 'prop-1',
name: 'designator',
kind: 'string',
required: false,
unique: false,
...overrides,
})
describe('PropertyEditor', () => {
it('меняет name при вводе → onChange с обновлённым name', async () => {
const user = userEvent.setup()
const onChange = vi.fn()
renderWithI18n(
<PropertyEditor
prop={baseProp({ name: '' })}
index={0}
total={1}
onChange={onChange}
onRemove={() => {}}
onMoveUp={() => {}}
onMoveDown={() => {}}
/>,
)
// @nstart/ui TextInput не биндит label через for/id — ищем по placeholder.
const nameInput = screen.getByPlaceholderText('snake_case_key') as HTMLInputElement
await user.type(nameInput, 'n')
// Controlled — value не обновляется без re-render с новым prop, поэтому
// достаточно проверить что onChange выстрелил с ожидаемым name.
expect(onChange).toHaveBeenCalledWith(expect.objectContaining({ name: 'n' }))
})
it('toggle required чекбокса → onChange c required:true', async () => {
const user = userEvent.setup()
const onChange = vi.fn()
renderWithI18n(
<PropertyEditor
prop={baseProp({ required: false })}
index={0}
total={1}
onChange={onChange}
onRemove={() => {}}
onMoveUp={() => {}}
onMoveDown={() => {}}
/>,
)
await user.click(screen.getByLabelText('Обязательное'))
expect(onChange).toHaveBeenCalledWith(expect.objectContaining({ required: true }))
})
it('toggle unique → onChange c unique:true', async () => {
const user = userEvent.setup()
const onChange = vi.fn()
renderWithI18n(
<PropertyEditor
prop={baseProp({ unique: false })}
index={0}
total={1}
onChange={onChange}
onRemove={() => {}}
onMoveUp={() => {}}
onMoveDown={() => {}}
/>,
)
// У Checkbox label включает description "Дубликаты по этому полю запрещены"
// — getByLabelText использует match на полный текст label элемента.
await user.click(screen.getByLabelText(/Уникальное/))
expect(onChange).toHaveBeenCalledWith(expect.objectContaining({ unique: true }))
})
it('для kind=string показывает minLength/maxLength/pattern', () => {
renderWithI18n(
<PropertyEditor
prop={baseProp({ kind: 'string' })}
index={0}
total={1}
onChange={() => {}}
onRemove={() => {}}
onMoveUp={() => {}}
onMoveDown={() => {}}
/>,
)
// @nstart/ui TextInput не биндит label через for/id — проверяем по
// visible-тексту labels.
expect(screen.getByText('minLength')).toBeInTheDocument()
expect(screen.getByText('maxLength')).toBeInTheDocument()
expect(screen.getByText('Pattern (regex)')).toBeInTheDocument()
// Pattern имеет уникальный placeholder — проверяем что input реально есть.
expect(screen.getByPlaceholderText('^[A-Z]{2}$')).toBeInTheDocument()
})
it('для kind=integer показывает minimum/maximum (не string-поля)', () => {
renderWithI18n(
<PropertyEditor
prop={baseProp({ kind: 'integer' })}
index={0}
total={1}
onChange={() => {}}
onRemove={() => {}}
onMoveUp={() => {}}
onMoveDown={() => {}}
/>,
)
expect(screen.getByText('minimum')).toBeInTheDocument()
expect(screen.getByText('maximum')).toBeInTheDocument()
expect(screen.queryByText('Pattern (regex)')).not.toBeInTheDocument()
})
it('для kind=enum показывает enum values input с pre-filled значением', () => {
renderWithI18n(
<PropertyEditor
prop={baseProp({ kind: 'enum', enumValues: ['A', 'B'] })}
index={0}
total={1}
onChange={() => {}}
onRemove={() => {}}
onMoveUp={() => {}}
onMoveDown={() => {}}
/>,
)
expect(screen.getByText('Значения enum (через запятую)')).toBeInTheDocument()
expect(screen.getByDisplayValue('A, B')).toBeInTheDocument()
})
it('для kind=array_string появляется uniqueItems checkbox', () => {
renderWithI18n(
<PropertyEditor
prop={baseProp({ kind: 'array_string' })}
index={0}
total={1}
onChange={() => {}}
onRemove={() => {}}
onMoveUp={() => {}}
onMoveDown={() => {}}
/>,
)
expect(screen.getByLabelText('uniqueItems')).toBeInTheDocument()
})
it('moveUp disabled когда index=0', () => {
renderWithI18n(
<PropertyEditor
prop={baseProp()}
index={0}
total={3}
onChange={() => {}}
onRemove={() => {}}
onMoveUp={() => {}}
onMoveDown={() => {}}
/>,
)
expect(screen.getByRole('button', { name: 'Выше' })).toBeDisabled()
})
it('moveDown disabled когда index=total-1', () => {
renderWithI18n(
<PropertyEditor
prop={baseProp()}
index={2}
total={3}
onChange={() => {}}
onRemove={() => {}}
onMoveUp={() => {}}
onMoveDown={() => {}}
/>,
)
expect(screen.getByRole('button', { name: 'Ниже' })).toBeDisabled()
})
it('клик Удалить → onRemove', async () => {
const user = userEvent.setup()
const onRemove = vi.fn()
renderWithI18n(
<PropertyEditor
prop={baseProp()}
index={1}
total={3}
onChange={() => {}}
onRemove={onRemove}
onMoveUp={() => {}}
onMoveDown={() => {}}
/>,
)
await user.click(screen.getByRole('button', { name: 'Удалить' }))
expect(onRemove).toHaveBeenCalledTimes(1)
})
})
@@ -0,0 +1,95 @@
import { describe, it, expect, vi } from 'vitest'
import { screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { renderWithI18n } from '@/test/render'
import { SchemaBuilder } from './SchemaBuilder'
import type { PropertyDef } from './types'
const propsFromKinds = (...kinds: PropertyDef['kind'][]): PropertyDef[] =>
kinds.map((kind, i) => ({
id: `id-${i}`,
name: `field_${i}`,
kind,
required: false,
unique: false,
}))
describe('SchemaBuilder', () => {
it('показывает empty state когда полей нет', () => {
const onChange = vi.fn()
renderWithI18n(<SchemaBuilder properties={[]} onChange={onChange} />)
expect(screen.getByText('Полей нет — добавь первое')).toBeInTheDocument()
})
it('добавляет новое поле через onChange при клике "Добавить поле"', async () => {
const user = userEvent.setup()
const onChange = vi.fn()
renderWithI18n(<SchemaBuilder properties={[]} onChange={onChange} />)
await user.click(screen.getByRole('button', { name: /Добавить поле/i }))
expect(onChange).toHaveBeenCalledTimes(1)
const next = onChange.mock.calls[0][0] as PropertyDef[]
expect(next).toHaveLength(1)
expect(next[0]).toMatchObject({ name: '', kind: 'string', required: false, unique: false })
expect(next[0].id).toBeTruthy()
})
it('рендерит N PropertyEditor по числу properties', () => {
const onChange = vi.fn()
renderWithI18n(
<SchemaBuilder properties={propsFromKinds('string', 'integer', 'enum')} onChange={onChange} />,
)
// По 1 заголовку "Поле #N" на каждый property.
expect(screen.getByText('Поле #1')).toBeInTheDocument()
expect(screen.getByText('Поле #2')).toBeInTheDocument()
expect(screen.getByText('Поле #3')).toBeInTheDocument()
})
it('moveUp поднимает property вверх', async () => {
const user = userEvent.setup()
const onChange = vi.fn()
const initial = propsFromKinds('string', 'integer')
renderWithI18n(<SchemaBuilder properties={initial} onChange={onChange} />)
const upButtons = screen.getAllByRole('button', { name: /Выше/i })
await user.click(upButtons[1])
expect(onChange).toHaveBeenCalledTimes(1)
const next = onChange.mock.calls[0][0] as PropertyDef[]
expect(next[0].kind).toBe('integer')
expect(next[1].kind).toBe('string')
})
it('moveUp на первом элементе — no-op (kbd disabled, onChange не вызывается)', async () => {
const user = userEvent.setup()
const onChange = vi.fn()
renderWithI18n(<SchemaBuilder properties={propsFromKinds('string', 'integer')} onChange={onChange} />)
const upButtons = screen.getAllByRole('button', { name: /Выше/i })
expect(upButtons[0]).toBeDisabled()
await user.click(upButtons[0])
expect(onChange).not.toHaveBeenCalled()
})
it('moveDown на последнем — disabled', () => {
const onChange = vi.fn()
renderWithI18n(<SchemaBuilder properties={propsFromKinds('string', 'integer')} onChange={onChange} />)
const downButtons = screen.getAllByRole('button', { name: /Ниже/i })
expect(downButtons[1]).toBeDisabled()
})
it('removeAt удаляет указанный property', async () => {
const user = userEvent.setup()
const onChange = vi.fn()
const initial = propsFromKinds('string', 'integer', 'enum')
renderWithI18n(<SchemaBuilder properties={initial} onChange={onChange} />)
const deleteButtons = screen.getAllByRole('button', { name: /Удалить/i })
await user.click(deleteButtons[1])
const next = onChange.mock.calls[0][0] as PropertyDef[]
expect(next).toHaveLength(2)
expect(next.map((p) => p.kind)).toEqual(['string', 'enum'])
})
})
+5 -2
View File
@@ -7,6 +7,7 @@ import { AuthProvider } from 'react-oidc-context'
import { routeTree } from './routeTree.gen'
import { oidcAuthConfig } from '@/auth/oidcConfig'
import { TokenSync } from '@/auth/TokenSync'
import { RequireAuth } from '@/auth/RequireAuth'
import './i18n'
import './styles.css'
@@ -28,13 +29,15 @@ createRoot(document.getElementById('root')!).render(
<StrictMode>
<AuthProvider {...oidcAuthConfig}>
<TokenSync />
<QueryClientProvider client={queryClient}>
<NStartUiProvider>
<RequireAuth>
<QueryClientProvider client={queryClient}>
<DatePickerProvider datePicker={DATE_PICKER_LOCALE_RU}>
<RouterProvider router={router} />
</DatePickerProvider>
</NStartUiProvider>
</QueryClientProvider>
</RequireAuth>
</NStartUiProvider>
</AuthProvider>
</StrictMode>,
)
+19
View File
@@ -0,0 +1,19 @@
import { render, type RenderOptions } from '@testing-library/react'
import { I18nextProvider } from 'react-i18next'
import type { ReactElement, ReactNode } from 'react'
import i18n from '@/i18n'
// LanguageDetector в jsdom по умолчанию даёт en-US (через navigator.language).
// Для тестов фиксируем ru-RU чтобы не возиться с двумя наборами ассертов.
if (i18n.language !== 'ru-RU') {
void i18n.changeLanguage('ru-RU')
}
const Wrapper = ({ children }: { children: ReactNode }) => (
<I18nextProvider i18n={i18n}>{children}</I18nextProvider>
)
export const renderWithI18n = (ui: ReactElement, opts?: Omit<RenderOptions, 'wrapper'>) =>
render(ui, { wrapper: Wrapper, ...opts })
export { i18n }
+62
View File
@@ -0,0 +1,62 @@
import '@testing-library/jest-dom/vitest'
import { afterEach, vi } from 'vitest'
import { cleanup } from '@testing-library/react'
// @nstart/ui тянет lottie-web (анимация brand-стикеров) prebuilt; lottie при
// импорте инициализирует CanvasRenderingContext, в jsdom его нет → крах
// "Cannot set properties of null (setting fillStyle)". vi.mock не ловит т.к.
// lottie уже вшит в bundle. Стабим прямо HTMLCanvasElement.getContext —
// возвращаем no-op 2D-context, lottie доволен и init не падает.
if (typeof HTMLCanvasElement !== 'undefined' && !HTMLCanvasElement.prototype.getContext) {
// безопасная проверка для любой среды
}
HTMLCanvasElement.prototype.getContext = (() => {
const noop = () => {}
const ctx = new Proxy(
{},
{
get: (target: Record<string, unknown>, prop: string) => {
if (prop in target) return target[prop]
if (
prop === 'measureText'
) {
return () => ({ width: 0 })
}
if (prop === 'getImageData') {
return () => ({ data: new Uint8ClampedArray(4) })
}
if (prop === 'createImageData') {
return () => ({ data: new Uint8ClampedArray(4) })
}
return noop
},
set: (target: Record<string, unknown>, prop: string, value: unknown) => {
target[prop] = value
return true
},
},
)
return () => ctx as unknown as CanvasRenderingContext2D
}) () as never
// нет требований к unused vi импорту
void vi
afterEach(() => {
cleanup()
})
if (!('matchMedia' in window)) {
Object.defineProperty(window, 'matchMedia', {
writable: true,
value: (q: string) => ({
matches: false,
media: q,
addEventListener: () => {},
removeEventListener: () => {},
addListener: () => {},
removeListener: () => {},
dispatchEvent: () => false,
onchange: null,
}),
})
}
+7
View File
@@ -1,3 +1,4 @@
/// <reference types="vitest" />
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
@@ -5,6 +6,12 @@ import { TanStackRouterVite } from '@tanstack/router-vite-plugin'
import path from 'path'
export default defineConfig({
test: {
environment: 'jsdom',
setupFiles: ['./src/test/setup.ts'],
globals: true,
css: false,
},
plugins: [
TanStackRouterVite({ routesDirectory: 'src/routes', generatedRouteTree: 'src/routeTree.gen.ts' }),
react(),