From 0778717c4c8893ed3bf6037eef87d6700ff7d0ad Mon Sep 17 00:00:00 2001 From: Shawn Jackson Date: Wed, 29 May 2024 18:16:01 -0700 Subject: [PATCH] CU-8688mq6hw updated rglib --- package-lock.json | 223 ++++++++++++++++-- package.json | 2 +- src/app/app.module.ts | 7 +- .../features/calls/effects/calls.effect.ts | 1 - .../statuses/effects/statuses.effect.ts | 1 - .../features/voice/effects/voice.effect.ts | 1 - src/app/providers/moduleStorage.ts | 31 +++ src/main.ts | 4 +- 8 files changed, 246 insertions(+), 24 deletions(-) create mode 100644 src/app/providers/moduleStorage.ts diff --git a/package-lock.json b/package-lock.json index 278ace2..b91af36 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,7 +50,7 @@ "@ngrx/store-devtools": "14.3.3", "@ngx-translate/core": "14.0.0", "@ngx-translate/http-loader": "6.0.0", - "@resgrid/ngx-resgridlib": "^1.3.29", + "@resgrid/ngx-resgridlib": "^1.3.33", "@sentry/angular": "^7.75.1", "@sentry/tracing": "^7.75.1", "@turf/turf": "6.5.0", @@ -2963,6 +2963,11 @@ "node": ">=6.9.0" } }, + "node_modules/@bufbuild/protobuf": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.9.0.tgz", + "integrity": "sha512-W7gp8Q/v1NlCZLsv8pQ3Y0uCu/SHgXOVFK+eUluUKWXmsb6VHkpNx0apdOWWcDbB9sJoKeP8uPrjmehJz6xETQ==" + }, "node_modules/@capacitor-community/background-geolocation": { "version": "1.2.15", "resolved": "https://registry.npmjs.org/@capacitor-community/background-geolocation/-/background-geolocation-1.2.15.tgz", @@ -4425,6 +4430,14 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", "dev": true }, + "node_modules/@livekit/protocol": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/@livekit/protocol/-/protocol-1.16.0.tgz", + "integrity": "sha512-xZZTZVh2FmWmUgNS3n+oGNbA4GcS4XOwhg8CWy75jenYxbgQ89ds7ixfMQ+F+oxktcXfJ1qsph086oRTlg8e5Q==", + "dependencies": { + "@bufbuild/protobuf": "^1.7.2" + } + }, "node_modules/@mapbox/geojson-rewind": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/@mapbox/geojson-rewind/-/geojson-rewind-0.5.2.tgz", @@ -4826,27 +4839,49 @@ } }, "node_modules/@resgrid/ngx-resgridlib": { - "version": "1.3.29", - "resolved": "https://registry.npmjs.org/@resgrid/ngx-resgridlib/-/ngx-resgridlib-1.3.29.tgz", - "integrity": "sha512-r6tXSjbbksZkmn07EI3qiDnnGvOp7fJGLgjIvldAsMNCnaHHhOHa5aJrFhsgyzodaXaKmoG+of3fL1Fiem9SRg==", + "version": "1.3.33", + "resolved": "https://registry.npmjs.org/@resgrid/ngx-resgridlib/-/ngx-resgridlib-1.3.33.tgz", + "integrity": "sha512-ife5jVTG72vBBaGhKmajsP+ZI0a0BnUTF7mNjqaKftHZZ/lYeYgh9R0SB5TB1nEQEiz/zYGulZN+4fDOS6ywzg==", "dependencies": { - "@microsoft/signalr": "^5.0.9", + "@microsoft/signalr": "^5.0.0 || ^6.0.0 || ^7.0.0", + "angular-svg-icon": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0", "jwt-decode": "^3.1.2", "leaflet": "^1.7.1", + "livekit-client": "^2.0.2", "lodash": "^4.17.21", "tslib": "^2.0.0" }, "peerDependencies": { - "@angular/common": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0", - "@angular/core": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0", - "@angular/platform-browser": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0", - "@angular/platform-browser-dynamic": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0", + "@angular/common": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0", + "@angular/core": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0", + "@angular/platform-browser": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0", + "@angular/platform-browser-dynamic": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0", "@microsoft/signalr": "^5.0.0 || ^6.0.0 || ^7.0.0", + "angular-svg-icon": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0", "jwt-decode": "^3.1.2", + "livekit-client": "^2.0.2", "lodash": "^4.17.21", "rxjs": "^6.5.3 || ^7.4.0" } }, + "node_modules/@resgrid/ngx-resgridlib/node_modules/angular-svg-icon": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/angular-svg-icon/-/angular-svg-icon-17.0.0.tgz", + "integrity": "sha512-cTHz79nzVcfUSBPwclFRwvAsWYbo3rRTse45lnzmHdCV0GjTLUNE3C1yQwBAnHqlH4eN0sl+mbVpZh8YeJxYug==", + "dependencies": { + "tslib": "^2.3.1" + }, + "peerDependencies": { + "@angular/common": ">=17.0.0", + "@angular/core": ">=17.0.0", + "rxjs": ">=6.6.3" + } + }, + "node_modules/@resgrid/ngx-resgridlib/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/@scarf/scarf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@scarf/scarf/-/scarf-1.3.0.tgz", @@ -11545,7 +11580,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, "engines": { "node": ">=0.8.x" } @@ -14748,6 +14782,26 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "node_modules/livekit-client": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/livekit-client/-/livekit-client-2.1.5.tgz", + "integrity": "sha512-8sc1ltfKRjy51Q/V/SaDpjptXBamm9LXhixKBYdXdQFZdew4hgqTGYlHIyee/IM9QSqAXk1W+uCtVfkmxPD1EA==", + "dependencies": { + "@livekit/protocol": "1.16.0", + "events": "^3.3.0", + "loglevel": "^1.8.0", + "sdp-transform": "^2.14.1", + "ts-debounce": "^4.0.0", + "tslib": "2.6.2", + "typed-emitter": "^2.1.0", + "webrtc-adapter": "^8.1.1" + } + }, + "node_modules/livekit-client/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/load-json-file": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", @@ -14946,6 +15000,18 @@ "node": ">=8.0" } }, + "node_modules/loglevel": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz", + "integrity": "sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==", + "engines": { + "node": ">= 0.6.0" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/loglevel" + } + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -18992,6 +19058,19 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "node_modules/sdp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/sdp/-/sdp-3.2.0.tgz", + "integrity": "sha512-d7wDPgDV3DDiqulJjKiV2865wKsJ34YI+NDREbm+FySq6WuKOikwyNQcm+doLAZ1O6ltdO0SeKle2xMpN3Brgw==" + }, + "node_modules/sdp-transform": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/sdp-transform/-/sdp-transform-2.14.2.tgz", + "integrity": "sha512-icY6jVao7MfKCieyo1AyxFYm1baiM+fA00qW/KrNNVlkxHAd34riEKuEkUe4bBb3gJwLJZM+xT60Yj1QL8rHiA==", + "bin": { + "sdp-verify": "checker.js" + } + }, "node_modules/select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -20538,6 +20617,11 @@ "tree-kill": "cli.js" } }, + "node_modules/ts-debounce": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ts-debounce/-/ts-debounce-4.0.0.tgz", + "integrity": "sha512-+1iDGY6NmOGidq7i7xZGA4cm8DAa6fqdYcvO5Z6yBevH++Bdo9Qt/mN0TzHUgcCcKv1gmh9+W5dHqz8pMWbCbg==" + }, "node_modules/ts-node": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz", @@ -20746,6 +20830,14 @@ "integrity": "sha512-KNNZtayBCtmnNmbo5mG47p1XsCyrx6iVqomjcZnec/1Y5GGARaxPs6r49RnSPeUP3YjNYiU9sQHAtY4BBvnZwg==", "dev": true }, + "node_modules/typed-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/typed-emitter/-/typed-emitter-2.1.0.tgz", + "integrity": "sha512-g/KzbYKbH5C2vPkaXGu8DJlHrGKHLsM25Zg9WuC9pMGfuvT+X25tZQWo5fK1BjBm8+UrVE9LDCvaY0CQk+fXDA==", + "optionalDependencies": { + "rxjs": "*" + } + }, "node_modules/typescript": { "version": "4.8.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", @@ -21712,6 +21804,18 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/webrtc-adapter": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-8.2.3.tgz", + "integrity": "sha512-gnmRz++suzmvxtp3ehQts6s2JtAGPuDPjA1F3a9ckNpG1kYdYuHWYpazoAnL9FS5/B21tKlhkorbdCXat0+4xQ==", + "dependencies": { + "sdp": "^3.2.0" + }, + "engines": { + "node": ">=6.0.0", + "npm": ">=3.10.0" + } + }, "node_modules/websocket-driver": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", @@ -24100,6 +24204,11 @@ "to-fast-properties": "^2.0.0" } }, + "@bufbuild/protobuf": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.9.0.tgz", + "integrity": "sha512-W7gp8Q/v1NlCZLsv8pQ3Y0uCu/SHgXOVFK+eUluUKWXmsb6VHkpNx0apdOWWcDbB9sJoKeP8uPrjmehJz6xETQ==" + }, "@capacitor-community/background-geolocation": { "version": "1.2.15", "resolved": "https://registry.npmjs.org/@capacitor-community/background-geolocation/-/background-geolocation-1.2.15.tgz", @@ -25151,6 +25260,14 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", "dev": true }, + "@livekit/protocol": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/@livekit/protocol/-/protocol-1.16.0.tgz", + "integrity": "sha512-xZZTZVh2FmWmUgNS3n+oGNbA4GcS4XOwhg8CWy75jenYxbgQ89ds7ixfMQ+F+oxktcXfJ1qsph086oRTlg8e5Q==", + "requires": { + "@bufbuild/protobuf": "^1.7.2" + } + }, "@mapbox/geojson-rewind": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/@mapbox/geojson-rewind/-/geojson-rewind-0.5.2.tgz", @@ -25458,15 +25575,32 @@ "optional": true }, "@resgrid/ngx-resgridlib": { - "version": "1.3.29", - "resolved": "https://registry.npmjs.org/@resgrid/ngx-resgridlib/-/ngx-resgridlib-1.3.29.tgz", - "integrity": "sha512-r6tXSjbbksZkmn07EI3qiDnnGvOp7fJGLgjIvldAsMNCnaHHhOHa5aJrFhsgyzodaXaKmoG+of3fL1Fiem9SRg==", + "version": "1.3.33", + "resolved": "https://registry.npmjs.org/@resgrid/ngx-resgridlib/-/ngx-resgridlib-1.3.33.tgz", + "integrity": "sha512-ife5jVTG72vBBaGhKmajsP+ZI0a0BnUTF7mNjqaKftHZZ/lYeYgh9R0SB5TB1nEQEiz/zYGulZN+4fDOS6ywzg==", "requires": { - "@microsoft/signalr": "^5.0.9", + "@microsoft/signalr": "^5.0.0 || ^6.0.0 || ^7.0.0", + "angular-svg-icon": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0", "jwt-decode": "^3.1.2", "leaflet": "^1.7.1", + "livekit-client": "^2.0.2", "lodash": "^4.17.21", "tslib": "^2.0.0" + }, + "dependencies": { + "angular-svg-icon": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/angular-svg-icon/-/angular-svg-icon-17.0.0.tgz", + "integrity": "sha512-cTHz79nzVcfUSBPwclFRwvAsWYbo3rRTse45lnzmHdCV0GjTLUNE3C1yQwBAnHqlH4eN0sl+mbVpZh8YeJxYug==", + "requires": { + "tslib": "^2.3.1" + } + }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + } } }, "@scarf/scarf": { @@ -30531,8 +30665,7 @@ "events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" }, "eventsource": { "version": "1.1.2", @@ -32982,6 +33115,28 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "livekit-client": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/livekit-client/-/livekit-client-2.1.5.tgz", + "integrity": "sha512-8sc1ltfKRjy51Q/V/SaDpjptXBamm9LXhixKBYdXdQFZdew4hgqTGYlHIyee/IM9QSqAXk1W+uCtVfkmxPD1EA==", + "requires": { + "@livekit/protocol": "1.16.0", + "events": "^3.3.0", + "loglevel": "^1.8.0", + "sdp-transform": "^2.14.1", + "ts-debounce": "^4.0.0", + "tslib": "2.6.2", + "typed-emitter": "^2.1.0", + "webrtc-adapter": "^8.1.1" + }, + "dependencies": { + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + } + } + }, "load-json-file": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", @@ -33141,6 +33296,11 @@ "streamroller": "^3.1.5" } }, + "loglevel": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz", + "integrity": "sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==" + }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -36095,6 +36255,16 @@ } } }, + "sdp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/sdp/-/sdp-3.2.0.tgz", + "integrity": "sha512-d7wDPgDV3DDiqulJjKiV2865wKsJ34YI+NDREbm+FySq6WuKOikwyNQcm+doLAZ1O6ltdO0SeKle2xMpN3Brgw==" + }, + "sdp-transform": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/sdp-transform/-/sdp-transform-2.14.2.tgz", + "integrity": "sha512-icY6jVao7MfKCieyo1AyxFYm1baiM+fA00qW/KrNNVlkxHAd34riEKuEkUe4bBb3gJwLJZM+xT60Yj1QL8rHiA==" + }, "select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -37296,6 +37466,11 @@ "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true }, + "ts-debounce": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ts-debounce/-/ts-debounce-4.0.0.tgz", + "integrity": "sha512-+1iDGY6NmOGidq7i7xZGA4cm8DAa6fqdYcvO5Z6yBevH++Bdo9Qt/mN0TzHUgcCcKv1gmh9+W5dHqz8pMWbCbg==" + }, "ts-node": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz", @@ -37457,6 +37632,14 @@ "integrity": "sha512-KNNZtayBCtmnNmbo5mG47p1XsCyrx6iVqomjcZnec/1Y5GGARaxPs6r49RnSPeUP3YjNYiU9sQHAtY4BBvnZwg==", "dev": true }, + "typed-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/typed-emitter/-/typed-emitter-2.1.0.tgz", + "integrity": "sha512-g/KzbYKbH5C2vPkaXGu8DJlHrGKHLsM25Zg9WuC9pMGfuvT+X25tZQWo5fK1BjBm8+UrVE9LDCvaY0CQk+fXDA==", + "requires": { + "rxjs": "*" + } + }, "typescript": { "version": "4.8.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", @@ -38136,6 +38319,14 @@ "typed-assert": "^1.0.8" } }, + "webrtc-adapter": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-8.2.3.tgz", + "integrity": "sha512-gnmRz++suzmvxtp3ehQts6s2JtAGPuDPjA1F3a9ckNpG1kYdYuHWYpazoAnL9FS5/B21tKlhkorbdCXat0+4xQ==", + "requires": { + "sdp": "^3.2.0" + } + }, "websocket-driver": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", diff --git a/package.json b/package.json index 1807dfa..46a8345 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@ngrx/store-devtools": "14.3.3", "@ngx-translate/core": "14.0.0", "@ngx-translate/http-loader": "6.0.0", - "@resgrid/ngx-resgridlib": "^1.3.29", + "@resgrid/ngx-resgridlib": "^1.3.33", "@sentry/angular": "^7.75.1", "@sentry/tracing": "^7.75.1", "@turf/turf": "6.5.0", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 2116bbb..2765bb4 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -44,6 +44,7 @@ import { ScrollDirective } from './directives/scroll.directive'; import { ScrollingModule } from '@angular/cdk/scrolling'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { Preferences } from '@capacitor/preferences'; +import { ModuleStorageProvider } from './providers/moduleStorage'; export function createTranslateLoader(http: HttpClient): any { return new TranslateHttpLoader(http, './assets/i18n/', '.json'); @@ -56,7 +57,8 @@ const getBaseUrl = (): string => { const storedValue = localStorage.getItem('CapacitorStorage.serverAddress'); - if (storedValue) { + if (storedValue && storedValue.trim() !== '' && storedValue.trim() !== 'undefined' && storedValue.trim() !== 'null'){ + console.log('Using stored server address: ' + storedValue.trim()); return storedValue.trim(); } return environment.baseApiUrl; @@ -81,7 +83,8 @@ const getBaseUrl = (): string => { realtimeGeolocationHubName: environment.realtimeGeolocationHubName, logLevel: environment.logLevel, isMobileApp: true, - cacheProvider: new CacheProvider() + cacheProvider: new CacheProvider(), + storageProvider: new ModuleStorageProvider() }), StoreModule.forRoot(reducers, { metaReducers }), EffectsModule.forRoot([]), diff --git a/src/app/features/calls/effects/calls.effect.ts b/src/app/features/calls/effects/calls.effect.ts index fde5cfc..6d90d03 100644 --- a/src/app/features/calls/effects/calls.effect.ts +++ b/src/app/features/calls/effects/calls.effect.ts @@ -21,7 +21,6 @@ import { CallFilesService, CallNotesService, CallsService, - KazooVoiceService, MessagesService, SaveUnitStatusInput, UnitStatusService, diff --git a/src/app/features/statuses/effects/statuses.effect.ts b/src/app/features/statuses/effects/statuses.effect.ts index b052a4d..b84fe58 100644 --- a/src/app/features/statuses/effects/statuses.effect.ts +++ b/src/app/features/statuses/effects/statuses.effect.ts @@ -19,7 +19,6 @@ import { import { Injectable } from '@angular/core'; import { from, Observable, of } from 'rxjs'; import { - KazooVoiceService, PersonnelStaffingService, PersonnelStatusesService, SavePersonsStatusesInput, diff --git a/src/app/features/voice/effects/voice.effect.ts b/src/app/features/voice/effects/voice.effect.ts index 0985579..c80151b 100644 --- a/src/app/features/voice/effects/voice.effect.ts +++ b/src/app/features/voice/effects/voice.effect.ts @@ -12,7 +12,6 @@ import { Injectable } from '@angular/core'; import { from, Observable, of } from 'rxjs'; import { VoiceState } from '../store/voice.store'; import { - KazooVoiceService, VoiceService, } from '@resgrid/ngx-resgridlib'; import { HomeState } from '../../home/store/home.store'; diff --git a/src/app/providers/moduleStorage.ts b/src/app/providers/moduleStorage.ts new file mode 100644 index 0000000..755aa07 --- /dev/null +++ b/src/app/providers/moduleStorage.ts @@ -0,0 +1,31 @@ +import { Injectable } from '@angular/core'; +import { IStorageProvider, UtilsService } from '@resgrid/ngx-resgridlib'; +import { StartupData } from '../features/settings/models/startupData'; +import { LoginResult } from '../models/loginResult'; +import { Preferences } from '@capacitor/preferences'; + +@Injectable({ + providedIn: 'root', +}) +export class ModuleStorageProvider implements IStorageProvider { + public async read(key: string): Promise { + const { value } = await Preferences?.get({ key: key }); + + return value; + } + + public async write(key: string, value: string): Promise { + return await Preferences?.set({ + key: key, + value: value, + }); + } + + public async remove(key: string): Promise { + return await Preferences?.remove({key: key}); + } + + public async clear(): Promise { + return await Preferences?.clear(); + } +} diff --git a/src/main.ts b/src/main.ts index 3aaf5df..a7f8356 100644 --- a/src/main.ts +++ b/src/main.ts @@ -29,7 +29,7 @@ if (environment.loggingKey && environment.loggingKey !== 'LOGGINGKEY') { // which automatically instruments your application to monitor its // performance, including custom Angular routing instrumentation new Integrations.BrowserTracing({ - tracingOrigins: ['localhost', 'https://api.resgrid.com/api'], + tracingOrigins: ['localhost', 'https://api.resgrid.com/api', 'https://qaapi.resgrid.com/api'], routingInstrumentation: Sentry.routingInstrumentation, }), ], @@ -37,7 +37,7 @@ if (environment.loggingKey && environment.loggingKey !== 'LOGGINGKEY') { // Set tracesSampleRate to 1.0 to capture 100% // of transactions for performance monitoring. // We recommend adjusting this value in production - tracesSampleRate: 0.2, + tracesSampleRate: environment.production ? 0.4 : 1.0, }); }