diff --git a/package.json b/package.json index 4bbe9f8d..6d3d2668 100644 --- a/package.json +++ b/package.json @@ -40,8 +40,7 @@ "react-dom": "^18.2.0", "sass": "^1.71.1", "sql.js": "1.10.2", - "styled-components": "^6.1.8", - "uuid": "^9.0.1" + "styled-components": "^6.1.8" }, "devDependencies": { "@commitlint/cli": "^18.6.1", @@ -58,7 +57,7 @@ "@svgr/core": "^8.1.0", "@svgr/plugin-jsx": "^8.1.0", "@types/chrome": "^0.0.260", - "@types/node": "^20.11.19", + "@types/node": "^20.11.20", "@types/prompts": "^2.4.9", "@types/react": "^18.2.57", "@types/react-dom": "^18.2.19", @@ -77,8 +76,8 @@ "@vitest/coverage-v8": "^1.3.1", "@vitest/ui": "^1.3.1", "chromatic": "^10.9.6", - "cssnano": "^6.0.3", - "cssnano-preset-advanced": "^6.0.3", + "cssnano": "^6.0.4", + "cssnano-preset-advanced": "^6.0.4", "dotenv": "^16.4.5", "es-module-lexer": "^1.4.1", "eslint": "^8.56.0", @@ -88,7 +87,7 @@ "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-jsdoc": "^48.1.0", + "eslint-plugin-jsdoc": "^48.2.0", "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8ee825e5..a3dc12d1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,14 +60,11 @@ dependencies: styled-components: specifier: ^6.1.8 version: 6.1.8(react-dom@18.2.0)(react@18.2.0) - uuid: - specifier: ^9.0.1 - version: 9.0.1 devDependencies: '@commitlint/cli': specifier: ^18.6.1 - version: 18.6.1(@types/node@20.11.19)(typescript@5.3.3) + version: 18.6.1(@types/node@20.11.20)(typescript@5.3.3) '@commitlint/config-conventional': specifier: ^18.6.2 version: 18.6.2 @@ -108,8 +105,8 @@ devDependencies: specifier: ^0.0.260 version: 0.0.260 '@types/node': - specifier: ^20.11.19 - version: 20.11.19 + specifier: ^20.11.20 + version: 20.11.20 '@types/prompts': specifier: ^2.4.9 version: 2.4.9 @@ -165,11 +162,11 @@ devDependencies: specifier: ^10.9.6 version: 10.9.6 cssnano: - specifier: ^6.0.3 - version: 6.0.3(postcss@8.4.35) + specifier: ^6.0.4 + version: 6.0.4(postcss@8.4.35) cssnano-preset-advanced: - specifier: ^6.0.3 - version: 6.0.3(postcss@8.4.35) + specifier: ^6.0.4 + version: 6.0.4(postcss@8.4.35) dotenv: specifier: ^16.4.5 version: 16.4.5 @@ -198,8 +195,8 @@ devDependencies: specifier: ^2.29.1 version: 2.29.1(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) eslint-plugin-jsdoc: - specifier: ^48.1.0 - version: 48.1.0(eslint@8.56.0) + specifier: ^48.2.0 + version: 48.2.0(eslint@8.56.0) eslint-plugin-prettier: specifier: ^5.1.3 version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.2.5) @@ -256,13 +253,13 @@ devDependencies: version: 0.18.5(@svgr/core@8.1.0) vite: specifier: ^5.1.4 - version: 5.1.4(@types/node@20.11.19)(sass@1.71.1) + version: 5.1.4(@types/node@20.11.20)(sass@1.71.1) vite-plugin-inspect: specifier: ^0.8.3 version: 0.8.3(vite@5.1.4) vitest: specifier: ^1.3.1 - version: 1.3.1(@types/node@20.11.19)(@vitest/ui@1.3.1)(sass@1.71.1) + version: 1.3.1(@types/node@20.11.20)(@vitest/ui@1.3.1)(sass@1.71.1) packages: @@ -1575,14 +1572,14 @@ packages: dev: true optional: true - /@commitlint/cli@18.6.1(@types/node@20.11.19)(typescript@5.3.3): + /@commitlint/cli@18.6.1(@types/node@20.11.20)(typescript@5.3.3): resolution: {integrity: sha512-5IDE0a+lWGdkOvKH892HHAZgbAjcj1mT5QrfA/SVbLJV/BbBMGyKN0W5mhgjekPJJwEQdVNvhl9PwUacY58Usw==} engines: {node: '>=v18'} hasBin: true dependencies: '@commitlint/format': 18.6.1 '@commitlint/lint': 18.6.1 - '@commitlint/load': 18.6.1(@types/node@20.11.19)(typescript@5.3.3) + '@commitlint/load': 18.6.1(@types/node@20.11.20)(typescript@5.3.3) '@commitlint/read': 18.6.1 '@commitlint/types': 18.6.1 execa: 5.1.1 @@ -1654,7 +1651,7 @@ packages: '@commitlint/types': 18.6.1 dev: true - /@commitlint/load@18.6.1(@types/node@20.11.19)(typescript@5.3.3): + /@commitlint/load@18.6.1(@types/node@20.11.20)(typescript@5.3.3): resolution: {integrity: sha512-p26x8734tSXUHoAw0ERIiHyW4RaI4Bj99D8YgUlVV9SedLf8hlWAfyIFhHRIhfPngLlCe0QYOdRKYFt8gy56TA==} engines: {node: '>=v18'} dependencies: @@ -1664,7 +1661,7 @@ packages: '@commitlint/types': 18.6.1 chalk: 4.1.2 cosmiconfig: 8.3.6(typescript@5.3.3) - cosmiconfig-typescript-loader: 5.0.0(@types/node@20.11.19)(cosmiconfig@8.3.6)(typescript@5.3.3) + cosmiconfig-typescript-loader: 5.0.0(@types/node@20.11.20)(cosmiconfig@8.3.6)(typescript@5.3.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -2434,7 +2431,7 @@ packages: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.11.19 + '@types/node': 20.11.20 '@types/yargs': 17.0.32 chalk: 4.1.2 dev: true @@ -2453,7 +2450,7 @@ packages: magic-string: 0.27.0 react-docgen-typescript: 2.2.2(typescript@5.3.3) typescript: 5.3.3 - vite: 5.1.4(@types/node@20.11.19)(sass@1.71.1) + vite: 5.1.4(@types/node@20.11.20)(sass@1.71.1) dev: true /@jridgewell/gen-mapping@0.3.3: @@ -3381,7 +3378,7 @@ packages: resolution: {integrity: sha512-O5vnHZNkduvZ95jf1UssbOl6ivIxzl5tv+4EpScPYId7w700bxWsJH+QX7ip6KlrCf2o3iUhmPe8bm05ghG2KA==} dependencies: '@storybook/global': 5.0.0 - tiny-invariant: 1.3.1 + tiny-invariant: 1.3.2 dev: true /@storybook/addon-outline@7.6.17: @@ -3495,7 +3492,7 @@ packages: magic-string: 0.30.7 rollup: 3.29.4 typescript: 5.3.3 - vite: 5.1.4(@types/node@20.11.19)(sass@1.71.1) + vite: 5.1.4(@types/node@20.11.20)(sass@1.71.1) transitivePeerDependencies: - encoding - supports-color @@ -3509,7 +3506,7 @@ packages: '@storybook/global': 5.0.0 qs: 6.11.2 telejson: 7.2.0 - tiny-invariant: 1.3.1 + tiny-invariant: 1.3.2 dev: true /@storybook/cli@7.6.17: @@ -3544,7 +3541,7 @@ packages: get-port: 5.1.1 giget: 1.2.1 globby: 11.1.0 - jscodeshift: 0.15.1(@babel/preset-env@7.23.9) + jscodeshift: 0.15.2(@babel/preset-env@7.23.9) leven: 3.1.0 ora: 5.4.1 prettier: 2.8.8 @@ -3582,7 +3579,7 @@ packages: '@types/cross-spawn': 6.0.6 cross-spawn: 7.0.3 globby: 11.1.0 - jscodeshift: 0.15.1(@babel/preset-env@7.23.9) + jscodeshift: 0.15.2(@babel/preset-env@7.23.9) lodash: 4.17.21 prettier: 2.8.8 recast: 0.23.4 @@ -3627,7 +3624,7 @@ packages: '@storybook/node-logger': 7.6.17 '@storybook/types': 7.6.17 '@types/find-cache-dir': 3.2.1 - '@types/node': 18.19.17 + '@types/node': 18.19.18 '@types/node-fetch': 2.6.11 '@types/pretty-hrtime': 1.0.3 chalk: 4.1.2 @@ -3676,7 +3673,7 @@ packages: '@storybook/telemetry': 7.6.17 '@storybook/types': 7.6.17 '@types/detect-port': 1.3.5 - '@types/node': 18.19.17 + '@types/node': 18.19.18 '@types/pretty-hrtime': 1.0.3 '@types/semver': 7.5.7 better-opn: 3.0.2 @@ -3695,7 +3692,7 @@ packages: read-pkg-up: 7.0.1 semver: 7.6.0 telejson: 7.2.0 - tiny-invariant: 1.3.1 + tiny-invariant: 1.3.2 ts-dedent: 2.2.0 util: 0.12.5 util-deprecate: 1.0.2 @@ -3868,7 +3865,7 @@ packages: react: 18.2.0 react-docgen: 7.0.3 react-dom: 18.2.0(react@18.2.0) - vite: 5.1.4(@types/node@20.11.19)(sass@1.71.1) + vite: 5.1.4(@types/node@20.11.20)(sass@1.71.1) transitivePeerDependencies: - '@preact/preset-vite' - encoding @@ -3898,7 +3895,7 @@ packages: '@storybook/types': 7.6.17 '@types/escodegen': 0.0.6 '@types/estree': 0.0.51 - '@types/node': 18.19.17 + '@types/node': 18.19.18 acorn: 7.4.1 acorn-jsx: 5.3.2(acorn@7.4.1) acorn-walk: 7.2.0 @@ -4302,7 +4299,7 @@ packages: dom-accessibility-api: 0.6.3 lodash: 4.17.21 redent: 3.0.0 - vitest: 1.3.1(@types/node@20.11.19)(@vitest/ui@1.3.1)(sass@1.71.1) + vitest: 1.3.1(@types/node@20.11.20)(@vitest/ui@1.3.1)(sass@1.71.1) dev: true /@testing-library/user-event@14.3.0(@testing-library/dom@9.3.4): @@ -4352,7 +4349,7 @@ packages: resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} dependencies: '@types/connect': 3.4.38 - '@types/node': 20.11.19 + '@types/node': 20.11.20 dev: true /@types/cacheable-request@6.0.3: @@ -4360,7 +4357,7 @@ packages: dependencies: '@types/http-cache-semantics': 4.0.4 '@types/keyv': 3.1.4 - '@types/node': 20.11.19 + '@types/node': 20.11.20 '@types/responselike': 1.0.3 dev: true @@ -4378,13 +4375,13 @@ packages: /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: - '@types/node': 20.11.19 + '@types/node': 20.11.20 dev: true /@types/cross-spawn@6.0.6: resolution: {integrity: sha512-fXRhhUkG4H3TQk5dBhQ7m/JDdSNHKwR2BBia62lhwEIq9xGiQKLxd6LymNhn47SjXhsUEPmxi+PKw2OkW4LLjA==} dependencies: - '@types/node': 20.11.19 + '@types/node': 20.11.20 dev: true /@types/detect-port@1.3.5: @@ -4420,7 +4417,7 @@ packages: /@types/express-serve-static-core@4.17.43: resolution: {integrity: sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==} dependencies: - '@types/node': 20.11.19 + '@types/node': 20.11.20 '@types/qs': 6.9.11 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -4453,13 +4450,13 @@ packages: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 20.11.19 + '@types/node': 20.11.20 dev: true /@types/graceful-fs@4.1.9: resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} dependencies: - '@types/node': 20.11.19 + '@types/node': 20.11.20 dev: true /@types/har-format@1.2.15: @@ -4508,7 +4505,7 @@ packages: /@types/keyv@3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 20.11.19 + '@types/node': 20.11.20 dev: true /@types/lodash@4.14.202: @@ -4542,22 +4539,22 @@ packages: /@types/node-fetch@2.6.11: resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} dependencies: - '@types/node': 20.11.19 + '@types/node': 20.11.20 form-data: 4.0.0 dev: true - /@types/node@16.18.82: - resolution: {integrity: sha512-pcDZtkx9z8XYV+ius2P3Ot2VVrcYOfXffBQUBuiszrlUzKSmoDYqo+mV+IoL8iIiIjjtOMvNSmH1hwJ+Q+f96Q==} + /@types/node@16.18.83: + resolution: {integrity: sha512-TmBqzDY/GeCEmLob/31SunOQnqYE3ZiiuEh1U9o3HqE1E2cqKZQA5RQg4krEguCY3StnkXyDmCny75qyFLx/rA==} dev: true - /@types/node@18.19.17: - resolution: {integrity: sha512-SzyGKgwPzuWp2SHhlpXKzCX0pIOfcI4V2eF37nNBJOhwlegQ83omtVQ1XxZpDE06V/d6AQvfQdPfnw0tRC//Ng==} + /@types/node@18.19.18: + resolution: {integrity: sha512-80CP7B8y4PzZF0GWx15/gVWRrB5y/bIjNI84NK3cmQJu0WZwvmj2WMA5LcofQFVfLqqCSp545+U2LsrVzX36Zg==} dependencies: undici-types: 5.26.5 dev: true - /@types/node@20.11.19: - resolution: {integrity: sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==} + /@types/node@20.11.20: + resolution: {integrity: sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==} dependencies: undici-types: 5.26.5 @@ -4576,7 +4573,7 @@ packages: /@types/prompts@2.4.9: resolution: {integrity: sha512-qTxFi6Buiu8+50/+3DGIWLHM6QuWsEKugJnnP6iv2Mc4ncxE4A/OJkjuVOA+5X0X1S/nq5VJRa8Lu+nwcvbrKA==} dependencies: - '@types/node': 20.11.19 + '@types/node': 20.11.20 kleur: 3.0.3 dev: true @@ -4610,7 +4607,7 @@ packages: /@types/responselike@1.0.3: resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} dependencies: - '@types/node': 20.11.19 + '@types/node': 20.11.20 dev: true /@types/scheduler@0.16.8: @@ -4624,7 +4621,7 @@ packages: resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} dependencies: '@types/mime': 1.3.5 - '@types/node': 20.11.19 + '@types/node': 20.11.20 dev: true /@types/serve-static@1.15.5: @@ -4632,14 +4629,14 @@ packages: dependencies: '@types/http-errors': 2.0.4 '@types/mime': 3.0.4 - '@types/node': 20.11.19 + '@types/node': 20.11.20 dev: true /@types/sql.js@1.4.9: resolution: {integrity: sha512-ep8b36RKHlgWPqjNG9ToUrPiwkhwh0AEzy883mO5Xnd+cL6VBH1EvSjBAAuxLUFF2Vn/moE3Me6v9E1Lo+48GQ==} dependencies: '@types/emscripten': 1.39.10 - '@types/node': 20.11.19 + '@types/node': 20.11.20 dev: false /@types/stylis@4.2.0: @@ -4676,7 +4673,7 @@ packages: resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} requiresBuild: true dependencies: - '@types/node': 20.11.19 + '@types/node': 20.11.20 dev: true optional: true @@ -4889,7 +4886,7 @@ packages: '@unocss/core': 0.58.5 '@unocss/reset': 0.58.5 '@unocss/vite': 0.58.5(vite@5.1.4) - vite: 5.1.4(@types/node@20.11.19)(sass@1.71.1) + vite: 5.1.4(@types/node@20.11.20)(sass@1.71.1) transitivePeerDependencies: - rollup dev: true @@ -5117,7 +5114,7 @@ packages: chokidar: 3.6.0 fast-glob: 3.3.2 magic-string: 0.30.7 - vite: 5.1.4(@types/node@20.11.19)(sass@1.71.1) + vite: 5.1.4(@types/node@20.11.20)(sass@1.71.1) transitivePeerDependencies: - rollup dev: true @@ -5128,7 +5125,7 @@ packages: vite: ^4 || ^5 dependencies: '@swc/core': 1.4.2 - vite: 5.1.4(@types/node@20.11.19)(sass@1.71.1) + vite: 5.1.4(@types/node@20.11.20)(sass@1.71.1) transitivePeerDependencies: - '@swc/helpers' dev: true @@ -5144,7 +5141,7 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.23.3(@babel/core@7.23.9) magic-string: 0.27.0 react-refresh: 0.14.0 - vite: 5.1.4(@types/node@20.11.19)(sass@1.71.1) + vite: 5.1.4(@types/node@20.11.20)(sass@1.71.1) transitivePeerDependencies: - supports-color dev: true @@ -5160,7 +5157,7 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.23.3(@babel/core@7.23.9) '@types/babel__core': 7.20.5 react-refresh: 0.14.0 - vite: 5.1.4(@types/node@20.11.19)(sass@1.71.1) + vite: 5.1.4(@types/node@20.11.20)(sass@1.71.1) transitivePeerDependencies: - supports-color dev: false @@ -5183,7 +5180,7 @@ packages: std-env: 3.7.0 test-exclude: 6.0.0 v8-to-istanbul: 9.2.0 - vitest: 1.3.1(@types/node@20.11.19)(@vitest/ui@1.3.1)(sass@1.71.1) + vitest: 1.3.1(@types/node@20.11.20)(@vitest/ui@1.3.1)(sass@1.71.1) transitivePeerDependencies: - supports-color dev: true @@ -5244,7 +5241,7 @@ packages: pathe: 1.1.2 picocolors: 1.0.0 sirv: 2.0.4 - vitest: 1.3.1(@types/node@20.11.19)(@vitest/ui@1.3.1)(sass@1.71.1) + vitest: 1.3.1(@types/node@20.11.20)(@vitest/ui@1.3.1)(sass@1.71.1) dev: true /@vitest/utils@0.34.7: @@ -5636,7 +5633,7 @@ packages: postcss: ^8.1.0 dependencies: browserslist: 4.23.0 - caniuse-lite: 1.0.30001588 + caniuse-lite: 1.0.30001589 fraction.js: 4.3.7 normalize-range: 0.1.2 picocolors: 1.0.0 @@ -5824,8 +5821,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001588 - electron-to-chromium: 1.4.678 + caniuse-lite: 1.0.30001589 + electron-to-chromium: 1.4.680 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.23.0) @@ -5943,13 +5940,13 @@ packages: resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} dependencies: browserslist: 4.23.0 - caniuse-lite: 1.0.30001588 + caniuse-lite: 1.0.30001589 lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 dev: true - /caniuse-lite@1.0.30001588: - resolution: {integrity: sha512-+hVY9jE44uKLkH0SrUTqxjxqNTOWHsbnQDIKjwkZ3lNTzUUVdBLBGXtj/q5Mp5u98r3droaZAewQuEDzjQdZlQ==} + /caniuse-lite@1.0.30001589: + resolution: {integrity: sha512-vNQWS6kI+q6sBlHbh71IIeC+sRwK2N3EDySc/updIGhIee2x5z00J4c1242/5/d6EpEMdOnk/m+6tuk4/tcsqg==} /capture-stack-trace@1.0.2: resolution: {integrity: sha512-X/WM2UQs6VMHUtjUDnZTRI+i1crWteJySFzr9UpGoQa4WQffXVTTXuekjl7TjZRlcF2XfjgITT0HxZ9RnxeT0w==} @@ -6342,7 +6339,7 @@ packages: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} dev: true - /cosmiconfig-typescript-loader@5.0.0(@types/node@20.11.19)(cosmiconfig@8.3.6)(typescript@5.3.3): + /cosmiconfig-typescript-loader@5.0.0(@types/node@20.11.20)(cosmiconfig@8.3.6)(typescript@5.3.3): resolution: {integrity: sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==} engines: {node: '>=v16'} peerDependencies: @@ -6350,7 +6347,7 @@ packages: cosmiconfig: '>=8.2' typescript: '>=4' dependencies: - '@types/node': 20.11.19 + '@types/node': 20.11.20 cosmiconfig: 8.3.6(typescript@5.3.3) jiti: 1.21.0 typescript: 5.3.3 @@ -6420,7 +6417,7 @@ packages: /css-box-model@1.2.1: resolution: {integrity: sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw==} dependencies: - tiny-invariant: 1.3.1 + tiny-invariant: 1.3.2 dev: false /css-color-keywords@1.0.0: @@ -6486,23 +6483,23 @@ packages: hasBin: true dev: true - /cssnano-preset-advanced@6.0.3(postcss@8.4.35): - resolution: {integrity: sha512-+DIOR5FFId+nb6/JcBkAMiXYDadEx2waDmSDhAA3rL1Q1N1AaZP0N25jiZnqLp3MdWnRg9t9CNaDs/OdB/lpPg==} + /cssnano-preset-advanced@6.0.4(postcss@8.4.35): + resolution: {integrity: sha512-39k8L0dQDOI0+stDQc68UMg9tKKWJcnFSMhpnB7lvkg5X3ogvrjk4vU06RKvrUBR2XTPnYr2NaX4sc1LEvNyUA==} engines: {node: ^14 || ^16 || >=18.0} peerDependencies: postcss: ^8.4.31 dependencies: autoprefixer: 10.4.17(postcss@8.4.35) - cssnano-preset-default: 6.0.3(postcss@8.4.35) + cssnano-preset-default: 6.0.4(postcss@8.4.35) postcss: 8.4.35 - postcss-discard-unused: 6.0.2(postcss@8.4.35) - postcss-merge-idents: 6.0.1(postcss@8.4.35) + postcss-discard-unused: 6.0.3(postcss@8.4.35) + postcss-merge-idents: 6.0.2(postcss@8.4.35) postcss-reduce-idents: 6.0.2(postcss@8.4.35) postcss-zindex: 6.0.1(postcss@8.4.35) dev: true - /cssnano-preset-default@6.0.3(postcss@8.4.35): - resolution: {integrity: sha512-4y3H370aZCkT9Ev8P4SO4bZbt+AExeKhh8wTbms/X7OLDo5E7AYUUy6YPxa/uF5Grf+AJwNcCnxKhZynJ6luBA==} + /cssnano-preset-default@6.0.4(postcss@8.4.35): + resolution: {integrity: sha512-mvyBIFHaFA4lkBwePlB9Gycnf/rgFQRKcP/yHG/tbD0ZuIdCDSF1GoL4QC4gcp8qaJOkmVmb0mCXMR6Wi4Da0A==} engines: {node: ^14 || ^16 || >=18.0} peerDependencies: postcss: ^8.4.31 @@ -6512,10 +6509,10 @@ packages: postcss: 8.4.35 postcss-calc: 9.0.1(postcss@8.4.35) postcss-colormin: 6.0.2(postcss@8.4.35) - postcss-convert-values: 6.0.2(postcss@8.4.35) + postcss-convert-values: 6.0.3(postcss@8.4.35) postcss-discard-comments: 6.0.1(postcss@8.4.35) - postcss-discard-duplicates: 6.0.1(postcss@8.4.35) - postcss-discard-empty: 6.0.1(postcss@8.4.35) + postcss-discard-duplicates: 6.0.2(postcss@8.4.35) + postcss-discard-empty: 6.0.2(postcss@8.4.35) postcss-discard-overridden: 6.0.1(postcss@8.4.35) postcss-merge-longhand: 6.0.2(postcss@8.4.35) postcss-merge-rules: 6.0.3(postcss@8.4.35) @@ -6548,13 +6545,13 @@ packages: postcss: 8.4.35 dev: true - /cssnano@6.0.3(postcss@8.4.35): - resolution: {integrity: sha512-MRq4CIj8pnyZpcI2qs6wswoYoDD1t0aL28n+41c1Ukcpm56m1h6mCexIHBGjfZfnTqtGSSCP4/fB1ovxgjBOiw==} + /cssnano@6.0.4(postcss@8.4.35): + resolution: {integrity: sha512-Bp607LopXmwV9TPUxw76yvcvRk4AYrrtHtLsndAnSWUwT4xgaiC6Eaa44cZ6ciu9J7Sqv9zocMTDcyQnU4dihw==} engines: {node: ^14 || ^16 || >=18.0} peerDependencies: postcss: ^8.4.31 dependencies: - cssnano-preset-default: 6.0.3(postcss@8.4.35) + cssnano-preset-default: 6.0.4(postcss@8.4.35) lilconfig: 3.1.1 postcss: 8.4.35 dev: true @@ -6946,8 +6943,8 @@ packages: jake: 10.8.7 dev: true - /electron-to-chromium@1.4.678: - resolution: {integrity: sha512-NbdGC2p0O5Q5iVhLEsNBSfytaw7wbEFJlIvaF71wi6QDtLAph5/rVogjyOpf/QggJIt8hNK3KdwNJnc2bzckbw==} + /electron-to-chromium@1.4.680: + resolution: {integrity: sha512-4nToZ5jlPO14W82NkF32wyjhYqQByVaDmLy4J2/tYcAbJfgO2TKJC780Az1V13gzq4l73CJ0yuyalpXvxXXD9A==} /electron@23.3.13: resolution: {integrity: sha512-BaXtHEb+KYKLouUXlUVDa/lj9pj4F5kiE0kwFdJV84Y2EU7euIDgPthfKtchhr5MVHmjtavRMIV/zAwEiSQ9rQ==} @@ -6956,7 +6953,7 @@ packages: requiresBuild: true dependencies: '@electron/get': 2.0.3 - '@types/node': 16.18.82 + '@types/node': 16.18.83 extract-zip: 2.0.1 transitivePeerDependencies: - supports-color @@ -7436,8 +7433,8 @@ packages: - supports-color dev: true - /eslint-plugin-jsdoc@48.1.0(eslint@8.56.0): - resolution: {integrity: sha512-g9S8ukmTd1DVcV/xeBYPPXOZ6rc8WJ4yi0+MVxJ1jBOrz5kmxV9gJJQ64ltCqIWFnBChLIhLVx3tbTSarqVyFA==} + /eslint-plugin-jsdoc@48.2.0(eslint@8.56.0): + resolution: {integrity: sha512-O2B1XLBJnUCRkggFzUQ+PBYJDit8iAgXdlu8ucolqGrbmOWPvttZQZX8d1sC0MbqDMSLs8SHSQxaNPRY1RQREg==} engines: {node: '>=18'} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 @@ -7711,7 +7708,7 @@ packages: human-signals: 5.0.0 is-stream: 3.0.0 merge-stream: 2.0.0 - npm-run-path: 5.2.0 + npm-run-path: 5.3.0 onetime: 6.0.0 signal-exit: 4.1.0 strip-final-newline: 3.0.0 @@ -9103,7 +9100,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 20.11.19 + '@types/node': 20.11.20 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -9126,7 +9123,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.11.19 + '@types/node': 20.11.20 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -9137,7 +9134,7 @@ packages: resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 20.11.19 + '@types/node': 20.11.20 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -9170,8 +9167,8 @@ packages: argparse: 2.0.1 dev: true - /jscodeshift@0.15.1(@babel/preset-env@7.23.9): - resolution: {integrity: sha512-hIJfxUy8Rt4HkJn/zZPU9ChKfKZM1342waJ1QC2e2YsPcWhM+3BJ4dcfQCzArTrk1jJeNLB341H+qOcEHRxJZg==} + /jscodeshift@0.15.2(@babel/preset-env@7.23.9): + resolution: {integrity: sha512-FquR7Okgmc4Sd0aEDwqho3rEiKR3BdvuG9jfdHjLJ6JQoWSMpavug3AoIfnfWhxFlf+5pzQh8qjqz0DWFrNQzA==} hasBin: true peerDependencies: '@babel/preset-env': ^7.1.6 @@ -9963,8 +9960,8 @@ packages: path-key: 3.1.1 dev: true - /npm-run-path@5.2.0: - resolution: {integrity: sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==} + /npm-run-path@5.3.0: + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: path-key: 4.0.0 @@ -10446,8 +10443,8 @@ packages: postcss-value-parser: 4.2.0 dev: true - /postcss-convert-values@6.0.2(postcss@8.4.35): - resolution: {integrity: sha512-aeBmaTnGQ+NUSVQT8aY0sKyAD/BaLJenEKZ03YK0JnDE1w1Rr8XShoxdal2V2H26xTJKr3v5haByOhJuyT4UYw==} + /postcss-convert-values@6.0.3(postcss@8.4.35): + resolution: {integrity: sha512-Tj+VH3GtQxvBVX6hhggIUaAMLDbqoHgsAFeZ8iCOD03hnho+wrOF2IsahY9o4MANtaJEjqABrhD1SqwIILGH9A==} engines: {node: ^14 || ^16 || >=18.0} peerDependencies: postcss: ^8.4.31 @@ -10466,8 +10463,8 @@ packages: postcss: 8.4.35 dev: true - /postcss-discard-duplicates@6.0.1(postcss@8.4.35): - resolution: {integrity: sha512-1hvUs76HLYR8zkScbwyJ8oJEugfPV+WchpnA+26fpJ7Smzs51CzGBHC32RS03psuX/2l0l0UKh2StzNxOrKCYg==} + /postcss-discard-duplicates@6.0.2(postcss@8.4.35): + resolution: {integrity: sha512-U2rsj4w6pAGROCCcD13LP2eBIi1whUsXs4kgE6xkIuGfkbxCBSKhkCTWyowFd66WdVlLv0uM1euJKIgmdmZObg==} engines: {node: ^14 || ^16 || >=18.0} peerDependencies: postcss: ^8.4.31 @@ -10475,8 +10472,8 @@ packages: postcss: 8.4.35 dev: true - /postcss-discard-empty@6.0.1(postcss@8.4.35): - resolution: {integrity: sha512-yitcmKwmVWtNsrrRqGJ7/C0YRy53i0mjexBDQ9zYxDwTWVBgbU4+C9jIZLmQlTDT9zhml+u0OMFJh8+31krmOg==} + /postcss-discard-empty@6.0.2(postcss@8.4.35): + resolution: {integrity: sha512-rj6pVC2dVCJrP0Y2RkYTQEbYaCf4HEm+R/2StQgJqGHxAa3+KcYslNQhcRqjLHtl/4wpzipJluaJLqBj6d5eDQ==} engines: {node: ^14 || ^16 || >=18.0} peerDependencies: postcss: ^8.4.31 @@ -10493,8 +10490,8 @@ packages: postcss: 8.4.35 dev: true - /postcss-discard-unused@6.0.2(postcss@8.4.35): - resolution: {integrity: sha512-wr3lRPahxARmjow5BWML+9bD9D1u6FpfxlWg4lZqCIwvQLBZQD/S0Rq6A/juQwVFVXvMeRGa9TX1vpXuQ6FhTQ==} + /postcss-discard-unused@6.0.3(postcss@8.4.35): + resolution: {integrity: sha512-f0m/zO6BONjcZmp2VQe5CwCQvrcm89DJxYhOgV/nXbMY59j/gxyyx/utMJ18SKSRzutaQd66o+0cj0/yGfNenA==} engines: {node: ^14 || ^16 || >=18.0} peerDependencies: postcss: ^8.4.31 @@ -10503,8 +10500,8 @@ packages: postcss-selector-parser: 6.0.15 dev: true - /postcss-merge-idents@6.0.1(postcss@8.4.35): - resolution: {integrity: sha512-ApqNUkzl3MJP+43DIIvoer98t7tcDVAcnLeAKjuTIM7HkMk8NXB6eqscMIjwQISwoSeE0WrEyIqVy+HoHAVcZw==} + /postcss-merge-idents@6.0.2(postcss@8.4.35): + resolution: {integrity: sha512-1fJqEzpgyjuec8UR9WdUDvCU0NhHVwKm4JK2Vk2Xv7RB+zpssSGFNE5Xwa0fmQYFxAwfb824monvKAyqLTGsSw==} engines: {node: ^14 || ^16 || >=18.0} peerDependencies: postcss: ^8.4.31 @@ -12300,8 +12297,8 @@ packages: engines: {node: '>=0.10.0'} dev: true - /tiny-invariant@1.3.1: - resolution: {integrity: sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==} + /tiny-invariant@1.3.2: + resolution: {integrity: sha512-oLXoWt7bk7SI3REp16Hesm0kTBTErhk+FWTvuujYMlIbX42bb3yLN98T3OyzFNkZ3WAjVYDL4sWykCR6kD2mqQ==} /tinybench@2.6.0: resolution: {integrity: sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==} @@ -12645,7 +12642,7 @@ packages: '@unocss/transformer-directives': 0.58.5 '@unocss/transformer-variant-group': 0.58.5 '@unocss/vite': 0.58.5(vite@5.1.4) - vite: 5.1.4(@types/node@20.11.19)(sass@1.71.1) + vite: 5.1.4(@types/node@20.11.20)(sass@1.71.1) transitivePeerDependencies: - postcss - rollup @@ -12833,6 +12830,7 @@ packages: /uuid@9.0.1: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true + dev: true /v8-to-istanbul@9.2.0: resolution: {integrity: sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==} @@ -12855,7 +12853,7 @@ packages: engines: {node: '>= 0.8'} dev: true - /vite-node@1.3.1(@types/node@20.11.19)(sass@1.71.1): + /vite-node@1.3.1(@types/node@20.11.20)(sass@1.71.1): resolution: {integrity: sha512-azbRrqRxlWTJEVbzInZCTchx0X69M/XPTCz4H+TLvlTcR/xH/3hkRqhOakT41fMJCMzXTu4UvegkZiEoJAWvng==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -12864,7 +12862,7 @@ packages: debug: 4.3.4 pathe: 1.1.2 picocolors: 1.0.0 - vite: 5.1.4(@types/node@20.11.19)(sass@1.71.1) + vite: 5.1.4(@types/node@20.11.20)(sass@1.71.1) transitivePeerDependencies: - '@types/node' - less @@ -12895,13 +12893,13 @@ packages: perfect-debounce: 1.0.0 picocolors: 1.0.0 sirv: 2.0.4 - vite: 5.1.4(@types/node@20.11.19)(sass@1.71.1) + vite: 5.1.4(@types/node@20.11.20)(sass@1.71.1) transitivePeerDependencies: - rollup - supports-color dev: true - /vite@5.1.4(@types/node@20.11.19)(sass@1.71.1): + /vite@5.1.4(@types/node@20.11.20)(sass@1.71.1): resolution: {integrity: sha512-n+MPqzq+d9nMVTKyewqw6kSt+R3CkvF9QAKY8obiQn8g1fwTscKxyfaYnC632HtBXAQGc1Yjomphwn1dtwGAHg==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -12929,7 +12927,7 @@ packages: terser: optional: true dependencies: - '@types/node': 20.11.19 + '@types/node': 20.11.20 esbuild: 0.19.12 postcss: 8.4.35 rollup: 4.12.0 @@ -12937,7 +12935,7 @@ packages: optionalDependencies: fsevents: 2.3.3 - /vitest@1.3.1(@types/node@20.11.19)(@vitest/ui@1.3.1)(sass@1.71.1): + /vitest@1.3.1(@types/node@20.11.20)(@vitest/ui@1.3.1)(sass@1.71.1): resolution: {integrity: sha512-/1QJqXs8YbCrfv/GPQ05wAZf2eakUPLPa18vkJAKE7RXOKfVHqMZZ1WlTjiwl6Gcn65M5vpNUB6EFLnEdRdEXQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -12962,7 +12960,7 @@ packages: jsdom: optional: true dependencies: - '@types/node': 20.11.19 + '@types/node': 20.11.20 '@vitest/expect': 1.3.1 '@vitest/runner': 1.3.1 '@vitest/snapshot': 1.3.1 @@ -12981,8 +12979,8 @@ packages: strip-literal: 2.0.0 tinybench: 2.6.0 tinypool: 0.8.2 - vite: 5.1.4(@types/node@20.11.19)(sass@1.71.1) - vite-node: 1.3.1(@types/node@20.11.19)(sass@1.71.1) + vite: 5.1.4(@types/node@20.11.20)(sass@1.71.1) + vite-node: 1.3.1(@types/node@20.11.20)(sass@1.71.1) why-is-node-running: 2.2.2 transitivePeerDependencies: - less diff --git a/src/stories/components/PopupMain.stories.tsx b/src/stories/components/PopupMain.stories.tsx index f2e13471..61c9197b 100644 --- a/src/stories/components/PopupMain.stories.tsx +++ b/src/stories/components/PopupMain.stories.tsx @@ -8,6 +8,7 @@ const meta = { layout: 'centered', }, tags: ['autodocs'], + args: {}, argTypes: {}, } satisfies Meta; export default meta; diff --git a/src/stories/injected/CourseCatalogInjectedPopup.stories.ts b/src/stories/injected/CourseCatalogInjectedPopup.stories.ts index 77d72251..bb063565 100644 --- a/src/stories/injected/CourseCatalogInjectedPopup.stories.ts +++ b/src/stories/injected/CourseCatalogInjectedPopup.stories.ts @@ -1,55 +1,8 @@ -import { Course, Status } from '@shared/types/Course'; -import { CourseMeeting, DAY_MAP } from '@shared/types/CourseMeeting'; -import { CourseSchedule } from '@shared/types/CourseSchedule'; -import Instructor from '@shared/types/Instructor'; import { UserSchedule } from '@shared/types/UserSchedule'; import type { Meta, StoryObj } from '@storybook/react'; import CourseCatalogInjectedPopup from '@views/components/injected/CourseCatalogInjectedPopup/CourseCatalogInjectedPopup'; -const exampleCourse: Course = new Course({ - uniqueId: 50805, - number: '314', - fullName: 'C S 314 DATA STRUCTURES', - courseName: 'DATA STRUCTURES', - department: 'C S', - creditHours: 3, - status: Status.OPEN, - instructors: [ - new Instructor({ fullName: 'SCOTT, MICHAEL', firstName: 'MICHAEL', lastName: 'SCOTT', middleInitial: 'D' }), - ], - isReserved: true, - description: [ - 'Second part of a two-part sequence in programming. Introduction to specifications, simple unit testing, and debugging; building and using canonical data structures; algorithm analysis and reasoning techniques such as assertions and invariants.', - 'Computer Science 314 and 314H may not both be counted.', - 'BVO 311C and 312H may not both be counted.', - 'Prerequisite: Computer Science 312 or 312H with a grade of at least C-.', - 'May be counted toward the Quantitative Reasoning flag requirement.', - ], - schedule: new CourseSchedule({ - meetings: [ - new CourseMeeting({ - days: [DAY_MAP.T, DAY_MAP.TH], - startTime: 480, - endTime: 570, - location: { building: 'UTC', room: '123' }, - }), - new CourseMeeting({ - days: [DAY_MAP.TH], - startTime: 570, - endTime: 630, - location: { building: 'JES', room: '123' }, - }), - ], - }), - url: 'https://utdirect.utexas.edu/apps/registrar/course_schedule/20242/12345/', - flags: ['Writing', 'Independent Inquiry'], - instructionMode: 'In Person', - semester: { - code: '12345', - year: 2024, - season: 'Spring', - }, -}); +import { exampleCourse } from './mocked'; const exampleSchedule: UserSchedule = new UserSchedule({ courses: [exampleCourse], @@ -57,20 +10,40 @@ const exampleSchedule: UserSchedule = new UserSchedule({ hours: 0, }); -const meta: Meta = { +const meta = { title: 'Components/Injected/CourseCatalogInjectedPopup', component: CourseCatalogInjectedPopup, - argTypes: { - onClose: { action: 'onClose' }, + args: { + course: exampleCourse, + activeSchedule: exampleSchedule, + onClose: () => {}, }, -}; + argTypes: { + course: { + control: { + type: 'object', + }, + }, + activeSchedule: { + control: { + type: 'object', + }, + }, + onClose: { + control: { + type: 'function', + }, + }, + }, +} satisfies Meta; export default meta; -type Story = StoryObj; +type Story = StoryObj; export const Default: Story = { args: { course: exampleCourse, activeSchedule: exampleSchedule, + onClose: () => {}, }, }; diff --git a/src/stories/injected/CoursePopup.stories.ts b/src/stories/injected/CoursePopup.stories.ts index 58fc7fd0..d9a3895c 100644 --- a/src/stories/injected/CoursePopup.stories.ts +++ b/src/stories/injected/CoursePopup.stories.ts @@ -1,64 +1,9 @@ import { Course, Status } from '@shared/types/Course'; -import { CourseMeeting } from '@shared/types/CourseMeeting'; -import Instructor from '@shared/types/Instructor'; import { UserSchedule } from '@shared/types/UserSchedule'; import type { Meta, StoryObj } from '@storybook/react'; import CoursePopup from '@views/components/injected/CoursePopupOld/CoursePopup'; -const exampleCourse: Course = new Course({ - courseName: 'ELEMS OF COMPTRS/PROGRAMMNG-WB', - creditHours: 3, - department: 'C S', - description: [ - 'Problem solving and fundamental algorithms for various applications in science, business, and on the World Wide Web, and introductory programming in a modern object-oriented programming language.', - 'Only one of the following may be counted: Computer Science 303E, 312, 312H. Credit for Computer Science 303E may not be earned after a student has received credit for Computer Science 314, or 314H. May not be counted toward a degree in computer science.', - 'May be counted toward the Quantitative Reasoning flag requirement.', - 'Designed to accommodate 100 or more students.', - 'Taught as a Web-based course.', - ], - flags: ['Quantitative Reasoning'], - fullName: 'C S 303E ELEMS OF COMPTRS/PROGRAMMNG-WB', - instructionMode: 'Online', - instructors: [ - new Instructor({ - firstName: 'William', - lastName: 'Young', - middleInitial: 'D', - fullName: 'William D Young', - }), - new Instructor({ - firstName: 'William', - lastName: 'Young', - middleInitial: 'D', - fullName: 'William D Young', - }), - ], - isReserved: false, - number: '303E', - schedule: { - meetings: [ - new CourseMeeting({ - days: ['Tuesday', 'Thursday'], - endTime: 660, - startTime: 570, - }), - ], - }, - semester: { - code: '12345', - season: 'Spring', - year: 2024, - }, - status: Status.CANCELLED, - uniqueId: 12345, - url: 'https://utdirect.utexas.edu/apps/registrar/course_schedule/20242/12345/', -}); - -const exampleSchedule: UserSchedule = new UserSchedule({ - courses: [exampleCourse], - name: 'Example Schedule', - hours: 0, -}); +import { exampleCourse, exampleSchedule } from './mocked'; const meta = { title: 'Components/Injected/CoursePopup', diff --git a/src/stories/injected/mocked.ts b/src/stories/injected/mocked.ts new file mode 100644 index 00000000..b3e256db --- /dev/null +++ b/src/stories/injected/mocked.ts @@ -0,0 +1,59 @@ +import { Course, Status } from '@shared/types/Course'; +import { CourseMeeting } from '@shared/types/CourseMeeting'; +import Instructor from '@shared/types/Instructor'; +import { UserSchedule } from '@shared/types/UserSchedule'; + +export const exampleCourse: Course = new Course({ + courseName: 'ELEMS OF COMPTRS/PROGRAMMNG-WB', + creditHours: 3, + department: 'C S', + description: [ + 'Problem solving and fundamental algorithms for various applications in science, business, and on the World Wide Web, and introductory programming in a modern object-oriented programming language.', + 'Only one of the following may be counted: Computer Science 303E, 312, 312H. Credit for Computer Science 303E may not be earned after a student has received credit for Computer Science 314, or 314H. May not be counted toward a degree in computer science.', + 'May be counted toward the Quantitative Reasoning flag requirement.', + 'Designed to accommodate 100 or more students.', + 'Taught as a Web-based course.', + ], + flags: ['Quantitative Reasoning'], + fullName: 'C S 303E ELEMS OF COMPTRS/PROGRAMMNG-WB', + instructionMode: 'Online', + instructors: [ + new Instructor({ + firstName: 'William', + lastName: 'Young', + middleInitial: 'D', + fullName: 'William D Young', + }), + new Instructor({ + firstName: 'William', + lastName: 'Young', + middleInitial: 'D', + fullName: 'William D Young', + }), + ], + isReserved: false, + number: '303E', + schedule: { + meetings: [ + new CourseMeeting({ + days: ['Tuesday', 'Thursday'], + endTime: 660, + startTime: 570, + }), + ], + }, + semester: { + code: '12345', + season: 'Spring', + year: 2024, + }, + status: Status.CANCELLED, + uniqueId: 12345, + url: 'https://utdirect.utexas.edu/apps/registrar/course_schedule/20242/12345/', +}); + +export const exampleSchedule: UserSchedule = new UserSchedule({ + courses: [exampleCourse], + name: 'Example Schedule', + hours: 0, +}); diff --git a/src/views/components/injected/CourseCatalogInjectedPopup/CourseCatalogInjectedPopup.tsx b/src/views/components/injected/CourseCatalogInjectedPopup/CourseCatalogInjectedPopup.tsx index 8422c228..b0febb39 100644 --- a/src/views/components/injected/CourseCatalogInjectedPopup/CourseCatalogInjectedPopup.tsx +++ b/src/views/components/injected/CourseCatalogInjectedPopup/CourseCatalogInjectedPopup.tsx @@ -1,7 +1,7 @@ +import type { Course } from '@shared/types/Course'; +import type { UserSchedule } from '@shared/types/UserSchedule'; import Popup from '@views/components/common/Popup/Popup'; import React from 'react'; -import type { Course } from 'src/shared/types/Course'; -import type { UserSchedule } from 'src/shared/types/UserSchedule'; import Description from './Description'; import GradeDistribution from './GradeDistribution'; @@ -23,13 +23,18 @@ interface CourseCatalogInjectedPopupProps { * @param {Function} props.onClose - The function to close the popup. * @returns {JSX.Element} The CourseCatalogInjectedPopup component. */ -const CourseCatalogInjectedPopup: React.FC = ({ course, activeSchedule, onClose }) => ( - -
- - - -
-
-); -export default CourseCatalogInjectedPopup; +export default function CourseCatalogInjectedPopup({ + course, + activeSchedule, + onClose, +}: CourseCatalogInjectedPopupProps) { + return ( + +
+ + + +
+
+ ); +}