diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/provider/InfostripeController.java b/apps/dolly-backend/src/main/java/no/nav/dolly/provider/InfostripeController.java index 225d130d996..9b999261a72 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/provider/InfostripeController.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/provider/InfostripeController.java @@ -19,11 +19,14 @@ import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import static org.apache.commons.lang3.BooleanUtils.isTrue; + @Slf4j @RestController @RequiredArgsConstructor @@ -34,11 +37,14 @@ public class InfostripeController { private final MapperFacade mapperFacade; @GetMapping - @Operation(description = "Hent alle gyldige informasjonsmeldinger") - public Flux hentAlle() { + @Operation(description = "Hent alle gjeldende informasjonsmeldinger") + public Flux hentAlle(@RequestParam(required = false, defaultValue = "false", name = "inkluderFremtidige") boolean inkluderFremtidige) { - return informasjonsmeldingRepository.findGyldigMeldinger() - .map(melding -> mapperFacade.map(melding, InfostripeMelding.class)); + return isTrue(inkluderFremtidige) ? + informasjonsmeldingRepository.findGjeldendeOgFremtidigeMeldinger() + .map(melding -> mapperFacade.map(melding, InfostripeMelding.class)) : + informasjonsmeldingRepository.findGjeldendeMeldinger() + .map(melding -> mapperFacade.map(melding, InfostripeMelding.class)); } @PostMapping diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/repository/InformasjonsmeldingRepository.java b/apps/dolly-backend/src/main/java/no/nav/dolly/repository/InformasjonsmeldingRepository.java index 6865a642e7a..3bd46960408 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/repository/InformasjonsmeldingRepository.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/repository/InformasjonsmeldingRepository.java @@ -15,5 +15,12 @@ public interface InformasjonsmeldingRepository extends ReactiveCrudRepository= current_timestamp) order by i.id desc """) - Flux findGyldigMeldinger(); + Flux findGjeldendeMeldinger(); + + @Query(""" + select * from info_stripe i where + (i.expires is null or i.expires >= current_timestamp) + order by i.id desc + """) + Flux findGjeldendeOgFremtidigeMeldinger(); } diff --git a/apps/dolly-frontend/src/main/js/package-lock.json b/apps/dolly-frontend/src/main/js/package-lock.json index 1cadba7c626..be2c33e0fc6 100644 --- a/apps/dolly-frontend/src/main/js/package-lock.json +++ b/apps/dolly-frontend/src/main/js/package-lock.json @@ -1,12 +1,12 @@ { "name": "dolly", - "version": "3.1.13", + "version": "3.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dolly", - "version": "3.1.13", + "version": "3.2.0", "license": "ISC", "dependencies": { "@hookform/resolvers": "^5.0.0", @@ -132,9 +132,9 @@ } }, "node_modules/@asamuzakjp/dom-selector": { - "version": "6.5.6", - "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-6.5.6.tgz", - "integrity": "sha512-Mj3Hu9ymlsERd7WOsUKNUZnJYL4IZ/I9wVVYgtvOsWYiEFbkQ4G7VRIh2USxTVW4BBDIsLG+gBUgqOqf2Kvqow==", + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-6.6.1.tgz", + "integrity": "sha512-8QT9pokVe1fUt1C8IrJketaeFOdRfTOS96DL3EBjE8CRZm3eHnwMlQe2NPoOSEYPwJ5Q25uYoX1+m9044l3ysQ==", "dev": true, "license": "MIT", "dependencies": { @@ -142,7 +142,7 @@ "bidi-js": "^1.0.3", "css-tree": "^3.1.0", "is-potential-custom-element-name": "^1.0.1", - "lru-cache": "^11.2.1" + "lru-cache": "^11.2.2" } }, "node_modules/@asamuzakjp/dom-selector/node_modules/lru-cache": { @@ -1494,19 +1494,22 @@ } }, "node_modules/@eslint/config-helpers": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz", - "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.0.tgz", + "integrity": "sha512-WUFvV4WoIwW8Bv0KeKCIIEgdSiFOsulyN0xrMu+7z43q/hkOLXjvb5u7UC9jDxvRzcrbEmuZBX5yJZz1741jog==", "dev": true, "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.16.0" + }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/core": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", - "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.16.0.tgz", + "integrity": "sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1575,9 +1578,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.36.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.36.0.tgz", - "integrity": "sha512-uhCbYtYynH30iZErszX78U+nR3pJU3RHGQ57NXy5QupD4SBVwDeU8TNBy+MjMngc1UyIW9noKqsRqfjQTBU2dw==", + "version": "9.37.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.37.0.tgz", + "integrity": "sha512-jaS+NJ+hximswBG6pjNX0uEJZkrT0zwpVi3BA3vX22aFGjJjmgSTSmPpZCRKmoBL5VY/M6p0xsSJx7rk7sy5gg==", "dev": true, "license": "MIT", "engines": { @@ -1598,13 +1601,13 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", - "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.0.tgz", + "integrity": "sha512-sB5uyeq+dwCWyPi31B2gQlVlo+j5brPlWx4yZBrEaRo/nhdDE8Xke1gsGgtiBdaBTxuTkceLVuVt/pclrasb0A==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.15.2", + "@eslint/core": "^0.16.0", "levn": "^0.4.1" }, "engines": { @@ -2165,16 +2168,16 @@ } }, "node_modules/@navikt/aksel-icons": { - "version": "7.31.0", - "resolved": "https://npm.pkg.github.com/download/@navikt/aksel-icons/7.31.0/5d0ea15a5f0ba53bf9e0c38a0b45612235d6b332", - "integrity": "sha512-6rtyFhDDBOkyG815trxe9pnaJrvSnwLEpkJ7qh0qZm1B8g59a4bf2IJGVtKDPg9thVOrxNtA/H9G4N6n0v9Kkg==", + "version": "7.32.0", + "resolved": "https://npm.pkg.github.com/download/@navikt/aksel-icons/7.32.0/e69fa5b5f512060535f161f58b766597de5041c0", + "integrity": "sha512-JKVu93z0Hl2kHm5CXUtP2Prnpn+KnYcDKRN5qlOLdY1FJXf5nh0V1XuB+eyulxgOTHIdkozi9wl+jbq1gSgl6g==", "dev": true, "license": "MIT" }, "node_modules/@navikt/ds-css": { - "version": "7.31.0", - "resolved": "https://npm.pkg.github.com/download/@navikt/ds-css/7.31.0/78afbca44bf15ca55be50990b19693411994a579", - "integrity": "sha512-7wA5Goihfxai/IkTuDIErUSye+/X5UUP2ixT/blipkDbN1Ny6u7PaujYuuGzRR7Glez3suaB4+ATYMxAXLJziw==", + "version": "7.32.0", + "resolved": "https://npm.pkg.github.com/download/@navikt/ds-css/7.32.0/bae6a1142aa9c3ed04ab7cbd41a791bde31c30c2", + "integrity": "sha512-7zLqIDcf5v4poyXhAqySM+CHM1DY91eIXTMPih5666qEuVMIXmnVeR3cy+WqgNdEOpIHljDQZr03XsvzeoIlLA==", "dev": true, "license": "MIT" }, @@ -2196,16 +2199,16 @@ } }, "node_modules/@navikt/ds-react": { - "version": "7.31.0", - "resolved": "https://npm.pkg.github.com/download/@navikt/ds-react/7.31.0/6a2825dae4e35d7f11a63e4ecbd3c0808ef5e308", - "integrity": "sha512-soQmDwnTMYoFTsJggDgYKijtSQe0VuHNbksGRrjgb2+F1HZ2zwjDP/mLzg73Mwr3kkrz4nkwS9NTGhoHO+dt3w==", + "version": "7.32.0", + "resolved": "https://npm.pkg.github.com/download/@navikt/ds-react/7.32.0/9c1b5cdca270a19a3cb8dcfe041ddecd43e86a93", + "integrity": "sha512-H6XcqxpEbXZSM3BCtrTI/LPGARzaqWjYFv5H9vHcq6B6WJtVUkVafa066HBPYhUJ2unRT/8RG20eMR5ErhF+JA==", "dev": true, "license": "MIT", "dependencies": { "@floating-ui/react": "0.27.8", "@floating-ui/react-dom": "^2.0.9", - "@navikt/aksel-icons": "^7.31.0", - "@navikt/ds-tokens": "^7.31.0", + "@navikt/aksel-icons": "^7.32.0", + "@navikt/ds-tokens": "^7.32.0", "clsx": "^2.1.0", "date-fns": "^4.0.0", "react-day-picker": "9.7.0" @@ -2216,9 +2219,9 @@ } }, "node_modules/@navikt/ds-tokens": { - "version": "7.31.0", - "resolved": "https://npm.pkg.github.com/download/@navikt/ds-tokens/7.31.0/c8ff6b4d9a463ddab2a357fd4dee135c26693322", - "integrity": "sha512-cW7be0OyW9FIcIrgagIO0/YZoc3774iCqq9VYvx9cyIYT3CK6kSziCEyT/Kro3wEzyW+nJokTORgyx28zk3y9A==", + "version": "7.32.0", + "resolved": "https://npm.pkg.github.com/download/@navikt/ds-tokens/7.32.0/c8aaf981800e4c51a16c985d9c5789007fcd788b", + "integrity": "sha512-1Nkj2uodMcxDAm2gKxeLxqDSxpM7J9+NT8Z5bVDBuzKHxEHbPXt1Emmzw0c4QS+HTQ4YK76/H9n/cW3jhDJ40g==", "dev": true, "license": "MIT" }, @@ -2669,15 +2672,15 @@ } }, "node_modules/@playwright/experimental-ct-core": { - "version": "1.55.1", - "resolved": "https://registry.npmjs.org/@playwright/experimental-ct-core/-/experimental-ct-core-1.55.1.tgz", - "integrity": "sha512-Mhdmx3CDlOYi4Nr8N4bzaqhjmdcl+SKdsKWznN6TWZCFZDMZARyZ3Vp5IIS3AAoymzMCcG6bRsKicA79eUBLKA==", + "version": "1.56.0", + "resolved": "https://registry.npmjs.org/@playwright/experimental-ct-core/-/experimental-ct-core-1.56.0.tgz", + "integrity": "sha512-44mzgvnx+PMmEM3N16WlEEPe2uszyQr9LCFT04Sk1vmylVEs6X6esLKuq2acybwEqkMBBI0NO4NSRCudpNnd6Q==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright": "1.55.1", - "playwright-core": "1.55.1", - "vite": "^6.3.4" + "playwright": "1.56.0", + "playwright-core": "1.56.0", + "vite": "^6.3.6" }, "engines": { "node": ">=18" @@ -2816,13 +2819,13 @@ } }, "node_modules/@playwright/experimental-ct-react": { - "version": "1.55.1", - "resolved": "https://registry.npmjs.org/@playwright/experimental-ct-react/-/experimental-ct-react-1.55.1.tgz", - "integrity": "sha512-q+qH/J99iV6+99oVT417AA8KsYp3lwxsnxZrLZjIwkEC5+G28QCkr7+UYAOZoNPzelGqHFMLhYMvc6mXuREa2w==", + "version": "1.56.0", + "resolved": "https://registry.npmjs.org/@playwright/experimental-ct-react/-/experimental-ct-react-1.56.0.tgz", + "integrity": "sha512-gjhznh0oVL8ISI40KW0d2CxpZWgb84CleP8jpBeZCqqNFoItGbEIjuoJ8Ut1qgECuMLGmpseVeIxwRlk+lf9Bw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@playwright/experimental-ct-core": "1.55.1", + "@playwright/experimental-ct-core": "1.56.0", "@vitejs/plugin-react": "^4.2.1" }, "bin": { @@ -2871,13 +2874,13 @@ } }, "node_modules/@playwright/test": { - "version": "1.55.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.55.1.tgz", - "integrity": "sha512-IVAh/nOJaw6W9g+RJVlIQJ6gSiER+ae6mKQ5CX1bERzQgbC1VSeBlwdvczT7pxb0GWiyrxH4TGKbMfDb4Sq/ig==", + "version": "1.56.0", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.56.0.tgz", + "integrity": "sha512-Tzh95Twig7hUwwNe381/K3PggZBZblKUe2wv25oIpzWLr6Z0m4KgV1ZVIjnR6GM9ANEqjZD7XsZEa6JL/7YEgg==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright": "1.55.1" + "playwright": "1.56.0" }, "bin": { "playwright": "cli.js" @@ -3069,9 +3072,9 @@ "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.3.tgz", - "integrity": "sha512-h6cqHGZ6VdnwliFG1NXvMPTy/9PS3h8oLh7ImwR+kl+oYnQizgjxsONmmPSb2C66RksfkfIxEVtDSEcJiO0tqw==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.4.tgz", + "integrity": "sha512-BTm2qKNnWIQ5auf4deoetINJm2JzvihvGb9R6K/ETwKLql/Bb3Eg2H1FBp1gUb4YGbydMA3jcmQTR73q7J+GAA==", "cpu": [ "arm" ], @@ -3083,9 +3086,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.3.tgz", - "integrity": "sha512-wd+u7SLT/u6knklV/ifG7gr5Qy4GUbH2hMWcDauPFJzmCZUAJ8L2bTkVXC2niOIxp8lk3iH/QX8kSrUxVZrOVw==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.4.tgz", + "integrity": "sha512-P9LDQiC5vpgGFgz7GSM6dKPCiqR3XYN1WwJKA4/BUVDjHpYsf3iBEmVz62uyq20NGYbiGPR5cNHI7T1HqxNs2w==", "cpu": [ "arm64" ], @@ -3097,9 +3100,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.3.tgz", - "integrity": "sha512-lj9ViATR1SsqycwFkJCtYfQTheBdvlWJqzqxwc9f2qrcVrQaF/gCuBRTiTolkRWS6KvNxSk4KHZWG7tDktLgjg==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.4.tgz", + "integrity": "sha512-QRWSW+bVccAvZF6cbNZBJwAehmvG9NwfWHwMy4GbWi/BQIA/laTIktebT2ipVjNncqE6GLPxOok5hsECgAxGZg==", "cpu": [ "arm64" ], @@ -3111,9 +3114,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.3.tgz", - "integrity": "sha512-+Dyo7O1KUmIsbzx1l+4V4tvEVnVQqMOIYtrxK7ncLSknl1xnMHLgn7gddJVrYPNZfEB8CIi3hK8gq8bDhb3h5A==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.4.tgz", + "integrity": "sha512-hZgP05pResAkRJxL1b+7yxCnXPGsXU0fG9Yfd6dUaoGk+FhdPKCJ5L1Sumyxn8kvw8Qi5PvQ8ulenUbRjzeCTw==", "cpu": [ "x64" ], @@ -3125,9 +3128,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.3.tgz", - "integrity": "sha512-u9Xg2FavYbD30g3DSfNhxgNrxhi6xVG4Y6i9Ur1C7xUuGDW3banRbXj+qgnIrwRN4KeJ396jchwy9bCIzbyBEQ==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.4.tgz", + "integrity": "sha512-xmc30VshuBNUd58Xk4TKAEcRZHaXlV+tCxIXELiE9sQuK3kG8ZFgSPi57UBJt8/ogfhAF5Oz4ZSUBN77weM+mQ==", "cpu": [ "arm64" ], @@ -3139,9 +3142,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.3.tgz", - "integrity": "sha512-5M8kyi/OX96wtD5qJR89a/3x5x8x5inXBZO04JWhkQb2JWavOWfjgkdvUqibGJeNNaz1/Z1PPza5/tAPXICI6A==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.4.tgz", + "integrity": "sha512-WdSLpZFjOEqNZGmHflxyifolwAiZmDQzuOzIq9L27ButpCVpD7KzTRtEG1I0wMPFyiyUdOO+4t8GvrnBLQSwpw==", "cpu": [ "x64" ], @@ -3153,9 +3156,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.3.tgz", - "integrity": "sha512-IoerZJ4l1wRMopEHRKOO16e04iXRDyZFZnNZKrWeNquh5d6bucjezgd+OxG03mOMTnS1x7hilzb3uURPkJ0OfA==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.4.tgz", + "integrity": "sha512-xRiOu9Of1FZ4SxVbB0iEDXc4ddIcjCv2aj03dmW8UrZIW7aIQ9jVJdLBIhxBI+MaTnGAKyvMwPwQnoOEvP7FgQ==", "cpu": [ "arm" ], @@ -3167,9 +3170,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.3.tgz", - "integrity": "sha512-ZYdtqgHTDfvrJHSh3W22TvjWxwOgc3ThK/XjgcNGP2DIwFIPeAPNsQxrJO5XqleSlgDux2VAoWQ5iJrtaC1TbA==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.4.tgz", + "integrity": "sha512-FbhM2p9TJAmEIEhIgzR4soUcsW49e9veAQCziwbR+XWB2zqJ12b4i/+hel9yLiD8pLncDH4fKIPIbt5238341Q==", "cpu": [ "arm" ], @@ -3181,9 +3184,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.3.tgz", - "integrity": "sha512-NcViG7A0YtuFDA6xWSgmFb6iPFzHlf5vcqb2p0lGEbT+gjrEEz8nC/EeDHvx6mnGXnGCC1SeVV+8u+smj0CeGQ==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.4.tgz", + "integrity": "sha512-4n4gVwhPHR9q/g8lKCyz0yuaD0MvDf7dV4f9tHt0C73Mp8h38UCtSCSE6R9iBlTbXlmA8CjpsZoujhszefqueg==", "cpu": [ "arm64" ], @@ -3195,9 +3198,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.3.tgz", - "integrity": "sha512-d3pY7LWno6SYNXRm6Ebsq0DJGoiLXTb83AIPCXl9fmtIQs/rXoS8SJxxUNtFbJ5MiOvs+7y34np77+9l4nfFMw==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.4.tgz", + "integrity": "sha512-u0n17nGA0nvi/11gcZKsjkLj1QIpAuPFQbR48Subo7SmZJnGxDpspyw2kbpuoQnyK+9pwf3pAoEXerJs/8Mi9g==", "cpu": [ "arm64" ], @@ -3209,9 +3212,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.3.tgz", - "integrity": "sha512-3y5GA0JkBuirLqmjwAKwB0keDlI6JfGYduMlJD/Rl7fvb4Ni8iKdQs1eiunMZJhwDWdCvrcqXRY++VEBbvk6Eg==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.4.tgz", + "integrity": "sha512-0G2c2lpYtbTuXo8KEJkDkClE/+/2AFPdPAbmaHoE870foRFs4pBrDehilMcrSScrN/fB/1HTaWO4bqw+ewBzMQ==", "cpu": [ "loong64" ], @@ -3223,9 +3226,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.3.tgz", - "integrity": "sha512-AUUH65a0p3Q0Yfm5oD2KVgzTKgwPyp9DSXc3UA7DtxhEb/WSPfbG4wqXeSN62OG5gSo18em4xv6dbfcUGXcagw==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.4.tgz", + "integrity": "sha512-teSACug1GyZHmPDv14VNbvZFX779UqWTsd7KtTM9JIZRDI5NUwYSIS30kzI8m06gOPB//jtpqlhmraQ68b5X2g==", "cpu": [ "ppc64" ], @@ -3237,9 +3240,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.3.tgz", - "integrity": "sha512-1makPhFFVBqZE+XFg3Dkq+IkQ7JvmUrwwqaYBL2CE+ZpxPaqkGaiWFEWVGyvTwZace6WLJHwjVh/+CXbKDGPmg==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.4.tgz", + "integrity": "sha512-/MOEW3aHjjs1p4Pw1Xk4+3egRevx8Ji9N6HUIA1Ifh8Q+cg9dremvFCUbOX2Zebz80BwJIgCBUemjqhU5XI5Eg==", "cpu": [ "riscv64" ], @@ -3251,9 +3254,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.3.tgz", - "integrity": "sha512-OOFJa28dxfl8kLOPMUOQBCO6z3X2SAfzIE276fwT52uXDWUS178KWq0pL7d6p1kz7pkzA0yQwtqL0dEPoVcRWg==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.4.tgz", + "integrity": "sha512-1HHmsRyh845QDpEWzOFtMCph5Ts+9+yllCrREuBR/vg2RogAQGGBRC8lDPrPOMnrdOJ+mt1WLMOC2Kao/UwcvA==", "cpu": [ "riscv64" ], @@ -3265,9 +3268,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.3.tgz", - "integrity": "sha512-jMdsML2VI5l+V7cKfZx3ak+SLlJ8fKvLJ0Eoa4b9/vCUrzXKgoKxvHqvJ/mkWhFiyp88nCkM5S2v6nIwRtPcgg==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.4.tgz", + "integrity": "sha512-seoeZp4L/6D1MUyjWkOMRU6/iLmCU2EjbMTyAG4oIOs1/I82Y5lTeaxW0KBfkUdHAWN7j25bpkt0rjnOgAcQcA==", "cpu": [ "s390x" ], @@ -3279,9 +3282,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.3.tgz", - "integrity": "sha512-tPgGd6bY2M2LJTA1uGq8fkSPK8ZLYjDjY+ZLK9WHncCnfIz29LIXIqUgzCR0hIefzy6Hpbe8Th5WOSwTM8E7LA==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.4.tgz", + "integrity": "sha512-Wi6AXf0k0L7E2gteNsNHUs7UMwCIhsCTs6+tqQ5GPwVRWMaflqGec4Sd8n6+FNFDw9vGcReqk2KzBDhCa1DLYg==", "cpu": [ "x64" ], @@ -3293,9 +3296,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.3.tgz", - "integrity": "sha512-BCFkJjgk+WFzP+tcSMXq77ymAPIxsX9lFJWs+2JzuZTLtksJ2o5hvgTdIcZ5+oKzUDMwI0PfWzRBYAydAHF2Mw==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.4.tgz", + "integrity": "sha512-dtBZYjDmCQ9hW+WgEkaffvRRCKm767wWhxsFW3Lw86VXz/uJRuD438/XvbZT//B96Vs8oTA8Q4A0AfHbrxP9zw==", "cpu": [ "x64" ], @@ -3307,9 +3310,9 @@ ] }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.3.tgz", - "integrity": "sha512-KTD/EqjZF3yvRaWUJdD1cW+IQBk4fbQaHYJUmP8N4XoKFZilVL8cobFSTDnjTtxWJQ3JYaMgF4nObY/+nYkumA==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.4.tgz", + "integrity": "sha512-1ox+GqgRWqaB1RnyZXL8PD6E5f7YyRUJYnCqKpNzxzP0TkaUh112NDrR9Tt+C8rJ4x5G9Mk8PQR3o7Ku2RKqKA==", "cpu": [ "arm64" ], @@ -3321,9 +3324,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.3.tgz", - "integrity": "sha512-+zteHZdoUYLkyYKObGHieibUFLbttX2r+58l27XZauq0tcWYYuKUwY2wjeCN9oK1Um2YgH2ibd6cnX/wFD7DuA==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.4.tgz", + "integrity": "sha512-8GKr640PdFNXwzIE0IrkMWUNUomILLkfeHjXBi/nUvFlpZP+FA8BKGKpacjW6OUUHaNI6sUURxR2U2g78FOHWQ==", "cpu": [ "arm64" ], @@ -3335,9 +3338,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.3.tgz", - "integrity": "sha512-of1iHkTQSo3kr6dTIRX6t81uj/c/b15HXVsPcEElN5sS859qHrOepM5p9G41Hah+CTqSh2r8Bm56dL2z9UQQ7g==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.4.tgz", + "integrity": "sha512-AIy/jdJ7WtJ/F6EcfOb2GjR9UweO0n43jNObQMb6oGxkYTfLcnN7vYYpG+CN3lLxrQkzWnMOoNSHTW54pgbVxw==", "cpu": [ "ia32" ], @@ -3349,9 +3352,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.3.tgz", - "integrity": "sha512-s0hybmlHb56mWVZQj8ra9048/WZTPLILKxcvcq+8awSZmyiSUZjjem1AhU3Tf4ZKpYhK4mg36HtHDOe8QJS5PQ==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.4.tgz", + "integrity": "sha512-UF9KfsH9yEam0UjTwAgdK0anlQ7c8/pWPU2yVjyWcF1I1thABt6WXE47cI71pGiZ8wGvxohBoLnxM04L/wj8mQ==", "cpu": [ "x64" ], @@ -3363,9 +3366,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.3.tgz", - "integrity": "sha512-zGIbEVVXVtauFgl3MRwGWEN36P5ZGenHRMgNw88X5wEhEBpq0XrMEZwOn07+ICrwM17XO5xfMZqh0OldCH5VTA==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.4.tgz", + "integrity": "sha512-bf9PtUa0u8IXDVxzRToFQKsNCRz9qLYfR/MpECxl4mRoWYjAeFjgxj1XdZr2M/GNVpT05p+LgQOHopYDlUu6/w==", "cpu": [ "x64" ], @@ -3410,9 +3413,9 @@ } }, "node_modules/@testing-library/jest-dom": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.8.0.tgz", - "integrity": "sha512-WgXcWzVM6idy5JaftTVC8Vs83NKRmGJz4Hqs4oyOuO2J4r/y79vvKZsb+CaGyCSEbUPI6OsewfPd0G1A0/TUZQ==", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.9.1.tgz", + "integrity": "sha512-zIcONa+hVtVSSep9UT3jZ5rizo2BsxgyDYU7WFD5eICBE7no3881HGeb/QkGfsJs6JTkY1aQhT7rIPC7e+0nnA==", "dev": true, "license": "MIT", "dependencies": { @@ -3614,13 +3617,13 @@ } }, "node_modules/@types/node": { - "version": "24.5.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.5.2.tgz", - "integrity": "sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ==", + "version": "24.7.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.7.0.tgz", + "integrity": "sha512-IbKooQVqUBrlzWTi79E8Fw78l8k1RNtlDDNWsFZs7XonuQSJ8oNYfEeclhprUldXISRMLzBpILuKgPlIxm+/Yw==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~7.12.0" + "undici-types": "~7.14.0" } }, "node_modules/@types/parse-json": { @@ -3630,9 +3633,9 @@ "license": "MIT" }, "node_modules/@types/react": { - "version": "19.1.15", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.15.tgz", - "integrity": "sha512-+kLxJpaJzXybyDyFXYADyP1cznTO8HSuBpenGlnKOAkH4hyNINiywvXS/tGJhsrGGP/gM185RA3xpjY0Yg4erA==", + "version": "19.2.2", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.2.tgz", + "integrity": "sha512-6mDvHUFSjyT2B2yeNx2nUgMxh9LtOWvkhIU3uePn2I2oyNymUAX1NIsdgviM4CH+JSrp2D2hsMvJOkxY+0wNRA==", "dev": true, "license": "MIT", "dependencies": { @@ -3640,13 +3643,13 @@ } }, "node_modules/@types/react-dom": { - "version": "19.1.9", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.1.9.tgz", - "integrity": "sha512-qXRuZaOsAdXKFyOhRBg6Lqqc0yay13vN7KrIg4L7N4aaHN68ma9OK3NE1BoDFgFOTfM7zg+3/8+2n8rLUH3OKQ==", + "version": "19.2.1", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.1.tgz", + "integrity": "sha512-/EEvYBdT3BflCWvTMO7YkYBHVE9Ci6XdqZciZANQgKpaiDRGOLIlRo91jbTNRQjgPFWVaRxcYc0luVNFitz57A==", "dev": true, "license": "MIT", "peerDependencies": { - "@types/react": "^19.0.0" + "@types/react": "^19.2.0" } }, "node_modules/@types/react-highlight-words": { @@ -3745,17 +3748,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.44.1.tgz", - "integrity": "sha512-molgphGqOBT7t4YKCSkbasmu1tb1MgrZ2szGzHbclF7PNmOkSTQVHy+2jXOSnxvR3+Xe1yySHFZoqMpz3TfQsw==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.0.tgz", + "integrity": "sha512-hA8gxBq4ukonVXPy0OKhiaUh/68D0E88GSmtC1iAEnGaieuDi38LhS7jdCHRLi6ErJBNDGCzvh5EnzdPwUc0DA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.44.1", - "@typescript-eslint/type-utils": "8.44.1", - "@typescript-eslint/utils": "8.44.1", - "@typescript-eslint/visitor-keys": "8.44.1", + "@typescript-eslint/scope-manager": "8.46.0", + "@typescript-eslint/type-utils": "8.46.0", + "@typescript-eslint/utils": "8.46.0", + "@typescript-eslint/visitor-keys": "8.46.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -3769,22 +3772,22 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.44.1", + "@typescript-eslint/parser": "^8.46.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.44.1.tgz", - "integrity": "sha512-EHrrEsyhOhxYt8MTg4zTF+DJMuNBzWwgvvOYNj/zm1vnaD/IC5zCXFehZv94Piqa2cRFfXrTFxIvO95L7Qc/cw==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.0.tgz", + "integrity": "sha512-n1H6IcDhmmUEG7TNVSspGmiHHutt7iVKtZwRppD7e04wha5MrkV1h3pti9xQLcCMt6YWsncpoT0HMjkH1FNwWQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.44.1", - "@typescript-eslint/types": "8.44.1", - "@typescript-eslint/typescript-estree": "8.44.1", - "@typescript-eslint/visitor-keys": "8.44.1", + "@typescript-eslint/scope-manager": "8.46.0", + "@typescript-eslint/types": "8.46.0", + "@typescript-eslint/typescript-estree": "8.46.0", + "@typescript-eslint/visitor-keys": "8.46.0", "debug": "^4.3.4" }, "engines": { @@ -3800,14 +3803,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.44.1.tgz", - "integrity": "sha512-ycSa60eGg8GWAkVsKV4E6Nz33h+HjTXbsDT4FILyL8Obk5/mx4tbvCNsLf9zret3ipSumAOG89UcCs/KRaKYrA==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.0.tgz", + "integrity": "sha512-OEhec0mH+U5Je2NZOeK1AbVCdm0ChyapAyTeXVIYTPXDJ3F07+cu87PPXcGoYqZ7M9YJVvFnfpGg1UmCIqM+QQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.44.1", - "@typescript-eslint/types": "^8.44.1", + "@typescript-eslint/tsconfig-utils": "^8.46.0", + "@typescript-eslint/types": "^8.46.0", "debug": "^4.3.4" }, "engines": { @@ -3822,14 +3825,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.44.1.tgz", - "integrity": "sha512-NdhWHgmynpSvyhchGLXh+w12OMT308Gm25JoRIyTZqEbApiBiQHD/8xgb6LqCWCFcxFtWwaVdFsLPQI3jvhywg==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.0.tgz", + "integrity": "sha512-lWETPa9XGcBes4jqAMYD9fW0j4n6hrPtTJwWDmtqgFO/4HF4jmdH/Q6wggTw5qIT5TXjKzbt7GsZUBnWoO3dqw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.44.1", - "@typescript-eslint/visitor-keys": "8.44.1" + "@typescript-eslint/types": "8.46.0", + "@typescript-eslint/visitor-keys": "8.46.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3840,9 +3843,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.44.1.tgz", - "integrity": "sha512-B5OyACouEjuIvof3o86lRMvyDsFwZm+4fBOqFHccIctYgBjqR3qT39FBYGN87khcgf0ExpdCBeGKpKRhSFTjKQ==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.0.tgz", + "integrity": "sha512-WrYXKGAHY836/N7zoK/kzi6p8tXFhasHh8ocFL9VZSAkvH956gfeRfcnhs3xzRy8qQ/dq3q44v1jvQieMFg2cw==", "dev": true, "license": "MIT", "engines": { @@ -3857,15 +3860,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.44.1.tgz", - "integrity": "sha512-KdEerZqHWXsRNKjF9NYswNISnFzXfXNDfPxoTh7tqohU/PRIbwTmsjGK6V9/RTYWau7NZvfo52lgVk+sJh0K3g==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.0.tgz", + "integrity": "sha512-hy+lvYV1lZpVs2jRaEYvgCblZxUoJiPyCemwbQZ+NGulWkQRy0HRPYAoef/CNSzaLt+MLvMptZsHXHlkEilaeg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.44.1", - "@typescript-eslint/typescript-estree": "8.44.1", - "@typescript-eslint/utils": "8.44.1", + "@typescript-eslint/types": "8.46.0", + "@typescript-eslint/typescript-estree": "8.46.0", + "@typescript-eslint/utils": "8.46.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -3882,9 +3885,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.44.1.tgz", - "integrity": "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.0.tgz", + "integrity": "sha512-bHGGJyVjSE4dJJIO5yyEWt/cHyNwga/zXGJbJJ8TiO01aVREK6gCTu3L+5wrkb1FbDkQ+TKjMNe9R/QQQP9+rA==", "dev": true, "license": "MIT", "engines": { @@ -3896,16 +3899,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.44.1.tgz", - "integrity": "sha512-qnQJ+mVa7szevdEyvfItbO5Vo+GfZ4/GZWWDRRLjrxYPkhM+6zYB2vRYwCsoJLzqFCdZT4mEqyJoyzkunsZ96A==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.0.tgz", + "integrity": "sha512-ekDCUfVpAKWJbRfm8T1YRrCot1KFxZn21oV76v5Fj4tr7ELyk84OS+ouvYdcDAwZL89WpEkEj2DKQ+qg//+ucg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.44.1", - "@typescript-eslint/tsconfig-utils": "8.44.1", - "@typescript-eslint/types": "8.44.1", - "@typescript-eslint/visitor-keys": "8.44.1", + "@typescript-eslint/project-service": "8.46.0", + "@typescript-eslint/tsconfig-utils": "8.46.0", + "@typescript-eslint/types": "8.46.0", + "@typescript-eslint/visitor-keys": "8.46.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -3925,16 +3928,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.44.1.tgz", - "integrity": "sha512-DpX5Fp6edTlocMCwA+mHY8Mra+pPjRZ0TfHkXI8QFelIKcbADQz1LUPNtzOFUriBB2UYqw4Pi9+xV4w9ZczHFg==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.0.tgz", + "integrity": "sha512-nD6yGWPj1xiOm4Gk0k6hLSZz2XkNXhuYmyIrOWcHoPuAhjT9i5bAG+xbWPgFeNR8HPHHtpNKdYUXJl/D3x7f5g==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.44.1", - "@typescript-eslint/types": "8.44.1", - "@typescript-eslint/typescript-estree": "8.44.1" + "@typescript-eslint/scope-manager": "8.46.0", + "@typescript-eslint/types": "8.46.0", + "@typescript-eslint/typescript-estree": "8.46.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3949,13 +3952,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.44.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.44.1.tgz", - "integrity": "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.0.tgz", + "integrity": "sha512-FrvMpAK+hTbFy7vH5j1+tMYHMSKLE6RzluFJlkFNKD0p9YsUT75JlBSmr5so3QRzvMwU5/bIEdeNrxm8du8l3Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.44.1", + "@typescript-eslint/types": "8.46.0", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -4594,9 +4597,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.9.tgz", - "integrity": "sha512-hY/u2lxLrbecMEWSB0IpGzGyDyeoMFQhCvZd2jGFSE5I17Fh01sYUBPCJtkWERw7zrac9+cIghxm/ytJa2X8iA==", + "version": "2.8.12", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.12.tgz", + "integrity": "sha512-vAPMQdnyKCBtkmQA6FMCBvU9qFIppS3nzyXnEM+Lo2IAhG4Mpjv9cCxMudhgV3YdNNJv6TNqXy97dfRVL2LmaQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -4637,9 +4640,9 @@ } }, "node_modules/browserslist": { - "version": "4.26.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.2.tgz", - "integrity": "sha512-ECFzp6uFOSB+dcZ5BK/IBaGWssbSYBHvuMeMt3MMFyhI0Z8SqGgEkBLARgpRH3hutIgPVsALcMwbDrJqPxQ65A==", + "version": "4.26.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.3.tgz", + "integrity": "sha512-lAUU+02RFBuCKQPj/P6NgjlbCnLBMp4UtgTx7vNHd3XSIJF87s9a5rA3aH2yw3GS9DqZAUbOtZdCCiZeVRqt0w==", "dev": true, "funding": [ { @@ -4657,9 +4660,9 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.8.3", - "caniuse-lite": "^1.0.30001741", - "electron-to-chromium": "^1.5.218", + "baseline-browser-mapping": "^2.8.9", + "caniuse-lite": "^1.0.30001746", + "electron-to-chromium": "^1.5.227", "node-releases": "^2.0.21", "update-browserslist-db": "^1.1.3" }, @@ -4748,9 +4751,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001745", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001745.tgz", - "integrity": "sha512-ywt6i8FzvdgrrrGbr1jZVObnVv6adj+0if2/omv9cmR2oiZs30zL4DIyaptKcbOrBdOIc74QTMoJvSE2QHh5UQ==", + "version": "1.0.30001748", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001748.tgz", + "integrity": "sha512-5P5UgAr0+aBmNiplks08JLw+AW/XG/SurlgZLgB1dDLfAw7EfRGxIwzPHxdSCGY/BTKDqIVyJL87cCN6s0ZR0w==", "dev": true, "funding": [ { @@ -5410,9 +5413,9 @@ } }, "node_modules/dot-prop": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-10.0.0.tgz", - "integrity": "sha512-s7RhKKTxc+GiZkfewpLsuWpPeCPe0patP9G/qRJ2VN/BWA+Ydq65K2Pfse234zjGszTVJCzPLze54vD8eyE8NQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-10.1.0.tgz", + "integrity": "sha512-MVUtAugQMOff5RnBy2d9N31iG0lNwg1qAoAOn7pOK5wf94WIaE3My2p3uwTQuvS2AcqchkcR3bHByjaM0mmi7Q==", "dev": true, "license": "MIT", "dependencies": { @@ -5447,9 +5450,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.227", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.227.tgz", - "integrity": "sha512-ITxuoPfJu3lsNWUi2lBM2PaBPYgH3uqmxut5vmBxgYvyI4AlJ6P3Cai1O76mOrkJCBzq0IxWg/NtqOrpu/0gKA==", + "version": "1.5.232", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.232.tgz", + "integrity": "sha512-ENirSe7wf8WzyPCibqKUG1Cg43cPaxH4wRR7AJsX7MCABCHBIOFqvaYODSLKUuZdraxUTHRE/0A2Aq8BYKEHOg==", "dev": true, "license": "ISC" }, @@ -5757,20 +5760,20 @@ } }, "node_modules/eslint": { - "version": "9.36.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.36.0.tgz", - "integrity": "sha512-hB4FIzXovouYzwzECDcUkJ4OcfOEkXTv2zRY6B9bkwjx/cprAq0uvm1nl7zvQ0/TsUk0zQiN4uPfJpB9m+rPMQ==", + "version": "9.37.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.37.0.tgz", + "integrity": "sha512-XyLmROnACWqSxiGYArdef1fItQd47weqB7iwtfr9JHwRrqIXZdcFMvvEcL9xHCmL0SNsOvF0c42lWyM1U5dgig==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.21.0", - "@eslint/config-helpers": "^0.3.1", - "@eslint/core": "^0.15.2", + "@eslint/config-helpers": "^0.4.0", + "@eslint/core": "^0.16.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.36.0", - "@eslint/plugin-kit": "^0.3.5", + "@eslint/js": "9.37.0", + "@eslint/plugin-kit": "^0.4.0", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", @@ -6445,6 +6448,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/generator-function": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -7204,14 +7217,15 @@ } }, "node_modules/is-generator-function": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", - "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", + "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.3", - "get-proto": "^1.0.0", + "call-bound": "^1.0.4", + "generator-function": "^2.0.0", + "get-proto": "^1.0.1", "has-tostringtag": "^1.0.2", "safe-regex-test": "^1.1.0" }, @@ -7687,9 +7701,9 @@ } }, "node_modules/less": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/less/-/less-4.4.1.tgz", - "integrity": "sha512-X9HKyiXPi0f/ed0XhgUlBeFfxrlDP3xR4M7768Zl+WXLUViuL9AOPPJP4nCV0tgRWvTYvpNmN0SFhZOQzy16PA==", + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/less/-/less-4.4.2.tgz", + "integrity": "sha512-j1n1IuTX1VQjIy3tT7cyGbX7nvQOsFLoIqobZv4ttI5axP923gA44zUj6miiA6R5Aoms4sEGVIIcucXUbRI14g==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -8241,9 +8255,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.21", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.21.tgz", - "integrity": "sha512-5b0pgg78U3hwXkCM8Z9b2FJdPZlr9Psr9V2gQPESdGHqbntyFJKFW4r5TeWGFzafGY3hzs1JC62VEQMbl1JFkw==", + "version": "2.0.23", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.23.tgz", + "integrity": "sha512-cCmFDMSm26S6tQSDpBCg/NR8NENrVPhAJSf+XbxBG4rPFaaonlEoE9wHQmun+cls499TQGSb7ZyPBRlzgKfpeg==", "dev": true, "license": "MIT" }, @@ -8711,13 +8725,13 @@ } }, "node_modules/playwright": { - "version": "1.55.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.55.1.tgz", - "integrity": "sha512-cJW4Xd/G3v5ovXtJJ52MAOclqeac9S/aGGgRzLabuF8TnIb6xHvMzKIa6JmrRzUkeXJgfL1MhukP0NK6l39h3A==", + "version": "1.56.0", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.0.tgz", + "integrity": "sha512-X5Q1b8lOdWIE4KAoHpW3SE8HvUB+ZZsUoN64ZhjnN8dOb1UpujxBtENGiZFE+9F/yhzJwYa+ca3u43FeLbboHA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright-core": "1.55.1" + "playwright-core": "1.56.0" }, "bin": { "playwright": "cli.js" @@ -8730,9 +8744,9 @@ } }, "node_modules/playwright-core": { - "version": "1.55.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.55.1.tgz", - "integrity": "sha512-Z6Mh9mkwX+zxSlHqdr5AOcJnfp+xUWLCt9uKV18fhzA8eyxUd8NUWzAjxUh55RZKSYwDGX0cfaySdhZJGMoJ+w==", + "version": "1.56.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.0.tgz", + "integrity": "sha512-1SXl7pMfemAMSDn5rkPeZljxOCYAmQnYLBTExuh6E8USHXGSX3dx6lYZN/xPpTz1vimXmPA9CDnILvmJaB8aSQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -9045,9 +9059,9 @@ "license": "MIT" }, "node_modules/react": { - "version": "19.1.1", - "resolved": "https://registry.npmjs.org/react/-/react-19.1.1.tgz", - "integrity": "sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ==", + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.0.tgz", + "integrity": "sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -9086,15 +9100,15 @@ } }, "node_modules/react-dom": { - "version": "19.1.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.1.tgz", - "integrity": "sha512-Dlq/5LAZgF0Gaz6yiqZCf6VCcZs1ghAJyrsu84Q/GT0gV+mCxbfmKNoGRKBYMJ8IEdGPqu49YWXD02GCknEDkw==", + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.0.tgz", + "integrity": "sha512-UlbRu4cAiGaIewkPyiRGJk0imDN2T3JjieT6spoL2UeSf5od4n5LB/mQ4ejmxhCFT1tYe8IvaFulzynWovsEFQ==", "license": "MIT", "dependencies": { - "scheduler": "^0.26.0" + "scheduler": "^0.27.0" }, "peerDependencies": { - "react": "^19.1.1" + "react": "^19.2.0" } }, "node_modules/react-dropzone": { @@ -9138,9 +9152,9 @@ } }, "node_modules/react-hook-form": { - "version": "7.63.0", - "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.63.0.tgz", - "integrity": "sha512-ZwueDMvUeucovM2VjkCf7zIHcs1aAlDimZu2Hvel5C5907gUzMpm4xCrQXtRzCvsBqFjonB4m3x4LzCFI1ZKWA==", + "version": "7.64.0", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.64.0.tgz", + "integrity": "sha512-fnN+vvTiMLnRqKNTVhDysdrUay0kUUAymQnFIznmgDvapjveUWOOPqMNzPg+A+0yf9DuE2h6xzBjN1s+Qx8wcg==", "license": "MIT", "engines": { "node": ">=18.0.0" @@ -9399,9 +9413,9 @@ } }, "node_modules/react-window": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/react-window/-/react-window-2.1.2.tgz", - "integrity": "sha512-3PnhB1bXauRVTR1vVwEmFjbaNDCIubOoNLTvvHrOI9cGOkPGb5XAzlprNN/FuUlnKsaaws31t3IJYbJJvhJcBQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/react-window/-/react-window-2.2.0.tgz", + "integrity": "sha512-Y2L7yonHq6K1pQA2P98wT5QdIsEcjBTB7T8o6Mub12hH9eYppXoYu6vgClmcjlh3zfNcW2UrXiJJJqDxUY7GVw==", "license": "MIT", "peerDependencies": { "react": "^18.0.0 || ^19.0.0", @@ -9642,9 +9656,9 @@ } }, "node_modules/rollup": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.3.tgz", - "integrity": "sha512-RIDh866U8agLgiIcdpB+COKnlCreHJLfIhWC3LVflku5YHfpnsIKigRZeFfMfCc4dVcqNVfQQ5gO/afOck064A==", + "version": "4.52.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.4.tgz", + "integrity": "sha512-CLEVl+MnPAiKh5pl4dEWSyMTpuflgNQiLGhMv8ezD5W/qP8AKvmYpCOKRRNOh7oRKnauBZ4SyeYkMS+1VSyKwQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9658,28 +9672,28 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.52.3", - "@rollup/rollup-android-arm64": "4.52.3", - "@rollup/rollup-darwin-arm64": "4.52.3", - "@rollup/rollup-darwin-x64": "4.52.3", - "@rollup/rollup-freebsd-arm64": "4.52.3", - "@rollup/rollup-freebsd-x64": "4.52.3", - "@rollup/rollup-linux-arm-gnueabihf": "4.52.3", - "@rollup/rollup-linux-arm-musleabihf": "4.52.3", - "@rollup/rollup-linux-arm64-gnu": "4.52.3", - "@rollup/rollup-linux-arm64-musl": "4.52.3", - "@rollup/rollup-linux-loong64-gnu": "4.52.3", - "@rollup/rollup-linux-ppc64-gnu": "4.52.3", - "@rollup/rollup-linux-riscv64-gnu": "4.52.3", - "@rollup/rollup-linux-riscv64-musl": "4.52.3", - "@rollup/rollup-linux-s390x-gnu": "4.52.3", - "@rollup/rollup-linux-x64-gnu": "4.52.3", - "@rollup/rollup-linux-x64-musl": "4.52.3", - "@rollup/rollup-openharmony-arm64": "4.52.3", - "@rollup/rollup-win32-arm64-msvc": "4.52.3", - "@rollup/rollup-win32-ia32-msvc": "4.52.3", - "@rollup/rollup-win32-x64-gnu": "4.52.3", - "@rollup/rollup-win32-x64-msvc": "4.52.3", + "@rollup/rollup-android-arm-eabi": "4.52.4", + "@rollup/rollup-android-arm64": "4.52.4", + "@rollup/rollup-darwin-arm64": "4.52.4", + "@rollup/rollup-darwin-x64": "4.52.4", + "@rollup/rollup-freebsd-arm64": "4.52.4", + "@rollup/rollup-freebsd-x64": "4.52.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.52.4", + "@rollup/rollup-linux-arm-musleabihf": "4.52.4", + "@rollup/rollup-linux-arm64-gnu": "4.52.4", + "@rollup/rollup-linux-arm64-musl": "4.52.4", + "@rollup/rollup-linux-loong64-gnu": "4.52.4", + "@rollup/rollup-linux-ppc64-gnu": "4.52.4", + "@rollup/rollup-linux-riscv64-gnu": "4.52.4", + "@rollup/rollup-linux-riscv64-musl": "4.52.4", + "@rollup/rollup-linux-s390x-gnu": "4.52.4", + "@rollup/rollup-linux-x64-gnu": "4.52.4", + "@rollup/rollup-linux-x64-musl": "4.52.4", + "@rollup/rollup-openharmony-arm64": "4.52.4", + "@rollup/rollup-win32-arm64-msvc": "4.52.4", + "@rollup/rollup-win32-ia32-msvc": "4.52.4", + "@rollup/rollup-win32-x64-gnu": "4.52.4", + "@rollup/rollup-win32-x64-msvc": "4.52.4", "fsevents": "~2.3.2" } }, @@ -9828,9 +9842,9 @@ } }, "node_modules/scheduler": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.26.0.tgz", - "integrity": "sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==", + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", "license": "MIT" }, "node_modules/screenfull": { @@ -10907,9 +10921,9 @@ } }, "node_modules/typescript": { - "version": "5.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", - "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -10940,9 +10954,9 @@ } }, "node_modules/undici-types": { - "version": "7.12.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.12.0.tgz", - "integrity": "sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.14.0.tgz", + "integrity": "sha512-QQiYxHuyZ9gQUIrmPo3IA+hUl4KYk8uSA7cHrcKd/l3p1OTpZcM0Tbp9x7FAtXdAYhlasd60ncPpgu6ihG6TOA==", "dev": true, "license": "MIT" }, @@ -11012,9 +11026,9 @@ } }, "node_modules/use-sync-external-store": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.5.0.tgz", - "integrity": "sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", + "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==", "dev": true, "license": "MIT", "peerDependencies": { @@ -11071,9 +11085,9 @@ } }, "node_modules/vite": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.7.tgz", - "integrity": "sha512-VbA8ScMvAISJNJVbRDTJdCwqQoAareR/wutevKanhR2/1EkoXVZVkkORaYm/tNVCjP/UDTKtcw3bAkwOUdedmA==", + "version": "7.1.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.9.tgz", + "integrity": "sha512-4nVGliEpxmhCL8DslSAUdxlB6+SMrhB0a1v5ijlh1xB1nEPuy1mxaHxysVucLHuWryAxLWg6a5ei+U4TLn/rFg==", "dev": true, "license": "MIT", "dependencies": { diff --git a/apps/dolly-frontend/src/main/js/package.json b/apps/dolly-frontend/src/main/js/package.json index 6683405903b..ff93e6ee362 100644 --- a/apps/dolly-frontend/src/main/js/package.json +++ b/apps/dolly-frontend/src/main/js/package.json @@ -1,6 +1,6 @@ { "name": "dolly", - "version": "3.1.13", + "version": "3.2.0", "type": "module", "description": "", "main": "index.js", diff --git a/apps/dolly-frontend/src/main/js/playwright.config.js b/apps/dolly-frontend/src/main/js/playwright.config.js index 6c7a12acea8..ce7aa564f33 100644 --- a/apps/dolly-frontend/src/main/js/playwright.config.js +++ b/apps/dolly-frontend/src/main/js/playwright.config.js @@ -36,16 +36,11 @@ export default defineConfig({ }, }, - /* Configure projects for major browsers */ projects: [ { name: 'Google Chrome', use: { ...devices['Desktop Chrome'], channel: 'chrome' }, }, - { - name: 'Microsoft Edge', - use: { ...devices['Desktop Edge'], channel: 'msedge' }, - }, ], /* Run the local dev server before starting the tests */ diff --git a/apps/dolly-frontend/src/main/js/playwright/tests/Identvisning.spec.ts b/apps/dolly-frontend/src/main/js/playwright/tests/Identvisning.spec.ts index 79d400fdeec..7000bf48788 100644 --- a/apps/dolly-frontend/src/main/js/playwright/tests/Identvisning.spec.ts +++ b/apps/dolly-frontend/src/main/js/playwright/tests/Identvisning.spec.ts @@ -20,8 +20,10 @@ test('Åpne bestilt ident med knytning mot alle fagsystem', async ({ page }) => }) await page.getByTestId(TestComponentSelectors.TOGGLE_VISNING_PERSONER).click() await page.getByTestId(TestComponentSelectors.TOGGLE_PERSON_IBRUK).click() - await expect(page.getByTestId(TestComponentSelectors.TOGGLE_PERSON_IBRUK)).toBeEnabled() + await expect(page.getByTestId(TestComponentSelectors.TOGGLE_PERSON_IBRUK)).toBeChecked() await page.getByTestId(TestComponentSelectors.TOGGLE_PERSON_IBRUK).click() + await expect(page.getByTestId(TestComponentSelectors.TOGGLE_PERSON_IBRUK)).not.toBeChecked() + await page.getByTestId(TestComponentSelectors.BUTTON_OPEN_IDENT).click() await page.getByTestId(TestComponentSelectors.BUTTON_OPEN_BESTILLINGSDETALJER).click() await page.waitForTimeout(300) @@ -40,6 +42,7 @@ test('Åpne bestilt ident med knytning mot alle fagsystem', async ({ page }) => for (const hover_miljoe of await page.getByTestId(TestComponentSelectors.HOVER_MILJOE).all()) { await hover_miljoe.click() + await page.waitForTimeout(200) await page.getByTestId(TestComponentSelectors.BUTTON_OPEN_KONTAKTINFO).hover() // Hover over kontaktinfo for å lukke gjeldende åpne miljø hover await page.waitForTimeout(200) diff --git a/apps/dolly-frontend/src/main/js/src/allRoutes.tsx b/apps/dolly-frontend/src/main/js/src/allRoutes.tsx index a3528eb7028..ddd149ee39b 100644 --- a/apps/dolly-frontend/src/main/js/src/allRoutes.tsx +++ b/apps/dolly-frontend/src/main/js/src/allRoutes.tsx @@ -11,7 +11,6 @@ const NyansettelserPage = lazyWithPreload(() => import('@/pages/nyansettelser/Ny const GruppeOversikt = lazyWithPreload(() => import('@/pages/gruppeOversikt/GruppeOversikt')) const Organisasjon = lazyWithPreload(() => import('@/pages/organisasjoner/Organisasjoner')) const MinSide = lazyWithPreload(() => import('@/pages/minSide/MinSide')) -const UI = lazyWithPreload(() => import('@/pages/ui/index')) const Endringsmelding = lazyWithPreload(() => import('@/pages/endringsmelding/Endringsmelding')) const DollySoekPage = lazyWithPreload(() => import('@/pages/dollySoek/DollySoekPage')) const TenorSoekPage = lazyWithPreload(() => import('@/pages/tenorSoek/TenorSoekPage')) @@ -85,7 +84,6 @@ const allRoutes = [ element: Bestillingsveileder, }, { path: '/minside', handle: { crumb: () => 'Min side' }, element: MinSide }, - { path: '/ui', handle: { crumb: () => 'UI demo' }, element: UI }, { path: '/dollysoek', handle: { crumb: () => 'Søk i Dolly' }, diff --git a/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/kriterier/BestillingKriterieMapper.tsx b/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/kriterier/BestillingKriterieMapper.tsx index 3c39e948ff6..abc4a001b99 100644 --- a/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/kriterier/BestillingKriterieMapper.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/kriterier/BestillingKriterieMapper.tsx @@ -10,14 +10,9 @@ import { oversettBoolean, showLabel, toTitleCase, - uppercaseAndUnderscoreToCapitalized, + uppercaseAndUnderscoreToCapitalized } from '@/utils/DataFormatter' -import { - AdresseKodeverk, - ArbeidKodeverk, - PersoninformasjonKodeverk, - VergemaalKodeverk, -} from '@/config/kodeverk' +import { AdresseKodeverk, ArbeidKodeverk, PersoninformasjonKodeverk, VergemaalKodeverk } from '@/config/kodeverk' import { isEmpty } from '@/components/fagsystem/pdlf/form/partials/utils' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { MedlKodeverk } from '@/components/fagsystem/medl/MedlConstants' @@ -26,14 +21,14 @@ import { kodeverkKeyToLabel } from '@/components/fagsystem/sigrunstubPensjonsgiv import { useContext } from 'react' import { BestillingsveilederContext, - BestillingsveilederContextType, + BestillingsveilederContextType } from '@/components/bestillingsveileder/BestillingsveilederContext' import { showKodeverkLabel } from '@/components/fagsystem/skattekort/visning/Visning' import { showTpNavn } from '@/components/fagsystem/afpOffentlig/visning/AfpOffentligVisning' import { showTyperLabel } from '@/components/fagsystem/arbeidssoekerregisteret/visning/ArbeidssoekerregisteretVisning' import { kategoriKodeverk, - tekniskNavnKodeverk, + tekniskNavnKodeverk } from '@/components/fagsystem/sigrunstubSummertSkattegrunnlag/form/GrunnlagArrayForm' import { useTpOrdningKodeverk } from '@/utils/hooks/usePensjon' // TODO: Flytte til selector? @@ -2438,7 +2433,13 @@ const mapOrganisasjon = (bestillingData, data) => { } } -export function mapBestillingData(bestillingData, bestillingsinformasjon, firstIdent) { +function buildBestillingData( + bestillingData: any, + bestillingsinformasjon?: any, + firstIdent?: string, + bestilling?: BestillingsveilederContextType, + navEnheter?: any, +) { if (!bestillingData) { return null } @@ -2446,9 +2447,6 @@ export function mapBestillingData(bestillingData, bestillingsinformasjon, firstI const data: any[] = [] const identtype = bestillingData.pdldata?.opprettNyPerson?.identtype - const bestilling = useContext(BestillingsveilederContext) as BestillingsveilederContextType - const { navEnheter } = useNavEnheter() - mapBestillingsinformasjon(bestillingsinformasjon, data, identtype, firstIdent) mapPdlNyPerson(bestillingData, data, bestilling) @@ -2538,3 +2536,35 @@ export function mapBestillingData(bestillingData, bestillingsinformasjon, firstI return data } + +export function useBestillingData( + bestillingData: any, + bestillingsinformasjon?: any, + firstIdent?: string, +) { + const bestilling = useContext(BestillingsveilederContext) as BestillingsveilederContextType + const { navEnheter } = useNavEnheter() + return buildBestillingData( + bestillingData, + bestillingsinformasjon, + firstIdent, + bestilling, + navEnheter, + ) +} + +export function mapBestillingData( + bestillingData: any, + bestillingsinformasjon?: any, + firstIdent?: string, + bestilling?: BestillingsveilederContextType, + navEnheter?: any, +) { + return buildBestillingData( + bestillingData, + bestillingsinformasjon, + firstIdent, + bestilling, + navEnheter, + ) +} diff --git a/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/kriterier/Bestillingskriterier.tsx b/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/kriterier/Bestillingskriterier.tsx index 1d921418221..23c39f490ec 100644 --- a/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/kriterier/Bestillingskriterier.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/kriterier/Bestillingskriterier.tsx @@ -9,105 +9,99 @@ import Button from '@/components/ui/button/Button' import useBoolean from '@/utils/hooks/useBoolean' import StyledAlert from '@/components/ui/alert/StyledAlert' -const _renderBestillingsDetaljer = (data) => { - const [selectedIndex, setSelectedIndex] = useState(0) - +const renderBestillingsDetaljer = ( + data: any[], + selectedIndex: number, + setSelectedIndex: (v: number) => void, +) => { + if (!data) return null return data.map((kategori, j) => { - const bottomBorder = j != data.length - 1 + const bottomBorder = j !== data.length - 1 const cssClass = cn('flexbox--align-start flexbox--wrap', { 'bottom-border': bottomBorder, }) - if (kategori.header) { - return ( - -

{kategori.header}

- {kategori.items && kategori.items.length > 0 && ( -
- {kategori.items[0].header &&

{kategori.items[0].header}

} -
- {kategori.items.map(_renderStaticValue)} -
+ if (!kategori?.header) return null + return ( + +

{kategori.header}

+ {kategori.items && kategori.items.length > 0 && ( +
+ {kategori.items[0].header &&

{kategori.items[0].header}

} +
+ {kategori.items.map(_renderStaticValue)}
- )} - {kategori.paginering?.length > 0 && ( - <> - -
- {kategori.paginering[selectedIndex].itemRows.map((row, i) => ( -
- {row[0].numberHeader &&

{row[0].numberHeader}

} -
- {row.map(_renderStaticValue)} -
-
- ))} -
- - )} - {kategori.itemRows && ( +
+ )} + {kategori.paginering?.length > 0 && ( + <> +
- {kategori.itemRows.map((row, idx) => { - return ( -
- {/*className endres under styling. Kun eksempel*/} - {row?.[0].numberHeader &&

{row[0].numberHeader}

} -
- {row?.map((attributt, idy) => { - if (attributt?.nestedItemRows) { - return ( - - {attributt.nestedItemRows.map((nestedItem, y) => { - return ( -
- {nestedItem?.[0].numberHeader && ( -

{nestedItem?.[0].numberHeader}

- )} -
- {nestedItem?.[1]?.map((item, z) => { - return _renderStaticValue(item, z) - })} -
-
- ) - })} -
- ) - } - return attributt.expandableHeader ? ( - - ) : ( - _renderStaticValue(attributt, idy) - ) - })} -
+ {kategori.paginering[selectedIndex].itemRows.map((row, i) => ( +
+ {row[0].numberHeader &&

{row[0].numberHeader}

} +
+ {row.map(_renderStaticValue)}
- ) - })} +
+ ))}
- )} - - ) - } + + )} + {kategori.itemRows && ( +
+ {kategori.itemRows.map((row, idx) => ( +
+ {row?.[0].numberHeader &&

{row[0].numberHeader}

} +
+ {row?.map((attributt, idy) => { + if (attributt?.nestedItemRows) { + return ( + + {attributt.nestedItemRows.map((nestedItem, y) => ( +
+ {nestedItem?.[0].numberHeader && ( +

{nestedItem?.[0].numberHeader}

+ )} +
+ {nestedItem?.[1]?.map((item, z) => _renderStaticValue(item, z))} +
+
+ ))} +
+ ) + } + return attributt?.expandableHeader ? ( + + ) : ( + _renderStaticValue(attributt, idy) + ) + })} +
+
+ ))} +
+ )} + + ) }) } +const BestillingsDetaljerWrapper: React.FC<{ data: any[] }> = ({ data }) => { + const [selectedIndex, setSelectedIndex] = useState(0) + return <>{renderBestillingsDetaljer(data, selectedIndex, setSelectedIndex)} +} + export const _renderStaticValue = (attributt, idx) => { - if (!attributt.value) { - return null - } + if (!attributt?.value) return null return ( { const RenderExpandablePanel = ({ attributt }) => { const [visPersonValg, setVisPersonValg, setSkjulPersonValg] = useBoolean(false) - - if (!attributt.vis || !attributt.objects || attributt.objects.length < 1) { - return null - } - + if (!attributt.vis || !attributt.objects || attributt.objects.length < 1) return null return (
{visPersonValg && ( -
+
{attributt.objects.map((attr, idx) => _renderStaticValue(attr, idx))}
)} @@ -144,44 +134,42 @@ const RenderExpandablePanel = ({ attributt }) => { ) } -export default ({ +const Bestillingskriterier = ({ bestilling, bestillingsinformasjon, firstIdent, header, erMalVisning = false, }) => { - const cn = erMalVisning ? 'bestilling-detaljer malbestilling' : 'bestilling-detaljer' - + const classNameValue = erMalVisning ? 'bestilling-detaljer malbestilling' : 'bestilling-detaljer' if (bestilling?.organisasjon || bestilling?.enhetstype) { return ( -
+
{header && } } />
) } - const data = mapBestillingData(bestilling, bestillingsinformasjon, firstIdent) - - if (!data || data?.length < 1) { + if (!data || data.length < 1) { if (erMalVisning) { return ( - + Denne malen inneholder ingen bestillingsdata ) } return

Kunne ikke hente bestillingsdata

} - return ( -
+
{header && } - {_renderBestillingsDetaljer(data)} +
) } + +export default Bestillingskriterier diff --git a/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/kriterier/OrganisasjonKriterier.tsx b/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/kriterier/OrganisasjonKriterier.tsx index f5f7e26e823..64b894c7620 100644 --- a/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/kriterier/OrganisasjonKriterier.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/kriterier/OrganisasjonKriterier.tsx @@ -1,27 +1,27 @@ import React, { useState } from 'react' import { Enhetstre, OrgTree } from '@/components/enhetstre' -import { mapBestillingData } from './BestillingKriterieMapper' +import { useBestillingData } from './BestillingKriterieMapper' import { EnhetBestilling } from '@/components/fagsystem/organisasjoner/types' -type OrganisasjonKriterierProps = { +interface OrganisasjonKriterierProps { data: EnhetBestilling - render: Function + render: (mapped: any) => React.ReactNode } -export const OrganisasjonKriterier = ({ data, render }: OrganisasjonKriterierProps) => { +export const OrganisasjonKriterier: React.FC = ({ data, render }) => { const [selectedId, setSelectedId] = useState('0') - if (!data) { return null } - const orgTree = new OrgTree(data, '0') + const selected = orgTree.find(selectedId) + const mapped = useBestillingData({ organisasjon: [selected] }) return (

Organisasjonsoversikt

- {render(mapBestillingData({ organisasjon: [orgTree.find(selectedId)] }))} + {render(mapped)}
) } diff --git a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/BestillingsveilederHeader.tsx b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/BestillingsveilederHeader.tsx index cc6c40f794c..f96adae1404 100644 --- a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/BestillingsveilederHeader.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/BestillingsveilederHeader.tsx @@ -4,6 +4,7 @@ import { arrayToString } from '@/utils/DataFormatter' import { getLeggTilIdent } from '@/components/bestillingsveileder/utils' import { useGruppeById } from '@/utils/hooks/useGruppe' import { UseFormReturn } from 'react-hook-form/dist/types' +import { BestillingsveilederContextType } from '@/components/bestillingsveileder/BestillingsveilederContext' export const BestillingsveilederHeader = ({ context, diff --git a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/startModal/NyIdent/NyIdent.tsx b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/startModal/NyIdent/NyIdent.tsx index bae5970f939..ed9bbcebccd 100644 --- a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/startModal/NyIdent/NyIdent.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/startModal/NyIdent/NyIdent.tsx @@ -6,7 +6,7 @@ import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { Option } from '@/service/SelectOptionsOppslag' import { BestillingsveilederContext, - BestillingsveilederContextType, + BestillingsveilederContextType } from '@/components/bestillingsveileder/BestillingsveilederContext' import { useDollyEnvironments } from '@/utils/hooks/useEnvironments' import { BVOptions } from '@/components/bestillingsveileder/options/options' @@ -40,6 +40,7 @@ export function NyIdent({ gruppeId }: any) { isClearable={false} /> { - const { setValue, watch, resetField, getValues, reset, formState } = formMethods + 'use no memo' // Skip compilation for this component + + const { setValue, watch, resetField, getValues, reset } = formMethods const opts = useContext(BestillingsveilederContext) as BestillingsveilederContextType const set = (path: string, value: any) => setValue(path, value) @@ -13,16 +15,15 @@ export const useStateModifierFns = (formMethods: UseFormReturn, setFormMutate: a const delMutate = () => setFormMutate?.(() => undefined) const del = (path: string | string[]) => { - if (Array.isArray(path)) { - path.forEach((p) => resetField(p)) - } else { - resetField(path) - } - let newObj = _.omit(getValues(), path) + if (Array.isArray(path)) path.forEach((p) => resetField(p)) + else resetField(path) - // Ingen tomme objekter guard + let newObj = _.omit(getValues(), path) let rootPath = Array.isArray(path) ? path[0].split('.')[0] : path.split('.')[0] - if (path.includes('pdldata.person') || path[0].includes('pdldata.person')) + if ( + (Array.isArray(path) && path[0].includes('pdldata.person')) || + (!Array.isArray(path) && path.includes('pdldata.person')) + ) rootPath = 'pdldata.person' if (_.isEmpty(_.get(newObj, rootPath))) newObj = _.omit(newObj, rootPath) reset(newObj) @@ -34,8 +35,8 @@ export const useStateModifierFns = (formMethods: UseFormReturn, setFormMutate: a const allCheckedLabels = (attrs: Record) => Object.values(attrs) - .filter((a) => a.checked) - .map((b) => b.label) + .filter((a: any) => a.checked) // getter recomputed each render + .map((b: any) => b.label) const batchUpdate = ( attrs: Record, @@ -60,8 +61,19 @@ export const useStateModifierFns = (formMethods: UseFormReturn, setFormMutate: a methods: UseFormReturn }) => Record, ) => { + // Build attrs with checked as a getter tied to form values const attrs = - fn({ set, setMulti, opts, del, delMutate, has, values, methods: formMethods }) || {} + fn({ + set, + setMulti, + opts, + del, + delMutate, + has, + values, + methods: formMethods, + }) || {} + const checked = allCheckedLabels(attrs) return { attrs, diff --git a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/StegVelger.tsx b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/StegVelger.tsx index 0c8d378cc82..20b251c7a9a 100644 --- a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/StegVelger.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/StegVelger.tsx @@ -49,6 +49,7 @@ export const devEnabled = window.location.hostname.includes('dolly-frontend-dev') export const StegVelger = ({ initialValues, onSubmit }) => { + 'use no memo' // Skip compilation for this component const context = useContext(BestillingsveilederContext) as BestillingsveilederContextType const errorContext: ShowErrorContextType = useContext(ShowErrorContext) const erOrganisasjon = diff --git a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/steg/steg1/Attributt.tsx b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/steg/steg1/Attributt.tsx index 578b7852875..495aa38a760 100644 --- a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/steg/steg1/Attributt.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/steg/steg1/Attributt.tsx @@ -1,29 +1,43 @@ -import { DollyCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import { CheckboxGroup } from '@navikt/ds-react' +import { DollyCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import { Hjelpetekst } from '@/components/hjelpetekst/Hjelpetekst' +import React from 'react' -export const Attributt = ({ +interface AttrItem { + label: string + readonly checked: boolean + add: () => void + remove: () => void +} +interface AttributtProps { + attr: AttrItem + vis?: boolean + disabled?: boolean + title?: string + id?: string + infoTekst?: string + [key: string]: any +} +export const Attributt: React.FC = ({ attr, vis = true, disabled = false, - title = null, - id = null, + title, + id, infoTekst = '', ...props }) => { - if (!vis) { - return null - } + if (!vis) return null return (
(e.target.checked ? attr.add() : attr.remove())} + value={attr.label} + disabled={disabled} id={id} {...props} /> @@ -34,21 +48,24 @@ export const Attributt = ({ ) } -export const AttributtKategori = ({ title, children, attr }) => { +interface AttributtKategoriProps { + title: string + children: React.ReactNode + attr: Record +} +export const AttributtKategori: React.FC = ({ title, children, attr }) => { + 'use no memo' // Skip compilation for this component const values = attr && Object.values(attr) - const checked = values - ?.filter((attribute) => attribute.checked) - ?.map((attribute) => attribute.label) + const checkedValues = values?.filter((a) => a.checked)?.map((a) => a.label) || [] const attributter = Array.isArray(children) ? children : [children] - const attributterSomSkalVises = attributter.some( - (attr) => attr.props.vis || !attr.props.hasOwnProperty('vis'), + const showAny = attributter.some( + (child: any) => child?.props?.vis || !child?.props?.hasOwnProperty('vis'), ) - if (!attributterSomSkalVises) { - return null - } + if (!showAny) return null + return ( - +
{children}
) diff --git a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/steg/steg3/MalOppsummering.tsx b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/steg/steg3/MalOppsummering.tsx index 33b85e9952e..fd39b8eb94a 100644 --- a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/steg/steg3/MalOppsummering.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/steg/steg3/MalOppsummering.tsx @@ -76,6 +76,7 @@ export const MalOppsummering = ({ /> ) : ( > = { enheter: OrgTree[] selectedEnhet: string - onNodeClick: Function + onNodeClick: (id: string) => void level?: number } -export function Enhetstre(props: EnhetstreProps) { - const hasChildren = (enhet: OrgTree) => { - return enhet.getUnderenheter().length > 0 - } - - const isSelected = (currentEnhet: string, selected: string) => { - return currentEnhet === selected - } - - const level = props.level || 0 - +export function Enhetstre>(props: EnhetstreProps) { + const level = props.level ?? 0 return (
- {props.enheter.map((enhet, i) => { + {props.enheter.map((enhet) => { + const children = enhet.getUnderenheter() + const hasChildren = children.length > 0 + const isSelected = enhet.getId() === props.selectedEnhet return ( -
+
- {hasChildren(enhet) && ( + {hasChildren && ( )}
diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/sykdom/form/initialValues.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/sykdom/form/initialValues.tsx index 1e38a79df0c..936be4f4277 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/sykdom/form/initialValues.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/sykdom/form/initialValues.tsx @@ -1,5 +1,5 @@ import { Diagnose } from '@/components/fagsystem/sykdom/SykemeldingTypes' -import { addDays, addWeeks } from 'date-fns' +import { addWeeks, subDays } from 'date-fns' import { getRandomValue } from '@/components/fagsystem/utils' import { SelectOptionsGyldigeDiagnoser } from '@/components/fagsystem/sykdom/form/partials/SelectOptionsDiagnoser' @@ -59,8 +59,8 @@ export const initialValuesDetaljertSykemelding = { grad: 50, reisetilskudd: false, }, - fom: addDays(new Date(), -7), - tom: addDays(new Date(), -1), + fom: subDays(new Date(), 7), + tom: subDays(new Date(), 1), }, ], kontaktMedPasient: { diff --git a/apps/dolly-frontend/src/main/js/src/components/redigerGruppe/RedigerGruppe.tsx b/apps/dolly-frontend/src/main/js/src/components/redigerGruppe/RedigerGruppe.tsx index 6bc55226b3c..28e02072b2e 100644 --- a/apps/dolly-frontend/src/main/js/src/components/redigerGruppe/RedigerGruppe.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/redigerGruppe/RedigerGruppe.tsx @@ -1,7 +1,7 @@ import { useNavigate } from 'react-router' import { useGruppeById } from '@/utils/hooks/useGruppe' import { REGEX_BACKEND_GRUPPER, useMatchMutate } from '@/utils/hooks/useMutate' -import { Form, FormProvider, useForm } from 'react-hook-form' +import { FormProvider, useForm } from 'react-hook-form' import { yupResolver } from '@hookform/resolvers/yup' import * as Yup from 'yup' import { DollyApi } from '@/service/Api' @@ -9,7 +9,7 @@ import React, { useState } from 'react' import Loading from '@/components/ui/loading/Loading' import NavButton from '@/components/ui/button/NavButton/NavButton' import { TestComponentSelectors } from '#/mocks/Selectors' -import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { DollyTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import './RedigerGruppe.less' import { Alert } from '@navikt/ds-react' @@ -27,6 +27,7 @@ const validation = Yup.object().shape({ }) export const RedigerGruppe = ({ gruppeId, onCancel }: Props) => { + 'use no memo' // Skip compilation for this component const navigate = useNavigate() const { gruppe } = useGruppeById(gruppeId) const erRedigering = gruppeId !== undefined @@ -41,7 +42,7 @@ export const RedigerGruppe = ({ gruppeId, onCancel }: Props) => { const mutate = useMatchMutate() const formMethods = useForm({ - mode: 'all', + mode: 'onChange', defaultValues: initialValues, resolver: yupResolver(validation), }) @@ -98,17 +99,6 @@ export const RedigerGruppe = ({ gruppeId, onCancel }: Props) => { data-testid={TestComponentSelectors.BUTTON_OPPRETT} variant={'primary'} type={'submit'} - onClick={() => { - formMethods.trigger(['navn', 'hensikt']) - formMethods.setValue('navn', formMethods.getValues('navn'), { - shouldValidate: true, - shouldTouch: true, - }) - formMethods.setValue('hensikt', formMethods.getValues('hensikt'), { - shouldValidate: true, - shouldTouch: true, - }) - }} > {erRedigering ? 'Lagre' : 'Opprett og gå til gruppe'} @@ -120,27 +110,24 @@ export const RedigerGruppe = ({ gruppeId, onCancel }: Props) => { return ( -
- - {buttons}
@@ -149,7 +136,7 @@ export const RedigerGruppe = ({ gruppeId, onCancel }: Props) => { {feilmelding} )} -
+
) } diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/button/FlyttPersonButton/FlyttPersonForm.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/button/FlyttPersonButton/FlyttPersonForm.tsx index 079a211580a..bdb9317ed5b 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/button/FlyttPersonButton/FlyttPersonForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/button/FlyttPersonButton/FlyttPersonForm.tsx @@ -134,7 +134,6 @@ export const FlyttPersonForm = ({ title={'Velg hvilken gruppe du ønsker å flytte personer til'} fraGruppe={gruppeId} /> - diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/button/LaasButton/LaasButton.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/button/LaasButton/LaasButton.tsx index 481edbbc2b4..3c7a8a0f142 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/button/LaasButton/LaasButton.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/button/LaasButton/LaasButton.tsx @@ -6,21 +6,28 @@ import Icon from '@/components/ui/icon/Icon' import Loading from '@/components/ui/loading/Loading' import './LaasModal.less' import React from 'react' +import { TestComponentSelectors } from '#/mocks/Selectors' import { REGEX_BACKEND_BESTILLINGER, REGEX_BACKEND_GRUPPER, useMatchMutate, } from '@/utils/hooks/useMutate' -import { TestComponentSelectors } from '#/mocks/Selectors' type LaasButtonProps = { action: Function loading: boolean gruppeId: string | number children: any + autoMutate?: boolean } -export const LaasButton = ({ action, gruppeId, loading, children }: LaasButtonProps) => { +export const LaasButton = ({ + action, + gruppeId, + loading, + children, + autoMutate = true, +}: LaasButtonProps) => { const [modalIsOpen, openModal, closeModal] = useBoolean(false) const matchMutate = useMatchMutate() @@ -50,13 +57,15 @@ export const LaasButton = ({ action, gruppeId, loading, children }: LaasButtonPr { + onClick={async () => { closeModal() - action(gruppeId) - setTimeout(() => { - matchMutate(REGEX_BACKEND_GRUPPER) - matchMutate(REGEX_BACKEND_BESTILLINGER) - }, 500) + await action(gruppeId) + if (autoMutate) { + setTimeout(() => { + matchMutate(REGEX_BACKEND_GRUPPER) + matchMutate(REGEX_BACKEND_BESTILLINGER) + }, 300) + } }} variant={'primary'} > diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/button/SlettButton/SlettButton.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/button/SlettButton/SlettButton.tsx index 54db3fc090e..abdd8c0658c 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/button/SlettButton/SlettButton.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/button/SlettButton/SlettButton.tsx @@ -1,4 +1,3 @@ -import NavButton from '@/components/ui/button/NavButton/NavButton' import useBoolean from '@/utils/hooks/useBoolean' import { DollyModal } from '@/components/ui/modal/DollyModal' import Button from '@/components/ui/button/Button' @@ -13,6 +12,7 @@ import { useMatchMutate, } from '@/utils/hooks/useMutate' import React from 'react' +import NavButton from '../NavButton/NavButton' type Props = { action: Function @@ -23,6 +23,7 @@ type Props = { disabled?: boolean title?: string navigateHome?: boolean + autoMutate?: boolean } export const SlettButton = ({ @@ -34,6 +35,7 @@ export const SlettButton = ({ disabled = false, title, navigateHome = false, + autoMutate = true, }: Props) => { const [modalIsOpen, openModal, closeModal] = useBoolean(false) const navigate = useNavigate() @@ -70,12 +72,15 @@ export const SlettButton = ({ { closeModal() - slettMedId - ? action(slettMedId)?.then(() => { + const run = slettMedId ? action(slettMedId) : action() + run?.then(() => { + if (autoMutate) { + if (slettMedId) { mutate(REGEX_BACKEND_BESTILLINGER) - return mutate(REGEX_BACKEND_GRUPPER) - }) - : action()?.then(() => mutate(REGEX_BACKEND_GRUPPER)) + } + return mutate(REGEX_BACKEND_GRUPPER) + } + }) navigateHome && navigate('/') }} variant={'primary'} diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/checbox/Checkbox.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/checbox/Checkbox.tsx index 88f7a6256fd..7615981b9e5 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/checbox/Checkbox.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/checbox/Checkbox.tsx @@ -1,86 +1,105 @@ +import React, { forwardRef } from 'react' +import { Checkbox as DsCheckbox, Switch } from '@navikt/ds-react' +import styled from 'styled-components' +import { useFormContext } from 'react-hook-form' import { InputWrapper } from '@/components/ui/form/inputWrapper/InputWrapper' -import { Checkbox as NavCheckbox, Switch } from '@navikt/ds-react' import './Checkbox.less' -import styled from 'styled-components' -import { useFormContext } from 'react-hook-form' -const StyledAttributeCheckbox = styled(NavCheckbox)` - &&& { - .skjemaelement__label { - text-transform: none; - } +const AttributeCheckbox = styled(DsCheckbox)` + &&& .skjemaelement__label { + text-transform: none; } ` - -const StyledSwitch = styled(Switch)` - &&& { - margin-left: 3px; +const SmallCheckbox = styled(DsCheckbox)` + &&& .skjemaelement__label { + font-size: 0.75em; } ` -const StyledCheckbox = styled(NavCheckbox)` +const SpacedSwitch = styled(Switch)` &&& { - .skjemaelement__label { - font-size: 0.75em; - } + margin-left: 3px; } ` -export const Checkbox = ({ id, attributtCheckbox = false, ...restProps }) => - attributtCheckbox ? ( - - ) : ( - - ) +export type CheckboxSize = 'small' | 'medium' +export interface BaseCheckboxProps + extends Omit, 'children'> { + label: React.ReactNode + id?: string + attributtCheckbox?: boolean + compact?: boolean + size?: CheckboxSize +} + +export const Checkbox = forwardRef( + ({ label, id, name, attributtCheckbox, compact, size = 'small', ...rest }, ref) => { + const Comp = attributtCheckbox ? AttributeCheckbox : compact ? SmallCheckbox : DsCheckbox + return ( + + {label} + + ) + }, +) +Checkbox.displayName = 'Checkbox' -export const DollyCheckbox = ({ +export interface DollyCheckboxProps extends BaseCheckboxProps { + isSwitch?: boolean + disabled?: boolean + wrapperSize?: 'grow' | 'shrink' + checkboxMargin?: boolean + vis?: boolean +} +export const DollyCheckbox: React.FC = ({ isSwitch = false, - isDisabled = false, + disabled, wrapperSize = 'grow', checkboxMargin = false, - label = '', - id = null as unknown as string, vis = true, - ...props -}) => - vis && ( + label, + ...rest +}) => { + if (!vis) return null + return ( {isSwitch ? ( - + {label} - + ) : ( - - {label} - + )} ) +} -export const FormCheckbox = ({ - afterChange = null, - size = 'small', - checkboxMargin = false, +export interface FormCheckboxProps + extends Omit { + name: string + afterChange?: (checked: boolean) => void +} +export const FormCheckbox: React.FC = ({ + name, + afterChange, vis = true, - ...props + ...rest }) => { - const formMethods = useFormContext() - const value = formMethods.watch(props.name) - const handleChange = (event: { target: { checked: any } }) => { - formMethods.setValue(props.name, event.target.checked) - formMethods.trigger(props.name) - if (afterChange) afterChange(event.target.checked) + const { watch, setValue, trigger } = useFormContext() + const checked = !!watch(name) + + const handleChange: React.ChangeEventHandler = (e) => { + const next = e.target.checked + setValue(name, next, { shouldDirty: true }) + trigger(name) + afterChange?.(next) } - return ( - vis && ( - - ) - ) + if (!vis) return null + return } diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/textInput/FormFieldInput.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/textInput/FormFieldInput.tsx deleted file mode 100644 index 2c99520c797..00000000000 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/textInput/FormFieldInput.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react' -import { useFormContext } from 'react-hook-form' -import { DollyTextInput } from '@/components/ui/form/inputs/textInput/TextInput' - -type FormFieldInputProps = { - name: string - [key: string]: any -} - -const FormFieldInput = ({ name, ...props }: FormFieldInputProps) => { - const { watch } = useFormContext() - const formValue = watch(name) - return -} - -export default FormFieldInput diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/textInput/TextInput.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/textInput/TextInput.tsx index e968fd969ba..4bbd3770b87 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/textInput/TextInput.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/textInput/TextInput.tsx @@ -9,7 +9,6 @@ import { InputWrapper } from '@/components/ui/form/inputWrapper/InputWrapper' import { Vis } from '@/components/bestillingsveileder/VisAttributt' import Icon from '@/components/ui/icon/Icon' import { ShowErrorContext } from '@/components/bestillingsveileder/ShowErrorContext' -import FormFieldInput from '@/components/ui/form/inputs/textInput/FormFieldInput' const StyledIcon = styled(Icon)` pointer-events: none; @@ -63,6 +62,7 @@ export const TextInput = ({ useControlled = false, ...props }: TextInputProps) => { + 'use no memo' // Skip compilation for this component const { register, formState, setValue, watch } = useFormContext() || {} const { showError } = React.useContext(ShowErrorContext) || {} @@ -91,13 +91,10 @@ export const TextInput = ({ const shouldShowError = (error && (showError || isTouched || hasSubmitted)) || !!props.manualError useEffect(() => { - if (useControlled && formValue !== undefined) { + if (formValue !== undefined) { setFieldValue(formValue || '') - } else if (!useControlled) { - const propValue = value - setFieldValue(propValue || '') } - }, [value, formValue, useControlled]) + }, [value, formValue]) const handleChange = useCallback( (e: React.ChangeEvent) => { @@ -198,8 +195,8 @@ export const DollyTextInput = (props: TextInputProps) => ( export const FormTextInput = ({ visHvisAvhuket = true, ...props }: TextInputProps) => visHvisAvhuket ? ( - + ) : ( - + ) diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/soekForm/SoekForm.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/soekForm/SoekFormWrapper.tsx similarity index 100% rename from apps/dolly-frontend/src/main/js/src/components/ui/soekForm/SoekForm.tsx rename to apps/dolly-frontend/src/main/js/src/components/ui/soekForm/SoekFormWrapper.tsx diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/toast/ErrorToast.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/toast/ErrorToast.tsx index 4b851d4d589..9fac2839c2e 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/toast/ErrorToast.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/toast/ErrorToast.tsx @@ -1,20 +1,23 @@ -import { toast, ToastContainer } from 'react-toastify' +import { useEffect } from 'react' +import { toast } from 'react-toastify' import 'react-toastify/dist/ReactToastify.css' type Props = { - applicationError: string + applicationError: string | null } export const ErrorToast = ({ applicationError }: Props) => { - const feilmelding = applicationError?.replace?.(/\?\S*/, '') - - toast.error(feilmelding, { - position: 'bottom-right', - autoClose: 10000, - closeOnClick: true, - pauseOnHover: true, - draggable: true, - }) - - return + useEffect(() => { + if (!applicationError) return + const feilmelding = applicationError.replace(/\?\S*/, '') + toast.error(feilmelding, { + position: 'bottom-right', + autoClose: 5000, + closeOnClick: true, + pauseOnHover: true, + draggable: true, + containerId: 'global-toast', + }) + }, [applicationError]) + return null } diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/toast/SuccessToast.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/toast/SuccessToast.tsx new file mode 100644 index 00000000000..c54a997e913 --- /dev/null +++ b/apps/dolly-frontend/src/main/js/src/components/ui/toast/SuccessToast.tsx @@ -0,0 +1,22 @@ +import { useEffect } from 'react' +import { toast } from 'react-toastify' +import 'react-toastify/dist/ReactToastify.css' + +type Props = { + message: string | null +} + +export const SuccessToast = ({ message }: Props) => { + useEffect(() => { + if (!message) return + toast.success(message, { + position: 'bottom-right', + autoClose: 5000, + closeOnClick: true, + pauseOnHover: true, + draggable: true, + containerId: 'global-toast', + }) + }, [message]) + return null +} diff --git a/apps/dolly-frontend/src/main/js/src/components/velgGruppe/NyGruppe.tsx b/apps/dolly-frontend/src/main/js/src/components/velgGruppe/NyGruppe.tsx index 54e6441b705..949d40871da 100644 --- a/apps/dolly-frontend/src/main/js/src/components/velgGruppe/NyGruppe.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/velgGruppe/NyGruppe.tsx @@ -72,6 +72,7 @@ export default () => {
{ @@ -83,6 +84,7 @@ export default () => { manualError={navnError} /> { diff --git a/apps/dolly-frontend/src/main/js/src/index.tsx b/apps/dolly-frontend/src/main/js/src/index.tsx index 400450d7227..3bb845545e4 100644 --- a/apps/dolly-frontend/src/main/js/src/index.tsx +++ b/apps/dolly-frontend/src/main/js/src/index.tsx @@ -20,5 +20,9 @@ async function enableMocking() { enableMocking().then(() => { const root = ReactDOM.createRoot(document.getElementById('root')) - root.render() + root.render( + + + , + ) }) diff --git a/apps/dolly-frontend/src/main/js/src/pages/adminPages/dollyInfostriper/CreateInfostripeForm.tsx b/apps/dolly-frontend/src/main/js/src/pages/adminPages/dollyInfostriper/CreateInfostripeForm.tsx index aba03602f07..c00c4773d98 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/adminPages/dollyInfostriper/CreateInfostripeForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/adminPages/dollyInfostriper/CreateInfostripeForm.tsx @@ -1,6 +1,9 @@ import React, { useState } from 'react' import { Controller, FormProvider, useForm } from 'react-hook-form' -import { Alert, Button, Textarea } from '@navikt/ds-react' +import { Button, Textarea } from '@navikt/ds-react' +import { ToastContainer } from 'react-toastify' +import { ErrorToast } from '@/components/ui/toast/ErrorToast' +import { SuccessToast } from '@/components/ui/toast/SuccessToast' import { useDollyInfostriper } from '@/utils/hooks/useDollyInfostriper' import { DollySelect } from '@/components/ui/form/inputs/select/Select' import { DollyDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' @@ -20,19 +23,20 @@ export type InfostripeFormValues = { expires: Date } -const defaultValues: InfostripeFormValues = { +const createDefaultValues = (): InfostripeFormValues => ({ type: 'INFO', message: '', start: new Date(), expires: addDays(new Date(), 7), -} +}) export const CreateInfostripeForm: React.FC = () => { const { createInfostripe } = useDollyInfostriper() const [serverError, setServerError] = useState(null) const [success, setSuccess] = useState(false) + const [formVersion, setFormVersion] = useState(0) - const formMethods = useForm({ defaultValues }) + const formMethods = useForm({ defaultValues: createDefaultValues() }) const { handleSubmit, reset, control, formState } = formMethods const onSubmit = async (data: InfostripeFormValues) => { @@ -41,7 +45,8 @@ export const CreateInfostripeForm: React.FC = () => { try { await createInfostripe(data) setSuccess(true) - reset(defaultValues) + reset(createDefaultValues()) + setFormVersion((v) => v + 1) } catch (e: any) { setServerError(e.message || 'Ukjent feil') } @@ -51,15 +56,23 @@ export const CreateInfostripeForm: React.FC = () => {

Opprett ny infostripe

- {success && Infostripe opprettet} - {serverError && {serverError}} - ( + o.value === field.value) || null} + onChange={(option: any) => field.onChange(option ? option.value : null)} + onBlur={field.onBlur} + name={field.name} + /> + )} /> { />
- - + +
-
+
@@ -92,11 +105,19 @@ export const CreateInfostripeForm: React.FC = () => { type="button" variant="secondary" disabled={formState.isSubmitting} - onClick={() => reset(defaultValues)} + onClick={() => { + reset(createDefaultValues()) + setFormVersion((v) => v + 1) + setServerError(null) + setSuccess(false) + }} > Nullstill
+ + + ) diff --git a/apps/dolly-frontend/src/main/js/src/pages/adminPages/dollyInfostriper/DollyInfostripePage.tsx b/apps/dolly-frontend/src/main/js/src/pages/adminPages/dollyInfostriper/DollyInfostripePage.tsx index 32efeb9cfb5..c34a362b69b 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/adminPages/dollyInfostriper/DollyInfostripePage.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/adminPages/dollyInfostriper/DollyInfostripePage.tsx @@ -7,12 +7,13 @@ import { InfostripeListItem } from '@/pages/adminPages/dollyInfostriper/Infostri import { TestComponentSelectors } from '#/mocks/Selectors' export default function DollyInfostripePage() { - const { infostriper, loading, error } = useDollyInfostriper() + const { infostriper, loading, error } = useDollyInfostriper(true) return ( <>

Infostripe-oversikt

Her finner du en oversikt over alle eksisterende infostriper som vises i Dolly.

+ {loading && (
@@ -22,7 +23,7 @@ export default function DollyInfostripePage() { {error && {`Feil ved henting av data: ${error.message}`}} {infostriper?.length > 0 && ( <> - +

Aktive infostriper

    diff --git a/apps/dolly-frontend/src/main/js/src/pages/brukerPage/BrukernavnVelger.tsx b/apps/dolly-frontend/src/main/js/src/pages/brukerPage/BrukernavnVelger.tsx index df0b0fde3ae..45b55d78df8 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/brukerPage/BrukernavnVelger.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/brukerPage/BrukernavnVelger.tsx @@ -111,19 +111,19 @@ export default ({ eksisterendeBrukernavn, organisasjon, addToSession }: Brukerna { @@ -86,6 +91,10 @@ export const SoekForm = ({ const requestClone = { ...values } const lagreSoekRequestClone = { ...lagreSoekRequest } paths.forEach((path) => { + if (path === 'personRequest.alderFom') { + setValue(path, undefined) + reset() + } _.set(requestClone, path, _.get(dollySoekInitialValues, path)) delete lagreSoekRequestClone[path] if (path === 'personRequest.harSkjerming') { diff --git a/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Adresser.tsx b/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Adresser.tsx index 0bcce14ecab..7898feb2550 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Adresser.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Adresser.tsx @@ -3,7 +3,7 @@ import { AdresseKodeverk, GtKodeverk } from '@/config/kodeverk' import React, { SyntheticEvent } from 'react' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' -import { SoekKategori } from '@/components/ui/soekForm/SoekForm' +import { SoekKategori } from '@/components/ui/soekForm/SoekFormWrapper' import { adressePath } from '../SoekForm' import { codeToNorskLabel } from '@/utils/DataFormatter' diff --git a/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Annet.tsx b/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Annet.tsx index 9692882a655..390acbd1f90 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Annet.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Annet.tsx @@ -1,6 +1,6 @@ import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import React, { SyntheticEvent } from 'react' -import { SoekKategori } from '@/components/ui/soekForm/SoekForm' +import { SoekKategori } from '@/components/ui/soekForm/SoekFormWrapper' import { personPath } from '@/pages/dollySoek/SoekForm' export const Annet = ({ handleChange }: any) => { diff --git a/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Fagsystemer.tsx b/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Fagsystemer.tsx index d184610277a..66391c3f682 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Fagsystemer.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Fagsystemer.tsx @@ -2,7 +2,7 @@ import { FormSelect } from '@/components/ui/form/inputs/select/Select' import React, { SyntheticEvent } from 'react' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { usePersonerTyper } from '@/utils/hooks/useDollySearch' -import { SoekKategori } from '@/components/ui/soekForm/SoekForm' +import { SoekKategori } from '@/components/ui/soekForm/SoekFormWrapper' export const Fagsystemer = ({ handleChangeList }: any) => { const { typer, loading: loadingTyper } = usePersonerTyper() diff --git a/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Familierelasjoner.tsx b/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Familierelasjoner.tsx index 13cc4decd7c..2150708ef93 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Familierelasjoner.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Familierelasjoner.tsx @@ -2,7 +2,7 @@ import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import React, { SyntheticEvent } from 'react' import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' -import { SoekKategori } from '@/components/ui/soekForm/SoekForm' +import { SoekKategori } from '@/components/ui/soekForm/SoekFormWrapper' import { adressePath, personPath } from '@/pages/dollySoek/SoekForm' import { codeToNorskLabel } from '@/utils/DataFormatter' diff --git a/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Identifikasjon.tsx b/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Identifikasjon.tsx index 8f34585254c..4bc4c3d9ffd 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Identifikasjon.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Identifikasjon.tsx @@ -4,20 +4,16 @@ import { Hjelpetekst } from '@/components/hjelpetekst/Hjelpetekst' import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' -import { SoekKategori } from '@/components/ui/soekForm/SoekForm' +import { SoekKategori } from '@/components/ui/soekForm/SoekFormWrapper' import { personPath } from '@/pages/dollySoek/SoekForm' -import { useFormContext } from 'react-hook-form' export const Identifikasjon = ({ handleChange }: any) => { - const formMethods = useFormContext() - return ( handleChange( val?.target?.value || null, diff --git a/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Personinformasjon.tsx b/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Personinformasjon.tsx index 015226b92bd..61264ce7deb 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Personinformasjon.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Personinformasjon.tsx @@ -6,7 +6,7 @@ import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import { TestComponentSelectors } from '#/mocks/Selectors' import { Hjelpetekst } from '@/components/hjelpetekst/Hjelpetekst' -import { SoekKategori } from '@/components/ui/soekForm/SoekForm' +import { SoekKategori } from '@/components/ui/soekForm/SoekFormWrapper' import { personPath } from '../SoekForm' import { useFormContext } from 'react-hook-form' import { codeToNorskLabel } from '@/utils/DataFormatter' @@ -31,7 +31,7 @@ export const Personinformasjon = ({ placeholder="Velg kjønn ..." onChange={(val: SyntheticEvent) => handleChange( - val?.value || null, + (val as any)?.value || null, `${personPath}.kjoenn`, `Kjønn: ${codeToNorskLabel(val?.value)}`, ) @@ -43,8 +43,7 @@ export const Personinformasjon = ({ size="large" placeholder="Velg statsborgerskap ..." onChange={(val: SyntheticEvent) => - handleChange( - val?.value || null, + handleChange((val as any)?.value || null, `${personPath}.statsborgerskap`, `Statsborgerskap: ${val?.value}`, ) @@ -56,8 +55,7 @@ export const Personinformasjon = ({ size="medium" placeholder="Velg personstatus ..." onChange={(val: SyntheticEvent) => - handleChange( - val?.value || null, + handleChange((val as any)?.value || null, `${personPath}.personStatus`, `Personstatus: ${codeToNorskLabel(val?.value)}`, ) @@ -65,9 +63,9 @@ export const Personinformasjon = ({ /> handleChange( val?.target?.value || null, @@ -80,8 +78,7 @@ export const Personinformasjon = ({ name={`${personPath}.alderTom`} placeholder="Skriv inn alder t.o.m ..." type="number" - value={watch(`${personPath}.alderTom`)} - onBlur={(val: SyntheticEvent) => + onBlur={(val: any) => handleChange( val?.target?.value || null, `${personPath}.alderTom`, @@ -92,7 +89,7 @@ export const Personinformasjon = ({ + onChange={(val: any) => handleChange(val.target.checked, `${personPath}.erLevende`, 'Er levende') } disabled={watch(`${personPath}.erDoed`)} @@ -100,7 +97,7 @@ export const Personinformasjon = ({ + onChange={(val: any) => handleChange(val.target.checked, `${personPath}.erDoed`, 'Er død') } disabled={watch(`${personPath}.erLevende`)} @@ -109,28 +106,28 @@ export const Personinformasjon = ({ data-testid={TestComponentSelectors.TOGGLE_HAR_VERGE} name={`${personPath}.harVerge`} label="Har verge" - onChange={(val: SyntheticEvent) => + onChange={(val: any) => handleChange(val.target.checked, `${personPath}.harVerge`, 'Har verge') } /> + onChange={(val: any) => handleChange(val.target.checked, `${personPath}.harInnflytting`, 'Har innflytting') } /> + onChange={(val: any) => handleChange(val.target.checked, `${personPath}.harUtflytting`, 'Har utflytting') } /> + onChange={(val: any) => handleChange( val.target.checked, `${personPath}.harSikkerhetstiltak`, @@ -141,19 +138,15 @@ export const Personinformasjon = ({ - handleChange( - val.target.checked, - `${personPath}.harTilrettelagtKommunikasjon`, + onChange={(val: any) => handleChange(val.target.checked, `${personPath}.harTilrettelagtKommunikasjon`, 'Har tilrettelagt kommunikasjon', - ) - } + )} /> { + onChange={(val: any) => { const registreValues = val.target.checked ? [...watch('registreRequest'), 'SKJERMING'] : watch('registreRequest')?.filter((item: string) => item !== 'SKJERMING') diff --git a/apps/dolly-frontend/src/main/js/src/pages/gruppe/GruppeHeader/GruppeHeader.tsx b/apps/dolly-frontend/src/main/js/src/pages/gruppe/GruppeHeader/GruppeHeader.tsx index 62403ae6e88..840651588bb 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/gruppe/GruppeHeader/GruppeHeader.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/gruppe/GruppeHeader/GruppeHeader.tsx @@ -25,28 +25,27 @@ import { actions } from '@/ducks/gruppe' import { createLoadingSelector } from '@/ducks/loading' import { useGruppeById } from '@/utils/hooks/useGruppe' import { EndreTilknytning } from '@/pages/gruppe/EndreTilknytning/EndreTilknytning' +import { REGEX_BACKEND_GRUPPER, useMatchMutate } from '@/utils/hooks/useMutate' const loadingSelectorSlettGruppe = createLoadingSelector(actions.remove) const loadingSelectorSendTags = createLoadingSelector(actions.sendTags) const loadingSelectorLaasGruppe = createLoadingSelector(actions.laas) -const loadingSelectorGetExcel = createLoadingSelector(actions.getGruppeExcelFil) type GruppeHeaderProps = { gruppeId: string } const GruppeHeader = ({ gruppeId }: GruppeHeaderProps) => { - const dispatch = useDispatch() + const dispatch = useDispatch() + const matchMutate = useMatchMutate() const [visRedigerState, visRediger, skjulRediger] = useBoolean(false) const [viserGjenopprettModal, visGjenopprettModal, skjulGjenopprettModal] = useBoolean(false) - const { - currentBruker: { brukertype }, - } = useCurrentBruker() + const { currentBruker } = useCurrentBruker() + const brukertype = currentBruker?.brukertype const isDeletingGruppe = useSelector((state: any) => loadingSelectorSlettGruppe(state)) const isSendingTags = useSelector((state: any) => loadingSelectorSendTags(state)) const isLockingGruppe = useSelector((state: any) => loadingSelectorLaasGruppe(state)) - const isFetchingExcel = useSelector((state: any) => loadingSelectorGetExcel(state)) const { gruppe, error } = useGruppeById(gruppeId) @@ -57,11 +56,13 @@ const GruppeHeader = ({ gruppeId }: GruppeHeaderProps) => { return } - const laasGruppe = (id: number) => { - dispatch(actions.laas(id, { erLaast: true, laastBeskrivelse: 'Låst gruppe' })) + const laasGruppe = async (id: number) => { + await dispatch(actions.laas(id, { erLaast: true, laastBeskrivelse: 'Låst gruppe' })) + await matchMutate(REGEX_BACKEND_GRUPPER) } - const deleteGruppe = (id: number) => { - dispatch(actions.remove(id)) + const deleteGruppe = async (id: number) => { + await dispatch(actions.remove(id)) + await matchMutate(REGEX_BACKEND_GRUPPER) } const erLaast = gruppe.erLaast @@ -71,10 +72,14 @@ const GruppeHeader = ({ gruppeId }: GruppeHeaderProps) => { const antallPersoner = gruppe.antallIdenter const brukerNavn = - gruppe.opprettetAv?.brukertype === 'TEAM' + (gruppe.opprettetAv as any)?.brukertype === 'TEAM' ? gruppe.opprettetAv?.brukernavn + ' (team)' : formatBrukerNavn(gruppe.opprettetAv?.brukernavn) + const tagsValue = gruppe.tags + ? arrayToString(gruppe.tags.length > 1 ? [...gruppe.tags].sort() : gruppe.tags) + : '' + return (
    {
    - + - - {gruppe.tags && ( - 1 ? [...gruppe.tags].sort() : gruppe.tags, - )} - /> - )} + + {gruppe.tags && }
@@ -128,12 +126,17 @@ const GruppeHeader = ({ gruppeId }: GruppeHeaderProps) => { onClick={visGjenopprettModal} kind="synchronize" disabled={antallPersoner < 1} - title={antallPersoner < 1 ? 'Kan ikke gjenopprette en tom gruppe' : null} + title={antallPersoner < 1 ? 'Kan ikke gjenopprette en tom gruppe' : undefined} > GJENOPPRETT {gruppe.erEierAvGruppe && !erLaast && ( - + Er du sikker på at du vil låse denne gruppen?
En gruppe som er låst kan ikke endres, og blir heller ikke
påvirket av prodlast i samhandlermiljøet (Q1).
@@ -143,6 +146,7 @@ const GruppeHeader = ({ gruppeId }: GruppeHeaderProps) => { )} {gruppe.erEierAvGruppe && !erLaast && ( {

{team ? `Rediger team ${team.navn}` : 'Opprett team'}

{ + 'use no memo' // Skip compilation for this component const { getValues, control, watch }: any = formMethods const devEnabled = diff --git a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/TenorSoekPage.tsx b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/TenorSoekPage.tsx index ddb977fffca..ec0df3f23a4 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/TenorSoekPage.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/TenorSoekPage.tsx @@ -39,6 +39,7 @@ export const tenorSoekLocalStorageKey = 'tenorSoek' export const tenorSoekStateLocalStorageKey = 'tenorSoekState' export default () => { + 'use no memo' // Skip compilation for this component const [lagreSoekRequest, setLagreSoekRequest] = useState({}) const lagreSoekRequestRef = useRef(lagreSoekRequest) diff --git a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/Arbeidsforhold.tsx b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/Arbeidsforhold.tsx index 32979269dc6..a1e12a44152 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/Arbeidsforhold.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/Arbeidsforhold.tsx @@ -1,5 +1,5 @@ import { useTenorDomain } from '@/utils/hooks/useTenorSoek' -import { SoekKategori } from '@/components/ui/soekForm/SoekForm' +import { SoekKategori } from '@/components/ui/soekForm/SoekFormWrapper' import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { createOptions } from '@/pages/tenorSoek/utils' import React, { SyntheticEvent } from 'react' diff --git a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/EnhetsregisteretForetaksregisteret.tsx b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/EnhetsregisteretForetaksregisteret.tsx index d49f2a5e26e..3a0b082fed7 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/EnhetsregisteretForetaksregisteret.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/EnhetsregisteretForetaksregisteret.tsx @@ -1,4 +1,4 @@ -import { SoekKategori } from '@/components/ui/soekForm/SoekForm' +import { SoekKategori } from '@/components/ui/soekForm/SoekFormWrapper' import React, { SyntheticEvent } from 'react' import { createOptions } from '@/pages/tenorSoek/utils' import { FormSelect } from '@/components/ui/form/inputs/select/Select' diff --git a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretAdresse.tsx b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretAdresse.tsx index 3ddcfdce3ba..c4ca91feaea 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretAdresse.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretAdresse.tsx @@ -1,4 +1,4 @@ -import { SoekKategori } from '@/components/ui/soekForm/SoekForm' +import { SoekKategori } from '@/components/ui/soekForm/SoekFormWrapper' import React from 'react' import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsManager as Options } from '@/service/SelectOptions' diff --git a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretHendelser.tsx b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretHendelser.tsx index 01687d6f677..8b8d85d7072 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretHendelser.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretHendelser.tsx @@ -1,5 +1,5 @@ import { useTenorDomain } from '@/utils/hooks/useTenorSoek' -import { SoekKategori } from '@/components/ui/soekForm/SoekForm' +import { SoekKategori } from '@/components/ui/soekForm/SoekFormWrapper' import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { createOptions } from '@/pages/tenorSoek/utils' import React from 'react' diff --git a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretIdentifikasjonStatus.tsx b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretIdentifikasjonStatus.tsx index 57904387849..251fd85e8c2 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretIdentifikasjonStatus.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretIdentifikasjonStatus.tsx @@ -1,5 +1,5 @@ import { useTenorDomain } from '@/utils/hooks/useTenorSoek' -import { SoekKategori } from '@/components/ui/soekForm/SoekForm' +import { SoekKategori } from '@/components/ui/soekForm/SoekFormWrapper' import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import React, { SyntheticEvent } from 'react' import { FormSelect } from '@/components/ui/form/inputs/select/Select' diff --git a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretNavn.tsx b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretNavn.tsx index a7130c78aa9..7c7db85c59f 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretNavn.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretNavn.tsx @@ -1,7 +1,7 @@ import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { FormSelect } from '@/components/ui/form/inputs/select/Select' import React from 'react' -import { SoekKategori } from '@/components/ui/soekForm/SoekForm' +import { SoekKategori } from '@/components/ui/soekForm/SoekFormWrapper' import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import { oversettBoolean } from '@/utils/DataFormatter' diff --git a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretRelasjoner.tsx b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretRelasjoner.tsx index 877849464c6..4eeef4981e1 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretRelasjoner.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretRelasjoner.tsx @@ -1,5 +1,5 @@ import { useTenorDomain } from '@/utils/hooks/useTenorSoek' -import { SoekKategori } from '@/components/ui/soekForm/SoekForm' +import { SoekKategori } from '@/components/ui/soekForm/SoekFormWrapper' import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { createOptions } from '@/pages/tenorSoek/utils' import React from 'react' diff --git a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretStatsborgerskap.tsx b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretStatsborgerskap.tsx index 716cf436314..55f2c15ec52 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretStatsborgerskap.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/FolkeregisteretStatsborgerskap.tsx @@ -1,7 +1,7 @@ import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { FormSelect } from '@/components/ui/form/inputs/select/Select' import React from 'react' -import { SoekKategori } from '@/components/ui/soekForm/SoekForm' +import { SoekKategori } from '@/components/ui/soekForm/SoekFormWrapper' import { oversettBoolean } from '@/utils/DataFormatter' export const FolkeregisteretStatsborgerskap = ({ handleChange }: any) => { diff --git a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/InntektAordningen.tsx b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/InntektAordningen.tsx index e63b488cd52..7f5e976fb78 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/InntektAordningen.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/InntektAordningen.tsx @@ -3,7 +3,7 @@ import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { useTenorDomain } from '@/utils/hooks/useTenorSoek' import { createOptions } from '@/pages/tenorSoek/utils' -import { SoekKategori } from '@/components/ui/soekForm/SoekForm' +import { SoekKategori } from '@/components/ui/soekForm/SoekFormWrapper' import { Monthpicker } from '@/components/ui/form/inputs/monthpicker/Monthpicker' import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { oversettBoolean } from '@/utils/DataFormatter' diff --git a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/Skattemelding.tsx b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/Skattemelding.tsx index 165c6d14ce8..868250846a1 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/Skattemelding.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/Skattemelding.tsx @@ -2,7 +2,7 @@ import { useTenorDomain } from '@/utils/hooks/useTenorSoek' import { createOptions } from '@/pages/tenorSoek/utils' import { FormSelect } from '@/components/ui/form/inputs/select/Select' import React from 'react' -import { SoekKategori } from '@/components/ui/soekForm/SoekForm' +import { SoekKategori } from '@/components/ui/soekForm/SoekFormWrapper' export const Skattemelding = ({ handleChange }: any) => { const { domain: skattemeldingstypeOptions, loading: loadingSkattemeldingstype } = diff --git a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/Tjenestepensjonsavtale.tsx b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/Tjenestepensjonsavtale.tsx index 727006a7c32..9d5387cda90 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/Tjenestepensjonsavtale.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/Tjenestepensjonsavtale.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { SoekKategori } from '@/components/ui/soekForm/SoekForm' +import { SoekKategori } from '@/components/ui/soekForm/SoekFormWrapper' import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { Monthpicker } from '@/components/ui/form/inputs/monthpicker/Monthpicker' diff --git a/apps/dolly-frontend/src/main/js/src/pages/ui/index.tsx b/apps/dolly-frontend/src/main/js/src/pages/ui/index.tsx deleted file mode 100644 index fc05c93dc04..00000000000 --- a/apps/dolly-frontend/src/main/js/src/pages/ui/index.tsx +++ /dev/null @@ -1,124 +0,0 @@ -import './ui-demo.less' - -// Button -import Button from '@/components/ui/button/Button' -import FavoriteButton from '@/components/ui/button/FavoriteButton/FavoriteButton' -import NavButton from '@/components/ui/button/NavButton/NavButton' -import LinkButton from '@/components/ui/button/LinkButton/LinkButton' -import ExpandButton from '@/components/ui/button/ExpandButton/ExpandButton' -import { PersonIBrukButton } from '@/components/ui/button/PersonIBrukButton/PersonIBrukButton' - -// Loading -import Loading from '@/components/ui/loading/Loading' - -// Icons -import Icon from '@/components/ui/icon/Icon' - -// Header -import { Header } from '@/components/ui/header/Header' - -// SubOverskrift -import SubOverskrift from '@/components/ui/subOverskrift/SubOverskrift' - -// Panel -import Panel from '@/components/ui/panel/Panel' - -// API Feilmelding -import ApiFeilmelding from '@/components/ui/apiFeilmelding/ApiFeilmelding' - -// ContentContainer -import ContentContainer from '@/components/ui/contentContainer/ContentContainer' - -// AppError -import { AppError } from '@/components/ui/appError/AppError' - -// TextEditor -import { TextEditor } from '@/components/ui/form/inputs/textEditor/TextEditor' - -export default function () { - return ( -
-

UI elementer

-

Oversikt over de mest brukte UI-elementene i Dolly.

- -

Knapper

-

Standard knapper

- - - - -

Favoritt knapp

- - - - - -

NAV knapp

- Avbryt - OPPRETT - -

Link knapp

- - -

Expand knapp

- - -

Person i bruk knapp

- - - -

Icons

- - - - -

Header

-
- -
- -

Sub overskrift

- - - -

Panel

- Dette er panelets innhold - - Dette er panelets innhold - - - Dette er panelets innhold - - - Dette er panelets innhold - - - Dette er panelets innhold - - - Dette er panelets innhold - - -

Text Editor

- {}} /> - {}} /> - -

ContentContainer

- Dette er en ContentContainer - -

Application error

- - -

API Feilmelding

- - -

Loading spinner

- - - - -
- ) -} diff --git a/apps/dolly-frontend/src/main/js/src/pages/ui/ui-demo.less b/apps/dolly-frontend/src/main/js/src/pages/ui/ui-demo.less deleted file mode 100644 index 1c81f00048e..00000000000 --- a/apps/dolly-frontend/src/main/js/src/pages/ui/ui-demo.less +++ /dev/null @@ -1,6 +0,0 @@ -.ui-demo { - > h2 { - padding: 10px 0; - border-bottom: 1px solid #ccc; - } -} diff --git a/apps/dolly-frontend/src/main/js/src/utils/hooks/useBestilling.tsx b/apps/dolly-frontend/src/main/js/src/utils/hooks/useBestilling.tsx index 5c599a88424..0eb3b332de0 100644 --- a/apps/dolly-frontend/src/main/js/src/utils/hooks/useBestilling.tsx +++ b/apps/dolly-frontend/src/main/js/src/utils/hooks/useBestilling.tsx @@ -39,9 +39,12 @@ export type Bestilling = { status: System[] } +type VisningType = 'personer' | 'liste' | string + export const useBestilteMiljoerForGruppe = (gruppeId: string | number) => { if (!gruppeId) { return { + miljoer: undefined as string[] | undefined, loading: false, error: 'GruppeId mangler!', } @@ -62,6 +65,8 @@ export const useBestilteMiljoerForGruppe = (gruppeId: string | number) => { export const useBestillingerGruppe = (gruppeId: string | number) => { if (!gruppeId) { return { + bestillinger: undefined as Bestilling[] | undefined, + bestillingerById: undefined as Record | undefined, loading: false, error: 'GruppeId mangler!', } @@ -73,8 +78,11 @@ export const useBestillingerGruppe = (gruppeId: string | number) => { ) const bestillingerSorted = data - ?.sort?.((bestilling, bestilling2) => (bestilling.id < bestilling2.id ? 1 : -1)) - .reduce((acc: { [key: string]: Bestilling }, curr) => ((acc[curr.id] = curr), acc), {}) + ?.sort?.((a, b) => (a.id < b.id ? 1 : -1)) + .reduce>((acc, curr) => { + acc[curr.id] = curr + return acc + }, {}) return { bestillinger: data, @@ -86,29 +94,34 @@ export const useBestillingerGruppe = (gruppeId: string | number) => { export const useIkkeFerdigBestillingerGruppe = ( gruppeId: string | number, - visning, + visning: VisningType, sidetall: number, sideStoerrelse: number, - update: string, + update?: string, ) => { if (!gruppeId) { return { + bestillinger: undefined as Bestilling[] | undefined, + bestillingerById: undefined as Record | undefined, loading: false, error: 'GruppeId mangler!', } } const updateParam = update ? `?update=${update}` : '' - const url = - visning == 'personer' + visning === 'personer' ? getIkkeFerdigBestillingerGruppeUrl(gruppeId) + updateParam : getBestillingerGruppeUrl(gruppeId) + `?page=${sidetall}&pageSize=${sideStoerrelse}` + const { data, isLoading, error } = useSWR(url, fetcher) const bestillingerSorted = data - ?.sort?.((bestilling, bestilling2) => (bestilling.id < bestilling2.id ? 1 : -1)) - ?.reduce?.((acc: { [key: string]: Bestilling }, curr) => ((acc[curr.id] = curr), acc), {}) + ?.sort?.((a, b) => (a.id < b.id ? 1 : -1)) + ?.reduce?.>((acc, curr) => { + acc[curr.id] = curr + return acc + }, {}) return { bestillinger: data, @@ -123,18 +136,13 @@ export const useBestillingById = ( erOrganisasjon = false, autoRefresh = false, ) => { - const shouldFetch = () => { - return bestillingId && !erOrganisasjon - } + const shouldFetch = !!bestillingId && !erOrganisasjon + const key: string | null = shouldFetch ? getBestillingByIdUrl(bestillingId) : null - const { data, isLoading, error } = useSWR( - shouldFetch() ? getBestillingByIdUrl(bestillingId) : null, - fetcher, - { - refreshInterval: autoRefresh ? 1000 : null, - dedupingInterval: autoRefresh ? 1000 : null, - }, - ) + const { data, isLoading, error } = useSWR(key, fetcher, { + refreshInterval: autoRefresh ? 1000 : 0, + dedupingInterval: autoRefresh ? 1000 : 2000, + }) return { bestilling: data, @@ -147,8 +155,9 @@ export const useBestilteMiljoer = ( bestillingIdListe: Array | undefined, fagsystem: string, ) => { - if (!bestillingIdListe || bestillingIdListe?.length < 1) { + if (!bestillingIdListe || bestillingIdListe.length < 1) { return { + bestilteMiljoer: undefined as string[] | undefined, loading: false, error: 'Bestilling-id mangler!', } @@ -159,10 +168,10 @@ export const useBestilteMiljoer = ( multiFetcherAll, ) - const miljoer = [] - data?.map?.((bestilling) => { + const miljoer: string[] = [] + data?.forEach?.((bestilling) => { bestilling?.environments?.forEach((miljo) => { - if (!miljoer.includes(miljo) && bestilling.status?.find((s) => s.id === fagsystem)) { + if (!miljoer.includes(miljo) && bestilling.status?.some((s) => s.id === fagsystem)) { miljoer.push(miljo) } }) diff --git a/apps/dolly-frontend/src/main/js/src/utils/hooks/useDollyInfostriper.tsx b/apps/dolly-frontend/src/main/js/src/utils/hooks/useDollyInfostriper.tsx index 66bacf471cd..799886beb7b 100644 --- a/apps/dolly-frontend/src/main/js/src/utils/hooks/useDollyInfostriper.tsx +++ b/apps/dolly-frontend/src/main/js/src/utils/hooks/useDollyInfostriper.tsx @@ -1,6 +1,5 @@ import { useCallback } from 'react' -import useSWR from 'swr' -import { fetcher } from '@/api' +import useSWR, { mutate as globalMutate } from 'swr' export interface InfoStripeType { id: number @@ -22,14 +21,26 @@ export interface UpdateInfostripeInput extends CreateInfostripeInput { } const INFOSTRIPE_URL = '/dolly-backend/api/v1/infostripe' +const FUTURE_KEY = `${INFOSTRIPE_URL}?inkluderFremtidige=true` + +export const useDollyInfostriper = (inkluderFremtidige = false) => { + const listUrl = inkluderFremtidige ? FUTURE_KEY : INFOSTRIPE_URL -export const useDollyInfostriper = () => { const { data, isLoading, error, mutate } = useSWR( - INFOSTRIPE_URL, - fetcher, + listUrl, + async (url: string) => { + const resp = await fetch(url) + if (!resp.ok) throw new Error(`Failed ${resp.status}`) + return resp.json() + }, { refreshInterval: 60000, dedupingInterval: 60000 }, ) + const revalidateAll = useCallback(async () => { + await mutate() + await globalMutate(FUTURE_KEY) + }, [mutate]) + const createInfostripe = useCallback( async (input: CreateInfostripeInput) => { const resp = await fetch(INFOSTRIPE_URL, { @@ -38,9 +49,9 @@ export const useDollyInfostriper = () => { body: JSON.stringify(input), }) if (!resp.ok) throw new Error(`Create failed ${resp.status}`) - return mutate() + await revalidateAll() }, - [mutate], + [revalidateAll], ) const updateInfostripe = useCallback( @@ -52,27 +63,28 @@ export const useDollyInfostriper = () => { body: JSON.stringify(input), }) if (!resp.ok) throw new Error(`Update failed ${resp.status}`) - return mutate() + await revalidateAll() }, - [mutate], + [revalidateAll], ) const deleteInfostripe = useCallback( async (id: number) => { const url = `${INFOSTRIPE_URL}/${id}` - const prev = data + const previous = data await mutate((curr) => (curr ? curr.filter((c) => c.id !== id) : curr), { revalidate: false }) const resp = await fetch(url, { method: 'DELETE' }) if (!resp.ok) { - await mutate(prev, { revalidate: false }) + await mutate(previous, { revalidate: false }) throw new Error(`Delete failed ${resp.status}`) } + await revalidateAll() }, - [data, mutate], + [data, mutate, revalidateAll], ) return { - infostriper: data && Array.isArray(data) ? data : [], + infostriper: Array.isArray(data) ? data : [], loading: isLoading, error, createInfostripe, diff --git a/apps/dolly-frontend/src/main/js/vite.config.js b/apps/dolly-frontend/src/main/js/vite.config.js index 49a31d647a4..587b5688c92 100644 --- a/apps/dolly-frontend/src/main/js/vite.config.js +++ b/apps/dolly-frontend/src/main/js/vite.config.js @@ -22,6 +22,10 @@ const createProxyConfig = (routes) => { ) } +const ReactCompilerConfig = { + target: '19', +} + export default defineConfig(({ mode }) => ({ base: '/', build: { @@ -68,7 +72,7 @@ export default defineConfig(({ mode }) => ({ react({ babel: { plugins: [ - // 'babel-plugin-react-compiler', //TODO: Enable when react-compiler exits beta + ['babel-plugin-react-compiler', ReactCompilerConfig], [ 'babel-plugin-styled-components', {