From ea5ab9376f459b45d05d88a6febfb08fd900769b Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Fri, 4 Mar 2022 19:19:36 +1100 Subject: [PATCH] Consolidate forms & other minor fixes --- package.json | 15 +- pnpm-lock.yaml | 474 +++++++++--------- src/App.tsx | 25 +- src/components/Tabs.tsx | 2 +- src/components/generic/Card.tsx | 57 +-- src/components/generic/Modal.tsx | 6 +- .../generic/Sidebar/CollapsibleSection.tsx | 23 +- src/components/generic/form/Form.tsx | 20 +- .../layout/Sidebar/Settings/Channels.tsx | 18 +- .../Settings/{Radio.tsx => Device.tsx} | 41 +- .../layout/Sidebar/Settings/Display.tsx | 56 +++ .../layout/Sidebar/Settings/GPS.tsx | 131 +++++ .../layout/Sidebar/Settings/Index.tsx | 158 +++--- .../layout/Sidebar/Settings/LoRa.tsx | 65 +++ .../layout/Sidebar/Settings/Position.tsx | 158 ------ .../layout/Sidebar/Settings/Power.tsx | 103 ++-- .../layout/Sidebar/Settings/User.tsx | 112 ++--- .../layout/Sidebar/Settings/WiFi.tsx | 72 +-- .../Sidebar/Settings/channels/Channels.tsx | 112 ++--- .../Settings/channels/ChannelsGroup.tsx | 4 +- .../Settings/modules/CannedMessage.tsx | 99 ++++ .../modules/ExternalNotifications.tsx | 84 ++++ .../layout/Sidebar/Settings/modules/MQTT.tsx | 68 +++ .../{plugins => modules}/RangeTest.tsx | 59 +-- .../Sidebar/Settings/modules/Serial.tsx | 95 ++++ .../Sidebar/Settings/modules/StoreForward.tsx | 82 +++ .../Sidebar/Settings/modules/Telemetry.tsx | 83 +++ .../plugins/ExternalNotifications.tsx | 99 ---- .../Sidebar/Settings/plugins/Serial.tsx | 102 ---- .../Sidebar/Settings/plugins/StoreForward.tsx | 97 ---- src/components/layout/index.tsx | 11 +- src/components/menu/BottomNav.tsx | 5 +- src/components/modals/VersionInfo.tsx | 13 +- src/core/slices/mapSlice.ts | 2 +- src/pages/Extensions/Debug.tsx | 6 +- src/pages/Extensions/FileBrowser.tsx | 4 +- src/pages/Extensions/Index.tsx | 5 +- src/pages/Extensions/Info.tsx | 6 +- src/pages/Extensions/Logs.tsx | 8 +- src/pages/Nodes/NodeCard.tsx | 2 +- src/pages/Nodes/index.tsx | 2 +- src/pages/NotFound.tsx | 2 +- 42 files changed, 1426 insertions(+), 1160 deletions(-) rename src/components/layout/Sidebar/Settings/{Radio.tsx => Device.tsx} (51%) create mode 100644 src/components/layout/Sidebar/Settings/Display.tsx create mode 100644 src/components/layout/Sidebar/Settings/GPS.tsx create mode 100644 src/components/layout/Sidebar/Settings/LoRa.tsx delete mode 100644 src/components/layout/Sidebar/Settings/Position.tsx create mode 100644 src/components/layout/Sidebar/Settings/modules/CannedMessage.tsx create mode 100644 src/components/layout/Sidebar/Settings/modules/ExternalNotifications.tsx create mode 100644 src/components/layout/Sidebar/Settings/modules/MQTT.tsx rename src/components/layout/Sidebar/Settings/{plugins => modules}/RangeTest.tsx (52%) create mode 100644 src/components/layout/Sidebar/Settings/modules/Serial.tsx create mode 100644 src/components/layout/Sidebar/Settings/modules/StoreForward.tsx create mode 100644 src/components/layout/Sidebar/Settings/modules/Telemetry.tsx delete mode 100644 src/components/layout/Sidebar/Settings/plugins/ExternalNotifications.tsx delete mode 100644 src/components/layout/Sidebar/Settings/plugins/Serial.tsx delete mode 100644 src/components/layout/Sidebar/Settings/plugins/StoreForward.tsx diff --git a/package.json b/package.json index ade75371..534d323e 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Meshtastic web client", "license": "GPL-3.0-only", "scripts": { - "dev": "vite", + "dev": "vite --host", "build": "tsc && vite build", "preview": "vite preview", "package": "gzipper c -i html,js,css,png,ico,svg,webmanifest,txt dist dist/output && tar -cvf dist/build.tar -C ./dist/output/ $(ls ./dist/output/)", @@ -22,7 +22,7 @@ "dependencies": { "@emeraldpay/hashicon-react": "^0.5.2", "@meshtastic/eslint-config": "^1.0.6", - "@meshtastic/meshtasticjs": "^0.6.48", + "@meshtastic/meshtasticjs": "^0.6.50", "@reduxjs/toolkit": "^1.8.0", "@tippyjs/react": "^4.2.6", "base64-js": "^1.5.1", @@ -31,9 +31,8 @@ "prettier": "^2.5.1", "react": "^17.0.2", "react-dom": "^17.0.2", - "react-draggable": "^4.4.4", "react-error-boundary": "^3.1.4", - "react-flow-renderer": "^10.0.0-next.45", + "react-flow-renderer": "^10.0.0-next.48", "react-hook-form": "^7.27.1", "react-icons": "^4.3.1", "react-json-pretty": "^2.2.0", @@ -49,9 +48,9 @@ }, "devDependencies": { "@hookform/devtools": "^4.0.2", - "@types/mapbox-gl": "^2.6.2", + "@types/mapbox-gl": "^2.6.3", "@types/react": "^17.0.39", - "@types/react-dom": "^17.0.11", + "@types/react-dom": "^17.0.13", "@types/w3c-web-serial": "^1.0.2", "@types/web-bluetooth": "^0.0.12", "@vitejs/plugin-react": "^1.2.0", @@ -63,9 +62,9 @@ "tar": "^6.1.11", "typescript": "^4.6.2", "unimported": "^1.19.1", - "vite": "^2.8.5", + "vite": "^2.8.6", "vite-plugin-cdn-import": "^0.3.5", "vite-plugin-pwa": "^0.11.13", - "workbox-window": "^6.5.0" + "workbox-window": "^6.5.1" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f3087369..e2af5631 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,12 +4,12 @@ specifiers: '@emeraldpay/hashicon-react': ^0.5.2 '@hookform/devtools': ^4.0.2 '@meshtastic/eslint-config': ^1.0.6 - '@meshtastic/meshtasticjs': ^0.6.48 + '@meshtastic/meshtasticjs': ^0.6.50 '@reduxjs/toolkit': ^1.8.0 '@tippyjs/react': ^4.2.6 - '@types/mapbox-gl': ^2.6.2 + '@types/mapbox-gl': ^2.6.3 '@types/react': ^17.0.39 - '@types/react-dom': ^17.0.11 + '@types/react-dom': ^17.0.13 '@types/w3c-web-serial': ^1.0.2 '@types/web-bluetooth': ^0.0.12 '@vitejs/plugin-react': ^1.2.0 @@ -22,9 +22,8 @@ specifiers: prettier: ^2.5.1 react: ^17.0.2 react-dom: ^17.0.2 - react-draggable: ^4.4.4 react-error-boundary: ^3.1.4 - react-flow-renderer: ^10.0.0-next.45 + react-flow-renderer: ^10.0.0-next.48 react-hook-form: ^7.27.1 react-icons: ^4.3.1 react-json-pretty: ^2.2.0 @@ -41,16 +40,16 @@ specifiers: type-route: ^0.6.0 typescript: ^4.6.2 unimported: ^1.19.1 - vite: ^2.8.5 + vite: ^2.8.6 vite-plugin-cdn-import: ^0.3.5 vite-plugin-environment: ^1.1.0 vite-plugin-pwa: ^0.11.13 - workbox-window: ^6.5.0 + workbox-window: ^6.5.1 dependencies: '@emeraldpay/hashicon-react': 0.5.2 '@meshtastic/eslint-config': 1.0.6 - '@meshtastic/meshtasticjs': 0.6.48 + '@meshtastic/meshtasticjs': 0.6.50 '@reduxjs/toolkit': 1.8.0_react-redux@7.2.6+react@17.0.2 '@tippyjs/react': 4.2.6_react-dom@17.0.2+react@17.0.2 base64-js: 1.5.1 @@ -59,9 +58,8 @@ dependencies: prettier: 2.5.1 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 - react-draggable: 4.4.4_react-dom@17.0.2+react@17.0.2 react-error-boundary: 3.1.4_react@17.0.2 - react-flow-renderer: 10.0.0-next.45_react-dom@17.0.2+react@17.0.2 + react-flow-renderer: 10.0.0-next.48_react-dom@17.0.2+react@17.0.2 react-hook-form: 7.27.1_react@17.0.2 react-icons: 4.3.1_react@17.0.2 react-json-pretty: 2.2.0_react-dom@17.0.2+react@17.0.2 @@ -73,13 +71,13 @@ dependencies: timeago-react: 3.0.4_react@17.0.2 tippy.js: 6.3.7 type-route: 0.6.0 - vite-plugin-environment: 1.1.0_vite@2.8.5 + vite-plugin-environment: 1.1.0_vite@2.8.6 devDependencies: '@hookform/devtools': 4.0.2_e7a5d0029673a64b6216c38417fa4fd0 - '@types/mapbox-gl': 2.6.2 + '@types/mapbox-gl': 2.6.3 '@types/react': 17.0.39 - '@types/react-dom': 17.0.11 + '@types/react-dom': 17.0.13 '@types/w3c-web-serial': 1.0.2 '@types/web-bluetooth': 0.0.12 '@vitejs/plugin-react': 1.2.0 @@ -91,10 +89,10 @@ devDependencies: tar: 6.1.11 typescript: 4.6.2 unimported: 1.19.1 - vite: 2.8.5 + vite: 2.8.6 vite-plugin-cdn-import: 0.3.5 - vite-plugin-pwa: 0.11.13_vite@2.8.5 - workbox-window: 6.5.0 + vite-plugin-pwa: 0.11.13_vite@2.8.6 + workbox-window: 6.5.1 packages: @@ -1413,7 +1411,7 @@ packages: '@emotion/memoize': 0.7.5 '@emotion/unitless': 0.7.5 '@emotion/utils': 1.1.0 - csstype: 3.0.10 + csstype: 3.0.11 dev: true /@emotion/sheet/1.1.0: @@ -1620,11 +1618,11 @@ packages: '@typescript-eslint/eslint-plugin': 5.13.0_33fffc354ccfa91fbe7d1677b9395a0a '@typescript-eslint/parser': 5.13.0_eslint@8.10.0+typescript@4.6.2 eslint: 8.10.0 - eslint-config-prettier: 8.4.0_eslint@8.10.0 + eslint-config-prettier: 8.5.0_eslint@8.10.0 eslint-import-resolver-typescript: 2.5.0_8b406960a2a06af75ddac353adbd0cfd eslint-plugin-eslint-comments: 3.2.0_eslint@8.10.0 eslint-plugin-import: 2.25.4_eslint@8.10.0 - eslint-plugin-react: 7.29.2_eslint@8.10.0 + eslint-plugin-react: 7.29.3_eslint@8.10.0 eslint-plugin-react-hooks: 4.3.0_eslint@8.10.0 prettier: 2.5.1 prettier-plugin-tailwindcss: 0.1.8_prettier@2.5.1 @@ -1633,8 +1631,8 @@ packages: - supports-color dev: false - /@meshtastic/meshtasticjs/0.6.48: - resolution: {integrity: sha512-ithCXUk57R49bTG+UK2MEpk0K/f0QROV+/fupVWhdJtszMHJor+BZRw9UEBU2QBdv8u2nVJbEwG9RaWnW67eqg==} + /@meshtastic/meshtasticjs/0.6.50: + resolution: {integrity: sha512-zH1pglJ8FdeBKbI7zgi2ulgkhC03Jb7rW8q4fBm/etjRUTR2NNExlhpIdsYQQmLxX+3WywXEts/jL+2kspF8iw==} dependencies: '@meshtastic/eslint-config': 1.0.6 '@protobuf-ts/runtime': 2.2.2 @@ -1689,7 +1687,7 @@ packages: reselect: 4.1.5 dev: false - /@rollup/plugin-babel/5.3.1_@babel+core@7.17.5+rollup@2.68.0: + /@rollup/plugin-babel/5.3.1_@babel+core@7.17.5+rollup@2.69.0: resolution: {integrity: sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==} engines: {node: '>= 10.0.0'} peerDependencies: @@ -1702,36 +1700,36 @@ packages: dependencies: '@babel/core': 7.17.5 '@babel/helper-module-imports': 7.16.7 - '@rollup/pluginutils': 3.1.0_rollup@2.68.0 - rollup: 2.68.0 + '@rollup/pluginutils': 3.1.0_rollup@2.69.0 + rollup: 2.69.0 dev: true - /@rollup/plugin-node-resolve/11.2.1_rollup@2.68.0: + /@rollup/plugin-node-resolve/11.2.1_rollup@2.69.0: resolution: {integrity: sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg==} engines: {node: '>= 10.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0 dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.68.0 + '@rollup/pluginutils': 3.1.0_rollup@2.69.0 '@types/resolve': 1.17.1 builtin-modules: 3.2.0 deepmerge: 4.2.2 is-module: 1.0.0 resolve: 1.22.0 - rollup: 2.68.0 + rollup: 2.69.0 dev: true - /@rollup/plugin-replace/2.4.2_rollup@2.68.0: + /@rollup/plugin-replace/2.4.2_rollup@2.69.0: resolution: {integrity: sha512-IGcu+cydlUMZ5En85jxHH4qj2hta/11BHq95iHEyb2sbgiN0eCdzvUcHw5gt9pBL5lTi4JDYJ1acCoMGpTvEZg==} peerDependencies: rollup: ^1.20.0 || ^2.0.0 dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.68.0 - magic-string: 0.25.7 - rollup: 2.68.0 + '@rollup/pluginutils': 3.1.0_rollup@2.69.0 + magic-string: 0.25.9 + rollup: 2.69.0 dev: true - /@rollup/pluginutils/3.1.0_rollup@2.68.0: + /@rollup/pluginutils/3.1.0_rollup@2.69.0: resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==} engines: {node: '>= 8.0.0'} peerDependencies: @@ -1740,7 +1738,7 @@ packages: '@types/estree': 0.0.39 estree-walker: 1.0.1 picomatch: 2.3.1 - rollup: 2.68.0 + rollup: 2.69.0 dev: true /@rollup/pluginutils/4.1.2: @@ -1782,7 +1780,7 @@ packages: dependencies: ejs: 3.1.6 json5: 2.2.0 - magic-string: 0.25.7 + magic-string: 0.25.9 string.prototype.matchall: 4.0.6 dev: true @@ -1828,8 +1826,8 @@ packages: resolution: {integrity: sha512-uwc1x90yCKqGcIOAT6DwOSuxnrAbpkdPsUOZtwrXb4D/6wZs+6qG7QnIawDuZWg0sWpxl+ltIKCaLoMlna678w==} dev: true - /@types/mapbox-gl/2.6.2: - resolution: {integrity: sha512-SQKvzRFUYpu8rppoo3HavDxRrpAckZYhJ07NVr9KSFwALk2HlYFzPS7jQ8+Cc2xUlgRpmeEmYP3kyco9jdmcyg==} + /@types/mapbox-gl/2.6.3: + resolution: {integrity: sha512-oF5eQmczkoPQfxfRSwpF9GcrWi3YleptJ67uiCQKps+7aKxwIbww0EHHqIrxvOg49l07+AZBtJU2FPKZm1jKAg==} dependencies: '@types/geojson': 7946.0.8 dev: true @@ -1849,14 +1847,14 @@ packages: /@types/prop-types/15.7.4: resolution: {integrity: sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==} - /@types/react-dom/17.0.11: - resolution: {integrity: sha512-f96K3k+24RaLGVu/Y2Ng3e1EbZ8/cVJvypZWd7cy0ofCBaf2lcM46xNhycMZ2xGwbBjRql7hOlZ+e2WlJ5MH3Q==} + /@types/react-dom/17.0.13: + resolution: {integrity: sha512-wEP+B8hzvy6ORDv1QBhcQia4j6ea4SFIBttHYpXKPFZRviBvknq0FRh3VrIxeXUmsPkwuXVZrVGG7KUVONmXCQ==} dependencies: '@types/react': 17.0.39 dev: true - /@types/react-redux/7.1.22: - resolution: {integrity: sha512-GxIA1kM7ClU73I6wg9IRTVwSO9GS+SAKZKe0Enj+82HMU6aoESFU2HNAdNi3+J53IaOHPiUfT3kSG4L828joDQ==} + /@types/react-redux/7.1.23: + resolution: {integrity: sha512-D02o3FPfqQlfu2WeEYwh3x2otYd2Dk1o8wAfsA0B1C2AJEFxE663Ozu7JzuWbznGgW248NaOF6wsqCGNq9d3qw==} dependencies: '@types/hoist-non-react-statics': 3.3.1 '@types/react': 17.0.39 @@ -1869,7 +1867,7 @@ packages: dependencies: '@types/prop-types': 15.7.4 '@types/scheduler': 0.16.2 - csstype: 3.0.10 + csstype: 3.0.11 /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} @@ -2252,7 +2250,7 @@ packages: postcss: ^8.1.0 dependencies: browserslist: 4.19.3 - caniuse-lite: 1.0.30001312 + caniuse-lite: 1.0.30001313 fraction.js: 4.1.3 normalize-range: 0.1.2 picocolors: 1.0.0 @@ -2351,8 +2349,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001312 - electron-to-chromium: 1.4.74 + caniuse-lite: 1.0.30001313 + electron-to-chromium: 1.4.75 escalade: 3.1.1 node-releases: 2.0.2 picocolors: 1.0.0 @@ -2389,8 +2387,8 @@ packages: engines: {node: '>= 6'} dev: true - /caniuse-lite/1.0.30001312: - resolution: {integrity: sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ==} + /caniuse-lite/1.0.30001313: + resolution: {integrity: sha512-rI1UN0koZUiKINjysQDuRi2VeSCce3bYJNmDcj3PIKREiAmjakugBul1QSkg/fPrlULYl6oWfGg3PbgOSY9X4Q==} dev: true /chalk/2.4.2: @@ -2567,8 +2565,8 @@ packages: hasBin: true dev: true - /csstype/3.0.10: - resolution: {integrity: sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==} + /csstype/3.0.11: + resolution: {integrity: sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==} /d3-color/3.0.1: resolution: {integrity: sha512-6/SlHkDOBLyQSJ1j1Ghs82OIUXpKWlR0hCsw0XrLSQhuUPuCSmLQ1QPH98vpnQxMUQM2/gfAkUEWsupVpd9JGw==} @@ -2769,8 +2767,8 @@ packages: jake: 10.8.2 dev: true - /electron-to-chromium/1.4.74: - resolution: {integrity: sha512-DvQ20M0I4dIH8KcAo7n7E4OEeNafZ1N8z6g6ck+ALCM0ZoV6mpjaX6ekjs31zKlqPzacU3lmjG9PZEa1mQhEpQ==} + /electron-to-chromium/1.4.75: + resolution: {integrity: sha512-LxgUNeu3BVU7sXaKjUDD9xivocQLxFtq6wgERrutdY/yIOps3ODOZExK1jg8DTEg4U8TUCb5MLGeWFOYuxjF3Q==} dev: true /emoji-regex/8.0.0: @@ -2806,7 +2804,7 @@ packages: get-intrinsic: 1.1.1 get-symbol-description: 1.0.0 has: 1.0.3 - has-symbols: 1.0.2 + has-symbols: 1.0.3 internal-slot: 1.0.3 is-callable: 1.2.4 is-negative-zero: 2.0.2 @@ -2826,7 +2824,7 @@ packages: dependencies: call-bind: 1.0.2 get-intrinsic: 1.1.1 - has-symbols: 1.0.2 + has-symbols: 1.0.3 is-arguments: 1.1.1 is-map: 2.0.2 is-set: 2.0.2 @@ -2842,8 +2840,17 @@ packages: is-date-object: 1.0.5 is-symbol: 1.0.4 - /esbuild-android-arm64/0.14.23: - resolution: {integrity: sha512-k9sXem++mINrZty1v4FVt6nC5BQCFG4K2geCIUUqHNlTdFnuvcqsY7prcKZLFhqVC1rbcJAr9VSUGFL/vD4vsw==} + /esbuild-android-64/0.14.25: + resolution: {integrity: sha512-L5vCUk7TzFbBnoESNoXjU3x9+/+7TDIE/1mTfy/erAfvZAqC+S3sp/Qa9wkypFMcFvN9FzvESkTlpeQDolREtQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /esbuild-android-arm64/0.14.25: + resolution: {integrity: sha512-4jv5xPjM/qNm27T5j3ZEck0PvjgQtoMHnz4FzwF5zNP56PvY2CT0WStcAIl6jNlsuDdN63rk2HRBIsO6xFbcFw==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -2851,8 +2858,8 @@ packages: dev: true optional: true - /esbuild-darwin-64/0.14.23: - resolution: {integrity: sha512-lB0XRbtOYYL1tLcYw8BoBaYsFYiR48RPrA0KfA/7RFTr4MV7Bwy/J4+7nLsVnv9FGuQummM3uJ93J3ptaTqFug==} + /esbuild-darwin-64/0.14.25: + resolution: {integrity: sha512-TGp8tuudIxOyWd1+8aYPxQmC1ZQyvij/AfNBa35RubixD0zJ1vkKHVAzo0Zao1zcG6pNqiSyzfPto8vmg0s7oA==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -2860,8 +2867,8 @@ packages: dev: true optional: true - /esbuild-darwin-arm64/0.14.23: - resolution: {integrity: sha512-yat73Z/uJ5tRcfRiI4CCTv0FSnwErm3BJQeZAh+1tIP0TUNh6o+mXg338Zl5EKChD+YGp6PN+Dbhs7qa34RxSw==} + /esbuild-darwin-arm64/0.14.25: + resolution: {integrity: sha512-oTcDgdm0MDVEmw2DWu8BV68pYuImpFgvWREPErBZmNA4MYKGuBRaCiJqq6jZmBR1x+3y1DWCjez+5uLtuAm6mw==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -2869,8 +2876,8 @@ packages: dev: true optional: true - /esbuild-freebsd-64/0.14.23: - resolution: {integrity: sha512-/1xiTjoLuQ+LlbfjJdKkX45qK/M7ARrbLmyf7x3JhyQGMjcxRYVR6Dw81uH3qlMHwT4cfLW4aEVBhP1aNV7VsA==} + /esbuild-freebsd-64/0.14.25: + resolution: {integrity: sha512-ueAqbnMZ8arnuLH8tHwTCQYeptnHOUV7vA6px6j4zjjQwDx7TdP7kACPf3TLZLdJQ3CAD1XCvQ2sPhX+8tacvQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -2878,8 +2885,8 @@ packages: dev: true optional: true - /esbuild-freebsd-arm64/0.14.23: - resolution: {integrity: sha512-uyPqBU/Zcp6yEAZS4LKj5jEE0q2s4HmlMBIPzbW6cTunZ8cyvjG6YWpIZXb1KK3KTJDe62ltCrk3VzmWHp+iLg==} + /esbuild-freebsd-arm64/0.14.25: + resolution: {integrity: sha512-+ZVWud2HKh+Ob6k/qiJWjBtUg4KmJGGmbvEXXW1SNKS7hW7HU+Zq2ZCcE1akFxOPkVB+EhOty/sSek30tkCYug==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -2887,8 +2894,8 @@ packages: dev: true optional: true - /esbuild-linux-32/0.14.23: - resolution: {integrity: sha512-37R/WMkQyUfNhbH7aJrr1uCjDVdnPeTHGeDhZPUNhfoHV0lQuZNCKuNnDvlH/u/nwIYZNdVvz1Igv5rY/zfrzQ==} + /esbuild-linux-32/0.14.25: + resolution: {integrity: sha512-3OP/lwV3kCzEz45tobH9nj+uE4ubhGsfx+tn0L26WAGtUbmmcRpqy7XRG/qK7h1mClZ+eguIANcQntYMdYklfw==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -2896,8 +2903,8 @@ packages: dev: true optional: true - /esbuild-linux-64/0.14.23: - resolution: {integrity: sha512-H0gztDP60qqr8zoFhAO64waoN5yBXkmYCElFklpd6LPoobtNGNnDe99xOQm28+fuD75YJ7GKHzp/MLCLhw2+vQ==} + /esbuild-linux-64/0.14.25: + resolution: {integrity: sha512-+aKHdHZmX9qwVlQmu5xYXh7GsBFf4TWrePgeJTalhXHOG7NNuUwoHmketGiZEoNsWyyqwH9rE5BC+iwcLY30Ug==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -2905,8 +2912,8 @@ packages: dev: true optional: true - /esbuild-linux-arm/0.14.23: - resolution: {integrity: sha512-x64CEUxi8+EzOAIpCUeuni0bZfzPw/65r8tC5cy5zOq9dY7ysOi5EVQHnzaxS+1NmV+/RVRpmrzGw1QgY2Xpmw==} + /esbuild-linux-arm/0.14.25: + resolution: {integrity: sha512-aTLcE2VBoLydL943REcAcgnDi3bHtmULSXWLbjtBdtykRatJVSxKMjK9YlBXUZC4/YcNQfH7AxwVeQr9fNxPhw==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -2914,8 +2921,8 @@ packages: dev: true optional: true - /esbuild-linux-arm64/0.14.23: - resolution: {integrity: sha512-c4MLOIByNHR55n3KoYf9hYDfBRghMjOiHLaoYLhkQkIabb452RWi+HsNgB41sUpSlOAqfpqKPFNg7VrxL3UX9g==} + /esbuild-linux-arm64/0.14.25: + resolution: {integrity: sha512-UxfenPx/wSZx55gScCImPtXekvZQLI2GW3qe5dtlmU7luiqhp5GWPzGeQEbD3yN3xg/pHc671m5bma5Ns7lBHw==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -2923,8 +2930,8 @@ packages: dev: true optional: true - /esbuild-linux-mips64le/0.14.23: - resolution: {integrity: sha512-kHKyKRIAedYhKug2EJpyJxOUj3VYuamOVA1pY7EimoFPzaF3NeY7e4cFBAISC/Av0/tiV0xlFCt9q0HJ68IBIw==} + /esbuild-linux-mips64le/0.14.25: + resolution: {integrity: sha512-wLWYyqVfYx9Ur6eU5RT92yJVsaBGi5RdkoWqRHOqcJ38Kn60QMlcghsKeWfe9jcYut8LangYZ98xO1LxIoSXrQ==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -2932,8 +2939,8 @@ packages: dev: true optional: true - /esbuild-linux-ppc64le/0.14.23: - resolution: {integrity: sha512-7ilAiJEPuJJnJp/LiDO0oJm5ygbBPzhchJJh9HsHZzeqO+3PUzItXi+8PuicY08r0AaaOe25LA7sGJ0MzbfBag==} + /esbuild-linux-ppc64le/0.14.25: + resolution: {integrity: sha512-0dR6Csl6Zas3g4p9ULckEl8Mo8IInJh33VCJ3eaV1hj9+MHGdmDOakYMN8MZP9/5nl+NU/0ygpd14cWgy8uqRw==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -2941,8 +2948,8 @@ packages: dev: true optional: true - /esbuild-linux-riscv64/0.14.23: - resolution: {integrity: sha512-fbL3ggK2wY0D8I5raPIMPhpCvODFE+Bhb5QGtNP3r5aUsRR6TQV+ZBXIaw84iyvKC8vlXiA4fWLGhghAd/h/Zg==} + /esbuild-linux-riscv64/0.14.25: + resolution: {integrity: sha512-J4d20HDmTrgvhR0bdkDhvvJGaikH3LzXQnNaseo8rcw9Yqby9A90gKUmWpfwqLVNRILvNnAmKLfBjCKU9ajg8w==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -2950,8 +2957,8 @@ packages: dev: true optional: true - /esbuild-linux-s390x/0.14.23: - resolution: {integrity: sha512-GHMDCyfy7+FaNSO8RJ8KCFsnax8fLUsOrj9q5Gi2JmZMY0Zhp75keb5abTFCq2/Oy6KVcT0Dcbyo/bFb4rIFJA==} + /esbuild-linux-s390x/0.14.25: + resolution: {integrity: sha512-YI2d5V6nTE73ZnhEKQD7MtsPs1EtUZJ3obS21oxQxGbbRw1G+PtJKjNyur+3t6nzHP9oTg6GHQ3S3hOLLmbDIQ==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -2959,8 +2966,8 @@ packages: dev: true optional: true - /esbuild-netbsd-64/0.14.23: - resolution: {integrity: sha512-ovk2EX+3rrO1M2lowJfgMb/JPN1VwVYrx0QPUyudxkxLYrWeBxDKQvc6ffO+kB4QlDyTfdtAURrVzu3JeNdA2g==} + /esbuild-netbsd-64/0.14.25: + resolution: {integrity: sha512-TKIVgNWLUOkr+Exrye70XTEE1lJjdQXdM4tAXRzfHE9iBA7LXWcNtVIuSnphTqpanPzTDFarF0yqq4kpbC6miA==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -2968,8 +2975,8 @@ packages: dev: true optional: true - /esbuild-openbsd-64/0.14.23: - resolution: {integrity: sha512-uYYNqbVR+i7k8ojP/oIROAHO9lATLN7H2QeXKt2H310Fc8FJj4y3Wce6hx0VgnJ4k1JDrgbbiXM8rbEgQyg8KA==} + /esbuild-openbsd-64/0.14.25: + resolution: {integrity: sha512-QgFJ37A15D7NIXBTYEqz29+uw3nNBOIyog+3kFidANn6kjw0GHZ0lEYQn+cwjyzu94WobR+fes7cTl/ZYlHb1A==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -2977,8 +2984,8 @@ packages: dev: true optional: true - /esbuild-sunos-64/0.14.23: - resolution: {integrity: sha512-hAzeBeET0+SbScknPzS2LBY6FVDpgE+CsHSpe6CEoR51PApdn2IB0SyJX7vGelXzlyrnorM4CAsRyb9Qev4h9g==} + /esbuild-sunos-64/0.14.25: + resolution: {integrity: sha512-rmWfjUItYIVlqr5EnTH1+GCxXiBOC42WBZ3w++qh7n2cS9Xo0lO5pGSG2N+huOU2fX5L+6YUuJ78/vOYvefeFw==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -2986,8 +2993,8 @@ packages: dev: true optional: true - /esbuild-windows-32/0.14.23: - resolution: {integrity: sha512-Kttmi3JnohdaREbk6o9e25kieJR379TsEWF0l39PQVHXq3FR6sFKtVPgY8wk055o6IB+rllrzLnbqOw/UV60EA==} + /esbuild-windows-32/0.14.25: + resolution: {integrity: sha512-HGAxVUofl3iUIz9W10Y9XKtD0bNsK9fBXv1D55N/ljNvkrAYcGB8YCm0v7DjlwtyS6ws3dkdQyXadbxkbzaKOA==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -2995,8 +3002,8 @@ packages: dev: true optional: true - /esbuild-windows-64/0.14.23: - resolution: {integrity: sha512-JtIT0t8ymkpl6YlmOl6zoSWL5cnCgyLaBdf/SiU/Eg3C13r0NbHZWNT/RDEMKK91Y6t79kTs3vyRcNZbfu5a8g==} + /esbuild-windows-64/0.14.25: + resolution: {integrity: sha512-TirEohRkfWU9hXLgoDxzhMQD1g8I2mOqvdQF2RS9E/wbkORTAqJHyh7wqGRCQAwNzdNXdg3JAyhQ9/177AadWA==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -3004,8 +3011,8 @@ packages: dev: true optional: true - /esbuild-windows-arm64/0.14.23: - resolution: {integrity: sha512-cTFaQqT2+ik9e4hePvYtRZQ3pqOvKDVNarzql0VFIzhc0tru/ZgdLoXd6epLiKT+SzoSce6V9YJ+nn6RCn6SHw==} + /esbuild-windows-arm64/0.14.25: + resolution: {integrity: sha512-4ype9ERiI45rSh+R8qUoBtaj6kJvUOI7oVLhKqPEpcF4Pa5PpT3hm/mXAyotJHREkHpM87PAJcA442mLnbtlNA==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -3013,31 +3020,32 @@ packages: dev: true optional: true - /esbuild/0.14.23: - resolution: {integrity: sha512-XjnIcZ9KB6lfonCa+jRguXyRYcldmkyZ99ieDksqW/C8bnyEX299yA4QH2XcgijCgaddEZePPTgvx/2imsq7Ig==} + /esbuild/0.14.25: + resolution: {integrity: sha512-4JHEIOMNFvK09ziiL+iVmldIhLbn49V4NAVo888tcGFKedEZY/Y8YapfStJ6zSE23tzYPKxqKwQBnQoIO0BI/Q==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - esbuild-android-arm64: 0.14.23 - esbuild-darwin-64: 0.14.23 - esbuild-darwin-arm64: 0.14.23 - esbuild-freebsd-64: 0.14.23 - esbuild-freebsd-arm64: 0.14.23 - esbuild-linux-32: 0.14.23 - esbuild-linux-64: 0.14.23 - esbuild-linux-arm: 0.14.23 - esbuild-linux-arm64: 0.14.23 - esbuild-linux-mips64le: 0.14.23 - esbuild-linux-ppc64le: 0.14.23 - esbuild-linux-riscv64: 0.14.23 - esbuild-linux-s390x: 0.14.23 - esbuild-netbsd-64: 0.14.23 - esbuild-openbsd-64: 0.14.23 - esbuild-sunos-64: 0.14.23 - esbuild-windows-32: 0.14.23 - esbuild-windows-64: 0.14.23 - esbuild-windows-arm64: 0.14.23 + esbuild-android-64: 0.14.25 + esbuild-android-arm64: 0.14.25 + esbuild-darwin-64: 0.14.25 + esbuild-darwin-arm64: 0.14.25 + esbuild-freebsd-64: 0.14.25 + esbuild-freebsd-arm64: 0.14.25 + esbuild-linux-32: 0.14.25 + esbuild-linux-64: 0.14.25 + esbuild-linux-arm: 0.14.25 + esbuild-linux-arm64: 0.14.25 + esbuild-linux-mips64le: 0.14.25 + esbuild-linux-ppc64le: 0.14.25 + esbuild-linux-riscv64: 0.14.25 + esbuild-linux-s390x: 0.14.25 + esbuild-netbsd-64: 0.14.25 + esbuild-openbsd-64: 0.14.25 + esbuild-sunos-64: 0.14.25 + esbuild-windows-32: 0.14.25 + esbuild-windows-64: 0.14.25 + esbuild-windows-arm64: 0.14.25 dev: true /escalade/3.1.1: @@ -3053,8 +3061,8 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - /eslint-config-prettier/8.4.0_eslint@8.10.0: - resolution: {integrity: sha512-CFotdUcMY18nGRo5KGsnNxpznzhkopOcOo0InID+sgQssPrzjvsyKZPvOgymTFeHrFuC3Tzdf2YndhXtULK9Iw==} + /eslint-config-prettier/8.5.0_eslint@8.10.0: + resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -3082,7 +3090,7 @@ packages: glob: 7.2.0 is-glob: 4.0.3 resolve: 1.22.0 - tsconfig-paths: 3.12.0 + tsconfig-paths: 3.13.0 transitivePeerDependencies: - supports-color dev: false @@ -3125,7 +3133,7 @@ packages: minimatch: 3.1.2 object.values: 1.1.5 resolve: 1.22.0 - tsconfig-paths: 3.12.0 + tsconfig-paths: 3.13.0 dev: false /eslint-plugin-react-hooks/4.3.0_eslint@8.10.0: @@ -3137,8 +3145,8 @@ packages: eslint: 8.10.0 dev: false - /eslint-plugin-react/7.29.2_eslint@8.10.0: - resolution: {integrity: sha512-ypEBTKOy5liFQXZWMchJ3LN0JX1uPI6n7MN7OPHKacqXAxq5gYC30TdO7wqGYQyxD1OrzpobdHC3hDmlRWDg9w==} + /eslint-plugin-react/7.29.3_eslint@8.10.0: + resolution: {integrity: sha512-MzW6TuCnDOcta67CkpDyRfRsEVx9FNMDV8wZsDqe1luHPdGTrQIUaUXD27Ja3gHsdOIs/cXzNchWGlqm+qRVRg==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 @@ -3426,17 +3434,17 @@ packages: /flatted/3.2.5: resolution: {integrity: sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==} - /flow-parser/0.172.0: - resolution: {integrity: sha512-WWqgvuJgD9Y1n2su9D73m0g5kQ4XVl8Dwk6DeW5V6bjt4XMtVLzSHg35s3iiZOvShY+7w7l8FzlK81PGXRcIYQ==} + /flow-parser/0.173.0: + resolution: {integrity: sha512-gikomjo+jzdehhOCHP2Ca5y1HGK3jkODhUdTxk4a3SdyLAMBsEwb7KJETHzB4KQs7HhHcqhyT7mGmd9iT8B5Hg==} engines: {node: '>=0.4.0'} dev: true - /flow-remove-types/2.172.0: - resolution: {integrity: sha512-EfHtwB48kgwQnU1ucNWVmEh+z2ubek9NWLkNb+9djaxRYijHl/YhuGut590ObHlz1wPaimUZcNyGi3kjBfSWZw==} + /flow-remove-types/2.173.0: + resolution: {integrity: sha512-rU1sB6Oj++6koo4PzelN4AVgZ85OA48ggk3IaAmyXd2nqR7dVLQRBpz+wjdKZYdorx+oEV66qIQ6dlXd6P7C7w==} engines: {node: '>=4'} hasBin: true dependencies: - flow-parser: 0.172.0 + flow-parser: 0.173.0 pirates: 3.0.2 vlq: 0.2.3 dev: true @@ -3525,7 +3533,7 @@ packages: dependencies: function-bind: 1.1.1 has: 1.0.3 - has-symbols: 1.0.2 + has-symbols: 1.0.3 /get-own-enumerable-property-symbols/3.0.2: resolution: {integrity: sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==} @@ -3623,15 +3631,15 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - /has-symbols/1.0.2: - resolution: {integrity: sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==} + /has-symbols/1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} /has-tostringtag/1.0.0: resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} engines: {node: '>= 0.4'} dependencies: - has-symbols: 1.0.2 + has-symbols: 1.0.3 /has/1.0.3: resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} @@ -3844,7 +3852,7 @@ packages: resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} engines: {node: '>= 0.4'} dependencies: - has-symbols: 1.0.2 + has-symbols: 1.0.3 /is-typed-array/1.1.8: resolution: {integrity: sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA==} @@ -4094,8 +4102,8 @@ packages: dependencies: yallist: 4.0.0 - /magic-string/0.25.7: - resolution: {integrity: sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==} + /magic-string/0.25.9: + resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} dependencies: sourcemap-codec: 1.4.8 dev: true @@ -4260,7 +4268,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.3 - has-symbols: 1.0.2 + has-symbols: 1.0.3 object-keys: 1.1.1 /object.entries/1.1.5: @@ -4638,8 +4646,8 @@ packages: react: 17.0.2 dev: false - /react-flow-renderer/10.0.0-next.45_react-dom@17.0.2+react@17.0.2: - resolution: {integrity: sha512-Ag0CHF6fDXRZBVV6eTF0ssLNXAhS5Bv59mtttf9NS06iVz0fcxafFZ7QzQQtv42b0hh7C5aT3iRos0RF2LuIUQ==} + /react-flow-renderer/10.0.0-next.48_react-dom@17.0.2+react@17.0.2: + resolution: {integrity: sha512-Qig+8PyIfBJOTr8wnH4ltxQ34cc7/2J0uKLMakS7pu1BqwEQBfm9pzmh0pcQxrPcT/0jtnM6mFvDuofU76xjYQ==} engines: {node: '>=12'} peerDependencies: react: 16 || 17 @@ -4713,7 +4721,7 @@ packages: optional: true dependencies: '@babel/runtime': 7.17.2 - '@types/react-redux': 7.1.22 + '@types/react-redux': 7.1.23 hoist-non-react-statics: 3.3.2 loose-envify: 1.4.0 prop-types: 15.8.1 @@ -4949,19 +4957,19 @@ packages: '@rollup/pluginutils': 4.1.2 estree-walker: 2.0.2 is-reference: 1.2.1 - magic-string: 0.25.7 + magic-string: 0.25.9 dev: true - /rollup-plugin-terser/7.0.2_rollup@2.68.0: + /rollup-plugin-terser/7.0.2_rollup@2.69.0: resolution: {integrity: sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==} peerDependencies: rollup: ^2.0.0 dependencies: '@babel/code-frame': 7.16.7 jest-worker: 26.6.2 - rollup: 2.68.0 + rollup: 2.69.0 serialize-javascript: 4.0.0 - terser: 5.11.0 + terser: 5.12.0 dev: true /rollup-plugin-visualizer/5.6.0: @@ -4977,8 +4985,8 @@ packages: yargs: 17.3.1 dev: true - /rollup/2.68.0: - resolution: {integrity: sha512-XrMKOYK7oQcTio4wyTz466mucnd8LzkiZLozZ4Rz0zQD+HeX4nUK4B8GrTX/2EvN2/vBF/i2WnaXboPxo0JylA==} + /rollup/2.69.0: + resolution: {integrity: sha512-kjER91tHyek8gAkuz7+558vSnTQ+pITEok1P0aNOS45ZXyngaqPsXJmSel4QPQnJo7EJMjXUU1/GErWkWiKORg==} engines: {node: '>=10.0.0'} hasBin: true optionalDependencies: @@ -5173,7 +5181,7 @@ packages: define-properties: 1.1.3 es-abstract: 1.19.1 get-intrinsic: 1.1.1 - has-symbols: 1.0.2 + has-symbols: 1.0.3 internal-slot: 1.0.3 regexp.prototype.flags: 1.4.1 side-channel: 1.0.4 @@ -5362,8 +5370,8 @@ packages: engines: {node: '>=8'} dev: true - /terser/5.11.0: - resolution: {integrity: sha512-uCA9DLanzzWSsN1UirKwylhhRz3aKPInlfmpGfw8VN6jHsAtu8HJtIpeeHHK23rxnE/cDc+yvmq5wqkIC6Kn0A==} + /terser/5.12.0: + resolution: {integrity: sha512-R3AUhNBGWiFc77HXag+1fXpAxTAFRQTJemlJKjAgD9r8xXTpjNKqIXwHM/o7Rh+O0kUJtS3WQVdBeMKFk5sw9A==} engines: {node: '>=10'} hasBin: true dependencies: @@ -5433,8 +5441,8 @@ packages: punycode: 2.1.1 dev: true - /tsconfig-paths/3.12.0: - resolution: {integrity: sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg==} + /tsconfig-paths/3.13.0: + resolution: {integrity: sha512-nWuffZppoaYK0vQ1SQmkSsQzJoHA4s6uzdb2waRpD806x9yfq153AdVsWz4je2qZcW+pENrMQXbGQ3sMCkXuhw==} dependencies: '@types/json5': 0.0.29 json5: 1.0.1 @@ -5499,7 +5507,7 @@ packages: dependencies: function-bind: 1.1.1 has-bigints: 1.0.1 - has-symbols: 1.0.2 + has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 /unicode-canonical-property-names-ecmascript/2.0.0: @@ -5535,7 +5543,7 @@ packages: debug: 4.3.3 eslint: 7.32.0 file-entry-cache: 6.0.1 - flow-remove-types: 2.172.0 + flow-remove-types: 2.173.0 glob: 7.2.0 json5: 2.2.0 ora: 5.4.1 @@ -5603,15 +5611,15 @@ packages: - rollup dev: true - /vite-plugin-environment/1.1.0_vite@2.8.5: + /vite-plugin-environment/1.1.0_vite@2.8.6: resolution: {integrity: sha512-ay0vYB8DEB7xB5sqVzOgLyTaGH5jbnvghzoDBmHvMx2Y2k1WUl0QQUuyu7oeiKnmIJDc8ciklhVcGc4lXMKyiA==} peerDependencies: vite: ^2.7 dependencies: - vite: 2.8.5 + vite: 2.8.6 dev: false - /vite-plugin-pwa/0.11.13_vite@2.8.5: + /vite-plugin-pwa/0.11.13_vite@2.8.6: resolution: {integrity: sha512-Ssj14m3TRVLfkFEAWSMcFE2d1cSdEZyrVTzfY2lSL+umHYvcIFHVDAY143sygtBCb44OPczsAOmWwBTxwOvh7g==} peerDependencies: vite: ^2.0.0 @@ -5619,17 +5627,17 @@ packages: debug: 4.3.3 fast-glob: 3.2.11 pretty-bytes: 5.6.0 - rollup: 2.68.0 - vite: 2.8.5 - workbox-build: 6.5.0 - workbox-window: 6.5.0 + rollup: 2.69.0 + vite: 2.8.6 + workbox-build: 6.5.1 + workbox-window: 6.5.1 transitivePeerDependencies: - '@types/babel__core' - supports-color dev: true - /vite/2.8.5: - resolution: {integrity: sha512-C/7EGNa1ugWejol6nOcd/0d8PR70Nzd+XXwsPbnNOfzZw0NN2xyXfmw/GNDHgr5fcaTSO4gjxCJCrwNhQUMhmA==} + /vite/2.8.6: + resolution: {integrity: sha512-e4H0QpludOVKkmOsRyqQ7LTcMUDF3mcgyNU4lmi0B5JUbe0ZxeBBl8VoZ8Y6Rfn9eFKYtdXNPcYK97ZwH+K2ug==} engines: {node: '>=12.2.0'} hasBin: true peerDependencies: @@ -5644,10 +5652,10 @@ packages: stylus: optional: true dependencies: - esbuild: 0.14.23 + esbuild: 0.14.25 postcss: 8.4.7 resolve: 1.22.0 - rollup: 2.68.0 + rollup: 2.69.0 optionalDependencies: fsevents: 2.3.2 dev: true @@ -5723,30 +5731,30 @@ packages: resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} engines: {node: '>=0.10.0'} - /workbox-background-sync/6.5.0: - resolution: {integrity: sha512-rrekt/gt6qOIZsisj6QZfmAFPAnocq1Z603zAjt+qHmeXY8DLPOklVtvrXSaHoHH3qIjUq3SQY5s2x240iTIKw==} + /workbox-background-sync/6.5.1: + resolution: {integrity: sha512-T5a35fagLXQvV8Dr4+bDU+XYsP90jJ3eBLjZMKuCNELMQZNj+VekCODz1QK44jgoBeQk+vp94pkZV6G+e41pgg==} dependencies: idb: 6.1.5 - workbox-core: 6.5.0 + workbox-core: 6.5.1 dev: true - /workbox-broadcast-update/6.5.0: - resolution: {integrity: sha512-JC97c7tYqoGWcCfbKO9KHG6lkU+WhXCnDB2j1oFWEiv53nUHy3yjPpzMmAGNLD9oV5lInO15n6V18HfwgkhISw==} + /workbox-broadcast-update/6.5.1: + resolution: {integrity: sha512-mb/oyblyEpDbw167cCTyHnC3RqCnCQHtFYuYZd+QTpuExxM60qZuBH1AuQCgvLtDcztBKdEYK2VFD9SZYgRbaQ==} dependencies: - workbox-core: 6.5.0 + workbox-core: 6.5.1 dev: true - /workbox-build/6.5.0: - resolution: {integrity: sha512-da0/1b6//P9+ts7ofcIKcMVPyN6suJvjJASXokF7DsqvUmgRBPcCVV4KCy8QWjgfcz7mzuTpkSbdVHcPFJ/p0A==} + /workbox-build/6.5.1: + resolution: {integrity: sha512-coDUDzHvFZ1ADOl3wKCsCSyOBvkPKlPgcQDb6LMMShN1zgF31Mev/1HzN3+9T2cjjWAgFwZKkuRyExqc1v21Zw==} engines: {node: '>=10.0.0'} dependencies: '@apideck/better-ajv-errors': 0.3.3_ajv@8.10.0 '@babel/core': 7.17.5 '@babel/preset-env': 7.16.11_@babel+core@7.17.5 '@babel/runtime': 7.17.2 - '@rollup/plugin-babel': 5.3.1_@babel+core@7.17.5+rollup@2.68.0 - '@rollup/plugin-node-resolve': 11.2.1_rollup@2.68.0 - '@rollup/plugin-replace': 2.4.2_rollup@2.68.0 + '@rollup/plugin-babel': 5.3.1_@babel+core@7.17.5+rollup@2.69.0 + '@rollup/plugin-node-resolve': 11.2.1_rollup@2.69.0 + '@rollup/plugin-replace': 2.4.2_rollup@2.69.0 '@surma/rollup-plugin-off-main-thread': 2.2.3 ajv: 8.10.0 common-tags: 1.8.2 @@ -5755,118 +5763,118 @@ packages: glob: 7.2.0 lodash: 4.17.21 pretty-bytes: 5.6.0 - rollup: 2.68.0 - rollup-plugin-terser: 7.0.2_rollup@2.68.0 + rollup: 2.69.0 + rollup-plugin-terser: 7.0.2_rollup@2.69.0 source-map: 0.8.0-beta.0 stringify-object: 3.3.0 strip-comments: 2.0.1 tempy: 0.6.0 upath: 1.2.0 - workbox-background-sync: 6.5.0 - workbox-broadcast-update: 6.5.0 - workbox-cacheable-response: 6.5.0 - workbox-core: 6.5.0 - workbox-expiration: 6.5.0 - workbox-google-analytics: 6.5.0 - workbox-navigation-preload: 6.5.0 - workbox-precaching: 6.5.0 - workbox-range-requests: 6.5.0 - workbox-recipes: 6.5.0 - workbox-routing: 6.5.0 - workbox-strategies: 6.5.0 - workbox-streams: 6.5.0 - workbox-sw: 6.5.0 - workbox-window: 6.5.0 + workbox-background-sync: 6.5.1 + workbox-broadcast-update: 6.5.1 + workbox-cacheable-response: 6.5.1 + workbox-core: 6.5.1 + workbox-expiration: 6.5.1 + workbox-google-analytics: 6.5.1 + workbox-navigation-preload: 6.5.1 + workbox-precaching: 6.5.1 + workbox-range-requests: 6.5.1 + workbox-recipes: 6.5.1 + workbox-routing: 6.5.1 + workbox-strategies: 6.5.1 + workbox-streams: 6.5.1 + workbox-sw: 6.5.1 + workbox-window: 6.5.1 transitivePeerDependencies: - '@types/babel__core' - supports-color dev: true - /workbox-cacheable-response/6.5.0: - resolution: {integrity: sha512-sqAtWAiBwWvI8HG/2Do7BeKPhHuUczt22ORkAjkH9DfTq9LuWRFd6T4HAMqX5G8F1gM9XA2UPlxRrEeSpFIz/A==} + /workbox-cacheable-response/6.5.1: + resolution: {integrity: sha512-3TdtH/luDiytmM+Cn72HCBLZXmbeRNJqZx2yaVOfUZhj0IVwZqQXhNarlGE9/k6U5Jelb+TtpH2mLVhnzfiSMg==} dependencies: - workbox-core: 6.5.0 + workbox-core: 6.5.1 dev: true - /workbox-core/6.5.0: - resolution: {integrity: sha512-5SPwNipUzYBhrneLVT02JFA0fw3LG82jFAN/G2NzxkIW10t4MVZuML2nU94bbkgjq25u0fkY8+4JXzMfHgxEWQ==} + /workbox-core/6.5.1: + resolution: {integrity: sha512-qObXZ39aFJ2N8X7IUbGrJHKWguliCuU1jOXM/I4MTT84u9BiKD2rHMkIzgeRP1Ixu9+cXU4/XHJq3Cy0Qqc5hw==} dev: true - /workbox-expiration/6.5.0: - resolution: {integrity: sha512-y3WRkKRy/gMuZZNkrLFahjY0QZtLoq+QfhTbVAsOGHVg1CCtnNbeFAnEidQs7UisI2BK76VqQPvM7hEOFyZ92A==} + /workbox-expiration/6.5.1: + resolution: {integrity: sha512-iY/cTADAQATMmPkUBRmQdacqq0TJd2wMHimBQz+tRnPGHSMH+/BoLPABPnu7O7rT/g/s59CUYYRGxe3mEgoJCA==} dependencies: idb: 6.1.5 - workbox-core: 6.5.0 + workbox-core: 6.5.1 dev: true - /workbox-google-analytics/6.5.0: - resolution: {integrity: sha512-CHHh55wMNCc/BV1URrzEM2Zjgf6g2CV6QpAAc1pBRqaLY5755PeQZbp3o8KbJEM7YsC9mIBeQVsOkSKkGS30bg==} + /workbox-google-analytics/6.5.1: + resolution: {integrity: sha512-qZU46/h4dbionYT6Yk6iBkUwpiEzAfnO1W7KkI+AMmY7G9/gA03dQQ7rpTw8F4vWrG7ahTUGWDFv6fERtaw1BQ==} dependencies: - workbox-background-sync: 6.5.0 - workbox-core: 6.5.0 - workbox-routing: 6.5.0 - workbox-strategies: 6.5.0 + workbox-background-sync: 6.5.1 + workbox-core: 6.5.1 + workbox-routing: 6.5.1 + workbox-strategies: 6.5.1 dev: true - /workbox-navigation-preload/6.5.0: - resolution: {integrity: sha512-ktrRQzXJ0zFy0puOtCa49wE3BSBGUB8KRMot3tEieikCkSO0wMLmiCb9GwTVvNMJLl0THRlsdFoI93si04nTxA==} + /workbox-navigation-preload/6.5.1: + resolution: {integrity: sha512-aKrgAbn2IMgzTowTi/ZyKdQUcES2m++9aGtpxqsX7Gn9ovCY8zcssaMEAMMwrIeveij5HiWNBrmj6MWDHi+0rg==} dependencies: - workbox-core: 6.5.0 + workbox-core: 6.5.1 dev: true - /workbox-precaching/6.5.0: - resolution: {integrity: sha512-IVLzgHx38T6LphJyEOltd7XAvpDi73p85uCT2ZtT1HHg9FAYC49a+5iHUVOnqye73fLW20eiAMFcnehGxz9RWg==} + /workbox-precaching/6.5.1: + resolution: {integrity: sha512-EzlPBxvmjGfE56YZzsT/vpVkpLG1XJhoplgXa5RPyVWLUL1LbwEAxhkrENElSS/R9tgiTw80IFwysidfUqLihg==} dependencies: - workbox-core: 6.5.0 - workbox-routing: 6.5.0 - workbox-strategies: 6.5.0 + workbox-core: 6.5.1 + workbox-routing: 6.5.1 + workbox-strategies: 6.5.1 dev: true - /workbox-range-requests/6.5.0: - resolution: {integrity: sha512-+qTELdGZE5rOjuv+ifFrfRDN8Uvzpbm5Fal7qSUqB1V1DLCMxPwHCj6mWwQBRKBpW7G09kAwewH7zA3Asjkf/Q==} + /workbox-range-requests/6.5.1: + resolution: {integrity: sha512-57Da/qRbd9v33YlHX0rlSUVFmE4THCjKqwkmfhY3tNLnSKN2L5YBS3qhWeDO0IrMNgUj+rGve2moKYXeUqQt4A==} dependencies: - workbox-core: 6.5.0 + workbox-core: 6.5.1 dev: true - /workbox-recipes/6.5.0: - resolution: {integrity: sha512-7hWZAIcXmvr31NwYSWaQIrnThCH/Dx9+eYv/YdkpUeWIXRiHRkYvP1FdiHItbLSjL4Y6K7cy2Y9y5lGCkgaE4w==} + /workbox-recipes/6.5.1: + resolution: {integrity: sha512-DGsyKygHggcGPQpWafC/Nmbm1Ny3sB2vE9r//3UbeidXiQ+pLF14KEG1/0NNGRaY+lfOXOagq6d1H7SC8KA+rA==} dependencies: - workbox-cacheable-response: 6.5.0 - workbox-core: 6.5.0 - workbox-expiration: 6.5.0 - workbox-precaching: 6.5.0 - workbox-routing: 6.5.0 - workbox-strategies: 6.5.0 + workbox-cacheable-response: 6.5.1 + workbox-core: 6.5.1 + workbox-expiration: 6.5.1 + workbox-precaching: 6.5.1 + workbox-routing: 6.5.1 + workbox-strategies: 6.5.1 dev: true - /workbox-routing/6.5.0: - resolution: {integrity: sha512-w1A9OVa/yYStu9ds0Dj+TC6zOAoskKlczf+wZI5mrM9nFCt/KOMQiFp1/41DMFPrrN/8KlZTS3Cel/Ttutw93Q==} + /workbox-routing/6.5.1: + resolution: {integrity: sha512-yAAncdTwanvlR8KPjubyvFKeAok8ZcIws6UKxvIAg0I+wsf7UYi93DXNuZr6RBSQrByrN6HkCyjuhmk8P63+PA==} dependencies: - workbox-core: 6.5.0 + workbox-core: 6.5.1 dev: true - /workbox-strategies/6.5.0: - resolution: {integrity: sha512-Ngnwo+tfGw4uKSlTz3h1fYKb/lCV7SDI/dtTb8VaJzRl0N9XssloDGYERBmF6BN/DV/x3bnRsshfobnKI/3z0g==} + /workbox-strategies/6.5.1: + resolution: {integrity: sha512-JNaTXPy8wXzKkr+6za7/eJX9opoZk7UgY261I2kPxl80XQD8lMjz0vo9EOcBwvD72v3ZhGJbW84ZaDwFEhFvWA==} dependencies: - workbox-core: 6.5.0 + workbox-core: 6.5.1 dev: true - /workbox-streams/6.5.0: - resolution: {integrity: sha512-ZbeaZINkju4x45P9DFyRbOYInE+dyNAJIelflz4f9AOAdm+zZUJCooU4MdfsedVhHiTIA6pCD/3jCmW1XbvlbA==} + /workbox-streams/6.5.1: + resolution: {integrity: sha512-7jaTWm6HRGJ/ewECnhb+UgjTT50R42E0/uNCC4eTKQwnLO/NzNGjoXTdQgFjo4zteR+L/K6AtFAiYKH3ZJbAYw==} dependencies: - workbox-core: 6.5.0 - workbox-routing: 6.5.0 + workbox-core: 6.5.1 + workbox-routing: 6.5.1 dev: true - /workbox-sw/6.5.0: - resolution: {integrity: sha512-uPGJ9Yost4yabnCko/IuhouquoQKrWOEqLq7L/xVYtltWe4+J8Hw8iPCVtxvXQ26hffd7MaFWUAN83j2ZWbxRg==} + /workbox-sw/6.5.1: + resolution: {integrity: sha512-hVrQa19yo9wzN1fQQ/h2JlkzFpkuH2qzYT2/rk7CLaWt6tLnTJVFCNHlGRRPhytZSf++LoIy7zThT714sowT/Q==} dev: true - /workbox-window/6.5.0: - resolution: {integrity: sha512-DOrhiTnWup/CsNstO2uvfdKM4kdStgHd31xGGvBcoCE3Are3DRcy5s3zz3PedcAR1AKskQj3BXz0UhzQiOq8nA==} + /workbox-window/6.5.1: + resolution: {integrity: sha512-oRlun9u7b7YEjo2fIDBqJkU2hXtrEljXcOytRhfeQRbqXxjUOpFgXSGRSAkmDx1MlKUNOSbr+zfi8h5n7In3yA==} dependencies: '@types/trusted-types': 2.0.2 - workbox-core: 6.5.0 + workbox-core: 6.5.1 dev: true /wrap-ansi/7.0.0: diff --git a/src/App.tsx b/src/App.tsx index e133258d..94a8c025 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,12 +1,11 @@ import type React from 'react'; -import { Map } from '@app/pages/Map'; import { Connection } from '@components/Connection'; -import { ContextMenu } from '@components/generic/ContextMenu'; import { BottomNav } from '@components/menu/BottomNav'; import { useRoute } from '@core/router'; import { useAppSelector } from '@hooks/useAppSelector'; import { Extensions } from '@pages/Extensions/Index'; +import { Map } from '@pages/Map'; import { Messages } from '@pages/Messages'; import { Nodes } from '@pages/Nodes'; import { NotFound } from '@pages/NotFound'; @@ -17,19 +16,17 @@ export const App = (): JSX.Element => { return (
- - -
-
- {route.name === 'messages' && } - {route.name === 'nodes' && } - {route.name === 'map' && } - {route.name === 'extensions' && } - {route.name === false && } -
- + +
+
+ {route.name === 'messages' && } + {route.name === 'nodes' && } + {route.name === 'map' && } + {route.name === 'extensions' && } + {route.name === false && }
- + +
); }; diff --git a/src/components/Tabs.tsx b/src/components/Tabs.tsx index d0123fec..71453bde 100644 --- a/src/components/Tabs.tsx +++ b/src/components/Tabs.tsx @@ -1,6 +1,6 @@ import type React from 'react'; -import { Tab, TabProps } from './Tab'; +import { Tab, TabProps } from '@components/Tab'; export interface TabsProps { tabs: Omit[]; diff --git a/src/components/generic/Card.tsx b/src/components/generic/Card.tsx index e8b0d44e..6eb4ef8e 100644 --- a/src/components/generic/Card.tsx +++ b/src/components/generic/Card.tsx @@ -1,7 +1,6 @@ import type React from 'react'; import { m } from 'framer-motion'; -import Draggable from 'react-draggable'; export interface CardProps { className?: string; @@ -9,49 +8,41 @@ export interface CardProps { actions?: React.ReactNode; children: React.ReactNode; border?: boolean; - draggable?: boolean; } export const Card = ({ className, title, actions, - draggable, border, children, }: CardProps): JSX.Element => { return ( - -
- {(title || actions) && ( -
-
-
{title}
- {actions} -
+
+ {(title || actions) && ( +
+
+
{title}
+ {actions}
- )} +
+ )} - - {children} - -
- + + {children} + +
); }; diff --git a/src/components/generic/Modal.tsx b/src/components/generic/Modal.tsx index a44d4185..1a93dca3 100644 --- a/src/components/generic/Modal.tsx +++ b/src/components/generic/Modal.tsx @@ -3,11 +3,10 @@ import type React from 'react'; import { AnimatePresence, m } from 'framer-motion'; import { FiX } from 'react-icons/fi'; +import { IconButton } from '@components/generic/button/IconButton'; +import { Card, CardProps } from '@components/generic/Card'; import { useAppSelector } from '@hooks/useAppSelector'; -import { IconButton } from './button/IconButton'; -import { Card, CardProps } from './Card'; - export interface ModalProps extends CardProps { open: boolean; bgDismiss?: boolean; @@ -51,7 +50,6 @@ export const Modal = ({
{actions} diff --git a/src/components/generic/Sidebar/CollapsibleSection.tsx b/src/components/generic/Sidebar/CollapsibleSection.tsx index 6f14d453..4eacbdad 100644 --- a/src/components/generic/Sidebar/CollapsibleSection.tsx +++ b/src/components/generic/Sidebar/CollapsibleSection.tsx @@ -7,12 +7,14 @@ import { FiArrowUp } from 'react-icons/fi'; export interface CollapsibleSectionProps { title: string; icon?: JSX.Element; + status?: boolean; children: JSX.Element; } export const CollapsibleSection = ({ title, icon, + status, children, }: CollapsibleSectionProps): JSX.Element => { const [open, setOpen] = useState(false); @@ -21,6 +23,7 @@ export const CollapsibleSection = ({ - - {icon} + + + {status !== undefined ? ( + <> + {icon} +
+ + ) : ( + <>{icon} + )} + {title} Promise; + loading: boolean; + dirty: boolean; children: React.ReactNode; } -export const Form = ({ loading, children }: FormProps): JSX.Element => { +export const Form = ({ + submit, + loading, + dirty, + children, +}: FormProps): JSX.Element => { return (
{ e.preventDefault(); }} - className="relative flex-grow gap-3 p-2" > {loading && } {children} +
+
+ } /> +
+
); }; diff --git a/src/components/layout/Sidebar/Settings/Channels.tsx b/src/components/layout/Sidebar/Settings/Channels.tsx index 9c49ad82..746bc715 100644 --- a/src/components/layout/Sidebar/Settings/Channels.tsx +++ b/src/components/layout/Sidebar/Settings/Channels.tsx @@ -2,10 +2,9 @@ import type React from 'react'; import { useState } from 'react'; import { useForm } from 'react-hook-form'; -import { FiSave } from 'react-icons/fi'; -import { IconButton } from '@components/generic/button/IconButton'; import { Checkbox } from '@components/generic/form/Checkbox'; +import { Form } from '@components/generic/form/Form'; import { Input } from '@components/generic/form/Input'; import { Select } from '@components/generic/form/Select'; import { connection } from '@core/connection'; @@ -59,7 +58,7 @@ export const Channels = (): JSX.Element => { label="Use Presets" onChange={(e): void => setUsePreset(e.target.checked)} /> -
+ {usePreset ? ( - - - -
-
- => { - await onSubmit(); - }} - icon={} - /> -
-
- +
+ + + + + + + + + + + + + + { + const { value, onChange, ...rest } = field; + const { error } = fieldState; + const label = 'Position Flags'; + return ( +
+ {label &&
+ ); + }} + /> + + ); +}; diff --git a/src/components/layout/Sidebar/Settings/Index.tsx b/src/components/layout/Sidebar/Settings/Index.tsx index a7123ece..601cbe03 100644 --- a/src/components/layout/Sidebar/Settings/Index.tsx +++ b/src/components/layout/Sidebar/Settings/Index.tsx @@ -2,36 +2,43 @@ import type React from 'react'; import { useState } from 'react'; import { + FiActivity, FiAlignLeft, FiBell, FiFastForward, FiLayers, FiLayout, FiMapPin, + FiMessageSquare, FiPackage, - FiRadio, + FiPower, FiRss, + FiSmartphone, + FiTv, FiUser, FiWifi, - FiZap, } from 'react-icons/fi'; -import { useAppSelector } from '@app/hooks/useAppSelector.js'; import { CollapsibleSection } from '@components/generic/Sidebar/CollapsibleSection'; import { ExternalSection } from '@components/generic/Sidebar/ExternalSection'; import { SidebarOverlay } from '@components/generic/Sidebar/SidebarOverlay'; import { Channels } from '@components/layout/Sidebar/Settings/Channels'; import { ChannelsGroup } from '@components/layout/Sidebar/Settings/channels/ChannelsGroup'; +import { Display } from '@components/layout/Sidebar/Settings/Display'; +import { GPS } from '@components/layout/Sidebar/Settings/GPS'; import { Interface } from '@components/layout/Sidebar/Settings/Interface'; -import { ExternalNotificationsSettingsPlanel } from '@components/layout/Sidebar/Settings/plugins/ExternalNotifications'; -import { RangeTestSettingsPanel } from '@components/layout/Sidebar/Settings/plugins/RangeTest'; -import { SerialSettingsPanel } from '@components/layout/Sidebar/Settings/plugins/Serial'; -import { StoreForwardSettingsPanel } from '@components/layout/Sidebar/Settings/plugins/StoreForward'; -import { Position } from '@components/layout/Sidebar/Settings/Position'; +import { LoRa } from '@components/layout/Sidebar/Settings/LoRa'; +import { CannedMessage } from '@components/layout/Sidebar/Settings/modules/CannedMessage'; +import { ExternalNotificationsSettingsPlanel } from '@components/layout/Sidebar/Settings/modules/ExternalNotifications'; +import { MQTT } from '@components/layout/Sidebar/Settings/modules/MQTT'; +import { RangeTestSettingsPanel } from '@components/layout/Sidebar/Settings/modules/RangeTest'; +import { SerialSettingsPanel } from '@components/layout/Sidebar/Settings/modules/Serial'; +import { StoreForwardSettingsPanel } from '@components/layout/Sidebar/Settings/modules/StoreForward'; +import { Telemetry } from '@components/layout/Sidebar/Settings/modules/Telemetry'; import { Power } from '@components/layout/Sidebar/Settings/Power'; -import { Radio } from '@components/layout/Sidebar/Settings/Radio'; import { User } from '@components/layout/Sidebar/Settings/User'; import { WiFi } from '@components/layout/Sidebar/Settings/WiFi'; +import { useAppSelector } from '@hooks/useAppSelector'; export interface SettingsProps { open: boolean; @@ -39,13 +46,15 @@ export interface SettingsProps { } export const Settings = ({ open, setOpen }: SettingsProps): JSX.Element => { - const [pluginsOpen, setPluginsOpen] = useState(false); + const [modulesOpen, setModulesOpen] = useState(false); const [channelsOpen, setChannelsOpen] = useState(false); const { - rangeTestPluginEnabled, - extNotificationPluginEnabled, - serialpluginEnabled, - storeForwardPluginEnabled, + rangeTestModuleEnabled, + extNotificationModuleEnabled, + serialmoduleEnabled, + storeForwardModuleEnabled, + mqttDisabled, + cannedMessageModuleEnabled, } = useAppSelector((state) => state.meshtastic.radio.preferences); const hasGps = true; @@ -61,20 +70,26 @@ export const Settings = ({ open, setOpen }: SettingsProps): JSX.Element => { }} direction="y" > - } title="WiFi & MQTT"> - - - } title="Position"> - - } title="User"> - } title="Power"> + } title="Device"> + + + } title="GPS"> + + + } title="Power"> - } title="Radio"> - + } title="WiFi"> + + + } title="Display"> + + + } title="LoRa"> + } title="Primary Channel"> @@ -88,87 +103,76 @@ export const Settings = ({ open, setOpen }: SettingsProps): JSX.Element => { /> { - setPluginsOpen(true); + setModulesOpen(true); }} icon={} - title="Plugins" + title="Modules" /> } title="Interface"> - {/* Plugins */} + {/* Modules */} { - setPluginsOpen(false); + setModulesOpen(false); }} direction="x" > - -
-
- } + icon={} + title="MQTT" + status={!mqttDisabled} > - -
- - -
-
- } - > - +
} title="Serial" - icon={ -
- -
-
- } + status={serialmoduleEnabled} > } + title="External Notifications" + status={extNotificationModuleEnabled} + > + + + } title="Store & Forward" - icon={ -
- -
-
- } + status={storeForwardModuleEnabled} > + } + title="Range Test" + status={rangeTestModuleEnabled} + > + + + } + title="Telemetry" + status={true} + > + + + } + title="Canned Message" + status={cannedMessageModuleEnabled} + > + + - {/* End Plugins */} + {/* End Modules */} {/* Channels */} { + const preferences = useAppSelector( + (state) => state.meshtastic.radio.preferences, + ); + const [loading, setLoading] = useState(false); + const { register, handleSubmit, formState, reset } = + useForm({ + defaultValues: preferences, + }); + + useEffect(() => { + reset(preferences); + }, [reset, preferences]); + + const onSubmit = handleSubmit((data) => { + setLoading(true); + void connection.setPreferences(data, async () => { + reset({ ...data }); + setLoading(false); + await Promise.resolve(); + }); + }); + return ( +
+ + + + + + - - { - const { value, onChange, ...rest } = field; - const { error } = fieldState; - const label = 'Position Flags'; - return ( -
- {label &&
- ); - }} - /> - - - - - - - -
-
- => { - await onSubmit(); - }} - icon={} - /> -
-
- - ); -}; diff --git a/src/components/layout/Sidebar/Settings/Power.tsx b/src/components/layout/Sidebar/Settings/Power.tsx index a7ecf0e8..36588a3e 100644 --- a/src/components/layout/Sidebar/Settings/Power.tsx +++ b/src/components/layout/Sidebar/Settings/Power.tsx @@ -2,10 +2,10 @@ import type React from 'react'; import { useEffect, useState } from 'react'; import { useForm } from 'react-hook-form'; -import { FiSave } from 'react-icons/fi'; -import { IconButton } from '@components/generic/button/IconButton'; import { Checkbox } from '@components/generic/form/Checkbox'; +import { Form } from '@components/generic/form/Form'; +import { Input } from '@components/generic/form/Input'; import { Select } from '@components/generic/form/Select'; import { connection } from '@core/connection'; import { useAppSelector } from '@hooks/useAppSelector'; @@ -37,34 +37,75 @@ export const Power = (): JSX.Element => { }); }); return ( - <> -
- + + + + + + + + + + + + + ); }; diff --git a/src/components/layout/Sidebar/Settings/User.tsx b/src/components/layout/Sidebar/Settings/User.tsx index 08665136..6184b5ba 100644 --- a/src/components/layout/Sidebar/Settings/User.tsx +++ b/src/components/layout/Sidebar/Settings/User.tsx @@ -2,11 +2,10 @@ import type React from 'react'; import { useEffect, useState } from 'react'; import { useForm } from 'react-hook-form'; -import { FiSave } from 'react-icons/fi'; import { base16 } from 'rfc4648'; -import { IconButton } from '@components/generic/button/IconButton'; import { Checkbox } from '@components/generic/form/Checkbox'; +import { Form } from '@components/generic/form/Form'; import { Input } from '@components/generic/form/Input'; import { Select } from '@components/generic/form/Select'; import { connection } from '@core/connection'; @@ -67,66 +66,53 @@ export const User = (): JSX.Element => { }); return ( - <> -
- - - - - - - - - - -
-
- => { - await onSubmit(); - }} - icon={} - /> -
-
- +
+ + + + + + + + + + ); }; diff --git a/src/components/layout/Sidebar/Settings/WiFi.tsx b/src/components/layout/Sidebar/Settings/WiFi.tsx index 1fe955c6..1fd096b0 100644 --- a/src/components/layout/Sidebar/Settings/WiFi.tsx +++ b/src/components/layout/Sidebar/Settings/WiFi.tsx @@ -2,10 +2,9 @@ import type React from 'react'; import { useEffect, useState } from 'react'; import { useForm, useWatch } from 'react-hook-form'; -import { FiSave } from 'react-icons/fi'; -import { IconButton } from '@components/generic/button/IconButton'; import { Checkbox } from '@components/generic/form/Checkbox'; +import { Form } from '@components/generic/form/Form'; import { Input } from '@components/generic/form/Input'; import { connection } from '@core/connection'; import { useAppSelector } from '@hooks/useAppSelector'; @@ -21,18 +20,12 @@ export const WiFi = (): JSX.Element => { defaultValues: preferences, }); - const watchWifiApMode = useWatch({ + const WifiApMode = useWatch({ control, name: 'wifiApMode', defaultValue: false, }); - const watchMQTTDisabled = useWatch({ - control, - name: 'mqttDisabled', - defaultValue: false, - }); - useEffect(() => { reset(preferences); }, [reset, preferences]); @@ -46,51 +39,20 @@ export const WiFi = (): JSX.Element => { }); }); return ( - <> -
- - - - - - - - -
-
- => { - await onSubmit(); - }} - icon={} - /> -
-
- +
+ + + + ); }; diff --git a/src/components/layout/Sidebar/Settings/channels/Channels.tsx b/src/components/layout/Sidebar/Settings/channels/Channels.tsx index 3f985599..ac756f10 100644 --- a/src/components/layout/Sidebar/Settings/channels/Channels.tsx +++ b/src/components/layout/Sidebar/Settings/channels/Channels.tsx @@ -3,7 +3,6 @@ import { useEffect, useState } from 'react'; import { fromByteArray, toByteArray } from 'base64-js'; import { useForm } from 'react-hook-form'; -import { FiSave } from 'react-icons/fi'; import { MdRefresh, MdVisibility, MdVisibilityOff } from 'react-icons/md'; import { IconButton } from '@components/generic/button/IconButton'; @@ -18,7 +17,7 @@ export interface SettingsPanelProps { channel: Protobuf.Channel; } -export const SettingsPanel = ({ channel }: SettingsPanelProps): JSX.Element => { +export const Channels = ({ channel }: SettingsPanelProps): JSX.Element => { const [loading, setLoading] = useState(false); const [keySize, setKeySize] = useState<128 | 256>(256); const [pskHidden, setPskHidden] = useState(true); @@ -75,67 +74,54 @@ export const SettingsPanel = ({ channel }: SettingsPanelProps): JSX.Element => { }); return ( -
-
- {channel?.index !== 0 && ( - <> - - - - )} - - - { - setPskHidden(!pskHidden); - }} - icon={pskHidden ? : } - /> - { - const key = new Uint8Array(keySize); - crypto.getRandomValues(key); - setValue('psk', fromByteArray(key)); - }} - icon={} - /> - - } - {...register('psk')} - /> - - - -
-
- => { - await onSubmit(); - }} - icon={} +
+ {channel?.index !== 0 && ( + <> + -
-
-
+ + + )} + + + { + setPskHidden(!pskHidden); + }} + icon={pskHidden ? : } + /> + { + const key = new Uint8Array(keySize); + crypto.getRandomValues(key); + setValue('psk', fromByteArray(key)); + }} + icon={} + /> + + } + {...register('psk')} + /> + + + ); }; diff --git a/src/components/layout/Sidebar/Settings/channels/ChannelsGroup.tsx b/src/components/layout/Sidebar/Settings/channels/ChannelsGroup.tsx index f8cd9c8a..3b06d872 100644 --- a/src/components/layout/Sidebar/Settings/channels/ChannelsGroup.tsx +++ b/src/components/layout/Sidebar/Settings/channels/ChannelsGroup.tsx @@ -1,7 +1,7 @@ import type React from 'react'; import { CollapsibleSection } from '@components/generic/Sidebar/CollapsibleSection'; -import { SettingsPanel } from '@components/layout/Sidebar/Settings/channels/Channels'; +import { Channels } from '@components/layout/Sidebar/Settings/channels/Channels'; import { useAppSelector } from '@hooks/useAppSelector'; import { Protobuf } from '@meshtastic/meshtasticjs'; @@ -33,7 +33,7 @@ export const ChannelsGroup = (): JSX.Element => { /> } > - +
); diff --git a/src/components/layout/Sidebar/Settings/modules/CannedMessage.tsx b/src/components/layout/Sidebar/Settings/modules/CannedMessage.tsx new file mode 100644 index 00000000..df6e441d --- /dev/null +++ b/src/components/layout/Sidebar/Settings/modules/CannedMessage.tsx @@ -0,0 +1,99 @@ +import type React from 'react'; +import { useEffect, useState } from 'react'; + +import { useForm, useWatch } from 'react-hook-form'; + +import { Checkbox } from '@components/generic/form/Checkbox'; +import { Form } from '@components/generic/form/Form'; +import { Input } from '@components/generic/form/Input'; +import { Select } from '@components/generic/form/Select'; +import { connection } from '@core/connection'; +import { useAppSelector } from '@hooks/useAppSelector'; +import { Protobuf } from '@meshtastic/meshtasticjs'; + +export const CannedMessage = (): JSX.Element => { + const preferences = useAppSelector( + (state) => state.meshtastic.radio.preferences, + ); + const [loading, setLoading] = useState(false); + const { register, handleSubmit, formState, reset, control } = + useForm({ + defaultValues: preferences, + }); + + const moduleEnabled = useWatch({ + control, + name: 'rotary1Enabled', + defaultValue: false, + }); + + useEffect(() => { + reset(preferences); + }, [reset, preferences]); + + const onSubmit = handleSubmit((data) => { + setLoading(true); + void connection.setPreferences(data, async () => { + reset({ ...data }); + setLoading(false); + await Promise.resolve(); + }); + }); + return ( +
+ + + + + + + + + + ); +}; diff --git a/src/components/layout/Sidebar/Settings/modules/ExternalNotifications.tsx b/src/components/layout/Sidebar/Settings/modules/ExternalNotifications.tsx new file mode 100644 index 00000000..b4d8bfe4 --- /dev/null +++ b/src/components/layout/Sidebar/Settings/modules/ExternalNotifications.tsx @@ -0,0 +1,84 @@ +import type React from 'react'; +import { useEffect, useState } from 'react'; + +import { useForm, useWatch } from 'react-hook-form'; + +import { Checkbox } from '@components/generic/form/Checkbox'; +import { Form } from '@components/generic/form/Form'; +import { Input } from '@components/generic/form/Input'; +import { connection } from '@core/connection'; +import { useAppSelector } from '@hooks/useAppSelector'; +import type { Protobuf } from '@meshtastic/meshtasticjs'; + +export const ExternalNotificationsSettingsPlanel = (): JSX.Element => { + const [loading, setLoading] = useState(false); + + const preferences = useAppSelector( + (state) => state.meshtastic.radio.preferences, + ); + + const { register, handleSubmit, formState, reset, control } = + useForm({ + defaultValues: preferences, + }); + + useEffect(() => { + reset(preferences); + }, [reset, preferences]); + + const onSubmit = handleSubmit(async (data) => { + setLoading(true); + await connection.setPreferences(data, async (): Promise => { + reset({ ...data }); + setLoading(false); + await Promise.resolve(); + }); + }); + + const moduleEnabled = useWatch({ + control, + name: 'extNotificationModuleEnabled', + defaultValue: false, + }); + + return ( +
+ + + + + + + + ); +}; diff --git a/src/components/layout/Sidebar/Settings/modules/MQTT.tsx b/src/components/layout/Sidebar/Settings/modules/MQTT.tsx new file mode 100644 index 00000000..002fd850 --- /dev/null +++ b/src/components/layout/Sidebar/Settings/modules/MQTT.tsx @@ -0,0 +1,68 @@ +import type React from 'react'; +import { useEffect, useState } from 'react'; + +import { useForm, useWatch } from 'react-hook-form'; + +import { Checkbox } from '@components/generic/form/Checkbox'; +import { Form } from '@components/generic/form/Form'; +import { Input } from '@components/generic/form/Input'; +import { connection } from '@core/connection'; +import { useAppSelector } from '@hooks/useAppSelector'; +import type { Protobuf } from '@meshtastic/meshtasticjs'; + +export const MQTT = (): JSX.Element => { + const preferences = useAppSelector( + (state) => state.meshtastic.radio.preferences, + ); + const [loading, setLoading] = useState(false); + const { register, handleSubmit, formState, reset, control } = + useForm({ + defaultValues: preferences, + }); + + const moduleEnabled = useWatch({ + control, + name: 'mqttDisabled', + defaultValue: false, + }); + + useEffect(() => { + reset(preferences); + }, [reset, preferences]); + + const onSubmit = handleSubmit((data) => { + setLoading(true); + void connection.setPreferences(data, async () => { + reset({ ...data }); + setLoading(false); + await Promise.resolve(); + }); + }); + return ( +
+ + + + + + + ); +}; diff --git a/src/components/layout/Sidebar/Settings/plugins/RangeTest.tsx b/src/components/layout/Sidebar/Settings/modules/RangeTest.tsx similarity index 52% rename from src/components/layout/Sidebar/Settings/plugins/RangeTest.tsx rename to src/components/layout/Sidebar/Settings/modules/RangeTest.tsx index 11dd9765..cb3cb215 100644 --- a/src/components/layout/Sidebar/Settings/plugins/RangeTest.tsx +++ b/src/components/layout/Sidebar/Settings/modules/RangeTest.tsx @@ -2,9 +2,7 @@ import type React from 'react'; import { useEffect, useState } from 'react'; import { useForm, useWatch } from 'react-hook-form'; -import { FiSave } from 'react-icons/fi'; -import { IconButton } from '@components/generic/button/IconButton'; import { Checkbox } from '@components/generic/form/Checkbox'; import { Form } from '@components/generic/form/Form'; import { Input } from '@components/generic/form/Input'; @@ -37,45 +35,32 @@ export const RangeTestSettingsPanel = (): JSX.Element => { }); }); - const pluginEnabled = useWatch({ + const moduleEnabled = useWatch({ control, - name: 'rangeTestPluginEnabled', + name: 'rangeTestModuleEnabled', defaultValue: false, }); return ( - <> -
- - - - -
-
- => { - await onSubmit(); - }} - icon={} - /> -
-
- +
+ + + + ); }; diff --git a/src/components/layout/Sidebar/Settings/modules/Serial.tsx b/src/components/layout/Sidebar/Settings/modules/Serial.tsx new file mode 100644 index 00000000..db914a6d --- /dev/null +++ b/src/components/layout/Sidebar/Settings/modules/Serial.tsx @@ -0,0 +1,95 @@ +import type React from 'react'; +import { useEffect, useState } from 'react'; + +import { useForm, useWatch } from 'react-hook-form'; + +import { Checkbox } from '@components/generic/form/Checkbox'; +import { Form } from '@components/generic/form/Form'; +import { Input } from '@components/generic/form/Input'; +import { connection } from '@core/connection'; +import { useAppSelector } from '@hooks/useAppSelector'; +import type { Protobuf } from '@meshtastic/meshtasticjs'; + +export const SerialSettingsPanel = (): JSX.Element => { + const [loading, setLoading] = useState(false); + + const preferences = useAppSelector( + (state) => state.meshtastic.radio.preferences, + ); + + const { register, handleSubmit, formState, reset, control } = + useForm({ + defaultValues: preferences, + }); + + useEffect(() => { + reset(preferences); + }, [reset, preferences]); + + const onSubmit = handleSubmit(async (data) => { + setLoading(true); + await connection.setPreferences(data, async (): Promise => { + reset({ ...data }); + setLoading(false); + await Promise.resolve(); + }); + }); + + const moduleEnabled = useWatch({ + control, + name: 'serialmoduleEnabled', + defaultValue: false, + }); + + return ( +
+ + + + + + + + + + ); +}; diff --git a/src/components/layout/Sidebar/Settings/modules/StoreForward.tsx b/src/components/layout/Sidebar/Settings/modules/StoreForward.tsx new file mode 100644 index 00000000..e17c12fc --- /dev/null +++ b/src/components/layout/Sidebar/Settings/modules/StoreForward.tsx @@ -0,0 +1,82 @@ +import type React from 'react'; +import { useEffect, useState } from 'react'; + +import { useForm, useWatch } from 'react-hook-form'; + +import { Checkbox } from '@components/generic/form/Checkbox'; +import { Form } from '@components/generic/form/Form'; +import { Input } from '@components/generic/form/Input'; +import { connection } from '@core/connection'; +import { useAppSelector } from '@hooks/useAppSelector'; +import type { Protobuf } from '@meshtastic/meshtasticjs'; + +export const StoreForwardSettingsPanel = (): JSX.Element => { + const [loading, setLoading] = useState(false); + + const preferences = useAppSelector( + (state) => state.meshtastic.radio.preferences, + ); + + const { register, handleSubmit, formState, reset, control } = + useForm({ + defaultValues: preferences, + }); + + useEffect(() => { + reset(preferences); + }, [reset, preferences]); + + const onSubmit = handleSubmit(async (data) => { + setLoading(true); + await connection.setPreferences(data, async (): Promise => { + reset({ ...data }); + setLoading(false); + await Promise.resolve(); + }); + }); + + const moduleEnabled = useWatch({ + control, + name: 'storeForwardModuleEnabled', + defaultValue: false, + }); + + return ( +
+ + + + + + + ); +}; diff --git a/src/components/layout/Sidebar/Settings/modules/Telemetry.tsx b/src/components/layout/Sidebar/Settings/modules/Telemetry.tsx new file mode 100644 index 00000000..53770d6e --- /dev/null +++ b/src/components/layout/Sidebar/Settings/modules/Telemetry.tsx @@ -0,0 +1,83 @@ +import type React from 'react'; +import { useEffect, useState } from 'react'; + +import { useForm } from 'react-hook-form'; + +import { Checkbox } from '@components/generic/form/Checkbox'; +import { Form } from '@components/generic/form/Form'; +import { Input } from '@components/generic/form/Input'; +import { Select } from '@components/generic/form/Select'; +import { connection } from '@core/connection'; +import { useAppSelector } from '@hooks/useAppSelector'; +import { Protobuf } from '@meshtastic/meshtasticjs'; + +export const Telemetry = (): JSX.Element => { + const preferences = useAppSelector( + (state) => state.meshtastic.radio.preferences, + ); + const [loading, setLoading] = useState(false); + const { register, handleSubmit, formState, reset, control } = + useForm({ + defaultValues: preferences, + }); + + useEffect(() => { + reset(preferences); + }, [reset, preferences]); + + const onSubmit = handleSubmit((data) => { + setLoading(true); + void connection.setPreferences(data, async () => { + reset({ ...data }); + setLoading(false); + await Promise.resolve(); + }); + }); + return ( +
+ + + + + + + + + ); +}; diff --git a/src/components/layout/Sidebar/Settings/plugins/ExternalNotifications.tsx b/src/components/layout/Sidebar/Settings/plugins/ExternalNotifications.tsx deleted file mode 100644 index c2620c37..00000000 --- a/src/components/layout/Sidebar/Settings/plugins/ExternalNotifications.tsx +++ /dev/null @@ -1,99 +0,0 @@ -import type React from 'react'; -import { useEffect, useState } from 'react'; - -import { useForm, useWatch } from 'react-hook-form'; -import { FiSave } from 'react-icons/fi'; - -import { IconButton } from '@components/generic/button/IconButton'; -import { Checkbox } from '@components/generic/form/Checkbox'; -import { Form } from '@components/generic/form/Form'; -import { Input } from '@components/generic/form/Input'; -import { connection } from '@core/connection'; -import { useAppSelector } from '@hooks/useAppSelector'; -import type { Protobuf } from '@meshtastic/meshtasticjs'; - -export const ExternalNotificationsSettingsPlanel = (): JSX.Element => { - const [loading, setLoading] = useState(false); - - const preferences = useAppSelector( - (state) => state.meshtastic.radio.preferences, - ); - - const { register, handleSubmit, formState, reset, control } = - useForm({ - defaultValues: preferences, - }); - - useEffect(() => { - reset(preferences); - }, [reset, preferences]); - - const onSubmit = handleSubmit(async (data) => { - setLoading(true); - await connection.setPreferences(data, async (): Promise => { - reset({ ...data }); - setLoading(false); - await Promise.resolve(); - }); - }); - - const pluginEnabled = useWatch({ - control, - name: 'extNotificationPluginEnabled', - defaultValue: false, - }); - - return ( - <> -
- - - - - - - -
-
- => { - await onSubmit(); - }} - icon={} - /> -
-
- - ); -}; diff --git a/src/components/layout/Sidebar/Settings/plugins/Serial.tsx b/src/components/layout/Sidebar/Settings/plugins/Serial.tsx deleted file mode 100644 index 8673c88b..00000000 --- a/src/components/layout/Sidebar/Settings/plugins/Serial.tsx +++ /dev/null @@ -1,102 +0,0 @@ -import type React from 'react'; -import { useEffect, useState } from 'react'; - -import { useForm, useWatch } from 'react-hook-form'; -import { FiSave } from 'react-icons/fi'; - -import { IconButton } from '@components/generic/button/IconButton'; -import { Checkbox } from '@components/generic/form/Checkbox'; -import { Form } from '@components/generic/form/Form'; -import { Input } from '@components/generic/form/Input'; -import { connection } from '@core/connection'; -import { useAppSelector } from '@hooks/useAppSelector'; -import type { Protobuf } from '@meshtastic/meshtasticjs'; - -export const SerialSettingsPanel = (): JSX.Element => { - const [loading, setLoading] = useState(false); - - const preferences = useAppSelector( - (state) => state.meshtastic.radio.preferences, - ); - - const { register, handleSubmit, formState, reset, control } = - useForm({ - defaultValues: preferences, - }); - - useEffect(() => { - reset(preferences); - }, [reset, preferences]); - - const onSubmit = handleSubmit(async (data) => { - setLoading(true); - await connection.setPreferences(data, async (): Promise => { - reset({ ...data }); - setLoading(false); - await Promise.resolve(); - }); - }); - - const pluginEnabled = useWatch({ - control, - name: 'serialpluginEnabled', - defaultValue: false, - }); - - return ( - <> -
- - - - - - - - -
-
- => { - await onSubmit(); - }} - icon={} - /> -
-
- - ); -}; diff --git a/src/components/layout/Sidebar/Settings/plugins/StoreForward.tsx b/src/components/layout/Sidebar/Settings/plugins/StoreForward.tsx deleted file mode 100644 index 6039484a..00000000 --- a/src/components/layout/Sidebar/Settings/plugins/StoreForward.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import type React from 'react'; -import { useEffect, useState } from 'react'; - -import { useForm, useWatch } from 'react-hook-form'; -import { FiSave } from 'react-icons/fi'; - -import { IconButton } from '@components/generic/button/IconButton'; -import { Checkbox } from '@components/generic/form/Checkbox'; -import { Form } from '@components/generic/form/Form'; -import { Input } from '@components/generic/form/Input'; -import { connection } from '@core/connection'; -import { useAppSelector } from '@hooks/useAppSelector'; -import type { Protobuf } from '@meshtastic/meshtasticjs'; - -export const StoreForwardSettingsPanel = (): JSX.Element => { - const [loading, setLoading] = useState(false); - - const preferences = useAppSelector( - (state) => state.meshtastic.radio.preferences, - ); - - const { register, handleSubmit, formState, reset, control } = - useForm({ - defaultValues: preferences, - }); - - useEffect(() => { - reset(preferences); - }, [reset, preferences]); - - const onSubmit = handleSubmit(async (data) => { - setLoading(true); - await connection.setPreferences(data, async (): Promise => { - reset({ ...data }); - setLoading(false); - await Promise.resolve(); - }); - }); - - const pluginEnabled = useWatch({ - control, - name: 'storeForwardPluginEnabled', - defaultValue: false, - }); - - return ( - <> -
- - - - - - -
-
- => { - await onSubmit(); - }} - icon={} - /> -
-
- - ); -}; diff --git a/src/components/layout/index.tsx b/src/components/layout/index.tsx index 85f96b31..f5e88688 100644 --- a/src/components/layout/index.tsx +++ b/src/components/layout/index.tsx @@ -6,13 +6,12 @@ import { FiMessageCircle, FiSettings } from 'react-icons/fi'; import { RiMindMap, RiRoadMapLine } from 'react-icons/ri'; import { VscExtensions } from 'react-icons/vsc'; -import { routes, useRoute } from '@app/core/router'; +import { ErrorFallback } from '@components/ErrorFallback'; import { IconButton } from '@components/generic/button/IconButton'; import { Sidebar } from '@components/layout/Sidebar'; - -import { ErrorFallback } from '../ErrorFallback'; -import type { TabProps } from '../Tab'; -import { Tabs } from '../Tabs'; +import type { TabProps } from '@components/Tab'; +import { Tabs } from '@components/Tabs'; +import { routes, useRoute } from '@core/router'; export interface LayoutProps { title: string; @@ -59,7 +58,7 @@ export const Layout = ({ ]; return ( -
+
diff --git a/src/components/menu/BottomNav.tsx b/src/components/menu/BottomNav.tsx index 9212d5ac..5d4ecc5f 100644 --- a/src/components/menu/BottomNav.tsx +++ b/src/components/menu/BottomNav.tsx @@ -18,6 +18,8 @@ import { RiArrowUpLine, } from 'react-icons/ri'; +import { BottomNavItem } from '@components/menu/BottomNavItem'; +import { VersionInfo } from '@components/modals/VersionInfo'; import { connType, openConnectionModal, @@ -28,9 +30,6 @@ import { useAppDispatch } from '@hooks/useAppDispatch'; import { useAppSelector } from '@hooks/useAppSelector'; import { Protobuf, Types } from '@meshtastic/meshtasticjs'; -import { VersionInfo } from '../modals/VersionInfo'; -import { BottomNavItem } from './BottomNavItem'; - export const BottomNav = (): JSX.Element => { const [showVersionInfo, setShowVersionInfo] = useState(false); const dispatch = useAppDispatch(); diff --git a/src/components/modals/VersionInfo.tsx b/src/components/modals/VersionInfo.tsx index 938f4ea0..7a965e4d 100644 --- a/src/components/modals/VersionInfo.tsx +++ b/src/components/modals/VersionInfo.tsx @@ -4,14 +4,13 @@ import { useEffect } from 'react'; import { MdUpgrade } from 'react-icons/md'; import useSWR from 'swr'; -import { connectionUrl } from '@app/core/connection.js'; -import { setUpdateAvaliable } from '@app/core/slices/appSlice'; -import { fetcher } from '@app/core/utils/fetcher'; -import { useAppDispatch } from '@app/hooks/useAppDispatch'; -import { useAppSelector } from '@app/hooks/useAppSelector'; +import { IconButton } from '@components/generic/button/IconButton'; import { Modal } from '@components/generic/Modal'; - -import { IconButton } from '../generic/button/IconButton'; +import { connectionUrl } from '@core/connection'; +import { setUpdateAvaliable } from '@core/slices/appSlice'; +import { fetcher } from '@core/utils/fetcher'; +import { useAppDispatch } from '@hooks/useAppDispatch'; +import { useAppSelector } from '@hooks/useAppSelector'; export interface Commit { sha: string; diff --git a/src/core/slices/mapSlice.ts b/src/core/slices/mapSlice.ts index 102a6ed8..1b5ea269 100644 --- a/src/core/slices/mapSlice.ts +++ b/src/core/slices/mapSlice.ts @@ -1,6 +1,6 @@ import { LngLat } from 'mapbox-gl'; -import type { MapStyleName } from '@pages/Map/styles'; +import type { MapStyleName } from '@core/mapStyles'; import type { PayloadAction } from '@reduxjs/toolkit'; import { createSlice } from '@reduxjs/toolkit'; diff --git a/src/pages/Extensions/Debug.tsx b/src/pages/Extensions/Debug.tsx index 9c6a64f5..95180bd8 100644 --- a/src/pages/Extensions/Debug.tsx +++ b/src/pages/Extensions/Debug.tsx @@ -1,8 +1,8 @@ import type React from 'react'; -import { Button } from '@app/components/generic/button/Button'; -import { Card } from '@app/components/generic/Card'; -import { connection } from '@app/core/connection.js'; +import { Button } from '@components/generic/button/Button'; +import { Card } from '@components/generic/Card'; +import { connection } from '@core/connection'; import { useAppSelector } from '@hooks/useAppSelector'; export const Debug = (): JSX.Element => { diff --git a/src/pages/Extensions/FileBrowser.tsx b/src/pages/Extensions/FileBrowser.tsx index c9774b46..2c3ed2aa 100644 --- a/src/pages/Extensions/FileBrowser.tsx +++ b/src/pages/Extensions/FileBrowser.tsx @@ -4,8 +4,8 @@ import { AnimatePresence, m } from 'framer-motion'; import { FiFilePlus } from 'react-icons/fi'; import useSWR from 'swr'; -import { Button } from '@app/components/generic/button/Button'; -import { Card } from '@app/components/generic/Card'; +import { Button } from '@components/generic/button/Button'; +import { Card } from '@components/generic/Card'; import { fetcher } from '@core/utils/fetcher'; import { useAppSelector } from '@hooks/useAppSelector'; diff --git a/src/pages/Extensions/Index.tsx b/src/pages/Extensions/Index.tsx index 9282c873..1af05883 100644 --- a/src/pages/Extensions/Index.tsx +++ b/src/pages/Extensions/Index.tsx @@ -8,12 +8,11 @@ import { VscDebug, VscExtensions } from 'react-icons/vsc'; import { ExternalSection } from '@components/generic/Sidebar/ExternalSection'; import { Layout } from '@components/layout'; +import { Debug } from '@pages/Extensions/Debug'; import { FileBrowser } from '@pages/Extensions/FileBrowser'; import { Info } from '@pages/Extensions/Info'; import { Logs } from '@pages/Extensions/Logs'; -import { Debug } from './Debug'; - export const Extensions = (): JSX.Element => { const [selectedExtension, setSelectedExtension] = useState< 'info' | 'logs' | 'fileBrowser' | 'rangeTest' | 'debug' @@ -24,7 +23,7 @@ export const Extensions = (): JSX.Element => { title="Extensions" icon={} sidebarContents={ -
+
{ setSelectedExtension('info'); diff --git a/src/pages/Extensions/Info.tsx b/src/pages/Extensions/Info.tsx index 52a488cc..432a467a 100644 --- a/src/pages/Extensions/Info.tsx +++ b/src/pages/Extensions/Info.tsx @@ -3,9 +3,9 @@ import type React from 'react'; import { FiRefreshCw } from 'react-icons/fi'; import JSONPretty from 'react-json-pretty'; -import { IconButton } from '@app/components/generic/button/IconButton'; -import { Card } from '@app/components/generic/Card'; -import { CopyButton } from '@app/components/menu/buttons/CopyButton'; +import { IconButton } from '@components/generic/button/IconButton'; +import { Card } from '@components/generic/Card'; +import { CopyButton } from '@components/menu/buttons/CopyButton'; import { Hashicon } from '@emeraldpay/hashicon-react'; import { useAppSelector } from '@hooks/useAppSelector'; diff --git a/src/pages/Extensions/Logs.tsx b/src/pages/Extensions/Logs.tsx index 72cca889..343e9da1 100644 --- a/src/pages/Extensions/Logs.tsx +++ b/src/pages/Extensions/Logs.tsx @@ -3,10 +3,10 @@ import type React from 'react'; import { AnimatePresence, m } from 'framer-motion'; import { FiArrowRight, FiPaperclip, FiTrash } from 'react-icons/fi'; -import { IconButton } from '@app/components/generic/button/IconButton'; -import { Card } from '@app/components/generic/Card'; -import { clearLogs } from '@app/core/slices/meshtasticSlice'; -import { useAppDispatch } from '@app/hooks/useAppDispatch'; +import { IconButton } from '@components/generic/button/IconButton'; +import { Card } from '@components/generic/Card'; +import { clearLogs } from '@core/slices/meshtasticSlice'; +import { useAppDispatch } from '@hooks/useAppDispatch'; import { useAppSelector } from '@hooks/useAppSelector'; import { Protobuf, Types } from '@meshtastic/meshtasticjs'; diff --git a/src/pages/Nodes/NodeCard.tsx b/src/pages/Nodes/NodeCard.tsx index 34758b63..ae7a2e22 100644 --- a/src/pages/Nodes/NodeCard.tsx +++ b/src/pages/Nodes/NodeCard.tsx @@ -15,10 +15,10 @@ import { IoTelescope } from 'react-icons/io5'; import { MdGpsFixed, MdGpsNotFixed, MdGpsOff } from 'react-icons/md'; import JSONPretty from 'react-json-pretty'; -import { Tooltip } from '@app/components/generic/Tooltip'; import { IconButton } from '@components/generic/button/IconButton'; import { CollapsibleSection } from '@components/generic/Sidebar/CollapsibleSection'; import { SidebarOverlay } from '@components/generic/Sidebar/SidebarOverlay'; +import { Tooltip } from '@components/generic/Tooltip'; import { SidebarItem } from '@components/layout/Sidebar/SidebarItem'; import { CopyButton } from '@components/menu/buttons/CopyButton'; import type { Node } from '@core/slices/meshtasticSlice'; diff --git a/src/pages/Nodes/index.tsx b/src/pages/Nodes/index.tsx index 997af6ff..787d18ce 100644 --- a/src/pages/Nodes/index.tsx +++ b/src/pages/Nodes/index.tsx @@ -8,8 +8,8 @@ import { BiCrown } from 'react-icons/bi'; import { FiSettings } from 'react-icons/fi'; import { RiMindMap } from 'react-icons/ri'; -import { Tooltip } from '@app/components/generic/Tooltip'; import { IconButton } from '@components/generic/button/IconButton'; +import { Tooltip } from '@components/generic/Tooltip'; import { Layout } from '@components/layout'; import { SidebarItem } from '@components/layout/Sidebar/SidebarItem'; import { Hashicon } from '@emeraldpay/hashicon-react'; diff --git a/src/pages/NotFound.tsx b/src/pages/NotFound.tsx index b8cb6a93..d9c362d9 100644 --- a/src/pages/NotFound.tsx +++ b/src/pages/NotFound.tsx @@ -1,6 +1,6 @@ import type React from 'react'; -import { Card } from '@app/components/generic/Card'; +import { Card } from '@components/generic/Card'; export const NotFound = (): JSX.Element => { return (