diff --git a/.circleci/config.yml b/.circleci/config.yml index 2ae03461..79f42575 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -69,6 +69,9 @@ jobs: - run: name: Run translation report script command: | + mkdir ~/.npm-global + npm config set prefix '~/.npm-global' + export PATH=~/.npm-global/bin:$PATH npm install -g typescript npm run generate-translation-report - store_artifacts: diff --git a/.eslintrc.json b/.eslintrc.json index 51aa44a5..48352a78 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -41,28 +41,29 @@ "@typescript-eslint/member-ordering": [ "error", { - "default": [ - "private-field", - "protected-field", - "public-field", - "public-constructor", - "protected-constructor", - "private-constructor", - "signature", - "method", - "private-static-method", - "private-decorated-method", - "private-instance-method", - "private-abstract-method", - "protected-static-method", - "protected-instance-method", - "protected-abstract-method", - "protected-decorated-method", - "public-static-method", - "public-decorated-method", - "public-instance-method", - "public-abstract-method" - ] + "default": { + "memberTypes": [ + "private-field", + "protected-field", + "public-field", + "public-constructor", + "protected-constructor", + "private-constructor", + "signature", + "method", + "private-static-method", + "private-decorated-method", + "private-instance-method", + "protected-static-method", + "protected-instance-method", + "protected-abstract-method", + "protected-decorated-method", + "public-static-method", + "public-decorated-method", + "public-instance-method", + "public-abstract-method" + ] + } } ], "comma-dangle": [ diff --git a/package-lock.json b/package-lock.json index 22ba51f0..d2456b07 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,18 +25,18 @@ "@thymesave/material-food-icons": "1.0.1", "hammerjs": "2.0.8", "lodash": "4.17.21", - "pouchdb": "7.3.1", - "pouchdb-find": "7.3.1", + "pouchdb": "8.0.0", + "pouchdb-find": "8.0.0", "pouchdb-upsert": "2.2.0", - "rxjs": "7.6.0", + "rxjs": "7.8.0", "schema-dts": "1.1.0", "string-similarity": "4.0.4", "tslib": "2.4.1", "uuid": "9.0.0", - "zone.js": "0.11.8" + "zone.js": "0.12.0" }, "devDependencies": { - "@angular-devkit/architect": "0.1500.3", + "@angular-devkit/architect": "0.1500.4", "@angular-devkit/build-angular": "14.2.10", "@angular-eslint/builder": "14.4.0", "@angular-eslint/eslint-plugin": "14.4.0", @@ -53,9 +53,9 @@ "@types/pouchdb-upsert": "2.2.6", "@types/string-similarity": "4.0.0", "@types/uuid": "9.0.0", - "@typescript-eslint/eslint-plugin": "5.44.0", - "@typescript-eslint/parser": "5.44.0", - "eslint": "8.28.0", + "@typescript-eslint/eslint-plugin": "5.47.1", + "@typescript-eslint/parser": "5.47.1", + "eslint": "8.30.0", "eslint-plugin-decorator-position": "5.0.1", "eslint-plugin-import": "2.26.0", "eslint-plugin-sort-keys-fix": "1.1.2", @@ -89,12 +89,12 @@ } }, "node_modules/@angular-devkit/architect": { - "version": "0.1500.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.3.tgz", - "integrity": "sha512-LNVCyxMz5T9Fib7H3zT2sCE9fhvCUgJoCdT9nN/onDi6LoJx2uGdkVq3IgIsrxAR86pk2ZAR/1d5HdwohxbM8g==", + "version": "0.1500.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.4.tgz", + "integrity": "sha512-U9RQueICmmNk9c2zQjUN8qi/+H6kO2VKqeyuh3Vwj6yj4lQEINf1SNX8Ba9UFH/rxNo64iFM0k5x5vX0VajvCw==", "dev": true, "dependencies": { - "@angular-devkit/core": "15.0.3", + "@angular-devkit/core": "15.0.4", "rxjs": "6.6.7" }, "engines": { @@ -104,9 +104,9 @@ } }, "node_modules/@angular-devkit/architect/node_modules/@angular-devkit/core": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.3.tgz", - "integrity": "sha512-sJsC1uZnOs66uTEGS6E/FlMInERvChIC1oUwfgP4NMYFy4KLkzTDYZ+JAtK5/k418N+j0aS+DndfrRT3n7WNUw==", + "version": "15.0.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.4.tgz", + "integrity": "sha512-4ITpRAevd652SxB+qNesIQ9qfbm7wT5UBU5kJOPPwGL77I21g8CQpkmV1n5VSacPvC9Zbz90feOWexf7w7JzcA==", "dev": true, "dependencies": { "ajv": "8.11.0", @@ -2976,15 +2976,15 @@ "dev": true }, "node_modules/@eslint/eslintrc": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", - "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.0.tgz", + "integrity": "sha512-7yfvXy6MWLgWSFsLhz5yH3iQ52St8cdUY6FoGieKkRDVxuxmrNuUetIuu6cmjNWwniUHiWXjxCr5tTXDrbYS5A==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.4.0", - "globals": "^13.15.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -3021,9 +3021,9 @@ "dev": true }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.19.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", + "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -3084,14 +3084,14 @@ "dev": true }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.6.tgz", - "integrity": "sha512-jJr+hPTJYKyDILJfhNSHsjiwXYf26Flsz8DvNndOsHs5pwSnpGUEy8yzF0JYhCEvTDdV2vuOK5tt8BVhwO5/hg==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" @@ -3941,14 +3941,14 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.44.0.tgz", - "integrity": "sha512-j5ULd7FmmekcyWeArx+i8x7sdRHzAtXTkmDPthE4amxZOWKFK7bomoJ4r7PJ8K7PoMzD16U8MmuZFAonr1ERvw==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.47.1.tgz", + "integrity": "sha512-r4RZ2Jl9kcQN7K/dcOT+J7NAimbiis4sSM9spvWimsBvDegMhKLA5vri2jG19PmIPbDjPeWzfUPQ2hjEzA4Nmg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.44.0", - "@typescript-eslint/type-utils": "5.44.0", - "@typescript-eslint/utils": "5.44.0", + "@typescript-eslint/scope-manager": "5.47.1", + "@typescript-eslint/type-utils": "5.47.1", + "@typescript-eslint/utils": "5.47.1", "debug": "^4.3.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", @@ -3974,13 +3974,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.44.0.tgz", - "integrity": "sha512-2pKml57KusI0LAhgLKae9kwWeITZ7IsZs77YxyNyIVOwQ1kToyXRaJLl+uDEXzMN5hnobKUOo2gKntK9H1YL8g==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.47.1.tgz", + "integrity": "sha512-9hsFDsgUwrdOoW1D97Ewog7DYSHaq4WKuNs0LHF9RiCmqB0Z+XRR4Pf7u7u9z/8CciHuJ6yxNws1XznI3ddjEw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/visitor-keys": "5.44.0" + "@typescript-eslint/types": "5.47.1", + "@typescript-eslint/visitor-keys": "5.47.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3991,13 +3991,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/type-utils": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.44.0.tgz", - "integrity": "sha512-A1u0Yo5wZxkXPQ7/noGkRhV4J9opcymcr31XQtOzcc5nO/IHN2E2TPMECKWYpM3e6olWEM63fq/BaL1wEYnt/w==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.47.1.tgz", + "integrity": "sha512-/UKOeo8ee80A7/GJA427oIrBi/Gd4osk/3auBUg4Rn9EahFpevVV1mUK8hjyQD5lHPqX397x6CwOk5WGh1E/1w==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.44.0", - "@typescript-eslint/utils": "5.44.0", + "@typescript-eslint/typescript-estree": "5.47.1", + "@typescript-eslint/utils": "5.47.1", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -4018,9 +4018,9 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.44.0.tgz", - "integrity": "sha512-Tp+zDnHmGk4qKR1l+Y1rBvpjpm5tGXX339eAlRBDg+kgZkz9Bw+pqi4dyseOZMsGuSH69fYfPJCBKBrbPCxYFQ==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.47.1.tgz", + "integrity": "sha512-CmALY9YWXEpwuu6377ybJBZdtSAnzXLSQcxLSqSQSbC7VfpMu/HLVdrnVJj7ycI138EHqocW02LPJErE35cE9A==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -4031,13 +4031,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.44.0.tgz", - "integrity": "sha512-M6Jr+RM7M5zeRj2maSfsZK2660HKAJawv4Ud0xT+yauyvgrsHu276VtXlKDFnEmhG+nVEd0fYZNXGoAgxwDWJw==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.47.1.tgz", + "integrity": "sha512-4+ZhFSuISAvRi2xUszEj0xXbNTHceV9GbH9S8oAD2a/F9SW57aJNQVOCxG8GPfSWH/X4eOPdMEU2jYVuWKEpWA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/visitor-keys": "5.44.0", + "@typescript-eslint/types": "5.47.1", + "@typescript-eslint/visitor-keys": "5.47.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -4058,16 +4058,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.44.0.tgz", - "integrity": "sha512-fMzA8LLQ189gaBjS0MZszw5HBdZgVwxVFShCO3QN+ws3GlPkcy9YuS3U4wkT6su0w+Byjq3mS3uamy9HE4Yfjw==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.47.1.tgz", + "integrity": "sha512-l90SdwqfmkuIVaREZ2ykEfCezepCLxzWMo5gVfcJsJCaT4jHT+QjgSkYhs5BMQmWqE9k3AtIfk4g211z/sTMVw==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.44.0", - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/typescript-estree": "5.44.0", + "@typescript-eslint/scope-manager": "5.47.1", + "@typescript-eslint/types": "5.47.1", + "@typescript-eslint/typescript-estree": "5.47.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" @@ -4084,12 +4084,12 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.44.0.tgz", - "integrity": "sha512-a48tLG8/4m62gPFbJ27FxwCOqPKxsb8KC3HkmYoq2As/4YyjQl1jDbRr1s63+g4FS/iIehjmN3L5UjmKva1HzQ==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.47.1.tgz", + "integrity": "sha512-rF3pmut2JCCjh6BLRhNKdYjULMb1brvoaiWDlHfLNVgmnZ0sBVJrs3SyaKE1XoDDnJuAx/hDQryHYmPUuNq0ig==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/types": "5.47.1", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -4110,14 +4110,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.44.0.tgz", - "integrity": "sha512-H7LCqbZnKqkkgQHaKLGC6KUjt3pjJDx8ETDqmwncyb6PuoigYajyAwBGz08VU/l86dZWZgI4zm5k2VaKqayYyA==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.47.1.tgz", + "integrity": "sha512-9Vb+KIv29r6GPu4EboWOnQM7T+UjpjXvjCPhNORlgm40a9Ia9bvaPJswvtae1gip2QEeVeGh6YquqAzEgoRAlw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.44.0", - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/typescript-estree": "5.44.0", + "@typescript-eslint/scope-manager": "5.47.1", + "@typescript-eslint/types": "5.47.1", + "@typescript-eslint/typescript-estree": "5.47.1", "debug": "^4.3.4" }, "engines": { @@ -4137,13 +4137,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.44.0.tgz", - "integrity": "sha512-2pKml57KusI0LAhgLKae9kwWeITZ7IsZs77YxyNyIVOwQ1kToyXRaJLl+uDEXzMN5hnobKUOo2gKntK9H1YL8g==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.47.1.tgz", + "integrity": "sha512-9hsFDsgUwrdOoW1D97Ewog7DYSHaq4WKuNs0LHF9RiCmqB0Z+XRR4Pf7u7u9z/8CciHuJ6yxNws1XznI3ddjEw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/visitor-keys": "5.44.0" + "@typescript-eslint/types": "5.47.1", + "@typescript-eslint/visitor-keys": "5.47.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -4154,9 +4154,9 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.44.0.tgz", - "integrity": "sha512-Tp+zDnHmGk4qKR1l+Y1rBvpjpm5tGXX339eAlRBDg+kgZkz9Bw+pqi4dyseOZMsGuSH69fYfPJCBKBrbPCxYFQ==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.47.1.tgz", + "integrity": "sha512-CmALY9YWXEpwuu6377ybJBZdtSAnzXLSQcxLSqSQSbC7VfpMu/HLVdrnVJj7ycI138EHqocW02LPJErE35cE9A==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -4167,13 +4167,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.44.0.tgz", - "integrity": "sha512-M6Jr+RM7M5zeRj2maSfsZK2660HKAJawv4Ud0xT+yauyvgrsHu276VtXlKDFnEmhG+nVEd0fYZNXGoAgxwDWJw==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.47.1.tgz", + "integrity": "sha512-4+ZhFSuISAvRi2xUszEj0xXbNTHceV9GbH9S8oAD2a/F9SW57aJNQVOCxG8GPfSWH/X4eOPdMEU2jYVuWKEpWA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/visitor-keys": "5.44.0", + "@typescript-eslint/types": "5.47.1", + "@typescript-eslint/visitor-keys": "5.47.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -4194,12 +4194,12 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.44.0.tgz", - "integrity": "sha512-a48tLG8/4m62gPFbJ27FxwCOqPKxsb8KC3HkmYoq2As/4YyjQl1jDbRr1s63+g4FS/iIehjmN3L5UjmKva1HzQ==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.47.1.tgz", + "integrity": "sha512-rF3pmut2JCCjh6BLRhNKdYjULMb1brvoaiWDlHfLNVgmnZ0sBVJrs3SyaKE1XoDDnJuAx/hDQryHYmPUuNq0ig==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/types": "5.47.1", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -4814,11 +4814,6 @@ "sprintf-js": "~1.0.2" } }, - "node_modules/argsarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/argsarray/-/argsarray-0.0.1.tgz", - "integrity": "sha512-u96dg2GcAKtpTrBdDoFIM7PjcBA+6rSP0OR94MOReNRyUECL6MtQt5XXmRr4qrftYaef9+l5hcpO5te7sML1Cg==" - }, "node_modules/aria-query": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", @@ -7193,13 +7188,13 @@ } }, "node_modules/eslint": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", - "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", + "version": "8.30.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.30.0.tgz", + "integrity": "sha512-MGADB39QqYuzEGov+F/qb18r4i7DohCDOfatHaxI2iGlPuC65bwG2gxgO+7DkyL38dRFaRH7RaRAgU6JKL9rMQ==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.3.3", - "@humanwhocodes/config-array": "^0.11.6", + "@eslint/eslintrc": "^1.4.0", + "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -7218,7 +7213,7 @@ "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.15.0", + "globals": "^13.19.0", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", @@ -7659,9 +7654,9 @@ } }, "node_modules/eslint/node_modules/globals": { - "version": "13.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.18.0.tgz", - "integrity": "sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A==", + "version": "13.19.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", + "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -12779,18 +12774,16 @@ "dev": true }, "node_modules/pouchdb": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb/-/pouchdb-7.3.1.tgz", - "integrity": "sha512-oanSnM3SD9lPRuVRwEZWVbtWKYluw0q5phT5BXWi2b9Zqd5mJUPWKbKWJu03cDPM9wySmKKd7yfl9O9/eIQ5fg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb/-/pouchdb-8.0.0.tgz", + "integrity": "sha512-VYaPQ1CPTNjZ+Ltm/pl4llaDMTRCZrpg7TZ/2BpeA8RrawE66CRW7aGSWzgQarW8j/KHwEz5cVv/mwj9RMnCTg==", "dependencies": { "abort-controller": "3.0.0", - "argsarray": "0.0.1", "buffer-from": "1.1.2", "clone-buffer": "1.0.0", "double-ended-queue": "2.1.0-0", "fetch-cookie": "0.11.0", "immediate": "3.3.0", - "inherits": "2.0.4", "level": "6.0.1", "level-codec": "9.0.2", "level-write-stream": "1.0.0", @@ -12806,50 +12799,47 @@ } }, "node_modules/pouchdb-abstract-mapreduce": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-abstract-mapreduce/-/pouchdb-abstract-mapreduce-7.3.1.tgz", - "integrity": "sha512-0zKXVFBvrfc1KnN0ggrB762JDmZnUpePHywo9Bq3Jy+L1FnoG7fXM5luFfvv5/T0gEw+ZTIwoocZECMnESBI9w==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-abstract-mapreduce/-/pouchdb-abstract-mapreduce-8.0.0.tgz", + "integrity": "sha512-LUf+xb1zFyrIEk8KK01xbv5WQiRyDJhPieFvf9nYfvemRFzD78+1ho90pIKoDVYqiu+Q3PckLzm/VLcJGWn9Vw==", "dependencies": { - "pouchdb-binary-utils": "7.3.1", - "pouchdb-collate": "7.3.1", - "pouchdb-collections": "7.3.1", - "pouchdb-errors": "7.3.1", - "pouchdb-fetch": "7.3.1", - "pouchdb-mapreduce-utils": "7.3.1", - "pouchdb-md5": "7.3.1", - "pouchdb-utils": "7.3.1" + "pouchdb-binary-utils": "8.0.0", + "pouchdb-collate": "8.0.0", + "pouchdb-collections": "8.0.0", + "pouchdb-errors": "8.0.0", + "pouchdb-fetch": "8.0.0", + "pouchdb-mapreduce-utils": "8.0.0", + "pouchdb-md5": "8.0.0", + "pouchdb-utils": "8.0.0" } }, "node_modules/pouchdb-binary-utils": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-binary-utils/-/pouchdb-binary-utils-7.3.1.tgz", - "integrity": "sha512-crZJNfAEOnUoRk977Qtmk4cxEv6sNKllQ6vDDKgQrQLFjMUXma35EHzNyIJr1s76J77Q4sqKQAmxz9Y40yHGtw==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-binary-utils/-/pouchdb-binary-utils-8.0.0.tgz", + "integrity": "sha512-MDp0VE0SIxzjjnqOST2dI8w65k2HFdau3Sp885rgYgCe4TIDCGeSbKiL3EyyBKC+mob1kLSJaQsXfSAOqg8vUg==", "dependencies": { "buffer-from": "1.1.2" } }, "node_modules/pouchdb-collate": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-collate/-/pouchdb-collate-7.3.1.tgz", - "integrity": "sha512-o4gyGqDMLMSNzf6EDTr3eHaH/JRMoqRhdc+eV+oA8u00nTBtr9wD+jypVe2LbgKLJ4NWqx2qVkXiTiQdUFtsLQ==" + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-collate/-/pouchdb-collate-8.0.0.tgz", + "integrity": "sha512-kgJCzB1yZl/u1rWLbftJth7w9Wm0RwetDsHNolFgplZO33DtzCmU3vSxZC5ly68ZScWNAuEiqz1ExF1gFwq+eA==" }, "node_modules/pouchdb-collections": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-collections/-/pouchdb-collections-7.3.1.tgz", - "integrity": "sha512-yUyDqR+OJmtwgExOSJegpBJXDLAEC84TWnbAYycyh+DZoA51Yw0+XVQF5Vh8Ii90/Ut2xo88fmrmp0t6kqom8w==" + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-collections/-/pouchdb-collections-8.0.0.tgz", + "integrity": "sha512-s2N1HDBixnjIt7E9TyatOIOsHciiF0iTIb3BtExHNSpkPkjYVhSX2EOnPICEONcmNaLmf/ljue7m+mgLP7IYfA==" }, "node_modules/pouchdb-errors": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-errors/-/pouchdb-errors-7.3.1.tgz", - "integrity": "sha512-Zktz4gnXEUcZcty8FmyvtYUYsHskoST05m6H5/E2gg/0mCfEXq/XeyyLkZHaZmqD0ZPS9yNmASB1VaFWEKEaDw==", - "dependencies": { - "inherits": "2.0.4" - } + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-errors/-/pouchdb-errors-8.0.0.tgz", + "integrity": "sha512-OZ8pUQrYTuCLAKepBgmb/Cw1+NY4qS7KrJX827c9C7ed6ZhSsRKdePjO56yWJrD3VbH1EJo9I87VBdCApkKGTw==" }, "node_modules/pouchdb-fetch": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-fetch/-/pouchdb-fetch-7.3.1.tgz", - "integrity": "sha512-205xAtvdHRPQ4fp1h9+RmT9oQabo9gafuPmWsS9aEl3ER54WbY8Vaj1JHZGbU4KtMTYvW7H5088zLS7Nrusuag==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-fetch/-/pouchdb-fetch-8.0.0.tgz", + "integrity": "sha512-EZRZ7m9RFk7gLKpmdKxRPFEKh7n555/rUPnCDIhcd4wqxC3RDRervKtjIBYS9X/xQYZv/BG/ZyXIrigIYJBo3A==", "dependencies": { "abort-controller": "3.0.0", "fetch-cookie": "0.11.0", @@ -12857,36 +12847,34 @@ } }, "node_modules/pouchdb-find": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-find/-/pouchdb-find-7.3.1.tgz", - "integrity": "sha512-AeqUfAVY1c7IFaY36BRT0vIz9r4VTKq/YOWTmiqndOZUQ/pDGxyO2fNFal6NN3PyYww0JijlD377cPvhnrhJVA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-find/-/pouchdb-find-8.0.0.tgz", + "integrity": "sha512-PVpTABPn8Fia2o3Z8z7BN9q93yxdi0fLRB+0lTbSHZP0tMD9z9FdtBkwHBuNja+gr9hZl95QgfJFB45z4Fj+0g==", "dependencies": { - "pouchdb-abstract-mapreduce": "7.3.1", - "pouchdb-collate": "7.3.1", - "pouchdb-errors": "7.3.1", - "pouchdb-fetch": "7.3.1", - "pouchdb-md5": "7.3.1", - "pouchdb-selector-core": "7.3.1", - "pouchdb-utils": "7.3.1" + "pouchdb-abstract-mapreduce": "8.0.0", + "pouchdb-collate": "8.0.0", + "pouchdb-errors": "8.0.0", + "pouchdb-fetch": "8.0.0", + "pouchdb-md5": "8.0.0", + "pouchdb-selector-core": "8.0.0", + "pouchdb-utils": "8.0.0" } }, "node_modules/pouchdb-mapreduce-utils": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-mapreduce-utils/-/pouchdb-mapreduce-utils-7.3.1.tgz", - "integrity": "sha512-oUMcq82+4pTGQ6dtrhgORHOVHZSr6w/5tFIUGlv7RABIDvJarL4snMawADjlpiEwPdiQ/ESG8Fqt8cxqvqsIgg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-mapreduce-utils/-/pouchdb-mapreduce-utils-8.0.0.tgz", + "integrity": "sha512-29pIuc7ndDHa7M8KydaolZvbYlAeW29BdR9Zcb3YqGYAz+tGy0RLP4z9qVqmrsSxdn9IM99fH5K8x87Uza2Ruw==", "dependencies": { - "argsarray": "0.0.1", - "inherits": "2.0.4", - "pouchdb-collections": "7.3.1", - "pouchdb-utils": "7.3.1" + "pouchdb-collections": "8.0.0", + "pouchdb-utils": "8.0.0" } }, "node_modules/pouchdb-md5": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-md5/-/pouchdb-md5-7.3.1.tgz", - "integrity": "sha512-aDV8ui/mprnL3xmt0gT/81DFtTtJiKyn+OxIAbwKPMfz/rDFdPYvF0BmDC9QxMMzGfkV+JJUjU6at0PPs2mRLg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-md5/-/pouchdb-md5-8.0.0.tgz", + "integrity": "sha512-xOEcmtpmL5uvgQNUVkD6ND+eb8sUIN64PF94rGXCA9m4ewzropDlLoEfmXnFcdAx9fYlcgT8dBimCHpMCenNyA==", "dependencies": { - "pouchdb-binary-utils": "7.3.1", + "pouchdb-binary-utils": "8.0.0", "spark-md5": "3.0.2" } }, @@ -12899,12 +12887,12 @@ } }, "node_modules/pouchdb-selector-core": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-selector-core/-/pouchdb-selector-core-7.3.1.tgz", - "integrity": "sha512-HBX+nNGXcaL9z0uNpwSMRq2GNZd3EZXW+fe9rJHS0hvJohjZL7aRJLoaXfEdHPRTNW+CpjM3Rny60eGekQdI/w==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-selector-core/-/pouchdb-selector-core-8.0.0.tgz", + "integrity": "sha512-oHN3pftwDrzKNwz7UoyFw8rtX6W7LFChLHV1bzdKDP3XjJsNHzW0uGjs6EfuEFxbFgCvzav5u7SDHCefwKDRjg==", "dependencies": { - "pouchdb-collate": "7.3.1", - "pouchdb-utils": "7.3.1" + "pouchdb-collate": "8.0.0", + "pouchdb-utils": "8.0.0" } }, "node_modules/pouchdb-upsert": { @@ -12916,17 +12904,15 @@ } }, "node_modules/pouchdb-utils": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-utils/-/pouchdb-utils-7.3.1.tgz", - "integrity": "sha512-R3hHBo1zTdTu/NFs3iqkcaQAPwhIH0gMIdfVKd5lbDYlmP26rCG5pdS+v7NuoSSFLJ4xxnaGV+Gjf4duYsJ8wQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-utils/-/pouchdb-utils-8.0.0.tgz", + "integrity": "sha512-oi+D3zlqOe7H4UcVGoxdhrCVZZlk2BSnJhie3yqU/Gcb8R2BKYFGyHx9LVWFg/099NVVYYImcvgYFJHo/Q1f9g==", "dependencies": { - "argsarray": "0.0.1", "clone-buffer": "1.0.0", "immediate": "3.3.0", - "inherits": "2.0.4", - "pouchdb-collections": "7.3.1", - "pouchdb-errors": "7.3.1", - "pouchdb-md5": "7.3.1", + "pouchdb-collections": "8.0.0", + "pouchdb-errors": "8.0.0", + "pouchdb-md5": "8.0.0", "uuid": "8.3.2" } }, @@ -13594,9 +13580,9 @@ } }, "node_modules/rxjs": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.6.0.tgz", - "integrity": "sha512-DDa7d8TFNUalGC9VqXvQ1euWNN7sc63TrUCuM9J998+ViviahMIjKSOU7rfcgFOF+FCD71BhDRv4hrFz+ImDLQ==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", + "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", "dependencies": { "tslib": "^2.1.0" } @@ -15687,9 +15673,9 @@ } }, "node_modules/zone.js": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.11.8.tgz", - "integrity": "sha512-82bctBg2hKcEJ21humWIkXRlLBBmrc3nN7DFh5LGGhcyycO2S7FN8NmdvlcKaGFDNVL4/9kFLmwmInTavdJERA==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.12.0.tgz", + "integrity": "sha512-XtC+I5dXU14HrzidAKBNMqneIVUykLEAA1x+v4KVrd6AUPWlwYORF8KgsVqvgdHiKZ4BkxxjvYi/ksEixTPR0Q==", "dependencies": { "tslib": "^2.3.0" } @@ -15713,19 +15699,19 @@ } }, "@angular-devkit/architect": { - "version": "0.1500.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.3.tgz", - "integrity": "sha512-LNVCyxMz5T9Fib7H3zT2sCE9fhvCUgJoCdT9nN/onDi6LoJx2uGdkVq3IgIsrxAR86pk2ZAR/1d5HdwohxbM8g==", + "version": "0.1500.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.4.tgz", + "integrity": "sha512-U9RQueICmmNk9c2zQjUN8qi/+H6kO2VKqeyuh3Vwj6yj4lQEINf1SNX8Ba9UFH/rxNo64iFM0k5x5vX0VajvCw==", "dev": true, "requires": { - "@angular-devkit/core": "15.0.3", + "@angular-devkit/core": "15.0.4", "rxjs": "6.6.7" }, "dependencies": { "@angular-devkit/core": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.3.tgz", - "integrity": "sha512-sJsC1uZnOs66uTEGS6E/FlMInERvChIC1oUwfgP4NMYFy4KLkzTDYZ+JAtK5/k418N+j0aS+DndfrRT3n7WNUw==", + "version": "15.0.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.4.tgz", + "integrity": "sha512-4ITpRAevd652SxB+qNesIQ9qfbm7wT5UBU5kJOPPwGL77I21g8CQpkmV1n5VSacPvC9Zbz90feOWexf7w7JzcA==", "dev": true, "requires": { "ajv": "8.11.0", @@ -17667,15 +17653,15 @@ "dev": true }, "@eslint/eslintrc": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", - "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.0.tgz", + "integrity": "sha512-7yfvXy6MWLgWSFsLhz5yH3iQ52St8cdUY6FoGieKkRDVxuxmrNuUetIuu6cmjNWwniUHiWXjxCr5tTXDrbYS5A==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.4.0", - "globals": "^13.15.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -17702,9 +17688,9 @@ "dev": true }, "globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.19.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", + "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -17749,14 +17735,14 @@ "dev": true }, "@humanwhocodes/config-array": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.6.tgz", - "integrity": "sha512-jJr+hPTJYKyDILJfhNSHsjiwXYf26Flsz8DvNndOsHs5pwSnpGUEy8yzF0JYhCEvTDdV2vuOK5tt8BVhwO5/hg==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" } }, "@humanwhocodes/module-importer": { @@ -18506,14 +18492,14 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.44.0.tgz", - "integrity": "sha512-j5ULd7FmmekcyWeArx+i8x7sdRHzAtXTkmDPthE4amxZOWKFK7bomoJ4r7PJ8K7PoMzD16U8MmuZFAonr1ERvw==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.47.1.tgz", + "integrity": "sha512-r4RZ2Jl9kcQN7K/dcOT+J7NAimbiis4sSM9spvWimsBvDegMhKLA5vri2jG19PmIPbDjPeWzfUPQ2hjEzA4Nmg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.44.0", - "@typescript-eslint/type-utils": "5.44.0", - "@typescript-eslint/utils": "5.44.0", + "@typescript-eslint/scope-manager": "5.47.1", + "@typescript-eslint/type-utils": "5.47.1", + "@typescript-eslint/utils": "5.47.1", "debug": "^4.3.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", @@ -18523,41 +18509,41 @@ }, "dependencies": { "@typescript-eslint/scope-manager": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.44.0.tgz", - "integrity": "sha512-2pKml57KusI0LAhgLKae9kwWeITZ7IsZs77YxyNyIVOwQ1kToyXRaJLl+uDEXzMN5hnobKUOo2gKntK9H1YL8g==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.47.1.tgz", + "integrity": "sha512-9hsFDsgUwrdOoW1D97Ewog7DYSHaq4WKuNs0LHF9RiCmqB0Z+XRR4Pf7u7u9z/8CciHuJ6yxNws1XznI3ddjEw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/visitor-keys": "5.44.0" + "@typescript-eslint/types": "5.47.1", + "@typescript-eslint/visitor-keys": "5.47.1" } }, "@typescript-eslint/type-utils": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.44.0.tgz", - "integrity": "sha512-A1u0Yo5wZxkXPQ7/noGkRhV4J9opcymcr31XQtOzcc5nO/IHN2E2TPMECKWYpM3e6olWEM63fq/BaL1wEYnt/w==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.47.1.tgz", + "integrity": "sha512-/UKOeo8ee80A7/GJA427oIrBi/Gd4osk/3auBUg4Rn9EahFpevVV1mUK8hjyQD5lHPqX397x6CwOk5WGh1E/1w==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.44.0", - "@typescript-eslint/utils": "5.44.0", + "@typescript-eslint/typescript-estree": "5.47.1", + "@typescript-eslint/utils": "5.47.1", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.44.0.tgz", - "integrity": "sha512-Tp+zDnHmGk4qKR1l+Y1rBvpjpm5tGXX339eAlRBDg+kgZkz9Bw+pqi4dyseOZMsGuSH69fYfPJCBKBrbPCxYFQ==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.47.1.tgz", + "integrity": "sha512-CmALY9YWXEpwuu6377ybJBZdtSAnzXLSQcxLSqSQSbC7VfpMu/HLVdrnVJj7ycI138EHqocW02LPJErE35cE9A==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.44.0.tgz", - "integrity": "sha512-M6Jr+RM7M5zeRj2maSfsZK2660HKAJawv4Ud0xT+yauyvgrsHu276VtXlKDFnEmhG+nVEd0fYZNXGoAgxwDWJw==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.47.1.tgz", + "integrity": "sha512-4+ZhFSuISAvRi2xUszEj0xXbNTHceV9GbH9S8oAD2a/F9SW57aJNQVOCxG8GPfSWH/X4eOPdMEU2jYVuWKEpWA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/visitor-keys": "5.44.0", + "@typescript-eslint/types": "5.47.1", + "@typescript-eslint/visitor-keys": "5.47.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -18566,28 +18552,28 @@ } }, "@typescript-eslint/utils": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.44.0.tgz", - "integrity": "sha512-fMzA8LLQ189gaBjS0MZszw5HBdZgVwxVFShCO3QN+ws3GlPkcy9YuS3U4wkT6su0w+Byjq3mS3uamy9HE4Yfjw==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.47.1.tgz", + "integrity": "sha512-l90SdwqfmkuIVaREZ2ykEfCezepCLxzWMo5gVfcJsJCaT4jHT+QjgSkYhs5BMQmWqE9k3AtIfk4g211z/sTMVw==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.44.0", - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/typescript-estree": "5.44.0", + "@typescript-eslint/scope-manager": "5.47.1", + "@typescript-eslint/types": "5.47.1", + "@typescript-eslint/typescript-estree": "5.47.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" } }, "@typescript-eslint/visitor-keys": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.44.0.tgz", - "integrity": "sha512-a48tLG8/4m62gPFbJ27FxwCOqPKxsb8KC3HkmYoq2As/4YyjQl1jDbRr1s63+g4FS/iIehjmN3L5UjmKva1HzQ==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.47.1.tgz", + "integrity": "sha512-rF3pmut2JCCjh6BLRhNKdYjULMb1brvoaiWDlHfLNVgmnZ0sBVJrs3SyaKE1XoDDnJuAx/hDQryHYmPUuNq0ig==", "dev": true, "requires": { - "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/types": "5.47.1", "eslint-visitor-keys": "^3.3.0" } }, @@ -18600,41 +18586,41 @@ } }, "@typescript-eslint/parser": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.44.0.tgz", - "integrity": "sha512-H7LCqbZnKqkkgQHaKLGC6KUjt3pjJDx8ETDqmwncyb6PuoigYajyAwBGz08VU/l86dZWZgI4zm5k2VaKqayYyA==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.47.1.tgz", + "integrity": "sha512-9Vb+KIv29r6GPu4EboWOnQM7T+UjpjXvjCPhNORlgm40a9Ia9bvaPJswvtae1gip2QEeVeGh6YquqAzEgoRAlw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.44.0", - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/typescript-estree": "5.44.0", + "@typescript-eslint/scope-manager": "5.47.1", + "@typescript-eslint/types": "5.47.1", + "@typescript-eslint/typescript-estree": "5.47.1", "debug": "^4.3.4" }, "dependencies": { "@typescript-eslint/scope-manager": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.44.0.tgz", - "integrity": "sha512-2pKml57KusI0LAhgLKae9kwWeITZ7IsZs77YxyNyIVOwQ1kToyXRaJLl+uDEXzMN5hnobKUOo2gKntK9H1YL8g==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.47.1.tgz", + "integrity": "sha512-9hsFDsgUwrdOoW1D97Ewog7DYSHaq4WKuNs0LHF9RiCmqB0Z+XRR4Pf7u7u9z/8CciHuJ6yxNws1XznI3ddjEw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/visitor-keys": "5.44.0" + "@typescript-eslint/types": "5.47.1", + "@typescript-eslint/visitor-keys": "5.47.1" } }, "@typescript-eslint/types": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.44.0.tgz", - "integrity": "sha512-Tp+zDnHmGk4qKR1l+Y1rBvpjpm5tGXX339eAlRBDg+kgZkz9Bw+pqi4dyseOZMsGuSH69fYfPJCBKBrbPCxYFQ==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.47.1.tgz", + "integrity": "sha512-CmALY9YWXEpwuu6377ybJBZdtSAnzXLSQcxLSqSQSbC7VfpMu/HLVdrnVJj7ycI138EHqocW02LPJErE35cE9A==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.44.0.tgz", - "integrity": "sha512-M6Jr+RM7M5zeRj2maSfsZK2660HKAJawv4Ud0xT+yauyvgrsHu276VtXlKDFnEmhG+nVEd0fYZNXGoAgxwDWJw==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.47.1.tgz", + "integrity": "sha512-4+ZhFSuISAvRi2xUszEj0xXbNTHceV9GbH9S8oAD2a/F9SW57aJNQVOCxG8GPfSWH/X4eOPdMEU2jYVuWKEpWA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.44.0", - "@typescript-eslint/visitor-keys": "5.44.0", + "@typescript-eslint/types": "5.47.1", + "@typescript-eslint/visitor-keys": "5.47.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -18643,12 +18629,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.44.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.44.0.tgz", - "integrity": "sha512-a48tLG8/4m62gPFbJ27FxwCOqPKxsb8KC3HkmYoq2As/4YyjQl1jDbRr1s63+g4FS/iIehjmN3L5UjmKva1HzQ==", + "version": "5.47.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.47.1.tgz", + "integrity": "sha512-rF3pmut2JCCjh6BLRhNKdYjULMb1brvoaiWDlHfLNVgmnZ0sBVJrs3SyaKE1XoDDnJuAx/hDQryHYmPUuNq0ig==", "dev": true, "requires": { - "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/types": "5.47.1", "eslint-visitor-keys": "^3.3.0" } }, @@ -19122,11 +19108,6 @@ "sprintf-js": "~1.0.2" } }, - "argsarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/argsarray/-/argsarray-0.0.1.tgz", - "integrity": "sha512-u96dg2GcAKtpTrBdDoFIM7PjcBA+6rSP0OR94MOReNRyUECL6MtQt5XXmRr4qrftYaef9+l5hcpO5te7sML1Cg==" - }, "aria-query": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", @@ -20811,13 +20792,13 @@ "dev": true }, "eslint": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", - "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", + "version": "8.30.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.30.0.tgz", + "integrity": "sha512-MGADB39QqYuzEGov+F/qb18r4i7DohCDOfatHaxI2iGlPuC65bwG2gxgO+7DkyL38dRFaRH7RaRAgU6JKL9rMQ==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.3", - "@humanwhocodes/config-array": "^0.11.6", + "@eslint/eslintrc": "^1.4.0", + "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -20836,7 +20817,7 @@ "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.15.0", + "globals": "^13.19.0", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", @@ -20957,9 +20938,9 @@ } }, "globals": { - "version": "13.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.18.0.tgz", - "integrity": "sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A==", + "version": "13.19.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", + "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -24876,18 +24857,16 @@ "dev": true }, "pouchdb": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb/-/pouchdb-7.3.1.tgz", - "integrity": "sha512-oanSnM3SD9lPRuVRwEZWVbtWKYluw0q5phT5BXWi2b9Zqd5mJUPWKbKWJu03cDPM9wySmKKd7yfl9O9/eIQ5fg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb/-/pouchdb-8.0.0.tgz", + "integrity": "sha512-VYaPQ1CPTNjZ+Ltm/pl4llaDMTRCZrpg7TZ/2BpeA8RrawE66CRW7aGSWzgQarW8j/KHwEz5cVv/mwj9RMnCTg==", "requires": { "abort-controller": "3.0.0", - "argsarray": "0.0.1", "buffer-from": "1.1.2", "clone-buffer": "1.0.0", "double-ended-queue": "2.1.0-0", "fetch-cookie": "0.11.0", "immediate": "3.3.0", - "inherits": "2.0.4", "level": "6.0.1", "level-codec": "9.0.2", "level-write-stream": "1.0.0", @@ -24931,50 +24910,47 @@ } }, "pouchdb-abstract-mapreduce": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-abstract-mapreduce/-/pouchdb-abstract-mapreduce-7.3.1.tgz", - "integrity": "sha512-0zKXVFBvrfc1KnN0ggrB762JDmZnUpePHywo9Bq3Jy+L1FnoG7fXM5luFfvv5/T0gEw+ZTIwoocZECMnESBI9w==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-abstract-mapreduce/-/pouchdb-abstract-mapreduce-8.0.0.tgz", + "integrity": "sha512-LUf+xb1zFyrIEk8KK01xbv5WQiRyDJhPieFvf9nYfvemRFzD78+1ho90pIKoDVYqiu+Q3PckLzm/VLcJGWn9Vw==", "requires": { - "pouchdb-binary-utils": "7.3.1", - "pouchdb-collate": "7.3.1", - "pouchdb-collections": "7.3.1", - "pouchdb-errors": "7.3.1", - "pouchdb-fetch": "7.3.1", - "pouchdb-mapreduce-utils": "7.3.1", - "pouchdb-md5": "7.3.1", - "pouchdb-utils": "7.3.1" + "pouchdb-binary-utils": "8.0.0", + "pouchdb-collate": "8.0.0", + "pouchdb-collections": "8.0.0", + "pouchdb-errors": "8.0.0", + "pouchdb-fetch": "8.0.0", + "pouchdb-mapreduce-utils": "8.0.0", + "pouchdb-md5": "8.0.0", + "pouchdb-utils": "8.0.0" } }, "pouchdb-binary-utils": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-binary-utils/-/pouchdb-binary-utils-7.3.1.tgz", - "integrity": "sha512-crZJNfAEOnUoRk977Qtmk4cxEv6sNKllQ6vDDKgQrQLFjMUXma35EHzNyIJr1s76J77Q4sqKQAmxz9Y40yHGtw==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-binary-utils/-/pouchdb-binary-utils-8.0.0.tgz", + "integrity": "sha512-MDp0VE0SIxzjjnqOST2dI8w65k2HFdau3Sp885rgYgCe4TIDCGeSbKiL3EyyBKC+mob1kLSJaQsXfSAOqg8vUg==", "requires": { "buffer-from": "1.1.2" } }, "pouchdb-collate": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-collate/-/pouchdb-collate-7.3.1.tgz", - "integrity": "sha512-o4gyGqDMLMSNzf6EDTr3eHaH/JRMoqRhdc+eV+oA8u00nTBtr9wD+jypVe2LbgKLJ4NWqx2qVkXiTiQdUFtsLQ==" + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-collate/-/pouchdb-collate-8.0.0.tgz", + "integrity": "sha512-kgJCzB1yZl/u1rWLbftJth7w9Wm0RwetDsHNolFgplZO33DtzCmU3vSxZC5ly68ZScWNAuEiqz1ExF1gFwq+eA==" }, "pouchdb-collections": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-collections/-/pouchdb-collections-7.3.1.tgz", - "integrity": "sha512-yUyDqR+OJmtwgExOSJegpBJXDLAEC84TWnbAYycyh+DZoA51Yw0+XVQF5Vh8Ii90/Ut2xo88fmrmp0t6kqom8w==" + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-collections/-/pouchdb-collections-8.0.0.tgz", + "integrity": "sha512-s2N1HDBixnjIt7E9TyatOIOsHciiF0iTIb3BtExHNSpkPkjYVhSX2EOnPICEONcmNaLmf/ljue7m+mgLP7IYfA==" }, "pouchdb-errors": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-errors/-/pouchdb-errors-7.3.1.tgz", - "integrity": "sha512-Zktz4gnXEUcZcty8FmyvtYUYsHskoST05m6H5/E2gg/0mCfEXq/XeyyLkZHaZmqD0ZPS9yNmASB1VaFWEKEaDw==", - "requires": { - "inherits": "2.0.4" - } + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-errors/-/pouchdb-errors-8.0.0.tgz", + "integrity": "sha512-OZ8pUQrYTuCLAKepBgmb/Cw1+NY4qS7KrJX827c9C7ed6ZhSsRKdePjO56yWJrD3VbH1EJo9I87VBdCApkKGTw==" }, "pouchdb-fetch": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-fetch/-/pouchdb-fetch-7.3.1.tgz", - "integrity": "sha512-205xAtvdHRPQ4fp1h9+RmT9oQabo9gafuPmWsS9aEl3ER54WbY8Vaj1JHZGbU4KtMTYvW7H5088zLS7Nrusuag==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-fetch/-/pouchdb-fetch-8.0.0.tgz", + "integrity": "sha512-EZRZ7m9RFk7gLKpmdKxRPFEKh7n555/rUPnCDIhcd4wqxC3RDRervKtjIBYS9X/xQYZv/BG/ZyXIrigIYJBo3A==", "requires": { "abort-controller": "3.0.0", "fetch-cookie": "0.11.0", @@ -24982,36 +24958,34 @@ } }, "pouchdb-find": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-find/-/pouchdb-find-7.3.1.tgz", - "integrity": "sha512-AeqUfAVY1c7IFaY36BRT0vIz9r4VTKq/YOWTmiqndOZUQ/pDGxyO2fNFal6NN3PyYww0JijlD377cPvhnrhJVA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-find/-/pouchdb-find-8.0.0.tgz", + "integrity": "sha512-PVpTABPn8Fia2o3Z8z7BN9q93yxdi0fLRB+0lTbSHZP0tMD9z9FdtBkwHBuNja+gr9hZl95QgfJFB45z4Fj+0g==", "requires": { - "pouchdb-abstract-mapreduce": "7.3.1", - "pouchdb-collate": "7.3.1", - "pouchdb-errors": "7.3.1", - "pouchdb-fetch": "7.3.1", - "pouchdb-md5": "7.3.1", - "pouchdb-selector-core": "7.3.1", - "pouchdb-utils": "7.3.1" + "pouchdb-abstract-mapreduce": "8.0.0", + "pouchdb-collate": "8.0.0", + "pouchdb-errors": "8.0.0", + "pouchdb-fetch": "8.0.0", + "pouchdb-md5": "8.0.0", + "pouchdb-selector-core": "8.0.0", + "pouchdb-utils": "8.0.0" } }, "pouchdb-mapreduce-utils": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-mapreduce-utils/-/pouchdb-mapreduce-utils-7.3.1.tgz", - "integrity": "sha512-oUMcq82+4pTGQ6dtrhgORHOVHZSr6w/5tFIUGlv7RABIDvJarL4snMawADjlpiEwPdiQ/ESG8Fqt8cxqvqsIgg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-mapreduce-utils/-/pouchdb-mapreduce-utils-8.0.0.tgz", + "integrity": "sha512-29pIuc7ndDHa7M8KydaolZvbYlAeW29BdR9Zcb3YqGYAz+tGy0RLP4z9qVqmrsSxdn9IM99fH5K8x87Uza2Ruw==", "requires": { - "argsarray": "0.0.1", - "inherits": "2.0.4", - "pouchdb-collections": "7.3.1", - "pouchdb-utils": "7.3.1" + "pouchdb-collections": "8.0.0", + "pouchdb-utils": "8.0.0" } }, "pouchdb-md5": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-md5/-/pouchdb-md5-7.3.1.tgz", - "integrity": "sha512-aDV8ui/mprnL3xmt0gT/81DFtTtJiKyn+OxIAbwKPMfz/rDFdPYvF0BmDC9QxMMzGfkV+JJUjU6at0PPs2mRLg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-md5/-/pouchdb-md5-8.0.0.tgz", + "integrity": "sha512-xOEcmtpmL5uvgQNUVkD6ND+eb8sUIN64PF94rGXCA9m4ewzropDlLoEfmXnFcdAx9fYlcgT8dBimCHpMCenNyA==", "requires": { - "pouchdb-binary-utils": "7.3.1", + "pouchdb-binary-utils": "8.0.0", "spark-md5": "3.0.2" } }, @@ -25024,12 +24998,12 @@ } }, "pouchdb-selector-core": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-selector-core/-/pouchdb-selector-core-7.3.1.tgz", - "integrity": "sha512-HBX+nNGXcaL9z0uNpwSMRq2GNZd3EZXW+fe9rJHS0hvJohjZL7aRJLoaXfEdHPRTNW+CpjM3Rny60eGekQdI/w==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-selector-core/-/pouchdb-selector-core-8.0.0.tgz", + "integrity": "sha512-oHN3pftwDrzKNwz7UoyFw8rtX6W7LFChLHV1bzdKDP3XjJsNHzW0uGjs6EfuEFxbFgCvzav5u7SDHCefwKDRjg==", "requires": { - "pouchdb-collate": "7.3.1", - "pouchdb-utils": "7.3.1" + "pouchdb-collate": "8.0.0", + "pouchdb-utils": "8.0.0" } }, "pouchdb-upsert": { @@ -25041,17 +25015,15 @@ } }, "pouchdb-utils": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/pouchdb-utils/-/pouchdb-utils-7.3.1.tgz", - "integrity": "sha512-R3hHBo1zTdTu/NFs3iqkcaQAPwhIH0gMIdfVKd5lbDYlmP26rCG5pdS+v7NuoSSFLJ4xxnaGV+Gjf4duYsJ8wQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pouchdb-utils/-/pouchdb-utils-8.0.0.tgz", + "integrity": "sha512-oi+D3zlqOe7H4UcVGoxdhrCVZZlk2BSnJhie3yqU/Gcb8R2BKYFGyHx9LVWFg/099NVVYYImcvgYFJHo/Q1f9g==", "requires": { - "argsarray": "0.0.1", "clone-buffer": "1.0.0", "immediate": "3.3.0", - "inherits": "2.0.4", - "pouchdb-collections": "7.3.1", - "pouchdb-errors": "7.3.1", - "pouchdb-md5": "7.3.1", + "pouchdb-collections": "8.0.0", + "pouchdb-errors": "8.0.0", + "pouchdb-md5": "8.0.0", "uuid": "8.3.2" }, "dependencies": { @@ -25518,9 +25490,9 @@ } }, "rxjs": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.6.0.tgz", - "integrity": "sha512-DDa7d8TFNUalGC9VqXvQ1euWNN7sc63TrUCuM9J998+ViviahMIjKSOU7rfcgFOF+FCD71BhDRv4hrFz+ImDLQ==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", + "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", "requires": { "tslib": "^2.1.0" } @@ -27075,9 +27047,9 @@ "dev": true }, "zone.js": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.11.8.tgz", - "integrity": "sha512-82bctBg2hKcEJ21humWIkXRlLBBmrc3nN7DFh5LGGhcyycO2S7FN8NmdvlcKaGFDNVL4/9kFLmwmInTavdJERA==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.12.0.tgz", + "integrity": "sha512-XtC+I5dXU14HrzidAKBNMqneIVUykLEAA1x+v4KVrd6AUPWlwYORF8KgsVqvgdHiKZ4BkxxjvYi/ksEixTPR0Q==", "requires": { "tslib": "^2.3.0" } diff --git a/package.json b/package.json index b757a5d9..d409f001 100644 --- a/package.json +++ b/package.json @@ -36,18 +36,18 @@ "@thymesave/material-food-icons": "1.0.1", "hammerjs": "2.0.8", "lodash": "4.17.21", - "pouchdb": "7.3.1", - "pouchdb-find": "7.3.1", + "pouchdb": "8.0.0", + "pouchdb-find": "8.0.0", "pouchdb-upsert": "2.2.0", - "rxjs": "7.6.0", + "rxjs": "7.8.0", "schema-dts": "1.1.0", "string-similarity": "4.0.4", "tslib": "2.4.1", "uuid": "9.0.0", - "zone.js": "0.11.8" + "zone.js": "0.12.0" }, "devDependencies": { - "@angular-devkit/architect": "0.1500.3", + "@angular-devkit/architect": "0.1500.4", "@angular-devkit/build-angular": "14.2.10", "@angular-eslint/builder": "14.4.0", "@angular-eslint/eslint-plugin": "14.4.0", @@ -64,9 +64,9 @@ "@types/pouchdb-upsert": "2.2.6", "@types/string-similarity": "4.0.0", "@types/uuid": "9.0.0", - "@typescript-eslint/eslint-plugin": "5.44.0", - "@typescript-eslint/parser": "5.44.0", - "eslint": "8.28.0", + "@typescript-eslint/eslint-plugin": "5.47.1", + "@typescript-eslint/parser": "5.47.1", + "eslint": "8.30.0", "eslint-plugin-decorator-position": "5.0.1", "eslint-plugin-import": "2.26.0", "eslint-plugin-sort-keys-fix": "1.1.2", diff --git a/projects/thymesave/core/src/lib/models/inventory.ts b/projects/thymesave/core/src/lib/models/inventory.ts new file mode 100644 index 00000000..1fd41145 --- /dev/null +++ b/projects/thymesave/core/src/lib/models/inventory.ts @@ -0,0 +1,23 @@ +import { UnitIdentifier } from "./unit"; + +/** + * Represent a change to the inventory. There are two changes that can occure: + * - adding an ingredient to the inventory (amount is positive) + * - removing an ingredient from the inventory (amount is negative) + * + * The final amount depends on the inventory change aggregated + */ +export interface InventoryChange { + /** + * Technical key for the ingredient to change the stock for + */ + ingredientKey: string + /** + * Amount that was added/removed + */ + amount: number + /** + * Unit related to the change + */ + unit : UnitIdentifier +} diff --git a/projects/thymesave/core/src/lib/models/unit.spec.ts b/projects/thymesave/core/src/lib/models/unit.spec.ts new file mode 100644 index 00000000..61418971 --- /dev/null +++ b/projects/thymesave/core/src/lib/models/unit.spec.ts @@ -0,0 +1,28 @@ +import { calculateUtilization, convertAmount } from "./unit"; + +describe("convertUnit", () => { + it("should convert successfully when source and target are there", () => { + expect(convertAmount(1, "kilogram", "gram")).toBe(1_000); + expect(convertAmount(1, "cup", "gram")).toBe(125); + }); + it("should return null if no mapping is found", () => { + expect(convertAmount(10, "pack", "gram")).toBe(null); + }); + it("should work with conversion between units", () => { + expect(convertAmount(1, "tbsp", "gram")).toBe(10); + }); +}); + +describe("calculateUtilization", () => { + it("should work with same weight unit", () => { + expect(calculateUtilization(1, "kilogram", 100, "gram")).toBe(0.1); + expect(calculateUtilization(1, "kilogram", 0, "gram")).toBe(0); + expect(calculateUtilization(1, "kilogram",1000, "gram")).toBe(1); + }); + + it("should work with different weight unit", () => { + expect(calculateUtilization(1, "tbsp", 100, "gram")).toBe(1); + expect(calculateUtilization(1, "tbsp", 3, "gram")).toBe(0.3); + expect(calculateUtilization(1, "kilogram", 1000, "gram")).toBe(1); + }); +}); diff --git a/projects/thymesave/core/src/lib/models/unit.ts b/projects/thymesave/core/src/lib/models/unit.ts new file mode 100644 index 00000000..6e77c3ca --- /dev/null +++ b/projects/thymesave/core/src/lib/models/unit.ts @@ -0,0 +1,196 @@ +export type UnitIdentifier = + "" | + "cup" | + "deciliter" | + "gram" | + "jar" | + "kilogram" | + "liter" | + "milligram" | + "milliliter" | + "ounce" | + "pack" | + "pinch" | + "pound" | + "tsp" | + "tbsp" | + "twig"; + +export interface UnitReplacementFactor { + generic: string +} + +/** + * Try to convert the amount from the given unit to the target unit, in case the conversion is not supported null is returned + * + * @param amount Amount to convert + * @param sourceUnit Source unit + * @param targetUnit Target unit to be converted to + */ +export const convertAmount = (amount: number, sourceUnit: UnitIdentifier, targetUnit: UnitIdentifier) => { + const conversionFactor = unitConversionFactor[sourceUnit].conversions[targetUnit]; + return conversionFactor ? amount * conversionFactor : null; +}; + +/** + * Calculates the utilization. + * + * Return values: + * + * => -1 - can not be calculated + * + * => 0 - not utilized + * + * => 1 - fully utilized + * + * => 0..1 - utilization as percentage + * + * @param fullAmount Full amount required + * @param fullAmountUnit Unit of full amount + * @param givenAmount Given amount that we have + * @param givenAmountUnit Amount of the given amount + */ +export const calculateUtilization = (fullAmount: number, fullAmountUnit: UnitIdentifier, givenAmount: number, givenAmountUnit: UnitIdentifier) => { + if (fullAmount == 0 || givenAmount == 0) { + return 0; + } + + const convertedFullAmount = convertAmount(fullAmount, fullAmountUnit, givenAmountUnit) ?? -1; + if (convertedFullAmount == -1) { + return -1; + } + + if (givenAmount >= convertedFullAmount) { + return 1; + } + + return givenAmount / convertedFullAmount; +}; + +/** + * @internal + */ +export const unitConversionFactor: { + [key in UnitIdentifier]: { + estimated: boolean + conversions: { [key in UnitIdentifier]?: number } + } +} = { + "": { + conversions: {}, + estimated: true, + }, + cup: { + conversions: { + gram: 125, + kilogram: 0.125, + milliliter: 240, + }, + estimated: false, + }, + deciliter: { + conversions: { + liter: 0.1, + milliliter: 100, + }, + estimated: false, + }, + gram: { + conversions: { + kilogram: 0.001, + milligram: 1_000, + }, + estimated: false, + }, + jar: { + conversions: { + gram: 200, + milliliter: 200, + }, + estimated: true, + }, + kilogram: { + conversions: { + gram: 1_000, + milligram: 1_000_000, + }, + estimated: false, + }, + liter: { + conversions: { + deciliter: 10, + milliliter: 1_000, + }, + estimated: false, + }, + milligram: { + conversions: { + gram: 0.001, + kilogram: 0.00000100, + }, + estimated: false, + }, + milliliter: { + conversions: { + deciliter: 0.01, + liter: 0.001, + }, + estimated: false, + }, + ounce: { + conversions: { + gram: 28.3495, + kilogram: 0.0283495, + liter: 0.0295735, + milligram: 2_8349.5, + milliliter: 295_735_000.0000136, + }, + estimated: false, + }, + + pack: { + conversions: {}, + estimated: true, + }, + pinch: { + conversions: { + gram: 0.04, + kilogram: 0.004, + milligram: 4_000, + }, + estimated: false, + }, + pound: { + conversions: { + gram: 453.592, + kilogram: 0.453592, + }, + estimated: false, + }, + tbsp: { + conversions: { + gram: 10, + kilogram: 0.01, + liter: 0.015, + milligram: 10_000, + milliliter: 15, + }, + estimated: true, + }, + tsp: { + conversions: { + gram: 3, + kilogram: 0.0003, + liter: 0.0005, + milligram: 3_000, + milliliter: 5, + }, + estimated: true, + }, + twig: { + conversions: { + gram: 30, + }, + estimated: true, + }, +}; diff --git a/projects/thymesave/core/src/public-api.ts b/projects/thymesave/core/src/public-api.ts index 68570dce..3a0731bb 100644 --- a/projects/thymesave/core/src/public-api.ts +++ b/projects/thymesave/core/src/public-api.ts @@ -6,6 +6,8 @@ export * from "./lib/models/funnel"; export * from "./lib/models/instruction"; export * from "./lib/models/ingredient"; export * from "./lib/models/shopping-list"; +export * from "./lib/models/unit"; +export * from "./lib/models/inventory"; export * from "./lib/apis/importer"; export * from "./lib/apis/services"; export * from "./lib/apis/context"; diff --git a/projects/thymesave/ingredients/generate-ingredient-report/package-lock.json b/projects/thymesave/ingredients/generate-ingredient-report/package-lock.json index 9beedbb4..24ec469c 100644 --- a/projects/thymesave/ingredients/generate-ingredient-report/package-lock.json +++ b/projects/thymesave/ingredients/generate-ingredient-report/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@angular-devkit/architect": "0.1500.3" + "@angular-devkit/architect": "0.1500.4" }, "devDependencies": { "@types/jasmine": "4.3.1", @@ -21,11 +21,11 @@ } }, "node_modules/@angular-devkit/architect": { - "version": "0.1500.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.3.tgz", - "integrity": "sha512-LNVCyxMz5T9Fib7H3zT2sCE9fhvCUgJoCdT9nN/onDi6LoJx2uGdkVq3IgIsrxAR86pk2ZAR/1d5HdwohxbM8g==", + "version": "0.1500.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.4.tgz", + "integrity": "sha512-U9RQueICmmNk9c2zQjUN8qi/+H6kO2VKqeyuh3Vwj6yj4lQEINf1SNX8Ba9UFH/rxNo64iFM0k5x5vX0VajvCw==", "dependencies": { - "@angular-devkit/core": "15.0.3", + "@angular-devkit/core": "15.0.4", "rxjs": "6.6.7" }, "engines": { @@ -35,9 +35,9 @@ } }, "node_modules/@angular-devkit/core": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.3.tgz", - "integrity": "sha512-sJsC1uZnOs66uTEGS6E/FlMInERvChIC1oUwfgP4NMYFy4KLkzTDYZ+JAtK5/k418N+j0aS+DndfrRT3n7WNUw==", + "version": "15.0.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.4.tgz", + "integrity": "sha512-4ITpRAevd652SxB+qNesIQ9qfbm7wT5UBU5kJOPPwGL77I21g8CQpkmV1n5VSacPvC9Zbz90feOWexf7w7JzcA==", "dependencies": { "ajv": "8.11.0", "ajv-formats": "2.1.1", @@ -596,18 +596,18 @@ }, "dependencies": { "@angular-devkit/architect": { - "version": "0.1500.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.3.tgz", - "integrity": "sha512-LNVCyxMz5T9Fib7H3zT2sCE9fhvCUgJoCdT9nN/onDi6LoJx2uGdkVq3IgIsrxAR86pk2ZAR/1d5HdwohxbM8g==", + "version": "0.1500.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.4.tgz", + "integrity": "sha512-U9RQueICmmNk9c2zQjUN8qi/+H6kO2VKqeyuh3Vwj6yj4lQEINf1SNX8Ba9UFH/rxNo64iFM0k5x5vX0VajvCw==", "requires": { - "@angular-devkit/core": "15.0.3", + "@angular-devkit/core": "15.0.4", "rxjs": "6.6.7" } }, "@angular-devkit/core": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.3.tgz", - "integrity": "sha512-sJsC1uZnOs66uTEGS6E/FlMInERvChIC1oUwfgP4NMYFy4KLkzTDYZ+JAtK5/k418N+j0aS+DndfrRT3n7WNUw==", + "version": "15.0.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.4.tgz", + "integrity": "sha512-4ITpRAevd652SxB+qNesIQ9qfbm7wT5UBU5kJOPPwGL77I21g8CQpkmV1n5VSacPvC9Zbz90feOWexf7w7JzcA==", "requires": { "ajv": "8.11.0", "ajv-formats": "2.1.1", diff --git a/projects/thymesave/ingredients/generate-ingredient-report/package.json b/projects/thymesave/ingredients/generate-ingredient-report/package.json index 8406a473..62094a4f 100644 --- a/projects/thymesave/ingredients/generate-ingredient-report/package.json +++ b/projects/thymesave/ingredients/generate-ingredient-report/package.json @@ -20,6 +20,6 @@ "typescript": "4.8.4" }, "dependencies": { - "@angular-devkit/architect": "0.1500.3" + "@angular-devkit/architect": "0.1500.4" } } diff --git a/projects/thymesave/translations/generate-translations-report/package-lock.json b/projects/thymesave/translations/generate-translations-report/package-lock.json index 81d716d1..133ebf65 100644 --- a/projects/thymesave/translations/generate-translations-report/package-lock.json +++ b/projects/thymesave/translations/generate-translations-report/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@angular-devkit/architect": "0.1500.3" + "@angular-devkit/architect": "0.1500.4" }, "devDependencies": { "@types/jasmine": "4.3.1", @@ -32,11 +32,11 @@ } }, "node_modules/@angular-devkit/architect": { - "version": "0.1500.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.3.tgz", - "integrity": "sha512-LNVCyxMz5T9Fib7H3zT2sCE9fhvCUgJoCdT9nN/onDi6LoJx2uGdkVq3IgIsrxAR86pk2ZAR/1d5HdwohxbM8g==", + "version": "0.1500.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.4.tgz", + "integrity": "sha512-U9RQueICmmNk9c2zQjUN8qi/+H6kO2VKqeyuh3Vwj6yj4lQEINf1SNX8Ba9UFH/rxNo64iFM0k5x5vX0VajvCw==", "dependencies": { - "@angular-devkit/core": "15.0.3", + "@angular-devkit/core": "15.0.4", "rxjs": "6.6.7" }, "engines": { @@ -46,9 +46,9 @@ } }, "node_modules/@angular-devkit/core": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.3.tgz", - "integrity": "sha512-sJsC1uZnOs66uTEGS6E/FlMInERvChIC1oUwfgP4NMYFy4KLkzTDYZ+JAtK5/k418N+j0aS+DndfrRT3n7WNUw==", + "version": "15.0.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.4.tgz", + "integrity": "sha512-4ITpRAevd652SxB+qNesIQ9qfbm7wT5UBU5kJOPPwGL77I21g8CQpkmV1n5VSacPvC9Zbz90feOWexf7w7JzcA==", "dependencies": { "ajv": "8.11.0", "ajv-formats": "2.1.1", @@ -607,18 +607,18 @@ }, "dependencies": { "@angular-devkit/architect": { - "version": "0.1500.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.3.tgz", - "integrity": "sha512-LNVCyxMz5T9Fib7H3zT2sCE9fhvCUgJoCdT9nN/onDi6LoJx2uGdkVq3IgIsrxAR86pk2ZAR/1d5HdwohxbM8g==", + "version": "0.1500.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.4.tgz", + "integrity": "sha512-U9RQueICmmNk9c2zQjUN8qi/+H6kO2VKqeyuh3Vwj6yj4lQEINf1SNX8Ba9UFH/rxNo64iFM0k5x5vX0VajvCw==", "requires": { - "@angular-devkit/core": "15.0.3", + "@angular-devkit/core": "15.0.4", "rxjs": "6.6.7" } }, "@angular-devkit/core": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.3.tgz", - "integrity": "sha512-sJsC1uZnOs66uTEGS6E/FlMInERvChIC1oUwfgP4NMYFy4KLkzTDYZ+JAtK5/k418N+j0aS+DndfrRT3n7WNUw==", + "version": "15.0.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.4.tgz", + "integrity": "sha512-4ITpRAevd652SxB+qNesIQ9qfbm7wT5UBU5kJOPPwGL77I21g8CQpkmV1n5VSacPvC9Zbz90feOWexf7w7JzcA==", "requires": { "ajv": "8.11.0", "ajv-formats": "2.1.1", diff --git a/projects/thymesave/translations/generate-translations-report/package.json b/projects/thymesave/translations/generate-translations-report/package.json index 8406a473..62094a4f 100644 --- a/projects/thymesave/translations/generate-translations-report/package.json +++ b/projects/thymesave/translations/generate-translations-report/package.json @@ -20,6 +20,6 @@ "typescript": "4.8.4" }, "dependencies": { - "@angular-devkit/architect": "0.1500.3" + "@angular-devkit/architect": "0.1500.4" } } diff --git a/projects/thymesave/translations/src/lib/load.spec.ts b/projects/thymesave/translations/src/lib/load.spec.ts index 3a6a0b3a..2f5dac42 100644 --- a/projects/thymesave/translations/src/lib/load.spec.ts +++ b/projects/thymesave/translations/src/lib/load.spec.ts @@ -59,15 +59,6 @@ describe("loadUnitByKey", () => { }); }); - it("should return the translation key in each property of the returned object in case of an non existing unit", () => { - const unitDetails = loadUnitByKey(Languages.en_US, "foo.bar", 1); - expect(unitDetails).not.toBeNull(); - expect(unitDetails).toEqual({ - long: "foo.bar", - short: "foo.bar", - }); - }); - it("should return the correct plural long term", () => { const unitDetails = loadUnitByKey(Languages.en_US, "cup", 2); expect(unitDetails).not.toBeNull(); diff --git a/projects/thymesave/translations/src/lib/load.ts b/projects/thymesave/translations/src/lib/load.ts index dda5c0c5..6208122d 100644 --- a/projects/thymesave/translations/src/lib/load.ts +++ b/projects/thymesave/translations/src/lib/load.ts @@ -1,16 +1,18 @@ +import { UnitIdentifier } from "@thymesave/core"; + import { en_US } from "./languages"; import { Language, ResolvedUnitTranslation, UnitTranslationDetail } from "./model"; import { pluralize } from "./util"; const DEFAULT_LANGUAGE = en_US; -const loadTranslationByKey = (language: Language, languageProperty: keyof Language, translationKey: string): string | string[] | UnitTranslationDetail => { +const loadTranslationByKey = (language: Language, languageProperty: keyof Language, translationKey: UnitIdentifier | string): string | string[] | UnitTranslationDetail => { const languagePropertyValue = language[languageProperty]; if (translationKey in languagePropertyValue) { - return languagePropertyValue[translationKey]; + return languagePropertyValue[translationKey as UnitIdentifier]; } - return DEFAULT_LANGUAGE[languageProperty][translationKey] ?? translationKey; + return DEFAULT_LANGUAGE[languageProperty][translationKey as UnitIdentifier] ?? translationKey; }; /** @@ -45,7 +47,7 @@ export const loadUITextByKey = (language: Language, translationKey: string): str * @param translationKey Key of the translation * @returns Ingredient category text for translation key */ -export const loadIngredientCategoryByKey = (language : Language, translationKey : string) : string => loadTranslationByKey(language, "ingredientCategory", translationKey) as string; +export const loadIngredientCategoryByKey = (language : Language, translationKey : UnitIdentifier) : string => loadTranslationByKey(language, "ingredientCategory", translationKey) as string; /** * @@ -54,7 +56,7 @@ export const loadIngredientCategoryByKey = (language : Language, translationKey * @param amount Amount of mass to get the translation for * @returns Unit text for translation key */ -export const loadUnitByKey = (language: Language, translationKey: string, amount: number = 1): ResolvedUnitTranslation => { +export const loadUnitByKey = (language: Language, translationKey: UnitIdentifier, amount: number = 1): ResolvedUnitTranslation => { const translation = loadTranslationByKey(language, "units", translationKey); // not found -> translation key diff --git a/projects/thymesave/translations/src/lib/matching.ts b/projects/thymesave/translations/src/lib/matching.ts index 83b7bb06..2542d637 100644 --- a/projects/thymesave/translations/src/lib/matching.ts +++ b/projects/thymesave/translations/src/lib/matching.ts @@ -1,3 +1,4 @@ +import { UnitIdentifier } from "@thymesave/core"; import stringSimilarity from "string-similarity"; import { Language, PluralizableTranslation } from "./model"; @@ -113,7 +114,7 @@ export const matchUnitByText = (language: Language, text: string, options: Match const variants: MatchSourceVariants = {}; for (let i = 0; i < keyLength; i++) { - const key = keys[i]; + const key = keys[i] as UnitIdentifier; const unit = language.units[key]; variants[key] = [ diff --git a/projects/thymesave/translations/src/lib/model.ts b/projects/thymesave/translations/src/lib/model.ts index 664a28bf..06a358ac 100644 --- a/projects/thymesave/translations/src/lib/model.ts +++ b/projects/thymesave/translations/src/lib/model.ts @@ -1,3 +1,4 @@ +import { UnitIdentifier } from "@thymesave/core"; /** * Key value map for translations @@ -21,7 +22,12 @@ export interface UnitTranslationDetail { /** * Key value map for unit translations */ -export type UnitTranslation = { [key: string]: UnitTranslationDetail } +/** + * Key value map for unit translations + */ +export type UnitTranslation = { + [key in UnitIdentifier]: UnitTranslationDetail; +}; /** * Represents a localized and resolved translation @@ -30,11 +36,11 @@ export interface ResolvedUnitTranslation { /** * Short unit; in most cases this is the symbol */ - short : string + short: string /** * Long text, specific to the specified amount at resolution time */ - long : string + long: string } /** @@ -43,6 +49,6 @@ export interface ResolvedUnitTranslation { export interface Language { ui: SingleValueTranslation, ingredients: PluralizableTranslation, - ingredientCategory : SingleValueTranslation, + ingredientCategory: SingleValueTranslation, units: UnitTranslation, } diff --git a/projects/thymesave/translations/src/resources/de_DE/units.ts b/projects/thymesave/translations/src/resources/de_DE/units.ts index 737697b2..27c6b3c5 100644 --- a/projects/thymesave/translations/src/resources/de_DE/units.ts +++ b/projects/thymesave/translations/src/resources/de_DE/units.ts @@ -1,12 +1,9 @@ import { UnitTranslation } from "../../lib/model"; const units: UnitTranslation = { - clove: { - long: [ - "clove", - "cloves", - ], - short: "clove", + "": { + long: [""], + short: "", }, cup: { long: [ @@ -86,6 +83,12 @@ const units: UnitTranslation = { ], short: "Pfund", }, + tbsp: { + long: [ + "Esslöffel", + ], + short: "EL", + }, tsp: { long: [ "Teelöffel", diff --git a/projects/thymesave/translations/src/resources/en_US/units.ts b/projects/thymesave/translations/src/resources/en_US/units.ts index 9baa3c87..23268d12 100644 --- a/projects/thymesave/translations/src/resources/en_US/units.ts +++ b/projects/thymesave/translations/src/resources/en_US/units.ts @@ -1,12 +1,9 @@ import { UnitTranslation } from "../../lib/model"; const units: UnitTranslation = { - clove: { - long: [ - "clove", - "cloves", - ], - short: "clove", + "": { + long: [""], + short: "", }, cup: { long: [ @@ -85,6 +82,13 @@ const units: UnitTranslation = { ], short: "lb", }, + tbsp: { + long: [ + "tablespoon", + "tablespoons", + ], + short: "tbsp", + }, tsp: { long: [ "tablespoon", diff --git a/renovate.json b/renovate.json index 7b19d53a..42473f2d 100644 --- a/renovate.json +++ b/renovate.json @@ -34,7 +34,8 @@ "^node", "^ts-node", "^@types/node" - ] + ], + "allowedVersions": "<19" }, { "groupName": "karma", diff --git a/scripts/translation-report/run b/scripts/translation-report/run index 53b9addb..9a1010dc 100755 --- a/scripts/translation-report/run +++ b/scripts/translation-report/run @@ -1,18 +1,29 @@ #!/bin/bash +cd "$(dirname "${BASH_SOURCE[0]}")" +cd ../.. +root="${PWD}/" set -ex -root="${PWD}" +echo "[META] Using root folder ${root}" echo "[BUILD] Build generate-translations architect ..." -cd projects/thymesave/translations/generate-translations-report -npm link ../../../../dist/thymesave/core +# Link core to translations +cd "${root}projects/thymesave/translations/" +npm link ${root}dist/thymesave/core +# Link core to translations report generator +cd "${root}projects/thymesave/translations/generate-translations-report" +npm link ${root}dist/thymesave/core +# Compile script tsc echo "[BUILD] Build generate-ingredient architect ..." -cd "${root}/projects/thymesave/ingredients/" -npm link ../../../dist/thymesave/core +# Link core to ingredients +cd "${root}projects/thymesave/ingredients/" +npm link ${root}dist/thymesave/core +# Link core to ingredient report generator cd generate-ingredient-report -npm link ../../../../dist/thymesave/core +npm link ${root}dist/thymesave/core +# Compile script tsc echo "[BUILD] Compile report script ..." diff --git a/src/app/inventory/services/inventory-change.service.ts b/src/app/inventory/services/inventory-change.service.ts new file mode 100644 index 00000000..95151486 --- /dev/null +++ b/src/app/inventory/services/inventory-change.service.ts @@ -0,0 +1,27 @@ +import { Injectable } from '@angular/core'; +import { InventoryChange } from "@thymesave/core"; + +import { BaseDocument } from "@/models/BaseDocument"; +import { EntityService } from "@/shared/storage/base"; +import { StorageService } from "@/shared/storage/storage.service"; + +export interface InventoryChangeEntity extends InventoryChange, BaseDocument { + +} + +@Injectable({ + providedIn: 'root', +}) +export class InventoryChangeService extends EntityService { + public get entityType(): string { + return "inventory-change"; + } + + public constructor(storageService: StorageService) { + super(storageService); + } + + public queryInventory() { + return this.storageService.query("inventory"); + } +} diff --git a/src/app/recipes/pages/overview/overview.component.ts b/src/app/recipes/pages/overview/overview.component.ts index cdfdca05..9101958c 100644 --- a/src/app/recipes/pages/overview/overview.component.ts +++ b/src/app/recipes/pages/overview/overview.component.ts @@ -5,6 +5,7 @@ import { createLogger } from "@helper/log"; import { Recipe } from "@thymesave/core"; import { filter, first, map } from "rxjs"; +import { InventoryChangeService } from "@/inventory/services/inventory-change.service"; import { Search } from "@/recipes/overview/search-bar/search-bar.component"; import { RecipeEntity, RecipeService } from "@/recipes/services/recipe.service"; import { Pagination, PaginationWithResult } from "@/shared/storage/storage.service"; @@ -24,9 +25,12 @@ export class OverviewComponent implements OnInit { public search: Search | null = null; public constructor(public recipeService: RecipeService, + public inventoryChangeService : InventoryChangeService, private router: Router, private route: ActivatedRoute, private readonly viewport: ViewportScroller) { + inventoryChangeService.queryInventory() + .subscribe(res => console.log(res)); route.queryParamMap .pipe( first(), diff --git a/src/app/shared/i18n/language.service.ts b/src/app/shared/i18n/language.service.ts index f2f5c8dc..90d9e018 100644 --- a/src/app/shared/i18n/language.service.ts +++ b/src/app/shared/i18n/language.service.ts @@ -1,4 +1,5 @@ import { Injectable } from '@angular/core'; +import { UnitIdentifier } from "@thymesave/core"; import { Language, Languages, @@ -92,10 +93,10 @@ export class LanguageService { return loadIngredientByKey(lang, value, amountToUse); case "ingredientCategory": - return loadIngredientCategoryByKey(lang, value); + return loadIngredientCategoryByKey(lang, value as UnitIdentifier); case "units": - return loadUnitByKey(lang, value, amountToUse).short; + return loadUnitByKey(lang, value as UnitIdentifier, amountToUse).short; case "ui": default: diff --git a/src/app/shared/storage/storage.service.ts b/src/app/shared/storage/storage.service.ts index 267a94d6..b48dafd3 100644 --- a/src/app/shared/storage/storage.service.ts +++ b/src/app/shared/storage/storage.service.ts @@ -23,6 +23,7 @@ import { import { BaseDocument } from '@/models/BaseDocument'; import indices from "@/shared/storage/indices"; +import views, { stringifyView, ViewSpecification } from "@/shared/storage/views"; import { environment } from '@/../environments/environment'; @@ -83,7 +84,7 @@ export class StorageService { this.dbSubject.next(dbValue); return dbValue; }), - switchMap(db => from(this.createIndices(db!!))), + switchMap(db => from(Promise.all([this.createIndices(db!!), this.createViews(db!!)]))), ).subscribe(); } @@ -91,6 +92,7 @@ export class StorageService { if (!db) { return; } + try { this.logger.debug("Indices created", await Promise.all(indices.map(i => db.createIndex(i)))); } catch (e) { @@ -98,6 +100,60 @@ export class StorageService { } } + private async createViews(db: PouchDB.Database) { + if (!db) { + return; + } + + try { + this.logger.debug("Views created", await Promise.all(views.map(view => this.createView(db, view)))); + } catch (e) { + this.logger.warn("View creation failed", e); + } + } + + private buildViewDocumentName(viewName: string): string { + return `view_${viewName}`; + } + + private async createView(db: PouchDB.Database, view: ViewSpecification) { + const finalViewDoc: { [key: string]: string } = { + map: stringifyView(view.map), + }; + + if (view.reduce) { + finalViewDoc['reduce'] = stringifyView(view.reduce); + } + + const finalDesignDoc = { + views: { + [this.buildViewDocumentName(view.name)]: finalViewDoc, + }, + }; + + return await db.upsert(`_design/${this.buildViewDocumentName(view.name)}`, (designDoc: { [key: string]: any }) => { + const viewDoc = (designDoc['views'] || {})[this.buildViewDocumentName(view.name)]; + + // if no view exists, nothing to update, always create new one + if (!viewDoc) { + return finalDesignDoc; + } + + // in case there is a reduce, for the view, update if has changed + if ('reduce' in finalViewDoc && finalViewDoc['reduce'] != viewDoc['reduce']) { + return finalDesignDoc; + } + + // map is always there for a view, update if has changed + if (finalViewDoc['map'] != viewDoc['map']) { + return finalDesignDoc; + } + + // no changes, no update + return false; + }); + } + private async find(db: PouchDB.Database, filter: PouchDB.Find.FindRequest): Promise { const results = await db.find(filter); return results.docs as unknown as T[]; @@ -240,7 +296,16 @@ export class StorageService { }, sort, }, - )) as any), + ) as any)), + ) as Observable; + } + + public query(viewName: string): Observable { + return this.db$ + .pipe( + mergeMap(db => from(db!!.query(this.buildViewDocumentName(viewName), { + group: true, + }) as any)), ) as Observable; } diff --git a/src/app/shared/storage/views.ts b/src/app/shared/storage/views.ts new file mode 100644 index 00000000..c35f7c27 --- /dev/null +++ b/src/app/shared/storage/views.ts @@ -0,0 +1,85 @@ +import { InventoryChangeEntity } from "@/inventory/services/inventory-change.service"; +import { BaseDocument } from "@/models/BaseDocument"; +import { ShoppingListItemEntity } from "@/shopping-lists/services/shopping-list-item.service"; + +/** + * Emit function built in by CouchDB + * Check for more details here: https://docs.couchdb.org/en/3.2.2-docs/query-server/javascript.html#emit + * @param key The view key + * @param value The value keys associated value + */ +function emit(key: unknown, value: unknown): [typeof key, typeof value] { + // method stub for couchdb functionality + return [key, value]; +} + +/** + * Sum function built in by CouchDB + * Check for more details here: https://docs.couchdb.org/en/3.2.2-docs/query-server/javascript.html#sum + * @param values + */ +function sum(values: unknown[]): number { + // method stub for couchdb functionality + return -1; +} + +/** + * Map creates new view value for given document + */ +export type MapFunction = (() => void) | ((document: BaseDocument) => void) + +/** + * Reduce further aggregates data as created by map + */ +export type ReduceFunction = (keys: string[], values: unknown[], reReduce: boolean) => unknown + +/** + * Specification for views to be created in CouchDB, this will be transformed to the underlying the design document structure + */ +export interface ViewSpecification { + /** + * Name for the view, will also be used for the design document and must be unique application wide + */ + name: string + /** + * Map Function to group data + */ + map: MapFunction + /** + * Reduce function to aggregate grouped data + */ + reduce?: ReduceFunction +} + +/** + * Create string representation for couchdb view function + * + * It will remove the function name and append function in front of the stringified method making it usable for CouchDB + * @param func CouchDB function + */ +export function stringifyView(func: MapFunction | ReduceFunction) { + return `function ${func.toString().replace(func.name, "")}`; +} + +export default [ + { + map(doc: InventoryChangeEntity | ShoppingListItemEntity) { + // @ts-ignore we can be sure which type the item is based on $entityType + if ((doc.$entityType != "shopping-list-item" && doc.done) && doc.$entityType != "inventory-change") { + return; + } + + // @ts-ignore check if has valid amount and ingredientKey to avoid crash due to malformed data + if (isNaN(doc.amount) || !doc.ingredientKey) { + return; + } + + // @ts-ignore Emit with the correct fields, we can be sure all are set based on pre-checks + emit([doc.ingredientKey, doc.unit], parseFloat(doc.amount)); + }, + name: "inventory", + reduce(keys: string[], values: number[], reReduce: boolean) { + return sum(values); + }, + }, +] as ViewSpecification[]; diff --git a/src/app/shopping-lists/common/shopping-list-detail/shopping-list-detail.component.scss b/src/app/shopping-lists/common/shopping-list-detail/shopping-list-detail.component.scss index 93853fc7..a8add764 100644 --- a/src/app/shopping-lists/common/shopping-list-detail/shopping-list-detail.component.scss +++ b/src/app/shopping-lists/common/shopping-list-detail/shopping-list-detail.component.scss @@ -8,7 +8,7 @@ $heading-size: 3rem; font-size: $heading-size !important; width: $heading-size; height: $heading-size; - padding: $heading-size / 6; + padding: calc($heading-size / 6); } .heading { diff --git a/src/app/shopping-lists/services/shopping-list-item.service.ts b/src/app/shopping-lists/services/shopping-list-item.service.ts index b52d76fe..b9cb63c9 100644 --- a/src/app/shopping-lists/services/shopping-list-item.service.ts +++ b/src/app/shopping-lists/services/shopping-list-item.service.ts @@ -7,6 +7,7 @@ import { switchMap, } from "rxjs"; +import { InventoryChangeService } from "@/inventory/services/inventory-change.service"; import { BaseDocument } from "@/models/BaseDocument"; import { EntityService } from "@/shared/storage/base"; import { StorageService } from "@/shared/storage/storage.service"; @@ -36,7 +37,9 @@ export interface GroupedShoppingListItems { providedIn: 'root', }) export class ShoppingListItemService extends EntityService { - public constructor(storageService: StorageService, private readonly shoppingListFilterService: ShoppingListFilterService) { + public constructor(storageService: StorageService, + private readonly inventoryChangeService: InventoryChangeService, + private readonly shoppingListFilterService: ShoppingListFilterService) { super(storageService); } @@ -80,7 +83,7 @@ export class ShoppingListItemService extends EntityService item.source) .slice(0, 3), source => source.source), - sum: sum( items + sum: sum(items .map(item => item.amount)), unit: unit, } as GroupedShoppingListItems;