From 5c05abb1d3900fbadb8da2f60ba23edcf5852ea3 Mon Sep 17 00:00:00 2001 From: Nora Kristiansen <106915799+NoraKri@users.noreply.github.com> Date: Thu, 5 Dec 2024 11:59:25 +0100 Subject: [PATCH 01/13] fix small equipment bug --- www/src/components/Equipment.tsx | 35 +++++++++++++++++--------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/www/src/components/Equipment.tsx b/www/src/components/Equipment.tsx index 0588399..aa17de7 100644 --- a/www/src/components/Equipment.tsx +++ b/www/src/components/Equipment.tsx @@ -1,24 +1,26 @@ import { EquipmentProps, NozzleProps } from "../types/diagram/Diagram.ts"; import { useContext } from "react"; -import { ClickableComponentProps, handleClick, getHighlightColor } from "../types/ClickableComponentProps.ts"; +import { + ClickableComponentProps, + handleClick, + getHighlightColor, +} from "../types/ClickableComponentProps.ts"; import StyledSvgElement from "./StyledSvgElement.tsx"; import PandidContext from "../context/PandidContext.ts"; import useSerializeNodeSvg from "../hooks/useSerializeNodeSvg.tsx"; import SvgElement from "./SvgElement.tsx"; import { useCommissioningPackageContext } from "../hooks/useCommissioningPackageContext.tsx"; - - interface EquipmentClickableProps { equipment: EquipmentProps; - clickableComponent: ClickableComponentProps + clickableComponent: ClickableComponentProps; } export default function Equipment({ equipment, - clickableComponent + clickableComponent, }: EquipmentClickableProps) { - const packageContext = useCommissioningPackageContext() + const packageContext = useCommissioningPackageContext(); const height = useContext(PandidContext).height; const svg = useSerializeNodeSvg( equipment.ComponentName, @@ -29,17 +31,18 @@ export default function Equipment({ const nozzles: NozzleProps[] = equipment.Nozzle; return ( - - {svg && color && ( + + {svg && ( <> - + {color && ( + + )} + Date: Thu, 5 Dec 2024 12:00:05 +0100 Subject: [PATCH 02/13] add eds, implement sidebar --- package-lock.json | 6 - www/package-lock.json | 2225 +++++++++++++++++++++++++++++--- www/package.json | 1 + www/src/App.css | 11 + www/src/App.tsx | 16 +- www/src/components/Editor.tsx | 2 + www/src/components/Sidebar.tsx | 21 + www/src/main.tsx | 1 + 8 files changed, 2128 insertions(+), 155 deletions(-) delete mode 100644 package-lock.json create mode 100644 www/src/App.css create mode 100644 www/src/components/Sidebar.tsx diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 21727f6..0000000 --- a/package-lock.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Dexpi2Imf", - "lockfileVersion": 3, - "requires": true, - "packages": {} -} diff --git a/www/package-lock.json b/www/package-lock.json index c53c9a8..4d5702f 100644 --- a/www/package-lock.json +++ b/www/package-lock.json @@ -8,6 +8,7 @@ "name": "www", "version": "0.0.0", "dependencies": { + "@equinor/eds-core-react": "^0.42.5", "@svgr/core": "^8.1.0", "react": "^18.3.1", "react-dom": "^18.3.1", @@ -1723,7 +1724,6 @@ "version": "7.26.0", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", - "dev": true, "license": "MIT", "dependencies": { "regenerator-runtime": "^0.14.0" @@ -1807,6 +1807,71 @@ "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==", "license": "MIT" }, + "node_modules/@equinor/eds-core-react": { + "version": "0.42.5", + "resolved": "https://registry.npmjs.org/@equinor/eds-core-react/-/eds-core-react-0.42.5.tgz", + "integrity": "sha512-Js5mgPhLrrOYCx8FbFds+ZhX4vru1qq+nXEjw8rQGrIGzEZQGGBMyLXnvVZ5nM/mSjx061aMv2CPL3Eeu82qcQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.25.0", + "@equinor/eds-icons": "^0.21.0", + "@equinor/eds-tokens": "0.9.2", + "@equinor/eds-utils": "0.8.5", + "@floating-ui/react": "^0.26.22", + "@internationalized/date": "^3.5.5", + "@react-aria/utils": "^3.25.1", + "@react-stately/calendar": "^3.5.3", + "@react-stately/datepicker": "^3.10.1", + "@react-types/shared": "^3.24.1", + "@tanstack/react-virtual": "3.10.8", + "downshift": "9.0.8", + "react-aria": "^3.34.1" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8", + "styled-components": ">=5.1" + } + }, + "node_modules/@equinor/eds-icons": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@equinor/eds-icons/-/eds-icons-0.21.0.tgz", + "integrity": "sha512-k2keACHou9h9D5QLfSBeojTApqbPCkHNBWplUA/B9FQv8FMCMSBbjJAo2L/3yAExMylQN9LdwKo81T2tijRXoA==", + "license": "Apache-2.0", + "engines": { + "node": ">=10.0.0", + "pnpm": ">=4" + } + }, + "node_modules/@equinor/eds-tokens": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@equinor/eds-tokens/-/eds-tokens-0.9.2.tgz", + "integrity": "sha512-pDIFei0vsfN3GN12NKWqxskAkYBQd6+Dzjga2liuY81LfnlJs5g9NblamU9WY5w5YdVE5Z8FNjsMKDLs2JIWcw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0", + "pnpm": ">=4" + } + }, + "node_modules/@equinor/eds-utils": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/@equinor/eds-utils/-/eds-utils-0.8.5.tgz", + "integrity": "sha512-4AwltyJg51rjBBB4a4g4dGh9JlR+9mc/1AvRsV+nJqdpjjUgDeVBXukLN8Dh2CgyX1+0q3iH3TWq7bwOzd7n5Q==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.24.0", + "@equinor/eds-tokens": "0.9.2" + }, + "engines": { + "node": ">=10.0.0", + "pnpm": ">=4" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8", + "styled-components": ">=4.2" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", @@ -2285,206 +2350,1905 @@ "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, - "funding": { - "url": "https://opencollective.com/eslint" + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "9.15.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.15.0.tgz", + "integrity": "sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz", + "integrity": "sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@floating-ui/core": { + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.8.tgz", + "integrity": "sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==", + "license": "MIT", + "dependencies": { + "@floating-ui/utils": "^0.2.8" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.6.12", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.12.tgz", + "integrity": "sha512-NP83c0HjokcGVEMeoStg317VD9W7eDlGK7457dMBANbKA6GJZdc7rjujdgqzTaz93jkGgc5P/jeWbaCHnMNc+w==", + "license": "MIT", + "dependencies": { + "@floating-ui/core": "^1.6.0", + "@floating-ui/utils": "^0.2.8" + } + }, + "node_modules/@floating-ui/react": { + "version": "0.26.28", + "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.26.28.tgz", + "integrity": "sha512-yORQuuAtVpiRjpMhdc0wJj06b9JFjrYF4qp96j++v2NBpbi6SEGF7donUJ3TMieerQ6qVkAv1tgr7L4r5roTqw==", + "license": "MIT", + "dependencies": { + "@floating-ui/react-dom": "^2.1.2", + "@floating-ui/utils": "^0.2.8", + "tabbable": "^6.0.0" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, + "node_modules/@floating-ui/react-dom": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.2.tgz", + "integrity": "sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A==", + "license": "MIT", + "dependencies": { + "@floating-ui/dom": "^1.0.0" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.8.tgz", + "integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==", + "license": "MIT" + }, + "node_modules/@formatjs/ecma402-abstract": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-2.2.4.tgz", + "integrity": "sha512-lFyiQDVvSbQOpU+WFd//ILolGj4UgA/qXrKeZxdV14uKiAUiPAtX6XAn7WBCRi7Mx6I7EybM9E5yYn4BIpZWYg==", + "license": "MIT", + "dependencies": { + "@formatjs/fast-memoize": "2.2.3", + "@formatjs/intl-localematcher": "0.5.8", + "tslib": "2" + } + }, + "node_modules/@formatjs/fast-memoize": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-2.2.3.tgz", + "integrity": "sha512-3jeJ+HyOfu8osl3GNSL4vVHUuWFXR03Iz9jjgI7RwjG6ysu/Ymdr0JRCPHfF5yGbTE6JCrd63EpvX1/WybYRbA==", + "license": "MIT", + "dependencies": { + "tslib": "2" + } + }, + "node_modules/@formatjs/icu-messageformat-parser": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.9.4.tgz", + "integrity": "sha512-Tbvp5a9IWuxUcpWNIW6GlMQYEc4rwNHR259uUFoKWNN1jM9obf9Ul0e+7r7MvFOBNcN+13K7NuKCKqQiAn1QEg==", + "license": "MIT", + "dependencies": { + "@formatjs/ecma402-abstract": "2.2.4", + "@formatjs/icu-skeleton-parser": "1.8.8", + "tslib": "2" + } + }, + "node_modules/@formatjs/icu-skeleton-parser": { + "version": "1.8.8", + "resolved": "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.8.8.tgz", + "integrity": "sha512-vHwK3piXwamFcx5YQdCdJxUQ1WdTl6ANclt5xba5zLGDv5Bsur7qz8AD7BevaKxITwpgDeU0u8My3AIibW9ywA==", + "license": "MIT", + "dependencies": { + "@formatjs/ecma402-abstract": "2.2.4", + "tslib": "2" + } + }, + "node_modules/@formatjs/intl-localematcher": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.5.8.tgz", + "integrity": "sha512-I+WDNWWJFZie+jkfkiK5Mp4hEDyRSEvmyfYadflOno/mmKJKcB17fEpEH0oJu/OWhhCJ8kJBDz2YMd/6cDl7Mg==", + "license": "MIT", + "dependencies": { + "tslib": "2" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", + "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@internationalized/date": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.6.0.tgz", + "integrity": "sha512-+z6ti+CcJnRlLHok/emGEsWQhe7kfSmEW+/6qCzvKY67YPh7YOBfvc7+/+NXq+zJlbArg30tYpqLjNgcAYv2YQ==", + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0" + } + }, + "node_modules/@internationalized/message": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@internationalized/message/-/message-3.1.6.tgz", + "integrity": "sha512-JxbK3iAcTIeNr1p0WIFg/wQJjIzJt9l/2KNY/48vXV7GRGZSv3zMxJsce008fZclk2cDC8y0Ig3odceHO7EfNQ==", + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0", + "intl-messageformat": "^10.1.0" + } + }, + "node_modules/@internationalized/number": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@internationalized/number/-/number-3.6.0.tgz", + "integrity": "sha512-PtrRcJVy7nw++wn4W2OuePQQfTqDzfusSuY1QTtui4wa7r+rGVtR75pO8CyKvHvzyQYi3Q1uO5sY0AsB4e65Bw==", + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0" + } + }, + "node_modules/@internationalized/string": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/@internationalized/string/-/string-3.2.5.tgz", + "integrity": "sha512-rKs71Zvl2OKOHM+mzAFMIyqR5hI1d1O6BBkMK2/lkfg3fkmVh9Eeg0awcA8W2WqYqDOv6a86DIOlFpggwLtbuw==", + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@react-aria/breadcrumbs": { + "version": "3.5.19", + "resolved": "https://registry.npmjs.org/@react-aria/breadcrumbs/-/breadcrumbs-3.5.19.tgz", + "integrity": "sha512-mVngOPFYVVhec89rf/CiYQGTfaLRfHFtX+JQwY7sNYNqSA+gO8p4lNARe3Be6bJPgH+LUQuruIY9/ZDL6LT3HA==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/i18n": "^3.12.4", + "@react-aria/link": "^3.7.7", + "@react-aria/utils": "^3.26.0", + "@react-types/breadcrumbs": "^3.7.9", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/button": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/@react-aria/button/-/button-3.11.0.tgz", + "integrity": "sha512-b37eIV6IW11KmNIAm65F3SEl2/mgj5BrHIysW6smZX3KoKWTGYsYfcQkmtNgY0GOSFfDxMCoolsZ6mxC00nSDA==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/focus": "^3.19.0", + "@react-aria/interactions": "^3.22.5", + "@react-aria/toolbar": "3.0.0-beta.11", + "@react-aria/utils": "^3.26.0", + "@react-stately/toggle": "^3.8.0", + "@react-types/button": "^3.10.1", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/calendar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@react-aria/calendar/-/calendar-3.6.0.tgz", + "integrity": "sha512-tZ3nd5DP8uxckbj83Pt+4RqgcTWDlGi7njzc7QqFOG2ApfnYDUXbIpb/Q4KY6JNlJskG8q33wo0XfOwNy8J+eg==", + "license": "Apache-2.0", + "dependencies": { + "@internationalized/date": "^3.6.0", + "@react-aria/i18n": "^3.12.4", + "@react-aria/interactions": "^3.22.5", + "@react-aria/live-announcer": "^3.4.1", + "@react-aria/utils": "^3.26.0", + "@react-stately/calendar": "^3.6.0", + "@react-types/button": "^3.10.1", + "@react-types/calendar": "^3.5.0", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/checkbox": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/@react-aria/checkbox/-/checkbox-3.15.0.tgz", + "integrity": "sha512-z/8xd4em7o0MroBXwkkwv7QRwiJaA1FwqMhRUb7iqtBGP2oSytBEDf0N7L09oci32a1P4ZPz2rMK5GlLh/PD6g==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/form": "^3.0.11", + "@react-aria/interactions": "^3.22.5", + "@react-aria/label": "^3.7.13", + "@react-aria/toggle": "^3.10.10", + "@react-aria/utils": "^3.26.0", + "@react-stately/checkbox": "^3.6.10", + "@react-stately/form": "^3.1.0", + "@react-stately/toggle": "^3.8.0", + "@react-types/checkbox": "^3.9.0", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/color": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@react-aria/color/-/color-3.0.2.tgz", + "integrity": "sha512-dSM5qQRcR1gRGYCBw0IGRmc29gjfoht3cQleKb8MMNcgHYa2oi5VdCs2yKXmYFwwVC6uPtnlNy9S6e0spqdr+w==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/i18n": "^3.12.4", + "@react-aria/interactions": "^3.22.5", + "@react-aria/numberfield": "^3.11.9", + "@react-aria/slider": "^3.7.14", + "@react-aria/spinbutton": "^3.6.10", + "@react-aria/textfield": "^3.15.0", + "@react-aria/utils": "^3.26.0", + "@react-aria/visually-hidden": "^3.8.18", + "@react-stately/color": "^3.8.1", + "@react-stately/form": "^3.1.0", + "@react-types/color": "^3.0.1", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/combobox": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/@react-aria/combobox/-/combobox-3.11.0.tgz", + "integrity": "sha512-s88YMmPkMO1WSoiH1KIyZDLJqUwvM2wHXXakj3cYw1tBHGo4rOUFq+JWQIbM5EDO4HOR4AUUqzIUd0NO7t3zyg==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/i18n": "^3.12.4", + "@react-aria/listbox": "^3.13.6", + "@react-aria/live-announcer": "^3.4.1", + "@react-aria/menu": "^3.16.0", + "@react-aria/overlays": "^3.24.0", + "@react-aria/selection": "^3.21.0", + "@react-aria/textfield": "^3.15.0", + "@react-aria/utils": "^3.26.0", + "@react-stately/collections": "^3.12.0", + "@react-stately/combobox": "^3.10.1", + "@react-stately/form": "^3.1.0", + "@react-types/button": "^3.10.1", + "@react-types/combobox": "^3.13.1", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/datepicker": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@react-aria/datepicker/-/datepicker-3.12.0.tgz", + "integrity": "sha512-VYNXioLfddIHpwQx211+rTYuunDmI7VHWBRetCpH3loIsVFuhFSRchTQpclAzxolO3g0vO7pMVj9VYt7Swp6kg==", + "license": "Apache-2.0", + "dependencies": { + "@internationalized/date": "^3.6.0", + "@internationalized/number": "^3.6.0", + "@internationalized/string": "^3.2.5", + "@react-aria/focus": "^3.19.0", + "@react-aria/form": "^3.0.11", + "@react-aria/i18n": "^3.12.4", + "@react-aria/interactions": "^3.22.5", + "@react-aria/label": "^3.7.13", + "@react-aria/spinbutton": "^3.6.10", + "@react-aria/utils": "^3.26.0", + "@react-stately/datepicker": "^3.11.0", + "@react-stately/form": "^3.1.0", + "@react-types/button": "^3.10.1", + "@react-types/calendar": "^3.5.0", + "@react-types/datepicker": "^3.9.0", + "@react-types/dialog": "^3.5.14", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/dialog": { + "version": "3.5.20", + "resolved": "https://registry.npmjs.org/@react-aria/dialog/-/dialog-3.5.20.tgz", + "integrity": "sha512-l0GZVLgeOd3kL3Yj8xQW7wN3gn9WW3RLd/SGI9t7ciTq+I/FhftjXCWzXLlOCCTLMf+gv7eazecECtmoWUaZWQ==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/focus": "^3.19.0", + "@react-aria/overlays": "^3.24.0", + "@react-aria/utils": "^3.26.0", + "@react-types/dialog": "^3.5.14", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/disclosure": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@react-aria/disclosure/-/disclosure-3.0.0.tgz", + "integrity": "sha512-xO9QTQSvymujTjCs1iCQ4+dKZvtF/rVVaFZBKlUtqIqwTHMdqeZu4fh5miLEnTyVLNHMGzLrFggsd8Q+niC9Og==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/ssr": "^3.9.7", + "@react-aria/utils": "^3.26.0", + "@react-stately/disclosure": "^3.0.0", + "@react-types/button": "^3.10.1", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/dnd": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@react-aria/dnd/-/dnd-3.8.0.tgz", + "integrity": "sha512-JiqHY3E9fDU5Kb4gN22cuK6QNlpMCGe6ngR/BV+Q8mLEsdoWcoUAYOtYXVNNTRvCdVbEWI87FUU+ThyPpoDhNQ==", + "license": "Apache-2.0", + "dependencies": { + "@internationalized/string": "^3.2.5", + "@react-aria/i18n": "^3.12.4", + "@react-aria/interactions": "^3.22.5", + "@react-aria/live-announcer": "^3.4.1", + "@react-aria/overlays": "^3.24.0", + "@react-aria/utils": "^3.26.0", + "@react-stately/dnd": "^3.5.0", + "@react-types/button": "^3.10.1", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/focus": { + "version": "3.19.0", + "resolved": "https://registry.npmjs.org/@react-aria/focus/-/focus-3.19.0.tgz", + "integrity": "sha512-hPF9EXoUQeQl1Y21/rbV2H4FdUR2v+4/I0/vB+8U3bT1CJ+1AFj1hc/rqx2DqEwDlEwOHN+E4+mRahQmlybq0A==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/interactions": "^3.22.5", + "@react-aria/utils": "^3.26.0", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0", + "clsx": "^2.0.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/form": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@react-aria/form/-/form-3.0.11.tgz", + "integrity": "sha512-oXzjTiwVuuWjZ8muU0hp3BrDH5qjVctLOF50mjPvqUbvXQTHhoDxWweyIXPQjGshaqBd2w4pWaE4A2rG2O/apw==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/interactions": "^3.22.5", + "@react-aria/utils": "^3.26.0", + "@react-stately/form": "^3.1.0", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/grid": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/@react-aria/grid/-/grid-3.11.0.tgz", + "integrity": "sha512-lN5FpQgu2Rq0CzTPWmzRpq6QHcMmzsXYeClsgO3108uVp1/genBNAObYVTxGOKe/jb9q99trz8EtIn05O6KN1g==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/focus": "^3.19.0", + "@react-aria/i18n": "^3.12.4", + "@react-aria/interactions": "^3.22.5", + "@react-aria/live-announcer": "^3.4.1", + "@react-aria/selection": "^3.21.0", + "@react-aria/utils": "^3.26.0", + "@react-stately/collections": "^3.12.0", + "@react-stately/grid": "^3.10.0", + "@react-stately/selection": "^3.18.0", + "@react-types/checkbox": "^3.9.0", + "@react-types/grid": "^3.2.10", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/gridlist": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/@react-aria/gridlist/-/gridlist-3.10.0.tgz", + "integrity": "sha512-UcblfSZ7kJBrjg9mQ5VbnRevN81UiYB4NuL5PwIpBpridO7tnl4ew6+96PYU7Wj1chHhPS3x0b0zmuSVN7A0LA==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/focus": "^3.19.0", + "@react-aria/grid": "^3.11.0", + "@react-aria/i18n": "^3.12.4", + "@react-aria/interactions": "^3.22.5", + "@react-aria/selection": "^3.21.0", + "@react-aria/utils": "^3.26.0", + "@react-stately/collections": "^3.12.0", + "@react-stately/list": "^3.11.1", + "@react-stately/tree": "^3.8.6", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/i18n": { + "version": "3.12.4", + "resolved": "https://registry.npmjs.org/@react-aria/i18n/-/i18n-3.12.4.tgz", + "integrity": "sha512-j9+UL3q0Ls8MhXV9gtnKlyozq4aM95YywXqnmJtzT1rYeBx7w28hooqrWkCYLfqr4OIryv1KUnPiCSLwC2OC7w==", + "license": "Apache-2.0", + "dependencies": { + "@internationalized/date": "^3.6.0", + "@internationalized/message": "^3.1.6", + "@internationalized/number": "^3.6.0", + "@internationalized/string": "^3.2.5", + "@react-aria/ssr": "^3.9.7", + "@react-aria/utils": "^3.26.0", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/interactions": { + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@react-aria/interactions/-/interactions-3.22.5.tgz", + "integrity": "sha512-kMwiAD9E0TQp+XNnOs13yVJghiy8ET8L0cbkeuTgNI96sOAp/63EJ1FSrDf17iD8sdjt41LafwX/dKXW9nCcLQ==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/ssr": "^3.9.7", + "@react-aria/utils": "^3.26.0", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/label": { + "version": "3.7.13", + "resolved": "https://registry.npmjs.org/@react-aria/label/-/label-3.7.13.tgz", + "integrity": "sha512-brSAXZVTey5RG/Ex6mTrV/9IhGSQFU4Al34qmjEDho+Z2qT4oPwf8k7TRXWWqzOU0ugYxekYbsLd2zlN3XvWcg==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/utils": "^3.26.0", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/link": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@react-aria/link/-/link-3.7.7.tgz", + "integrity": "sha512-eVBRcHKhNSsATYWv5wRnZXRqPVcKAWWakyvfrYePIKpC3s4BaHZyTGYdefk8ZwZdEOuQZBqLMnjW80q1uhtkuA==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/focus": "^3.19.0", + "@react-aria/interactions": "^3.22.5", + "@react-aria/utils": "^3.26.0", + "@react-types/link": "^3.5.9", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/listbox": { + "version": "3.13.6", + "resolved": "https://registry.npmjs.org/@react-aria/listbox/-/listbox-3.13.6.tgz", + "integrity": "sha512-6hEXEXIZVau9lgBZ4VVjFR3JnGU+fJaPmV3HP0UZ2ucUptfG0MZo24cn+ZQJsWiuaCfNFv5b8qribiv+BcO+Kg==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/interactions": "^3.22.5", + "@react-aria/label": "^3.7.13", + "@react-aria/selection": "^3.21.0", + "@react-aria/utils": "^3.26.0", + "@react-stately/collections": "^3.12.0", + "@react-stately/list": "^3.11.1", + "@react-types/listbox": "^3.5.3", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/live-announcer": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@react-aria/live-announcer/-/live-announcer-3.4.1.tgz", + "integrity": "sha512-4X2mcxgqLvvkqxv2l1n00jTzUxxe0kkLiapBGH1LHX/CxA1oQcHDqv8etJ2ZOwmS/MSBBiWnv3DwYHDOF6ubig==", + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0" + } + }, + "node_modules/@react-aria/menu": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/@react-aria/menu/-/menu-3.16.0.tgz", + "integrity": "sha512-TNk+Vd3TbpBPUxEloAdHRTaRxf9JBK7YmkHYiq0Yj5Lc22KS0E2eTyhpPM9xJvEWN2TlC5TEvNfdyui2kYWFFQ==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/focus": "^3.19.0", + "@react-aria/i18n": "^3.12.4", + "@react-aria/interactions": "^3.22.5", + "@react-aria/overlays": "^3.24.0", + "@react-aria/selection": "^3.21.0", + "@react-aria/utils": "^3.26.0", + "@react-stately/collections": "^3.12.0", + "@react-stately/menu": "^3.9.0", + "@react-stately/selection": "^3.18.0", + "@react-stately/tree": "^3.8.6", + "@react-types/button": "^3.10.1", + "@react-types/menu": "^3.9.13", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/meter": { + "version": "3.4.18", + "resolved": "https://registry.npmjs.org/@react-aria/meter/-/meter-3.4.18.tgz", + "integrity": "sha512-tTX3LLlmDIHqrC42dkdf+upb1c4UbhlpZ52gqB64lZD4OD4HE+vMTwNSe+7MRKMLvcdKPWCRC35PnxIHZ15kfQ==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/progress": "^3.4.18", + "@react-types/meter": "^3.4.5", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/numberfield": { + "version": "3.11.9", + "resolved": "https://registry.npmjs.org/@react-aria/numberfield/-/numberfield-3.11.9.tgz", + "integrity": "sha512-3tiGPx2y4zyOV7PmdBASes99ZZsFTZAJTnU45Z+p1CW4131lw7y2ZhbojBl7U6DaXAJvi1z6zY6cq2UE9w5a0Q==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/i18n": "^3.12.4", + "@react-aria/interactions": "^3.22.5", + "@react-aria/spinbutton": "^3.6.10", + "@react-aria/textfield": "^3.15.0", + "@react-aria/utils": "^3.26.0", + "@react-stately/form": "^3.1.0", + "@react-stately/numberfield": "^3.9.8", + "@react-types/button": "^3.10.1", + "@react-types/numberfield": "^3.8.7", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/overlays": { + "version": "3.24.0", + "resolved": "https://registry.npmjs.org/@react-aria/overlays/-/overlays-3.24.0.tgz", + "integrity": "sha512-0kAXBsMNTc/a3M07tK9Cdt/ea8CxTAEJ223g8YgqImlmoBBYAL7dl5G01IOj67TM64uWPTmZrOklBchHWgEm3A==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/focus": "^3.19.0", + "@react-aria/i18n": "^3.12.4", + "@react-aria/interactions": "^3.22.5", + "@react-aria/ssr": "^3.9.7", + "@react-aria/utils": "^3.26.0", + "@react-aria/visually-hidden": "^3.8.18", + "@react-stately/overlays": "^3.6.12", + "@react-types/button": "^3.10.1", + "@react-types/overlays": "^3.8.11", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/progress": { + "version": "3.4.18", + "resolved": "https://registry.npmjs.org/@react-aria/progress/-/progress-3.4.18.tgz", + "integrity": "sha512-FOLgJ9t9i1u3oAAimybJG6r7/soNPBnJfWo4Yr6MmaUv90qVGa1h6kiuM5m9H/bm5JobAebhdfHit9lFlgsCmg==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/i18n": "^3.12.4", + "@react-aria/label": "^3.7.13", + "@react-aria/utils": "^3.26.0", + "@react-types/progress": "^3.5.8", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/radio": { + "version": "3.10.10", + "resolved": "https://registry.npmjs.org/@react-aria/radio/-/radio-3.10.10.tgz", + "integrity": "sha512-NVdeOVrsrHgSfwL2jWCCXFsWZb+RMRZErj5vthHQW4nkHECGOzeX56VaLWTSvdoCPqi9wdIX8A6K9peeAIgxzA==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/focus": "^3.19.0", + "@react-aria/form": "^3.0.11", + "@react-aria/i18n": "^3.12.4", + "@react-aria/interactions": "^3.22.5", + "@react-aria/label": "^3.7.13", + "@react-aria/utils": "^3.26.0", + "@react-stately/radio": "^3.10.9", + "@react-types/radio": "^3.8.5", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/searchfield": { + "version": "3.7.11", + "resolved": "https://registry.npmjs.org/@react-aria/searchfield/-/searchfield-3.7.11.tgz", + "integrity": "sha512-wFf6QxtBFfoxy0ANxI0+ftFEBGynVCY0+ce4H4Y9LpUTQsIKMp3sdc7LoUFORWw5Yee6Eid5cFPQX0Ymnk+ZJg==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/i18n": "^3.12.4", + "@react-aria/textfield": "^3.15.0", + "@react-aria/utils": "^3.26.0", + "@react-stately/searchfield": "^3.5.8", + "@react-types/button": "^3.10.1", + "@react-types/searchfield": "^3.5.10", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/select": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/@react-aria/select/-/select-3.15.0.tgz", + "integrity": "sha512-zgBOUNy81aJplfc3NKDJMv8HkXjBGzaFF3XDzNfW8vJ7nD9rcTRUN5SQ1XCEnKMv12B/Euk9zt6kd+tX0wk1vQ==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/form": "^3.0.11", + "@react-aria/i18n": "^3.12.4", + "@react-aria/interactions": "^3.22.5", + "@react-aria/label": "^3.7.13", + "@react-aria/listbox": "^3.13.6", + "@react-aria/menu": "^3.16.0", + "@react-aria/selection": "^3.21.0", + "@react-aria/utils": "^3.26.0", + "@react-aria/visually-hidden": "^3.8.18", + "@react-stately/select": "^3.6.9", + "@react-types/button": "^3.10.1", + "@react-types/select": "^3.9.8", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/selection": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@react-aria/selection/-/selection-3.21.0.tgz", + "integrity": "sha512-52JJ6hlPcM+gt0VV3DBmz6Kj1YAJr13TfutrKfGWcK36LvNCBm1j0N+TDqbdnlp8Nue6w0+5FIwZq44XPYiBGg==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/focus": "^3.19.0", + "@react-aria/i18n": "^3.12.4", + "@react-aria/interactions": "^3.22.5", + "@react-aria/utils": "^3.26.0", + "@react-stately/selection": "^3.18.0", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/separator": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/@react-aria/separator/-/separator-3.4.4.tgz", + "integrity": "sha512-dH+qt0Mdh0nhKXCHW6AR4DF8DKLUBP26QYWaoThPdBwIpypH/JVKowpPtWms1P4b36U6XzHXHnTTEn/ZVoCqNA==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/utils": "^3.26.0", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/slider": { + "version": "3.7.14", + "resolved": "https://registry.npmjs.org/@react-aria/slider/-/slider-3.7.14.tgz", + "integrity": "sha512-7rOiKjLkEZ0j7mPMlwrqivc+K4OSfL14slaQp06GHRiJkhiWXh2/drPe15hgNq55HmBQBpA0umKMkJcqVgmXPA==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/focus": "^3.19.0", + "@react-aria/i18n": "^3.12.4", + "@react-aria/interactions": "^3.22.5", + "@react-aria/label": "^3.7.13", + "@react-aria/utils": "^3.26.0", + "@react-stately/slider": "^3.6.0", + "@react-types/shared": "^3.26.0", + "@react-types/slider": "^3.7.7", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/spinbutton": { + "version": "3.6.10", + "resolved": "https://registry.npmjs.org/@react-aria/spinbutton/-/spinbutton-3.6.10.tgz", + "integrity": "sha512-nhYEYk7xUNOZDaqiQ5w/nHH9ouqjJbabTWXH+KK7UR1oVGfo4z1wG94l8KWF3Z6SGGnBxzLJyTBguZ4g9aYTSg==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/i18n": "^3.12.4", + "@react-aria/live-announcer": "^3.4.1", + "@react-aria/utils": "^3.26.0", + "@react-types/button": "^3.10.1", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/ssr": { + "version": "3.9.7", + "resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.9.7.tgz", + "integrity": "sha512-GQygZaGlmYjmYM+tiNBA5C6acmiDWF52Nqd40bBp0Znk4M4hP+LTmI0lpI1BuKMw45T8RIhrAsICIfKwZvi2Gg==", + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0" + }, + "engines": { + "node": ">= 12" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/switch": { + "version": "3.6.10", + "resolved": "https://registry.npmjs.org/@react-aria/switch/-/switch-3.6.10.tgz", + "integrity": "sha512-FtaI9WaEP1tAmra1sYlAkYXg9x75P5UtgY8pSbe9+1WRyWbuE1QZT+RNCTi3IU4fZ7iJQmXH6+VaMyzPlSUagw==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/toggle": "^3.10.10", + "@react-stately/toggle": "^3.8.0", + "@react-types/shared": "^3.26.0", + "@react-types/switch": "^3.5.7", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/table": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/@react-aria/table/-/table-3.16.0.tgz", + "integrity": "sha512-9xF9S3CJ7XRiiK92hsIKxPedD0kgcQWwqTMtj3IBynpQ4vsnRiW3YNIzrn9C3apjknRZDTSta8O2QPYCUMmw2A==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/focus": "^3.19.0", + "@react-aria/grid": "^3.11.0", + "@react-aria/i18n": "^3.12.4", + "@react-aria/interactions": "^3.22.5", + "@react-aria/live-announcer": "^3.4.1", + "@react-aria/utils": "^3.26.0", + "@react-aria/visually-hidden": "^3.8.18", + "@react-stately/collections": "^3.12.0", + "@react-stately/flags": "^3.0.5", + "@react-stately/table": "^3.13.0", + "@react-types/checkbox": "^3.9.0", + "@react-types/grid": "^3.2.10", + "@react-types/shared": "^3.26.0", + "@react-types/table": "^3.10.3", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/tabs": { + "version": "3.9.8", + "resolved": "https://registry.npmjs.org/@react-aria/tabs/-/tabs-3.9.8.tgz", + "integrity": "sha512-Nur/qRFBe+Zrt4xcCJV/ULXCS3Mlae+B89bp1Gl20vSDqk6uaPtGk+cS5k03eugOvas7AQapqNJsJgKd66TChw==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/focus": "^3.19.0", + "@react-aria/i18n": "^3.12.4", + "@react-aria/selection": "^3.21.0", + "@react-aria/utils": "^3.26.0", + "@react-stately/tabs": "^3.7.0", + "@react-types/shared": "^3.26.0", + "@react-types/tabs": "^3.3.11", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/tag": { + "version": "3.4.8", + "resolved": "https://registry.npmjs.org/@react-aria/tag/-/tag-3.4.8.tgz", + "integrity": "sha512-exWl52bsFtJuzaqMYvSnLteUoPqb3Wf+uICru/yRtREJsWVqjJF38NCVlU73Yqd9qMPTctDrboSZFAWAWKDxoA==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/gridlist": "^3.10.0", + "@react-aria/i18n": "^3.12.4", + "@react-aria/interactions": "^3.22.5", + "@react-aria/label": "^3.7.13", + "@react-aria/selection": "^3.21.0", + "@react-aria/utils": "^3.26.0", + "@react-stately/list": "^3.11.1", + "@react-types/button": "^3.10.1", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/textfield": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/@react-aria/textfield/-/textfield-3.15.0.tgz", + "integrity": "sha512-V5mg7y1OR6WXYHdhhm4FC7QyGc9TideVRDFij1SdOJrIo5IFB7lvwpOS0GmgwkVbtr71PTRMjZnNbrJUFU6VNA==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/focus": "^3.19.0", + "@react-aria/form": "^3.0.11", + "@react-aria/label": "^3.7.13", + "@react-aria/utils": "^3.26.0", + "@react-stately/form": "^3.1.0", + "@react-stately/utils": "^3.10.5", + "@react-types/shared": "^3.26.0", + "@react-types/textfield": "^3.10.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/toggle": { + "version": "3.10.10", + "resolved": "https://registry.npmjs.org/@react-aria/toggle/-/toggle-3.10.10.tgz", + "integrity": "sha512-QwMT/vTNrbrILxWVHfd9zVQ3mV2NdBwyRu+DphVQiFAXcmc808LEaIX2n0lI6FCsUDC9ZejCyvzd91/YemdZ1Q==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/focus": "^3.19.0", + "@react-aria/interactions": "^3.22.5", + "@react-aria/utils": "^3.26.0", + "@react-stately/toggle": "^3.8.0", + "@react-types/checkbox": "^3.9.0", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/toolbar": { + "version": "3.0.0-beta.11", + "resolved": "https://registry.npmjs.org/@react-aria/toolbar/-/toolbar-3.0.0-beta.11.tgz", + "integrity": "sha512-LM3jTRFNDgoEpoL568WaiuqiVM7eynSQLJis1hV0vlVnhTd7M7kzt7zoOjzxVb5Uapz02uCp1Fsm4wQMz09qwQ==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/focus": "^3.19.0", + "@react-aria/i18n": "^3.12.4", + "@react-aria/utils": "^3.26.0", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/tooltip": { + "version": "3.7.10", + "resolved": "https://registry.npmjs.org/@react-aria/tooltip/-/tooltip-3.7.10.tgz", + "integrity": "sha512-Udi3XOnrF/SYIz72jw9bgB74MG/yCOzF5pozHj2FH2HiJlchYv/b6rHByV/77IZemdlkmL/uugrv/7raPLSlnw==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/focus": "^3.19.0", + "@react-aria/interactions": "^3.22.5", + "@react-aria/utils": "^3.26.0", + "@react-stately/tooltip": "^3.5.0", + "@react-types/shared": "^3.26.0", + "@react-types/tooltip": "^3.4.13", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/utils": { + "version": "3.26.0", + "resolved": "https://registry.npmjs.org/@react-aria/utils/-/utils-3.26.0.tgz", + "integrity": "sha512-LkZouGSjjQ0rEqo4XJosS4L3YC/zzQkfRM3KoqK6fUOmUJ9t0jQ09WjiF+uOoG9u+p30AVg3TrZRUWmoTS+koQ==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/ssr": "^3.9.7", + "@react-stately/utils": "^3.10.5", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0", + "clsx": "^2.0.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/visually-hidden": { + "version": "3.8.18", + "resolved": "https://registry.npmjs.org/@react-aria/visually-hidden/-/visually-hidden-3.8.18.tgz", + "integrity": "sha512-l/0igp+uub/salP35SsNWq5mGmg3G5F5QMS1gDZ8p28n7CgjvzyiGhJbbca7Oxvaw1HRFzVl9ev+89I7moNnFQ==", + "license": "Apache-2.0", + "dependencies": { + "@react-aria/interactions": "^3.22.5", + "@react-aria/utils": "^3.26.0", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/calendar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@react-stately/calendar/-/calendar-3.6.0.tgz", + "integrity": "sha512-GqUtOtGnwWjtNrJud8nY/ywI4VBP5byToNVRTnxbMl+gYO1Qe/uc5NG7zjwMxhb2kqSBHZFdkF0DXVqG2Ul+BA==", + "license": "Apache-2.0", + "dependencies": { + "@internationalized/date": "^3.6.0", + "@react-stately/utils": "^3.10.5", + "@react-types/calendar": "^3.5.0", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/checkbox": { + "version": "3.6.10", + "resolved": "https://registry.npmjs.org/@react-stately/checkbox/-/checkbox-3.6.10.tgz", + "integrity": "sha512-LHm7i4YI8A/RdgWAuADrnSAYIaYYpQeZqsp1a03Og0pJHAlZL0ymN3y2IFwbZueY0rnfM+yF+kWNXjJqbKrFEQ==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/form": "^3.1.0", + "@react-stately/utils": "^3.10.5", + "@react-types/checkbox": "^3.9.0", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/collections": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@react-stately/collections/-/collections-3.12.0.tgz", + "integrity": "sha512-MfR9hwCxe5oXv4qrLUnjidwM50U35EFmInUeFf8i9mskYwWlRYS0O1/9PZ0oF1M0cKambaRHKEy98jczgb9ycA==", + "license": "Apache-2.0", + "dependencies": { + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/color": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/@react-stately/color/-/color-3.8.1.tgz", + "integrity": "sha512-7eN7K+KJRu+rxK351eGrzoq2cG+yipr90i5b1cUu4lioYmcH4WdsfjmM5Ku6gypbafH+kTDfflvO6hiY1NZH+A==", + "license": "Apache-2.0", + "dependencies": { + "@internationalized/number": "^3.6.0", + "@internationalized/string": "^3.2.5", + "@react-aria/i18n": "^3.12.4", + "@react-stately/form": "^3.1.0", + "@react-stately/numberfield": "^3.9.8", + "@react-stately/slider": "^3.6.0", + "@react-stately/utils": "^3.10.5", + "@react-types/color": "^3.0.1", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/combobox": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@react-stately/combobox/-/combobox-3.10.1.tgz", + "integrity": "sha512-Rso+H+ZEDGFAhpKWbnRxRR/r7YNmYVtt+Rn0eNDNIUp3bYaxIBCdCySyAtALs4I8RZXZQ9zoUznP7YeVwG3cLg==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/collections": "^3.12.0", + "@react-stately/form": "^3.1.0", + "@react-stately/list": "^3.11.1", + "@react-stately/overlays": "^3.6.12", + "@react-stately/select": "^3.6.9", + "@react-stately/utils": "^3.10.5", + "@react-types/combobox": "^3.13.1", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/datepicker": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/@react-stately/datepicker/-/datepicker-3.11.0.tgz", + "integrity": "sha512-d9MJF34A0VrhL5y5S8mAISA8uwfNCQKmR2k4KoQJm3De1J8SQeNzSjLviAwh1faDow6FXGlA6tVbTrHyDcBgBg==", + "license": "Apache-2.0", + "dependencies": { + "@internationalized/date": "^3.6.0", + "@internationalized/string": "^3.2.5", + "@react-stately/form": "^3.1.0", + "@react-stately/overlays": "^3.6.12", + "@react-stately/utils": "^3.10.5", + "@react-types/datepicker": "^3.9.0", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/disclosure": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@react-stately/disclosure/-/disclosure-3.0.0.tgz", + "integrity": "sha512-Z9+fi0/41ZXHjGopORQza7mk4lFEFslKhy65ehEo6O6j2GuIV0659ExIVDsmJoJSFjXCfGh0sX8oTSOlXi9gqg==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/utils": "^3.10.5", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/dnd": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@react-stately/dnd/-/dnd-3.5.0.tgz", + "integrity": "sha512-ZcWFw1npEDnATiy3TEdzA1skQ3UEIyfbNA6VhPNO8yiSVLxoxBOaEaq8VVS72fRGAtxud6dgOy8BnsP9JwDClQ==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/selection": "^3.18.0", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/flags": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@react-stately/flags/-/flags-3.0.5.tgz", + "integrity": "sha512-6wks4csxUwPCp23LgJSnkBRhrWpd9jGd64DjcCTNB2AHIFu7Ab1W59pJpUL6TW7uAxVxdNKjgn6D1hlBy8qWsA==", + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0" + } + }, + "node_modules/@react-stately/form": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@react-stately/form/-/form-3.1.0.tgz", + "integrity": "sha512-E2wxNQ0QaTyDHD0nJFtTSnEH9A3bpJurwxhS4vgcUmESHgjFEMLlC9irUSZKgvOgb42GAq+fHoWBsgKeTp9Big==", + "license": "Apache-2.0", + "dependencies": { + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/grid": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/@react-stately/grid/-/grid-3.10.0.tgz", + "integrity": "sha512-ii+DdsOBvCnHMgL0JvUfFwO1kiAPP19Bpdpl6zn/oOltk6F5TmnoyNrzyz+2///1hCiySI3FE1O7ujsAQs7a6Q==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/collections": "^3.12.0", + "@react-stately/selection": "^3.18.0", + "@react-types/grid": "^3.2.10", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/list": { + "version": "3.11.1", + "resolved": "https://registry.npmjs.org/@react-stately/list/-/list-3.11.1.tgz", + "integrity": "sha512-UCOpIvqBOjwLtk7zVTYWuKU1m1Oe61Q5lNar/GwHaV1nAiSQ8/yYlhr40NkBEs9X3plEfsV28UIpzOrYnu1tPg==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/collections": "^3.12.0", + "@react-stately/selection": "^3.18.0", + "@react-stately/utils": "^3.10.5", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/menu": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/@react-stately/menu/-/menu-3.9.0.tgz", + "integrity": "sha512-++sm0fzZeUs9GvtRbj5RwrP+KL9KPANp9f4SvtI3s+MP+Y/X3X7LNNePeeccGeyikB5fzMsuyvd82bRRW9IhDQ==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/overlays": "^3.6.12", + "@react-types/menu": "^3.9.13", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/numberfield": { + "version": "3.9.8", + "resolved": "https://registry.npmjs.org/@react-stately/numberfield/-/numberfield-3.9.8.tgz", + "integrity": "sha512-J6qGILxDNEtu7yvd3/y+FpbrxEaAeIODwlrFo6z1kvuDlLAm/KszXAc75yoDi0OtakFTCMP6/HR5VnHaQdMJ3w==", + "license": "Apache-2.0", + "dependencies": { + "@internationalized/number": "^3.6.0", + "@react-stately/form": "^3.1.0", + "@react-stately/utils": "^3.10.5", + "@react-types/numberfield": "^3.8.7", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/overlays": { + "version": "3.6.12", + "resolved": "https://registry.npmjs.org/@react-stately/overlays/-/overlays-3.6.12.tgz", + "integrity": "sha512-QinvZhwZgj8obUyPIcyURSCjTZlqZYRRCS60TF8jH8ZpT0tEAuDb3wvhhSXuYA3Xo9EHLwvLjEf3tQKKdAQArw==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/utils": "^3.10.5", + "@react-types/overlays": "^3.8.11", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/radio": { + "version": "3.10.9", + "resolved": "https://registry.npmjs.org/@react-stately/radio/-/radio-3.10.9.tgz", + "integrity": "sha512-kUQ7VdqFke8SDRCatw2jW3rgzMWbvw+n2imN2THETynI47NmNLzNP11dlGO2OllRtTrsLhmBNlYHa3W62pFpAw==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/form": "^3.1.0", + "@react-stately/utils": "^3.10.5", + "@react-types/radio": "^3.8.5", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/searchfield": { + "version": "3.5.8", + "resolved": "https://registry.npmjs.org/@react-stately/searchfield/-/searchfield-3.5.8.tgz", + "integrity": "sha512-jtquvGadx1DmtQqPKaVO6Qg/xpBjNxsOd59ciig9xRxpxV+90i996EX1E2R6R+tGJdSM1pD++7PVOO4yE++HOg==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/utils": "^3.10.5", + "@react-types/searchfield": "^3.5.10", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/select": { + "version": "3.6.9", + "resolved": "https://registry.npmjs.org/@react-stately/select/-/select-3.6.9.tgz", + "integrity": "sha512-vASUDv7FhEYQURzM+JIwcusPv7/x/l3zHc/oKJPvoCl3aa9pwS8hZwS82SC00o2iFnrDscfDJju4IE/cd4hucg==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/form": "^3.1.0", + "@react-stately/list": "^3.11.1", + "@react-stately/overlays": "^3.6.12", + "@react-types/select": "^3.9.8", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/selection": { + "version": "3.18.0", + "resolved": "https://registry.npmjs.org/@react-stately/selection/-/selection-3.18.0.tgz", + "integrity": "sha512-6EaNNP3exxBhW2LkcRR4a3pg+3oDguZlBSqIVVR7lyahv/D8xXHRC4dX+m0mgGHJpsgjs7664Xx6c8v193TFxg==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/collections": "^3.12.0", + "@react-stately/utils": "^3.10.5", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/slider": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@react-stately/slider/-/slider-3.6.0.tgz", + "integrity": "sha512-w5vJxVh267pmD1X+Ppd9S3ZzV1hcg0cV8q5P4Egr160b9WMcWlUspZPtsthwUlN7qQe/C8y5IAhtde4s29eNag==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/utils": "^3.10.5", + "@react-types/shared": "^3.26.0", + "@react-types/slider": "^3.7.7", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/table": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@react-stately/table/-/table-3.13.0.tgz", + "integrity": "sha512-mRbNYrwQIE7xzVs09Lk3kPteEVFVyOc20vA8ph6EP54PiUf/RllJpxZe/WUYLf4eom9lUkRYej5sffuUBpxjCA==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/collections": "^3.12.0", + "@react-stately/flags": "^3.0.5", + "@react-stately/grid": "^3.10.0", + "@react-stately/selection": "^3.18.0", + "@react-stately/utils": "^3.10.5", + "@react-types/grid": "^3.2.10", + "@react-types/shared": "^3.26.0", + "@react-types/table": "^3.10.3", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/tabs": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@react-stately/tabs/-/tabs-3.7.0.tgz", + "integrity": "sha512-ox4hTkfZCoR4Oyr3Op3rBlWNq2Wxie04vhEYpTZQ2hobR3l4fYaOkd7CPClILktJ3TC104j8wcb0knWxIBRx9w==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/list": "^3.11.1", + "@react-types/shared": "^3.26.0", + "@react-types/tabs": "^3.3.11", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/toggle": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@react-stately/toggle/-/toggle-3.8.0.tgz", + "integrity": "sha512-pyt/k/J8BwE/2g6LL6Z6sMSWRx9HEJB83Sm/MtovXnI66sxJ2EfQ1OaXB7Su5PEL9OMdoQF6Mb+N1RcW3zAoPw==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/utils": "^3.10.5", + "@react-types/checkbox": "^3.9.0", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/tooltip": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@react-stately/tooltip/-/tooltip-3.5.0.tgz", + "integrity": "sha512-+xzPNztJDd2XJD0X3DgWKlrgOhMqZpSzsIssXeJgO7uCnP8/Z513ESaipJhJCFC8fxj5caO/DK4Uu8hEtlB8cQ==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/overlays": "^3.6.12", + "@react-types/tooltip": "^3.4.13", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/tree": { + "version": "3.8.6", + "resolved": "https://registry.npmjs.org/@react-stately/tree/-/tree-3.8.6.tgz", + "integrity": "sha512-lblUaxf1uAuIz5jm6PYtcJ+rXNNVkqyFWTIMx6g6gW/mYvm8GNx1G/0MLZE7E6CuDGaO9dkLSY2bB1uqyKHidA==", + "license": "Apache-2.0", + "dependencies": { + "@react-stately/collections": "^3.12.0", + "@react-stately/selection": "^3.18.0", + "@react-stately/utils": "^3.10.5", + "@react-types/shared": "^3.26.0", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/utils": { + "version": "3.10.5", + "resolved": "https://registry.npmjs.org/@react-stately/utils/-/utils-3.10.5.tgz", + "integrity": "sha512-iMQSGcpaecghDIh3mZEpZfoFH3ExBwTtuBEcvZ2XnGzCgQjeYXcMdIUwAfVQLXFTdHUHGF6Gu6/dFrYsCzySBQ==", + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-types/breadcrumbs": { + "version": "3.7.9", + "resolved": "https://registry.npmjs.org/@react-types/breadcrumbs/-/breadcrumbs-3.7.9.tgz", + "integrity": "sha512-eARYJo8J+VfNV8vP4uw3L2Qliba9wLV2bx9YQCYf5Lc/OE5B/y4gaTLz+Y2P3Rtn6gBPLXY447zCs5i7gf+ICg==", + "license": "Apache-2.0", + "dependencies": { + "@react-types/link": "^3.5.9", + "@react-types/shared": "^3.26.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-types/button": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/@react-types/button/-/button-3.10.1.tgz", + "integrity": "sha512-XTtap8o04+4QjPNAshFWOOAusUTxQlBjU2ai0BTVLShQEjHhRVDBIWsI2B2FKJ4KXT6AZ25llaxhNrreWGonmA==", + "license": "Apache-2.0", + "dependencies": { + "@react-types/shared": "^3.26.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-types/calendar": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@react-types/calendar/-/calendar-3.5.0.tgz", + "integrity": "sha512-O3IRE7AGwAWYnvJIJ80cOy7WwoJ0m8GtX/qSmvXQAjC4qx00n+b5aFNBYAQtcyc3RM5QpW6obs9BfwGetFiI8w==", + "license": "Apache-2.0", + "dependencies": { + "@internationalized/date": "^3.6.0", + "@react-types/shared": "^3.26.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-types/checkbox": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/@react-types/checkbox/-/checkbox-3.9.0.tgz", + "integrity": "sha512-9hbHx0Oo2Hp5a8nV8Q75LQR0DHtvOIJbFaeqESSopqmV9EZoYjtY/h0NS7cZetgahQgnqYWQi44XGooMDCsmxA==", + "license": "Apache-2.0", + "dependencies": { + "@react-types/shared": "^3.26.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-types/color": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@react-types/color/-/color-3.0.1.tgz", + "integrity": "sha512-KemFziO3GbmT3HEKrgOGdqNA6Gsmy9xrwFO3f8qXSG7gVz6M27Ic4R9HVQv4iAjap5uti6W13/pk2bc/jLVcEA==", + "license": "Apache-2.0", + "dependencies": { + "@react-types/shared": "^3.26.0", + "@react-types/slider": "^3.7.7" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-types/combobox": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/@react-types/combobox/-/combobox-3.13.1.tgz", + "integrity": "sha512-7xr+HknfhReN4QPqKff5tbKTe2kGZvH+DGzPYskAtb51FAAiZsKo+WvnNAvLwg3kRoC9Rkn4TAiVBp/HgymRDw==", + "license": "Apache-2.0", + "dependencies": { + "@react-types/shared": "^3.26.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-types/datepicker": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/@react-types/datepicker/-/datepicker-3.9.0.tgz", + "integrity": "sha512-dbKL5Qsm2MQwOTtVQdOcKrrphcXAqDD80WLlSQrBLg+waDuuQ7H+TrvOT0thLKloNBlFUGnZZfXGRHINpih/0g==", + "license": "Apache-2.0", + "dependencies": { + "@internationalized/date": "^3.6.0", + "@react-types/calendar": "^3.5.0", + "@react-types/overlays": "^3.8.11", + "@react-types/shared": "^3.26.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-types/dialog": { + "version": "3.5.14", + "resolved": "https://registry.npmjs.org/@react-types/dialog/-/dialog-3.5.14.tgz", + "integrity": "sha512-OXWMjrALwrlgw8aHD8SeRm/s3tbAssdaEh2h73KUSeFau3fU3n5mfKv+WnFqsEaOtN261o48l7hTlS6615H9AA==", + "license": "Apache-2.0", + "dependencies": { + "@react-types/overlays": "^3.8.11", + "@react-types/shared": "^3.26.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" + "node_modules/@react-types/grid": { + "version": "3.2.10", + "resolved": "https://registry.npmjs.org/@react-types/grid/-/grid-3.2.10.tgz", + "integrity": "sha512-Z5cG0ITwqjUE4kWyU5/7VqiPl4wqMJ7kG/ZP7poAnLmwRsR8Ai0ceVn+qzp5nTA19cgURi8t3LsXn3Ar1FBoog==", + "license": "Apache-2.0", + "dependencies": { + "@react-types/shared": "^3.26.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@eslint/js": { - "version": "9.15.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.15.0.tgz", - "integrity": "sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node_modules/@react-types/link": { + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@react-types/link/-/link-3.5.9.tgz", + "integrity": "sha512-JcKDiDMqrq/5Vpn+BdWQEuXit4KN4HR/EgIi3yKnNbYkLzxBoeQZpQgvTaC7NEQeZnSqkyXQo3/vMUeX/ZNIKw==", + "license": "Apache-2.0", + "dependencies": { + "@react-types/shared": "^3.26.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@eslint/object-schema": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", - "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", - "dev": true, + "node_modules/@react-types/listbox": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@react-types/listbox/-/listbox-3.5.3.tgz", + "integrity": "sha512-v1QXd9/XU3CCKr2Vgs7WLcTr6VMBur7CrxHhWZQQFExsf9bgJ/3wbUdjy4aThY/GsYHiaS38EKucCZFr1QAfqA==", "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "dependencies": { + "@react-types/shared": "^3.26.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@eslint/plugin-kit": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz", - "integrity": "sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==", - "dev": true, + "node_modules/@react-types/menu": { + "version": "3.9.13", + "resolved": "https://registry.npmjs.org/@react-types/menu/-/menu-3.9.13.tgz", + "integrity": "sha512-7SuX6E2tDsqQ+HQdSvIda1ji/+ujmR86dtS9CUu5yWX91P25ufRjZ72EvLRqClWNQsj1Xl4+2zBDLWlceznAjw==", "license": "Apache-2.0", "dependencies": { - "levn": "^0.4.1" + "@react-types/overlays": "^3.8.11", + "@react-types/shared": "^3.26.0" }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", - "dev": true, + "node_modules/@react-types/meter": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/@react-types/meter/-/meter-3.4.5.tgz", + "integrity": "sha512-04w1lEtvP/c3Ep8ND8hhH2rwjz2MtQ8o8SNLhahen3u0rX3jKOgD4BvHujsyvXXTMjj1Djp74sGzNawb4Ppi9w==", "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" + "dependencies": { + "@react-types/progress": "^3.5.8" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@humanfs/node": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", - "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", - "dev": true, + "node_modules/@react-types/numberfield": { + "version": "3.8.7", + "resolved": "https://registry.npmjs.org/@react-types/numberfield/-/numberfield-3.8.7.tgz", + "integrity": "sha512-KccMPi39cLoVkB2T0V7HW6nsxQVAwt89WWCltPZJVGzsebv/k0xTQlPVAgrUake4kDLoE687e3Fr/Oe3+1bDhw==", "license": "Apache-2.0", "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.3.0" + "@react-types/shared": "^3.26.0" }, - "engines": { - "node": ">=18.18.0" + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", - "dev": true, + "node_modules/@react-types/overlays": { + "version": "3.8.11", + "resolved": "https://registry.npmjs.org/@react-types/overlays/-/overlays-3.8.11.tgz", + "integrity": "sha512-aw7T0rwVI3EuyG5AOaEIk8j7dZJQ9m34XAztXJVZ/W2+4pDDkLDbJ/EAPnuo2xGYRGhowuNDn4tDju01eHYi+w==", "license": "Apache-2.0", - "engines": { - "node": ">=18.18" + "dependencies": { + "@react-types/shared": "^3.26.0" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, + "node_modules/@react-types/progress": { + "version": "3.5.8", + "resolved": "https://registry.npmjs.org/@react-types/progress/-/progress-3.5.8.tgz", + "integrity": "sha512-PR0rN5mWevfblR/zs30NdZr+82Gka/ba7UHmYOW9/lkKlWeD7PHgl1iacpd/3zl/jUF22evAQbBHmk1mS6Mpqw==", "license": "Apache-2.0", - "engines": { - "node": ">=12.22" + "dependencies": { + "@react-types/shared": "^3.26.0" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", - "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", - "dev": true, + "node_modules/@react-types/radio": { + "version": "3.8.5", + "resolved": "https://registry.npmjs.org/@react-types/radio/-/radio-3.8.5.tgz", + "integrity": "sha512-gSImTPid6rsbJmwCkTliBIU/npYgJHOFaI3PNJo7Y0QTAnFelCtYeFtBiWrFodSArSv7ASqpLLUEj9hZu/rxIg==", "license": "Apache-2.0", - "engines": { - "node": ">=18.18" + "dependencies": { + "@react-types/shared": "^3.26.0" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "license": "MIT", + "node_modules/@react-types/searchfield": { + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/@react-types/searchfield/-/searchfield-3.5.10.tgz", + "integrity": "sha512-7wW4pJzbReawoGPu8a4l+CODTCDN088EN/ysUzl622ewim57PjArjix+lpO4+aEtJqS9HKpq8UEbjwo9axpcUA==", + "license": "Apache-2.0", "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" + "@react-types/shared": "^3.26.0", + "@react-types/textfield": "^3.10.0" }, - "engines": { - "node": ">=6.0.0" + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "license": "MIT", - "engines": { - "node": ">=6.0.0" + "node_modules/@react-types/select": { + "version": "3.9.8", + "resolved": "https://registry.npmjs.org/@react-types/select/-/select-3.9.8.tgz", + "integrity": "sha512-RGsYj2oFjXpLnfcvWMBQnkcDuKkwT43xwYWZGI214/gp/B64tJiIUgTM5wFTRAeGDX23EePkhCQF+9ctnqFd6g==", + "license": "Apache-2.0", + "dependencies": { + "@react-types/shared": "^3.26.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "license": "MIT", - "engines": { - "node": ">=6.0.0" + "node_modules/@react-types/shared": { + "version": "3.26.0", + "resolved": "https://registry.npmjs.org/@react-types/shared/-/shared-3.26.0.tgz", + "integrity": "sha512-6FuPqvhmjjlpEDLTiYx29IJCbCNWPlsyO+ZUmCUXzhUv2ttShOXfw8CmeHWHftT/b2KweAWuzqSlfeXPR76jpw==", + "license": "Apache-2.0", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "license": "MIT" + "node_modules/@react-types/slider": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@react-types/slider/-/slider-3.7.7.tgz", + "integrity": "sha512-lYTR9zXQV2fSEm/G3gwDENWiki1IXd/oorsgf0zu1DBi2SQDbOsLsGUXiwvD24Xy6OkUuhAqjLPPexezo7+u9g==", + "license": "Apache-2.0", + "dependencies": { + "@react-types/shared": "^3.26.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "license": "MIT", + "node_modules/@react-types/switch": { + "version": "3.5.7", + "resolved": "https://registry.npmjs.org/@react-types/switch/-/switch-3.5.7.tgz", + "integrity": "sha512-1IKiq510rPTHumEZuhxuazuXBa2Cuxz6wBIlwf3NCVmgWEvU+uk1ETG0sH2yymjwCqhtJDKXi+qi9HSgPEDwAg==", + "license": "Apache-2.0", "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "@react-types/shared": "^3.26.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", + "node_modules/@react-types/table": { + "version": "3.10.3", + "resolved": "https://registry.npmjs.org/@react-types/table/-/table-3.10.3.tgz", + "integrity": "sha512-Ac+W+m/zgRzlTU8Z2GEg26HkuJFswF9S6w26r+R3MHwr8z2duGPvv37XRtE1yf3dbpRBgHEAO141xqS2TqGwNg==", + "license": "Apache-2.0", "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "@react-types/grid": "^3.2.10", + "@react-types/shared": "^3.26.0" }, - "engines": { - "node": ">= 8" + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" + "node_modules/@react-types/tabs": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/@react-types/tabs/-/tabs-3.3.11.tgz", + "integrity": "sha512-BjF2TqBhZaIcC4lc82R5pDJd1F7kstj1K0Nokhz99AGYn8C0ITdp6lR+DPVY9JZRxKgP9R2EKfWGI90Lo7NQdA==", + "license": "Apache-2.0", + "dependencies": { + "@react-types/shared": "^3.26.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", + "node_modules/@react-types/textfield": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/@react-types/textfield/-/textfield-3.10.0.tgz", + "integrity": "sha512-ShU3d6kLJGQjPXccVFjM3KOXdj3uyhYROqH9YgSIEVxgA9W6LRflvk/IVBamD9pJYTPbwmVzuP0wQkTDupfZ1w==", + "license": "Apache-2.0", "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "@react-types/shared": "^3.26.0" }, - "engines": { - "node": ">= 8" + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-types/tooltip": { + "version": "3.4.13", + "resolved": "https://registry.npmjs.org/@react-types/tooltip/-/tooltip-3.4.13.tgz", + "integrity": "sha512-KPekFC17RTT8kZlk7ZYubueZnfsGTDOpLw7itzolKOXGddTXsrJGBzSB4Bb060PBVllaDO0MOrhPap8OmrIl1Q==", + "license": "Apache-2.0", + "dependencies": { + "@react-types/overlays": "^3.8.11", + "@react-types/shared": "^3.26.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "node_modules/@rollup/pluginutils": { @@ -3036,6 +4800,42 @@ "url": "https://github.com/sponsors/gregberge" } }, + "node_modules/@swc/helpers": { + "version": "0.5.15", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz", + "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@tanstack/react-virtual": { + "version": "3.10.8", + "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.10.8.tgz", + "integrity": "sha512-VbzbVGSsZlQktyLrP5nxE+vE1ZR+U0NFAWPbJLoG2+DKPwd2D7dVICTVIIaYlJqX1ZCEnYDbaOpmMwbsyhBoIA==", + "license": "MIT", + "dependencies": { + "@tanstack/virtual-core": "3.10.8" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@tanstack/virtual-core": { + "version": "3.10.8", + "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.10.8.tgz", + "integrity": "sha512-PBu00mtt95jbKFi6Llk9aik8bnR3tR/oQP1o3TSi+iG//+Q2RTIzCEgKkHG8BB86kxMNW6O8wku+Lmi+QFR6jA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, "node_modules/@trysound/sax": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", @@ -3647,6 +5447,15 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -3677,6 +5486,12 @@ "node": ">= 10" } }, + "node_modules/compute-scroll-into-view": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.0.tgz", + "integrity": "sha512-rj8l8pD4bJ1nx+dAkMhV1xB5RuZEyVysfxJqB1pRchh1KVvwOv9b7CGB8ZfjTImVv2oF+sYMUkMZq6Na5Ftmbg==", + "license": "MIT" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -3954,6 +5769,22 @@ "tslib": "^2.0.3" } }, + "node_modules/downshift": { + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/downshift/-/downshift-9.0.8.tgz", + "integrity": "sha512-59BWD7+hSUQIM1DeNPLirNNnZIO9qMdIK5GQ/Uo8q34gT4B78RBlb9dhzgnh0HfQTJj4T/JKYD8KoLAlMWnTsA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.24.5", + "compute-scroll-into-view": "^3.1.0", + "prop-types": "^15.8.1", + "react-is": "18.2.0", + "tslib": "^2.6.2" + }, + "peerDependencies": { + "react": ">=16.12.0" + } + }, "node_modules/electron-to-chromium": { "version": "1.5.63", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.63.tgz", @@ -4501,6 +6332,18 @@ "node": ">=0.8.19" } }, + "node_modules/intl-messageformat": { + "version": "10.7.7", + "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-10.7.7.tgz", + "integrity": "sha512-F134jIoeYMro/3I0h08D0Yt4N9o9pjddU/4IIxMMURqbAtI2wu70X8hvG1V48W49zXHXv3RKSF/po+0fDfsGjA==", + "license": "BSD-3-Clause", + "dependencies": { + "@formatjs/ecma402-abstract": "2.2.4", + "@formatjs/fast-memoize": "2.2.3", + "@formatjs/icu-messageformat-parser": "2.9.4", + "tslib": "2" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -4826,6 +6669,15 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -5021,6 +6873,23 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT" + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -5064,6 +6933,57 @@ "node": ">=0.10.0" } }, + "node_modules/react-aria": { + "version": "3.36.0", + "resolved": "https://registry.npmjs.org/react-aria/-/react-aria-3.36.0.tgz", + "integrity": "sha512-AK5XyIhAN+e5HDlwlF+YwFrOrVI7RYmZ6kg/o7ZprQjkYqYKapXeUpWscmNm/3H2kDboE5Z4ymUnK6ZhobLqOw==", + "license": "Apache-2.0", + "dependencies": { + "@internationalized/string": "^3.2.5", + "@react-aria/breadcrumbs": "^3.5.19", + "@react-aria/button": "^3.11.0", + "@react-aria/calendar": "^3.6.0", + "@react-aria/checkbox": "^3.15.0", + "@react-aria/color": "^3.0.2", + "@react-aria/combobox": "^3.11.0", + "@react-aria/datepicker": "^3.12.0", + "@react-aria/dialog": "^3.5.20", + "@react-aria/disclosure": "^3.0.0", + "@react-aria/dnd": "^3.8.0", + "@react-aria/focus": "^3.19.0", + "@react-aria/gridlist": "^3.10.0", + "@react-aria/i18n": "^3.12.4", + "@react-aria/interactions": "^3.22.5", + "@react-aria/label": "^3.7.13", + "@react-aria/link": "^3.7.7", + "@react-aria/listbox": "^3.13.6", + "@react-aria/menu": "^3.16.0", + "@react-aria/meter": "^3.4.18", + "@react-aria/numberfield": "^3.11.9", + "@react-aria/overlays": "^3.24.0", + "@react-aria/progress": "^3.4.18", + "@react-aria/radio": "^3.10.10", + "@react-aria/searchfield": "^3.7.11", + "@react-aria/select": "^3.15.0", + "@react-aria/selection": "^3.21.0", + "@react-aria/separator": "^3.4.4", + "@react-aria/slider": "^3.7.14", + "@react-aria/ssr": "^3.9.7", + "@react-aria/switch": "^3.6.10", + "@react-aria/table": "^3.16.0", + "@react-aria/tabs": "^3.9.8", + "@react-aria/tag": "^3.4.8", + "@react-aria/textfield": "^3.15.0", + "@react-aria/tooltip": "^3.7.10", + "@react-aria/utils": "^3.26.0", + "@react-aria/visually-hidden": "^3.8.18", + "@react-types/shared": "^3.26.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, "node_modules/react-dom": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", @@ -5077,6 +6997,12 @@ "react": "^18.3.1" } }, + "node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "license": "MIT" + }, "node_modules/react-refresh": { "version": "0.14.2", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", @@ -5111,7 +7037,6 @@ "version": "0.14.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true, "license": "MIT" }, "node_modules/regenerator-transform": { @@ -5447,6 +7372,12 @@ "url": "https://opencollective.com/svgo" } }, + "node_modules/tabbable": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz", + "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==", + "license": "MIT" + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", diff --git a/www/package.json b/www/package.json index 4bc156e..340b992 100644 --- a/www/package.json +++ b/www/package.json @@ -10,6 +10,7 @@ "preview": "vite preview" }, "dependencies": { + "@equinor/eds-core-react": "^0.42.5", "@svgr/core": "^8.1.0", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/www/src/App.css b/www/src/App.css new file mode 100644 index 0000000..5857cc6 --- /dev/null +++ b/www/src/App.css @@ -0,0 +1,11 @@ +body, +html { + width: 100%; + margin: 0; +} + +html, +body, +#root { + height: 100%; +} \ No newline at end of file diff --git a/www/src/App.tsx b/www/src/App.tsx index 7b38a2d..9a7d107 100644 --- a/www/src/App.tsx +++ b/www/src/App.tsx @@ -1,10 +1,22 @@ import Editor from "./components/Editor.tsx"; +import styled from "styled-components"; + +const Page = styled.div` + width: 100vw; + height: 100%; + min-height: 100%; + box-sizing: border-box; + overflow: hidden; + display: flex; + align-items: flex-start; + text-align: center; +`; function App() { return ( - <> + - + ); } diff --git a/www/src/components/Editor.tsx b/www/src/components/Editor.tsx index 359f8b1..955891e 100644 --- a/www/src/components/Editor.tsx +++ b/www/src/components/Editor.tsx @@ -1,9 +1,11 @@ import { CommissioningPackageProvider } from "../context/CommissioningPackageContext.tsx"; import Pandid from "./Pandid.tsx"; +import Sidebar from "./Sidebar.tsx"; export default function Editor() { return ( + ); diff --git a/www/src/components/Sidebar.tsx b/www/src/components/Sidebar.tsx new file mode 100644 index 0000000..061753b --- /dev/null +++ b/www/src/components/Sidebar.tsx @@ -0,0 +1,21 @@ +import { SideBar } from "@equinor/eds-core-react"; +import { add, brush, texture } from "@equinor/eds-icons"; +import styled from "styled-components"; + +const StyledSideBar = styled.div` + height: 100%; +`; + +export default function Sidebar() { + return ( + + + + + + + + + + ); +} diff --git a/www/src/main.tsx b/www/src/main.tsx index 5d4a2be..6199d8a 100644 --- a/www/src/main.tsx +++ b/www/src/main.tsx @@ -1,6 +1,7 @@ import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; import App from "./App.tsx"; +import "./App.css"; createRoot(document.getElementById("root")!).render( From cabaea6495345f3dc277975e8ddce637604e5957 Mon Sep 17 00:00:00 2001 From: Nora Kristiansen <106915799+NoraKri@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:52:38 +0100 Subject: [PATCH 03/13] wip impl, added tools for selection --- www/src/App.css | 12 ++ www/src/components/Editor.tsx | 15 +- www/src/components/EditorSidebar.tsx | 71 +++++++ www/src/components/Equipment.tsx | 49 ++--- www/src/components/Pandid.tsx | 181 +++++++----------- www/src/components/Sidebar.tsx | 21 -- www/src/components/piping/PipeSegment.tsx | 21 +- www/src/components/piping/PipeSystem.tsx | 19 +- www/src/components/piping/PipingComponent.tsx | 52 +++-- www/src/context/BoundarySelectionContext.tsx | 34 ++++ .../context/CommissioningPackageContext.tsx | 59 +++--- www/src/enums/Tools.ts | 7 + www/src/hooks/useBoundarySelectionContext.tsx | 12 ++ .../hooks/useCommissioningPackageContext.tsx | 2 +- www/src/types/ClickableComponentProps.ts | 68 ++----- www/src/types/CommissioningPackage.ts | 8 + www/src/utils/HandlerFunctionHelper.tsx | 133 +++++++++++++ 17 files changed, 489 insertions(+), 275 deletions(-) create mode 100644 www/src/components/EditorSidebar.tsx delete mode 100644 www/src/components/Sidebar.tsx create mode 100644 www/src/context/BoundarySelectionContext.tsx create mode 100644 www/src/enums/Tools.ts create mode 100644 www/src/hooks/useBoundarySelectionContext.tsx create mode 100644 www/src/types/CommissioningPackage.ts create mode 100644 www/src/utils/HandlerFunctionHelper.tsx diff --git a/www/src/App.css b/www/src/App.css index 5857cc6..b75a94c 100644 --- a/www/src/App.css +++ b/www/src/App.css @@ -8,4 +8,16 @@ html, body, #root { height: 100%; +} + +.boundary { + path { + stroke: red; + } +} + +.internal { + path { + stroke: green; + } } \ No newline at end of file diff --git a/www/src/components/Editor.tsx b/www/src/components/Editor.tsx index 955891e..f1ce3f2 100644 --- a/www/src/components/Editor.tsx +++ b/www/src/components/Editor.tsx @@ -1,12 +1,15 @@ -import { CommissioningPackageProvider } from "../context/CommissioningPackageContext.tsx"; import Pandid from "./Pandid.tsx"; -import Sidebar from "./Sidebar.tsx"; +import EditorSidebar from "./EditorSidebar.tsx"; +import { useState } from "react"; +import Tools from "../enums/Tools.ts"; +import { CommissioningPackageContextProvider } from "../context/CommissioningPackageContext.tsx"; export default function Editor() { + const [activeTool, setActiveTool] = useState(Tools.BOUNDARY); return ( - - - - + + + + ); } diff --git a/www/src/components/EditorSidebar.tsx b/www/src/components/EditorSidebar.tsx new file mode 100644 index 0000000..1565e59 --- /dev/null +++ b/www/src/components/EditorSidebar.tsx @@ -0,0 +1,71 @@ +import { SideBar, SidebarLinkProps } from "@equinor/eds-core-react"; +import { add, boundaries, category, texture } from "@equinor/eds-icons"; +import styled from "styled-components"; +import React from "react"; +import Tools from "../enums/Tools.ts"; +import { useCommissioningPackageContext } from "../hooks/useCommissioningPackageContext.tsx"; + +const StyledSideBar = styled.div` + height: 100%; +`; + +interface EditorSidebarProps { + activeTool: Tools; + setActiveTool: React.Dispatch>; +} + +export default function EditorSidebar({ + activeTool, + setActiveTool, +}: EditorSidebarProps) { + const context = useCommissioningPackageContext(); + + const menuItemsInitial: SidebarLinkProps[] = [ + { + label: "New commissioning package", + icon: add, + onClick: () => {}, + active: false, + }, + { + label: "Select boundaries", + icon: boundaries, + onClick: () => { + setActiveTool(Tools.BOUNDARY); + }, + active: activeTool === Tools.BOUNDARY, + }, + { + label: "Select inside of boundary", + icon: texture, + onClick: () => { + setActiveTool(Tools.INSIDEBOUNDARY); + }, + active: activeTool === Tools.INSIDEBOUNDARY, + }, + ]; + return ( + + + + {context?.commissioningPackages && ( + + {context.commissioningPackages.map((commpckg) => ( + { + context?.setActivePackage(commpckg); + }} + /> + ))} + + )} + {menuItemsInitial.map((item, index) => ( + + ))} + + + + ); +} diff --git a/www/src/components/Equipment.tsx b/www/src/components/Equipment.tsx index aa17de7..c12cafd 100644 --- a/www/src/components/Equipment.tsx +++ b/www/src/components/Equipment.tsx @@ -2,8 +2,9 @@ import { EquipmentProps, NozzleProps } from "../types/diagram/Diagram.ts"; import { useContext } from "react"; import { ClickableComponentProps, - handleClick, - getHighlightColor, + isBoundary, + isInternal, + isInPackage, } from "../types/ClickableComponentProps.ts"; import StyledSvgElement from "./StyledSvgElement.tsx"; import PandidContext from "../context/PandidContext.ts"; @@ -11,42 +12,42 @@ import useSerializeNodeSvg from "../hooks/useSerializeNodeSvg.tsx"; import SvgElement from "./SvgElement.tsx"; import { useCommissioningPackageContext } from "../hooks/useCommissioningPackageContext.tsx"; -interface EquipmentClickableProps { - equipment: EquipmentProps; - clickableComponent: ClickableComponentProps; -} +interface EquipmentClickableProps + extends EquipmentProps, + ClickableComponentProps {} -export default function Equipment({ - equipment, - clickableComponent, -}: EquipmentClickableProps) { - const packageContext = useCommissioningPackageContext(); +export default function Equipment(props: EquipmentClickableProps) { + const context = useCommissioningPackageContext(); const height = useContext(PandidContext).height; const svg = useSerializeNodeSvg( - equipment.ComponentName, - equipment.GenericAttributes[0], + props.ComponentName, + props.GenericAttributes[0], ); - const color = getHighlightColor(equipment.ID, packageContext); - - const nozzles: NozzleProps[] = equipment.Nozzle; - + const nozzles: NozzleProps[] = props.Nozzle; + const commissioningPackage = context.commissioningPackages.find((pkg) => + pkg.nodeIds.find((node) => node === props.ID), + ); + const color = commissioningPackage?.color; + console.log(props.onClick); + console.log(context.activePackage.nodeIds); + console.log(isInPackage(props.ID, context)); return ( - + {svg && ( <> - {color && ( + {color && isInPackage(props.ID, context) && ( )} diff --git a/www/src/components/Pandid.tsx b/www/src/components/Pandid.tsx index 06c4979..0d9762e 100644 --- a/www/src/components/Pandid.tsx +++ b/www/src/components/Pandid.tsx @@ -1,29 +1,26 @@ import { XMLParser } from "fast-xml-parser"; import Equipment from "./Equipment.tsx"; -import { useCallback, useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import ProcessInstrumentationFunction from "./ProcessInstrumentationFunction.tsx"; import { EquipmentProps, XMLProps } from "../types/diagram/Diagram.ts"; -import { PipingComponentProps, PipingNetworkSegmentProps, PipingNetworkSystemProps } from "../types/diagram/Piping.ts"; +import { PipingNetworkSystemProps } from "../types/diagram/Piping.ts"; import { ProcessInstrumentationFunctionProps } from "../types/diagram/ProcessInstrumentationFunction.ts"; -import { ensureArray } from "../utils/HelperFunctions.ts"; import { ActuatingSystemProps } from "../types/diagram/ActuatingSystem.ts"; import ActuatingSystem from "./ActuatingSystem.tsx"; import PandidContext from "../context/PandidContext.ts"; import PipeSystem from "./piping/PipeSystem.tsx"; -import PipeSegment from "./piping/PipeSegment.tsx"; -import React from "react"; -import { - BoundaryActions, - BoundaryParts, - makeSparqlAndUpdateStore, - getNodeIdsInCommissioningPackage, - cleanTripleStore, -} from "../utils/Triplestore.ts"; +import { cleanTripleStore } from "../utils/Triplestore.ts"; +import selectHandleFunction from "../utils/HandlerFunctionHelper.tsx"; +import Tools from "../enums/Tools.ts"; import { useCommissioningPackageContext } from "../hooks/useCommissioningPackageContext.tsx"; -import PipingComponent from "./piping/PipingComponent.tsx"; -import { CommissioningPackageProps } from "../context/CommissioningPackageContext.tsx"; -export default function Pandid() { +interface PandidProps { + activeTool: Tools; +} + +export default function Pandid({ activeTool }: PandidProps) { + const context = useCommissioningPackageContext(); + const [xmlData, setXmlData] = useState(null); const [equipments, setEquipments] = useState([]); const [pipingNetworkSystems, setPipingNetworkSystems] = useState< @@ -34,14 +31,22 @@ export default function Pandid() { const [actuatingSystem, setActuatingSystem] = useState< ActuatingSystemProps[] >([]); - const context = useCommissioningPackageContext(); + const parser = new XMLParser({ ignoreAttributes: false, attributeNamePrefix: "", }); + // Step 1: Clean triplestore on mount + useEffect(() => { + (async () => { + await cleanTripleStore(); + context.setCommissioningPackages([]); + })(); + console.log("Triplestore and state cleared"); + }, []); - // Read XML file from disk, parse as XMLProps (TypeScript interface) + // Step 2: Read XML file from disk, parse as XMLProps useEffect(() => { fetch("/DISC_EXAMPLE-02-02.xml") .then((response) => response.text()) @@ -49,96 +54,55 @@ export default function Pandid() { const result = parser.parse(data) as XMLProps; setXmlData(result); }); + console.log("XML fetched and parsed"); }, []); - //Clean triplestore on render + // Step 3: When XML data is loaded, set all component states useEffect(() => { - (async () => { - await cleanTripleStore(); - context.setCommissioningPackages([]); - context.setboundaryIds([]); - context.setInternalIds([]); - })() - }, []) + if (!xmlData) return; + setEquipments(xmlData.PlantModel.Equipment); + setPipingNetworkSystems(xmlData.PlantModel.PipingNetworkSystem); + setProcessInstrumentationFunction( + xmlData.PlantModel.ProcessInstrumentationFunction, + ); + setActuatingSystem(xmlData.PlantModel.ActuatingSystem); + console.log("Component states set"); + }, [xmlData]); + /* //TODO causes many rerenders useEffect(() => { (async () => { const nodeIds = await getNodeIdsInCommissioningPackage(); //TODO: This logic needs to be improved when introducing multiple commissioning packages. - // Default package name "asset:Package1" used. + // Default package name "asset:Package1" used. if (context.commissioningPackages.length < 1) { const newPackage: CommissioningPackageProps = { id: "asset:Package1", - idsInPackage: nodeIds - } + idsInPackage: nodeIds, + }; context.setCommissioningPackages([newPackage]); context.setActivePackageId(newPackage.id); } else { - context.setCommissioningPackages(getUpdatedCommissioningPackages(nodeIds)) + context.setCommissioningPackages( + getUpdatedCommissioningPackages(nodeIds), + ); } })(); - }, [context]); + }, [context]);*/ - // When XML data is loaded, set all component states - useEffect(() => { - if (!xmlData) return; - setEquipments(xmlData.PlantModel.Equipment); - setPipingNetworkSystems(xmlData.PlantModel.PipingNetworkSystem); - setProcessInstrumentationFunction( - xmlData.PlantModel.ProcessInstrumentationFunction, - ); - setActuatingSystem(xmlData.PlantModel.ActuatingSystem); - }, [xmlData]); - - const handleAddInternal = useCallback( - async (id: string, action: BoundaryActions) => { - context.setInternalIds((prev) => - prev.includes(id) ? prev.filter((item) => item !== id) : [...prev, id]); - await makeSparqlAndUpdateStore(id, action, BoundaryParts.InsideBoundary); - - if (context.boundaryIds.includes(id)) { - context.setboundaryIds(prev => prev.filter((item) => item !== id)); - await makeSparqlAndUpdateStore(id, BoundaryActions.Delete, BoundaryParts.Boundary); - } - }, - [context], - ); - - const handleAddBoundary = useCallback( - async (id: string, action: BoundaryActions) => { - context.setboundaryIds((prev) => - prev.includes(id) ? prev.filter((item) => item !== id) : [...prev, id], - ); - - if(context.internalIds.includes(id)) { - context.setInternalIds(prev => prev.filter((item) => item !== id)); - await makeSparqlAndUpdateStore(id, BoundaryActions.Delete, BoundaryParts.InsideBoundary); - } - - await makeSparqlAndUpdateStore(id, action, BoundaryParts.Boundary); - }, - [context], - ); - - useEffect(() => { - console.log(`internals: ${context.internalIds}`); - console.log(`boundaries: ${context.boundaryIds}`); - }, [context.boundaryIds, context.internalIds]) - - - const getUpdatedCommissioningPackages = (ids: string[]) => { - return context.commissioningPackages.map(pkg => { + /* const getUpdatedCommissioningPackages = (ids: string[]) => { + return context.commissioningPackages.map((pkg) => { if (pkg.id === context.activePackageId) { const updatedPackage: CommissioningPackageProps = { id: "asset:Package1", - idsInPackage: ids + idsInPackage: ids, }; return updatedPackage; } else { return pkg; - }; - }) - }; + } + }); + };*/ return ( <> @@ -155,38 +119,31 @@ export default function Pandid() { equipments.map((equipment: EquipmentProps, index: number) => ( + selectHandleFunction(equipment.ID, context, activeTool) + } /> ))} {pipingNetworkSystems && - pipingNetworkSystems.map((pipingNetworkSystem: PipingNetworkSystemProps, index: number) => ( - - - - {ensureArray(pipingNetworkSystem.PipingNetworkSegment).map((pipingNetworkSegment: PipingNetworkSegmentProps, segmentIndex: number) => ( - - - - {pipingNetworkSegment.PipingComponent && - ensureArray(pipingNetworkSegment.PipingComponent).map((pipingComponent: PipingComponentProps, componentIndex: number) => ( - - ))} - - ))} - - )) - } + pipingNetworkSystems.map( + ( + pipingNetworkSystem: PipingNetworkSystemProps, + index: number, + ) => ( + + selectHandleFunction( + pipingNetworkSystem.ID, + context, + activeTool, + ) + } + /> + ), + )} {processInstrumentationFunction && processInstrumentationFunction.map( ( diff --git a/www/src/components/Sidebar.tsx b/www/src/components/Sidebar.tsx deleted file mode 100644 index 061753b..0000000 --- a/www/src/components/Sidebar.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { SideBar } from "@equinor/eds-core-react"; -import { add, brush, texture } from "@equinor/eds-icons"; -import styled from "styled-components"; - -const StyledSideBar = styled.div` - height: 100%; -`; - -export default function Sidebar() { - return ( - - - - - - - - - - ); -} diff --git a/www/src/components/piping/PipeSegment.tsx b/www/src/components/piping/PipeSegment.tsx index 48e069a..5a04553 100644 --- a/www/src/components/piping/PipeSegment.tsx +++ b/www/src/components/piping/PipeSegment.tsx @@ -1,5 +1,6 @@ import CenterLine from "../CenterLine.tsx"; import { + PipingComponentProps, PipingNetworkSegmentProps, } from "../../types/diagram/Piping.ts"; import { CenterLineProps } from "../../types/diagram/Common.ts"; @@ -8,17 +9,33 @@ import PandidContext from "../../context/PandidContext.ts"; import SvgElement from "../SvgElement.tsx"; import StyledPath from "../StyledPath.tsx"; import constructPath from "../../utils/Path.ts"; +import { ensureArray } from "../../utils/HelperFunctions.ts"; +import PipingComponent from "./PipingComponent.tsx"; +import { ClickableComponentProps } from "../../types/ClickableComponentProps.ts"; -export default function PipeSegment(props: PipingNetworkSegmentProps) { +interface PipeSegmentProps + extends PipingNetworkSegmentProps, + ClickableComponentProps {} + +export default function PipeSegment(props: PipeSegmentProps) { const height = useContext(PandidContext).height; const centerlines: CenterLineProps[] = Array.isArray(props.CenterLine) ? props.CenterLine : [props.CenterLine]; - return ( <> + {props.PipingComponent && + ensureArray(props.PipingComponent).map( + (pipingComponent: PipingComponentProps, componentIndex: number) => ( + + ), + )} {props.PipeSlopeSymbol && ( )} + {ensureArray(props.PipingNetworkSegment).map( + (pipingNetworkSegment: PipingNetworkSegmentProps, index: number) => ( + + ), + )} ); } diff --git a/www/src/components/piping/PipingComponent.tsx b/www/src/components/piping/PipingComponent.tsx index 4975328..39205e1 100644 --- a/www/src/components/piping/PipingComponent.tsx +++ b/www/src/components/piping/PipingComponent.tsx @@ -4,51 +4,45 @@ import PandidContext from "../../context/PandidContext.ts"; import SvgElement from "../SvgElement.tsx"; import constructPath from "../../utils/Path.ts"; import StyledPath from "../StyledPath.tsx"; -import { ClickableComponentProps, getHighlightColor, handleClick } from "../../types/ClickableComponentProps.ts"; +import { ClickableComponentProps } from "../../types/ClickableComponentProps.ts"; import useSerializeNodeSvg from "../../hooks/useSerializeNodeSvg.tsx"; import StyledSvgElement from "../StyledSvgElement.tsx"; import { useCommissioningPackageContext } from "../../hooks/useCommissioningPackageContext.tsx"; -interface PipingComponentClickableProps { - pipingComponent: PipingComponentProps; - clickableComponent: ClickableComponentProps; -} +interface PipingComponentClickableProps + extends PipingComponentProps, + ClickableComponentProps {} + +export default function PipingComponent(props: PipingComponentClickableProps) { + const height = useContext(PandidContext).height; + const packageContext = useCommissioningPackageContext(); -export default function PipingComponent({ - pipingComponent, - clickableComponent -}: PipingComponentClickableProps) { - const context = useContext(PandidContext); - const packageContext = useCommissioningPackageContext() - const color = getHighlightColor(pipingComponent.ID, packageContext) - const height = context.height; - const componentName = pipingComponent.ComponentName; - const label = pipingComponent.Label; - const svg = pipingComponent.ComponentName != null ? useSerializeNodeSvg( - pipingComponent.ComponentName, - pipingComponent.GenericAttributes, - ) : null; + const color = packageContext.activePackage.color; + const componentName = props.ComponentName; + const label = props.Label; + const svg = + props.ComponentName != null + ? useSerializeNodeSvg(props.ComponentName, props.GenericAttributes) + : null; return ( - + props.onClick}> {componentName && svg && ( <> - {color && + {color && ( - } + )} )} diff --git a/www/src/context/BoundarySelectionContext.tsx b/www/src/context/BoundarySelectionContext.tsx new file mode 100644 index 0000000..2ebdc3b --- /dev/null +++ b/www/src/context/BoundarySelectionContext.tsx @@ -0,0 +1,34 @@ +import React, { useState, createContext } from "react"; + +export interface BoundarySelectionContextProps { + boundaryIds: string[]; + setboundaryIds: React.Dispatch>; + internalIds: string[]; + setInternalIds: React.Dispatch>; +} + +const BoundarySelectionContext = createContext< + BoundarySelectionContextProps | undefined +>(undefined); + +export const BoundarySelectionContextProvider: React.FC<{ + children: React.ReactNode; +}> = ({ children }) => { + const [boundaryIds, setboundaryIds] = useState([]); + const [internalIds, setInternalIds] = useState([]); + + const contextValue: BoundarySelectionContextProps = { + boundaryIds, + setboundaryIds, + internalIds, + setInternalIds, + }; + + return ( + + {children} + + ); +}; + +export default BoundarySelectionContext; diff --git a/www/src/context/CommissioningPackageContext.tsx b/www/src/context/CommissioningPackageContext.tsx index 817332f..acb4d6b 100644 --- a/www/src/context/CommissioningPackageContext.tsx +++ b/www/src/context/CommissioningPackageContext.tsx @@ -1,50 +1,49 @@ -import React, { useState, createContext } from "react"; - -export interface CommissioningPackageProps { - id: string; - idsInPackage: string[]; // Example fields, adjust to your data model -} +import React, { createContext, useEffect, useState } from "react"; +import CommissioningPackage from "../types/CommissioningPackage.ts"; export interface CommissioningPackageContextProps { - activePackageId: string; - setActivePackageId: React.Dispatch>; - commissioningPackages: CommissioningPackageProps[]; + activePackage: CommissioningPackage; + setActivePackage: React.Dispatch>; + commissioningPackages: CommissioningPackage[]; setCommissioningPackages: React.Dispatch< - React.SetStateAction + React.SetStateAction >; - boundaryIds: string[]; - setboundaryIds: React.Dispatch>; - internalIds: string[]; - setInternalIds: React.Dispatch>; } const CommissioningPackageContext = createContext< CommissioningPackageContextProps | undefined >(undefined); -export const CommissioningPackageProvider: React.FC<{ +export const CommissioningPackageContextProvider: React.FC<{ children: React.ReactNode; }> = ({ children }) => { + const [activePackage, setActivePackage] = useState({ + id: "asset:Package1", + name: "Initial Package", + color: `rgb(255,0,0)`, + boundaryIds: [], + internalIds: [], + nodeIds: [], + }); const [commissioningPackages, setCommissioningPackages] = useState< - CommissioningPackageProps[] + CommissioningPackage[] >([]); - const [boundaryIds, setboundaryIds] = useState([]); - const [activePackageId, setActivePackageId] = useState(""); - const [internalIds, setInternalIds] = useState([]); - const contextValue: CommissioningPackageContextProps = { - activePackageId, - setActivePackageId, - commissioningPackages, - setCommissioningPackages, - boundaryIds, - setboundaryIds, - internalIds, - setInternalIds - }; + useEffect(() => { + if (activePackage && commissioningPackages.length === 0) { + setCommissioningPackages([activePackage]); + } + }, [activePackage, commissioningPackages]); return ( - + {children} ); diff --git a/www/src/enums/Tools.ts b/www/src/enums/Tools.ts new file mode 100644 index 0000000..2f27933 --- /dev/null +++ b/www/src/enums/Tools.ts @@ -0,0 +1,7 @@ +enum Tools { + BOUNDARY, + INSIDEBOUNDARY, + NEWPACKAGE, +} + +export default Tools; diff --git a/www/src/hooks/useBoundarySelectionContext.tsx b/www/src/hooks/useBoundarySelectionContext.tsx new file mode 100644 index 0000000..e371c18 --- /dev/null +++ b/www/src/hooks/useBoundarySelectionContext.tsx @@ -0,0 +1,12 @@ +import { useContext } from "react"; +import BoundarySelectionContext from "../context/BoundarySelectionContext.tsx"; + +export const useBoundarySelectionContext = () => { + const context = useContext(BoundarySelectionContext); + if (!context) { + throw new Error( + "useBoundarySelectionContext must be used within a BoundarySelectionContextProvider", + ); + } + return context; +}; diff --git a/www/src/hooks/useCommissioningPackageContext.tsx b/www/src/hooks/useCommissioningPackageContext.tsx index 313a990..6de295a 100644 --- a/www/src/hooks/useCommissioningPackageContext.tsx +++ b/www/src/hooks/useCommissioningPackageContext.tsx @@ -5,7 +5,7 @@ export const useCommissioningPackageContext = () => { const context = useContext(CommissioningPackageContext); if (!context) { throw new Error( - "useCommissioningPackageContext must be used within a CommissioningPackageProvider", + "useCommissioningPackageContext must be used within a CommissioningPackageContextProvider", ); } return context; diff --git a/www/src/types/ClickableComponentProps.ts b/www/src/types/ClickableComponentProps.ts index ff60861..5a1340c 100644 --- a/www/src/types/ClickableComponentProps.ts +++ b/www/src/types/ClickableComponentProps.ts @@ -1,57 +1,27 @@ -import { BoundaryActions, assetIri } from "../utils/Triplestore.ts"; +import { assetIri } from "../utils/Triplestore.ts"; +import Tools from "../enums/Tools.ts"; import { CommissioningPackageContextProps } from "../context/CommissioningPackageContext.tsx"; export interface ClickableComponentProps { onClick: ( id: string, - action: BoundaryActions, + context: CommissioningPackageContextProps, + tool: Tools, ) => Promise; - onShiftClick: ( - id: string, - action: BoundaryActions - ) => Promise; -} - -const isBoundary = (id: string, context: CommissioningPackageContextProps) => context.boundaryIds.includes(id); -const isInternal = (id: string, context: CommissioningPackageContextProps) => context.internalIds.includes(id); -const isInPackage = (id: string, context: CommissioningPackageContextProps) => { - const activePackage = context.commissioningPackages.find(pkg => pkg.id === context.activePackageId); - return activePackage?.idsInPackage.includes(assetIri(id)) || false; } -export const getHighlightColor = (id: string, context: CommissioningPackageContextProps) => { - let color = "" - if (isInternal(id, context)) { - color = "green" - } - else if (isBoundary(id, context)) { - color = "red" - } - else if (isInPackage(id, context)) { - color = "yellow" - } - return color; -} - -export const handleClick = (component: ClickableComponentProps, context: CommissioningPackageContextProps, id: string) => - (event: React.MouseEvent) => { - event.preventDefault() - if (event.ctrlKey) { - event.preventDefault(); - if (isInternal(id, context)) { - component.onShiftClick(id, BoundaryActions.Delete); - } - else { - component.onShiftClick(id, BoundaryActions.Insert); - } - } - else { - if (isBoundary(id, context)) { - component.onClick(id, BoundaryActions.Delete); - } - else { - component.onClick(id, BoundaryActions.Insert); - } - } - } - +export const isBoundary = ( + id: string, + context: CommissioningPackageContextProps, +) => context.activePackage.boundaryIds.includes(id); +export const isInternal = ( + id: string, + context: CommissioningPackageContextProps, +) => context.activePackage.internalIds.includes(id); +export const isInPackage = ( + id: string, + context: CommissioningPackageContextProps, +) => + context.activePackage.nodeIds + ? context.activePackage.nodeIds.includes(assetIri(id)) + : false; diff --git a/www/src/types/CommissioningPackage.ts b/www/src/types/CommissioningPackage.ts new file mode 100644 index 0000000..9a7e852 --- /dev/null +++ b/www/src/types/CommissioningPackage.ts @@ -0,0 +1,8 @@ +export default interface CommissioningPackage { + id: string; + name: string; + color: string; + boundaryIds: string[]; + internalIds: string[]; + nodeIds: string[]; +} diff --git a/www/src/utils/HandlerFunctionHelper.tsx b/www/src/utils/HandlerFunctionHelper.tsx new file mode 100644 index 0000000..04aec1c --- /dev/null +++ b/www/src/utils/HandlerFunctionHelper.tsx @@ -0,0 +1,133 @@ +import { + BoundaryActions, + BoundaryParts, + getNodeIdsInCommissioningPackage, + makeSparqlAndUpdateStore, +} from "./Triplestore.ts"; +import Tools from "../enums/Tools.ts"; +import { CommissioningPackageContextProps } from "../context/CommissioningPackageContext.tsx"; + +export default async function selectHandleFunction( + id: string, + context: CommissioningPackageContextProps, + tool: Tools, +) { + console.log("handler selector fired"); + switch (tool) { + case Tools.BOUNDARY: + return await handleAddBoundary(id, context); + case Tools.INSIDEBOUNDARY: + return await handleAddInternal(id, context); + default: + return await handleAddBoundary(id, context); + } +} + +export async function handleAddInternal( + id: string, + context: CommissioningPackageContextProps, +) { + console.log("Internal handler fired"); + // If element is already inside + if (context.activePackage.internalIds.includes(id)) { + context.setActivePackage((prev) => ({ + ...prev, + internalIds: prev.internalIds.filter((item) => item !== id), + })); + await makeSparqlAndUpdateStore( + id, + BoundaryActions.Delete, + BoundaryParts.InsideBoundary, + ); + } else { + // If the clicked element is a boundary, remove it as a boundary + if (context.activePackage.boundaryIds.includes(id)) { + context.setActivePackage((prev) => ({ + ...prev, + boundaryIds: prev.boundaryIds.filter((item) => item !== id), + })); + await makeSparqlAndUpdateStore( + id, + BoundaryActions.Delete, + BoundaryParts.Boundary, + ); + } + // Then, add it as an internal element + context.setActivePackage((prev) => ({ + ...prev, + internalIds: prev.internalIds.concat(id), + })); + await makeSparqlAndUpdateStore( + id, + BoundaryActions.Insert, + BoundaryParts.InsideBoundary, + ); + } + + // Then, update the internal ids to include the new node + const nodeIds = await getNodeIdsInCommissioningPackage(); + context.setActivePackage((prev) => ({ ...prev, nodeIds: nodeIds })); + + // Lastly, update the commissioningPackages + context.setCommissioningPackages((prevPackages) => + prevPackages.map((pkg) => + pkg.id === context.activePackage.id + ? { ...pkg, ...context.activePackage } + : pkg, + ), + ); +} + +export async function handleAddBoundary( + id: string, + context: CommissioningPackageContextProps, +) { + console.log("Boundary handler fired"); + // If the element is already a boundary, remove it as boundary + if (context.activePackage.boundaryIds.includes(id)) { + context.setActivePackage((prev) => ({ + ...prev, + boundaryIds: prev.boundaryIds.filter((item) => item !== id), + })); + await makeSparqlAndUpdateStore( + id, + BoundaryActions.Delete, + BoundaryParts.Boundary, + ); + } else { + // If element is not already a boundary, add it as boundary. + // If it is internal, remove it as internal. + if (context.activePackage.internalIds.includes(id)) { + context.setActivePackage((prev) => ({ + ...prev, + internalIds: prev.internalIds.filter((item) => item !== id), + })); + await makeSparqlAndUpdateStore( + id, + BoundaryActions.Delete, + BoundaryParts.InsideBoundary, + ); + } + context.setActivePackage((prev) => ({ + ...prev, + boundaryIds: prev.boundaryIds.concat(id), + })); + await makeSparqlAndUpdateStore( + id, + BoundaryActions.Insert, + BoundaryParts.Boundary, + ); + } + // Then, update the internal ids to include the new node + const nodeIds = await getNodeIdsInCommissioningPackage(); + context.setActivePackage((prev) => ({ ...prev, internalIds: nodeIds })); + + // Lastly, update the commissioningPackages + context.setCommissioningPackages((prevPackages) => + prevPackages.map((pkg) => + pkg.id === context.activePackage.id + ? { ...pkg, ...context.activePackage } + : pkg, + ), + ); +} From f4dd4ea3d137c877d7084b0019c8c3f40f73d3f9 Mon Sep 17 00:00:00 2001 From: Nora Kristiansen <106915799+NoraKri@users.noreply.github.com> Date: Tue, 10 Dec 2024 13:36:05 +0100 Subject: [PATCH 04/13] working impl of multiple commissioning packages --- www/src/App.tsx | 2 +- www/src/components/CenterLine.tsx | 29 --- www/src/components/Editor.tsx | 15 -- www/src/components/EditorSidebar.tsx | 71 -------- www/src/components/Equipment.tsx | 67 ------- www/src/components/StyledSvgElement.tsx | 54 ------ .../{ => diagram}/ActuatingSystem.tsx | 5 +- www/src/components/diagram/CenterLine.tsx | 63 +++++++ www/src/components/diagram/Equipment.tsx | 71 ++++++++ .../components/{ => diagram}/NozzleLabel.tsx | 9 +- www/src/components/{ => diagram}/Pandid.tsx | 82 +-------- .../ProcessInstrumentationFunction.tsx | 9 +- .../components/{ => diagram}/StyledPath.tsx | 1 + .../StyledSvgElement.tsx} | 38 ++-- www/src/components/diagram/SvgElement.tsx | 75 ++++++++ .../{ => diagram}/piping/PipeSegment.tsx | 17 +- .../{ => diagram}/piping/PipeSystem.tsx | 32 ++-- .../diagram/piping/PipingComponent.tsx | 96 ++++++++++ www/src/components/editor/ColorPreview.tsx | 13 ++ .../CommissioningPackageCreationDialog.tsx | 123 +++++++++++++ www/src/components/editor/Editor.tsx | 37 ++++ www/src/components/editor/EditorSidebar.tsx | 78 ++++++++ www/src/components/editor/EditorTopBar.tsx | 15 ++ www/src/components/piping/PipingComponent.tsx | 61 ------- www/src/context/BoundarySelectionContext.tsx | 34 ---- .../context/CommissioningPackageContext.tsx | 3 +- www/src/context/ToolContext.tsx | 14 ++ www/src/hooks/useBoundarySelectionContext.tsx | 12 -- www/src/types/ClickableComponentProps.ts | 17 -- www/src/types/CommissioningPackage.ts | 4 +- www/src/types/HighlightColors.ts | 14 ++ www/src/types/OperationStatus.ts | 7 + www/src/utils/HandlerFunctionHelper.tsx | 58 +++--- www/src/utils/HelperFunctions.ts | 23 ++- www/src/utils/Triplestore.ts | 172 +++++++++++------- www_old/script.js | 1 + 36 files changed, 843 insertions(+), 579 deletions(-) delete mode 100644 www/src/components/CenterLine.tsx delete mode 100644 www/src/components/Editor.tsx delete mode 100644 www/src/components/EditorSidebar.tsx delete mode 100644 www/src/components/Equipment.tsx delete mode 100644 www/src/components/StyledSvgElement.tsx rename www/src/components/{ => diagram}/ActuatingSystem.tsx (72%) create mode 100644 www/src/components/diagram/CenterLine.tsx create mode 100644 www/src/components/diagram/Equipment.tsx rename www/src/components/{ => diagram}/NozzleLabel.tsx (73%) rename www/src/components/{ => diagram}/Pandid.tsx (55%) rename www/src/components/{ => diagram}/ProcessInstrumentationFunction.tsx (87%) rename www/src/components/{ => diagram}/StyledPath.tsx (94%) rename www/src/components/{SvgElement.tsx => diagram/StyledSvgElement.tsx} (53%) create mode 100644 www/src/components/diagram/SvgElement.tsx rename www/src/components/{ => diagram}/piping/PipeSegment.tsx (78%) rename www/src/components/{ => diagram}/piping/PipeSystem.tsx (60%) create mode 100644 www/src/components/diagram/piping/PipingComponent.tsx create mode 100644 www/src/components/editor/ColorPreview.tsx create mode 100644 www/src/components/editor/CommissioningPackageCreationDialog.tsx create mode 100644 www/src/components/editor/Editor.tsx create mode 100644 www/src/components/editor/EditorSidebar.tsx create mode 100644 www/src/components/editor/EditorTopBar.tsx delete mode 100644 www/src/components/piping/PipingComponent.tsx delete mode 100644 www/src/context/BoundarySelectionContext.tsx create mode 100644 www/src/context/ToolContext.tsx delete mode 100644 www/src/hooks/useBoundarySelectionContext.tsx create mode 100644 www/src/types/HighlightColors.ts create mode 100644 www/src/types/OperationStatus.ts diff --git a/www/src/App.tsx b/www/src/App.tsx index 9a7d107..814af6d 100644 --- a/www/src/App.tsx +++ b/www/src/App.tsx @@ -1,4 +1,4 @@ -import Editor from "./components/Editor.tsx"; +import Editor from "./components/editor/Editor.tsx"; import styled from "styled-components"; const Page = styled.div` diff --git a/www/src/components/CenterLine.tsx b/www/src/components/CenterLine.tsx deleted file mode 100644 index e50231d..0000000 --- a/www/src/components/CenterLine.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { CenterLineProps } from "../types/diagram/Common.ts"; -import constructPath from "../utils/Path.ts"; -import { useContext } from "react"; -import PandidContext from "../context/PandidContext.ts"; -import StyledPath from "./StyledPath.tsx"; - -interface CenterLineComponentProps { - centerLines: CenterLineProps[]; - isInformationFlow: boolean; -} - -export default function CenterLine(props: CenterLineComponentProps) { - const height = useContext(PandidContext).height; - return ( - <> - {props.centerLines.map((centerline: CenterLineProps, index: number) => - centerline !== undefined ? ( - - ) : ( - "" - ), - )} - - ); -} diff --git a/www/src/components/Editor.tsx b/www/src/components/Editor.tsx deleted file mode 100644 index f1ce3f2..0000000 --- a/www/src/components/Editor.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import Pandid from "./Pandid.tsx"; -import EditorSidebar from "./EditorSidebar.tsx"; -import { useState } from "react"; -import Tools from "../enums/Tools.ts"; -import { CommissioningPackageContextProvider } from "../context/CommissioningPackageContext.tsx"; - -export default function Editor() { - const [activeTool, setActiveTool] = useState(Tools.BOUNDARY); - return ( - - - - - ); -} diff --git a/www/src/components/EditorSidebar.tsx b/www/src/components/EditorSidebar.tsx deleted file mode 100644 index 1565e59..0000000 --- a/www/src/components/EditorSidebar.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import { SideBar, SidebarLinkProps } from "@equinor/eds-core-react"; -import { add, boundaries, category, texture } from "@equinor/eds-icons"; -import styled from "styled-components"; -import React from "react"; -import Tools from "../enums/Tools.ts"; -import { useCommissioningPackageContext } from "../hooks/useCommissioningPackageContext.tsx"; - -const StyledSideBar = styled.div` - height: 100%; -`; - -interface EditorSidebarProps { - activeTool: Tools; - setActiveTool: React.Dispatch>; -} - -export default function EditorSidebar({ - activeTool, - setActiveTool, -}: EditorSidebarProps) { - const context = useCommissioningPackageContext(); - - const menuItemsInitial: SidebarLinkProps[] = [ - { - label: "New commissioning package", - icon: add, - onClick: () => {}, - active: false, - }, - { - label: "Select boundaries", - icon: boundaries, - onClick: () => { - setActiveTool(Tools.BOUNDARY); - }, - active: activeTool === Tools.BOUNDARY, - }, - { - label: "Select inside of boundary", - icon: texture, - onClick: () => { - setActiveTool(Tools.INSIDEBOUNDARY); - }, - active: activeTool === Tools.INSIDEBOUNDARY, - }, - ]; - return ( - - - - {context?.commissioningPackages && ( - - {context.commissioningPackages.map((commpckg) => ( - { - context?.setActivePackage(commpckg); - }} - /> - ))} - - )} - {menuItemsInitial.map((item, index) => ( - - ))} - - - - ); -} diff --git a/www/src/components/Equipment.tsx b/www/src/components/Equipment.tsx deleted file mode 100644 index c12cafd..0000000 --- a/www/src/components/Equipment.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import { EquipmentProps, NozzleProps } from "../types/diagram/Diagram.ts"; -import { useContext } from "react"; -import { - ClickableComponentProps, - isBoundary, - isInternal, - isInPackage, -} from "../types/ClickableComponentProps.ts"; -import StyledSvgElement from "./StyledSvgElement.tsx"; -import PandidContext from "../context/PandidContext.ts"; -import useSerializeNodeSvg from "../hooks/useSerializeNodeSvg.tsx"; -import SvgElement from "./SvgElement.tsx"; -import { useCommissioningPackageContext } from "../hooks/useCommissioningPackageContext.tsx"; - -interface EquipmentClickableProps - extends EquipmentProps, - ClickableComponentProps {} - -export default function Equipment(props: EquipmentClickableProps) { - const context = useCommissioningPackageContext(); - const height = useContext(PandidContext).height; - const svg = useSerializeNodeSvg( - props.ComponentName, - props.GenericAttributes[0], - ); - const nozzles: NozzleProps[] = props.Nozzle; - const commissioningPackage = context.commissioningPackages.find((pkg) => - pkg.nodeIds.find((node) => node === props.ID), - ); - const color = commissioningPackage?.color; - console.log(props.onClick); - console.log(context.activePackage.nodeIds); - console.log(isInPackage(props.ID, context)); - return ( - - {svg && ( - <> - {color && isInPackage(props.ID, context) && ( - - )} - - - - )} - {nozzles && - nozzles.map((nozzle: NozzleProps, index: number) => ( - - ))} - - ); -} diff --git a/www/src/components/StyledSvgElement.tsx b/www/src/components/StyledSvgElement.tsx deleted file mode 100644 index e93a0dd..0000000 --- a/www/src/components/StyledSvgElement.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import { - PositionProps, -} from "../types/diagram/Common.ts"; -import calculateAngleAndRotation from "../utils/Transformation.ts"; -import { useContext } from "react"; -import PandidContext from "../context/PandidContext.ts"; -import styled from "styled-components" - -interface StyledSvgElementProps { - id: string; - position?: PositionProps; - svg: string; - color: string; -} - -const StyledG = styled.g` -path { - stroke: ${(props) => props.color}; - stroke-width: 5; - opacity: 0.5 ; -} -` - -export default function StyledSvgElement({ - id, - position, - svg, - color -}: StyledSvgElementProps) { - const height = useContext(PandidContext).height; - - return ( - <> - {svg && ( - - )} - - ); -} diff --git a/www/src/components/ActuatingSystem.tsx b/www/src/components/diagram/ActuatingSystem.tsx similarity index 72% rename from www/src/components/ActuatingSystem.tsx rename to www/src/components/diagram/ActuatingSystem.tsx index fefcdd6..4316ffe 100644 --- a/www/src/components/ActuatingSystem.tsx +++ b/www/src/components/diagram/ActuatingSystem.tsx @@ -1,10 +1,7 @@ -import { ActuatingSystemProps } from "../types/diagram/ActuatingSystem.ts"; -import { useContext } from "react"; -import PandidContext from "../context/PandidContext.ts"; +import { ActuatingSystemProps } from "../../types/diagram/ActuatingSystem.ts"; import SvgElement from "./SvgElement.tsx"; export default function ActuatingSystem(props: ActuatingSystemProps) { - const height = useContext(PandidContext).height; const actuatingSystemComponents = props.ActuatingSystemComponent.filter( (component) => component.ComponentName, ); diff --git a/www/src/components/diagram/CenterLine.tsx b/www/src/components/diagram/CenterLine.tsx new file mode 100644 index 0000000..da56589 --- /dev/null +++ b/www/src/components/diagram/CenterLine.tsx @@ -0,0 +1,63 @@ +import { CenterLineProps } from "../../types/diagram/Common.ts"; +import constructPath from "../../utils/Path.ts"; +import { useContext } from "react"; +import PandidContext from "../../context/PandidContext.ts"; +import StyledPath from "./StyledPath.tsx"; +import { useCommissioningPackageContext } from "../../hooks/useCommissioningPackageContext.tsx"; +import React from "react"; +import selectHandleFunction from "../../utils/HandlerFunctionHelper.tsx"; +import ToolContext from "../../context/ToolContext.tsx"; +import { iriFromSvgNode } from "../../utils/Triplestore.ts"; +import HighlightColors from "../../types/HighlightColors.ts"; + +interface CenterLineComponentProps { + centerLines: CenterLineProps[]; + id?: string; + isInformationFlow: boolean; +} + +export default function CenterLine(props: CenterLineComponentProps) { + const height = useContext(PandidContext).height; + const context = useCommissioningPackageContext(); + const tool = useContext(ToolContext).activeTool; + let color: HighlightColors | undefined; + let iri: string; + if (props.id) { + iri = iriFromSvgNode(props.id); + const commissioningPackage = context.commissioningPackages.find((pkg) => + pkg.nodeIds.find((node) => node === iri), + ); + color = commissioningPackage?.color; + } + + return ( + <> + {props.centerLines.map((centerline: CenterLineProps, index: number) => + centerline !== undefined ? ( + + {color && ( + + )} + + props.id ? selectHandleFunction(props.id, context, tool) : {} + } + key={index} + d={constructPath(centerline.Coordinate, height)} + $isDashed={props.isInformationFlow} + /> + + ) : ( + "" + ), + )} + + ); +} diff --git a/www/src/components/diagram/Equipment.tsx b/www/src/components/diagram/Equipment.tsx new file mode 100644 index 0000000..bf2c1f0 --- /dev/null +++ b/www/src/components/diagram/Equipment.tsx @@ -0,0 +1,71 @@ +import { EquipmentProps, NozzleProps } from "../../types/diagram/Diagram.ts"; +import { useContext } from "react"; +import StyledSvgElement from "./StyledSvgElement.tsx"; +import PandidContext from "../../context/PandidContext.ts"; +import useSerializeNodeSvg from "../../hooks/useSerializeNodeSvg.tsx"; +import SvgElement from "./SvgElement.tsx"; +import { useCommissioningPackageContext } from "../../hooks/useCommissioningPackageContext.tsx"; +import { iriFromSvgNode } from "../../utils/Triplestore.ts"; +import { isBoundary, isInternal } from "../../utils/HelperFunctions.ts"; +import ToolContext from "../../context/ToolContext.tsx"; +import selectHandleFunction from "../../utils/HandlerFunctionHelper.tsx"; + +export default function Equipment(props: EquipmentProps) { + const context = useCommissioningPackageContext(); + const height = useContext(PandidContext).height; + const tool = useContext(ToolContext).activeTool; + const svg = useSerializeNodeSvg( + props.ComponentName, + props.GenericAttributes[0], + ); + const nozzles: NozzleProps[] = props.Nozzle; + + const iri = iriFromSvgNode(props.ID); + const commissioningPackage = context.commissioningPackages.find( + (pkg) => pkg.nodeIds.includes(iri) || pkg.boundaryIds.includes(iri), + ); + const isInActivePackage = commissioningPackage + ? context.activePackage.id === commissioningPackage.id + : true; + const color = commissioningPackage?.color; + + return ( + <> + + isInActivePackage ? selectHandleFunction(props.ID, context, tool) : {} + } + > + {svg && ( + <> + {color && ( + + )} + + + + )} + {nozzles && + nozzles.map((nozzle: NozzleProps, index: number) => ( + + ))} + + + ); +} diff --git a/www/src/components/NozzleLabel.tsx b/www/src/components/diagram/NozzleLabel.tsx similarity index 73% rename from www/src/components/NozzleLabel.tsx rename to www/src/components/diagram/NozzleLabel.tsx index 90b159f..ca9e679 100644 --- a/www/src/components/NozzleLabel.tsx +++ b/www/src/components/diagram/NozzleLabel.tsx @@ -1,7 +1,10 @@ -import { GenericAttributesProps, LabelProps } from "../types/diagram/Common.ts"; -import { addTextToNozzle, serializeElement } from "../utils/SvgEdit.ts"; +import { + GenericAttributesProps, + LabelProps, +} from "../../types/diagram/Common.ts"; +import { addTextToNozzle, serializeElement } from "../../utils/SvgEdit.ts"; import { useContext } from "react"; -import PandidContext from "../context/PandidContext.ts"; +import PandidContext from "../../context/PandidContext.ts"; interface NozzleLabelProps { label: LabelProps; diff --git a/www/src/components/Pandid.tsx b/www/src/components/diagram/Pandid.tsx similarity index 55% rename from www/src/components/Pandid.tsx rename to www/src/components/diagram/Pandid.tsx index 0d9762e..c4e9082 100644 --- a/www/src/components/Pandid.tsx +++ b/www/src/components/diagram/Pandid.tsx @@ -2,23 +2,17 @@ import { XMLParser } from "fast-xml-parser"; import Equipment from "./Equipment.tsx"; import { useEffect, useState } from "react"; import ProcessInstrumentationFunction from "./ProcessInstrumentationFunction.tsx"; -import { EquipmentProps, XMLProps } from "../types/diagram/Diagram.ts"; -import { PipingNetworkSystemProps } from "../types/diagram/Piping.ts"; -import { ProcessInstrumentationFunctionProps } from "../types/diagram/ProcessInstrumentationFunction.ts"; -import { ActuatingSystemProps } from "../types/diagram/ActuatingSystem.ts"; +import { EquipmentProps, XMLProps } from "../../types/diagram/Diagram.ts"; +import { PipingNetworkSystemProps } from "../../types/diagram/Piping.ts"; +import { ProcessInstrumentationFunctionProps } from "../../types/diagram/ProcessInstrumentationFunction.ts"; +import { ActuatingSystemProps } from "../../types/diagram/ActuatingSystem.ts"; import ActuatingSystem from "./ActuatingSystem.tsx"; -import PandidContext from "../context/PandidContext.ts"; +import PandidContext from "../../context/PandidContext.ts"; import PipeSystem from "./piping/PipeSystem.tsx"; -import { cleanTripleStore } from "../utils/Triplestore.ts"; -import selectHandleFunction from "../utils/HandlerFunctionHelper.tsx"; -import Tools from "../enums/Tools.ts"; -import { useCommissioningPackageContext } from "../hooks/useCommissioningPackageContext.tsx"; +import { cleanTripleStore } from "../../utils/Triplestore.ts"; +import { useCommissioningPackageContext } from "../../hooks/useCommissioningPackageContext.tsx"; -interface PandidProps { - activeTool: Tools; -} - -export default function Pandid({ activeTool }: PandidProps) { +export default function Pandid() { const context = useCommissioningPackageContext(); const [xmlData, setXmlData] = useState(null); @@ -43,7 +37,6 @@ export default function Pandid({ activeTool }: PandidProps) { await cleanTripleStore(); context.setCommissioningPackages([]); })(); - console.log("Triplestore and state cleared"); }, []); // Step 2: Read XML file from disk, parse as XMLProps @@ -54,7 +47,6 @@ export default function Pandid({ activeTool }: PandidProps) { const result = parser.parse(data) as XMLProps; setXmlData(result); }); - console.log("XML fetched and parsed"); }, []); // Step 3: When XML data is loaded, set all component states @@ -66,44 +58,8 @@ export default function Pandid({ activeTool }: PandidProps) { xmlData.PlantModel.ProcessInstrumentationFunction, ); setActuatingSystem(xmlData.PlantModel.ActuatingSystem); - console.log("Component states set"); }, [xmlData]); - /* //TODO causes many rerenders - useEffect(() => { - (async () => { - const nodeIds = await getNodeIdsInCommissioningPackage(); - //TODO: This logic needs to be improved when introducing multiple commissioning packages. - // Default package name "asset:Package1" used. - if (context.commissioningPackages.length < 1) { - const newPackage: CommissioningPackageProps = { - id: "asset:Package1", - idsInPackage: nodeIds, - }; - context.setCommissioningPackages([newPackage]); - context.setActivePackageId(newPackage.id); - } else { - context.setCommissioningPackages( - getUpdatedCommissioningPackages(nodeIds), - ); - } - })(); - }, [context]);*/ - - /* const getUpdatedCommissioningPackages = (ids: string[]) => { - return context.commissioningPackages.map((pkg) => { - if (pkg.id === context.activePackageId) { - const updatedPackage: CommissioningPackageProps = { - id: "asset:Package1", - idsInPackage: ids, - }; - return updatedPackage; - } else { - return pkg; - } - }); - };*/ - return ( <> {xmlData && ( @@ -117,32 +73,14 @@ export default function Pandid({ activeTool }: PandidProps) { > {equipments && equipments.map((equipment: EquipmentProps, index: number) => ( - - selectHandleFunction(equipment.ID, context, activeTool) - } - /> + ))} {pipingNetworkSystems && pipingNetworkSystems.map( ( pipingNetworkSystem: PipingNetworkSystemProps, index: number, - ) => ( - - selectHandleFunction( - pipingNetworkSystem.ID, - context, - activeTool, - ) - } - /> - ), + ) => , )} {processInstrumentationFunction && processInstrumentationFunction.map( diff --git a/www/src/components/ProcessInstrumentationFunction.tsx b/www/src/components/diagram/ProcessInstrumentationFunction.tsx similarity index 87% rename from www/src/components/ProcessInstrumentationFunction.tsx rename to www/src/components/diagram/ProcessInstrumentationFunction.tsx index 4a5a101..477eff5 100644 --- a/www/src/components/ProcessInstrumentationFunction.tsx +++ b/www/src/components/diagram/ProcessInstrumentationFunction.tsx @@ -2,11 +2,11 @@ import CenterLine from "./CenterLine.tsx"; import { InformationFlowProps, ProcessInstrumentationFunctionProps, -} from "../types/diagram/ProcessInstrumentationFunction.ts"; +} from "../../types/diagram/ProcessInstrumentationFunction.ts"; import { useContext } from "react"; -import PandidContext from "../context/PandidContext.ts"; -import useSerializeSvgWithoutEdits from "../hooks/useSerializeSvgWithoutEdits.tsx"; -import { GenericAttributesProps } from "../types/diagram/Common.ts"; +import PandidContext from "../../context/PandidContext.ts"; +import useSerializeSvgWithoutEdits from "../../hooks/useSerializeSvgWithoutEdits.tsx"; +import { GenericAttributesProps } from "../../types/diagram/Common.ts"; import SvgElement from "./SvgElement.tsx"; export default function ProcessInstrumentationFunction( @@ -55,7 +55,6 @@ export default function ProcessInstrumentationFunction( )} {props.SignalOffPageConnector && genericAttributes && ( ` + cursor: pointer; stroke: #000000; stroke-width: 0.25; fill: none; diff --git a/www/src/components/SvgElement.tsx b/www/src/components/diagram/StyledSvgElement.tsx similarity index 53% rename from www/src/components/SvgElement.tsx rename to www/src/components/diagram/StyledSvgElement.tsx index 3685bb9..a27a6ee 100644 --- a/www/src/components/SvgElement.tsx +++ b/www/src/components/diagram/StyledSvgElement.tsx @@ -1,32 +1,38 @@ -import { - GenericAttributesProps, - PositionProps, -} from "../types/diagram/Common.ts"; -import calculateAngleAndRotation from "../utils/Transformation.ts"; -import useSerializeNodeSvg from "../hooks/useSerializeNodeSvg.tsx"; +import { PositionProps } from "../../types/diagram/Common.ts"; +import calculateAngleAndRotation from "../../utils/Transformation.ts"; import { useContext } from "react"; -import PandidContext from "../context/PandidContext.ts"; +import PandidContext from "../../context/PandidContext.ts"; +import styled from "styled-components"; -interface SvgElementProps { +interface StyledSvgElementProps { id: string; - componentName: string; position?: PositionProps; - text?: GenericAttributesProps; + svg: string; + color: string; } -export default function SvgElement({ +const StyledG = styled.g` + path { + stroke: ${(props) => props.color}; + stroke-width: 5; + opacity: 1; + } +`; + +export default function StyledSvgElement({ id, - componentName, position, - text, -}: SvgElementProps) { + svg, + color, +}: StyledSvgElementProps) { const height = useContext(PandidContext).height; - const svg = useSerializeNodeSvg(componentName, text); + return ( <> {svg && ( - + pkg.nodeIds.find((node) => node === iri), + ); + const isInActivePackage = commissioningPackage + ? context.activePackage.id === commissioningPackage.id + : true; + const color = commissioningPackage?.color; + return ( + <> + {svg && ( + <> + {color && ( + + )} + + isInActivePackage ? selectHandleFunction(iri, context, tool) : {} + } + transform={ + position + ? calculateAngleAndRotation( + position.Reference.X, + position.Reference.Y, + position.Location.X, + height - position.Location.Y, + ) + : "" + } + className={`.node ${isBoundary(iri, context) ? "boundary" : ""} ${isInternal(iri, context) ? "internal" : ""}`} + dangerouslySetInnerHTML={{ __html: svg }} + /> + + )} + + ); +} diff --git a/www/src/components/piping/PipeSegment.tsx b/www/src/components/diagram/piping/PipeSegment.tsx similarity index 78% rename from www/src/components/piping/PipeSegment.tsx rename to www/src/components/diagram/piping/PipeSegment.tsx index 5a04553..aa22094 100644 --- a/www/src/components/piping/PipeSegment.tsx +++ b/www/src/components/diagram/piping/PipeSegment.tsx @@ -2,16 +2,17 @@ import CenterLine from "../CenterLine.tsx"; import { PipingComponentProps, PipingNetworkSegmentProps, -} from "../../types/diagram/Piping.ts"; -import { CenterLineProps } from "../../types/diagram/Common.ts"; +} from "../../../types/diagram/Piping.ts"; +import { CenterLineProps } from "../../../types/diagram/Common.ts"; import { useContext } from "react"; -import PandidContext from "../../context/PandidContext.ts"; +import PandidContext from "../../../context/PandidContext.ts"; import SvgElement from "../SvgElement.tsx"; import StyledPath from "../StyledPath.tsx"; -import constructPath from "../../utils/Path.ts"; -import { ensureArray } from "../../utils/HelperFunctions.ts"; +import constructPath from "../../../utils/Path.ts"; +import { ensureArray } from "../../../utils/HelperFunctions.ts"; import PipingComponent from "./PipingComponent.tsx"; -import { ClickableComponentProps } from "../../types/ClickableComponentProps.ts"; +import { ClickableComponentProps } from "../../../types/ClickableComponentProps.ts"; +import { iriFromPiping } from "../../../utils/Triplestore.ts"; interface PipeSegmentProps extends PipingNetworkSegmentProps, @@ -23,9 +24,11 @@ export default function PipeSegment(props: PipeSegmentProps) { ? props.CenterLine : [props.CenterLine]; + const id = iriFromPiping(props).split("#")[1]; + return ( <> - + {props.PipingComponent && ensureArray(props.PipingComponent).map( (pipingComponent: PipingComponentProps, componentIndex: number) => ( diff --git a/www/src/components/piping/PipeSystem.tsx b/www/src/components/diagram/piping/PipeSystem.tsx similarity index 60% rename from www/src/components/piping/PipeSystem.tsx rename to www/src/components/diagram/piping/PipeSystem.tsx index fd05b41..89e0e07 100644 --- a/www/src/components/piping/PipeSystem.tsx +++ b/www/src/components/diagram/piping/PipeSystem.tsx @@ -1,17 +1,20 @@ import { PipingNetworkSegmentProps, PipingNetworkSystemProps, -} from "../../types/diagram/Piping.ts"; +} from "../../../types/diagram/Piping.ts"; import { useContext } from "react"; -import PandidContext from "../../context/PandidContext.ts"; +import PandidContext from "../../../context/PandidContext.ts"; import { GenericAttributesProps, PositionProps, -} from "../../types/diagram/Common.ts"; -import useSerializePipeSvg from "../../hooks/useSerializePipeSvg.tsx"; -import { ensureArray } from "../../utils/HelperFunctions.ts"; +} from "../../../types/diagram/Common.ts"; +import useSerializePipeSvg from "../../../hooks/useSerializePipeSvg.tsx"; +import { ensureArray } from "../../../utils/HelperFunctions.ts"; import PipeSegment from "./PipeSegment.tsx"; -import { ClickableComponentProps } from "../../types/ClickableComponentProps.ts"; +import { iriFromSvgNode } from "../../../utils/Triplestore.ts"; +import selectHandleFunction from "../../../utils/HandlerFunctionHelper.tsx"; +import ToolContext from "../../../context/ToolContext.tsx"; +import { useCommissioningPackageContext } from "../../../hooks/useCommissioningPackageContext.tsx"; interface PipeSystemSVGProps { id: string; @@ -48,18 +51,17 @@ function PipeSystemSVG({ ); } -interface PipeSystemProps - extends PipingNetworkSystemProps, - ClickableComponentProps {} - -export default function PipeSystem(props: PipeSystemProps) { +export default function PipeSystem(props: PipingNetworkSystemProps) { const height = useContext(PandidContext).height; + const context = useCommissioningPackageContext(); + const tool = useContext(ToolContext).activeTool; + const iri = iriFromSvgNode(props.ID); return ( - <> + {props.Label && ( ( selectHandleFunction(props.ID, context, tool)} {...pipingNetworkSegment} /> ), )} - + ); } diff --git a/www/src/components/diagram/piping/PipingComponent.tsx b/www/src/components/diagram/piping/PipingComponent.tsx new file mode 100644 index 0000000..fe7848a --- /dev/null +++ b/www/src/components/diagram/piping/PipingComponent.tsx @@ -0,0 +1,96 @@ +import { PipingComponentProps } from "../../../types/diagram/Piping.ts"; +import { useContext } from "react"; +import PandidContext from "../../../context/PandidContext.ts"; +import SvgElement from "../SvgElement.tsx"; +import constructPath from "../../../utils/Path.ts"; +import StyledPath from "../StyledPath.tsx"; +import { ClickableComponentProps } from "../../../types/ClickableComponentProps.ts"; +import useSerializeNodeSvg from "../../../hooks/useSerializeNodeSvg.tsx"; +import StyledSvgElement from "../StyledSvgElement.tsx"; +import { useCommissioningPackageContext } from "../../../hooks/useCommissioningPackageContext.tsx"; +import { iriFromSvgNode } from "../../../utils/Triplestore.ts"; +import { + GenericAttributesProps, + PositionProps, +} from "../../../types/diagram/Common.ts"; +import HighlightColors from "../../../types/HighlightColors.ts"; + +interface PipingComponentClickableProps + extends PipingComponentProps, + ClickableComponentProps {} + +interface PipingComponentSVGProps { + id: string; + componentName: string; + genericAttributes: GenericAttributesProps; + position?: PositionProps; + color: HighlightColors | undefined; +} + +function PipingComponentSVG({ + id, + componentName, + genericAttributes, + position, + color, +}: PipingComponentSVGProps) { + const svg = useSerializeNodeSvg(componentName, genericAttributes); + + return ( + <> + {color && ( + + )} + + + + ); +} + +export default function PipingComponent(props: PipingComponentClickableProps) { + const height = useContext(PandidContext).height; + const context = useCommissioningPackageContext(); + + const componentName = props.ComponentName; + const label = props.Label; + + const iri = iriFromSvgNode(props.ID); + const commissioningPackage = context.commissioningPackages.find((pkg) => + pkg.nodeIds.find((node) => node === iri), + ); + const color = commissioningPackage?.color; + + return ( + props.onClick}> + {componentName && ( + + )} + {label && ( + <> + {label.PolyLine && ( + + )} + + )} + + ); +} diff --git a/www/src/components/editor/ColorPreview.tsx b/www/src/components/editor/ColorPreview.tsx new file mode 100644 index 0000000..c0ac78c --- /dev/null +++ b/www/src/components/editor/ColorPreview.tsx @@ -0,0 +1,13 @@ +import styled from "styled-components"; +import HighlightColors from "../../types/HighlightColors.ts"; + +const ColorPreview = styled.div<{ color: HighlightColors }>` + width: 1.5rem; + height: 1.5rem; + margin-left: 0.5rem; + border: 1px solid #ccc; + border-radius: 50%; + background-color: ${({ color }) => color}; +`; + +export default ColorPreview; diff --git a/www/src/components/editor/CommissioningPackageCreationDialog.tsx b/www/src/components/editor/CommissioningPackageCreationDialog.tsx new file mode 100644 index 0000000..66b1ce3 --- /dev/null +++ b/www/src/components/editor/CommissioningPackageCreationDialog.tsx @@ -0,0 +1,123 @@ +import { + Button, + Dialog, + Input, + Label, + NativeSelect, +} from "@equinor/eds-core-react"; +import HighlightColors from "../../types/HighlightColors.ts"; +import styled from "styled-components"; +import React, { useEffect, useState } from "react"; +import CommissioningPackage from "../../types/CommissioningPackage.ts"; +import { useCommissioningPackageContext } from "../../hooks/useCommissioningPackageContext.tsx"; +import ColorPreview from "./ColorPreview.tsx"; + +const ColorSelectionContainer = styled.div` + display: flex; + flex-direction: row; + align-items: center; + align-content: space-between; +`; + +interface CommissioningPackageCreationDialogProps { + open: boolean; + setOpen: React.Dispatch>; +} + +export default function CommissioningPackageCreationDialog( + props: CommissioningPackageCreationDialogProps, +) { + const context = useCommissioningPackageContext(); + const [commissioningPackage, setCommissioningPackage] = useState< + CommissioningPackage | undefined + >(); + const [id, setId] = useState(""); + const [name, setName] = useState(""); + const [selectedColor, setSelectedColor] = useState< + HighlightColors | undefined + >(); + + function handleCreate() { + setCommissioningPackage({ + id: "asset:" + id, + name: name, + color: selectedColor!, + boundaryIds: [], + internalIds: [], + nodeIds: [], + }); + props.setOpen(false); + } + + useEffect(() => { + if (!commissioningPackage) return; + context.setCommissioningPackages((prev) => [...prev, commissioningPackage]); + context.setActivePackage(commissioningPackage); + }, [commissioningPackage]); + + const handleChange = (event: React.ChangeEvent) => { + setSelectedColor( + HighlightColors[event.target.value as keyof typeof HighlightColors], + ); + }; + function handleCancel() { + setSelectedColor(undefined); + setCommissioningPackage(undefined); + props.setOpen(false); + } + + return ( + + New Commissioning Package + + + + + + + + ); +} diff --git a/www/src/components/editor/Editor.tsx b/www/src/components/editor/Editor.tsx new file mode 100644 index 0000000..8a1edb8 --- /dev/null +++ b/www/src/components/editor/Editor.tsx @@ -0,0 +1,37 @@ +import Pandid from "../diagram/Pandid.tsx"; +import EditorSidebar from "./EditorSidebar.tsx"; +import { useState } from "react"; +import Tools from "../../enums/Tools.ts"; +import { CommissioningPackageContextProvider } from "../../context/CommissioningPackageContext.tsx"; +import ToolContext from "../../context/ToolContext.tsx"; +import EditorTopBar from "./EditorTopBar.tsx"; +import styled from "styled-components"; + +const EditorContainer = styled.div` + height: 100%; + width: 100%; + display: flex; + flex-direction: column; +`; + +const SideBarAndPandid = styled.div` + display: flex; + flex-direction: row; +`; + +export default function Editor() { + const [activeTool, setActiveTool] = useState(Tools.BOUNDARY); + return ( + + + + + + + + + + + + ); +} diff --git a/www/src/components/editor/EditorSidebar.tsx b/www/src/components/editor/EditorSidebar.tsx new file mode 100644 index 0000000..fb28a90 --- /dev/null +++ b/www/src/components/editor/EditorSidebar.tsx @@ -0,0 +1,78 @@ +import { SideBar, SidebarLinkProps } from "@equinor/eds-core-react"; +import { add, boundaries, category, texture } from "@equinor/eds-icons"; +import styled from "styled-components"; +import { useContext, useState } from "react"; +import Tools from "../../enums/Tools.ts"; +import { useCommissioningPackageContext } from "../../hooks/useCommissioningPackageContext.tsx"; +import ToolContext from "../../context/ToolContext.tsx"; +import CommissioningPackageCreationDialog from "./CommissioningPackageCreationDialog.tsx"; + +const StyledSideBar = styled.div` + height: 100%; +`; + +export default function EditorSidebar() { + const context = useCommissioningPackageContext(); + const { activeTool, setActiveTool } = useContext(ToolContext); + const [isCreationOpen, setIsCreationOpen] = useState(false); + + const menuItemsInitial: SidebarLinkProps[] = [ + { + label: "Select boundaries", + icon: boundaries, + onClick: () => { + setActiveTool(Tools.BOUNDARY); + }, + active: activeTool === Tools.BOUNDARY, + }, + { + label: "Select inside of boundary", + icon: texture, + onClick: () => { + setActiveTool(Tools.INSIDEBOUNDARY); + }, + active: activeTool === Tools.INSIDEBOUNDARY, + }, + ]; + return ( + <> + + + + + { + setIsCreationOpen(true); + }} + label={"Create new commissioning package"} + /> + {context?.commissioningPackages && ( + + {context.commissioningPackages.map((commpckg) => ( + { + context?.setActivePackage(commpckg); + }} + /> + ))} + + )} + + {menuItemsInitial.map((item, index) => ( + + ))} + + + + + ); +} diff --git a/www/src/components/editor/EditorTopBar.tsx b/www/src/components/editor/EditorTopBar.tsx new file mode 100644 index 0000000..4ad4a86 --- /dev/null +++ b/www/src/components/editor/EditorTopBar.tsx @@ -0,0 +1,15 @@ +import { TopBar, Typography } from "@equinor/eds-core-react"; +import { useCommissioningPackageContext } from "../../hooks/useCommissioningPackageContext.tsx"; +import ColorPreview from "./ColorPreview.tsx"; + +export default function EditorTopBar() { + const context = useCommissioningPackageContext(); + return ( + + + + {context.activePackage.name} + + + ); +} diff --git a/www/src/components/piping/PipingComponent.tsx b/www/src/components/piping/PipingComponent.tsx deleted file mode 100644 index 39205e1..0000000 --- a/www/src/components/piping/PipingComponent.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import { PipingComponentProps } from "../../types/diagram/Piping.ts"; -import { useContext } from "react"; -import PandidContext from "../../context/PandidContext.ts"; -import SvgElement from "../SvgElement.tsx"; -import constructPath from "../../utils/Path.ts"; -import StyledPath from "../StyledPath.tsx"; -import { ClickableComponentProps } from "../../types/ClickableComponentProps.ts"; -import useSerializeNodeSvg from "../../hooks/useSerializeNodeSvg.tsx"; -import StyledSvgElement from "../StyledSvgElement.tsx"; -import { useCommissioningPackageContext } from "../../hooks/useCommissioningPackageContext.tsx"; - -interface PipingComponentClickableProps - extends PipingComponentProps, - ClickableComponentProps {} - -export default function PipingComponent(props: PipingComponentClickableProps) { - const height = useContext(PandidContext).height; - const packageContext = useCommissioningPackageContext(); - - const color = packageContext.activePackage.color; - const componentName = props.ComponentName; - const label = props.Label; - const svg = - props.ComponentName != null - ? useSerializeNodeSvg(props.ComponentName, props.GenericAttributes) - : null; - - return ( - props.onClick}> - {componentName && svg && ( - <> - {color && ( - - )} - - - - )} - {label && ( - <> - {label.PolyLine && ( - - )} - - )} - - ); -} diff --git a/www/src/context/BoundarySelectionContext.tsx b/www/src/context/BoundarySelectionContext.tsx deleted file mode 100644 index 2ebdc3b..0000000 --- a/www/src/context/BoundarySelectionContext.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import React, { useState, createContext } from "react"; - -export interface BoundarySelectionContextProps { - boundaryIds: string[]; - setboundaryIds: React.Dispatch>; - internalIds: string[]; - setInternalIds: React.Dispatch>; -} - -const BoundarySelectionContext = createContext< - BoundarySelectionContextProps | undefined ->(undefined); - -export const BoundarySelectionContextProvider: React.FC<{ - children: React.ReactNode; -}> = ({ children }) => { - const [boundaryIds, setboundaryIds] = useState([]); - const [internalIds, setInternalIds] = useState([]); - - const contextValue: BoundarySelectionContextProps = { - boundaryIds, - setboundaryIds, - internalIds, - setInternalIds, - }; - - return ( - - {children} - - ); -}; - -export default BoundarySelectionContext; diff --git a/www/src/context/CommissioningPackageContext.tsx b/www/src/context/CommissioningPackageContext.tsx index acb4d6b..d5de8fa 100644 --- a/www/src/context/CommissioningPackageContext.tsx +++ b/www/src/context/CommissioningPackageContext.tsx @@ -1,5 +1,6 @@ import React, { createContext, useEffect, useState } from "react"; import CommissioningPackage from "../types/CommissioningPackage.ts"; +import HighlightColors from "../types/HighlightColors.ts"; export interface CommissioningPackageContextProps { activePackage: CommissioningPackage; @@ -20,7 +21,7 @@ export const CommissioningPackageContextProvider: React.FC<{ const [activePackage, setActivePackage] = useState({ id: "asset:Package1", name: "Initial Package", - color: `rgb(255,0,0)`, + color: HighlightColors.LASER_LEMON, boundaryIds: [], internalIds: [], nodeIds: [], diff --git a/www/src/context/ToolContext.tsx b/www/src/context/ToolContext.tsx new file mode 100644 index 0000000..e47011f --- /dev/null +++ b/www/src/context/ToolContext.tsx @@ -0,0 +1,14 @@ +import React, { createContext } from "react"; +import Tools from "../enums/Tools.ts"; + +export interface ToolContextProps { + activeTool: Tools; + setActiveTool: React.Dispatch>; +} + +const ToolContext = createContext({ + activeTool: Tools.BOUNDARY, + setActiveTool: () => {}, +}); + +export default ToolContext; diff --git a/www/src/hooks/useBoundarySelectionContext.tsx b/www/src/hooks/useBoundarySelectionContext.tsx deleted file mode 100644 index e371c18..0000000 --- a/www/src/hooks/useBoundarySelectionContext.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { useContext } from "react"; -import BoundarySelectionContext from "../context/BoundarySelectionContext.tsx"; - -export const useBoundarySelectionContext = () => { - const context = useContext(BoundarySelectionContext); - if (!context) { - throw new Error( - "useBoundarySelectionContext must be used within a BoundarySelectionContextProvider", - ); - } - return context; -}; diff --git a/www/src/types/ClickableComponentProps.ts b/www/src/types/ClickableComponentProps.ts index 5a1340c..cc43857 100644 --- a/www/src/types/ClickableComponentProps.ts +++ b/www/src/types/ClickableComponentProps.ts @@ -1,4 +1,3 @@ -import { assetIri } from "../utils/Triplestore.ts"; import Tools from "../enums/Tools.ts"; import { CommissioningPackageContextProps } from "../context/CommissioningPackageContext.tsx"; @@ -9,19 +8,3 @@ export interface ClickableComponentProps { tool: Tools, ) => Promise; } - -export const isBoundary = ( - id: string, - context: CommissioningPackageContextProps, -) => context.activePackage.boundaryIds.includes(id); -export const isInternal = ( - id: string, - context: CommissioningPackageContextProps, -) => context.activePackage.internalIds.includes(id); -export const isInPackage = ( - id: string, - context: CommissioningPackageContextProps, -) => - context.activePackage.nodeIds - ? context.activePackage.nodeIds.includes(assetIri(id)) - : false; diff --git a/www/src/types/CommissioningPackage.ts b/www/src/types/CommissioningPackage.ts index 9a7e852..b50f6d0 100644 --- a/www/src/types/CommissioningPackage.ts +++ b/www/src/types/CommissioningPackage.ts @@ -1,7 +1,9 @@ +import HighlightColors from "./HighlightColors.ts"; + export default interface CommissioningPackage { id: string; name: string; - color: string; + color: HighlightColors; boundaryIds: string[]; internalIds: string[]; nodeIds: string[]; diff --git a/www/src/types/HighlightColors.ts b/www/src/types/HighlightColors.ts new file mode 100644 index 0000000..849c09d --- /dev/null +++ b/www/src/types/HighlightColors.ts @@ -0,0 +1,14 @@ +enum HighlightColors { + LASER_LEMON = "#FFFF77", + FRENCH_LIME = "#AEFF77", + MINT_GREEN = "#77FF92", + AQUAMARINE = "#77FFE4", + MAYA_BLUE = "#77C9FF", + SLATE_BLUE = "#7777FF", + HELIOTROPE = "#C977FF", + VIOLET_WEB = "#FF77E4", + ULTRA_RED = "#FF7792", + MAC_AND_CHEESE = "#FFAE77", +} + +export default HighlightColors; diff --git a/www/src/types/OperationStatus.ts b/www/src/types/OperationStatus.ts new file mode 100644 index 0000000..59fd5db --- /dev/null +++ b/www/src/types/OperationStatus.ts @@ -0,0 +1,7 @@ +enum OperationStatus { + SUCCESS, + ALREADY_IN_OTHER_PACKAGE, + OVERLAP_WITH_OTHER_PACKAGE, +} + +export default OperationStatus; diff --git a/www/src/utils/HandlerFunctionHelper.tsx b/www/src/utils/HandlerFunctionHelper.tsx index 04aec1c..fced299 100644 --- a/www/src/utils/HandlerFunctionHelper.tsx +++ b/www/src/utils/HandlerFunctionHelper.tsx @@ -12,7 +12,6 @@ export default async function selectHandleFunction( context: CommissioningPackageContextProps, tool: Tools, ) { - console.log("handler selector fired"); switch (tool) { case Tools.BOUNDARY: return await handleAddBoundary(id, context); @@ -27,7 +26,6 @@ export async function handleAddInternal( id: string, context: CommissioningPackageContextProps, ) { - console.log("Internal handler fired"); // If element is already inside if (context.activePackage.internalIds.includes(id)) { context.setActivePackage((prev) => ({ @@ -38,6 +36,7 @@ export async function handleAddInternal( id, BoundaryActions.Delete, BoundaryParts.InsideBoundary, + context.activePackage.id, ); } else { // If the clicked element is a boundary, remove it as a boundary @@ -50,6 +49,7 @@ export async function handleAddInternal( id, BoundaryActions.Delete, BoundaryParts.Boundary, + context.activePackage.id, ); } // Then, add it as an internal element @@ -61,28 +61,30 @@ export async function handleAddInternal( id, BoundaryActions.Insert, BoundaryParts.InsideBoundary, + context.activePackage.id, ); } + // Then, update the nodes in package + const nodeIds = await getNodeIdsInCommissioningPackage( + context.activePackage.id, + ); + context.setActivePackage((prev) => { + const updatedPackage = { ...prev, nodeIds: nodeIds }; - // Then, update the internal ids to include the new node - const nodeIds = await getNodeIdsInCommissioningPackage(); - context.setActivePackage((prev) => ({ ...prev, nodeIds: nodeIds })); + context.setCommissioningPackages((prevPackages) => + prevPackages.map((pkg) => + pkg.id === updatedPackage.id ? updatedPackage : pkg, + ), + ); - // Lastly, update the commissioningPackages - context.setCommissioningPackages((prevPackages) => - prevPackages.map((pkg) => - pkg.id === context.activePackage.id - ? { ...pkg, ...context.activePackage } - : pkg, - ), - ); + return updatedPackage; + }); } export async function handleAddBoundary( id: string, context: CommissioningPackageContextProps, ) { - console.log("Boundary handler fired"); // If the element is already a boundary, remove it as boundary if (context.activePackage.boundaryIds.includes(id)) { context.setActivePackage((prev) => ({ @@ -93,6 +95,7 @@ export async function handleAddBoundary( id, BoundaryActions.Delete, BoundaryParts.Boundary, + context.activePackage.id, ); } else { // If element is not already a boundary, add it as boundary. @@ -106,6 +109,7 @@ export async function handleAddBoundary( id, BoundaryActions.Delete, BoundaryParts.InsideBoundary, + context.activePackage.id, ); } context.setActivePackage((prev) => ({ @@ -116,18 +120,22 @@ export async function handleAddBoundary( id, BoundaryActions.Insert, BoundaryParts.Boundary, + context.activePackage.id, ); } - // Then, update the internal ids to include the new node - const nodeIds = await getNodeIdsInCommissioningPackage(); - context.setActivePackage((prev) => ({ ...prev, internalIds: nodeIds })); - - // Lastly, update the commissioningPackages - context.setCommissioningPackages((prevPackages) => - prevPackages.map((pkg) => - pkg.id === context.activePackage.id - ? { ...pkg, ...context.activePackage } - : pkg, - ), + // Then, update the nodes in package + const nodeIds = await getNodeIdsInCommissioningPackage( + context.activePackage.id, ); + context.setActivePackage((prev) => { + const updatedPackage = { ...prev, nodeIds: nodeIds }; + + context.setCommissioningPackages((prevPackages) => + prevPackages.map((pkg) => + pkg.id === updatedPackage.id ? updatedPackage : pkg, + ), + ); + + return updatedPackage; + }); } diff --git a/www/src/utils/HelperFunctions.ts b/www/src/utils/HelperFunctions.ts index ce18ae8..7744dd8 100644 --- a/www/src/utils/HelperFunctions.ts +++ b/www/src/utils/HelperFunctions.ts @@ -1,3 +1,22 @@ +import { CommissioningPackageContextProps } from "../context/CommissioningPackageContext.tsx"; +import { assetIri } from "./Triplestore.ts"; + export function ensureArray(value: T | T[]): T[] { - return Array.isArray(value) ? value : [value]; - } \ No newline at end of file + return Array.isArray(value) ? value : [value]; +} + +export const isBoundary = ( + id: string, + context: CommissioningPackageContextProps, +) => context.activePackage.boundaryIds.includes(id); +export const isInternal = ( + id: string, + context: CommissioningPackageContextProps, +) => context.activePackage.internalIds.includes(id); +export const isInPackage = ( + id: string, + context: CommissioningPackageContextProps, +) => + context.activePackage.nodeIds + ? context.activePackage.nodeIds.includes(assetIri(id)) + : false; diff --git a/www/src/utils/Triplestore.ts b/www/src/utils/Triplestore.ts index f2b7a4f..1c0d2bd 100644 --- a/www/src/utils/Triplestore.ts +++ b/www/src/utils/Triplestore.ts @@ -1,72 +1,105 @@ -const completionPackageIri = 'asset:Package1'; +import { PipingNetworkSegmentProps } from "../types/diagram/Piping.ts"; export enum BoundaryActions { - Insert = 'INSERT DATA ', - Delete = 'DELETE DATA ' + Insert = "INSERT DATA ", + Delete = "DELETE DATA ", } export enum BoundaryParts { - InsideBoundary = 'comp:isInPackage', - Boundary = 'comp:isBoundaryOf' + InsideBoundary = "comp:isInPackage", + Boundary = "comp:isBoundaryOf", } export enum Method { - Post = 'POST', - Get = 'GET' + Post = "POST", + Get = "GET", } -export async function makeSparqlAndUpdateStore(nodeId: string, action: string, type: string) { - const sparql = `${action} { <${assetIri(nodeId)}> ${type} ${completionPackageIri} . }`; - await queryTripleStore(sparql, Method.Post); +export async function makeSparqlAndUpdateStore( + nodeId: string, + action: string, + type: string, + packageIri: string, +) { + const sparql = `${action} { <${assetIri(nodeId)}> ${type} ${packageIri} . }`; + await queryTripleStore(sparql, Method.Post); } export async function cleanTripleStore() { - const deleteBoundary = `DELETE WHERE { ?boundary comp:isBoundaryOf ?p . }`; - const deleteInternal = `DELETE WHERE { ?internal comp:isInPackage ?p . }`; - await queryTripleStore(deleteBoundary, Method.Post); - await queryTripleStore(deleteInternal, Method.Post); + const deleteBoundary = `DELETE WHERE { ?boundary comp:isBoundaryOf ?p . }`; + const deleteInternal = `DELETE WHERE { ?internal comp:isInPackage ?p . }`; + await queryTripleStore(deleteBoundary, Method.Post); + await queryTripleStore(deleteInternal, Method.Post); } -export async function getNodeIdsInCommissioningPackage() { - const query = 'SELECT ?node WHERE{?node comp:isInPackage ' + completionPackageIri + ' .}'; - const result = await queryTripleStore(query, Method.Get); - return parseNodeIds(result!); +export async function getNodeIdsInCommissioningPackage(packageIri: string) { + const query = + "SELECT ?node WHERE{?node comp:isInPackage " + packageIri + " .}"; + const result = await queryTripleStore(query, Method.Get); + return parseNodeIds(result!); } -export async function queryTripleStore(sparql: string, method: Method.Get | Method.Post) { - if (method === Method.Get) { - try { - const encoded = encodeURIComponent(sparql); - const response = await fetch(`http://localhost:12110/datastores/boundaries/sparql?query=${encoded}`, { - method: 'GET', - }); - return await response.text(); - } catch (error) { - console.error('Error:', error); - } - } else if (method === Method.Post) { - try { - await fetch('http://localhost:12110/datastores/boundaries/sparql', { - method: 'POST', - headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, - body: `update=${sparql}` - }); - } catch (error) { - console.error('Error:', error); - } +export async function queryTripleStore( + sparql: string, + method: Method.Get | Method.Post, +) { + if (method === Method.Get) { + try { + const encoded = encodeURIComponent(sparql); + const response = await fetch( + `http://localhost:12110/datastores/boundaries/sparql?query=${encoded}`, + { + method: "GET", + }, + ); + return await response.text(); + } catch (error) { + console.error("Error:", error); } -}; + } else if (method === Method.Post) { + try { + await fetch("http://localhost:12110/datastores/boundaries/sparql", { + method: "POST", + headers: { "Content-Type": "application/x-www-form-urlencoded" }, + body: `update=${sparql}`, + }); + } catch (error) { + console.error("Error:", error); + } + } +} -export async function adjacentToInternal(pipeIri: string) { - const query = `SELECT ?node WHERE { <${pipeIri}> imf:adjacentTo ?node . ?node comp:isInPackage ?p .}`; - const result = await queryTripleStore(query, Method.Get); - const internalNeighbours = parseNodeIds(result!); - return internalNeighbours.length > 0 +export function iriFromSvgNode(id: string) { + return `https://assetid.equinor.com/plantx#${id}`; +} + +export function iriFromPiping(segment: PipingNetworkSegmentProps) { + if ( + segment.Connection?.ToID && + (!segment.PipingComponent || !segment.PropertyBreak) + ) { + return `https://assetid.equinor.com/plantx#${segment.Connection.ToID}-node${segment.Connection.ToNode}-connector`; + } else if (segment.PipingComponent[1]) { + return `https://assetid.equinor.com/plantx#${segment.PipingComponent[1].ID}-node2-connector`; + } else if (segment.Connection?.FromID) { + return `https://assetid.equinor.com/plantx#${segment.Connection.FromID}-node${segment.Connection.FromNode}-connector`; + } else if (segment.Connection?.ToID) { + return `https://assetid.equinor.com/plantx#${segment.Connection!.ToID}-node${segment.Connection!.ToNode}-connector`; + } else { + console.error("Something went wrong with iri creation"); + return ``; + } } +export async function adjacentToInternal(pipeIri: string) { + const query = `SELECT ?node WHERE { <${pipeIri}> imf:adjacentTo ?node . ?node comp:isInPackage ?p .}`; + const result = await queryTripleStore(query, Method.Get); + const internalNeighbours = parseNodeIds(result!); + return internalNeighbours.length > 0; +} -export async function updateTable() { - const queryInside = ` +/*export async function updateTable() { + const queryInside = ` SELECT * WHERE { ?node comp:isInPackage ${completionPackageIri} . ?node ?o . @@ -78,7 +111,7 @@ export async function updateTable() { } `; - const queryBoundary = ` + const queryBoundary = ` SELECT DISTINCT ?node ?tagNr WHERE { ?node comp:isBoundaryOf ${completionPackageIri} . ?node ?o . @@ -91,26 +124,31 @@ export async function updateTable() { } } `; - let resultInside = parseNodeIds(await queryTripleStore(queryInside, Method.Get) as string); - const resultBoundary = parseNodeIds(await queryTripleStore(queryBoundary, Method.Get) as string); - - if (resultInside.length > 0 || resultBoundary.length > 0) { - // Remove elements that are in both inside boundary and boundary - resultInside = resultInside.filter((nodeId: string) => !resultBoundary.includes(nodeId)); - //displayTablesAndDownloadButton(resultInside, 'Inside Boundary', 'inside-boundary-table-container', resultBoundary, 'Boundary', 'boundary-table-container'); - } else { - // Clear the container if there are no nodes - - //document.getElementById('inside-boundary-table-container').innerHTML = ''; - //document.getElementById('boundary-table-container').innerHTML = ''; - } -} + let resultInside = parseNodeIds( + (await queryTripleStore(queryInside, Method.Get)) as string, + ); + const resultBoundary = parseNodeIds( + (await queryTripleStore(queryBoundary, Method.Get)) as string, + ); + + if (resultInside.length > 0 || resultBoundary.length > 0) { + // Remove elements that are in both inside boundary and boundary + resultInside = resultInside.filter( + (nodeId: string) => !resultBoundary.includes(nodeId), + ); + //displayTablesAndDownloadButton(resultInside, 'Inside Boundary', 'inside-boundary-table-container', resultBoundary, 'Boundary', 'boundary-table-container'); + } else { + // Clear the container if there are no nodes + //document.getElementById('inside-boundary-table-container').innerHTML = ''; + //document.getElementById('boundary-table-container').innerHTML = ''; + } +}*/ export const assetIri = (id: string) => { - return `https://assetid.equinor.com/plantx#${id}`; -} + return `https://assetid.equinor.com/plantx#${id}`; +}; function parseNodeIds(result: string) { - const lines = result.split('\n').filter(line => line.trim() !== ''); - return lines.slice(1).map(line => line.replace(/[<>]/g, '')); -} \ No newline at end of file + const lines = result.split("\n").filter((line) => line.trim() !== ""); + return lines.slice(1).map((line) => line.replace(/[<>]/g, "")); +} diff --git a/www_old/script.js b/www_old/script.js index 5baceaa..94d0dd6 100644 --- a/www_old/script.js +++ b/www_old/script.js @@ -33,6 +33,7 @@ pipes.forEach((pipe) => { async function handlePipeClick(pipe) { pipe.classList.add('boundary'); + console.log(pipe.id) await makeSparqlAndUpdateStore(pipe.id, boundary_actions.insert, boundary_parts.boundary); addPipeHighlight(pipe, color = 'rgb(251, 131, 109)') } From d6852cd8a3faac8dc1c698cf0915bf768ee32455 Mon Sep 17 00:00:00 2001 From: Nora Kristiansen <106915799+NoraKri@users.noreply.github.com> Date: Tue, 10 Dec 2024 13:53:25 +0100 Subject: [PATCH 05/13] refactor toolcontext to be a ts file --- www/src/components/diagram/CenterLine.tsx | 2 +- www/src/components/diagram/Equipment.tsx | 2 +- www/src/components/diagram/SvgElement.tsx | 2 +- www/src/components/diagram/piping/PipeSystem.tsx | 2 +- www/src/components/editor/Editor.tsx | 2 +- www/src/components/editor/EditorSidebar.tsx | 2 +- www/src/context/{ToolContext.tsx => ToolContext.ts} | 0 7 files changed, 6 insertions(+), 6 deletions(-) rename www/src/context/{ToolContext.tsx => ToolContext.ts} (100%) diff --git a/www/src/components/diagram/CenterLine.tsx b/www/src/components/diagram/CenterLine.tsx index da56589..3336c36 100644 --- a/www/src/components/diagram/CenterLine.tsx +++ b/www/src/components/diagram/CenterLine.tsx @@ -6,7 +6,7 @@ import StyledPath from "./StyledPath.tsx"; import { useCommissioningPackageContext } from "../../hooks/useCommissioningPackageContext.tsx"; import React from "react"; import selectHandleFunction from "../../utils/HandlerFunctionHelper.tsx"; -import ToolContext from "../../context/ToolContext.tsx"; +import ToolContext from "../../context/ToolContext.ts"; import { iriFromSvgNode } from "../../utils/Triplestore.ts"; import HighlightColors from "../../types/HighlightColors.ts"; diff --git a/www/src/components/diagram/Equipment.tsx b/www/src/components/diagram/Equipment.tsx index bf2c1f0..70e7701 100644 --- a/www/src/components/diagram/Equipment.tsx +++ b/www/src/components/diagram/Equipment.tsx @@ -7,7 +7,7 @@ import SvgElement from "./SvgElement.tsx"; import { useCommissioningPackageContext } from "../../hooks/useCommissioningPackageContext.tsx"; import { iriFromSvgNode } from "../../utils/Triplestore.ts"; import { isBoundary, isInternal } from "../../utils/HelperFunctions.ts"; -import ToolContext from "../../context/ToolContext.tsx"; +import ToolContext from "../../context/ToolContext.ts"; import selectHandleFunction from "../../utils/HandlerFunctionHelper.tsx"; export default function Equipment(props: EquipmentProps) { diff --git a/www/src/components/diagram/SvgElement.tsx b/www/src/components/diagram/SvgElement.tsx index 5c25096..fcdbb01 100644 --- a/www/src/components/diagram/SvgElement.tsx +++ b/www/src/components/diagram/SvgElement.tsx @@ -11,7 +11,7 @@ import { useCommissioningPackageContext } from "../../hooks/useCommissioningPack import { isBoundary, isInternal } from "../../utils/HelperFunctions.ts"; import StyledSvgElement from "./StyledSvgElement.tsx"; import selectHandleFunction from "../../utils/HandlerFunctionHelper.tsx"; -import ToolContext from "../../context/ToolContext.tsx"; +import ToolContext from "../../context/ToolContext.ts"; interface SvgElementProps { id: string; diff --git a/www/src/components/diagram/piping/PipeSystem.tsx b/www/src/components/diagram/piping/PipeSystem.tsx index 89e0e07..ac1a8c7 100644 --- a/www/src/components/diagram/piping/PipeSystem.tsx +++ b/www/src/components/diagram/piping/PipeSystem.tsx @@ -13,7 +13,7 @@ import { ensureArray } from "../../../utils/HelperFunctions.ts"; import PipeSegment from "./PipeSegment.tsx"; import { iriFromSvgNode } from "../../../utils/Triplestore.ts"; import selectHandleFunction from "../../../utils/HandlerFunctionHelper.tsx"; -import ToolContext from "../../../context/ToolContext.tsx"; +import ToolContext from "../../../context/ToolContext.ts"; import { useCommissioningPackageContext } from "../../../hooks/useCommissioningPackageContext.tsx"; interface PipeSystemSVGProps { diff --git a/www/src/components/editor/Editor.tsx b/www/src/components/editor/Editor.tsx index 8a1edb8..3e2328a 100644 --- a/www/src/components/editor/Editor.tsx +++ b/www/src/components/editor/Editor.tsx @@ -3,7 +3,7 @@ import EditorSidebar from "./EditorSidebar.tsx"; import { useState } from "react"; import Tools from "../../enums/Tools.ts"; import { CommissioningPackageContextProvider } from "../../context/CommissioningPackageContext.tsx"; -import ToolContext from "../../context/ToolContext.tsx"; +import ToolContext from "../../context/ToolContext.ts"; import EditorTopBar from "./EditorTopBar.tsx"; import styled from "styled-components"; diff --git a/www/src/components/editor/EditorSidebar.tsx b/www/src/components/editor/EditorSidebar.tsx index fb28a90..d6b089e 100644 --- a/www/src/components/editor/EditorSidebar.tsx +++ b/www/src/components/editor/EditorSidebar.tsx @@ -4,7 +4,7 @@ import styled from "styled-components"; import { useContext, useState } from "react"; import Tools from "../../enums/Tools.ts"; import { useCommissioningPackageContext } from "../../hooks/useCommissioningPackageContext.tsx"; -import ToolContext from "../../context/ToolContext.tsx"; +import ToolContext from "../../context/ToolContext.ts"; import CommissioningPackageCreationDialog from "./CommissioningPackageCreationDialog.tsx"; const StyledSideBar = styled.div` diff --git a/www/src/context/ToolContext.tsx b/www/src/context/ToolContext.ts similarity index 100% rename from www/src/context/ToolContext.tsx rename to www/src/context/ToolContext.ts From ffc6679b3dd3b2fba11b0094e507d3a9ec86563f Mon Sep 17 00:00:00 2001 From: Nora Kristiansen <106915799+NoraKri@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:03:58 +0100 Subject: [PATCH 06/13] remove newpackage from Tools.ts --- www/src/enums/Tools.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/www/src/enums/Tools.ts b/www/src/enums/Tools.ts index 2f27933..5660814 100644 --- a/www/src/enums/Tools.ts +++ b/www/src/enums/Tools.ts @@ -1,7 +1,6 @@ enum Tools { BOUNDARY, INSIDEBOUNDARY, - NEWPACKAGE, } export default Tools; From 8b455662c40f1ea037085aadcd79871f52b02138 Mon Sep 17 00:00:00 2001 From: Nora Kristiansen <106915799+NoraKri@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:09:32 +0100 Subject: [PATCH 07/13] move iri creation functions to HelperFunctions.ts --- www/src/components/diagram/CenterLine.tsx | 2 +- www/src/components/diagram/Equipment.tsx | 7 ++++-- www/src/components/diagram/SvgElement.tsx | 7 ++++-- .../components/diagram/piping/PipeSegment.tsx | 3 +-- .../diagram/piping/PipingComponent.tsx | 2 +- www/src/types/OperationStatus.ts | 7 ------ www/src/utils/HelperFunctions.ts | 23 ++++++++++++++++++ www/src/utils/Triplestore.ts | 24 ------------------- 8 files changed, 36 insertions(+), 39 deletions(-) delete mode 100644 www/src/types/OperationStatus.ts diff --git a/www/src/components/diagram/CenterLine.tsx b/www/src/components/diagram/CenterLine.tsx index 3336c36..08609f2 100644 --- a/www/src/components/diagram/CenterLine.tsx +++ b/www/src/components/diagram/CenterLine.tsx @@ -7,8 +7,8 @@ import { useCommissioningPackageContext } from "../../hooks/useCommissioningPack import React from "react"; import selectHandleFunction from "../../utils/HandlerFunctionHelper.tsx"; import ToolContext from "../../context/ToolContext.ts"; -import { iriFromSvgNode } from "../../utils/Triplestore.ts"; import HighlightColors from "../../types/HighlightColors.ts"; +import { iriFromSvgNode } from "../../utils/HelperFunctions.ts"; interface CenterLineComponentProps { centerLines: CenterLineProps[]; diff --git a/www/src/components/diagram/Equipment.tsx b/www/src/components/diagram/Equipment.tsx index 70e7701..3873e11 100644 --- a/www/src/components/diagram/Equipment.tsx +++ b/www/src/components/diagram/Equipment.tsx @@ -5,8 +5,11 @@ import PandidContext from "../../context/PandidContext.ts"; import useSerializeNodeSvg from "../../hooks/useSerializeNodeSvg.tsx"; import SvgElement from "./SvgElement.tsx"; import { useCommissioningPackageContext } from "../../hooks/useCommissioningPackageContext.tsx"; -import { iriFromSvgNode } from "../../utils/Triplestore.ts"; -import { isBoundary, isInternal } from "../../utils/HelperFunctions.ts"; +import { + iriFromSvgNode, + isBoundary, + isInternal, +} from "../../utils/HelperFunctions.ts"; import ToolContext from "../../context/ToolContext.ts"; import selectHandleFunction from "../../utils/HandlerFunctionHelper.tsx"; diff --git a/www/src/components/diagram/SvgElement.tsx b/www/src/components/diagram/SvgElement.tsx index fcdbb01..7138c05 100644 --- a/www/src/components/diagram/SvgElement.tsx +++ b/www/src/components/diagram/SvgElement.tsx @@ -6,9 +6,12 @@ import calculateAngleAndRotation from "../../utils/Transformation.ts"; import useSerializeNodeSvg from "../../hooks/useSerializeNodeSvg.tsx"; import { useContext } from "react"; import PandidContext from "../../context/PandidContext.ts"; -import { iriFromSvgNode } from "../../utils/Triplestore.ts"; import { useCommissioningPackageContext } from "../../hooks/useCommissioningPackageContext.tsx"; -import { isBoundary, isInternal } from "../../utils/HelperFunctions.ts"; +import { + iriFromSvgNode, + isBoundary, + isInternal, +} from "../../utils/HelperFunctions.ts"; import StyledSvgElement from "./StyledSvgElement.tsx"; import selectHandleFunction from "../../utils/HandlerFunctionHelper.tsx"; import ToolContext from "../../context/ToolContext.ts"; diff --git a/www/src/components/diagram/piping/PipeSegment.tsx b/www/src/components/diagram/piping/PipeSegment.tsx index aa22094..4abdf08 100644 --- a/www/src/components/diagram/piping/PipeSegment.tsx +++ b/www/src/components/diagram/piping/PipeSegment.tsx @@ -9,10 +9,9 @@ import PandidContext from "../../../context/PandidContext.ts"; import SvgElement from "../SvgElement.tsx"; import StyledPath from "../StyledPath.tsx"; import constructPath from "../../../utils/Path.ts"; -import { ensureArray } from "../../../utils/HelperFunctions.ts"; +import { ensureArray, iriFromPiping } from "../../../utils/HelperFunctions.ts"; import PipingComponent from "./PipingComponent.tsx"; import { ClickableComponentProps } from "../../../types/ClickableComponentProps.ts"; -import { iriFromPiping } from "../../../utils/Triplestore.ts"; interface PipeSegmentProps extends PipingNetworkSegmentProps, diff --git a/www/src/components/diagram/piping/PipingComponent.tsx b/www/src/components/diagram/piping/PipingComponent.tsx index fe7848a..94accb9 100644 --- a/www/src/components/diagram/piping/PipingComponent.tsx +++ b/www/src/components/diagram/piping/PipingComponent.tsx @@ -8,12 +8,12 @@ import { ClickableComponentProps } from "../../../types/ClickableComponentProps. import useSerializeNodeSvg from "../../../hooks/useSerializeNodeSvg.tsx"; import StyledSvgElement from "../StyledSvgElement.tsx"; import { useCommissioningPackageContext } from "../../../hooks/useCommissioningPackageContext.tsx"; -import { iriFromSvgNode } from "../../../utils/Triplestore.ts"; import { GenericAttributesProps, PositionProps, } from "../../../types/diagram/Common.ts"; import HighlightColors from "../../../types/HighlightColors.ts"; +import { iriFromSvgNode } from "../../../utils/HelperFunctions.ts"; interface PipingComponentClickableProps extends PipingComponentProps, diff --git a/www/src/types/OperationStatus.ts b/www/src/types/OperationStatus.ts deleted file mode 100644 index 59fd5db..0000000 --- a/www/src/types/OperationStatus.ts +++ /dev/null @@ -1,7 +0,0 @@ -enum OperationStatus { - SUCCESS, - ALREADY_IN_OTHER_PACKAGE, - OVERLAP_WITH_OTHER_PACKAGE, -} - -export default OperationStatus; diff --git a/www/src/utils/HelperFunctions.ts b/www/src/utils/HelperFunctions.ts index 7744dd8..ce25d6e 100644 --- a/www/src/utils/HelperFunctions.ts +++ b/www/src/utils/HelperFunctions.ts @@ -1,5 +1,6 @@ import { CommissioningPackageContextProps } from "../context/CommissioningPackageContext.tsx"; import { assetIri } from "./Triplestore.ts"; +import { PipingNetworkSegmentProps } from "../types/diagram/Piping.ts"; export function ensureArray(value: T | T[]): T[] { return Array.isArray(value) ? value : [value]; @@ -20,3 +21,25 @@ export const isInPackage = ( context.activePackage.nodeIds ? context.activePackage.nodeIds.includes(assetIri(id)) : false; + +export function iriFromSvgNode(id: string) { + return `https://assetid.equinor.com/plantx#${id}`; +} + +export function iriFromPiping(segment: PipingNetworkSegmentProps) { + if ( + segment.Connection?.ToID && + (!segment.PipingComponent || !segment.PropertyBreak) + ) { + return `https://assetid.equinor.com/plantx#${segment.Connection.ToID}-node${segment.Connection.ToNode}-connector`; + } else if (segment.PipingComponent[1]) { + return `https://assetid.equinor.com/plantx#${segment.PipingComponent[1].ID}-node2-connector`; + } else if (segment.Connection?.FromID) { + return `https://assetid.equinor.com/plantx#${segment.Connection.FromID}-node${segment.Connection.FromNode}-connector`; + } else if (segment.Connection?.ToID) { + return `https://assetid.equinor.com/plantx#${segment.Connection!.ToID}-node${segment.Connection!.ToNode}-connector`; + } else { + console.error("Something went wrong with iri creation"); + return ``; + } +} diff --git a/www/src/utils/Triplestore.ts b/www/src/utils/Triplestore.ts index 1c0d2bd..ef83542 100644 --- a/www/src/utils/Triplestore.ts +++ b/www/src/utils/Triplestore.ts @@ -1,5 +1,3 @@ -import { PipingNetworkSegmentProps } from "../types/diagram/Piping.ts"; - export enum BoundaryActions { Insert = "INSERT DATA ", Delete = "DELETE DATA ", @@ -69,28 +67,6 @@ export async function queryTripleStore( } } -export function iriFromSvgNode(id: string) { - return `https://assetid.equinor.com/plantx#${id}`; -} - -export function iriFromPiping(segment: PipingNetworkSegmentProps) { - if ( - segment.Connection?.ToID && - (!segment.PipingComponent || !segment.PropertyBreak) - ) { - return `https://assetid.equinor.com/plantx#${segment.Connection.ToID}-node${segment.Connection.ToNode}-connector`; - } else if (segment.PipingComponent[1]) { - return `https://assetid.equinor.com/plantx#${segment.PipingComponent[1].ID}-node2-connector`; - } else if (segment.Connection?.FromID) { - return `https://assetid.equinor.com/plantx#${segment.Connection.FromID}-node${segment.Connection.FromNode}-connector`; - } else if (segment.Connection?.ToID) { - return `https://assetid.equinor.com/plantx#${segment.Connection!.ToID}-node${segment.Connection!.ToNode}-connector`; - } else { - console.error("Something went wrong with iri creation"); - return ``; - } -} - export async function adjacentToInternal(pipeIri: string) { const query = `SELECT ?node WHERE { <${pipeIri}> imf:adjacentTo ?node . ?node comp:isInPackage ?p .}`; const result = await queryTripleStore(query, Method.Get); From e63929721d41e2d81d136fba1442afd11dc429ad Mon Sep 17 00:00:00 2001 From: Nora Kristiansen <106915799+NoraKri@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:11:39 +0100 Subject: [PATCH 08/13] fix wrong imports --- www/src/components/diagram/SvgElement.tsx | 7 ++++--- www/src/components/diagram/piping/PipeSystem.tsx | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/www/src/components/diagram/SvgElement.tsx b/www/src/components/diagram/SvgElement.tsx index 7138c05..49f4180 100644 --- a/www/src/components/diagram/SvgElement.tsx +++ b/www/src/components/diagram/SvgElement.tsx @@ -7,14 +7,15 @@ import useSerializeNodeSvg from "../../hooks/useSerializeNodeSvg.tsx"; import { useContext } from "react"; import PandidContext from "../../context/PandidContext.ts"; import { useCommissioningPackageContext } from "../../hooks/useCommissioningPackageContext.tsx"; + +import StyledSvgElement from "./StyledSvgElement.tsx"; +import selectHandleFunction from "../../utils/HandlerFunctionHelper.tsx"; +import ToolContext from "../../context/ToolContext.ts"; import { iriFromSvgNode, isBoundary, isInternal, } from "../../utils/HelperFunctions.ts"; -import StyledSvgElement from "./StyledSvgElement.tsx"; -import selectHandleFunction from "../../utils/HandlerFunctionHelper.tsx"; -import ToolContext from "../../context/ToolContext.ts"; interface SvgElementProps { id: string; diff --git a/www/src/components/diagram/piping/PipeSystem.tsx b/www/src/components/diagram/piping/PipeSystem.tsx index ac1a8c7..88c41c4 100644 --- a/www/src/components/diagram/piping/PipeSystem.tsx +++ b/www/src/components/diagram/piping/PipeSystem.tsx @@ -9,9 +9,8 @@ import { PositionProps, } from "../../../types/diagram/Common.ts"; import useSerializePipeSvg from "../../../hooks/useSerializePipeSvg.tsx"; -import { ensureArray } from "../../../utils/HelperFunctions.ts"; +import { ensureArray, iriFromSvgNode } from "../../../utils/HelperFunctions.ts"; import PipeSegment from "./PipeSegment.tsx"; -import { iriFromSvgNode } from "../../../utils/Triplestore.ts"; import selectHandleFunction from "../../../utils/HandlerFunctionHelper.tsx"; import ToolContext from "../../../context/ToolContext.ts"; import { useCommissioningPackageContext } from "../../../hooks/useCommissioningPackageContext.tsx"; From eb014cbd2ca8cfaa537cb32d62955634a9adf18b Mon Sep 17 00:00:00 2001 From: Nora Kristiansen <106915799+NoraKri@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:12:25 +0100 Subject: [PATCH 09/13] revert change in script.js --- www_old/script.js | 1 - 1 file changed, 1 deletion(-) diff --git a/www_old/script.js b/www_old/script.js index 94d0dd6..5baceaa 100644 --- a/www_old/script.js +++ b/www_old/script.js @@ -33,7 +33,6 @@ pipes.forEach((pipe) => { async function handlePipeClick(pipe) { pipe.classList.add('boundary'); - console.log(pipe.id) await makeSparqlAndUpdateStore(pipe.id, boundary_actions.insert, boundary_parts.boundary); addPipeHighlight(pipe, color = 'rgb(251, 131, 109)') } From 9d927a26f8f8b9245ecf6076aa7453039fc51b12 Mon Sep 17 00:00:00 2001 From: Nora Kristiansen <106915799+NoraKri@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:29:41 +0100 Subject: [PATCH 10/13] can now select PipingComponent as boundary/internal --- .../components/diagram/piping/PipingComponent.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/www/src/components/diagram/piping/PipingComponent.tsx b/www/src/components/diagram/piping/PipingComponent.tsx index 94accb9..e8d0498 100644 --- a/www/src/components/diagram/piping/PipingComponent.tsx +++ b/www/src/components/diagram/piping/PipingComponent.tsx @@ -4,7 +4,6 @@ import PandidContext from "../../../context/PandidContext.ts"; import SvgElement from "../SvgElement.tsx"; import constructPath from "../../../utils/Path.ts"; import StyledPath from "../StyledPath.tsx"; -import { ClickableComponentProps } from "../../../types/ClickableComponentProps.ts"; import useSerializeNodeSvg from "../../../hooks/useSerializeNodeSvg.tsx"; import StyledSvgElement from "../StyledSvgElement.tsx"; import { useCommissioningPackageContext } from "../../../hooks/useCommissioningPackageContext.tsx"; @@ -14,10 +13,8 @@ import { } from "../../../types/diagram/Common.ts"; import HighlightColors from "../../../types/HighlightColors.ts"; import { iriFromSvgNode } from "../../../utils/HelperFunctions.ts"; - -interface PipingComponentClickableProps - extends PipingComponentProps, - ClickableComponentProps {} +import selectHandleFunction from "../../../utils/HandlerFunctionHelper.tsx"; +import ToolContext from "../../../context/ToolContext.ts"; interface PipingComponentSVGProps { id: string; @@ -57,9 +54,10 @@ function PipingComponentSVG({ ); } -export default function PipingComponent(props: PipingComponentClickableProps) { +export default function PipingComponent(props: PipingComponentProps) { const height = useContext(PandidContext).height; const context = useCommissioningPackageContext(); + const tool = useContext(ToolContext).activeTool; const componentName = props.ComponentName; const label = props.Label; @@ -71,7 +69,7 @@ export default function PipingComponent(props: PipingComponentClickableProps) { const color = commissioningPackage?.color; return ( - props.onClick}> + selectHandleFunction(props.ID, context, tool)}> {componentName && ( Date: Tue, 10 Dec 2024 14:36:30 +0100 Subject: [PATCH 11/13] can now select svgElement as boundary/internal --- www/src/components/diagram/SvgElement.tsx | 4 ++-- www/src/components/diagram/piping/PipingComponent.tsx | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/www/src/components/diagram/SvgElement.tsx b/www/src/components/diagram/SvgElement.tsx index 49f4180..009d668 100644 --- a/www/src/components/diagram/SvgElement.tsx +++ b/www/src/components/diagram/SvgElement.tsx @@ -57,7 +57,7 @@ export default function SvgElement({ - isInActivePackage ? selectHandleFunction(iri, context, tool) : {} + isInActivePackage ? selectHandleFunction(id, context, tool) : {} } transform={ position @@ -69,7 +69,7 @@ export default function SvgElement({ ) : "" } - className={`.node ${isBoundary(iri, context) ? "boundary" : ""} ${isInternal(iri, context) ? "internal" : ""}`} + className={`.node ${isBoundary(id, context) ? "boundary" : ""} ${isInternal(id, context) ? "internal" : ""}`} dangerouslySetInnerHTML={{ __html: svg }} /> diff --git a/www/src/components/diagram/piping/PipingComponent.tsx b/www/src/components/diagram/piping/PipingComponent.tsx index e8d0498..603e6c4 100644 --- a/www/src/components/diagram/piping/PipingComponent.tsx +++ b/www/src/components/diagram/piping/PipingComponent.tsx @@ -66,10 +66,17 @@ export default function PipingComponent(props: PipingComponentProps) { const commissioningPackage = context.commissioningPackages.find((pkg) => pkg.nodeIds.find((node) => node === iri), ); + const isInActivePackage = commissioningPackage + ? context.activePackage.id === commissioningPackage.id + : true; const color = commissioningPackage?.color; return ( - selectHandleFunction(props.ID, context, tool)}> + + isInActivePackage ? selectHandleFunction(props.ID, context, tool) : {} + } + > {componentName && ( Date: Tue, 10 Dec 2024 15:07:15 +0100 Subject: [PATCH 12/13] move HighlightColors.ts to correct folder --- www/src/components/diagram/CenterLine.tsx | 2 +- www/src/components/diagram/piping/PipeSegment.tsx | 6 +----- www/src/components/diagram/piping/PipingComponent.tsx | 2 +- www/src/components/editor/ColorPreview.tsx | 2 +- .../editor/CommissioningPackageCreationDialog.tsx | 2 +- www/src/context/CommissioningPackageContext.tsx | 2 +- www/src/{types => enums}/HighlightColors.ts | 0 www/src/types/CommissioningPackage.ts | 2 +- 8 files changed, 7 insertions(+), 11 deletions(-) rename www/src/{types => enums}/HighlightColors.ts (100%) diff --git a/www/src/components/diagram/CenterLine.tsx b/www/src/components/diagram/CenterLine.tsx index 08609f2..62a9c19 100644 --- a/www/src/components/diagram/CenterLine.tsx +++ b/www/src/components/diagram/CenterLine.tsx @@ -7,7 +7,7 @@ import { useCommissioningPackageContext } from "../../hooks/useCommissioningPack import React from "react"; import selectHandleFunction from "../../utils/HandlerFunctionHelper.tsx"; import ToolContext from "../../context/ToolContext.ts"; -import HighlightColors from "../../types/HighlightColors.ts"; +import HighlightColors from "../../enums/HighlightColors.ts"; import { iriFromSvgNode } from "../../utils/HelperFunctions.ts"; interface CenterLineComponentProps { diff --git a/www/src/components/diagram/piping/PipeSegment.tsx b/www/src/components/diagram/piping/PipeSegment.tsx index 4abdf08..18af6c0 100644 --- a/www/src/components/diagram/piping/PipeSegment.tsx +++ b/www/src/components/diagram/piping/PipeSegment.tsx @@ -31,11 +31,7 @@ export default function PipeSegment(props: PipeSegmentProps) { {props.PipingComponent && ensureArray(props.PipingComponent).map( (pipingComponent: PipingComponentProps, componentIndex: number) => ( - + ), )} {props.PipeSlopeSymbol && ( diff --git a/www/src/components/diagram/piping/PipingComponent.tsx b/www/src/components/diagram/piping/PipingComponent.tsx index 603e6c4..849c7f5 100644 --- a/www/src/components/diagram/piping/PipingComponent.tsx +++ b/www/src/components/diagram/piping/PipingComponent.tsx @@ -11,7 +11,7 @@ import { GenericAttributesProps, PositionProps, } from "../../../types/diagram/Common.ts"; -import HighlightColors from "../../../types/HighlightColors.ts"; +import HighlightColors from "../../../enums/HighlightColors.ts"; import { iriFromSvgNode } from "../../../utils/HelperFunctions.ts"; import selectHandleFunction from "../../../utils/HandlerFunctionHelper.tsx"; import ToolContext from "../../../context/ToolContext.ts"; diff --git a/www/src/components/editor/ColorPreview.tsx b/www/src/components/editor/ColorPreview.tsx index c0ac78c..4d590ab 100644 --- a/www/src/components/editor/ColorPreview.tsx +++ b/www/src/components/editor/ColorPreview.tsx @@ -1,5 +1,5 @@ import styled from "styled-components"; -import HighlightColors from "../../types/HighlightColors.ts"; +import HighlightColors from "../../enums/HighlightColors.ts"; const ColorPreview = styled.div<{ color: HighlightColors }>` width: 1.5rem; diff --git a/www/src/components/editor/CommissioningPackageCreationDialog.tsx b/www/src/components/editor/CommissioningPackageCreationDialog.tsx index 66b1ce3..5640525 100644 --- a/www/src/components/editor/CommissioningPackageCreationDialog.tsx +++ b/www/src/components/editor/CommissioningPackageCreationDialog.tsx @@ -5,7 +5,7 @@ import { Label, NativeSelect, } from "@equinor/eds-core-react"; -import HighlightColors from "../../types/HighlightColors.ts"; +import HighlightColors from "../../enums/HighlightColors.ts"; import styled from "styled-components"; import React, { useEffect, useState } from "react"; import CommissioningPackage from "../../types/CommissioningPackage.ts"; diff --git a/www/src/context/CommissioningPackageContext.tsx b/www/src/context/CommissioningPackageContext.tsx index d5de8fa..1cdf76c 100644 --- a/www/src/context/CommissioningPackageContext.tsx +++ b/www/src/context/CommissioningPackageContext.tsx @@ -1,6 +1,6 @@ import React, { createContext, useEffect, useState } from "react"; import CommissioningPackage from "../types/CommissioningPackage.ts"; -import HighlightColors from "../types/HighlightColors.ts"; +import HighlightColors from "../enums/HighlightColors.ts"; export interface CommissioningPackageContextProps { activePackage: CommissioningPackage; diff --git a/www/src/types/HighlightColors.ts b/www/src/enums/HighlightColors.ts similarity index 100% rename from www/src/types/HighlightColors.ts rename to www/src/enums/HighlightColors.ts diff --git a/www/src/types/CommissioningPackage.ts b/www/src/types/CommissioningPackage.ts index b50f6d0..0b0245d 100644 --- a/www/src/types/CommissioningPackage.ts +++ b/www/src/types/CommissioningPackage.ts @@ -1,4 +1,4 @@ -import HighlightColors from "./HighlightColors.ts"; +import HighlightColors from "../enums/HighlightColors.ts"; export default interface CommissioningPackage { id: string; From 601517c840915fec45aa36cc5195f373f503baef Mon Sep 17 00:00:00 2001 From: Nora Kristiansen <106915799+NoraKri@users.noreply.github.com> Date: Wed, 11 Dec 2024 10:16:44 +0100 Subject: [PATCH 13/13] scale SVG to fit but not exceed container --- www/src/App.css | 5 ++++- www/src/components/diagram/Pandid.tsx | 13 +++++++++++-- www/src/components/editor/Editor.tsx | 2 ++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/www/src/App.css b/www/src/App.css index b75a94c..76e4351 100644 --- a/www/src/App.css +++ b/www/src/App.css @@ -1,7 +1,10 @@ body, html { - width: 100%; + width: 100vw; + height: 100vh; margin: 0; + padding: 0; + overflow: hidden; } html, diff --git a/www/src/components/diagram/Pandid.tsx b/www/src/components/diagram/Pandid.tsx index c4e9082..5eb9f98 100644 --- a/www/src/components/diagram/Pandid.tsx +++ b/www/src/components/diagram/Pandid.tsx @@ -11,6 +11,12 @@ import PandidContext from "../../context/PandidContext.ts"; import PipeSystem from "./piping/PipeSystem.tsx"; import { cleanTripleStore } from "../../utils/Triplestore.ts"; import { useCommissioningPackageContext } from "../../hooks/useCommissioningPackageContext.tsx"; +import styled from "styled-components"; + +const SVGContainer = styled.div` + width: 100%; + height: 100%; +`; export default function Pandid() { const context = useCommissioningPackageContext(); @@ -61,7 +67,7 @@ export default function Pandid() { }, [xmlData]); return ( - <> + {xmlData && ( {equipments && equipments.map((equipment: EquipmentProps, index: number) => ( @@ -103,6 +112,6 @@ export default function Pandid() { )} - + ); } diff --git a/www/src/components/editor/Editor.tsx b/www/src/components/editor/Editor.tsx index 3e2328a..ee8dabf 100644 --- a/www/src/components/editor/Editor.tsx +++ b/www/src/components/editor/Editor.tsx @@ -17,6 +17,8 @@ const EditorContainer = styled.div` const SideBarAndPandid = styled.div` display: flex; flex-direction: row; + height: 100%; + width: 100%; `; export default function Editor() {