diff --git a/.changeset/breezy-bugs-jam.md b/.changeset/breezy-bugs-jam.md new file mode 100644 index 000000000000..7e7cc7b8283b --- /dev/null +++ b/.changeset/breezy-bugs-jam.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +fix: Managers allowed to make deactivated agent's available diff --git a/.changeset/bump-patch-1694741499930.md b/.changeset/bump-patch-1694741499930.md new file mode 100644 index 000000000000..e1eaa7980afb --- /dev/null +++ b/.changeset/bump-patch-1694741499930.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Bump @rocket.chat/meteor version. diff --git a/.changeset/bump-patch-1694827499043.md b/.changeset/bump-patch-1694827499043.md new file mode 100644 index 000000000000..e1eaa7980afb --- /dev/null +++ b/.changeset/bump-patch-1694827499043.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Bump @rocket.chat/meteor version. diff --git a/.changeset/bump-patch-1695163548038.md b/.changeset/bump-patch-1695163548038.md new file mode 100644 index 000000000000..e1eaa7980afb --- /dev/null +++ b/.changeset/bump-patch-1695163548038.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Bump @rocket.chat/meteor version. diff --git a/.changeset/bump-patch-1695165575069.md b/.changeset/bump-patch-1695165575069.md new file mode 100644 index 000000000000..e1eaa7980afb --- /dev/null +++ b/.changeset/bump-patch-1695165575069.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Bump @rocket.chat/meteor version. diff --git a/.changeset/chilled-phones-give.md b/.changeset/chilled-phones-give.md new file mode 100644 index 000000000000..cb0887db0883 --- /dev/null +++ b/.changeset/chilled-phones-give.md @@ -0,0 +1,7 @@ +--- +"@rocket.chat/meteor": patch +"@rocket.chat/core-typings": patch +"@rocket.chat/rest-typings": patch +--- + +Fixed `overrideDestinationChannelEnabled` treated as a required param in `integrations.create` and `integration.update` endpoints diff --git a/.changeset/fair-cats-destroy.md b/.changeset/fair-cats-destroy.md new file mode 100644 index 000000000000..7dfb74955a94 --- /dev/null +++ b/.changeset/fair-cats-destroy.md @@ -0,0 +1,6 @@ +--- +"@rocket.chat/meteor": patch +"@rocket.chat/model-typings": patch +--- + +When setting a room as read-only, do not allow previously unmuted users to send messages. diff --git a/.changeset/fifty-cars-divide.md b/.changeset/fifty-cars-divide.md new file mode 100644 index 000000000000..6c09cf6869c8 --- /dev/null +++ b/.changeset/fifty-cars-divide.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Fixed issue with custom OAuth services' settings not being be fully removed diff --git a/.changeset/forty-hotels-pretend.md b/.changeset/forty-hotels-pretend.md new file mode 100644 index 000000000000..b23825d5a02a --- /dev/null +++ b/.changeset/forty-hotels-pretend.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +fix: Prevent `RoomProvider.useEffect` from subscribing to room-data stream multiple times diff --git a/.changeset/four-parents-cheer.md b/.changeset/four-parents-cheer.md new file mode 100644 index 000000000000..2fbb8e2b279f --- /dev/null +++ b/.changeset/four-parents-cheer.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +load sounds right before playing them diff --git a/.changeset/gold-moose-press.md b/.changeset/gold-moose-press.md new file mode 100644 index 000000000000..605fb7c649ea --- /dev/null +++ b/.changeset/gold-moose-press.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fix moment timestamps language change diff --git a/.changeset/heavy-zebras-wonder.md b/.changeset/heavy-zebras-wonder.md new file mode 100644 index 000000000000..a1904a81c514 --- /dev/null +++ b/.changeset/heavy-zebras-wonder.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Show correct date for last day time diff --git a/.changeset/hip-hounds-ring.md b/.changeset/hip-hounds-ring.md index be1ebb295afd..79dfba6dd031 100644 --- a/.changeset/hip-hounds-ring.md +++ b/.changeset/hip-hounds-ring.md @@ -2,4 +2,4 @@ '@rocket.chat/meteor': patch --- -Added ability to disable private app installation via envvar (DISABLED_PRIVATE_APP_INSTALLATION) +Added ability to disable private app installation via envvar (DISABLE_PRIVATE_APP_INSTALLATION) diff --git a/.changeset/honest-glasses-roll.md b/.changeset/honest-glasses-roll.md new file mode 100644 index 000000000000..679f46fb8420 --- /dev/null +++ b/.changeset/honest-glasses-roll.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +chore: Add danger variant to apps action button menus diff --git a/.changeset/honest-mirrors-sit.md b/.changeset/honest-mirrors-sit.md new file mode 100644 index 000000000000..4e4298cb8110 --- /dev/null +++ b/.changeset/honest-mirrors-sit.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Disabled call to tags enterprise endpoint when on community license diff --git a/.changeset/importer-progress-bar.md b/.changeset/importer-progress-bar.md new file mode 100644 index 000000000000..49c04289ddcb --- /dev/null +++ b/.changeset/importer-progress-bar.md @@ -0,0 +1,6 @@ +--- +"@rocket.chat/meteor": patch +--- + +Fixed Importer Progress Bar progress indicator + diff --git a/.changeset/kind-books-love.md b/.changeset/kind-books-love.md new file mode 100644 index 000000000000..40ce15453ff4 --- /dev/null +++ b/.changeset/kind-books-love.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Fixed message disappearing from room after erased even if "Show Deleted Status" is enabled diff --git a/.changeset/lucky-balloons-divide.md b/.changeset/lucky-balloons-divide.md new file mode 100644 index 000000000000..beb4cbfe3b57 --- /dev/null +++ b/.changeset/lucky-balloons-divide.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Fix engagement dashboard not showing data diff --git a/.changeset/moody-pans-act.md b/.changeset/moody-pans-act.md new file mode 100644 index 000000000000..6c307604eaa9 --- /dev/null +++ b/.changeset/moody-pans-act.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Fix seat counter including bots users diff --git a/.changeset/nine-bottles-press.md b/.changeset/nine-bottles-press.md new file mode 100644 index 000000000000..f9a57fa676ad --- /dev/null +++ b/.changeset/nine-bottles-press.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +feat: Add flag to disable teams mention via troubleshoot page diff --git a/.changeset/odd-elephants-promise.md b/.changeset/odd-elephants-promise.md new file mode 100644 index 000000000000..a12817ed175b --- /dev/null +++ b/.changeset/odd-elephants-promise.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Fix LinkedIn OAuth broken diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 000000000000..3bc535a4b50f --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,169 @@ +{ + "mode": "pre", + "tag": "rc", + "initialVersions": { + "@rocket.chat/meteor": "6.4.0-develop", + "rocketchat-services": "1.1.4", + "@rocket.chat/account-service": "0.2.4", + "@rocket.chat/authorization-service": "0.2.4", + "@rocket.chat/ddp-streamer": "0.1.4", + "@rocket.chat/omnichannel-transcript": "0.2.4", + "@rocket.chat/presence-service": "0.2.4", + "@rocket.chat/queue-worker": "0.2.4", + "@rocket.chat/stream-hub-service": "0.2.4", + "@rocket.chat/api-client": "0.1.4", + "@rocket.chat/ddp-client": "0.1.4", + "@rocket.chat/omnichannel-services": "0.0.10", + "@rocket.chat/pdf-worker": "0.0.10", + "@rocket.chat/presence": "0.0.10", + "@rocket.chat/ui-theming": "0.0.1", + "@rocket.chat/account-utils": "0.0.1", + "@rocket.chat/agenda": "0.0.2", + "@rocket.chat/base64": "1.0.12", + "@rocket.chat/cas-validate": "0.0.1", + "@rocket.chat/core-services": "0.1.4", + "@rocket.chat/core-typings": "6.3.4", + "@rocket.chat/cron": "0.0.6", + "@rocket.chat/eslint-config": "0.5.2", + "@rocket.chat/favicon": "0.0.1", + "@rocket.chat/fuselage-ui-kit": "1.0.4", + "@rocket.chat/gazzodown": "1.0.4", + "@rocket.chat/i18n": "0.0.1", + "@rocket.chat/instance-status": "0.0.10", + "@rocket.chat/livechat": "1.13.4", + "@rocket.chat/log-format": "0.0.1", + "@rocket.chat/logger": "0.0.1", + "@rocket.chat/mock-providers": "0.0.1", + "@rocket.chat/model-typings": "0.0.10", + "@rocket.chat/models": "0.0.10", + "@rocket.chat/poplib": "0.0.1", + "@rocket.chat/random": "1.2.1", + "@rocket.chat/release-action": "2.1.0", + "@rocket.chat/rest-typings": "6.3.4", + "@rocket.chat/server-fetch": "0.0.1", + "@rocket.chat/sha256": "1.0.9", + "@rocket.chat/tools": "0.0.1", + "@rocket.chat/ui-client": "1.0.4", + "@rocket.chat/ui-composer": "0.0.1", + "@rocket.chat/ui-contexts": "1.0.4", + "@rocket.chat/ui-video-conf": "1.0.4", + "@rocket.chat/uikit-playground": "0.1.4", + "@rocket.chat/web-ui-registration": "1.0.4" + }, + "changesets": [ + "blue-ladybugs-raise", + "breezy-bugs-jam", + "bright-carpets-fly", + "bright-snakes-vanish", + "brown-clouds-add", + "bump-patch-1694741499930", + "bump-patch-1694827499043", + "bump-patch-1695163548038", + "bump-patch-1695165575069", + "chilled-flies-fold", + "chilled-phones-give", + "cool-students-tan", + "cuddly-houses-tie", + "cuddly-ties-bake", + "curly-shoes-burn", + "custom-emoji-fs", + "dropdown", + "eighty-kids-jog", + "eleven-icons-tan", + "empty-ants-enjoy", + "fair-cats-destroy", + "fast-pumpkins-smoke", + "fast-yaks-collect", + "fifty-cars-divide", + "fluffy-beds-buy", + "fluffy-lions-rage", + "forty-hotels-pretend", + "four-parents-cheer", + "friendly-glasses-mate", + "fuzzy-glasses-divide", + "fuzzy-schools-brake", + "gold-horses-pretend", + "gold-moose-press", + "good-elephants-live", + "green-adults-peel", + "grumpy-candles-rule", + "heavy-baboons-laugh", + "heavy-cougars-marry", + "heavy-zebras-wonder", + "hip-hounds-ring", + "hip-mugs-promise", + "honest-glasses-roll", + "honest-mirrors-sit", + "honest-numbers-compete", + "importer-progress-bar", + "kind-students-worry", + "lazy-ghosts-design", + "loud-sheep-try", + "lovely-snails-drop", + "lucky-balloons-divide", + "lucky-hounds-sing", + "many-icons-provide", + "mighty-walls-smash", + "moody-comics-cheat", + "moody-pans-act", + "nine-bottles-press", + "nine-carrots-listen", + "odd-elephants-promise", + "old-federation-card", + "perfect-adults-travel", + "pink-zoos-join", + "pretty-bees-give", + "quick-emus-march", + "quiet-phones-sell", + "rare-sheep-yawn", + "real-pets-visit", + "red-windows-admire", + "red-zebras-clap", + "rotten-turtles-agree", + "serious-garlics-clean", + "serious-geckos-drive", + "serious-shrimps-try", + "seven-jobs-tickle", + "shaggy-beans-poke", + "shiny-garlics-carry", + "shiny-tools-worry", + "short-cobras-tell", + "silly-actors-laugh", + "silver-mugs-unite", + "six-buckets-eat", + "slimy-cheetahs-heal", + "slimy-wasps-double", + "slow-lizards-breathe", + "small-rice-repair", + "smooth-planes-cough", + "soft-yaks-matter", + "sour-cows-refuse", + "sour-parrots-nail", + "stale-roses-knock", + "strong-laws-pump", + "swift-birds-build", + "swift-walls-protect", + "tall-pumpkins-cross", + "tame-pens-occur", + "three-ants-give", + "three-birds-tickle", + "tidy-bears-camp", + "tiny-turkeys-burn", + "tough-candles-heal", + "tricky-years-swim", + "unlucky-turtles-search", + "user-mention", + "violet-frogs-cheer", + "warm-hornets-ring", + "wet-frogs-kiss", + "wet-walls-lie", + "wild-spiders-smell", + "wise-onions-trade", + "wise-walls-tan", + "wise-ways-fetch", + "witty-feet-warn", + "yellow-buttons-agree", + "yellow-schools-tell", + "young-trains-glow" + ] +} diff --git a/.changeset/real-pets-visit.md b/.changeset/real-pets-visit.md new file mode 100644 index 000000000000..d6531285597c --- /dev/null +++ b/.changeset/real-pets-visit.md @@ -0,0 +1,6 @@ +--- +"@rocket.chat/meteor": patch +"@rocket.chat/core-typings": patch +--- + +Fixed `default` field not being returned from the `setDefault` endpoints when setting to false diff --git a/.changeset/red-zebras-clap.md b/.changeset/red-zebras-clap.md new file mode 100644 index 000000000000..cd8f832b1835 --- /dev/null +++ b/.changeset/red-zebras-clap.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Fix importer filters not working diff --git a/.changeset/serious-shrimps-try.md b/.changeset/serious-shrimps-try.md new file mode 100644 index 000000000000..114293aa104e --- /dev/null +++ b/.changeset/serious-shrimps-try.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +fixed an issue with the positioning of the message menu diff --git a/.changeset/seven-jobs-tickle.md b/.changeset/seven-jobs-tickle.md new file mode 100644 index 000000000000..870bafbb7d9d --- /dev/null +++ b/.changeset/seven-jobs-tickle.md @@ -0,0 +1,6 @@ +--- +"@rocket.chat/meteor": patch +"@rocket.chat/model-typings": patch +--- + +fix: agent role being removed upon user deactivation diff --git a/.changeset/shiny-garlics-carry.md b/.changeset/shiny-garlics-carry.md new file mode 100644 index 000000000000..117063d93f6f --- /dev/null +++ b/.changeset/shiny-garlics-carry.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fix CORS headers not being set for assets diff --git a/.changeset/slimy-cheetahs-heal.md b/.changeset/slimy-cheetahs-heal.md new file mode 100644 index 000000000000..44233bc87766 --- /dev/null +++ b/.changeset/slimy-cheetahs-heal.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fixed selected departments not being displayed due to pagination diff --git a/.changeset/strange-papayas-yell.md b/.changeset/strange-papayas-yell.md new file mode 100644 index 000000000000..ca194dd2f9d4 --- /dev/null +++ b/.changeset/strange-papayas-yell.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +fix: Disables GenericMenu without any sections or items diff --git a/.changeset/strong-laws-pump.md b/.changeset/strong-laws-pump.md new file mode 100644 index 000000000000..a4afefd65316 --- /dev/null +++ b/.changeset/strong-laws-pump.md @@ -0,0 +1,8 @@ +--- +'@rocket.chat/model-typings': patch +'@rocket.chat/meteor': patch +--- + +Change SAU aggregation to consider only sessions from few days ago instead of the whole past. + +This is particularly important for large workspaces in case the cron job did not run for some time, in that case the amount of sessions would accumulate and the aggregation would take a long time to run. diff --git a/.changeset/tall-pumpkins-cross.md b/.changeset/tall-pumpkins-cross.md new file mode 100644 index 000000000000..e6cfd8a309b9 --- /dev/null +++ b/.changeset/tall-pumpkins-cross.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/presence": patch +--- + +Fixed presence broadcast being disabled on server restart diff --git a/.changeset/three-ants-give.md b/.changeset/three-ants-give.md new file mode 100644 index 000000000000..4d33fad05f39 --- /dev/null +++ b/.changeset/three-ants-give.md @@ -0,0 +1,8 @@ +--- +"@rocket.chat/cron": patch +"@rocket.chat/meteor": patch +--- + +Increase cron job check delay to 1 min from 5s. + +This reduces MongoDB requests introduced on 6.3. diff --git a/.changeset/three-birds-tickle.md b/.changeset/three-birds-tickle.md new file mode 100644 index 000000000000..0ce911d9f6fa --- /dev/null +++ b/.changeset/three-birds-tickle.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +chore: Increase cache time from 5s to 10s on `getUnits` helpers. This should reduce the number of DB calls made by this method to fetch the unit limitations for a user. diff --git a/.changeset/tough-candles-heal.md b/.changeset/tough-candles-heal.md new file mode 100644 index 000000000000..59ad9c1fb3a1 --- /dev/null +++ b/.changeset/tough-candles-heal.md @@ -0,0 +1,7 @@ +--- +"@rocket.chat/meteor": patch +"@rocket.chat/core-typings": patch +"@rocket.chat/model-typings": patch +--- + +Fixes a problem where the calculated time for considering the visitor abandonment was the first message from the visitor and not the visitor's reply to the agent. diff --git a/.changeset/unlucky-turtles-search.md b/.changeset/unlucky-turtles-search.md new file mode 100644 index 000000000000..fffa51020e30 --- /dev/null +++ b/.changeset/unlucky-turtles-search.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fixed Accounts profile form name change was not working diff --git a/.changeset/wise-onions-trade.md b/.changeset/wise-onions-trade.md new file mode 100644 index 000000000000..cb5c731fb6fb --- /dev/null +++ b/.changeset/wise-onions-trade.md @@ -0,0 +1,11 @@ +--- +"@rocket.chat/meteor": patch +"@rocket.chat/i18n": patch +"@rocket.chat/livechat": patch +"@rocket.chat/mock-providers": patch +"@rocket.chat/ui-client": patch +"@rocket.chat/ui-contexts": patch +"@rocket.chat/web-ui-registration": patch +--- + +Fixed the login page language switcher, now the component has a new look, is reactive and the language selection becomes concrete upon login in. Also changed the default language of the login page to be the browser language. diff --git a/.changeset/wise-walls-tan.md b/.changeset/wise-walls-tan.md new file mode 100644 index 000000000000..f558de82ec4c --- /dev/null +++ b/.changeset/wise-walls-tan.md @@ -0,0 +1,6 @@ +--- +'@rocket.chat/rest-typings': minor +'@rocket.chat/meteor': minor +--- + +fix: missing params on updateOwnBasicInfo endpoint diff --git a/.changeset/yellow-buttons-agree.md b/.changeset/yellow-buttons-agree.md new file mode 100644 index 000000000000..a86d172a4544 --- /dev/null +++ b/.changeset/yellow-buttons-agree.md @@ -0,0 +1,6 @@ +--- +'@rocket.chat/ui-client': minor +'@rocket.chat/meteor': minor +--- + +feat: add ChangePassword field to Account/Security diff --git a/.changeset/young-trains-glow.md b/.changeset/young-trains-glow.md new file mode 100644 index 000000000000..77f50812143f --- /dev/null +++ b/.changeset/young-trains-glow.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': minor +--- + +Fixed the issue of apps icon uneven alignment in case of missing icons inside message composer toolbar & message toolbar menu. diff --git a/.github/actions/build-docker/action.yml b/.github/actions/build-docker/action.yml new file mode 100644 index 000000000000..808b8acdcbe3 --- /dev/null +++ b/.github/actions/build-docker/action.yml @@ -0,0 +1,73 @@ +name: 'Meteor Docker' + +inputs: + CR_USER: + required: true + CR_PAT: + required: true + node-version: + required: true + description: 'Node version' + type: string + platform: + required: false + description: 'Platform' + type: string + +runs: + using: composite + + steps: + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ inputs.CR_USER }} + password: ${{ inputs.CR_PAT }} + + - name: Restore build + uses: actions/download-artifact@v3 + with: + name: build + path: /tmp/build + + - name: Unpack build + shell: bash + run: | + cd /tmp/build + tar xzf Rocket.Chat.tar.gz + rm Rocket.Chat.tar.gz + + - uses: dtinth/setup-github-actions-caching-for-turbo@v1 + + - name: Setup NodeJS + uses: ./.github/actions/setup-node + with: + node-version: ${{ inputs.node-version }} + cache-modules: true + install: true + + - run: yarn build + shell: bash + + - name: Build Docker images + shell: bash + run: | + args=(rocketchat) + + if [[ '${{ inputs.platform }}' = 'alpine' ]]; then + args+=($SERVICES_PUBLISH) + fi; + + docker compose -f docker-compose-ci.yml build "${args[@]}" + + - name: Publish Docker images to GitHub Container Registry + shell: bash + run: | + args=(rocketchat) + + if [[ '${{ inputs.platform }}' = 'alpine' ]]; then + args+=($SERVICES_PUBLISH) + fi; + + docker compose -f docker-compose-ci.yml push "${args[@]}" diff --git a/.github/actions/meteor-build/action.yml b/.github/actions/meteor-build/action.yml new file mode 100644 index 000000000000..21fec059c8de --- /dev/null +++ b/.github/actions/meteor-build/action.yml @@ -0,0 +1,129 @@ +name: 'Meteor Build' + +inputs: + coverage: + required: false + description: 'Enable coverage' + type: boolean + reset-meteor: + required: false + description: 'Reset Meteor' + type: boolean + node-version: + required: true + description: 'Node version' + type: string + +runs: + using: composite + + steps: + - name: Set Swap Space + uses: pierotofy/set-swap-space@master + with: + swap-size-gb: 4 + + - name: Setup NodeJS + uses: ./.github/actions/setup-node + with: + node-version: ${{ inputs.node-version }} + cache-modules: true + install: true + + # - name: Free disk space + # run: | + # sudo apt clean + # docker rmi $(docker image ls -aq) + # df -h + + - name: Cache vite + uses: actions/cache@v3 + with: + path: ./node_modules/.vite + key: vite-local-cache-${{ runner.OS }}-${{ hashFiles('package.json') }} + restore-keys: | + vite-local-cache-${{ runner.os }}- + + - name: Cache meteor local + uses: actions/cache@v3 + with: + path: ./apps/meteor/.meteor/local + key: meteor-local-cache-${{ runner.OS }}-${{ hashFiles('apps/meteor/.meteor/versions') }} + restore-keys: | + meteor-local-cache-${{ runner.os }}- + + - name: Cache meteor + uses: actions/cache@v3 + with: + path: ~/.meteor + key: meteor-cache-${{ runner.OS }}-${{ hashFiles('apps/meteor/.meteor/release') }} + restore-keys: | + meteor-cache-${{ runner.os }}- + + - name: Install Meteor + shell: bash + run: | + # Restore bin from cache + set +e + METEOR_SYMLINK_TARGET=$(readlink ~/.meteor/meteor) + METEOR_TOOL_DIRECTORY=$(dirname "$METEOR_SYMLINK_TARGET") + set -e + LAUNCHER=$HOME/.meteor/$METEOR_TOOL_DIRECTORY/scripts/admin/launch-meteor + if [ -e $LAUNCHER ] + then + echo "Cached Meteor bin found, restoring it" + sudo cp "$LAUNCHER" "/usr/local/bin/meteor" + else + echo "No cached Meteor bin found." + fi + + # only install meteor if bin isn't found + command -v meteor >/dev/null 2>&1 || curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh + + - name: Versions + shell: bash + run: | + npm --versions + yarn -v + node -v + meteor --version + meteor npm --versions + meteor node -v + git version + + - uses: dtinth/setup-github-actions-caching-for-turbo@v1 + + - name: Translation check + shell: bash + run: yarn turbo run translation-check + + - name: Reset Meteor + shell: bash + if: ${{ inputs.reset-meteor == 'true' }} + working-directory: ./apps/meteor + run: meteor reset + + - name: Build Rocket.Chat From Pull Request + shell: bash + if: startsWith(github.ref, 'refs/pull/') == true + env: + METEOR_PROFILE: 1000 + BABEL_ENV: ${{ inputs.coverage == 'true' && 'coverage' || '' }} + run: yarn build:ci -- --directory /tmp/dist + + - name: Build Rocket.Chat + shell: bash + if: startsWith(github.ref, 'refs/pull/') != true + run: yarn build:ci -- --directory /tmp/dist + + - name: Prepare build + shell: bash + run: | + cd /tmp/dist + tar czf /tmp/Rocket.Chat.tar.gz bundle + + - name: Store build + uses: actions/upload-artifact@v3 + with: + name: build + path: /tmp/Rocket.Chat.tar.gz diff --git a/.github/workflows/ci-code-check.yml b/.github/workflows/ci-code-check.yml index 5a556a1a8e29..57cdac047423 100644 --- a/.github/workflows/ci-code-check.yml +++ b/.github/workflows/ci-code-check.yml @@ -44,6 +44,17 @@ jobs: - uses: dtinth/setup-github-actions-caching-for-turbo@v1 + - name: Cache TypeCheck + uses: actions/cache@v3 + if: matrix.check == 'ts' + with: + path: ./apps/meteor/tsconfig.typecheck.tsbuildinfo + key: typecheck-cache-${{ runner.OS }}-${{ hashFiles('yarn.lock') }}-${{ github.event.issue.number }} + restore-keys: | + typecheck-cache-${{ runner.OS }}-${{ hashFiles('yarn.lock') }} + typecheck-cache-${{ runner.OS }} + typecheck-cache + - name: TS TypeCheck if: matrix.check == 'ts' run: yarn turbo run typecheck diff --git a/.github/workflows/ci-test-e2e.yml b/.github/workflows/ci-test-e2e.yml index e22b293d444b..e14857a97a09 100644 --- a/.github/workflows/ci-test-e2e.yml +++ b/.github/workflows/ci-test-e2e.yml @@ -57,6 +57,8 @@ on: required: false REPORTER_ROCKETCHAT_API_KEY: required: false + CODECOV_TOKEN: + required: false env: MONGO_URL: mongodb://localhost:27017/rocketchat?replicaSet=rs0&directConnection=true @@ -209,8 +211,11 @@ jobs: REPORTER_ROCKETCHAT_DRAFT: ${{ github.event.pull_request.draft }} QASE_API_TOKEN: ${{ secrets.QASE_API_TOKEN }} QASE_REPORT: ${{ github.ref == 'refs/heads/develop' && 'true' || '' }} + CI: true working-directory: ./apps/meteor - run: yarn test:e2e --shard=${{ matrix.shard }}/${{ inputs.total-shard }} + run: | + yarn prepare + yarn test:e2e --shard=${{ matrix.shard }}/${{ inputs.total-shard }} - name: Store playwright test trace if: inputs.type == 'ui' && always() @@ -234,6 +239,7 @@ jobs: directory: ./apps/meteor flags: e2e verbose: true + token: ${{ secrets.CODECOV_TOKEN }} - name: Store e2e-ee-coverage if: inputs.type == 'ui' && inputs.release == 'ee' diff --git a/.github/workflows/ci-test-unit.yml b/.github/workflows/ci-test-unit.yml index 03c6bc2352ab..b4ef5cb273ad 100644 --- a/.github/workflows/ci-test-unit.yml +++ b/.github/workflows/ci-test-unit.yml @@ -6,6 +6,9 @@ on: node-version: required: true type: string + secrets: + CODECOV_TOKEN: + required: false env: MONGO_URL: mongodb://localhost:27017/rocketchat?replicaSet=rs0&directConnection=true @@ -36,3 +39,4 @@ jobs: with: flags: unit verbose: true + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3fe46ecf66c3..31c2c42718b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,7 +123,7 @@ jobs: run: yarn build build: - name: 📦 Meteor Build + name: 📦 Meteor Build - coverage needs: [release-versions, packages-build] runs-on: ubuntu-20.04 @@ -138,111 +138,38 @@ jobs: echo "github.event_name: ${{ github.event_name }}" cat $GITHUB_EVENT_PATH - - name: Set Swap Space - uses: pierotofy/set-swap-space@master - with: - swap-size-gb: 4 - - uses: actions/checkout@v3 - - name: Setup NodeJS - uses: ./.github/actions/setup-node + - uses: ./.github/actions/meteor-build with: node-version: ${{ needs.release-versions.outputs.node-version }} - cache-modules: true - install: true + coverage: true - # - name: Free disk space - # run: | - # sudo apt clean - # docker rmi $(docker image ls -aq) - # df -h - - - name: Cache vite - uses: actions/cache@v3 - with: - path: ./node_modules/.vite - key: vite-local-cache-${{ runner.OS }}-${{ hashFiles('package.json') }} - restore-keys: | - vite-local-cache-${{ runner.os }}- - - - name: Cache meteor local - uses: actions/cache@v3 - with: - path: ./apps/meteor/.meteor/local - key: meteor-local-cache-${{ runner.OS }}-${{ hashFiles('apps/meteor/.meteor/versions') }} - restore-keys: | - meteor-local-cache-${{ runner.os }}- - - - name: Cache meteor - uses: actions/cache@v3 - with: - path: ~/.meteor - key: meteor-cache-${{ runner.OS }}-${{ hashFiles('apps/meteor/.meteor/release') }} - restore-keys: | - meteor-cache-${{ runner.os }}- - - - name: Install Meteor - run: | - # Restore bin from cache - set +e - METEOR_SYMLINK_TARGET=$(readlink ~/.meteor/meteor) - METEOR_TOOL_DIRECTORY=$(dirname "$METEOR_SYMLINK_TARGET") - set -e - LAUNCHER=$HOME/.meteor/$METEOR_TOOL_DIRECTORY/scripts/admin/launch-meteor - if [ -e $LAUNCHER ] - then - echo "Cached Meteor bin found, restoring it" - sudo cp "$LAUNCHER" "/usr/local/bin/meteor" - else - echo "No cached Meteor bin found." - fi - - # only install meteor if bin isn't found - command -v meteor >/dev/null 2>&1 || curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh + build-prod: + name: 📦 Meteor Build - official + needs: [tests-done, release-versions, packages-build] + if: (github.event_name == 'release' || github.ref == 'refs/heads/develop') + runs-on: ubuntu-20.04 - - name: Versions + steps: + - name: Github Info run: | - npm --versions - yarn -v - node -v - meteor --version - meteor npm --versions - meteor node -v - git version - - - uses: dtinth/setup-github-actions-caching-for-turbo@v1 - - - name: Translation check - run: yarn turbo run translation-check - - - name: Reset Meteor - if: startsWith(github.ref, 'refs/tags/') == 'true' || github.ref == 'refs/heads/develop' - working-directory: ./apps/meteor - run: meteor reset - - - name: Build Rocket.Chat From Pull Request - if: startsWith(github.ref, 'refs/pull/') == true - env: - METEOR_PROFILE: 1000 - run: yarn build:ci -- --directory /tmp/dist - - - name: Build Rocket.Chat - if: startsWith(github.ref, 'refs/pull/') != true - run: yarn build:ci -- --directory /tmp/dist + echo "GITHUB_ACTION: $GITHUB_ACTION" + echo "GITHUB_ACTOR: $GITHUB_ACTOR" + echo "GITHUB_REF: $GITHUB_REF" + echo "GITHUB_HEAD_REF: $GITHUB_HEAD_REF" + echo "GITHUB_BASE_REF: $GITHUB_BASE_REF" + echo "github.event_name: ${{ github.event_name }}" + cat $GITHUB_EVENT_PATH - - name: Prepare build - run: | - cd /tmp/dist - tar czf /tmp/Rocket.Chat.tar.gz bundle + - uses: actions/checkout@v3 - - name: Store build - uses: actions/upload-artifact@v3 + - uses: ./.github/actions/meteor-build with: - name: build - path: /tmp/Rocket.Chat.tar.gz + node-version: ${{ needs.release-versions.outputs.node-version }} + coverage: false - build-gh-docker: + build-gh-docker-coverage: name: 🚢 Build Docker Images for Testing needs: [build, release-versions] if: (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop') @@ -262,56 +189,39 @@ jobs: steps: - uses: actions/checkout@v3 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ secrets.CR_USER }} - password: ${{ secrets.CR_PAT }} - - - name: Restore build - uses: actions/download-artifact@v3 - with: - name: build - path: /tmp/build - - - name: Unpack build - run: | - cd /tmp/build - tar xzf Rocket.Chat.tar.gz - rm Rocket.Chat.tar.gz - - - uses: dtinth/setup-github-actions-caching-for-turbo@v1 - - - name: Setup NodeJS - uses: ./.github/actions/setup-node + - uses: ./.github/actions/build-docker with: + CR_USER: ${{ secrets.CR_USER }} + CR_PAT: ${{ secrets.CR_PAT }} node-version: ${{ needs.release-versions.outputs.node-version }} - cache-modules: true - install: true + platform: ${{ matrix.platform }} - - run: yarn build - - - name: Build Docker images - run: | - args=(rocketchat) - - if [[ '${{ matrix.platform }}' = 'alpine' ]]; then - args+=($SERVICES_PUBLISH) - fi; + build-gh-docker: + name: 🚢 Build Docker Images for Production + needs: [build-prod, release-versions] + runs-on: ubuntu-20.04 - docker compose -f docker-compose-ci.yml build "${args[@]}" + env: + RC_DOCKERFILE: ${{ matrix.platform == 'alpine' && needs.release-versions.outputs.rc-dockerfile-alpine || needs.release-versions.outputs.rc-dockerfile }} + RC_DOCKER_TAG: ${{ matrix.platform == 'alpine' && needs.release-versions.outputs.rc-docker-tag-alpine || needs.release-versions.outputs.rc-docker-tag }} + DOCKER_TAG: ${{ needs.release-versions.outputs.gh-docker-tag }} + LOWERCASE_REPOSITORY: ${{ needs.release-versions.outputs.lowercase-repo }} + SERVICES_PUBLISH: 'authorization-service account-service ddp-streamer-service presence-service stream-hub-service' - - name: Publish Docker images to GitHub Container Registry - run: | - args=(rocketchat) + strategy: + fail-fast: false + matrix: + platform: ['official', 'alpine'] - if [[ '${{ matrix.platform }}' = 'alpine' ]]; then - args+=($SERVICES_PUBLISH) - fi; + steps: + - uses: actions/checkout@v3 - docker compose -f docker-compose-ci.yml push "${args[@]}" + - uses: ./.github/actions/build-docker + with: + CR_USER: ${{ secrets.CR_USER }} + CR_PAT: ${{ secrets.CR_PAT }} + node-version: ${{ needs.release-versions.outputs.node-version }} + platform: ${{ matrix.platform }} - name: Rename official Docker tag to GitHub Container Registry if: matrix.platform == 'official' @@ -337,10 +247,12 @@ jobs: uses: ./.github/workflows/ci-test-unit.yml with: node-version: ${{ needs.release-versions.outputs.node-version }} + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} test-api: name: 🔨 Test API (CE) - needs: [checks, build-gh-docker, release-versions] + needs: [checks, build-gh-docker-coverage, release-versions] uses: ./.github/workflows/ci-test-e2e.yml with: @@ -359,7 +271,7 @@ jobs: test-ui: name: 🔨 Test UI (CE) - needs: [checks, build-gh-docker, release-versions] + needs: [checks, build-gh-docker-coverage, release-versions] uses: ./.github/workflows/ci-test-e2e.yml with: @@ -385,7 +297,7 @@ jobs: test-api-ee: name: 🔨 Test API (EE) - needs: [checks, build-gh-docker, release-versions] + needs: [checks, build-gh-docker-coverage, release-versions] uses: ./.github/workflows/ci-test-e2e.yml with: @@ -407,7 +319,7 @@ jobs: test-ui-ee: name: 🔨 Test UI (EE) - needs: [checks, build-gh-docker, release-versions] + needs: [checks, build-gh-docker-coverage, release-versions] uses: ./.github/workflows/ci-test-e2e.yml with: @@ -431,6 +343,7 @@ jobs: QASE_API_TOKEN: ${{ secrets.QASE_API_TOKEN }} REPORTER_ROCKETCHAT_API_KEY: ${{ secrets.REPORTER_ROCKETCHAT_API_KEY }} REPORTER_ROCKETCHAT_URL: ${{ secrets.REPORTER_ROCKETCHAT_URL }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} tests-done: name: ✅ Tests Done @@ -443,13 +356,16 @@ jobs: echo finished deploy: - name: 🚀 Publish build and update our registry + name: 🚀 Publish build assets runs-on: ubuntu-20.04 if: github.event_name == 'release' || github.ref == 'refs/heads/develop' - needs: [tests-done, release-versions] + needs: [build-gh-docker, release-versions] steps: - - uses: actions/checkout@v3 + - uses: Bhacaz/checkout-files@v2 + with: + files: package.json + branch: ${{ github.ref }} - name: Restore build uses: actions/download-artifact@v3 @@ -463,32 +379,17 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: 'us-east-1' GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} - REDHAT_REGISTRY_PID: ${{ secrets.REDHAT_REGISTRY_PID }} - REDHAT_REGISTRY_KEY: ${{ secrets.REDHAT_REGISTRY_KEY }} - UPDATE_TOKEN: ${{ secrets.UPDATE_TOKEN }} run: | REPO_VERSION=$(node -p "require('./package.json').version") + if [[ '${{ github.event_name }}' = 'release' ]]; then GIT_TAG="${GITHUB_REF#*tags/}" - GIT_BRANCH="" ARTIFACT_NAME="${REPO_VERSION}" - RC_VERSION=$GIT_TAG - - if [[ '${{ needs.release-versions.outputs.release }}' = 'release-candidate' ]]; then - SNAP_CHANNEL=candidate - RC_RELEASE=candidate - elif [[ '${{ needs.release-versions.outputs.release }}' = 'latest' ]]; then - SNAP_CHANNEL=stable - RC_RELEASE=stable - fi else GIT_TAG="" - GIT_BRANCH="${GITHUB_REF#*heads/}" ARTIFACT_NAME="${REPO_VERSION}.$GITHUB_SHA" - RC_VERSION="${REPO_VERSION}" - SNAP_CHANNEL=edge - RC_RELEASE=develop fi; + ROCKET_DEPLOY_DIR="/tmp/deploy" FILENAME="$ROCKET_DEPLOY_DIR/rocket.chat-$ARTIFACT_NAME.tgz"; @@ -506,22 +407,6 @@ jobs: aws s3 cp $ROCKET_DEPLOY_DIR/ s3://download.rocket.chat/build/ --recursive - curl -H "Content-Type: application/json" -H "X-Update-Token: $UPDATE_TOKEN" -d \ - "{\"nodeVersion\": \"${{ needs.release-versions.outputs.node-version }}\", \"compatibleMongoVersions\": [\"4.4\", \"5.0\", \"6.0\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"$RC_RELEASE\"}" \ - https://releases.rocket.chat/update - - # Makes build fail if the release isn't there - curl --fail https://releases.rocket.chat/$RC_VERSION/info - - if [[ $GIT_TAG ]]; then - curl -X POST \ - https://connect.redhat.com/api/v2/projects/$REDHAT_REGISTRY_PID/build \ - -H "Authorization: Bearer $REDHAT_REGISTRY_KEY" \ - -H 'Cache-Control: no-cache' \ - -H 'Content-Type: application/json' \ - -d '{"tag":"'$GIT_TAG'"}' - fi - build-docker-preview: name: 🚢 Build Docker Image (preview) runs-on: ubuntu-20.04 @@ -752,6 +637,66 @@ jobs: echo "::endgroup::" + notify-services: + name: 🚀 Notify external services + runs-on: ubuntu-20.04 + needs: + - services-docker-image-publish + - docker-image-publish + - release-versions + steps: + - uses: Bhacaz/checkout-files@v2 + with: + files: package.json + branch: ${{ github.ref }} + + - name: Releases service + env: + UPDATE_TOKEN: ${{ secrets.UPDATE_TOKEN }} + run: | + REPO_VERSION=$(node -p "require('./package.json').version") + + if [[ '${{ github.event_name }}' = 'release' ]]; then + GIT_TAG="${GITHUB_REF#*tags/}" + GIT_BRANCH="" + ARTIFACT_NAME="${REPO_VERSION}" + RC_VERSION=$GIT_TAG + + if [[ '${{ needs.release-versions.outputs.release }}' = 'release-candidate' ]]; then + RC_RELEASE=candidate + elif [[ '${{ needs.release-versions.outputs.release }}' = 'latest' ]]; then + RC_RELEASE=stable + fi + else + GIT_TAG="" + GIT_BRANCH="${GITHUB_REF#*heads/}" + ARTIFACT_NAME="${REPO_VERSION}.$GITHUB_SHA" + RC_VERSION="${REPO_VERSION}" + RC_RELEASE=develop + fi; + + curl -H "Content-Type: application/json" -H "X-Update-Token: $UPDATE_TOKEN" -d \ + "{\"nodeVersion\": \"${{ needs.release-versions.outputs.node-version }}\", \"compatibleMongoVersions\": [\"4.4\", \"5.0\", \"6.0\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"$RC_RELEASE\"}" \ + https://releases.rocket.chat/update + + # Makes build fail if the release isn't there + curl --fail https://releases.rocket.chat/$RC_VERSION/info + + - name: RedHat Registry + if: github.event_name == 'release' + env: + REDHAT_REGISTRY_PID: ${{ secrets.REDHAT_REGISTRY_PID }} + REDHAT_REGISTRY_KEY: ${{ secrets.REDHAT_REGISTRY_KEY }} + run: | + GIT_TAG="${GITHUB_REF#*tags/}" + + curl -X POST \ + https://connect.redhat.com/api/v2/projects/$REDHAT_REGISTRY_PID/build \ + -H "Authorization: Bearer $REDHAT_REGISTRY_KEY" \ + -H 'Cache-Control: no-cache' \ + -H 'Content-Type: application/json' \ + -d '{"tag":"'$GIT_TAG'"}' + trigger-dependent-workflows: runs-on: ubuntu-latest if: github.event_name == 'release' diff --git a/.yarn/patches/@storybook-react-docgen-typescript-plugin-npm-1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0-b31cc57c40.patch b/.yarn/patches/@storybook-react-docgen-typescript-plugin-npm-1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0-b31cc57c40.patch new file mode 100644 index 000000000000..ca069ee350c0 --- /dev/null +++ b/.yarn/patches/@storybook-react-docgen-typescript-plugin-npm-1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0-b31cc57c40.patch @@ -0,0 +1,130 @@ +diff --git a/dist/generateDocgenCodeBlock.js b/dist/generateDocgenCodeBlock.js +index 0993ac13e4b2aae6d24cf408d6a585b4ddeb7337..1405896291288eb1322d6c42144afd3b4fbd1abf 100644 +--- a/dist/generateDocgenCodeBlock.js ++++ b/dist/generateDocgenCodeBlock.js +@@ -34,7 +34,7 @@ function insertTsIgnoreBeforeStatement(statement) { + * ``` + */ + function setDisplayName(d) { +- return insertTsIgnoreBeforeStatement(typescript_1.default.createExpressionStatement(typescript_1.default.createBinary(typescript_1.default.createPropertyAccess(typescript_1.default.createIdentifier(d.displayName), typescript_1.default.createIdentifier("displayName")), typescript_1.default.SyntaxKind.EqualsToken, typescript_1.default.createLiteral(d.displayName)))); ++ return insertTsIgnoreBeforeStatement(typescript_1.default.factory.createExpressionStatement(typescript_1.default.factory.createBinaryExpression(typescript_1.default.factory.createPropertyAccessExpression(typescript_1.default.factory.createIdentifier(d.displayName), typescript_1.default.factory.createIdentifier("displayName")), typescript_1.default.SyntaxKind.EqualsToken, typescript_1.default.factory.createStringLiteral(d.displayName)))); + } + /** + * Set a component prop description. +@@ -65,7 +65,7 @@ function createPropDefinition(propName, prop, options) { + * + * @param defaultValue Default prop value or null if not set. + */ +- const setDefaultValue = (defaultValue) => typescript_1.default.createPropertyAssignment(typescript_1.default.createLiteral("defaultValue"), ++ const setDefaultValue = (defaultValue) => typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createStringLiteral("defaultValue"), + // Use a more extensive check on defaultValue. Sometimes the parser + // returns an empty object. + defaultValue !== null && +@@ -75,12 +75,19 @@ function createPropDefinition(propName, prop, options) { + (typeof defaultValue.value === "string" || + typeof defaultValue.value === "number" || + typeof defaultValue.value === "boolean") +- ? typescript_1.default.createObjectLiteral([ +- typescript_1.default.createPropertyAssignment(typescript_1.default.createIdentifier("value"), typescript_1.default.createLiteral(defaultValue.value)), ++ ? typescript_1.default.factory.createObjectLiteralExpression([ ++ typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createIdentifier("value"), typeof defaultValue.value === "string" ++ ? typescript_1.default.factory.createStringLiteral(defaultValue.value) ++ : // eslint-disable-next-line no-nested-ternary ++ typeof defaultValue.value === "number" ++ ? typescript_1.default.factory.createNumericLiteral(defaultValue.value) ++ : defaultValue.value ++ ? typescript_1.default.factory.createTrue() ++ : typescript_1.default.factory.createFalse()), + ]) +- : typescript_1.default.createNull()); ++ : typescript_1.default.factory.createNull()); + /** Set a property with a string value */ +- const setStringLiteralField = (fieldName, fieldValue) => typescript_1.default.createPropertyAssignment(typescript_1.default.createLiteral(fieldName), typescript_1.default.createLiteral(fieldValue)); ++ const setStringLiteralField = (fieldName, fieldValue) => typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createStringLiteral(fieldName), typescript_1.default.factory.createStringLiteral(fieldValue)); + /** + * ``` + * SimpleComponent.__docgenInfo.props.someProp.description = "Prop description."; +@@ -101,7 +108,7 @@ function createPropDefinition(propName, prop, options) { + * ``` + * @param required Whether prop is required or not. + */ +- const setRequired = (required) => typescript_1.default.createPropertyAssignment(typescript_1.default.createLiteral("required"), required ? typescript_1.default.createTrue() : typescript_1.default.createFalse()); ++ const setRequired = (required) => typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createStringLiteral("required"), required ? typescript_1.default.factory.createTrue() : typescript_1.default.factory.createFalse()); + /** + * ``` + * SimpleComponent.__docgenInfo.props.someProp.type = { +@@ -113,7 +120,7 @@ function createPropDefinition(propName, prop, options) { + */ + const setValue = (typeValue) => Array.isArray(typeValue) && + typeValue.every((value) => typeof value.value === "string") +- ? typescript_1.default.createPropertyAssignment(typescript_1.default.createLiteral("value"), typescript_1.default.createArrayLiteral(typeValue.map((value) => typescript_1.default.createObjectLiteral([ ++ ? typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createStringLiteral("value"), typescript_1.default.factory.createArrayLiteralExpression(typeValue.map((value) => typescript_1.default.factory.createObjectLiteralExpression([ + setStringLiteralField("value", value.value), + ])))) + : undefined; +@@ -130,9 +137,9 @@ function createPropDefinition(propName, prop, options) { + if (valueField) { + objectFields.push(valueField); + } +- return typescript_1.default.createPropertyAssignment(typescript_1.default.createLiteral(options.typePropName), typescript_1.default.createObjectLiteral(objectFields)); ++ return typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createStringLiteral(options.typePropName), typescript_1.default.factory.createObjectLiteralExpression(objectFields)); + }; +- return typescript_1.default.createPropertyAssignment(typescript_1.default.createLiteral(propName), typescript_1.default.createObjectLiteral([ ++ return typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createStringLiteral(propName), typescript_1.default.factory.createObjectLiteralExpression([ + setDefaultValue(prop.defaultValue), + setDescription(prop.description), + setName(prop.name), +@@ -158,10 +165,10 @@ function createPropDefinition(propName, prop, options) { + * @param relativeFilename Relative file path of the component source file. + */ + function insertDocgenIntoGlobalCollection(d, docgenCollectionName, relativeFilename) { +- return insertTsIgnoreBeforeStatement(typescript_1.default.createIf(typescript_1.default.createBinary(typescript_1.default.createTypeOf(typescript_1.default.createIdentifier(docgenCollectionName)), typescript_1.default.SyntaxKind.ExclamationEqualsEqualsToken, typescript_1.default.createLiteral("undefined")), insertTsIgnoreBeforeStatement(typescript_1.default.createStatement(typescript_1.default.createBinary(typescript_1.default.createElementAccess(typescript_1.default.createIdentifier(docgenCollectionName), typescript_1.default.createLiteral(`${relativeFilename}#${d.displayName}`)), typescript_1.default.SyntaxKind.EqualsToken, typescript_1.default.createObjectLiteral([ +- typescript_1.default.createPropertyAssignment(typescript_1.default.createIdentifier("docgenInfo"), typescript_1.default.createPropertyAccess(typescript_1.default.createIdentifier(d.displayName), typescript_1.default.createIdentifier("__docgenInfo"))), +- typescript_1.default.createPropertyAssignment(typescript_1.default.createIdentifier("name"), typescript_1.default.createLiteral(d.displayName)), +- typescript_1.default.createPropertyAssignment(typescript_1.default.createIdentifier("path"), typescript_1.default.createLiteral(`${relativeFilename}#${d.displayName}`)), ++ return insertTsIgnoreBeforeStatement(typescript_1.default.factory.createIfStatement(typescript_1.default.factory.createBinaryExpression(typescript_1.default.factory.createTypeOfExpression(typescript_1.default.factory.createIdentifier(docgenCollectionName)), typescript_1.default.SyntaxKind.ExclamationEqualsEqualsToken, typescript_1.default.factory.createStringLiteral("undefined")), insertTsIgnoreBeforeStatement(typescript_1.default.factory.createExpressionStatement(typescript_1.default.factory.createBinaryExpression(typescript_1.default.factory.createElementAccessExpression(typescript_1.default.factory.createIdentifier(docgenCollectionName), typescript_1.default.factory.createStringLiteral(`${relativeFilename}#${d.displayName}`)), typescript_1.default.SyntaxKind.EqualsToken, typescript_1.default.factory.createObjectLiteralExpression([ ++ typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createIdentifier("docgenInfo"), typescript_1.default.factory.createPropertyAccessExpression(typescript_1.default.factory.createIdentifier(d.displayName), typescript_1.default.factory.createIdentifier("__docgenInfo"))), ++ typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createIdentifier("name"), typescript_1.default.factory.createStringLiteral(d.displayName)), ++ typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createIdentifier("path"), typescript_1.default.factory.createStringLiteral(`${relativeFilename}#${d.displayName}`)), + ])))))); + } + /** +@@ -180,15 +187,15 @@ function insertDocgenIntoGlobalCollection(d, docgenCollectionName, relativeFilen + * @param options Generator options. + */ + function setComponentDocGen(d, options) { +- return insertTsIgnoreBeforeStatement(typescript_1.default.createStatement(typescript_1.default.createBinary( ++ return insertTsIgnoreBeforeStatement(typescript_1.default.factory.createExpressionStatement(typescript_1.default.factory.createBinaryExpression( + // SimpleComponent.__docgenInfo +- typescript_1.default.createPropertyAccess(typescript_1.default.createIdentifier(d.displayName), typescript_1.default.createIdentifier("__docgenInfo")), typescript_1.default.SyntaxKind.EqualsToken, typescript_1.default.createObjectLiteral([ ++ typescript_1.default.factory.createPropertyAccessExpression(typescript_1.default.factory.createIdentifier(d.displayName), typescript_1.default.factory.createIdentifier("__docgenInfo")), typescript_1.default.SyntaxKind.EqualsToken, typescript_1.default.factory.createObjectLiteralExpression([ + // SimpleComponent.__docgenInfo.description +- typescript_1.default.createPropertyAssignment(typescript_1.default.createLiteral("description"), typescript_1.default.createLiteral(d.description)), ++ typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createStringLiteral("description"), typescript_1.default.factory.createStringLiteral(d.description)), + // SimpleComponent.__docgenInfo.displayName +- typescript_1.default.createPropertyAssignment(typescript_1.default.createLiteral("displayName"), typescript_1.default.createLiteral(d.displayName)), ++ typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createStringLiteral("displayName"), typescript_1.default.factory.createStringLiteral(d.displayName)), + // SimpleComponent.__docgenInfo.props +- typescript_1.default.createPropertyAssignment(typescript_1.default.createLiteral("props"), typescript_1.default.createObjectLiteral(Object.entries(d.props).map(([propName, prop]) => createPropDefinition(propName, prop, options)))), ++ typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createStringLiteral("props"), typescript_1.default.factory.createObjectLiteralExpression(Object.entries(d.props).map(([propName, prop]) => createPropDefinition(propName, prop, options)))), + ])))); + } + function generateDocgenCodeBlock(options) { +@@ -196,7 +203,7 @@ function generateDocgenCodeBlock(options) { + const relativeFilename = path_1.default + .relative("./", path_1.default.resolve("./", options.filename)) + .replace(/\\/g, "/"); +- const wrapInTryStatement = (statements) => typescript_1.default.createTry(typescript_1.default.createBlock(statements, true), typescript_1.default.createCatchClause(typescript_1.default.createVariableDeclaration(typescript_1.default.createIdentifier("__react_docgen_typescript_loader_error")), typescript_1.default.createBlock([])), undefined); ++ const wrapInTryStatement = (statements) => typescript_1.default.factory.createTryStatement(typescript_1.default.factory.createBlock(statements, true), typescript_1.default.factory.createCatchClause(typescript_1.default.factory.createVariableDeclaration(typescript_1.default.factory.createIdentifier("__react_docgen_typescript_loader_error")), typescript_1.default.factory.createBlock([])), undefined); + const codeBlocks = options.componentDocs.map((d) => wrapInTryStatement([ + options.setDisplayName ? setDisplayName(d) : null, + setComponentDocGen(d, options), +@@ -208,7 +215,7 @@ function generateDocgenCodeBlock(options) { + const printer = typescript_1.default.createPrinter({ newLine: typescript_1.default.NewLineKind.LineFeed }); + const printNode = (sourceNode) => printer.printNode(typescript_1.default.EmitHint.Unspecified, sourceNode, sourceFile); + // Concat original source code with code from generated code blocks. +- const result = codeBlocks.reduce((acc, node) => `${acc}\n${printNode(node)}`, ++ const result = codeBlocks.reduce((acc, node) => `${acc}\n${printNode(node)}`, + // Use original source text rather than using printNode on the parsed form + // to prevent issue where literals are stripped within components. + // Ref: https://github.com/strothj/react-docgen-typescript-loader/issues/7 diff --git a/.yarn/patches/mongodb-npm-4.17.1-a2fe811ff1.patch b/.yarn/patches/mongodb-npm-4.17.1-a2fe811ff1.patch new file mode 100644 index 000000000000..501881370244 --- /dev/null +++ b/.yarn/patches/mongodb-npm-4.17.1-a2fe811ff1.patch @@ -0,0 +1,13 @@ +diff --git a/mongodb.d.ts b/mongodb.d.ts +index dd080b553309594c28093365ea101adec5c0a20c..20a616de8c97ec68629c01a848ea8df4fe122bf2 100644 +--- a/mongodb.d.ts ++++ b/mongodb.d.ts +@@ -5539,7 +5539,7 @@ export declare interface MonitorOptions extends Omit = Depth['length'] extends 8 ? [] : Type extends string | number | boolean | Date | RegExp | Buffer | Uint8Array | ((...args: any[]) => any) | { ++export declare type NestedPaths = Depth['length'] extends 1 ? [] : Type extends string | number | boolean | Date | RegExp | Buffer | Uint8Array | ((...args: any[]) => any) | { + _bsontype: string; + } ? [] : Type extends ReadonlyArray ? [] | [number, ...NestedPaths] : Type extends Map ? [string] : Type extends object ? { + [Key in Extract]: Type[Key] extends Type ? [Key] : Type extends Type[Key] ? [Key] : Type[Key] extends ReadonlyArray ? Type extends ArrayType ? [Key] : ArrayType extends Type ? [Key] : [ diff --git a/apps/meteor/.babelrc b/apps/meteor/.babelrc index a8c20b400ca5..382b93318fab 100644 --- a/apps/meteor/.babelrc +++ b/apps/meteor/.babelrc @@ -1,9 +1,15 @@ { - "presets": [ - "@babel/preset-env", - "@babel/preset-react" - ], - "plugins": [ - "babel-plugin-istanbul" - ] + "presets": ["@babel/preset-env", "@babel/preset-react"], + "env": { + "coverage": { + "plugins": [ + [ + "istanbul", + { + "exclude": ["**/*.spec.js", "**/*.test.js"] + } + ] + ] + } + } } diff --git a/apps/meteor/.docker/Dockerfile.rhel b/apps/meteor/.docker/Dockerfile.rhel index 9f03ae9f3db4..1481b0445e45 100644 --- a/apps/meteor/.docker/Dockerfile.rhel +++ b/apps/meteor/.docker/Dockerfile.rhel @@ -1,6 +1,6 @@ FROM registry.access.redhat.com/ubi8/nodejs-12 -ENV RC_VERSION 6.4.0-develop +ENV RC_VERSION 6.5.0-develop MAINTAINER buildmaster@rocket.chat diff --git a/apps/meteor/.gitignore b/apps/meteor/.gitignore index 287cb313c174..a9fd54ab8711 100644 --- a/apps/meteor/.gitignore +++ b/apps/meteor/.gitignore @@ -87,4 +87,5 @@ out.txt dist *-session.json matrix-federation-config/* -.eslintcache \ No newline at end of file +.eslintcache +tsconfig.typecheck.tsbuildinfo diff --git a/apps/meteor/.meteor/packages b/apps/meteor/.meteor/packages index 97836558ab28..ae788af78034 100644 --- a/apps/meteor/.meteor/packages +++ b/apps/meteor/.meteor/packages @@ -25,7 +25,7 @@ accounts-password@2.3.4 accounts-twitter@1.5.0 pauli:accounts-linkedin -google-oauth@1.4.3 +google-oauth@1.4.4 oauth@2.2.0 oauth2@1.3.2 @@ -39,7 +39,7 @@ meteor-base@1.5.1 ddp-common@1.4.0 webapp@1.13.5 -mongo@1.16.6 +mongo@1.16.7 reload@1.3.1 service-configuration@1.3.1 diff --git a/apps/meteor/.meteor/release b/apps/meteor/.meteor/release index e8cfc7ec4c01..6641d0478a10 100644 --- a/apps/meteor/.meteor/release +++ b/apps/meteor/.meteor/release @@ -1 +1 @@ -METEOR@2.12 +METEOR@2.13.3 diff --git a/apps/meteor/.meteor/versions b/apps/meteor/.meteor/versions index da6de9efbde1..66f61e2cd8cc 100644 --- a/apps/meteor/.meteor/versions +++ b/apps/meteor/.meteor/versions @@ -22,7 +22,7 @@ ddp@1.4.1 ddp-client@2.6.1 ddp-common@1.4.0 ddp-rate-limiter@1.2.0 -ddp-server@2.6.1 +ddp-server@2.6.2 diff-sequence@1.1.2 dispatch:run-as-user@1.1.1 dynamic-import@0.7.3 @@ -38,7 +38,7 @@ facts-base@1.0.1 fetch@0.1.3 geojson-utils@1.0.11 github-oauth@1.4.1 -google-oauth@1.4.3 +google-oauth@1.4.4 hot-code-push@1.0.4 http@2.0.0 id-map@1.1.1 @@ -47,7 +47,7 @@ jquery@3.0.0 kadira:flow-router@2.12.1 localstorage@1.2.0 logging@1.3.2 -meteor@1.11.2 +meteor@1.11.3 meteor-base@1.5.1 meteor-developer-oauth@1.3.2 meteorhacks:inject-initial@1.0.5 @@ -56,7 +56,7 @@ minimongo@1.9.3 modern-browsers@0.1.9 modules@0.19.0 modules-runtime@0.13.1 -mongo@1.16.6 +mongo@1.16.7 mongo-decimal@0.1.3 mongo-dev-server@1.1.0 mongo-id@1.0.8 @@ -92,7 +92,7 @@ shell-server@0.5.0 socket-stream-client@0.5.1 standard-minifier-css@1.9.2 tracker@1.3.2 -twitter-oauth@1.3.2 +twitter-oauth@1.3.3 typescript@4.9.4 underscore@1.0.13 url@1.3.2 diff --git a/apps/meteor/CHANGELOG.md b/apps/meteor/CHANGELOG.md index f79e4b224826..18e6e45e8f48 100644 --- a/apps/meteor/CHANGELOG.md +++ b/apps/meteor/CHANGELOG.md @@ -1,5 +1,418 @@ # @rocket.chat/meteor +## 6.4.0-rc.4 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + - @rocket.chat/core-typings@6.4.0-rc.4 + - @rocket.chat/rest-typings@6.4.0-rc.4 + - @rocket.chat/api-client@0.1.8-rc.4 + - @rocket.chat/omnichannel-services@0.0.14-rc.4 + - @rocket.chat/pdf-worker@0.0.14-rc.4 + - @rocket.chat/presence@0.0.14-rc.4 + - @rocket.chat/core-services@0.2.0-rc.4 + - @rocket.chat/cron@0.0.10-rc.4 + - @rocket.chat/gazzodown@2.0.0-rc.4 + - @rocket.chat/model-typings@0.1.0-rc.4 + - @rocket.chat/ui-contexts@2.0.0-rc.4 + - @rocket.chat/fuselage-ui-kit@2.0.0-rc.4 + - @rocket.chat/models@0.0.14-rc.4 + - @rocket.chat/ui-theming@0.1.0-rc.0 + - @rocket.chat/ui-client@2.0.0-rc.4 + - @rocket.chat/ui-video-conf@2.0.0-rc.4 + - @rocket.chat/web-ui-registration@2.0.0-rc.4 + - @rocket.chat/instance-status@0.0.14-rc.4 + +## 6.4.0-rc.3 + +### Patch Changes + +- Bump @rocket.chat/meteor version. +- 614a9b8fc8: Show correct date for last day time +- 61a106fbf2: Increase cron job check delay to 1 min from 5s. + + This reduces MongoDB requests introduced on 6.3. + +- Updated dependencies [d9a150000d] +- Updated dependencies [61a106fbf2] + - @rocket.chat/presence@0.0.13-rc.3 + - @rocket.chat/cron@0.0.9-rc.3 + - @rocket.chat/core-typings@6.4.0-rc.3 + - @rocket.chat/rest-typings@6.4.0-rc.3 + - @rocket.chat/api-client@0.1.7-rc.3 + - @rocket.chat/omnichannel-services@0.0.13-rc.3 + - @rocket.chat/pdf-worker@0.0.13-rc.3 + - @rocket.chat/core-services@0.2.0-rc.3 + - @rocket.chat/gazzodown@2.0.0-rc.3 + - @rocket.chat/model-typings@0.1.0-rc.3 + - @rocket.chat/ui-contexts@2.0.0-rc.3 + - @rocket.chat/fuselage-ui-kit@2.0.0-rc.3 + - @rocket.chat/models@0.0.13-rc.3 + - @rocket.chat/ui-theming@0.1.0-rc.0 + - @rocket.chat/ui-client@2.0.0-rc.3 + - @rocket.chat/ui-video-conf@2.0.0-rc.3 + - @rocket.chat/web-ui-registration@2.0.0-rc.3 + - @rocket.chat/instance-status@0.0.13-rc.3 + +## 6.4.0-rc.2 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + - @rocket.chat/core-typings@6.4.0-rc.2 + - @rocket.chat/rest-typings@6.4.0-rc.2 + - @rocket.chat/api-client@0.1.7-rc.2 + - @rocket.chat/omnichannel-services@0.0.13-rc.2 + - @rocket.chat/pdf-worker@0.0.13-rc.2 + - @rocket.chat/presence@0.0.13-rc.2 + - @rocket.chat/core-services@0.2.0-rc.2 + - @rocket.chat/cron@0.0.9-rc.2 + - @rocket.chat/gazzodown@2.0.0-rc.2 + - @rocket.chat/model-typings@0.1.0-rc.2 + - @rocket.chat/ui-contexts@2.0.0-rc.2 + - @rocket.chat/fuselage-ui-kit@2.0.0-rc.2 + - @rocket.chat/models@0.0.13-rc.2 + - @rocket.chat/ui-theming@0.1.0-rc.0 + - @rocket.chat/ui-client@2.0.0-rc.2 + - @rocket.chat/ui-video-conf@2.0.0-rc.2 + - @rocket.chat/web-ui-registration@2.0.0-rc.2 + - @rocket.chat/instance-status@0.0.13-rc.2 + +## 6.4.0-rc.1 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + - @rocket.chat/core-typings@6.4.0-rc.1 + - @rocket.chat/rest-typings@6.4.0-rc.1 + - @rocket.chat/api-client@0.1.5-rc.1 + - @rocket.chat/omnichannel-services@0.0.11-rc.1 + - @rocket.chat/pdf-worker@0.0.11-rc.1 + - @rocket.chat/presence@0.0.11-rc.1 + - @rocket.chat/core-services@0.2.0-rc.1 + - @rocket.chat/cron@0.0.7-rc.1 + - @rocket.chat/gazzodown@2.0.0-rc.1 + - @rocket.chat/model-typings@0.1.0-rc.1 + - @rocket.chat/ui-contexts@2.0.0-rc.1 + - @rocket.chat/fuselage-ui-kit@2.0.0-rc.1 + - @rocket.chat/models@0.0.11-rc.1 + - @rocket.chat/ui-theming@0.1.0-rc.0 + - @rocket.chat/ui-client@2.0.0-rc.1 + - @rocket.chat/ui-video-conf@2.0.0-rc.1 + - @rocket.chat/web-ui-registration@2.0.0-rc.1 + - @rocket.chat/instance-status@0.0.11-rc.1 + +## 6.4.0-rc.0 + +### Minor Changes + +- 239a34e877: new: ring mobile users on direct conference calls +- 04fe492555: Added new Omnichannel's trigger condition "After starting a chat". +- 4186eecf05: Introduce the ability to report an user +- 92b690d206: fix: Wrong toast message while creating a new custom sound with an existing name +- f83ea5d6e8: Added support for threaded conversation in Federated rooms. +- 682d0bc05a: fix: Time format of Retention Policy +- 1b42dfc6c1: Added a new Roles bridge to RC Apps-Engine for reading and retrieving role details. +- 2db32f0d4a: Add option to select what URL previews should be generated for each message. +- 982ef6f459: Add new event to notify users directly about new banners +- 19aec23cda: New AddUser workflow for Federated Rooms +- ebab8c4dd8: Added Reports Metrics Dashboard to Omnichannel +- 85a936220c: feat: remove enforce password fallback dependency +- 5832be2e1b: Reorganized the message menu +- 074db3b419: UX improvement for the Moderation Console Context bar for viewing the reported messages. The Report reason is now displayed in the reported messages context bar. + The Moderation Action Modal confirmation description is updated to be more clear and concise. +- 357a3a50fa: feat: high-contrast theme +- 7070f00b05: feat: return all broken password policies at once +- ead7c7bef2: Fixed read receipts not getting deleted after corresponding message is deleted +- ad08c26b46: Introduced upsells for the engagement dashboard and device management admin sidebar items in CE workspaces. Additionally, restructured the admin sidebar items to enhance organization. +- 93d4912e17: fix: missing params on updateOwnBasicInfo endpoint +- ee3815fce4: feat: add ChangePassword field to Account/Security +- 1000b9b317: Fixed the issue of apps icon uneven alignment in case of missing icons inside message composer toolbar & message toolbar menu. + +### Patch Changes + +- 6d453f71ac: Translation files are requested multiple times +- cada29b6ce: fix: Managers allowed to make deactivated agent's available +- 470c29d7e9: Fixed an issue causing `queue time` to be calculated from current time when a room was closed without being served. + Now: + - For served rooms: queue time = servedBy time - queuedAt + - For not served, but open rooms = now - queuedAt + - For not served and closed rooms = closedAt - queuedAt +- ea8998602b: fix: Performance issue on `Messages.countByType` aggregation caused by unindexed property on messages collection +- a08006c9f0: feat: add sections to room header and user infos menus with menuV2 +- 203304782f: Fixed `overrideDestinationChannelEnabled` treated as a required param in `integrations.create` and `integration.update` endpoints +- 9edca67b9b: feat(apps): `ActionManagerBusyState` component for apps `ui.interaction` +- 6fa30ddcd1: Hide Reset TOTP option if 2FA is disabled +- ff7e181464: Added ability to freeze or completely disable integration scripts through envvars +- 4ce8ea89a8: fix: custom emoji upload with FileSystem method +- 87570d0fb7: New filters to the Rooms Table at `Workspace > Rooms` +- 8a59855fcf: When setting a room as read-only, do not allow previously unmuted users to send messages. +- c73f5373b8: fix: finnish translation +- f5a886a144: fixed an issue where 2fa was not working after an OAuth redirect +- 459c8574ed: Fixed issue with custom OAuth services' settings not being be fully removed +- 42644a6e44: fix: Prevent `RoomProvider.useEffect` from subscribing to room-data stream multiple times +- 9bdbc9b086: load sounds right before playing them +- 6154979119: Fix users being created without the `roles` field +- 6bcdd88531: Fixed CAS login after popup closes +- 839789c988: Fix moment timestamps language change +- f0025d4d92: Fixed message fetching method in LivechatBridge for Apps +- 9c957b9d9a: Fix pruning messages in a room results in an incorrect message counter +- 583a3149fe: fix: rejected conference calls continue to ring +- b59fd5d7fb: User information crashing for some locales +- 4349443629: Fix performance issue on Engagement Dashboard aggregation +- 69447e1864: Added ability to disable private app installation via envvar (DISABLE_PRIVATE_APP_INSTALLATION) +- 52a1aa94eb: improve: System messages for omni-visitor abandonment feature +- 7dffec2e2f: chore: Add danger variant to apps action button menus +- f0c8867bb9: Disabled call to tags enterprise endpoint when on community license +- 5e89694bfa: Fixes SAML full name updates not being mirrored to DM rooms. +- d6f0c6afe2: Fixed Importer Progress Bar progress indicator +- 177506ea91: Make user default role setting public +- 3fb2124166: Fixed misleading of 'total' in team members list inside Channel +- 5cee21468e: Fix spotlight search does not find rooms with special or non-latin characters +- cf59c8abe3: Fix engagement dashboard not showing data +- dfb9a075b3: fixed wrong user status displayed during mentioning a user in a channel +- 1fbbb6241a: Don't allow to report self messages +- 53e0c346e2: fixed scrollbar over content in Federated Room List +- 5321e87363: Fix seat counter including bots users +- 7137a193a7: feat: Add flag to disable teams mention via troubleshoot page +- 59e6fe3d2a: fixed layout changing from embedded view when navigating +- 3245a0a318: Fix LinkedIn OAuth broken +- 45a8943ed4: Removed old/deprecated Rocket.Chat Federation card from Info page +- 6eea189ec8: Fix the code that was setting email URL to an invalid value when SMTP was not set +- f5a886a144: fixed an issue where oauth login was not working with some providers +- ba24f3c21f: Fixed `default` field not being returned from the `setDefault` endpoints when setting to false +- a79f61461d: Fixed an issue where timeout for http requests in Apps-Engine bridges was too short +- 51b988b3df: Fix importer filters not working +- 5d857f462c: fix: stop blinking "Room not found" before dm creation +- db26f8a8ee: fixed an issue with the positioning of the message menu +- aaefe865a7: fix: agent role being removed upon user deactivation +- 306a5830c3: Fix `mention-here` and `mention-all` permissions not being honored +- 761cad4382: Fix CORS headers not being set for assets +- 9e5718002a: Fixed Slackbridge was not handling correctly received events from Slack anymore. Events: (Send, edit, delete, react meassages) +- 54ef89c9a7: fix: show requested filters only on requested apps view +- 1589279b79: Fix users not able to login after block time perdiod has passed +- 880ab5689c: Fixed selected departments not being displayed due to pagination +- a81bad24e0: Fixed Apps-Engine event `IPostUserCreated` execution +- 7a4fdf41f8: Fix validation in app status call that allowed Enterprise apps to be enabled in invalid environments +- e28f8d95f0: Fixed inviter not informed when inviting member to room via `/invite` slashcommand +- d47d2021ac: Fixed "teams" icon not being displayed on spotlight sidebar search +- 93d5a5ceb8: fix: User timezone not being respected on Current Chat's filter +- f556518fa1: Change SAU aggregation to consider only sessions from few days ago instead of the whole past. + + This is particularly important for large workspaces in case the cron job did not run for some time, in that case the amount of sessions would accumulate and the aggregation would take a long time to run. + +- b747f3d3bc: Fixed unable to create admin user using ADMIN\_\* environment variables +- 2cf2643399: Fixed failing user data exports +- ace35997a6: chore: Increase cache time from 5s to 10s on `getUnits` helpers. This should reduce the number of DB calls made by this method to fetch the unit limitations for a user. +- f5a886a144: fixed an issue on oauth login that caused missing emails to be detected as changed data +- 61128364d6: Fixes a problem where the calculated time for considering the visitor abandonment was the first message from the visitor and not the visitor's reply to the agent. +- 9496f1eb97: Deprecate `livechat:getOverviewData` and `livechat:getAgentOverviewData` methods and create API endpoints `livechat/analytics/overview` and `livechat/analytics/agent-overview` to fetch analytics data +- 01dec055a0: Fixed Accounts profile form name change was not working +- e4837a15ed: Fixed user mentioning when prepending the username with `>` +- d45365436e: Use group filter when set to LDAP sync process +- c536a4a237: fix: Missing padding on Omnichannel contacts Contextualbar loading state +- 87e4a4aa56: Fixes a problem that allowed users to send empty spaces as comment to bypass the "comment required" setting +- 69a5213afc: Fixed an issue where a mailer error was being sent to customers using offline message's form on Omnichannel instead of the translated one +- b8f3d5014f: Fixed the login page language switcher, now the component has a new look, is reactive and the language selection becomes concrete upon login in. Also changed the default language of the login page to be the browser language. +- 22cf158c43: fixed the unread messages mark not showing +- 72a34a02f7: fixed the video recorder window not closing after permission is denied. +- Updated dependencies [239a34e877] +- Updated dependencies [203304782f] +- Updated dependencies [1246a21648] +- Updated dependencies [4186eecf05] +- Updated dependencies [8a59855fcf] +- Updated dependencies [f9a748526d] +- Updated dependencies [5cee21468e] +- Updated dependencies [dc1d8ce92e] +- Updated dependencies [2db32f0d4a] +- Updated dependencies [982ef6f459] +- Updated dependencies [ba24f3c21f] +- Updated dependencies [19aec23cda] +- Updated dependencies [ebab8c4dd8] +- Updated dependencies [aaefe865a7] +- Updated dependencies [074db3b419] +- Updated dependencies [357a3a50fa] +- Updated dependencies [f556518fa1] +- Updated dependencies [ead7c7bef2] +- Updated dependencies [61128364d6] +- Updated dependencies [9496f1eb97] +- Updated dependencies [dce4a829fa] +- Updated dependencies [d45365436e] +- Updated dependencies [b8f3d5014f] +- Updated dependencies [93d4912e17] +- Updated dependencies [ee3815fce4] + - @rocket.chat/core-typings@6.4.0-rc.0 + - @rocket.chat/rest-typings@6.4.0-rc.0 + - @rocket.chat/fuselage-ui-kit@2.0.0-rc.0 + - @rocket.chat/model-typings@0.1.0-rc.0 + - @rocket.chat/core-services@0.2.0-rc.0 + - @rocket.chat/ui-client@2.0.0-rc.0 + - @rocket.chat/ui-contexts@2.0.0-rc.0 + - @rocket.chat/ui-theming@0.1.0-rc.0 + - @rocket.chat/i18n@0.0.2-rc.0 + - @rocket.chat/web-ui-registration@2.0.0-rc.0 + - @rocket.chat/api-client@0.1.5-rc.0 + - @rocket.chat/omnichannel-services@0.0.11-rc.0 + - @rocket.chat/pdf-worker@0.0.11-rc.0 + - @rocket.chat/presence@0.0.11-rc.0 + - @rocket.chat/cron@0.0.7-rc.0 + - @rocket.chat/gazzodown@2.0.0-rc.0 + - @rocket.chat/models@0.0.11-rc.0 + - @rocket.chat/ui-video-conf@2.0.0-rc.0 + - @rocket.chat/base64@1.0.12 + - @rocket.chat/instance-status@0.0.11-rc.0 + - @rocket.chat/random@1.2.1 + - @rocket.chat/sha256@1.0.9 + - @rocket.chat/ui-composer@0.0.1 + +## 6.3.7 + +### Patch Changes + +- f1e36a5e46: Bump @rocket.chat/meteor version. +- Bump @rocket.chat/meteor version. +- e1acdda0a3: User information crashing for some locales +- deffcb187c: Increase cron job check delay to 1 min from 5s. + + This reduces MongoDB requests introduced on 6.3. + +- Updated dependencies [c655be17ca] +- Updated dependencies [deffcb187c] + - @rocket.chat/presence@0.0.13 + - @rocket.chat/cron@0.0.9 + - @rocket.chat/core-typings@6.3.7 + - @rocket.chat/rest-typings@6.3.7 + - @rocket.chat/api-client@0.1.7 + - @rocket.chat/omnichannel-services@0.0.13 + - @rocket.chat/pdf-worker@0.0.13 + - @rocket.chat/core-services@0.1.7 + - @rocket.chat/gazzodown@1.0.7 + - @rocket.chat/model-typings@0.0.13 + - @rocket.chat/ui-contexts@1.0.7 + - @rocket.chat/fuselage-ui-kit@1.0.7 + - @rocket.chat/models@0.0.13 + - @rocket.chat/ui-theming@0.0.1 + - @rocket.chat/ui-client@1.0.7 + - @rocket.chat/ui-video-conf@1.0.7 + - @rocket.chat/web-ui-registration@1.0.7 + - @rocket.chat/instance-status@0.0.13 + +## 6.3.6 + +### Patch Changes + +- 3bbe12e850: Bump @rocket.chat/meteor version. +- Bump @rocket.chat/meteor version. +- 285e591a73: Fix engagement dashboard not showing data + - @rocket.chat/core-typings@6.3.6 + - @rocket.chat/rest-typings@6.3.6 + - @rocket.chat/api-client@0.1.6 + - @rocket.chat/omnichannel-services@0.0.12 + - @rocket.chat/pdf-worker@0.0.12 + - @rocket.chat/presence@0.0.12 + - @rocket.chat/core-services@0.1.6 + - @rocket.chat/cron@0.0.8 + - @rocket.chat/gazzodown@1.0.6 + - @rocket.chat/model-typings@0.0.12 + - @rocket.chat/ui-contexts@1.0.6 + - @rocket.chat/fuselage-ui-kit@1.0.6 + - @rocket.chat/models@0.0.12 + - @rocket.chat/ui-theming@0.0.1 + - @rocket.chat/ui-client@1.0.6 + - @rocket.chat/ui-video-conf@1.0.6 + - @rocket.chat/web-ui-registration@1.0.6 + - @rocket.chat/instance-status@0.0.12 + +## 6.3.5 + +### Patch Changes + +- 4cb0b6ba6f: Bump @rocket.chat/meteor version. +- Bump @rocket.chat/meteor version. +- f75564c449: Fix a bug that prevented the error message from being shown in the private app installation page +- 03923405e8: Fixed selected departments not being displayed due to pagination +- 92d25b9c7a: Change SAU aggregation to consider only sessions from few days ago instead of the whole past. + + This is particularly important for large workspaces in case the cron job did not run for some time, in that case the amount of sessions would accumulate and the aggregation would take a long time to run. + +- Updated dependencies [92d25b9c7a] + - @rocket.chat/model-typings@0.0.11 + - @rocket.chat/omnichannel-services@0.0.11 + - @rocket.chat/models@0.0.11 + - @rocket.chat/presence@0.0.11 + - @rocket.chat/core-services@0.1.5 + - @rocket.chat/cron@0.0.7 + - @rocket.chat/instance-status@0.0.11 + - @rocket.chat/core-typings@6.3.5 + - @rocket.chat/rest-typings@6.3.5 + - @rocket.chat/api-client@0.1.5 + - @rocket.chat/pdf-worker@0.0.11 + - @rocket.chat/gazzodown@1.0.5 + - @rocket.chat/ui-contexts@1.0.5 + - @rocket.chat/fuselage-ui-kit@1.0.5 + - @rocket.chat/ui-theming@0.0.1 + - @rocket.chat/ui-client@1.0.5 + - @rocket.chat/ui-video-conf@1.0.5 + - @rocket.chat/web-ui-registration@1.0.5 + +## 6.3.4 + +### Patch Changes + +- db919f9b23: Bump @rocket.chat/meteor version. +- Bump @rocket.chat/meteor version. +- ebeb088441: fix: Prevent `RoomProvider.useEffect` from subscribing to room-data stream multiple times +- 8a7d5d3898: fix: agent role being removed upon user deactivation +- 759fe2472a: chore: Increase cache time from 5s to 10s on `getUnits` helpers. This should reduce the number of DB calls made by this method to fetch the unit limitations for a user. +- Updated dependencies [8a7d5d3898] + - @rocket.chat/model-typings@0.0.10 + - @rocket.chat/omnichannel-services@0.0.10 + - @rocket.chat/models@0.0.10 + - @rocket.chat/presence@0.0.10 + - @rocket.chat/core-services@0.1.4 + - @rocket.chat/cron@0.0.6 + - @rocket.chat/instance-status@0.0.10 + - @rocket.chat/core-typings@6.3.4 + - @rocket.chat/rest-typings@6.3.4 + - @rocket.chat/api-client@0.1.4 + - @rocket.chat/pdf-worker@0.0.10 + - @rocket.chat/gazzodown@1.0.4 + - @rocket.chat/ui-contexts@1.0.4 + - @rocket.chat/fuselage-ui-kit@1.0.4 + - @rocket.chat/ui-theming@0.0.1 + - @rocket.chat/ui-client@1.0.4 + - @rocket.chat/ui-video-conf@1.0.4 + - @rocket.chat/web-ui-registration@1.0.4 + +## 6.3.3 + +### Patch Changes + +- bcf147f515: Bump @rocket.chat/meteor version. +- Bump @rocket.chat/meteor version. +- c2fe38cb34: Added ability to disable private app installation via envvar (DISABLE_PRIVATE_APP_INSTALLATION) +- ded9666f27: Fix CORS headers not being set for assets +- f25081bc8a: Removed an unused authentication flow + - @rocket.chat/core-typings@6.3.3 + - @rocket.chat/rest-typings@6.3.3 + - @rocket.chat/api-client@0.1.3 + - @rocket.chat/omnichannel-services@0.0.9 + - @rocket.chat/pdf-worker@0.0.9 + - @rocket.chat/presence@0.0.9 + - @rocket.chat/core-services@0.1.3 + - @rocket.chat/cron@0.0.5 + - @rocket.chat/gazzodown@1.0.3 + - @rocket.chat/model-typings@0.0.9 + - @rocket.chat/ui-contexts@1.0.3 + - @rocket.chat/fuselage-ui-kit@1.0.3 + - @rocket.chat/models@0.0.9 + - @rocket.chat/ui-theming@0.0.1 + - @rocket.chat/ui-client@1.0.3 + - @rocket.chat/ui-video-conf@1.0.3 + - @rocket.chat/web-ui-registration@1.0.3 + - @rocket.chat/instance-status@0.0.9 + ## 6.3.2 ### Patch Changes diff --git a/apps/meteor/app/api/server/v1/users.ts b/apps/meteor/app/api/server/v1/users.ts index a4e3f974ac65..b23d41255c3b 100644 --- a/apps/meteor/app/api/server/v1/users.ts +++ b/apps/meteor/app/api/server/v1/users.ts @@ -126,7 +126,9 @@ API.v1.addRoute( realname: this.bodyParams.data.name, username: this.bodyParams.data.username, nickname: this.bodyParams.data.nickname, + bio: this.bodyParams.data.bio, statusText: this.bodyParams.data.statusText, + statusType: this.bodyParams.data.statusType, newPassword: this.bodyParams.data.newPassword, typedPassword: this.bodyParams.data.currentPassword, }; diff --git a/apps/meteor/app/cloud/server/functions/checkUserHasCloudLogin.ts b/apps/meteor/app/cloud/server/functions/checkUserHasCloudLogin.ts index 033f2e3b94da..a17c71d80dc9 100644 --- a/apps/meteor/app/cloud/server/functions/checkUserHasCloudLogin.ts +++ b/apps/meteor/app/cloud/server/functions/checkUserHasCloudLogin.ts @@ -3,9 +3,9 @@ import { Users } from '@rocket.chat/models'; import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; export async function checkUserHasCloudLogin(userId: string) { - const { connectToCloud, workspaceRegistered } = await retrieveRegistrationStatus(); + const { workspaceRegistered } = await retrieveRegistrationStatus(); - if (!connectToCloud || !workspaceRegistered) { + if (!workspaceRegistered) { return false; } diff --git a/apps/meteor/app/cloud/server/functions/connectWorkspace.ts b/apps/meteor/app/cloud/server/functions/connectWorkspace.ts index 3c8a587fa558..8223522e2723 100644 --- a/apps/meteor/app/cloud/server/functions/connectWorkspace.ts +++ b/apps/meteor/app/cloud/server/functions/connectWorkspace.ts @@ -1,18 +1,11 @@ -import { Settings } from '@rocket.chat/models'; import { serverFetch as fetch } from '@rocket.chat/server-fetch'; import { SystemLogger } from '../../../../server/lib/logger/system'; import { settings } from '../../../settings/server'; import { getRedirectUri } from './getRedirectUri'; -import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; import { saveRegistrationData } from './saveRegistrationData'; export async function connectWorkspace(token: string) { - const { connectToCloud } = await retrieveRegistrationStatus(); - if (!connectToCloud) { - await Settings.updateValueById('Register_Server', true); - } - // shouldn't get here due to checking this on the method // but this is just to double check if (!token) { diff --git a/apps/meteor/app/cloud/server/functions/disconnectWorkspace.ts b/apps/meteor/app/cloud/server/functions/disconnectWorkspace.ts deleted file mode 100644 index c72a96297f37..000000000000 --- a/apps/meteor/app/cloud/server/functions/disconnectWorkspace.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Settings } from '@rocket.chat/models'; - -import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; -import { syncWorkspace } from './syncWorkspace'; - -export async function disconnectWorkspace() { - const { connectToCloud } = await retrieveRegistrationStatus(); - if (!connectToCloud) { - return true; - } - - await Settings.updateValueById('Register_Server', false); - - await syncWorkspace(true); - - return true; -} diff --git a/apps/meteor/app/cloud/server/functions/getUserCloudAccessToken.ts b/apps/meteor/app/cloud/server/functions/getUserCloudAccessToken.ts index d7d87417e349..bf39a50b6234 100644 --- a/apps/meteor/app/cloud/server/functions/getUserCloudAccessToken.ts +++ b/apps/meteor/app/cloud/server/functions/getUserCloudAccessToken.ts @@ -11,9 +11,9 @@ import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; import { userLoggedOut } from './userLoggedOut'; export async function getUserCloudAccessToken(userId: string, forceNew = false, scope = '', save = true) { - const { connectToCloud, workspaceRegistered } = await retrieveRegistrationStatus(); + const { workspaceRegistered } = await retrieveRegistrationStatus(); - if (!connectToCloud || !workspaceRegistered) { + if (!workspaceRegistered) { return ''; } diff --git a/apps/meteor/app/cloud/server/functions/getWorkspaceAccessToken.ts b/apps/meteor/app/cloud/server/functions/getWorkspaceAccessToken.ts index 1a69d108ae4c..2b731ef82757 100644 --- a/apps/meteor/app/cloud/server/functions/getWorkspaceAccessToken.ts +++ b/apps/meteor/app/cloud/server/functions/getWorkspaceAccessToken.ts @@ -11,9 +11,9 @@ import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; * @returns string */ export async function getWorkspaceAccessToken(forceNew = false, scope = '', save = true) { - const { connectToCloud, workspaceRegistered } = await retrieveRegistrationStatus(); + const { workspaceRegistered } = await retrieveRegistrationStatus(); - if (!connectToCloud || !workspaceRegistered) { + if (!workspaceRegistered) { return ''; } diff --git a/apps/meteor/app/cloud/server/functions/getWorkspaceAccessTokenWithScope.ts b/apps/meteor/app/cloud/server/functions/getWorkspaceAccessTokenWithScope.ts index 4a0c4b5fe394..351b4cba20e5 100644 --- a/apps/meteor/app/cloud/server/functions/getWorkspaceAccessTokenWithScope.ts +++ b/apps/meteor/app/cloud/server/functions/getWorkspaceAccessTokenWithScope.ts @@ -8,11 +8,11 @@ import { removeWorkspaceRegistrationInfo } from './removeWorkspaceRegistrationIn import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; export async function getWorkspaceAccessTokenWithScope(scope = '') { - const { connectToCloud, workspaceRegistered } = await retrieveRegistrationStatus(); + const { workspaceRegistered } = await retrieveRegistrationStatus(); const tokenResponse = { token: '', expiresAt: new Date() }; - if (!connectToCloud || !workspaceRegistered) { + if (!workspaceRegistered) { return tokenResponse; } diff --git a/apps/meteor/app/cloud/server/functions/getWorkspaceKey.ts b/apps/meteor/app/cloud/server/functions/getWorkspaceKey.ts index f3b6dfc4238a..639f29402fe9 100644 --- a/apps/meteor/app/cloud/server/functions/getWorkspaceKey.ts +++ b/apps/meteor/app/cloud/server/functions/getWorkspaceKey.ts @@ -2,9 +2,9 @@ import { settings } from '../../../settings/server'; import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; export async function getWorkspaceKey() { - const { connectToCloud, workspaceRegistered } = await retrieveRegistrationStatus(); + const { workspaceRegistered } = await retrieveRegistrationStatus(); - if (!connectToCloud || !workspaceRegistered) { + if (!workspaceRegistered) { return false; } diff --git a/apps/meteor/app/cloud/server/functions/retrieveRegistrationStatus.ts b/apps/meteor/app/cloud/server/functions/retrieveRegistrationStatus.ts index 55698f4d27af..0291534ac637 100644 --- a/apps/meteor/app/cloud/server/functions/retrieveRegistrationStatus.ts +++ b/apps/meteor/app/cloud/server/functions/retrieveRegistrationStatus.ts @@ -3,7 +3,6 @@ import { Users } from '@rocket.chat/models'; import { settings } from '../../../settings/server'; export async function retrieveRegistrationStatus(): Promise<{ - connectToCloud: boolean; workspaceRegistered: boolean; workspaceId: string; uniqueId: string; @@ -11,7 +10,6 @@ export async function retrieveRegistrationStatus(): Promise<{ email: string; }> { const info = { - connectToCloud: settings.get('Register_Server'), workspaceRegistered: !!settings.get('Cloud_Workspace_Client_Id') && !!settings.get('Cloud_Workspace_Client_Secret'), workspaceId: settings.get('Cloud_Workspace_Id'), uniqueId: settings.get('uniqueID'), diff --git a/apps/meteor/app/cloud/server/functions/startRegisterWorkspace.ts b/apps/meteor/app/cloud/server/functions/startRegisterWorkspace.ts index de9fafc99065..af74fcd7d211 100644 --- a/apps/meteor/app/cloud/server/functions/startRegisterWorkspace.ts +++ b/apps/meteor/app/cloud/server/functions/startRegisterWorkspace.ts @@ -8,8 +8,8 @@ import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; import { syncWorkspace } from './syncWorkspace'; export async function startRegisterWorkspace(resend = false) { - const { workspaceRegistered, connectToCloud } = await retrieveRegistrationStatus(); - if ((workspaceRegistered && connectToCloud) || process.env.TEST_MODE) { + const { workspaceRegistered } = await retrieveRegistrationStatus(); + if (workspaceRegistered || process.env.TEST_MODE) { await syncWorkspace(true); return true; diff --git a/apps/meteor/app/cloud/server/functions/syncWorkspace.ts b/apps/meteor/app/cloud/server/functions/syncWorkspace.ts index 9337fd0a0172..c8a323e40f95 100644 --- a/apps/meteor/app/cloud/server/functions/syncWorkspace.ts +++ b/apps/meteor/app/cloud/server/functions/syncWorkspace.ts @@ -10,9 +10,9 @@ import { getWorkspaceAccessToken } from './getWorkspaceAccessToken'; import { getWorkspaceLicense } from './getWorkspaceLicense'; import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; -export async function syncWorkspace(reconnectCheck = false) { - const { workspaceRegistered, connectToCloud } = await retrieveRegistrationStatus(); - if (!workspaceRegistered || (!connectToCloud && !reconnectCheck)) { +export async function syncWorkspace(_reconnectCheck = false) { + const { workspaceRegistered } = await retrieveRegistrationStatus(); + if (!workspaceRegistered) { return false; } diff --git a/apps/meteor/app/cloud/server/functions/userLogout.ts b/apps/meteor/app/cloud/server/functions/userLogout.ts index e03f96df679d..7dd4aa094535 100644 --- a/apps/meteor/app/cloud/server/functions/userLogout.ts +++ b/apps/meteor/app/cloud/server/functions/userLogout.ts @@ -7,9 +7,9 @@ import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; import { userLoggedOut } from './userLoggedOut'; export async function userLogout(userId: string): Promise { - const { connectToCloud, workspaceRegistered } = await retrieveRegistrationStatus(); + const { workspaceRegistered } = await retrieveRegistrationStatus(); - if (!connectToCloud || !workspaceRegistered) { + if (!workspaceRegistered) { return ''; } diff --git a/apps/meteor/app/cloud/server/index.ts b/apps/meteor/app/cloud/server/index.ts index 4bb1f634978e..c7e783d4d5aa 100644 --- a/apps/meteor/app/cloud/server/index.ts +++ b/apps/meteor/app/cloud/server/index.ts @@ -2,7 +2,6 @@ import { cronJobs } from '@rocket.chat/cron'; import { Meteor } from 'meteor/meteor'; import { SystemLogger } from '../../../server/lib/logger/system'; -import { settings } from '../../settings/server'; import { connectWorkspace } from './functions/connectWorkspace'; import { getWorkspaceAccessToken } from './functions/getWorkspaceAccessToken'; import { getWorkspaceAccessTokenWithScope } from './functions/getWorkspaceAccessTokenWithScope'; @@ -13,24 +12,6 @@ import './methods'; const licenseCronName = 'Cloud Workspace Sync'; Meteor.startup(async () => { - // run token/license sync if registered - let TroubleshootDisableWorkspaceSync: boolean; - settings.watch('Troubleshoot_Disable_Workspace_Sync', async (value) => { - if (TroubleshootDisableWorkspaceSync === value) { - return; - } - TroubleshootDisableWorkspaceSync = value; - - if (value) { - return cronJobs.remove(licenseCronName); - } - - setImmediate(() => syncWorkspace()); - await cronJobs.add(licenseCronName, '0 */12 * * *', async () => { - await syncWorkspace(); - }); - }); - const { workspaceRegistered } = await retrieveRegistrationStatus(); if (process.env.REG_TOKEN && process.env.REG_TOKEN !== '' && !workspaceRegistered) { @@ -43,9 +24,14 @@ Meteor.startup(async () => { console.log('Successfully registered with token provided by REG_TOKEN!'); } catch (e: any) { - SystemLogger.error('An error occured registering with token.', e.message); + SystemLogger.error('An error occurred registering with token.', e.message); } } + + setImmediate(() => syncWorkspace()); + await cronJobs.add(licenseCronName, '0 */12 * * *', async () => { + await syncWorkspace(); + }); }); export { getWorkspaceAccessToken, getWorkspaceAccessTokenWithScope }; diff --git a/apps/meteor/app/cloud/server/methods.ts b/apps/meteor/app/cloud/server/methods.ts index d2fbac1af881..89e7b99e7146 100644 --- a/apps/meteor/app/cloud/server/methods.ts +++ b/apps/meteor/app/cloud/server/methods.ts @@ -6,7 +6,6 @@ import { hasPermissionAsync } from '../../authorization/server/functions/hasPerm import { buildWorkspaceRegistrationData } from './functions/buildRegistrationData'; import { checkUserHasCloudLogin } from './functions/checkUserHasCloudLogin'; import { connectWorkspace } from './functions/connectWorkspace'; -import { disconnectWorkspace } from './functions/disconnectWorkspace'; import { finishOAuthAuthorization } from './functions/finishOAuthAuthorization'; import { getOAuthAuthorizationUrl } from './functions/getOAuthAuthorizationUrl'; import { reconnectWorkspace } from './functions/reconnectWorkspace'; @@ -19,7 +18,6 @@ declare module '@rocket.chat/ui-contexts' { // eslint-disable-next-line @typescript-eslint/naming-convention interface ServerMethods { 'cloud:checkRegisterStatus': () => { - connectToCloud: boolean; workspaceRegistered: boolean; workspaceId: string; uniqueId: string; @@ -137,22 +135,6 @@ Meteor.methods({ return connectWorkspace(token); }, - async 'cloud:disconnectWorkspace'() { - const uid = Meteor.userId(); - if (!uid) { - throw new Meteor.Error('error-invalid-user', 'Invalid user', { - method: 'cloud:connectServer', - }); - } - - if (!(await hasPermissionAsync(uid, 'manage-cloud'))) { - throw new Meteor.Error('error-not-authorized', 'Not authorized', { - method: 'cloud:connectServer', - }); - } - - return disconnectWorkspace(); - }, async 'cloud:reconnectWorkspace'() { const uid = Meteor.userId(); if (!uid) { diff --git a/apps/meteor/app/cors/server/cors.ts b/apps/meteor/app/cors/server/cors.ts index 69a0b557ee64..03a42e45a17b 100644 --- a/apps/meteor/app/cors/server/cors.ts +++ b/apps/meteor/app/cors/server/cors.ts @@ -79,7 +79,7 @@ WebApp.rawConnectHandlers.use((_req: http.IncomingMessage, res: http.ServerRespo const _staticFilesMiddleware = WebAppInternals.staticFilesMiddleware; // @ts-expect-error - accessing internal property of webapp -WebAppInternals._staticFilesMiddleware = function ( +WebAppInternals.staticFilesMiddleware = function ( staticFiles: StaticFiles, req: http.IncomingMessage, res: http.ServerResponse, diff --git a/apps/meteor/app/custom-sounds/client/lib/CustomSounds.ts b/apps/meteor/app/custom-sounds/client/lib/CustomSounds.ts index 4ff220b38b6f..a4f59136a1f9 100644 --- a/apps/meteor/app/custom-sounds/client/lib/CustomSounds.ts +++ b/apps/meteor/app/custom-sounds/client/lib/CustomSounds.ts @@ -42,7 +42,7 @@ class CustomSoundsClass { const audio = document.createElement('audio'); audio.id = getCustomSoundId(sound._id); - audio.preload = 'auto'; + audio.preload = 'none'; audio.appendChild(source); document.body.appendChild(audio); diff --git a/apps/meteor/app/federation/server/endpoints/dispatch.js b/apps/meteor/app/federation/server/endpoints/dispatch.js index cf9e91b44af9..59ffcb0f342f 100644 --- a/apps/meteor/app/federation/server/endpoints/dispatch.js +++ b/apps/meteor/app/federation/server/endpoints/dispatch.js @@ -457,8 +457,8 @@ const eventHandlers = { // Denormalize user const denormalizedUser = normalizers.denormalizeUser(user); - // Mute user - await Rooms.unmuteUsernameByRoomId(roomId, denormalizedUser.username); + // Unmute user + await Rooms.unmuteMutedUsernameByRoomId(roomId, denormalizedUser.username); } return eventResult; diff --git a/apps/meteor/app/importer/server/classes/ImportDataConverter.ts b/apps/meteor/app/importer/server/classes/ImportDataConverter.ts index dea6bbb845d1..f241879cdc67 100644 --- a/apps/meteor/app/importer/server/classes/ImportDataConverter.ts +++ b/apps/meteor/app/importer/server/classes/ImportDataConverter.ts @@ -445,8 +445,6 @@ export class ImportDataConverter { public async convertUsers({ beforeImportFn, afterImportFn, onErrorFn, afterBatchFn }: IConversionCallbacks = {}): Promise { const users = (await this.getUsersToImport()) as IImportUserRecord[]; - await callbacks.run('beforeUserImport', { userCount: users.length }); - const insertedIds = new Set(); const updatedIds = new Set(); let skippedCount = 0; diff --git a/apps/meteor/app/importer/server/classes/ImporterBase.js b/apps/meteor/app/importer/server/classes/ImporterBase.js index 47b5c91cd3dc..061644130a66 100644 --- a/apps/meteor/app/importer/server/classes/ImporterBase.js +++ b/apps/meteor/app/importer/server/classes/ImporterBase.js @@ -3,6 +3,7 @@ import { Settings, ImportData, Imports } from '@rocket.chat/models'; import AdmZip from 'adm-zip'; import { Selection, SelectionChannel, SelectionUser } from '..'; +import { callbacks } from '../../../../lib/callbacks'; import { t } from '../../../utils/lib/i18n'; import { ImporterInfo } from '../../lib/ImporterInfo'; import { ProgressStep, ImportPreparingStartedStates } from '../../lib/ImporterProgressStep'; @@ -96,7 +97,7 @@ export class Base { this.reloadCount(); const started = Date.now(); - const beforeImportFn = async (data, type) => { + const beforeImportFn = async ({ data, dataType: type }) => { if (this.importRecord.valid === false) { this.converter.aborted = true; throw new Error('The import operation is no longer valid.'); @@ -130,7 +131,7 @@ export class Base { } } - return true; + return false; }; const afterImportFn = async () => { @@ -167,6 +168,8 @@ export class Base { await this.applySettingValues({}); await this.updateProgress(ProgressStep.IMPORTING_USERS); + const usersToImport = importSelection.users.filter((user) => user.do_import); + await callbacks.run('beforeUserImport', { userCount: usersToImport.length }); await this.converter.convertUsers({ beforeImportFn, afterImportFn, onErrorFn, afterBatchFn }); await this.updateProgress(ProgressStep.IMPORTING_CHANNELS); diff --git a/apps/meteor/app/integrations/server/methods/incoming/addIncomingIntegration.ts b/apps/meteor/app/integrations/server/methods/incoming/addIncomingIntegration.ts index 307e83f7aef7..bf84957ba8ea 100644 --- a/apps/meteor/app/integrations/server/methods/incoming/addIncomingIntegration.ts +++ b/apps/meteor/app/integrations/server/methods/incoming/addIncomingIntegration.ts @@ -32,7 +32,7 @@ export const addIncomingIntegration = async (userId: string, integration: INewIn alias: Match.Maybe(String), emoji: Match.Maybe(String), scriptEnabled: Boolean, - overrideDestinationChannelEnabled: Boolean, + overrideDestinationChannelEnabled: Match.Maybe(Boolean), script: Match.Maybe(String), avatar: Match.Maybe(String), }), @@ -92,6 +92,7 @@ export const addIncomingIntegration = async (userId: string, integration: INewIn ...integration, type: 'webhook-incoming', channel: channels, + overrideDestinationChannelEnabled: integration.overrideDestinationChannelEnabled ?? false, token: Random.id(48), userId: user._id, _createdAt: new Date(), diff --git a/apps/meteor/app/integrations/server/methods/incoming/updateIncomingIntegration.ts b/apps/meteor/app/integrations/server/methods/incoming/updateIncomingIntegration.ts index 5e5fe67f3977..b865c72e0cca 100644 --- a/apps/meteor/app/integrations/server/methods/incoming/updateIncomingIntegration.ts +++ b/apps/meteor/app/integrations/server/methods/incoming/updateIncomingIntegration.ts @@ -171,7 +171,9 @@ Meteor.methods({ script: integration.script, scriptEnabled: integration.scriptEnabled, }), - overrideDestinationChannelEnabled: integration.overrideDestinationChannelEnabled, + ...(typeof integration.overrideDestinationChannelEnabled !== 'undefined' && { + overrideDestinationChannelEnabled: integration.overrideDestinationChannelEnabled, + }), _updatedAt: new Date(), _updatedBy: await Users.findOne({ _id: this.userId }, { projection: { username: 1 } }), }, diff --git a/apps/meteor/app/lib/server/functions/getFullUserData.ts b/apps/meteor/app/lib/server/functions/getFullUserData.ts index c04148c07ba8..0703b24d9210 100644 --- a/apps/meteor/app/lib/server/functions/getFullUserData.ts +++ b/apps/meteor/app/lib/server/functions/getFullUserData.ts @@ -21,6 +21,7 @@ const defaultFields = { avatarETag: 1, extension: 1, federated: 1, + statusLivechat: 1, } as const; const fullFields = { diff --git a/apps/meteor/app/lib/server/functions/saveUser.js b/apps/meteor/app/lib/server/functions/saveUser.js index f912626c833e..42438be4ab7a 100644 --- a/apps/meteor/app/lib/server/functions/saveUser.js +++ b/apps/meteor/app/lib/server/functions/saveUser.js @@ -15,6 +15,7 @@ import * as Mailer from '../../../mailer/server/api'; import { settings } from '../../../settings/server'; import { safeGetMeteorUser } from '../../../utils/server/functions/safeGetMeteorUser'; import { validateEmailDomain } from '../lib'; +import { generatePassword } from '../lib/generatePassword'; import { passwordPolicy } from '../lib/passwordPolicy'; import { checkEmailAvailability } from './checkEmailAvailability'; import { checkUsernameAvailability } from './checkUsernameAvailability'; @@ -344,7 +345,7 @@ export const saveUser = async function (userId, userData) { if (userData.hasOwnProperty('setRandomPassword')) { if (userData.setRandomPassword) { - userData.password = passwordPolicy.generatePassword(); + userData.password = generatePassword(); userData.requirePasswordChange = true; sendPassword = true; } diff --git a/apps/meteor/app/lib/server/lib/generatePassword.ts b/apps/meteor/app/lib/server/lib/generatePassword.ts new file mode 100644 index 000000000000..bf8d2474b7a7 --- /dev/null +++ b/apps/meteor/app/lib/server/lib/generatePassword.ts @@ -0,0 +1,31 @@ +import generator from 'generate-password'; + +import { passwordPolicy } from './passwordPolicy'; + +export const generatePassword = (): string => { + const policies = passwordPolicy.getPasswordPolicy(); + + const maxLength: number = (policies.policy.find(([key]) => key === 'get-password-policy-maxLength')?.[1]?.maxLength as number) || -1; + const minLength: number = (policies.policy.find(([key]) => key === 'get-password-policy-minLength')?.[1]?.minLength as number) || -1; + + const length = Math.min(Math.max(minLength, 12), maxLength > 0 ? maxLength : Number.MAX_SAFE_INTEGER); + + if (policies.enabled) { + for (let i = 0; i < 10; i++) { + const password = generator.generate({ + length, + ...(policies.policy && { numbers: true }), + ...(policies.policy.some(([key]) => key === 'get-password-policy-mustContainAtLeastOneSpecialCharacter') && { symbols: true }), + ...(policies.policy.some(([key]) => key === 'get-password-policy-mustContainAtLeastOneLowercase') && { lowercase: true }), + ...(policies.policy.some(([key]) => key === 'get-password-policy-mustContainAtLeastOneUppercase') && { uppercase: true }), + strict: true, + }); + + if (passwordPolicy.validate(password)) { + return password; + } + } + } + + return generator.generate({ length: 17 }); +}; diff --git a/apps/meteor/app/lib/server/lib/passwordPolicy.js b/apps/meteor/app/lib/server/lib/passwordPolicy.js deleted file mode 100644 index 57490d1712c1..000000000000 --- a/apps/meteor/app/lib/server/lib/passwordPolicy.js +++ /dev/null @@ -1,32 +0,0 @@ -import { settings } from '../../../settings/server'; -import PasswordPolicy from './PasswordPolicyClass'; - -export const passwordPolicy = new PasswordPolicy(); - -settings.watch('Accounts_Password_Policy_Enabled', (value) => { - passwordPolicy.enabled = value; -}); -settings.watch('Accounts_Password_Policy_MinLength', (value) => { - passwordPolicy.minLength = value; -}); -settings.watch('Accounts_Password_Policy_MaxLength', (value) => { - passwordPolicy.maxLength = value; -}); -settings.watch('Accounts_Password_Policy_ForbidRepeatingCharacters', (value) => { - passwordPolicy.forbidRepeatingCharacters = value; -}); -settings.watch('Accounts_Password_Policy_ForbidRepeatingCharactersCount', (value) => { - passwordPolicy.forbidRepeatingCharactersCount = value; -}); -settings.watch('Accounts_Password_Policy_AtLeastOneLowercase', (value) => { - passwordPolicy.mustContainAtLeastOneLowercase = value; -}); -settings.watch('Accounts_Password_Policy_AtLeastOneUppercase', (value) => { - passwordPolicy.mustContainAtLeastOneUppercase = value; -}); -settings.watch('Accounts_Password_Policy_AtLeastOneNumber', (value) => { - passwordPolicy.mustContainAtLeastOneNumber = value; -}); -settings.watch('Accounts_Password_Policy_AtLeastOneSpecialCharacter', (value) => { - passwordPolicy.mustContainAtLeastOneSpecialCharacter = value; -}); diff --git a/apps/meteor/app/lib/server/lib/passwordPolicy.ts b/apps/meteor/app/lib/server/lib/passwordPolicy.ts new file mode 100644 index 000000000000..b40447ca56ab --- /dev/null +++ b/apps/meteor/app/lib/server/lib/passwordPolicy.ts @@ -0,0 +1,64 @@ +import { PasswordPolicy } from '@rocket.chat/password-policies'; + +import { settings } from '../../../settings/server'; + +const enabled = false; +const minLength = -1; +const maxLength = -1; +const forbidRepeatingCharacters = false; +const forbidRepeatingCharactersCount = 3; +const mustContainAtLeastOneLowercase = false; +const mustContainAtLeastOneUppercase = false; +const mustContainAtLeastOneNumber = false; +const mustContainAtLeastOneSpecialCharacter = false; + +export let passwordPolicy = new PasswordPolicy({ + enabled, + minLength, + maxLength, + forbidRepeatingCharacters, + forbidRepeatingCharactersCount, + mustContainAtLeastOneLowercase, + mustContainAtLeastOneUppercase, + mustContainAtLeastOneNumber, + mustContainAtLeastOneSpecialCharacter, + throwError: true, +}); + +settings.watchMultiple( + [ + 'Accounts_Password_Policy_Enabled', + 'Accounts_Password_Policy_MinLength', + 'Accounts_Password_Policy_MaxLength', + 'Accounts_Password_Policy_ForbidRepeatingCharacters', + 'Accounts_Password_Policy_ForbidRepeatingCharactersCount', + 'Accounts_Password_Policy_AtLeastOneLowercase', + 'Accounts_Password_Policy_AtLeastOneUppercase', + 'Accounts_Password_Policy_AtLeastOneNumber', + 'Accounts_Password_Policy_AtLeastOneSpecialCharacter', + ], + ([ + enabled, + minLength, + maxLength, + forbidRepeatingCharacters, + forbidRepeatingCharactersCount, + mustContainAtLeastOneLowercase, + mustContainAtLeastOneUppercase, + mustContainAtLeastOneNumber, + mustContainAtLeastOneSpecialCharacter, + ]) => { + passwordPolicy = new PasswordPolicy({ + enabled: Boolean(enabled), + minLength: Number(minLength), + maxLength: Number(maxLength), + forbidRepeatingCharacters: Boolean(forbidRepeatingCharacters), + forbidRepeatingCharactersCount: Number(forbidRepeatingCharactersCount), + mustContainAtLeastOneLowercase: Boolean(mustContainAtLeastOneLowercase), + mustContainAtLeastOneUppercase: Boolean(mustContainAtLeastOneUppercase), + mustContainAtLeastOneNumber: Boolean(mustContainAtLeastOneNumber), + mustContainAtLeastOneSpecialCharacter: Boolean(mustContainAtLeastOneSpecialCharacter), + throwError: true, + }); + }, +); diff --git a/apps/meteor/app/lib/server/methods/removeOAuthService.ts b/apps/meteor/app/lib/server/methods/removeOAuthService.ts index 1be3edeb2caa..6d1bb688979d 100644 --- a/apps/meteor/app/lib/server/methods/removeOAuthService.ts +++ b/apps/meteor/app/lib/server/methods/removeOAuthService.ts @@ -61,6 +61,7 @@ Meteor.methods({ Settings.removeById(`Accounts_OAuth_Custom-${name}-channels_admin`), Settings.removeById(`Accounts_OAuth_Custom-${name}-map_channels`), Settings.removeById(`Accounts_OAuth_Custom-${name}-groups_channel_map`), + Settings.removeById(`Accounts_OAuth_Custom-${name}-merge_users_distinct_services`), ]); }, }); diff --git a/apps/meteor/app/lib/server/startup/oAuthServicesUpdate.js b/apps/meteor/app/lib/server/startup/oAuthServicesUpdate.js index 397c3a491c5d..b01ef2f9fb0c 100644 --- a/apps/meteor/app/lib/server/startup/oAuthServicesUpdate.js +++ b/apps/meteor/app/lib/server/startup/oAuthServicesUpdate.js @@ -97,7 +97,7 @@ async function _OAuthServicesUpdate() { if (serviceName === 'Linkedin') { data.clientConfig = { - requestPermissions: ['r_liteprofile', 'r_emailaddress'], + requestPermissions: ['openid', 'email', 'profile'], }; } diff --git a/apps/meteor/app/livechat/server/api/v1/agent.ts b/apps/meteor/app/livechat/server/api/v1/agent.ts index b13c48bb579d..7a7b70ea7c8b 100644 --- a/apps/meteor/app/livechat/server/api/v1/agent.ts +++ b/apps/meteor/app/livechat/server/api/v1/agent.ts @@ -73,16 +73,21 @@ API.v1.addRoute( const agentId = inputAgentId || this.userId; - const agent = await Users.findOneAgentById>(agentId, { + const agent = await Users.findOneAgentById>(agentId, { projection: { status: 1, statusLivechat: 1, + active: 1, }, }); if (!agent) { return API.v1.notFound('Agent not found'); } + if (!agent.active) { + return API.v1.failure('error-user-deactivated'); + } + const newStatus: ILivechatAgentStatus = status || (agent.statusLivechat === ILivechatAgentStatus.AVAILABLE ? ILivechatAgentStatus.NOT_AVAILABLE : ILivechatAgentStatus.AVAILABLE); diff --git a/apps/meteor/app/livechat/server/api/v1/webhooks.ts b/apps/meteor/app/livechat/server/api/v1/webhooks.ts index dceb19ed0420..e282e2bd548b 100644 --- a/apps/meteor/app/livechat/server/api/v1/webhooks.ts +++ b/apps/meteor/app/livechat/server/api/v1/webhooks.ts @@ -66,7 +66,7 @@ API.v1.addRoute( const webhookUrl = settings.get('Livechat_webhookUrl'); if (!webhookUrl) { - return API.v1.failure('Webhook URL is not set'); + return API.v1.failure('Webhook_URL_not_set'); } try { diff --git a/apps/meteor/app/livechat/server/business-hour/AbstractBusinessHour.ts b/apps/meteor/app/livechat/server/business-hour/AbstractBusinessHour.ts index 2c5ffe38169d..55de5bbf6315 100644 --- a/apps/meteor/app/livechat/server/business-hour/AbstractBusinessHour.ts +++ b/apps/meteor/app/livechat/server/business-hour/AbstractBusinessHour.ts @@ -1,13 +1,10 @@ -import { ILivechatAgentStatus } from '@rocket.chat/core-typings'; -import type { ILivechatBusinessHour, ILivechatDepartment } from '@rocket.chat/core-typings'; +import type { ILivechatAgentStatus, ILivechatBusinessHour, ILivechatDepartment } from '@rocket.chat/core-typings'; import type { ILivechatBusinessHoursModel, IUsersModel } from '@rocket.chat/model-typings'; import { LivechatBusinessHours, Users } from '@rocket.chat/models'; import moment from 'moment-timezone'; import type { UpdateFilter } from 'mongodb'; import type { IWorkHoursCronJobsWrapper } from '../../../../server/models/raw/LivechatBusinessHours'; -import { businessHourLogger } from '../lib/logger'; -import { filterBusinessHoursThatMustBeOpened } from './Helper'; export interface IBusinessHourBehavior { findHoursToCreateJobs(): Promise; @@ -61,29 +58,6 @@ export abstract class AbstractBusinessHourBehavior { { livechatStatusSystemModified: true }, ); } - - async onNewAgentCreated(agentId: string): Promise { - businessHourLogger.debug(`Executing onNewAgentCreated for agentId: ${agentId}`); - - const defaultBusinessHour = await LivechatBusinessHours.findOneDefaultBusinessHour(); - if (!defaultBusinessHour) { - businessHourLogger.debug(`No default business hour found for agentId: ${agentId}`); - return; - } - - const businessHourToOpen = await filterBusinessHoursThatMustBeOpened([defaultBusinessHour]); - if (!businessHourToOpen.length) { - businessHourLogger.debug( - `No business hour to open found for agentId: ${agentId}. Default business hour is closed. Setting agentId: ${agentId} to status: ${ILivechatAgentStatus.NOT_AVAILABLE}`, - ); - await Users.setLivechatStatus(agentId, ILivechatAgentStatus.NOT_AVAILABLE); - return; - } - - await Users.addBusinessHourByAgentIds([agentId], defaultBusinessHour._id); - - businessHourLogger.debug(`Setting agentId: ${agentId} to status: ${ILivechatAgentStatus.AVAILABLE}`); - } } export abstract class AbstractBusinessHourType { diff --git a/apps/meteor/app/livechat/server/business-hour/Single.ts b/apps/meteor/app/livechat/server/business-hour/Single.ts index 63135fa53224..d899f2717376 100644 --- a/apps/meteor/app/livechat/server/business-hour/Single.ts +++ b/apps/meteor/app/livechat/server/business-hour/Single.ts @@ -1,9 +1,10 @@ -import { LivechatBusinessHourTypes } from '@rocket.chat/core-typings'; +import { ILivechatAgentStatus, LivechatBusinessHourTypes } from '@rocket.chat/core-typings'; +import { LivechatBusinessHours, Users } from '@rocket.chat/models'; import { businessHourLogger } from '../lib/logger'; import type { IBusinessHourBehavior } from './AbstractBusinessHour'; import { AbstractBusinessHourBehavior } from './AbstractBusinessHour'; -import { openBusinessHourDefault } from './Helper'; +import { filterBusinessHoursThatMustBeOpened, openBusinessHourDefault } from './Helper'; export class SingleBusinessHourBehavior extends AbstractBusinessHourBehavior implements IBusinessHourBehavior { async openBusinessHoursByDayAndHour(): Promise { @@ -26,6 +27,35 @@ export class SingleBusinessHourBehavior extends AbstractBusinessHourBehavior imp return openBusinessHourDefault(); } + async onNewAgentCreated(agentId: string): Promise { + const defaultBusinessHour = await LivechatBusinessHours.findOneDefaultBusinessHour(); + if (!defaultBusinessHour) { + businessHourLogger.debug('No default business hour found for agentId', { + agentId, + }); + return; + } + + const businessHourToOpen = await filterBusinessHoursThatMustBeOpened([defaultBusinessHour]); + if (!businessHourToOpen.length) { + businessHourLogger.debug({ + msg: 'No business hours found. Moving agent to NOT_AVAILABLE status', + agentId, + newStatus: ILivechatAgentStatus.NOT_AVAILABLE, + }); + await Users.setLivechatStatus(agentId, ILivechatAgentStatus.NOT_AVAILABLE); + return; + } + + await Users.addBusinessHourByAgentIds([agentId], defaultBusinessHour._id); + + businessHourLogger.debug({ + msg: 'Business hours found. Moving agent to AVAILABLE status', + agentId, + newStatus: ILivechatAgentStatus.AVAILABLE, + }); + } + afterSaveBusinessHours(): Promise { return openBusinessHourDefault(); } diff --git a/apps/meteor/app/livechat/server/hooks/afterUserActions.ts b/apps/meteor/app/livechat/server/hooks/afterUserActions.ts index 50fe5846637b..30900481c4e2 100644 --- a/apps/meteor/app/livechat/server/hooks/afterUserActions.ts +++ b/apps/meteor/app/livechat/server/hooks/afterUserActions.ts @@ -1,4 +1,5 @@ -import type { IUser } from '@rocket.chat/core-typings'; +import { type IUser } from '@rocket.chat/core-typings'; +import { Users } from '@rocket.chat/models'; import { callbacks } from '../../../../lib/callbacks'; import { Livechat } from '../lib/Livechat'; @@ -33,8 +34,11 @@ const handleAgentCreated = async (user: IUser) => { const handleDeactivateUser = async (user: IUser) => { if (wasAgent(user)) { - callbackLogger.debug('Removing agent', user._id); - await Livechat.removeAgent(user.username); + callbackLogger.debug({ + msg: 'Removing agent extension & making agent unavailable', + userId: user._id, + }); + await Users.makeAgentUnavailableAndUnsetExtension(user._id); } }; diff --git a/apps/meteor/app/livechat/server/hooks/markRoomResponded.ts b/apps/meteor/app/livechat/server/hooks/markRoomResponded.ts index 5467e517768e..5ebf924e7334 100644 --- a/apps/meteor/app/livechat/server/hooks/markRoomResponded.ts +++ b/apps/meteor/app/livechat/server/hooks/markRoomResponded.ts @@ -1,3 +1,4 @@ +import type { IOmnichannelRoom } from '@rocket.chat/core-typings'; import { isOmnichannelRoom, isEditedMessage } from '@rocket.chat/core-typings'; import { LivechatRooms } from '@rocket.chat/models'; @@ -15,28 +16,39 @@ callbacks.add( return message; } + // skips this callback if the message is a system message + if (message.t) { + return message; + } + // if the message has a token, it was sent by the visitor, so ignore it if (message.token) { return message; } - if (room.responseBy) { - await LivechatRooms.setAgentLastMessageTs(room._id); - } - // check if room is yet awaiting for response - if (!(typeof room.t !== 'undefined' && room.t === 'l' && room.waitingResponse)) { + // check if room is yet awaiting for response from visitor + if (!room.waitingResponse) { + // case where agent sends second message or any subsequent message in a room before visitor responds to the first message + // in this case, we just need to update the lastMessageTs of the responseBy object + if (room.responseBy) { + await LivechatRooms.setAgentLastMessageTs(room._id); + } return message; } - await LivechatRooms.setResponseByRoomId(room._id, { - user: { - _id: message.u._id, - username: message.u.username, - }, - }); + // This is the first message from agent after visitor had last responded + const responseBy: IOmnichannelRoom['responseBy'] = room.responseBy || { + _id: message.u._id, + username: message.u.username, + firstResponseTs: new Date(message.ts), + lastMessageTs: new Date(message.ts), + }; + + // this unsets waitingResponse and sets responseBy object + await LivechatRooms.setResponseByRoomId(room._id, responseBy); return message; }, - callbacks.priority.LOW, + callbacks.priority.HIGH, 'markRoomResponded', ); diff --git a/apps/meteor/app/mentions/server/getMentionedTeamMembers.ts b/apps/meteor/app/mentions/server/getMentionedTeamMembers.ts new file mode 100644 index 000000000000..b1355c90cb93 --- /dev/null +++ b/apps/meteor/app/mentions/server/getMentionedTeamMembers.ts @@ -0,0 +1,35 @@ +import { Team } from '@rocket.chat/core-services'; +import type { IMessage } from '@rocket.chat/core-typings'; + +import { callbacks } from '../../../lib/callbacks'; +import { settings } from '../../settings/server'; + +interface IExtraDataForNotification { + userMentions: any[]; + otherMentions: any[]; + message: IMessage; +} + +const beforeGetMentions = async (mentionIds: string[], extra?: IExtraDataForNotification) => { + const { otherMentions } = extra ?? {}; + + const teamIds = otherMentions?.filter(({ type }) => type === 'team').map(({ _id }) => _id); + + if (!teamIds?.length) { + return mentionIds; + } + + const members = await Team.getMembersByTeamIds(teamIds, { projection: { userId: 1 } }); + mentionIds.push(...new Set(members.map(({ userId }) => userId).filter((userId) => !mentionIds.includes(userId)))); + + return mentionIds; +}; + +settings.watch('Troubleshoot_Disable_Teams_Mention', (value) => { + if (value) { + callbacks.remove('beforeGetMentions', 'before-get-mentions-get-teams'); + return; + } + + callbacks.add('beforeGetMentions', beforeGetMentions, callbacks.priority.MEDIUM, 'before-get-mentions-get-teams'); +}); diff --git a/apps/meteor/app/mentions/server/index.ts b/apps/meteor/app/mentions/server/index.ts index 474d41a439e1..a04af05b9db1 100644 --- a/apps/meteor/app/mentions/server/index.ts +++ b/apps/meteor/app/mentions/server/index.ts @@ -1,2 +1,3 @@ -import './server'; +import './getMentionedTeamMembers'; import './methods/getUserMentionsByChannel'; +import './server'; diff --git a/apps/meteor/app/mentions/server/server.ts b/apps/meteor/app/mentions/server/server.ts index 5eb70aae4656..13765e99d856 100644 --- a/apps/meteor/app/mentions/server/server.ts +++ b/apps/meteor/app/mentions/server/server.ts @@ -1,5 +1,5 @@ -import { api } from '@rocket.chat/core-services'; -import type { IUser, IRoom } from '@rocket.chat/core-typings'; +import { api, Team } from '@rocket.chat/core-services'; +import type { IUser, IRoom, ITeam } from '@rocket.chat/core-typings'; import { Subscriptions, Users, Rooms } from '@rocket.chat/models'; import { Meteor } from 'meteor/meteor'; @@ -9,16 +9,32 @@ import { settings } from '../../settings/server'; import MentionsServer from './Mentions'; export class MentionQueries { - async getUsers(usernames: string[]): Promise<(Pick & { type: 'user' })[]> { + async getUsers( + usernames: string[], + ): Promise<((Pick & { type: 'user' }) | (Pick & { type: 'team' }))[]> { + const uniqueUsernames = [...new Set(usernames)]; + const teams = await Team.listByNames(uniqueUsernames, { projection: { name: 1 } }); + const users = await Users.find( - { username: { $in: [...new Set(usernames)] } }, + { username: { $in: uniqueUsernames } }, { projection: { _id: true, username: true, name: 1 } }, ).toArray(); - return users.map((user) => ({ + const taggedUsers = users.map((user) => ({ ...user, - type: 'user', + type: 'user' as const, })); + + if (settings.get('Troubleshoot_Disable_Teams_Mention')) { + return taggedUsers; + } + + const taggedTeams = teams.map((team) => ({ + ...team, + type: 'team' as const, + })); + + return [...taggedUsers, ...taggedTeams]; } async getUser(userId: string): Promise { diff --git a/apps/meteor/app/oembed/server/server.ts b/apps/meteor/app/oembed/server/server.ts index 3bf1ae3245be..256722cdd3d4 100644 --- a/apps/meteor/app/oembed/server/server.ts +++ b/apps/meteor/app/oembed/server/server.ts @@ -290,7 +290,7 @@ const rocketUrlParser = async function (message: IMessage): Promise { log.debug('URLs found', message.urls.length); if ( - message.attachments || + (message.attachments && message.attachments.length > 0) || message.urls.filter((item) => !item.url.includes(settings.get('Site_Url'))).length > MAX_EXTERNAL_URL_PREVIEWS ) { log.debug('All URL ignored'); @@ -330,7 +330,7 @@ const rocketUrlParser = async function (message: IMessage): Promise { changed = true; } } - if (attachments.length) { + if (attachments.length > 0) { await Messages.setMessageAttachments(message._id, attachments); } if (changed === true) { diff --git a/apps/meteor/app/statistics/server/lib/SAUMonitor.ts b/apps/meteor/app/statistics/server/lib/SAUMonitor.ts index b77a268fe114..b3aa68337106 100644 --- a/apps/meteor/app/statistics/server/lib/SAUMonitor.ts +++ b/apps/meteor/app/statistics/server/lib/SAUMonitor.ts @@ -46,7 +46,7 @@ export class SAUMonitorClass { constructor() { this._started = false; this._dailyComputeJobName = 'aggregate-sessions'; - this._dailyFinishSessionsJobName = 'aggregate-sessions'; + this._dailyFinishSessionsJobName = 'finish-sessions'; } async start(): Promise { @@ -318,33 +318,19 @@ export class SAUMonitorClass { return; } - logger.info('[aggregate] - Aggregating data.'); + const today = new Date(); - const date = new Date(); - date.setDate(date.getDate() - 0); // yesterday - const yesterday = getDateObj(date); + // get sessions from 3 days ago to make sure even if a few cron jobs were skipped, we still have the data + const threeDaysAgo = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 3, 0, 0, 0, 0); - for await (const record of aggregates.dailySessionsOfYesterday(Sessions.col, yesterday)) { - await Sessions.updateOne( - { _id: `${record.userId}-${record.year}-${record.month}-${record.day}` }, - { $set: record }, - { upsert: true }, - ); + const period = { start: getDateObj(threeDaysAgo), end: getDateObj(today) }; + + logger.info({ msg: '[aggregate] - Aggregating data.', period }); + + for await (const record of aggregates.dailySessions(Sessions.col, period)) { + await Sessions.updateDailySessionById(`${record.userId}-${record.year}-${record.month}-${record.day}`, record); } - await Sessions.updateMany( - { - type: 'session', - year: { $lte: yesterday.year }, - month: { $lte: yesterday.month }, - day: { $lte: yesterday.day }, - }, - { - $set: { - type: 'computed-session', - _computedAt: new Date(), - }, - }, - ); + await Sessions.updateAllSessionsByDateToComputed(period); } } diff --git a/apps/meteor/app/theme/client/imports/general/base_old.css b/apps/meteor/app/theme/client/imports/general/base_old.css index 6d9f5631fc6a..7f1ede6067fc 100644 --- a/apps/meteor/app/theme/client/imports/general/base_old.css +++ b/apps/meteor/app/theme/client/imports/general/base_old.css @@ -988,10 +988,6 @@ font-size: 12px; font-weight: 300; } - - & div.switch-language { - margin-top: 20px; - } } & .share { diff --git a/apps/meteor/app/utils/lib/i18n.ts b/apps/meteor/app/utils/lib/i18n.ts index 309585ee284b..13d5c667709d 100644 --- a/apps/meteor/app/utils/lib/i18n.ts +++ b/apps/meteor/app/utils/lib/i18n.ts @@ -5,9 +5,7 @@ import { isObject } from '../../../lib/utils/isObject'; export const i18n = i18next.use(sprintf); -export const addSprinfToI18n = function (t: (typeof i18n)['t']): typeof t & { - (key: string, ...replaces: any): string; -} { +export const addSprinfToI18n = function (t: (typeof i18n)['t']) { return function (key: string, ...replaces: any): string { if (replaces[0] === undefined || isObject(replaces[0])) { return t(key, ...replaces); diff --git a/apps/meteor/app/utils/rocketchat.info b/apps/meteor/app/utils/rocketchat.info index a5d2fcb9bc57..b9e235456291 100644 --- a/apps/meteor/app/utils/rocketchat.info +++ b/apps/meteor/app/utils/rocketchat.info @@ -1,3 +1,3 @@ { - "version": "6.4.0-develop" + "version": "6.5.0-develop" } diff --git a/apps/meteor/client/components/ActionManagerBusyState.tsx b/apps/meteor/client/components/ActionManagerBusyState.tsx index dcf82342917c..0374254a7de9 100644 --- a/apps/meteor/client/components/ActionManagerBusyState.tsx +++ b/apps/meteor/client/components/ActionManagerBusyState.tsx @@ -1,3 +1,4 @@ +import { css } from '@rocket.chat/css-in-js'; import { Box } from '@rocket.chat/fuselage'; import { useTranslation } from '@rocket.chat/ui-contexts'; import React, { useEffect, useState } from 'react'; @@ -23,10 +24,23 @@ const ActionManagerBusyState = () => { if (busy) { return ( - - - {t('Loading')} - + + {t('Loading')} ); } diff --git a/apps/meteor/client/components/GazzodownText.tsx b/apps/meteor/client/components/GazzodownText.tsx index 7912e44ad925..76868f84e3af 100644 --- a/apps/meteor/client/components/GazzodownText.tsx +++ b/apps/meteor/client/components/GazzodownText.tsx @@ -49,6 +49,7 @@ const GazzodownText = ({ mentions, channels, searchText, children }: GazzodownTe const useEmoji = Boolean(useUserPreference('useEmojis')); const useRealName = Boolean(useSetting('UI_Use_Real_Name')); const ownUserId = useUserId(); + const showMentionSymbol = Boolean(useUserPreference('mentionsWithSymbol')); const chat = useChat(); @@ -122,6 +123,7 @@ const GazzodownText = ({ mentions, channels, searchText, children }: GazzodownTe useRealName, isMobile, ownUserId, + showMentionSymbol, }} > {children} diff --git a/apps/meteor/client/components/GenericMenu/GenericMenu.tsx b/apps/meteor/client/components/GenericMenu/GenericMenu.tsx index e02d6dc4e746..f660b4b85f35 100644 --- a/apps/meteor/client/components/GenericMenu/GenericMenu.tsx +++ b/apps/meteor/client/components/GenericMenu/GenericMenu.tsx @@ -1,5 +1,4 @@ -import type { IconButton } from '@rocket.chat/fuselage'; -import { MenuItem, MenuSection, MenuV2 } from '@rocket.chat/fuselage'; +import { IconButton, MenuItem, MenuSection, MenuV2 } from '@rocket.chat/fuselage'; import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ComponentProps, ReactNode } from 'react'; import React from 'react'; @@ -43,6 +42,12 @@ const GenericMenu = ({ title, icon = 'menu', onAction, ...props }: GenericMenuPr const handleItems = (items: GenericMenuItemProps[]) => hasIcon ? items.map((item) => ({ ...item, gap: !item.icon && !item.status })) : items; + const isMenuEmpty = !(sections && sections.length > 0) && !(items && items.length > 0); + + if (isMenuEmpty) { + return ; + } + return ( <> {sections && ( diff --git a/apps/meteor/client/components/Omnichannel/hooks/useDepartmentsList.ts b/apps/meteor/client/components/Omnichannel/hooks/useDepartmentsList.ts index 3b39ea79d42f..fd3c0a29effe 100644 --- a/apps/meteor/client/components/Omnichannel/hooks/useDepartmentsList.ts +++ b/apps/meteor/client/components/Omnichannel/hooks/useDepartmentsList.ts @@ -20,7 +20,6 @@ type DepartmentListItem = { _id: string; label: string; value: string; - _updatedAt: Date; }; export const useDepartmentsList = ( @@ -66,7 +65,6 @@ export const useDepartmentsList = ( _id, label: department.archived ? `${name} [${t('Archived')}]` : name, value: _id, - _updatedAt: new Date(_updatedAt || ''), }; }); @@ -75,7 +73,6 @@ export const useDepartmentsList = ( _id: '', label: t('All'), value: 'all', - _updatedAt: new Date(), }); options.haveNone && @@ -83,7 +80,6 @@ export const useDepartmentsList = ( _id: '', label: t('None'), value: '', - _updatedAt: new Date(), }); return { diff --git a/apps/meteor/client/components/Omnichannel/hooks/useLivechatTags.ts b/apps/meteor/client/components/Omnichannel/hooks/useLivechatTags.ts index 4bd85be40342..ce5704b66482 100644 --- a/apps/meteor/client/components/Omnichannel/hooks/useLivechatTags.ts +++ b/apps/meteor/client/components/Omnichannel/hooks/useLivechatTags.ts @@ -1,6 +1,8 @@ import { useEndpoint } from '@rocket.chat/ui-contexts'; import { useQuery } from '@tanstack/react-query'; +import { useOmnichannel } from '../../../hooks/omnichannel/useOmnichannel'; + type Props = { department?: string; text?: string; @@ -9,13 +11,19 @@ type Props = { export const useLivechatTags = (options: Props) => { const getTags = useEndpoint('GET', '/v1/livechat/tags'); + const { isEnterprise } = useOmnichannel(); const { department, text, viewAll } = options; - return useQuery(['/v1/livechat/tags', text, department], () => - getTags({ - text: text || '', - ...(department && { department }), - viewAll: viewAll ? 'true' : 'false', - }), + return useQuery( + ['/v1/livechat/tags', text, department], + () => + getTags({ + text: text || '', + ...(department && { department }), + viewAll: viewAll ? 'true' : 'false', + }), + { + enabled: isEnterprise, + }, ); }; diff --git a/apps/meteor/client/components/RoomAutoCompleteMultiple/RoomAutoCompleteMultiple.tsx b/apps/meteor/client/components/RoomAutoCompleteMultiple/RoomAutoCompleteMultiple.tsx index 7026c6cab35f..eb0414e7da14 100644 --- a/apps/meteor/client/components/RoomAutoCompleteMultiple/RoomAutoCompleteMultiple.tsx +++ b/apps/meteor/client/components/RoomAutoCompleteMultiple/RoomAutoCompleteMultiple.tsx @@ -49,8 +49,8 @@ const RoomAutoCompleteMultiple = ({ value, onChange, ...props }: RoomAutoComplet filter={filter} setFilter={setFilter} multiple - renderSelected={({ selected: { value, label }, onRemove }): ReactElement => ( - + renderSelected={({ selected: { value, label }, onRemove, ...props }): ReactElement => ( + {label?.name} diff --git a/apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultiple.tsx b/apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultiple.tsx index dfda12cdd2e4..857af5e9c43f 100644 --- a/apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultiple.tsx +++ b/apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultiple.tsx @@ -31,7 +31,7 @@ const UserAutoCompleteMultiple = ({ onChange, ...props }: UserAutoCompleteMultip setFilter={setFilter} onChange={onChange} multiple - renderSelected={({ selected: { value, label }, onRemove }): ReactElement => ( + renderSelected={({ selected: { value, label }, onRemove, ...props }): ReactElement => ( diff --git a/apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleFederated.tsx b/apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleFederated.tsx index 7ee1078c859d..457593e2c5db 100644 --- a/apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleFederated.tsx +++ b/apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultipleFederated.tsx @@ -2,7 +2,7 @@ import { MultiSelectFiltered, Icon, Box, Chip } from '@rocket.chat/fuselage'; import { useDebouncedValue } from '@rocket.chat/fuselage-hooks'; import { useEndpoint } from '@rocket.chat/ui-contexts'; import { useQuery } from '@tanstack/react-query'; -import type { ReactElement } from 'react'; +import type { ReactElement, AllHTMLAttributes } from 'react'; import React, { memo, useState, useCallback, useMemo } from 'react'; import UserAvatar from '../avatar/UserAvatar'; @@ -12,7 +12,7 @@ type UserAutoCompleteMultipleFederatedProps = { onChange: (value: Array) => void; value: Array; placeholder?: string; -}; +} & Omit, 'is' | 'onChange'>; type UserAutoCompleteOptionType = { name: string; @@ -93,17 +93,18 @@ const UserAutoCompleteMultipleFederated = ({ return ( void }): ReactElement => { + renderSelected={({ value, onMouseDown }: { value: string; onMouseDown: () => void }) => { const currentCachedOption = selectedCache[value] || {}; return ( - + {currentCachedOption._federated ? : } {currentCachedOption.name || currentCachedOption.username || value} diff --git a/apps/meteor/client/components/message/MessageToolboxHolder.tsx b/apps/meteor/client/components/message/MessageToolboxHolder.tsx index 54f4ebab823d..06a9fbf42b77 100644 --- a/apps/meteor/client/components/message/MessageToolboxHolder.tsx +++ b/apps/meteor/client/components/message/MessageToolboxHolder.tsx @@ -2,7 +2,7 @@ import type { IMessage } from '@rocket.chat/core-typings'; import { MessageToolboxWrapper } from '@rocket.chat/fuselage'; import { useQuery } from '@tanstack/react-query'; import type { ReactElement } from 'react'; -import React, { Suspense, lazy, memo, useRef } from 'react'; +import React, { Suspense, lazy, memo, useRef, useState } from 'react'; import type { MessageActionContext } from '../../../app/ui-utils/client/lib/MessageAction'; import { useChat } from '../../views/room/contexts/ChatContext'; @@ -18,7 +18,10 @@ const MessageToolbox = lazy(() => import('./toolbox/MessageToolbox')); const MessageToolboxHolder = ({ message, context }: MessageToolboxHolderProps): ReactElement => { const ref = useRef(null); - const [visible] = useIsVisible(ref); + const [isVisible] = useIsVisible(ref); + const [kebabOpen, setKebabOpen] = useState(false); + + const showToolbox = isVisible || kebabOpen; const chat = useChat(); @@ -32,10 +35,11 @@ const MessageToolboxHolder = ({ message, context }: MessageToolboxHolderProps): }); return ( - - {visible && depsQueryResult.isSuccess && depsQueryResult.data.room && ( + + {showToolbox && depsQueryResult.isSuccess && depsQueryResult.data.room && ( { - for (let element = descendant ?? document.body; element !== document.body; element = element.parentElement ?? document.body) { - if ( - getComputedStyle(element).transform !== 'none' || - getComputedStyle(element).position === 'fixed' || - getComputedStyle(element).willChange === 'transform' - ) { - return element; - } - } - - return document.body; -}; - -const useDropdownPosition = (reference: RefObject, target: RefObject) => { - const innerContainer = getDropdownContainer(reference.current); - const boundingRect = innerContainer.getBoundingClientRect(); - - const { style } = usePosition(reference, target, { - placement: 'bottom-end', - container: innerContainer, - }); - - const left = `${parseFloat(String(style?.left ?? '0')) - boundingRect.left}px`; - const top = `${parseFloat(String(style?.top ?? '0')) - boundingRect.top}px`; - - return useMemo(() => ({ ...style, left, top }), [style, left, top]); -}; +import React, { forwardRef } from 'react'; type DesktopToolboxDropdownProps = { children: ReactNode; @@ -41,15 +11,12 @@ const DesktopToolboxDropdown = forwardRef(function ToolboxDropdownDesktop( { reference, children }: DesktopToolboxDropdownProps, ref: Ref, ) { - const targetRef = useRef(null); - const mergedRef = useMergedRefs(ref, targetRef); - - const style = useDropdownPosition(reference, targetRef); - return ( - - {children} - + + + {children} + + ); }); diff --git a/apps/meteor/client/components/message/toolbox/MessageActionMenu.tsx b/apps/meteor/client/components/message/toolbox/MessageActionMenu.tsx index 3d1796083112..54a320ebf3d7 100644 --- a/apps/meteor/client/components/message/toolbox/MessageActionMenu.tsx +++ b/apps/meteor/client/components/message/toolbox/MessageActionMenu.tsx @@ -1,7 +1,7 @@ -import { Box, MessageToolboxItem, Option, OptionDivider, OptionTitle } from '@rocket.chat/fuselage'; +import { MessageToolboxItem, Option, OptionDivider, OptionTitle } from '@rocket.chat/fuselage'; import { useTranslation } from '@rocket.chat/ui-contexts'; import type { ComponentProps, MouseEvent, MouseEventHandler, ReactElement } from 'react'; -import React, { Fragment, useRef, useState } from 'react'; +import React, { Fragment, useCallback, useRef, useState } from 'react'; import type { MessageActionConfig } from '../../../../app/ui-utils/client/lib/MessageAction'; import { useEmbeddedLayout } from '../../../hooks/useEmbeddedLayout'; @@ -12,6 +12,7 @@ type MessageActionConfigOption = Omit void; options: MessageActionConfigOption[]; }; @@ -32,12 +33,20 @@ const getSectionOrder = (section: string): number => { } }; -const MessageActionMenu = ({ options, ...props }: MessageActionMenuProps): ReactElement => { - const ref = useRef(null); +const MessageActionMenu = ({ options, onChangeMenuVisibility, ...props }: MessageActionMenuProps): ReactElement => { + const buttonRef = useRef(null); const t = useTranslation(); const [visible, setVisible] = useState(false); const isLayoutEmbedded = useEmbeddedLayout(); + const handleChangeMenuVisibility = useCallback( + (visible: boolean): void => { + setVisible(visible); + onChangeMenuVisibility(visible); + }, + [onChangeMenuVisibility], + ); + const groupOptions = options.reduce((acc, option) => { const { type = '' } = option; @@ -62,20 +71,22 @@ const MessageActionMenu = ({ options, ...props }: MessageActionMenuProps): React return acc; }, [] as unknown as [section: string, options: Array][]); + const handleClose = useCallback(() => { + handleChangeMenuVisibility(false); + }, [handleChangeMenuVisibility]); return ( <> setVisible(!visible)} + onClick={(): void => handleChangeMenuVisibility(!visible)} data-qa-id='menu' data-qa-type='message-action-menu' title={t('More')} /> {visible && ( <> - setVisible(!visible)} /> - + {groupOptions.map(([section, options], index, arr) => ( {section === 'apps' && Apps} @@ -90,6 +101,7 @@ const MessageActionMenu = ({ options, ...props }: MessageActionMenuProps): React data-qa-type='message-action' data-qa-id={option.id} role={option.role ? option.role : 'button'} + gap={!option.icon && option.type === 'apps'} /> ))} {index !== arr.length - 1 && } diff --git a/apps/meteor/client/components/message/toolbox/MessageToolbox.tsx b/apps/meteor/client/components/message/toolbox/MessageToolbox.tsx index 82775fe0cc53..3b9cdd84c25d 100644 --- a/apps/meteor/client/components/message/toolbox/MessageToolbox.tsx +++ b/apps/meteor/client/components/message/toolbox/MessageToolbox.tsx @@ -43,9 +43,16 @@ type MessageToolboxProps = { messageContext?: MessageActionContext; room: IRoom; subscription?: ISubscription; + onChangeMenuVisibility: (visible: boolean) => void; }; -const MessageToolbox = ({ message, messageContext, room, subscription }: MessageToolboxProps): ReactElement | null => { +const MessageToolbox = ({ + message, + messageContext, + room, + subscription, + onChangeMenuVisibility, +}: MessageToolboxProps): ReactElement | null => { const t = useTranslation(); const user = useUser() ?? undefined; const settings = useSettings(); @@ -109,6 +116,7 @@ const MessageToolbox = ({ message, messageContext, room, subscription }: Message ))} {actionsQueryResult.isSuccess && actionsQueryResult.data.menu.length > 0 && ( ({ ...action, action: (e): void => action.action(e, { message, tabbar: toolbox, room, chat, autoTranslateOptions }), diff --git a/apps/meteor/client/components/message/toolbox/ToolboxDropdown.tsx b/apps/meteor/client/components/message/toolbox/ToolboxDropdown.tsx index 7347245f3efb..eee619454f77 100644 --- a/apps/meteor/client/components/message/toolbox/ToolboxDropdown.tsx +++ b/apps/meteor/client/components/message/toolbox/ToolboxDropdown.tsx @@ -1,3 +1,5 @@ +import { Box } from '@rocket.chat/fuselage'; +import { useOutsideClick } from '@rocket.chat/fuselage-hooks'; import { useLayout } from '@rocket.chat/ui-contexts'; import type { ReactNode, ReactElement } from 'react'; import React, { useRef } from 'react'; @@ -8,20 +10,27 @@ import MobileToolboxDropdown from './MobileToolboxDropdown'; type ToolboxDropdownProps = { children: ReactNode; reference: React.RefObject; + handleClose: () => void; }; const ToolboxDropdown = ({ children, + handleClose, reference, }: ToolboxDropdownProps): ReactElement => { const { isMobile } = useLayout(); const target = useRef(null); + const boxRef = useRef(null); const Dropdown = isMobile ? MobileToolboxDropdown : DesktopToolboxDropdown; + useOutsideClick([boxRef], handleClose); + return ( - {children} + + {children} + ); }; diff --git a/apps/meteor/client/hooks/useAppActionButtons.ts b/apps/meteor/client/hooks/useAppActionButtons.ts index 402c0f3c9775..28d62ef1b75a 100644 --- a/apps/meteor/client/hooks/useAppActionButtons.ts +++ b/apps/meteor/client/hooks/useAppActionButtons.ts @@ -29,9 +29,13 @@ export const useAppActionButtons = (context?: `${UIActionButtonContext}`) => { staleTime: Infinity, }); - const invalidate = useDebouncedCallback(() => { - queryClient.invalidateQueries(['apps', 'actionButtons']); - }, 100); + const invalidate = useDebouncedCallback( + () => { + queryClient.invalidateQueries(['apps', 'actionButtons']); + }, + 100, + [], + ); useEffect(() => { if (!uid) { @@ -142,6 +146,7 @@ export const useMessageActionAppsActionButtons = (context?: MessageActionContext label: Utilities.getI18nKeyForApp(action.labelI18n, action.appId), order: 7, type: 'apps', + variant: action.variant, action: (_, params) => { void actionManager.triggerActionButtonAction({ rid: params.message.rid, diff --git a/apps/meteor/client/hooks/useAppSlashCommands.ts b/apps/meteor/client/hooks/useAppSlashCommands.ts index 3cb6ff2ce090..665e76b0ef9e 100644 --- a/apps/meteor/client/hooks/useAppSlashCommands.ts +++ b/apps/meteor/client/hooks/useAppSlashCommands.ts @@ -11,9 +11,13 @@ export const useAppSlashCommands = () => { const apps = useSingleStream('apps'); const uid = useUserId(); - const invalidate = useDebouncedCallback(() => { - queryClient.invalidateQueries(['apps', 'slashCommands']); - }, 100); + const invalidate = useDebouncedCallback( + () => { + queryClient.invalidateQueries(['apps', 'slashCommands']); + }, + 100, + [], + ); useEffect(() => { if (!uid) { diff --git a/apps/meteor/client/hooks/useAppTranslations.ts b/apps/meteor/client/hooks/useAppTranslations.ts index eba0686aab55..bf4f83e48d85 100644 --- a/apps/meteor/client/hooks/useAppTranslations.ts +++ b/apps/meteor/client/hooks/useAppTranslations.ts @@ -26,9 +26,13 @@ export const useAppTranslations = () => { } }, [result.data]); - const invalidate = useDebouncedCallback(() => { - queryClient.invalidateQueries(['apps', 'translations']); - }, 100); + const invalidate = useDebouncedCallback( + () => { + queryClient.invalidateQueries(['apps', 'translations']); + }, + 100, + [], + ); useEffect(() => { if (!uid) { @@ -61,7 +65,7 @@ export const useAppTranslations = () => { // Translations keys must be scoped under app id const scopedTranslations = Object.entries(translations).reduce>((acc, [key, value]) => { acc[Utilities.getI18nKeyForApp(key, appId)] = value; - return translations; + return acc; }, {}); i18n.addResourceBundle(normalizedLanguage, 'core', scopedTranslations); diff --git a/apps/meteor/client/hooks/useTimeAgo.ts b/apps/meteor/client/hooks/useTimeAgo.ts index 2b661ae89cf3..724f61d8c7c8 100644 --- a/apps/meteor/client/hooks/useTimeAgo.ts +++ b/apps/meteor/client/hooks/useTimeAgo.ts @@ -14,7 +14,7 @@ export const useTimeAgo = (): ((time: Date | number | string) => string) => { (time) => { return moment(time).calendar(null, { sameDay: format, - lastDay: moment().calendar('lastDay').replace('LT', format), + lastDay: moment(time).calendar('lastDay').replace('LT', format), lastWeek: `dddd ${format}`, sameElse: 'LL', }); diff --git a/apps/meteor/client/lib/2fa/process2faReturn.ts b/apps/meteor/client/lib/2fa/process2faReturn.ts index e5ff73be77b1..95f7f1dcb361 100644 --- a/apps/meteor/client/lib/2fa/process2faReturn.ts +++ b/apps/meteor/client/lib/2fa/process2faReturn.ts @@ -1,10 +1,12 @@ import { SHA256 } from '@rocket.chat/sha256'; import { Meteor } from 'meteor/meteor'; +import { lazy } from 'react'; -import TwoFactorModal from '../../components/TwoFactorModal'; import { imperativeModal } from '../imperativeModal'; import { isTotpInvalidError, isTotpRequiredError } from './utils'; +const TwoFactorModal = lazy(() => import('../../components/TwoFactorModal')); + const twoFactorMethods = ['totp', 'email', 'password'] as const; type TwoFactorMethod = (typeof twoFactorMethods)[number]; diff --git a/apps/meteor/client/lib/chats/data.ts b/apps/meteor/client/lib/chats/data.ts index bd6e01458863..f2c049ad04b1 100644 --- a/apps/meteor/client/lib/chats/data.ts +++ b/apps/meteor/client/lib/chats/data.ts @@ -217,7 +217,6 @@ export const createDataAPI = ({ rid, tmid }: { rid: IRoom['_id']; tmid: IMessage const deleteMessage = async (mid: IMessage['_id']): Promise => { await sdk.call('deleteMessage', { _id: mid }); - Messages.remove({ _id: mid }); }; const drafts = new Map(); diff --git a/apps/meteor/client/lib/queryClient.ts b/apps/meteor/client/lib/queryClient.ts index ec4a10d3f76b..2bb38d001242 100644 --- a/apps/meteor/client/lib/queryClient.ts +++ b/apps/meteor/client/lib/queryClient.ts @@ -5,6 +5,7 @@ export const queryClient = new QueryClient({ queries: { onError: console.warn, refetchOnWindowFocus: false, + retry: process.env.TEST_MODE === 'true', }, mutations: { onError: console.warn, diff --git a/apps/meteor/client/main.ts b/apps/meteor/client/main.ts index bb08f0242d4f..334515980787 100644 --- a/apps/meteor/client/main.ts +++ b/apps/meteor/client/main.ts @@ -1,13 +1,15 @@ -import '../ee/client/ecdh'; -import './polyfills'; +import { FlowRouter } from 'meteor/kadira:flow-router'; -import '../lib/oauthRedirectUriClient'; -import './lib/meteorCallWrapper'; -import './importPackages'; +FlowRouter.wait(); -import '../ee/client'; -import './methods'; -import './startup'; -import './views/admin'; -import './views/marketplace'; -import './views/account'; +FlowRouter.notFound = { + action: () => undefined, +}; + +import('./polyfills') + .then(() => Promise.all([import('./lib/meteorCallWrapper'), import('../lib/oauthRedirectUriClient')])) + .then(() => import('../ee/client/ecdh')) + .then(() => import('./importPackages')) + .then(() => Promise.all([import('./methods'), import('./startup')])) + .then(() => import('../ee/client')) + .then(() => Promise.all([import('./views/admin'), import('./views/marketplace'), import('./views/account')])); diff --git a/apps/meteor/client/polyfills/index.ts b/apps/meteor/client/polyfills/index.ts index 46f5bcb8d68d..f07d828a4602 100644 --- a/apps/meteor/client/polyfills/index.ts +++ b/apps/meteor/client/polyfills/index.ts @@ -4,4 +4,3 @@ import './childNodeRemove'; import './cssVars'; import './customEventPolyfill'; import './hoverTouchClick'; -import './objectFromEntries'; diff --git a/apps/meteor/client/polyfills/objectFromEntries.ts b/apps/meteor/client/polyfills/objectFromEntries.ts deleted file mode 100644 index d59198ebd1d3..000000000000 --- a/apps/meteor/client/polyfills/objectFromEntries.ts +++ /dev/null @@ -1,5 +0,0 @@ -Object.fromEntries = - Object.fromEntries || - function fromEntries(entries: Iterable): { [k: string]: T } { - return [...entries].reduce((obj, { 0: key, 1: val }) => Object.assign(obj, { [key]: val }), {}); - }; diff --git a/apps/meteor/client/providers/AppsProvider.tsx b/apps/meteor/client/providers/AppsProvider.tsx index 6b9de2344fa7..042ce8365474 100644 --- a/apps/meteor/client/providers/AppsProvider.tsx +++ b/apps/meteor/client/providers/AppsProvider.tsx @@ -22,10 +22,14 @@ const AppsProvider: FC = ({ children }) => { const stream = useSingleStream('apps'); - const invalidate = useDebouncedCallback(() => { - queryClient.invalidateQueries(['marketplace', 'apps-instance']); - invalidateAppsCountQuery(); - }, 100); + const invalidate = useDebouncedCallback( + () => { + queryClient.invalidateQueries(['marketplace', 'apps-instance']); + invalidateAppsCountQuery(); + }, + 100, + [], + ); useEffect(() => { return stream('apps', ([key]) => { diff --git a/apps/meteor/client/providers/RouterProvider.tsx b/apps/meteor/client/providers/RouterProvider.tsx index 0dd7ee31deed..0f146ec83128 100644 --- a/apps/meteor/client/providers/RouterProvider.tsx +++ b/apps/meteor/client/providers/RouterProvider.tsx @@ -17,12 +17,6 @@ import React from 'react'; import { appLayout } from '../lib/appLayout'; import { queueMicrotask } from '../lib/utils/queueMicrotask'; -FlowRouter.wait(); - -FlowRouter.notFound = { - action: () => undefined, -}; - const subscribers = new Set<() => void>(); const listenToRouteChange = () => { diff --git a/apps/meteor/client/providers/TranslationProvider.tsx b/apps/meteor/client/providers/TranslationProvider.tsx index f09761be9a3b..fdddb9ec5349 100644 --- a/apps/meteor/client/providers/TranslationProvider.tsx +++ b/apps/meteor/client/providers/TranslationProvider.tsx @@ -122,6 +122,8 @@ const useI18next = (lng: string): typeof i18next => { }, react: { useSuspense: true, + bindI18n: 'languageChanged loaded', + bindI18nStore: 'added removed', }, interpolation: { escapeValue: false, @@ -174,7 +176,7 @@ type TranslationProviderProps = { const useAutoLanguage = () => { const serverLanguage = useSetting('Language'); const browserLanguage = filterLanguage(window.navigator.userLanguage ?? window.navigator.language); - const defaultUserLanguage = serverLanguage || browserLanguage || 'en'; + const defaultUserLanguage = browserLanguage || serverLanguage || 'en'; // if the language is supported, if not remove the region const suggestedLanguage = languages.includes(defaultUserLanguage) ? defaultUserLanguage : defaultUserLanguage.split('-').shift() ?? 'en'; @@ -209,11 +211,13 @@ const TranslationProvider = ({ children }: TranslationProviderProps): ReactEleme { en: 'Default', name: i18nextInstance.t('Default'), + ogName: i18nextInstance.t('Default'), key: '', }, ...[...new Set([...i18nextInstance.languages, ...languages])].map((key) => ({ en: key, name: getLanguageName(key, language), + ogName: getLanguageName(key, key), key, })), ], @@ -222,6 +226,7 @@ const TranslationProvider = ({ children }: TranslationProviderProps): ReactEleme useEffect(() => { if (moment.locales().includes(language.toLowerCase())) { + moment.locale(language); return; } @@ -270,6 +275,7 @@ const TranslationProviderInner = ({ availableLanguages: { en: string; name: string; + ogName: string; key: string; }[]; }): ReactElement => { diff --git a/apps/meteor/client/providers/UserProvider/UserProvider.tsx b/apps/meteor/client/providers/UserProvider/UserProvider.tsx index 912cca246328..432a197671f3 100644 --- a/apps/meteor/client/providers/UserProvider/UserProvider.tsx +++ b/apps/meteor/client/providers/UserProvider/UserProvider.tsx @@ -1,7 +1,7 @@ import type { IRoom, ISubscription, IUser } from '@rocket.chat/core-typings'; import { useLocalStorage } from '@rocket.chat/fuselage-hooks'; -import { UserContext, useEndpoint, useSetting } from '@rocket.chat/ui-contexts'; import type { LoginService, SubscriptionWithRoom } from '@rocket.chat/ui-contexts'; +import { UserContext, useEndpoint, useSetting } from '@rocket.chat/ui-contexts'; import { Meteor } from 'meteor/meteor'; import type { ContextType, ReactElement, ReactNode } from 'react'; import React, { useEffect, useMemo } from 'react'; @@ -66,11 +66,13 @@ const UserProvider = ({ children }: UserProviderProps): ReactElement => { const userId = useReactiveValue(getUserId); const user = useReactiveValue(getUser); - const [language, setLanguage] = useLocalStorage('userLanguage', user?.language ?? 'en'); + const [userLanguage, setUserLanguage] = useLocalStorage('userLanguage', ''); + const [preferedLanguage, setPreferedLanguage] = useLocalStorage('preferedLanguage', ''); const setUserPreferences = useEndpoint('POST', '/v1/users.setPreferences'); - useCreateFontStyleElement(user?.settings?.preferences?.fontSize); + const createFontStyleElement = useCreateFontStyleElement(); + createFontStyleElement(user?.settings?.preferences?.fontSize); const loginMethod: LoginMethods = (isLdapEnabled && 'loginWithLDAP') || (isCrowdEnabled && 'loginWithCrowd') || 'loginWithPassword'; @@ -167,10 +169,16 @@ const UserProvider = ({ children }: UserProviderProps): ReactElement => { ); useEffect(() => { - if (user?.language !== undefined && user.language !== language) { - setLanguage(user.language); + if (!!userId && preferedLanguage !== userLanguage) { + setUserPreferences({ data: { language: preferedLanguage } }); + setUserLanguage(preferedLanguage); + } + + if (user?.language !== undefined && user.language !== userLanguage) { + setUserLanguage(user.language); + setPreferedLanguage(user.language); } - }, [user?.language, language, setLanguage]); + }, [preferedLanguage, setPreferedLanguage, setUserLanguage, user?.language, userLanguage, userId, setUserPreferences]); const { data: license } = useIsEnterprise({ enabled: !!userId }); diff --git a/apps/meteor/client/sidebar/header/CreateChannel/CreateChannelModal.tsx b/apps/meteor/client/sidebar/header/CreateChannel/CreateChannelModal.tsx index 18023df3e39f..57ebffdbcf39 100644 --- a/apps/meteor/client/sidebar/header/CreateChannel/CreateChannelModal.tsx +++ b/apps/meteor/client/sidebar/header/CreateChannel/CreateChannelModal.tsx @@ -1,4 +1,5 @@ import { Box, Modal, Button, TextInput, Icon, Field, ToggleSwitch, FieldGroup } from '@rocket.chat/fuselage'; +import { useUniqueId } from '@rocket.chat/fuselage-hooks'; import type { TranslationKey } from '@rocket.chat/ui-contexts'; import { useSetting, @@ -48,18 +49,20 @@ const CreateChannelModal = ({ teamId = '', onClose }: CreateChannelModalProps): const e2eEnabled = useSetting('E2E_Enable'); const namesValidation = useSetting('UTF8_Channel_Names_Validation'); const allowSpecialNames = useSetting('UI_Allow_room_names_with_special_chars'); - const federationEnabled = useSetting('Federation_Matrix_enabled'); - const channelNameExists = useEndpoint('GET', '/v1/rooms.nameExists'); + const federationEnabled = useSetting('Federation_Matrix_enabled') || false; + const e2eEnabledForPrivateByDefault = useSetting('E2E_Enabled_Default_PrivateRooms'); + + const canCreateChannel = usePermission('create-c'); + const canCreatePrivateChannel = usePermission('create-p'); const channelNameRegex = useMemo(() => new RegExp(`^${namesValidation}$`), [namesValidation]); const federatedModule = useHasLicenseModule('federation'); const canUseFederation = federatedModule !== 'loading' && federatedModule && federationEnabled; + const channelNameExists = useEndpoint('GET', '/v1/rooms.nameExists'); const createChannel = useEndpoint('POST', '/v1/channels.create'); const createPrivateChannel = useEndpoint('POST', '/v1/groups.create'); - const canCreateChannel = usePermission('create-c'); - const canCreatePrivateChannel = usePermission('create-p'); - const e2eEnabledForPrivateByDefault = useSetting('E2E_Enabled_Default_PrivateRooms'); + const dispatchToastMessage = useToastMessageDispatch(); const canOnlyCreateOneType = useMemo(() => { @@ -74,12 +77,13 @@ const CreateChannelModal = ({ teamId = '', onClose }: CreateChannelModalProps): const { register, - formState: { isDirty, errors }, + formState: { errors }, handleSubmit, control, setValue, watch, } = useForm({ + mode: 'onBlur', defaultValues: { members: [], name: '', @@ -165,22 +169,37 @@ const CreateChannelModal = ({ teamId = '', onClose }: CreateChannelModalProps): [e2eEnabled, e2eEnabledForPrivateByDefault, broadcast, isPrivate], ); + const createChannelFormId = useUniqueId(); + const nameId = useUniqueId(); + const topicId = useUniqueId(); + const privateId = useUniqueId(); + const federatedId = useUniqueId(); + const readOnlyId = useUniqueId(); + const encryptedId = useUniqueId(); + const broadcastId = useUniqueId(); + const addMembersId = useUniqueId(); + return ( ) => } + aria-labelledby={`${createChannelFormId}-title`} + wrapperFunction={(props: ComponentProps) => ( + + )} > - {t('Create_channel')} - + {t('Create_channel')} + - {t('Name')} + + {t('Channel_name')} + } - placeholder={t('Channel_name')} + aria-invalid={errors.name ? 'true' : 'false'} + aria-describedby={`${nameId}-error`} + aria-required='true' /> - {errors.name && {errors.name.message}} + {errors.name && ( + + {errors.name.message} + + )} - - {t('Topic')}{' '} - - ({t('optional')}) - - + {t('Topic')} - + + {t('Channel_what_is_this_channel_about')} - {t('Private')} - + {t('Private')} + {isPrivate ? t('Only_invited_users_can_acess_this_channel') : t('Everyone_can_access_this_channel')} - + ( - + )} /> @@ -224,14 +252,21 @@ const CreateChannelModal = ({ teamId = '', onClose }: CreateChannelModalProps): - {t('Federation_Matrix_Federated')} - {t(getFederationHintKey(federatedModule, Boolean(federationEnabled)))} + {t('Federation_Matrix_Federated')} + {t(getFederationHintKey(federatedModule, federationEnabled))} ( - + )} /> @@ -239,16 +274,23 @@ const CreateChannelModal = ({ teamId = '', onClose }: CreateChannelModalProps): - {t('Read_only')} - + {t('Read_only')} + {readOnly ? t('Only_authorized_users_can_write_new_messages') : t('All_users_in_the_channel_can_write_new_messages')} - + ( - + )} /> @@ -256,8 +298,8 @@ const CreateChannelModal = ({ teamId = '', onClose }: CreateChannelModalProps): - {t('Encrypted')} - + {t('Encrypted')} + {isPrivate ? t('Encrypted_channel_Description') : t('Encrypted_not_available')} @@ -266,11 +308,12 @@ const CreateChannelModal = ({ teamId = '', onClose }: CreateChannelModalProps): name='encrypted' render={({ field: { onChange, value, ref } }): ReactElement => ( )} @@ -280,40 +323,41 @@ const CreateChannelModal = ({ teamId = '', onClose }: CreateChannelModalProps): - {t('Broadcast')} - {t('Broadcast_channel_Description')} + {t('Broadcast')} + {t('Broadcast_channel_Description')} ( - + )} /> - - {t('Add_members')}{' '} - - ({t('optional')}) - - + {t('Add_members')} ( - + )} /> - - diff --git a/apps/meteor/client/sidebar/header/CreateTeam/CreateTeamModal.tsx b/apps/meteor/client/sidebar/header/CreateTeam/CreateTeamModal.tsx index 1f12c2b59b49..9907aa788894 100644 --- a/apps/meteor/client/sidebar/header/CreateTeam/CreateTeamModal.tsx +++ b/apps/meteor/client/sidebar/header/CreateTeam/CreateTeamModal.tsx @@ -1,15 +1,16 @@ -import { Box, Modal, Button, TextInput, Field, ToggleSwitch, FieldGroup, Icon } from '@rocket.chat/fuselage'; +import { Box, Button, Field, FieldGroup, Icon, Modal, TextInput, ToggleSwitch } from '@rocket.chat/fuselage'; +import { useUniqueId } from '@rocket.chat/fuselage-hooks'; import { - useTranslation, - useSetting, - usePermission, useEndpoint, - useToastMessageDispatch, + usePermission, usePermissionWithScopedRoles, + useSetting, + useToastMessageDispatch, + useTranslation, } from '@rocket.chat/ui-contexts'; import type { ComponentProps, ReactElement } from 'react'; -import React, { memo, useMemo, useEffect } from 'react'; -import { useForm, Controller } from 'react-hook-form'; +import React, { memo, useEffect, useMemo } from 'react'; +import { Controller, useForm } from 'react-hook-form'; import UserAutoCompleteMultiple from '../../../components/UserAutoCompleteMultiple'; import { goToRoomById } from '../../../lib/utils/goToRoomById'; @@ -129,18 +130,35 @@ const CreateTeamModal = ({ onClose }: { onClose: () => void }): ReactElement => } }; + const createTeamFormId = useUniqueId(); + const nameId = useUniqueId(); + const topicId = useUniqueId(); + const privateId = useUniqueId(); + const readOnlyId = useUniqueId(); + const encryptedId = useUniqueId(); + const broadcastId = useUniqueId(); + const addMembersId = useUniqueId(); + return ( - ) => }> + ) => ( + + )} + > - {t('Teams_New_Title')} + {t('Teams_New_Title')} - {t('Teams_New_Name_Label')} + + {t('Teams_New_Name_Label')} + void }): ReactElement => placeholder={t('Team_Name')} addon={} error={errors.name?.message} + aria-describedby={`${nameId}-error`} + aria-required='true' /> - {errors?.name && {errors.name.message}} + {errors?.name && ( + + {errors.name.message} + + )} - + {t('Teams_New_Description_Label')}{' '} ({t('optional')}) - + - {t('Teams_New_Private_Label')} - + {t('Teams_New_Private_Label')} + {isPrivate ? t('Teams_New_Private_Description_Enabled') : t('Teams_New_Private_Description_Disabled')} @@ -176,7 +205,7 @@ const CreateTeamModal = ({ onClose }: { onClose: () => void }): ReactElement => control={control} name='isPrivate' render={({ field: { onChange, value, ref } }): ReactElement => ( - + )} /> @@ -184,8 +213,8 @@ const CreateTeamModal = ({ onClose }: { onClose: () => void }): ReactElement => - {t('Teams_New_Read_only_Label')} - + {t('Teams_New_Read_only_Label')} + {readOnly ? t('Only_authorized_users_can_write_new_messages') : t('Teams_New_Read_only_Description')} @@ -193,7 +222,14 @@ const CreateTeamModal = ({ onClose }: { onClose: () => void }): ReactElement => control={control} name='readOnly' render={({ field: { onChange, value, ref } }): ReactElement => ( - + )} /> @@ -201,8 +237,8 @@ const CreateTeamModal = ({ onClose }: { onClose: () => void }): ReactElement => - {t('Teams_New_Encrypted_Label')} - + {t('Teams_New_Encrypted_Label')} + {isPrivate ? t('Teams_New_Encrypted_Description_Enabled') : t('Teams_New_Encrypted_Description_Disabled')} @@ -210,7 +246,14 @@ const CreateTeamModal = ({ onClose }: { onClose: () => void }): ReactElement => control={control} name='encrypted' render={({ field: { onChange, value, ref } }): ReactElement => ( - + )} /> @@ -218,20 +261,20 @@ const CreateTeamModal = ({ onClose }: { onClose: () => void }): ReactElement => - {t('Teams_New_Broadcast_Label')} - {t('Teams_New_Broadcast_Description')} + {t('Teams_New_Broadcast_Label')} + {t('Teams_New_Broadcast_Description')} ( - + )} /> - + {t('Teams_New_Add_members_Label')}{' '} ({t('optional')}) diff --git a/apps/meteor/client/sidebar/header/actions/hooks/mockAppRoot.tsx b/apps/meteor/client/sidebar/header/actions/hooks/mockAppRoot.tsx deleted file mode 100644 index a702c27e52c4..000000000000 --- a/apps/meteor/client/sidebar/header/actions/hooks/mockAppRoot.tsx +++ /dev/null @@ -1,355 +0,0 @@ -import type { Serialized } from '@rocket.chat/core-typings'; -import type { Method, OperationParams, OperationResult, PathPattern, UrlParams } from '@rocket.chat/rest-typings'; -import type { ServerMethodName, ServerMethodParameters, ServerMethodReturn, TranslationKey } from '@rocket.chat/ui-contexts'; -import { - AuthorizationContext, - ConnectionStatusContext, - RouterContext, - ServerContext, - SettingsContext, - TranslationContext, - UserContext, - ActionManagerContext, - ModalContext, -} from '@rocket.chat/ui-contexts'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import type { WrapperComponent } from '@testing-library/react-hooks'; -import type { ObjectId } from 'mongodb'; -import type { ContextType, ReactNode } from 'react'; -import React from 'react'; - -class MockedAppRootBuilder { - private wrappers: Array<(children: ReactNode) => ReactNode> = []; - - private connectionStatus: ContextType = { - connected: true, - status: 'connected', - retryTime: undefined, - reconnect: () => undefined, - }; - - private server: ContextType = { - absoluteUrl: (path: string) => `http://localhost:3000/${path}`, - callEndpoint: (_args: { - method: TMethod; - pathPattern: TPathPattern; - keys: UrlParams; - params: OperationParams; - }): Promise>> => { - throw new Error('not implemented'); - }, - getSingleStream: () => () => () => undefined, - getStream: () => () => () => undefined, - uploadToEndpoint: () => Promise.reject(new Error('not implemented')), - callMethod: () => Promise.reject(new Error('not implemented')), - info: undefined, - }; - - private router: ContextType = { - buildRoutePath: () => '/', - defineRoutes: () => () => undefined, - getLocationPathname: () => '/', - getLocationSearch: () => '', - getRouteName: () => undefined, - getRouteParameters: () => ({}), - getRoutes: () => [], - getSearchParameters: () => ({}), - navigate: () => undefined, - subscribeToRouteChange: () => () => undefined, - subscribeToRoutesChange: () => () => undefined, - }; - - private settings: ContextType = { - hasPrivateAccess: true, - isLoading: false, - querySetting: (_id: string) => [() => () => undefined, () => undefined], - querySettings: () => [() => () => undefined, () => []], - dispatch: async () => undefined, - }; - - private translation: ContextType = { - language: 'en', - languages: [ - { - en: 'English', - key: 'en', - name: 'English', - }, - ], - loadLanguage: () => Promise.resolve(), - translate: Object.assign((key: string) => key, { - has: (_key: string): _key is TranslationKey => true, - }), - }; - - private user: ContextType = { - loginWithPassword: () => Promise.reject(new Error('not implemented')), - logout: () => Promise.reject(new Error('not implemented')), - loginWithService: () => () => Promise.reject(new Error('not implemented')), - loginWithToken: () => Promise.reject(new Error('not implemented')), - queryAllServices: () => [() => () => undefined, () => []], - queryPreference: () => [() => () => undefined, () => undefined], - queryRoom: () => [() => () => undefined, () => undefined], - querySubscription: () => [() => () => undefined, () => undefined], - querySubscriptions: () => [() => () => undefined, () => []], - user: null, - userId: null, - }; - - private modal: ContextType = { - currentModal: null, - modal: { - setModal: () => undefined, - }, - }; - - private authorization: ContextType = { - queryPermission: () => [() => () => undefined, () => false], - queryAtLeastOnePermission: () => [() => () => undefined, () => false], - queryAllPermissions: () => [() => () => undefined, () => false], - queryRole: () => [() => () => undefined, () => false], - roleStore: { - roles: {}, - emit: () => undefined, - on: () => () => undefined, - off: () => undefined, - events: (): Array<'change'> => ['change'], - has: () => false, - once: () => () => undefined, - }, - }; - - wrap(wrapper: (children: ReactNode) => ReactNode): this { - this.wrappers.push(wrapper); - return this; - } - - withEndpoint( - method: TMethod, - pathPattern: TPathPattern, - response: ( - params: OperationParams, - ) => Serialized> | Promise>>, - ): this { - const innerFn = this.server.callEndpoint; - - const outerFn = (args: { - method: TMethod; - pathPattern: TPathPattern; - keys: UrlParams; - params: OperationParams; - }): Promise>> => { - if (args.method === String(method) && args.pathPattern === String(pathPattern)) { - return Promise.resolve(response(args.params)) as Promise>>; - } - - return innerFn(args); - }; - - this.server.callEndpoint = outerFn; - - return this; - } - - withMethod(methodName: TMethodName, response: () => ServerMethodReturn): this { - const innerFn = this.server.callMethod; - - const outerFn = ( - innerMethodName: TMethodName, - ...innerArgs: ServerMethodParameters - ): Promise> => { - if (innerMethodName === String(methodName)) { - return Promise.resolve(response()) as Promise>; - } - - if (!innerFn) { - throw new Error('not implemented'); - } - - return innerFn(innerMethodName, ...innerArgs); - }; - - this.server.callMethod = outerFn; - - return this; - } - - withPermission(permission: string): this { - const innerFn = this.authorization.queryPermission; - - const outerFn = ( - innerPermission: string | ObjectId, - innerScope?: string | ObjectId | undefined, - innerScopedRoles?: string[] | undefined, - ): [subscribe: (onStoreChange: () => void) => () => void, getSnapshot: () => boolean] => { - if (innerPermission === permission) { - return [() => () => undefined, () => true]; - } - - return innerFn(innerPermission, innerScope, innerScopedRoles); - }; - - this.authorization.queryPermission = outerFn; - - const innerFn2 = this.authorization.queryAtLeastOnePermission; - - const outerFn2 = ( - innerPermissions: Array, - innerScope?: string | ObjectId | undefined, - innerScopedRoles?: string[] | undefined, - ): [subscribe: (onStoreChange: () => void) => () => void, getSnapshot: () => boolean] => { - if (innerPermissions.includes(permission)) { - return [() => () => undefined, () => true]; - } - - return innerFn2(innerPermissions, innerScope, innerScopedRoles); - }; - - this.authorization.queryAtLeastOnePermission = outerFn2; - - const innerFn3 = this.authorization.queryAllPermissions; - - const outerFn3 = ( - innerPermissions: Array, - innerScope?: string | ObjectId | undefined, - innerScopedRoles?: string[] | undefined, - ): [subscribe: (onStoreChange: () => void) => () => void, getSnapshot: () => boolean] => { - if (innerPermissions.includes(permission)) { - return [() => () => undefined, () => true]; - } - - return innerFn3(innerPermissions, innerScope, innerScopedRoles); - }; - - this.authorization.queryAllPermissions = outerFn3; - - return this; - } - - withJohnDoe(): this { - this.user.userId = 'john.doe'; - - this.user.user = { - _id: 'john.doe', - username: 'john.doe', - name: 'John Doe', - createdAt: new Date(), - active: true, - _updatedAt: new Date(), - roles: ['admin'], - type: 'user', - }; - - return this; - } - - withAnonymous(): this { - this.user.userId = null; - this.user.user = null; - - return this; - } - - withRole(role: string): this { - if (!this.user.user) { - throw new Error('user is not defined'); - } - - this.user.user.roles.push(role); - - const innerFn = this.authorization.queryRole; - - const outerFn = ( - innerRole: string | ObjectId, - innerScope?: string | undefined, - innerIgnoreSubscriptions?: boolean | undefined, - ): [subscribe: (onStoreChange: () => void) => () => void, getSnapshot: () => boolean] => { - if (innerRole === role) { - return [() => () => undefined, () => true]; - } - - return innerFn(innerRole, innerScope, innerIgnoreSubscriptions); - }; - - this.authorization.queryRole = outerFn; - - return this; - } - - build(): WrapperComponent<{ children: ReactNode }> { - const queryClient = new QueryClient({ - defaultOptions: { - queries: { retry: false }, - mutations: { retry: false }, - }, - }); - - const { connectionStatus, server, router, settings, translation, user, modal, authorization, wrappers } = this; - - return function MockedAppRoot({ children }) { - return ( - - - - - - - {/* - - - - - */} - - {/* */} - - - {/* - - */} - Promise.reject(new Error('not implemented')), - generateTriggerId: () => '', - getUserInteractionPayloadByViewId: () => undefined, - handlePayloadUserInteraction: () => undefined, - off: () => undefined, - on: () => undefined, - triggerActionButtonAction: () => Promise.reject(new Error('not implemented')), - triggerBlockAction: () => Promise.reject(new Error('not implemented')), - triggerCancel: () => Promise.reject(new Error('not implemented')), - triggerSubmitView: () => Promise.reject(new Error('not implemented')), - }} - > - {/* - - */} - {wrappers.reduce((children, wrapper) => wrapper(children), children)} - {/* - - */} - - {/* - - */} - - - {/* */} - - {/* - - - - - */} - - - - - - - ); - }; - } -} -export const mockAppRoot = () => new MockedAppRootBuilder(); diff --git a/apps/meteor/client/sidebar/header/actions/hooks/useGroupingListItems.tsx b/apps/meteor/client/sidebar/header/actions/hooks/useGroupingListItems.tsx index 20006cf01588..646b85c838be 100644 --- a/apps/meteor/client/sidebar/header/actions/hooks/useGroupingListItems.tsx +++ b/apps/meteor/client/sidebar/header/actions/hooks/useGroupingListItems.tsx @@ -25,19 +25,19 @@ export const useGroupingListItems = (): GenericMenuItemProps[] => { id: 'unread', content: t('Unread'), icon: 'flag', - addon: , + addon: , }, { id: 'favorites', content: t('Favorites'), icon: 'star', - addon: , + addon: , }, { id: 'types', content: t('Types'), icon: 'group-by-type', - addon: , + addon: , }, ]; }; diff --git a/apps/meteor/client/sidebar/header/actions/hooks/useSortModeItems.tsx b/apps/meteor/client/sidebar/header/actions/hooks/useSortModeItems.tsx index b9432f821373..56041ab4e571 100644 --- a/apps/meteor/client/sidebar/header/actions/hooks/useSortModeItems.tsx +++ b/apps/meteor/client/sidebar/header/actions/hooks/useSortModeItems.tsx @@ -26,14 +26,14 @@ export const useSortModeItems = (): GenericMenuItemProps[] => { id: 'activity', content: t('Activity'), icon: 'clock', - addon: , + addon: , description: sidebarSortBy === 'activity' && isOmnichannelEnabled && , }, { id: 'name', content: t('Name'), icon: 'sort-az', - addon: , + addon: , description: sidebarSortBy === 'alphabetical' && isOmnichannelEnabled && , }, ]; diff --git a/apps/meteor/client/sidebar/header/actions/hooks/useViewModeItems.tsx b/apps/meteor/client/sidebar/header/actions/hooks/useViewModeItems.tsx index 3e27dd22c7fa..ca2855d09db5 100644 --- a/apps/meteor/client/sidebar/header/actions/hooks/useViewModeItems.tsx +++ b/apps/meteor/client/sidebar/header/actions/hooks/useViewModeItems.tsx @@ -29,25 +29,25 @@ export const useViewModeItems = (): GenericMenuItemProps[] => { id: 'extended', content: t('Extended'), icon: 'extended-view', - addon: , + addon: , }, { id: 'medium', content: t('Medium'), icon: 'medium-view', - addon: , + addon: , }, { id: 'condensed', content: t('Condensed'), icon: 'condensed-view', - addon: , + addon: , }, { id: 'avatars', content: t('Avatars'), icon: 'user-rounded', - addon: , + addon: , }, ]; }; diff --git a/apps/meteor/client/startup/startup.ts b/apps/meteor/client/startup/startup.ts index 440b55ce5e6d..6b2b66ec69d7 100644 --- a/apps/meteor/client/startup/startup.ts +++ b/apps/meteor/client/startup/startup.ts @@ -72,11 +72,11 @@ Meteor.startup(() => { } const { - registrationStatus: { connectToCloud, workspaceRegistered }, + registrationStatus: { workspaceRegistered }, } = await sdk.rest.get('/v1/cloud.registrationStatus'); c.stop(); - if (connectToCloud === true && workspaceRegistered !== true) { + if (workspaceRegistered !== true) { banners.open({ id: 'cloud-registration', title: () => t('Cloud_registration_pending_title'), diff --git a/apps/meteor/client/stories/contexts/TranslationContextMock.tsx b/apps/meteor/client/stories/contexts/TranslationContextMock.tsx index 7b8e8548094f..ac98cd15cd89 100644 --- a/apps/meteor/client/stories/contexts/TranslationContextMock.tsx +++ b/apps/meteor/client/stories/contexts/TranslationContextMock.tsx @@ -51,6 +51,7 @@ const TranslationContextMock = ({ children }: TranslationContextMockProps): Reac { name: 'English', en: 'English', + ogName: 'English', key: 'en', }, ], diff --git a/apps/meteor/client/views/account/accessibility/AccessibilityPage.tsx b/apps/meteor/client/views/account/accessibility/AccessibilityPage.tsx index f289cf2eeee2..ceb904613533 100644 --- a/apps/meteor/client/views/account/accessibility/AccessibilityPage.tsx +++ b/apps/meteor/client/views/account/accessibility/AccessibilityPage.tsx @@ -1,59 +1,94 @@ -import { Accordion, Box, Button, ButtonGroup, Field, FieldGroup, RadioButton, Select, Tag } from '@rocket.chat/fuselage'; +import { css } from '@rocket.chat/css-in-js'; +import type { SelectOption } from '@rocket.chat/fuselage'; +import { + Icon, + FieldDescription, + Accordion, + Box, + Button, + ButtonGroup, + Field, + FieldGroup, + FieldHint, + FieldLabel, + FieldRow, + RadioButton, + Select, + Tag, + ToggleSwitch, +} from '@rocket.chat/fuselage'; import { useLocalStorage, useUniqueId } from '@rocket.chat/fuselage-hooks'; -import type { FontSize } from '@rocket.chat/rest-typings'; -import { useSetModal, useTranslation, useToastMessageDispatch, useUserPreference, useEndpoint } from '@rocket.chat/ui-contexts'; -import type { ThemePreference } from '@rocket.chat/ui-theming/src/types/themes'; -import React from 'react'; +import { useSetModal, useTranslation, useToastMessageDispatch, useEndpoint, useSetting } from '@rocket.chat/ui-contexts'; +import { useMutation } from '@tanstack/react-query'; +import React, { useMemo } from 'react'; import { Controller, useForm } from 'react-hook-form'; import Page from '../../../components/Page'; import { useIsEnterprise } from '../../../hooks/useIsEnterprise'; +import { getDirtyFields } from '../../../lib/getDirtyFields'; import HighContrastUpsellModal from './HighContrastUpsellModal'; +import MentionsWithSymbolUpsellModal from './MentionsWithSymbolUpsellModal'; import { fontSizes } from './fontSizes'; -import { useAdjustableFontSize } from './hooks/useAdsjustableFontSize'; +import type { AccessibilityPreferencesData } from './hooks/useAcessibilityPreferencesValues'; +import { useAccessiblityPreferencesValues } from './hooks/useAcessibilityPreferencesValues'; +import { useCreateFontStyleElement } from './hooks/useCreateFontStyleElement'; import { themeItems as themes } from './themeItems'; const AccessibilityPage = () => { const t = useTranslation(); const setModal = useSetModal(); - const dispatchToastMessage = useToastMessageDispatch(); const { data: license } = useIsEnterprise(); + const preferencesValues = useAccessiblityPreferencesValues(); - const fontSizeId = useUniqueId(); - const [fontSize, setFontSize] = useAdjustableFontSize(); + const { themeAppearence } = preferencesValues; + const [, setPrevTheme] = useLocalStorage('prevTheme', themeAppearence); + const createFontStyleElement = useCreateFontStyleElement(); + const displayRolesEnabled = useSetting('UI_DisplayRoles'); - const themePreference = useUserPreference('themeAppearence') || 'auto'; - const [, setPrevTheme] = useLocalStorage('prevTheme', themePreference); + const timeFormatOptions = useMemo( + (): SelectOption[] => [ + ['0', t('Default')], + ['1', t('12_Hour')], + ['2', t('24_Hour')], + ], + [t], + ); - const setUserPreferences = useEndpoint('POST', '/v1/users.setPreferences'); + const fontSizeId = useUniqueId(); + const mentionsWithSymbolId = useUniqueId(); + const clockModeId = useUniqueId(); + const hideUsernamesId = useUniqueId(); + const hideRolesId = useUniqueId(); const { formState: { isDirty, dirtyFields }, handleSubmit, control, reset, + watch, } = useForm({ - defaultValues: { themeAppearence: themePreference, fontSize }, + defaultValues: preferencesValues, + }); + + const currentData = watch(); + + const setUserPreferencesEndpoint = useEndpoint('POST', '/v1/users.setPreferences'); + + const setPreferencesAction = useMutation({ + mutationFn: setUserPreferencesEndpoint, + onSuccess: () => dispatchToastMessage({ type: 'success', message: t('Preferences_saved') }), + onError: (error) => dispatchToastMessage({ type: 'error', message: error }), + onSettled: (_data, _error, { data: { fontSize } }) => { + reset(currentData); + dirtyFields.themeAppearence && setPrevTheme(themeAppearence); + dirtyFields.fontSize && fontSize && createFontStyleElement(fontSize); + }, }); - const handleSave = async ({ themeAppearence, fontSize }: { themeAppearence: ThemePreference; fontSize: FontSize }) => { - try { - await setUserPreferences({ data: { themeAppearence, fontSize } }); - // dirtyFields.themeAppearence && (await setUserPreferences({ data: { themeAppearence, fontSize } })); - // dirtyFields.fontSize && (await setUserPreferences({ data: { fontSize } })); - dispatchToastMessage({ type: 'success', message: t('Preferences_saved') }); - } catch (error) { - dispatchToastMessage({ type: 'error', message: error }); - } finally { - if (dirtyFields.themeAppearence) { - setPrevTheme(themePreference); - } - if (dirtyFields.fontSize) { - setFontSize(fontSize); - } - reset({ themeAppearence, fontSize }); - } + const handleSaveData = (formData: AccessibilityPreferencesData) => { + const data = getDirtyFields(formData, dirtyFields); + setPreferencesAction.mutateAsync({ data }); }; return ( @@ -72,15 +107,18 @@ const AccessibilityPage = () => { return ( - + {t.has(title) ? t(title) : title} {communityDisabled && ( - {t('Enterprise')} + + + {t('Enterprise')} + )} - - + + { return onChange(id)} checked={value === id} />; }} /> - + - + {t.has(description) ? t(description) : description} - + ); })} @@ -110,10 +148,10 @@ const AccessibilityPage = () => { - + {t('Font_size')} - - + + { + )} + /> + + + + {t('Show_usernames')} + + ( + onChange(!(e.target as HTMLInputElement).checked)} + /> + )} + /> + + + {t('Show_or_hide_the_username_of_message_authors')} + + {displayRolesEnabled && ( + + + {t('Show_roles')} + + ( + onChange(!(e.target as HTMLInputElement).checked)} + /> + )} + /> + + + {t('Show_or_hide_the_user_roles_of_message_authors')} + + )} @@ -131,8 +260,8 @@ const AccessibilityPage = () => { - - + diff --git a/apps/meteor/client/views/account/accessibility/HighContrastUpsellModal.tsx b/apps/meteor/client/views/account/accessibility/HighContrastUpsellModal.tsx index c06501aae282..bcb28ea587d1 100644 --- a/apps/meteor/client/views/account/accessibility/HighContrastUpsellModal.tsx +++ b/apps/meteor/client/views/account/accessibility/HighContrastUpsellModal.tsx @@ -33,7 +33,7 @@ const HighContrastUpsellModal = ({ onClose }: { onClose: () => void }) => { onClose={onClose} onCancel={handleTalkToSales} onConfirm={handleGoFullyFeatured} - cancelText={t('Talk_to_sales')} + cancelText={t('Talk_to_an_expert')} confirmText={t('Start_free_trial')} /> ); diff --git a/apps/meteor/client/views/account/accessibility/MentionsWithSymbolUpsellModal.tsx b/apps/meteor/client/views/account/accessibility/MentionsWithSymbolUpsellModal.tsx new file mode 100644 index 000000000000..8a998af348c0 --- /dev/null +++ b/apps/meteor/client/views/account/accessibility/MentionsWithSymbolUpsellModal.tsx @@ -0,0 +1,41 @@ +import { useRole, useTranslation } from '@rocket.chat/ui-contexts'; +import React from 'react'; + +import GenericUpsellModal from '../../../components/GenericUpsellModal'; +import { useUpsellActions } from '../../../components/GenericUpsellModal/hooks'; + +const MentionsWithSymbolUpsellModal = ({ onClose }: { onClose: () => void }) => { + const t = useTranslation(); + + const isAdmin = useRole('admin'); + const { handleGoFullyFeatured, handleTalkToSales } = useUpsellActions(); + + if (!isAdmin) { + return ( + + ); + } + return ( + + ); +}; +export default MentionsWithSymbolUpsellModal; diff --git a/apps/meteor/client/views/account/accessibility/hooks/useAcessibilityPreferencesValues.ts b/apps/meteor/client/views/account/accessibility/hooks/useAcessibilityPreferencesValues.ts new file mode 100644 index 000000000000..339cdcff7dd9 --- /dev/null +++ b/apps/meteor/client/views/account/accessibility/hooks/useAcessibilityPreferencesValues.ts @@ -0,0 +1,31 @@ +import type { FontSize } from '@rocket.chat/rest-typings'; +import { useUserPreference } from '@rocket.chat/ui-contexts'; +import type { ThemePreference } from '@rocket.chat/ui-theming/src/types/themes'; + +export type AccessibilityPreferencesData = { + themeAppearence?: ThemePreference; + fontSize?: FontSize; + fontSizePreference?: FontSize; + mentionsWithSymbol?: boolean; + clockMode?: 0 | 1 | 2; + hideUsernames?: boolean; + hideRoles?: boolean; +}; + +export const useAccessiblityPreferencesValues = (): AccessibilityPreferencesData => { + const themeAppearence = useUserPreference('themeAppearence') || 'auto'; + const fontSize = useUserPreference('fontSize') || '100%'; + const mentionsWithSymbol = useUserPreference('mentionsWithSymbol') || false; + const clockMode = useUserPreference<0 | 1 | 2>('clockMode') ?? 0; + const hideUsernames = useUserPreference('hideUsernames'); + const hideRoles = useUserPreference('hideRoles'); + + return { + themeAppearence, + fontSize, + mentionsWithSymbol, + clockMode, + hideUsernames, + hideRoles, + }; +}; diff --git a/apps/meteor/client/views/account/accessibility/hooks/useAdsjustableFontSize.tsx b/apps/meteor/client/views/account/accessibility/hooks/useAdsjustableFontSize.tsx deleted file mode 100644 index 35607de1f9b5..000000000000 --- a/apps/meteor/client/views/account/accessibility/hooks/useAdsjustableFontSize.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import type { FontSize } from '@rocket.chat/rest-typings'; -import { useUserPreference } from '@rocket.chat/ui-contexts'; -import { useState } from 'react'; - -import { useCreateFontStyleElement } from './useCreateFontStyleElement'; - -export const useAdjustableFontSize = (): [FontSize, (value: FontSize) => void] => { - const fontSizePreference = useUserPreference('fontSize') || '100%'; - const [fontSize, setFontSize] = useState(fontSizePreference); - - useCreateFontStyleElement(fontSize); - - return [fontSize, setFontSize]; -}; diff --git a/apps/meteor/client/views/account/accessibility/hooks/useCreateFontStyleElement.ts b/apps/meteor/client/views/account/accessibility/hooks/useCreateFontStyleElement.ts index 63ecd3c0cf4b..923b3af88c60 100644 --- a/apps/meteor/client/views/account/accessibility/hooks/useCreateFontStyleElement.ts +++ b/apps/meteor/client/views/account/accessibility/hooks/useCreateFontStyleElement.ts @@ -1,4 +1,4 @@ -import { useEffect } from 'react'; +import { useMemo } from 'react'; const createStyleElement = (id: string) => { const styleElement = document.getElementById(id); @@ -10,11 +10,14 @@ const createStyleElement = (id: string) => { return newStyleElement; }; -export const useCreateFontStyleElement = (fontSize: string): void => { - useEffect(() => { - const styleElement = createStyleElement('rcx-font-size'); - const css = `html { font-size: ${fontSize}; }`; - styleElement.innerHTML = css; - document.head.appendChild(styleElement); - }, [fontSize]); +export const useCreateFontStyleElement = (): ((fontSize: string) => void) => { + return useMemo( + () => (fontSize: string) => { + const styleElement = createStyleElement('rcx-font-size'); + const css = `html { font-size: ${fontSize}; }`; + styleElement.innerHTML = css; + document.head.appendChild(styleElement); + }, + [], + ); }; diff --git a/apps/meteor/client/views/account/featurePreview/AccountFeaturePreviewPage.spec.tsx b/apps/meteor/client/views/account/featurePreview/AccountFeaturePreviewPage.spec.tsx deleted file mode 100644 index 157fa9b7acdf..000000000000 --- a/apps/meteor/client/views/account/featurePreview/AccountFeaturePreviewPage.spec.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { mockAppRoot } from '@rocket.chat/mock-providers'; -import { defaultFeaturesPreview } from '@rocket.chat/ui-client'; -import { render } from '@testing-library/react'; -import { axe, toHaveNoViolations } from 'jest-axe'; -import React from 'react'; - -import AccountFeaturePreviewPage from './AccountFeaturePreviewPage'; - -expect.extend(toHaveNoViolations); - -it('should have no a11y violations', async () => { - const { container } = render(, { - wrapper: mockAppRoot() - .withSetting('Accounts_AllowFeaturePreview', true) - .withUserPreference('featurePreview', defaultFeaturesPreview) - .withEndpoint('POST', '/v1/users.setPreferences', () => ({ - user: { - _id: 'userId', - settings: { - profile: {}, - preferences: {}, - }, - }, - })) - .build(), - }); - - const results = await axe(container); - expect(results).toHaveNoViolations(); -}); diff --git a/apps/meteor/client/views/account/omnichannel/OmnichannelPreferencesPage.spec.tsx b/apps/meteor/client/views/account/omnichannel/OmnichannelPreferencesPage.spec.tsx deleted file mode 100644 index 263d29c2ebdf..000000000000 --- a/apps/meteor/client/views/account/omnichannel/OmnichannelPreferencesPage.spec.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { mockAppRoot } from '@rocket.chat/mock-providers'; -import { render } from '@testing-library/react'; -import { axe, toHaveNoViolations } from 'jest-axe'; -import React from 'react'; - -import OmnichannelPreferencesPage from './OmnichannelPreferencesPage'; - -expect.extend(toHaveNoViolations); - -it('should have no a11y violations', async () => { - const { container } = render(, { - wrapper: mockAppRoot() - .withMethod('license:getModules', () => ['livechat-enterprise']) - .build(), - }); - - const results = await axe(container); - expect(results).toHaveNoViolations(); -}); diff --git a/apps/meteor/client/views/account/preferences/PreferencesMessagesSection.tsx b/apps/meteor/client/views/account/preferences/PreferencesMessagesSection.tsx index e5157d517967..30c4c5fe6725 100644 --- a/apps/meteor/client/views/account/preferences/PreferencesMessagesSection.tsx +++ b/apps/meteor/client/views/account/preferences/PreferencesMessagesSection.tsx @@ -1,14 +1,16 @@ import type { SelectOption } from '@rocket.chat/fuselage'; -import { Accordion, Field, Select, FieldGroup, ToggleSwitch, Box } from '@rocket.chat/fuselage'; +import { FieldDescription, FieldLabel, Accordion, Field, Select, FieldGroup, ToggleSwitch, Box } from '@rocket.chat/fuselage'; import { useUniqueId } from '@rocket.chat/fuselage-hooks'; -import { useSetting, useTranslation } from '@rocket.chat/ui-contexts'; +import { useRouter, useTranslation } from '@rocket.chat/ui-contexts'; import React, { useMemo } from 'react'; import { Controller, useFormContext } from 'react-hook-form'; const PreferencesMessagesSection = () => { const t = useTranslation(); - const displayRolesEnabled = useSetting('UI_DisplayRoles'); const { control } = useFormContext(); + const router = useRouter(); + + const handleGoToAccessibilityPage = () => router.navigate('/account/accessibility-and-appearance'); const alsoSendThreadMessageToChannelOptions = useMemo( (): SelectOption[] => [ @@ -19,15 +21,6 @@ const PreferencesMessagesSection = () => { [t], ); - const timeFormatOptions = useMemo( - (): SelectOption[] => [ - ['0', t('Default')], // TO DO: update SelectOption type to accept number as first item - ['1', t('12_Hour')], - ['2', t('24_Hour')], - ], - [t], - ); - const sendOnEnterOptions = useMemo( (): SelectOption[] => [ ['normal', t('Enter_Normal')], @@ -40,14 +33,11 @@ const PreferencesMessagesSection = () => { const unreadAlertId = useUniqueId(); const showThreadsInMainChannelId = useUniqueId(); const alsoSendThreadToChannelId = useUniqueId(); - const clockModeId = useUniqueId(); const useEmojisId = useUniqueId(); const convertAsciiEmojiId = useUniqueId(); const autoImageLoadId = useUniqueId(); const saveMobileBandwidthId = useUniqueId(); const collapseMediaByDefaultId = useUniqueId(); - const hideUsernamesId = useUniqueId(); - const hideRolesId = useUniqueId(); const hideFlexTabId = useUniqueId(); const displayAvatarsId = useUniqueId(); const sendOnEnterId = useUniqueId(); @@ -114,16 +104,10 @@ const PreferencesMessagesSection = () => { - {t('Message_TimeFormat')} - - ( - onChange(value as TPeriod)} />; + return - {children} - - ); -} diff --git a/packages/livechat/src/components/FilesDropTarget/index.tsx b/packages/livechat/src/components/FilesDropTarget/index.tsx new file mode 100644 index 000000000000..3e9935c37565 --- /dev/null +++ b/packages/livechat/src/components/FilesDropTarget/index.tsx @@ -0,0 +1,122 @@ +import type { ComponentChildren, Ref } from 'preact'; +import type { TargetedEvent } from 'preact/compat'; +import { useState } from 'preact/hooks'; +import type { JSXInternal } from 'preact/src/jsx'; + +import { createClassName } from '../../helpers/createClassName'; +import styles from './styles.scss'; + +const escapeForRegExp = (string: string) => string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + +type FilesDropTargetProps = { + overlayed?: boolean; + overlayText?: string; + accept?: string; + multiple?: boolean; + className?: string; + style?: JSXInternal.CSSProperties; + children?: ComponentChildren; + inputRef?: Ref; + onUpload?: (files: File[]) => void; +}; + +export const FilesDropTarget = ({ + overlayed, + overlayText, + accept, + multiple, + className, + style = {}, + children, + inputRef, + onUpload, +}: FilesDropTargetProps) => { + const [dragLevel, setDragLevel] = useState(0); + + const handleDragOver = (event: DragEvent) => { + event.preventDefault(); + }; + + const handleDragEnter = (event: DragEvent) => { + event.preventDefault(); + setDragLevel(dragLevel + 1); + }; + + const handleDragLeave = (event: DragEvent) => { + event.preventDefault(); + setDragLevel(dragLevel - 1); + }; + + const handleDrop = (event: DragEvent) => { + event.preventDefault(); + + if (dragLevel === 0 || !event?.dataTransfer?.files?.length) { + return; + } + + setDragLevel(0); + + handleUpload(event?.dataTransfer?.files); + }; + + const handleInputChange = (event: TargetedEvent) => { + if (!event?.currentTarget?.files?.length) { + return; + } + + handleUpload(event.currentTarget.files); + }; + + const handleUpload = (files: FileList) => { + if (!onUpload) { + return; + } + + let filteredFiles = Array.from(files); + + if (accept) { + const acceptMatchers = accept.split(',').map((acceptString) => { + if (acceptString.charAt(0) === '.') { + return ({ name }: { name: string }) => new RegExp(`${escapeForRegExp(acceptString)}$`, 'i').test(name); + } + + const matchTypeOnly = /^(.+)\/\*$/i.exec(acceptString); + if (matchTypeOnly) { + return ({ type }: { type: string }) => new RegExp(`^${escapeForRegExp(matchTypeOnly[1])}/.*$`, 'i').test(type); + } + + return ({ type }: { type: string }) => new RegExp(`^s${escapeForRegExp(acceptString)}$`, 'i').test(type); + }); + + filteredFiles = filteredFiles.filter((file) => acceptMatchers.some((acceptMatcher) => acceptMatcher(file))); + } + + if (!multiple) { + filteredFiles = filteredFiles.slice(0, 1); + } + + filteredFiles.length && onUpload(filteredFiles); + }; + + return ( +
0 }, [className])} + style={style} + > + + {children} +
+ ); +}; diff --git a/packages/livechat/src/components/FilesDropTarget/stories.tsx b/packages/livechat/src/components/FilesDropTarget/stories.tsx index e1a01cbaea09..d687fbaad492 100644 --- a/packages/livechat/src/components/FilesDropTarget/stories.tsx +++ b/packages/livechat/src/components/FilesDropTarget/stories.tsx @@ -71,7 +71,7 @@ AcceptingMultipleFiles.args = { export const TriggeringBrowseAction = Template.bind({}); TriggeringBrowseAction.storyName = 'triggering browse action'; -const ref = createRef(); +const inputRef = createRef(); TriggeringBrowseAction.args = { children: (
- +
), - ref, + inputRef, }; diff --git a/packages/livechat/src/lib/api.js b/packages/livechat/src/lib/api.js index 7f4c5ca340a4..ac7df77072b4 100644 --- a/packages/livechat/src/lib/api.js +++ b/packages/livechat/src/lib/api.js @@ -8,9 +8,9 @@ export const normalizeQueueAlert = async (queueInfo) => { if (!queueInfo) { return; } - const formatDistance = await import('date-fns/formatDistance'); + const { default: formatDistance } = await import('date-fns/formatDistance'); const { spot, estimatedWaitTimeSeconds } = queueInfo; - const locale = getDateFnsLocale(); + const locale = await getDateFnsLocale(); const estimatedWaitTime = estimatedWaitTimeSeconds && formatDistance(new Date().setSeconds(estimatedWaitTimeSeconds), new Date(), { locale }); return ( diff --git a/packages/livechat/src/routes/Chat/component.js b/packages/livechat/src/routes/Chat/component.js index 6ba1788b4bcb..8bd9ac468c6e 100644 --- a/packages/livechat/src/routes/Chat/component.js +++ b/packages/livechat/src/routes/Chat/component.js @@ -1,4 +1,4 @@ -import { Component } from 'preact'; +import { Component, createRef } from 'preact'; import { Suspense, lazy } from 'preact/compat'; import { withTranslation } from 'react-i18next'; @@ -35,6 +35,8 @@ class Chat extends Component { emojiPickerActive: false, }; + inputRef = createRef(null); + handleFilesDropTargetRef = (ref) => { this.filesDropTarget = ref; }; @@ -61,7 +63,7 @@ class Chat extends Component { handleUploadClick = (event) => { event.preventDefault(); - this.filesDropTarget.browse(); + this.inputRef?.current?.click(); }; handleSendClick = (event) => { @@ -151,7 +153,7 @@ class Chat extends Component { handleEmojiClick={this.handleEmojiClick} {...props} > - + {incomingCallAlert && !!incomingCallAlert.show && } {incomingCallAlert?.show && ongoingCall && ongoingCall.callStatus === CallStatus.IN_PROGRESS_SAME_TAB ? ( @@ -186,7 +188,7 @@ class Chat extends Component { {onChangeDepartment && ( diff --git a/packages/livechat/src/routes/Chat/container.js b/packages/livechat/src/routes/Chat/container.js index d3fab0102855..2d23645fb49e 100644 --- a/packages/livechat/src/routes/Chat/container.js +++ b/packages/livechat/src/routes/Chat/container.js @@ -40,7 +40,7 @@ class ChatContainer extends Component { this.state.queueSpot = newQueueSpot; this.state.estimatedWaitTime = newEstimatedWaitTime; await this.handleQueueMessage(connecting, queueInfo); - await this.handleConnectingAgentAlert(newConnecting, normalizeQueueAlert(queueInfo)); + await this.handleConnectingAgentAlert(newConnecting, await normalizeQueueAlert(queueInfo)); } }; diff --git a/packages/mock-providers/CHANGELOG.md b/packages/mock-providers/CHANGELOG.md new file mode 100644 index 000000000000..448ae0b742a4 --- /dev/null +++ b/packages/mock-providers/CHANGELOG.md @@ -0,0 +1,9 @@ +# @rocket.chat/mock-providers + +## 0.0.2-rc.0 + +### Patch Changes + +- b8f3d5014f: Fixed the login page language switcher, now the component has a new look, is reactive and the language selection becomes concrete upon login in. Also changed the default language of the login page to be the browser language. +- Updated dependencies [b8f3d5014f] + - @rocket.chat/i18n@0.0.2-rc.0 diff --git a/packages/mock-providers/package.json b/packages/mock-providers/package.json index e42f4f3055ba..d5bc013d9a18 100644 --- a/packages/mock-providers/package.json +++ b/packages/mock-providers/package.json @@ -1,9 +1,15 @@ { "name": "@rocket.chat/mock-providers", - "version": "0.0.1", + "version": "0.0.2-rc.0", "private": true, + "dependencies": { + "@rocket.chat/i18n": "workspace:~", + "i18next": "~23.4.5", + "react-i18next": "~13.2.1" + }, "devDependencies": { "@rocket.chat/ui-contexts": "workspace:*", + "@storybook/react": "~6.5.16", "@tanstack/react-query": "^4.16.1", "@types/jest": "~29.5.3", "eslint": "~8.45.0", diff --git a/packages/mock-providers/src/MockedAppRootBuilder.tsx b/packages/mock-providers/src/MockedAppRootBuilder.tsx index 03136e62ec86..9e114be87d15 100644 --- a/packages/mock-providers/src/MockedAppRootBuilder.tsx +++ b/packages/mock-providers/src/MockedAppRootBuilder.tsx @@ -1,7 +1,11 @@ -import type { ISetting, Serialized, SettingValue } from '@rocket.chat/core-typings'; -import type { Method, OperationParams, OperationResult, PathPattern, UrlParams } from '@rocket.chat/rest-typings'; -import type { ServerMethodName, ServerMethodParameters, ServerMethodReturn, TranslationKey } from '@rocket.chat/ui-contexts'; +import { type ISetting, type Serialized, type SettingValue } from '@rocket.chat/core-typings'; +import languages from '@rocket.chat/i18n/dist/languages'; +import { type Method, type OperationParams, type OperationResult, type PathPattern, type UrlParams } from '@rocket.chat/rest-typings'; import { + type ServerMethodName, + type ServerMethodParameters, + type ServerMethodReturn, + type TranslationKey, AuthorizationContext, ConnectionStatusContext, RouterContext, @@ -12,11 +16,13 @@ import { ActionManagerContext, ModalContext, } from '@rocket.chat/ui-contexts'; +import { type DecoratorFn } from '@storybook/react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import type { WrapperComponent } from '@testing-library/react-hooks'; -import type { ObjectId } from 'mongodb'; -import type { ContextType, ReactNode } from 'react'; -import React from 'react'; +import { type WrapperComponent } from '@testing-library/react-hooks'; +import { createInstance } from 'i18next'; +import { type ObjectId } from 'mongodb'; +import React, { type ContextType, type ReactNode, useEffect, useReducer } from 'react'; +import { I18nextProvider, initReactI18next } from 'react-i18next'; type Mutable = { -readonly [P in keyof T]: T[P]; @@ -71,21 +77,6 @@ export class MockedAppRootBuilder { dispatch: async () => undefined, }; - private translation: ContextType = { - language: 'en', - languages: [ - { - en: 'English', - key: 'en', - name: 'English', - }, - ], - loadLanguage: () => Promise.resolve(), - translate: Object.assign((key: string) => key, { - has: (_key: string | number | symbol): _key is TranslationKey => true, - }), - }; - private user: ContextType = { loginWithPassword: () => Promise.reject(new Error('not implemented')), logout: () => Promise.reject(new Error('not implemented')), @@ -322,6 +313,40 @@ export class MockedAppRootBuilder { return this; } + private i18n = createInstance( + { + // debug: true, + lng: 'en', + fallbackLng: 'en', + ns: ['core'], + nsSeparator: '.', + partialBundledLanguages: true, + defaultNS: 'core', + interpolation: { + escapeValue: false, + }, + initImmediate: false, + }, + () => undefined, + ).use(initReactI18next); + + withTranslations(lng: string, ns: string, resources: Record): this { + const addResources = () => { + this.i18n.addResources(lng, ns, resources); + for (const [key, value] of Object.entries(resources)) { + this.i18n.addResource(lng, ns, key, value); + } + }; + + if (this.i18n.isInitialized) { + addResources(); + return this; + } + + this.i18n.on('initialized', addResources); + return this; + } + build(): WrapperComponent<{ children: ReactNode }> { const queryClient = new QueryClient({ defaultOptions: { @@ -330,65 +355,116 @@ export class MockedAppRootBuilder { }, }); - const { connectionStatus, server, router, settings, translation, user, modal, authorization, wrappers } = this; + const { connectionStatus, server, router, settings, user, modal, i18n, authorization, wrappers } = this; + + const reduceTranslation = (translation?: ContextType): ContextType => { + return { + ...translation, + language: i18n.isInitialized ? i18n.language : 'en', + languages: [ + { + en: 'Default', + name: i18n.isInitialized ? i18n.t('Default') : 'Default', + ogName: i18n.isInitialized ? i18n.t('Default') : 'Default', + key: '', + }, + ...(i18n.isInitialized + ? [...new Set([...i18n.languages, ...languages])].map((key) => ({ + en: key, + name: new Intl.DisplayNames([key], { type: 'language' }).of(key) ?? key, + ogName: new Intl.DisplayNames([key], { type: 'language' }).of(key) ?? key, + key, + })) + : []), + ], + loadLanguage: async (language) => { + if (!i18n.isInitialized) { + return; + } + + await i18n.changeLanguage(language); + }, + translate: Object.assign( + (key: TranslationKey, options?: unknown) => (i18n.isInitialized ? i18n.t(key, options as { lng?: string }) : ''), + { + has: (key: string, options?: { lng?: string }): key is TranslationKey => + !!key && i18n.isInitialized && i18n.exists(key, options), + }, + ), + }; + }; return function MockedAppRoot({ children }) { + const [translation, updateTranslation] = useReducer(reduceTranslation, undefined, () => reduceTranslation()); + + useEffect(() => { + i18n.on('initialized', updateTranslation); + i18n.on('languageChanged', updateTranslation); + + return () => { + i18n.off('initialized', updateTranslation); + i18n.off('languageChanged', updateTranslation); + }; + }, []); + return ( - - {/* + + + {/* */} - - {/* */} - - - {/* + + {/* */} + + + {/* */} - Promise.reject(new Error('not implemented')), - generateTriggerId: () => '', - getUserInteractionPayloadByViewId: () => undefined, - handlePayloadUserInteraction: () => undefined, - off: () => undefined, - on: () => undefined, - triggerActionButtonAction: () => Promise.reject(new Error('not implemented')), - triggerBlockAction: () => Promise.reject(new Error('not implemented')), - triggerCancel: () => Promise.reject(new Error('not implemented')), - triggerSubmitView: () => Promise.reject(new Error('not implemented')), - }} - > - {/* + Promise.reject(new Error('not implemented')), + generateTriggerId: () => '', + getUserInteractionPayloadByViewId: () => undefined, + handlePayloadUserInteraction: () => undefined, + off: () => undefined, + on: () => undefined, + triggerActionButtonAction: () => Promise.reject(new Error('not implemented')), + triggerBlockAction: () => Promise.reject(new Error('not implemented')), + triggerCancel: () => Promise.reject(new Error('not implemented')), + triggerSubmitView: () => Promise.reject(new Error('not implemented')), + }} + > + {/* */} - {wrappers.reduce((children, wrapper) => wrapper(children), children)} - {/* + {wrappers.reduce((children, wrapper) => wrapper(children), children)} + {/* */} - - {/* + + {/* */} - - - {/* */} - - {/* + + + {/* */} + + {/* */} - + + @@ -397,4 +473,11 @@ export class MockedAppRootBuilder { ); }; } + + buildStoryDecorator(): DecoratorFn { + const WrapperComponent = this.build(); + + // eslint-disable-next-line react/display-name, react/no-multi-comp + return (fn) => {fn()}; + } } diff --git a/packages/model-typings/CHANGELOG.md b/packages/model-typings/CHANGELOG.md index 0742974545e7..f80a0d805977 100644 --- a/packages/model-typings/CHANGELOG.md +++ b/packages/model-typings/CHANGELOG.md @@ -1,5 +1,90 @@ # @rocket.chat/model-typings +## 0.1.0-rc.4 + +### Patch Changes + +- @rocket.chat/core-typings@6.4.0-rc.4 + +## 0.1.0-rc.3 + +### Patch Changes + +- @rocket.chat/core-typings@6.4.0-rc.3 + +## 0.1.0-rc.2 + +### Patch Changes + +- @rocket.chat/core-typings@6.4.0-rc.2 + +## 0.1.0-rc.1 + +### Patch Changes + +- @rocket.chat/core-typings@6.4.0-rc.1 + +## 0.1.0-rc.0 + +### Minor Changes + +- 4186eecf05: Introduce the ability to report an user +- ead7c7bef2: Fixed read receipts not getting deleted after corresponding message is deleted + +### Patch Changes + +- 8a59855fcf: When setting a room as read-only, do not allow previously unmuted users to send messages. +- 5cee21468e: Fix spotlight search does not find rooms with special or non-latin characters +- aaefe865a7: fix: agent role being removed upon user deactivation +- f556518fa1: Change SAU aggregation to consider only sessions from few days ago instead of the whole past. + + This is particularly important for large workspaces in case the cron job did not run for some time, in that case the amount of sessions would accumulate and the aggregation would take a long time to run. + +- 61128364d6: Fixes a problem where the calculated time for considering the visitor abandonment was the first message from the visitor and not the visitor's reply to the agent. +- Updated dependencies [239a34e877] +- Updated dependencies [203304782f] +- Updated dependencies [4186eecf05] +- Updated dependencies [ba24f3c21f] +- Updated dependencies [ebab8c4dd8] +- Updated dependencies [61128364d6] +- Updated dependencies [d45365436e] + - @rocket.chat/core-typings@6.4.0-rc.0 + +## 0.0.13 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.7 + +## 0.0.12 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.6 + +## 0.0.11 + +### Patch Changes + +- 92d25b9c7a: Change SAU aggregation to consider only sessions from few days ago instead of the whole past. + + This is particularly important for large workspaces in case the cron job did not run for some time, in that case the amount of sessions would accumulate and the aggregation would take a long time to run. + + - @rocket.chat/core-typings@6.3.5 + +## 0.0.10 + +### Patch Changes + +- 8a7d5d3898: fix: agent role being removed upon user deactivation + - @rocket.chat/core-typings@6.3.4 + +## 0.0.9 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.3 + ## 0.0.8 ### Patch Changes diff --git a/packages/model-typings/package.json b/packages/model-typings/package.json index 9f14af6c1e3a..b187c15b99c7 100644 --- a/packages/model-typings/package.json +++ b/packages/model-typings/package.json @@ -1,13 +1,13 @@ { "name": "@rocket.chat/model-typings", - "version": "0.0.8", + "version": "0.1.0-rc.4", "private": true, "devDependencies": { "@types/jest": "~29.5.3", "@types/node-rsa": "^1.1.1", "eslint": "~8.45.0", "jest": "~29.6.1", - "mongodb": "^4.12.1", + "mongodb": "^4.17.1", "ts-jest": "~29.0.5", "typescript": "~5.2.2" }, diff --git a/packages/model-typings/src/models/ILivechatRoomsModel.ts b/packages/model-typings/src/models/ILivechatRoomsModel.ts index b2af0add69a7..68b72be33ba8 100644 --- a/packages/model-typings/src/models/ILivechatRoomsModel.ts +++ b/packages/model-typings/src/models/ILivechatRoomsModel.ts @@ -196,7 +196,7 @@ export interface ILivechatRoomsModel extends IBaseModel { options?: FindOptions, extraQuery?: Filter, ): FindCursor; - setResponseByRoomId(roomId: string, response: { user: { _id: string; username: string } }): Promise; + setResponseByRoomId(roomId: string, responseBy: IOmnichannelRoom['responseBy']): Promise; setNotResponseByRoomId(roomId: string): Promise; setAgentLastMessageTs(roomId: string): Promise; saveAnalyticsDataByRoomId( diff --git a/packages/model-typings/src/models/IRoomsModel.ts b/packages/model-typings/src/models/IRoomsModel.ts index a0053d7ea7ba..de0cf9d10f96 100644 --- a/packages/model-typings/src/models/IRoomsModel.ts +++ b/packages/model-typings/src/models/IRoomsModel.ts @@ -251,7 +251,9 @@ export interface IRoomsModel extends IBaseModel { ): Promise; setCustomFieldsById(rid: string, customFields: Record): Promise; muteUsernameByRoomId(rid: string, username: string): Promise; - unmuteUsernameByRoomId(rid: string, username: string): Promise; + muteReadOnlyUsernameByRoomId(rid: string, username: string): Promise; + unmuteMutedUsernameByRoomId(rid: string, username: string): Promise; + unmuteReadOnlyUsernameByRoomId(rid: string, username: string): Promise; saveFeaturedById(rid: string, featured: boolean): Promise; saveDefaultById(rid: string, defaultValue: boolean): Promise; saveFavoriteById(rid: string, favorite: boolean, defaultValue: boolean): Promise; diff --git a/packages/model-typings/src/models/ISessionsModel.ts b/packages/model-typings/src/models/ISessionsModel.ts index cebe0c861d3f..1e6a36fd6f78 100644 --- a/packages/model-typings/src/models/ISessionsModel.ts +++ b/packages/model-typings/src/models/ISessionsModel.ts @@ -145,4 +145,8 @@ export interface ISessionsModel extends IBaseModel { }): Promise; createBatch(sessions: OptionalId[]): Promise; + + updateDailySessionById(_id: ISession['_id'], record: Partial): Promise; + + updateAllSessionsByDateToComputed({ start, end }: DestructuredRange): Promise; } diff --git a/packages/model-typings/src/models/IUsersModel.ts b/packages/model-typings/src/models/IUsersModel.ts index 3d3c6406cc2d..68f98e2b3416 100644 --- a/packages/model-typings/src/models/IUsersModel.ts +++ b/packages/model-typings/src/models/IUsersModel.ts @@ -279,6 +279,7 @@ export interface IUsersModel extends IBaseModel { getNextAgent(ignoreAgentId?: string, extraQuery?: Filter): Promise<{ agentId: string; username: string } | null>; getNextBotAgent(ignoreAgentId?: string): Promise<{ agentId: string; username: string } | null>; setLivechatStatus(userId: string, status: ILivechatAgentStatus): Promise; + makeAgentUnavailableAndUnsetExtension(userId: string): Promise; setLivechatData(userId: string, data?: Record): Promise; closeOffice(): Promise; openOffice(): Promise; diff --git a/packages/models/CHANGELOG.md b/packages/models/CHANGELOG.md index 9780e7f3cae2..31d2440aaa7f 100644 --- a/packages/models/CHANGELOG.md +++ b/packages/models/CHANGELOG.md @@ -1,5 +1,74 @@ # @rocket.chat/models +## 0.0.14-rc.4 + +### Patch Changes + +- @rocket.chat/model-typings@0.1.0-rc.4 + +## 0.0.14-rc.3 + +### Patch Changes + +- @rocket.chat/model-typings@0.1.0-rc.3 + +## 0.0.14-rc.2 + +### Patch Changes + +- @rocket.chat/model-typings@0.1.0-rc.2 + +## 0.0.14-rc.1 + +### Patch Changes + +- @rocket.chat/model-typings@0.1.0-rc.1 + +## 0.0.14-rc.0 + +### Patch Changes + +- Updated dependencies [4186eecf05] +- Updated dependencies [8a59855fcf] +- Updated dependencies [5cee21468e] +- Updated dependencies [aaefe865a7] +- Updated dependencies [f556518fa1] +- Updated dependencies [ead7c7bef2] +- Updated dependencies [61128364d6] + - @rocket.chat/model-typings@0.1.0-rc.0 + +## 0.0.13 + +### Patch Changes + +- @rocket.chat/model-typings@0.0.13 + +## 0.0.12 + +### Patch Changes + +- @rocket.chat/model-typings@0.0.12 + +## 0.0.11 + +### Patch Changes + +- Updated dependencies [92d25b9c7a] + - @rocket.chat/model-typings@0.0.11 + +## 0.0.10 + +### Patch Changes + +- Updated dependencies [8a7d5d3898] + - @rocket.chat/model-typings@0.0.10 + +## 0.0.9 + +### Patch Changes + +- @rocket.chat/model-typings@0.0.9 + ## 0.0.8 ### Patch Changes diff --git a/packages/models/package.json b/packages/models/package.json index 3be65138428f..4dbaa73f037b 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/models", - "version": "0.0.8", + "version": "0.0.14-rc.4", "private": true, "devDependencies": { "@types/jest": "~29.5.3", diff --git a/packages/password-policies/.eslintrc.json b/packages/password-policies/.eslintrc.json new file mode 100644 index 000000000000..15f2cd4817e1 --- /dev/null +++ b/packages/password-policies/.eslintrc.json @@ -0,0 +1,8 @@ +{ + "extends": ["@rocket.chat/eslint-config"], + "plugins": ["jest"], + "env": { + "jest/globals": true + }, + "ignorePatterns": ["**/dist"] +} diff --git a/packages/password-policies/jest.config.ts b/packages/password-policies/jest.config.ts new file mode 100644 index 000000000000..959a31a7c6bf --- /dev/null +++ b/packages/password-policies/jest.config.ts @@ -0,0 +1,3 @@ +export default { + preset: 'ts-jest', +}; diff --git a/packages/password-policies/package.json b/packages/password-policies/package.json new file mode 100644 index 000000000000..52fa766671db --- /dev/null +++ b/packages/password-policies/package.json @@ -0,0 +1,26 @@ +{ + "name": "@rocket.chat/password-policies", + "version": "0.0.1", + "private": true, + "devDependencies": { + "@types/chai": "^4.3.5", + "@types/jest": "~29.5.3", + "chai": "^4.3.7", + "eslint": "~8.45.0", + "jest": "~29.6.1", + "ts-jest": "~29.0.5", + "typescript": "~5.2.2" + }, + "scripts": { + "lint": "eslint --ext .js,.jsx,.ts,.tsx .", + "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "testunit": "jest", + "build": "rm -rf dist && tsc -p tsconfig.json", + "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput" + }, + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "files": [ + "/dist" + ] +} diff --git a/apps/meteor/app/lib/server/lib/PasswordPolicyClass.js b/packages/password-policies/src/PasswordPolicyClass.ts similarity index 61% rename from apps/meteor/app/lib/server/lib/PasswordPolicyClass.js rename to packages/password-policies/src/PasswordPolicyClass.ts index 99dc0d6fabf5..8212df18002c 100644 --- a/apps/meteor/app/lib/server/lib/PasswordPolicyClass.js +++ b/packages/password-policies/src/PasswordPolicyClass.ts @@ -1,8 +1,45 @@ -import { Random } from '@rocket.chat/random'; -import generator from 'generate-password'; -import { Meteor } from 'meteor/meteor'; +import { PasswordPolicyError } from './PasswordPolicyError'; + +type PasswordPolicyType = { + enabled: boolean; + policy: [name: string, options?: Record][]; +}; + +type ValidationMessageType = { + name: string; + isValid: boolean; + limit?: number; +}; + +export class PasswordPolicy { + private regex: { + forbiddingRepeatingCharacters: RegExp; + mustContainAtLeastOneLowercase: RegExp; + mustContainAtLeastOneUppercase: RegExp; + mustContainAtLeastOneNumber: RegExp; + mustContainAtLeastOneSpecialCharacter: RegExp; + }; + + private enabled: boolean; + + private minLength: number; + + private maxLength: number; + + private forbidRepeatingCharacters: boolean; + + private mustContainAtLeastOneLowercase: boolean; + + private mustContainAtLeastOneUppercase: boolean; + + private mustContainAtLeastOneNumber: boolean; + + private mustContainAtLeastOneSpecialCharacter: boolean; + + private throwError: boolean; + + private forbidRepeatingCharactersCount: number; -class PasswordPolicy { constructor({ enabled = false, minLength = -1, @@ -14,14 +51,7 @@ class PasswordPolicy { mustContainAtLeastOneNumber = false, mustContainAtLeastOneSpecialCharacter = false, throwError = true, - } = {}) { - this.regex = { - mustContainAtLeastOneLowercase: new RegExp('[a-z]'), - mustContainAtLeastOneUppercase: new RegExp('[A-Z]'), - mustContainAtLeastOneNumber: new RegExp('[0-9]'), - mustContainAtLeastOneSpecialCharacter: new RegExp('[^A-Za-z0-9 ]'), - }; - + }) { this.enabled = enabled; this.minLength = minLength; this.maxLength = maxLength; @@ -32,27 +62,103 @@ class PasswordPolicy { this.mustContainAtLeastOneNumber = mustContainAtLeastOneNumber; this.mustContainAtLeastOneSpecialCharacter = mustContainAtLeastOneSpecialCharacter; this.throwError = throwError; - } - set forbidRepeatingCharactersCount(value) { - this._forbidRepeatingCharactersCount = value; - this.regex.forbiddingRepeatingCharacters = new RegExp(`(.)\\1{${this.forbidRepeatingCharactersCount},}`); - } - - get forbidRepeatingCharactersCount() { - return this._forbidRepeatingCharactersCount; + this.regex = { + forbiddingRepeatingCharacters: new RegExp(`(.)\\1{${forbidRepeatingCharactersCount},}`), + mustContainAtLeastOneLowercase: new RegExp('[a-z]'), + mustContainAtLeastOneUppercase: new RegExp('[A-Z]'), + mustContainAtLeastOneNumber: new RegExp('[0-9]'), + mustContainAtLeastOneSpecialCharacter: new RegExp('[^A-Za-z0-9 ]'), + }; } - error(error, message, reasons) { + error( + error: string, + message: string, + reasons?: { + error: string; + message: string; + }[], + ) { if (this.throwError) { - throw new Meteor.Error(error, message, reasons); + throw new PasswordPolicyError(message, error, reasons); } return false; } - validate(password) { - const reasons = []; + sendValidationMessage(password: string): { + name: string; + isValid: boolean; + limit?: number; + }[] { + const validationReturn: ValidationMessageType[] = []; + + if (!this.enabled) { + return []; + } + + if (this.minLength >= 1) { + validationReturn.push({ + name: 'get-password-policy-minLength', + isValid: !(password.length < this.minLength), + limit: this.minLength, + }); + } + + if (this.maxLength >= 1) { + validationReturn.push({ + name: 'get-password-policy-maxLength', + isValid: !(password.length > this.maxLength), + limit: this.maxLength, + }); + } + + if (this.forbidRepeatingCharacters) { + validationReturn.push({ + name: 'get-password-policy-forbidRepeatingCharactersCount', + isValid: !this.regex.forbiddingRepeatingCharacters.test(password), + limit: this.forbidRepeatingCharactersCount, + }); + } + + if (this.mustContainAtLeastOneLowercase) { + validationReturn.push({ + name: 'get-password-policy-mustContainAtLeastOneLowercase', + isValid: this.regex.mustContainAtLeastOneLowercase.test(password), + }); + } + + if (this.mustContainAtLeastOneUppercase) { + validationReturn.push({ + name: 'get-password-policy-mustContainAtLeastOneUppercase', + isValid: this.regex.mustContainAtLeastOneUppercase.test(password), + }); + } + + if (this.mustContainAtLeastOneNumber) { + validationReturn.push({ + name: 'get-password-policy-mustContainAtLeastOneNumber', + isValid: this.regex.mustContainAtLeastOneNumber.test(password), + }); + } + + if (this.mustContainAtLeastOneSpecialCharacter) { + validationReturn.push({ + name: 'get-password-policy-mustContainAtLeastOneSpecialCharacter', + isValid: this.regex.mustContainAtLeastOneSpecialCharacter.test(password), + }); + } + + return validationReturn; + } + + validate(password: string) { + const reasons: { + error: string; + message: string; + }[] = []; + if (typeof password !== 'string' || !password.trim().length) { return this.error('error-password-policy-not-met', "The password provided does not meet the server's password policy."); } @@ -117,11 +223,12 @@ class PasswordPolicy { return true; } - getPasswordPolicy() { - const data = { + getPasswordPolicy(): PasswordPolicyType { + const data: PasswordPolicyType = { enabled: false, policy: [], }; + if (this.enabled) { data.enabled = true; if (this.minLength >= 1) { @@ -154,31 +261,4 @@ class PasswordPolicy { } return data; } - - generatePassword() { - if (this.enabled) { - for (let i = 0; i < 10; i++) { - const password = this._generatePassword(); - if (this.validate(password)) { - return password; - } - } - } - - return Random.id(); - } - - _generatePassword() { - const length = Math.min(Math.max(this.minLength, 12), this.maxLength > 0 ? this.maxLength : Number.MAX_SAFE_INTEGER); - return generator.generate({ - length, - ...(this.mustContainAtLeastOneNumber && { numbers: true }), - ...(this.mustContainAtLeastOneSpecialCharacter && { symbols: true }), - ...(this.mustContainAtLeastOneLowercase && { lowercase: true }), - ...(this.mustContainAtLeastOneUppercase && { uppercase: true }), - strict: true, - }); - } } - -export default PasswordPolicy; diff --git a/packages/password-policies/src/PasswordPolicyError.ts b/packages/password-policies/src/PasswordPolicyError.ts new file mode 100644 index 000000000000..ea58d0e83b07 --- /dev/null +++ b/packages/password-policies/src/PasswordPolicyError.ts @@ -0,0 +1,11 @@ +export class PasswordPolicyError extends Error { + public error: string; + + public details?: { error: string; message: string }[] | undefined; + + constructor(message: string, error: string, details?: { error: string; message: string }[]) { + super(message); + this.error = error; + this.details = details; + } +} diff --git a/packages/password-policies/src/index.ts b/packages/password-policies/src/index.ts new file mode 100644 index 000000000000..ce94042e029a --- /dev/null +++ b/packages/password-policies/src/index.ts @@ -0,0 +1 @@ +export { PasswordPolicy } from './PasswordPolicyClass'; diff --git a/packages/password-policies/tests/passwordPolicyClass.test.ts b/packages/password-policies/tests/passwordPolicyClass.test.ts new file mode 100644 index 000000000000..4cda16e3dd27 --- /dev/null +++ b/packages/password-policies/tests/passwordPolicyClass.test.ts @@ -0,0 +1,223 @@ +import { expect } from 'chai'; + +import { PasswordPolicy } from '../src/PasswordPolicyClass'; + +describe('PasswordPolicy', () => { + describe('Password tests with default options', () => { + it('should allow all passwords', () => { + const passwordPolicy = new PasswordPolicy({ throwError: false }); + expect(passwordPolicy.validate(null as any)).to.be.equal(false); + expect(passwordPolicy.validate(undefined as any)).to.be.equal(false); + expect(passwordPolicy.validate('')).to.be.equal(false); + expect(passwordPolicy.validate(' ')).to.be.equal(false); + expect(passwordPolicy.validate('a')).to.be.equal(true); + expect(passwordPolicy.validate('aaaaaaaaa')).to.be.equal(true); + }); + }); + + describe('Password tests with options', () => { + it('should not allow non string or empty', () => { + const passwordPolicy = new PasswordPolicy({ + enabled: true, + throwError: false, + }); + expect(passwordPolicy.validate(null as any)).to.be.equal(false); + expect(passwordPolicy.validate(undefined as any)).to.be.false; + expect(passwordPolicy.validate(1 as any)).to.be.false; + expect(passwordPolicy.validate(true as any)).to.be.false; + expect(passwordPolicy.validate(new Date() as any)).to.be.false; + expect(passwordPolicy.validate(new Function() as any)).to.be.false; + expect(passwordPolicy.validate('')).to.be.false; + }); + + it('should restrict by minLength', () => { + const passwordPolicy = new PasswordPolicy({ + enabled: true, + minLength: 5, + throwError: false, + }); + + expect(passwordPolicy.validate('1')).to.be.false; + expect(passwordPolicy.validate('1234')).to.be.false; + expect(passwordPolicy.validate('12345')).to.be.true; + expect(passwordPolicy.validate(' ')).to.be.false; + }); + + it('should restrict by maxLength', () => { + const passwordPolicy = new PasswordPolicy({ + enabled: true, + maxLength: 5, + throwError: false, + }); + + expect(passwordPolicy.validate('1')).to.be.true; + expect(passwordPolicy.validate('12345')).to.be.true; + expect(passwordPolicy.validate('123456')).to.be.false; + expect(passwordPolicy.validate(' ')).to.be.false; + }); + + it('should allow repeated characters', () => { + const passwordPolicy = new PasswordPolicy({ + enabled: true, + forbidRepeatingCharacters: false, + throwError: false, + }); + + expect(passwordPolicy.validate('1')).to.be.true; + expect(passwordPolicy.validate('12345')).to.be.true; + expect(passwordPolicy.validate('123456')).to.be.true; + expect(passwordPolicy.validate(' ')).to.be.false; + expect(passwordPolicy.validate('11111111111111')).to.be.true; + }); + + it('should restrict repeated characters', () => { + const passwordPolicy = new PasswordPolicy({ + enabled: true, + forbidRepeatingCharacters: true, + forbidRepeatingCharactersCount: 3, + throwError: false, + }); + + expect(passwordPolicy.validate('1')).to.be.true; + expect(passwordPolicy.validate('11')).to.be.true; + expect(passwordPolicy.validate('111')).to.be.true; + expect(passwordPolicy.validate('1111')).to.be.false; + expect(passwordPolicy.validate(' ')).to.be.false; + expect(passwordPolicy.validate('123456')).to.be.true; + }); + + it('should restrict repeated characters customized', () => { + const passwordPolicy = new PasswordPolicy({ + enabled: true, + forbidRepeatingCharacters: true, + forbidRepeatingCharactersCount: 5, + throwError: false, + }); + + expect(passwordPolicy.validate('1')).to.be.true; + expect(passwordPolicy.validate('11')).to.be.true; + expect(passwordPolicy.validate('111')).to.be.true; + expect(passwordPolicy.validate('1111')).to.be.true; + expect(passwordPolicy.validate('11111')).to.be.true; + expect(passwordPolicy.validate('111111')).to.be.false; + expect(passwordPolicy.validate(' ')).to.be.false; + expect(passwordPolicy.validate('123456')).to.be.true; + }); + + it('should contain one lowercase', () => { + const passwordPolicy = new PasswordPolicy({ + enabled: true, + mustContainAtLeastOneLowercase: true, + throwError: false, + }); + + expect(passwordPolicy.validate('a')).to.be.true; + expect(passwordPolicy.validate('aa')).to.be.true; + expect(passwordPolicy.validate('A')).to.be.false; + expect(passwordPolicy.validate(' ')).to.be.false; + expect(passwordPolicy.validate('123456')).to.be.false; + expect(passwordPolicy.validate('AAAAA')).to.be.false; + expect(passwordPolicy.validate('AAAaAAA')).to.be.true; + }); + + it('should contain one uppercase', () => { + const passwordPolicy = new PasswordPolicy({ + enabled: true, + mustContainAtLeastOneUppercase: true, + throwError: false, + }); + + expect(passwordPolicy.validate('a')).to.be.false; + expect(passwordPolicy.validate('aa')).to.be.false; + expect(passwordPolicy.validate('A')).to.be.true; + expect(passwordPolicy.validate(' ')).to.be.false; + expect(passwordPolicy.validate('123456')).to.be.false; + expect(passwordPolicy.validate('AAAAA')).to.be.true; + expect(passwordPolicy.validate('AAAaAAA')).to.be.true; + }); + + it('should contain one number', () => { + const passwordPolicy = new PasswordPolicy({ + enabled: true, + mustContainAtLeastOneNumber: true, + throwError: false, + }); + + expect(passwordPolicy.validate('a')).to.be.false; + expect(passwordPolicy.validate('aa')).to.be.false; + expect(passwordPolicy.validate('A')).to.be.false; + expect(passwordPolicy.validate(' ')).to.be.false; + expect(passwordPolicy.validate('123456')).to.be.true; + expect(passwordPolicy.validate('AAAAA')).to.be.false; + expect(passwordPolicy.validate('AAAaAAA')).to.be.false; + expect(passwordPolicy.validate('AAAa1AAA')).to.be.true; + }); + + it('should contain one special character', () => { + const passwordPolicy = new PasswordPolicy({ + enabled: true, + mustContainAtLeastOneSpecialCharacter: true, + throwError: false, + }); + + expect(passwordPolicy.validate('a')).to.be.false; + expect(passwordPolicy.validate('aa')).to.be.false; + expect(passwordPolicy.validate('A')).to.be.false; + expect(passwordPolicy.validate(' ')).to.be.false; + expect(passwordPolicy.validate('123456')).to.be.false; + expect(passwordPolicy.validate('AAAAA')).to.be.false; + expect(passwordPolicy.validate('AAAaAAA')).to.be.false; + expect(passwordPolicy.validate('AAAa1AAA')).to.be.false; + expect(passwordPolicy.validate('AAAa@AAA')).to.be.true; + }); + }); + + describe('Password Policy', () => { + it('should return a correct password policy', () => { + const passwordPolicy = new PasswordPolicy({ + enabled: true, + throwError: false, + minLength: 10, + maxLength: 20, + forbidRepeatingCharacters: true, + forbidRepeatingCharactersCount: 4, + mustContainAtLeastOneLowercase: true, + mustContainAtLeastOneUppercase: true, + mustContainAtLeastOneNumber: true, + mustContainAtLeastOneSpecialCharacter: true, + }); + + const policy = passwordPolicy.getPasswordPolicy(); + + expect(policy).to.not.be.undefined; + expect(policy.enabled).to.be.true; + expect(policy.policy.length).to.be.equal(8); + expect(policy.policy[0][0]).to.be.equal('get-password-policy-minLength'); + expect(policy.policy[0][1]?.minLength).to.be.equal(10); + }); + + it('should return correct values if policy is disabled', () => { + const passwordPolicy = new PasswordPolicy({ + enabled: false, + }); + + const policy = passwordPolicy.getPasswordPolicy(); + + expect(policy.enabled).to.be.false; + expect(policy.policy.length).to.be.equal(0); + }); + + it('should return correct values if policy is enabled but no specifiers exists', () => { + const passwordPolicy = new PasswordPolicy({ + enabled: true, + }); + + const policy = passwordPolicy.getPasswordPolicy(); + + expect(policy.enabled).to.be.true; + // even when no policy is specified, forbidRepeatingCharactersCount is still configured + // since its default value is 3 + expect(policy.policy.length).to.be.equal(1); + }); + }); +}); diff --git a/packages/i18n/tsconfig.json b/packages/password-policies/tsconfig.json similarity index 56% rename from packages/i18n/tsconfig.json rename to packages/password-policies/tsconfig.json index 91cebf125bc5..f0a66c843c50 100644 --- a/packages/i18n/tsconfig.json +++ b/packages/password-policies/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../../tsconfig.base.client.json", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist" + "outDir": "./dist", + "module": "commonjs" }, - "include": ["./src/**/*"], - "exclude": ["./dist/**/*"] + "include": ["./src/**/*"] } diff --git a/packages/release-action/CHANGELOG.md b/packages/release-action/CHANGELOG.md index ba541529faf4..23416df8c835 100644 --- a/packages/release-action/CHANGELOG.md +++ b/packages/release-action/CHANGELOG.md @@ -1,5 +1,22 @@ # @rocket.chat/release-action +## 2.2.0-rc.0 + +### Minor Changes + +- f93648a5df: Add back "Engine Versions" to the release notes + +### Patch Changes + +- Updated dependencies [0f56aacc4d] + - @rocket.chat/eslint-config@0.6.0-rc.0 + +## 2.1.0 + +### Minor Changes + +- a56f5f0a5f: Add back "Engine Versions" to the release notes + ## 2.0.0 ### Major Changes diff --git a/packages/release-action/package.json b/packages/release-action/package.json index ed96cfdf8437..c227df3f2d0f 100644 --- a/packages/release-action/package.json +++ b/packages/release-action/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/release-action", - "version": "2.0.0", + "version": "2.2.0-rc.0", "private": true, "scripts": { "build": "tsc", diff --git a/packages/rest-typings/CHANGELOG.md b/packages/rest-typings/CHANGELOG.md index 1b2b9d1c1c83..506ed5c3580f 100644 --- a/packages/rest-typings/CHANGELOG.md +++ b/packages/rest-typings/CHANGELOG.md @@ -1,5 +1,84 @@ # @rocket.chat/rest-typings +## 6.4.0-rc.4 + +### Patch Changes + +- @rocket.chat/core-typings@6.4.0-rc.4 + +## 6.4.0-rc.3 + +### Patch Changes + +- @rocket.chat/core-typings@6.4.0-rc.3 + +## 6.4.0-rc.2 + +### Patch Changes + +- @rocket.chat/core-typings@6.4.0-rc.2 + +## 6.4.0-rc.1 + +### Patch Changes + +- @rocket.chat/core-typings@6.4.0-rc.1 + +## 6.4.0-rc.0 + +### Minor Changes + +- 239a34e877: new: ring mobile users on direct conference calls +- 4186eecf05: Introduce the ability to report an user +- 2db32f0d4a: Add option to select what URL previews should be generated for each message. +- 19aec23cda: New AddUser workflow for Federated Rooms +- ebab8c4dd8: Added Reports Metrics Dashboard to Omnichannel +- 357a3a50fa: feat: high-contrast theme +- 93d4912e17: fix: missing params on updateOwnBasicInfo endpoint + +### Patch Changes + +- 203304782f: Fixed `overrideDestinationChannelEnabled` treated as a required param in `integrations.create` and `integration.update` endpoints +- 9496f1eb97: Deprecate `livechat:getOverviewData` and `livechat:getAgentOverviewData` methods and create API endpoints `livechat/analytics/overview` and `livechat/analytics/agent-overview` to fetch analytics data +- Updated dependencies [239a34e877] +- Updated dependencies [203304782f] +- Updated dependencies [4186eecf05] +- Updated dependencies [ba24f3c21f] +- Updated dependencies [ebab8c4dd8] +- Updated dependencies [61128364d6] +- Updated dependencies [d45365436e] + - @rocket.chat/core-typings@6.4.0-rc.0 + +## 6.3.7 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.7 + +## 6.3.6 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.6 + +## 6.3.5 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.5 + +## 6.3.4 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.4 + +## 6.3.3 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.3 + ## 6.3.2 ### Patch Changes diff --git a/packages/rest-typings/package.json b/packages/rest-typings/package.json index 2e5e0eca91e5..8b6f60f294b3 100644 --- a/packages/rest-typings/package.json +++ b/packages/rest-typings/package.json @@ -1,13 +1,13 @@ { "name": "@rocket.chat/rest-typings", - "version": "6.3.2", + "version": "6.4.0-rc.4", "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", "@types/jest": "~29.5.3", "eslint": "~8.45.0", "jest": "~29.6.1", "jest-environment-jsdom": "~29.6.1", - "mongodb": "^4.12.1", + "mongodb": "^4.17.1", "ts-jest": "~29.0.5", "typescript": "~5.2.2" }, @@ -27,7 +27,7 @@ "@rocket.chat/apps-engine": "1.41.0-alpha.290", "@rocket.chat/core-typings": "workspace:^", "@rocket.chat/message-parser": "next", - "@rocket.chat/ui-kit": "next", + "@rocket.chat/ui-kit": "^0.32.1", "ajv": "^8.11.0", "ajv-formats": "^2.1.1" }, diff --git a/packages/rest-typings/src/v1/integrations/IntegrationsCreateProps.ts b/packages/rest-typings/src/v1/integrations/IntegrationsCreateProps.ts index 2817d4beb0cf..e9ef650656cd 100644 --- a/packages/rest-typings/src/v1/integrations/IntegrationsCreateProps.ts +++ b/packages/rest-typings/src/v1/integrations/IntegrationsCreateProps.ts @@ -8,7 +8,7 @@ export type IntegrationsCreateProps = type: 'webhook-incoming'; username: string; channel: string; - overrideDestinationChannelEnabled: boolean; + overrideDestinationChannelEnabled?: boolean; scriptEnabled: boolean; script?: string; name: string; @@ -70,7 +70,7 @@ const integrationsCreateSchema = { }, overrideDestinationChannelEnabled: { type: 'boolean', - nullable: false, + nullable: true, }, script: { type: 'string', diff --git a/packages/rest-typings/src/v1/integrations/IntegrationsUpdateProps.ts b/packages/rest-typings/src/v1/integrations/IntegrationsUpdateProps.ts index 7237b73fdcc3..6b0e7ce046d1 100644 --- a/packages/rest-typings/src/v1/integrations/IntegrationsUpdateProps.ts +++ b/packages/rest-typings/src/v1/integrations/IntegrationsUpdateProps.ts @@ -9,7 +9,7 @@ export type IntegrationsUpdateProps = integrationId: string; channel: string; scriptEnabled: boolean; - overrideDestinationChannelEnabled: boolean; + overrideDestinationChannelEnabled?: boolean; script?: string; name: string; enabled: boolean; @@ -72,7 +72,7 @@ const integrationsUpdateSchema = { }, overrideDestinationChannelEnabled: { type: 'boolean', - nullable: false, + nullable: true, }, script: { type: 'string', @@ -99,7 +99,7 @@ const integrationsUpdateSchema = { nullable: true, }, }, - required: ['integrationId', 'type', 'channel', 'scriptEnabled', 'overrideDestinationChannelEnabled', 'name', 'enabled'], + required: ['integrationId', 'type', 'channel', 'scriptEnabled', 'name', 'enabled'], additionalProperties: true, }, { @@ -162,10 +162,6 @@ const integrationsUpdateSchema = { type: 'boolean', nullable: false, }, - overrideDestinationChannelEnabled: { - type: 'boolean', - nullable: false, - }, script: { type: 'string', nullable: true, @@ -211,7 +207,7 @@ const integrationsUpdateSchema = { nullable: true, }, }, - required: ['type', 'username', 'channel', 'event', 'scriptEnabled', 'overrideDestinationChannelEnabled', 'name', 'enabled'], + required: ['type', 'username', 'channel', 'event', 'scriptEnabled', 'name', 'enabled'], additionalProperties: false, }, ], diff --git a/packages/rest-typings/src/v1/omnichannel.ts b/packages/rest-typings/src/v1/omnichannel.ts index f85358c38ee9..60f6ed7ace08 100644 --- a/packages/rest-typings/src/v1/omnichannel.ts +++ b/packages/rest-typings/src/v1/omnichannel.ts @@ -3607,7 +3607,7 @@ export type OmnichannelEndpoints = { }>; }; '/v1/livechat/integrations.settings': { - GET: () => { settings: ISetting[] }; + GET: () => { settings: ISetting[]; success: boolean }; }; '/v1/livechat/upload/:rid': { POST: (params: { file: File }) => IMessage & { newRoom: boolean; showConnecting: boolean }; @@ -3804,4 +3804,7 @@ export type OmnichannelEndpoints = { '/v1/livechat/analytics/dashboards/conversations-by-agent': { GET: (params: GETDashboardConversationsByType) => ReportWithUnmatchingElements; }; + '/v1/livechat/webhook.test': { + POST: () => void; + }; }; diff --git a/packages/rest-typings/src/v1/users.ts b/packages/rest-typings/src/v1/users.ts index 947228476bdd..c47f4be6404d 100644 --- a/packages/rest-typings/src/v1/users.ts +++ b/packages/rest-typings/src/v1/users.ts @@ -9,7 +9,6 @@ import type { } from '@rocket.chat/core-typings'; import Ajv from 'ajv'; -import type { UsersSendConfirmationEmailParamsPOST } from '..'; import type { PaginatedRequest } from '../helpers/PaginatedRequest'; import type { PaginatedResult } from '../helpers/PaginatedResult'; import type { UserCreateParamsPOST } from './users/UserCreateParamsPOST'; @@ -20,7 +19,9 @@ import type { UserSetActiveStatusParamsPOST } from './users/UserSetActiveStatusP import type { UsersAutocompleteParamsGET } from './users/UsersAutocompleteParamsGET'; import type { UsersInfoParamsGet } from './users/UsersInfoParamsGet'; import type { UsersListTeamsParamsGET } from './users/UsersListTeamsParamsGET'; +import type { UsersSendConfirmationEmailParamsPOST } from './users/UsersSendConfirmationEmailParamsPOST'; import type { UsersSetPreferencesParamsPOST } from './users/UsersSetPreferenceParamsPOST'; +import type { UsersUpdateOwnBasicInfoParamsPOST } from './users/UsersUpdateOwnBasicInfoParamsPOST'; import type { UsersUpdateParamsPOST } from './users/UsersUpdateParamsPOST'; const ajv = new Ajv({ @@ -358,18 +359,7 @@ export type UsersEndpoints = { }; '/v1/users.updateOwnBasicInfo': { - POST: (params: { - data: { - email?: string; - name?: string; - username?: string; - nickname?: string; - statusText?: string; - newPassword?: string; - currentPassword?: string; - }; - customFields?: Record; - }) => { + POST: (params: UsersUpdateOwnBasicInfoParamsPOST) => { user: IUser; }; }; diff --git a/packages/rest-typings/src/v1/users/UsersSetPreferenceParamsPOST.ts b/packages/rest-typings/src/v1/users/UsersSetPreferenceParamsPOST.ts index b572a5bdc532..bb32dc27fb04 100644 --- a/packages/rest-typings/src/v1/users/UsersSetPreferenceParamsPOST.ts +++ b/packages/rest-typings/src/v1/users/UsersSetPreferenceParamsPOST.ts @@ -50,6 +50,7 @@ export type UsersSetPreferencesParamsPOST = { omnichannelTranscriptEmail?: boolean; omnichannelTranscriptPDF?: boolean; enableMobileRinging?: boolean; + mentionsWithSymbol?: boolean; }; }; @@ -245,6 +246,10 @@ const UsersSetPreferencesParamsPostSchema = { type: 'boolean', nullable: true, }, + mentionsWithSymbol: { + type: 'boolean', + nullable: true, + }, }, required: [], additionalProperties: false, diff --git a/packages/rest-typings/src/v1/users/UsersUpdateOwnBasicInfoParamsPOST.ts b/packages/rest-typings/src/v1/users/UsersUpdateOwnBasicInfoParamsPOST.ts index cff6fee56bfa..13c3066e4767 100644 --- a/packages/rest-typings/src/v1/users/UsersUpdateOwnBasicInfoParamsPOST.ts +++ b/packages/rest-typings/src/v1/users/UsersUpdateOwnBasicInfoParamsPOST.ts @@ -10,7 +10,9 @@ export type UsersUpdateOwnBasicInfoParamsPOST = { name?: string; username?: string; nickname?: string; + bio?: string; statusText?: string; + statusType?: string; currentPassword?: string; newPassword?: string; }; @@ -39,6 +41,14 @@ const UsersUpdateOwnBasicInfoParamsPostSchema = { type: 'string', nullable: true, }, + bio: { + type: 'string', + nullable: true, + }, + statusType: { + type: 'string', + nullable: true, + }, statusText: { type: 'string', nullable: true, diff --git a/packages/ui-client/CHANGELOG.md b/packages/ui-client/CHANGELOG.md index 45375c1921b2..5a987f493cf1 100644 --- a/packages/ui-client/CHANGELOG.md +++ b/packages/ui-client/CHANGELOG.md @@ -1,5 +1,73 @@ # @rocket.chat/ui-client +## 2.0.0-rc.4 + +### Patch Changes + +- @rocket.chat/ui-contexts@2.0.0-rc.4 + +## 2.0.0-rc.3 + +### Patch Changes + +- @rocket.chat/ui-contexts@2.0.0-rc.3 + +## 2.0.0-rc.2 + +### Patch Changes + +- @rocket.chat/ui-contexts@2.0.0-rc.2 + +## 2.0.0-rc.1 + +### Patch Changes + +- @rocket.chat/ui-contexts@2.0.0-rc.1 + +## 2.0.0-rc.0 + +### Minor Changes + +- ebab8c4dd8: Added Reports Metrics Dashboard to Omnichannel +- ee3815fce4: feat: add ChangePassword field to Account/Security + +### Patch Changes + +- b8f3d5014f: Fixed the login page language switcher, now the component has a new look, is reactive and the language selection becomes concrete upon login in. Also changed the default language of the login page to be the browser language. +- Updated dependencies [074db3b419] +- Updated dependencies [b8f3d5014f] + - @rocket.chat/ui-contexts@2.0.0-rc.0 + +## 1.0.7 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.7 + +## 1.0.6 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.6 + +## 1.0.5 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.5 + +## 1.0.4 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.4 + +## 1.0.3 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.3 + ## 1.0.2 ### Patch Changes diff --git a/packages/ui-client/package.json b/packages/ui-client/package.json index 2b74ac6c47ec..ce183b859e06 100644 --- a/packages/ui-client/package.json +++ b/packages/ui-client/package.json @@ -1,13 +1,13 @@ { "name": "@rocket.chat/ui-client", - "version": "1.0.2", + "version": "2.0.0-rc.4", "private": true, "devDependencies": { "@babel/core": "~7.22.9", "@rocket.chat/css-in-js": "next", - "@rocket.chat/fuselage": "next", - "@rocket.chat/fuselage-hooks": "next", - "@rocket.chat/icons": "next", + "@rocket.chat/fuselage": "^0.32.1", + "@rocket.chat/fuselage-hooks": "^0.32.1", + "@rocket.chat/icons": "^0.32.0", "@rocket.chat/mock-providers": "workspace:^", "@rocket.chat/ui-contexts": "workspace:~", "@storybook/addon-actions": "~6.5.16", @@ -37,7 +37,7 @@ "jest": "~29.6.1", "react": "^17.0.2", "react-dom": "^17.0.2", - "react-hook-form": "^7.30.0", + "react-hook-form": "~7.45.4", "ts-jest": "~29.0.5", "typescript": "~5.2.2" }, @@ -61,7 +61,7 @@ "@rocket.chat/fuselage": "*", "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", - "@rocket.chat/ui-contexts": "1.0.2", + "@rocket.chat/ui-contexts": "2.0.0-rc.4", "react": "~17.0.2" }, "volta": { diff --git a/packages/ui-client/src/components/Card/Card.stories.tsx b/packages/ui-client/src/components/Card/Card.stories.tsx index 4697443e9259..56a2220219ed 100644 --- a/packages/ui-client/src/components/Card/Card.stories.tsx +++ b/packages/ui-client/src/components/Card/Card.stories.tsx @@ -1,7 +1,7 @@ import { Box, Button, ButtonGroup } from '@rocket.chat/fuselage'; import type { ComponentMeta, ComponentStory } from '@storybook/react'; -import Card from '.'; +import { Card, CardBody, CardCol, CardColSection, CardColTitle, CardDivider, CardFooter, CardIcon, CardTitle } from '.'; import TextSeparator from '../TextSeparator'; import { UserStatus } from '../UserStatus'; @@ -9,13 +9,13 @@ export default { title: 'Components/Card', component: Card, subcomponents: { - 'Card.Title': Card.Title, - 'Card.Body': Card.Body, - 'Card.Col': Card.Col, - 'Card.Col.Section': Card.Col.Section, - 'Card.Col.Title': Card.Col.Title, - 'Card.Footer': Card.Footer, - 'Card.Divider': Card.Divider, + CardTitle, + CardBody, + CardCol, + CardColSection, + CardColTitle, + CardFooter, + CardDivider, }, parameters: { layout: 'centered', @@ -25,14 +25,14 @@ export default { export const Example: ComponentStory = () => ( - Usage - - - Users + Usage + + + Users - Total + Total } value={123} @@ -40,9 +40,9 @@ export const Example: ComponentStory = () => ( - + - {' '} + {' '} Online } @@ -51,9 +51,9 @@ export const Example: ComponentStory = () => ( - + - {' '} + {' '} Busy } @@ -62,9 +62,9 @@ export const Example: ComponentStory = () => ( - + - {' '} + {' '} Away } @@ -73,111 +73,111 @@ export const Example: ComponentStory = () => ( - + - {' '} + {' '} Offline } value={123} /> - - - Types and Distribution + + + Types and Distribution - - - Uploads + + + Uploads - - + + ); export const Single: ComponentStory = () => ( - A card - - + A card + + - A Section + A Section
A bunch of stuff
A bunch of stuff
A bunch of stuff
A bunch of stuff
- Another Section + Another Section
A bunch of stuff
A bunch of stuff
A bunch of stuff
A bunch of stuff
-
-
- + + + - +
); export const Double: ComponentStory = () => ( - A card - - + A card + + - A Section + A Section
A bunch of stuff
A bunch of stuff
A bunch of stuff
A bunch of stuff
- Another Section + Another Section
A bunch of stuff
A bunch of stuff
A bunch of stuff
A bunch of stuff
-
- - + + + - A Section + A Section - A bunch of stuff + A bunch of stuff - A bunch of stuff + A bunch of stuff - A bunch of stuff + A bunch of stuff - A bunch of stuff + A bunch of stuff - Another Section + Another Section
A bunch of stuff
A bunch of stuff
A bunch of stuff
A bunch of stuff
-
-
- + + + - +
); diff --git a/packages/ui-client/src/components/Card/index.ts b/packages/ui-client/src/components/Card/index.ts index ade5391e61d6..76df65e5a809 100644 --- a/packages/ui-client/src/components/Card/index.ts +++ b/packages/ui-client/src/components/Card/index.ts @@ -1,30 +1,10 @@ -import Card from './Card'; -import CardBody from './CardBody'; -import CardCol from './CardCol'; -import CardColSection from './CardColSection'; -import CardColTitle from './CardColTitle'; -import CardDivider from './CardDivider'; -import CardFooter from './CardFooter'; -import CardFooterWrapper from './CardFooterWrapper'; -import CardIcon from './CardIcon'; -import CardTitle from './CardTitle'; - -export const DOUBLE_COLUMN_CARD_WIDTH = 552; - -/** - * @deprecated Avoid default usage, use named imports instead - */ -export default Object.assign(Card, { - Title: CardTitle, - Body: CardBody, - Col: Object.assign(CardCol, { - Title: CardColTitle, - Section: CardColSection, - }), - Footer: CardFooter, - FooterWrapper: CardFooterWrapper, - Divider: CardDivider, - Icon: CardIcon, -}); - -export { Card, CardBody, CardCol, CardColSection, CardColTitle, CardDivider, CardFooter, CardFooterWrapper, CardIcon, CardTitle }; +export { default as Card } from './Card'; +export { default as CardBody } from './CardBody'; +export { default as CardCol } from './CardCol'; +export { default as CardColSection } from './CardColSection'; +export { default as CardColTitle } from './CardColTitle'; +export { default as CardDivider } from './CardDivider'; +export { default as CardFooter } from './CardFooter'; +export { default as CardFooterWrapper } from './CardFooterWrapper'; +export { default as CardIcon } from './CardIcon'; +export { default as CardTitle } from './CardTitle'; diff --git a/packages/ui-client/src/components/CustomFieldsForm.tsx b/packages/ui-client/src/components/CustomFieldsForm.tsx index 49d4a120e47d..9423456ebe8e 100644 --- a/packages/ui-client/src/components/CustomFieldsForm.tsx +++ b/packages/ui-client/src/components/CustomFieldsForm.tsx @@ -1,6 +1,7 @@ import type { CustomFieldMetadata } from '@rocket.chat/core-typings'; import type { SelectOption } from '@rocket.chat/fuselage'; import { Field, Select, TextInput } from '@rocket.chat/fuselage'; +import { useUniqueId } from '@rocket.chat/fuselage-hooks'; import type { TranslationKey } from '@rocket.chat/ui-contexts'; import { useTranslation } from '@rocket.chat/ui-contexts'; import { useCallback, useMemo } from 'react'; @@ -35,6 +36,7 @@ const CustomField = ({ }: CustomFieldProps) => { const t = useTranslation(); const { errors } = useFormState({ control }); + const fieldId = useUniqueId(); const Component = FIELD_TYPES[type] ?? null; @@ -47,7 +49,7 @@ const CustomField = ({ const validateRequired = useCallback((value) => (required ? typeof value === 'string' && !!value.trim() : true), [required]); const getErrorMessage = useCallback( - (error: any) => { + (error) => { switch (error?.type) { case 'required': return t('The_field_is_required', label || name); @@ -71,14 +73,23 @@ const CustomField = ({ rules={{ minLength: props.minLength, maxLength: props.maxLength, validate: { required: validateRequired } }} render={({ field }) => ( - + {label || t(name as TranslationKey)} - {required && '*'} - + - {errorMessage} + + {errorMessage} + )} /> diff --git a/packages/ui-client/src/components/Header/HeaderToolbox/HeaderToolboxActionBadge.tsx b/packages/ui-client/src/components/Header/HeaderToolbox/HeaderToolboxActionBadge.tsx index c05cc3341816..d8da9762de9c 100644 --- a/packages/ui-client/src/components/Header/HeaderToolbox/HeaderToolboxActionBadge.tsx +++ b/packages/ui-client/src/components/Header/HeaderToolbox/HeaderToolboxActionBadge.tsx @@ -5,10 +5,12 @@ import type { ComponentProps, FC } from 'react'; const HeaderToolboxActionBadge: FC> = (props) => ( diff --git a/packages/ui-client/src/components/PasswordVerifier/PasswordVerifier.stories.tsx b/packages/ui-client/src/components/PasswordVerifier/PasswordVerifier.stories.tsx index fe3be924ab18..412305be13e9 100644 --- a/packages/ui-client/src/components/PasswordVerifier/PasswordVerifier.stories.tsx +++ b/packages/ui-client/src/components/PasswordVerifier/PasswordVerifier.stories.tsx @@ -3,46 +3,42 @@ import type { ComponentMeta, ComponentStory } from '@storybook/react'; import { PasswordVerifier } from './PasswordVerifier'; -type Response = { - enabled: boolean; - policy: [ - name: string, - value?: - | { - [x: string]: number; - } - | undefined, - ][]; -}; - export default { title: 'Components/PasswordVerifier', component: PasswordVerifier, -} as ComponentMeta; - -const response: Response = { - enabled: true, - policy: [ - ['get-password-policy-minLength', { minLength: 10 }], - ['get-password-policy-forbidRepeatingCharactersCount', { maxRepeatingChars: 3 }], - ['get-password-policy-mustContainAtLeastOneLowercase'], - ['get-password-policy-mustContainAtLeastOneUppercase'], - ['get-password-policy-mustContainAtLeastOneNumber'], - ['get-password-policy-mustContainAtLeastOneSpecialCharacter'], + decorators: [ + mockAppRoot() + .withSetting('Accounts_Password_Policy_Enabled', 'true') + .withSetting('Accounts_Password_Policy_MinLength', '12') + .withSetting('Accounts_Password_Policy_MaxLength', '24') + .withSetting('Accounts_Password_Policy_ForbidRepeatingCharacters', 'true') + .withSetting('Accounts_Password_Policy_ForbidRepeatingCharactersCount', '3') + .withSetting('Accounts_Password_Policy_AtLeastOneLowercase', 'true') + .withSetting('Accounts_Password_Policy_AtLeastOneUppercase', 'true') + .withSetting('Accounts_Password_Policy_AtLeastOneNumber', 'true') + .withSetting('Accounts_Password_Policy_AtLeastOneSpecialCharacter', 'true') + .withSetting('Language', 'en') + .withTranslations('en', 'core', { Password_must_have: 'Password must have:' }) + .withTranslations('en', 'core', { 'get-password-policy-minLength-label': 'At least {{limit}} characters' }) + .withTranslations('en', 'core', { 'get-password-policy-maxLength-label': 'At most {{limit}} characters' }) + .withTranslations('en', 'core', { + 'get-password-policy-forbidRepeatingCharactersCount-label': 'Max. {{limit}} repeating characters', + }) + .withTranslations('en', 'core', { + 'get-password-policy-mustContainAtLeastOneLowercase-label': 'At least one lowercase letter', + }) + .withTranslations('en', 'core', { + 'get-password-policy-mustContainAtLeastOneUppercase-label': 'At least one uppercase letter', + }) + .withTranslations('en', 'core', { 'get-password-policy-mustContainAtLeastOneNumber-label': 'At least one number' }) + .withTranslations('en', 'core', { + 'get-password-policy-mustContainAtLeastOneSpecialCharacter-label': 'At least one symbol', + }) + .buildStoryDecorator(), ], -}; - -const Wrapper = mockAppRoot() - .withEndpoint('GET', '/v1/pw.getPolicy', () => response) - .build(); - -export const Default: ComponentStory = (args) => ( - - - -); + args: { + password: '123', + }, +} as ComponentMeta; -Default.storyName = 'PasswordVerifier'; -Default.args = { - password: 'asd', -}; +export const Default: ComponentStory = (args) => ; diff --git a/packages/ui-client/src/components/PasswordVerifier/PasswordVerifier.tsx b/packages/ui-client/src/components/PasswordVerifier/PasswordVerifier.tsx index 465d82725d87..bf53360a2351 100644 --- a/packages/ui-client/src/components/PasswordVerifier/PasswordVerifier.tsx +++ b/packages/ui-client/src/components/PasswordVerifier/PasswordVerifier.tsx @@ -1,4 +1,4 @@ -import { Box, Skeleton } from '@rocket.chat/fuselage'; +import { Box } from '@rocket.chat/fuselage'; import { useUniqueId } from '@rocket.chat/fuselage-hooks'; import { useVerifyPassword } from '@rocket.chat/ui-contexts'; import { useTranslation } from 'react-i18next'; @@ -6,19 +6,21 @@ import { useTranslation } from 'react-i18next'; import { PasswordVerifierItem } from './PasswordVerifierItem'; type PasswordVerifierProps = { - password: string; + password: string | undefined; id?: string; }; +type PasswordVerificationProps = { + name: string; + isValid: boolean; + limit?: number; +}[]; + export const PasswordVerifier = ({ password, id }: PasswordVerifierProps) => { const { t } = useTranslation(); const uniqueId = useUniqueId(); - const { data: passwordVerifications, isLoading } = useVerifyPassword(password); - - if (isLoading) { - return ; - } + const passwordVerifications: PasswordVerificationProps = useVerifyPassword(password || ''); if (!passwordVerifications?.length) { return null; diff --git a/packages/ui-client/src/components/PasswordVerifier/PasswordVerifiers.spec.tsx b/packages/ui-client/src/components/PasswordVerifier/PasswordVerifiers.spec.tsx index 95614491c3bd..cb2efaca19f5 100644 --- a/packages/ui-client/src/components/PasswordVerifier/PasswordVerifiers.spec.tsx +++ b/packages/ui-client/src/components/PasswordVerifier/PasswordVerifiers.spec.tsx @@ -1,60 +1,24 @@ import { mockAppRoot } from '@rocket.chat/mock-providers'; -import { passwordVerificationsTemplate } from '@rocket.chat/ui-contexts/dist/hooks/useVerifyPassword'; import { render, waitFor } from '@testing-library/react'; import { PasswordVerifier } from './PasswordVerifier'; -type Response = { - enabled: boolean; - policy: [ - name: string, - value?: - | { - [x: string]: number; - } - | undefined, - ][]; -}; - -jest.mock('react-i18next', () => ({ - useTranslation: () => ({ - t: (str: string) => str, - i18n: { - changeLanguage: () => new Promise(() => undefined), - }, - }), -})); - afterEach(() => { // restore the spy created with spyOn jest.restoreAllMocks(); }); it('should render no policy if its disabled ', () => { - const response: Response = { - enabled: false, - policy: [], - }; - const { queryByRole } = render(, { - wrapper: mockAppRoot() - .withEndpoint('GET', '/v1/pw.getPolicy', () => response) - .build(), + wrapper: mockAppRoot().withSetting('Accounts_Password_Policy_Enabled', 'true').build(), }); expect(queryByRole('list')).toBeNull(); }); it('should render no policy if its enabled but empty', async () => { - const response: Response = { - enabled: true, - policy: [], - }; - const { queryByRole, queryByTestId } = render(, { - wrapper: mockAppRoot() - .withEndpoint('GET', '/v1/pw.getPolicy', () => response) - .build(), + wrapper: mockAppRoot().build(), }); await waitFor(() => { @@ -64,14 +28,10 @@ it('should render no policy if its enabled but empty', async () => { }); it('should render policy list if its enabled and not empty', async () => { - const response: Response = { - enabled: true, - policy: [['get-password-policy-minLength', { minLength: 10 }]], - }; - const { queryByRole, queryByTestId } = render(, { wrapper: mockAppRoot() - .withEndpoint('GET', '/v1/pw.getPolicy', () => response) + .withSetting('Accounts_Password_Policy_Enabled', 'true') + .withSetting('Accounts_Password_Policy_MinLength', '6') .build(), }); @@ -84,14 +44,17 @@ it('should render policy list if its enabled and not empty', async () => { }); it('should render all the policies when all policies are enabled', async () => { - const response: Response = { - enabled: true, - policy: Object.keys(passwordVerificationsTemplate).map((item) => [item]), - }; - const { queryByTestId, queryAllByRole } = render(, { wrapper: mockAppRoot() - .withEndpoint('GET', '/v1/pw.getPolicy', () => response) + .withSetting('Accounts_Password_Policy_Enabled', 'true') + .withSetting('Accounts_Password_Policy_MinLength', '6') + .withSetting('Accounts_Password_Policy_MaxLength', '24') + .withSetting('Accounts_Password_Policy_ForbidRepeatingCharacters', 'true') + .withSetting('Accounts_Password_Policy_ForbidRepeatingCharactersCount', '3') + .withSetting('Accounts_Password_Policy_AtLeastOneLowercase', 'true') + .withSetting('Accounts_Password_Policy_AtLeastOneUppercase', 'true') + .withSetting('Accounts_Password_Policy_AtLeastOneNumber', 'true') + .withSetting('Accounts_Password_Policy_AtLeastOneSpecialCharacter', 'true') .build(), }); @@ -99,18 +62,14 @@ it('should render all the policies when all policies are enabled', async () => { expect(queryByTestId('password-verifier-skeleton')).toBeNull(); }); - expect(queryAllByRole('listitem').length).toEqual(response.policy.length); + expect(queryAllByRole('listitem').length).toEqual(7); }); it("should render policy as invalid if password doesn't match the requirements", async () => { - const response: Response = { - enabled: true, - policy: [['get-password-policy-minLength', { minLength: 10 }]], - }; - const { queryByTestId, getByRole } = render(, { wrapper: mockAppRoot() - .withEndpoint('GET', '/v1/pw.getPolicy', () => response) + .withSetting('Accounts_Password_Policy_Enabled', 'true') + .withSetting('Accounts_Password_Policy_MinLength', '10') .build(), }); @@ -122,14 +81,10 @@ it("should render policy as invalid if password doesn't match the requirements", }); it('should render policy as valid if password matches the requirements', async () => { - const response: Response = { - enabled: true, - policy: [['get-password-policy-minLength', { minLength: 2 }]], - }; - const { queryByTestId, getByRole } = render(, { wrapper: mockAppRoot() - .withEndpoint('GET', '/v1/pw.getPolicy', () => response) + .withSetting('Accounts_Password_Policy_Enabled', 'true') + .withSetting('Accounts_Password_Policy_MinLength', '2') .build(), }); diff --git a/packages/ui-client/src/components/index.ts b/packages/ui-client/src/components/index.ts index 6448f37b3e68..3de4bf411a5e 100644 --- a/packages/ui-client/src/components/index.ts +++ b/packages/ui-client/src/components/index.ts @@ -7,7 +7,7 @@ export * from '../hooks/useValidatePassword'; export { default as TextSeparator } from './TextSeparator'; export * from './TooltipComponent'; export * as UserStatus from './UserStatus'; -export { default as Card } from './Card'; +export * from './Card'; export * from './Header'; export * from './MultiSelectCustom/MultiSelectCustom'; export * from './FeaturePreview/FeaturePreview'; diff --git a/packages/ui-client/src/hooks/useValidatePassword.spec.ts b/packages/ui-client/src/hooks/useValidatePassword.spec.ts index 5d1c5a635c52..275e4ab8d6f5 100644 --- a/packages/ui-client/src/hooks/useValidatePassword.spec.ts +++ b/packages/ui-client/src/hooks/useValidatePassword.spec.ts @@ -3,64 +3,32 @@ import { renderHook } from '@testing-library/react-hooks'; import { useValidatePassword } from './useValidatePassword'; -type Response = { - enabled: boolean; - policy: [ - name: string, - value?: - | { - [x: string]: number; - } - | undefined, - ][]; -}; +const settingsMockWrapper = mockAppRoot() + .withSetting('Accounts_Password_Policy_Enabled', 'true') + .withSetting('Accounts_Password_Policy_MinLength', '6') + .withSetting('Accounts_Password_Policy_MaxLength', '24') + .withSetting('Accounts_Password_Policy_ForbidRepeatingCharacters', 'true') + .withSetting('Accounts_Password_Policy_ForbidRepeatingCharactersCount', '3') + .withSetting('Accounts_Password_Policy_AtLeastOneLowercase', 'true') + .withSetting('Accounts_Password_Policy_AtLeastOneUppercase', 'true') + .withSetting('Accounts_Password_Policy_AtLeastOneNumber', 'true') + .withSetting('Accounts_Password_Policy_AtLeastOneSpecialCharacter', 'true') + .build(); it("should return `false` if password doesn't match all the requirements", async () => { - const response: Response = { - enabled: true, - policy: [['get-password-policy-minLength', { minLength: 8 }]], - }; - - const { result, waitForValueToChange } = renderHook(async () => useValidatePassword('secret'), { - wrapper: mockAppRoot() - .withEndpoint('GET', '/v1/pw.getPolicy', () => response) - .build(), + const { result } = renderHook(async () => useValidatePassword('secret'), { + wrapper: settingsMockWrapper, }); - await waitForValueToChange(() => result.current); const res = await result.current; expect(res).toBeFalsy(); }); it('should return `true` if password matches all the requirements', async () => { - const response: Response = { - enabled: true, - policy: [['get-password-policy-minLength', { minLength: 8 }]], - }; - - const { result, waitForValueToChange } = renderHook(async () => useValidatePassword('secret-password'), { - wrapper: mockAppRoot() - .withEndpoint('GET', '/v1/pw.getPolicy', () => response) - .build(), + const { result } = renderHook(async () => useValidatePassword('5kgnGPq^&t4DSYW!SH#4N'), { + wrapper: settingsMockWrapper, }); - await waitForValueToChange(() => result.current); const res = await result.current; expect(res).toBeTruthy(); }); - -it('should return `undefined` if password validation is still loading', async () => { - const response: Response = { - enabled: true, - policy: [['get-password-policy-minLength', { minLength: 8 }]], - }; - - const { result } = renderHook(async () => useValidatePassword('secret-password'), { - wrapper: mockAppRoot() - .withEndpoint('GET', '/v1/pw.getPolicy', () => response) - .build(), - }); - - const res = await result.current; - expect(res).toBeUndefined(); -}); diff --git a/packages/ui-client/src/hooks/useValidatePassword.ts b/packages/ui-client/src/hooks/useValidatePassword.ts index 3402bbaf8435..9098d13009e1 100644 --- a/packages/ui-client/src/hooks/useValidatePassword.ts +++ b/packages/ui-client/src/hooks/useValidatePassword.ts @@ -1,8 +1,14 @@ import { useVerifyPassword } from '@rocket.chat/ui-contexts'; import { useMemo } from 'react'; -export const useValidatePassword = (password: string) => { - const { data: passwordVerifications, isLoading } = useVerifyPassword(password); +type passwordVerificationsType = { + name: string; + isValid: boolean; + limit?: number; +}[]; - return useMemo(() => (isLoading ? undefined : passwordVerifications.every(({ isValid }) => isValid)), [isLoading, passwordVerifications]); +export const useValidatePassword = (password: string): boolean => { + const passwordVerifications: passwordVerificationsType = useVerifyPassword(password); + + return useMemo(() => passwordVerifications.every(({ isValid }) => isValid), [passwordVerifications]); }; diff --git a/packages/ui-composer/package.json b/packages/ui-composer/package.json index 40c5c052874e..abf79394f171 100644 --- a/packages/ui-composer/package.json +++ b/packages/ui-composer/package.json @@ -5,8 +5,8 @@ "devDependencies": { "@babel/core": "~7.22.9", "@rocket.chat/eslint-config": "workspace:^", - "@rocket.chat/fuselage": "next", - "@rocket.chat/icons": "next", + "@rocket.chat/fuselage": "^0.32.1", + "@rocket.chat/icons": "^0.32.0", "@storybook/addon-actions": "~6.5.16", "@storybook/addon-docs": "~6.5.16", "@storybook/addon-essentials": "~6.5.16", diff --git a/packages/ui-contexts/CHANGELOG.md b/packages/ui-contexts/CHANGELOG.md index 56918d125358..7e8fc0d165c3 100644 --- a/packages/ui-contexts/CHANGELOG.md +++ b/packages/ui-contexts/CHANGELOG.md @@ -1,5 +1,104 @@ # @rocket.chat/ui-contexts +## 2.0.0-rc.4 + +### Patch Changes + +- @rocket.chat/core-typings@6.4.0-rc.4 +- @rocket.chat/rest-typings@6.4.0-rc.4 +- @rocket.chat/ddp-client@0.2.0-rc.4 + +## 2.0.0-rc.3 + +### Patch Changes + +- @rocket.chat/core-typings@6.4.0-rc.3 +- @rocket.chat/rest-typings@6.4.0-rc.3 +- @rocket.chat/ddp-client@0.2.0-rc.3 + +## 2.0.0-rc.2 + +### Patch Changes + +- @rocket.chat/core-typings@6.4.0-rc.2 +- @rocket.chat/rest-typings@6.4.0-rc.2 +- @rocket.chat/ddp-client@0.2.0-rc.2 + +## 2.0.0-rc.1 + +### Patch Changes + +- @rocket.chat/core-typings@6.4.0-rc.1 +- @rocket.chat/rest-typings@6.4.0-rc.1 +- @rocket.chat/ddp-client@0.2.0-rc.1 + +## 2.0.0-rc.0 + +### Minor Changes + +- 074db3b419: UX improvement for the Moderation Console Context bar for viewing the reported messages. The Report reason is now displayed in the reported messages context bar. + The Moderation Action Modal confirmation description is updated to be more clear and concise. + +### Patch Changes + +- b8f3d5014f: Fixed the login page language switcher, now the component has a new look, is reactive and the language selection becomes concrete upon login in. Also changed the default language of the login page to be the browser language. +- Updated dependencies [239a34e877] +- Updated dependencies [203304782f] +- Updated dependencies [4186eecf05] +- Updated dependencies [2db32f0d4a] +- Updated dependencies [982ef6f459] +- Updated dependencies [ba24f3c21f] +- Updated dependencies [19aec23cda] +- Updated dependencies [ebab8c4dd8] +- Updated dependencies [357a3a50fa] +- Updated dependencies [61128364d6] +- Updated dependencies [9496f1eb97] +- Updated dependencies [d45365436e] +- Updated dependencies [93d4912e17] + - @rocket.chat/core-typings@6.4.0-rc.0 + - @rocket.chat/rest-typings@6.4.0-rc.0 + - @rocket.chat/ddp-client@0.2.0-rc.0 + +## 1.0.7 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.7 +- @rocket.chat/rest-typings@6.3.7 +- @rocket.chat/ddp-client@0.1.7 + +## 1.0.6 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.6 +- @rocket.chat/rest-typings@6.3.6 +- @rocket.chat/ddp-client@0.1.6 + +## 1.0.5 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.5 +- @rocket.chat/rest-typings@6.3.5 +- @rocket.chat/ddp-client@0.1.5 + +## 1.0.4 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.4 +- @rocket.chat/rest-typings@6.3.4 +- @rocket.chat/ddp-client@0.1.4 + +## 1.0.3 + +### Patch Changes + +- @rocket.chat/core-typings@6.3.3 +- @rocket.chat/rest-typings@6.3.3 +- @rocket.chat/ddp-client@0.1.3 + ## 1.0.2 ### Patch Changes diff --git a/packages/ui-contexts/package.json b/packages/ui-contexts/package.json index 504d898d0c9c..82dc4519f85e 100644 --- a/packages/ui-contexts/package.json +++ b/packages/ui-contexts/package.json @@ -1,11 +1,11 @@ { "name": "@rocket.chat/ui-contexts", - "version": "1.0.2", + "version": "2.0.0-rc.4", "private": true, "devDependencies": { "@rocket.chat/core-typings": "workspace:^", "@rocket.chat/emitter": "next", - "@rocket.chat/fuselage-hooks": "next", + "@rocket.chat/fuselage-hooks": "^0.32.1", "@rocket.chat/rest-typings": "workspace:^", "@types/jest": "~29.5.3", "@types/react": "~17.0.62", @@ -14,7 +14,7 @@ "eslint": "~8.45.0", "eslint-plugin-react-hooks": "^4.6.0", "jest": "~29.6.1", - "mongodb": "^4.12.1", + "mongodb": "^4.17.1", "react": "~17.0.2", "ts-jest": "~29.0.5", "typescript": "~5.2.2", @@ -29,6 +29,9 @@ "react": "~17.0.2", "use-sync-external-store": "^1.2.0" }, + "dependencies": { + "@rocket.chat/password-policies": "workspace:^" + }, "volta": { "extends": "../../package.json" }, diff --git a/packages/ui-contexts/src/TranslationContext.ts b/packages/ui-contexts/src/TranslationContext.ts index ce75d08d56e5..d0f9bb6318c3 100644 --- a/packages/ui-contexts/src/TranslationContext.ts +++ b/packages/ui-contexts/src/TranslationContext.ts @@ -7,6 +7,7 @@ export { keys }; export type TranslationLanguage = { en: string; name: string; + ogName: string; key: string; }; @@ -33,6 +34,7 @@ export const TranslationContext = createContext({ { name: 'Default', en: 'Default', + ogName: 'Default', key: '', }, ], diff --git a/packages/ui-contexts/src/hooks/usePasswordPolicy.ts b/packages/ui-contexts/src/hooks/usePasswordPolicy.ts deleted file mode 100644 index ca259a215586..000000000000 --- a/packages/ui-contexts/src/hooks/usePasswordPolicy.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { useQuery } from '@tanstack/react-query'; - -import { useEndpoint } from './useEndpoint'; - -export const usePasswordPolicy = () => { - const getPasswordPolicy = useEndpoint('GET', '/v1/pw.getPolicy'); - - return useQuery(['login', 'password-policy'], async () => getPasswordPolicy()); -}; diff --git a/packages/ui-contexts/src/hooks/useVerifyPassword.ts b/packages/ui-contexts/src/hooks/useVerifyPassword.ts index 71985e44887f..f1244b2552c6 100644 --- a/packages/ui-contexts/src/hooks/useVerifyPassword.ts +++ b/packages/ui-contexts/src/hooks/useVerifyPassword.ts @@ -1,69 +1,47 @@ -import { useCallback, useMemo } from 'react'; +import { PasswordPolicy } from '@rocket.chat/password-policies'; +import { useMemo } from 'react'; -import { usePasswordPolicy } from './usePasswordPolicy'; - -export const passwordVerificationsTemplate: Record boolean> = { - 'get-password-policy-minLength': (password: string, minLength?: number) => Boolean(minLength && password.length >= minLength), - 'get-password-policy-maxLength': (password: string, maxLength?: number) => Boolean(maxLength && password.length <= maxLength), - 'get-password-policy-forbidRepeatingCharactersCount': (password: string, maxRepeatingChars?: number) => { - const repeatingCharsHash = {} as Record; - - for (let i = 0; i < password.length; i++) { - const currentChar = password[i]; - - if (repeatingCharsHash[currentChar]) { - repeatingCharsHash[currentChar]++; - if (repeatingCharsHash[currentChar] === maxRepeatingChars) return false; - } else { - repeatingCharsHash[currentChar] = 1; - } - } - - return true; - }, - 'get-password-policy-mustContainAtLeastOneLowercase': (password: string) => /[a-z]/.test(password), - 'get-password-policy-mustContainAtLeastOneUppercase': (password: string) => /[A-Z]/.test(password), - 'get-password-policy-mustContainAtLeastOneNumber': (password: string) => /[0-9]/.test(password), - 'get-password-policy-mustContainAtLeastOneSpecialCharacter': (password: string) => /[^A-Za-z0-9\s]/.test(password), -}; +import { useSetting } from './useSetting'; type PasswordVerifications = { isValid: boolean; limit?: number; name: string }[]; -type PasswordPolicies = [key: string, value?: Record][]; - -export const useVerifyPasswordByPolices = (policies?: PasswordPolicies) => { - return useCallback( - (password: string): PasswordVerifications => { - if (!policies) { - return []; - } - return policies - .map(([name, rules]) => { - if (name === 'get-password-policy-forbidRepeatingCharacters') return; - const limit = rules && Object.values(rules)[0]; - - return { - name, - isValid: password.length !== 0 && passwordVerificationsTemplate[name](password, limit), - ...(limit && { limit }), - }; - }) - .filter(Boolean) as PasswordVerifications; - }, - [policies], +export const useVerifyPassword = (password: string): PasswordVerifications => { + const enabled = Boolean(useSetting('Accounts_Password_Policy_Enabled')); + const minLength = Number(useSetting('Accounts_Password_Policy_MinLength')); + const maxLength = Number(useSetting('Accounts_Password_Policy_MaxLength')); + const forbidRepeatingCharacters = Boolean(useSetting('Accounts_Password_Policy_ForbidRepeatingCharacters')); + const forbidRepeatingCharactersCount = Number(useSetting('Accounts_Password_Policy_ForbidRepeatingCharactersCount')); + const mustContainAtLeastOneLowercase = Boolean(useSetting('Accounts_Password_Policy_AtLeastOneLowercase')); + const mustContainAtLeastOneUppercase = Boolean(useSetting('Accounts_Password_Policy_AtLeastOneUppercase')); + const mustContainAtLeastOneNumber = Boolean(useSetting('Accounts_Password_Policy_AtLeastOneNumber')); + const mustContainAtLeastOneSpecialCharacter = Boolean(useSetting('Accounts_Password_Policy_AtLeastOneSpecialCharacter')); + + const validator = useMemo( + () => + new PasswordPolicy({ + enabled, + minLength, + maxLength, + forbidRepeatingCharacters, + forbidRepeatingCharactersCount, + mustContainAtLeastOneLowercase, + mustContainAtLeastOneUppercase, + mustContainAtLeastOneNumber, + mustContainAtLeastOneSpecialCharacter, + throwError: true, + }), + [ + enabled, + minLength, + maxLength, + forbidRepeatingCharacters, + forbidRepeatingCharactersCount, + mustContainAtLeastOneLowercase, + mustContainAtLeastOneUppercase, + mustContainAtLeastOneNumber, + mustContainAtLeastOneSpecialCharacter, + ], ); -}; - -export const useVerifyPassword = (password: string): { data: PasswordVerifications; isLoading: boolean } => { - const { data, isLoading } = usePasswordPolicy(); - const validator = useVerifyPasswordByPolices((data?.enabled && data?.policy) || undefined); - - return useMemo( - () => ({ - data: validator(password), - isLoading, - }), - [password, validator, isLoading], - ); + return useMemo(() => validator.sendValidationMessage(password || ''), [password, validator]); }; diff --git a/packages/ui-contexts/src/index.ts b/packages/ui-contexts/src/index.ts index fca1dc0e4edb..d404dc921579 100644 --- a/packages/ui-contexts/src/index.ts +++ b/packages/ui-contexts/src/index.ts @@ -80,7 +80,6 @@ export { useUserRoom } from './hooks/useUserRoom'; export { useUserSubscription } from './hooks/useUserSubscription'; export { useUserSubscriptionByName } from './hooks/useUserSubscriptionByName'; export { useUserSubscriptions } from './hooks/useUserSubscriptions'; -export { usePasswordPolicy } from './hooks/usePasswordPolicy'; export { useVerifyPassword } from './hooks/useVerifyPassword'; export { useSelectedDevices } from './hooks/useSelectedDevices'; export { useDeviceConstraints } from './hooks/useDeviceConstraints'; diff --git a/packages/ui-video-conf/CHANGELOG.md b/packages/ui-video-conf/CHANGELOG.md index 8885f9da62a8..bb332f206fc4 100644 --- a/packages/ui-video-conf/CHANGELOG.md +++ b/packages/ui-video-conf/CHANGELOG.md @@ -1,5 +1,67 @@ # @rocket.chat/ui-video-conf +## 2.0.0-rc.4 + +### Patch Changes + +- @rocket.chat/ui-contexts@2.0.0-rc.4 + +## 2.0.0-rc.3 + +### Patch Changes + +- @rocket.chat/ui-contexts@2.0.0-rc.3 + +## 2.0.0-rc.2 + +### Patch Changes + +- @rocket.chat/ui-contexts@2.0.0-rc.2 + +## 2.0.0-rc.1 + +### Patch Changes + +- @rocket.chat/ui-contexts@2.0.0-rc.1 + +## 2.0.0-rc.0 + +### Patch Changes + +- Updated dependencies [074db3b419] +- Updated dependencies [b8f3d5014f] + - @rocket.chat/ui-contexts@2.0.0-rc.0 + +## 1.0.7 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.7 + +## 1.0.6 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.6 + +## 1.0.5 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.5 + +## 1.0.4 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.4 + +## 1.0.3 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.3 + ## 1.0.2 ### Patch Changes diff --git a/packages/ui-video-conf/package.json b/packages/ui-video-conf/package.json index a1192a182ba4..ded2331aa09e 100644 --- a/packages/ui-video-conf/package.json +++ b/packages/ui-video-conf/package.json @@ -1,14 +1,14 @@ { "name": "@rocket.chat/ui-video-conf", - "version": "1.0.2", + "version": "2.0.0-rc.4", "private": true, "devDependencies": { "@babel/core": "~7.22.9", "@rocket.chat/css-in-js": "next", "@rocket.chat/eslint-config": "workspace:^", - "@rocket.chat/fuselage": "next", - "@rocket.chat/fuselage-hooks": "next", - "@rocket.chat/icons": "next", + "@rocket.chat/fuselage": "^0.32.1", + "@rocket.chat/fuselage-hooks": "^0.32.1", + "@rocket.chat/icons": "^0.32.0", "@rocket.chat/styled": "next", "@rocket.chat/ui-contexts": "workspace:^", "@storybook/addon-actions": "~6.5.16", @@ -35,7 +35,7 @@ "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-contexts": "1.0.2", + "@rocket.chat/ui-contexts": "2.0.0-rc.4", "react": "^17.0.2", "react-dom": "^17.0.2" }, diff --git a/packages/uikit-playground/CHANGELOG.md b/packages/uikit-playground/CHANGELOG.md index 57609de64f8f..ae860561c5dd 100644 --- a/packages/uikit-playground/CHANGELOG.md +++ b/packages/uikit-playground/CHANGELOG.md @@ -1,5 +1,87 @@ # @rocket.chat/uikit-playground +## 0.2.0-rc.4 + +### Patch Changes + +- @rocket.chat/ui-contexts@2.0.0-rc.4 +- @rocket.chat/fuselage-ui-kit@2.0.0-rc.4 + +## 0.2.0-rc.3 + +### Patch Changes + +- @rocket.chat/ui-contexts@2.0.0-rc.3 +- @rocket.chat/fuselage-ui-kit@2.0.0-rc.3 + +## 0.2.0-rc.2 + +### Patch Changes + +- @rocket.chat/ui-contexts@2.0.0-rc.2 +- @rocket.chat/fuselage-ui-kit@2.0.0-rc.2 + +## 0.2.0-rc.1 + +### Patch Changes + +- @rocket.chat/ui-contexts@2.0.0-rc.1 +- @rocket.chat/fuselage-ui-kit@2.0.0-rc.1 + +## 0.2.0-rc.0 + +### Minor Changes + +- 1246a21648: feat: Add missing variants to UIKit button +- f9a748526d: feat: Adding new UIKit components: Callout, Checkbox, Radio Button, Time Picker, Toast Bar, Toggle Switch, Tab Navigation + +### Patch Changes + +- dc1d8ce92e: feat(fuselage-ui-kit): Introduce `TabsNavigationBlock` +- Updated dependencies [1246a21648] +- Updated dependencies [f9a748526d] +- Updated dependencies [dc1d8ce92e] +- Updated dependencies [074db3b419] +- Updated dependencies [dce4a829fa] +- Updated dependencies [b8f3d5014f] + - @rocket.chat/fuselage-ui-kit@2.0.0-rc.0 + - @rocket.chat/ui-contexts@2.0.0-rc.0 + +## 0.1.7 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.7 +- @rocket.chat/fuselage-ui-kit@1.0.7 + +## 0.1.6 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.6 +- @rocket.chat/fuselage-ui-kit@1.0.6 + +## 0.1.5 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.5 +- @rocket.chat/fuselage-ui-kit@1.0.5 + +## 0.1.4 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.4 +- @rocket.chat/fuselage-ui-kit@1.0.4 + +## 0.1.3 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.3 +- @rocket.chat/fuselage-ui-kit@1.0.3 + ## 0.1.2 ### Patch Changes diff --git a/packages/uikit-playground/package.json b/packages/uikit-playground/package.json index 60cde7408373..eb69dc5e017c 100644 --- a/packages/uikit-playground/package.json +++ b/packages/uikit-playground/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/uikit-playground", "private": true, - "version": "0.1.2", + "version": "0.2.0-rc.4", "type": "module", "scripts": { "dev": "vite", @@ -15,13 +15,13 @@ "@codemirror/tooltip": "^0.19.16", "@lezer/highlight": "^1.1.6", "@rocket.chat/css-in-js": "next", - "@rocket.chat/fuselage": "next", - "@rocket.chat/fuselage-hooks": "next", + "@rocket.chat/fuselage": "^0.32.1", + "@rocket.chat/fuselage-hooks": "^0.32.1", "@rocket.chat/fuselage-polyfills": "next", "@rocket.chat/fuselage-tokens": "next", "@rocket.chat/fuselage-ui-kit": "workspace:~", - "@rocket.chat/icons": "next", - "@rocket.chat/logo": "next", + "@rocket.chat/icons": "^0.32.0", + "@rocket.chat/logo": "^0.31.27", "@rocket.chat/styled": "next", "@rocket.chat/ui-contexts": "workspace:~", "codemirror": "^6.0.1", diff --git a/packages/uikit-playground/src/Payload/callout/index.ts b/packages/uikit-playground/src/Payload/callout/index.ts index 70509d6e61e5..29077031bd3a 100644 --- a/packages/uikit-playground/src/Payload/callout/index.ts +++ b/packages/uikit-playground/src/Payload/callout/index.ts @@ -11,6 +11,5 @@ export const callout: readonly LayoutBlock[] = [ type: 'plain_text', text: 'Callout Text', }, - icon: 'rocket', }, ]; diff --git a/packages/web-ui-registration/.babelrc.json b/packages/web-ui-registration/.babelrc.json new file mode 100644 index 000000000000..9398333d1322 --- /dev/null +++ b/packages/web-ui-registration/.babelrc.json @@ -0,0 +1,7 @@ +{ + "presets": [ + "@babel/preset-env", + "@babel/preset-react", + "@babel/preset-typescript" + ] +} diff --git a/packages/web-ui-registration/.storybook/logo.svg b/packages/web-ui-registration/.storybook/logo.svg new file mode 100644 index 000000000000..6ae18fa4b93e --- /dev/null +++ b/packages/web-ui-registration/.storybook/logo.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + diff --git a/packages/web-ui-registration/.storybook/logo.svg.d.ts b/packages/web-ui-registration/.storybook/logo.svg.d.ts new file mode 100644 index 000000000000..27c0914b230f --- /dev/null +++ b/packages/web-ui-registration/.storybook/logo.svg.d.ts @@ -0,0 +1,3 @@ +declare const path: string; + +export = path; diff --git a/packages/web-ui-registration/.storybook/main.ts b/packages/web-ui-registration/.storybook/main.ts new file mode 100644 index 000000000000..3f3c4d626f5a --- /dev/null +++ b/packages/web-ui-registration/.storybook/main.ts @@ -0,0 +1,12 @@ +import { type StorybookConfig } from '@storybook/core-common'; + +const config: StorybookConfig = { + stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'], + addons: ['@storybook/addon-essentials', 'storybook-dark-mode'], + features: { + postcss: false, + }, + framework: '@storybook/react', +}; + +module.exports = config; diff --git a/packages/web-ui-registration/.storybook/preview.tsx b/packages/web-ui-registration/.storybook/preview.tsx new file mode 100644 index 000000000000..d2fd6e7552a4 --- /dev/null +++ b/packages/web-ui-registration/.storybook/preview.tsx @@ -0,0 +1,36 @@ +import { themes } from '@storybook/theming'; +import { type Parameters } from '@storybook/addons'; +import manifest from '../package.json'; +import logo from './logo.svg'; +import '@rocket.chat/fuselage/dist/fuselage.css'; +import '@rocket.chat/icons/dist/rocketchat.css'; + +export const parameters: Parameters = { + actions: { argTypesRegex: "^on[A-Z].*" }, + backgrounds: { + grid: { + cellSize: 4, + cellAmount: 4, + opacity: 0.5, + }, + }, + options: { + storySort: ([, a], [, b]) => a.kind.localeCompare(b.kind), + }, + layout: 'fullscreen', + darkMode: { + dark: { + ...themes.dark, + brandTitle: manifest.name, + brandImage: logo, + brandUrl: manifest.homepage, + }, + light: { + ...themes.normal, + brandTitle: manifest.name, + brandImage: logo, + brandUrl: manifest.homepage, + }, + }, +}; + diff --git a/packages/web-ui-registration/CHANGELOG.md b/packages/web-ui-registration/CHANGELOG.md index 4555ca4e502b..63b5246eedcd 100644 --- a/packages/web-ui-registration/CHANGELOG.md +++ b/packages/web-ui-registration/CHANGELOG.md @@ -1,5 +1,68 @@ # @rocket.chat/web-ui-registration +## 2.0.0-rc.4 + +### Patch Changes + +- @rocket.chat/ui-contexts@2.0.0-rc.4 + +## 2.0.0-rc.3 + +### Patch Changes + +- @rocket.chat/ui-contexts@2.0.0-rc.3 + +## 2.0.0-rc.2 + +### Patch Changes + +- @rocket.chat/ui-contexts@2.0.0-rc.2 + +## 2.0.0-rc.1 + +### Patch Changes + +- @rocket.chat/ui-contexts@2.0.0-rc.1 + +## 2.0.0-rc.0 + +### Patch Changes + +- b8f3d5014f: Fixed the login page language switcher, now the component has a new look, is reactive and the language selection becomes concrete upon login in. Also changed the default language of the login page to be the browser language. +- Updated dependencies [074db3b419] +- Updated dependencies [b8f3d5014f] + - @rocket.chat/ui-contexts@2.0.0-rc.0 + +## 1.0.7 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.7 + +## 1.0.6 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.6 + +## 1.0.5 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.5 + +## 1.0.4 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.4 + +## 1.0.3 + +### Patch Changes + +- @rocket.chat/ui-contexts@1.0.3 + ## 1.0.2 ### Patch Changes diff --git a/packages/web-ui-registration/package.json b/packages/web-ui-registration/package.json index a3c2e5ac58d0..60669e1c9e19 100644 --- a/packages/web-ui-registration/package.json +++ b/packages/web-ui-registration/package.json @@ -1,38 +1,58 @@ { "name": "@rocket.chat/web-ui-registration", - "version": "1.0.2", + "version": "2.0.0-rc.4", "private": true, + "homepage": "https://rocket.chat", + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "files": [ + "/dist" + ], + "scripts": { + "lint": "eslint --ext .js,.jsx,.ts,.tsx .", + "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", + "test": "jest", + "storybook": "start-storybook -p 6006 --no-version-updates", + "build": "tsc -p tsconfig.build.json", + "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput" + }, "devDependencies": { + "@babel/core": "~7.22.10", + "@babel/preset-env": "~7.22.10", + "@babel/preset-react": "~7.22.5", + "@babel/preset-typescript": "~7.22.5", + "@rocket.chat/i18n": "workspace:~", "@rocket.chat/layout": "next", + "@rocket.chat/mock-providers": "workspace:~", "@rocket.chat/ui-client": "workspace:^", "@rocket.chat/ui-contexts": "workspace:^", + "@storybook/addon-actions": "~6.5.16", + "@storybook/addon-docs": "~6.5.16", + "@storybook/addon-essentials": "~6.5.16", + "@storybook/builder-webpack4": "~6.5.16", + "@storybook/manager-webpack4": "~6.5.16", + "@storybook/react": "~6.5.16", + "@storybook/testing-library": "^0.2.0", "@tanstack/react-query": "^4.16.1", "@testing-library/react": "^13.3.0", "@types/jest": "~29.5.3", + "@types/react": "~17.0.62", + "babel-loader": "~8.3.0", "eslint": "~8.45.0", "jest": "~29.6.1", - "react-hook-form": "^7.34.2", + "react": "~17.0.2", + "react-hook-form": "~7.45.4", + "react-i18next": "~13.2.1", + "storybook-dark-mode": "~3.0.1", "ts-jest": "~29.0.5", "typescript": "~5.2.2" }, "peerDependencies": { "@rocket.chat/layout": "*", - "@rocket.chat/ui-contexts": "1.0.2", + "@rocket.chat/ui-contexts": "2.0.0-rc.4", "@tanstack/react-query": "*", "react": "*", "react-hook-form": "*", "react-i18next": "*" - }, - "scripts": { - "lint": "eslint --ext .js,.jsx,.ts,.tsx .", - "lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix", - "test": "jest", - "build": "tsc -p tsconfig.json", - "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput" - }, - "main": "./dist/index.js", - "typings": "./dist/index.d.ts", - "files": [ - "/dist" - ] + } } diff --git a/packages/web-ui-registration/src/LoginForm.tsx b/packages/web-ui-registration/src/LoginForm.tsx index 832959f9125e..efc7e6268feb 100644 --- a/packages/web-ui-registration/src/LoginForm.tsx +++ b/packages/web-ui-registration/src/LoginForm.tsx @@ -3,9 +3,8 @@ import { useUniqueId } from '@rocket.chat/fuselage-hooks'; import { Form, ActionLink } from '@rocket.chat/layout'; import { useLoginWithPassword, useSetting } from '@rocket.chat/ui-contexts'; import { useMutation } from '@tanstack/react-query'; -import type { UseMutationResult } from '@tanstack/react-query'; import type { ReactElement } from 'react'; -import { useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import { useForm } from 'react-hook-form'; import { Trans, useTranslation } from 'react-i18next'; @@ -13,14 +12,38 @@ import EmailConfirmationForm from './EmailConfirmationForm'; import LoginServices from './LoginServices'; import type { DispatchLoginRouter } from './hooks/useLoginRouter'; -export type LoginErrors = - | 'error-user-is-not-activated' - | 'error-invalid-email' - | 'error-login-blocked-for-ip' - | 'error-login-blocked-for-user' - | 'error-license-user-limit-reached' - | 'user-not-found' - | 'error-app-user-is-not-allowed-to-login'; +const LOGIN_SUBMIT_ERRORS = { + 'error-user-is-not-activated': { + type: 'warning', + i18n: 'registration.page.registration.waitActivationWarning', + }, + 'error-app-user-is-not-allowed-to-login': { + type: 'danger', + i18n: 'registration.page.login.errors.AppUserNotAllowedToLogin', + }, + 'user-not-found': { + type: 'danger', + i18n: 'registration.page.login.errors.wrongCredentials', + }, + 'error-login-blocked-for-ip': { + type: 'danger', + i18n: 'registration.page.login.errors.loginBlockedForIp', + }, + 'error-login-blocked-for-user': { + type: 'danger', + i18n: 'registration.page.login.errors.loginBlockedForUser', + }, + 'error-license-user-limit-reached': { + type: 'warning', + i18n: 'registration.page.login.errors.licenseUserLimitReached', + }, + 'error-invalid-email': { + type: 'danger', + i18n: 'registration.page.login.errors.invalidEmail', + }, +} as const; + +export type LoginErrors = keyof typeof LOGIN_SUBMIT_ERRORS; export const LoginForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRouter }): ReactElement => { const { @@ -30,12 +53,8 @@ export const LoginForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRoute clearErrors, getValues, formState: { errors }, - } = useForm<{ - email?: string; - username: string; - password: string; - }>({ - mode: 'onChange', + } = useForm<{ username: string; password: string }>({ + mode: 'onBlur', }); const { t } = useTranslation(); @@ -48,21 +67,13 @@ export const LoginForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRoute const usernameOrEmailPlaceholder = String(useSetting('Accounts_EmailOrUsernamePlaceholder')); const passwordPlaceholder = String(useSetting('Accounts_PasswordPlaceholder')); - const loginMutation: UseMutationResult< - void, - Error, - { - username: string; - password: string; - email?: string; - } - > = useMutation({ - mutationFn: (formData) => { + const loginMutation = useMutation({ + mutationFn: (formData: { username: string; password: string }) => { return login(formData.username, formData.password); }, onError: (error: any) => { if ([error.error, error.errorType].includes('error-invalid-email')) { - setError('email', { type: 'invalid-email', message: t('registration.page.login.errors.invalidEmail') }); + setError('username', { type: 'invalid-email', message: t('registration.page.login.errors.invalidEmail') }); } if ('error' in error && error.error !== 403) { @@ -76,20 +87,32 @@ export const LoginForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRoute }, }); - if (errors.email?.type === 'invalid-email') { - return clearErrors('email')} email={getValues('email')} />; + const usernameId = useUniqueId(); + const passwordId = useUniqueId(); + const loginFormRef = useRef(null); + + useEffect(() => { + if (loginFormRef.current) { + loginFormRef.current.focus(); + } + }, []); + + const renderErrorOnSubmit = (error: LoginErrors) => { + const { type, i18n } = LOGIN_SUBMIT_ERRORS[error]; + return {t(i18n)}; + }; + + if (errors.username?.type === 'invalid-email') { + return clearErrors('username')} email={getValues('username')} />; } return (
{ - if (loginMutation.isLoading) { - return; - } - - loginMutation.mutate(data); - })} + aria-describedby='welcomeTitle' + onSubmit={handleSubmit(async (data) => loginMutation.mutate(data))} > {t('registration.component.login')} @@ -99,50 +122,47 @@ export const LoginForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRoute - {t('registration.component.form.emailOrUsername')} + + {t('registration.component.form.emailOrUsername')} + { - clearErrors(['username', 'password']); - }, + required: t('registration.component.form.requiredField'), })} placeholder={usernameOrEmailPlaceholder || t('registration.component.form.emailPlaceholder')} - error={ - errors.username?.message || - (errors.username?.type === 'required' ? t('registration.component.form.requiredField') : undefined) - } + error={errors.username?.message} aria-invalid={errors.username ? 'true' : 'false'} - id='username' + aria-describedby={`${usernameId}-error`} + id={usernameId} /> - {errors.username && errors.username.type === 'required' && ( - {t('registration.component.form.requiredField')} + {errors.username && ( + + {errors.username.message} + )} - - {t('registration.component.form.password')} + + {t('registration.component.form.password')} + { - clearErrors(['username', 'password']); - }, + required: t('registration.component.form.requiredField'), })} placeholder={passwordPlaceholder} - error={ - errors.password?.message || - (errors.password?.type === 'required' ? t('registration.component.form.requiredField') : undefined) - } + error={errors.password?.message} aria-invalid={errors.password ? 'true' : 'false'} - id='password' + aria-describedby={`${passwordId}-error`} + id={passwordId} /> - {errors.password && errors.password.type === 'required' && ( - {t('registration.component.form.requiredField')} + {errors.password && ( + + {errors.password.message} + )} {isResetPasswordAllowed && ( @@ -159,31 +179,7 @@ export const LoginForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRoute )} - - {errorOnSubmit === 'error-user-is-not-activated' && ( - {t('registration.page.registration.waitActivationWarning')} - )} - - {errorOnSubmit === 'error-app-user-is-not-allowed-to-login' && ( - {t('registration.page.login.errors.AppUserNotAllowedToLogin')} - )} - - {errorOnSubmit === 'user-not-found' && ( - {t('registration.page.login.errors.wrongCredentials')} - )} - - {errorOnSubmit === 'error-login-blocked-for-ip' && ( - {t('registration.page.login.errors.loginBlockedForIp')} - )} - - {errorOnSubmit === 'error-login-blocked-for-user' && ( - {t('registration.page.login.errors.loginBlockedForUser')} - )} - - {errorOnSubmit === 'error-license-user-limit-reached' && ( - {t('registration.page.login.errors.licenseUserLimitReached')} - )} - + {errorOnSubmit && {renderErrorOnSubmit(errorOnSubmit)}} diff --git a/packages/web-ui-registration/src/RegisterForm.tsx b/packages/web-ui-registration/src/RegisterForm.tsx index db3879d6e027..eb0aa7229f6d 100644 --- a/packages/web-ui-registration/src/RegisterForm.tsx +++ b/packages/web-ui-registration/src/RegisterForm.tsx @@ -5,7 +5,7 @@ import { Form, ActionLink } from '@rocket.chat/layout'; import { CustomFieldsForm, PasswordVerifier, useValidatePassword } from '@rocket.chat/ui-client'; import { useAccountsCustomFields, useSetting, useToastMessageDispatch } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; -import { useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import { useForm } from 'react-hook-form'; import { Trans, useTranslation } from 'react-i18next'; @@ -34,8 +34,14 @@ export const RegisterForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRo const passwordConfirmationPlaceholder = String(useSetting('Accounts_ConfirmPasswordPlaceholder')); const formLabelId = useUniqueId(); - const passwordId = useUniqueId(); const passwordVerifierId = useUniqueId(); + const nameId = useUniqueId(); + const emailId = useUniqueId(); + const usernameId = useUniqueId(); + const passwordId = useUniqueId(); + const passwordConfirmationId = useUniqueId(); + const reasonId = useUniqueId(); + const registerUser = useRegisterMethod(); const customFields = useAccountsCustomFields(); @@ -54,9 +60,17 @@ export const RegisterForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRo formState: { errors }, } = useForm({ mode: 'onBlur' }); - const password = watch('password'); + const { password } = watch(); const passwordIsValid = useValidatePassword(password); + const registerFormRef = useRef(null); + + useEffect(() => { + if (registerFormRef.current) { + registerFormRef.current.focus(); + } + }, []); + const handleRegister = async ({ password, passwordConfirmation: _, ...formData }: LoginRegisterPayload) => { registerUser.mutate( { pass: password, ...formData }, @@ -96,15 +110,21 @@ export const RegisterForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRo } return ( - + {t('registration.component.form.createAnAccount')} - - {requireNameForRegister ? `${t('registration.component.form.name')}*` : t('registration.component.form.nameOptional')} + + {t('registration.component.form.name')} - {errors.name && {t('registration.component.form.requiredField')}} + {errors.name && ( + + {t('registration.component.form.requiredField')} + + )} - {t('registration.component.form.email')}* + + {t('registration.component.form.email')} + - {errors.email && {errors.email.message || t('registration.component.form.requiredField')}} + {errors.email && ( + + {errors.email.message} + + )} - {t('registration.component.form.username')}* + + {t('registration.component.form.username')} + - {errors.username?.message && {errors.username.message}} - {errors.username?.type === 'required' && {t('registration.component.form.requiredField')}} + {errors.username && ( + + {errors.username.message} + + )} - {t('registration.component.form.password')}* + + {t('registration.component.form.password')} + {errors?.password && ( @@ -176,43 +215,53 @@ export const RegisterForm = ({ setLoginRoute }: { setLoginRoute: DispatchLoginRo )} - {requiresPasswordConfirmation && ( + + {requiresPasswordConfirmation && ( + + {t('registration.component.form.confirmPassword')} watch('password') === val, + validate: (val: string) => (watch('password') === val ? true : t('registration.component.form.invalidConfirmPass')), })} - error={errors.passwordConfirmation?.type === 'validate' ? t('registration.component.form.invalidConfirmPass') : undefined} - aria-invalid={errors.passwordConfirmation ? 'true' : false} - id='passwordConfirmation' + error={errors.passwordConfirmation?.message} + aria-invalid={errors.passwordConfirmation ? 'true' : 'false'} + id={passwordConfirmationId} + aria-describedby={`${passwordConfirmationId}-error`} placeholder={passwordConfirmationPlaceholder || t('Confirm_password')} disabled={!passwordIsValid} /> - )} - {errors.passwordConfirmation?.type === 'validate' && requiresPasswordConfirmation && ( - {t('registration.component.form.invalidConfirmPass')} - )} - {errors.passwordConfirmation?.type === 'required' && requiresPasswordConfirmation && ( - {t('registration.component.form.requiredField')} - )} - + {errors.passwordConfirmation && ( + + {errors.passwordConfirmation.message} + + )} + + )} {manuallyApproveNewUsersRequired && ( - {t('registration.component.form.reasonToJoin')}* + + {t('registration.component.form.reasonToJoin')} + - {errors.reason && {t('registration.component.form.requiredField')}} + {errors.reason && ( + + {t('registration.component.form.requiredField')} + + )} )} diff --git a/packages/web-ui-registration/src/RegisterTemplate.tsx b/packages/web-ui-registration/src/RegisterTemplate.tsx index 9afaac8816d5..9b50c176cef2 100644 --- a/packages/web-ui-registration/src/RegisterTemplate.tsx +++ b/packages/web-ui-registration/src/RegisterTemplate.tsx @@ -1,16 +1,18 @@ import { useSetting } from '@rocket.chat/ui-contexts'; -import type { ReactElement } from 'react'; +import type { AllHTMLAttributes } from 'react'; import HorizontalTemplate from './template/HorizontalTemplate'; import VerticalTemplate from './template/VerticalTemplate'; -const RegisterTemplate = ({ children }: { children: ReactElement }): ReactElement => { +const RegisterTemplate = ({ children, ...props }: AllHTMLAttributes) => { const template = useSetting<'vertical-template' | 'horizontal-template'>('Layout_Login_Template'); - if (template === 'vertical-template') { - return {children}; - } - return {children}; + return ( +
+ {template === 'vertical-template' && } + {template === 'horizontal-template' && } +
+ ); }; export default RegisterTemplate; diff --git a/packages/web-ui-registration/src/ResetPassword/ResetPassword.stories.tsx b/packages/web-ui-registration/src/ResetPassword/ResetPassword.stories.tsx index d2373c44e365..d3c213c7fcfb 100644 --- a/packages/web-ui-registration/src/ResetPassword/ResetPassword.stories.tsx +++ b/packages/web-ui-registration/src/ResetPassword/ResetPassword.stories.tsx @@ -1,8 +1,12 @@ +import { mockAppRoot } from '@rocket.chat/mock-providers'; +import { type ComponentMeta } from '@storybook/react'; + import ResetPasswordPage from './ResetPasswordPage'; export default { title: 'Login/ResetPassword', component: ResetPasswordPage, -}; + decorators: [mockAppRoot().buildStoryDecorator()], +} satisfies ComponentMeta; export const Basic = () => ; diff --git a/packages/web-ui-registration/src/components/LoginSwitchLanguageFooter.stories.tsx b/packages/web-ui-registration/src/components/LoginSwitchLanguageFooter.stories.tsx new file mode 100644 index 000000000000..a71d4410ff36 --- /dev/null +++ b/packages/web-ui-registration/src/components/LoginSwitchLanguageFooter.stories.tsx @@ -0,0 +1,42 @@ +import { Box, Tile } from '@rocket.chat/fuselage'; +import { mockAppRoot } from '@rocket.chat/mock-providers'; +import { type ComponentStory, type ComponentMeta } from '@storybook/react'; +import { createElement } from 'react'; +import { useTranslation } from 'react-i18next'; + +import LoginSwitchLanguageFooter from './LoginSwitchLanguageFooter'; + +export default { + title: 'components/LoginSwitchLanguageFooter', + component: LoginSwitchLanguageFooter, + decorators: [ + (fn) => + createElement(function ExampleTranslationDecorator() { + const { t } = useTranslation(); + + return ( + + {t('example.text')} + {fn()} + + ); + }), + mockAppRoot() + .withSetting('Language', 'fi') + .withTranslations('en', 'registration', { 'component.switchLanguage': 'Change to <1>{{ name }}' }) + .withTranslations('en', 'example', { text: 'Hello!' }) + .withTranslations('fi', 'registration', { 'component.switchLanguage': 'Vaihda kieleksi <1>{{ name }}' }) + .withTranslations('fi', 'example', { text: 'Hei!' }) + .withTranslations('pt-BR', 'registration', { 'component.switchLanguage': 'Mudar para <1>{{ name }}' }) + .withTranslations('pt', 'example', { text: 'Olá!' }) + .buildStoryDecorator(), + ], + args: { + browserLanguage: 'pt-BR', + }, + parameters: { + layout: 'centered', + }, +} satisfies ComponentMeta; + +export const Default: ComponentStory = (args) => ; diff --git a/packages/web-ui-registration/src/components/LoginSwitchLanguageFooter.tsx b/packages/web-ui-registration/src/components/LoginSwitchLanguageFooter.tsx index 9a23039f9336..17b45e9157cb 100644 --- a/packages/web-ui-registration/src/components/LoginSwitchLanguageFooter.tsx +++ b/packages/web-ui-registration/src/components/LoginSwitchLanguageFooter.tsx @@ -1,9 +1,11 @@ -import { useSetting, useLoadLanguage, useLanguage, useLanguages } from '@rocket.chat/ui-contexts'; -import type { ReactElement } from 'react'; -import { Fragment, useMemo } from 'react'; -import { Trans } from 'react-i18next'; +import { Button } from '@rocket.chat/fuselage'; +import { useLocalStorage } from '@rocket.chat/fuselage-hooks'; +import { HorizontalWizardLayoutCaption } from '@rocket.chat/layout'; +import { type TranslationLanguage, useSetting, useLoadLanguage, useLanguage, useLanguages } from '@rocket.chat/ui-contexts'; +import { type ReactElement, type UIEvent, useMemo, useEffect } from 'react'; +import { Trans, useTranslation } from 'react-i18next'; -export const normalizeLanguage = (language: string): string => { +const normalizeLanguage = (language: string): string => { // Fix browsers having all-lowercase language settings eg. pt-br, en-us const regex = /([a-z]{2,3})-([a-z]{2,4})/; const matches = regex.exec(language); @@ -14,49 +16,67 @@ export const normalizeLanguage = (language: string): string => { return language; }; -const browserLanguage = normalizeLanguage(window.navigator.language ?? 'en'); - -const LoginSwitchLanguageFooter = (): ReactElement | null => { +const useSuggestedLanguages = ({ + browserLanguage = normalizeLanguage(window.navigator.language ?? 'en'), +}: { + browserLanguage?: string; +}) => { + const availableLanguages = useLanguages(); const currentLanguage = useLanguage(); - - const languages = useLanguages(); - const loadLanguage = useLoadLanguage(); - - const serverLanguage = normalizeLanguage((useSetting('Language') as string | undefined) || 'en'); + const serverLanguage = normalizeLanguage(useSetting('Language') || 'en'); const suggestions = useMemo(() => { - const potentialSuggestions = new Set([serverLanguage, browserLanguage, 'en'].map(normalizeLanguage)); - return Array.from(potentialSuggestions).filter( - (language) => language && language !== currentLanguage && Boolean(languages.find(({ key }) => key === language)), + const potentialLanguages = new Set([serverLanguage, browserLanguage, 'en'].map(normalizeLanguage)); + const potentialSuggestions = Array.from(potentialLanguages).map((potentialLanguageKey) => + availableLanguages.find((language) => language.key === potentialLanguageKey), ); - }, [serverLanguage, currentLanguage, languages]); + return potentialSuggestions.filter((language): language is TranslationLanguage => { + return !!language && language.key !== currentLanguage; + }); + }, [serverLanguage, browserLanguage, availableLanguages, currentLanguage]); + + const { i18n } = useTranslation(); + + useEffect(() => { + i18n.loadLanguages(suggestions.map((suggestion) => suggestion.key)); + }, [i18n, suggestions]); + + return { suggestions }; +}; + +type LoginSwitchLanguageFooterProps = { + browserLanguage?: string; +}; + +const LoginSwitchLanguageFooter = ({ + browserLanguage = normalizeLanguage(window.navigator.language ?? 'en'), +}: LoginSwitchLanguageFooterProps): ReactElement | null => { + const loadLanguage = useLoadLanguage(); + const { suggestions } = useSuggestedLanguages({ browserLanguage }); - const handleSwitchLanguageClick = (language: string) => (): void => { - loadLanguage(language); - }; + const [, setPreferedLanguage] = useLocalStorage('preferedLanguage', ''); + const handleSwitchLanguageClick = + (language: TranslationLanguage) => + async (event: UIEvent): Promise => { + event.preventDefault(); + await loadLanguage(language.key); + setPreferedLanguage(language.key); + }; if (!suggestions.length) { return null; } return ( -

- - Switch to - <> - {suggestions.map((language, index) => { - return ( - - {index > 0 ? : <>} - - - ); - })} - - -

+ + {suggestions.map((suggestion) => ( + + ))} + ); }; diff --git a/packages/web-ui-registration/src/components/RegisterTitle.tsx b/packages/web-ui-registration/src/components/RegisterTitle.tsx index e00e010fd674..2a8dea17206c 100644 --- a/packages/web-ui-registration/src/components/RegisterTitle.tsx +++ b/packages/web-ui-registration/src/components/RegisterTitle.tsx @@ -9,5 +9,10 @@ export const RegisterTitle = (): ReactElement | null => { if (hideTitle) { return null; } - return Welcome to {siteName} workspace; + + return ( + + Welcome to {siteName} workspace + + ); }; diff --git a/packages/web-ui-registration/src/template/HorizontalTemplate.tsx b/packages/web-ui-registration/src/template/HorizontalTemplate.tsx index 197091928086..6fd11618746f 100644 --- a/packages/web-ui-registration/src/template/HorizontalTemplate.tsx +++ b/packages/web-ui-registration/src/template/HorizontalTemplate.tsx @@ -5,7 +5,6 @@ import { HorizontalWizardLayoutContent, HorizontalWizardLayoutTitle, HorizontalWizardLayoutFooter, - HorizontalWizardLayoutDescription, } from '@rocket.chat/layout'; import { useSetting, useAssetWithDarkModePath } from '@rocket.chat/ui-contexts'; import type { ReactElement, ReactNode } from 'react'; @@ -29,9 +28,7 @@ const HorizontalTemplate = ({ children }: { children: ReactNode }): ReactElement - - - + {children} diff --git a/packages/web-ui-registration/tsconfig.build.json b/packages/web-ui-registration/tsconfig.build.json new file mode 100644 index 000000000000..a175aec991c8 --- /dev/null +++ b/packages/web-ui-registration/tsconfig.build.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "ESNext" + }, + "include": ["./src/**/*"], + "exclude": ["./src/**/*.spec.ts", "./src/**/*.stories.tsx"] +} diff --git a/packages/web-ui-registration/tsconfig.json b/packages/web-ui-registration/tsconfig.json index e2be47cf5499..47119e42b814 100644 --- a/packages/web-ui-registration/tsconfig.json +++ b/packages/web-ui-registration/tsconfig.json @@ -1,8 +1,9 @@ { "extends": "../../tsconfig.base.client.json", "compilerOptions": { - "rootDir": "./src", - "outDir": "./dist" + "rootDirs": ["./src","./.storybook"], + "outDir": "./dist", + "module": "CommonJS" }, - "include": ["./src/**/*"] + "include": ["./src", "./.storybook"], } diff --git a/yarn.lock b/yarn.lock index afc0f0262a95..7d7b23691683 100644 --- a/yarn.lock +++ b/yarn.lock @@ -955,6 +955,17 @@ __metadata: languageName: node linkType: hard +"@axe-core/playwright@npm:^4.7.3": + version: 4.7.3 + resolution: "@axe-core/playwright@npm:4.7.3" + dependencies: + axe-core: ^4.7.0 + peerDependencies: + playwright-core: ">= 1.0.0" + checksum: c913cf6a816af283fc733411013460656213cf6c0efffcc36db1fd2984ffac3d780efd0a9aabd3b41ce78e2a536fee9ba5436d19311f660067e4c3560677b115 + languageName: node + linkType: hard + "@babel/code-frame@npm:7.12.11": version: 7.12.11 resolution: "@babel/code-frame@npm:7.12.11" @@ -964,23 +975,17 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.22.5, @babel/code-frame@npm:^7.5.5, @babel/code-frame@npm:^7.8.3": - version: 7.22.5 - resolution: "@babel/code-frame@npm:7.22.5" +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.22.10, @babel/code-frame@npm:^7.22.5, @babel/code-frame@npm:^7.5.5, @babel/code-frame@npm:^7.8.3": + version: 7.22.10 + resolution: "@babel/code-frame@npm:7.22.10" dependencies: - "@babel/highlight": ^7.22.5 - checksum: cfe804f518f53faaf9a1d3e0f9f74127ab9a004912c3a16fda07fb6a633393ecb9918a053cb71804204c1b7ec3d49e1699604715e2cfb0c9f7bc4933d324ebb6 - languageName: node - linkType: hard - -"@babel/compat-data@npm:^7.20.5": - version: 7.20.5 - resolution: "@babel/compat-data@npm:7.20.5" - checksum: 523790c43ef6388fae91d1ca9acf1ab0e1b22208dcd39c0e5e7a6adf0b48a133f1831be8d5931a72ecd48860f3e3fb777cb89840794abd8647a5c8e5cfab484e + "@babel/highlight": ^7.22.10 + chalk: ^2.4.2 + checksum: 89a06534ad19759da6203a71bad120b1d7b2ddc016c8e07d4c56b35dea25e7396c6da60a754e8532a86733092b131ae7f661dbe6ba5d165ea777555daa2ed3c9 languageName: node linkType: hard -"@babel/compat-data@npm:^7.22.5, @babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.22.9": +"@babel/compat-data@npm:^7.20.5, @babel/compat-data@npm:^7.22.5, @babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.22.9": version: 7.22.9 resolution: "@babel/compat-data@npm:7.22.9" checksum: bed77d9044ce948b4327b30dd0de0779fa9f3a7ed1f2d31638714ed00229fa71fc4d1617ae0eb1fad419338d3658d0e9a5a083297451e09e73e078d0347ff808 @@ -1011,26 +1016,26 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.1.0, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.10, @babel/core@npm:^7.12.3, @babel/core@npm:^7.20.7, @babel/core@npm:^7.21.4, @babel/core@npm:^7.7.5, @babel/core@npm:~7.22.9": - version: 7.22.9 - resolution: "@babel/core@npm:7.22.9" +"@babel/core@npm:^7.1.0, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.10, @babel/core@npm:^7.12.3, @babel/core@npm:^7.20.7, @babel/core@npm:^7.21.4, @babel/core@npm:^7.7.5, @babel/core@npm:~7.22.10, @babel/core@npm:~7.22.9": + version: 7.22.10 + resolution: "@babel/core@npm:7.22.10" dependencies: "@ampproject/remapping": ^2.2.0 - "@babel/code-frame": ^7.22.5 - "@babel/generator": ^7.22.9 - "@babel/helper-compilation-targets": ^7.22.9 + "@babel/code-frame": ^7.22.10 + "@babel/generator": ^7.22.10 + "@babel/helper-compilation-targets": ^7.22.10 "@babel/helper-module-transforms": ^7.22.9 - "@babel/helpers": ^7.22.6 - "@babel/parser": ^7.22.7 + "@babel/helpers": ^7.22.10 + "@babel/parser": ^7.22.10 "@babel/template": ^7.22.5 - "@babel/traverse": ^7.22.8 - "@babel/types": ^7.22.5 + "@babel/traverse": ^7.22.10 + "@babel/types": ^7.22.10 convert-source-map: ^1.7.0 debug: ^4.1.0 gensync: ^1.0.0-beta.2 json5: ^2.2.2 semver: ^6.3.1 - checksum: 7bf069aeceb417902c4efdaefab1f7b94adb7dea694a9aed1bda2edf4135348a080820529b1a300c6f8605740a00ca00c19b2d5e74b5dd489d99d8c11d5e56d1 + checksum: cc4efa09209fe1f733cf512e9e4bb50870b191ab2dee8014e34cd6e731f204e48476cc53b4bbd0825d4d342304d577ae43ff5fd8ab3896080673c343321acb32 languageName: node linkType: hard @@ -1048,15 +1053,15 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.12.11, @babel/generator@npm:^7.12.5, @babel/generator@npm:^7.22.7, @babel/generator@npm:^7.22.9, @babel/generator@npm:^7.7.2": - version: 7.22.9 - resolution: "@babel/generator@npm:7.22.9" +"@babel/generator@npm:^7.12.11, @babel/generator@npm:^7.12.5, @babel/generator@npm:^7.22.10, @babel/generator@npm:^7.7.2": + version: 7.22.10 + resolution: "@babel/generator@npm:7.22.10" dependencies: - "@babel/types": ^7.22.5 + "@babel/types": ^7.22.10 "@jridgewell/gen-mapping": ^0.3.2 "@jridgewell/trace-mapping": ^0.3.17 jsesc: ^2.5.1 - checksum: 7c9d2c58b8d5ac5e047421a6ab03ec2ff5d9a5ff2c2212130a0055e063ac349e0b19d435537d6886c999771aef394832e4f54cd9fc810100a7f23d982f6af06b + checksum: 59a79730abdff9070692834bd3af179e7a9413fa2ff7f83dff3eb888765aeaeb2bfc7b0238a49613ed56e1af05956eff303cc139f2407eda8df974813e486074 languageName: node linkType: hard @@ -1078,18 +1083,16 @@ __metadata: languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.13.0, @babel/helper-compilation-targets@npm:^7.20.7, @babel/helper-compilation-targets@npm:^7.22.5, @babel/helper-compilation-targets@npm:^7.22.6, @babel/helper-compilation-targets@npm:^7.22.9": - version: 7.22.9 - resolution: "@babel/helper-compilation-targets@npm:7.22.9" +"@babel/helper-compilation-targets@npm:^7.13.0, @babel/helper-compilation-targets@npm:^7.20.7, @babel/helper-compilation-targets@npm:^7.22.10, @babel/helper-compilation-targets@npm:^7.22.5, @babel/helper-compilation-targets@npm:^7.22.6": + version: 7.22.10 + resolution: "@babel/helper-compilation-targets@npm:7.22.10" dependencies: "@babel/compat-data": ^7.22.9 "@babel/helper-validator-option": ^7.22.5 browserslist: ^4.21.9 lru-cache: ^5.1.1 semver: ^6.3.1 - peerDependencies: - "@babel/core": ^7.0.0 - checksum: ea0006c6a93759025f4a35a25228ae260538c9f15023e8aac2a6d45ca68aef4cf86cfc429b19af9a402cbdd54d5de74ad3fbcf6baa7e48184dc079f1a791e178 + checksum: f6f1896816392bcff671bbe6e277307729aee53befb4a66ea126e2a91eda78d819a70d06fa384c74ef46c1595544b94dca50bef6c78438d9ffd31776dafbd435 languageName: node linkType: hard @@ -1240,17 +1243,16 @@ __metadata: languageName: node linkType: hard -"@babel/helper-remap-async-to-generator@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-remap-async-to-generator@npm:7.22.5" +"@babel/helper-remap-async-to-generator@npm:^7.22.5, @babel/helper-remap-async-to-generator@npm:^7.22.9": + version: 7.22.9 + resolution: "@babel/helper-remap-async-to-generator@npm:7.22.9" dependencies: "@babel/helper-annotate-as-pure": ^7.22.5 "@babel/helper-environment-visitor": ^7.22.5 - "@babel/helper-wrap-function": ^7.22.5 - "@babel/types": ^7.22.5 + "@babel/helper-wrap-function": ^7.22.9 peerDependencies: "@babel/core": ^7.0.0 - checksum: 1e51dcff1c22e97ea3d22034b77788048eb6d8c6860325bd7a1046b7a7135730cefd93b5c96fd9839d76031095d5ffb6f0cd6ee90a5d69a4c7de980d7f4623d9 + checksum: 05538079447829b13512157491cc77f9cf1ea7e1680e15cff0682c3ed9ee162de0c4862ece20a6d6b2df28177a1520bcfe45993fbeccf2747a81795a7c3f6290 languageName: node linkType: hard @@ -1295,14 +1297,14 @@ __metadata: languageName: node linkType: hard -"@babel/helper-string-parser@npm:^7.19.4, @babel/helper-string-parser@npm:^7.22.5": +"@babel/helper-string-parser@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-string-parser@npm:7.22.5" checksum: 836851ca5ec813077bbb303acc992d75a360267aa3b5de7134d220411c852a6f17de7c0d0b8c8dcc0f567f67874c00f4528672b2a4f1bc978a3ada64c8c78467 languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.19.1, @babel/helper-validator-identifier@npm:^7.22.5": +"@babel/helper-validator-identifier@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-validator-identifier@npm:7.22.5" checksum: 7f0f30113474a28298c12161763b49de5018732290ca4de13cdaefd4fd0d635a6fe3f6686c37a02905fb1e64f21a5ee2b55140cf7b070e729f1bd66866506aea @@ -1316,46 +1318,45 @@ __metadata: languageName: node linkType: hard -"@babel/helper-wrap-function@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-wrap-function@npm:7.22.5" +"@babel/helper-wrap-function@npm:^7.22.9": + version: 7.22.10 + resolution: "@babel/helper-wrap-function@npm:7.22.10" dependencies: "@babel/helper-function-name": ^7.22.5 "@babel/template": ^7.22.5 - "@babel/traverse": ^7.22.5 - "@babel/types": ^7.22.5 - checksum: a4ba2d7577ad3ce92fadaa341ffce3b0e4b389808099b07c80847f9be0852f4b42344612bc1b3d1b796ffb75be56d5957c5c56a1734f6aee5ccbb7cd9ab12691 + "@babel/types": ^7.22.10 + checksum: 854bd85fc1de1d4c633f04aa1f5b6b022fbc013b47d012b6a11a7a9125a1f4a2a4f13a3e0d7a7056fe7eda8a9ecd1ea3daf8af685685a2d1b16578768cfdd28f languageName: node linkType: hard -"@babel/helpers@npm:^7.12.5, @babel/helpers@npm:^7.22.6": - version: 7.22.6 - resolution: "@babel/helpers@npm:7.22.6" +"@babel/helpers@npm:^7.12.5, @babel/helpers@npm:^7.22.10": + version: 7.22.10 + resolution: "@babel/helpers@npm:7.22.10" dependencies: "@babel/template": ^7.22.5 - "@babel/traverse": ^7.22.6 - "@babel/types": ^7.22.5 - checksum: 5c1f33241fe7bf7709868c2105134a0a86dca26a0fbd508af10a89312b1f77ca38ebae43e50be3b208613c5eacca1559618af4ca236f0abc55d294800faeff30 + "@babel/traverse": ^7.22.10 + "@babel/types": ^7.22.10 + checksum: 3b1219e362df390b6c5d94b75a53fc1c2eb42927ced0b8022d6a29b833a839696206b9bdad45b4805d05591df49fc16b6fb7db758c9c2ecfe99e3e94cb13020f languageName: node linkType: hard -"@babel/highlight@npm:^7.10.4, @babel/highlight@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/highlight@npm:7.22.5" +"@babel/highlight@npm:^7.10.4, @babel/highlight@npm:^7.22.10": + version: 7.22.10 + resolution: "@babel/highlight@npm:7.22.10" dependencies: "@babel/helper-validator-identifier": ^7.22.5 - chalk: ^2.0.0 + chalk: ^2.4.2 js-tokens: ^4.0.0 - checksum: f61ae6de6ee0ea8d9b5bcf2a532faec5ab0a1dc0f7c640e5047fc61630a0edb88b18d8c92eb06566d30da7a27db841aca11820ecd3ebe9ce514c9350fbed39c4 + checksum: f714a1e1a72dd9d72f6383f4f30fd342e21a8df32d984a4ea8f5eab691bb6ba6db2f8823d4b4cf135d98869e7a98925b81306aa32ee3c429f8cfa52c75889e1b languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.12.11, @babel/parser@npm:^7.12.7, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.5, @babel/parser@npm:^7.22.7": - version: 7.22.7 - resolution: "@babel/parser@npm:7.22.7" +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.12.11, @babel/parser@npm:^7.12.7, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.10, @babel/parser@npm:^7.22.5": + version: 7.22.10 + resolution: "@babel/parser@npm:7.22.10" bin: parser: ./bin/babel-parser.js - checksum: 02209ddbd445831ee8bf966fdf7c29d189ed4b14343a68eb2479d940e7e3846340d7cc6bd654a5f3d87d19dc84f49f50a58cf9363bee249dc5409ff3ba3dab54 + checksum: af51567b7d3cdf523bc608eae057397486c7fa6c2e5753027c01fe5c36f0767b2d01ce3049b222841326cc5b8c7fda1d810ac1a01af0a97bb04679e2ef9f7049 languageName: node linkType: hard @@ -1510,18 +1511,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-unicode-property-regex@npm:^7.4.4": - version: 7.18.6 - resolution: "@babel/plugin-proposal-unicode-property-regex@npm:7.18.6" - dependencies: - "@babel/helper-create-regexp-features-plugin": ^7.18.6 - "@babel/helper-plugin-utils": ^7.18.6 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: a8575ecb7ff24bf6c6e94808d5c84bb5a0c6dd7892b54f09f4646711ba0ee1e1668032b3c43e3e1dfec2c5716c302e851ac756c1645e15882d73df6ad21ae951 - languageName: node - linkType: hard - "@babel/plugin-syntax-async-generators@npm:^7.8.4": version: 7.8.4 resolution: "@babel/plugin-syntax-async-generators@npm:7.8.4" @@ -1809,17 +1798,17 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-async-generator-functions@npm:^7.22.7": - version: 7.22.7 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.22.7" +"@babel/plugin-transform-async-generator-functions@npm:^7.22.10": + version: 7.22.10 + resolution: "@babel/plugin-transform-async-generator-functions@npm:7.22.10" dependencies: "@babel/helper-environment-visitor": ^7.22.5 "@babel/helper-plugin-utils": ^7.22.5 - "@babel/helper-remap-async-to-generator": ^7.22.5 + "@babel/helper-remap-async-to-generator": ^7.22.9 "@babel/plugin-syntax-async-generators": ^7.8.4 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 57cd2cce3fb696dadf00e88f168683df69e900b92dadeae07429243c43bc21d5ccdc0c2db61cf5c37bd0fbd893fc455466bef6babe4aa5b79d9cb8ba89f40ae7 + checksum: 87d77b66fda05b42450aa285fa031aa3963c52aab00190f95f6c3ddefbed683035c1f314347c888f8406fba5d436b888ff75b5e36b8ab23afd4ca4c3f086f88c languageName: node linkType: hard @@ -1847,14 +1836,14 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-block-scoping@npm:^7.12.12, @babel/plugin-transform-block-scoping@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-block-scoping@npm:7.22.5" +"@babel/plugin-transform-block-scoping@npm:^7.12.12, @babel/plugin-transform-block-scoping@npm:^7.22.10": + version: 7.22.10 + resolution: "@babel/plugin-transform-block-scoping@npm:7.22.10" dependencies: "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 26987002cfe6e24544e60fa35f07052b6557f590c1a1cc5cf35d6dc341d7fea163c1222a2d70d5d2692f0b9860d942fd3ba979848b2995d4debffa387b9b19ae + checksum: b1d06f358dedcb748a57e5feea4b9285c60593fb2912b921f22898c57c552c78fe18128678c8f84dd4ea1d4e5aebede8783830b24cd63f22c30261156d78bc77 languageName: node linkType: hard @@ -1914,18 +1903,18 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-destructuring@npm:^7.12.1, @babel/plugin-transform-destructuring@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-destructuring@npm:7.22.5" +"@babel/plugin-transform-destructuring@npm:^7.12.1, @babel/plugin-transform-destructuring@npm:^7.22.10": + version: 7.22.10 + resolution: "@babel/plugin-transform-destructuring@npm:7.22.10" dependencies: "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 76f6ea2aee1fcfa1c3791eb7a5b89703c6472650b993e8666fff0f1d6e9d737a84134edf89f63c92297f3e75064c1263219463b02dd9bc7434b6e5b9935e3f20 + checksum: 011707801bd0029fd4f0523d24d06fdc0cbe8c9da280d75728f76713d639c4dc976e1b56a1ba7bff25468f86867efb71c9b4cac81140adbdd0abf2324b19a8bb languageName: node linkType: hard -"@babel/plugin-transform-dotall-regex@npm:^7.22.5, @babel/plugin-transform-dotall-regex@npm:^7.4.4": +"@babel/plugin-transform-dotall-regex@npm:^7.22.5": version: 7.22.5 resolution: "@babel/plugin-transform-dotall-regex@npm:7.22.5" dependencies: @@ -2203,16 +2192,16 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-optional-chaining@npm:^7.22.5, @babel/plugin-transform-optional-chaining@npm:^7.22.6": - version: 7.22.6 - resolution: "@babel/plugin-transform-optional-chaining@npm:7.22.6" +"@babel/plugin-transform-optional-chaining@npm:^7.22.10, @babel/plugin-transform-optional-chaining@npm:^7.22.5": + version: 7.22.10 + resolution: "@babel/plugin-transform-optional-chaining@npm:7.22.10" dependencies: "@babel/helper-plugin-utils": ^7.22.5 "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 "@babel/plugin-syntax-optional-chaining": ^7.8.3 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 9713f7920ed04090c149fc5ec024dd1638e8b97aa4ae3753b93072d84103b8de380afb96d6cf03e53b285420db4f705f3ac13149c6fd54f322b61dc19e33c54f + checksum: 522d6214bb9f6ede8a2fc56a873e791aabd62f0b3be78fb8e62ca801a9033bcadabfb77aec6739f0e67f0f15f7c739c08bafafd66d3676edf1941fe6429cebcd languageName: node linkType: hard @@ -2335,15 +2324,15 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-regenerator@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-regenerator@npm:7.22.5" +"@babel/plugin-transform-regenerator@npm:^7.22.10": + version: 7.22.10 + resolution: "@babel/plugin-transform-regenerator@npm:7.22.10" dependencies: "@babel/helper-plugin-utils": ^7.22.5 - regenerator-transform: ^0.15.1 + regenerator-transform: ^0.15.2 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: f7c5ca5151321963df777cc02725d10d1ccc3b3b8323da0423aecd9ac6144cbdd2274af5281a5580db2fc2f8b234e318517b5d76b85669118906533a559f2b6a + checksum: e13678d62d6fa96f11cb8b863f00e8693491e7adc88bfca3f2820f80cbac8336e7dec3a596eee6a1c4663b7ececc3564f2cd7fb44ed6d4ce84ac2bb7f39ecc6e languageName: node linkType: hard @@ -2428,14 +2417,14 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-escapes@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-unicode-escapes@npm:7.22.5" +"@babel/plugin-transform-unicode-escapes@npm:^7.22.10": + version: 7.22.10 + resolution: "@babel/plugin-transform-unicode-escapes@npm:7.22.10" dependencies: "@babel/helper-plugin-utils": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: da5e85ab3bb33a75cbf6181bfd236b208dc934702fd304db127232f17b4e0f42c6d3f238de8589470b4190906967eea8ca27adf3ae9d8ee4de2a2eae906ed186 + checksum: 807f40ed1324c8cb107c45358f1903384ca3f0ef1d01c5a3c5c9b271c8d8eec66936a3dcc8d75ddfceea9421420368c2e77ae3adef0a50557e778dfe296bf382 languageName: node linkType: hard @@ -2475,12 +2464,12 @@ __metadata: languageName: node linkType: hard -"@babel/preset-env@npm:^7.12.11, @babel/preset-env@npm:~7.22.9": - version: 7.22.9 - resolution: "@babel/preset-env@npm:7.22.9" +"@babel/preset-env@npm:^7.12.11, @babel/preset-env@npm:~7.22.10, @babel/preset-env@npm:~7.22.9": + version: 7.22.10 + resolution: "@babel/preset-env@npm:7.22.10" dependencies: "@babel/compat-data": ^7.22.9 - "@babel/helper-compilation-targets": ^7.22.9 + "@babel/helper-compilation-targets": ^7.22.10 "@babel/helper-plugin-utils": ^7.22.5 "@babel/helper-validator-option": ^7.22.5 "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": ^7.22.5 @@ -2505,15 +2494,15 @@ __metadata: "@babel/plugin-syntax-top-level-await": ^7.14.5 "@babel/plugin-syntax-unicode-sets-regex": ^7.18.6 "@babel/plugin-transform-arrow-functions": ^7.22.5 - "@babel/plugin-transform-async-generator-functions": ^7.22.7 + "@babel/plugin-transform-async-generator-functions": ^7.22.10 "@babel/plugin-transform-async-to-generator": ^7.22.5 "@babel/plugin-transform-block-scoped-functions": ^7.22.5 - "@babel/plugin-transform-block-scoping": ^7.22.5 + "@babel/plugin-transform-block-scoping": ^7.22.10 "@babel/plugin-transform-class-properties": ^7.22.5 "@babel/plugin-transform-class-static-block": ^7.22.5 "@babel/plugin-transform-classes": ^7.22.6 "@babel/plugin-transform-computed-properties": ^7.22.5 - "@babel/plugin-transform-destructuring": ^7.22.5 + "@babel/plugin-transform-destructuring": ^7.22.10 "@babel/plugin-transform-dotall-regex": ^7.22.5 "@babel/plugin-transform-duplicate-keys": ^7.22.5 "@babel/plugin-transform-dynamic-import": ^7.22.5 @@ -2536,32 +2525,32 @@ __metadata: "@babel/plugin-transform-object-rest-spread": ^7.22.5 "@babel/plugin-transform-object-super": ^7.22.5 "@babel/plugin-transform-optional-catch-binding": ^7.22.5 - "@babel/plugin-transform-optional-chaining": ^7.22.6 + "@babel/plugin-transform-optional-chaining": ^7.22.10 "@babel/plugin-transform-parameters": ^7.22.5 "@babel/plugin-transform-private-methods": ^7.22.5 "@babel/plugin-transform-private-property-in-object": ^7.22.5 "@babel/plugin-transform-property-literals": ^7.22.5 - "@babel/plugin-transform-regenerator": ^7.22.5 + "@babel/plugin-transform-regenerator": ^7.22.10 "@babel/plugin-transform-reserved-words": ^7.22.5 "@babel/plugin-transform-shorthand-properties": ^7.22.5 "@babel/plugin-transform-spread": ^7.22.5 "@babel/plugin-transform-sticky-regex": ^7.22.5 "@babel/plugin-transform-template-literals": ^7.22.5 "@babel/plugin-transform-typeof-symbol": ^7.22.5 - "@babel/plugin-transform-unicode-escapes": ^7.22.5 + "@babel/plugin-transform-unicode-escapes": ^7.22.10 "@babel/plugin-transform-unicode-property-regex": ^7.22.5 "@babel/plugin-transform-unicode-regex": ^7.22.5 "@babel/plugin-transform-unicode-sets-regex": ^7.22.5 - "@babel/preset-modules": ^0.1.5 - "@babel/types": ^7.22.5 - babel-plugin-polyfill-corejs2: ^0.4.4 - babel-plugin-polyfill-corejs3: ^0.8.2 - babel-plugin-polyfill-regenerator: ^0.5.1 + "@babel/preset-modules": 0.1.6-no-external-plugins + "@babel/types": ^7.22.10 + babel-plugin-polyfill-corejs2: ^0.4.5 + babel-plugin-polyfill-corejs3: ^0.8.3 + babel-plugin-polyfill-regenerator: ^0.5.2 core-js-compat: ^3.31.0 semver: ^6.3.1 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 6caa2897bbda30c6932aed0a03827deb1337c57108050c9f97dc9a857e1533c7125b168b6d70b9d191965bf05f9f233f0ad20303080505dff7ce39740aaa759d + checksum: 4145a660a7b05e21e6d8b6cdf348c6931238abb15282a258bdb5e04cd3cca9356dc120ecfe0d1b977819ade4aac50163127c86db2300227ff60392d24daa0b7c languageName: node linkType: hard @@ -2578,18 +2567,16 @@ __metadata: languageName: node linkType: hard -"@babel/preset-modules@npm:^0.1.5": - version: 0.1.5 - resolution: "@babel/preset-modules@npm:0.1.5" +"@babel/preset-modules@npm:0.1.6-no-external-plugins": + version: 0.1.6-no-external-plugins + resolution: "@babel/preset-modules@npm:0.1.6-no-external-plugins" dependencies: "@babel/helper-plugin-utils": ^7.0.0 - "@babel/plugin-proposal-unicode-property-regex": ^7.4.4 - "@babel/plugin-transform-dotall-regex": ^7.4.4 "@babel/types": ^7.4.4 esutils: ^2.0.2 peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 8430e0e9e9d520b53e22e8c4c6a5a080a12b63af6eabe559c2310b187bd62ae113f3da82ba33e9d1d0f3230930ca702843aae9dd226dec51f7d7114dc1f51c10 + "@babel/core": ^7.0.0-0 || ^8.0.0-0 <8.0.0 + checksum: 4855e799bc50f2449fb5210f78ea9e8fd46cf4f242243f1e2ed838e2bd702e25e73e822e7f8447722a5f4baa5e67a8f7a0e403f3e7ce04540ff743a9c411c375 languageName: node linkType: hard @@ -2655,12 +2642,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.0, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.14.5, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.17.2, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.20.1, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.5.0, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.2, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.9.2, @babel/runtime@npm:~7.22.6": - version: 7.22.6 - resolution: "@babel/runtime@npm:7.22.6" +"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.17.2, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.20.1, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.22.5, @babel/runtime@npm:^7.5.0, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.2, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.9.2, @babel/runtime@npm:~7.22.6": + version: 7.22.10 + resolution: "@babel/runtime@npm:7.22.10" dependencies: - regenerator-runtime: ^0.13.11 - checksum: e585338287c4514a713babf4fdb8fc2a67adcebab3e7723a739fc62c79cfda875b314c90fd25f827afb150d781af97bc16c85bfdbfa2889f06053879a1ddb597 + regenerator-runtime: ^0.14.0 + checksum: 524d41517e68953dbc73a4f3616b8475e5813f64e28ba89ff5fca2c044d535c2ea1a3f310df1e5bb06162e1f0b401b5c4af73fe6e2519ca2450d9d8c44cf268d languageName: node linkType: hard @@ -2684,43 +2671,32 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.12.11, @babel/traverse@npm:^7.12.9, @babel/traverse@npm:^7.13.0, @babel/traverse@npm:^7.22.5, @babel/traverse@npm:^7.22.6, @babel/traverse@npm:^7.22.8": - version: 7.22.8 - resolution: "@babel/traverse@npm:7.22.8" +"@babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.12.11, @babel/traverse@npm:^7.12.9, @babel/traverse@npm:^7.13.0, @babel/traverse@npm:^7.22.10, @babel/traverse@npm:^7.22.5": + version: 7.22.10 + resolution: "@babel/traverse@npm:7.22.10" dependencies: - "@babel/code-frame": ^7.22.5 - "@babel/generator": ^7.22.7 + "@babel/code-frame": ^7.22.10 + "@babel/generator": ^7.22.10 "@babel/helper-environment-visitor": ^7.22.5 "@babel/helper-function-name": ^7.22.5 "@babel/helper-hoist-variables": ^7.22.5 "@babel/helper-split-export-declaration": ^7.22.6 - "@babel/parser": ^7.22.7 - "@babel/types": ^7.22.5 + "@babel/parser": ^7.22.10 + "@babel/types": ^7.22.10 debug: ^4.1.0 globals: ^11.1.0 - checksum: a381369bc3eedfd13ed5fef7b884657f1c29024ea7388198149f0edc34bd69ce3966e9f40188d15f56490a5e12ba250ccc485f2882b53d41b054fccefb233e33 + checksum: 9f7b358563bfb0f57ac4ed639f50e5c29a36b821a1ce1eea0c7db084f5b925e3275846d0de63bde01ca407c85d9804e0efbe370d92cd2baaafde3bd13b0f4cdb languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.11, @babel/types@npm:^7.12.7, @babel/types@npm:^7.2.0, @babel/types@npm:^7.22.5, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": - version: 7.22.5 - resolution: "@babel/types@npm:7.22.5" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.11, @babel/types@npm:^7.12.7, @babel/types@npm:^7.2.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.10, @babel/types@npm:^7.22.5, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": + version: 7.22.10 + resolution: "@babel/types@npm:7.22.10" dependencies: "@babel/helper-string-parser": ^7.22.5 "@babel/helper-validator-identifier": ^7.22.5 to-fast-properties: ^2.0.0 - checksum: c13a9c1dc7d2d1a241a2f8363540cb9af1d66e978e8984b400a20c4f38ba38ca29f06e26a0f2d49a70bad9e57615dac09c35accfddf1bb90d23cd3e0a0bab892 - languageName: node - linkType: hard - -"@babel/types@npm:^7.20.7": - version: 7.20.7 - resolution: "@babel/types@npm:7.20.7" - dependencies: - "@babel/helper-string-parser": ^7.19.4 - "@babel/helper-validator-identifier": ^7.19.1 - to-fast-properties: ^2.0.0 - checksum: b39af241f0b72bba67fd6d0d23914f6faec8c0eba8015c181cbd5ea92e59fc91a52a1ab490d3520c7dbd19ddb9ebb76c476308f6388764f16d8201e37fae6811 + checksum: 095c4f4b7503fa816e4094113f0ec2351ef96ff32012010b771693066ff628c7c664b21c6bd3fb93aeb46fe7c61f6b3a3c9e4ed0034d6a2481201c417371c8af languageName: node linkType: hard @@ -3348,6 +3324,15 @@ __metadata: languageName: node linkType: hard +"@emotion/use-insertion-effect-with-fallbacks@npm:^1.0.0": + version: 1.0.1 + resolution: "@emotion/use-insertion-effect-with-fallbacks@npm:1.0.1" + peerDependencies: + react: ">=16.8.0" + checksum: 700b6e5bbb37a9231f203bb3af11295eed01d73b2293abece0bc2a2237015e944d7b5114d4887ad9a79776504aa51ed2a8b0ddbc117c54495dd01a6b22f93786 + languageName: node + linkType: hard + "@esbuild/android-arm64@npm:0.17.19": version: 0.17.19 resolution: "@esbuild/android-arm64@npm:0.17.19" @@ -3568,6 +3553,44 @@ __metadata: languageName: node linkType: hard +"@floating-ui/core@npm:^1.4.1": + version: 1.4.1 + resolution: "@floating-ui/core@npm:1.4.1" + dependencies: + "@floating-ui/utils": ^0.1.1 + checksum: be4ab864fe17eeba5e205bd554c264b9a4895a57c573661bbf638357fa3108677fed7ba3269ec15b4da90e29274c9b626d5a15414e8d1fe691e210d02a03695c + languageName: node + linkType: hard + +"@floating-ui/dom@npm:^1.3.0": + version: 1.5.1 + resolution: "@floating-ui/dom@npm:1.5.1" + dependencies: + "@floating-ui/core": ^1.4.1 + "@floating-ui/utils": ^0.1.1 + checksum: ddb509030978536ba7b321cf8c764ae9d0142a3b1fefb7e6bc050a5de7e825e12131fa5089009edabf7c125fb274886da211a5220fe17a71d875a7a96eb1386c + languageName: node + linkType: hard + +"@floating-ui/react-dom@npm:^2.0.0": + version: 2.0.1 + resolution: "@floating-ui/react-dom@npm:2.0.1" + dependencies: + "@floating-ui/dom": ^1.3.0 + peerDependencies: + react: ">=16.8.0" + react-dom: ">=16.8.0" + checksum: 00fef2cf69ac2b15952e47505fd9e23f6cc5c20a26adc707862932826d1682f3c30f83c9887abfc93574fdca2d34dd2fc00271527318b1db403549cd6bc9eb00 + languageName: node + linkType: hard + +"@floating-ui/utils@npm:^0.1.1": + version: 0.1.1 + resolution: "@floating-ui/utils@npm:0.1.1" + checksum: 548acdda7902f45b0afbe34e2e7f4cbff0696b95bad8c039f80936519de24ef2ec20e79902825b7815294b37f51a7c52ee86288b0688869a57cc229a164d86b4 + languageName: node + linkType: hard + "@formatjs/ecma402-abstract@npm:1.12.0": version: 1.12.0 resolution: "@formatjs/ecma402-abstract@npm:1.12.0" @@ -4162,7 +4185,7 @@ __metadata: languageName: node linkType: hard -"@juggle/resize-observer@npm:^3.4.0": +"@juggle/resize-observer@npm:^3.3.1, @juggle/resize-observer@npm:^3.4.0": version: 3.4.0 resolution: "@juggle/resize-observer@npm:3.4.0" checksum: 2505028c05cc2e17639fcad06218b1c4b60f932a4ebb4b41ab546ef8c157031ae377e3f560903801f6d01706dbefd4943b6c4704bf19ed86dfa1c62f1473a570 @@ -4326,6 +4349,15 @@ __metadata: languageName: node linkType: hard +"@mongodb-js/saslprep@npm:^1.1.0": + version: 1.1.0 + resolution: "@mongodb-js/saslprep@npm:1.1.0" + dependencies: + sparse-bitfield: ^3.0.3 + checksum: 1479a43e216734672f8eb1a2a55165b6896841bd00fb5bd645390a24374ef6c29f0f6d19a43618a19b8f1912fcbd2b2cc2210a62361103d1f28dce6852cf31d4 + languageName: node + linkType: hard + "@mrmlnc/readdir-enhanced@npm:^2.2.1": version: 2.2.1 resolution: "@mrmlnc/readdir-enhanced@npm:2.2.1" @@ -5085,6 +5117,574 @@ __metadata: languageName: node linkType: hard +"@radix-ui/number@npm:1.0.1": + version: 1.0.1 + resolution: "@radix-ui/number@npm:1.0.1" + dependencies: + "@babel/runtime": ^7.13.10 + checksum: 621ea8b7d4195d1a65a9c0aee918e8335e7f198088eec91577512c89c2ba3a3bab4a767cfb872a2b9c3092a78ff41cad9a924845a939f6bb87fe9356241ea0ea + languageName: node + linkType: hard + +"@radix-ui/primitive@npm:1.0.1": + version: 1.0.1 + resolution: "@radix-ui/primitive@npm:1.0.1" + dependencies: + "@babel/runtime": ^7.13.10 + checksum: 2b93e161d3fdabe9a64919def7fa3ceaecf2848341e9211520c401181c9eaebb8451c630b066fad2256e5c639c95edc41de0ba59c40eff37e799918d019822d1 + languageName: node + linkType: hard + +"@radix-ui/react-arrow@npm:1.0.3": + version: 1.0.3 + resolution: "@radix-ui/react-arrow@npm:1.0.3" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-primitive": 1.0.3 + peerDependencies: + "@types/react": "*" + "@types/react-dom": "*" + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + "@types/react-dom": + optional: true + checksum: 8cca086f0dbb33360e3c0142adf72f99fc96352d7086d6c2356dbb2ea5944cfb720a87d526fc48087741c602cd8162ca02b0af5e6fdf5f56d20fddb44db8b4c3 + languageName: node + linkType: hard + +"@radix-ui/react-collection@npm:1.0.3": + version: 1.0.3 + resolution: "@radix-ui/react-collection@npm:1.0.3" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-compose-refs": 1.0.1 + "@radix-ui/react-context": 1.0.1 + "@radix-ui/react-primitive": 1.0.3 + "@radix-ui/react-slot": 1.0.2 + peerDependencies: + "@types/react": "*" + "@types/react-dom": "*" + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + "@types/react-dom": + optional: true + checksum: acfbc9b0b2c553d343c22f02c9f098bc5cfa99e6e48df91c0d671855013f8b877ade9c657b7420a7aa523b5aceadea32a60dd72c23b1291f415684fb45d00cff + languageName: node + linkType: hard + +"@radix-ui/react-compose-refs@npm:1.0.1": + version: 1.0.1 + resolution: "@radix-ui/react-compose-refs@npm:1.0.1" + dependencies: + "@babel/runtime": ^7.13.10 + peerDependencies: + "@types/react": "*" + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 2b9a613b6db5bff8865588b6bf4065f73021b3d16c0a90b2d4c23deceeb63612f1f15de188227ebdc5f88222cab031be617a9dd025874c0487b303be3e5cc2a8 + languageName: node + linkType: hard + +"@radix-ui/react-context@npm:1.0.1": + version: 1.0.1 + resolution: "@radix-ui/react-context@npm:1.0.1" + dependencies: + "@babel/runtime": ^7.13.10 + peerDependencies: + "@types/react": "*" + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 60e9b81d364f40c91a6213ec953f7c64fcd9d75721205a494a5815b3e5ae0719193429b62ee6c7002cd6aaf70f8c0e2f08bdbaba9ffcc233044d32b56d2127d1 + languageName: node + linkType: hard + +"@radix-ui/react-direction@npm:1.0.1": + version: 1.0.1 + resolution: "@radix-ui/react-direction@npm:1.0.1" + dependencies: + "@babel/runtime": ^7.13.10 + peerDependencies: + "@types/react": "*" + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 5336a8b0d4f1cde585d5c2b4448af7b3d948bb63a1aadb37c77771b0e5902dc6266e409cf35fd0edaca7f33e26424be19e64fb8f9d7f7be2d6f1714ea2764210 + languageName: node + linkType: hard + +"@radix-ui/react-dismissable-layer@npm:1.0.4": + version: 1.0.4 + resolution: "@radix-ui/react-dismissable-layer@npm:1.0.4" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/primitive": 1.0.1 + "@radix-ui/react-compose-refs": 1.0.1 + "@radix-ui/react-primitive": 1.0.3 + "@radix-ui/react-use-callback-ref": 1.0.1 + "@radix-ui/react-use-escape-keydown": 1.0.3 + peerDependencies: + "@types/react": "*" + "@types/react-dom": "*" + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + "@types/react-dom": + optional: true + checksum: ea86004ed56a10609dd84eef39dc1e57b400d687a35be41bb4aaa06dc7ad6dbd0a8da281e08c8c077fdbd523122e4d860cb7438a60c664f024f77c8b41299ec6 + languageName: node + linkType: hard + +"@radix-ui/react-focus-guards@npm:1.0.1": + version: 1.0.1 + resolution: "@radix-ui/react-focus-guards@npm:1.0.1" + dependencies: + "@babel/runtime": ^7.13.10 + peerDependencies: + "@types/react": "*" + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 1f8ca8f83b884b3612788d0742f3f054e327856d90a39841a47897dbed95e114ee512362ae314177de226d05310047cabbf66b686ae86ad1b65b6b295be24ef7 + languageName: node + linkType: hard + +"@radix-ui/react-focus-scope@npm:1.0.3": + version: 1.0.3 + resolution: "@radix-ui/react-focus-scope@npm:1.0.3" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-compose-refs": 1.0.1 + "@radix-ui/react-primitive": 1.0.3 + "@radix-ui/react-use-callback-ref": 1.0.1 + peerDependencies: + "@types/react": "*" + "@types/react-dom": "*" + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + "@types/react-dom": + optional: true + checksum: e5b1a089071fbe77aca11124a4ad9623fc2bcaf4c019759b0cd044bf0878ecc924131ee09c6a22d38a3f094684ef68ed18fa65c8d891918412e0afc685a464e0 + languageName: node + linkType: hard + +"@radix-ui/react-id@npm:1.0.1": + version: 1.0.1 + resolution: "@radix-ui/react-id@npm:1.0.1" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-use-layout-effect": 1.0.1 + peerDependencies: + "@types/react": "*" + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 446a453d799cc790dd2a1583ff8328da88271bff64530b5a17c102fa7fb35eece3cf8985359d416f65e330cd81aa7b8fe984ea125fc4f4eaf4b3801d698e49fe + languageName: node + linkType: hard + +"@radix-ui/react-popper@npm:1.1.2": + version: 1.1.2 + resolution: "@radix-ui/react-popper@npm:1.1.2" + dependencies: + "@babel/runtime": ^7.13.10 + "@floating-ui/react-dom": ^2.0.0 + "@radix-ui/react-arrow": 1.0.3 + "@radix-ui/react-compose-refs": 1.0.1 + "@radix-ui/react-context": 1.0.1 + "@radix-ui/react-primitive": 1.0.3 + "@radix-ui/react-use-callback-ref": 1.0.1 + "@radix-ui/react-use-layout-effect": 1.0.1 + "@radix-ui/react-use-rect": 1.0.1 + "@radix-ui/react-use-size": 1.0.1 + "@radix-ui/rect": 1.0.1 + peerDependencies: + "@types/react": "*" + "@types/react-dom": "*" + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + "@types/react-dom": + optional: true + checksum: 4929daa0d1cccada3cff50de0e00c0d186ffea97a5f28545c77fa85ff9bc5c105a54dddac400c2e2dcac631f0f7ea88e59f2e5ad0f80bb2cb7b62cc7cd30400f + languageName: node + linkType: hard + +"@radix-ui/react-portal@npm:1.0.3": + version: 1.0.3 + resolution: "@radix-ui/react-portal@npm:1.0.3" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-primitive": 1.0.3 + peerDependencies: + "@types/react": "*" + "@types/react-dom": "*" + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + "@types/react-dom": + optional: true + checksum: d352bcd6ad65eb43c9e0d72d0755c2aae85e03fb287770866262be3a2d5302b2885aee3cd99f2bbf62ecd14fcb1460703f1dcdc40351f77ad887b931c6f0012a + languageName: node + linkType: hard + +"@radix-ui/react-primitive@npm:1.0.3": + version: 1.0.3 + resolution: "@radix-ui/react-primitive@npm:1.0.3" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-slot": 1.0.2 + peerDependencies: + "@types/react": "*" + "@types/react-dom": "*" + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + "@types/react-dom": + optional: true + checksum: 9402bc22923c8e5c479051974a721c301535c36521c0237b83e5fa213d013174e77f3ad7905e6d60ef07e14f88ec7f4ea69891dc7a2b39047f8d3640e8f8d713 + languageName: node + linkType: hard + +"@radix-ui/react-roving-focus@npm:1.0.4": + version: 1.0.4 + resolution: "@radix-ui/react-roving-focus@npm:1.0.4" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/primitive": 1.0.1 + "@radix-ui/react-collection": 1.0.3 + "@radix-ui/react-compose-refs": 1.0.1 + "@radix-ui/react-context": 1.0.1 + "@radix-ui/react-direction": 1.0.1 + "@radix-ui/react-id": 1.0.1 + "@radix-ui/react-primitive": 1.0.3 + "@radix-ui/react-use-callback-ref": 1.0.1 + "@radix-ui/react-use-controllable-state": 1.0.1 + peerDependencies: + "@types/react": "*" + "@types/react-dom": "*" + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + "@types/react-dom": + optional: true + checksum: 69b1c82c2d9db3ba71549a848f2704200dab1b2cd22d050c1e081a78b9a567dbfdc7fd0403ee010c19b79652de69924d8ca2076cd031d6552901e4213493ffc7 + languageName: node + linkType: hard + +"@radix-ui/react-select@npm:^1.2.2": + version: 1.2.2 + resolution: "@radix-ui/react-select@npm:1.2.2" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/number": 1.0.1 + "@radix-ui/primitive": 1.0.1 + "@radix-ui/react-collection": 1.0.3 + "@radix-ui/react-compose-refs": 1.0.1 + "@radix-ui/react-context": 1.0.1 + "@radix-ui/react-direction": 1.0.1 + "@radix-ui/react-dismissable-layer": 1.0.4 + "@radix-ui/react-focus-guards": 1.0.1 + "@radix-ui/react-focus-scope": 1.0.3 + "@radix-ui/react-id": 1.0.1 + "@radix-ui/react-popper": 1.1.2 + "@radix-ui/react-portal": 1.0.3 + "@radix-ui/react-primitive": 1.0.3 + "@radix-ui/react-slot": 1.0.2 + "@radix-ui/react-use-callback-ref": 1.0.1 + "@radix-ui/react-use-controllable-state": 1.0.1 + "@radix-ui/react-use-layout-effect": 1.0.1 + "@radix-ui/react-use-previous": 1.0.1 + "@radix-ui/react-visually-hidden": 1.0.3 + aria-hidden: ^1.1.1 + react-remove-scroll: 2.5.5 + peerDependencies: + "@types/react": "*" + "@types/react-dom": "*" + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + "@types/react-dom": + optional: true + checksum: af7b63cc9e2c6006ec08163392d244941e9e03534e7add1b7c5a86059d0eb8a0398d4f3e80d43ff22126874a02b985e44f1722d1de9218922f7aa653d09412e3 + languageName: node + linkType: hard + +"@radix-ui/react-separator@npm:1.0.3": + version: 1.0.3 + resolution: "@radix-ui/react-separator@npm:1.0.3" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-primitive": 1.0.3 + peerDependencies: + "@types/react": "*" + "@types/react-dom": "*" + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + "@types/react-dom": + optional: true + checksum: 42f8c95e404de2ce9387040d78049808a48d423cd4c3bad8cca92c4b0bcbdcb3566b5b52a920d4e939a74b51188697f20a012221f0e630fc7f56de64096c15d2 + languageName: node + linkType: hard + +"@radix-ui/react-slot@npm:1.0.2": + version: 1.0.2 + resolution: "@radix-ui/react-slot@npm:1.0.2" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-compose-refs": 1.0.1 + peerDependencies: + "@types/react": "*" + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: edf5edf435ff594bea7e198bf16d46caf81b6fb559493acad4fa8c308218896136acb16f9b7238c788fd13e94a904f2fd0b6d834e530e4cae94522cdb8f77ce9 + languageName: node + linkType: hard + +"@radix-ui/react-toggle-group@npm:1.0.4": + version: 1.0.4 + resolution: "@radix-ui/react-toggle-group@npm:1.0.4" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/primitive": 1.0.1 + "@radix-ui/react-context": 1.0.1 + "@radix-ui/react-direction": 1.0.1 + "@radix-ui/react-primitive": 1.0.3 + "@radix-ui/react-roving-focus": 1.0.4 + "@radix-ui/react-toggle": 1.0.3 + "@radix-ui/react-use-controllable-state": 1.0.1 + peerDependencies: + "@types/react": "*" + "@types/react-dom": "*" + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + "@types/react-dom": + optional: true + checksum: b6c11fbbc3ca857ff68c0fa31f293c0d0111bcc8aa0cde2566214c090907530bfcb3b862f81585c2b02d8989b5c7971acff4d5c07c429870d80bd5602e30d376 + languageName: node + linkType: hard + +"@radix-ui/react-toggle@npm:1.0.3": + version: 1.0.3 + resolution: "@radix-ui/react-toggle@npm:1.0.3" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/primitive": 1.0.1 + "@radix-ui/react-primitive": 1.0.3 + "@radix-ui/react-use-controllable-state": 1.0.1 + peerDependencies: + "@types/react": "*" + "@types/react-dom": "*" + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + "@types/react-dom": + optional: true + checksum: ed5407f48254f20cda542017774f259d0b2c0007ea4bd7287d10d751016dbf269cb13d1142591432c269c3ab768cde2f1ba0344743027d36bbec10af909f19de + languageName: node + linkType: hard + +"@radix-ui/react-toolbar@npm:^1.0.4": + version: 1.0.4 + resolution: "@radix-ui/react-toolbar@npm:1.0.4" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/primitive": 1.0.1 + "@radix-ui/react-context": 1.0.1 + "@radix-ui/react-direction": 1.0.1 + "@radix-ui/react-primitive": 1.0.3 + "@radix-ui/react-roving-focus": 1.0.4 + "@radix-ui/react-separator": 1.0.3 + "@radix-ui/react-toggle-group": 1.0.4 + peerDependencies: + "@types/react": "*" + "@types/react-dom": "*" + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + "@types/react-dom": + optional: true + checksum: 7ebee1f8add6510108979433c5b38627e2de9d48ef2172ca15274b9edbbc106ff43bcd47ff733b03ed2215b92e7af364ff82c79e5a1728374847e2b1e315552c + languageName: node + linkType: hard + +"@radix-ui/react-use-callback-ref@npm:1.0.1": + version: 1.0.1 + resolution: "@radix-ui/react-use-callback-ref@npm:1.0.1" + dependencies: + "@babel/runtime": ^7.13.10 + peerDependencies: + "@types/react": "*" + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: b9fd39911c3644bbda14a84e4fca080682bef84212b8d8931fcaa2d2814465de242c4cfd8d7afb3020646bead9c5e539d478cea0a7031bee8a8a3bb164f3bc4c + languageName: node + linkType: hard + +"@radix-ui/react-use-controllable-state@npm:1.0.1": + version: 1.0.1 + resolution: "@radix-ui/react-use-controllable-state@npm:1.0.1" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-use-callback-ref": 1.0.1 + peerDependencies: + "@types/react": "*" + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: dee2be1937d293c3a492cb6d279fc11495a8f19dc595cdbfe24b434e917302f9ac91db24e8cc5af9a065f3f209c3423115b5442e65a5be9fd1e9091338972be9 + languageName: node + linkType: hard + +"@radix-ui/react-use-escape-keydown@npm:1.0.3": + version: 1.0.3 + resolution: "@radix-ui/react-use-escape-keydown@npm:1.0.3" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-use-callback-ref": 1.0.1 + peerDependencies: + "@types/react": "*" + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: c6ed0d9ce780f67f924980eb305af1f6cce2a8acbaf043a58abe0aa3cc551d9aa76ccee14531df89bbee302ead7ecc7fce330886f82d4672c5eda52f357ef9b8 + languageName: node + linkType: hard + +"@radix-ui/react-use-layout-effect@npm:1.0.1": + version: 1.0.1 + resolution: "@radix-ui/react-use-layout-effect@npm:1.0.1" + dependencies: + "@babel/runtime": ^7.13.10 + peerDependencies: + "@types/react": "*" + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: bed9c7e8de243a5ec3b93bb6a5860950b0dba359b6680c84d57c7a655e123dec9b5891c5dfe81ab970652e7779fe2ad102a23177c7896dde95f7340817d47ae5 + languageName: node + linkType: hard + +"@radix-ui/react-use-previous@npm:1.0.1": + version: 1.0.1 + resolution: "@radix-ui/react-use-previous@npm:1.0.1" + dependencies: + "@babel/runtime": ^7.13.10 + peerDependencies: + "@types/react": "*" + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 66b4312e857c58b75f3bf62a2048ef090b79a159e9da06c19a468c93e62336969c33dbef60ff16969f00b20386cc25d138f6a353f1658b35baac0a6eff4761b9 + languageName: node + linkType: hard + +"@radix-ui/react-use-rect@npm:1.0.1": + version: 1.0.1 + resolution: "@radix-ui/react-use-rect@npm:1.0.1" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/rect": 1.0.1 + peerDependencies: + "@types/react": "*" + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 433f07e61e04eb222349825bb05f3591fca131313a1d03709565d6226d8660bd1d0423635553f95ee4fcc25c8f2050972d848808d753c388e2a9ae191ebf17f3 + languageName: node + linkType: hard + +"@radix-ui/react-use-size@npm:1.0.1": + version: 1.0.1 + resolution: "@radix-ui/react-use-size@npm:1.0.1" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-use-layout-effect": 1.0.1 + peerDependencies: + "@types/react": "*" + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 6cc150ad1e9fa85019c225c5a5d50a0af6cdc4653dad0c21b4b40cd2121f36ee076db326c43e6bc91a69766ccff5a84e917d27970176b592577deea3c85a3e26 + languageName: node + linkType: hard + +"@radix-ui/react-visually-hidden@npm:1.0.3": + version: 1.0.3 + resolution: "@radix-ui/react-visually-hidden@npm:1.0.3" + dependencies: + "@babel/runtime": ^7.13.10 + "@radix-ui/react-primitive": 1.0.3 + peerDependencies: + "@types/react": "*" + "@types/react-dom": "*" + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + "@types/react": + optional: true + "@types/react-dom": + optional: true + checksum: 2e9d0c8253f97e7d6ffb2e52a5cfd40ba719f813b39c3e2e42c496d54408abd09ef66b5aec4af9b8ab0553215e32452a5d0934597a49c51dd90dc39181ed0d57 + languageName: node + linkType: hard + +"@radix-ui/rect@npm:1.0.1": + version: 1.0.1 + resolution: "@radix-ui/rect@npm:1.0.1" + dependencies: + "@babel/runtime": ^7.13.10 + checksum: aeec13b234a946052512d05239067d2d63422f9ec70bf2fe7acfd6b9196693fc33fbaf43c2667c167f777d90a095c6604eb487e0bce79e230b6df0f6cacd6a55 + languageName: node + linkType: hard + "@react-aria/breadcrumbs@npm:^3.5.0": version: 3.5.1 resolution: "@react-aria/breadcrumbs@npm:3.5.1" @@ -7102,7 +7702,7 @@ __metadata: gc-stats: ^1.4.0 mem: ^8.1.1 moleculer: ^0.14.29 - mongodb: ^4.12.1 + mongodb: ^4.17.1 nats: ^2.4.0 pino: ^8.15.0 polka: ^0.5.2 @@ -7137,7 +7737,7 @@ __metadata: human-interval: ^2.0.1 jest: ~29.6.1 moment-timezone: ~0.5.43 - mongodb: ^4.12.1 + mongodb: ^4.17.1 ts-jest: ~29.0.5 typescript: ~5.2.2 languageName: unknown @@ -7183,9 +7783,9 @@ __metadata: languageName: node linkType: hard -"@rocket.chat/apps-engine@npm:1.41.0-alpha.305": - version: 1.41.0-alpha.305 - resolution: "@rocket.chat/apps-engine@npm:1.41.0-alpha.305" +"@rocket.chat/apps-engine@npm:1.41.0-alpha.312": + version: 1.41.0-alpha.312 + resolution: "@rocket.chat/apps-engine@npm:1.41.0-alpha.312" dependencies: adm-zip: ^0.5.9 cryptiles: ^4.1.3 @@ -7197,7 +7797,7 @@ __metadata: vm2: ^3.9.19 peerDependencies: "@rocket.chat/ui-kit": "*" - checksum: 83ec73dac6e1f25722080cf32143ada914c4adb9aef8ebf770af13a5456cef1c81d1a9eedc4063549b8105277f2254d6c307c3c0c5f6ed7f99233a2d464bf6da + checksum: 003853d3c4d4374ab984474026e4ae657daf4591fe4c375b914aa57c27f576af0fcba66e70c539e056b5d80a1ef655775f6f3a07bf81a36ab6fd438ce464e70f languageName: node linkType: hard @@ -7224,7 +7824,7 @@ __metadata: gc-stats: ^1.4.0 mem: ^8.1.1 moleculer: ^0.14.29 - mongodb: ^4.12.1 + mongodb: ^4.17.1 nats: ^2.4.0 pino: ^8.15.0 polka: ^0.5.2 @@ -7272,11 +7872,11 @@ __metadata: "@rocket.chat/apps-engine": 1.41.0-alpha.290 "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/eslint-config": "workspace:^" - "@rocket.chat/icons": next + "@rocket.chat/icons": ^0.32.0 "@rocket.chat/message-parser": next "@rocket.chat/models": "workspace:^" "@rocket.chat/rest-typings": "workspace:^" - "@rocket.chat/ui-kit": next + "@rocket.chat/ui-kit": ^0.32.1 "@types/babel__core": ^7 "@types/babel__preset-env": ^7 "@types/fibers": ^3.1.1 @@ -7285,7 +7885,7 @@ __metadata: eslint: ~8.45.0 fibers: ^5.0.3 jest: ~29.6.1 - mongodb: ^4.12.1 + mongodb: ^4.17.1 prettier: ~2.8.8 typescript: ~5.2.2 languageName: unknown @@ -7297,11 +7897,11 @@ __metadata: dependencies: "@rocket.chat/apps-engine": 1.41.0-alpha.290 "@rocket.chat/eslint-config": "workspace:^" - "@rocket.chat/icons": next + "@rocket.chat/icons": ^0.32.0 "@rocket.chat/message-parser": next - "@rocket.chat/ui-kit": next + "@rocket.chat/ui-kit": ^0.32.1 eslint: ~8.45.0 - mongodb: ^4.12.1 + mongodb: ^4.17.1 prettier: ~2.8.8 typescript: ~5.2.2 languageName: unknown @@ -7318,66 +7918,53 @@ __metadata: "@types/jest": ~29.5.3 eslint: ~8.45.0 jest: ~29.6.1 - mongodb: ^4.12.1 + mongodb: ^4.17.1 ts-jest: ~29.0.5 typescript: ~5.2.2 languageName: unknown linkType: soft -"@rocket.chat/css-in-js@npm:^0.31.24, @rocket.chat/css-in-js@npm:~0.31.23-dev.180": - version: 0.31.24 - resolution: "@rocket.chat/css-in-js@npm:0.31.24" - dependencies: - "@emotion/hash": ^0.9.0 - "@rocket.chat/css-supports": ^0.31.24 - "@rocket.chat/memo": ^0.31.24 - "@rocket.chat/stylis-logical-props-middleware": ^0.31.24 - stylis: ~4.1.3 - checksum: aa343748e7eebdbcd95d6593fd9e039479fe7fe5fd579f81910ccf6130018a8d20a96556c19b16b356a6ce07e90b544520a839699a682fdbd943400b24ba6269 - languageName: node - linkType: hard - -"@rocket.chat/css-in-js@npm:next": - version: 0.31.23-dev.180 - resolution: "@rocket.chat/css-in-js@npm:0.31.23-dev.180" +"@rocket.chat/css-in-js@npm:^0.31.25": + version: 0.31.25 + resolution: "@rocket.chat/css-in-js@npm:0.31.25" dependencies: "@emotion/hash": ^0.9.0 - "@rocket.chat/css-supports": ~0.31.23-dev.180 - "@rocket.chat/memo": ~0.31.23-dev.180 - "@rocket.chat/stylis-logical-props-middleware": ~0.31.23-dev.180 + "@rocket.chat/css-supports": ^0.31.25 + "@rocket.chat/memo": ^0.31.25 + "@rocket.chat/stylis-logical-props-middleware": ^0.31.25 stylis: ~4.1.3 - checksum: e89833effb8d1a8a8e5cc3621540530e53c7aa98833f309b0df73f497afad25903252afc77da52186df975779b5a05dcfb18eee275fea81b473caf78c66d2005 + checksum: c9c60816a2517ed8fff7289587301421f0f36c064b7d8b99698470c8676b17f339be799a5703e9575437ccf1e4dafe2c12ca96264ef711d96388e196b8a38123 languageName: node linkType: hard -"@rocket.chat/css-in-js@npm:~0.31.26-dev.16": - version: 0.31.26-dev.16 - resolution: "@rocket.chat/css-in-js@npm:0.31.26-dev.16" +"@rocket.chat/css-in-js@npm:next, @rocket.chat/css-in-js@npm:~0.31.26-dev.19": + version: 0.31.26-dev.19 + resolution: "@rocket.chat/css-in-js@npm:0.31.26-dev.19" dependencies: "@emotion/hash": ^0.9.0 - "@rocket.chat/css-supports": ~0.31.26-dev.16 - "@rocket.chat/memo": ~0.31.26-dev.16 - "@rocket.chat/stylis-logical-props-middleware": ~0.31.26-dev.16 + "@rocket.chat/css-supports": ~0.31.26-dev.19 + "@rocket.chat/memo": ~0.31.26-dev.19 + "@rocket.chat/stylis-logical-props-middleware": ~0.31.26-dev.19 stylis: ~4.1.3 - checksum: 232d4e31d6439cc215982f5512921b6bfc607866fa0df07aa98a1f25e6b538e9604adb6ffbc3914dc820d7b6ee455643560199da544c2d7882818cdff8b00504 + checksum: 4d1381558188c4625051420a6760e613189abca9cf06c23beb833e582229975a0aaac9aef89a788f161ad5a99344a3d028042d90a33d5144668577aa647a78f3 languageName: node linkType: hard -"@rocket.chat/css-supports@npm:^0.31.24, @rocket.chat/css-supports@npm:~0.31.23-dev.180": - version: 0.31.24 - resolution: "@rocket.chat/css-supports@npm:0.31.24" +"@rocket.chat/css-supports@npm:^0.31.25": + version: 0.31.25 + resolution: "@rocket.chat/css-supports@npm:0.31.25" dependencies: - "@rocket.chat/memo": ^0.31.24 - checksum: 4efe737d588566ea7a95f1f29a33dc90987aae9e6c2f0b2b7995f9c813728dd72f62472f2a2f3e1bf0350ce3ad75807ec0c842ac6e61b6ddc8f89c69dc1086d0 + "@rocket.chat/memo": ^0.31.25 + checksum: fb7fde175475af41a77c105bacbc10b56d883b75046eb1c15c65d977a2388166d927afa4953296a133037a78eae41c628c376ca4a155a0254930b64a9b3bc12b languageName: node linkType: hard -"@rocket.chat/css-supports@npm:~0.31.26-dev.16": - version: 0.31.26-dev.16 - resolution: "@rocket.chat/css-supports@npm:0.31.26-dev.16" +"@rocket.chat/css-supports@npm:~0.31.26-dev.19": + version: 0.31.26-dev.19 + resolution: "@rocket.chat/css-supports@npm:0.31.26-dev.19" dependencies: - "@rocket.chat/memo": ~0.31.26-dev.16 - checksum: f7239f70ddef249e23825c1ac5143825cab012170aa67f44a232cf6b4b33d1cc3a365bfc3be4c29150fb494107155867881722ff1ebd610067f281d9b43207d1 + "@rocket.chat/memo": ~0.31.26-dev.19 + checksum: c689ccca04901b128c8993e7475d89ca1e49d01efac9bb9641a0a35bba4237d36da48204cd26b39e92b8d98f24ff85df40e516fd0e421beaaf7c10a8308536ea languageName: node linkType: hard @@ -7436,7 +8023,7 @@ __metadata: jaeger-client: ^3.19.0 mem: ^8.1.1 moleculer: ^0.14.29 - mongodb: ^4.12.1 + mongodb: ^4.17.1 nats: ^2.4.0 pino: ^8.15.0 pino-pretty: ^7.6.1 @@ -7451,9 +8038,9 @@ __metadata: linkType: soft "@rocket.chat/emitter@npm:next": - version: 0.31.23-dev.180 - resolution: "@rocket.chat/emitter@npm:0.31.23-dev.180" - checksum: 4a63bed9aa5260db85cc01b0131dd7fd6e8dfef956d64298c1fee805bca5a74b971dbcaff408efb497437daf672fb13b3d3caab6fef03720991c1c56349d96da + version: 0.31.26-dev.19 + resolution: "@rocket.chat/emitter@npm:0.31.26-dev.19" + checksum: 56e89b1a2325792df59607ea4f75acba5355ccf9a0149a83a8058c1700316833c11cbce7bf58229a5118c719157840a3d7575f1b3aecea30dce90a23945577a5 languageName: node linkType: hard @@ -7546,21 +8133,21 @@ __metadata: languageName: node linkType: hard -"@rocket.chat/fuselage-hooks@npm:next, @rocket.chat/fuselage-hooks@npm:~0.32.0-dev.319": - version: 0.32.0-dev.319 - resolution: "@rocket.chat/fuselage-hooks@npm:0.32.0-dev.319" +"@rocket.chat/fuselage-hooks@npm:^0.32.1": + version: 0.32.1 + resolution: "@rocket.chat/fuselage-hooks@npm:0.32.1" dependencies: use-sync-external-store: ~1.2.0 peerDependencies: "@rocket.chat/fuselage-tokens": "*" react: ^17.0.2 - checksum: 20b28d5297a252e35e7f63c9b18825fc1d3538ad7482389cf625a8fc1d6db9e8beb12abc0260e304295bd80af9a4da466c6e08e55c1fb0756a8eaeb07a41a22e + checksum: caf9b7e999f02cc0cbc3ca23e903cbd5da4b1870278d903aafadcb67df00f709ea055dc1bd8facd6d572851fcbb01317029131cc40239e29f61797685b37292a languageName: node linkType: hard "@rocket.chat/fuselage-polyfills@npm:next": - version: 0.31.23-dev.180 - resolution: "@rocket.chat/fuselage-polyfills@npm:0.31.23-dev.180" + version: 0.31.26-dev.19 + resolution: "@rocket.chat/fuselage-polyfills@npm:0.31.26-dev.19" dependencies: "@juggle/resize-observer": ^3.4.0 clipboard-polyfill: ^3.0.3 @@ -7568,13 +8155,13 @@ __metadata: focus-visible: ^5.2.0 focus-within-polyfill: ^5.2.1 new-event-polyfill: ^1.0.1 - checksum: 4eccf1cc0e1137cfe44ef39bfacd384ece58c7225d8b1d0a9acbd1f422b7d67ef117340c1fe6768142e4f8e8caba38953ba339e583fcfe6259c6560fa470ca39 + checksum: 2a8363bb177ee5f345bcafac856bcd5726df405f929d945fa366530c7535c125380b2818dbd0cf8b6675c69617435c40af7d143b7afe191abfb0d5652678f60f languageName: node linkType: hard "@rocket.chat/fuselage-toastbar@npm:next": - version: 0.32.0-dev.380 - resolution: "@rocket.chat/fuselage-toastbar@npm:0.32.0-dev.380" + version: 0.32.0-dev.403 + resolution: "@rocket.chat/fuselage-toastbar@npm:0.32.0-dev.403" peerDependencies: "@rocket.chat/fuselage": "*" "@rocket.chat/fuselage-hooks": "*" @@ -7582,21 +8169,21 @@ __metadata: "@rocket.chat/styled": "*" react: ^17.0.2 react-dom: ^17.0.2 - checksum: 8c69007addc3831e52be3ba8e79613f16f174eca052e692a28ae89fd0ab1ca318c66c98bc60c53b39b6a12a2f805caed41f6930317f0f8990612e57e12a82fe2 + checksum: 674a621ccabfcb802817fcd92236376417bbac90458736f655b6500c363e76b238a3c14a5cd0df0ad42b50c7b3b5ea675d3e918f767d20688768141c72511d69 languageName: node linkType: hard -"@rocket.chat/fuselage-tokens@npm:next": - version: 0.32.0-dev.356 - resolution: "@rocket.chat/fuselage-tokens@npm:0.32.0-dev.356" - checksum: 7b5786b06c458cc93cdd229e899459f25eb428a545c79eb8c98d28163b20ffa603e43b48bb3640c8b581d53ca259c7fe177007e1b232c6e950eea496706590df +"@rocket.chat/fuselage-tokens@npm:^0.31.25": + version: 0.31.25 + resolution: "@rocket.chat/fuselage-tokens@npm:0.31.25" + checksum: d05460f2f7b7f01b1498aab6fb7d932b7d752d55ce5a6bad6e7a42f2c1f056164ff8caa7dd8ec11bc0f4441a83d8aad0b8aab5e02c03f3452c4583d159b1a2f7 languageName: node linkType: hard -"@rocket.chat/fuselage-tokens@npm:~0.32.0-dev.376": - version: 0.32.0-dev.376 - resolution: "@rocket.chat/fuselage-tokens@npm:0.32.0-dev.376" - checksum: 8054593aa24eb77c0ec71e93ec07bf91b65c0d9d6f413641bce2f451a12416432c43271ceebb3a8439d5ed7148795d632716231907a93a35715d736fed4d834a +"@rocket.chat/fuselage-tokens@npm:next": + version: 0.32.0-dev.379 + resolution: "@rocket.chat/fuselage-tokens@npm:0.32.0-dev.379" + checksum: c5cf40295c4ae1a5918651b9e156629d6400d5823b8cf5f81a14c66da986a9302d79392b45e991c2fc37aad9633f3d8e2f7f29c68969592340b05968265244e6 languageName: node linkType: hard @@ -7606,15 +8193,15 @@ __metadata: dependencies: "@rocket.chat/apps-engine": 1.41.0-alpha.290 "@rocket.chat/eslint-config": "workspace:^" - "@rocket.chat/fuselage": next - "@rocket.chat/fuselage-hooks": next + "@rocket.chat/fuselage": ^0.32.1 + "@rocket.chat/fuselage-hooks": ^0.32.1 "@rocket.chat/fuselage-polyfills": next "@rocket.chat/gazzodown": "workspace:^" - "@rocket.chat/icons": next + "@rocket.chat/icons": ^0.32.0 "@rocket.chat/prettier-config": next "@rocket.chat/styled": next "@rocket.chat/ui-contexts": "workspace:^" - "@rocket.chat/ui-kit": next + "@rocket.chat/ui-kit": ^0.32.1 "@rocket.chat/ui-video-conf": "workspace:^" "@storybook/addon-essentials": ~6.5.16 "@storybook/addons": ~6.5.16 @@ -7639,31 +8226,31 @@ __metadata: typescript: ~5.2.2 peerDependencies: "@rocket.chat/apps-engine": "*" - "@rocket.chat/eslint-config": "*" + "@rocket.chat/eslint-config": 0.6.0-rc.0 "@rocket.chat/fuselage": "*" "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/fuselage-polyfills": "*" "@rocket.chat/icons": "*" "@rocket.chat/prettier-config": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-contexts": 1.0.2 + "@rocket.chat/ui-contexts": 2.0.0-rc.4 "@rocket.chat/ui-kit": "*" - "@rocket.chat/ui-video-conf": 1.0.2 + "@rocket.chat/ui-video-conf": 2.0.0-rc.4 "@tanstack/react-query": "*" react: "*" react-dom: "*" languageName: unknown linkType: soft -"@rocket.chat/fuselage@npm:next": - version: 0.32.0-dev.426 - resolution: "@rocket.chat/fuselage@npm:0.32.0-dev.426" +"@rocket.chat/fuselage@npm:^0.32.1": + version: 0.32.1 + resolution: "@rocket.chat/fuselage@npm:0.32.1" dependencies: - "@rocket.chat/css-in-js": ~0.31.26-dev.16 - "@rocket.chat/css-supports": ~0.31.26-dev.16 - "@rocket.chat/fuselage-tokens": ~0.32.0-dev.376 - "@rocket.chat/memo": ~0.31.26-dev.16 - "@rocket.chat/styled": ~0.31.26-dev.16 + "@rocket.chat/css-in-js": ^0.31.25 + "@rocket.chat/css-supports": ^0.31.25 + "@rocket.chat/fuselage-tokens": ^0.31.25 + "@rocket.chat/memo": ^0.31.25 + "@rocket.chat/styled": ^0.31.25 invariant: ^2.2.4 react-aria: ~3.23.1 react-keyed-flatten-children: ^1.3.0 @@ -7675,7 +8262,7 @@ __metadata: react: ^17.0.2 react-dom: ^17.0.2 react-virtuoso: 1.2.4 - checksum: 477a54211e5cb4676fdd5783f96a9a91622c8c99a3cb74a8f574d2d4a604a0f8c3fb415ea51ecfbabba17063fbfff077228cfbdacfed6449208ecd5f5312488a + checksum: d3937be369a4b8e0d9849f5131a0143defcc313a38c2f4055a4d9bf2be6234c09244e71fde6c0adc90fbdfac8a0d572122e5fbbdac5c83656ac27063042ec94c languageName: node linkType: hard @@ -7686,7 +8273,7 @@ __metadata: "@babel/core": ~7.22.9 "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/css-in-js": next - "@rocket.chat/fuselage": next + "@rocket.chat/fuselage": ^0.32.1 "@rocket.chat/fuselage-tokens": next "@rocket.chat/message-parser": next "@rocket.chat/styled": next @@ -7730,29 +8317,25 @@ __metadata: ts-jest: ~29.0.5 typescript: ~5.2.2 peerDependencies: - "@rocket.chat/core-typings": 6.3.2 + "@rocket.chat/core-typings": 6.4.0-rc.4 "@rocket.chat/css-in-js": "*" "@rocket.chat/fuselage": "*" "@rocket.chat/fuselage-tokens": "*" "@rocket.chat/message-parser": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-client": "*" - "@rocket.chat/ui-contexts": "*" + "@rocket.chat/ui-client": 2.0.0-rc.4 + "@rocket.chat/ui-contexts": 2.0.0-rc.4 katex: "*" react: "*" languageName: unknown linkType: soft -"@rocket.chat/i18n@workspace:^, @rocket.chat/i18n@workspace:packages/i18n": +"@rocket.chat/i18n@workspace:^, @rocket.chat/i18n@workspace:packages/i18n, @rocket.chat/i18n@workspace:~": version: 0.0.0-use.local resolution: "@rocket.chat/i18n@workspace:packages/i18n" dependencies: - "@babel/core": ~7.22.9 - "@babel/preset-env": ~7.22.9 - "@babel/preset-typescript": ~7.22.5 - "@types/babel__core": ~7.20.1 - "@types/babel__preset-env": ~7.9.2 - "@types/jest": ~29.5.3 + "@babel/core": ~7.22.10 + "@babel/preset-env": ~7.22.10 babel-jest: ^29.5.0 eslint: ~8.45.0 jest: ~29.6.1 @@ -7762,10 +8345,10 @@ __metadata: languageName: unknown linkType: soft -"@rocket.chat/icons@npm:next": - version: 0.32.0-dev.388 - resolution: "@rocket.chat/icons@npm:0.32.0-dev.388" - checksum: 5b82b1f2c9b29b163c92fd5e9391e1c501e2a687aa0b4dc751b573430d2702454497bdc539d60b32c9b8f4403dc2168c78b5ffb5cbb9c18a216f16157e03d68c +"@rocket.chat/icons@npm:^0.32.0": + version: 0.32.0 + resolution: "@rocket.chat/icons@npm:0.32.0" + checksum: 013c819eaaa5a2abc6e35f237e904c35ba105eb0be101dadba678732815423c3a4e01e0e65d0301acfeac77bc59e3aa2bc997744e3c7611c0814c733118cb248 languageName: node linkType: hard @@ -7776,21 +8359,21 @@ __metadata: "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/models": "workspace:^" eslint: ~8.45.0 - mongodb: ^4.12.1 + mongodb: ^4.17.1 prettier: ~2.8.8 typescript: ~5.2.2 languageName: unknown linkType: soft "@rocket.chat/layout@npm:next": - version: 0.32.0-dev.289 - resolution: "@rocket.chat/layout@npm:0.32.0-dev.289" + version: 0.32.0-dev.312 + resolution: "@rocket.chat/layout@npm:0.32.0-dev.312" peerDependencies: "@rocket.chat/fuselage": "*" react: 17.0.2 react-dom: 17.0.2 react-i18next: ~11.15.4 - checksum: 369dc1b5052c367f249a0cd142e77329d4a2ebcb26598d8e5fc43f53896f71d6bc2ff9c36c6caa431f5319e3c32304626364832dc853a819202745e77a5e8257 + checksum: c3db8279b66794b349b740fa61f56a9759fe7f61856408c6c20b6cdf3c799f309de1388d2449db2b17199278fa1d17c6f41a9cfe7bf24f3fa5692a9cbbeae8a2 languageName: node linkType: hard @@ -7806,11 +8389,11 @@ __metadata: "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/fuselage-tokens": next "@rocket.chat/gazzodown": "workspace:^" - "@rocket.chat/logo": next + "@rocket.chat/logo": ^0.31.27 "@rocket.chat/message-parser": next "@rocket.chat/random": "workspace:~" "@rocket.chat/sdk": ^1.0.0-alpha.42 - "@rocket.chat/ui-kit": next + "@rocket.chat/ui-kit": ^0.32.1 "@storybook/addon-essentials": ~6.5.16 "@storybook/addon-postcss": ~2.0.0 "@storybook/preact": ~6.5.16 @@ -7842,7 +8425,7 @@ __metadata: history: ~5.3.0 html-webpack-plugin: ^4.4.1 husky: ^4.3.8 - i18next: ^21.8.10 + i18next: ~23.4.5 if-env: ^1.0.4 image-webpack-loader: ~8.1.0 lorem-ipsum: ^2.0.8 @@ -7863,8 +8446,8 @@ __metadata: preact-router: ^3.2.1 query-string: ^7.1.3 react-dom: ~17.0.2 - react-hook-form: ^7.45.0 - react-i18next: ^11.16.9 + react-hook-form: ~7.45.4 + react-i18next: ~13.2.1 rimraf: ^3.0.2 sass: ~1.62.1 sass-loader: ~10.4.1 @@ -7917,46 +8500,39 @@ __metadata: languageName: unknown linkType: soft -"@rocket.chat/logo@npm:next": - version: 0.32.0-dev.356 - resolution: "@rocket.chat/logo@npm:0.32.0-dev.356" +"@rocket.chat/logo@npm:^0.31.27": + version: 0.31.27 + resolution: "@rocket.chat/logo@npm:0.31.27" dependencies: - "@rocket.chat/fuselage-hooks": ~0.32.0-dev.319 - "@rocket.chat/styled": ~0.31.23-dev.180 + "@rocket.chat/fuselage-hooks": ^0.32.1 + "@rocket.chat/styled": ^0.31.25 peerDependencies: react: 17.0.2 react-dom: 17.0.2 - checksum: 5d40f3e346e51dcfad348add801b03d64fd3dccad7bbf7ea07995f8b366a09d825e40e902c9525d845fb3604937507f00974ef0c3742a56faaf8f5a7aac1f684 - languageName: node - linkType: hard - -"@rocket.chat/memo@npm:^0.31.24, @rocket.chat/memo@npm:~0.31.23-dev.180": - version: 0.31.24 - resolution: "@rocket.chat/memo@npm:0.31.24" - checksum: f63baeac39f50f67ced26c0770334b7e6fa35c81e227b813b7e49015bcd7f102aafff3b6a1fef3e2720ee483e729882dd5734ea339dcfdc30e6f193681a02487 + checksum: acc56410813a0d4f634f9e847bc4b49275c26aff4e2f285720818cb012a2ad42554982fcc4078c485222a9c9a78244d1a4b16b60588b5c50441b8928c3957efb languageName: node linkType: hard -"@rocket.chat/memo@npm:next": - version: 0.31.23-dev.180 - resolution: "@rocket.chat/memo@npm:0.31.23-dev.180" - checksum: 5a96849f893833081b3ce4c1c5035b8a9717dc219eb1da072014cb82778654a6eaa0a595f627fdf16882adf0caaab77e881b04329369ca9e7c59970d5e572ec5 +"@rocket.chat/memo@npm:^0.31.25": + version: 0.31.25 + resolution: "@rocket.chat/memo@npm:0.31.25" + checksum: 92d595c68d76a5258fb37ed4639e2709ba290c5d240df1272d81a2ab6b4be28ee2dd5b721dad940fe2638a89e8d14e684a970c59890003a06ce6088c655b7c0e languageName: node linkType: hard -"@rocket.chat/memo@npm:~0.31.26-dev.16": - version: 0.31.26-dev.16 - resolution: "@rocket.chat/memo@npm:0.31.26-dev.16" - checksum: e50a53c5574e5f133ced89b8d7d85e839c565e6e2ee1e0e4ee6d07d1af51de67f5e02fe10cf8e652a91f10b0e4e06705dd5734aebfde10b7986bcde618779ea5 +"@rocket.chat/memo@npm:next, @rocket.chat/memo@npm:~0.31.26-dev.19": + version: 0.31.26-dev.19 + resolution: "@rocket.chat/memo@npm:0.31.26-dev.19" + checksum: 387c29643c0d725b2e2d3b79eeebf2ed3ac2fa518178d2836913dddf48f2aa72e80b277d54c77ac0498c144324cdfd3449bae883895c316fbb43c7dbbfcb3993 languageName: node linkType: hard "@rocket.chat/message-parser@npm:next": - version: 0.32.0-dev.354 - resolution: "@rocket.chat/message-parser@npm:0.32.0-dev.354" + version: 0.32.0-dev.377 + resolution: "@rocket.chat/message-parser@npm:0.32.0-dev.377" dependencies: tldts: ~5.7.112 - checksum: 90b19e3d475b2b93d7edb9568fce4662373d15c6b4741a863a8aab901602a42eaa5533e0a1bb2da6880bde0c5853813837a9134c25bf3c2ba278582fea52cdc2 + checksum: 9980ac9fbcce92a6ad521e5b48b8c6b990186046ff984a2408156d15494996d3963aa575d403dd813c78bcb5ea6c374c0a12f1a96c8342fea7782da005aab3b5 languageName: node linkType: hard @@ -7964,6 +8540,7 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/meteor@workspace:apps/meteor" dependencies: + "@axe-core/playwright": ^4.7.3 "@babel/core": ~7.22.9 "@babel/eslint-parser": ~7.22.9 "@babel/plugin-proposal-nullish-coalescing-operator": ~7.18.6 @@ -7988,7 +8565,7 @@ __metadata: "@rocket.chat/account-utils": "workspace:^" "@rocket.chat/agenda": "workspace:^" "@rocket.chat/api-client": "workspace:^" - "@rocket.chat/apps-engine": 1.41.0-alpha.305 + "@rocket.chat/apps-engine": 1.41.0-alpha.312 "@rocket.chat/base64": "workspace:^" "@rocket.chat/cas-validate": "workspace:^" "@rocket.chat/core-services": "workspace:^" @@ -8000,21 +8577,21 @@ __metadata: "@rocket.chat/favicon": "workspace:^" "@rocket.chat/forked-matrix-appservice-bridge": ^4.0.1 "@rocket.chat/forked-matrix-bot-sdk": ^0.6.0-beta.2 - "@rocket.chat/fuselage": next - "@rocket.chat/fuselage-hooks": next + "@rocket.chat/fuselage": ^0.32.1 + "@rocket.chat/fuselage-hooks": ^0.32.1 "@rocket.chat/fuselage-polyfills": next "@rocket.chat/fuselage-toastbar": next "@rocket.chat/fuselage-tokens": next "@rocket.chat/fuselage-ui-kit": "workspace:^" "@rocket.chat/gazzodown": "workspace:^" "@rocket.chat/i18n": "workspace:^" - "@rocket.chat/icons": next + "@rocket.chat/icons": ^0.32.0 "@rocket.chat/instance-status": "workspace:^" "@rocket.chat/layout": next "@rocket.chat/livechat": "workspace:^" "@rocket.chat/log-format": "workspace:^" "@rocket.chat/logger": "workspace:^" - "@rocket.chat/logo": next + "@rocket.chat/logo": ^0.31.27 "@rocket.chat/memo": next "@rocket.chat/message-parser": next "@rocket.chat/mock-providers": "workspace:^" @@ -8022,7 +8599,8 @@ __metadata: "@rocket.chat/models": "workspace:^" "@rocket.chat/mp3-encoder": 0.24.0 "@rocket.chat/omnichannel-services": "workspace:^" - "@rocket.chat/onboarding-ui": next + "@rocket.chat/onboarding-ui": ^0.32.1 + "@rocket.chat/password-policies": "workspace:^" "@rocket.chat/pdf-worker": "workspace:^" "@rocket.chat/poplib": "workspace:^" "@rocket.chat/presence": "workspace:^" @@ -8035,7 +8613,7 @@ __metadata: "@rocket.chat/ui-client": "workspace:^" "@rocket.chat/ui-composer": "workspace:^" "@rocket.chat/ui-contexts": "workspace:^" - "@rocket.chat/ui-kit": next + "@rocket.chat/ui-kit": ^0.32.1 "@rocket.chat/ui-theming": "workspace:^" "@rocket.chat/ui-video-conf": "workspace:^" "@rocket.chat/web-ui-registration": "workspace:^" @@ -8082,7 +8660,6 @@ __metadata: "@types/he": ^1.1.2 "@types/i18next-sprintf-postprocessor": ^0.2.0 "@types/imap": ^0.8.37 - "@types/jest-axe": ^3.5.5 "@types/jsdom": ^16.2.15 "@types/jsdom-global": ^3.0.4 "@types/jsrsasign": ^10.5.8 @@ -8211,7 +8788,7 @@ __metadata: hljs9: "npm:highlight.js@^9.18.5" http-proxy-agent: ^5.0.0 human-interval: ^2.0.1 - i18next: ^20.6.1 + i18next: ~23.4.5 i18next-http-backend: ^1.4.5 i18next-sprintf-postprocessor: ^0.2.2 iconv-lite: ^0.6.3 @@ -8220,7 +8797,6 @@ __metadata: ip-range-check: ^0.2.0 is-svg: ^4.3.2 jest: ~29.6.1 - jest-axe: ^8.0.0 jquery: ^3.6.0 jschardet: ^3.0.0 jsdom: ^16.7.0 @@ -8247,8 +8823,7 @@ __metadata: moment: ^2.29.4 moment-timezone: ^0.5.43 mongo-message-queue: ^1.0.0 - mongodb: ^4.12.1 - mongodb-memory-server: ^7.6.3 + mongodb: ^4.17.1 nats: ^2.6.1 node-abort-controller: ^3.1.1 node-dogstatsd: ^0.0.7 @@ -8289,8 +8864,8 @@ __metadata: react-docgen-typescript-plugin: ^1.0.5 react-dom: ~17.0.2 react-error-boundary: ^3.1.4 - react-hook-form: ^7.30.0 - react-i18next: ^11.16.7 + react-hook-form: ~7.45.4 + react-i18next: ~13.2.1 react-keyed-flatten-children: ^1.3.0 react-virtuoso: ^1.11.1 redis: ^4.0.6 @@ -8335,16 +8910,20 @@ __metadata: languageName: unknown linkType: soft -"@rocket.chat/mock-providers@workspace:^, @rocket.chat/mock-providers@workspace:packages/mock-providers": +"@rocket.chat/mock-providers@workspace:^, @rocket.chat/mock-providers@workspace:packages/mock-providers, @rocket.chat/mock-providers@workspace:~": version: 0.0.0-use.local resolution: "@rocket.chat/mock-providers@workspace:packages/mock-providers" dependencies: + "@rocket.chat/i18n": "workspace:~" "@rocket.chat/ui-contexts": "workspace:*" + "@storybook/react": ~6.5.16 "@tanstack/react-query": ^4.16.1 "@types/jest": ~29.5.3 eslint: ~8.45.0 + i18next: ~23.4.5 jest: ~29.6.1 react: ~17.0.2 + react-i18next: ~13.2.1 ts-jest: ~29.0.5 typescript: ~5.2.2 peerDependencies: @@ -8362,7 +8941,7 @@ __metadata: "@types/node-rsa": ^1.1.1 eslint: ~8.45.0 jest: ~29.6.1 - mongodb: ^4.12.1 + mongodb: ^4.17.1 ts-jest: ~29.0.5 typescript: ~5.2.2 languageName: unknown @@ -8416,7 +8995,7 @@ __metadata: mem: ^8.1.1 moment-timezone: ^0.5.43 mongo-message-queue: ^1.0.0 - mongodb: ^4.12.1 + mongodb: ^4.17.1 pino: ^8.15.0 ts-jest: ~29.0.5 typescript: ~5.2.2 @@ -8453,7 +9032,7 @@ __metadata: moleculer: ^0.14.29 moment-timezone: ^0.5.43 mongo-message-queue: ^1.0.0 - mongodb: ^4.12.1 + mongodb: ^4.17.1 nats: ^2.4.0 pino: ^8.15.0 polka: ^0.5.2 @@ -8462,9 +9041,9 @@ __metadata: languageName: unknown linkType: soft -"@rocket.chat/onboarding-ui@npm:next": - version: 0.32.0-dev.406 - resolution: "@rocket.chat/onboarding-ui@npm:0.32.0-dev.406" +"@rocket.chat/onboarding-ui@npm:^0.32.1": + version: 0.32.1 + resolution: "@rocket.chat/onboarding-ui@npm:0.32.1" dependencies: i18next: ~21.6.16 react-hook-form: ~7.27.1 @@ -8479,10 +9058,24 @@ __metadata: react: 17.0.2 react-dom: 17.0.2 react-i18next: ~11.15.4 - checksum: aa573204f13bf501edb9ddbad074837191d8319bb0f916cedcae438098a48605aaa65171e61c27d60e1a9cfad2a452ccb8b0583ca1a33790a65f9d0aa129a66e + checksum: 362938332de5d865e12b891288e631e579e1f6f0d8da99004d27d1fc5722e25821b68cb60de8cb51cf8768daae0f9bf68cbd374580e8e8bfdb292f8ed6ee8cb1 languageName: node linkType: hard +"@rocket.chat/password-policies@workspace:^, @rocket.chat/password-policies@workspace:packages/password-policies": + version: 0.0.0-use.local + resolution: "@rocket.chat/password-policies@workspace:packages/password-policies" + dependencies: + "@types/chai": ^4.3.5 + "@types/jest": ~29.5.3 + chai: ^4.3.7 + eslint: ~8.45.0 + jest: ~29.6.1 + ts-jest: ~29.0.5 + typescript: ~5.2.2 + languageName: unknown + linkType: soft + "@rocket.chat/pdf-worker@workspace:^, @rocket.chat/pdf-worker@workspace:ee/packages/pdf-worker": version: 0.0.0-use.local resolution: "@rocket.chat/pdf-worker@workspace:ee/packages/pdf-worker" @@ -8548,7 +9141,7 @@ __metadata: gc-stats: ^1.4.0 mem: ^8.1.1 moleculer: ^0.14.29 - mongodb: ^4.12.1 + mongodb: ^4.17.1 nats: ^2.4.0 pino: ^8.15.0 polka: ^0.5.2 @@ -8574,7 +9167,7 @@ __metadata: babel-jest: ^29.0.3 eslint: ~8.45.0 jest: ~29.6.1 - mongodb: ^4.12.1 + mongodb: ^4.17.1 typescript: ~5.2.2 languageName: unknown linkType: soft @@ -8615,7 +9208,7 @@ __metadata: moleculer: ^0.14.29 moment-timezone: ^0.5.43 mongo-message-queue: ^1.0.0 - mongodb: ^4.12.1 + mongodb: ^4.17.1 nats: ^2.4.0 pino: ^8.15.0 polka: ^0.5.2 @@ -8669,14 +9262,14 @@ __metadata: "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/eslint-config": "workspace:^" "@rocket.chat/message-parser": next - "@rocket.chat/ui-kit": next + "@rocket.chat/ui-kit": ^0.32.1 "@types/jest": ~29.5.3 ajv: ^8.11.0 ajv-formats: ^2.1.1 eslint: ~8.45.0 jest: ~29.6.1 jest-environment-jsdom: ~29.6.1 - mongodb: ^4.12.1 + mongodb: ^4.17.1 ts-jest: ~29.0.5 typescript: ~5.2.2 languageName: unknown @@ -8753,7 +9346,7 @@ __metadata: gc-stats: ^1.4.0 mem: ^8.1.1 moleculer: ^0.14.29 - mongodb: ^4.12.1 + mongodb: ^4.17.1 nats: ^2.4.0 pino: ^8.15.0 polka: ^0.5.2 @@ -8763,58 +9356,49 @@ __metadata: linkType: soft "@rocket.chat/string-helpers@npm:next": - version: 0.31.23-dev.180 - resolution: "@rocket.chat/string-helpers@npm:0.31.23-dev.180" - checksum: 2cd9958e35628e483a76abe3db0e4b490b1cacc0c3d21d1440fa61cf6a1fe76befca493e962a4009988f06faf5131240a322de00b30ec0ccb8ca7efc23223407 - languageName: node - linkType: hard - -"@rocket.chat/styled@npm:next": - version: 0.31.23-dev.180 - resolution: "@rocket.chat/styled@npm:0.31.23-dev.180" - dependencies: - "@rocket.chat/css-in-js": ~0.31.23-dev.180 - checksum: 6cc47d1ca1c5dfa5dc9d1a9fba1d04ceb7eb80f78b97f2f35929955e1e4de243ee1cb9d81538e6e58efdc599781c6e95ee492f8dc2b24a59cf084a22f76254eb + version: 0.31.26-dev.19 + resolution: "@rocket.chat/string-helpers@npm:0.31.26-dev.19" + checksum: eb8f130f6e264483e1fc64dc3fe88bdb8e2d93ccefd168cacdc96aa8f0a4df27791045a38f33cb8db29dd063191e14c08210d6f187e5e93acde7e2d658b05128 languageName: node linkType: hard -"@rocket.chat/styled@npm:~0.31.23-dev.180": - version: 0.31.24 - resolution: "@rocket.chat/styled@npm:0.31.24" +"@rocket.chat/styled@npm:^0.31.25": + version: 0.31.25 + resolution: "@rocket.chat/styled@npm:0.31.25" dependencies: - "@rocket.chat/css-in-js": ^0.31.24 - checksum: 357f05974d1e33adc9a085ecb16aeba2eeb2d68328cb8e3606e5570fb6979092648164ec3d8dce2d6a34a672afd7163963e5ee155225c7ed9b7872f100232c27 + "@rocket.chat/css-in-js": ^0.31.25 + checksum: 8b0a2b3d6248ab8256736da058061e5f1a2f6a4455a20d0e0b6b75887ac82a0bbfbfe91bd60e278f3462e849ef744f38093a9acc7c3ba5db46f00fd640d7a52e languageName: node linkType: hard -"@rocket.chat/styled@npm:~0.31.26-dev.16": - version: 0.31.26-dev.16 - resolution: "@rocket.chat/styled@npm:0.31.26-dev.16" +"@rocket.chat/styled@npm:next": + version: 0.31.26-dev.19 + resolution: "@rocket.chat/styled@npm:0.31.26-dev.19" dependencies: - "@rocket.chat/css-in-js": ~0.31.26-dev.16 - checksum: 337de6bfc6b1dde0d42e2aa1d9bb089ceaba53119371bc6c5008e8e74a3a84fad2f90d00bdfdcb76360e6530ede75ef2bf1889ee0a9f2eacf1f1b02c337206b1 + "@rocket.chat/css-in-js": ~0.31.26-dev.19 + checksum: f65cd023bc99af913e2550b39ae21d51da0391699c914a5cabdf556afe1659d22bc70f2924b30084c7cf2547da952750ab96745d6162fcec74ef2b5bbfb8e01a languageName: node linkType: hard -"@rocket.chat/stylis-logical-props-middleware@npm:^0.31.24, @rocket.chat/stylis-logical-props-middleware@npm:~0.31.23-dev.180": - version: 0.31.24 - resolution: "@rocket.chat/stylis-logical-props-middleware@npm:0.31.24" +"@rocket.chat/stylis-logical-props-middleware@npm:^0.31.25": + version: 0.31.25 + resolution: "@rocket.chat/stylis-logical-props-middleware@npm:0.31.25" dependencies: - "@rocket.chat/css-supports": ^0.31.24 + "@rocket.chat/css-supports": ^0.31.25 peerDependencies: stylis: 4.0.10 - checksum: 11a6e1395976005e3156b9838ab1ef0d1e8d827bca8804a9befd54c32eccf62415b8940ca99999588f6001c291f560d92e134a0d4e4078fe477389b0f99bb7ff + checksum: b0bc2afa2f020d65dc4af3f0180c6b7538471b2deeef026421a57d89a6279596fe6be14ab96d1634229b27308a0867c11db2684f9a51e5bc07683b6d0dc96c91 languageName: node linkType: hard -"@rocket.chat/stylis-logical-props-middleware@npm:~0.31.26-dev.16": - version: 0.31.26-dev.16 - resolution: "@rocket.chat/stylis-logical-props-middleware@npm:0.31.26-dev.16" +"@rocket.chat/stylis-logical-props-middleware@npm:~0.31.26-dev.19": + version: 0.31.26-dev.19 + resolution: "@rocket.chat/stylis-logical-props-middleware@npm:0.31.26-dev.19" dependencies: - "@rocket.chat/css-supports": ~0.31.26-dev.16 + "@rocket.chat/css-supports": ~0.31.26-dev.19 peerDependencies: stylis: 4.0.10 - checksum: 37e47fb2912349edeb8fba9c08614394ce88b9438fff61647f55dbc3d78c8ad88516b49e03e969a096089db0372c23b9c45994d43db7fb76d20bcfbebb73b4b1 + checksum: 893bd48b6cc320ee7a970cda019e08b00c299c51562cf74f14e925bd4f613fc0c9448de876c3aa6b651bfc060a42097ccdd5a2dee0769a9a05cfe32eaff684f3 languageName: node linkType: hard @@ -8837,9 +9421,9 @@ __metadata: dependencies: "@babel/core": ~7.22.9 "@rocket.chat/css-in-js": next - "@rocket.chat/fuselage": next - "@rocket.chat/fuselage-hooks": next - "@rocket.chat/icons": next + "@rocket.chat/fuselage": ^0.32.1 + "@rocket.chat/fuselage-hooks": ^0.32.1 + "@rocket.chat/icons": ^0.32.0 "@rocket.chat/mock-providers": "workspace:^" "@rocket.chat/ui-contexts": "workspace:~" "@storybook/addon-actions": ~6.5.16 @@ -8869,7 +9453,7 @@ __metadata: jest: ~29.6.1 react: ^17.0.2 react-dom: ^17.0.2 - react-hook-form: ^7.30.0 + react-hook-form: ~7.45.4 ts-jest: ~29.0.5 typescript: ~5.2.2 peerDependencies: @@ -8877,7 +9461,7 @@ __metadata: "@rocket.chat/fuselage": "*" "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" - "@rocket.chat/ui-contexts": 1.0.2 + "@rocket.chat/ui-contexts": 2.0.0-rc.4 react: ~17.0.2 languageName: unknown linkType: soft @@ -8888,8 +9472,8 @@ __metadata: dependencies: "@babel/core": ~7.22.9 "@rocket.chat/eslint-config": "workspace:^" - "@rocket.chat/fuselage": next - "@rocket.chat/icons": next + "@rocket.chat/fuselage": ^0.32.1 + "@rocket.chat/icons": ^0.32.0 "@storybook/addon-actions": ~6.5.16 "@storybook/addon-docs": ~6.5.16 "@storybook/addon-essentials": ~6.5.16 @@ -8921,7 +9505,8 @@ __metadata: dependencies: "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/emitter": next - "@rocket.chat/fuselage-hooks": next + "@rocket.chat/fuselage-hooks": ^0.32.1 + "@rocket.chat/password-policies": "workspace:^" "@rocket.chat/rest-typings": "workspace:^" "@types/jest": ~29.5.3 "@types/react": ~17.0.62 @@ -8930,7 +9515,7 @@ __metadata: eslint: ~8.45.0 eslint-plugin-react-hooks: ^4.6.0 jest: ~29.6.1 - mongodb: ^4.12.1 + mongodb: ^4.17.1 react: ~17.0.2 ts-jest: ~29.0.5 typescript: ~5.2.2 @@ -8946,12 +9531,10 @@ __metadata: languageName: unknown linkType: soft -"@rocket.chat/ui-kit@npm:next": - version: 0.32.0-dev.341 - resolution: "@rocket.chat/ui-kit@npm:0.32.0-dev.341" - peerDependencies: - "@rocket.chat/icons": "*" - checksum: cdfe3f464472266194aeda6e4f7cf61239ebc46531c00ebcb6b1d9c05ce7ea0206c79d257922b6d8c83a3212457d855fde1f416844c15eb39bebbba814135608 +"@rocket.chat/ui-kit@npm:^0.32.1": + version: 0.32.1 + resolution: "@rocket.chat/ui-kit@npm:0.32.1" + checksum: dec0d2ebc23786dae2dc62d598b89482abbd810a71527ba99a5fb0f36e3de51647e4ab13a0bb514d760156f92780c22a88317701d886fd934d848c0fd5961579 languageName: node linkType: hard @@ -8960,9 +9543,9 @@ __metadata: resolution: "@rocket.chat/ui-theming@workspace:ee/packages/ui-theming" dependencies: "@rocket.chat/css-in-js": next - "@rocket.chat/fuselage": next - "@rocket.chat/fuselage-hooks": next - "@rocket.chat/icons": next + "@rocket.chat/fuselage": ^0.32.1 + "@rocket.chat/fuselage-hooks": ^0.32.1 + "@rocket.chat/icons": ^0.32.0 "@rocket.chat/ui-contexts": "workspace:~" "@storybook/addon-actions": ~6.5.16 "@storybook/addon-docs": ~6.5.16 @@ -9003,9 +9586,9 @@ __metadata: "@rocket.chat/css-in-js": next "@rocket.chat/emitter": next "@rocket.chat/eslint-config": "workspace:^" - "@rocket.chat/fuselage": next - "@rocket.chat/fuselage-hooks": next - "@rocket.chat/icons": next + "@rocket.chat/fuselage": ^0.32.1 + "@rocket.chat/fuselage-hooks": ^0.32.1 + "@rocket.chat/icons": ^0.32.0 "@rocket.chat/styled": next "@rocket.chat/ui-contexts": "workspace:^" "@storybook/addon-actions": ~6.5.16 @@ -9031,7 +9614,7 @@ __metadata: "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-contexts": 1.0.2 + "@rocket.chat/ui-contexts": 2.0.0-rc.4 react: ^17.0.2 react-dom: ^17.0.2 languageName: unknown @@ -9046,13 +9629,13 @@ __metadata: "@codemirror/tooltip": ^0.19.16 "@lezer/highlight": ^1.1.6 "@rocket.chat/css-in-js": next - "@rocket.chat/fuselage": next - "@rocket.chat/fuselage-hooks": next + "@rocket.chat/fuselage": ^0.32.1 + "@rocket.chat/fuselage-hooks": ^0.32.1 "@rocket.chat/fuselage-polyfills": next "@rocket.chat/fuselage-tokens": next "@rocket.chat/fuselage-ui-kit": "workspace:~" - "@rocket.chat/icons": next - "@rocket.chat/logo": next + "@rocket.chat/icons": ^0.32.0 + "@rocket.chat/logo": ^0.31.27 "@rocket.chat/styled": next "@rocket.chat/ui-contexts": "workspace:~" "@types/react": ~17.0.62 @@ -9084,20 +9667,38 @@ __metadata: version: 0.0.0-use.local resolution: "@rocket.chat/web-ui-registration@workspace:packages/web-ui-registration" dependencies: + "@babel/core": ~7.22.10 + "@babel/preset-env": ~7.22.10 + "@babel/preset-react": ~7.22.5 + "@babel/preset-typescript": ~7.22.5 + "@rocket.chat/i18n": "workspace:~" "@rocket.chat/layout": next + "@rocket.chat/mock-providers": "workspace:~" "@rocket.chat/ui-client": "workspace:^" "@rocket.chat/ui-contexts": "workspace:^" + "@storybook/addon-actions": ~6.5.16 + "@storybook/addon-docs": ~6.5.16 + "@storybook/addon-essentials": ~6.5.16 + "@storybook/builder-webpack4": ~6.5.16 + "@storybook/manager-webpack4": ~6.5.16 + "@storybook/react": ~6.5.16 + "@storybook/testing-library": ^0.2.0 "@tanstack/react-query": ^4.16.1 "@testing-library/react": ^13.3.0 "@types/jest": ~29.5.3 + "@types/react": ~17.0.62 + babel-loader: ~8.3.0 eslint: ~8.45.0 jest: ~29.6.1 - react-hook-form: ^7.34.2 + react: ~17.0.2 + react-hook-form: ~7.45.4 + react-i18next: ~13.2.1 + storybook-dark-mode: ~3.0.1 ts-jest: ~29.0.5 typescript: ~5.2.2 peerDependencies: "@rocket.chat/layout": "*" - "@rocket.chat/ui-contexts": 1.0.2 + "@rocket.chat/ui-contexts": 2.0.0-rc.4 "@tanstack/react-query": "*" react: "*" react-hook-form: "*" @@ -9682,6 +10283,20 @@ __metadata: languageName: node linkType: hard +"@storybook/addons@npm:^7.0.0": + version: 7.3.2 + resolution: "@storybook/addons@npm:7.3.2" + dependencies: + "@storybook/manager-api": 7.3.2 + "@storybook/preview-api": 7.3.2 + "@storybook/types": 7.3.2 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: acde96c9480a25299067229666da596174e4e07827a8ac4aa687b253fc09471eb7123a28cd8e2f3fdb9567596d7ab49482df7ddf5479f435f71b46f1c7a41771 + languageName: node + linkType: hard + "@storybook/api@npm:6.5.16": version: 6.5.16 resolution: "@storybook/api@npm:6.5.16" @@ -9710,6 +10325,24 @@ __metadata: languageName: node linkType: hard +"@storybook/api@npm:^7.0.0": + version: 7.3.2 + resolution: "@storybook/api@npm:7.3.2" + dependencies: + "@storybook/client-logger": 7.3.2 + "@storybook/manager-api": 7.3.2 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + checksum: dfe5f976256fc74c82548ca35f7052b82ca87a21d44e8554c0913ecc8f5d0e0d317a57b0308057473c3b8efa95428590d4350c9c4d1ef7f7c02ee8c7c2d2e8ee + languageName: node + linkType: hard + "@storybook/builder-webpack4@npm:6.5.16, @storybook/builder-webpack4@npm:~6.5.16": version: 6.5.16 resolution: "@storybook/builder-webpack4@npm:6.5.16" @@ -9862,6 +10495,20 @@ __metadata: languageName: node linkType: hard +"@storybook/channels@npm:7.3.2": + version: 7.3.2 + resolution: "@storybook/channels@npm:7.3.2" + dependencies: + "@storybook/client-logger": 7.3.2 + "@storybook/core-events": 7.3.2 + "@storybook/global": ^5.0.0 + qs: ^6.10.0 + telejson: ^7.0.3 + tiny-invariant: ^1.3.1 + checksum: a32a204d36f1b778f9d23329846c48f3f8a77db4afa40cf6829185a2e21a7bf65150c7fe33309febda4f5fbc78f5ed36f751519ccdcd9f0f92a32fdbba03390e + languageName: node + linkType: hard + "@storybook/client-api@npm:6.5.16": version: 6.5.16 resolution: "@storybook/client-api@npm:6.5.16" @@ -9903,6 +10550,15 @@ __metadata: languageName: node linkType: hard +"@storybook/client-logger@npm:7.3.2": + version: 7.3.2 + resolution: "@storybook/client-logger@npm:7.3.2" + dependencies: + "@storybook/global": ^5.0.0 + checksum: bf52aa9567d3b849976553bafc70da9d55fb2abdbea2e51487e8c8d597d12ba84c0fa952b9225d5c9be489b6bed99eb9250d93682fc66547acf2ff28df17b2e7 + languageName: node + linkType: hard + "@storybook/components@npm:6.5.16": version: 6.5.16 resolution: "@storybook/components@npm:6.5.16" @@ -9922,6 +10578,28 @@ __metadata: languageName: node linkType: hard +"@storybook/components@npm:^7.0.0": + version: 7.3.2 + resolution: "@storybook/components@npm:7.3.2" + dependencies: + "@radix-ui/react-select": ^1.2.2 + "@radix-ui/react-toolbar": ^1.0.4 + "@storybook/client-logger": 7.3.2 + "@storybook/csf": ^0.1.0 + "@storybook/global": ^5.0.0 + "@storybook/icons": ^1.1.6 + "@storybook/theming": 7.3.2 + "@storybook/types": 7.3.2 + memoizerific: ^1.11.3 + use-resize-observer: ^9.1.0 + util-deprecate: ^1.0.2 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: cbb501ee896a7bde88e8136589bc38ab2af534a4325ac64db64c5424cc2efc32cfc5e9f5756c17c2ee3a10d49f1b5268dbdca179e503f18d9021f4700e8dcb35 + languageName: node + linkType: hard + "@storybook/core-client@npm:6.5.16": version: 6.5.16 resolution: "@storybook/core-client@npm:6.5.16" @@ -10030,6 +10708,13 @@ __metadata: languageName: node linkType: hard +"@storybook/core-events@npm:7.3.2, @storybook/core-events@npm:^7.0.0": + version: 7.3.2 + resolution: "@storybook/core-events@npm:7.3.2" + checksum: 86c809250fc3ad05e3254fc86d163339108569749ffee47496a2717bf1a9052304975007e8c05075415361cda0e0c530cc1f2ae6d4fa682d9573240ebfd1d170 + languageName: node + linkType: hard + "@storybook/core-server@npm:6.5.16": version: 6.5.16 resolution: "@storybook/core-server@npm:6.5.16" @@ -10159,6 +10844,15 @@ __metadata: languageName: node linkType: hard +"@storybook/csf@npm:^0.1.0": + version: 0.1.1 + resolution: "@storybook/csf@npm:0.1.1" + dependencies: + type-fest: ^2.19.0 + checksum: 1fbb827b50f0c15f21026a95d02cc096be4f9f2705ad8fd29f0a99330233606e69f6af7551d844ace2a4b8f08fcc9f81496d4d69160ba8c458698291efb60954 + languageName: node + linkType: hard + "@storybook/docs-tools@npm:6.5.16": version: 6.5.16 resolution: "@storybook/docs-tools@npm:6.5.16" @@ -10174,6 +10868,23 @@ __metadata: languageName: node linkType: hard +"@storybook/global@npm:^5.0.0": + version: 5.0.0 + resolution: "@storybook/global@npm:5.0.0" + checksum: ede0ad35ec411fe31c61150dbd118fef344d1d0e72bf5d3502368e35cf68126f6b7ae4a0ab5e2ffe2f0baa3b4286f03ad069ba3e098e1725449ef08b7e154ba8 + languageName: node + linkType: hard + +"@storybook/icons@npm:^1.1.6": + version: 1.1.6 + resolution: "@storybook/icons@npm:1.1.6" + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: b5774c9e61622886e006d1a87252352246af5236668d9fb2fad00c56c0bb2e1ddbdbab3535b4c806672e62d4e280d7be438596bc3888f74349490e138d9f3acf + languageName: node + linkType: hard + "@storybook/instrumenter@npm:6.5.16, @storybook/instrumenter@npm:^6.4.0": version: 6.5.16 resolution: "@storybook/instrumenter@npm:6.5.16" @@ -10187,6 +10898,32 @@ __metadata: languageName: node linkType: hard +"@storybook/manager-api@npm:7.3.2": + version: 7.3.2 + resolution: "@storybook/manager-api@npm:7.3.2" + dependencies: + "@storybook/channels": 7.3.2 + "@storybook/client-logger": 7.3.2 + "@storybook/core-events": 7.3.2 + "@storybook/csf": ^0.1.0 + "@storybook/global": ^5.0.0 + "@storybook/router": 7.3.2 + "@storybook/theming": 7.3.2 + "@storybook/types": 7.3.2 + dequal: ^2.0.2 + lodash: ^4.17.21 + memoizerific: ^1.11.3 + semver: ^7.3.7 + store2: ^2.14.2 + telejson: ^7.0.3 + ts-dedent: ^2.0.0 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: 6b733fe83739288ac74d600d45f5e10f36a359f98b9f0a3574753173e1824f7f7e45407e7e73d476bbf66e40a8246e74bb7cf64eb332a85f8b49f2c9b59d8459 + languageName: node + linkType: hard + "@storybook/manager-webpack4@npm:6.5.16, @storybook/manager-webpack4@npm:~6.5.16": version: 6.5.16 resolution: "@storybook/manager-webpack4@npm:6.5.16" @@ -10354,6 +11091,28 @@ __metadata: languageName: node linkType: hard +"@storybook/preview-api@npm:7.3.2": + version: 7.3.2 + resolution: "@storybook/preview-api@npm:7.3.2" + dependencies: + "@storybook/channels": 7.3.2 + "@storybook/client-logger": 7.3.2 + "@storybook/core-events": 7.3.2 + "@storybook/csf": ^0.1.0 + "@storybook/global": ^5.0.0 + "@storybook/types": 7.3.2 + "@types/qs": ^6.9.5 + dequal: ^2.0.2 + lodash: ^4.17.21 + memoizerific: ^1.11.3 + qs: ^6.10.0 + synchronous-promise: ^2.0.15 + ts-dedent: ^2.0.0 + util-deprecate: ^1.0.2 + checksum: 3fbf417685a2eb8e952d24361997c32530a161225f1f7b131c726b7517bd3e57fdfbc117e0b62591674465bb82a66086b0cee0d3acda66f4d2b431f4a4846931 + languageName: node + linkType: hard + "@storybook/preview-web@npm:6.5.16": version: 6.5.16 resolution: "@storybook/preview-web@npm:6.5.16" @@ -10399,6 +11158,24 @@ __metadata: languageName: node linkType: hard +"@storybook/react-docgen-typescript-plugin@patch:@storybook/react-docgen-typescript-plugin@npm%3A1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0#./.yarn/patches/@storybook-react-docgen-typescript-plugin-npm-1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0-b31cc57c40.patch::locator=rocket.chat%40workspace%3A.": + version: 1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0 + resolution: "@storybook/react-docgen-typescript-plugin@patch:@storybook/react-docgen-typescript-plugin@npm%3A1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0#./.yarn/patches/@storybook-react-docgen-typescript-plugin-npm-1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0-b31cc57c40.patch::version=1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0&hash=c5d5d9&locator=rocket.chat%40workspace%3A." + dependencies: + debug: ^4.1.1 + endent: ^2.0.1 + find-cache-dir: ^3.3.1 + flat-cache: ^3.0.4 + micromatch: ^4.0.2 + react-docgen-typescript: ^2.1.1 + tslib: ^2.0.0 + peerDependencies: + typescript: ">= 3.x" + webpack: ">= 4" + checksum: 1734e438561dd47b44364815e2bf0da07a5ea57505d748f696892582cde5d4d6f31bb4ae6263ee236b4cb081ba2571d575b11aa5dd9ce13f48021cfc63ce52c1 + languageName: node + linkType: hard + "@storybook/react@npm:~6.5.16": version: 6.5.16 resolution: "@storybook/react@npm:6.5.16" @@ -10480,6 +11257,20 @@ __metadata: languageName: node linkType: hard +"@storybook/router@npm:7.3.2": + version: 7.3.2 + resolution: "@storybook/router@npm:7.3.2" + dependencies: + "@storybook/client-logger": 7.3.2 + memoizerific: ^1.11.3 + qs: ^6.10.0 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: 9a67a2f30f47deec1ff4588ce9d3c16cdab4084bdc6523edc54700c89a44023e0c6e17da5e0524f73109f8697cc5e728400b086342c58f14df8e01dfad58f1a2 + languageName: node + linkType: hard + "@storybook/semver@npm:^7.3.2": version: 7.3.2 resolution: "@storybook/semver@npm:7.3.2" @@ -10572,6 +11363,17 @@ __metadata: languageName: node linkType: hard +"@storybook/testing-library@npm:^0.2.0": + version: 0.2.0 + resolution: "@storybook/testing-library@npm:0.2.0" + dependencies: + "@testing-library/dom": ^9.0.0 + "@testing-library/user-event": ^14.0.0 + ts-dedent: ^2.2.0 + checksum: 1c1c16aea6f961de344f5d43bdfd2847bc5f44df1037c2e1383312bb6b842e2c17a805670fc9cfe1a8425f9e48e240fe5d025ab3d4802a198cfe9eb6ed8e7636 + languageName: node + linkType: hard + "@storybook/theming@npm:6.5.16, @storybook/theming@npm:~6.5.16": version: 6.5.16 resolution: "@storybook/theming@npm:6.5.16" @@ -10587,6 +11389,33 @@ __metadata: languageName: node linkType: hard +"@storybook/theming@npm:7.3.2, @storybook/theming@npm:^7.0.0": + version: 7.3.2 + resolution: "@storybook/theming@npm:7.3.2" + dependencies: + "@emotion/use-insertion-effect-with-fallbacks": ^1.0.0 + "@storybook/client-logger": 7.3.2 + "@storybook/global": ^5.0.0 + memoizerific: ^1.11.3 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: aab7d83213ac3df7062fd39e33587311c972bfa3879a32dbc2f4dfa899c7b716ffa6c81496c18032bc8b4f0961cc50de0b0486aacf0e512aaec295cb635d8d4d + languageName: node + linkType: hard + +"@storybook/types@npm:7.3.2": + version: 7.3.2 + resolution: "@storybook/types@npm:7.3.2" + dependencies: + "@storybook/channels": 7.3.2 + "@types/babel__core": ^7.0.0 + "@types/express": ^4.7.0 + file-system-cache: 2.3.0 + checksum: 5986ca2780c6049c08f65cda0dc2b1f063476d0a5ad337a96d641bb91131e7d4a600dcf87b25aedba747f8beb66ac0805562c46e73dc0d20222be4fc4b02309c + languageName: node + linkType: hard + "@storybook/ui@npm:6.5.16": version: 6.5.16 resolution: "@storybook/ui@npm:6.5.16" @@ -10813,6 +11642,22 @@ __metadata: languageName: node linkType: hard +"@testing-library/dom@npm:^9.0.0": + version: 9.3.1 + resolution: "@testing-library/dom@npm:9.3.1" + dependencies: + "@babel/code-frame": ^7.10.4 + "@babel/runtime": ^7.12.5 + "@types/aria-query": ^5.0.1 + aria-query: 5.1.3 + chalk: ^4.1.0 + dom-accessibility-api: ^0.5.9 + lz-string: ^1.5.0 + pretty-format: ^27.0.2 + checksum: 8ee3136451644e39990edea93709c38cf1e8ce5306f3c66273ca00935963faa51ca74e8d92b02eb442ccb842cfa28ca62833e393e075eb269cf9bef6f5600663 + languageName: node + linkType: hard + "@testing-library/jest-dom@npm:^5.16.5, @testing-library/jest-dom@npm:~5.16.5": version: 5.16.5 resolution: "@testing-library/jest-dom@npm:5.16.5" @@ -10891,6 +11736,15 @@ __metadata: languageName: node linkType: hard +"@testing-library/user-event@npm:^14.0.0": + version: 14.4.3 + resolution: "@testing-library/user-event@npm:14.4.3" + peerDependencies: + "@testing-library/dom": ">=7.21.4" + checksum: 852c48ea6db1c9471b18276617c84fec4320771e466cd58339a732ca3fd73ad35e5a43ae14f51af51a8d0a150dcf60fcaab049ef367871207bea8f92c4b8195e + languageName: node + linkType: hard + "@tokenizer/token@npm:^0.3.0": version: 0.3.0 resolution: "@tokenizer/token@npm:0.3.0" @@ -10972,7 +11826,14 @@ __metadata: languageName: node linkType: hard -"@types/babel__core@npm:^7, @types/babel__core@npm:^7.1.14, @types/babel__core@npm:~7.20.1": +"@types/aria-query@npm:^5.0.1": + version: 5.0.1 + resolution: "@types/aria-query@npm:5.0.1" + checksum: 69fd7cceb6113ed370591aef04b3fd0742e9a1b06dd045c43531448847b85de181495e4566f98e776b37c422a12fd71866e0a1dfd904c5ec3f84d271682901de + languageName: node + linkType: hard + +"@types/babel__core@npm:^7, @types/babel__core@npm:^7.0.0, @types/babel__core@npm:^7.1.14, @types/babel__core@npm:~7.20.1": version: 7.20.1 resolution: "@types/babel__core@npm:7.20.1" dependencies: @@ -10994,7 +11855,7 @@ __metadata: languageName: node linkType: hard -"@types/babel__preset-env@npm:^7, @types/babel__preset-env@npm:~7.9.2": +"@types/babel__preset-env@npm:^7": version: 7.9.2 resolution: "@types/babel__preset-env@npm:7.9.2" checksum: a905ed92a3f602384966153e74a94790425e98af54e392a7fcfb5c5ded2f2a58c49a9fa64a0cb506fbffb8169ad25b56ea87983c812a4fb880f0716668c8c085 @@ -11055,15 +11916,6 @@ __metadata: languageName: node linkType: hard -"@types/bson@npm:*": - version: 4.2.0 - resolution: "@types/bson@npm:4.2.0" - dependencies: - bson: "*" - checksum: 55abf60c57b7f05655c210b386392636a299a7df18b89cec2cde0aa87374d97dd4ac9632226b0f6fe135d16ad4296ae5ddc782f6e9132d38c53dd26a6df8e704 - languageName: node - linkType: hard - "@types/busboy@npm:^1.5.0": version: 1.5.0 resolution: "@types/busboy@npm:1.5.0" @@ -11304,7 +12156,7 @@ __metadata: languageName: node linkType: hard -"@types/express@npm:*, @types/express@npm:^4.17.13, @types/express@npm:^4.17.17, @types/express@npm:^4.17.8": +"@types/express@npm:*, @types/express@npm:^4.17.13, @types/express@npm:^4.17.17, @types/express@npm:^4.17.8, @types/express@npm:^4.7.0": version: 4.17.17 resolution: "@types/express@npm:4.17.17" dependencies: @@ -11480,16 +12332,6 @@ __metadata: languageName: node linkType: hard -"@types/jest-axe@npm:^3.5.5": - version: 3.5.5 - resolution: "@types/jest-axe@npm:3.5.5" - dependencies: - "@types/jest": "*" - axe-core: ^3.5.5 - checksum: 535038968034fe80fb466dcd5939ea5d9e9adb3ef00852ded3e41c62536c05137eb30bcbfd608142d2bc571d65c20b8e3563181674fb48594c2662d340bb4da5 - languageName: node - linkType: hard - "@types/jest@npm:*, @types/jest@npm:~29.5.3": version: 29.5.3 resolution: "@types/jest@npm:29.5.3" @@ -11752,16 +12594,6 @@ __metadata: languageName: node linkType: hard -"@types/mongodb@npm:^3.6.20": - version: 3.6.20 - resolution: "@types/mongodb@npm:3.6.20" - dependencies: - "@types/bson": "*" - "@types/node": "*" - checksum: e5397ada2ed728997f7c3f5424e8c28f682a635488be967c9c18a5de27b1641cf28bb42bc12026ac6d475c457a880e27097e13c8120350ba13219f4ccc030656 - languageName: node - linkType: hard - "@types/ms@npm:*": version: 0.7.31 resolution: "@types/ms@npm:0.7.31" @@ -12281,13 +13113,6 @@ __metadata: languageName: node linkType: hard -"@types/tmp@npm:^0.2.2": - version: 0.2.3 - resolution: "@types/tmp@npm:0.2.3" - checksum: 0ca45e99b3b3c6959d5c4f4555f73c8007db540cfb0fbbb9373217f9ab85e67eef75193f51a1d6564b0ee6c6f5ffa259d1034d7f7530a5b7ce80acb94cfc4daa - languageName: node - linkType: hard - "@types/tough-cookie@npm:*": version: 4.0.1 resolution: "@types/tough-cookie@npm:4.0.1" @@ -13756,10 +14581,21 @@ __metadata: languageName: node linkType: hard -"aria-query@npm:^5.0.0": - version: 5.0.0 - resolution: "aria-query@npm:5.0.0" - checksum: c41f98866c5a304561ee8cae55856711cddad6f3f85d8cb43cc5f79667078d9b8979ce32d244c1ff364e6463a4d0b6865804a33ccc717fed701b281cf7dc6296 +"aria-hidden@npm:^1.1.1": + version: 1.2.3 + resolution: "aria-hidden@npm:1.2.3" + dependencies: + tslib: ^2.0.0 + checksum: 7d7d211629eef315e94ed3b064c6823d13617e609d3f9afab1c2ed86399bb8e90405f9bdd358a85506802766f3ecb468af985c67c846045a34b973bcc0289db9 + languageName: node + linkType: hard + +"aria-query@npm:5.1.3, aria-query@npm:^5.0.0": + version: 5.1.3 + resolution: "aria-query@npm:5.1.3" + dependencies: + deep-equal: ^2.0.5 + checksum: 929ff95f02857b650fb4cbcd2f41072eee2f46159a6605ea03bf63aa572e35ffdff43d69e815ddc462e16e07de8faba3978afc2813650b4448ee18c9895d982b languageName: node linkType: hard @@ -13784,6 +14620,16 @@ __metadata: languageName: node linkType: hard +"array-buffer-byte-length@npm:^1.0.0": + version: 1.0.0 + resolution: "array-buffer-byte-length@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + is-array-buffer: ^3.0.1 + checksum: 044e101ce150f4804ad19c51d6c4d4cfa505c5b2577bd179256e4aa3f3f6a0a5e9874c78cd428ee566ac574c8a04d7ce21af9fe52e844abfdccb82b33035a7c3 + languageName: node + linkType: hard + "array-find-index@npm:^1.0.1": version: 1.0.2 resolution: "array-find-index@npm:1.0.2" @@ -14046,15 +14892,6 @@ __metadata: languageName: node linkType: hard -"async-mutex@npm:^0.3.2": - version: 0.3.2 - resolution: "async-mutex@npm:0.3.2" - dependencies: - tslib: ^2.3.1 - checksum: 620b771dfdea1cad0a6b712915c31a1e3ca880a8cf1eae92b4590f435995e0260929c6ebaae0b9126b1456790ea498064b5bb9a506948cda760f48d3d0dcc4c8 - languageName: node - linkType: hard - "async-retry@npm:^1.3.3": version: 1.3.3 resolution: "async-retry@npm:1.3.3" @@ -14196,20 +15033,13 @@ __metadata: languageName: node linkType: hard -"axe-core@npm:4.7.2, axe-core@npm:^4.2.0": +"axe-core@npm:^4.2.0, axe-core@npm:^4.7.0": version: 4.7.2 resolution: "axe-core@npm:4.7.2" checksum: 5d86fa0f45213b0e54cbb5d713ce885c4a8fe3a72b92dd915a47aa396d6fd149c4a87fec53aa978511f6d941402256cfeb26f2db35129e370f25a453c688655a languageName: node linkType: hard -"axe-core@npm:^3.5.5": - version: 3.5.6 - resolution: "axe-core@npm:3.5.6" - checksum: 000777d2b6bf1f390beb1fb4b8714ed9127797c021c345b032db0c144e07320dbbe8cb0bcb7688b90b79cfbd3cdc1f27a4dc857804e3c61d7e0defb34deeb830 - languageName: node - linkType: hard - "axios@npm:^0.21.0, axios@npm:^0.21.1": version: 0.21.4 resolution: "axios@npm:0.21.4" @@ -14273,7 +15103,7 @@ __metadata: languageName: node linkType: hard -"babel-loader@npm:^8.0.0, babel-loader@npm:^8.3.0": +"babel-loader@npm:^8.0.0, babel-loader@npm:^8.3.0, babel-loader@npm:~8.3.0": version: 8.3.0 resolution: "babel-loader@npm:8.3.0" dependencies: @@ -14381,7 +15211,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs2@npm:^0.4.4": +"babel-plugin-polyfill-corejs2@npm:^0.4.5": version: 0.4.5 resolution: "babel-plugin-polyfill-corejs2@npm:0.4.5" dependencies: @@ -14406,7 +15236,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs3@npm:^0.8.2": +"babel-plugin-polyfill-corejs3@npm:^0.8.3": version: 0.8.3 resolution: "babel-plugin-polyfill-corejs3@npm:0.8.3" dependencies: @@ -14418,7 +15248,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-regenerator@npm:^0.5.1": +"babel-plugin-polyfill-regenerator@npm:^0.5.2": version: 0.5.2 resolution: "babel-plugin-polyfill-regenerator@npm:0.5.2" dependencies: @@ -14788,16 +15618,6 @@ __metadata: languageName: node linkType: hard -"bl@npm:^2.2.1": - version: 2.2.1 - resolution: "bl@npm:2.2.1" - dependencies: - readable-stream: ^2.3.5 - safe-buffer: ^5.1.1 - checksum: 4f5d9b258919646a8d02f1731379e53b6f6309e34596ae02afbc3aeb183910bd2d0b70681f889b7c620ca48f65dc1cd0992ee1266c90d6d7c3be60688d141233 - languageName: node - linkType: hard - "bl@npm:^4.0.3": version: 4.1.0 resolution: "bl@npm:4.1.0" @@ -15202,19 +16022,12 @@ __metadata: languageName: node linkType: hard -"bson@npm:*, bson@npm:^4.6.4, bson@npm:^4.7.0": - version: 4.7.0 - resolution: "bson@npm:4.7.0" +"bson@npm:^4.6.4, bson@npm:^4.7.2": + version: 4.7.2 + resolution: "bson@npm:4.7.2" dependencies: buffer: ^5.6.0 - checksum: 83e7b64afdad5a505073a7e6206e7b345f59e7888fbcb1948fba72b6101a1baf58b7499314f8e24b650567665f7973eda048aabbb1ddcfbadfba7d6c6b0f5e83 - languageName: node - linkType: hard - -"bson@npm:^1.1.4": - version: 1.1.6 - resolution: "bson@npm:1.1.6" - checksum: 75762c9b7e0b3156cb0f38c7eb9ffcade53f0b04ac87dece9cba38f6dc570d9af91251de6a8988b294063cfaa21894c60ac9e85c34176accb3674acb092d66a7 + checksum: f357d12c5679c8eb029a62e410ad40fb862b7b91f0fc12a3399fb3668e14aecaa63205ffeeee48735a01d393171743607dcd527eb8c058b6f2bd294079ee4125 languageName: node linkType: hard @@ -15649,7 +16462,7 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^6.0.0, camelcase@npm:^6.1.0, camelcase@npm:^6.2.0, camelcase@npm:^6.3.0": +"camelcase@npm:^6.0.0, camelcase@npm:^6.2.0, camelcase@npm:^6.3.0": version: 6.3.0 resolution: "camelcase@npm:6.3.0" checksum: 8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d @@ -15807,7 +16620,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:2.4.2, chalk@npm:^2.0.0, chalk@npm:^2.0.1, chalk@npm:^2.1.0, chalk@npm:^2.4.1, chalk@npm:^2.4.2": +"chalk@npm:2.4.2, chalk@npm:^2.0.1, chalk@npm:^2.1.0, chalk@npm:^2.4.1, chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" dependencies: @@ -15828,16 +16641,6 @@ __metadata: languageName: node linkType: hard -"chalk@npm:4.1.2, chalk@npm:^4, chalk@npm:^4.0.0, chalk@npm:^4.1.0, chalk@npm:^4.1.2": - version: 4.1.2 - resolution: "chalk@npm:4.1.2" - dependencies: - ansi-styles: ^4.1.0 - supports-color: ^7.1.0 - checksum: fe75c9d5c76a7a98d45495b91b2172fa3b7a09e0cc9370e5c8feb1c567b85c4288e2b3fded7cfdd7359ac28d6b3844feb8b82b8686842e93d23c827c417e83fc - languageName: node - linkType: hard - "chalk@npm:^1.0.0": version: 1.1.3 resolution: "chalk@npm:1.1.3" @@ -15851,6 +16654,16 @@ __metadata: languageName: node linkType: hard +"chalk@npm:^4, chalk@npm:^4.0.0, chalk@npm:^4.1.0, chalk@npm:^4.1.2": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: ^4.1.0 + supports-color: ^7.1.0 + checksum: fe75c9d5c76a7a98d45495b91b2172fa3b7a09e0cc9370e5c8feb1c567b85c4288e2b3fded7cfdd7359ac28d6b3844feb8b82b8686842e93d23c827c417e83fc + languageName: node + linkType: hard + "change-case@npm:^4.1.2": version: 4.1.2 resolution: "change-case@npm:4.1.2" @@ -17797,7 +18610,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.0.1, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.2.0, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:~4.3.1": +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.0.1, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:~4.3.1": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -17990,6 +18803,32 @@ __metadata: languageName: node linkType: hard +"deep-equal@npm:^2.0.5": + version: 2.2.2 + resolution: "deep-equal@npm:2.2.2" + dependencies: + array-buffer-byte-length: ^1.0.0 + call-bind: ^1.0.2 + es-get-iterator: ^1.1.3 + get-intrinsic: ^1.2.1 + is-arguments: ^1.1.1 + is-array-buffer: ^3.0.2 + is-date-object: ^1.0.5 + is-regex: ^1.1.4 + is-shared-array-buffer: ^1.0.2 + isarray: ^2.0.5 + object-is: ^1.1.5 + object-keys: ^1.1.1 + object.assign: ^4.1.4 + regexp.prototype.flags: ^1.5.0 + side-channel: ^1.0.4 + which-boxed-primitive: ^1.0.2 + which-collection: ^1.0.1 + which-typed-array: ^1.1.9 + checksum: eb61c35157b6ecb96a5359b507b083fbff8ddb4c86a78a781ee38485f77a667465e45d63ee2ebd8a00e86d94c80e499906900cd82c2debb400237e1662cd5397 + languageName: node + linkType: hard + "deep-extend@npm:^0.6.0": version: 0.6.0 resolution: "deep-extend@npm:0.6.0" @@ -18058,13 +18897,13 @@ __metadata: languageName: node linkType: hard -"define-properties@npm:^1.1.2, define-properties@npm:^1.1.3, define-properties@npm:^1.1.4": - version: 1.1.4 - resolution: "define-properties@npm:1.1.4" +"define-properties@npm:^1.1.2, define-properties@npm:^1.1.3, define-properties@npm:^1.1.4, define-properties@npm:^1.2.0": + version: 1.2.0 + resolution: "define-properties@npm:1.2.0" dependencies: has-property-descriptors: ^1.0.0 object-keys: ^1.1.1 - checksum: ce0aef3f9eb193562b5cfb79b2d2c86b6a109dfc9fdcb5f45d680631a1a908c06824ddcdb72b7573b54e26ace07f0a23420aaba0d5c627b34d2c1de8ef527e2b + checksum: e60aee6a19b102df4e2b1f301816804e81ab48bb91f00d0d935f269bf4b3f79c88b39e4f89eaa132890d23267335fd1140dfcd8d5ccd61031a0a2c41a54e33a6 languageName: node linkType: hard @@ -18136,13 +18975,6 @@ __metadata: languageName: node linkType: hard -"denque@npm:^1.4.1": - version: 1.5.1 - resolution: "denque@npm:1.5.1" - checksum: 4375ad19d5cea99f90effa82a8cecdaa10f4eb261fbcd7e47cd753ff2737f037aac8f7f4e031cc77f3966314c491c86a0d3b20c128aeee57f791b4662c45108e - languageName: node - linkType: hard - "depd@npm:2.0.0, depd@npm:~2.0.0": version: 2.0.0 resolution: "depd@npm:2.0.0" @@ -18164,6 +18996,13 @@ __metadata: languageName: node linkType: hard +"dequal@npm:^2.0.2": + version: 2.0.3 + resolution: "dequal@npm:2.0.3" + checksum: 8679b850e1a3d0ebbc46ee780d5df7b478c23f335887464023a631d1b9af051ad4a6595a44220f9ff8ff95a8ddccf019b5ad778a976fd7bbf77383d36f412f90 + languageName: node + linkType: hard + "des.js@npm:^1.0.0": version: 1.0.1 resolution: "des.js@npm:1.0.1" @@ -18236,6 +19075,13 @@ __metadata: languageName: node linkType: hard +"detect-node-es@npm:^1.1.0": + version: 1.1.0 + resolution: "detect-node-es@npm:1.1.0" + checksum: e46307d7264644975b71c104b9f028ed1d3d34b83a15b8a22373640ce5ea630e5640b1078b8ea15f202b54641da71e4aa7597093bd4b91f113db520a26a37449 + languageName: node + linkType: hard + "detect-node@npm:^2.0.4": version: 2.1.0 resolution: "detect-node@npm:2.1.0" @@ -19055,7 +19901,7 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.17.2, es-abstract@npm:^1.18.5, es-abstract@npm:^1.19.0, es-abstract@npm:^1.19.1, es-abstract@npm:^1.19.5, es-abstract@npm:^1.20.4": +"es-abstract@npm:^1.17.2, es-abstract@npm:^1.19.0, es-abstract@npm:^1.19.1, es-abstract@npm:^1.19.5, es-abstract@npm:^1.20.4": version: 1.20.4 resolution: "es-abstract@npm:1.20.4" dependencies: @@ -19094,19 +19940,20 @@ __metadata: languageName: node linkType: hard -"es-get-iterator@npm:^1.0.2": - version: 1.1.2 - resolution: "es-get-iterator@npm:1.1.2" +"es-get-iterator@npm:^1.0.2, es-get-iterator@npm:^1.1.3": + version: 1.1.3 + resolution: "es-get-iterator@npm:1.1.3" dependencies: call-bind: ^1.0.2 - get-intrinsic: ^1.1.0 - has-symbols: ^1.0.1 - is-arguments: ^1.1.0 + get-intrinsic: ^1.1.3 + has-symbols: ^1.0.3 + is-arguments: ^1.1.1 is-map: ^2.0.2 is-set: ^2.0.2 - is-string: ^1.0.5 + is-string: ^1.0.7 isarray: ^2.0.5 - checksum: f75e66acb6a45686fa08b3ade9c9421a70d36a0c43ed4363e67f4d7aab2226cb73dd977cb48abbaf75721b946d3cd810682fcf310c7ad0867802fbf929b17dcf + stop-iteration-iterator: ^1.0.0 + checksum: 8fa118da42667a01a7c7529f8a8cca514feeff243feec1ce0bb73baaa3514560bd09d2b3438873cf8a5aaec5d52da248131de153b28e2638a061b6e4df13267d languageName: node linkType: hard @@ -20444,6 +21291,16 @@ __metadata: languageName: node linkType: hard +"file-system-cache@npm:2.3.0": + version: 2.3.0 + resolution: "file-system-cache@npm:2.3.0" + dependencies: + fs-extra: 11.1.1 + ramda: 0.29.0 + checksum: 74afa2870a062500643d41e02d1fbd47a3f30100f9e153dec5233d59f05545f4c8ada6085629d624e043479ac28c0cafc31824f7b49a3f997efab8cc5d05bfee + languageName: node + linkType: hard + "file-system-cache@npm:^1.0.5": version: 1.0.5 resolution: "file-system-cache@npm:1.0.5" @@ -20636,7 +21493,7 @@ __metadata: languageName: node linkType: hard -"find-cache-dir@npm:^3.2.0, find-cache-dir@npm:^3.3.1, find-cache-dir@npm:^3.3.2": +"find-cache-dir@npm:^3.2.0, find-cache-dir@npm:^3.3.1": version: 3.3.2 resolution: "find-cache-dir@npm:3.3.2" dependencies: @@ -20814,6 +21671,15 @@ __metadata: languageName: node linkType: hard +"for-each@npm:^0.3.3": + version: 0.3.3 + resolution: "for-each@npm:0.3.3" + dependencies: + is-callable: ^1.1.3 + checksum: 6c48ff2bc63362319c65e2edca4a8e1e3483a2fabc72fbe7feaf8c73db94fc7861bd53bc02c8a66a0c1dd709da6b04eec42e0abdd6b40ce47305ae92a25e5d28 + languageName: node + linkType: hard + "for-in@npm:^1.0.2": version: 1.0.2 resolution: "for-in@npm:1.0.2" @@ -20821,13 +21687,6 @@ __metadata: languageName: node linkType: hard -"foreach@npm:^2.0.5": - version: 2.0.5 - resolution: "foreach@npm:2.0.5" - checksum: dab4fbfef0b40b69ee5eab81bcb9626b8fa8b3469c8cfa26480f3e5e1ee08c40eae07048c9a967c65aeda26e774511ccc70b3f10a604c01753c6ef24361f0fc8 - languageName: node - linkType: hard - "foreground-child@npm:^2.0.0": version: 2.0.0 resolution: "foreground-child@npm:2.0.0" @@ -21001,6 +21860,17 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:11.1.1": + version: 11.1.1 + resolution: "fs-extra@npm:11.1.1" + dependencies: + graceful-fs: ^4.2.0 + jsonfile: ^6.0.1 + universalify: ^2.0.0 + checksum: fb883c68245b2d777fbc1f2082c9efb084eaa2bbf9fddaa366130d196c03608eebef7fb490541276429ee1ca99f317e2d73e96f5ca0999eefedf5a624ae1edfd + languageName: node + linkType: hard + "fs-extra@npm:^0.30.0": version: 0.30.0 resolution: "fs-extra@npm:0.30.0" @@ -21168,10 +22038,10 @@ __metadata: languageName: node linkType: hard -"functions-have-names@npm:^1.2.2": - version: 1.2.2 - resolution: "functions-have-names@npm:1.2.2" - checksum: 25f44b6d1c41ac86ffdf41f25d1de81c0a5b4a3fcf4307a33cdfb23b9d4bd5d0d8bf312eaef5ad368c6500c8a9e19f692b8ce9f96aaab99db9dd936554165558 +"functions-have-names@npm:^1.2.2, functions-have-names@npm:^1.2.3": + version: 1.2.3 + resolution: "functions-have-names@npm:1.2.3" + checksum: c3f1f5ba20f4e962efb71344ce0a40722163e85bee2101ce25f88214e78182d2d2476aa85ef37950c579eb6cf6ee811c17b3101bb84004bb75655f3e33f3fdb5 languageName: node linkType: hard @@ -21329,14 +22199,22 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.0, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3": - version: 1.1.3 - resolution: "get-intrinsic@npm:1.1.3" +"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1": + version: 1.2.1 + resolution: "get-intrinsic@npm:1.2.1" dependencies: function-bind: ^1.1.1 has: ^1.0.3 + has-proto: ^1.0.1 has-symbols: ^1.0.3 - checksum: 152d79e87251d536cf880ba75cfc3d6c6c50e12b3a64e1ea960e73a3752b47c69f46034456eae1b0894359ce3bc64c55c186f2811f8a788b75b638b06fab228a + checksum: 5b61d88552c24b0cf6fa2d1b3bc5459d7306f699de060d76442cce49a4721f52b8c560a33ab392cf5575b7810277d54ded9d4d39a1ea61855619ebc005aa7e5f + languageName: node + linkType: hard + +"get-nonce@npm:^1.0.0": + version: 1.0.1 + resolution: "get-nonce@npm:1.0.1" + checksum: e2614e43b4694c78277bb61b0f04583d45786881289285c73770b07ded246a98be7e1f78b940c80cbe6f2b07f55f0b724e6db6fd6f1bcbd1e8bdac16521074ed languageName: node linkType: hard @@ -21347,13 +22225,6 @@ __metadata: languageName: node linkType: hard -"get-port@npm:^5.1.1": - version: 5.1.1 - resolution: "get-port@npm:5.1.1" - checksum: 0162663ffe5c09e748cd79d97b74cd70e5a5c84b760a475ce5767b357fb2a57cb821cee412d646aa8a156ed39b78aab88974eddaa9e5ee926173c036c0713787 - languageName: node - linkType: hard - "get-proxy@npm:^2.0.0": version: 2.1.0 resolution: "get-proxy@npm:2.1.0" @@ -21851,6 +22722,15 @@ __metadata: languageName: node linkType: hard +"gopd@npm:^1.0.1": + version: 1.0.1 + resolution: "gopd@npm:1.0.1" + dependencies: + get-intrinsic: ^1.1.3 + checksum: a5ccfb8806e0917a94e0b3de2af2ea4979c1da920bc381667c260e00e7cafdbe844e2cb9c5bcfef4e5412e8bf73bab837285bc35c7ba73aaaf0134d4583393a6 + languageName: node + linkType: hard + "got@npm:^6.7.1": version: 6.7.1 resolution: "got@npm:6.7.1" @@ -22083,6 +22963,13 @@ __metadata: languageName: node linkType: hard +"has-proto@npm:^1.0.1": + version: 1.0.1 + resolution: "has-proto@npm:1.0.1" + checksum: febc5b5b531de8022806ad7407935e2135f1cc9e64636c3916c6842bd7995994ca3b29871ecd7954bd35f9e2986c17b3b227880484d22259e2f8e6ce63fd383e + languageName: node + linkType: hard + "has-symbol-support-x@npm:^1.4.1": version: 1.4.2 resolution: "has-symbol-support-x@npm:1.4.2" @@ -22904,30 +23791,12 @@ __metadata: languageName: node linkType: hard -"i18next@npm:>=17.0.11": - version: 22.4.15 - resolution: "i18next@npm:22.4.15" - dependencies: - "@babel/runtime": ^7.20.6 - checksum: fced898227983e439c59e7aa6e7b87e53ad1b8a1c85f0613a968881418266e5336e9443831125590559796075d516fe3dbf8118679c894094a0a404be78b02a2 - languageName: node - linkType: hard - -"i18next@npm:^20.6.1": - version: 20.6.1 - resolution: "i18next@npm:20.6.1" - dependencies: - "@babel/runtime": ^7.12.0 - checksum: 313cd4b17f9092eaf8ca92a02bb74d099f4a8b26de6e38018f438ce6f706220e5f72d865e1f50d815e13504ec38bc77e0f6341f670ca5162689f8d11a859e564 - languageName: node - linkType: hard - -"i18next@npm:^21.8.10": - version: 21.8.11 - resolution: "i18next@npm:21.8.11" +"i18next@npm:>=17.0.11, i18next@npm:~23.4.5": + version: 23.4.5 + resolution: "i18next@npm:23.4.5" dependencies: - "@babel/runtime": ^7.17.2 - checksum: 94b9de3811456c2720b96d54febb89fe66cef3146044cdba9cc35543f93bf04843ccffb191ff4dbed614e7d4a64f2e29391dd514e054331738f2411c1936d85f + "@babel/runtime": ^7.22.5 + checksum: b39a1edc19fc6fb34df4fd95581e2b86dd5d8c8345e3409a3366df606a72b62f25ee31a82fb9b0e22161cd856408989c91b74ee737b0cce00d547e6d371a14f5 languageName: node linkType: hard @@ -23385,14 +24254,14 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.3": - version: 1.0.3 - resolution: "internal-slot@npm:1.0.3" +"internal-slot@npm:^1.0.3, internal-slot@npm:^1.0.4": + version: 1.0.5 + resolution: "internal-slot@npm:1.0.5" dependencies: - get-intrinsic: ^1.1.0 + get-intrinsic: ^1.2.0 has: ^1.0.3 side-channel: ^1.0.4 - checksum: 1944f92e981e47aebc98a88ff0db579fd90543d937806104d0b96557b10c1f170c51fb777b97740a8b6ddeec585fca8c39ae99fd08a8e058dfc8ab70937238bf + checksum: 97e84046bf9e7574d0956bd98d7162313ce7057883b6db6c5c7b5e5f05688864b0978ba07610c726d15d66544ffe4b1050107d93f8a39ebc59b15d8b429b497a languageName: node linkType: hard @@ -23554,7 +24423,7 @@ __metadata: languageName: node linkType: hard -"is-arguments@npm:^1.0.4, is-arguments@npm:^1.1.0": +"is-arguments@npm:^1.0.4, is-arguments@npm:^1.1.1": version: 1.1.1 resolution: "is-arguments@npm:1.1.1" dependencies: @@ -23564,6 +24433,17 @@ __metadata: languageName: node linkType: hard +"is-array-buffer@npm:^3.0.1, is-array-buffer@npm:^3.0.2": + version: 3.0.2 + resolution: "is-array-buffer@npm:3.0.2" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.0 + is-typed-array: ^1.1.10 + checksum: dcac9dda66ff17df9cabdc58214172bf41082f956eab30bb0d86bc0fab1e44b690fc8e1f855cf2481245caf4e8a5a006a982a71ddccec84032ed41f9d8da8c14 + languageName: node + linkType: hard + "is-arrayish@npm:^0.2.1": version: 0.2.1 resolution: "is-arrayish@npm:0.2.1" @@ -23629,7 +24509,7 @@ __metadata: languageName: node linkType: hard -"is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": +"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": version: 1.2.7 resolution: "is-callable@npm:1.2.7" checksum: 61fd57d03b0d984e2ed3720fb1c7a897827ea174bd44402878e059542ea8c4aeedee0ea0985998aa5cc2736b2fa6e271c08587addb5b3959ac52cf665173d1ac @@ -23719,7 +24599,7 @@ __metadata: languageName: node linkType: hard -"is-date-object@npm:^1.0.1": +"is-date-object@npm:^1.0.1, is-date-object@npm:^1.0.5": version: 1.0.5 resolution: "is-date-object@npm:1.0.5" dependencies: @@ -23924,7 +24804,7 @@ __metadata: languageName: node linkType: hard -"is-map@npm:^2.0.2": +"is-map@npm:^2.0.1, is-map@npm:^2.0.2": version: 2.0.2 resolution: "is-map@npm:2.0.2" checksum: ace3d0ecd667bbdefdb1852de601268f67f2db725624b1958f279316e13fecb8fa7df91fd60f690d7417b4ec180712f5a7ee967008e27c65cfd475cc84337728 @@ -24147,7 +25027,7 @@ __metadata: languageName: node linkType: hard -"is-set@npm:^2.0.2": +"is-set@npm:^2.0.1, is-set@npm:^2.0.2": version: 2.0.2 resolution: "is-set@npm:2.0.2" checksum: b64343faf45e9387b97a6fd32be632ee7b269bd8183701f3b3f5b71a7cf00d04450ed8669d0bd08753e08b968beda96fca73a10fd0ff56a32603f64deba55a57 @@ -24213,16 +25093,12 @@ __metadata: languageName: node linkType: hard -"is-typed-array@npm:^1.1.3, is-typed-array@npm:^1.1.7": - version: 1.1.8 - resolution: "is-typed-array@npm:1.1.8" +"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.3": + version: 1.1.12 + resolution: "is-typed-array@npm:1.1.12" dependencies: - available-typed-arrays: ^1.0.5 - call-bind: ^1.0.2 - es-abstract: ^1.18.5 - foreach: ^2.0.5 - has-tostringtag: ^1.0.0 - checksum: aa0f9f0716e19e2fb8aef69e69e4205479d25ace778e2339fc910948115cde4b0d9aff9d5d1e8b80f09a5664998278e05e54ad3dc9cb12cefcf86db71084ed00 + which-typed-array: ^1.1.11 + checksum: 4c89c4a3be07186caddadf92197b17fda663a9d259ea0d44a85f171558270d36059d1c386d34a12cba22dfade5aba497ce22778e866adc9406098c8fc4771796 languageName: node linkType: hard @@ -24261,6 +25137,13 @@ __metadata: languageName: node linkType: hard +"is-weakmap@npm:^2.0.1": + version: 2.0.1 + resolution: "is-weakmap@npm:2.0.1" + checksum: 1222bb7e90c32bdb949226e66d26cb7bce12e1e28e3e1b40bfa6b390ba3e08192a8664a703dff2a00a84825f4e022f9cd58c4599ff9981ab72b1d69479f4f7f6 + languageName: node + linkType: hard + "is-weakref@npm:^1.0.2": version: 1.0.2 resolution: "is-weakref@npm:1.0.2" @@ -24270,6 +25153,16 @@ __metadata: languageName: node linkType: hard +"is-weakset@npm:^2.0.1": + version: 2.0.2 + resolution: "is-weakset@npm:2.0.2" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.1 + checksum: 5d8698d1fa599a0635d7ca85be9c26d547b317ed8fd83fc75f03efbe75d50001b5eececb1e9971de85fcde84f69ae6f8346bc92d20d55d46201d328e4c74a367 + languageName: node + linkType: hard + "is-what@npm:^4.1.8": version: 4.1.8 resolution: "is-what@npm:4.1.8" @@ -24523,18 +25416,6 @@ __metadata: languageName: node linkType: hard -"jest-axe@npm:^8.0.0": - version: 8.0.0 - resolution: "jest-axe@npm:8.0.0" - dependencies: - axe-core: 4.7.2 - chalk: 4.1.2 - jest-matcher-utils: 29.2.2 - lodash.merge: 4.6.2 - checksum: 895501afa6ac6c49e5e45ee1cd4a8e923589f220f6f950a8f5366cc3f3636aaee9c9d501a469f9658185e7a5928b59a337d4b4f1c7bb3f4b3b5ba8b3811c9f15 - languageName: node - linkType: hard - "jest-changed-files@npm:^29.5.0": version: 29.5.0 resolution: "jest-changed-files@npm:29.5.0" @@ -24650,7 +25531,7 @@ __metadata: languageName: node linkType: hard -"jest-diff@npm:^29.2.1": +"jest-diff@npm:^29.6.1": version: 29.6.2 resolution: "jest-diff@npm:29.6.2" dependencies: @@ -24662,18 +25543,6 @@ __metadata: languageName: node linkType: hard -"jest-diff@npm:^29.6.1": - version: 29.6.1 - resolution: "jest-diff@npm:29.6.1" - dependencies: - chalk: ^4.0.0 - diff-sequences: ^29.4.3 - jest-get-type: ^29.4.3 - pretty-format: ^29.6.1 - checksum: c6350178ca27d92c7fd879790fb2525470c1ff1c5d29b1834a240fecd26c6904fb470ebddb98dc96dd85389c56c3b50e6965a1f5203e9236d213886ed9806219 - languageName: node - linkType: hard - "jest-docblock@npm:^29.4.3": version: 29.4.3 resolution: "jest-docblock@npm:29.4.3" @@ -24748,7 +25617,7 @@ __metadata: languageName: node linkType: hard -"jest-get-type@npm:^29.2.0, jest-get-type@npm:^29.4.3": +"jest-get-type@npm:^29.4.3": version: 29.4.3 resolution: "jest-get-type@npm:29.4.3" checksum: 6ac7f2dde1c65e292e4355b6c63b3a4897d7e92cb4c8afcf6d397f2682f8080e094c8b0b68205a74d269882ec06bf696a9de6cd3e1b7333531e5ed7b112605ce @@ -24813,18 +25682,6 @@ __metadata: languageName: node linkType: hard -"jest-matcher-utils@npm:29.2.2": - version: 29.2.2 - resolution: "jest-matcher-utils@npm:29.2.2" - dependencies: - chalk: ^4.0.0 - jest-diff: ^29.2.1 - jest-get-type: ^29.2.0 - pretty-format: ^29.2.1 - checksum: 97ef2638ab826c25f84bfedea231cef091820ae0876ba316922da81145e950d2b9d2057d3645813b5ee880bb975ed4f22e228dda5d0d26a20715e575b675357d - languageName: node - linkType: hard - "jest-matcher-utils@npm:^29.6.1": version: 29.6.1 resolution: "jest-matcher-utils@npm:29.6.1" @@ -26183,7 +27040,7 @@ __metadata: languageName: node linkType: hard -"lodash.merge@npm:4.6.2, lodash.merge@npm:^4.6.2": +"lodash.merge@npm:^4.6.2": version: 4.6.2 resolution: "lodash.merge@npm:4.6.2" checksum: ad580b4bdbb7ca1f7abf7e1bce63a9a0b98e370cf40194b03380a46b4ed799c9573029599caebc1b14e3f24b111aef72b96674a56cfa105e0f5ac70546cdc005 @@ -26430,12 +27287,12 @@ __metadata: languageName: node linkType: hard -"lz-string@npm:^1.4.4": - version: 1.4.4 - resolution: "lz-string@npm:1.4.4" +"lz-string@npm:^1.4.4, lz-string@npm:^1.5.0": + version: 1.5.0 + resolution: "lz-string@npm:1.5.0" bin: lz-string: bin/bin.js - checksum: 54e31238a61a84d8f664d9860a9fba7310c5b97a52c444f80543069bc084815eff40b8d4474ae1d93992fdf6c252dca37cf27f6adbeb4dbc3df2f3ac773d0e61 + checksum: 1ee98b4580246fd90dd54da6e346fb1caefcf05f677c686d9af237a157fdea3fd7c83a4bc58f858cd5b10a34d27afe0fdcbd0505a47e0590726a873dc8b8f65d languageName: node linkType: hard @@ -26666,15 +27523,6 @@ __metadata: languageName: node linkType: hard -"md5-file@npm:^5.0.0": - version: 5.0.0 - resolution: "md5-file@npm:5.0.0" - bin: - md5-file: cli.js - checksum: c606a00ff58adf5428e8e2f36d86e5d3c7029f9688126faca302cd83b5e92cac183a62e1d1f05fae7c2614e80f993326fd0a8d6a3a913c41ec7ea0eefc25aa76 - languageName: node - linkType: hard - "md5.js@npm:^1.3.4": version: 1.3.5 resolution: "md5.js@npm:1.3.5" @@ -27704,7 +28552,7 @@ __metadata: languageName: node linkType: hard -"mongodb-connection-string-url@npm:^2.5.4": +"mongodb-connection-string-url@npm:^2.6.0": version: 2.6.0 resolution: "mongodb-connection-string-url@npm:2.6.0" dependencies: @@ -27714,87 +28562,39 @@ __metadata: languageName: node linkType: hard -"mongodb-memory-server-core@npm:7.6.3": - version: 7.6.3 - resolution: "mongodb-memory-server-core@npm:7.6.3" - dependencies: - "@types/mongodb": ^3.6.20 - "@types/tmp": ^0.2.2 - async-mutex: ^0.3.2 - camelcase: ^6.1.0 - debug: ^4.2.0 - find-cache-dir: ^3.3.2 - get-port: ^5.1.1 - https-proxy-agent: ^5.0.0 - md5-file: ^5.0.0 - mkdirp: ^1.0.4 - mongodb: ^3.7.3 - new-find-package-json: ^1.1.0 - semver: ^7.3.5 - tar-stream: ^2.1.4 - tmp: ^0.2.1 - tslib: ^2.3.0 - uuid: ^8.3.1 - yauzl: ^2.10.0 - checksum: 2c111f7a90f72b6810e9083da40b8bbf905d1388eb8453f71225ff805a865985efef2c40a88d082baf9ece737b4d9bd3c9fd517d1fcc656aae53e9f62e44ee14 - languageName: node - linkType: hard - -"mongodb-memory-server@npm:^7.6.3": - version: 7.6.3 - resolution: "mongodb-memory-server@npm:7.6.3" - dependencies: - mongodb-memory-server-core: 7.6.3 - tslib: ^2.3.0 - checksum: 8161ad3be8e31012f64ac4a1ac555b10071416ee6de6a50ee1a05d76018eaadacadb34364c29bba73e0877236f2f01163cd0e2dc0432427fbbe69a1fb4eaecbc - languageName: node - linkType: hard - -"mongodb@npm:^3.7.3": - version: 3.7.3 - resolution: "mongodb@npm:3.7.3" +"mongodb@npm:4.17.1, mongodb@npm:^4.3.1": + version: 4.17.1 + resolution: "mongodb@npm:4.17.1" dependencies: - bl: ^2.2.1 - bson: ^1.1.4 - denque: ^1.4.1 - optional-require: ^1.1.8 - safe-buffer: ^5.1.2 - saslprep: ^1.0.0 + "@aws-sdk/credential-providers": ^3.186.0 + "@mongodb-js/saslprep": ^1.1.0 + bson: ^4.7.2 + mongodb-connection-string-url: ^2.6.0 + socks: ^2.7.1 dependenciesMeta: - saslprep: - optional: true - peerDependenciesMeta: - aws4: - optional: true - bson-ext: - optional: true - kerberos: - optional: true - mongodb-client-encryption: - optional: true - mongodb-extjson: + "@aws-sdk/credential-providers": optional: true - snappy: + "@mongodb-js/saslprep": optional: true - checksum: ef7690fe6ee7d1752f121b14e59b3fabfddc60ff0536babce6c945703ad0010de9e6fa7de4c91b99275c256876a72a06899ce27893aba0838c2b542088bd1044 + checksum: e7f280570d0f23d60c308b2a484ed55762ec8e523946c0de1a0b3b398f24efcf1916a745e5407f32cd1c105b2f19d8ac75474c92f73cdf651affe3430a963f54 languageName: node linkType: hard -"mongodb@npm:^4.12.1, mongodb@npm:^4.3.1": - version: 4.12.1 - resolution: "mongodb@npm:4.12.1" +"mongodb@patch:mongodb@npm:4.17.1#.yarn/patches/mongodb-npm-4.17.1-a2fe811ff1.patch::locator=rocket.chat%40workspace%3A.": + version: 4.17.1 + resolution: "mongodb@patch:mongodb@npm%3A4.17.1#.yarn/patches/mongodb-npm-4.17.1-a2fe811ff1.patch::version=4.17.1&hash=f5fa42&locator=rocket.chat%40workspace%3A." dependencies: "@aws-sdk/credential-providers": ^3.186.0 - bson: ^4.7.0 - mongodb-connection-string-url: ^2.5.4 - saslprep: ^1.0.3 + "@mongodb-js/saslprep": ^1.1.0 + bson: ^4.7.2 + mongodb-connection-string-url: ^2.6.0 socks: ^2.7.1 dependenciesMeta: "@aws-sdk/credential-providers": optional: true - saslprep: + "@mongodb-js/saslprep": optional: true - checksum: 84590484b2c93bce849ec1e334b064e983444ed73942061c91e09556348c80db9d4a40544b927cd795bdfbfc51d1b713a7df5ced4ecf13cd00fab5e3c3e32ada + checksum: 7aa00b4000e8f01b18386b6d11033a3216de97ea892a7f10a9c0d0da40a51d91b1c9cbb0e51ff5691487e0fc926d06b5aebb944747153e6fbdaca08cf71d601c languageName: node linkType: hard @@ -28097,16 +28897,6 @@ __metadata: languageName: node linkType: hard -"new-find-package-json@npm:^1.1.0": - version: 1.1.0 - resolution: "new-find-package-json@npm:1.1.0" - dependencies: - debug: ^4.3.2 - tslib: ^2.3.0 - checksum: 818e5a837f87c62fb9bc4893247fd9b7b2ff1bbf25b174af9e9ec22d60d44ce355e60f80ed0657652370cca06e59539c7df292354250820403fa33cd210e76ed - languageName: node - linkType: hard - "nice-try@npm:^1.0.4": version: 1.0.5 resolution: "nice-try@npm:1.0.5" @@ -28762,7 +29552,7 @@ __metadata: languageName: node linkType: hard -"object-is@npm:^1.0.1": +"object-is@npm:^1.0.1, object-is@npm:^1.1.5": version: 1.1.5 resolution: "object-is@npm:1.1.5" dependencies: @@ -29005,15 +29795,6 @@ __metadata: languageName: node linkType: hard -"optional-require@npm:^1.1.8": - version: 1.1.8 - resolution: "optional-require@npm:1.1.8" - dependencies: - require-at: ^1.0.6 - checksum: 437db76f713052925185ae80837b593877f75101154e8937f50d33b0b07bd500c214efc9016748642109b6e3e1197eb0513a2963eb06bcf3890f88a2724b1c87 - languageName: node - linkType: hard - "optional@npm:^0.1.3": version: 0.1.4 resolution: "optional@npm:0.1.4" @@ -31122,18 +31903,7 @@ __metadata: languageName: node linkType: hard -"pretty-format@npm:^29.0.0, pretty-format@npm:^29.6.1": - version: 29.6.1 - resolution: "pretty-format@npm:29.6.1" - dependencies: - "@jest/schemas": ^29.6.0 - ansi-styles: ^5.0.0 - react-is: ^18.0.0 - checksum: 6f923a2379a37a425241dc223d76f671c73c4f37dba158050575a54095867d565c068b441843afdf3d7c37bed9df4bbadf46297976e60d4149972b779474203a - languageName: node - linkType: hard - -"pretty-format@npm:^29.2.1, pretty-format@npm:^29.6.2": +"pretty-format@npm:^29.0.0, pretty-format@npm:^29.6.1, pretty-format@npm:^29.6.2": version: 29.6.2 resolution: "pretty-format@npm:29.6.2" dependencies: @@ -31669,6 +32439,13 @@ __metadata: languageName: node linkType: hard +"ramda@npm:0.29.0": + version: 0.29.0 + resolution: "ramda@npm:0.29.0" + checksum: 9ab26c06eb7545cbb7eebcf75526d6ee2fcaae19e338f165b2bf32772121e7b28192d6664d1ba222ff76188ba26ab307342d66e805dbb02c860560adc4d5dd57 + languageName: node + linkType: hard + "ramda@npm:^0.21.0": version: 0.21.0 resolution: "ramda@npm:0.21.0" @@ -32029,24 +32806,6 @@ __metadata: languageName: node linkType: hard -"react-hook-form@npm:^7.30.0, react-hook-form@npm:^7.34.2": - version: 7.34.2 - resolution: "react-hook-form@npm:7.34.2" - peerDependencies: - react: ^16.8.0 || ^17 || ^18 - checksum: 485cde0248e668ad1845b927f9cc05b434c384141bb03bc143a7d7cc937eebf119c935114ccbfa397b463808283dab5b2334022fe5dba975402b201e601d6876 - languageName: node - linkType: hard - -"react-hook-form@npm:^7.45.0": - version: 7.45.0 - resolution: "react-hook-form@npm:7.45.0" - peerDependencies: - react: ^16.8.0 || ^17 || ^18 - checksum: 3e35253f0efb0f77f5036c74f85cbdd425adb2fad20a14fc692d573fe552b3d9b7e7ac22193cd767f265fa292c33383d8721cfbdcc5ae41910a35a1ba3655f66 - languageName: node - linkType: hard - "react-hook-form@npm:~7.27.1": version: 7.27.1 resolution: "react-hook-form@npm:7.27.1" @@ -32056,21 +32815,30 @@ __metadata: languageName: node linkType: hard -"react-i18next@npm:^11.16.7, react-i18next@npm:^11.16.9": - version: 11.18.5 - resolution: "react-i18next@npm:11.18.5" +"react-hook-form@npm:~7.45.4": + version: 7.45.4 + resolution: "react-hook-form@npm:7.45.4" + peerDependencies: + react: ^16.8.0 || ^17 || ^18 + checksum: 1d84c78dadf561bc9e360272c5c856c724426162e13a74929c0517c3eb8004a7f057561fff3bfd4c1121b36d6cf1437399df1dbfd01d0817b9f922503f407d8f + languageName: node + linkType: hard + +"react-i18next@npm:~13.2.1": + version: 13.2.1 + resolution: "react-i18next@npm:13.2.1" dependencies: - "@babel/runtime": ^7.14.5 + "@babel/runtime": ^7.22.5 html-parse-stringify: ^3.0.1 peerDependencies: - i18next: ">= 19.0.0" + i18next: ">= 23.2.3" react: ">= 16.8.0" peerDependenciesMeta: react-dom: optional: true react-native: optional: true - checksum: c5e4b5b8ecc49f799a93110cb4d99d91190a268cf3b14b48e005ac1453eefe75e10758952a7d01fef4cf55afc5a6e7170d23c41d602efaedc06d4d34a85cd725 + checksum: aa3bd7b0f9f3d794e756a7fe087471c20c13dc2fbf5e53400403a356973d87a1b76f0204720081914bd06cb94d92bf987ebbf33c3de3c67a0cc9b32dde8972f1 languageName: node linkType: hard @@ -32168,6 +32936,41 @@ __metadata: languageName: node linkType: hard +"react-remove-scroll-bar@npm:^2.3.3": + version: 2.3.4 + resolution: "react-remove-scroll-bar@npm:2.3.4" + dependencies: + react-style-singleton: ^2.2.1 + tslib: ^2.0.0 + peerDependencies: + "@types/react": ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: b5ce5f2f98d65c97a3e975823ae4043a4ba2a3b63b5ba284b887e7853f051b5cd6afb74abde6d57b421931c52f2e1fdbb625dc858b1cb5a32c27c14ab85649d4 + languageName: node + linkType: hard + +"react-remove-scroll@npm:2.5.5": + version: 2.5.5 + resolution: "react-remove-scroll@npm:2.5.5" + dependencies: + react-remove-scroll-bar: ^2.3.3 + react-style-singleton: ^2.2.1 + tslib: ^2.1.0 + use-callback-ref: ^1.3.0 + use-sidecar: ^1.1.2 + peerDependencies: + "@types/react": ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 2c7fe9cbd766f5e54beb4bec2e2efb2de3583037b23fef8fa511ab426ed7f1ae992382db5acd8ab5bfb030a4b93a06a2ebca41377d6eeaf0e6791bb0a59616a4 + languageName: node + linkType: hard + "react-router-dom@npm:^6.11.2": version: 6.11.2 resolution: "react-router-dom@npm:6.11.2" @@ -32258,6 +33061,23 @@ __metadata: languageName: node linkType: hard +"react-style-singleton@npm:^2.2.1": + version: 2.2.1 + resolution: "react-style-singleton@npm:2.2.1" + dependencies: + get-nonce: ^1.0.0 + invariant: ^2.2.4 + tslib: ^2.0.0 + peerDependencies: + "@types/react": ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 7ee8ef3aab74c7ae1d70ff34a27643d11ba1a8d62d072c767827d9ff9a520905223e567002e0bf6c772929d8ea1c781a3ba0cc4a563e92b1e3dc2eaa817ecbe8 + languageName: node + linkType: hard + "react-virtuoso@npm:^1.11.1": version: 1.11.1 resolution: "react-virtuoso@npm:1.11.1" @@ -32640,19 +33460,26 @@ __metadata: languageName: node linkType: hard -"regenerator-runtime@npm:^0.13.11, regenerator-runtime@npm:^0.13.2, regenerator-runtime@npm:^0.13.7": +"regenerator-runtime@npm:^0.13.2, regenerator-runtime@npm:^0.13.7": version: 0.13.11 resolution: "regenerator-runtime@npm:0.13.11" checksum: 27481628d22a1c4e3ff551096a683b424242a216fee44685467307f14d58020af1e19660bf2e26064de946bad7eff28950eae9f8209d55723e2d9351e632bbb4 languageName: node linkType: hard -"regenerator-transform@npm:^0.15.1": - version: 0.15.1 - resolution: "regenerator-transform@npm:0.15.1" +"regenerator-runtime@npm:^0.14.0": + version: 0.14.0 + resolution: "regenerator-runtime@npm:0.14.0" + checksum: 1c977ad82a82a4412e4f639d65d22be376d3ebdd30da2c003eeafdaaacd03fc00c2320f18120007ee700900979284fc78a9f00da7fb593f6e6eeebc673fba9a3 + languageName: node + linkType: hard + +"regenerator-transform@npm:^0.15.2": + version: 0.15.2 + resolution: "regenerator-transform@npm:0.15.2" dependencies: "@babel/runtime": ^7.8.4 - checksum: 2d15bdeadbbfb1d12c93f5775493d85874dbe1d405bec323da5c61ec6e701bc9eea36167483e1a5e752de9b2df59ab9a2dfff6bf3784f2b28af2279a673d29a4 + checksum: 20b6f9377d65954980fe044cfdd160de98df415b4bff38fbade67b3337efaf078308c4fed943067cd759827cc8cfeca9cb28ccda1f08333b85d6a2acbd022c27 languageName: node linkType: hard @@ -32666,14 +33493,14 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.4.3": - version: 1.4.3 - resolution: "regexp.prototype.flags@npm:1.4.3" +"regexp.prototype.flags@npm:^1.4.3, regexp.prototype.flags@npm:^1.5.0": + version: 1.5.0 + resolution: "regexp.prototype.flags@npm:1.5.0" dependencies: call-bind: ^1.0.2 - define-properties: ^1.1.3 - functions-have-names: ^1.2.2 - checksum: 51228bae732592adb3ededd5e15426be25f289e9c4ef15212f4da73f4ec3919b6140806374b8894036a86020d054a8d2657d3fee6bb9b4d35d8939c20030b7a6 + define-properties: ^1.2.0 + functions-have-names: ^1.2.3 + checksum: c541687cdbdfff1b9a07f6e44879f82c66bbf07665f9a7544c5fd16acdb3ec8d1436caab01662d2fbcad403f3499d49ab0b77fbc7ef29ef961d98cc4bc9755b4 languageName: node linkType: hard @@ -32982,13 +33809,6 @@ __metadata: languageName: node linkType: hard -"require-at@npm:^1.0.6": - version: 1.0.6 - resolution: "require-at@npm:1.0.6" - checksum: 7753a6ebad99855ef015d5533a787c65e883c94c23371368eebf6f1c7e2a078811013b204823152cbab206a00e825e8e5ca09416fd835a489fa30bf064fbe6d9 - languageName: node - linkType: hard - "require-directory@npm:^2.1.1": version: 2.1.1 resolution: "require-directory@npm:2.1.1" @@ -33284,13 +34104,13 @@ __metadata: "@rocket.chat/core-services": "workspace:^" "@rocket.chat/core-typings": "workspace:^" "@rocket.chat/emitter": next - "@rocket.chat/icons": next + "@rocket.chat/icons": ^0.32.0 "@rocket.chat/message-parser": next "@rocket.chat/model-typings": "workspace:^" "@rocket.chat/models": "workspace:^" "@rocket.chat/rest-typings": "workspace:^" "@rocket.chat/string-helpers": next - "@rocket.chat/ui-kit": next + "@rocket.chat/ui-kit": ^0.32.1 "@types/cookie": ^0.5.1 "@types/cookie-parser": ^1.4.3 "@types/ejson": ^2.2.0 @@ -33311,7 +34131,7 @@ __metadata: jaeger-client: ^3.19.0 mem: ^8.1.1 moleculer: ^0.14.29 - mongodb: ^4.12.1 + mongodb: ^4.17.1 nats: ^2.6.1 npm-run-all: ^4.1.5 pino: ^8.15.0 @@ -33483,15 +34303,6 @@ __metadata: languageName: node linkType: hard -"saslprep@npm:^1.0.0, saslprep@npm:^1.0.3": - version: 1.0.3 - resolution: "saslprep@npm:1.0.3" - dependencies: - sparse-bitfield: ^3.0.3 - checksum: 4fdc0b70fb5e523f977de405e12cca111f1f10dd68a0cfae0ca52c1a7919a94d1556598ba2d35f447655c3b32879846c77f9274c90806f6673248ae3cea6ee43 - languageName: node - linkType: hard - "sass-loader@npm:~10.4.1": version: 10.4.1 resolution: "sass-loader@npm:10.4.1" @@ -34816,10 +35627,43 @@ __metadata: languageName: node linkType: hard -"store2@npm:^2.12.0": - version: 2.13.2 - resolution: "store2@npm:2.13.2" - checksum: 9e760ea2a7f56eae47d5bafe507511b25ad983bba901e1e0c5f65713e631c15aafb8e031c658047af53c2008a5d21cb6c43f2383673b3493144e8e1ead5c8f91 +"stop-iteration-iterator@npm:^1.0.0": + version: 1.0.0 + resolution: "stop-iteration-iterator@npm:1.0.0" + dependencies: + internal-slot: ^1.0.4 + checksum: d04173690b2efa40e24ab70e5e51a3ff31d56d699550cfad084104ab3381390daccb36652b25755e420245f3b0737de66c1879eaa2a8d4fc0a78f9bf892fcb42 + languageName: node + linkType: hard + +"store2@npm:^2.12.0, store2@npm:^2.14.2": + version: 2.14.2 + resolution: "store2@npm:2.14.2" + checksum: 6f270fc5bab99b63f45fcc7bd8b99c2714b4adf880f557ed7ffb5ed3987131251165bccde425a00928aaf044870aee79ddeef548576d093c68703ed2edec45d7 + languageName: node + linkType: hard + +"storybook-dark-mode@npm:~3.0.1": + version: 3.0.1 + resolution: "storybook-dark-mode@npm:3.0.1" + dependencies: + "@storybook/addons": ^7.0.0 + "@storybook/api": ^7.0.0 + "@storybook/components": ^7.0.0 + "@storybook/core-events": ^7.0.0 + "@storybook/global": ^5.0.0 + "@storybook/theming": ^7.0.0 + fast-deep-equal: ^3.1.3 + memoizerific: ^1.11.3 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + checksum: d04213c92e8a4af0035e80eb02b75b8da725ba7b1ecbfe050eb04cb4018d91394f08c8fe7c1b106c971b2047ef5a1ba776e78050ae1f6d7563cdfdba5e701a29 languageName: node linkType: hard @@ -35774,6 +36618,15 @@ __metadata: languageName: node linkType: hard +"telejson@npm:^7.0.3": + version: 7.1.0 + resolution: "telejson@npm:7.1.0" + dependencies: + memoizerific: ^1.11.3 + checksum: 8000e43dc862a87ab1ca342a2635641923d55c2585f85ea8c7c60293681d6f920e8b9570cc12d90ecef286f065c176da5f769f42f4828ba18a626627bed1ac07 + languageName: node + linkType: hard + "temp-dir@npm:^1.0.0": version: 1.0.0 resolution: "temp-dir@npm:1.0.0" @@ -35881,20 +36734,7 @@ __metadata: languageName: node linkType: hard -"terser@npm:^4.1.2, terser@npm:^4.6.3": - version: 4.8.0 - resolution: "terser@npm:4.8.0" - dependencies: - commander: ^2.20.0 - source-map: ~0.6.1 - source-map-support: ~0.5.12 - bin: - terser: bin/terser - checksum: f980789097d4f856c1ef4b9a7ada37beb0bb022fb8aa3057968862b5864ad7c244253b3e269c9eb0ab7d0caf97b9521273f2d1cf1e0e942ff0016e0583859c71 - languageName: node - linkType: hard - -"terser@npm:^4.6.13": +"terser@npm:^4.1.2, terser@npm:^4.6.13, terser@npm:^4.6.3": version: 4.8.1 resolution: "terser@npm:4.8.1" dependencies: @@ -36078,7 +36918,7 @@ __metadata: languageName: node linkType: hard -"tiny-invariant@npm:^1.0.6, tiny-invariant@npm:^1.2.0": +"tiny-invariant@npm:^1.0.6, tiny-invariant@npm:^1.2.0, tiny-invariant@npm:^1.3.1": version: 1.3.1 resolution: "tiny-invariant@npm:1.3.1" checksum: 872dbd1ff20a21303a2fd20ce3a15602cfa7fcf9b228bd694a52e2938224313b5385a1078cb667ed7375d1612194feaca81c4ecbe93121ca1baebe344de4f84c @@ -36128,15 +36968,6 @@ __metadata: languageName: node linkType: hard -"tmp@npm:^0.2.1": - version: 0.2.1 - resolution: "tmp@npm:0.2.1" - dependencies: - rimraf: ^3.0.0 - checksum: 8b1214654182575124498c87ca986ac53dc76ff36e8f0e0b67139a8d221eaecfdec108c0e6ec54d76f49f1f72ab9325500b246f562b926f85bcdfca8bf35df9e - languageName: node - linkType: hard - "tmpl@npm:1.0.5": version: 1.0.5 resolution: "tmpl@npm:1.0.5" @@ -36514,10 +37345,10 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.2.0, tslib@npm:^2.3.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.5.3": - version: 2.5.3 - resolution: "tslib@npm:2.5.3" - checksum: 88902b309afaf83259131c1e13da1dceb0ad1682a213143a1346a649143924d78cf3760c448b84d796938fd76127183894f8d85cbb3bf9c4fddbfcc140c0003c +"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.2.0, tslib@npm:^2.3.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.5.3": + version: 2.6.2 + resolution: "tslib@npm:2.6.2" + checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad languageName: node linkType: hard @@ -36843,6 +37674,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^2.19.0": + version: 2.19.0 + resolution: "type-fest@npm:2.19.0" + checksum: a4ef07ece297c9fba78fc1bd6d85dff4472fe043ede98bd4710d2615d15776902b595abf62bd78339ed6278f021235fb28a96361f8be86ed754f778973a0d278 + languageName: node + linkType: hard + "type-is@npm:1.6.18, type-is@npm:~1.6.18": version: 1.6.18 resolution: "type-is@npm:1.6.18" @@ -37449,6 +38287,21 @@ __metadata: languageName: node linkType: hard +"use-callback-ref@npm:^1.3.0": + version: 1.3.0 + resolution: "use-callback-ref@npm:1.3.0" + dependencies: + tslib: ^2.0.0 + peerDependencies: + "@types/react": ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 7913df383a5a6fcb399212eedefaac2e0c6f843555202d4e3010bac3848afe38ecaa3d0d6500ad1d936fbeffd637e6c517e68edb024af5e6beca7f27f3ce7b21 + languageName: node + linkType: hard + "use-memo-one@npm:^1.1.1": version: 1.1.3 resolution: "use-memo-one@npm:1.1.3" @@ -37458,6 +38311,34 @@ __metadata: languageName: node linkType: hard +"use-resize-observer@npm:^9.1.0": + version: 9.1.0 + resolution: "use-resize-observer@npm:9.1.0" + dependencies: + "@juggle/resize-observer": ^3.3.1 + peerDependencies: + react: 16.8.0 - 18 + react-dom: 16.8.0 - 18 + checksum: 92be0ac34a3b3cf884cd55847c90792b5b44833dc258e96d650152815ad246afe45825aa223332203004d836535a927ab74f18dc0313229e2c7c69510eddf382 + languageName: node + linkType: hard + +"use-sidecar@npm:^1.1.2": + version: 1.1.2 + resolution: "use-sidecar@npm:1.1.2" + dependencies: + detect-node-es: ^1.1.0 + tslib: ^2.0.0 + peerDependencies: + "@types/react": ^16.9.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 925d1922f9853e516eaad526b6fed1be38008073067274f0ecc3f56b17bb8ab63480140dd7c271f94150027c996cea4efe83d3e3525e8f3eda22055f6a39220b + languageName: node + linkType: hard + "use-strict@npm:1.0.1": version: 1.0.1 resolution: "use-strict@npm:1.0.1" @@ -37644,7 +38525,7 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^8.0.0, uuid@npm:^8.3.1, uuid@npm:^8.3.2": +"uuid@npm:^8.0.0, uuid@npm:^8.3.2": version: 8.3.2 resolution: "uuid@npm:8.3.2" bin: @@ -38368,44 +39249,7 @@ __metadata: languageName: node linkType: hard -"webpack@npm:>=4.0.0 <6.0.0, webpack@npm:>=4.43.0 <6.0.0, webpack@npm:^5.9.0": - version: 5.88.0 - resolution: "webpack@npm:5.88.0" - dependencies: - "@types/eslint-scope": ^3.7.3 - "@types/estree": ^1.0.0 - "@webassemblyjs/ast": ^1.11.5 - "@webassemblyjs/wasm-edit": ^1.11.5 - "@webassemblyjs/wasm-parser": ^1.11.5 - acorn: ^8.7.1 - acorn-import-assertions: ^1.9.0 - browserslist: ^4.14.5 - chrome-trace-event: ^1.0.2 - enhanced-resolve: ^5.15.0 - es-module-lexer: ^1.2.1 - eslint-scope: 5.1.1 - events: ^3.2.0 - glob-to-regexp: ^0.4.1 - graceful-fs: ^4.2.9 - json-parse-even-better-errors: ^2.3.1 - loader-runner: ^4.2.0 - mime-types: ^2.1.27 - neo-async: ^2.6.2 - schema-utils: ^3.2.0 - tapable: ^2.1.1 - terser-webpack-plugin: ^5.3.7 - watchpack: ^2.4.0 - webpack-sources: ^3.2.3 - peerDependenciesMeta: - webpack-cli: - optional: true - bin: - webpack: bin/webpack.js - checksum: 9fd1568b34ec2e99ba97c8509a15ab2576ec80c396e7015551ec814b24cfc11de173acba3e114dafe95f1a6d460781b09d6201e6a1fb15110e1d01a09f61a283 - languageName: node - linkType: hard - -"webpack@npm:^5": +"webpack@npm:>=4.0.0 <6.0.0, webpack@npm:>=4.43.0 <6.0.0, webpack@npm:^5, webpack@npm:^5.9.0": version: 5.88.2 resolution: "webpack@npm:5.88.2" dependencies: @@ -38554,6 +39398,18 @@ __metadata: languageName: node linkType: hard +"which-collection@npm:^1.0.1": + version: 1.0.1 + resolution: "which-collection@npm:1.0.1" + dependencies: + is-map: ^2.0.1 + is-set: ^2.0.1 + is-weakmap: ^2.0.1 + is-weakset: ^2.0.1 + checksum: c815bbd163107ef9cb84f135e6f34453eaf4cca994e7ba85ddb0d27cea724c623fae2a473ceccfd5549c53cc65a5d82692de418166df3f858e1e5dc60818581c + languageName: node + linkType: hard + "which-module@npm:^2.0.0": version: 2.0.0 resolution: "which-module@npm:2.0.0" @@ -38578,17 +39434,16 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.2": - version: 1.1.7 - resolution: "which-typed-array@npm:1.1.7" +"which-typed-array@npm:^1.1.11, which-typed-array@npm:^1.1.2, which-typed-array@npm:^1.1.9": + version: 1.1.11 + resolution: "which-typed-array@npm:1.1.11" dependencies: available-typed-arrays: ^1.0.5 call-bind: ^1.0.2 - es-abstract: ^1.18.5 - foreach: ^2.0.5 + for-each: ^0.3.3 + gopd: ^1.0.1 has-tostringtag: ^1.0.0 - is-typed-array: ^1.1.7 - checksum: 147837cf5866e36b6b2e427731709e02f79f1578477cbde68ed773a5307520a6cb6836c73c79c30690a473266ee59010b83b6d9b25d8d677a40ff77fb37a8a84 + checksum: 711ffc8ef891ca6597b19539075ec3e08bb9b4c2ca1f78887e3c07a977ab91ac1421940505a197758fb5939aa9524976d0a5bbcac34d07ed6faa75cedbb17206 languageName: node linkType: hard @@ -38819,22 +39674,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^7.0.0, ws@npm:^7.4.6": - version: 7.5.7 - resolution: "ws@npm:7.5.7" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: 5c1f669a166fb57560b4e07f201375137fa31d9186afde78b1508926345ce546332f109081574ddc4e38cc474c5406b5fc71c18d71eb75f6e2d2245576976cba - languageName: node - linkType: hard - -"ws@npm:^7.3.1": +"ws@npm:^7.0.0, ws@npm:^7.3.1, ws@npm:^7.4.6": version: 7.5.9 resolution: "ws@npm:7.5.9" peerDependencies: @@ -39180,7 +40020,7 @@ __metadata: languageName: node linkType: hard -"yauzl@npm:^2.10.0, yauzl@npm:^2.4.2": +"yauzl@npm:^2.4.2": version: 2.10.0 resolution: "yauzl@npm:2.10.0" dependencies: