From f35b5d490258d530fbd533f897e3298c1ee985ed Mon Sep 17 00:00:00 2001 From: Jason Wall Date: Sat, 9 Mar 2024 13:05:45 -0500 Subject: [PATCH] remove redux. you don't need it cause you're pretty much just using RXJS. --- src/package-lock.json | 1187 +---------------- src/package.json | 2 - src/src/app/common/state-service.ts | 168 +-- src/src/app/components/card.component.ts | 2 +- .../strongs/modal/strongs-modal.component.ts | 1 - src/src/app/services/app.service.ts | 102 +- 6 files changed, 137 insertions(+), 1325 deletions(-) diff --git a/src/package-lock.json b/src/package-lock.json index ba1a685a..2991966b 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -24,13 +24,11 @@ "@capacitor/ios": "^5.7.0", "@codetrix-studio/capacitor-google-auth": "^3.4.0-rc.0", "@ngx-pwa/local-storage": "^17.0.0", - "@reduxjs/toolkit": "^2.2.1", "angular2-uuid": "^1.1.1", "component": "^1.1.0", "firebase": "^10.8.0", "marked": "^9.0.0", "ngx-markdown": "^17.1.1", - "redux": "^5.0.1", "reselect": "^5.1.0", "rxjs": "^7.8.1", "tslib": "^2.6.2", @@ -3210,70 +3208,6 @@ "node": ">=10.0.0" } }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.0.tgz", - "integrity": "sha512-fGFDEctNh0CcSwsiRPxiaqX0P5rq+AqE0SRhYGZ4PX46Lg1FNR6oCxJghf8YgY0WQEgQuh3lErUFE4KxLeRmmw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.0.tgz", - "integrity": "sha512-3bMAfInvByLHfJwYPJRlpTeaQA75n8C/QKpEaiS4HrFWFiJlNI0vzq/zCjBrhAYcPyVPG7Eo9dMrcQXuqmNk5g==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.0.tgz", - "integrity": "sha512-aVpnM4lURNkp0D3qPoAzSG92VXStYmoVPOgXveAUoQBWRSuQzt51yvSju29J6AHPmwY1BjH49uR29oyfH1ra8Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.0.tgz", - "integrity": "sha512-uK7wAnlRvjkCPzh8jJ+QejFyrP8ObKuR5cBIsQZ+qbMunwR8sbd8krmMbxTLSrDhiPZaJYKQAU5Y3iMDcZPhyQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@esbuild/darwin-arm64": { "version": "0.20.0", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.0.tgz", @@ -3290,294 +3224,6 @@ "node": ">=12" } }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.0.tgz", - "integrity": "sha512-bsgTPoyYDnPv8ER0HqnJggXK6RyFy4PH4rtsId0V7Efa90u2+EifxytE9pZnsDgExgkARy24WUQGv9irVbTvIw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.0.tgz", - "integrity": "sha512-kQ7jYdlKS335mpGbMW5tEe3IrQFIok9r84EM3PXB8qBFJPSc6dpWfrtsC/y1pyrz82xfUIn5ZrnSHQQsd6jebQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.0.tgz", - "integrity": "sha512-uG8B0WSepMRsBNVXAQcHf9+Ko/Tr+XqmK7Ptel9HVmnykupXdS4J7ovSQUIi0tQGIndhbqWLaIL/qO/cWhXKyQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.0.tgz", - "integrity": "sha512-2ezuhdiZw8vuHf1HKSf4TIk80naTbP9At7sOqZmdVwvvMyuoDiZB49YZKLsLOfKIr77+I40dWpHVeY5JHpIEIg==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.0.tgz", - "integrity": "sha512-uTtyYAP5veqi2z9b6Gr0NUoNv9F/rOzI8tOD5jKcCvRUn7T60Bb+42NDBCWNhMjkQzI0qqwXkQGo1SY41G52nw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.0.tgz", - "integrity": "sha512-c88wwtfs8tTffPaoJ+SQn3y+lKtgTzyjkD8NgsyCtCmtoIC8RDL7PrJU05an/e9VuAke6eJqGkoMhJK1RY6z4w==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.0.tgz", - "integrity": "sha512-lR2rr/128/6svngnVta6JN4gxSXle/yZEZL3o4XZ6esOqhyR4wsKyfu6qXAL04S4S5CgGfG+GYZnjFd4YiG3Aw==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.0.tgz", - "integrity": "sha512-9Sycc+1uUsDnJCelDf6ZNqgZQoK1mJvFtqf2MUz4ujTxGhvCWw+4chYfDLPepMEvVL9PDwn6HrXad5yOrNzIsQ==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.0.tgz", - "integrity": "sha512-CoWSaaAXOZd+CjbUTdXIJE/t7Oz+4g90A3VBCHLbfuc5yUQU/nFDLOzQsN0cdxgXd97lYW/psIIBdjzQIwTBGw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.0.tgz", - "integrity": "sha512-mlb1hg/eYRJUpv8h/x+4ShgoNLL8wgZ64SUr26KwglTYnwAWjkhR2GpoKftDbPOCnodA9t4Y/b68H4J9XmmPzA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.0.tgz", - "integrity": "sha512-fgf9ubb53xSnOBqyvWEY6ukBNRl1mVX1srPNu06B6mNsNK20JfH6xV6jECzrQ69/VMiTLvHMicQR/PgTOgqJUQ==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.0.tgz", - "integrity": "sha512-H9Eu6MGse++204XZcYsse1yFHmRXEWgadk2N58O/xd50P9EvFMLJTQLg+lB4E1cF2xhLZU5luSWtGTb0l9UeSg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.0.tgz", - "integrity": "sha512-lCT675rTN1v8Fo+RGrE5KjSnfY0x9Og4RN7t7lVrN3vMSjy34/+3na0q7RIfWDAj0e0rCh0OL+P88lu3Rt21MQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.0.tgz", - "integrity": "sha512-HKoUGXz/TOVXKQ+67NhxyHv+aDSZf44QpWLa3I1lLvAwGq8x1k0T+e2HHSRvxWhfJrFxaaqre1+YyzQ99KixoA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.0.tgz", - "integrity": "sha512-GDwAqgHQm1mVoPppGsoq4WJwT3vhnz/2N62CzhvApFD1eJyTroob30FPpOZabN+FgCjhG+AgcZyOPIkR8dfD7g==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.0.tgz", - "integrity": "sha512-0vYsP8aC4TvMlOQYozoksiaxjlvUcQrac+muDqj1Fxy6jh9l9CZJzj7zmh8JGfiV49cYLTorFLxg7593pGldwQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.0.tgz", - "integrity": "sha512-p98u4rIgfh4gdpV00IqknBD5pC84LCub+4a3MO+zjqvU5MVXOc3hqR2UgT2jI2nh3h8s9EQxmOsVI3tyzv1iFg==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.0.tgz", - "integrity": "sha512-NgJnesu1RtWihtTtXGFMU5YSE6JyyHPMxCwBZK7a6/8d31GuSo9l0Ss7w1Jw5QnKUawG6UEehs883kcXf5fYwg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -3767,9 +3413,9 @@ "integrity": "sha512-iRP+QKI2+oz3UAh4nPEq14CsEjrjD6a5+fuypjScisAh9kXKFvdJOZJDwk7kikLvWVLGEs9+kIUS4LPQV7VZVw==" }, "node_modules/@firebase/app": { - "version": "0.9.27", - "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.9.27.tgz", - "integrity": "sha512-p2Dvl1ge4kRsyK5+wWcmdAIE9MSwZ0pDKAYB51LZgZuz6wciUZk4E1yAEdkfQlRxuHehn+Ol9WP5Qk2XQZiHGg==", + "version": "0.9.28", + "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.9.28.tgz", + "integrity": "sha512-MS0+EtNixrwJbVDs5Bt/lhUhzeWGUtUoP6X+zYZck5GAZwI5g4F91noVA9oIXlFlpn6Q1xIbiaHA2GwGk7/7Ag==", "dependencies": { "@firebase/component": "0.6.5", "@firebase/logger": "0.4.0", @@ -3819,11 +3465,11 @@ "integrity": "sha512-uwSUj32Mlubybw7tedRzR24RP8M8JUVR3NPiMk3/Z4bCmgEKTlQBwMXrehDAZ2wF+TsBq0SN1c6ema71U/JPyQ==" }, "node_modules/@firebase/app-compat": { - "version": "0.2.27", - "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.27.tgz", - "integrity": "sha512-SYlqocfUDKPHR6MSFC8hree0BTiWFu5o8wbf6zFlYXyG41w7TcHp4wJi4H/EL5V6cM4kxwruXTJtqXX/fRAZtw==", + "version": "0.2.28", + "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.28.tgz", + "integrity": "sha512-Mr2NbeM1Oaayuw5unUAMzt+7/MN+e2uklT1l87D+ZLJl2UvhZAZmMt74GjEI9N3sDYKMeszSbszBqtJ1fGVafQ==", "dependencies": { - "@firebase/app": "0.9.27", + "@firebase/app": "0.9.28", "@firebase/component": "0.6.5", "@firebase/logger": "0.4.0", "@firebase/util": "1.9.4", @@ -3836,15 +3482,15 @@ "integrity": "sha512-AeweANOIo0Mb8GiYm3xhTEBVCmPwTYAu9Hcd2qSkLuga/6+j9b1Jskl5bpiSQWy9eJ/j5pavxj6eYogmnuzm+Q==" }, "node_modules/@firebase/auth": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.6.0.tgz", - "integrity": "sha512-Qhl35eJTV6BwvuueTPCY6x8kUlYyzALtjp/Ws0X3fw3AnjVVfuVb7oQ3Xh5VPVfMFhaIuUAd1KXwcAuIklkSDw==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.6.1.tgz", + "integrity": "sha512-oOuQVOxtxKr+kTTqEkkI2qXIeGbkNLpA8FzO030LF4KXmMcETqsPaIqw7Aw1Y4Zl82l1qpZtpc4vN4Da2qZdfQ==", "dependencies": { "@firebase/component": "0.6.5", "@firebase/logger": "0.4.0", "@firebase/util": "1.9.4", "tslib": "^2.1.0", - "undici": "5.26.5" + "undici": "5.28.3" }, "peerDependencies": { "@firebase/app": "0.x", @@ -3857,25 +3503,25 @@ } }, "node_modules/@firebase/auth-compat": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.5.2.tgz", - "integrity": "sha512-pRgje5BPCNR1vXyvGOVXwOHtv88A2WooXfklI8sV7/jWi03ExFqNfpJT26GUo/oD39NoKJ3Kt6rD5gVvdV7lMw==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.5.3.tgz", + "integrity": "sha512-2pVtVEvu8P7SF6jSPfLPKWUClQFj+StqAZ0fD/uQ6mv8DyWn7AuuANFEu7Pv96JPcaL6Gy9jC5dFqjpptjqSRA==", "dependencies": { - "@firebase/auth": "1.6.0", + "@firebase/auth": "1.6.1", "@firebase/auth-types": "0.12.0", "@firebase/component": "0.6.5", "@firebase/util": "1.9.4", "tslib": "^2.1.0", - "undici": "5.26.5" + "undici": "5.28.3" }, "peerDependencies": { "@firebase/app-compat": "0.x" } }, "node_modules/@firebase/auth-compat/node_modules/undici": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.5.tgz", - "integrity": "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw==", + "version": "5.28.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", + "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", "dependencies": { "@fastify/busboy": "^2.0.0" }, @@ -3898,9 +3544,9 @@ } }, "node_modules/@firebase/auth/node_modules/undici": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.5.tgz", - "integrity": "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw==", + "version": "5.28.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", + "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", "dependencies": { "@fastify/busboy": "^2.0.0" }, @@ -3954,9 +3600,9 @@ } }, "node_modules/@firebase/firestore": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.4.2.tgz", - "integrity": "sha512-YaX6ypa/RzU6OkxzUQlpSxwhOIWdTraCNz7sMsbaSEjjl/pj/QvX6TqjkdWGzuBYh2S6rz7ErhDO0g39oZZw/g==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.4.3.tgz", + "integrity": "sha512-Ix61zbeuTsHf0WFbk6+67n89Vzd9M8MMTdnz7c7z+BRE3BS5Vuc3gX5ZcHFjqPkQJ7rpLB1egHsYe4Przp5C2g==", "dependencies": { "@firebase/component": "0.6.5", "@firebase/logger": "0.4.0", @@ -3965,7 +3611,7 @@ "@grpc/grpc-js": "~1.9.0", "@grpc/proto-loader": "^0.7.8", "tslib": "^2.1.0", - "undici": "5.26.5" + "undici": "5.28.3" }, "engines": { "node": ">=10.10.0" @@ -3975,12 +3621,12 @@ } }, "node_modules/@firebase/firestore-compat": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.25.tgz", - "integrity": "sha512-+xI7WmsgZCBhMn/+uhDKcg+lsOUJ9FJyt5PGTzkFPbCsozWfeQZ7eVnfPh0rMkUOf0yIQ924RIe04gwvEIbcoQ==", + "version": "0.3.26", + "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.26.tgz", + "integrity": "sha512-dNrKiH5Cn6ItANV9nJI2Y0msKBj/skO7skDlRo/BUSQE1DKbNzumxpJEz+PK/PV1nTegnRgVvs47gpQeVWXtYQ==", "dependencies": { "@firebase/component": "0.6.5", - "@firebase/firestore": "4.4.2", + "@firebase/firestore": "4.4.3", "@firebase/firestore-types": "3.0.0", "@firebase/util": "1.9.4", "tslib": "^2.1.0" @@ -3999,9 +3645,9 @@ } }, "node_modules/@firebase/firestore/node_modules/undici": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.5.tgz", - "integrity": "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw==", + "version": "5.28.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", + "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", "dependencies": { "@fastify/busboy": "^2.0.0" }, @@ -4010,9 +3656,9 @@ } }, "node_modules/@firebase/functions": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.11.1.tgz", - "integrity": "sha512-3uUa1hB79Gmy6E1gHTfzoHeZolBeHc/I/n3+lOCDe6BOos9AHmzRjKygcFE/7VA2FJjitCE0K+OHI6+OuoY8fQ==", + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.11.2.tgz", + "integrity": "sha512-2NULTYOZbu0rXczwfYdqQH0w1FmmYrKjTy1YPQSHLCAkMBdfewoKmVm4Lyo2vRn0H9ZndciLY7NszKDFt9MKCQ==", "dependencies": { "@firebase/app-check-interop-types": "0.3.0", "@firebase/auth-interop-types": "0.2.1", @@ -4020,19 +3666,19 @@ "@firebase/messaging-interop-types": "0.2.0", "@firebase/util": "1.9.4", "tslib": "^2.1.0", - "undici": "5.26.5" + "undici": "5.28.3" }, "peerDependencies": { "@firebase/app": "0.x" } }, "node_modules/@firebase/functions-compat": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.3.7.tgz", - "integrity": "sha512-uXe6Kmku5lNogp3OpPBcOJbSvnaCOn+YxS3zlXKNU6Q/NLwcvO3RY1zwYyctCos2RemEw3KEQ7YdzcECXjHWLw==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.3.8.tgz", + "integrity": "sha512-VDHSw6UOu8RxfgAY/q8e+Jn+9Fh60Fc28yck0yfMsi2e0BiWgonIMWkFspFGGLgOJebTHl+hc+9v91rhzU6xlg==", "dependencies": { "@firebase/component": "0.6.5", - "@firebase/functions": "0.11.1", + "@firebase/functions": "0.11.2", "@firebase/functions-types": "0.6.0", "@firebase/util": "1.9.4", "tslib": "^2.1.0" @@ -4047,9 +3693,9 @@ "integrity": "sha512-hfEw5VJtgWXIRf92ImLkgENqpL6IWpYaXVYiRkFY1jJ9+6tIhWM7IzzwbevwIIud/jaxKVdRzD7QBWfPmkwCYw==" }, "node_modules/@firebase/functions/node_modules/undici": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.5.tgz", - "integrity": "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw==", + "version": "5.28.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", + "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", "dependencies": { "@fastify/busboy": "^2.0.0" }, @@ -4210,26 +3856,26 @@ "integrity": "sha512-RtEH4vdcbXZuZWRZbIRmQVBNsE7VDQpet2qFvq6vwKLBIQRQR5Kh58M4ok3A3US8Sr3rubYnaGqZSurCwI8uMA==" }, "node_modules/@firebase/storage": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.12.1.tgz", - "integrity": "sha512-KJ5NV7FUh54TeTlEjdkTTX60ciCKOp9EqlbLnpdcXUYRJg0Z4810TXbilPc1z7fTIG4iPjtdi95bGE9n4dBX8A==", + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.12.2.tgz", + "integrity": "sha512-MzanOBcxDx9oOwDaDPMuiYxd6CxcN1xZm+os5uNE3C1itbRKLhM9rzpODDKWzcbnHHFtXk3Q3lsK/d3Xa1WYYw==", "dependencies": { "@firebase/component": "0.6.5", "@firebase/util": "1.9.4", "tslib": "^2.1.0", - "undici": "5.26.5" + "undici": "5.28.3" }, "peerDependencies": { "@firebase/app": "0.x" } }, "node_modules/@firebase/storage-compat": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.3.4.tgz", - "integrity": "sha512-Y0m5e2gS/wB9Ioth2X/Sgz76vcxvqgQrCmfa9qwhss/N31kxY2Gks6Frv0nrE18AjVfcSmcfDitqUwxcMOTRSg==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.3.5.tgz", + "integrity": "sha512-5dJXfY5NxCF5NAk4dLvJqC+m6cgcf0Fr29nrMHwhwI34pBheQq2PdRZqALsqZCES9dnHTuFNlqGQDpLr+Ph4rw==", "dependencies": { "@firebase/component": "0.6.5", - "@firebase/storage": "0.12.1", + "@firebase/storage": "0.12.2", "@firebase/storage-types": "0.8.0", "@firebase/util": "1.9.4", "tslib": "^2.1.0" @@ -4248,9 +3894,9 @@ } }, "node_modules/@firebase/storage/node_modules/undici": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.5.tgz", - "integrity": "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw==", + "version": "5.28.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", + "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", "dependencies": { "@fastify/busboy": "^2.0.0" }, @@ -6113,150 +5759,6 @@ "node": ">= 10" } }, - "node_modules/@nx/nx-darwin-x64": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-17.2.8.tgz", - "integrity": "sha512-0cXzp1tGr7/6lJel102QiLA4NkaLCkQJj6VzwbwuvmuCDxPbpmbz7HC1tUteijKBtOcdXit1/MEoEU007To8Bw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-freebsd-x64": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-17.2.8.tgz", - "integrity": "sha512-YFMgx5Qpp2btCgvaniDGdu7Ctj56bfFvbbaHQWmOeBPK1krNDp2mqp8HK6ZKOfEuDJGOYAp7HDtCLvdZKvJxzA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-17.2.8.tgz", - "integrity": "sha512-iN2my6MrhLRkVDtdivQHugK8YmR7URo1wU9UDuHQ55z3tEcny7LV3W9NSsY9UYPK/FrxdDfevj0r2hgSSdhnzA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-linux-arm64-gnu": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-17.2.8.tgz", - "integrity": "sha512-Iy8BjoW6mOKrSMiTGujUcNdv+xSM1DALTH6y3iLvNDkGbjGK1Re6QNnJAzqcXyDpv32Q4Fc57PmuexyysZxIGg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-linux-arm64-musl": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-17.2.8.tgz", - "integrity": "sha512-9wkAxWzknjpzdofL1xjtU6qPFF1PHlvKCZI3hgEYJDo4mQiatGI+7Ttko+lx/ZMP6v4+Umjtgq7+qWrApeKamQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-linux-x64-gnu": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-17.2.8.tgz", - "integrity": "sha512-sjG1bwGsjLxToasZ3lShildFsF0eyeGu+pOQZIp9+gjFbeIkd19cTlCnHrOV9hoF364GuKSXQyUlwtFYFR4VTQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-linux-x64-musl": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-17.2.8.tgz", - "integrity": "sha512-QiakXZ1xBCIptmkGEouLHQbcM4klQkcr+kEaz2PlNwy/sW3gH1b/1c0Ed5J1AN9xgQxWspriAONpScYBRgxdhA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-win32-arm64-msvc": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-17.2.8.tgz", - "integrity": "sha512-XBWUY/F/GU3vKN9CAxeI15gM4kr3GOBqnzFZzoZC4qJt2hKSSUEWsMgeZtsMgeqEClbi4ZyCCkY7YJgU32WUGA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@nx/nx-win32-x64-msvc": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-17.2.8.tgz", - "integrity": "sha512-HTqDv+JThlLzbcEm/3f+LbS5/wYQWzb5YDXbP1wi7nlCTihNZOLNqGOkEmwlrR5tAdNHPRpHSmkYg4305W0CtA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, "node_modules/@opentelemetry/api": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.7.0.tgz", @@ -6380,55 +5882,6 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, - "node_modules/@reduxjs/toolkit": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.2.1.tgz", - "integrity": "sha512-8CREoqJovQW/5I4yvvijm/emUiCCmcs4Ev4XPWd4mizSO+dD3g5G6w34QK5AGeNrSH7qM8Fl66j4vuV7dpOdkw==", - "dependencies": { - "immer": "^10.0.3", - "redux": "^5.0.1", - "redux-thunk": "^3.1.0", - "reselect": "^5.0.1" - }, - "peerDependencies": { - "react": "^16.9.0 || ^17.0.0 || ^18", - "react-redux": "^7.2.1 || ^8.1.3 || ^9.0.0" - }, - "peerDependenciesMeta": { - "react": { - "optional": true - }, - "react-redux": { - "optional": true - } - } - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.0.tgz", - "integrity": "sha512-+ac02NL/2TCKRrJu2wffk1kZ+RyqxVUlbjSagNgPm94frxtr+XDL12E5Ll1enWskLrtrZ2r8L3wED1orIibV/w==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.12.0.tgz", - "integrity": "sha512-OBqcX2BMe6nvjQ0Nyp7cC90cnumt8PXmO7Dp3gfAju/6YwG0Tj74z1vKrfRz7qAv23nBcYM8BCbhrsWqO7PzQQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] - }, "node_modules/@rollup/rollup-darwin-arm64": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.12.0.tgz", @@ -6442,136 +5895,6 @@ "darwin" ] }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.12.0.tgz", - "integrity": "sha512-cc71KUZoVbUJmGP2cOuiZ9HSOP14AzBAThn3OU+9LcA1+IUqswJyR1cAJj3Mg55HbjZP6OLAIscbQsQLrpgTOg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.12.0.tgz", - "integrity": "sha512-a6w/Y3hyyO6GlpKL2xJ4IOh/7d+APaqLYdMf86xnczU3nurFTaVN9s9jOXQg97BE4nYm/7Ga51rjec5nfRdrvA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.12.0.tgz", - "integrity": "sha512-0fZBq27b+D7Ar5CQMofVN8sggOVhEtzFUwOwPppQt0k+VR+7UHMZZY4y+64WJ06XOhBTKXtQB/Sv0NwQMXyNAA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.12.0.tgz", - "integrity": "sha512-eTvzUS3hhhlgeAv6bfigekzWZjaEX9xP9HhxB0Dvrdbkk5w/b+1Sxct2ZuDxNJKzsRStSq1EaEkVSEe7A7ipgQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.12.0.tgz", - "integrity": "sha512-ix+qAB9qmrCRiaO71VFfY8rkiAZJL8zQRXveS27HS+pKdjwUfEhqo2+YF2oI+H/22Xsiski+qqwIBxVewLK7sw==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.12.0.tgz", - "integrity": "sha512-TenQhZVOtw/3qKOPa7d+QgkeM6xY0LtwzR8OplmyL5LrgTWIXpTQg2Q2ycBf8jm+SFW2Wt/DTn1gf7nFp3ssVA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.12.0.tgz", - "integrity": "sha512-LfFdRhNnW0zdMvdCb5FNuWlls2WbbSridJvxOvYWgSBOYZtgBfW9UGNJG//rwMqTX1xQE9BAodvMH9tAusKDUw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.12.0.tgz", - "integrity": "sha512-JPDxovheWNp6d7AHCgsUlkuCKvtu3RB55iNEkaQcf0ttsDU/JZF+iQnYcQJSk/7PtT4mjjVG8N1kpwnI9SLYaw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.12.0.tgz", - "integrity": "sha512-fjtuvMWRGJn1oZacG8IPnzIV6GF2/XG+h71FKn76OYFqySXInJtseAqdprVTDTyqPxQOG9Exak5/E9Z3+EJ8ZA==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.12.0.tgz", - "integrity": "sha512-ZYmr5mS2wd4Dew/JjT0Fqi2NPB/ZhZ2VvPp7SmvPZb4Y1CG/LRcS6tcRo2cYU7zLK5A7cdbhWnnWmUjoI4qapg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, "node_modules/@schematics/angular": { "version": "17.2.1", "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-17.2.1.tgz", @@ -13625,25 +12948,25 @@ } }, "node_modules/firebase": { - "version": "10.8.0", - "resolved": "https://registry.npmjs.org/firebase/-/firebase-10.8.0.tgz", - "integrity": "sha512-UJpC24vw8JFuHEOQyArBGKTUd7+kohLISCzHyn0M/prP0KOTx2io1eyLliEid330QqnWI7FOlPxoU97qecCSfQ==", + "version": "10.8.1", + "resolved": "https://registry.npmjs.org/firebase/-/firebase-10.8.1.tgz", + "integrity": "sha512-4B2jzhU/aumfKL446MG41/T5+t+9d9urf5XGrjC0HRQUm4Ya/amV48HBchnje69ExaJP5f2WxO9OX3wh9ee4wA==", "dependencies": { "@firebase/analytics": "0.10.1", "@firebase/analytics-compat": "0.2.7", - "@firebase/app": "0.9.27", + "@firebase/app": "0.9.28", "@firebase/app-check": "0.8.2", "@firebase/app-check-compat": "0.3.9", - "@firebase/app-compat": "0.2.27", + "@firebase/app-compat": "0.2.28", "@firebase/app-types": "0.9.0", - "@firebase/auth": "1.6.0", - "@firebase/auth-compat": "0.5.2", + "@firebase/auth": "1.6.1", + "@firebase/auth-compat": "0.5.3", "@firebase/database": "1.0.3", "@firebase/database-compat": "1.0.3", - "@firebase/firestore": "4.4.2", - "@firebase/firestore-compat": "0.3.25", - "@firebase/functions": "0.11.1", - "@firebase/functions-compat": "0.3.7", + "@firebase/firestore": "4.4.3", + "@firebase/firestore-compat": "0.3.26", + "@firebase/functions": "0.11.2", + "@firebase/functions-compat": "0.3.8", "@firebase/installations": "0.6.5", "@firebase/installations-compat": "0.2.5", "@firebase/messaging": "0.12.6", @@ -13652,8 +12975,8 @@ "@firebase/performance-compat": "0.2.5", "@firebase/remote-config": "0.4.5", "@firebase/remote-config-compat": "0.2.5", - "@firebase/storage": "0.12.1", - "@firebase/storage-compat": "0.3.4", + "@firebase/storage": "0.12.2", + "@firebase/storage-compat": "0.3.5", "@firebase/util": "1.9.4" } }, @@ -15642,15 +14965,6 @@ "node": ">=0.10.0" } }, - "node_modules/immer": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/immer/-/immer-10.0.3.tgz", - "integrity": "sha512-pwupu3eWfouuaowscykeckFmVTpqbzW+rXFCX8rQLkZzM9ftBmU/++Ra+o+L27mz03zJTlyV4UUr+fdKNffo4A==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/immer" - } - }, "node_modules/immutable": { "version": "4.3.5", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.5.tgz", @@ -21798,19 +21112,6 @@ "resolved": "https://registry.npmjs.org/reduce-component/-/reduce-component-1.0.1.tgz", "integrity": "sha512-y0wyCcdQul3hI3xHfIs0vg/jSbboQc/YTOAqaxjFG7At+XSexduuOqBVL9SmOLSwa/ldkbzVzdwuk9s2EKTAZg==" }, - "node_modules/redux": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", - "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==" - }, - "node_modules/redux-thunk": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-3.1.0.tgz", - "integrity": "sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==", - "peerDependencies": { - "redux": "^5.0.0" - } - }, "node_modules/reflect-metadata": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.1.tgz", @@ -24963,70 +24264,6 @@ } } }, - "node_modules/vite/node_modules/@esbuild/aix-ppc64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", - "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/android-arm": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", - "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/android-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", - "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/android-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", - "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/vite/node_modules/@esbuild/darwin-arm64": { "version": "0.19.12", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", @@ -25043,294 +24280,6 @@ "node": ">=12" } }, - "node_modules/vite/node_modules/@esbuild/darwin-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", - "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", - "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/freebsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", - "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-arm": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", - "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", - "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-ia32": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", - "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-loong64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", - "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-mips64el": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", - "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-ppc64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", - "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-riscv64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", - "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-s390x": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", - "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/linux-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", - "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/netbsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", - "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/openbsd-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", - "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/sunos-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", - "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/win32-arm64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", - "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/win32-ia32": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", - "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/vite/node_modules/@esbuild/win32-x64": { - "version": "0.19.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", - "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/vite/node_modules/esbuild": { "version": "0.19.12", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", diff --git a/src/package.json b/src/package.json index 63ee4ece..1a3a68db 100644 --- a/src/package.json +++ b/src/package.json @@ -32,13 +32,11 @@ "@capacitor/ios": "^5.7.0", "@codetrix-studio/capacitor-google-auth": "^3.4.0-rc.0", "@ngx-pwa/local-storage": "^17.0.0", - "@reduxjs/toolkit": "^2.2.1", "angular2-uuid": "^1.1.1", "component": "^1.1.0", "firebase": "^10.8.0", "marked": "^9.0.0", "ngx-markdown": "^17.1.1", - "redux": "^5.0.1", "reselect": "^5.1.0", "rxjs": "^7.8.1", "tslib": "^2.6.2", diff --git a/src/src/app/common/state-service.ts b/src/src/app/common/state-service.ts index 3fac9256..5dc4de74 100644 --- a/src/src/app/common/state-service.ts +++ b/src/src/app/common/state-service.ts @@ -1,103 +1,6 @@ -import { Store } from 'redux'; -import { configureStore } from '@reduxjs/toolkit'; - import { BehaviorSubject, Observable } from 'rxjs'; import { distinctUntilChanged, map } from 'rxjs/operators'; -/** - * A base class from which to extend a service to provide predictable state to components. You should not extend this - * class directly; instead, use the {@link createStateService} function to create a base class specific to your service. - * @see {@link createStateService} - */ -class StateService { - /** An observable that provides the entire state managed by the service. */ - public readonly state$: Observable; - - private readonly store: Store; - private readonly internalState$: BehaviorSubject; - - protected constructor(reducer: (state: TState, action: TAction) => TState, initialState: TState) { - this.store = configureStore({ - reducer: reducer, - preloadedState: initialState, - }); - - this.internalState$ = new BehaviorSubject(initialState as TState); - - // BehaviorSubject.asObservable returns a new object, so hold onto it to avoid unnecessary allocations - this.state$ = this.internalState$.asObservable(); - - this.store.subscribe(() => this.internalState$.next(this.store.getState())); - } - - /** - * Creates an observable that provides data derived from the state managed by the service. - * @param selector A selector that maps the state to the derived data. - */ - public select(selector: (state: TState) => TDerived): Observable { - return this.state$.pipe(map(selector), distinctUntilChanged()); - } - - /** - * Gets the current state managed by the service. **You should only use the current state to validate operations or - * help to construct actions to be dispatched.** Try not to expose any state retrieved using this method outside the - * derived service class. - */ - protected getState(): TState { - return this.internalState$.value; - } - - /** - * Dispatches an action to the underlying Redux store. - * @param action The action to dispatch. - */ - protected dispatch(action: TAction) { - this.store.dispatch(action); - } -} - -/** - * Creates a deeply-immutable type from the provided type. Objects' properties will be marked as `readonly`, array types - * will be replaced with {@link ReadonlyArray}, {@link Map} types will be replaced with {@link ReadonlyMap}, and - * {@link Set} types will be replaced with {@link ReadonlySet}. - */ -export type Immutable = T extends undefined | null | boolean | string | number - ? T - : T extends Array - ? ImmutableArray - : T extends Map - ? ImmutableMap - : T extends Set - ? ImmutableSet - : { readonly [N in keyof T]: Immutable }; - -interface ImmutableArray extends ReadonlyArray> {} -interface ImmutableMap extends ReadonlyMap, Immutable> {} -interface ImmutableSet extends ReadonlySet> {} - -// The below type definition is simpler, but it only works with TypeScript 3.7 and above. Swap this in when we upgrade! - -// export type Immutable = T extends undefined | null | boolean | string | number -// ? T -// : T extends Array -// ? ReadonlyArray> -// : T extends Map -// ? ReadonlyMap, Immutable> -// : T extends Set -// ? ReadonlySet> -// : { readonly [N in keyof T]: Immutable }; - -type IfEquals = (() => T extends X ? 1 : 2) extends () => T extends Y ? 1 : 2 ? A : B; -type IfImmutable = IfEquals< - TState, - { readonly [K in keyof TState]: Immutable }, - TImmutable, - TMutable ->; - -// eslint-disable-next-line -type YourStateTypeNeedsToBeImmutable = {}; - /** * Creates a base class from which to extend a service to provide predictable state to components. * @@ -116,20 +19,75 @@ type YourStateTypeNeedsToBeImmutable = {}; * @param reducer A function that takes the previous state and the dispatched action and returns the new state. * @param initialState The initial state of the service. */ -export function createStateService( - reducer: (state: TState, action: TAction) => TState, - initialState: TState -) { - const stateServiceClass = class extends StateService { +export function createReducingService(initialState: TState) { + const stateServiceClass = class extends ReducingService { constructor() { - super(reducer, initialState); + super(initialState); } }; return stateServiceClass as IfImmutable>; } -export interface IStateAction { - type: TAction; +export interface IReducingAction { handle: (state: TState) => TState; } + +/** + * Creates a deeply-immutable type from the provided type. Objects' properties will be marked as `readonly`, array types + * will be replaced with {@link ReadonlyArray}, {@link Map} types will be replaced with {@link ReadonlyMap}, and + * {@link Set} types will be replaced with {@link ReadonlySet}. + */ +export type Immutable = T extends undefined | null | boolean | string | number + ? T + : T extends Array + ? ReadonlyArray> + : T extends Map + ? ReadonlyMap, Immutable> + : T extends Set + ? ReadonlySet> + : { readonly [N in keyof T]: Immutable }; + +type IfEquals = (() => T extends X ? 1 : 2) extends () => T extends Y ? 1 : 2 ? A : B; +type IfImmutable = IfEquals< + TState, + { readonly [K in keyof TState]: Immutable }, + TImmutable, + TMutable +>; + +// eslint-disable-next-line +type YourStateTypeNeedsToBeImmutable = {}; + +class ReducingService { + private internalState$: BehaviorSubject; + + constructor(private initialState: TState) { + this.internalState$ = new BehaviorSubject(initialState); + } + + // expose as observable. + public get state$() { + return this.internalState$.asObservable(); + } + + protected dispatch(action: IReducingAction) { + this.internalState$.next(action.handle(this.internalState$.value)); + } + + /** + * Gets the current state managed by the service. **You should only use the current state to validate operations or + * help to construct actions to be dispatched.** Try not to expose any state retrieved using this method outside the + * derived service class. + */ + protected getState(): TState { + return this.internalState$.value; + } + /** + * Creates an observable that provides data derived from the state managed by the service. + * @param selector A selector that maps the state to the derived data. + */ + public select(selector: (state: TState) => TDerived): Observable { + return this.internalState$.pipe(map(selector), distinctUntilChanged()); + } +} diff --git a/src/src/app/components/card.component.ts b/src/src/app/components/card.component.ts index cf5673b2..d70cb669 100644 --- a/src/src/app/components/card.component.ts +++ b/src/src/app/components/card.component.ts @@ -36,7 +36,7 @@ export class CardComponent extends SubscriberBase { const attempt = () => { const result = pending.copy(); if (!result && --remainingAttempts) { - setTimeout(attempt); + setTimeout(attempt, 10); } else { // Remember to destroy when you're done! pending.destroy(); diff --git a/src/src/app/components/strongs/modal/strongs-modal.component.ts b/src/src/app/components/strongs/modal/strongs-modal.component.ts index 2243b1d0..115a65a1 100644 --- a/src/src/app/components/strongs/modal/strongs-modal.component.ts +++ b/src/src/app/components/strongs/modal/strongs-modal.component.ts @@ -22,7 +22,6 @@ export class StrongsModalComponent { public dialogRef: MatDialogRef, private appService: AppService ) { - console.log(cardItem); this.strongsResult = cardItem.data as StrongsResult; this.icon$ = appService.select((state) => state.settings.value.cardIcons.strongs); } diff --git a/src/src/app/services/app.service.ts b/src/src/app/services/app.service.ts index 4006055b..64174934 100644 --- a/src/src/app/services/app.service.ts +++ b/src/src/app/services/app.service.ts @@ -1,20 +1,16 @@ -import { AngularFireDatabase } from '@angular/fire/compat/database'; import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import { StorageMap } from '@ngx-pwa/local-storage'; - import { UUID } from 'angular2-uuid'; import { HashTable } from '../common/hashtable'; import { MoveDirection } from '../common/move-direction'; -import { IStateAction } from '../common/state-service'; +import { IReducingAction, createReducingService } from '../common/state-service'; import { IStorable, Storable, StorableType } from '../common/storable'; import { mergeCardList } from '../common/card-operations'; import { updateInCardCache, removeFromCardCache, getFromCardCache } from '../common/card-cache-operations'; import { moveItem, moveItemUpOrDown } from '../common/array-operations'; import { Section, BibleReference, Overlap } from '../common/bible-reference'; -import { createStateService } from '../common/state-service'; import { SavedPage } from '../models/page-state'; import { CardType, CardItem, DataReference } from '../models/card-state'; @@ -88,7 +84,7 @@ const initialState: AppState = { }, }; -interface AppAction extends IStateAction {} +interface AppAction extends IReducingAction {} export function getNewestStorable(candidate: IStorable, incumbant: IStorable): IStorable { // if the candidate is null, then return the state. @@ -105,19 +101,10 @@ export function getNewestStorable(candidate: IStorable, incumbant: IStorab return incumbant; } -function appReducer(state: AppState, action: IStateAction): AppState { - if (state === undefined || action.handle === undefined) { - return initialState; - } - return action.handle(state); -} - //#region Saved Pages -const savePageActionType = 'SAVE_PAGE'; export const savePageAction = (title: string): AppAction => { return { - type: savePageActionType, handle(state: AppState) { const savedPages = new Storable([ ...(state.savedPages ? state.savedPages.value : []), @@ -134,10 +121,8 @@ export const savePageAction = (title: string): AppAction => { }; }; -const updateCurrentPageActionType = 'UPDATE_CURRENT_PAGE'; export const updateCurrentPageAction = (): AppAction => { return { - type: updateCurrentPageActionType, handle(state: AppState) { const current = { id: state.currentSavedPage.id, @@ -161,10 +146,8 @@ export const updateCurrentPageAction = (): AppAction => { }; }; -const updateSavedPagesActionType = 'UPDATE_SAVED_PAGES'; export const updateSavedPagesAction = (oldSavedPages: IStorable): AppAction => { return { - type: updateSavedPagesActionType, handle(state: AppState) { const newSavedPages = getNewestStorable(oldSavedPages, state.savedPages); @@ -192,10 +175,8 @@ export const updateSavedPagesAction = (oldSavedPages: IStorable { return { - type: updateSavedPageActionType, handle(state: AppState) { const newSavedPages = new Storable( state.savedPages.value.map((o) => { @@ -212,10 +193,8 @@ export const updateSavedPageAction = (savedPage: SavedPage): AppAction => { }; }; -const removeSavedPageActionType = 'REMOVE_SAVED_PAGE'; export const removeSavedPageAction = (savedPage: SavedPage): AppAction => { return { - type: removeSavedPageActionType, handle(state: AppState) { const savedPages = new Storable(state.savedPages.value.filter((o) => o.id !== savedPage.id)); const item = getNewestStorable(savedPages, state.savedPages); @@ -229,10 +208,8 @@ export const removeSavedPageAction = (savedPage: SavedPage): AppAction => { }; }; -const moveSavedPageCardActionType = 'MOVE_SAVED_PAGE_CARD'; export const moveSavedPageCardAction = (oldSavedPage: SavedPage, fromIndex: number, toIndex: number): AppAction => { return { - type: moveSavedPageCardActionType, handle(state: AppState) { const queries = moveItem(oldSavedPage.queries, fromIndex, toIndex); const savedPage = { @@ -245,10 +222,8 @@ export const moveSavedPageCardAction = (oldSavedPage: SavedPage, fromIndex: numb }; }; -const addCardToSavedPageActionType = 'ADD_CARD_TO_SAVED_PAGE'; export const addCardToSavedPageAction = (card: CardItem, pageId: string): AppAction => { return { - type: addCardToSavedPageActionType, handle(state: AppState) { const savedPages = new Storable([ ...(state.savedPages ? state.savedPages.value : []).map((o) => { @@ -277,10 +252,8 @@ export const addCardToSavedPageAction = (card: CardItem, pageId: string): AppAct //#region Cards -const addCardActionType = 'ADD_CARD'; export const addCardAction = (card: CardItem, nextToItem: CardItem): AppAction => { return { - type: addCardActionType, handle(state: AppState) { let cards = []; @@ -313,10 +286,8 @@ export const addCardAction = (card: CardItem, nextToItem: CardItem): AppAction = }; }; -const updateCardActionType = 'UPDATE_CARD'; export const updateCardAction = (newCard: CardItem, oldCard: CardItem): AppAction => { return { - type: updateCardActionType, handle(state: AppState) { return { ...state, @@ -334,10 +305,8 @@ export const updateCardAction = (newCard: CardItem, oldCard: CardItem): AppActio }; }; -const removeCardActionType = 'REMOVE_CARD'; export const removeCardAction = (card: CardItem): AppAction => { return { - type: removeCardActionType, handle(state: AppState) { // potentially remove card from a saved page. const currentSavedPage = @@ -371,10 +340,8 @@ export const removeCardAction = (card: CardItem): AppAction => { }; }; -const moveCardActionType = 'MOVE_CARD'; export const moveCardAction = (card: CardItem, direction: MoveDirection): AppAction => { return { - type: moveCardActionType, handle(state: AppState) { const cards = moveItemUpOrDown(state.currentCards.value, card, direction); @@ -386,10 +353,8 @@ export const moveCardAction = (card: CardItem, direction: MoveDirection): AppAct }; }; -const updateCardsActionType = 'UPDATE_CARDS'; export const updateCardsAction = (cards: IStorable): AppAction => { return { - type: savePageActionType, handle(state: AppState) { let cardCache = { ...state.cardCache }; for (const card of cards.value) { @@ -404,10 +369,8 @@ export const updateCardsAction = (cards: IStorable): AppAction => { }; }; -const clearCardsActionType = 'CLEAR_CARDS'; export const clearCardsAction = (): AppAction => { return { - type: clearCardsActionType, handle(state: AppState) { return { ...state, @@ -421,10 +384,8 @@ export const clearCardsAction = (): AppAction => { //#region General -const updateErrorActionType = 'UPDATE_ERROR'; export const updateErrorAction = (error: Error): AppAction => { return { - type: updateErrorActionType, handle(state: AppState) { return { ...state, @@ -434,10 +395,8 @@ export const updateErrorAction = (error: Error): AppAction => { }; }; -const setUserActionType = 'SET_USER'; export const setUserAction = (user: User): AppAction => { return { - type: setUserActionType, handle(state: AppState) { return { ...state, @@ -447,10 +406,8 @@ export const setUserAction = (user: User): AppAction => { }; }; -const updateAutoCompleteActionType = 'UPDATE_AUTOCOMPLETE'; export const updateAutoCompleteAction = (words: string[]): AppAction => { return { - type: updateAutoCompleteActionType, handle(state: AppState) { return { ...state, @@ -464,10 +421,8 @@ export const updateAutoCompleteAction = (words: string[]): AppAction => { //#region Settings -const updateSettingsActionType = 'UPDATE_SETTINGS'; export const updateSettingsAction = (settings: IStorable): AppAction => { return { - type: updateSettingsActionType, handle(state: AppState) { const item = getNewestStorable(settings, state.settings); @@ -479,10 +434,8 @@ export const updateSettingsAction = (settings: IStorable): AppAction = }; }; -const updateCardMergeStrategyActionType = 'UPDATE_CARD_MERGE_STRATEGY'; export const updateCardMergeStrategyAction = (mergeStrategy: Overlap): AppAction => { return { - type: updateCardMergeStrategyActionType, handle(state: AppState) { const settings = new Storable({ ...state.settings.value, @@ -496,10 +449,8 @@ export const updateCardMergeStrategyAction = (mergeStrategy: Overlap): AppAction }; }; -const updateCardFontSizeActionType = 'UPDATE_CARD_FONT_SIZE'; export const updateCardFontSizeAction = (cardFontSize: number): AppAction => { return { - type: updateCardFontSizeActionType, handle(state: AppState) { const settings = new Storable({ ...state.settings.value, @@ -514,10 +465,8 @@ export const updateCardFontSizeAction = (cardFontSize: number): AppAction => { }; }; -const updateCardFontFamilyActionType = 'UPDATE_CARD_FONT_FAMILY'; export const updateCardFontFamilyAction = (cardFontFamily: string): AppAction => { return { - type: updateCardFontFamilyActionType, handle(state: AppState) { const settings = new Storable({ ...state.settings.value, @@ -536,10 +485,8 @@ export const updateCardFontFamilyAction = (cardFontFamily: string): AppAction => //#region Notes -const findNotesActionType = 'FIND_NOTES'; export const findNotesAction = (qry: string, nextToItem: CardItem): AppAction => { return { - type: findNotesActionType, handle(state: AppState) { const notes = state.notes.value .filter((o) => o.title.search(qry) > -1) @@ -587,10 +534,8 @@ export const findNotesAction = (qry: string, nextToItem: CardItem): AppAction => }; }; -const getNotesActionType = 'GET_NOTE'; export const getNotesAction = (noteId: string, nextToItem: CardItem): AppAction => { return { - type: getNotesActionType, handle(state: AppState) { const note = state.notes.value.find((o) => o.id === noteId); const card: CardItem = { @@ -604,10 +549,8 @@ export const getNotesAction = (noteId: string, nextToItem: CardItem): AppAction }; }; -const updateNotesActionType = 'UPDATE_NOTES'; export const updateNotesAction = (notes: IStorable): AppAction => { return { - type: updateNotesActionType, handle(state: AppState) { return { ...state, @@ -617,10 +560,8 @@ export const updateNotesAction = (notes: IStorable): AppAct }; }; -const saveNoteActionType = 'SAVE_NOTE'; export const saveNoteAction = (note: NoteItem): AppAction => { return { - type: saveNoteActionType, handle(state: AppState) { // you may be creating a new note or updating an existing. // if its an update, you need to update the note in the following: @@ -642,10 +583,8 @@ export const saveNoteAction = (note: NoteItem): AppAction => { }; }; -const deleteNoteActionType = 'DELETE_NOTE'; export const deleteNoteAction = (note: NoteItem): AppAction => { return { - type: deleteNoteActionType, handle(state: AppState) { // the note may be in any of the following: // * card list could have it. @@ -692,42 +631,11 @@ export const deleteNoteAction = (note: NoteItem): AppAction => { //#endregion -type AppActions = - // Saved Page Actions - | typeof savePageActionType - | typeof updateCurrentPageActionType - | typeof updateSavedPagesActionType - | typeof updateSavedPageActionType - | typeof removeSavedPageActionType - | typeof moveSavedPageCardActionType - | typeof addCardToSavedPageActionType - // Card Actions - | typeof addCardActionType - | typeof updateCardActionType - | typeof removeCardActionType - | typeof moveCardActionType - | typeof updateCardsActionType - | typeof clearCardsActionType - // General Actions - | typeof updateErrorActionType - | typeof setUserActionType - | typeof updateAutoCompleteActionType - // Settings Actions - | typeof updateSettingsActionType - | typeof updateCardMergeStrategyActionType - | typeof updateCardFontSizeActionType - | typeof updateCardFontFamilyActionType - // Note Actions - | typeof findNotesActionType - | typeof getNotesActionType - | typeof updateNotesActionType - | typeof saveNoteActionType - | typeof deleteNoteActionType; - @Injectable({ providedIn: 'root', }) -export class AppService extends createStateService(appReducer, initialState) { +export class AppService extends createReducingService(initialState) { + //createStateService(appReducer, initialState) { private wordToStem: Map; private paragraphs: HashTable; private searchIndexArray: string[]; @@ -801,7 +709,7 @@ export class AppService extends createStateService(appReducer, initialState) { ]); private readonly dataPath = 'assets/data'; - constructor(private http: HttpClient, private localStorageService: StorageMap, private db: AngularFireDatabase) { + constructor(private http: HttpClient) { super(); this.searchIndexArray = this.buildIndexArray().sort();