From 6e083cca402b105350c6454156644701a6d134e3 Mon Sep 17 00:00:00 2001 From: "lukasz.bielecki" Date: Wed, 3 Dec 2025 13:53:29 +0100 Subject: [PATCH 1/6] feat(article-search): enhance error handling and user feedback --- package-lock.json | 159 ++++++++++-------- .../src/frontend/ArticleSearch.client.tsx | 29 +++- .../src/frontend/ArticleSearch.server.tsx | 3 +- .../src/frontend/ArticleSearchError.tsx | 21 +++ 4 files changed, 138 insertions(+), 74 deletions(-) create mode 100644 packages/blocks/article-search/src/frontend/ArticleSearchError.tsx diff --git a/package-lock.json b/package-lock.json index 62da61b5a..8b8abb747 100644 --- a/package-lock.json +++ b/package-lock.json @@ -278,6 +278,7 @@ "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "readdirp": "^4.0.1" }, @@ -673,6 +674,7 @@ "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.44.0.tgz", "integrity": "sha512-/FRKUM1G4xn3vV8+9xH1WJ9XknU8rkBGlefruq9jDhYUAvYozKimhrmC2pRqw/RyHhPivmgZCRuC8jHP8piz4Q==", "license": "MIT", + "peer": true, "dependencies": { "@algolia/client-common": "5.44.0", "@algolia/requester-browser-xhr": "5.44.0", @@ -3846,6 +3848,7 @@ "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", @@ -4300,6 +4303,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" }, @@ -4322,6 +4326,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" } @@ -5839,6 +5844,7 @@ "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.9.2.tgz", "integrity": "sha512-C5wZsGuKTY8jEYsqdxhhFOe1ZDjH0uIYJ9T/jebHwkyxqnr4wW0jTkB72OMqNjsoQRcb0JN3PcSeTwFlVgzCZg==", "license": "MIT", + "peer": true, "dependencies": { "@docusaurus/core": "3.9.2", "@docusaurus/logger": "3.9.2", @@ -6067,6 +6073,7 @@ "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-3.9.2.tgz", "integrity": "sha512-IGUsArG5hhekXd7RDb11v94ycpJpFdJPkLnt10fFQWOVxAtq5/D7hT6lzc2fhyQKaaCE62qVajOMKL7OiAFAIA==", "license": "MIT", + "peer": true, "dependencies": { "@docusaurus/core": "3.9.2", "@docusaurus/logger": "3.9.2", @@ -6107,6 +6114,7 @@ "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-3.9.2.tgz", "integrity": "sha512-6c4DAbR6n6nPbnZhY2V3tzpnKnGL+6aOsLvFL26VRqhlczli9eWG0VDUNoCQEPnGwDMhPS42UhSAnz5pThm5Ag==", "license": "MIT", + "peer": true, "dependencies": { "@docusaurus/mdx-loader": "3.9.2", "@docusaurus/module-type-aliases": "3.9.2", @@ -11478,6 +11486,7 @@ "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-3.1.1.tgz", "integrity": "sha512-f++rKLQgUVYDAtECQ6fn/is15GkEH9+nZPM3MS0RcxVqoTfawHvDlSCH7JbMhAM6uJ32v3eXLvLmLvjGu7PTQw==", "license": "MIT", + "peer": true, "dependencies": { "@types/mdx": "^2.0.0" }, @@ -11562,6 +11571,7 @@ "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-4.0.1.tgz", "integrity": "sha512-68pFJgu+/AZbWkGu65Z3r55bTsCPlgyKaV4BSG8yUAD72q1PPuyVRgUwFv6BxdnibTUHlyxm06FmYWNC+bjN7A==", "license": "MIT", + "peer": true, "peerDependencies": { "@nestjs/common": "^10.0.0 || ^11.0.0", "axios": "^1.3.1", @@ -11573,6 +11583,7 @@ "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.9.tgz", "integrity": "sha512-zDntUTReRbAThIfSp3dQZ9kKqI+LjgLp5YZN5c1bgNRDuoeLySAoZg46Bg1a+uV8TMgIRziHocglKGNzr6l+bQ==", "license": "MIT", + "peer": true, "dependencies": { "file-type": "21.1.0", "iterare": "1.2.1", @@ -11604,6 +11615,7 @@ "resolved": "https://registry.npmjs.org/@nestjs/config/-/config-4.0.2.tgz", "integrity": "sha512-McMW6EXtpc8+CwTUwFdg6h7dYcBUpH5iUILCclAsa+MbCEvC9ZKu4dCHRlJqALuhjLw97pbQu62l4+wRwGeZqA==", "license": "MIT", + "peer": true, "dependencies": { "dotenv": "16.4.7", "dotenv-expand": "12.0.1", @@ -11647,6 +11659,7 @@ "integrity": "sha512-a00B0BM4X+9z+t3UxJqIZlemIwCQdYoPKrMcM+ky4z3pkqqG1eTWexjs+YXpGObnLnjtMPVKWlcZHp3adDYvUw==", "hasInstallScript": true, "license": "MIT", + "peer": true, "dependencies": { "@nuxt/opencollective": "0.4.1", "fast-safe-stringify": "2.1.1", @@ -11697,6 +11710,7 @@ "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-11.1.9.tgz", "integrity": "sha512-GVd3+0lO0mJq2m1kl9hDDnVrX3Nd4oH3oDfklz0pZEVEVS0KVSp63ufHq2Lu9cyPdSBuelJr9iPm2QQ1yX+Kmw==", "license": "MIT", + "peer": true, "dependencies": { "cors": "2.8.5", "express": "5.1.0", @@ -13081,42 +13095,6 @@ "@noble/hashes": "^1.1.5" } }, - "node_modules/@parcel/watcher": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", - "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "dependencies": { - "detect-libc": "^1.0.3", - "is-glob": "^4.0.3", - "micromatch": "^4.0.5", - "node-addon-api": "^7.0.0" - }, - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "@parcel/watcher-android-arm64": "2.5.1", - "@parcel/watcher-darwin-arm64": "2.5.1", - "@parcel/watcher-darwin-x64": "2.5.1", - "@parcel/watcher-freebsd-x64": "2.5.1", - "@parcel/watcher-linux-arm-glibc": "2.5.1", - "@parcel/watcher-linux-arm-musl": "2.5.1", - "@parcel/watcher-linux-arm64-glibc": "2.5.1", - "@parcel/watcher-linux-arm64-musl": "2.5.1", - "@parcel/watcher-linux-x64-glibc": "2.5.1", - "@parcel/watcher-linux-x64-musl": "2.5.1", - "@parcel/watcher-win32-arm64": "2.5.1", - "@parcel/watcher-win32-ia32": "2.5.1", - "@parcel/watcher-win32-x64": "2.5.1" - } - }, "node_modules/@parcel/watcher-android-arm64": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", @@ -13377,19 +13355,6 @@ "url": "https://opencollective.com/parcel" } }, - "node_modules/@parcel/watcher/node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "license": "Apache-2.0", - "optional": true, - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -13469,6 +13434,7 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -13578,6 +13544,7 @@ "integrity": "sha512-QXFT+N/bva/QI2qoXmjBzL7D6aliPffIwP+81AdTGq0FXDoLxLkWivGMawG8iM5B9BKfxLIXxfWWAF6wbuJU6g==", "hasInstallScript": true, "license": "Apache-2.0", + "peer": true, "engines": { "node": ">=18.18" }, @@ -15868,6 +15835,7 @@ "resolved": "https://registry.npmjs.org/@redis/client/-/client-5.10.0.tgz", "integrity": "sha512-JXmM4XCoso6C75Mr3lhKA3eNxSzkYi3nCzxDIKY+YOszYsJjuKbFgVtguVPbLMOttN4iu2fXoc2BGhdnYhIOxA==", "license": "MIT", + "peer": true, "dependencies": { "cluster-key-slot": "1.1.2" }, @@ -16128,6 +16096,7 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -16762,6 +16731,7 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/@svgr/core/-/core-8.1.0.tgz", "integrity": "sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==", + "peer": true, "dependencies": { "@babel/core": "^7.21.3", "@svgr/babel-preset": "8.1.0", @@ -17072,6 +17042,7 @@ "version": "0.5.15", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz", "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==", + "peer": true, "dependencies": { "tslib": "^2.8.0" } @@ -17453,7 +17424,6 @@ "integrity": "sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", @@ -17474,7 +17444,6 @@ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=10" }, @@ -17488,7 +17457,6 @@ "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", "dev": true, "license": "Apache-2.0", - "peer": true, "dependencies": { "dequal": "^2.0.3" } @@ -17499,7 +17467,6 @@ "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", @@ -17514,8 +17481,7 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@testing-library/jest-dom": { "version": "6.8.0", @@ -17904,8 +17870,7 @@ "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@types/babel__core": { "version": "7.20.5", @@ -18328,6 +18293,7 @@ "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", "license": "MIT", + "peer": true, "dependencies": { "@types/estree": "*", "@types/json-schema": "*" @@ -18361,6 +18327,7 @@ "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.25.tgz", "integrity": "sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==", "license": "MIT", + "peer": true, "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", @@ -18607,6 +18574,7 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", "license": "MIT", + "peer": true, "dependencies": { "undici-types": "~7.16.0" } @@ -18650,6 +18618,7 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.7.tgz", "integrity": "sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==", "license": "MIT", + "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -18669,6 +18638,7 @@ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", "license": "MIT", + "peer": true, "peerDependencies": { "@types/react": "^19.2.0" } @@ -18806,7 +18776,8 @@ "version": "5.0.2", "resolved": "https://registry.npmjs.org/@types/throttle-debounce/-/throttle-debounce-5.0.2.tgz", "integrity": "sha512-pDzSNulqooSKvSNcksnV72nk8p7gRqN8As71Sp28nov1IgmPKWbOEIwAWvBME5pPTtaXJAvG3O4oc76HlQ4kqQ==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@types/through": { "version": "0.0.33", @@ -19098,6 +19069,7 @@ "integrity": "sha512-lJi3PfxVmo0AkEY93ecfN+r8SofEqZNGByvHAI3GBLrvt1Cw6H5k1IM02nSzu0RfUafr2EvFSw0wAsZgubNplQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.47.0", "@typescript-eslint/types": "8.47.0", @@ -19930,6 +19902,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -20015,6 +19988,7 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -20075,6 +20049,7 @@ "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.44.0.tgz", "integrity": "sha512-f8IpsbdQjzTjr/4mJ/jv5UplrtyMnnciGax6/B0OnLCs2/GJTK13O4Y7Ff1AvJVAaztanH+m5nzPoUq6EAy+aA==", "license": "MIT", + "peer": true, "dependencies": { "@algolia/abtesting": "1.10.0", "@algolia/client-abtesting": "5.44.0", @@ -20630,6 +20605,7 @@ "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz", "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", "license": "MIT", + "peer": true, "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.4", @@ -20689,6 +20665,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -21497,6 +21474,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.25", "caniuse-lite": "^1.0.30001754", @@ -22261,6 +22239,7 @@ "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.0.3.tgz", "integrity": "sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==", "license": "Apache-2.0", + "peer": true, "dependencies": { "@chevrotain/cst-dts-gen": "11.0.3", "@chevrotain/gast": "11.0.3", @@ -23319,6 +23298,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -23764,6 +23744,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -24044,6 +24025,7 @@ "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.33.1.tgz", "integrity": "sha512-iJc4TwyANnOGR1OmWhsS9ayRS3s+XQ185FmuHObThD+5AeJCakAAbWv8KimMTt08xCCLNgneQwFp+JRJOr9qGQ==", "license": "MIT", + "peer": true, "engines": { "node": ">=0.10" } @@ -24458,6 +24440,7 @@ "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", "license": "ISC", + "peer": true, "engines": { "node": ">=12" } @@ -24656,7 +24639,8 @@ "version": "1.11.19", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz", "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/debounce": { "version": "1.2.1", @@ -25176,8 +25160,7 @@ "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/dom-converter": { "version": "0.2.0", @@ -25621,6 +25604,7 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "peer": true, "dependencies": { "ansi-colors": "^4.1.1", "strip-ansi": "^6.0.1" @@ -25893,6 +25877,7 @@ "integrity": "sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==", "dev": true, "hasInstallScript": true, + "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -25986,6 +25971,7 @@ "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -26087,6 +26073,7 @@ "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", "dev": true, "license": "MIT", + "peer": true, "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -26197,6 +26184,7 @@ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", "dev": true, + "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.8", @@ -28375,6 +28363,7 @@ "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.12.0.tgz", "integrity": "sha512-DKKrynuQRne0PNpEbzuEdHlYOMksHSUI8Zc9Unei5gTsMNA2/vMpoMz/yKba50pejK56qj98qM0SjYxAKi13gQ==", "license": "MIT", + "peer": true, "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } @@ -28424,6 +28413,7 @@ "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-7.3.4.tgz", "integrity": "sha512-kbpP5dw9hHIL5jN/2VS2JU0/Sc1hlsj7zrYBKSDiYd5iG8QfX7P79u26ZBi84eAijsqYVZEpLvCCwEzVxscWhg==", "license": "MIT", + "peer": true, "dependencies": { "@graphql-typed-document-node/core": "^3.2.0" }, @@ -28435,6 +28425,7 @@ "version": "2.12.6", "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz", "integrity": "sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==", + "peer": true, "dependencies": { "tslib": "^2.1.0" }, @@ -32820,6 +32811,7 @@ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", "license": "MIT", + "peer": true, "dependencies": { "jws": "^3.2.2", "lodash.includes": "^4.3.0", @@ -33957,7 +33949,6 @@ "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", "dev": true, "license": "MIT", - "peer": true, "bin": { "lz-string": "bin/bin.js" } @@ -36415,6 +36406,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -36718,6 +36710,7 @@ "resolved": "https://registry.npmjs.org/next/-/next-15.5.6.tgz", "integrity": "sha512-zTxsnI3LQo3c9HSdSf91O1jMNsEzIXDShXd4wVdg9y5shwLqBXi4ZtUUJyB86KGVSJLZx0PFONvO54aheGX8QQ==", "license": "MIT", + "peer": true, "dependencies": { "@next/env": "15.5.6", "@swc/helpers": "0.5.15", @@ -36770,6 +36763,7 @@ "resolved": "https://registry.npmjs.org/next-auth/-/next-auth-5.0.0-beta.30.tgz", "integrity": "sha512-+c51gquM3F6nMVmoAusRJ7RIoY0K4Ts9HCCwyy/BRoe4mp3msZpOzYMyb5LAYc1wSo74PMQkGDcaghIO7W6Xjg==", "license": "ISC", + "peer": true, "dependencies": { "@auth/core": "0.41.0" }, @@ -36808,6 +36802,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "@formatjs/intl-localematcher": "^0.5.4", "@swc/core": "^1.15.2", @@ -38451,6 +38446,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -39692,6 +39688,7 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", + "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -39794,6 +39791,7 @@ "resolved": "https://registry.npmjs.org/preact/-/preact-10.24.3.tgz", "integrity": "sha512-Z2dPnBnMUfyQfSQ+GBdsGa16hz35YmLmtTLhM169uW944hYL6xzTYkJjC07j+Wosz733pMWx0fgON3JNw1jJQA==", "license": "MIT", + "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" @@ -39823,6 +39821,7 @@ "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "dev": true, "license": "MIT", + "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -39936,6 +39935,7 @@ "integrity": "sha512-F3eX7K+tWpkbhl3l4+VkFtrwJlLXbAM+f9jolgoUZbFcm1DgHZ4cq9AgVEgUym2au5Ad/TDLN8lg83D+M10ycw==", "hasInstallScript": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@prisma/config": "6.19.0", "@prisma/engines": "6.19.0" @@ -40300,6 +40300,7 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.2.0.tgz", "integrity": "sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ==", "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -40378,6 +40379,7 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.0.tgz", "integrity": "sha512-UlbRu4cAiGaIewkPyiRGJk0imDN2T3JjieT6spoL2UeSf5od4n5LB/mQ4ejmxhCFT1tYe8IvaFulzynWovsEFQ==", "license": "MIT", + "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -40453,6 +40455,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-6.0.0.tgz", "integrity": "sha512-YMMxTUQV/QFSnbgrP3tjDzLHRg7vsbMn8e9HAa8o/1iXoiomo48b7sk/kkmWEuWNDPJVlKSJRB6Y2fHqdJk+SQ==", + "peer": true, "dependencies": { "@types/react": "*" }, @@ -40481,6 +40484,7 @@ "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -40534,6 +40538,7 @@ "version": "5.3.4", "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.3.4.tgz", "integrity": "sha512-Ys9K+ppnJah3QuaRiLxk+jDWOR1MekYQrlytiXxC1RyfbdsZkS5pvKAzCCr031xHixZwpnsYNT5xysdFHQaYsA==", + "peer": true, "dependencies": { "@babel/runtime": "^7.12.13", "history": "^4.9.0", @@ -40925,7 +40930,8 @@ "node_modules/reflect-metadata": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", - "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==" + "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==", + "peer": true }, "node_modules/reflect.getprototypeof": { "version": "1.0.10", @@ -41699,6 +41705,7 @@ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "license": "Apache-2.0", + "peer": true, "dependencies": { "tslib": "^2.1.0" } @@ -41795,6 +41802,7 @@ "resolved": "https://registry.npmjs.org/sass/-/sass-1.94.2.tgz", "integrity": "sha512-N+7WK20/wOr7CzA2snJcUSSNTCzeCGUTFY3OgeQP3mZ1aj9NMQ0mSTXwlrnd89j33zzQJGqIN52GIOmYrfq46A==", "license": "MIT", + "peer": true, "dependencies": { "chokidar": "^4.0.0", "immutable": "^5.0.2", @@ -43006,6 +43014,7 @@ "integrity": "sha512-vQMufKKA9TxgoEDHJv3esrqUkjszuuRiDkThiHxENFPdQawHhm2Dei+iwNRwH5W671zTDy9iRT9P1KDjcU5Iyw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@storybook/global": "^5.0.0", "@storybook/icons": "^1.6.0", @@ -43572,7 +43581,8 @@ "version": "2.3.16", "resolved": "https://registry.npmjs.org/survey-core/-/survey-core-2.3.16.tgz", "integrity": "sha512-yRbeacio72oBmfODuJ8igRL3N8w7fjEwPPHd3CT019ht14qs4rVNGIs50kdip2NFo3B+xfvP1pQWcr2U7TxKrQ==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/survey-react-ui": { "version": "2.3.16", @@ -43874,7 +43884,8 @@ "version": "4.1.17", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.17.tgz", "integrity": "sha512-j9Ee2YjuQqYT9bbRTfTZht9W/ytp5H+jJpZKiYdP/bpnXARAuELt9ofP0lPnmHjbga7SNQIxdTAXCmtKVYjN+Q==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/tailwindcss-animate": { "version": "1.0.7", @@ -43964,6 +43975,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -44518,6 +44530,7 @@ "version": "10.9.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "peer": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -44644,7 +44657,8 @@ "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "peer": true }, "node_modules/tsx": { "version": "4.20.6", @@ -44679,6 +44693,7 @@ "integrity": "sha512-qBwXXuDT3rA53kbNafGbT5r++BrhRgx3sAo0cHoDAeG9g1ItTmUMgltz3Hy7Hazy1ODqNpR+C7QwqL6DYB52yA==", "dev": true, "license": "MIT", + "peer": true, "bin": { "turbo": "bin/turbo" }, @@ -44811,6 +44826,7 @@ "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "peer": true, "engines": { "node": ">=10" }, @@ -44926,6 +44942,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -46120,6 +46137,7 @@ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.103.0.tgz", "integrity": "sha512-HU1JOuV1OavsZ+mfigY0j8d1TgQgbZ6M+J75zDkpEAwYeXjWSqrGJtgnPblJjd/mAyTNQ7ygw0MiKOn6etz8yw==", "license": "MIT", + "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.8", @@ -46245,6 +46263,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -46405,6 +46424,7 @@ "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -46514,6 +46534,7 @@ "integrity": "sha512-khZGfAeJx6I8K9zKohEWWYN6KDlVw2DHownoe+6Vtwj1LP9WFgegXnVMSkZ/dBEBtXFwrkkydsaPFlB7f8wU2A==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "ansi-html-community": "0.0.8", "html-entities": "^2.1.0", @@ -46563,6 +46584,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -47026,6 +47048,7 @@ "version": "7.5.10", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "peer": true, "engines": { "node": ">=8.3.0" }, @@ -47239,6 +47262,7 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.12.tgz", "integrity": "sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==", "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } @@ -48640,7 +48664,7 @@ }, "packages/integrations/mocked": { "name": "@o2s/integrations.mocked", - "version": "1.13.0", + "version": "1.13.1", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -48781,6 +48805,7 @@ "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-10.4.20.tgz", "integrity": "sha512-hxJxZF7jcKGuUzM9EYbuES80Z/36piJbiqmPy86mk8qOn5gglFebBTvcx7PWVbRNSb4gngASYnefBj/Y2HAzpQ==", "license": "MIT", + "peer": true, "dependencies": { "file-type": "20.4.1", "iterare": "1.2.1", diff --git a/packages/blocks/article-search/src/frontend/ArticleSearch.client.tsx b/packages/blocks/article-search/src/frontend/ArticleSearch.client.tsx index 9200d848e..dd67ac897 100644 --- a/packages/blocks/article-search/src/frontend/ArticleSearch.client.tsx +++ b/packages/blocks/article-search/src/frontend/ArticleSearch.client.tsx @@ -4,6 +4,8 @@ import { createNavigation } from 'next-intl/navigation'; import React, { useState, useTransition } from 'react'; import { debounce } from 'throttle-debounce'; +import { toast } from '@o2s/ui/hooks/use-toast'; + import { Autocomplete } from '@o2s/ui/components/Autocomplete'; import { Container } from '@o2s/ui/components/Container'; @@ -31,12 +33,27 @@ export const ArticleSearchPure: React.FC = ({ const getSuggestions = debounce(300, async (value: string) => { startTransition(async () => { - const result = await sdk.blocks.searchArticles( - { query: value, limit: 5, offset: 0, category }, - { 'x-locale': locale }, - accessToken, - ); - if (result.articles) setSuggestions(result.articles); + try { + const result = await sdk.blocks.searchArticles( + { query: value, limit: 5, offset: 0, category }, + { 'x-locale': locale }, + accessToken, + ); + if (result.articles) { + setSuggestions(result.articles); + } else { + setSuggestions([]); + } + } catch (_error) { + // comment: show toast instead of breaking Storybook when backend is unavailable + toast({ + variant: 'destructive', + title: 'Unable to fetch search results', + description: 'Start the api-harmonization service and refresh Storybook.', + duration: 60000, + }); + setSuggestions([]); + } }); }); diff --git a/packages/blocks/article-search/src/frontend/ArticleSearch.server.tsx b/packages/blocks/article-search/src/frontend/ArticleSearch.server.tsx index e1bf9eeeb..d5dc0ed9f 100644 --- a/packages/blocks/article-search/src/frontend/ArticleSearch.server.tsx +++ b/packages/blocks/article-search/src/frontend/ArticleSearch.server.tsx @@ -4,6 +4,7 @@ import React from 'react'; import { sdk } from '../sdk'; import { ArticleSearchProps } from './ArticleSearch.types'; +import { ArticleSearchError } from './ArticleSearchError'; export const ArticleSearchDynamic = dynamic(() => import('./ArticleSearch.client').then((module) => module.ArticleSearchPure), @@ -35,6 +36,6 @@ export const ArticleSearch: React.FC = async ({ /> ); } catch (_error) { - return null; + return ; } }; diff --git a/packages/blocks/article-search/src/frontend/ArticleSearchError.tsx b/packages/blocks/article-search/src/frontend/ArticleSearchError.tsx new file mode 100644 index 000000000..e0d03128f --- /dev/null +++ b/packages/blocks/article-search/src/frontend/ArticleSearchError.tsx @@ -0,0 +1,21 @@ +import React from 'react'; + +import { Container } from '@o2s/ui/components/Container'; + +import { Typography } from '@o2s/ui/elements/typography'; + +// comment: simple inline error component for article-search block when backend is unavailable +export const ArticleSearchError: React.FC = () => { + return ( + +
+ +

Unable to connect to the backend

+
+ + Make sure that the api-harmonization service is running and then refresh Storybook. + +
+
+ ); +}; From 7e6d3e7c07bfa5a30cbb69ae8ddcb2f00016f851 Mon Sep 17 00:00:00 2001 From: "lukasz.bielecki" Date: Thu, 4 Dec 2025 10:39:01 +0100 Subject: [PATCH 2/6] refactor: improve error handling across various blocks with user feedback via toast notifications --- .../src/frontend/ArticleSearch.client.tsx | 1 - .../src/frontend/ArticleSearch.server.tsx | 4 +- .../src/frontend/ArticleSearchError.tsx | 21 ------- .../category/src/frontend/Category.client.tsx | 18 ++++-- .../src/frontend/InvoiceList.client.tsx | 34 +++++++--- .../frontend/NotificationDetails.client.tsx | 26 +++++--- .../src/frontend/NotificationList.client.tsx | 40 +++++++++--- .../src/frontend/OrderDetails.client.tsx | 60 +++++++++++------- .../src/frontend/OrderList.client.tsx | 32 +++++++--- .../src/frontend/OrdersSummary.client.tsx | 62 +++++++++++-------- .../src/frontend/ServiceList.client.tsx | 32 +++++++--- .../src/frontend/TicketList.client.tsx | 32 +++++++--- 12 files changed, 240 insertions(+), 122 deletions(-) delete mode 100644 packages/blocks/article-search/src/frontend/ArticleSearchError.tsx diff --git a/packages/blocks/article-search/src/frontend/ArticleSearch.client.tsx b/packages/blocks/article-search/src/frontend/ArticleSearch.client.tsx index dd67ac897..a0c249f1c 100644 --- a/packages/blocks/article-search/src/frontend/ArticleSearch.client.tsx +++ b/packages/blocks/article-search/src/frontend/ArticleSearch.client.tsx @@ -45,7 +45,6 @@ export const ArticleSearchPure: React.FC = ({ setSuggestions([]); } } catch (_error) { - // comment: show toast instead of breaking Storybook when backend is unavailable toast({ variant: 'destructive', title: 'Unable to fetch search results', diff --git a/packages/blocks/article-search/src/frontend/ArticleSearch.server.tsx b/packages/blocks/article-search/src/frontend/ArticleSearch.server.tsx index d5dc0ed9f..604e67277 100644 --- a/packages/blocks/article-search/src/frontend/ArticleSearch.server.tsx +++ b/packages/blocks/article-search/src/frontend/ArticleSearch.server.tsx @@ -4,7 +4,6 @@ import React from 'react'; import { sdk } from '../sdk'; import { ArticleSearchProps } from './ArticleSearch.types'; -import { ArticleSearchError } from './ArticleSearchError'; export const ArticleSearchDynamic = dynamic(() => import('./ArticleSearch.client').then((module) => module.ArticleSearchPure), @@ -25,6 +24,7 @@ export const ArticleSearch: React.FC = async ({ { 'x-locale': locale }, accessToken, ); + return ( = async ({ /> ); } catch (_error) { - return ; + return null; } }; diff --git a/packages/blocks/article-search/src/frontend/ArticleSearchError.tsx b/packages/blocks/article-search/src/frontend/ArticleSearchError.tsx deleted file mode 100644 index e0d03128f..000000000 --- a/packages/blocks/article-search/src/frontend/ArticleSearchError.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; - -import { Container } from '@o2s/ui/components/Container'; - -import { Typography } from '@o2s/ui/elements/typography'; - -// comment: simple inline error component for article-search block when backend is unavailable -export const ArticleSearchError: React.FC = () => { - return ( - -
- -

Unable to connect to the backend

-
- - Make sure that the api-harmonization service is running and then refresh Storybook. - -
-
- ); -}; diff --git a/packages/blocks/category/src/frontend/Category.client.tsx b/packages/blocks/category/src/frontend/Category.client.tsx index 4e8397141..007e509e3 100644 --- a/packages/blocks/category/src/frontend/Category.client.tsx +++ b/packages/blocks/category/src/frontend/Category.client.tsx @@ -3,6 +3,8 @@ import { createNavigation } from 'next-intl/navigation'; import React, { useState, useTransition } from 'react'; +import { toast } from '@o2s/ui/hooks/use-toast'; + import { BlogCard } from '@o2s/ui/components/Cards/BlogCard'; import { Container } from '@o2s/ui/components/Container'; import { ContentSection } from '@o2s/ui/components/ContentSection'; @@ -42,11 +44,19 @@ export const CategoryPure: React.FC = ({ const handlePagination = (data: Partial) => { startTransition(async () => { - const newArticles = { ...articles, ...data }; - const newData = await sdk.blocks.getCategoryArticles(newArticles, { 'x-locale': locale }, accessToken); + try { + const newArticles = { ...articles, ...data }; + const newData = await sdk.blocks.getCategoryArticles(newArticles, { 'x-locale': locale }, accessToken); - setArticles(newArticles); - setData(newData); + setArticles(newArticles); + setData(newData); + } catch (_error) { + toast({ + variant: 'destructive', + title: 'Unable to load category articles', + description: 'Start the api-harmonization service and refresh Storybook.', + }); + } }); }; diff --git a/packages/blocks/invoice-list/src/frontend/InvoiceList.client.tsx b/packages/blocks/invoice-list/src/frontend/InvoiceList.client.tsx index 0f5c9e926..1cf0dae20 100644 --- a/packages/blocks/invoice-list/src/frontend/InvoiceList.client.tsx +++ b/packages/blocks/invoice-list/src/frontend/InvoiceList.client.tsx @@ -48,20 +48,36 @@ export const InvoiceListPure: React.FC = ({ locale, access const handleFilter = (data: Partial) => { startTransition(async () => { - const newFilters = { ...filters, ...data }; - const newData = await sdk.blocks.getInvoiceList(newFilters, { 'x-locale': locale }, accessToken); - - setFilters(newFilters); - setData(newData); + try { + const newFilters = { ...filters, ...data }; + const newData = await sdk.blocks.getInvoiceList(newFilters, { 'x-locale': locale }, accessToken); + + setFilters(newFilters); + setData(newData); + } catch (_error) { + toast({ + variant: 'destructive', + title: 'Unable to load invoices', + description: 'Start the api-harmonization service and refresh Storybook.', + }); + } }); }; const handleReset = () => { startTransition(async () => { - const newData = await sdk.blocks.getInvoiceList(initialFilters, { 'x-locale': locale }, accessToken); - - setFilters(initialFilters); - setData(newData); + try { + const newData = await sdk.blocks.getInvoiceList(initialFilters, { 'x-locale': locale }, accessToken); + + setFilters(initialFilters); + setData(newData); + } catch (_error) { + toast({ + variant: 'destructive', + title: 'Unable to reset invoice filters', + description: 'Start the api-harmonization service and refresh Storybook.', + }); + } }); }; diff --git a/packages/blocks/notification-details/src/frontend/NotificationDetails.client.tsx b/packages/blocks/notification-details/src/frontend/NotificationDetails.client.tsx index 3d2cae2d0..ac0d99d03 100644 --- a/packages/blocks/notification-details/src/frontend/NotificationDetails.client.tsx +++ b/packages/blocks/notification-details/src/frontend/NotificationDetails.client.tsx @@ -4,6 +4,8 @@ import React, { useEffect } from 'react'; import { Mappings } from '@o2s/utils.frontend'; +import { toast } from '@o2s/ui/hooks/use-toast'; + import { Container } from '@o2s/ui/components/Container'; import { RichText } from '@o2s/ui/components/RichText'; @@ -20,14 +22,22 @@ export const NotificationDetailsPure: React.FC = ( useEffect(() => { const markAsViewed = async () => { - await sdk.blocks.markNotificationAs( - { - id: component.id, - status: 'VIEWED', - }, - { 'x-locale': locale }, - component.accessToken, - ); + try { + await sdk.blocks.markNotificationAs( + { + id: component.id, + status: 'VIEWED', + }, + { 'x-locale': locale }, + component.accessToken, + ); + } catch (_error) { + toast({ + variant: 'destructive', + title: 'Unable to mark notification as viewed', + description: 'Start the api-harmonization service and refresh Storybook.', + }); + } }; if (notification.status.value === 'UNVIEWED') { diff --git a/packages/blocks/notification-list/src/frontend/NotificationList.client.tsx b/packages/blocks/notification-list/src/frontend/NotificationList.client.tsx index eda8cd35f..1564aa7f4 100644 --- a/packages/blocks/notification-list/src/frontend/NotificationList.client.tsx +++ b/packages/blocks/notification-list/src/frontend/NotificationList.client.tsx @@ -8,6 +8,8 @@ import { Mappings } from '@o2s/utils.frontend'; import { cn } from '@o2s/ui/lib/utils'; +import { toast } from '@o2s/ui/hooks/use-toast'; + import type { DataListColumnConfig } from '@o2s/ui/components/DataList'; import { DataView } from '@o2s/ui/components/DataView'; import { FiltersSection } from '@o2s/ui/components/Filters'; @@ -51,20 +53,40 @@ export const NotificationListPure: React.FC = ({ const handleFilter = (data: Partial) => { startTransition(async () => { - const newFilters = { ...filters, ...data }; - const newData = await sdk.blocks.getNotificationList(newFilters, { 'x-locale': locale }, accessToken); - - setFilters(newFilters); - setData(newData); + try { + const newFilters = { ...filters, ...data }; + const newData = await sdk.blocks.getNotificationList(newFilters, { 'x-locale': locale }, accessToken); + + setFilters(newFilters); + setData(newData); + } catch (_error) { + toast({ + variant: 'destructive', + title: 'Unable to load notifications', + description: 'Start the api-harmonization service and refresh Storybook.', + }); + } }); }; const handleReset = () => { startTransition(async () => { - const newData = await sdk.blocks.getNotificationList(initialFilters, { 'x-locale': locale }, accessToken); - - setFilters(initialFilters); - setData(newData); + try { + const newData = await sdk.blocks.getNotificationList( + initialFilters, + { 'x-locale': locale }, + accessToken, + ); + + setFilters(initialFilters); + setData(newData); + } catch (_error) { + toast({ + variant: 'destructive', + title: 'Unable to reset notifications filters', + description: 'Start the api-harmonization service and refresh Storybook.', + }); + } }); }; diff --git a/packages/blocks/order-details/src/frontend/OrderDetails.client.tsx b/packages/blocks/order-details/src/frontend/OrderDetails.client.tsx index a318c7707..cf9b31621 100644 --- a/packages/blocks/order-details/src/frontend/OrderDetails.client.tsx +++ b/packages/blocks/order-details/src/frontend/OrderDetails.client.tsx @@ -11,6 +11,8 @@ import { Orders } from '@o2s/framework/modules'; import { cn } from '@o2s/ui/lib/utils'; +import { toast } from '@o2s/ui/hooks/use-toast'; + import { ActionList } from '@o2s/ui/components/ActionList'; import { InfoCard } from '@o2s/ui/components/Cards/InfoCard'; import { DynamicIcon } from '@o2s/ui/components/DynamicIcon'; @@ -116,32 +118,48 @@ export const OrderDetailsPure: React.FC> = ({ const handleFilter = (data: Partial) => { startTransition(async () => { - const newFilters = { ...filters, ...data }; - const newData = await sdk.blocks.getOrderDetails( - { - id: orderId, - }, - newFilters, - { 'x-locale': locale }, - accessToken, - ); - setFilters(newFilters); - setItems(newData.productList.products.data); + try { + const newFilters = { ...filters, ...data }; + const newData = await sdk.blocks.getOrderDetails( + { + id: orderId, + }, + newFilters, + { 'x-locale': locale }, + accessToken, + ); + setFilters(newFilters); + setItems(newData.productList.products.data); + } catch (_error) { + toast({ + variant: 'destructive', + title: 'Unable to load order details', + description: 'Start the api-harmonization service and refresh Storybook.', + }); + } }); }; const handleReset = () => { startTransition(async () => { - const newData = await sdk.blocks.getOrderDetails( - { - id: orderId, - }, - initialFilters, - { 'x-locale': locale }, - accessToken, - ); - setFilters(initialFilters); - setItems(newData.productList.products.data); + try { + const newData = await sdk.blocks.getOrderDetails( + { + id: orderId, + }, + initialFilters, + { 'x-locale': locale }, + accessToken, + ); + setFilters(initialFilters); + setItems(newData.productList.products.data); + } catch (_error) { + toast({ + variant: 'destructive', + title: 'Unable to reset order details filters', + description: 'Start the api-harmonization service and refresh Storybook.', + }); + } }); }; diff --git a/packages/blocks/order-list/src/frontend/OrderList.client.tsx b/packages/blocks/order-list/src/frontend/OrderList.client.tsx index 243b76013..22ec2a8c6 100644 --- a/packages/blocks/order-list/src/frontend/OrderList.client.tsx +++ b/packages/blocks/order-list/src/frontend/OrderList.client.tsx @@ -6,6 +6,8 @@ import React, { useState, useTransition } from 'react'; import { Mappings } from '@o2s/utils.frontend'; +import { toast } from '@o2s/ui/hooks/use-toast'; + import type { DataListColumnConfig } from '@o2s/ui/components/DataList'; import { DataView } from '@o2s/ui/components/DataView'; import { FiltersSection } from '@o2s/ui/components/Filters'; @@ -52,18 +54,34 @@ export const OrderListPure: React.FC = ({ locale, accessToke const handleFilter = (data: Partial) => { startTransition(async () => { - const newFilters = { ...filters, ...data }; - const newData = await sdk.blocks.getOrderList(newFilters, { 'x-locale': locale }, accessToken); - setFilters(newFilters); - setData(newData); + try { + const newFilters = { ...filters, ...data }; + const newData = await sdk.blocks.getOrderList(newFilters, { 'x-locale': locale }, accessToken); + setFilters(newFilters); + setData(newData); + } catch (_error) { + toast({ + variant: 'destructive', + title: 'Unable to load orders', + description: 'Start the api-harmonization service and refresh Storybook.', + }); + } }); }; const handleReset = () => { startTransition(async () => { - const newData = await sdk.blocks.getOrderList(initialFilters, { 'x-locale': locale }, accessToken); - setFilters(initialFilters); - setData(newData); + try { + const newData = await sdk.blocks.getOrderList(initialFilters, { 'x-locale': locale }, accessToken); + setFilters(initialFilters); + setData(newData); + } catch (_error) { + toast({ + variant: 'destructive', + title: 'Unable to reset orders filters', + description: 'Start the api-harmonization service and refresh Storybook.', + }); + } }); }; diff --git a/packages/blocks/orders-summary/src/frontend/OrdersSummary.client.tsx b/packages/blocks/orders-summary/src/frontend/OrdersSummary.client.tsx index 0e9f44f42..843723dd6 100644 --- a/packages/blocks/orders-summary/src/frontend/OrdersSummary.client.tsx +++ b/packages/blocks/orders-summary/src/frontend/OrdersSummary.client.tsx @@ -7,6 +7,8 @@ import React, { useState, useTransition } from 'react'; import { cn } from '@o2s/ui/lib/utils'; +import { toast } from '@o2s/ui/hooks/use-toast'; + import { InfoCard } from '@o2s/ui/components/Cards/InfoCard'; import { Price } from '@o2s/ui/components/Price'; @@ -70,32 +72,40 @@ export const OrdersSummaryPure: React.FC> = ({ const handleFilter = (value: string) => { startTransition(async () => { - let dateFrom: string; - const dateTo = dayjs().toISOString(); - - const parts = value.split('-'); - const range = Number(parts[0]!); - const type = parts[1]! as Request.GetOrdersSummaryBlockQuery['range']; - - switch (type) { - case 'day': - dateFrom = dayjs().subtract(range, 'days').toISOString(); - break; - case 'week': - dateFrom = dayjs().subtract(range, 'days').toISOString(); - break; - default: - dateFrom = dayjs().subtract(range, 'months').toISOString(); - break; - } - - const newFilters = { ...filters, dateFrom, dateTo, range: type }; - const newData = await sdk.blocks.getOrdersSummary(newFilters, { 'x-locale': locale }, accessToken); - setFilters(newFilters); - setData(newData); - - if (component.ranges) { - setRange(component.ranges.find((item) => item.value === range && item.type === type)!); + try { + let dateFrom: string; + const dateTo = dayjs().toISOString(); + + const parts = value.split('-'); + const range = Number(parts[0]!); + const type = parts[1]! as Request.GetOrdersSummaryBlockQuery['range']; + + switch (type) { + case 'day': + dateFrom = dayjs().subtract(range, 'days').toISOString(); + break; + case 'week': + dateFrom = dayjs().subtract(range, 'days').toISOString(); + break; + default: + dateFrom = dayjs().subtract(range, 'months').toISOString(); + break; + } + + const newFilters = { ...filters, dateFrom, dateTo, range: type }; + const newData = await sdk.blocks.getOrdersSummary(newFilters, { 'x-locale': locale }, accessToken); + setFilters(newFilters); + setData(newData); + + if (component.ranges) { + setRange(component.ranges.find((item) => item.value === range && item.type === type)!); + } + } catch (_error) { + toast({ + variant: 'destructive', + title: 'Unable to load orders summary', + description: 'Start the api-harmonization service and refresh Storybook.', + }); } }); }; diff --git a/packages/blocks/service-list/src/frontend/ServiceList.client.tsx b/packages/blocks/service-list/src/frontend/ServiceList.client.tsx index 7c98789d8..faecd01ed 100644 --- a/packages/blocks/service-list/src/frontend/ServiceList.client.tsx +++ b/packages/blocks/service-list/src/frontend/ServiceList.client.tsx @@ -5,6 +5,8 @@ import React, { useState, useTransition } from 'react'; import { Mappings } from '@o2s/utils.frontend'; +import { toast } from '@o2s/ui/hooks/use-toast'; + import { ProductCard, ProductCardBadge } from '@o2s/ui/components/Cards/ProductCard'; import { FiltersSection } from '@o2s/ui/components/Filters'; import { NoResults } from '@o2s/ui/components/NoResults'; @@ -31,18 +33,34 @@ export const ServiceListPure: React.FC = ({ locale, access const handleFilter = (data: Partial) => { startTransition(async () => { - const newFilters = { ...filters, ...data }; - const newData = await sdk.blocks.getServiceList(newFilters, { 'x-locale': locale }, accessToken); - setFilters(newFilters); - setData(newData); + try { + const newFilters = { ...filters, ...data }; + const newData = await sdk.blocks.getServiceList(newFilters, { 'x-locale': locale }, accessToken); + setFilters(newFilters); + setData(newData); + } catch (_error) { + toast({ + variant: 'destructive', + title: 'Unable to load services', + description: 'Start the api-harmonization service and refresh Storybook.', + }); + } }); }; const handleReset = () => { startTransition(async () => { - const newData = await sdk.blocks.getServiceList(initialFilters, { 'x-locale': locale }, accessToken); - setFilters(initialFilters); - setData(newData); + try { + const newData = await sdk.blocks.getServiceList(initialFilters, { 'x-locale': locale }, accessToken); + setFilters(initialFilters); + setData(newData); + } catch (_error) { + toast({ + variant: 'destructive', + title: 'Unable to reset services filters', + description: 'Start the api-harmonization service and refresh Storybook.', + }); + } }); }; diff --git a/packages/blocks/ticket-list/src/frontend/TicketList.client.tsx b/packages/blocks/ticket-list/src/frontend/TicketList.client.tsx index 132247220..5d1d81dd4 100644 --- a/packages/blocks/ticket-list/src/frontend/TicketList.client.tsx +++ b/packages/blocks/ticket-list/src/frontend/TicketList.client.tsx @@ -7,6 +7,8 @@ import React, { useState, useTransition } from 'react'; import { Mappings } from '@o2s/utils.frontend'; +import { toast } from '@o2s/ui/hooks/use-toast'; + import { ActionList } from '@o2s/ui/components/ActionList'; import type { DataListColumnConfig } from '@o2s/ui/components/DataList'; import { DataView } from '@o2s/ui/components/DataView'; @@ -49,18 +51,34 @@ export const TicketListPure: React.FC = ({ locale, accessTo const handleFilter = (data: Partial) => { startTransition(async () => { - const newFilters = { ...filters, ...data }; - const newData = await sdk.blocks.getTicketList(newFilters, { 'x-locale': locale }, accessToken); - setFilters(newFilters); - setData(newData); + try { + const newFilters = { ...filters, ...data }; + const newData = await sdk.blocks.getTicketList(newFilters, { 'x-locale': locale }, accessToken); + setFilters(newFilters); + setData(newData); + } catch (_error) { + toast({ + variant: 'destructive', + title: 'Unable to load tickets', + description: 'Start the api-harmonization service and refresh Storybook.', + }); + } }); }; const handleReset = () => { startTransition(async () => { - const newData = await sdk.blocks.getTicketList(initialFilters, { 'x-locale': locale }, accessToken); - setFilters(initialFilters); - setData(newData); + try { + const newData = await sdk.blocks.getTicketList(initialFilters, { 'x-locale': locale }, accessToken); + setFilters(initialFilters); + setData(newData); + } catch (_error) { + toast({ + variant: 'destructive', + title: 'Unable to reset tickets filters', + description: 'Start the api-harmonization service and refresh Storybook.', + }); + } }); }; From d6f8b4a51b74bc2ca97816d4176e00cc4d2aa7ae Mon Sep 17 00:00:00 2001 From: "lukasz.bielecki" Date: Thu, 4 Dec 2025 12:41:25 +0100 Subject: [PATCH 3/6] refactor: unify error handling across multiple blocks with labels from cms --- .../src/frontend/ArticleSearch.client.tsx | 7 +++++-- .../category/src/frontend/Category.client.tsx | 7 +++++-- .../src/frontend/InvoiceList.client.tsx | 8 ++++---- .../src/frontend/NotificationDetails.client.tsx | 16 +++++++++++++--- .../src/frontend/NotificationList.client.tsx | 11 +++++++---- .../src/frontend/OrderDetails.client.tsx | 11 +++++++---- .../order-list/src/frontend/OrderList.client.tsx | 11 +++++++---- .../src/frontend/OrdersSummary.client.tsx | 7 +++++-- .../src/frontend/ServiceList.client.tsx | 11 +++++++---- .../src/frontend/TicketList.client.tsx | 11 +++++++---- 10 files changed, 67 insertions(+), 33 deletions(-) diff --git a/packages/blocks/article-search/src/frontend/ArticleSearch.client.tsx b/packages/blocks/article-search/src/frontend/ArticleSearch.client.tsx index a0c249f1c..508a33448 100644 --- a/packages/blocks/article-search/src/frontend/ArticleSearch.client.tsx +++ b/packages/blocks/article-search/src/frontend/ArticleSearch.client.tsx @@ -6,6 +6,8 @@ import { debounce } from 'throttle-debounce'; import { toast } from '@o2s/ui/hooks/use-toast'; +import { useGlobalContext } from '@o2s/ui/providers/GlobalProvider'; + import { Autocomplete } from '@o2s/ui/components/Autocomplete'; import { Container } from '@o2s/ui/components/Container'; @@ -27,6 +29,7 @@ export const ArticleSearchPure: React.FC = ({ }) => { const { useRouter } = createNavigation(routing); const router = useRouter(); + const { labels } = useGlobalContext(); const [suggestions, setSuggestions] = useState([]); const [isPending, startTransition] = useTransition(); @@ -47,8 +50,8 @@ export const ArticleSearchPure: React.FC = ({ } catch (_error) { toast({ variant: 'destructive', - title: 'Unable to fetch search results', - description: 'Start the api-harmonization service and refresh Storybook.', + title: labels.errors.requestError.title, + description: labels.errors.requestError.content, duration: 60000, }); setSuggestions([]); diff --git a/packages/blocks/category/src/frontend/Category.client.tsx b/packages/blocks/category/src/frontend/Category.client.tsx index 007e509e3..1d9672396 100644 --- a/packages/blocks/category/src/frontend/Category.client.tsx +++ b/packages/blocks/category/src/frontend/Category.client.tsx @@ -5,6 +5,8 @@ import React, { useState, useTransition } from 'react'; import { toast } from '@o2s/ui/hooks/use-toast'; +import { useGlobalContext } from '@o2s/ui/providers/GlobalProvider'; + import { BlogCard } from '@o2s/ui/components/Cards/BlogCard'; import { Container } from '@o2s/ui/components/Container'; import { ContentSection } from '@o2s/ui/components/ContentSection'; @@ -30,6 +32,7 @@ export const CategoryPure: React.FC = ({ ...component }) => { const { Link: LinkComponent } = createNavigation(routing); + const { labels } = useGlobalContext(); const initialArticles: Request.GetCategoryBlockArticlesQuery = { id: component.id, @@ -53,8 +56,8 @@ export const CategoryPure: React.FC = ({ } catch (_error) { toast({ variant: 'destructive', - title: 'Unable to load category articles', - description: 'Start the api-harmonization service and refresh Storybook.', + title: labels.errors.requestError.title, + description: labels.errors.requestError.content, }); } }); diff --git a/packages/blocks/invoice-list/src/frontend/InvoiceList.client.tsx b/packages/blocks/invoice-list/src/frontend/InvoiceList.client.tsx index 1cf0dae20..7a1ebe6c4 100644 --- a/packages/blocks/invoice-list/src/frontend/InvoiceList.client.tsx +++ b/packages/blocks/invoice-list/src/frontend/InvoiceList.client.tsx @@ -57,8 +57,8 @@ export const InvoiceListPure: React.FC = ({ locale, access } catch (_error) { toast({ variant: 'destructive', - title: 'Unable to load invoices', - description: 'Start the api-harmonization service and refresh Storybook.', + title: labels.errors.requestError.title, + description: labels.errors.requestError.content, }); } }); @@ -74,8 +74,8 @@ export const InvoiceListPure: React.FC = ({ locale, access } catch (_error) { toast({ variant: 'destructive', - title: 'Unable to reset invoice filters', - description: 'Start the api-harmonization service and refresh Storybook.', + title: labels.errors.requestError.title, + description: labels.errors.requestError.content, }); } }); diff --git a/packages/blocks/notification-details/src/frontend/NotificationDetails.client.tsx b/packages/blocks/notification-details/src/frontend/NotificationDetails.client.tsx index ac0d99d03..5b6574adc 100644 --- a/packages/blocks/notification-details/src/frontend/NotificationDetails.client.tsx +++ b/packages/blocks/notification-details/src/frontend/NotificationDetails.client.tsx @@ -6,6 +6,8 @@ import { Mappings } from '@o2s/utils.frontend'; import { toast } from '@o2s/ui/hooks/use-toast'; +import { useGlobalContext } from '@o2s/ui/providers/GlobalProvider'; + import { Container } from '@o2s/ui/components/Container'; import { RichText } from '@o2s/ui/components/RichText'; @@ -19,6 +21,7 @@ import { NotificationDetailsPureProps } from './NotificationDetails.types'; export const NotificationDetailsPure: React.FC = ({ locale, ...component }) => { const { data: notification } = component; + const { labels } = useGlobalContext(); useEffect(() => { const markAsViewed = async () => { @@ -34,8 +37,8 @@ export const NotificationDetailsPure: React.FC = ( } catch (_error) { toast({ variant: 'destructive', - title: 'Unable to mark notification as viewed', - description: 'Start the api-harmonization service and refresh Storybook.', + title: labels.errors.requestError.title, + description: labels.errors.requestError.content, }); } }; @@ -43,7 +46,14 @@ export const NotificationDetailsPure: React.FC = ( if (notification.status.value === 'UNVIEWED') { markAsViewed(); } - }, [component.accessToken, component.id, locale, notification.status.value]); + }, [ + component.accessToken, + component.id, + labels.errors.requestError.content, + labels.errors.requestError.title, + locale, + notification.status.value, + ]); return (
diff --git a/packages/blocks/notification-list/src/frontend/NotificationList.client.tsx b/packages/blocks/notification-list/src/frontend/NotificationList.client.tsx index 1564aa7f4..0190152fe 100644 --- a/packages/blocks/notification-list/src/frontend/NotificationList.client.tsx +++ b/packages/blocks/notification-list/src/frontend/NotificationList.client.tsx @@ -10,6 +10,8 @@ import { cn } from '@o2s/ui/lib/utils'; import { toast } from '@o2s/ui/hooks/use-toast'; +import { useGlobalContext } from '@o2s/ui/providers/GlobalProvider'; + import type { DataListColumnConfig } from '@o2s/ui/components/DataList'; import { DataView } from '@o2s/ui/components/DataView'; import { FiltersSection } from '@o2s/ui/components/Filters'; @@ -33,6 +35,7 @@ export const NotificationListPure: React.FC = ({ ...component }) => { const { Link: LinkComponent } = createNavigation(routing); + const { labels } = useGlobalContext(); const initialFilters: Request.GetNotificationListBlockQuery = { id: component.id, @@ -62,8 +65,8 @@ export const NotificationListPure: React.FC = ({ } catch (_error) { toast({ variant: 'destructive', - title: 'Unable to load notifications', - description: 'Start the api-harmonization service and refresh Storybook.', + title: labels.errors.requestError.title, + description: labels.errors.requestError.content, }); } }); @@ -83,8 +86,8 @@ export const NotificationListPure: React.FC = ({ } catch (_error) { toast({ variant: 'destructive', - title: 'Unable to reset notifications filters', - description: 'Start the api-harmonization service and refresh Storybook.', + title: labels.errors.requestError.title, + description: labels.errors.requestError.content, }); } }); diff --git a/packages/blocks/order-details/src/frontend/OrderDetails.client.tsx b/packages/blocks/order-details/src/frontend/OrderDetails.client.tsx index cf9b31621..26615e17d 100644 --- a/packages/blocks/order-details/src/frontend/OrderDetails.client.tsx +++ b/packages/blocks/order-details/src/frontend/OrderDetails.client.tsx @@ -13,6 +13,8 @@ import { cn } from '@o2s/ui/lib/utils'; import { toast } from '@o2s/ui/hooks/use-toast'; +import { useGlobalContext } from '@o2s/ui/providers/GlobalProvider'; + import { ActionList } from '@o2s/ui/components/ActionList'; import { InfoCard } from '@o2s/ui/components/Cards/InfoCard'; import { DynamicIcon } from '@o2s/ui/components/DynamicIcon'; @@ -101,6 +103,7 @@ export const OrderDetailsPure: React.FC> = ({ ...component }) => { const { Link: LinkComponent } = createNavigation(routing); + const { labels } = useGlobalContext(); const initialFilters: Request.GetOrderDetailsBlockQuery = { id: component.id, @@ -133,8 +136,8 @@ export const OrderDetailsPure: React.FC> = ({ } catch (_error) { toast({ variant: 'destructive', - title: 'Unable to load order details', - description: 'Start the api-harmonization service and refresh Storybook.', + title: labels.errors.requestError.title, + description: labels.errors.requestError.content, }); } }); @@ -156,8 +159,8 @@ export const OrderDetailsPure: React.FC> = ({ } catch (_error) { toast({ variant: 'destructive', - title: 'Unable to reset order details filters', - description: 'Start the api-harmonization service and refresh Storybook.', + title: labels.errors.requestError.title, + description: labels.errors.requestError.content, }); } }); diff --git a/packages/blocks/order-list/src/frontend/OrderList.client.tsx b/packages/blocks/order-list/src/frontend/OrderList.client.tsx index 22ec2a8c6..c17b30694 100644 --- a/packages/blocks/order-list/src/frontend/OrderList.client.tsx +++ b/packages/blocks/order-list/src/frontend/OrderList.client.tsx @@ -8,6 +8,8 @@ import { Mappings } from '@o2s/utils.frontend'; import { toast } from '@o2s/ui/hooks/use-toast'; +import { useGlobalContext } from '@o2s/ui/providers/GlobalProvider'; + import type { DataListColumnConfig } from '@o2s/ui/components/DataList'; import { DataView } from '@o2s/ui/components/DataView'; import { FiltersSection } from '@o2s/ui/components/Filters'; @@ -32,6 +34,7 @@ import { OrderListPureProps } from './OrderList.types'; export const OrderListPure: React.FC = ({ locale, accessToken, routing, ...component }) => { const { Link: LinkComponent } = createNavigation(routing); + const { labels } = useGlobalContext(); const initialFilters: Request.GetOrderListBlockQuery = { id: component.id, @@ -62,8 +65,8 @@ export const OrderListPure: React.FC = ({ locale, accessToke } catch (_error) { toast({ variant: 'destructive', - title: 'Unable to load orders', - description: 'Start the api-harmonization service and refresh Storybook.', + title: labels.errors.requestError.title, + description: labels.errors.requestError.content, }); } }); @@ -78,8 +81,8 @@ export const OrderListPure: React.FC = ({ locale, accessToke } catch (_error) { toast({ variant: 'destructive', - title: 'Unable to reset orders filters', - description: 'Start the api-harmonization service and refresh Storybook.', + title: labels.errors.requestError.title, + description: labels.errors.requestError.content, }); } }); diff --git a/packages/blocks/orders-summary/src/frontend/OrdersSummary.client.tsx b/packages/blocks/orders-summary/src/frontend/OrdersSummary.client.tsx index 843723dd6..f881f801d 100644 --- a/packages/blocks/orders-summary/src/frontend/OrdersSummary.client.tsx +++ b/packages/blocks/orders-summary/src/frontend/OrdersSummary.client.tsx @@ -9,6 +9,8 @@ import { cn } from '@o2s/ui/lib/utils'; import { toast } from '@o2s/ui/hooks/use-toast'; +import { useGlobalContext } from '@o2s/ui/providers/GlobalProvider'; + import { InfoCard } from '@o2s/ui/components/Cards/InfoCard'; import { Price } from '@o2s/ui/components/Price'; @@ -55,6 +57,7 @@ export const OrdersSummaryPure: React.FC> = ({ accessToken, ...component }) => { + const { labels } = useGlobalContext(); const initialFilters: Request.GetOrdersSummaryBlockQuery = { id: component.id, dateFrom: dayjs().subtract(6, 'months').toISOString(), @@ -103,8 +106,8 @@ export const OrdersSummaryPure: React.FC> = ({ } catch (_error) { toast({ variant: 'destructive', - title: 'Unable to load orders summary', - description: 'Start the api-harmonization service and refresh Storybook.', + title: labels.errors.requestError.title, + description: labels.errors.requestError.content, }); } }); diff --git a/packages/blocks/service-list/src/frontend/ServiceList.client.tsx b/packages/blocks/service-list/src/frontend/ServiceList.client.tsx index faecd01ed..5371a14eb 100644 --- a/packages/blocks/service-list/src/frontend/ServiceList.client.tsx +++ b/packages/blocks/service-list/src/frontend/ServiceList.client.tsx @@ -7,6 +7,8 @@ import { Mappings } from '@o2s/utils.frontend'; import { toast } from '@o2s/ui/hooks/use-toast'; +import { useGlobalContext } from '@o2s/ui/providers/GlobalProvider'; + import { ProductCard, ProductCardBadge } from '@o2s/ui/components/Cards/ProductCard'; import { FiltersSection } from '@o2s/ui/components/Filters'; import { NoResults } from '@o2s/ui/components/NoResults'; @@ -30,6 +32,7 @@ export const ServiceListPure: React.FC = ({ locale, access const [data, setData] = useState(component); const [filters, setFilters] = useState(initialFilters); const [isPending, startTransition] = useTransition(); + const { labels } = useGlobalContext(); const handleFilter = (data: Partial) => { startTransition(async () => { @@ -41,8 +44,8 @@ export const ServiceListPure: React.FC = ({ locale, access } catch (_error) { toast({ variant: 'destructive', - title: 'Unable to load services', - description: 'Start the api-harmonization service and refresh Storybook.', + title: labels.errors.requestError.title, + description: labels.errors.requestError.content, }); } }); @@ -57,8 +60,8 @@ export const ServiceListPure: React.FC = ({ locale, access } catch (_error) { toast({ variant: 'destructive', - title: 'Unable to reset services filters', - description: 'Start the api-harmonization service and refresh Storybook.', + title: labels.errors.requestError.title, + description: labels.errors.requestError.content, }); } }); diff --git a/packages/blocks/ticket-list/src/frontend/TicketList.client.tsx b/packages/blocks/ticket-list/src/frontend/TicketList.client.tsx index 5d1d81dd4..685b7c6b7 100644 --- a/packages/blocks/ticket-list/src/frontend/TicketList.client.tsx +++ b/packages/blocks/ticket-list/src/frontend/TicketList.client.tsx @@ -9,6 +9,8 @@ import { Mappings } from '@o2s/utils.frontend'; import { toast } from '@o2s/ui/hooks/use-toast'; +import { useGlobalContext } from '@o2s/ui/providers/GlobalProvider'; + import { ActionList } from '@o2s/ui/components/ActionList'; import type { DataListColumnConfig } from '@o2s/ui/components/DataList'; import { DataView } from '@o2s/ui/components/DataView'; @@ -30,6 +32,7 @@ import { TicketListPureProps } from './TicketList.types'; export const TicketListPure: React.FC = ({ locale, accessToken, routing, meta, ...component }) => { const { Link: LinkComponent } = createNavigation(routing); const inspector = LivePreview.useInspector(); + const { labels } = useGlobalContext(); const initialFilters: Request.GetTicketListBlockQuery = { id: component.id, @@ -59,8 +62,8 @@ export const TicketListPure: React.FC = ({ locale, accessTo } catch (_error) { toast({ variant: 'destructive', - title: 'Unable to load tickets', - description: 'Start the api-harmonization service and refresh Storybook.', + title: labels.errors.requestError.title, + description: labels.errors.requestError.content, }); } }); @@ -75,8 +78,8 @@ export const TicketListPure: React.FC = ({ locale, accessTo } catch (_error) { toast({ variant: 'destructive', - title: 'Unable to reset tickets filters', - description: 'Start the api-harmonization service and refresh Storybook.', + title: labels.errors.requestError.title, + description: labels.errors.requestError.content, }); } }); From adcdb45b6be24fd17c8ee5c252081de35b998d2c Mon Sep 17 00:00:00 2001 From: "lukasz.bielecki" Date: Thu, 4 Dec 2025 13:16:40 +0100 Subject: [PATCH 4/6] chore(deps): package-lock.json update --- package-lock.json | 157 +++++++++++++++++++--------------------------- 1 file changed, 66 insertions(+), 91 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8b8abb747..eb35f74aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -278,7 +278,6 @@ "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "readdirp": "^4.0.1" }, @@ -674,7 +673,6 @@ "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.44.0.tgz", "integrity": "sha512-/FRKUM1G4xn3vV8+9xH1WJ9XknU8rkBGlefruq9jDhYUAvYozKimhrmC2pRqw/RyHhPivmgZCRuC8jHP8piz4Q==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/client-common": "5.44.0", "@algolia/requester-browser-xhr": "5.44.0", @@ -3848,7 +3846,6 @@ "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", @@ -4303,7 +4300,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, @@ -4326,7 +4322,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=18" } @@ -5844,7 +5839,6 @@ "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.9.2.tgz", "integrity": "sha512-C5wZsGuKTY8jEYsqdxhhFOe1ZDjH0uIYJ9T/jebHwkyxqnr4wW0jTkB72OMqNjsoQRcb0JN3PcSeTwFlVgzCZg==", "license": "MIT", - "peer": true, "dependencies": { "@docusaurus/core": "3.9.2", "@docusaurus/logger": "3.9.2", @@ -6073,7 +6067,6 @@ "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-3.9.2.tgz", "integrity": "sha512-IGUsArG5hhekXd7RDb11v94ycpJpFdJPkLnt10fFQWOVxAtq5/D7hT6lzc2fhyQKaaCE62qVajOMKL7OiAFAIA==", "license": "MIT", - "peer": true, "dependencies": { "@docusaurus/core": "3.9.2", "@docusaurus/logger": "3.9.2", @@ -6114,7 +6107,6 @@ "resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-3.9.2.tgz", "integrity": "sha512-6c4DAbR6n6nPbnZhY2V3tzpnKnGL+6aOsLvFL26VRqhlczli9eWG0VDUNoCQEPnGwDMhPS42UhSAnz5pThm5Ag==", "license": "MIT", - "peer": true, "dependencies": { "@docusaurus/mdx-loader": "3.9.2", "@docusaurus/module-type-aliases": "3.9.2", @@ -11486,7 +11478,6 @@ "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-3.1.1.tgz", "integrity": "sha512-f++rKLQgUVYDAtECQ6fn/is15GkEH9+nZPM3MS0RcxVqoTfawHvDlSCH7JbMhAM6uJ32v3eXLvLmLvjGu7PTQw==", "license": "MIT", - "peer": true, "dependencies": { "@types/mdx": "^2.0.0" }, @@ -11571,7 +11562,6 @@ "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-4.0.1.tgz", "integrity": "sha512-68pFJgu+/AZbWkGu65Z3r55bTsCPlgyKaV4BSG8yUAD72q1PPuyVRgUwFv6BxdnibTUHlyxm06FmYWNC+bjN7A==", "license": "MIT", - "peer": true, "peerDependencies": { "@nestjs/common": "^10.0.0 || ^11.0.0", "axios": "^1.3.1", @@ -11583,7 +11573,6 @@ "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.9.tgz", "integrity": "sha512-zDntUTReRbAThIfSp3dQZ9kKqI+LjgLp5YZN5c1bgNRDuoeLySAoZg46Bg1a+uV8TMgIRziHocglKGNzr6l+bQ==", "license": "MIT", - "peer": true, "dependencies": { "file-type": "21.1.0", "iterare": "1.2.1", @@ -11615,7 +11604,6 @@ "resolved": "https://registry.npmjs.org/@nestjs/config/-/config-4.0.2.tgz", "integrity": "sha512-McMW6EXtpc8+CwTUwFdg6h7dYcBUpH5iUILCclAsa+MbCEvC9ZKu4dCHRlJqALuhjLw97pbQu62l4+wRwGeZqA==", "license": "MIT", - "peer": true, "dependencies": { "dotenv": "16.4.7", "dotenv-expand": "12.0.1", @@ -11659,7 +11647,6 @@ "integrity": "sha512-a00B0BM4X+9z+t3UxJqIZlemIwCQdYoPKrMcM+ky4z3pkqqG1eTWexjs+YXpGObnLnjtMPVKWlcZHp3adDYvUw==", "hasInstallScript": true, "license": "MIT", - "peer": true, "dependencies": { "@nuxt/opencollective": "0.4.1", "fast-safe-stringify": "2.1.1", @@ -11710,7 +11697,6 @@ "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-11.1.9.tgz", "integrity": "sha512-GVd3+0lO0mJq2m1kl9hDDnVrX3Nd4oH3oDfklz0pZEVEVS0KVSp63ufHq2Lu9cyPdSBuelJr9iPm2QQ1yX+Kmw==", "license": "MIT", - "peer": true, "dependencies": { "cors": "2.8.5", "express": "5.1.0", @@ -13095,6 +13081,42 @@ "@noble/hashes": "^1.1.5" } }, + "node_modules/@parcel/watcher": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", + "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.1", + "@parcel/watcher-darwin-arm64": "2.5.1", + "@parcel/watcher-darwin-x64": "2.5.1", + "@parcel/watcher-freebsd-x64": "2.5.1", + "@parcel/watcher-linux-arm-glibc": "2.5.1", + "@parcel/watcher-linux-arm-musl": "2.5.1", + "@parcel/watcher-linux-arm64-glibc": "2.5.1", + "@parcel/watcher-linux-arm64-musl": "2.5.1", + "@parcel/watcher-linux-x64-glibc": "2.5.1", + "@parcel/watcher-linux-x64-musl": "2.5.1", + "@parcel/watcher-win32-arm64": "2.5.1", + "@parcel/watcher-win32-ia32": "2.5.1", + "@parcel/watcher-win32-x64": "2.5.1" + } + }, "node_modules/@parcel/watcher-android-arm64": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", @@ -13355,6 +13377,19 @@ "url": "https://opencollective.com/parcel" } }, + "node_modules/@parcel/watcher/node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "license": "Apache-2.0", + "optional": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -13434,7 +13469,6 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -13544,7 +13578,6 @@ "integrity": "sha512-QXFT+N/bva/QI2qoXmjBzL7D6aliPffIwP+81AdTGq0FXDoLxLkWivGMawG8iM5B9BKfxLIXxfWWAF6wbuJU6g==", "hasInstallScript": true, "license": "Apache-2.0", - "peer": true, "engines": { "node": ">=18.18" }, @@ -15835,7 +15868,6 @@ "resolved": "https://registry.npmjs.org/@redis/client/-/client-5.10.0.tgz", "integrity": "sha512-JXmM4XCoso6C75Mr3lhKA3eNxSzkYi3nCzxDIKY+YOszYsJjuKbFgVtguVPbLMOttN4iu2fXoc2BGhdnYhIOxA==", "license": "MIT", - "peer": true, "dependencies": { "cluster-key-slot": "1.1.2" }, @@ -16096,7 +16128,6 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -16731,7 +16762,6 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/@svgr/core/-/core-8.1.0.tgz", "integrity": "sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==", - "peer": true, "dependencies": { "@babel/core": "^7.21.3", "@svgr/babel-preset": "8.1.0", @@ -17042,7 +17072,6 @@ "version": "0.5.15", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz", "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==", - "peer": true, "dependencies": { "tslib": "^2.8.0" } @@ -17424,6 +17453,7 @@ "integrity": "sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", @@ -17444,6 +17474,7 @@ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=10" }, @@ -17457,6 +17488,7 @@ "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", "dev": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "dequal": "^2.0.3" } @@ -17467,6 +17499,7 @@ "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", @@ -17481,7 +17514,8 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@testing-library/jest-dom": { "version": "6.8.0", @@ -17870,7 +17904,8 @@ "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@types/babel__core": { "version": "7.20.5", @@ -18293,7 +18328,6 @@ "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", "license": "MIT", - "peer": true, "dependencies": { "@types/estree": "*", "@types/json-schema": "*" @@ -18327,7 +18361,6 @@ "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.25.tgz", "integrity": "sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==", "license": "MIT", - "peer": true, "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^4.17.33", @@ -18574,7 +18607,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~7.16.0" } @@ -18618,7 +18650,6 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.7.tgz", "integrity": "sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==", "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -18638,7 +18669,6 @@ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", "license": "MIT", - "peer": true, "peerDependencies": { "@types/react": "^19.2.0" } @@ -18776,8 +18806,7 @@ "version": "5.0.2", "resolved": "https://registry.npmjs.org/@types/throttle-debounce/-/throttle-debounce-5.0.2.tgz", "integrity": "sha512-pDzSNulqooSKvSNcksnV72nk8p7gRqN8As71Sp28nov1IgmPKWbOEIwAWvBME5pPTtaXJAvG3O4oc76HlQ4kqQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@types/through": { "version": "0.0.33", @@ -19069,7 +19098,6 @@ "integrity": "sha512-lJi3PfxVmo0AkEY93ecfN+r8SofEqZNGByvHAI3GBLrvt1Cw6H5k1IM02nSzu0RfUafr2EvFSw0wAsZgubNplQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.47.0", "@typescript-eslint/types": "8.47.0", @@ -19902,7 +19930,6 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -19988,7 +20015,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -20049,7 +20075,6 @@ "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.44.0.tgz", "integrity": "sha512-f8IpsbdQjzTjr/4mJ/jv5UplrtyMnnciGax6/B0OnLCs2/GJTK13O4Y7Ff1AvJVAaztanH+m5nzPoUq6EAy+aA==", "license": "MIT", - "peer": true, "dependencies": { "@algolia/abtesting": "1.10.0", "@algolia/client-abtesting": "5.44.0", @@ -20605,7 +20630,6 @@ "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz", "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", "license": "MIT", - "peer": true, "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.4", @@ -20665,7 +20689,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -21474,7 +21497,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.25", "caniuse-lite": "^1.0.30001754", @@ -22239,7 +22261,6 @@ "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.0.3.tgz", "integrity": "sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==", "license": "Apache-2.0", - "peer": true, "dependencies": { "@chevrotain/cst-dts-gen": "11.0.3", "@chevrotain/gast": "11.0.3", @@ -23298,7 +23319,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -23744,7 +23764,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -24025,7 +24044,6 @@ "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.33.1.tgz", "integrity": "sha512-iJc4TwyANnOGR1OmWhsS9ayRS3s+XQ185FmuHObThD+5AeJCakAAbWv8KimMTt08xCCLNgneQwFp+JRJOr9qGQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10" } @@ -24440,7 +24458,6 @@ "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", "license": "ISC", - "peer": true, "engines": { "node": ">=12" } @@ -24639,8 +24656,7 @@ "version": "1.11.19", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz", "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/debounce": { "version": "1.2.1", @@ -25160,7 +25176,8 @@ "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/dom-converter": { "version": "0.2.0", @@ -25604,7 +25621,6 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", - "peer": true, "dependencies": { "ansi-colors": "^4.1.1", "strip-ansi": "^6.0.1" @@ -25877,7 +25893,6 @@ "integrity": "sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==", "dev": true, "hasInstallScript": true, - "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -25971,7 +25986,6 @@ "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -26073,7 +26087,6 @@ "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", "dev": true, "license": "MIT", - "peer": true, "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -26184,7 +26197,6 @@ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", "dev": true, - "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.8", @@ -28363,7 +28375,6 @@ "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.12.0.tgz", "integrity": "sha512-DKKrynuQRne0PNpEbzuEdHlYOMksHSUI8Zc9Unei5gTsMNA2/vMpoMz/yKba50pejK56qj98qM0SjYxAKi13gQ==", "license": "MIT", - "peer": true, "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } @@ -28413,7 +28424,6 @@ "resolved": "https://registry.npmjs.org/graphql-request/-/graphql-request-7.3.4.tgz", "integrity": "sha512-kbpP5dw9hHIL5jN/2VS2JU0/Sc1hlsj7zrYBKSDiYd5iG8QfX7P79u26ZBi84eAijsqYVZEpLvCCwEzVxscWhg==", "license": "MIT", - "peer": true, "dependencies": { "@graphql-typed-document-node/core": "^3.2.0" }, @@ -28425,7 +28435,6 @@ "version": "2.12.6", "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz", "integrity": "sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==", - "peer": true, "dependencies": { "tslib": "^2.1.0" }, @@ -32811,7 +32820,6 @@ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", "license": "MIT", - "peer": true, "dependencies": { "jws": "^3.2.2", "lodash.includes": "^4.3.0", @@ -33949,6 +33957,7 @@ "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", "dev": true, "license": "MIT", + "peer": true, "bin": { "lz-string": "bin/bin.js" } @@ -36406,7 +36415,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -36710,7 +36718,6 @@ "resolved": "https://registry.npmjs.org/next/-/next-15.5.6.tgz", "integrity": "sha512-zTxsnI3LQo3c9HSdSf91O1jMNsEzIXDShXd4wVdg9y5shwLqBXi4ZtUUJyB86KGVSJLZx0PFONvO54aheGX8QQ==", "license": "MIT", - "peer": true, "dependencies": { "@next/env": "15.5.6", "@swc/helpers": "0.5.15", @@ -36763,7 +36770,6 @@ "resolved": "https://registry.npmjs.org/next-auth/-/next-auth-5.0.0-beta.30.tgz", "integrity": "sha512-+c51gquM3F6nMVmoAusRJ7RIoY0K4Ts9HCCwyy/BRoe4mp3msZpOzYMyb5LAYc1wSo74PMQkGDcaghIO7W6Xjg==", "license": "ISC", - "peer": true, "dependencies": { "@auth/core": "0.41.0" }, @@ -36802,7 +36808,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@formatjs/intl-localematcher": "^0.5.4", "@swc/core": "^1.15.2", @@ -38446,7 +38451,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -39688,7 +39692,6 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -39791,7 +39794,6 @@ "resolved": "https://registry.npmjs.org/preact/-/preact-10.24.3.tgz", "integrity": "sha512-Z2dPnBnMUfyQfSQ+GBdsGa16hz35YmLmtTLhM169uW944hYL6xzTYkJjC07j+Wosz733pMWx0fgON3JNw1jJQA==", "license": "MIT", - "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" @@ -39821,7 +39823,6 @@ "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "dev": true, "license": "MIT", - "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -39935,7 +39936,6 @@ "integrity": "sha512-F3eX7K+tWpkbhl3l4+VkFtrwJlLXbAM+f9jolgoUZbFcm1DgHZ4cq9AgVEgUym2au5Ad/TDLN8lg83D+M10ycw==", "hasInstallScript": true, "license": "Apache-2.0", - "peer": true, "dependencies": { "@prisma/config": "6.19.0", "@prisma/engines": "6.19.0" @@ -40300,7 +40300,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.2.0.tgz", "integrity": "sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -40379,7 +40378,6 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.0.tgz", "integrity": "sha512-UlbRu4cAiGaIewkPyiRGJk0imDN2T3JjieT6spoL2UeSf5od4n5LB/mQ4ejmxhCFT1tYe8IvaFulzynWovsEFQ==", "license": "MIT", - "peer": true, "dependencies": { "scheduler": "^0.27.0" }, @@ -40455,7 +40453,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-6.0.0.tgz", "integrity": "sha512-YMMxTUQV/QFSnbgrP3tjDzLHRg7vsbMn8e9HAa8o/1iXoiomo48b7sk/kkmWEuWNDPJVlKSJRB6Y2fHqdJk+SQ==", - "peer": true, "dependencies": { "@types/react": "*" }, @@ -40484,7 +40481,6 @@ "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -40538,7 +40534,6 @@ "version": "5.3.4", "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.3.4.tgz", "integrity": "sha512-Ys9K+ppnJah3QuaRiLxk+jDWOR1MekYQrlytiXxC1RyfbdsZkS5pvKAzCCr031xHixZwpnsYNT5xysdFHQaYsA==", - "peer": true, "dependencies": { "@babel/runtime": "^7.12.13", "history": "^4.9.0", @@ -40930,8 +40925,7 @@ "node_modules/reflect-metadata": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", - "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==", - "peer": true + "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==" }, "node_modules/reflect.getprototypeof": { "version": "1.0.10", @@ -41705,7 +41699,6 @@ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "license": "Apache-2.0", - "peer": true, "dependencies": { "tslib": "^2.1.0" } @@ -41802,7 +41795,6 @@ "resolved": "https://registry.npmjs.org/sass/-/sass-1.94.2.tgz", "integrity": "sha512-N+7WK20/wOr7CzA2snJcUSSNTCzeCGUTFY3OgeQP3mZ1aj9NMQ0mSTXwlrnd89j33zzQJGqIN52GIOmYrfq46A==", "license": "MIT", - "peer": true, "dependencies": { "chokidar": "^4.0.0", "immutable": "^5.0.2", @@ -43014,7 +43006,6 @@ "integrity": "sha512-vQMufKKA9TxgoEDHJv3esrqUkjszuuRiDkThiHxENFPdQawHhm2Dei+iwNRwH5W671zTDy9iRT9P1KDjcU5Iyw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@storybook/global": "^5.0.0", "@storybook/icons": "^1.6.0", @@ -43581,8 +43572,7 @@ "version": "2.3.16", "resolved": "https://registry.npmjs.org/survey-core/-/survey-core-2.3.16.tgz", "integrity": "sha512-yRbeacio72oBmfODuJ8igRL3N8w7fjEwPPHd3CT019ht14qs4rVNGIs50kdip2NFo3B+xfvP1pQWcr2U7TxKrQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/survey-react-ui": { "version": "2.3.16", @@ -43884,8 +43874,7 @@ "version": "4.1.17", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.17.tgz", "integrity": "sha512-j9Ee2YjuQqYT9bbRTfTZht9W/ytp5H+jJpZKiYdP/bpnXARAuELt9ofP0lPnmHjbga7SNQIxdTAXCmtKVYjN+Q==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/tailwindcss-animate": { "version": "1.0.7", @@ -43975,7 +43964,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -44530,7 +44518,6 @@ "version": "10.9.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "peer": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -44657,8 +44644,7 @@ "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "peer": true + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "node_modules/tsx": { "version": "4.20.6", @@ -44693,7 +44679,6 @@ "integrity": "sha512-qBwXXuDT3rA53kbNafGbT5r++BrhRgx3sAo0cHoDAeG9g1ItTmUMgltz3Hy7Hazy1ODqNpR+C7QwqL6DYB52yA==", "dev": true, "license": "MIT", - "peer": true, "bin": { "turbo": "bin/turbo" }, @@ -44826,7 +44811,6 @@ "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "peer": true, "engines": { "node": ">=10" }, @@ -44942,7 +44926,6 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -46137,7 +46120,6 @@ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.103.0.tgz", "integrity": "sha512-HU1JOuV1OavsZ+mfigY0j8d1TgQgbZ6M+J75zDkpEAwYeXjWSqrGJtgnPblJjd/mAyTNQ7ygw0MiKOn6etz8yw==", "license": "MIT", - "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.8", @@ -46263,7 +46245,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -46424,7 +46405,6 @@ "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -46534,7 +46514,6 @@ "integrity": "sha512-khZGfAeJx6I8K9zKohEWWYN6KDlVw2DHownoe+6Vtwj1LP9WFgegXnVMSkZ/dBEBtXFwrkkydsaPFlB7f8wU2A==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "ansi-html-community": "0.0.8", "html-entities": "^2.1.0", @@ -46584,7 +46563,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -47048,7 +47026,6 @@ "version": "7.5.10", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "peer": true, "engines": { "node": ">=8.3.0" }, @@ -47262,7 +47239,6 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.12.tgz", "integrity": "sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==", "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } @@ -48805,7 +48781,6 @@ "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-10.4.20.tgz", "integrity": "sha512-hxJxZF7jcKGuUzM9EYbuES80Z/36piJbiqmPy86mk8qOn5gglFebBTvcx7PWVbRNSb4gngASYnefBj/Y2HAzpQ==", "license": "MIT", - "peer": true, "dependencies": { "file-type": "20.4.1", "iterare": "1.2.1", From e7bcc1931ffa05793ee17c0afc85a0e41df3600b Mon Sep 17 00:00:00 2001 From: "lukasz.bielecki" Date: Fri, 5 Dec 2025 10:36:30 +0100 Subject: [PATCH 5/6] fix: specify type for handleFilter parameter in OrderDetails component --- .../blocks/order-details/src/frontend/OrderDetails.client.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/blocks/order-details/src/frontend/OrderDetails.client.tsx b/packages/blocks/order-details/src/frontend/OrderDetails.client.tsx index 26615e17d..90845fd5e 100644 --- a/packages/blocks/order-details/src/frontend/OrderDetails.client.tsx +++ b/packages/blocks/order-details/src/frontend/OrderDetails.client.tsx @@ -119,7 +119,7 @@ export const OrderDetailsPure: React.FC> = ({ const [isPending, startTransition] = useTransition(); - const handleFilter = (data: Partial) => { + const handleFilter = (data: Partial) => { startTransition(async () => { try { const newFilters = { ...filters, ...data }; From e9c1886864413cd10f5916bdf5437f0202460a63 Mon Sep 17 00:00:00 2001 From: "lukasz.bielecki" Date: Fri, 5 Dec 2025 10:57:59 +0100 Subject: [PATCH 6/6] chore: add changeset for minor updates and improved error handling across multiple blocks --- .changeset/major-chefs-cough.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .changeset/major-chefs-cough.md diff --git a/.changeset/major-chefs-cough.md b/.changeset/major-chefs-cough.md new file mode 100644 index 000000000..cf9521ff3 --- /dev/null +++ b/.changeset/major-chefs-cough.md @@ -0,0 +1,14 @@ +--- +'@o2s/blocks.notification-details': minor +'@o2s/blocks.notification-list': minor +'@o2s/blocks.article-search': minor +'@o2s/blocks.orders-summary': minor +'@o2s/blocks.order-details': minor +'@o2s/blocks.invoice-list': minor +'@o2s/blocks.service-list': minor +'@o2s/blocks.ticket-list': minor +'@o2s/blocks.order-list': minor +'@o2s/blocks.category': minor +--- + +improved error handling