From d35778d93ff569148c131971bd5020378cab3336 Mon Sep 17 00:00:00 2001 From: Leonel Gobbi <57540576+lgobbi-atix@users.noreply.github.com> Date: Wed, 11 Oct 2023 04:08:51 -0300 Subject: [PATCH 01/22] chore/Bump cardano-js-sdk (#559) * chore!: bump cardano-js-sdk packages to latest versions * ci: add cardano services urls parameters to build step * Feat/sanchonet network switch support (#612) * feat: update env to support switching to sanchonet * chore: remove old testnet * chore: bump cardano-sdk packages to latest version --------- Co-authored-by: mirceahasegan <105701265+mirceahasegan@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- .github/workflows/e2e-tests-linux.yml | 3 +++ .github/workflows/smoke-tests.yml | 3 +++ apps/browser-extension-wallet/.env.defaults | 8 ++++++-- apps/browser-extension-wallet/.env.example | 9 +++++++-- apps/browser-extension-wallet/src/config.ts | 16 ++++++++++++---- .../src/features/ada-handle/config.ts | 6 ++++-- .../context/AddressBookProvider.tsx | 3 ++- .../__tests__/useDelegationDetails.test.ts | 2 +- .../lib/scripts/migrations/versions/v0_6_0.ts | 6 ++++++ .../src/lib/translations/en.json | 2 +- .../slices/__tests__/wallet-info-slice.test.ts | 2 +- .../src/utils/__tests__/chain.test.ts | 6 ++++-- .../src/utils/chain.ts | 3 +++ .../src/utils/mocks/test-helpers.tsx | 3 ++- .../settings/components/NetworkChoice.tsx | 18 ++++++++++++------ .../test/__mocks__/set-env-vars.js | 5 +++-- apps/browser-extension-wallet/webpack-utils.js | 4 ++-- packages/cardano/src/wallet/types.ts | 4 ++-- packages/common/src/analytics/types.ts | 2 ++ yarn.lock | 6 +++--- 21 files changed, 80 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7aa405e07..69d830848 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: run: yarn lint - name: Run unit tests, generate test coverage report env: - AVAILABLE_CHAINS: 'Preprod,Preview,Mainnet' + AVAILABLE_CHAINS: 'Preprod,Preview,Mainnet,Sanchonet' DEFAULT_CHAIN: 'Preprod' run: yarn test:coverage --maxWorkers=2 - name: Upload build diff --git a/.github/workflows/e2e-tests-linux.yml b/.github/workflows/e2e-tests-linux.yml index 71eec19cf..b3066bb63 100644 --- a/.github/workflows/e2e-tests-linux.yml +++ b/.github/workflows/e2e-tests-linux.yml @@ -50,6 +50,9 @@ jobs: uses: ./.github/shared/build with: LACE_EXTENSION_KEY: ${{ secrets.MANIFEST_PUBLIC_KEY }} + CARDANO_SERVICES_URL_MAINNET: ${{ secrets.CARDANO_SERVICES_URL_MAINNET }} + CARDANO_SERVICES_URL_PREPROD: ${{ secrets.CARDANO_SERVICES_URL_PREPROD }} + CARDANO_SERVICES_URL_PREVIEW: ${{ secrets.CARDANO_SERVICES_URL_PREVIEW }} - name: Start XVFB run: | Xvfb :99 & diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 5c2526ad4..25d988c04 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -26,6 +26,9 @@ jobs: uses: ./.github/shared/build with: LACE_EXTENSION_KEY: ${{ secrets.MANIFEST_PUBLIC_KEY }} + CARDANO_SERVICES_URL_MAINNET: ${{ secrets.CARDANO_SERVICES_URL_MAINNET }} + CARDANO_SERVICES_URL_PREPROD: ${{ secrets.CARDANO_SERVICES_URL_PREPROD }} + CARDANO_SERVICES_URL_PREVIEW: ${{ secrets.CARDANO_SERVICES_URL_PREVIEW }} - name: Start XVFB run: | Xvfb :99 & diff --git a/apps/browser-extension-wallet/.env.defaults b/apps/browser-extension-wallet/.env.defaults index fded3830d..a13fed41e 100644 --- a/apps/browser-extension-wallet/.env.defaults +++ b/apps/browser-extension-wallet/.env.defaults @@ -4,7 +4,7 @@ DEFAULT_CHAIN=Mainnet WALLET_SYNC_TIMEOUT_IN_SEC=60 WALLET_INTERVAL_IN_SEC=30 DROP_CONSOLE_IN_PRODUCTION=false -AVAILABLE_CHAINS=Preprod,Preview,Mainnet +AVAILABLE_CHAINS=Preprod,Preview,Mainnet,Sanchonet ADA_PRICE_POLLING_IN_SEC=60 TOKEN_PRICE_POLLING_IN_SEC=300 SAVED_PRICE_DURATION_IN_MINUTES=720 @@ -60,17 +60,21 @@ POSTHOG_DEV_TOKEN_PREVIEW=phc_e8SaOOWpXpNE59TnpLumeUjWm4iv024AWjhQqU406jr CARDANO_SERVICES_URL_MAINNET=https://backend.live-mainnet.eks.lw.iog.io CARDANO_SERVICES_URL_PREPROD=https://backend.live-preprod.eks.lw.iog.io CARDANO_SERVICES_URL_PREVIEW=https://backend.live-preview.eks.lw.iog.io +# TODO: update this with a valid sanchonet url +CARDANO_SERVICES_URL_SANCHONET=https://backend.live-preprod.eks.lw.iog.io # Explorer URLs CEXPLORER_URL_MAINNET=https://cexplorer.io CEXPLORER_URL_PREVIEW=https://preview.cexplorer.io CEXPLORER_URL_PREPROD=https://preprod.cexplorer.io -CEXPLORER_URL_SANCHONET=https://sanchonet.cexplorer.io +CEXPLORER_URL_SANCHONET= # ADA Handle URLs ADA_HANDLE_URL_MAINNET=https://api.handle.me ADA_HANDLE_URL_PREVIEW=https://preview.api.handle.me ADA_HANDLE_URL_PREPROD=https://preprod.api.handle.me +# TODO: update this with a valid sanchonet url +ADA_HANDLE_URL_SANCHONET=https://preprod.api.handle.me # Manifest.json LACE_EXTENSION_KEY=gafhhkghbfjjkeiendhlofajokpaflmk diff --git a/apps/browser-extension-wallet/.env.example b/apps/browser-extension-wallet/.env.example index f3897cd23..3af21b976 100644 --- a/apps/browser-extension-wallet/.env.example +++ b/apps/browser-extension-wallet/.env.example @@ -4,7 +4,7 @@ DEFAULT_CHAIN=Mainnet WALLET_SYNC_TIMEOUT_IN_SEC=60 WALLET_INTERVAL_IN_SEC=30 DROP_CONSOLE_IN_PRODUCTION=false -AVAILABLE_CHAINS=Preprod,Preview,Mainnet +AVAILABLE_CHAINS=Preprod,Preview,Mainnet,Sanchonet ADA_PRICE_POLLING_IN_SEC=60 TOKEN_PRICE_POLLING_IN_SEC=300 SAVED_PRICE_DURATION_IN_MINUTES=720 @@ -61,17 +61,22 @@ POSTHOG_DEV_TOKEN_PREVIEW=dev-preview-token CARDANO_SERVICES_URL_MAINNET=https://backend.live-mainnet.eks.lw.iog.io CARDANO_SERVICES_URL_PREPROD=https://backend.live-preprod.eks.lw.iog.io CARDANO_SERVICES_URL_PREVIEW=https://backend.live-preview.eks.lw.iog.io +# TODO: update this with a valid sanchonet url +CARDANO_SERVICES_URL_SANCHONET=https://backend.live-preprod.eks.lw.iog.io # Explorer URLs CEXPLORER_URL_MAINNET=https://cexplorer.io CEXPLORER_URL_PREVIEW=https://preview.cexplorer.io CEXPLORER_URL_PREPROD=https://preprod.cexplorer.io -CEXPLORER_URL_TESTNET=https://testnet.cexplorer.io +# TODO: update this with a valid sanchonet cexplorer +CEXPLORER_URL_SANCHONET=https://preprod.cexplorer.io # ADA Handle URLs ADA_HANDLE_URL_MAINNET=https://api.handle.me ADA_HANDLE_URL_PREVIEW=https://preview.api.handle.me ADA_HANDLE_URL_PREPROD=https://preprod.api.handle.me +# TODO: update this with a valid sanchonet url +ADA_HANDLE_URL_SANCHONET=https://preprod.api.handle.me # Manifest.json LACE_EXTENSION_KEY=gafhhkghbfjjkeiendhlofajokpaflmk diff --git a/apps/browser-extension-wallet/src/config.ts b/apps/browser-extension-wallet/src/config.ts index 99906fed8..45cbd5346 100644 --- a/apps/browser-extension-wallet/src/config.ts +++ b/apps/browser-extension-wallet/src/config.ts @@ -32,12 +32,18 @@ const envChecks = (chosenChain: Wallet.ChainName): void => { if ( !process.env.CARDANO_SERVICES_URL_MAINNET || !process.env.CARDANO_SERVICES_URL_PREPROD || - !process.env.CARDANO_SERVICES_URL_PREVIEW + !process.env.CARDANO_SERVICES_URL_PREVIEW || + !process.env.CARDANO_SERVICES_URL_SANCHONET ) { throw new Error('env vars not complete'); } - if (!process.env.CEXPLORER_URL_MAINNET || !process.env.CEXPLORER_URL_PREVIEW || !process.env.CEXPLORER_URL_PREPROD) { + if ( + !process.env.CEXPLORER_URL_MAINNET || + !process.env.CEXPLORER_URL_PREVIEW || + !process.env.CEXPLORER_URL_PREPROD || + !process.env.CEXPLORER_URL_SANCHONET + ) { throw new Error('explorer vars not complete'); } @@ -78,12 +84,14 @@ export const config = (): Config => { CARDANO_SERVICES_URLS: { Mainnet: process.env.CARDANO_SERVICES_URL_MAINNET, Preprod: process.env.CARDANO_SERVICES_URL_PREPROD, - Preview: process.env.CARDANO_SERVICES_URL_PREVIEW + Preview: process.env.CARDANO_SERVICES_URL_PREVIEW, + Sanchonet: process.env.CARDANO_SERVICES_URL_SANCHONET }, CEXPLORER_BASE_URL: { Mainnet: `${process.env.CEXPLORER_URL_MAINNET}`, Preprod: `${process.env.CEXPLORER_URL_PREPROD}`, - Preview: `${process.env.CEXPLORER_URL_PREVIEW}` + Preview: `${process.env.CEXPLORER_URL_PREVIEW}`, + Sanchonet: `${process.env.CEXPLORER_URL_SANCHONET}` }, CEXPLORER_URL_PATHS: { Tx: 'tx', diff --git a/apps/browser-extension-wallet/src/features/ada-handle/config.ts b/apps/browser-extension-wallet/src/features/ada-handle/config.ts index 17b0d4af2..0cfabe098 100644 --- a/apps/browser-extension-wallet/src/features/ada-handle/config.ts +++ b/apps/browser-extension-wallet/src/features/ada-handle/config.ts @@ -3,8 +3,10 @@ import { Wallet } from '@lace/cardano'; export const ADA_HANDLE_POLICY_ID = Wallet.ADA_HANDLE_POLICY_ID; export const isAdaHandleEnabled = process.env.USE_ADA_HANDLE === 'true'; -export const HANDLE_SERVER_URLS: Record, string> = { +export const HANDLE_SERVER_URLS: Record = { [Cardano.NetworkMagics.Mainnet]: 'https://api.handle.me', [Cardano.NetworkMagics.Preprod]: 'https://preprod.api.handle.me', - [Cardano.NetworkMagics.Preview]: 'https://preview.api.handle.me' + [Cardano.NetworkMagics.Preview]: 'https://preview.api.handle.me', + // TODO: update once there's a valid sanchonet version available + [Cardano.NetworkMagics.Sanchonet]: 'https://sanchonet.api.handle.me' }; diff --git a/apps/browser-extension-wallet/src/features/address-book/context/AddressBookProvider.tsx b/apps/browser-extension-wallet/src/features/address-book/context/AddressBookProvider.tsx index 65fea4797..c1604d2c9 100644 --- a/apps/browser-extension-wallet/src/features/address-book/context/AddressBookProvider.tsx +++ b/apps/browser-extension-wallet/src/features/address-book/context/AddressBookProvider.tsx @@ -18,7 +18,8 @@ export type AddressRecordParams = Pick { diff --git a/apps/browser-extension-wallet/src/hooks/__tests__/useDelegationDetails.test.ts b/apps/browser-extension-wallet/src/hooks/__tests__/useDelegationDetails.test.ts index 2a20ab0bd..d6e507db6 100644 --- a/apps/browser-extension-wallet/src/hooks/__tests__/useDelegationDetails.test.ts +++ b/apps/browser-extension-wallet/src/hooks/__tests__/useDelegationDetails.test.ts @@ -29,7 +29,7 @@ jest.mock('../../stores', () => ({ })); describe('Testing useBuildDelegation hook', () => { - process.env.AVAILABLE_CHAINS = process.env.AVAILABLE_CHAINS || 'Mainnet,Preprod,Preview'; + process.env.AVAILABLE_CHAINS = process.env.AVAILABLE_CHAINS || 'Mainnet,Preprod,Preview,Sanchonet'; process.env.DEFAULT_CHAIN = process.env.DEFAULT_CHAIN || 'Preprod'; test('should return use delegation details function', () => { diff --git a/apps/browser-extension-wallet/src/lib/scripts/migrations/versions/v0_6_0.ts b/apps/browser-extension-wallet/src/lib/scripts/migrations/versions/v0_6_0.ts index bef5ea99e..cbcfe7444 100644 --- a/apps/browser-extension-wallet/src/lib/scripts/migrations/versions/v0_6_0.ts +++ b/apps/browser-extension-wallet/src/lib/scripts/migrations/versions/v0_6_0.ts @@ -94,6 +94,12 @@ export const v0_6_0: Migration = { ? { keyAgentData: newKeyAgentData } : { keyAgentData: { ...newKeyAgentData, chainId: Wallet.Cardano.ChainIds.Mainnet, knownAddresses: [] } + }, + Sanchonet: + keyAgentStoredChainName === 'Sanchonet' + ? { keyAgentData: newKeyAgentData } + : { + keyAgentData: { ...newKeyAgentData, chainId: Wallet.Cardano.ChainIds.Sanchonet, knownAddresses: [] } } }; diff --git a/apps/browser-extension-wallet/src/lib/translations/en.json b/apps/browser-extension-wallet/src/lib/translations/en.json index c0e1e0f1b..636344952 100644 --- a/apps/browser-extension-wallet/src/lib/translations/en.json +++ b/apps/browser-extension-wallet/src/lib/translations/en.json @@ -121,7 +121,7 @@ "mainnet": "Mainnet", "preprod": "Preprod", "preview": "Preview", - "legacyTestnet": "Legacy Testnet", + "sanchonet": "Sanchonet", "custom": "Custom", "offline": "Offline", "error": "Your internet connection is not working. You can still navigate the wallet based on the latest connection you had.", diff --git a/apps/browser-extension-wallet/src/stores/slices/__tests__/wallet-info-slice.test.ts b/apps/browser-extension-wallet/src/stores/slices/__tests__/wallet-info-slice.test.ts index 43223b673..8b4fe6e4d 100644 --- a/apps/browser-extension-wallet/src/stores/slices/__tests__/wallet-info-slice.test.ts +++ b/apps/browser-extension-wallet/src/stores/slices/__tests__/wallet-info-slice.test.ts @@ -68,7 +68,7 @@ describe('Testing wallet info slice', () => { describe('environment names set correctly', () => { let useWalletInfoHook: UseStore; - process.env.AVAILABLE_CHAINS = process.env.AVAILABLE_CHAINS || 'Mainnet,Preprod,Preview'; + process.env.AVAILABLE_CHAINS = process.env.AVAILABLE_CHAINS || 'Mainnet,Preprod,Preview,Sanchonet'; beforeEach(() => { useWalletInfoHook = create(mockWalletInfoStore); diff --git a/apps/browser-extension-wallet/src/utils/__tests__/chain.test.ts b/apps/browser-extension-wallet/src/utils/__tests__/chain.test.ts index fdbe1e951..a2fd7e754 100644 --- a/apps/browser-extension-wallet/src/utils/__tests__/chain.test.ts +++ b/apps/browser-extension-wallet/src/utils/__tests__/chain.test.ts @@ -9,7 +9,8 @@ describe('Testing getBaseUrlForChain function', () => { const CARDANO_SERVICES_URLS = { Mainnet: 'Mainnet', Preprod: 'Preprod', - Preview: 'Preview' + Preview: 'Preview', + Sanchonet: 'Sanchonet' }; beforeEach(() => { @@ -22,12 +23,13 @@ describe('Testing getBaseUrlForChain function', () => { }); test('should return proper url for chainName or throw', async () => { process.env.USE_DEV_ENDPOINTS = 'true'; - const AVAILABLE_CHAINS = ['Mainnet', 'Preprod', 'Preview'] as unknown as Wallet.ChainName[]; + const AVAILABLE_CHAINS = ['Mainnet', 'Preprod', 'Preview', 'Sanchonet'] as unknown as Wallet.ChainName[]; jest.spyOn(config, 'config').mockReturnValue({ CARDANO_SERVICES_URLS, AVAILABLE_CHAINS } as config.Config); expect(getBaseUrlForChain('Mainnet')).toBe(CARDANO_SERVICES_URLS.Mainnet); expect(getBaseUrlForChain('Preprod')).toBe(CARDANO_SERVICES_URLS.Preprod); expect(getBaseUrlForChain('Preview')).toBe(CARDANO_SERVICES_URLS.Preview); + expect(getBaseUrlForChain('Sanchonet')).toBe(CARDANO_SERVICES_URLS.Sanchonet); }); test('should throw in case chain is not suported', async () => { diff --git a/apps/browser-extension-wallet/src/utils/chain.ts b/apps/browser-extension-wallet/src/utils/chain.ts index 87d68ea4f..f8077af81 100644 --- a/apps/browser-extension-wallet/src/utils/chain.ts +++ b/apps/browser-extension-wallet/src/utils/chain.ts @@ -14,6 +14,9 @@ export const getBaseUrlForChain = (chainName: Wallet.ChainName): string => { case 'Preview': url = CARDANO_SERVICES_URLS.Preview; break; + case 'Sanchonet': + url = CARDANO_SERVICES_URLS.Sanchonet; + break; default: throw new Error('Incorrect chain supplied'); } diff --git a/apps/browser-extension-wallet/src/utils/mocks/test-helpers.tsx b/apps/browser-extension-wallet/src/utils/mocks/test-helpers.tsx index 3985b40bf..2e5c48761 100644 --- a/apps/browser-extension-wallet/src/utils/mocks/test-helpers.tsx +++ b/apps/browser-extension-wallet/src/utils/mocks/test-helpers.tsx @@ -43,7 +43,8 @@ export const mockKeyAgentDataTestnet: Wallet.KeyManagement.SerializableKeyAgentD export const mockKeyAgentsByChain: Wallet.KeyAgentsByChain = { Mainnet: { keyAgentData: { ...mockKeyAgentDataTestnet, chainId: Wallet.Cardano.ChainIds.Mainnet } }, Preprod: { keyAgentData: { ...mockKeyAgentDataTestnet, chainId: Wallet.Cardano.ChainIds.Preprod } }, - Preview: { keyAgentData: { ...mockKeyAgentDataTestnet, chainId: Wallet.Cardano.ChainIds.Preview } } + Preview: { keyAgentData: { ...mockKeyAgentDataTestnet, chainId: Wallet.Cardano.ChainIds.Preview } }, + Sanchonet: { keyAgentData: { ...mockKeyAgentDataTestnet, chainId: Wallet.Cardano.ChainIds.Sanchonet } } }; export const mockInMemoryWallet = { diff --git a/apps/browser-extension-wallet/src/views/browser-view/features/settings/components/NetworkChoice.tsx b/apps/browser-extension-wallet/src/views/browser-view/features/settings/components/NetworkChoice.tsx index 288e5e6d4..6f73351f8 100644 --- a/apps/browser-extension-wallet/src/views/browser-view/features/settings/components/NetworkChoice.tsx +++ b/apps/browser-extension-wallet/src/views/browser-view/features/settings/components/NetworkChoice.tsx @@ -17,23 +17,27 @@ const { AVAILABLE_CHAINS } = config(); type networkEventSettings = | PostHogAction.SettingsNetworkPreviewClick | PostHogAction.SettingsNetworkPreprodClick - | PostHogAction.SettingsNetworkMainnetClick; + | PostHogAction.SettingsNetworkMainnetClick + | PostHogAction.SettingsNetworkSanchonetClick; type networkEventUserWalletProfile = | PostHogAction.UserWalletProfileNetworkPreviewClick | PostHogAction.UserWalletProfileNetworkPreprodClick - | PostHogAction.UserWalletProfileNetworkMainnetClick; + | PostHogAction.UserWalletProfileNetworkMainnetClick + | PostHogAction.UserWalletProfileNetworkSanchonetClick; -const settingsEventByNetworkName: Partial> = { +const settingsEventByNetworkName: Record = { Mainnet: PostHogAction.SettingsNetworkMainnetClick, Preprod: PostHogAction.SettingsNetworkPreprodClick, - Preview: PostHogAction.SettingsNetworkPreviewClick + Preview: PostHogAction.SettingsNetworkPreviewClick, + Sanchonet: PostHogAction.SettingsNetworkSanchonetClick }; -const walletProfileEventByNetworkName: Partial> = { +const walletProfileEventByNetworkName: Record = { Mainnet: PostHogAction.UserWalletProfileNetworkMainnetClick, Preprod: PostHogAction.UserWalletProfileNetworkPreprodClick, - Preview: PostHogAction.UserWalletProfileNetworkPreviewClick + Preview: PostHogAction.UserWalletProfileNetworkPreviewClick, + Sanchonet: PostHogAction.UserWalletProfileNetworkSanchonetClick }; export const NetworkChoice = ({ section }: { section?: 'settings' | 'wallet-profile' }): React.ReactElement => { @@ -51,6 +55,8 @@ export const NetworkChoice = ({ section }: { section?: 'settings' | 'wallet-prof return t('general.networks.preprod'); case 'Preview': return t('general.networks.preview'); + case 'Sanchonet': + return t('general.networks.sanchonet'); default: return ''; } diff --git a/apps/browser-extension-wallet/test/__mocks__/set-env-vars.js b/apps/browser-extension-wallet/test/__mocks__/set-env-vars.js index ca04f6597..a28abab98 100644 --- a/apps/browser-extension-wallet/test/__mocks__/set-env-vars.js +++ b/apps/browser-extension-wallet/test/__mocks__/set-env-vars.js @@ -1,11 +1,12 @@ process.env.CARDANO_SERVICES_URL_PREVIEW = 'https://preview-prod.com'; process.env.CARDANO_SERVICES_URL_PREPROD = 'https://preprod-prod.com'; process.env.CARDANO_SERVICES_URL_MAINNET = 'https://mainnet-url.com'; -process.env.AVAILABLE_CHAINS = 'Preprod,Preview,Mainnet'; +process.env.CARDANO_SERVICES_URL_SANCHONET = 'https://sanchonet-url.com'; +process.env.AVAILABLE_CHAINS = 'Preprod,Preview,Mainnet,Sanchonet'; process.env.CEXPLORER_URL_MAINNET = 'https://cexplorer.io'; process.env.CEXPLORER_URL_PREVIEW = 'https://preview.cexplorer.io'; process.env.CEXPLORER_URL_PREPROD = 'https://preprod.cexplorer.io'; -process.env.CEXPLORER_URL_TESTNET = 'https://testnet.cexplorer.io'; +process.env.CEXPLORER_URL_SANCHONET = 'https://sanchonet.cexplorer.io'; process.env.USE_HIDE_MY_BALANCE = 'true'; process.env.USE_POSTHOG_ANALYTICS = 'true'; process.env.USE_POSTHOG_ANALYTICS_FOR_OPTED_OUT = 'false'; diff --git a/apps/browser-extension-wallet/webpack-utils.js b/apps/browser-extension-wallet/webpack-utils.js index 6e1747731..a84c27cc2 100644 --- a/apps/browser-extension-wallet/webpack-utils.js +++ b/apps/browser-extension-wallet/webpack-utils.js @@ -9,11 +9,11 @@ const transformManifest = (content, mode) => { manifest.content_security_policy.extension_pages = manifest.content_security_policy.extension_pages .replace( '$CARDANO_SERVICES_URLS', - `${process.env.CARDANO_SERVICES_URL_MAINNET} ${process.env.CARDANO_SERVICES_URL_PREPROD} ${process.env.CARDANO_SERVICES_URL_PREVIEW}` + `${process.env.CARDANO_SERVICES_URL_MAINNET} ${process.env.CARDANO_SERVICES_URL_PREPROD} ${process.env.CARDANO_SERVICES_URL_PREVIEW} ${process.env.CARDANO_SERVICES_URL_SANCHONET}` ) .replace( '$ADA_HANDLE_URLS', - `${process.env.ADA_HANDLE_URL_MAINNET} ${process.env.ADA_HANDLE_URL_PREPROD} ${process.env.ADA_HANDLE_URL_PREVIEW}` + `${process.env.ADA_HANDLE_URL_MAINNET} ${process.env.ADA_HANDLE_URL_PREPROD} ${process.env.ADA_HANDLE_URL_PREVIEW} ${process.env.ADA_HANDLE_URL_SANCHONET}` ) .replace('$LOCALHOST_DEFAULT_SRC', mode === 'development' ? 'http://localhost:3000' : '') .replace('$LOCALHOST_SCRIPT_SRC', mode === 'development' ? 'http://localhost:3000' : '') diff --git a/packages/cardano/src/wallet/types.ts b/packages/cardano/src/wallet/types.ts index 75707709d..4e9fda7b3 100644 --- a/packages/cardano/src/wallet/types.ts +++ b/packages/cardano/src/wallet/types.ts @@ -46,8 +46,8 @@ export type Cip30SignTxAssetItem = { export enum WalletManagerProviderTypes { CARDANO_SERVICES_PROVIDER = 'cardano-services-provider' } -// Exclude Sanchonet until in main branch -export type ChainName = keyof Omit; + +export type ChainName = keyof typeof Cardano.ChainIds; export interface CreateHardwareWalletArgs { deviceConnection: DeviceConnection; diff --git a/packages/common/src/analytics/types.ts b/packages/common/src/analytics/types.ts index e0cac05cd..ae5a741c2 100644 --- a/packages/common/src/analytics/types.ts +++ b/packages/common/src/analytics/types.ts @@ -134,6 +134,7 @@ export enum PostHogAction { SettingsNetworkPreviewClick = 'settings | network | preview | click', SettingsNetworkPreprodClick = 'settings | network | preprod | click', SettingsNetworkMainnetClick = 'settings | network | mainnet | click', + SettingsNetworkSanchonetClick = 'settings | network | sanchonet | click', SettingsNetworkXClick = 'settings | network | x | click', SettingsAuthorizedDappsClick = 'settings | authorized dapps | click', SettingsAuthorizedDappsTrashBinIconClick = 'settings | authorized dapps | trash bin icon | click', @@ -181,6 +182,7 @@ export enum PostHogAction { UserWalletProfileNetworkPreviewClick = 'user/wallet profile | network | preview | click', UserWalletProfileNetworkPreprodClick = 'user/wallet profile | network | preprod | click', UserWalletProfileNetworkMainnetClick = 'user/wallet profile | network | mainnet | click', + UserWalletProfileNetworkSanchonetClick = 'user/wallet profile | network | sanchonet | click', UserWalletProfileLockWalletClick = 'user/wallet profile | lock wallet | click', // Lace Logo WalletLaceClick = 'wallet | lace | click', diff --git a/yarn.lock b/yarn.lock index 89c685363..7e8167c66 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6135,9 +6135,9 @@ __metadata: linkType: hard "@dcspark/cardano-multiplatform-lib-nodejs@npm:^3.1.1": - version: 3.1.1 - resolution: "@dcspark/cardano-multiplatform-lib-nodejs@npm:3.1.1" - checksum: e408d338fe199a29f0901364b77d284cc9455c0adc9041aadd8932b068a929040fda823a07eb80e5ca0df1396f148295cea3ea089de75339649141b23bdc00e3 + version: 3.1.2 + resolution: "@dcspark/cardano-multiplatform-lib-nodejs@npm:3.1.2" + checksum: b9afbe180758b8b564b2413b052d03f5225884d2425c23a33c8a65275c0a22de80f5a3e9ddda52a8e6a18072f7f898b5575aab70295e5216c3d3ae5e4c2daab0 languageName: node linkType: hard From 7914ecfc731c32125de428c126e26f343a9deeac Mon Sep 17 00:00:00 2001 From: Lucas Date: Tue, 24 Oct 2023 13:10:36 -0300 Subject: [PATCH 02/22] [LW-7983] [LW-7984] dRep confirmation screens (#554) * refactor: move logic out of component * fix: file path * feat(core): setup storybook * refactor(ui): extract insufficient funds warning component * feat(core): add lace/ui package * feat(core): create ConfirmDRepRegistration component * feat(extension): install @lace/ui * refactor: move functions to utils * fix: type * refactor: types file * feat: check for DRep transaction * feat: integrate confirm drep registration component * refactor(core): use Metadata component * refactor(core): use flexbox * refactor(core): remove insufficient funds message * refactor(core): create ConfirmDRepRetirement * refactor: remove insufficient funds warning; break down main component * feat: add certificate data * feat: add drep retirement container * fix: condition * fix: type * fix: style * fix: check for anchor * fix: check for undefined certificates * fix: merge conflict * fix: type error * feat: temp env changes * feat(extension): use consistent naming of DRep ID * feat(extension): show anchor metadata if exists * feat(extension): convert user facing DRepID to bech32 * fix: add cardano symbol to deposit amount * chore(core): downgrade storybook to v6 * fix: update lock file * fix: styles and text * fix: storybook build * fix: storybook build * feat: check retired drep key * fix: check retired drep key --------- Co-authored-by: Renan Ferreira Co-authored-by: Michael Chappell <7581002+mchappell@users.noreply.github.com> --- .github/workflows/e2e-tests-linux.yml | 6 +- .github/workflows/smoke-tests.yml | 6 +- apps/browser-extension-wallet/package.json | 1 + .../src/dapp-connector.tsx | 5 +- .../__tests__/ConfirmTransaction.test.tsx | 2 +- .../ConfirmDRepRegistrationContainer.tsx | 46 + .../ConfirmDRepRetirementContainer.tsx | 47 + .../ConfirmTransaction.module.scss | 6 +- .../ConfirmTransaction.tsx | 71 + .../ConfirmTransactionContent.tsx | 27 + .../DappTransactionContainer.tsx | 59 + .../components/confirm-transaction/hooks.ts | 175 + .../components/confirm-transaction/types.ts | 5 + .../components/confirm-transaction/utils.ts | 144 + .../src/features/dapp/config/ViewsConfig.tsx | 2 +- .../src/lib/translations/en.json | 16 + .../src/providers/UIThemeProvider/context.tsx | 17 + .../src/providers/UIThemeProvider/index.ts | 1 + packages/core/.babelrc.json | 18 + packages/core/.storybook/main.js | 51 + packages/core/.storybook/preview-head.html | 6 + packages/core/.storybook/preview.js | 26 + packages/core/.storybook/theme.scss | 36 + packages/core/package.json | 22 + packages/core/src/index.ts | 2 + .../ConfirmDRepRegistration.stories.ts | 50 + .../ConfirmDRepRegistration.tsx | 57 + .../ConfirmDRepRegistration/index.ts | 1 + .../ConfirmDRepRetirement.stories.ts | 46 + .../ConfirmDRepRetirement.tsx | 44 + .../components/ConfirmDRepRetirement/index.ts | 1 + .../DappTransaction.stories.ts | 60 + .../InsufficientFundsWarning.module.scss | 23 + .../InsufficientFundsWarning.tsx | 15 + .../InsufficientFundsWarning/index.ts | 1 + yarn.lock | 3241 ++++++++++++++++- 36 files changed, 4238 insertions(+), 98 deletions(-) create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepRegistrationContainer.tsx create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepRetirementContainer.tsx rename apps/browser-extension-wallet/src/features/dapp/components/{ => confirm-transaction}/ConfirmTransaction.module.scss (73%) create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.tsx create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransactionContent.tsx create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/DappTransactionContainer.tsx create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/hooks.ts create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/types.ts create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts create mode 100644 apps/browser-extension-wallet/src/providers/UIThemeProvider/context.tsx create mode 100644 apps/browser-extension-wallet/src/providers/UIThemeProvider/index.ts create mode 100644 packages/core/.babelrc.json create mode 100644 packages/core/.storybook/main.js create mode 100644 packages/core/.storybook/preview-head.html create mode 100644 packages/core/.storybook/preview.js create mode 100644 packages/core/.storybook/theme.scss create mode 100644 packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.stories.ts create mode 100644 packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.tsx create mode 100644 packages/core/src/ui/components/ConfirmDRepRegistration/index.ts create mode 100644 packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.stories.ts create mode 100644 packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.tsx create mode 100644 packages/core/src/ui/components/ConfirmDRepRetirement/index.ts create mode 100644 packages/core/src/ui/components/DappTransaction/DappTransaction.stories.ts create mode 100644 packages/core/src/ui/components/InsufficientFundsWarning/InsufficientFundsWarning.module.scss create mode 100644 packages/core/src/ui/components/InsufficientFundsWarning/InsufficientFundsWarning.tsx create mode 100644 packages/core/src/ui/components/InsufficientFundsWarning/index.ts diff --git a/.github/workflows/e2e-tests-linux.yml b/.github/workflows/e2e-tests-linux.yml index b3066bb63..47f32d5fc 100644 --- a/.github/workflows/e2e-tests-linux.yml +++ b/.github/workflows/e2e-tests-linux.yml @@ -50,9 +50,9 @@ jobs: uses: ./.github/shared/build with: LACE_EXTENSION_KEY: ${{ secrets.MANIFEST_PUBLIC_KEY }} - CARDANO_SERVICES_URL_MAINNET: ${{ secrets.CARDANO_SERVICES_URL_MAINNET }} - CARDANO_SERVICES_URL_PREPROD: ${{ secrets.CARDANO_SERVICES_URL_PREPROD }} - CARDANO_SERVICES_URL_PREVIEW: ${{ secrets.CARDANO_SERVICES_URL_PREVIEW }} + CARDANO_SERVICES_URL_MAINNET: ${{ secrets.CARDANO_SERVICES_DEV_URL_MAINNET }} + CARDANO_SERVICES_URL_PREPROD: ${{ secrets.CARDANO_SERVICES_DEV_URL_PREPROD }} + CARDANO_SERVICES_URL_PREVIEW: ${{ secrets.CARDANO_SERVICES_DEV_URL_PREVIEW }} - name: Start XVFB run: | Xvfb :99 & diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 25d988c04..5066293a9 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -26,9 +26,9 @@ jobs: uses: ./.github/shared/build with: LACE_EXTENSION_KEY: ${{ secrets.MANIFEST_PUBLIC_KEY }} - CARDANO_SERVICES_URL_MAINNET: ${{ secrets.CARDANO_SERVICES_URL_MAINNET }} - CARDANO_SERVICES_URL_PREPROD: ${{ secrets.CARDANO_SERVICES_URL_PREPROD }} - CARDANO_SERVICES_URL_PREVIEW: ${{ secrets.CARDANO_SERVICES_URL_PREVIEW }} + CARDANO_SERVICES_URL_MAINNET: ${{ secrets.CARDANO_SERVICES_DEV_URL_MAINNET }} + CARDANO_SERVICES_URL_PREPROD: ${{ secrets.CARDANO_SERVICES_DEV_URL_PREPROD }} + CARDANO_SERVICES_URL_PREVIEW: ${{ secrets.CARDANO_SERVICES_DEV_URL_PREVIEW }} - name: Start XVFB run: | Xvfb :99 & diff --git a/apps/browser-extension-wallet/package.json b/apps/browser-extension-wallet/package.json index a9a4dc5fb..3b931c044 100644 --- a/apps/browser-extension-wallet/package.json +++ b/apps/browser-extension-wallet/package.json @@ -54,6 +54,7 @@ "@lace/common": "0.1.0", "@lace/core": "0.1.0", "@lace/staking": "0.1.0", + "@lace/ui": "^0.1.0", "@react-rxjs/core": "^0.9.8", "@react-rxjs/utils": "^0.9.5", "@vespaiach/axios-fetch-adapter": "^0.3.0", diff --git a/apps/browser-extension-wallet/src/dapp-connector.tsx b/apps/browser-extension-wallet/src/dapp-connector.tsx index a8bbd35db..e9d96606d 100644 --- a/apps/browser-extension-wallet/src/dapp-connector.tsx +++ b/apps/browser-extension-wallet/src/dapp-connector.tsx @@ -14,6 +14,7 @@ import { } from '@providers'; import { HashRouter } from 'react-router-dom'; import { ThemeProvider } from '@providers/ThemeProvider'; +import { UIThemeProvider } from '@providers/UIThemeProvider'; import { BackgroundServiceAPIProvider } from '@providers/BackgroundServiceAPI'; import { APP_MODE_POPUP } from './utils/constants'; import { PostHogClientProvider } from '@providers/PostHogClientProvider'; @@ -34,7 +35,9 @@ const App = (): React.ReactElement => ( - + + + diff --git a/apps/browser-extension-wallet/src/features/dapp/components/__tests__/ConfirmTransaction.test.tsx b/apps/browser-extension-wallet/src/features/dapp/components/__tests__/ConfirmTransaction.test.tsx index c82c6724d..5bf5130d4 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/__tests__/ConfirmTransaction.test.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/__tests__/ConfirmTransaction.test.tsx @@ -9,7 +9,7 @@ const mockConsumeRemoteApi = jest.fn().mockReturnValue({ const mockCreateTxInspector = jest.fn().mockReturnValue(() => ({ minted: [] as any, burned: [] as any })); import * as React from 'react'; import { cleanup, render, waitFor } from '@testing-library/react'; -import { ConfirmTransaction } from '../ConfirmTransaction'; +import { ConfirmTransaction } from '../confirm-transaction/ConfirmTransaction'; import '@testing-library/jest-dom'; import { I18nextProvider } from 'react-i18next'; import { StoreProvider } from '@src/stores'; diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepRegistrationContainer.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepRegistrationContainer.tsx new file mode 100644 index 000000000..f9a32a49c --- /dev/null +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepRegistrationContainer.tsx @@ -0,0 +1,46 @@ +import React from 'react'; +import { useTranslation } from 'react-i18next'; +import { ConfirmDRepRegistration } from '@lace/core'; +import { SignTxData } from './types'; +import { dRepRegistrationInspector, drepIDasBech32FromHash } from './utils'; +import { Wallet } from '@lace/cardano'; +import { useWalletStore } from '@src/stores'; + +interface Props { + signTxData: SignTxData; + errorMessage?: string; +} + +export const ConfirmDRepRegistrationContainer = ({ signTxData, errorMessage }: Props): React.ReactElement => { + const { t } = useTranslation(); + const certificate = dRepRegistrationInspector(signTxData.tx); + const { + walletUI: { cardanoCoin } + } = useWalletStore(); + + const depositPaidWithCardanoSymbol = `${Wallet.util.lovelacesToAdaString(certificate.deposit.toString())} ${ + cardanoCoin.symbol + }`; + + return ( + + ); +}; diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepRetirementContainer.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepRetirementContainer.tsx new file mode 100644 index 000000000..1bb2cb14a --- /dev/null +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepRetirementContainer.tsx @@ -0,0 +1,47 @@ +import React from 'react'; +import { useTranslation } from 'react-i18next'; +import { ConfirmDRepRetirement } from '@lace/core'; +import { SignTxData } from './types'; +import { dRepRetirementInspector, drepIDasBech32FromHash, getOwnRetirementMessageKey } from './utils'; +import { Wallet } from '@lace/cardano'; +import { useWalletStore } from '@src/stores'; +import { useIsOwnPubDRepKey } from './hooks'; + +interface Props { + signTxData: SignTxData; + errorMessage?: string; +} + +export const ConfirmDRepRetirementContainer = ({ signTxData, errorMessage }: Props): React.ReactElement => { + const { t } = useTranslation(); + const certificate = dRepRetirementInspector(signTxData.tx); + const { + walletUI: { cardanoCoin }, + inMemoryWallet + } = useWalletStore(); + + const depositPaidWithCardanoSymbol = `${Wallet.util.lovelacesToAdaString(certificate.deposit.toString())} ${ + cardanoCoin.symbol + }`; + + const isOwnRetirement = useIsOwnPubDRepKey(inMemoryWallet.getPubDRepKey, certificate.dRepCredential.hash); + const ownRetirementMessageKey = getOwnRetirementMessageKey(isOwnRetirement); + + return ( + + ); +}; diff --git a/apps/browser-extension-wallet/src/features/dapp/components/ConfirmTransaction.module.scss b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.module.scss similarity index 73% rename from apps/browser-extension-wallet/src/features/dapp/components/ConfirmTransaction.module.scss rename to apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.module.scss index cfac6eebe..9a02141f0 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/ConfirmTransaction.module.scss +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.module.scss @@ -1,5 +1,5 @@ -@import '../../../../../../packages/common/src/ui/styles/theme.scss'; -@import '../../../../src/styles/rules/flex.scss'; +@import '../../../../../../../packages/common/src/ui/styles/theme.scss'; +@import '../../../../../src/styles/rules/flex.scss'; .actions { display: flex; @@ -20,7 +20,7 @@ gap: size_unit(1); padding: size_unit(2) size_unit(3) size_unit(2) size_unit(3); border-top: 2px solid var(--light-mode-light-grey-plus, var(--dark-mode-mid-grey)); - margin: 0 size_unit(-3) size_unit(-2) size_unit(-3); + margin: size_unit(4) size_unit(-3) size_unit(-2) size_unit(-3); position: sticky; bottom: 0; .actionBtn { diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.tsx new file mode 100644 index 000000000..ee3ce584a --- /dev/null +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.tsx @@ -0,0 +1,71 @@ +import React from 'react'; +import { Button } from '@lace/common'; +import { useTranslation } from 'react-i18next'; +import { Layout } from '../Layout'; +import { useViewsFlowContext } from '@providers/ViewFlowProvider'; +import styles from './ConfirmTransaction.module.scss'; +import { Wallet } from '@lace/cardano'; +import { useWalletStore } from '@stores'; +import { useDisallowSignTx, useSignWithHardwareWallet, useSignTxData, useOnBeforeUnload } from './hooks'; +import { consumeRemoteApi, RemoteApiPropertyType } from '@cardano-sdk/web-extension'; +import { DappDataService } from '@lib/scripts/types'; +import { DAPP_CHANNELS } from '@src/utils/constants'; +import { runtime } from 'webextension-polyfill'; +import { getTitleKey, getTxType } from './utils'; +import { ConfirmTransactionContent } from './ConfirmTransactionContent'; + +const dappDataApi = consumeRemoteApi>( + { + baseChannel: DAPP_CHANNELS.dappData, + properties: { + getSignTxData: RemoteApiPropertyType.MethodReturningPromise + } + }, + { logger: console, runtime } +); + +export const ConfirmTransaction = (): React.ReactElement => { + const { t } = useTranslation(); + const { + utils: { setNextView } + } = useViewsFlowContext(); + const { getKeyAgentType } = useWalletStore(); + const { signTxData, errorMessage } = useSignTxData(dappDataApi.getSignTxData); + const keyAgentType = getKeyAgentType(); + const isUsingHardwareWallet = keyAgentType !== Wallet.KeyManagement.KeyAgentType.InMemory; + const disallowSignTx = useDisallowSignTx(); + const { isConfirmingTx, signWithHardwareWallet } = useSignWithHardwareWallet(); + const txType = signTxData ? getTxType(signTxData.tx) : undefined; + const title = txType ? t(getTitleKey(txType)) : ''; + + useOnBeforeUnload(disallowSignTx); + + return ( + + +
+ + +
+
+ ); +}; diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransactionContent.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransactionContent.tsx new file mode 100644 index 000000000..8cee30714 --- /dev/null +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransactionContent.tsx @@ -0,0 +1,27 @@ +import React from 'react'; +import { Skeleton } from 'antd'; +import { ConfirmDRepRegistrationContainer } from './ConfirmDRepRegistrationContainer'; +import { DappTransactionContainer } from './DappTransactionContainer'; +import { TxType } from './utils'; +import { SignTxData } from './types'; +import { ConfirmDRepRetirementContainer } from './ConfirmDRepRetirementContainer'; + +interface Props { + txType?: TxType; + signTxData?: SignTxData; + errorMessage?: string; +} + +export const ConfirmTransactionContent = ({ txType, signTxData, errorMessage }: Props): React.ReactElement => { + if (!signTxData) { + return ; + } + if (txType === TxType.DRepRegistration) { + return ; + } + if (txType === TxType.DRepRetirement) { + return ; + } + + return ; +}; diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/DappTransactionContainer.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/DappTransactionContainer.tsx new file mode 100644 index 000000000..75b91c441 --- /dev/null +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/DappTransactionContainer.tsx @@ -0,0 +1,59 @@ +import React from 'react'; +import { useObservable } from '@lace/common'; +import { useTranslation } from 'react-i18next'; +import { useWalletStore } from '@stores'; +import { useCreateAssetList, useTxSummary } from './hooks'; +import { Skeleton } from 'antd'; +import { DappTransaction } from '@lace/core'; +import { TokenInfo } from '@src/utils/get-assets-information'; +import { useAddressBookContext, withAddressBookContext } from '@src/features/address-book/context'; +import { AddressListType } from '@src/views/browser-view/features/activity'; +import { SignTxData } from './types'; + +interface Props { + signTxData: SignTxData; + errorMessage?: string; +} + +export const DappTransactionContainer = withAddressBookContext( + ({ signTxData, errorMessage }: Props): React.ReactElement => { + const { t } = useTranslation(); + const { + walletInfo, + inMemoryWallet, + blockchainProvider: { assetProvider } + } = useWalletStore(); + const { list: addressList } = useAddressBookContext() as { list: AddressListType[] }; + const assets = useObservable(inMemoryWallet.assetInfo$); + const createAssetList = useCreateAssetList({ + outputs: signTxData.tx.body.outputs, + assets, + assetProvider + }); + const txSummary = useTxSummary({ + addressList, + createAssetList, + tx: signTxData.tx, + walletInfo + }); + + if (!txSummary) { + return ; + } + + return ( + + ); + } +); diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/hooks.ts b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/hooks.ts new file mode 100644 index 000000000..df53acc89 --- /dev/null +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/hooks.ts @@ -0,0 +1,175 @@ +import { AssetProvider } from '@cardano-sdk/core'; +import { useRedirection } from '@hooks'; +import { Wallet } from '@lace/cardano'; +import { dAppRoutePaths } from '@routes'; +import { CardanoTxOut, WalletInfo } from '@src/types'; +import { TokenInfo, getAssetsInformation } from '@src/utils/get-assets-information'; +import { useCallback, useEffect, useMemo, useState } from 'react'; +import * as HardwareLedger from '@cardano-sdk/hardware-ledger'; +import { TxType, allowSignTx, pubDRepKeyToHash, disallowSignTx, getTransactionAssetsId, getTxType } from './utils'; +import { AddressListType } from '@src/views/browser-view/features/activity'; +import { GetSignTxData, SignTxData } from './types'; + +export const useCreateAssetList = ({ + assets, + outputs, + assetProvider +}: { + assets?: TokenInfo; + outputs?: CardanoTxOut[]; + assetProvider: AssetProvider; +}): ((txAssets: Wallet.Cardano.TokenMap) => Wallet.Cip30SignTxAssetItem[]) => { + const [assetsInfo, setAssetsInfo] = useState(); + const assetIds = useMemo(() => outputs && getTransactionAssetsId(outputs), [outputs]); + + useEffect(() => { + if (assetIds?.length > 0) { + getAssetsInformation(assetIds, assets, { + assetProvider, + extraData: { nftMetadata: true, tokenMetadata: true } + }) + .then((result) => setAssetsInfo(result)) + .catch((error) => { + console.error(error); + }); + } + }, [assetIds, assetProvider, assets]); + + return useCallback( + (txAssets: Wallet.Cardano.TokenMap) => { + if (!assetsInfo) return []; + const assetList: Wallet.Cip30SignTxAssetItem[] = []; + // eslint-disable-next-line unicorn/no-array-for-each + txAssets.forEach(async (value, key) => { + const walletAsset = assets.get(key) || assetsInfo?.get(key); + assetList.push({ + name: walletAsset.name.toString() || key.toString(), + ticker: walletAsset.tokenMetadata?.ticker || walletAsset.nftMetadata?.name, + amount: Wallet.util.calculateAssetBalance(value, walletAsset) + }); + }); + return assetList; + }, + [assets, assetsInfo] + ); +}; +export const useSignTxData = (getSignTxData: GetSignTxData): { signTxData?: SignTxData; errorMessage?: string } => { + const [signTxData, setSignTxData] = useState<{ dappInfo: Wallet.DappInfo; tx: Wallet.Cardano.Tx }>(); + const [errorMessage, setErrorMessage] = useState(); + + useEffect(() => { + getSignTxData() + .then((result) => { + setSignTxData(result); + }) + .catch((error) => { + setErrorMessage(error); + console.error(error); + }); + }, [getSignTxData, setSignTxData, setErrorMessage]); + + return { signTxData, errorMessage }; +}; + +export const useDisallowSignTx = (): ((close?: boolean) => void) => useCallback(disallowSignTx, []); + +export const useAllowSignTx = (): (() => void) => useCallback(allowSignTx, []); + +export const useSignWithHardwareWallet = (): { + signWithHardwareWallet: () => Promise; + isConfirmingTx: boolean; +} => { + const allow = useAllowSignTx(); + const disallow = useDisallowSignTx(); + const redirectToSignFailure = useRedirection>(dAppRoutePaths.dappTxSignFailure); + const [isConfirmingTx, setIsConfirmingTx] = useState(); + const signWithHardwareWallet = async () => { + setIsConfirmingTx(true); + try { + await HardwareLedger.LedgerKeyAgent.establishDeviceConnection(Wallet.KeyManagement.CommunicationType.Web); + allow(); + } catch (error) { + console.error('error', error); + disallow(false); + redirectToSignFailure({}); + } + }; + + return { isConfirmingTx, signWithHardwareWallet }; +}; + +export const useTxSummary = ({ + tx, + addressList, + walletInfo, + createAssetList +}: { + addressList: AddressListType[]; + walletInfo: WalletInfo; + tx: Wallet.Cardano.Tx; + createAssetList: (txAssets: Wallet.Cardano.TokenMap) => Wallet.Cip30SignTxAssetItem[]; +}): Wallet.Cip30SignTxSummary | undefined => + useMemo((): Wallet.Cip30SignTxSummary | undefined => { + const txType = getTxType(tx); + + const addressToNameMap = new Map( + addressList?.map((item: AddressListType) => [item.address, item.name]) + ); + + const externalOutputs = tx.body.outputs.filter((output) => { + if (txType === TxType.Send) { + return walletInfo.addresses.every((addr) => output.address !== addr.address); + } + return true; + }); + + // eslint-disable-next-line unicorn/no-array-reduce + const txSummaryOutputs: Wallet.Cip30SignTxSummary['outputs'] = externalOutputs.reduce((acc, txOut) => { + // Don't show withdrawl tx's etc + if (txOut.address.toString() === walletInfo.addresses[0].address.toString()) return acc; + + return [ + ...acc, + { + coins: Wallet.util.lovelacesToAdaString(txOut.value.coins.toString()), + recipient: addressToNameMap?.get(txOut.address.toString()) || txOut.address.toString(), + ...(txOut.value.assets?.size > 0 && { assets: createAssetList(txOut.value.assets) }) + } + ]; + }, []); + + return { + fee: Wallet.util.lovelacesToAdaString(tx.body.fee.toString()), + outputs: txSummaryOutputs, + type: txType.toString() as 'Send' | 'Mint' | 'Burn' + }; + }, [tx, walletInfo.addresses, createAssetList, addressList]); + +export const useOnBeforeUnload = (callBack: () => void): void => { + useEffect(() => { + window.addEventListener('beforeunload', callBack); + return () => { + window.removeEventListener('beforeunload', callBack); + }; + }, [callBack]); +}; + +export const useIsOwnPubDRepKey = ( + getOwnPubDRepKey: () => Promise, + drepHash: Wallet.Crypto.Hash28ByteBase16 +): boolean => { + const [isOwnDRepKey, setIsOwnDRepKey] = useState(); + + useEffect(() => { + const get = async () => { + const ownPubDRepKey = await getOwnPubDRepKey(); + const ownDRepKeyHash = await pubDRepKeyToHash(ownPubDRepKey); + + setIsOwnDRepKey(drepHash === ownDRepKeyHash); + }; + + get(); + }, [getOwnPubDRepKey, drepHash]); + + return isOwnDRepKey; +}; diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/types.ts b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/types.ts new file mode 100644 index 000000000..b6c1da399 --- /dev/null +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/types.ts @@ -0,0 +1,5 @@ +import { Wallet } from '@lace/cardano'; +import { DappDataService } from '@lib/scripts/types'; + +export type GetSignTxData = DappDataService['getSignTxData']; +export type SignTxData = { dappInfo: Wallet.DappInfo; tx: Wallet.Cardano.Tx }; diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts new file mode 100644 index 000000000..6b6611499 --- /dev/null +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts @@ -0,0 +1,144 @@ +import { Wallet } from '@lace/cardano'; +import { assetsBurnedInspector, assetsMintedInspector, createTxInspector } from '@cardano-sdk/core'; +import { CardanoTxOut } from '@src/types'; +import { RemoteApiPropertyType, exposeApi } from '@cardano-sdk/web-extension'; +import { UserPromptService } from '@lib/scripts/background/services'; +import { DAPP_CHANNELS } from '@src/utils/constants'; +import { runtime } from 'webextension-polyfill'; +import { of } from 'rxjs'; +import { sectionTitle, DAPP_VIEWS } from '../../config'; + +const DAPP_TOAST_DURATION = 50; + +export enum TxType { + Send = 'Send', + Mint = 'Mint', + Burn = 'Burn', + DRepRegistration = 'DRepRegistration', + DRepRetirement = 'DRepRetirement' +} + +export const getTitleKey = (txType: TxType): string => { + if (txType === TxType.DRepRegistration) { + return 'core.drepRegistration.title'; + } + + if (txType === TxType.DRepRetirement) { + return 'core.drepRetirement.title'; + } + + return sectionTitle[DAPP_VIEWS.CONFIRM_TX]; +}; + +export const disallowSignTx = (close = false): void => { + exposeApi>( + { + api$: of({ + async allowSignTx(): Promise { + return Promise.reject(); + } + }), + baseChannel: DAPP_CHANNELS.userPrompt, + properties: { allowSignTx: RemoteApiPropertyType.MethodReturningPromise } + }, + { logger: console, runtime } + ); + close && setTimeout(() => window.close(), DAPP_TOAST_DURATION); +}; + +export const allowSignTx = (): void => { + exposeApi>( + { + api$: of({ + async allowSignTx(): Promise { + return Promise.resolve(true); + } + }), + baseChannel: DAPP_CHANNELS.userPrompt, + properties: { allowSignTx: RemoteApiPropertyType.MethodReturningPromise } + }, + { logger: console, runtime } + ); +}; + +export const getTransactionAssetsId = (outputs: CardanoTxOut[]): Wallet.Cardano.AssetId[] => { + const assetIds: Wallet.Cardano.AssetId[] = []; + const assetMaps = outputs.map((output) => output.value.assets); + for (const asset of assetMaps) { + if (asset) { + for (const id of asset.keys()) { + !assetIds.includes(id) && assetIds.push(id); + } + } + } + return assetIds; +}; + +const isDRepRegistrationCertificate = (type: Wallet.Cardano.CertificateType) => + type === Wallet.Cardano.CertificateType.RegisterDelegateRepresentative; + +const isDRepRetirementCertificate = (type: Wallet.Cardano.CertificateType) => + type === Wallet.Cardano.CertificateType.UnregisterDelegateRepresentative; + +export const dRepRegistrationInspector = ( + tx: Wallet.Cardano.Tx +): Wallet.Cardano.RegisterDelegateRepresentativeCertificate | undefined => + tx?.body?.certificates?.find(({ __typename }) => isDRepRegistrationCertificate(__typename)) as + | Wallet.Cardano.RegisterDelegateRepresentativeCertificate + | undefined; + +export const dRepRetirementInspector = ( + tx: Wallet.Cardano.Tx +): Wallet.Cardano.UnRegisterDelegateRepresentativeCertificate | undefined => + tx?.body?.certificates?.find(({ __typename }) => isDRepRetirementCertificate(__typename)) as + | Wallet.Cardano.UnRegisterDelegateRepresentativeCertificate + | undefined; + +export const getTxType = (tx: Wallet.Cardano.Tx): TxType => { + const inspector = createTxInspector({ + minted: assetsMintedInspector, + burned: assetsBurnedInspector, + dRepRegistration: dRepRegistrationInspector, + dRepRetirement: dRepRetirementInspector + }); + + const { minted, burned, dRepRegistration, dRepRetirement } = inspector(tx as Wallet.Cardano.HydratedTx); + const isMintTransaction = minted.length > 0; + const isBurnTransaction = burned.length > 0; + + if (isMintTransaction) { + return TxType.Mint; + } + + if (isBurnTransaction) { + return TxType.Burn; + } + + if (dRepRegistration) { + return TxType.DRepRegistration; + } + + if (dRepRetirement) { + return TxType.DRepRetirement; + } + + return TxType.Send; +}; + +export const drepIDasBech32FromHash = (value: Wallet.Crypto.Hash28ByteBase16): Wallet.Cardano.DRepID => + Wallet.Cardano.DRepID(Wallet.HexBlob.toTypedBech32('drep', Wallet.HexBlob(value))); + +export const pubDRepKeyToHash = async ( + pubDRepKeyHex: Wallet.Crypto.Ed25519PublicKeyHex +): Promise => { + const pubDRepKey = await Wallet.Crypto.Ed25519PublicKey.fromHex(pubDRepKeyHex); + const drepKeyHex = (await pubDRepKey.hash()).hex(); + return Wallet.Crypto.Hash28ByteBase16.fromEd25519KeyHashHex(drepKeyHex); +}; + +export const getOwnRetirementMessageKey = (isOwnRetirement: boolean | undefined): string => { + if (isOwnRetirement === undefined) { + return ''; + } + return isOwnRetirement ? 'core.drepRetirement.isOwnRetirement' : 'core.drepRetirement.isNotOwnRetirement'; +}; diff --git a/apps/browser-extension-wallet/src/features/dapp/config/ViewsConfig.tsx b/apps/browser-extension-wallet/src/features/dapp/config/ViewsConfig.tsx index 34624df13..dbb0144ef 100644 --- a/apps/browser-extension-wallet/src/features/dapp/config/ViewsConfig.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/config/ViewsConfig.tsx @@ -1,5 +1,5 @@ import { IViewsList } from '../../../types'; -import { ConfirmTransaction } from '../components/ConfirmTransaction'; +import { ConfirmTransaction } from '../components/confirm-transaction/ConfirmTransaction'; import { SignTransaction } from '../components/SignTransaction'; import { DappTransactionFail } from '../components/DappTransactionFail'; import { IViewAction, IViewState } from '../../../providers'; diff --git a/apps/browser-extension-wallet/src/lib/translations/en.json b/apps/browser-extension-wallet/src/lib/translations/en.json index 636344952..3e5590100 100644 --- a/apps/browser-extension-wallet/src/lib/translations/en.json +++ b/apps/browser-extension-wallet/src/lib/translations/en.json @@ -1113,6 +1113,22 @@ "tryingToUseAssetNotInWallet": "This DApp is trying to use token not held in your wallet.", "noCollateral": "Wallet should not be able to sign dapp txs without collateral." }, + "drepRegistration": { + "title": "Confirm DRep Registration", + "metadata": "Metadata", + "url": "URL", + "hash": "Hash", + "drepId": "Drep ID", + "depositPaid": "Deposit paid" + }, + "drepRetirement": { + "title": "Confirm DRep Retirement", + "metadata": "Metadata", + "drepId": "Drep ID", + "depositReturned": "Deposit returned", + "isOwnRetirement": "This is your DRep retirement.", + "isNotOwnRetirement": "The presented DRepID does not match your wallet's DRepID." + }, "destinationAddressInput": { "recipientAddress": "Recipient's address or $handle" }, diff --git a/apps/browser-extension-wallet/src/providers/UIThemeProvider/context.tsx b/apps/browser-extension-wallet/src/providers/UIThemeProvider/context.tsx new file mode 100644 index 000000000..b5a0cdff1 --- /dev/null +++ b/apps/browser-extension-wallet/src/providers/UIThemeProvider/context.tsx @@ -0,0 +1,17 @@ +import React from 'react'; +import { ThemeColorScheme, ThemeProvider } from '@lace/ui'; + +import { useTheme } from '@providers/ThemeProvider'; + +interface Props { + children: React.ReactNode; +} + +export const UIThemeProvider = ({ children }: Props): React.ReactElement => { + const { theme } = useTheme(); + return ( + + {children} + + ); +}; diff --git a/apps/browser-extension-wallet/src/providers/UIThemeProvider/index.ts b/apps/browser-extension-wallet/src/providers/UIThemeProvider/index.ts new file mode 100644 index 000000000..c38e8e821 --- /dev/null +++ b/apps/browser-extension-wallet/src/providers/UIThemeProvider/index.ts @@ -0,0 +1 @@ +export * from './context'; diff --git a/packages/core/.babelrc.json b/packages/core/.babelrc.json new file mode 100644 index 000000000..9164ce7ce --- /dev/null +++ b/packages/core/.babelrc.json @@ -0,0 +1,18 @@ +{ + "sourceType": "unambiguous", + "presets": [ + [ + "@babel/preset-env", + { + "targets": { + "chrome": 100, + "safari": 15, + "firefox": 91 + } + } + ], + "@babel/preset-typescript", + "@babel/preset-react" + ], + "plugins": [] +} diff --git a/packages/core/.storybook/main.js b/packages/core/.storybook/main.js new file mode 100644 index 000000000..0670843c0 --- /dev/null +++ b/packages/core/.storybook/main.js @@ -0,0 +1,51 @@ +module.exports = { + stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], + addons: [ + '@storybook/addon-links', + '@storybook/addon-essentials', + '@storybook/addon-interactions', + 'storybook-addon-pseudo-states', + { + name: '@storybook/addon-styling', + options: { + sass: { + // Require your Sass preprocessor here + implementation: require('sass') + } + } + } + ], + framework: '@storybook/react', + webpackFinal: (config) => { + const fileLoaderRule = config.module.rules.find((rule) => rule.test?.test('.svg')); + fileLoaderRule.exclude = /\.svg$/; + + config.module.rules.push({ + test: /\.svg$/i, + issuer: /\.[jt]sx?$/, + use: [ + { + loader: '@svgr/webpack', + options: { + icon: true, + exportType: 'named' + } + } + ] + }); + + config.resolve.extensions.push('.svg'); + + return config; + }, + core: { + builder: 'webpack5', + options: { + lazyCompilation: true, + fsCache: true + } + }, + features: { + interactionsDebugger: true + } +}; diff --git a/packages/core/.storybook/preview-head.html b/packages/core/.storybook/preview-head.html new file mode 100644 index 000000000..7819a8476 --- /dev/null +++ b/packages/core/.storybook/preview-head.html @@ -0,0 +1,6 @@ + + + + + +Lace UI toolkit diff --git a/packages/core/.storybook/preview.js b/packages/core/.storybook/preview.js new file mode 100644 index 000000000..8a971ba68 --- /dev/null +++ b/packages/core/.storybook/preview.js @@ -0,0 +1,26 @@ +import React from 'react'; +import 'antd/dist/antd.css'; +import 'normalize.css'; +import './theme.scss'; +import { ThemeColorScheme, ThemeProvider } from '@lace/ui'; + +const preview = { + parameters: { + actions: { argTypesRegex: '^on[A-Z].*' }, + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/ + } + } + }, + decorators: [ + (Story) => ( + + + + ) + ] +}; + +export default preview; diff --git a/packages/core/.storybook/theme.scss b/packages/core/.storybook/theme.scss new file mode 100644 index 000000000..853cd9ddd --- /dev/null +++ b/packages/core/.storybook/theme.scss @@ -0,0 +1,36 @@ +@import '../../common/src/ui/styles/abstracts/mixins'; +@import '../../common/src/ui/styles/themes/dark'; +@import '../../common/src/ui/styles/themes/light'; + +@mixin dark-theme { + /* + in case the theme provider is not being used, this media query allows us to use the theme set on the user system + */ + @media (prefers-color-scheme: dark) { + :root { + @include theme-custom-properties($dark-theme); + } + } + + html[data-theme='dark'] { + @include theme-custom-properties($dark-theme); + } +} + +@mixin light-theme { + /* + in case the theme provider is not being used, this media query allows us to use the theme set on the user system + */ + @media (prefers-color-scheme: light) { + :root { + @include theme-custom-properties($light-theme); + } + } + + html[data-theme='light'] { + @include theme-custom-properties($light-theme); + } +} + +@include dark-theme; +@include light-theme; diff --git a/packages/core/package.json b/packages/core/package.json index a74b1549f..c1a167840 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -27,11 +27,13 @@ ], "scripts": { "build": "run -T rollup -c rollup.config.js", + "build-storybook": "storybook build", "cleanup": "yarn exec rm -rf dist node_modules coverage .rollup.cache src/dist", "lint": "cd ../.. && yarn core:lint", "prepack": "yarn build", "prestart": "yarn build", "start": "node dist/index.js", + "storybook": "NODE_OPTIONS=--openssl-legacy-provider; start-storybook -p 6006", "test": "NODE_ENV=test run -T jest -c ./test/jest.config.js", "test:coverage": "yarn test --coverage", "watch": "yarn build --watch" @@ -39,6 +41,7 @@ "dependencies": { "@ant-design/icons": "^4.7.0", "@lace/common": "0.1.0", + "@lace/ui": "^0.1.0", "antd": "^4.24.10", "axios": "0.21.4", "axios-cache-adapter": "2.7.3", @@ -55,7 +58,26 @@ "zxcvbn": "^4.4.2" }, "devDependencies": { + "@babel/preset-env": "^7.22.20", + "@babel/preset-react": "^7.22.15", + "@babel/preset-typescript": "^7.22.15", + "@storybook/addon-actions": "^6.5.16", + "@storybook/addon-essentials": "^6.5.16", + "@storybook/addon-interactions": "^6.5.16", + "@storybook/addon-links": "^6.5.16", + "@storybook/addon-styling": "^1.3.7", + "@storybook/addon-styling-webpack": "^0.0.5", + "@storybook/builder-webpack5": "6.5.16", + "@storybook/core-events": "^6.5.16", + "@storybook/jest": "^0.0.10", + "@storybook/manager-webpack5": "6.5.16", + "@storybook/react": "^6.5.16", + "@storybook/test-runner": "^0.10.0", + "@storybook/testing-library": "^0.0.13", + "@types/babel__preset-env": "^7", "@types/debounce-promise": "^3.1.6", + "sass": "^1.68.0", + "storybook": "^7.4.3", "typescript": "^4.3.5" }, "peerDependencies": { diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 4aa7bab6a..9b38a4b41 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -28,3 +28,5 @@ export * from '@ui/components/DappTransaction'; export * from '@ui/components/Send/SendTransactionCost'; export * from '@ui/components/MnemonicWordsAutoComplete'; export * from '@ui/components/AddressCard'; +export * from '@ui/components/ConfirmDRepRegistration'; +export * from '@ui/components/ConfirmDRepRetirement'; diff --git a/packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.stories.ts b/packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.stories.ts new file mode 100644 index 000000000..6434e8d54 --- /dev/null +++ b/packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.stories.ts @@ -0,0 +1,50 @@ +import type { Meta, StoryObj } from '@storybook/react'; + +import { ConfirmDRepRegistration } from './ConfirmDRepRegistration'; +import { ComponentProps } from 'react'; + +const meta: Meta = { + title: 'ConfirmDRepRegistration', + component: ConfirmDRepRegistration, + parameters: { + layout: 'centered' + } +}; + +export default meta; +type Story = StoryObj; + +const data: ComponentProps = { + dappInfo: { + logo: 'https://cdn.mint.handle.me/favicon.png', + name: 'Mint', + url: 'https://preprod.mint.handle.me' + }, + translations: { + labels: { + depositPaid: 'Deposit paid', + drepId: 'Drep ID', + hash: 'Hash', + url: 'URL' + }, + metadata: 'Metadata' + }, + metadata: { + depositPaid: '0.35 ADA', + drepId: '65ge6g54g5dd5', + hash: '9bba8233cdd086f0325daba465d568a88970d42536f9e71e92a80d5922ded885', + url: 'https://raw.githubusercontent.com/Ryun1/gov-metadata/main/governace-action/metadata.jsonldr1q99...uqvzlalu' + } +}; + +export const Overview: Story = { + args: { + ...data + } +}; +export const WithError: Story = { + args: { + ...data, + errorMessage: 'Something went wrong' + } +}; diff --git a/packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.tsx b/packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.tsx new file mode 100644 index 000000000..704101505 --- /dev/null +++ b/packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.tsx @@ -0,0 +1,57 @@ +import React from 'react'; +import { Box, Cell, Grid, TransactionSummary, Flex } from '@lace/ui'; +import { DappInfo, DappInfoProps } from '../DappInfo'; +import { ErrorPane } from '@lace/common'; +interface Props { + dappInfo: Omit; + errorMessage?: string; + translations: { + labels: { + url: string; + hash: string; + drepId: string; + depositPaid: string; + }; + metadata: string; + }; + metadata: { + url: string; + hash: string; + drepId: string; + depositPaid: string; + }; +} + +export const ConfirmDRepRegistration = ({ dappInfo, errorMessage, translations, metadata }: Props): JSX.Element => ( + + + + + {errorMessage && ( + + + + )} + + + + + {metadata.url && ( + + + + )} + {metadata.hash && ( + + + + )} + + + + + + + + +); diff --git a/packages/core/src/ui/components/ConfirmDRepRegistration/index.ts b/packages/core/src/ui/components/ConfirmDRepRegistration/index.ts new file mode 100644 index 000000000..cf5bded0e --- /dev/null +++ b/packages/core/src/ui/components/ConfirmDRepRegistration/index.ts @@ -0,0 +1 @@ +export { ConfirmDRepRegistration } from './ConfirmDRepRegistration'; diff --git a/packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.stories.ts b/packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.stories.ts new file mode 100644 index 000000000..6323a43ec --- /dev/null +++ b/packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.stories.ts @@ -0,0 +1,46 @@ +import type { Meta, StoryObj } from '@storybook/react'; + +import { ConfirmDRepRetirement } from './ConfirmDRepRetirement'; +import { ComponentProps } from 'react'; + +const meta: Meta = { + title: 'ConfirmDRepRetirement', + component: ConfirmDRepRetirement, + parameters: { + layout: 'centered' + } +}; + +export default meta; +type Story = StoryObj; + +const data: ComponentProps = { + dappInfo: { + logo: 'https://cdn.mint.handle.me/favicon.png', + name: 'Mint', + url: 'https://preprod.mint.handle.me' + }, + translations: { + labels: { + depositReturned: 'Deposit paid', + drepId: 'Drep ID' + }, + metadata: 'Metadata' + }, + metadata: { + depositReturned: '0.35 ADA', + drepId: '65ge6g54g5dd5' + } +}; + +export const Overview: Story = { + args: { + ...data + } +}; +export const WithError: Story = { + args: { + ...data, + errorMessage: 'Something went wrong' + } +}; diff --git a/packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.tsx b/packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.tsx new file mode 100644 index 000000000..b658e268e --- /dev/null +++ b/packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.tsx @@ -0,0 +1,44 @@ +import React from 'react'; +import { Box, Cell, Grid, TransactionSummary, Flex } from '@lace/ui'; +import { DappInfo, DappInfoProps } from '../DappInfo'; +import { ErrorPane } from '@lace/common'; + +interface Props { + dappInfo: Omit; + errorMessage?: string; + translations: { + labels: { + drepId: string; + depositReturned: string; + }; + metadata: string; + }; + metadata: { + drepId: string; + depositReturned: string; + }; +} + +export const ConfirmDRepRetirement = ({ dappInfo, errorMessage, translations, metadata }: Props): JSX.Element => ( + + + + + {errorMessage && ( + + + + )} + + + + + + + + + + + + +); diff --git a/packages/core/src/ui/components/ConfirmDRepRetirement/index.ts b/packages/core/src/ui/components/ConfirmDRepRetirement/index.ts new file mode 100644 index 000000000..cb0e8d0d1 --- /dev/null +++ b/packages/core/src/ui/components/ConfirmDRepRetirement/index.ts @@ -0,0 +1 @@ +export { ConfirmDRepRetirement } from './ConfirmDRepRetirement'; diff --git a/packages/core/src/ui/components/DappTransaction/DappTransaction.stories.ts b/packages/core/src/ui/components/DappTransaction/DappTransaction.stories.ts new file mode 100644 index 000000000..56f29d053 --- /dev/null +++ b/packages/core/src/ui/components/DappTransaction/DappTransaction.stories.ts @@ -0,0 +1,60 @@ +import type { Meta, StoryObj } from '@storybook/react'; + +import { DappTransaction } from './DappTransaction'; +import { ComponentProps } from 'react'; + +const meta: Meta = { + title: 'DappTransaction', + component: DappTransaction, + parameters: { + layout: 'centered' + } +}; + +export default meta; +type Story = StoryObj; + +const data: ComponentProps = { + dappInfo: { + logo: 'https://cdn.mint.handle.me/favicon.png', + name: 'Mint', + url: 'https://preprod.mint.handle.me' + }, + translations: { + recipient: 'Recipient', + amount: 'Amount', + adaFollowingNumericValue: 'ADA', + fee: 'Fee', + transaction: 'Transaction' + }, + transaction: { + fee: '0.17', + outputs: [ + { + coins: '1', + recipient: + 'addr_test1qrl0s3nqfljv8dfckn7c4wkzu5rl6wn4hakkddcz2mczt3szlqss933x0aag07qcgspcaglmay6ufl4y4lalmlpe02mqhl0fx2' + } + ], + type: 'Mint' + } +}; + +export const Overview: Story = { + args: { + ...data + } +}; + +export const WithInsufficientFunds: Story = { + args: { + ...data + } +}; + +export const WithError: Story = { + args: { + ...data, + errorMessage: 'Something went wrong' + } +}; diff --git a/packages/core/src/ui/components/InsufficientFundsWarning/InsufficientFundsWarning.module.scss b/packages/core/src/ui/components/InsufficientFundsWarning/InsufficientFundsWarning.module.scss new file mode 100644 index 000000000..303cbebf6 --- /dev/null +++ b/packages/core/src/ui/components/InsufficientFundsWarning/InsufficientFundsWarning.module.scss @@ -0,0 +1,23 @@ +@import '../../styles/theme.scss'; +@import '../../../../../common/src/ui/styles/abstracts/_typography.scss'; + +.warningAlert { + flex-direction: row; + background: var(--lace-cream); + display: flex; + align-items: center; + border-radius: size_unit(2); + padding: size_unit(2) size_unit(3); + gap: size_unit(3); + + svg { + height: size_unit(3); + width: size_unit(3); + color: var(--data-orange); + } + + p { + @include text-body-semi-bold; + margin: 0; + } +} diff --git a/packages/core/src/ui/components/InsufficientFundsWarning/InsufficientFundsWarning.tsx b/packages/core/src/ui/components/InsufficientFundsWarning/InsufficientFundsWarning.tsx new file mode 100644 index 000000000..7823ca8d4 --- /dev/null +++ b/packages/core/src/ui/components/InsufficientFundsWarning/InsufficientFundsWarning.tsx @@ -0,0 +1,15 @@ +import React from 'react'; +import styles from './InsufficientFundsWarning.module.scss'; +import { ReactComponent as WarningIcon } from '../../assets/icons/warning-icon.component.svg'; +import Icon from '@ant-design/icons'; + +export interface DappTransactionProps { + translations: string; +} + +export const InsufficientFundsWarning = ({ translations }: DappTransactionProps): React.ReactElement => ( +
+ +

{translations}

+
+); diff --git a/packages/core/src/ui/components/InsufficientFundsWarning/index.ts b/packages/core/src/ui/components/InsufficientFundsWarning/index.ts new file mode 100644 index 000000000..fdd126c9d --- /dev/null +++ b/packages/core/src/ui/components/InsufficientFundsWarning/index.ts @@ -0,0 +1 @@ +export * from './InsufficientFundsWarning'; diff --git a/yarn.lock b/yarn.lock index 7e8167c66..ecf24aa84 100644 --- a/yarn.lock +++ b/yarn.lock @@ -110,6 +110,17 @@ __metadata: languageName: node linkType: hard +"@aw-web-design/x-default-browser@npm:1.4.126": + version: 1.4.126 + resolution: "@aw-web-design/x-default-browser@npm:1.4.126" + dependencies: + default-browser-id: 3.0.0 + bin: + x-default-browser: bin/x-default-browser.js + checksum: f63b68a0ff41c8fe478b1b4822e169cac0d26c61b123c0400d5e16a8a5987732b85795aff16d6b21936f9c955f0d32bffbfc166890d3446f74a72a7a2c9633ea + languageName: node + linkType: hard + "@babel/code-frame@npm:7.12.11": version: 7.12.11 resolution: "@babel/code-frame@npm:7.12.11" @@ -164,6 +175,16 @@ __metadata: languageName: node linkType: hard +"@babel/code-frame@npm:^7.22.13": + version: 7.22.13 + resolution: "@babel/code-frame@npm:7.22.13" + dependencies: + "@babel/highlight": ^7.22.13 + chalk: ^2.4.2 + checksum: 22e342c8077c8b77eeb11f554ecca2ba14153f707b85294fcf6070b6f6150aae88a7b7436dd88d8c9289970585f3fe5b9b941c5aa3aa26a6d5a8ef3f292da058 + languageName: node + linkType: hard + "@babel/code-frame@npm:^7.22.5": version: 7.22.5 resolution: "@babel/code-frame@npm:7.22.5" @@ -215,6 +236,13 @@ __metadata: languageName: node linkType: hard +"@babel/compat-data@npm:^7.22.20, @babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.22.9": + version: 7.22.20 + resolution: "@babel/compat-data@npm:7.22.20" + checksum: efedd1d18878c10fde95e4d82b1236a9aba41395ef798cbb651f58dbf5632dbff475736c507b8d13d4c8f44809d41c0eb2ef0d694283af9ba5dd8339b6dab451 + languageName: node + linkType: hard + "@babel/compat-data@npm:^7.22.5": version: 7.22.5 resolution: "@babel/compat-data@npm:7.22.5" @@ -315,6 +343,29 @@ __metadata: languageName: node linkType: hard +"@babel/core@npm:^7.13.16, @babel/core@npm:^7.22.9": + version: 7.22.20 + resolution: "@babel/core@npm:7.22.20" + dependencies: + "@ampproject/remapping": ^2.2.0 + "@babel/code-frame": ^7.22.13 + "@babel/generator": ^7.22.15 + "@babel/helper-compilation-targets": ^7.22.15 + "@babel/helper-module-transforms": ^7.22.20 + "@babel/helpers": ^7.22.15 + "@babel/parser": ^7.22.16 + "@babel/template": ^7.22.15 + "@babel/traverse": ^7.22.20 + "@babel/types": ^7.22.19 + convert-source-map: ^1.7.0 + debug: ^4.1.0 + gensync: ^1.0.0-beta.2 + json5: ^2.2.3 + semver: ^6.3.1 + checksum: 73663a079194b5dc406b2e2e5e50db81977d443e4faf7ef2c27e5836cd9a359e81e551115193dc9b1a93471275351a972e54904f4d3aa6cb156f51e26abf6765 + languageName: node + linkType: hard + "@babel/core@npm:^7.15.5": version: 7.16.0 resolution: "@babel/core@npm:7.16.0" @@ -557,6 +608,18 @@ __metadata: languageName: node linkType: hard +"@babel/generator@npm:^7.22.15, @babel/generator@npm:^7.22.9": + version: 7.22.15 + resolution: "@babel/generator@npm:7.22.15" + dependencies: + "@babel/types": ^7.22.15 + "@jridgewell/gen-mapping": ^0.3.2 + "@jridgewell/trace-mapping": ^0.3.17 + jsesc: ^2.5.1 + checksum: 5b2a3ccdc3634f6ea86e0a442722bcd430238369432d31f15b428a4ee8013c2f4f917b5b135bf4fc1d0a3e2f87f10fd4ce5d07955ecc2d3b9400a05c2a481374 + languageName: node + linkType: hard + "@babel/generator@npm:^7.22.5": version: 7.22.5 resolution: "@babel/generator@npm:7.22.5" @@ -608,6 +671,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-annotate-as-pure@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-annotate-as-pure@npm:7.22.5" + dependencies: + "@babel/types": ^7.22.5 + checksum: 53da330f1835c46f26b7bf4da31f7a496dee9fd8696cca12366b94ba19d97421ce519a74a837f687749318f94d1a37f8d1abcbf35e8ed22c32d16373b2f6198d + languageName: node + linkType: hard + "@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.14.5": version: 7.14.5 resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.14.5" @@ -638,6 +710,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.22.5": + version: 7.22.15 + resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.22.15" + dependencies: + "@babel/types": ^7.22.15 + checksum: 639c697a1c729f9fafa2dd4c9af2e18568190299b5907bd4c2d0bc818fcbd1e83ffeecc2af24327a7faa7ac4c34edd9d7940510a5e66296c19bad17001cf5c7a + languageName: node + linkType: hard + "@babel/helper-compilation-targets@npm:^7.13.0, @babel/helper-compilation-targets@npm:^7.14.5, @babel/helper-compilation-targets@npm:^7.15.0": version: 7.15.0 resolution: "@babel/helper-compilation-targets@npm:7.15.0" @@ -710,6 +791,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-compilation-targets@npm:^7.22.15, @babel/helper-compilation-targets@npm:^7.22.6": + version: 7.22.15 + resolution: "@babel/helper-compilation-targets@npm:7.22.15" + dependencies: + "@babel/compat-data": ^7.22.9 + "@babel/helper-validator-option": ^7.22.15 + browserslist: ^4.21.9 + lru-cache: ^5.1.1 + semver: ^6.3.1 + checksum: ce85196769e091ae54dd39e4a80c2a9df1793da8588e335c383d536d54f06baf648d0a08fc873044f226398c4ded15c4ae9120ee18e7dfd7c639a68e3cdc9980 + languageName: node + linkType: hard + "@babel/helper-compilation-targets@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-compilation-targets@npm:7.22.5" @@ -809,6 +903,25 @@ __metadata: languageName: node linkType: hard +"@babel/helper-create-class-features-plugin@npm:^7.22.11, @babel/helper-create-class-features-plugin@npm:^7.22.15, @babel/helper-create-class-features-plugin@npm:^7.22.5": + version: 7.22.15 + resolution: "@babel/helper-create-class-features-plugin@npm:7.22.15" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-environment-visitor": ^7.22.5 + "@babel/helper-function-name": ^7.22.5 + "@babel/helper-member-expression-to-functions": ^7.22.15 + "@babel/helper-optimise-call-expression": ^7.22.5 + "@babel/helper-replace-supers": ^7.22.9 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 52c500d8d164abb3a360b1b7c4b8fff77bc4a5920d3a2b41ae6e1d30617b0dc0b972c1f5db35b1752007e04a748908b4a99bc872b73549ae837e87dcdde005a3 + languageName: node + linkType: hard + "@babel/helper-create-regexp-features-plugin@npm:^7.14.5": version: 7.14.5 resolution: "@babel/helper-create-regexp-features-plugin@npm:7.14.5" @@ -845,6 +958,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-create-regexp-features-plugin@npm:^7.22.5": + version: 7.22.15 + resolution: "@babel/helper-create-regexp-features-plugin@npm:7.22.15" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + regexpu-core: ^5.3.1 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 0243b8d4854f1dc8861b1029a46d3f6393ad72f366a5a08e36a4648aa682044f06da4c6e87a456260e1e1b33c999f898ba591a0760842c1387bcc93fbf2151a6 + languageName: node + linkType: hard + "@babel/helper-define-polyfill-provider@npm:^0.1.5": version: 0.1.5 resolution: "@babel/helper-define-polyfill-provider@npm:0.1.5" @@ -915,6 +1041,21 @@ __metadata: languageName: node linkType: hard +"@babel/helper-define-polyfill-provider@npm:^0.4.2": + version: 0.4.2 + resolution: "@babel/helper-define-polyfill-provider@npm:0.4.2" + dependencies: + "@babel/helper-compilation-targets": ^7.22.6 + "@babel/helper-plugin-utils": ^7.22.5 + debug: ^4.1.1 + lodash.debounce: ^4.0.8 + resolve: ^1.14.2 + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: 1f6dec0c5d0876d278fe15b71238eccc5f74c4e2efa2c78aaafa8bc2cc96336b8e68d94cd1a78497356c96e8b91b8c1f4452179820624d1702aee2f9832e6569 + languageName: node + linkType: hard + "@babel/helper-environment-visitor@npm:^7.18.9": version: 7.18.9 resolution: "@babel/helper-environment-visitor@npm:7.18.9" @@ -929,6 +1070,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-environment-visitor@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-environment-visitor@npm:7.22.20" + checksum: d80ee98ff66f41e233f36ca1921774c37e88a803b2f7dca3db7c057a5fea0473804db9fb6729e5dbfd07f4bed722d60f7852035c2c739382e84c335661590b69 + languageName: node + linkType: hard + "@babel/helper-environment-visitor@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-environment-visitor@npm:7.22.5" @@ -1124,6 +1272,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-member-expression-to-functions@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/helper-member-expression-to-functions@npm:7.22.15" + dependencies: + "@babel/types": ^7.22.15 + checksum: c7c5d01c402dd8902c2ec3093f203ed0fc3bc5f669328a084d2e663c4c06dd0415480ee8220c6f96ba9b2dc49545c0078f221fc3900ab1e65de69a12fe7b361f + languageName: node + linkType: hard + "@babel/helper-module-imports@npm:^7.0.0, @babel/helper-module-imports@npm:^7.18.6": version: 7.18.6 resolution: "@babel/helper-module-imports@npm:7.18.6" @@ -1160,6 +1317,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-imports@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/helper-module-imports@npm:7.22.15" + dependencies: + "@babel/types": ^7.22.15 + checksum: ecd7e457df0a46f889228f943ef9b4a47d485d82e030676767e6a2fdcbdaa63594d8124d4b55fd160b41c201025aec01fc27580352b1c87a37c9c6f33d116702 + languageName: node + linkType: hard + "@babel/helper-module-imports@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-module-imports@npm:7.22.5" @@ -1265,6 +1431,21 @@ __metadata: languageName: node linkType: hard +"@babel/helper-module-transforms@npm:^7.22.15, @babel/helper-module-transforms@npm:^7.22.20, @babel/helper-module-transforms@npm:^7.22.9": + version: 7.22.20 + resolution: "@babel/helper-module-transforms@npm:7.22.20" + dependencies: + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-module-imports": ^7.22.15 + "@babel/helper-simple-access": ^7.22.5 + "@babel/helper-split-export-declaration": ^7.22.6 + "@babel/helper-validator-identifier": ^7.22.20 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 8fce25362df8711bd4620f41c5c18769edfeafe7f8f1dae9691966ef368e57f9da68dfa1707cd63c834c89dc4eaa82c26f12ea33e88fd262ac62844b11dcc389 + languageName: node + linkType: hard + "@babel/helper-module-transforms@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-module-transforms@npm:7.22.5" @@ -1308,6 +1489,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-optimise-call-expression@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-optimise-call-expression@npm:7.22.5" + dependencies: + "@babel/types": ^7.22.5 + checksum: c70ef6cc6b6ed32eeeec4482127e8be5451d0e5282d5495d5d569d39eb04d7f1d66ec99b327f45d1d5842a9ad8c22d48567e93fc502003a47de78d122e355f7c + languageName: node + linkType: hard + "@babel/helper-plugin-utils@npm:7.10.4": version: 7.10.4 resolution: "@babel/helper-plugin-utils@npm:7.10.4" @@ -1336,6 +1526,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-plugin-utils@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-plugin-utils@npm:7.22.5" + checksum: c0fc7227076b6041acd2f0e818145d2e8c41968cc52fb5ca70eed48e21b8fe6dd88a0a91cbddf4951e33647336eb5ae184747ca706817ca3bef5e9e905151ff5 + languageName: node + linkType: hard + "@babel/helper-remap-async-to-generator@npm:^7.14.5": version: 7.14.5 resolution: "@babel/helper-remap-async-to-generator@npm:7.14.5" @@ -1372,6 +1569,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-remap-async-to-generator@npm:^7.22.5, @babel/helper-remap-async-to-generator@npm:^7.22.9": + version: 7.22.20 + resolution: "@babel/helper-remap-async-to-generator@npm:7.22.20" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-wrap-function": ^7.22.20 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 2fe6300a6f1b58211dffa0aed1b45d4958506d096543663dba83bd9251fe8d670fa909143a65b45e72acb49e7e20fbdb73eae315d9ddaced467948c3329986e7 + languageName: node + linkType: hard + "@babel/helper-replace-supers@npm:^7.14.5, @babel/helper-replace-supers@npm:^7.15.0": version: 7.15.0 resolution: "@babel/helper-replace-supers@npm:7.15.0" @@ -1423,6 +1633,19 @@ __metadata: languageName: node linkType: hard +"@babel/helper-replace-supers@npm:^7.22.5, @babel/helper-replace-supers@npm:^7.22.9": + version: 7.22.20 + resolution: "@babel/helper-replace-supers@npm:7.22.20" + dependencies: + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-member-expression-to-functions": ^7.22.15 + "@babel/helper-optimise-call-expression": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: a0008332e24daedea2e9498733e3c39b389d6d4512637e000f96f62b797e702ee24a407ccbcd7a236a551590a38f31282829a8ef35c50a3c0457d88218cae639 + languageName: node + linkType: hard + "@babel/helper-simple-access@npm:^7.14.8": version: 7.14.8 resolution: "@babel/helper-simple-access@npm:7.14.8" @@ -1495,6 +1718,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-skip-transparent-expression-wrappers@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.22.5" + dependencies: + "@babel/types": ^7.22.5 + checksum: 1012ef2295eb12dc073f2b9edf3425661e9b8432a3387e62a8bc27c42963f1f216ab3124228015c748770b2257b4f1fda882ca8fa34c0bf485e929ae5bc45244 + languageName: node + linkType: hard + "@babel/helper-split-export-declaration@npm:^7.14.5": version: 7.14.5 resolution: "@babel/helper-split-export-declaration@npm:7.14.5" @@ -1531,6 +1763,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-split-export-declaration@npm:^7.22.6": + version: 7.22.6 + resolution: "@babel/helper-split-export-declaration@npm:7.22.6" + dependencies: + "@babel/types": ^7.22.5 + checksum: e141cace583b19d9195f9c2b8e17a3ae913b7ee9b8120246d0f9ca349ca6f03cb2c001fd5ec57488c544347c0bb584afec66c936511e447fd20a360e591ac921 + languageName: node + linkType: hard + "@babel/helper-string-parser@npm:^7.18.10": version: 7.18.10 resolution: "@babel/helper-string-parser@npm:7.18.10" @@ -1594,6 +1835,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-identifier@npm:^7.22.19, @babel/helper-validator-identifier@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-validator-identifier@npm:7.22.20" + checksum: 136412784d9428266bcdd4d91c32bcf9ff0e8d25534a9d94b044f77fe76bc50f941a90319b05aafd1ec04f7d127cd57a179a3716009ff7f3412ef835ada95bdc + languageName: node + linkType: hard + "@babel/helper-validator-identifier@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-validator-identifier@npm:7.22.5" @@ -1622,6 +1870,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-validator-option@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/helper-validator-option@npm:7.22.15" + checksum: 68da52b1e10002a543161494c4bc0f4d0398c8fdf361d5f7f4272e95c45d5b32d974896d44f6a0ea7378c9204988879d73613ca683e13bd1304e46d25ff67a8d + languageName: node + linkType: hard + "@babel/helper-validator-option@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helper-validator-option@npm:7.22.5" @@ -1665,6 +1920,17 @@ __metadata: languageName: node linkType: hard +"@babel/helper-wrap-function@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-wrap-function@npm:7.22.20" + dependencies: + "@babel/helper-function-name": ^7.22.5 + "@babel/template": ^7.22.15 + "@babel/types": ^7.22.19 + checksum: 221ed9b5572612aeb571e4ce6a256f2dee85b3c9536f1dd5e611b0255e5f59a3d0ec392d8d46d4152149156a8109f92f20379b1d6d36abb613176e0e33f05fca + languageName: node + linkType: hard + "@babel/helpers@npm:^7.12.5": version: 7.15.3 resolution: "@babel/helpers@npm:7.15.3" @@ -1753,6 +2019,17 @@ __metadata: languageName: node linkType: hard +"@babel/helpers@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/helpers@npm:7.22.15" + dependencies: + "@babel/template": ^7.22.15 + "@babel/traverse": ^7.22.15 + "@babel/types": ^7.22.15 + checksum: 49f61a93cbae4df3328bda67af5db743fead659ae4242571226c3596b7df78546189cdf991fed1eca33b559de8abf396a90a001f474a1bab351418f07b7ae6ef + languageName: node + linkType: hard + "@babel/helpers@npm:^7.22.5": version: 7.22.5 resolution: "@babel/helpers@npm:7.22.5" @@ -1808,6 +2085,17 @@ __metadata: languageName: node linkType: hard +"@babel/highlight@npm:^7.22.13": + version: 7.22.20 + resolution: "@babel/highlight@npm:7.22.20" + dependencies: + "@babel/helper-validator-identifier": ^7.22.20 + chalk: ^2.4.2 + js-tokens: ^4.0.0 + checksum: 84bd034dca309a5e680083cd827a766780ca63cef37308404f17653d32366ea76262bd2364b2d38776232f2d01b649f26721417d507e8b4b6da3e4e739f6d134 + languageName: node + linkType: hard + "@babel/highlight@npm:^7.22.5": version: 7.22.5 resolution: "@babel/highlight@npm:7.22.5" @@ -1837,6 +2125,15 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.13.16, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.22.16, @babel/parser@npm:^7.22.7": + version: 7.22.16 + resolution: "@babel/parser@npm:7.22.16" + bin: + parser: ./bin/babel-parser.js + checksum: 944c756b5bdeb07b9fec16ecef6b3c61aff9d4c4b924abadcf01afa1840a740b8e2357ae00482b5b37daad6d2bfd848c947f27ad65138d687b6fdc924bc59edd + languageName: node + linkType: hard + "@babel/parser@npm:^7.14.7, @babel/parser@npm:^7.18.10, @babel/parser@npm:^7.20.1, @babel/parser@npm:^7.20.2": version: 7.20.3 resolution: "@babel/parser@npm:7.20.3" @@ -1958,6 +2255,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.22.15" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 8910ca21a7ec7c06f7b247d4b86c97c5aa15ef321518f44f6f490c5912fdf82c605aaa02b90892e375d82ccbedeadfdeadd922c1b836c9dd4c596871bf654753 + languageName: node + linkType: hard + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.14.5" @@ -1997,6 +2305,19 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.22.15" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + "@babel/plugin-transform-optional-chaining": ^7.22.15 + peerDependencies: + "@babel/core": ^7.13.0 + checksum: fbefedc0da014c37f1a50a8094ce7dbbf2181ae93243f23d6ecba2499b5b20196c2124d6a4dfe3e9e0125798e80593103e456352a4beb4e5c6f7c75efb80fdac + languageName: node + linkType: hard + "@babel/plugin-proposal-async-generator-functions@npm:^7.14.9": version: 7.14.9 resolution: "@babel/plugin-proposal-async-generator-functions@npm:7.14.9" @@ -2049,27 +2370,27 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-class-properties@npm:^7.16.0": - version: 7.16.0 - resolution: "@babel/plugin-proposal-class-properties@npm:7.16.0" +"@babel/plugin-proposal-class-properties@npm:^7.13.0, @babel/plugin-proposal-class-properties@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" dependencies: - "@babel/helper-create-class-features-plugin": ^7.16.0 - "@babel/helper-plugin-utils": ^7.14.5 + "@babel/helper-create-class-features-plugin": ^7.18.6 + "@babel/helper-plugin-utils": ^7.18.6 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: b1665ced553e5cdb95eec2fda321cb226c5f255edd1a94b226b9d81e97e026472184b6898af26f2bb9ee64101fad1afe215b6fc469d3103dec78c55e732e49aa + checksum: 49a78a2773ec0db56e915d9797e44fd079ab8a9b2e1716e0df07c92532f2c65d76aeda9543883916b8e0ff13606afeffa67c5b93d05b607bc87653ad18a91422 languageName: node linkType: hard -"@babel/plugin-proposal-class-properties@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-class-properties@npm:7.18.6" +"@babel/plugin-proposal-class-properties@npm:^7.16.0": + version: 7.16.0 + resolution: "@babel/plugin-proposal-class-properties@npm:7.16.0" dependencies: - "@babel/helper-create-class-features-plugin": ^7.18.6 - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-create-class-features-plugin": ^7.16.0 + "@babel/helper-plugin-utils": ^7.14.5 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 49a78a2773ec0db56e915d9797e44fd079ab8a9b2e1716e0df07c92532f2c65d76aeda9543883916b8e0ff13606afeffa67c5b93d05b607bc87653ad18a91422 + checksum: b1665ced553e5cdb95eec2fda321cb226c5f255edd1a94b226b9d81e97e026472184b6898af26f2bb9ee64101fad1afe215b6fc469d3103dec78c55e732e49aa languageName: node linkType: hard @@ -2306,27 +2627,27 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-nullish-coalescing-operator@npm:^7.16.0": - version: 7.16.0 - resolution: "@babel/plugin-proposal-nullish-coalescing-operator@npm:7.16.0" +"@babel/plugin-proposal-nullish-coalescing-operator@npm:^7.13.8, @babel/plugin-proposal-nullish-coalescing-operator@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/plugin-proposal-nullish-coalescing-operator@npm:7.18.6" dependencies: - "@babel/helper-plugin-utils": ^7.14.5 + "@babel/helper-plugin-utils": ^7.18.6 "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: e50f94929970cdc5c6ee22ec4c95c46ae25cdd8c391baf601f7f3d3a3cec417efc663a3fafa9ae5bca82a6815d49687b07cab9857f5a10e9ea862438ecb81e4a + checksum: 949c9ddcdecdaec766ee610ef98f965f928ccc0361dd87cf9f88cf4896a6ccd62fce063d4494778e50da99dea63d270a1be574a62d6ab81cbe9d85884bf55a7d languageName: node linkType: hard -"@babel/plugin-proposal-nullish-coalescing-operator@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-nullish-coalescing-operator@npm:7.18.6" +"@babel/plugin-proposal-nullish-coalescing-operator@npm:^7.16.0": + version: 7.16.0 + resolution: "@babel/plugin-proposal-nullish-coalescing-operator@npm:7.16.0" dependencies: - "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-plugin-utils": ^7.14.5 "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 949c9ddcdecdaec766ee610ef98f965f928ccc0361dd87cf9f88cf4896a6ccd62fce063d4494778e50da99dea63d270a1be574a62d6ab81cbe9d85884bf55a7d + checksum: e50f94929970cdc5c6ee22ec4c95c46ae25cdd8c391baf601f7f3d3a3cec417efc663a3fafa9ae5bca82a6815d49687b07cab9857f5a10e9ea862438ecb81e4a languageName: node linkType: hard @@ -2473,6 +2794,19 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-proposal-optional-chaining@npm:^7.13.12, @babel/plugin-proposal-optional-chaining@npm:^7.21.0": + version: 7.21.0 + resolution: "@babel/plugin-proposal-optional-chaining@npm:7.21.0" + dependencies: + "@babel/helper-plugin-utils": ^7.20.2 + "@babel/helper-skip-transparent-expression-wrappers": ^7.20.0 + "@babel/plugin-syntax-optional-chaining": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 11c5449e01b18bb8881e8e005a577fa7be2fe5688e2382c8822d51f8f7005342a301a46af7b273b1f5645f9a7b894c428eee8526342038a275ef6ba4c8d8d746 + languageName: node + linkType: hard + "@babel/plugin-proposal-optional-chaining@npm:^7.16.0": version: 7.16.0 resolution: "@babel/plugin-proposal-optional-chaining@npm:7.16.0" @@ -2499,19 +2833,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-optional-chaining@npm:^7.21.0": - version: 7.21.0 - resolution: "@babel/plugin-proposal-optional-chaining@npm:7.21.0" - dependencies: - "@babel/helper-plugin-utils": ^7.20.2 - "@babel/helper-skip-transparent-expression-wrappers": ^7.20.0 - "@babel/plugin-syntax-optional-chaining": ^7.8.3 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 11c5449e01b18bb8881e8e005a577fa7be2fe5688e2382c8822d51f8f7005342a301a46af7b273b1f5645f9a7b894c428eee8526342038a275ef6ba4c8d8d746 - languageName: node - linkType: hard - "@babel/plugin-proposal-private-methods@npm:^7.12.1, @babel/plugin-proposal-private-methods@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-proposal-private-methods@npm:7.14.5" @@ -2548,6 +2869,15 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2": + version: 7.21.0-placeholder-for-preset-env.2 + resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: d97745d098b835d55033ff3a7fb2b895b9c5295b08a5759e4f20df325aa385a3e0bc9bd5ad8f2ec554a44d4e6525acfc257b8c5848a1345cb40f26a30e277e91 + languageName: node + linkType: hard + "@babel/plugin-proposal-private-property-in-object@npm:^7.12.1": version: 7.18.6 resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.18.6" @@ -2753,6 +3083,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-syntax-flow@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-syntax-flow@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 84c8c40fcfe8e78cecdd6fb90e8f97f419e3f3b27a33de8324ae97d5ce1b87cdd98a636fa21a68d4d2c37c7d63f3a279bb84b6956b849921affed6b806b6ffe7 + languageName: node + linkType: hard + "@babel/plugin-syntax-import-assertions@npm:^7.20.0": version: 7.20.0 resolution: "@babel/plugin-syntax-import-assertions@npm:7.20.0" @@ -2764,7 +3105,29 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-meta@npm:^7.8.3": +"@babel/plugin-syntax-import-assertions@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-syntax-import-assertions@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 2b8b5572db04a7bef1e6cd20debf447e4eef7cb012616f5eceb8fa3e23ce469b8f76ee74fd6d1e158ba17a8f58b0aec579d092fb67c5a30e83ccfbc5754916c1 + languageName: node + linkType: hard + +"@babel/plugin-syntax-import-attributes@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-syntax-import-attributes@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 197b3c5ea2a9649347f033342cb222ab47f4645633695205c0250c6bf2af29e643753b8bb24a2db39948bef08e7c540babfd365591eb57fc110cb30b425ffc47 + languageName: node + linkType: hard + +"@babel/plugin-syntax-import-meta@npm:^7.10.4, @babel/plugin-syntax-import-meta@npm:^7.8.3": version: 7.10.4 resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" dependencies: @@ -2830,6 +3193,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-syntax-jsx@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-syntax-jsx@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 8829d30c2617ab31393d99cec2978e41f014f4ac6f01a1cecf4c4dd8320c3ec12fdc3ce121126b2d8d32f6887e99ca1a0bad53dedb1e6ad165640b92b24980ce + languageName: node + linkType: hard + "@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4, @babel/plugin-syntax-logical-assignment-operators@npm:^7.8.3": version: 7.10.4 resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" @@ -2951,6 +3325,29 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-syntax-typescript@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-syntax-typescript@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 8ab7718fbb026d64da93681a57797d60326097fd7cb930380c8bffd9eb101689e90142c760a14b51e8e69c88a73ba3da956cb4520a3b0c65743aee5c71ef360a + languageName: node + linkType: hard + +"@babel/plugin-syntax-unicode-sets-regex@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/plugin-syntax-unicode-sets-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 + checksum: a651d700fe63ff0ddfd7186f4ebc24447ca734f114433139e3c027bc94a900d013cf1ef2e2db8430425ba542e39ae160c3b05f06b59fd4656273a3df97679e9c + languageName: node + linkType: hard + "@babel/plugin-transform-arrow-functions@npm:^7.12.1, @babel/plugin-transform-arrow-functions@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-arrow-functions@npm:7.14.5" @@ -2984,6 +3381,31 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-arrow-functions@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-arrow-functions@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 35abb6c57062802c7ce8bd96b2ef2883e3124370c688bbd67609f7d2453802fb73944df8808f893b6c67de978eb2bcf87bbfe325e46d6f39b5fcb09ece11d01a + languageName: node + linkType: hard + +"@babel/plugin-transform-async-generator-functions@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/plugin-transform-async-generator-functions@npm:7.22.15" + dependencies: + "@babel/helper-environment-visitor": ^7.22.5 + "@babel/helper-plugin-utils": ^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: fad98786b446ce63bde0d14a221e2617eef5a7bbca62b49d96f16ab5e1694521234cfba6145b830fbf9af16d60a8a3dbf148e8694830bd91796fe333b0599e73 + languageName: node + linkType: hard + "@babel/plugin-transform-async-to-generator@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-async-to-generator@npm:7.14.5" @@ -3023,6 +3445,19 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-async-to-generator@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-async-to-generator@npm:7.22.5" + dependencies: + "@babel/helper-module-imports": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-remap-async-to-generator": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: b95f23f99dcb379a9f0a1c2a3bbea3f8dc0e1b16dc1ac8b484fe378370169290a7a63d520959a9ba1232837cf74a80e23f6facbe14fd42a3cda6d3c2d7168e62 + languageName: node + linkType: hard + "@babel/plugin-transform-block-scoped-functions@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.14.5" @@ -3056,6 +3491,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-block-scoped-functions@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 416b1341858e8ca4e524dee66044735956ced5f478b2c3b9bc11ec2285b0c25d7dbb96d79887169eb938084c95d0a89338c8b2fe70d473bd9dc92e5d9db1732c + languageName: node + linkType: hard + "@babel/plugin-transform-block-scoping@npm:^7.12.12, @babel/plugin-transform-block-scoping@npm:^7.14.5": version: 7.15.3 resolution: "@babel/plugin-transform-block-scoping@npm:7.15.3" @@ -3100,6 +3546,42 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-block-scoping@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/plugin-transform-block-scoping@npm:7.22.15" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: c7091dc000b854ce0c471588ca0704ef1ce78cff954584a9f21c1668fd0669e7c8d5396fb72fe49a2216d9b96a400d435f424f27e41a097ef6c855f9c57df195 + languageName: node + linkType: hard + +"@babel/plugin-transform-class-properties@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-class-properties@npm:7.22.5" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: b830152dfc2ff2f647f0abe76e6251babdfbef54d18c4b2c73a6bf76b1a00050a5d998dac80dc901a48514e95604324943a9dd39317073fe0928b559e0e0c579 + languageName: node + linkType: hard + +"@babel/plugin-transform-class-static-block@npm:^7.22.11": + version: 7.22.11 + resolution: "@babel/plugin-transform-class-static-block@npm:7.22.11" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.22.11 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-class-static-block": ^7.14.5 + peerDependencies: + "@babel/core": ^7.12.0 + checksum: 69f040506fad66f1c6918d288d0e0edbc5c8a07c8b4462c1184ad2f9f08995d68b057126c213871c0853ae0c72afc60ec87492049dfacb20902e32346a448bcb + languageName: node + linkType: hard + "@babel/plugin-transform-classes@npm:^7.12.1, @babel/plugin-transform-classes@npm:^7.14.9": version: 7.14.9 resolution: "@babel/plugin-transform-classes@npm:7.14.9" @@ -3172,6 +3654,25 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-classes@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/plugin-transform-classes@npm:7.22.15" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-compilation-targets": ^7.22.15 + "@babel/helper-environment-visitor": ^7.22.5 + "@babel/helper-function-name": ^7.22.5 + "@babel/helper-optimise-call-expression": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-replace-supers": ^7.22.9 + "@babel/helper-split-export-declaration": ^7.22.6 + globals: ^11.1.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: d3f4d0c107dd8a3557ea3575cc777fab27efa92958b41e4a9822f7499725c1f554beae58855de16ddec0a7b694e45f59a26cea8fbde4275563f72f09c6e039a0 + languageName: node + linkType: hard + "@babel/plugin-transform-computed-properties@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-computed-properties@npm:7.14.5" @@ -3206,6 +3707,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-computed-properties@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-computed-properties@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/template": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: c2a77a0f94ec71efbc569109ec14ea2aa925b333289272ced8b33c6108bdbb02caf01830ffc7e49486b62dec51911924d13f3a76f1149f40daace1898009e131 + languageName: node + linkType: hard + "@babel/plugin-transform-destructuring@npm:^7.12.1, @babel/plugin-transform-destructuring@npm:^7.14.7": version: 7.14.7 resolution: "@babel/plugin-transform-destructuring@npm:7.14.7" @@ -3250,6 +3763,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-destructuring@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/plugin-transform-destructuring@npm:7.22.15" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 4bccb4765e5287f1d36119d930afb9941ea8f4f001bddb8febff716bac0e09dc58576624f3ec59470630513044dd342075fe11af16d8c1b234cb7406cffca9f0 + languageName: node + linkType: hard + "@babel/plugin-transform-dotall-regex@npm:^7.14.5, @babel/plugin-transform-dotall-regex@npm:^7.4.4": version: 7.14.5 resolution: "@babel/plugin-transform-dotall-regex@npm:7.14.5" @@ -3286,6 +3810,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-dotall-regex@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-dotall-regex@npm:7.22.5" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 409b658d11e3082c8f69e9cdef2d96e4d6d11256f005772425fb230cc48fd05945edbfbcb709dab293a1a2f01f9c8a5bb7b4131e632b23264039d9f95864b453 + languageName: node + linkType: hard + "@babel/plugin-transform-duplicate-keys@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-duplicate-keys@npm:7.14.5" @@ -3319,6 +3855,29 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-duplicate-keys@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-duplicate-keys@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: bb1280fbabaab6fab2ede585df34900712698210a3bd413f4df5bae6d8c24be36b496c92722ae676a7a67d060a4624f4d6c23b923485f906bfba8773c69f55b4 + languageName: node + linkType: hard + +"@babel/plugin-transform-dynamic-import@npm:^7.22.11": + version: 7.22.11 + resolution: "@babel/plugin-transform-dynamic-import@npm:7.22.11" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-dynamic-import": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 78fc9c532210bf9e8f231747f542318568ac360ee6c27e80853962c984283c73da3f8f8aebe83c2096090a435b356b092ed85de617a156cbe0729d847632be45 + languageName: node + linkType: hard + "@babel/plugin-transform-exponentiation-operator@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.14.5" @@ -3355,6 +3914,30 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-exponentiation-operator@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.22.5" + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: f2d660c1b1d51ad5fec1cd5ad426a52187204068c4158f8c4aa977b31535c61b66898d532603eef21c15756827be8277f724c869b888d560f26d7fe848bb5eae + languageName: node + linkType: hard + +"@babel/plugin-transform-export-namespace-from@npm:^7.22.11": + version: 7.22.11 + resolution: "@babel/plugin-transform-export-namespace-from@npm:7.22.11" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-export-namespace-from": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 73af5883a321ed56a4bfd43c8a7de0164faebe619287706896fc6ee2f7a4e69042adaa1338c0b8b4bdb9f7e5fdceb016fb1d40694cb43ca3b8827429e8aac4bf + languageName: node + linkType: hard + "@babel/plugin-transform-flow-strip-types@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-flow-strip-types@npm:7.14.5" @@ -3367,6 +3950,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-flow-strip-types@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-flow-strip-types@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-flow": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 1ba48187d6f33814be01c6870489f0b1858256cf2b9dd7e62f02af8b30049bf375112f1d44692c5fed3cb9cd26ee2fb32e358cd79b6ad2360a51e8f993e861bf + languageName: node + linkType: hard + "@babel/plugin-transform-for-of@npm:^7.12.1, @babel/plugin-transform-for-of@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-for-of@npm:7.14.5" @@ -3411,6 +4006,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-for-of@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/plugin-transform-for-of@npm:7.22.15" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: f395ae7bce31e14961460f56cf751b5d6e37dd27d7df5b1f4e49fec1c11b6f9cf71991c7ffbe6549878591e87df0d66af798cf26edfa4bfa6b4c3dba1fb2f73a + languageName: node + linkType: hard + "@babel/plugin-transform-function-name@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-function-name@npm:7.14.5" @@ -3448,6 +4054,31 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-function-name@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-function-name@npm:7.22.5" + dependencies: + "@babel/helper-compilation-targets": ^7.22.5 + "@babel/helper-function-name": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: cff3b876357999cb8ae30e439c3ec6b0491a53b0aa6f722920a4675a6dd5b53af97a833051df4b34791fe5b3dd326ccf769d5c8e45b322aa50ee11a660b17845 + languageName: node + linkType: hard + +"@babel/plugin-transform-json-strings@npm:^7.22.11": + version: 7.22.11 + resolution: "@babel/plugin-transform-json-strings@npm:7.22.11" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-json-strings": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 50665e5979e66358c50e90a26db53c55917f78175127ac2fa05c7888d156d418ffb930ec0a109353db0a7c5f57c756ce01bfc9825d24cbfd2b3ec453f2ed8cba + languageName: node + linkType: hard + "@babel/plugin-transform-literals@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-literals@npm:7.14.5" @@ -3481,6 +4112,29 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-literals@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-literals@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: ec37cc2ffb32667af935ab32fe28f00920ec8a1eb999aa6dc6602f2bebd8ba205a558aeedcdccdebf334381d5c57106c61f52332045730393e73410892a9735b + languageName: node + linkType: hard + +"@babel/plugin-transform-logical-assignment-operators@npm:^7.22.11": + version: 7.22.11 + resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.22.11" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-logical-assignment-operators": ^7.10.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: c664e9798e85afa7f92f07b867682dee7392046181d82f5d21bae6f2ca26dfe9c8375cdc52b7483c3fc09a983c1989f60eff9fbc4f373b0c0a74090553d05739 + languageName: node + linkType: hard + "@babel/plugin-transform-member-expression-literals@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-member-expression-literals@npm:7.14.5" @@ -3514,6 +4168,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-member-expression-literals@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-member-expression-literals@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: ec4b0e07915ddd4fda0142fd104ee61015c208608a84cfa13643a95d18760b1dc1ceb6c6e0548898b8c49e5959a994e46367260176dbabc4467f729b21868504 + languageName: node + linkType: hard + "@babel/plugin-transform-modules-amd@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-modules-amd@npm:7.14.5" @@ -3552,6 +4217,31 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-modules-amd@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-modules-amd@npm:7.22.5" + dependencies: + "@babel/helper-module-transforms": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 7da4c4ebbbcf7d182abb59b2046b22d86eee340caf8a22a39ef6a727da2d8acfec1f714fcdcd5054110b280e4934f735e80a6848d192b6834c5d4459a014f04d + languageName: node + linkType: hard + +"@babel/plugin-transform-modules-commonjs@npm:^7.13.8, @babel/plugin-transform-modules-commonjs@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/plugin-transform-modules-commonjs@npm:7.22.15" + dependencies: + "@babel/helper-module-transforms": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-simple-access": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: f8fc85fefa6be8626a378ca38fb84c7359043e7c692c854e9ee250a05121553b7f4a58e127099efe12662ec6bebbfd304ce638a0b4563d7cbd5982f3d877321c + languageName: node + linkType: hard + "@babel/plugin-transform-modules-commonjs@npm:^7.15.0": version: 7.15.0 resolution: "@babel/plugin-transform-modules-commonjs@npm:7.15.0" @@ -3650,6 +4340,20 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-modules-systemjs@npm:^7.22.11": + version: 7.22.11 + resolution: "@babel/plugin-transform-modules-systemjs@npm:7.22.11" + dependencies: + "@babel/helper-hoist-variables": ^7.22.5 + "@babel/helper-module-transforms": ^7.22.9 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-identifier": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: d0991e4bdc3352b6a9f4d12b6662e3645d892cd5c3c005ba5f14e65f1e218c6a8f7f4497e64a51d82a046e507aaa7db3143b800b0270dca1824cbd214ff3363d + languageName: node + linkType: hard + "@babel/plugin-transform-modules-umd@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-modules-umd@npm:7.14.5" @@ -3686,6 +4390,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-modules-umd@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-modules-umd@npm:7.22.5" + dependencies: + "@babel/helper-module-transforms": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 46622834c54c551b231963b867adbc80854881b3e516ff29984a8da989bd81665bd70e8cba6710345248e97166689310f544aee1a5773e262845a8f1b3e5b8b4 + languageName: node + linkType: hard + "@babel/plugin-transform-named-capturing-groups-regex@npm:^7.14.9": version: 7.14.9 resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.14.9" @@ -3720,6 +4436,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-named-capturing-groups-regex@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.22.5" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 3ee564ddee620c035b928fdc942c5d17e9c4b98329b76f9cefac65c111135d925eb94ed324064cd7556d4f5123beec79abea1d4b97d1c8a2a5c748887a2eb623 + languageName: node + linkType: hard + "@babel/plugin-transform-new-target@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-new-target@npm:7.14.5" @@ -3753,6 +4481,56 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-new-target@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-new-target@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 6b72112773487a881a1d6ffa680afde08bad699252020e86122180ee7a88854d5da3f15d9bca3331cf2e025df045604494a8208a2e63b486266b07c14e2ffbf3 + languageName: node + linkType: hard + +"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.22.11": + version: 7.22.11 + resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.22.11" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 167babecc8b8fe70796a7b7d34af667ebbf43da166c21689502e5e8cc93180b7a85979c77c9f64b7cce431b36718bd0a6df9e5e0ffea4ae22afb22cfef886372 + languageName: node + linkType: hard + +"@babel/plugin-transform-numeric-separator@npm:^7.22.11": + version: 7.22.11 + resolution: "@babel/plugin-transform-numeric-separator@npm:7.22.11" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-numeric-separator": ^7.10.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: af064d06a4a041767ec396a5f258103f64785df290e038bba9f0ef454e6c914f2ac45d862bbdad8fac2c7ad47fa4e95356f29053c60c100a0160b02a995fe2a3 + languageName: node + linkType: hard + +"@babel/plugin-transform-object-rest-spread@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/plugin-transform-object-rest-spread@npm:7.22.15" + dependencies: + "@babel/compat-data": ^7.22.9 + "@babel/helper-compilation-targets": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-object-rest-spread": ^7.8.3 + "@babel/plugin-transform-parameters": ^7.22.15 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 62197a6f12289c1c1bd57f3bed9f0f765ca32390bfe91e0b5561dd94dd9770f4480c4162dec98da094bc0ba99d2c2ebba68de47c019454041b0b7a68ba2ec66d + languageName: node + linkType: hard + "@babel/plugin-transform-object-super@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-object-super@npm:7.14.5" @@ -3789,6 +4567,43 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-object-super@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-object-super@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-replace-supers": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: b71887877d74cb64dbccb5c0324fa67e31171e6a5311991f626650e44a4083e5436a1eaa89da78c0474fb095d4ec322d63ee778b202d33aa2e4194e1ed8e62d7 + languageName: node + linkType: hard + +"@babel/plugin-transform-optional-catch-binding@npm:^7.22.11": + version: 7.22.11 + resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.22.11" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: f17abd90e1de67c84d63afea29c8021c74abb2794d3a6eeafb0bbe7372d3db32aefca386e392116ec63884537a4a2815d090d26264d259bacc08f6e3ed05294c + languageName: node + linkType: hard + +"@babel/plugin-transform-optional-chaining@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/plugin-transform-optional-chaining@npm:7.22.15" + 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: 6b97abe0e50ca2dd8684fcef2c8d12607637e707aa9d513b7035f5e812efbde9305736b438d422103a7844e04124cad5efa4ff0e6226a57afa1210a1c7485c8e + languageName: node + linkType: hard + "@babel/plugin-transform-parameters@npm:^7.12.1, @babel/plugin-transform-parameters@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-parameters@npm:7.14.5" @@ -3833,6 +4648,43 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-parameters@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/plugin-transform-parameters@npm:7.22.15" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 541188bb7d1876cad87687b5c7daf90f63d8208ae83df24acb1e2b05020ad1c78786b2723ca4054a83fcb74fb6509f30c4cacc5b538ee684224261ad5fb047c1 + languageName: node + linkType: hard + +"@babel/plugin-transform-private-methods@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-private-methods@npm:7.22.5" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 321479b4fcb6d3b3ef622ab22fd24001e43d46e680e8e41324c033d5810c84646e470f81b44cbcbef5c22e99030784f7cac92f1829974da7a47a60a7139082c3 + languageName: node + linkType: hard + +"@babel/plugin-transform-private-property-in-object@npm:^7.22.11": + version: 7.22.11 + resolution: "@babel/plugin-transform-private-property-in-object@npm:7.22.11" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-create-class-features-plugin": ^7.22.11 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-private-property-in-object": ^7.14.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 4d029d84901e53c46dead7a46e2990a7bc62470f4e4ca58a0d063394f86652fd58fe4eea1eb941da3669cd536b559b9d058b342b59300026346b7a2a51badac8 + languageName: node + linkType: hard + "@babel/plugin-transform-property-literals@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-property-literals@npm:7.14.5" @@ -3866,6 +4718,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-property-literals@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-property-literals@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 796176a3176106f77fcb8cd04eb34a8475ce82d6d03a88db089531b8f0453a2fb8b0c6ec9a52c27948bc0ea478becec449893741fc546dfc3930ab927e3f9f2e + languageName: node + linkType: hard + "@babel/plugin-transform-react-constant-elements@npm:^7.14.5": version: 7.16.0 resolution: "@babel/plugin-transform-react-constant-elements@npm:7.16.0" @@ -3921,6 +4784,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-react-display-name@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-react-display-name@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: a12bfd1e4e93055efca3ace3c34722571bda59d9740dca364d225d9c6e3ca874f134694d21715c42cc63d79efd46db9665bd4a022998767f9245f1e29d5d204d + languageName: node + linkType: hard + "@babel/plugin-transform-react-jsx-development@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-react-jsx-development@npm:7.14.5" @@ -3954,6 +4828,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-react-jsx-development@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-react-jsx-development@npm:7.22.5" + dependencies: + "@babel/plugin-transform-react-jsx": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 36bc3ff0b96bb0ef4723070a50cfdf2e72cfd903a59eba448f9fe92fea47574d6f22efd99364413719e1f3fb3c51b6c9b2990b87af088f8486a84b2a5f9e4560 + languageName: node + linkType: hard + "@babel/plugin-transform-react-jsx-self@npm:^7.18.6": version: 7.21.0 resolution: "@babel/plugin-transform-react-jsx-self@npm:7.21.0" @@ -4021,6 +4906,21 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-react-jsx@npm:^7.22.15, @babel/plugin-transform-react-jsx@npm:^7.22.5": + version: 7.22.15 + resolution: "@babel/plugin-transform-react-jsx@npm:7.22.15" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-module-imports": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-jsx": ^7.22.5 + "@babel/types": ^7.22.15 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 3899054e89550c3a0ef041af7c47ee266e2e934f498ee80fefeda778a6aa177b48aa8b4d2a8bf5848de977fec564571699ab952d9fa089c4c19b45ddb121df09 + languageName: node + linkType: hard + "@babel/plugin-transform-react-pure-annotations@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-react-pure-annotations@npm:7.14.5" @@ -4057,6 +4957,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-react-pure-annotations@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-react-pure-annotations@npm:7.22.5" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 092021c4f404e267002099ec20b3f12dd730cb90b0d83c5feed3dc00dbe43b9c42c795a18e7c6c7d7bddea20c7dd56221b146aec81b37f2e7eb5137331c61120 + languageName: node + linkType: hard + "@babel/plugin-transform-regenerator@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-regenerator@npm:7.14.5" @@ -4091,6 +5003,18 @@ __metadata: languageName: node linkType: hard +"@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.2 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: e13678d62d6fa96f11cb8b863f00e8693491e7adc88bfca3f2820f80cbac8336e7dec3a596eee6a1c4663b7ececc3564f2cd7fb44ed6d4ce84ac2bb7f39ecc6e + languageName: node + linkType: hard + "@babel/plugin-transform-reserved-words@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-reserved-words@npm:7.14.5" @@ -4124,6 +5048,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-reserved-words@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-reserved-words@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 3ffd7dbc425fe8132bfec118b9817572799cab1473113a635d25ab606c1f5a2341a636c04cf6b22df3813320365ed5a965b5eeb3192320a10e4cc2c137bd8bfc + languageName: node + linkType: hard + "@babel/plugin-transform-runtime@npm:7.15.0": version: 7.15.0 resolution: "@babel/plugin-transform-runtime@npm:7.15.0" @@ -4173,6 +5108,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-shorthand-properties@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-shorthand-properties@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: a5ac902c56ea8effa99f681340ee61bac21094588f7aef0bc01dff98246651702e677552fa6d10e548c4ac22a3ffad047dd2f8c8f0540b68316c2c203e56818b + languageName: node + linkType: hard + "@babel/plugin-transform-spread@npm:^7.12.1, @babel/plugin-transform-spread@npm:^7.14.6": version: 7.14.6 resolution: "@babel/plugin-transform-spread@npm:7.14.6" @@ -4209,6 +5155,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-spread@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-spread@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-skip-transparent-expression-wrappers": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 5587f0deb60b3dfc9b274e269031cc45ec75facccf1933ea2ea71ced9fd3ce98ed91bb36d6cd26817c14474b90ed998c5078415f0eab531caf301496ce24c95c + languageName: node + linkType: hard + "@babel/plugin-transform-sticky-regex@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-sticky-regex@npm:7.14.5" @@ -4242,6 +5200,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-sticky-regex@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-sticky-regex@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 63b2c575e3e7f96c32d52ed45ee098fb7d354b35c2223b8c8e76840b32cc529ee0c0ceb5742fd082e56e91e3d82842a367ce177e82b05039af3d602c9627a729 + languageName: node + linkType: hard + "@babel/plugin-transform-template-literals@npm:^7.12.1, @babel/plugin-transform-template-literals@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-template-literals@npm:7.14.5" @@ -4275,6 +5244,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-template-literals@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-template-literals@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 27e9bb030654cb425381c69754be4abe6a7c75b45cd7f962cd8d604b841b2f0fb7b024f2efc1c25cc53f5b16d79d5e8cfc47cacbdaa983895b3aeefa3e7e24ff + languageName: node + linkType: hard + "@babel/plugin-transform-typeof-symbol@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-typeof-symbol@npm:7.14.5" @@ -4308,6 +5288,17 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-typeof-symbol@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-typeof-symbol@npm:7.22.5" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 82a53a63ffc3010b689ca9a54e5f53b2718b9f4b4a9818f36f9b7dba234f38a01876680553d2716a645a61920b5e6e4aaf8d4a0064add379b27ca0b403049512 + languageName: node + linkType: hard + "@babel/plugin-transform-typescript@npm:^7.15.0": version: 7.15.0 resolution: "@babel/plugin-transform-typescript@npm:7.15.0" @@ -4347,6 +5338,20 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-typescript@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/plugin-transform-typescript@npm:7.22.15" + dependencies: + "@babel/helper-annotate-as-pure": ^7.22.5 + "@babel/helper-create-class-features-plugin": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/plugin-syntax-typescript": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: c5d96cdbf0e1512707aa1c1e3ac6b370a25fd9c545d26008ce44eb13a47bd7fd67a1eb799c98b5ccc82e33a345fda55c0055e1fe3ed97646ed405dd13020b226 + languageName: node + linkType: hard + "@babel/plugin-transform-unicode-escapes@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-unicode-escapes@npm:7.14.5" @@ -4380,6 +5385,29 @@ __metadata: languageName: node linkType: hard +"@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: 807f40ed1324c8cb107c45358f1903384ca3f0ef1d01c5a3c5c9b271c8d8eec66936a3dcc8d75ddfceea9421420368c2e77ae3adef0a50557e778dfe296bf382 + languageName: node + linkType: hard + +"@babel/plugin-transform-unicode-property-regex@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.22.5" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 2495e5f663cb388e3d888b4ba3df419ac436a5012144ac170b622ddfc221f9ea9bdba839fa2bc0185cb776b578030666406452ec7791cbf0e7a3d4c88ae9574c + languageName: node + linkType: hard + "@babel/plugin-transform-unicode-regex@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-transform-unicode-regex@npm:7.14.5" @@ -4416,6 +5444,30 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-unicode-regex@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-unicode-regex@npm:7.22.5" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 6b5d1404c8c623b0ec9bd436c00d885a17d6a34f3f2597996343ddb9d94f6379705b21582dfd4cec2c47fd34068872e74ab6b9580116c0566b3f9447e2a7fa06 + languageName: node + linkType: hard + +"@babel/plugin-transform-unicode-sets-regex@npm:^7.22.5": + version: 7.22.5 + resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.22.5" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.22.5 + "@babel/helper-plugin-utils": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: c042070f980b139547f8b0179efbc049ac5930abec7fc26ed7a41d89a048d8ab17d362200e204b6f71c3c20d6991a0e74415e1a412a49adc8131c2a40c04822e + languageName: node + linkType: hard + "@babel/preset-env@npm:7.15.0, @babel/preset-env@npm:^7.12.11": version: 7.15.0 resolution: "@babel/preset-env@npm:7.15.0" @@ -4753,6 +5805,96 @@ __metadata: languageName: node linkType: hard +"@babel/preset-env@npm:^7.22.20, @babel/preset-env@npm:^7.22.9": + version: 7.22.20 + resolution: "@babel/preset-env@npm:7.22.20" + dependencies: + "@babel/compat-data": ^7.22.20 + "@babel/helper-compilation-targets": ^7.22.15 + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-option": ^7.22.15 + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": ^7.22.15 + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": ^7.22.15 + "@babel/plugin-proposal-private-property-in-object": 7.21.0-placeholder-for-preset-env.2 + "@babel/plugin-syntax-async-generators": ^7.8.4 + "@babel/plugin-syntax-class-properties": ^7.12.13 + "@babel/plugin-syntax-class-static-block": ^7.14.5 + "@babel/plugin-syntax-dynamic-import": ^7.8.3 + "@babel/plugin-syntax-export-namespace-from": ^7.8.3 + "@babel/plugin-syntax-import-assertions": ^7.22.5 + "@babel/plugin-syntax-import-attributes": ^7.22.5 + "@babel/plugin-syntax-import-meta": ^7.10.4 + "@babel/plugin-syntax-json-strings": ^7.8.3 + "@babel/plugin-syntax-logical-assignment-operators": ^7.10.4 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 + "@babel/plugin-syntax-numeric-separator": ^7.10.4 + "@babel/plugin-syntax-object-rest-spread": ^7.8.3 + "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 + "@babel/plugin-syntax-optional-chaining": ^7.8.3 + "@babel/plugin-syntax-private-property-in-object": ^7.14.5 + "@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.15 + "@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.15 + "@babel/plugin-transform-class-properties": ^7.22.5 + "@babel/plugin-transform-class-static-block": ^7.22.11 + "@babel/plugin-transform-classes": ^7.22.15 + "@babel/plugin-transform-computed-properties": ^7.22.5 + "@babel/plugin-transform-destructuring": ^7.22.15 + "@babel/plugin-transform-dotall-regex": ^7.22.5 + "@babel/plugin-transform-duplicate-keys": ^7.22.5 + "@babel/plugin-transform-dynamic-import": ^7.22.11 + "@babel/plugin-transform-exponentiation-operator": ^7.22.5 + "@babel/plugin-transform-export-namespace-from": ^7.22.11 + "@babel/plugin-transform-for-of": ^7.22.15 + "@babel/plugin-transform-function-name": ^7.22.5 + "@babel/plugin-transform-json-strings": ^7.22.11 + "@babel/plugin-transform-literals": ^7.22.5 + "@babel/plugin-transform-logical-assignment-operators": ^7.22.11 + "@babel/plugin-transform-member-expression-literals": ^7.22.5 + "@babel/plugin-transform-modules-amd": ^7.22.5 + "@babel/plugin-transform-modules-commonjs": ^7.22.15 + "@babel/plugin-transform-modules-systemjs": ^7.22.11 + "@babel/plugin-transform-modules-umd": ^7.22.5 + "@babel/plugin-transform-named-capturing-groups-regex": ^7.22.5 + "@babel/plugin-transform-new-target": ^7.22.5 + "@babel/plugin-transform-nullish-coalescing-operator": ^7.22.11 + "@babel/plugin-transform-numeric-separator": ^7.22.11 + "@babel/plugin-transform-object-rest-spread": ^7.22.15 + "@babel/plugin-transform-object-super": ^7.22.5 + "@babel/plugin-transform-optional-catch-binding": ^7.22.11 + "@babel/plugin-transform-optional-chaining": ^7.22.15 + "@babel/plugin-transform-parameters": ^7.22.15 + "@babel/plugin-transform-private-methods": ^7.22.5 + "@babel/plugin-transform-private-property-in-object": ^7.22.11 + "@babel/plugin-transform-property-literals": ^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.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.6-no-external-plugins + "@babel/types": ^7.22.19 + 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: 99357a5cb30f53bacdc0d1cd6dff0f052ea6c2d1ba874d969bba69897ef716e87283e84a59dc52fb49aa31fd1b6f55ed756c64c04f5678380700239f6030b881 + languageName: node + linkType: hard + "@babel/preset-flow@npm:^7.12.1": version: 7.14.5 resolution: "@babel/preset-flow@npm:7.14.5" @@ -4766,6 +5908,32 @@ __metadata: languageName: node linkType: hard +"@babel/preset-flow@npm:^7.13.13": + version: 7.22.15 + resolution: "@babel/preset-flow@npm:7.22.15" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-option": ^7.22.15 + "@babel/plugin-transform-flow-strip-types": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 17f8b80b1012802f983227b423c8823990db9748aec4f8bfd56ff774d8d954e9bdea67377788abac526754b3d307215c063c9beadf5f1b4331b30d4ba0593286 + languageName: node + linkType: hard + +"@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/types": ^7.4.4 + esutils: ^2.0.2 + peerDependencies: + "@babel/core": ^7.0.0-0 || ^8.0.0-0 <8.0.0 + checksum: 4855e799bc50f2449fb5210f78ea9e8fd46cf4f242243f1e2ed838e2bd702e25e73e822e7f8447722a5f4baa5e67a8f7a0e403f3e7ce04540ff743a9c411c375 + languageName: node + linkType: hard + "@babel/preset-modules@npm:^0.1.4": version: 0.1.4 resolution: "@babel/preset-modules@npm:0.1.4" @@ -4844,6 +6012,22 @@ __metadata: languageName: node linkType: hard +"@babel/preset-react@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/preset-react@npm:7.22.15" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-option": ^7.22.15 + "@babel/plugin-transform-react-display-name": ^7.22.5 + "@babel/plugin-transform-react-jsx": ^7.22.15 + "@babel/plugin-transform-react-jsx-development": ^7.22.5 + "@babel/plugin-transform-react-pure-annotations": ^7.22.5 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: c3ef99dfa2e9f57d2e08603e883aa20f47630a826c8e413888a93ae6e0084b5016871e463829be125329d40a1ba0a89f7c43d77b6dab52083c225cb43e63d10e + languageName: node + linkType: hard + "@babel/preset-typescript@npm:7.15.0, @babel/preset-typescript@npm:^7.12.7": version: 7.15.0 resolution: "@babel/preset-typescript@npm:7.15.0" @@ -4857,6 +6041,21 @@ __metadata: languageName: node linkType: hard +"@babel/preset-typescript@npm:^7.13.0, @babel/preset-typescript@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/preset-typescript@npm:7.22.15" + dependencies: + "@babel/helper-plugin-utils": ^7.22.5 + "@babel/helper-validator-option": ^7.22.15 + "@babel/plugin-syntax-jsx": ^7.22.5 + "@babel/plugin-transform-modules-commonjs": ^7.22.15 + "@babel/plugin-transform-typescript": ^7.22.15 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 02ac4d5c812a52357c8f517f81584725f06f385d54ccfda89dd082e0ed89a94bd9f4d9b05fa1cbdcf426e3489c1921f04c93c5acc5deea83407a64c22ad2feb4 + languageName: node + linkType: hard + "@babel/preset-typescript@npm:^7.15.0, @babel/preset-typescript@npm:^7.16.0": version: 7.16.0 resolution: "@babel/preset-typescript@npm:7.16.0" @@ -4898,6 +6097,28 @@ __metadata: languageName: node linkType: hard +"@babel/register@npm:^7.13.16": + version: 7.22.15 + resolution: "@babel/register@npm:7.22.15" + dependencies: + clone-deep: ^4.0.1 + find-cache-dir: ^2.0.0 + make-dir: ^2.1.0 + pirates: ^4.0.5 + source-map-support: ^0.5.16 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 5497be6773608cd2d874210edd14499fce464ddbea170219da55955afe4c9173adb591164193458fd639e43b7d1314088a6186f4abf241476c59b3f0da6afd6f + languageName: node + linkType: hard + +"@babel/regjsgen@npm:^0.8.0": + version: 0.8.0 + resolution: "@babel/regjsgen@npm:0.8.0" + checksum: 89c338fee774770e5a487382170711014d49a68eb281e74f2b5eac88f38300a4ad545516a7786a8dd5702e9cf009c94c2f582d200f077ac5decd74c56b973730 + languageName: node + linkType: hard + "@babel/runtime-corejs3@npm:^7.10.2": version: 7.15.3 resolution: "@babel/runtime-corejs3@npm:7.15.3" @@ -5026,6 +6247,17 @@ __metadata: languageName: node linkType: hard +"@babel/template@npm:^7.22.15": + version: 7.22.15 + resolution: "@babel/template@npm:7.22.15" + dependencies: + "@babel/code-frame": ^7.22.13 + "@babel/parser": ^7.22.15 + "@babel/types": ^7.22.15 + checksum: 1f3e7dcd6c44f5904c184b3f7fe280394b191f2fed819919ffa1e529c259d5b197da8981b6ca491c235aee8dbad4a50b7e31304aa531271cb823a4a24a0dd8fd + languageName: node + linkType: hard + "@babel/template@npm:^7.22.5": version: 7.22.5 resolution: "@babel/template@npm:7.22.5" @@ -5197,6 +6429,24 @@ __metadata: languageName: node linkType: hard +"@babel/traverse@npm:^7.22.15, @babel/traverse@npm:^7.22.20, @babel/traverse@npm:^7.22.8": + version: 7.22.20 + resolution: "@babel/traverse@npm:7.22.20" + dependencies: + "@babel/code-frame": ^7.22.13 + "@babel/generator": ^7.22.15 + "@babel/helper-environment-visitor": ^7.22.20 + "@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.16 + "@babel/types": ^7.22.19 + debug: ^4.1.0 + globals: ^11.1.0 + checksum: 97da9afa7f8f505ce52c36ac2531129bc4a0e250880aaf9b467dc044f30a5bce2b756c1af4d961958bc225659546e811a7d536ab3d920fd60921087989b841b9 + languageName: node + linkType: hard + "@babel/traverse@npm:^7.22.5": version: 7.22.5 resolution: "@babel/traverse@npm:7.22.5" @@ -5322,6 +6572,17 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19": + version: 7.22.19 + resolution: "@babel/types@npm:7.22.19" + dependencies: + "@babel/helper-string-parser": ^7.22.5 + "@babel/helper-validator-identifier": ^7.22.19 + to-fast-properties: ^2.0.0 + checksum: 2d69740e69b55ba36ece0c17d5afb7b7213b34297157df39ef9ba24965aff677c56f014413052ecc5b2fbbf26910c63e5bb24a969df84d7a17153750cf75915e + languageName: node + linkType: hard + "@babel/types@npm:^7.8.3": version: 7.22.10 resolution: "@babel/types@npm:7.22.10" @@ -6352,6 +7613,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 + "@emotion/utils@npm:0.11.3": version: 0.11.3 resolution: "@emotion/utils@npm:0.11.3" @@ -6425,6 +7695,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-arm64@npm:0.18.20" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/android-arm@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/android-arm@npm:0.16.17" @@ -6453,6 +7730,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-arm@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-arm@npm:0.18.20" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + "@esbuild/android-x64@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/android-x64@npm:0.16.17" @@ -6481,6 +7765,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-x64@npm:0.18.20" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + "@esbuild/darwin-arm64@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/darwin-arm64@npm:0.16.17" @@ -6509,6 +7800,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/darwin-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/darwin-arm64@npm:0.18.20" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/darwin-x64@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/darwin-x64@npm:0.16.17" @@ -6537,6 +7835,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/darwin-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/darwin-x64@npm:0.18.20" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + "@esbuild/freebsd-arm64@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/freebsd-arm64@npm:0.16.17" @@ -6565,6 +7870,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/freebsd-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/freebsd-arm64@npm:0.18.20" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/freebsd-x64@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/freebsd-x64@npm:0.16.17" @@ -6593,6 +7905,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/freebsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/freebsd-x64@npm:0.18.20" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/linux-arm64@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/linux-arm64@npm:0.16.17" @@ -6621,6 +7940,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-arm64@npm:0.18.20" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/linux-arm@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/linux-arm@npm:0.16.17" @@ -6649,6 +7975,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-arm@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-arm@npm:0.18.20" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + "@esbuild/linux-ia32@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/linux-ia32@npm:0.16.17" @@ -6677,6 +8010,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-ia32@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-ia32@npm:0.18.20" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + "@esbuild/linux-loong64@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/linux-loong64@npm:0.16.17" @@ -6705,6 +8045,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-loong64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-loong64@npm:0.18.20" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + "@esbuild/linux-mips64el@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/linux-mips64el@npm:0.16.17" @@ -6733,6 +8080,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-mips64el@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-mips64el@npm:0.18.20" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + "@esbuild/linux-ppc64@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/linux-ppc64@npm:0.16.17" @@ -6761,6 +8115,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-ppc64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-ppc64@npm:0.18.20" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + "@esbuild/linux-riscv64@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/linux-riscv64@npm:0.16.17" @@ -6789,6 +8150,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-riscv64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-riscv64@npm:0.18.20" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + "@esbuild/linux-s390x@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/linux-s390x@npm:0.16.17" @@ -6817,6 +8185,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-s390x@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-s390x@npm:0.18.20" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + "@esbuild/linux-x64@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/linux-x64@npm:0.16.17" @@ -6845,6 +8220,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-x64@npm:0.18.20" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + "@esbuild/netbsd-x64@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/netbsd-x64@npm:0.16.17" @@ -6873,6 +8255,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/netbsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/netbsd-x64@npm:0.18.20" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/openbsd-x64@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/openbsd-x64@npm:0.16.17" @@ -6901,6 +8290,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/openbsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/openbsd-x64@npm:0.18.20" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/sunos-x64@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/sunos-x64@npm:0.16.17" @@ -6929,6 +8325,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/sunos-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/sunos-x64@npm:0.18.20" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + "@esbuild/win32-arm64@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/win32-arm64@npm:0.16.17" @@ -6957,6 +8360,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-arm64@npm:0.18.20" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/win32-ia32@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/win32-ia32@npm:0.16.17" @@ -6985,6 +8395,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-ia32@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-ia32@npm:0.18.20" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + "@esbuild/win32-x64@npm:0.16.17": version: 0.16.17 resolution: "@esbuild/win32-x64@npm:0.16.17" @@ -7013,6 +8430,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-x64@npm:0.18.20" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@eslint-community/eslint-utils@npm:^4.1.2": version: 4.2.0 resolution: "@eslint-community/eslint-utils@npm:4.2.0" @@ -7107,6 +8531,13 @@ __metadata: languageName: node linkType: hard +"@fal-works/esbuild-plugin-global-externals@npm:^2.1.2": + version: 2.1.2 + resolution: "@fal-works/esbuild-plugin-global-externals@npm:2.1.2" + checksum: c59715902b9062aa7ff38973f298b509499fd146dbf564dc338b3f9e896da5bffb4ca676c27587fde79b3586003e24d65960acb62f009bca43dca34c76f8cbf7 + languageName: node + linkType: hard + "@figspec/components@npm:^1.0.0": version: 1.0.1 resolution: "@figspec/components@npm:1.0.1" @@ -7813,6 +9244,13 @@ __metadata: languageName: node linkType: hard +"@juggle/resize-observer@npm:^3.3.1": + version: 3.4.0 + resolution: "@juggle/resize-observer@npm:3.4.0" + checksum: 2505028c05cc2e17639fcad06218b1c4b60f932a4ebb4b41ab546ef8c157031ae377e3f560903801f6d01706dbefd4943b6c4704bf19ed86dfa1c62f1473a570 + languageName: node + linkType: hard + "@koralabs/handles-public-api-interfaces@npm:^1.6.6": version: 1.6.6 resolution: "@koralabs/handles-public-api-interfaces@npm:1.6.6" @@ -7841,6 +9279,7 @@ __metadata: "@lace/common": 0.1.0 "@lace/core": 0.1.0 "@lace/staking": 0.1.0 + "@lace/ui": ^0.1.0 "@react-rxjs/core": ^0.9.8 "@react-rxjs/utils": ^0.9.5 "@types/dotenv-webpack": 7.0.3 @@ -7961,7 +9400,25 @@ __metadata: resolution: "@lace/core@workspace:packages/core" dependencies: "@ant-design/icons": ^4.7.0 + "@babel/preset-env": ^7.22.20 + "@babel/preset-react": ^7.22.15 + "@babel/preset-typescript": ^7.22.15 "@lace/common": 0.1.0 + "@lace/ui": ^0.1.0 + "@storybook/addon-actions": ^6.5.16 + "@storybook/addon-essentials": ^6.5.16 + "@storybook/addon-interactions": ^6.5.16 + "@storybook/addon-links": ^6.5.16 + "@storybook/addon-styling": ^1.3.7 + "@storybook/addon-styling-webpack": ^0.0.5 + "@storybook/builder-webpack5": 6.5.16 + "@storybook/core-events": ^6.5.16 + "@storybook/jest": ^0.0.10 + "@storybook/manager-webpack5": 6.5.16 + "@storybook/react": ^6.5.16 + "@storybook/test-runner": ^0.10.0 + "@storybook/testing-library": ^0.0.13 + "@types/babel__preset-env": ^7 "@types/debounce-promise": ^3.1.6 antd: ^4.24.10 axios: 0.21.4 @@ -7976,6 +9433,8 @@ __metadata: react-dom: 17.0.2 react-i18next: 11.11.4 react-infinite-scroll-component: ^6.1.0 + sass: ^1.68.0 + storybook: ^7.4.3 typescript: ^4.3.5 zxcvbn: ^4.4.2 peerDependencies: @@ -8392,6 +9851,17 @@ __metadata: languageName: node linkType: hard +"@ndelangen/get-tarball@npm:^3.0.7": + version: 3.0.9 + resolution: "@ndelangen/get-tarball@npm:3.0.9" + dependencies: + gunzip-maybe: ^1.4.2 + pump: ^3.0.0 + tar-fs: ^2.1.1 + checksum: 7fa8ac40b4e85738a4ee6bf891bc27fce2445b65b4477e0ec86aed0fa62ab18bdf5d193ce04553ad9bfa639e1eef33b8b30da4ef3e7218f12bf95f24c8786e5b + languageName: node + linkType: hard + "@noble/hashes@npm:^1.2.0": version: 1.3.1 resolution: "@noble/hashes@npm:1.3.1" @@ -9468,6 +10938,34 @@ __metadata: 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-scroll-area@npm:^0.1.3": version: 0.1.4 resolution: "@radix-ui/react-scroll-area@npm:0.1.4" @@ -9488,6 +10986,66 @@ __metadata: 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-slider@npm:^1.1.2": version: 1.1.2 resolution: "@radix-ui/react-slider@npm:1.1.2" @@ -9635,6 +11193,80 @@ __metadata: 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-tooltip@npm:^1.0.6": version: 1.0.6 resolution: "@radix-ui/react-tooltip@npm:1.0.6" @@ -10539,6 +12171,62 @@ __metadata: languageName: node linkType: hard +"@storybook/addon-styling-webpack@npm:^0.0.5": + version: 0.0.5 + resolution: "@storybook/addon-styling-webpack@npm:0.0.5" + dependencies: + "@storybook/node-logger": ^7.0.12 + peerDependencies: + webpack: ^5.0.0 + checksum: 43462f6b05b660f9e6a8d70640efeedfaad314ebe65d7a172d84213c9ff9f1f78d69ec5d242914ea704ec6ae9c4fc12cf0a7130d10d29367397e5e2babe2b2ed + languageName: node + linkType: hard + +"@storybook/addon-styling@npm:^1.3.7": + version: 1.3.7 + resolution: "@storybook/addon-styling@npm:1.3.7" + dependencies: + "@babel/template": ^7.20.7 + "@babel/types": ^7.21.5 + "@storybook/api": ^7.0.12 + "@storybook/components": ^7.0.12 + "@storybook/core-common": ^7.0.12 + "@storybook/core-events": ^7.0.12 + "@storybook/manager-api": ^7.0.12 + "@storybook/node-logger": ^7.0.12 + "@storybook/preview-api": ^7.0.12 + "@storybook/theming": ^7.0.12 + "@storybook/types": ^7.0.12 + css-loader: ^6.7.3 + less-loader: ^11.1.0 + postcss-loader: ^7.2.4 + prettier: ^2.8.0 + resolve-url-loader: ^5.0.0 + sass-loader: ^13.2.2 + style-loader: ^3.3.2 + peerDependencies: + less: ^3.5.0 || ^4.0.0 + postcss: ^7.0.0 || ^8.0.1 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + webpack: ^5.0.0 + peerDependenciesMeta: + less: + optional: true + postcss: + optional: true + react: + optional: true + react-dom: + optional: true + webpack: + optional: true + bin: + addon-styling-setup: postinstall.js + checksum: 5bac1a4109d15a6371260270518b2eada77ab153ddd0b75bb3c4ae31ee8ea61b6acacbf258add5166ae8b8450654fffc6be105c08c2b0ebdc2540abf6dba15a1 + languageName: node + linkType: hard + "@storybook/addon-toolbars@npm:6.5.16": version: 6.5.16 resolution: "@storybook/addon-toolbars@npm:6.5.16" @@ -10840,6 +12528,48 @@ __metadata: languageName: node linkType: hard +"@storybook/api@npm:^7.0.12": + version: 7.5.0 + resolution: "@storybook/api@npm:7.5.0" + dependencies: + "@storybook/client-logger": 7.5.0 + "@storybook/manager-api": 7.5.0 + 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: 82fafa5963324d33f4860d2938dd8a4b6d70b810e5ec7678f676a0f288dfd9a5f1265a122d6341c9fff19be63cd2b0dcb0cc6549c840a1d6928290a3ffcda52f + languageName: node + linkType: hard + +"@storybook/builder-manager@npm:7.4.3": + version: 7.4.3 + resolution: "@storybook/builder-manager@npm:7.4.3" + dependencies: + "@fal-works/esbuild-plugin-global-externals": ^2.1.2 + "@storybook/core-common": 7.4.3 + "@storybook/manager": 7.4.3 + "@storybook/node-logger": 7.4.3 + "@types/ejs": ^3.1.1 + "@types/find-cache-dir": ^3.2.1 + "@yarnpkg/esbuild-plugin-pnp": ^3.0.0-rc.10 + browser-assert: ^1.2.1 + ejs: ^3.1.8 + esbuild: ^0.18.0 + esbuild-plugin-alias: ^0.2.1 + express: ^4.17.3 + find-cache-dir: ^3.0.0 + fs-extra: ^11.1.0 + process: ^0.11.10 + util: ^0.12.4 + checksum: bdbdf39f997e088aac54591e0705300f21bb01b52df46f125beadb45f2f90fb8afbd35ae1e514cc4c29c9fb2105fa3697482712157196d628583249c2a2b5fa2 + languageName: node + linkType: hard + "@storybook/builder-webpack4@npm:6.5.10": version: 6.5.10 resolution: "@storybook/builder-webpack4@npm:6.5.10" @@ -11146,6 +12876,86 @@ __metadata: languageName: node linkType: hard +"@storybook/channels@npm:7.4.3": + version: 7.4.3 + resolution: "@storybook/channels@npm:7.4.3" + dependencies: + "@storybook/client-logger": 7.4.3 + "@storybook/core-events": 7.4.3 + "@storybook/global": ^5.0.0 + qs: ^6.10.0 + telejson: ^7.2.0 + tiny-invariant: ^1.3.1 + checksum: 4028d8c96dd71b72fc3d27d346ce88ea73c5042648da3ea80c960b4bfee99de1e782aed03b775023616b753e3c6089f3c305c5635da1af0040270cfddd768fdd + languageName: node + linkType: hard + +"@storybook/channels@npm:7.5.0": + version: 7.5.0 + resolution: "@storybook/channels@npm:7.5.0" + dependencies: + "@storybook/client-logger": 7.5.0 + "@storybook/core-events": 7.5.0 + "@storybook/global": ^5.0.0 + qs: ^6.10.0 + telejson: ^7.2.0 + tiny-invariant: ^1.3.1 + checksum: dd318b3ab8c615b63b7f1d1c1b05ca31fb4985ba527a0ebb47d02498c18a826c78241985c644deaeaab32a4869e1cf67d40b2c7638905c01cf9942d30c0eb16d + languageName: node + linkType: hard + +"@storybook/cli@npm:7.4.3": + version: 7.4.3 + resolution: "@storybook/cli@npm:7.4.3" + dependencies: + "@babel/core": ^7.22.9 + "@babel/preset-env": ^7.22.9 + "@babel/types": ^7.22.5 + "@ndelangen/get-tarball": ^3.0.7 + "@storybook/codemod": 7.4.3 + "@storybook/core-common": 7.4.3 + "@storybook/core-events": 7.4.3 + "@storybook/core-server": 7.4.3 + "@storybook/csf-tools": 7.4.3 + "@storybook/node-logger": 7.4.3 + "@storybook/telemetry": 7.4.3 + "@storybook/types": 7.4.3 + "@types/semver": ^7.3.4 + "@yarnpkg/fslib": 2.10.3 + "@yarnpkg/libzip": 2.3.0 + chalk: ^4.1.0 + commander: ^6.2.1 + cross-spawn: ^7.0.3 + detect-indent: ^6.1.0 + envinfo: ^7.7.3 + execa: ^5.0.0 + express: ^4.17.3 + find-up: ^5.0.0 + fs-extra: ^11.1.0 + get-npm-tarball-url: ^2.0.3 + get-port: ^5.1.1 + giget: ^1.0.0 + globby: ^11.0.2 + jscodeshift: ^0.14.0 + leven: ^3.1.0 + ora: ^5.4.1 + prettier: ^2.8.0 + prompts: ^2.4.0 + puppeteer-core: ^2.1.1 + read-pkg-up: ^7.0.1 + semver: ^7.3.7 + simple-update-notifier: ^2.0.0 + strip-json-comments: ^3.0.1 + tempy: ^1.0.1 + ts-dedent: ^2.0.0 + util-deprecate: ^1.0.2 + bin: + getstorybook: ./bin/index.js + sb: ./bin/index.js + checksum: cf762d80f422fa4bf448c080286b35b7081e274d7d432f7764cfbbe8f07af87fadd5eb81f7f6b73ff0c2a6d46e0d948514aee20ad0d51b1032ebc7e6de17ed97 + languageName: node + linkType: hard + "@storybook/client-api@npm:6.5.10": version: 6.5.10 resolution: "@storybook/client-api@npm:6.5.10" @@ -11267,6 +13077,46 @@ __metadata: languageName: node linkType: hard +"@storybook/client-logger@npm:7.4.3": + version: 7.4.3 + resolution: "@storybook/client-logger@npm:7.4.3" + dependencies: + "@storybook/global": ^5.0.0 + checksum: 442bd48c0b513c2bcce2d171e2ffc854f81a905597b1038fb384e2754a74bf1f59aa78d22480ad70fcb4efda0f5b70734021e8ee06cb77047a902eed37648ab1 + languageName: node + linkType: hard + +"@storybook/client-logger@npm:7.5.0": + version: 7.5.0 + resolution: "@storybook/client-logger@npm:7.5.0" + dependencies: + "@storybook/global": ^5.0.0 + checksum: 00f976e0d71107f9f07d98d3c1741ebb647cb50f3448377be481633198742a335a7178414cad5cb30f8327cfc5842f2726fbe5e5a7eafeed999a6f7cdab77e41 + languageName: node + linkType: hard + +"@storybook/codemod@npm:7.4.3": + version: 7.4.3 + resolution: "@storybook/codemod@npm:7.4.3" + dependencies: + "@babel/core": ^7.22.9 + "@babel/preset-env": ^7.22.9 + "@babel/types": ^7.22.5 + "@storybook/csf": ^0.1.0 + "@storybook/csf-tools": 7.4.3 + "@storybook/node-logger": 7.4.3 + "@storybook/types": 7.4.3 + "@types/cross-spawn": ^6.0.2 + cross-spawn: ^7.0.3 + globby: ^11.0.2 + jscodeshift: ^0.14.0 + lodash: ^4.17.21 + prettier: ^2.8.0 + recast: ^0.23.1 + checksum: ba33c1497960c19c9873581412052c13c23565882fd57e17408fdb4094fa6d572a330ef624ef662954d7f46b8b4c9b4b0ebb0e6f24caa2927f4d03fa1f7c5b63 + languageName: node + linkType: hard + "@storybook/components@npm:6.5.10": version: 6.5.10 resolution: "@storybook/components@npm:6.5.10" @@ -11305,6 +13155,27 @@ __metadata: languageName: node linkType: hard +"@storybook/components@npm:^7.0.12": + version: 7.5.0 + resolution: "@storybook/components@npm:7.5.0" + dependencies: + "@radix-ui/react-select": ^1.2.2 + "@radix-ui/react-toolbar": ^1.0.4 + "@storybook/client-logger": 7.5.0 + "@storybook/csf": ^0.1.0 + "@storybook/global": ^5.0.0 + "@storybook/theming": 7.5.0 + "@storybook/types": 7.5.0 + 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: 5c8e194c2a827e9bf48f4237d00b4875022f1ad12855031a76f069cb4a679bc3a53ae6dfd15fe779578de8fdcaf3fbc28f2e0d681a2d8a2581ee39a5a29a020e + languageName: node + linkType: hard + "@storybook/components@npm:~6.3.0": version: 6.3.13 resolution: "@storybook/components@npm:6.3.13" @@ -11538,6 +13409,37 @@ __metadata: languageName: node linkType: hard +"@storybook/core-common@npm:7.4.3": + version: 7.4.3 + resolution: "@storybook/core-common@npm:7.4.3" + dependencies: + "@storybook/core-events": 7.4.3 + "@storybook/node-logger": 7.4.3 + "@storybook/types": 7.4.3 + "@types/find-cache-dir": ^3.2.1 + "@types/node": ^16.0.0 + "@types/node-fetch": ^2.6.4 + "@types/pretty-hrtime": ^1.0.0 + chalk: ^4.1.0 + esbuild: ^0.18.0 + esbuild-register: ^3.4.0 + file-system-cache: 2.3.0 + find-cache-dir: ^3.0.0 + find-up: ^5.0.0 + fs-extra: ^11.1.0 + glob: ^10.0.0 + handlebars: ^4.7.7 + lazy-universal-dotenv: ^4.0.0 + node-fetch: ^2.0.0 + picomatch: ^2.3.0 + pkg-dir: ^5.0.0 + pretty-hrtime: ^1.0.3 + resolve-from: ^5.0.0 + ts-dedent: ^2.0.0 + checksum: e81afc618648d9f41643eaeca68458bccdd350432023de43a4f3db1f5732e7d689e3527f077c2a2c48271918417684a303ee755b4a14e543edf0808c36295435 + languageName: node + linkType: hard + "@storybook/core-common@npm:^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0": version: 7.0.2 resolution: "@storybook/core-common@npm:7.0.2" @@ -11565,6 +13467,37 @@ __metadata: languageName: node linkType: hard +"@storybook/core-common@npm:^7.0.12": + version: 7.5.0 + resolution: "@storybook/core-common@npm:7.5.0" + dependencies: + "@storybook/core-events": 7.5.0 + "@storybook/node-logger": 7.5.0 + "@storybook/types": 7.5.0 + "@types/find-cache-dir": ^3.2.1 + "@types/node": ^18.0.0 + "@types/node-fetch": ^2.6.4 + "@types/pretty-hrtime": ^1.0.0 + chalk: ^4.1.0 + esbuild: ^0.18.0 + esbuild-register: ^3.5.0 + file-system-cache: 2.3.0 + find-cache-dir: ^3.0.0 + find-up: ^5.0.0 + fs-extra: ^11.1.0 + glob: ^10.0.0 + handlebars: ^4.7.7 + lazy-universal-dotenv: ^4.0.0 + node-fetch: ^2.0.0 + picomatch: ^2.3.0 + pkg-dir: ^5.0.0 + pretty-hrtime: ^1.0.3 + resolve-from: ^5.0.0 + ts-dedent: ^2.0.0 + checksum: 88300d4a8fc61c2dcc87a24ed54d61d5a9591655694e59b4bad67fd053b8db842500082bf5487ca477209e8dc1fe35a2127958342d4b41ce5c6c2584a59995f7 + languageName: node + linkType: hard + "@storybook/core-events@npm:6.3.13, @storybook/core-events@npm:~6.3.0": version: 6.3.13 resolution: "@storybook/core-events@npm:6.3.13" @@ -11601,7 +13534,7 @@ __metadata: languageName: node linkType: hard -"@storybook/core-events@npm:6.5.16": +"@storybook/core-events@npm:6.5.16, @storybook/core-events@npm:^6.5.16": version: 6.5.16 resolution: "@storybook/core-events@npm:6.5.16" dependencies: @@ -11617,6 +13550,24 @@ __metadata: languageName: node linkType: hard +"@storybook/core-events@npm:7.4.3": + version: 7.4.3 + resolution: "@storybook/core-events@npm:7.4.3" + dependencies: + ts-dedent: ^2.0.0 + checksum: ffe6c5a0a7db32a42fcbe2fbe027977f071c458da621793468409ac29808a24573f94f083362200dde4b00bc14b00a66053ace4c9e3686b442ee2e4a126c9855 + languageName: node + linkType: hard + +"@storybook/core-events@npm:7.5.0, @storybook/core-events@npm:^7.0.12": + version: 7.5.0 + resolution: "@storybook/core-events@npm:7.5.0" + dependencies: + ts-dedent: ^2.0.0 + checksum: 829321419c5e5e21c17e72c4006004e73b24648e065ed5b278074317f5d57ce896a1a28deff51184ae44fd8a9d463519ab261bbe5a17736ca50ff7c5bbcb44f9 + languageName: node + linkType: hard + "@storybook/core-server@npm:6.5.10": version: 6.5.10 resolution: "@storybook/core-server@npm:6.5.10" @@ -11743,6 +13694,56 @@ __metadata: languageName: node linkType: hard +"@storybook/core-server@npm:7.4.3": + version: 7.4.3 + resolution: "@storybook/core-server@npm:7.4.3" + dependencies: + "@aw-web-design/x-default-browser": 1.4.126 + "@discoveryjs/json-ext": ^0.5.3 + "@storybook/builder-manager": 7.4.3 + "@storybook/channels": 7.4.3 + "@storybook/core-common": 7.4.3 + "@storybook/core-events": 7.4.3 + "@storybook/csf": ^0.1.0 + "@storybook/csf-tools": 7.4.3 + "@storybook/docs-mdx": ^0.1.0 + "@storybook/global": ^5.0.0 + "@storybook/manager": 7.4.3 + "@storybook/node-logger": 7.4.3 + "@storybook/preview-api": 7.4.3 + "@storybook/telemetry": 7.4.3 + "@storybook/types": 7.4.3 + "@types/detect-port": ^1.3.0 + "@types/node": ^16.0.0 + "@types/pretty-hrtime": ^1.0.0 + "@types/semver": ^7.3.4 + better-opn: ^3.0.2 + chalk: ^4.1.0 + cli-table3: ^0.6.1 + compression: ^1.7.4 + detect-port: ^1.3.0 + express: ^4.17.3 + fs-extra: ^11.1.0 + globby: ^11.0.2 + ip: ^2.0.0 + lodash: ^4.17.21 + open: ^8.4.0 + pretty-hrtime: ^1.0.3 + prompts: ^2.4.0 + read-pkg-up: ^7.0.1 + semver: ^7.3.7 + serve-favicon: ^2.5.0 + telejson: ^7.2.0 + tiny-invariant: ^1.3.1 + ts-dedent: ^2.0.0 + util: ^0.12.4 + util-deprecate: ^1.0.2 + watchpack: ^2.2.0 + ws: ^8.2.3 + checksum: 4465b9285d2b6ff036e00f4c0e9100b84ced1c51a43d107c6cd618c366fe09cbb3f10aeb7d7b96aeb2afb255893ff077d2cad8f36cb61b81027fa7a8a908be0c + languageName: node + linkType: hard + "@storybook/core@npm:6.5.10": version: 6.5.10 resolution: "@storybook/core@npm:6.5.10" @@ -11839,6 +13840,23 @@ __metadata: languageName: node linkType: hard +"@storybook/csf-tools@npm:7.4.3": + version: 7.4.3 + resolution: "@storybook/csf-tools@npm:7.4.3" + dependencies: + "@babel/generator": ^7.22.9 + "@babel/parser": ^7.22.7 + "@babel/traverse": ^7.22.8 + "@babel/types": ^7.22.5 + "@storybook/csf": ^0.1.0 + "@storybook/types": 7.4.3 + fs-extra: ^11.1.0 + recast: ^0.23.1 + ts-dedent: ^2.0.0 + checksum: 6910d1613c8fa1b411bda1d23e4d03259152b03589b56e952165d3586bebfdd1d70b8dfba3ed8a2e67dbec4da6f48804ff448d58dab14e94c945decf1c264475 + languageName: node + linkType: hard + "@storybook/csf-tools@npm:^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0": version: 7.0.2 resolution: "@storybook/csf-tools@npm:7.0.2" @@ -11883,6 +13901,13 @@ __metadata: languageName: node linkType: hard +"@storybook/docs-mdx@npm:^0.1.0": + version: 0.1.0 + resolution: "@storybook/docs-mdx@npm:0.1.0" + checksum: a7770842c3947a761bcbe776a9c4fd35163d30c3274fca034169f69ff614242eaa4cacaa2c95fd215827081ef9a43f4774d521a6f43a4d063ea5f4ea14b1d69a + languageName: node + linkType: hard + "@storybook/docs-tools@npm:6.5.10": version: 6.5.10 resolution: "@storybook/docs-tools@npm:6.5.10" @@ -11967,6 +13992,32 @@ __metadata: languageName: node linkType: hard +"@storybook/manager-api@npm:7.5.0, @storybook/manager-api@npm:^7.0.12": + version: 7.5.0 + resolution: "@storybook/manager-api@npm:7.5.0" + dependencies: + "@storybook/channels": 7.5.0 + "@storybook/client-logger": 7.5.0 + "@storybook/core-events": 7.5.0 + "@storybook/csf": ^0.1.0 + "@storybook/global": ^5.0.0 + "@storybook/router": 7.5.0 + "@storybook/theming": 7.5.0 + "@storybook/types": 7.5.0 + dequal: ^2.0.2 + lodash: ^4.17.21 + memoizerific: ^1.11.3 + semver: ^7.3.7 + store2: ^2.14.2 + telejson: ^7.2.0 + 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: c651ed1594f7bd704a846c2ba782785a0fdf83779d10b400b034711e65e40975e67d8cc484d5753523d2341112dd7e63b49dc71b04803b7a718b793b08adabf7 + languageName: node + linkType: hard + "@storybook/manager-webpack4@npm:6.5.10": version: 6.5.10 resolution: "@storybook/manager-webpack4@npm:6.5.10" @@ -12111,6 +14162,13 @@ __metadata: languageName: node linkType: hard +"@storybook/manager@npm:7.4.3": + version: 7.4.3 + resolution: "@storybook/manager@npm:7.4.3" + checksum: f7f78da50150dfc679242db97c8ebdf1da0592c6bf91e2c2daa70a263cd9e61a51e6d26cf331c3350b445bf5f3dd9f0a1e461c085fd2aaa52f35db4669be90d2 + languageName: node + linkType: hard + "@storybook/mdx1-csf@npm:^0.0.1": version: 0.0.1 resolution: "@storybook/mdx1-csf@npm:0.0.1" @@ -12168,6 +14226,20 @@ __metadata: languageName: node linkType: hard +"@storybook/node-logger@npm:7.4.3": + version: 7.4.3 + resolution: "@storybook/node-logger@npm:7.4.3" + checksum: 3d067b5e51f52622f4f950fb9bc3584dddc80e30cfd5348936c361ad6ea3006c99fcb23a29f57290b77c770c082f766ede177405d57a7fd68fad7881f6844bfc + languageName: node + linkType: hard + +"@storybook/node-logger@npm:7.5.0, @storybook/node-logger@npm:^7.0.12": + version: 7.5.0 + resolution: "@storybook/node-logger@npm:7.5.0" + checksum: e6288f345f2a0a1db7fb3a6605910b37d844d4e4fedc2459ae2825a924e8c15453436d074fd1d87e89e82108eab6f32bd3870402ec25f381f572024f73b67319 + languageName: node + linkType: hard + "@storybook/postinstall@npm:6.5.16": version: 6.5.16 resolution: "@storybook/postinstall@npm:6.5.16" @@ -12177,6 +14249,28 @@ __metadata: languageName: node linkType: hard +"@storybook/preview-api@npm:7.4.3": + version: 7.4.3 + resolution: "@storybook/preview-api@npm:7.4.3" + dependencies: + "@storybook/channels": 7.4.3 + "@storybook/client-logger": 7.4.3 + "@storybook/core-events": 7.4.3 + "@storybook/csf": ^0.1.0 + "@storybook/global": ^5.0.0 + "@storybook/types": 7.4.3 + "@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: 2347e122283847c4b02741e487f121a929288b0fcad589f2ef07b8b42352c0d652a33a31c44cbe492176a691929e3d27936232f53bed2834bb67146a2101f470 + languageName: node + linkType: hard + "@storybook/preview-api@npm:^7.0.0-beta.0 || ^7.0.0-rc.0 || ^7.0.0": version: 7.0.2 resolution: "@storybook/preview-api@npm:7.0.2" @@ -12200,6 +14294,28 @@ __metadata: languageName: node linkType: hard +"@storybook/preview-api@npm:^7.0.12": + version: 7.5.0 + resolution: "@storybook/preview-api@npm:7.5.0" + dependencies: + "@storybook/channels": 7.5.0 + "@storybook/client-logger": 7.5.0 + "@storybook/core-events": 7.5.0 + "@storybook/csf": ^0.1.0 + "@storybook/global": ^5.0.0 + "@storybook/types": 7.5.0 + "@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: 43984ba7e3aafe3b32ac88adebb2dc898d5f96a991fe98a37524b02c2e8f887d4757d5b12ea5c5b812db173310076f2367e46f85ba21c4005591e87a100debc5 + languageName: node + linkType: hard + "@storybook/preview-web@npm:6.5.10": version: 6.5.10 resolution: "@storybook/preview-web@npm:6.5.10" @@ -12496,6 +14612,20 @@ __metadata: languageName: node linkType: hard +"@storybook/router@npm:7.5.0": + version: 7.5.0 + resolution: "@storybook/router@npm:7.5.0" + dependencies: + "@storybook/client-logger": 7.5.0 + 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: be37e8e525c1c2d7ad6da883a1d588dbf3fe182143dc02222f10a43baaed3b7259e8c7c7bf32ac54e26bdc58cfb040bb418d898d8d97e8107a83a9d3c7ccd139 + languageName: node + linkType: hard + "@storybook/semver@npm:^7.3.2": version: 7.3.2 resolution: "@storybook/semver@npm:7.3.2" @@ -12621,6 +14751,22 @@ __metadata: languageName: node linkType: hard +"@storybook/telemetry@npm:7.4.3": + version: 7.4.3 + resolution: "@storybook/telemetry@npm:7.4.3" + dependencies: + "@storybook/client-logger": 7.4.3 + "@storybook/core-common": 7.4.3 + "@storybook/csf-tools": 7.4.3 + chalk: ^4.1.0 + detect-package-manager: ^2.0.1 + fetch-retry: ^5.0.2 + fs-extra: ^11.1.0 + read-pkg-up: ^7.0.1 + checksum: e2ecd2d6644cd0536554e270c552d45936c70d26230e24cc839a51c70340fdae3575017388a613ff549d5577238d748ca53ac8a1e9095ee76db291b3f0793b45 + languageName: node + linkType: hard + "@storybook/test-runner@npm:^0.10.0": version: 0.10.0 resolution: "@storybook/test-runner@npm:0.10.0" @@ -12757,6 +14903,21 @@ __metadata: languageName: node linkType: hard +"@storybook/theming@npm:7.5.0, @storybook/theming@npm:^7.0.12": + version: 7.5.0 + resolution: "@storybook/theming@npm:7.5.0" + dependencies: + "@emotion/use-insertion-effect-with-fallbacks": ^1.0.0 + "@storybook/client-logger": 7.5.0 + "@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: d7e94fb094daf3a064ab5ad65104f60d82ccf3cf7a9b194174725d9e96f888f1c3378e59a3c7dfc4a7e745354f504fd6f5e3145e69e315470ca6c004c3a7fdc5 + languageName: node + linkType: hard + "@storybook/types@npm:7.0.2": version: 7.0.2 resolution: "@storybook/types@npm:7.0.2" @@ -12769,6 +14930,30 @@ __metadata: languageName: node linkType: hard +"@storybook/types@npm:7.4.3": + version: 7.4.3 + resolution: "@storybook/types@npm:7.4.3" + dependencies: + "@storybook/channels": 7.4.3 + "@types/babel__core": ^7.0.0 + "@types/express": ^4.7.0 + file-system-cache: 2.3.0 + checksum: 4108d185086884b742258edc67b9f3837099e63f3b902889f927e0e9cb34ba4da37fbcbe94235388672ba20eefac6f397cd0113e8e873538f31eda521dfb1365 + languageName: node + linkType: hard + +"@storybook/types@npm:7.5.0, @storybook/types@npm:^7.0.12": + version: 7.5.0 + resolution: "@storybook/types@npm:7.5.0" + dependencies: + "@storybook/channels": 7.5.0 + "@types/babel__core": ^7.0.0 + "@types/express": ^4.7.0 + file-system-cache: 2.3.0 + checksum: e74f807660eb9a626c3aea1822d7eb412b4ea129e5254e4e2b8e6f2af292d4ea797ad73e1b64e36ba44fdd3015297f2fde095fdc80690f56f5e050fc1d5576f7 + languageName: node + linkType: hard + "@storybook/ui@npm:6.5.10": version: 6.5.10 resolution: "@storybook/ui@npm:6.5.10" @@ -14157,6 +16342,13 @@ __metadata: languageName: node linkType: hard +"@types/babel__preset-env@npm:^7": + version: 7.9.3 + resolution: "@types/babel__preset-env@npm:7.9.3" + checksum: 7e89a37c4a7ebe841e0bc610e19497fe0642d741e8651c52ea4727782e46ea47d2aaf2656927a684c6618d8981b0febc1fc8c82c4a1d84b4ec5793a283e1ef7f + languageName: node + linkType: hard + "@types/babel__template@npm:*": version: 7.4.1 resolution: "@types/babel__template@npm:7.4.1" @@ -14283,6 +16475,15 @@ __metadata: languageName: node linkType: hard +"@types/cross-spawn@npm:^6.0.2": + version: 6.0.3 + resolution: "@types/cross-spawn@npm:6.0.3" + dependencies: + "@types/node": "*" + checksum: 06d50fa1e1370ef60b9c9085b76adec7d7bc20728fbb02b3c2061d4d922312acf1ba56a7c94d88c27a22fc6241ab6b970c936f3294038a9c97a719fbc8eb8a76 + languageName: node + linkType: hard + "@types/d3-array@npm:^3.0.3": version: 3.0.5 resolution: "@types/d3-array@npm:3.0.5" @@ -14368,6 +16569,13 @@ __metadata: languageName: node linkType: hard +"@types/detect-port@npm:^1.3.0": + version: 1.3.3 + resolution: "@types/detect-port@npm:1.3.3" + checksum: 0dadb520286a5cfd2832d12189dc795cc3589dfd9166d1b033453fb94b0212c4067a847045833e85b0f7c73135c944cb4ccb49c8e683491845c2e8a3da5d5c1c + languageName: node + linkType: hard + "@types/docker-modem@npm:*": version: 3.0.2 resolution: "@types/docker-modem@npm:3.0.2" @@ -14399,6 +16607,20 @@ __metadata: languageName: node linkType: hard +"@types/ejs@npm:^3.1.1": + version: 3.1.2 + resolution: "@types/ejs@npm:3.1.2" + checksum: e4f0745b6ed53a63c08bdfdeb019a7d0e0c400896722b44d6732b4ee6bf6061d2dc965206186b8b0ae2ecd71303c29f1af1feddbca2df0acbd7bd234a74ca518 + languageName: node + linkType: hard + +"@types/emscripten@npm:^1.39.6": + version: 1.39.7 + resolution: "@types/emscripten@npm:1.39.7" + checksum: 9871e4495358cc06cc45b2798022cd097d8ac2eb5b2fae7c276c6c5cadea05507150fad053c73ed346d4cbd844c50a3438604e5d7c3c2a7446b703cacb1ce172 + languageName: node + linkType: hard + "@types/eslint-scope@npm:^3.7.0": version: 3.7.1 resolution: "@types/eslint-scope@npm:3.7.1" @@ -14538,6 +16760,13 @@ __metadata: languageName: node linkType: hard +"@types/find-cache-dir@npm:^3.2.1": + version: 3.2.1 + resolution: "@types/find-cache-dir@npm:3.2.1" + checksum: bf5c4e96da40247cd9e6327f54dfccda961a0fb2d70e3c71bd05def94de4c2e6fb310fe8ecb0f04ecf5dbc52214e184b55a2337b0f87250d4ae1e2e7d58321e4 + languageName: node + linkType: hard + "@types/flat@npm:5.0.2": version: 5.0.2 resolution: "@types/flat@npm:5.0.2" @@ -14786,6 +17015,13 @@ __metadata: languageName: node linkType: hard +"@types/mime-types@npm:^2.1.0": + version: 2.1.1 + resolution: "@types/mime-types@npm:2.1.1" + checksum: 106b5d556add46446a579ad25ff15d6b421851790d887edcad558c90c1e64b1defc72bfbaf4b08f208916e21d9cc45cdb951d77be51268b18221544cfe054a3c + languageName: node + linkType: hard + "@types/mime@npm:*": version: 3.0.1 resolution: "@types/mime@npm:3.0.1" @@ -14831,6 +17067,16 @@ __metadata: languageName: node linkType: hard +"@types/node-fetch@npm:^2.6.4": + version: 2.6.5 + resolution: "@types/node-fetch@npm:2.6.5" + dependencies: + "@types/node": "*" + form-data: ^4.0.0 + checksum: 686ee0d52bb82d73f82c0da0bb025d4af1ba7bd8df4edd09336f6179eb838b6d4b5f0a524677a8faec2b00918d1b08a1690d50fa592c9741a5df6a8041a52495 + languageName: node + linkType: hard + "@types/node@npm:*": version: 16.4.13 resolution: "@types/node@npm:16.4.13" @@ -14880,6 +17126,13 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^18.0.0": + version: 18.18.6 + resolution: "@types/node@npm:18.18.6" + checksum: a847639b8455fd3dfa6dbc2917274c82c9db789f1d41aaf69f94ac6c9e54c3c1dd29be6e1e1ccd7c17e54db3d78d7011bc4e70544c6447ceca253dccc0a187e1 + languageName: node + linkType: hard + "@types/node@npm:^18.11.18": version: 18.15.0 resolution: "@types/node@npm:18.15.0" @@ -15164,6 +17417,13 @@ __metadata: languageName: node linkType: hard +"@types/semver@npm:^7.3.4": + version: 7.5.2 + resolution: "@types/semver@npm:7.5.2" + checksum: 743aa8a2b58e20b329c19bd2459152cb049d12fafab7279b90ac11e0f268c97efbcb606ea0c681cca03f79015381b40d9b1244349b354270bec3f939ed49f6e9 + languageName: node + linkType: hard + "@types/serve-index@npm:^1.9.1": version: 1.9.1 resolution: "@types/serve-index@npm:1.9.1" @@ -16966,6 +19226,37 @@ __metadata: languageName: node linkType: hard +"@yarnpkg/esbuild-plugin-pnp@npm:^3.0.0-rc.10": + version: 3.0.0-rc.15 + resolution: "@yarnpkg/esbuild-plugin-pnp@npm:3.0.0-rc.15" + dependencies: + tslib: ^2.4.0 + peerDependencies: + esbuild: ">=0.10.0" + checksum: 04da15355a99773b441742814ba4d0f3453a83df47aa07e215f167e156f109ab8e971489c8b1a4ddf3c79d568d35213f496ad52e97298228597e1aacc22680aa + languageName: node + linkType: hard + +"@yarnpkg/fslib@npm:2.10.3": + version: 2.10.3 + resolution: "@yarnpkg/fslib@npm:2.10.3" + dependencies: + "@yarnpkg/libzip": ^2.3.0 + tslib: ^1.13.0 + checksum: 0ca693f61d47bcf165411a121ed9123f512b1b5bfa5e1c6c8f280b4ffdbea9bf2a6db418f99ecfc9624587fdc695b2b64eb0fe7b4028e44095914b25ca99655e + languageName: node + linkType: hard + +"@yarnpkg/libzip@npm:2.3.0, @yarnpkg/libzip@npm:^2.3.0": + version: 2.3.0 + resolution: "@yarnpkg/libzip@npm:2.3.0" + dependencies: + "@types/emscripten": ^1.39.6 + tslib: ^1.13.0 + checksum: 533a4883f69bb013f955d80dc19719881697e6849ea5f0cbe6d87ef1d582b05cbae8a453802f92ad0c852f976296cac3ff7834be79a7e415b65cdf213e448110 + languageName: node + linkType: hard + "@zxing/text-encoding@npm:0.9.0": version: 0.9.0 resolution: "@zxing/text-encoding@npm:0.9.0" @@ -17187,6 +19478,23 @@ __metadata: languageName: node linkType: hard +"adjust-sourcemap-loader@npm:^4.0.0": + version: 4.0.0 + resolution: "adjust-sourcemap-loader@npm:4.0.0" + dependencies: + loader-utils: ^2.0.0 + regex-parser: ^2.2.11 + checksum: d524ae23582f41e2275af5d88faab7a9dc09770ed588244e0a76d3196d0d6a90bf02760c71bc6213dbfef3aef4a86232ac9521bfd629752c32b7af37bc74c660 + languageName: node + linkType: hard + +"agent-base@npm:5": + version: 5.1.1 + resolution: "agent-base@npm:5.1.1" + checksum: 61ae789f3019f1dc10e8cba6d3ae9826949299a4e54aaa1cfa2fa37c95a108e70e95423b963bb987d7891a703fd9a5c383a506f4901819f3ee56f3147c0aa8ab + languageName: node + linkType: hard + "agent-base@npm:6, agent-base@npm:^6.0.2": version: 6.0.2 resolution: "agent-base@npm:6.0.2" @@ -18094,6 +20402,15 @@ __metadata: languageName: node linkType: hard +"ast-types@npm:0.15.2": + version: 0.15.2 + resolution: "ast-types@npm:0.15.2" + dependencies: + tslib: ^2.0.1 + checksum: 24f0d86bf9e4c8dae16fa24b13c1776f2c2677040bcfbd4eb4f27911db49020be4876885e45e6cfcc548ed4dfea3a0742d77e3346b84fae47379cb0b89e9daa0 + languageName: node + linkType: hard + "ast-types@npm:^0.13.4": version: 0.13.4 resolution: "ast-types@npm:0.13.4" @@ -18158,6 +20475,13 @@ __metadata: languageName: node linkType: hard +"async-limiter@npm:~1.0.0": + version: 1.0.1 + resolution: "async-limiter@npm:1.0.1" + checksum: 2b849695b465d93ad44c116220dee29a5aeb63adac16c1088983c339b0de57d76e82533e8e364a93a9f997f28bbfc6a92948cefc120652bd07f3b59f8d75cf2b + languageName: node + linkType: hard + "async-validator@npm:^4.0.2": version: 4.0.7 resolution: "async-validator@npm:4.0.7" @@ -18308,6 +20632,15 @@ __metadata: languageName: node linkType: hard +"babel-core@npm:^7.0.0-bridge.0": + version: 7.0.0-bridge.0 + resolution: "babel-core@npm:7.0.0-bridge.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 2a1cb879019dffb08d17bec36e13c3a6d74c94773f41c1fd8b14de13f149cc34b705b0a1e07b42fcf35917b49d78db6ff0c5c3b00b202a5235013d517b5c6bbb + languageName: node + linkType: hard + "babel-eslint@npm:10.0.3": version: 10.0.3 resolution: "babel-eslint@npm:10.0.3" @@ -18547,6 +20880,19 @@ __metadata: languageName: node linkType: hard +"babel-plugin-polyfill-corejs2@npm:^0.4.5": + version: 0.4.5 + resolution: "babel-plugin-polyfill-corejs2@npm:0.4.5" + dependencies: + "@babel/compat-data": ^7.22.6 + "@babel/helper-define-polyfill-provider": ^0.4.2 + semver: ^6.3.1 + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: 33a8e06aa54e2858d211c743d179f0487b03222f9ca1bfd7c4865bca243fca942a3358cb75f6bb894ed476cbddede834811fbd6903ff589f055821146f053e1a + languageName: node + linkType: hard + "babel-plugin-polyfill-corejs3@npm:^0.1.0": version: 0.1.7 resolution: "babel-plugin-polyfill-corejs3@npm:0.1.7" @@ -18595,6 +20941,18 @@ __metadata: languageName: node linkType: hard +"babel-plugin-polyfill-corejs3@npm:^0.8.3": + version: 0.8.3 + resolution: "babel-plugin-polyfill-corejs3@npm:0.8.3" + dependencies: + "@babel/helper-define-polyfill-provider": ^0.4.2 + core-js-compat: ^3.31.0 + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: dcbb30e551702a82cfd4d2c375da2c317658e55f95e9edcda93b9bbfdcc8fb6e5344efcb144e04d3406859e7682afce7974c60ededd9f12072a48a83dd22a0da + languageName: node + linkType: hard + "babel-plugin-polyfill-regenerator@npm:^0.2.2": version: 0.2.2 resolution: "babel-plugin-polyfill-regenerator@npm:0.2.2" @@ -18628,6 +20986,17 @@ __metadata: languageName: node linkType: hard +"babel-plugin-polyfill-regenerator@npm:^0.5.2": + version: 0.5.2 + resolution: "babel-plugin-polyfill-regenerator@npm:0.5.2" + dependencies: + "@babel/helper-define-polyfill-provider": ^0.4.2 + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: d962200f604016a9a09bc9b4aaf60a3db7af876bb65bcefaeac04d44ac9d9ec4037cf24ce117760cc141d7046b6394c7eb0320ba9665cb4a2ee64df2be187c93 + languageName: node + linkType: hard + "babel-plugin-react-docgen@npm:^4.2.1": version: 4.2.1 resolution: "babel-plugin-react-docgen@npm:4.2.1" @@ -18861,6 +21230,15 @@ __metadata: languageName: node linkType: hard +"better-opn@npm:^3.0.2": + version: 3.0.2 + resolution: "better-opn@npm:3.0.2" + dependencies: + open: ^8.0.4 + checksum: 1471552fa7f733561e7f49e812be074b421153006ca744de985fb6d38939807959fc5fe9cb819cf09f864782e294704fd3b31711ea14c115baf3330a2f1135de + languageName: node + linkType: hard + "big-integer@npm:1.6.36": version: 1.6.36 resolution: "big-integer@npm:1.6.36" @@ -19343,6 +21721,15 @@ __metadata: languageName: node linkType: hard +"browserify-zlib@npm:^0.1.4": + version: 0.1.4 + resolution: "browserify-zlib@npm:0.1.4" + dependencies: + pako: ~0.2.0 + checksum: abee4cb4349e8a21391fd874564f41b113fe691372913980e6fa06a777e4ea2aad4e942af14ab99bce190d5ac8f5328201432f4ef0eae48c6d02208bc212976f + languageName: node + linkType: hard + "browserify-zlib@npm:^0.2.0": version: 0.2.0 resolution: "browserify-zlib@npm:0.2.0" @@ -19397,6 +21784,20 @@ __metadata: languageName: node linkType: hard +"browserslist@npm:^4.21.10, browserslist@npm:^4.21.9": + version: 4.21.10 + resolution: "browserslist@npm:4.21.10" + dependencies: + caniuse-lite: ^1.0.30001517 + electron-to-chromium: ^1.4.477 + node-releases: ^2.0.13 + update-browserslist-db: ^1.0.11 + bin: + browserslist: cli.js + checksum: 1e27c0f111a35d1dd0e8fc2c61781b0daefabc2c9471b0b10537ce54843014bceb2a1ce4571af1a82b2bf1e6e6e05d38865916689a158f03bc2c7a4ec2577db8 + languageName: node + linkType: hard + "browserslist@npm:^4.21.3, browserslist@npm:^4.21.4": version: 4.21.4 resolution: "browserslist@npm:4.21.4" @@ -19982,7 +22383,7 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001109, caniuse-lite@npm:^1.0.30001248, caniuse-lite@npm:^1.0.30001251, caniuse-lite@npm:^1.0.30001280, caniuse-lite@npm:^1.0.30001400": +"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001109, caniuse-lite@npm:^1.0.30001248, caniuse-lite@npm:^1.0.30001251, caniuse-lite@npm:^1.0.30001280, caniuse-lite@npm:^1.0.30001400, caniuse-lite@npm:^1.0.30001517": version: 1.0.30001538 resolution: "caniuse-lite@npm:1.0.30001538" checksum: 94c5d55757a339c7cc175f08a024671e2b4e7c04f130b1015793303d637061347efb6ad84447c3b8137333e742d150b8ad9672716bbf2482646c2e63a56f6c55 @@ -21099,7 +23500,7 @@ __metadata: languageName: node linkType: hard -"concat-stream@npm:^1.5.0": +"concat-stream@npm:^1.5.0, concat-stream@npm:^1.6.2": version: 1.6.2 resolution: "concat-stream@npm:1.6.2" dependencies: @@ -21633,6 +24034,15 @@ __metadata: languageName: node linkType: hard +"core-js-compat@npm:^3.31.0": + version: 3.32.2 + resolution: "core-js-compat@npm:3.32.2" + dependencies: + browserslist: ^4.21.10 + checksum: efca146ad71a542e6f196db5ba5aed617e48c615bdf1fbb065471b3267f833ac545bd5fc5ad0642c3d3974b955f0684ff0863d7471d7050ee0284e0a1313942e + languageName: node + linkType: hard + "core-js-compat@npm:^3.8.1": version: 3.16.3 resolution: "core-js-compat@npm:3.16.3" @@ -21755,6 +24165,23 @@ __metadata: languageName: node linkType: hard +"cosmiconfig@npm:^8.2.0": + version: 8.3.6 + resolution: "cosmiconfig@npm:8.3.6" + dependencies: + import-fresh: ^3.3.0 + js-yaml: ^4.1.0 + parse-json: ^5.2.0 + path-type: ^4.0.0 + peerDependencies: + typescript: ">=4.9.5" + peerDependenciesMeta: + typescript: + optional: true + checksum: dc339ebea427898c9e03bf01b56ba7afbac07fc7d2a2d5a15d6e9c14de98275a9565da949375aee1809591c152c0a3877bb86dbeaf74d5bd5aaa79955ad9e7a0 + languageName: node + linkType: hard + "cp-file@npm:^7.0.0": version: 7.0.0 resolution: "cp-file@npm:7.0.0" @@ -22040,6 +24467,24 @@ __metadata: languageName: node linkType: hard +"css-loader@npm:^6.7.3": + version: 6.8.1 + resolution: "css-loader@npm:6.8.1" + dependencies: + icss-utils: ^5.1.0 + postcss: ^8.4.21 + postcss-modules-extract-imports: ^3.0.0 + postcss-modules-local-by-default: ^4.0.3 + postcss-modules-scope: ^3.0.0 + postcss-modules-values: ^4.0.0 + postcss-value-parser: ^4.2.0 + semver: ^7.3.8 + peerDependencies: + webpack: ^5.0.0 + checksum: 7c1784247bdbe76dc5c55fb1ac84f1d4177a74c47259942c9cfdb7a8e6baef11967a0bc85ac285f26bd26d5059decb848af8154a03fdb4f4894f41212f45eef3 + languageName: node + linkType: hard + "css-mediaquery@npm:^0.1.2": version: 0.1.2 resolution: "css-mediaquery@npm:0.1.2" @@ -22658,6 +25103,16 @@ __metadata: languageName: node linkType: hard +"default-browser-id@npm:3.0.0, default-browser-id@npm:^3.0.0": + version: 3.0.0 + resolution: "default-browser-id@npm:3.0.0" + dependencies: + bplist-parser: ^0.2.0 + untildify: ^4.0.0 + checksum: 279c7ad492542e5556336b6c254a4eaf31b2c63a5433265655ae6e47301197b6cfb15c595a6fdc6463b2ff8e1a1a1ed3cba56038a60e1527ba4ab1628c6b9941 + languageName: node + linkType: hard + "default-browser-id@npm:^1.0.4": version: 1.0.4 resolution: "default-browser-id@npm:1.0.4" @@ -22671,16 +25126,6 @@ __metadata: languageName: node linkType: hard -"default-browser-id@npm:^3.0.0": - version: 3.0.0 - resolution: "default-browser-id@npm:3.0.0" - dependencies: - bplist-parser: ^0.2.0 - untildify: ^4.0.0 - checksum: 279c7ad492542e5556336b6c254a4eaf31b2c63a5433265655ae6e47301197b6cfb15c595a6fdc6463b2ff8e1a1a1ed3cba56038a60e1527ba4ab1628c6b9941 - languageName: node - linkType: hard - "default-browser@npm:^4.0.0": version: 4.0.0 resolution: "default-browser@npm:4.0.0" @@ -22798,6 +25243,13 @@ __metadata: languageName: node linkType: hard +"defu@npm:^6.1.2": + version: 6.1.2 + resolution: "defu@npm:6.1.2" + checksum: 2ec0ff8414d5a1ab2b8c7e9a79bbad6d97d23ea7ebf5dcf80c3c7ffd9715c30f84a3cc47b917379ea756b3db0dc4701ce6400e493a1ae1688dffcd0f884233b2 + languageName: node + linkType: hard + "degenerator@npm:^5.0.0": version: 5.0.1 resolution: "degenerator@npm:5.0.1" @@ -22915,7 +25367,7 @@ __metadata: languageName: node linkType: hard -"detect-indent@npm:^6.0.0": +"detect-indent@npm:^6.0.0, detect-indent@npm:^6.1.0": version: 6.1.0 resolution: "detect-indent@npm:6.1.0" checksum: ab953a73c72dbd4e8fc68e4ed4bfd92c97eb6c43734af3900add963fd3a9316f3bc0578b018b24198d4c31a358571eff5f0656e81a1f3b9ad5c547d58b2d093d @@ -23484,7 +25936,7 @@ __metadata: languageName: node linkType: hard -"duplexify@npm:^3.4.2, duplexify@npm:^3.6.0": +"duplexify@npm:^3.4.2, duplexify@npm:^3.5.0, duplexify@npm:^3.6.0": version: 3.7.1 resolution: "duplexify@npm:3.7.1" dependencies: @@ -23559,7 +26011,7 @@ __metadata: languageName: node linkType: hard -"ejs@npm:^3.1.9": +"ejs@npm:^3.1.8, ejs@npm:^3.1.9": version: 3.1.9 resolution: "ejs@npm:3.1.9" dependencies: @@ -23598,6 +26050,13 @@ __metadata: languageName: node linkType: hard +"electron-to-chromium@npm:^1.4.477": + version: 1.4.526 + resolution: "electron-to-chromium@npm:1.4.526" + checksum: db37adc0b39b8d3f600e86f5f451744025a174fbe2e42ac4a7dbda809d7b417a0624d2570a8df5cb8f9f1e30d6b9ca9a5079eb09288ddd4a9588c6a39e3c3a0a + languageName: node + linkType: hard + "elliptic@npm:^6.4.0, elliptic@npm:^6.5.3, elliptic@npm:^6.5.4": version: 6.5.4 resolution: "elliptic@npm:6.5.4" @@ -24098,6 +26557,13 @@ __metadata: languageName: node linkType: hard +"esbuild-plugin-alias@npm:^0.2.1": + version: 0.2.1 + resolution: "esbuild-plugin-alias@npm:0.2.1" + checksum: afe2d2c8b5f09d5321cb8d9c0825e8a9f6e03c2d50df92f953a291d4620cc29eddb3da9e33b238f6d8f77738e0277bdcb831f127399449fecf78fb84c04e5da9 + languageName: node + linkType: hard + "esbuild-plugin-svgr@npm:^2.0.0": version: 2.0.0 resolution: "esbuild-plugin-svgr@npm:2.0.0" @@ -24118,6 +26584,17 @@ __metadata: languageName: node linkType: hard +"esbuild-register@npm:^3.5.0": + version: 3.5.0 + resolution: "esbuild-register@npm:3.5.0" + dependencies: + debug: ^4.3.4 + peerDependencies: + esbuild: ">=0.12 <1" + checksum: f4307753c9672a2c901d04a1165031594a854f0a4c6f4c1db08aa393b68a193d38f2df483dc8ca0513e89f7b8998415e7e26fb9830989fb8cdccc5fb5f181c6b + languageName: node + linkType: hard + "esbuild-scss-modules-plugin@npm:^1.1.1": version: 1.1.1 resolution: "esbuild-scss-modules-plugin@npm:1.1.1" @@ -24439,6 +26916,83 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:^0.18.0": + version: 0.18.20 + resolution: "esbuild@npm:0.18.20" + dependencies: + "@esbuild/android-arm": 0.18.20 + "@esbuild/android-arm64": 0.18.20 + "@esbuild/android-x64": 0.18.20 + "@esbuild/darwin-arm64": 0.18.20 + "@esbuild/darwin-x64": 0.18.20 + "@esbuild/freebsd-arm64": 0.18.20 + "@esbuild/freebsd-x64": 0.18.20 + "@esbuild/linux-arm": 0.18.20 + "@esbuild/linux-arm64": 0.18.20 + "@esbuild/linux-ia32": 0.18.20 + "@esbuild/linux-loong64": 0.18.20 + "@esbuild/linux-mips64el": 0.18.20 + "@esbuild/linux-ppc64": 0.18.20 + "@esbuild/linux-riscv64": 0.18.20 + "@esbuild/linux-s390x": 0.18.20 + "@esbuild/linux-x64": 0.18.20 + "@esbuild/netbsd-x64": 0.18.20 + "@esbuild/openbsd-x64": 0.18.20 + "@esbuild/sunos-x64": 0.18.20 + "@esbuild/win32-arm64": 0.18.20 + "@esbuild/win32-ia32": 0.18.20 + "@esbuild/win32-x64": 0.18.20 + dependenciesMeta: + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 5d253614e50cdb6ec22095afd0c414f15688e7278a7eb4f3720a6dd1306b0909cf431e7b9437a90d065a31b1c57be60130f63fe3e8d0083b588571f31ee6ec7b + languageName: node + linkType: hard + "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1" @@ -25780,6 +28334,20 @@ __metadata: languageName: node linkType: hard +"extract-zip@npm:^1.6.6": + version: 1.7.0 + resolution: "extract-zip@npm:1.7.0" + dependencies: + concat-stream: ^1.6.2 + debug: ^2.6.9 + mkdirp: ^0.5.4 + yauzl: ^2.10.0 + bin: + extract-zip: cli.js + checksum: 011bab660d738614555773d381a6ba4815d98c1cfcdcdf027e154ebcc9fc8c9ef637b3ea5c9b2144013100071ee41722ed041fc9aacc60f6198ef747cac0c073 + languageName: node + linkType: hard + "extsprintf@npm:1.3.0": version: 1.3.0 resolution: "extsprintf@npm:1.3.0" @@ -26058,6 +28626,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" @@ -26164,7 +28742,7 @@ __metadata: languageName: node linkType: hard -"find-cache-dir@npm:^3.2.0": +"find-cache-dir@npm:^3.0.0, find-cache-dir@npm:^3.2.0": version: 3.3.2 resolution: "find-cache-dir@npm:3.3.2" dependencies: @@ -26309,6 +28887,13 @@ __metadata: languageName: node linkType: hard +"flow-parser@npm:0.*": + version: 0.216.1 + resolution: "flow-parser@npm:0.216.1" + checksum: c3966f376b20763c842f84aa93f0d7a6014682823adc283715b3025263a5a0ab0acc0d4a9582ec512051936ce5a68c6c2d19cfb5e95356b992200daeeda1a72e + languageName: node + linkType: hard + "flush-write-stream@npm:^1.0.0": version: 1.1.1 resolution: "flush-write-stream@npm:1.1.1" @@ -26553,6 +29138,17 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:11.1.1, fs-extra@npm:^11.1.0": + 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" @@ -26577,17 +29173,6 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^11.1.0": - 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:^8.1.0": version: 8.1.0 resolution: "fs-extra@npm:8.1.0" @@ -26910,6 +29495,13 @@ __metadata: languageName: node linkType: hard +"get-npm-tarball-url@npm:^2.0.3": + version: 2.0.3 + resolution: "get-npm-tarball-url@npm:2.0.3" + checksum: 8ad48a6f1126697665e12ebf053e0d1c3b15b3c4f29ea6c458387ac68d044ea1c08f0f2eb5c0fe35447fdd2da4f2fb5c9882feb5a2ea195c773f94e762c9b886 + languageName: node + linkType: hard + "get-own-enumerable-property-symbols@npm:^3.0.0": version: 3.0.2 resolution: "get-own-enumerable-property-symbols@npm:3.0.2" @@ -26947,6 +29539,13 @@ __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-port@npm:^6.1.2": version: 6.1.2 resolution: "get-port@npm:6.1.2" @@ -27061,6 +29660,23 @@ __metadata: languageName: node linkType: hard +"giget@npm:^1.0.0": + version: 1.1.2 + resolution: "giget@npm:1.1.2" + dependencies: + colorette: ^2.0.19 + defu: ^6.1.2 + https-proxy-agent: ^5.0.1 + mri: ^1.2.0 + node-fetch-native: ^1.0.2 + pathe: ^1.1.0 + tar: ^6.1.13 + bin: + giget: dist/cli.mjs + checksum: 76ad0f7e792ee95dd6c4e1096697fdcce61a2a3235a6c21761fc3e0d1053342074ce71c80059d6d4363fd34152e5d7b2e58221412f300c852ff7d4a12d0321fe + languageName: node + linkType: hard + "git-hooks-list@npm:^3.0.0": version: 3.1.0 resolution: "git-hooks-list@npm:3.1.0" @@ -27209,6 +29825,21 @@ __metadata: languageName: node linkType: hard +"glob@npm:^10.0.0": + version: 10.3.5 + resolution: "glob@npm:10.3.5" + dependencies: + foreground-child: ^3.1.0 + jackspeak: ^2.0.3 + minimatch: ^9.0.1 + minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 + path-scurry: ^1.10.1 + bin: + glob: dist/cjs/src/bin.js + checksum: 564f4799cae48c0bcc841c88a20b539b5701c27ed5596f8623f588b3c523262d3fc20eb1ea89cab9c75b0912faf40ca5501fc835f982225d0d0599282b09e97a + languageName: node + linkType: hard + "glob@npm:^10.2.2": version: 10.3.3 resolution: "glob@npm:10.3.3" @@ -27631,6 +30262,22 @@ __metadata: languageName: node linkType: hard +"gunzip-maybe@npm:^1.4.2": + version: 1.4.2 + resolution: "gunzip-maybe@npm:1.4.2" + dependencies: + browserify-zlib: ^0.1.4 + is-deflate: ^1.0.0 + is-gzip: ^1.0.0 + peek-stream: ^1.1.0 + pumpify: ^1.3.3 + through2: ^2.0.3 + bin: + gunzip-maybe: bin.js + checksum: bc4d4977c24a2860238df271de75d53dd72a359d19f1248d1c613807dc221d3b8ae09624e3085c8106663e3e1b59db62a85b261d1138c2cc24efad9df577d4e1 + languageName: node + linkType: hard + "handle-thing@npm:^2.0.0": version: 2.0.1 resolution: "handle-thing@npm:2.0.1" @@ -28552,7 +31199,7 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:5.0.1": +"https-proxy-agent@npm:5.0.1, https-proxy-agent@npm:^5.0.1": version: 5.0.1 resolution: "https-proxy-agent@npm:5.0.1" dependencies: @@ -28562,6 +31209,16 @@ __metadata: languageName: node linkType: hard +"https-proxy-agent@npm:^4.0.0": + version: 4.0.0 + resolution: "https-proxy-agent@npm:4.0.0" + dependencies: + agent-base: 5 + debug: 4 + checksum: 19471d5aae3e747b1c98b17556647e2a1362e68220c6b19585a8527498f32e62e03c41d2872d059d8720d56846bd7460a80ac06f876bccfa786468ff40dd5eef + languageName: node + linkType: hard + "https-proxy-agent@npm:^5.0.0": version: 5.0.0 resolution: "https-proxy-agent@npm:5.0.0" @@ -28784,7 +31441,7 @@ __metadata: languageName: node linkType: hard -"import-fresh@npm:^3.0.0, import-fresh@npm:^3.1.0, import-fresh@npm:^3.2.1": +"import-fresh@npm:^3.0.0, import-fresh@npm:^3.1.0, import-fresh@npm:^3.2.1, import-fresh@npm:^3.3.0": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" dependencies: @@ -29352,6 +32009,13 @@ __metadata: languageName: node linkType: hard +"is-deflate@npm:^1.0.0": + version: 1.0.0 + resolution: "is-deflate@npm:1.0.0" + checksum: c2f9f2d3db79ac50c5586697d1e69a55282a2b0cc5e437b3c470dd47f24e40b6216dcd7e024511e21381607bf57afa019343e3bd0e08a119032818b596004262 + languageName: node + linkType: hard + "is-descriptor@npm:^0.1.0": version: 0.1.6 resolution: "is-descriptor@npm:0.1.6" @@ -29496,6 +32160,13 @@ __metadata: languageName: node linkType: hard +"is-gzip@npm:^1.0.0": + version: 1.0.0 + resolution: "is-gzip@npm:1.0.0" + checksum: 0d28931c1f445fa29c900cf9f48e06e9d1d477a3bf7bd7332e7ce68f1333ccd8cb381de2f0f62a9a262d9c0912608a9a71b4a40e788e201b3dbd67072bb20d86 + languageName: node + linkType: hard + "is-hexadecimal@npm:^1.0.0": version: 1.0.4 resolution: "is-hexadecimal@npm:1.0.4" @@ -31141,6 +33812,15 @@ __metadata: languageName: node linkType: hard +"jiti@npm:^1.18.2": + version: 1.20.0 + resolution: "jiti@npm:1.20.0" + bin: + jiti: bin/jiti.js + checksum: 7924062b5675142e3e272a27735be84b7bfc0a0eb73217fc2dcafa034f37c4f7b4b9ffc07dd98bcff0f739a8811ce1544db205ae7e97b1c86f0df92c65ce3c72 + languageName: node + linkType: hard + "joi@npm:^17.3.0": version: 17.9.1 resolution: "joi@npm:17.9.1" @@ -31253,6 +33933,37 @@ __metadata: languageName: node linkType: hard +"jscodeshift@npm:^0.14.0": + version: 0.14.0 + resolution: "jscodeshift@npm:0.14.0" + dependencies: + "@babel/core": ^7.13.16 + "@babel/parser": ^7.13.16 + "@babel/plugin-proposal-class-properties": ^7.13.0 + "@babel/plugin-proposal-nullish-coalescing-operator": ^7.13.8 + "@babel/plugin-proposal-optional-chaining": ^7.13.12 + "@babel/plugin-transform-modules-commonjs": ^7.13.8 + "@babel/preset-flow": ^7.13.13 + "@babel/preset-typescript": ^7.13.0 + "@babel/register": ^7.13.16 + babel-core: ^7.0.0-bridge.0 + chalk: ^4.1.2 + flow-parser: 0.* + graceful-fs: ^4.2.4 + micromatch: ^4.0.4 + neo-async: ^2.5.0 + node-dir: ^0.1.17 + recast: ^0.21.0 + temp: ^0.8.4 + write-file-atomic: ^2.3.0 + peerDependencies: + "@babel/preset-env": ^7.1.6 + bin: + jscodeshift: bin/jscodeshift.js + checksum: 54ea6d639455883336f80b38a70648821c88b7942315dc0fbab01bc34a9ad0f0f78e3bd69304b5ab167e4262d6ed7e6284c6d32525ab01c89d9118df89b3e2a0 + languageName: node + linkType: hard + "jsdom@npm:^19.0.0": version: 19.0.0 resolution: "jsdom@npm:19.0.0" @@ -31898,6 +34609,16 @@ __metadata: languageName: node linkType: hard +"less-loader@npm:^11.1.0": + version: 11.1.3 + resolution: "less-loader@npm:11.1.3" + peerDependencies: + less: ^3.5.0 || ^4.0.0 + webpack: ^5.0.0 + checksum: fe0de6b5ab930a4521d04555d9bd77723164bfa0f71eb5724d91c45090af544000e2d7f598cd83ec4e1445e6b943cc0c0dd1445fb2e83fd7c12f4ad3a0db05c5 + languageName: node + linkType: hard + "level-codec@npm:9.0.2, level-codec@npm:^9.0.0": version: 9.0.2 resolution: "level-codec@npm:9.0.2" @@ -34332,7 +37053,7 @@ __metadata: languageName: node linkType: hard -"mime-types@npm:^2.1.18, mime-types@npm:^2.1.30, mime-types@npm:^2.1.31, mime-types@npm:~2.1.19, mime-types@npm:~2.1.34": +"mime-types@npm:^2.1.18, mime-types@npm:^2.1.25, mime-types@npm:^2.1.30, mime-types@npm:^2.1.31, mime-types@npm:~2.1.19, mime-types@npm:~2.1.34": version: 2.1.35 resolution: "mime-types@npm:2.1.35" dependencies: @@ -34350,6 +37071,15 @@ __metadata: languageName: node linkType: hard +"mime@npm:^2.0.3": + version: 2.6.0 + resolution: "mime@npm:2.6.0" + bin: + mime: cli.js + checksum: 1497ba7b9f6960694268a557eae24b743fd2923da46ec392b042469f4b901721ba0adcf8b0d3c2677839d0e243b209d76e5edcbd09cfdeffa2dfb6bb4df4b862 + languageName: node + linkType: hard + "mime@npm:^2.4.4": version: 2.5.2 resolution: "mime@npm:2.5.2" @@ -34693,7 +37423,7 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:>=0.5 0, mkdirp@npm:^0.5.6": +"mkdirp@npm:>=0.5 0, mkdirp@npm:^0.5.4, mkdirp@npm:^0.5.6": version: 0.5.6 resolution: "mkdirp@npm:0.5.6" dependencies: @@ -34808,7 +37538,7 @@ __metadata: languageName: node linkType: hard -"mri@npm:^1.1.0": +"mri@npm:^1.1.0, mri@npm:^1.2.0": version: 1.2.0 resolution: "mri@npm:1.2.0" checksum: 83f515abbcff60150873e424894a2f65d68037e5a7fcde8a9e2b285ee9c13ac581b63cfc1e6826c4732de3aeb84902f7c1e16b7aff46cd3f897a0f757a894e85 @@ -35050,7 +37780,7 @@ __metadata: languageName: node linkType: hard -"node-dir@npm:^0.1.10": +"node-dir@npm:^0.1.10, node-dir@npm:^0.1.17": version: 0.1.17 resolution: "node-dir@npm:0.1.17" dependencies: @@ -35059,6 +37789,13 @@ __metadata: languageName: node linkType: hard +"node-fetch-native@npm:^1.0.2": + version: 1.4.0 + resolution: "node-fetch-native@npm:1.4.0" + checksum: 92d25d3d480709bf110642876f0d12222641795d266a7730a10a5f117a6d4071ca6e205fba4e76347a29786c7bcce94956a5f2b212607064e81950b35f1af0ae + languageName: node + linkType: hard + "node-fetch@npm:^2.6.7": version: 2.6.7 resolution: "node-fetch@npm:2.6.7" @@ -35252,6 +37989,13 @@ __metadata: languageName: node linkType: hard +"node-releases@npm:^2.0.13": + version: 2.0.13 + resolution: "node-releases@npm:2.0.13" + checksum: 17ec8f315dba62710cae71a8dad3cd0288ba943d2ece43504b3b1aa8625bf138637798ab470b1d9035b0545996f63000a8a926e0f6d35d0996424f8b6d36dda3 + languageName: node + linkType: hard + "node-releases@npm:^2.0.6": version: 2.0.6 resolution: "node-releases@npm:2.0.6" @@ -36026,6 +38770,17 @@ __metadata: languageName: node linkType: hard +"open@npm:^8.0.4": + version: 8.4.2 + resolution: "open@npm:8.4.2" + dependencies: + define-lazy-prop: ^2.0.0 + is-docker: ^2.1.1 + is-wsl: ^2.2.0 + checksum: 6388bfff21b40cb9bd8f913f9130d107f2ed4724ea81a8fd29798ee322b361ca31fa2cdfb491a5c31e43a3996cfe9566741238c7a741ada8d7af1cb78d85cf26 + languageName: node + linkType: hard + "open@npm:^8.0.9, open@npm:^8.4.0": version: 8.4.0 resolution: "open@npm:8.4.0" @@ -36470,6 +39225,13 @@ __metadata: languageName: node linkType: hard +"pako@npm:~0.2.0": + version: 0.2.9 + resolution: "pako@npm:0.2.9" + checksum: 055f9487cd57fbb78df84315873bbdd089ba286f3499daed47d2effdc6253e981f5db6898c23486de76d4a781559f890d643bd3a49f70f1b4a18019c98aa5125 + languageName: node + linkType: hard + "pako@npm:~1.0.5": version: 1.0.11 resolution: "pako@npm:1.0.11" @@ -36830,6 +39592,17 @@ __metadata: languageName: node linkType: hard +"peek-stream@npm:^1.1.0": + version: 1.1.3 + resolution: "peek-stream@npm:1.1.3" + dependencies: + buffer-from: ^1.0.0 + duplexify: ^3.5.0 + through2: ^2.0.3 + checksum: a0e09d6d1a8a01158a3334f20d6b1cdd91747eba24eb06a1d742eefb620385593121a76d4378cc81f77cdce6a66df0575a41041b1189c510254aec91878afc99 + languageName: node + linkType: hard + "pend@npm:~1.2.0": version: 1.2.0 resolution: "pend@npm:1.2.0" @@ -37250,6 +40023,20 @@ __metadata: languageName: node linkType: hard +"postcss-loader@npm:^7.2.4": + version: 7.3.3 + resolution: "postcss-loader@npm:7.3.3" + dependencies: + cosmiconfig: ^8.2.0 + jiti: ^1.18.2 + semver: ^7.3.8 + peerDependencies: + postcss: ^7.0.0 || ^8.0.1 + webpack: ^5.0.0 + checksum: c724044d6ae56334535c26bb4efc9c151431d44d60bc8300157c760747281a242757d8dab32db72738434531175b38a408cb0b270bb96207c07584dcfcd899ff + languageName: node + linkType: hard + "postcss-media-query-parser@npm:^0.2.3": version: 0.2.3 resolution: "postcss-media-query-parser@npm:0.2.3" @@ -37379,6 +40166,19 @@ __metadata: languageName: node linkType: hard +"postcss-modules-local-by-default@npm:^4.0.3": + version: 4.0.3 + resolution: "postcss-modules-local-by-default@npm:4.0.3" + dependencies: + icss-utils: ^5.0.0 + postcss-selector-parser: ^6.0.2 + postcss-value-parser: ^4.1.0 + peerDependencies: + postcss: ^8.1.0 + checksum: 2f8083687f3d6067885f8863dd32dbbb4f779cfcc7e52c17abede9311d84faf6d3ed8760e7c54c6380281732ae1f78e5e56a28baf3c271b33f450a11c9e30485 + languageName: node + linkType: hard + "postcss-modules-scope@npm:^2.2.0": version: 2.2.0 resolution: "postcss-modules-scope@npm:2.2.0" @@ -37728,6 +40528,17 @@ __metadata: languageName: node linkType: hard +"postcss@npm:^8.2.14": + version: 8.4.31 + resolution: "postcss@npm:8.4.31" + dependencies: + nanoid: ^3.3.6 + picocolors: ^1.0.0 + source-map-js: ^1.0.2 + checksum: 1d8611341b073143ad90486fcdfeab49edd243377b1f51834dc4f6d028e82ce5190e4f11bb2633276864503654fb7cab28e67abdc0fbf9d1f88cad4a0ff0beea + languageName: node + linkType: hard + "postcss@npm:^8.3.5": version: 8.4.20 resolution: "postcss@npm:8.4.20" @@ -37879,6 +40690,15 @@ __metadata: languageName: node linkType: hard +"prettier@npm:^2.8.0": + version: 2.8.8 + resolution: "prettier@npm:2.8.8" + bin: + prettier: bin-prettier.js + checksum: b49e409431bf129dd89238d64299ba80717b57ff5a6d1c1a8b1a28b590d998a34e083fa13573bc732bb8d2305becb4c9a4407f8486c81fa7d55100eb08263cf8 + languageName: node + linkType: hard + "pretty-error@npm:^2.1.1": version: 2.1.2 resolution: "pretty-error@npm:2.1.2" @@ -38058,7 +40878,7 @@ __metadata: languageName: node linkType: hard -"progress@npm:2.0.3, progress@npm:^2.0.0, progress@npm:^2.0.3": +"progress@npm:2.0.3, progress@npm:^2.0.0, progress@npm:^2.0.1, progress@npm:^2.0.3": version: 2.0.3 resolution: "progress@npm:2.0.3" checksum: f67403fe7b34912148d9252cb7481266a354bd99ce82c835f79070643bb3c6583d10dbcfda4d41e04bbc1d8437e9af0fb1e1f2135727878f5308682a579429b7 @@ -38271,7 +41091,7 @@ __metadata: languageName: node linkType: hard -"proxy-from-env@npm:1.1.0, proxy-from-env@npm:^1.1.0": +"proxy-from-env@npm:1.1.0, proxy-from-env@npm:^1.0.0, proxy-from-env@npm:^1.1.0": version: 1.1.0 resolution: "proxy-from-env@npm:1.1.0" checksum: ed7fcc2ba0a33404958e34d95d18638249a68c430e30fcb6c478497d72739ba64ce9810a24f53a7d921d0c065e5b78e3822759800698167256b04659366ca4d4 @@ -38400,6 +41220,24 @@ __metadata: languageName: node linkType: hard +"puppeteer-core@npm:^2.1.1": + version: 2.1.1 + resolution: "puppeteer-core@npm:2.1.1" + dependencies: + "@types/mime-types": ^2.1.0 + debug: ^4.1.0 + extract-zip: ^1.6.6 + https-proxy-agent: ^4.0.0 + mime: ^2.0.3 + mime-types: ^2.1.25 + progress: ^2.0.1 + proxy-from-env: ^1.0.0 + rimraf: ^2.6.1 + ws: ^6.1.0 + checksum: 2ddb597ef1b2d162b4aa49833b977734129edf7c8fa558fc38c59d273e79aa1bd079481c642de87f7163665f7f37aa52683da2716bafb7d3cab68c262c36ec28 + languageName: node + linkType: hard + "puppeteer-core@npm:^20.9.0": version: 20.9.0 resolution: "puppeteer-core@npm:20.9.0" @@ -38575,6 +41413,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" @@ -40404,6 +43249,18 @@ __metadata: languageName: node linkType: hard +"recast@npm:^0.21.0": + version: 0.21.5 + resolution: "recast@npm:0.21.5" + dependencies: + ast-types: 0.15.2 + esprima: ~4.0.0 + source-map: ~0.6.1 + tslib: ^2.0.1 + checksum: 03cc7f57562238ba258d468be67bf7446ce7a707bc87a087891dad15afead46c36e9aaeedf2130e2ab5a465244a9c62bfd4127849761cf8f4085abe2f3e5f485 + languageName: node + linkType: hard + "recast@npm:^0.23.1": version: 0.23.1 resolution: "recast@npm:0.23.1" @@ -40606,6 +43463,15 @@ __metadata: 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: 20b6f9377d65954980fe044cfdd160de98df415b4bff38fbade67b3337efaf078308c4fed943067cd759827cc8cfeca9cb28ccda1f08333b85d6a2acbd022c27 + languageName: node + linkType: hard + "regex-not@npm:^1.0.0, regex-not@npm:^1.0.2": version: 1.0.2 resolution: "regex-not@npm:1.0.2" @@ -40616,6 +43482,13 @@ __metadata: languageName: node linkType: hard +"regex-parser@npm:^2.2.11": + version: 2.2.11 + resolution: "regex-parser@npm:2.2.11" + checksum: 78200331ec0cc372302d287a4946c38681eb5fe435453fca572cb53cac0ba579e5eb3b9e25eac24c0c80a555fb3ea7a637814a35da1e9bc88e8819110ae5de24 + languageName: node + linkType: hard + "regexp-match-indices@npm:1.0.2": version: 1.0.2 resolution: "regexp-match-indices@npm:1.0.2" @@ -40708,6 +43581,20 @@ __metadata: languageName: node linkType: hard +"regexpu-core@npm:^5.3.1": + version: 5.3.2 + resolution: "regexpu-core@npm:5.3.2" + dependencies: + "@babel/regjsgen": ^0.8.0 + regenerate: ^1.4.2 + regenerate-unicode-properties: ^10.1.0 + regjsparser: ^0.9.1 + unicode-match-property-ecmascript: ^2.0.0 + unicode-match-property-value-ecmascript: ^2.1.0 + checksum: 95bb97088419f5396e07769b7de96f995f58137ad75fac5811fb5fe53737766dfff35d66a0ee66babb1eb55386ef981feaef392f9df6d671f3c124812ba24da2 + languageName: node + linkType: hard + "registry-auth-token@npm:^4.0.0": version: 4.2.2 resolution: "registry-auth-token@npm:4.2.2" @@ -41119,6 +44006,19 @@ __metadata: languageName: node linkType: hard +"resolve-url-loader@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-url-loader@npm:5.0.0" + dependencies: + adjust-sourcemap-loader: ^4.0.0 + convert-source-map: ^1.7.0 + loader-utils: ^2.0.0 + postcss: ^8.2.14 + source-map: 0.6.1 + checksum: 6d483733a4c26f75ce930a61943113bf730b5ba33a7186791cf1ae9c2ca02c3e94610bc6484ca008a372ee9e31750eccea74856a89daf1a29b8437ff564d27f2 + languageName: node + linkType: hard + "resolve-url@npm:^0.2.1": version: 0.2.1 resolution: "resolve-url@npm:0.2.1" @@ -41262,7 +44162,7 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:2, rimraf@npm:^2.2.8, rimraf@npm:^2.5.4, rimraf@npm:^2.6.2, rimraf@npm:^2.6.3": +"rimraf@npm:2, rimraf@npm:^2.2.8, rimraf@npm:^2.5.4, rimraf@npm:^2.6.1, rimraf@npm:^2.6.2, rimraf@npm:^2.6.3": version: 2.7.1 resolution: "rimraf@npm:2.7.1" dependencies: @@ -41284,6 +44184,17 @@ __metadata: languageName: node linkType: hard +"rimraf@npm:~2.6.2": + version: 2.6.3 + resolution: "rimraf@npm:2.6.3" + dependencies: + glob: ^7.1.3 + bin: + rimraf: ./bin.js + checksum: 3ea587b981a19016297edb96d1ffe48af7e6af69660e3b371dbfc73722a73a0b0e9be5c88089fbeeb866c389c1098e07f64929c7414290504b855f54f901ab10 + languageName: node + linkType: hard + "ripemd160@npm:^2.0.0, ripemd160@npm:^2.0.1": version: 2.0.2 resolution: "ripemd160@npm:2.0.2" @@ -41766,6 +44677,30 @@ __metadata: languageName: node linkType: hard +"sass-loader@npm:^13.2.2": + version: 13.3.2 + resolution: "sass-loader@npm:13.3.2" + dependencies: + neo-async: ^2.6.2 + peerDependencies: + fibers: ">= 3.1.0" + node-sass: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 + sass: ^1.3.0 + sass-embedded: "*" + webpack: ^5.0.0 + peerDependenciesMeta: + fibers: + optional: true + node-sass: + optional: true + sass: + optional: true + sass-embedded: + optional: true + checksum: 7394a8d1b818a289b9caabd979543c907b83e28ae08bc80ccb836e0ccabc4ae574c077ab2fa520ba5fb8abb2ec3e7c9822a1cbd8c58a28ff30018be9d1dc6c27 + languageName: node + linkType: hard + "sass@npm:^1.35.2": version: 1.62.1 resolution: "sass@npm:1.62.1" @@ -41779,6 +44714,19 @@ __metadata: languageName: node linkType: hard +"sass@npm:^1.68.0": + version: 1.68.0 + resolution: "sass@npm:1.68.0" + dependencies: + chokidar: ">=3.0.0 <4.0.0" + immutable: ^4.0.0 + source-map-js: ">=0.6.2 <2.0.0" + bin: + sass: sass.js + checksum: 65ccede83c96768beeb8dcaf67957b7c76b12ff1276bfd2849d7be151d46ba1400048a67717e6e5e4969bc75e87348e5530f5f272833f2e60a891c21a33d8ab0 + languageName: node + linkType: hard + "saxes@npm:^5.0.1": version: 5.0.1 resolution: "saxes@npm:5.0.1" @@ -41988,6 +44936,26 @@ __metadata: languageName: node linkType: hard +"semver@npm:^6.3.1": + version: 6.3.1 + resolution: "semver@npm:6.3.1" + bin: + semver: bin/semver.js + checksum: ae47d06de28836adb9d3e25f22a92943477371292d9b665fb023fae278d345d508ca1958232af086d85e0155aee22e313e100971898bbb8d5d89b8b1d4054ca2 + languageName: node + linkType: hard + +"semver@npm:^7.5.3": + version: 7.5.4 + resolution: "semver@npm:7.5.4" + dependencies: + lru-cache: ^6.0.0 + bin: + semver: bin/semver.js + checksum: 12d8ad952fa353b0995bf180cdac205a4068b759a140e5d3c608317098b3575ac2f1e09182206bf2eb26120e1c0ed8fb92c48c592f6099680de56bb071423ca3 + languageName: node + linkType: hard + "send@npm:0.17.1": version: 0.17.1 resolution: "send@npm:0.17.1" @@ -42364,6 +45332,15 @@ __metadata: languageName: node linkType: hard +"simple-update-notifier@npm:^2.0.0": + version: 2.0.0 + resolution: "simple-update-notifier@npm:2.0.0" + dependencies: + semver: ^7.5.3 + checksum: 9ba00d38ce6a29682f64a46213834e4eb01634c2f52c813a9a7b8873ca49cdbb703696f3290f3b27dc067de6d9418b0b84bef22c3eb074acf352529b2d6c27fd + languageName: node + linkType: hard + "sisteransi@npm:^1.0.5": version: 1.0.5 resolution: "sisteransi@npm:1.0.5" @@ -42652,6 +45629,13 @@ __metadata: languageName: node linkType: hard +"source-map@npm:0.6.1, source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.0, source-map@npm:~0.6.1": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: 59ce8640cf3f3124f64ac289012c2b8bd377c238e316fb323ea22fbfe83da07d81e000071d7242cad7a23cd91c7de98e4df8830ec3f133cb6133a5f6e9f67bc2 + languageName: node + linkType: hard + "source-map@npm:0.8.0-beta.0": version: 0.8.0-beta.0 resolution: "source-map@npm:0.8.0-beta.0" @@ -42668,13 +45652,6 @@ __metadata: languageName: node linkType: hard -"source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.0, source-map@npm:~0.6.1": - version: 0.6.1 - resolution: "source-map@npm:0.6.1" - checksum: 59ce8640cf3f3124f64ac289012c2b8bd377c238e316fb323ea22fbfe83da07d81e000071d7242cad7a23cd91c7de98e4df8830ec3f133cb6133a5f6e9f67bc2 - languageName: node - linkType: hard - "source-map@npm:^0.7.0, source-map@npm:^0.7.4": version: 0.7.4 resolution: "source-map@npm:0.7.4" @@ -43111,6 +46088,13 @@ __metadata: languageName: node linkType: hard +"store2@npm:^2.14.2": + version: 2.14.2 + resolution: "store2@npm:2.14.2" + checksum: 6f270fc5bab99b63f45fcc7bd8b99c2714b4adf880f557ed7ffb5ed3987131251165bccde425a00928aaf044870aee79ddeef548576d093c68703ed2edec45d7 + languageName: node + linkType: hard + "storybook-addon-designs@npm:^6.3.1": version: 6.3.1 resolution: "storybook-addon-designs@npm:6.3.1" @@ -43203,6 +46187,18 @@ __metadata: languageName: node linkType: hard +"storybook@npm:^7.4.3": + version: 7.4.3 + resolution: "storybook@npm:7.4.3" + dependencies: + "@storybook/cli": 7.4.3 + bin: + sb: ./index.js + storybook: ./index.js + checksum: 91395d18f545dfa8ffe8f1e70e248f03f85e5a3cc55d07127228480379095efa23cb499265de5e751c2c853d39c1a45ad85d3a3a4d359df61c65df81afab37a0 + languageName: node + linkType: hard + "stream-browserify@npm:^2.0.1": version: 2.0.2 resolution: "stream-browserify@npm:2.0.2" @@ -43654,7 +46650,7 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1, strip-json-comments@npm:~3.1.1": +"strip-json-comments@npm:^3.0.1, strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1, strip-json-comments@npm:~3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" checksum: 492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 @@ -43717,6 +46713,15 @@ __metadata: languageName: node linkType: hard +"style-loader@npm:^3.3.2": + version: 3.3.3 + resolution: "style-loader@npm:3.3.3" + peerDependencies: + webpack: ^5.0.0 + checksum: f59c953f56f6a935bd6a1dfa409f1128fed2b66b48ce4a7a75b85862a7156e5e90ab163878962762f528ec4d510903d828da645e143fbffd26f055dc1c094078 + languageName: node + linkType: hard + "style-search@npm:^0.1.0": version: 0.1.0 resolution: "style-search@npm:0.1.0" @@ -44123,7 +47128,7 @@ __metadata: languageName: node linkType: hard -"tar-fs@npm:2.1.1, tar-fs@npm:^2.0.0": +"tar-fs@npm:2.1.1, tar-fs@npm:^2.0.0, tar-fs@npm:^2.1.1": version: 2.1.1 resolution: "tar-fs@npm:2.1.1" dependencies: @@ -44237,6 +47242,15 @@ __metadata: languageName: node linkType: hard +"telejson@npm:^7.2.0": + version: 7.2.0 + resolution: "telejson@npm:7.2.0" + dependencies: + memoizerific: ^1.11.3 + checksum: 55a3380c9ff3c5ad84581bb6bda28fc33c6b7c4a0c466894637da687639b8db0d21b0ff4c1bc1a7a92ae6b70662549d09e7b9e8b1ec334b2ef93078762ecdfb9 + languageName: node + linkType: hard + "temp-dir@npm:^2.0.0": version: 2.0.0 resolution: "temp-dir@npm:2.0.0" @@ -44244,6 +47258,15 @@ __metadata: languageName: node linkType: hard +"temp@npm:^0.8.4": + version: 0.8.4 + resolution: "temp@npm:0.8.4" + dependencies: + rimraf: ~2.6.2 + checksum: f35bed78565355dfdf95f730b7b489728bd6b7e35071bcc6497af7c827fb6c111fbe9063afc7b8cbc19522a072c278679f9a0ee81e684aa2c8617cc0f2e9c191 + languageName: node + linkType: hard + "tempy@npm:^1.0.1": version: 1.0.1 resolution: "tempy@npm:1.0.1" @@ -44460,7 +47483,7 @@ __metadata: languageName: node linkType: hard -"through2@npm:^2.0.0": +"through2@npm:^2.0.0, through2@npm:^2.0.3": version: 2.0.5 resolution: "through2@npm:2.0.5" dependencies: @@ -44537,7 +47560,7 @@ __metadata: languageName: node linkType: hard -"tiny-invariant@npm:^1.1.0": +"tiny-invariant@npm:^1.1.0, tiny-invariant@npm:^1.3.1": version: 1.3.1 resolution: "tiny-invariant@npm:1.3.1" checksum: 872dbd1ff20a21303a2fd20ce3a15602cfa7fcf9b228bd694a52e2938224313b5385a1078cb667ed7375d1612194feaca81c4ecbe93121ca1baebe344de4f84c @@ -45056,7 +48079,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3": +"tslib@npm:^1.13.0, tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3": version: 1.14.1 resolution: "tslib@npm:1.14.1" checksum: dbe628ef87f66691d5d2959b3e41b9ca0045c3ee3c7c7b906cc1e328b39f199bb1ad9e671c39025bd56122ac57dfbf7385a94843b1cc07c60a4db74795829acd @@ -45994,6 +49017,20 @@ __metadata: languageName: node linkType: hard +"update-browserslist-db@npm:^1.0.11": + version: 1.0.13 + resolution: "update-browserslist-db@npm:1.0.13" + dependencies: + escalade: ^3.1.1 + picocolors: ^1.0.0 + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 1e47d80182ab6e4ad35396ad8b61008ae2a1330221175d0abd37689658bdb61af9b705bfc41057fd16682474d79944fb2d86767c5ed5ae34b6276b9bed353322 + languageName: node + linkType: hard + "update-browserslist-db@npm:^1.0.9": version: 1.0.10 resolution: "update-browserslist-db@npm:1.0.10" @@ -46148,6 +49185,18 @@ __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" @@ -46229,7 +49278,7 @@ __metadata: languageName: node linkType: hard -"util@npm:^0.12.0, util@npm:^0.12.3": +"util@npm:^0.12.0, util@npm:^0.12.3, util@npm:^0.12.4": version: 0.12.5 resolution: "util@npm:0.12.5" dependencies: @@ -48101,6 +51150,17 @@ __metadata: languageName: node linkType: hard +"write-file-atomic@npm:^2.3.0": + version: 2.4.3 + resolution: "write-file-atomic@npm:2.4.3" + dependencies: + graceful-fs: ^4.1.11 + imurmurhash: ^0.1.4 + signal-exit: ^3.0.2 + checksum: 2db81f92ae974fd87ab4a5e7932feacaca626679a7c98fcc73ad8fcea5a1950eab32fa831f79e9391ac99b562ca091ad49be37a79045bd65f595efbb8f4596ae + languageName: node + linkType: hard + "write-file-atomic@npm:^3.0.0": version: 3.0.3 resolution: "write-file-atomic@npm:3.0.3" @@ -48182,6 +51242,15 @@ __metadata: languageName: node linkType: hard +"ws@npm:^6.1.0": + version: 6.2.2 + resolution: "ws@npm:6.2.2" + dependencies: + async-limiter: ~1.0.0 + checksum: aec3154ec51477c094ac2cb5946a156e17561a581fa27005cbf22c53ac57f8d4e5f791dd4bbba6a488602cb28778c8ab7df06251d590507c3c550fd8ebeee949 + languageName: node + linkType: hard + "ws@npm:^7.4.6": version: 7.5.3 resolution: "ws@npm:7.5.3" From 5b5d96bb6bdd502a1139eeddf76557566e767076 Mon Sep 17 00:00:00 2001 From: Renan Valentin Date: Tue, 24 Oct 2023 13:28:26 -0300 Subject: [PATCH 03/22] feat(extension): [LW-7984] voting procedures (#655) * feat(ui): create metadata component * wip * feat(ui): text link component * chore(ui): fix rebase * feat(ui): create metadata link component * feat(core): create voting procedures component * chore(extension): fix rebase * fix(ui): add work break * feat(extension): voting procedures * refactor(core): make actions optional * refactor(core): use action as key prop * refactor(extension): add custom title for voting procedures --- .../ConfirmTransaction.module.scss | 1 + .../ConfirmTransactionContent.tsx | 4 + .../VotingProceduresContainer.tsx | 93 +++++++++++++ .../components/confirm-transaction/utils.ts | 21 ++- .../src/lib/translations/en.json | 16 +++ packages/core/.storybook/preview.js | 19 +-- packages/core/src/index.ts | 1 + .../VotingProcedures.stories.ts | 107 +++++++++++++++ .../VotingProcedures/VotingProcedures.tsx | 127 ++++++++++++++++++ .../ui/components/VotingProcedures/index.ts | 1 + packages/ui/package.json | 12 ++ packages/ui/src/design-system/index.ts | 2 +- .../ui/src/design-system/metadata/index.ts | 1 + .../metadata/metadata-link.component.tsx | 45 +++++++ .../design-system/text-link/text-link.css.ts | 1 + 15 files changed, 438 insertions(+), 13 deletions(-) create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/VotingProceduresContainer.tsx create mode 100644 packages/core/src/ui/components/VotingProcedures/VotingProcedures.stories.ts create mode 100644 packages/core/src/ui/components/VotingProcedures/VotingProcedures.tsx create mode 100644 packages/core/src/ui/components/VotingProcedures/index.ts create mode 100644 packages/ui/src/design-system/metadata/metadata-link.component.tsx diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.module.scss b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.module.scss index 9a02141f0..9d25c19f3 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.module.scss +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.module.scss @@ -26,4 +26,5 @@ .actionBtn { width: 100%; } + z-index: 10; } diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransactionContent.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransactionContent.tsx index 8cee30714..9df9c6f88 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransactionContent.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransactionContent.tsx @@ -5,6 +5,7 @@ import { DappTransactionContainer } from './DappTransactionContainer'; import { TxType } from './utils'; import { SignTxData } from './types'; import { ConfirmDRepRetirementContainer } from './ConfirmDRepRetirementContainer'; +import { VotingProceduresContainer } from './VotingProceduresContainer'; interface Props { txType?: TxType; @@ -22,6 +23,9 @@ export const ConfirmTransactionContent = ({ txType, signTxData, errorMessage }: if (txType === TxType.DRepRetirement) { return ; } + if (txType === TxType.VotingProcedures) { + return ; + } return ; }; diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/VotingProceduresContainer.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/VotingProceduresContainer.tsx new file mode 100644 index 000000000..8104ef919 --- /dev/null +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/VotingProceduresContainer.tsx @@ -0,0 +1,93 @@ +import React, { useMemo } from 'react'; +import { useTranslation } from 'react-i18next'; +import { VotingProcedures } from '@lace/core'; +import { SignTxData } from './types'; +import { votingProceduresInspector } from './utils'; +import { Wallet } from '@lace/cardano'; +import { useWalletStore } from '@src/stores'; +import { config } from '@src/config'; + +interface Props { + signTxData: SignTxData; + errorMessage?: string; +} + +const getVoterType = (voterType: Wallet.Cardano.VoterType): string => { + switch (voterType) { + case Wallet.Cardano.VoterType.ccHotKeyHash: + case Wallet.Cardano.VoterType.ccHotScriptHash: + return 'Constitutional Committee'; + case Wallet.Cardano.VoterType.stakePoolKeyHash: + return 'SPO'; + case Wallet.Cardano.VoterType.dRepKeyHash: + case Wallet.Cardano.VoterType.dRepScriptHash: + default: + return 'DRep'; + } +}; + +const getVote = (vote: Wallet.Cardano.Vote): string => { + switch (vote) { + case Wallet.Cardano.Vote.yes: + return 'Yes'; + case Wallet.Cardano.Vote.no: + return 'No'; + case Wallet.Cardano.Vote.abstain: + default: + return 'Abstain'; + } +}; + +export const VotingProceduresContainer = ({ signTxData, errorMessage }: Props): React.ReactElement => { + const { t } = useTranslation(); + const votingProcedures = votingProceduresInspector(signTxData.tx); + const { environmentName } = useWalletStore(); + const { CEXPLORER_BASE_URL, CEXPLORER_URL_PATHS } = config(); + + const explorerBaseUrl = useMemo( + () => `${CEXPLORER_BASE_URL[environmentName]}/${CEXPLORER_URL_PATHS.Tx}`, + [CEXPLORER_BASE_URL, CEXPLORER_URL_PATHS.Tx, environmentName] + ); + + return ( + ({ + voter: { + type: getVoterType(votingProcedure.voter.__typename), + dRepId: votingProcedure.voter.credential.hash.toString() + }, + votes: votingProcedure.votes.map((vote) => ({ + actionId: { + index: vote.actionId.actionIndex, + txHash: vote.actionId.id.toString(), + txHashUrl: `${explorerBaseUrl}/${vote.actionId.id}` + }, + votingProcedure: { + vote: getVote(vote.votingProcedure.vote), + anchor: { + url: vote.votingProcedure.anchor?.url, + hash: vote.votingProcedure.anchor?.dataHash.toString() + } + } + })) + }))} + translations={{ + voterType: t('core.votingProcedures.voterType'), + procedureTitle: t('core.votingProcedures.procedureTitle'), + actionIdTitle: t('core.votingProcedures.actionIdTitle'), + vote: t('core.votingProcedures.vote'), + actionId: { + index: t('core.votingProcedures.actionId.index'), + txHash: t('core.votingProcedures.actionId.txHash') + }, + anchor: { + hash: t('core.votingProcedures.anchor.hash'), + url: t('core.votingProcedures.anchor.url') + }, + dRepId: t('core.votingProcedures.dRepId') + }} + errorMessage={errorMessage} + /> + ); +}; diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts index 6b6611499..e3765947d 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts @@ -15,7 +15,8 @@ export enum TxType { Mint = 'Mint', Burn = 'Burn', DRepRegistration = 'DRepRegistration', - DRepRetirement = 'DRepRetirement' + DRepRetirement = 'DRepRetirement', + VotingProcedures = 'VotingProcedures' } export const getTitleKey = (txType: TxType): string => { @@ -27,6 +28,10 @@ export const getTitleKey = (txType: TxType): string => { return 'core.drepRetirement.title'; } + if (txType === TxType.VotingProcedures) { + return 'core.votingProcedures.title'; + } + return sectionTitle[DAPP_VIEWS.CONFIRM_TX]; }; @@ -94,18 +99,28 @@ export const dRepRetirementInspector = ( | Wallet.Cardano.UnRegisterDelegateRepresentativeCertificate | undefined; +export const votingProceduresInspector = (tx: Wallet.Cardano.Tx): Wallet.Cardano.VotingProcedures | undefined => + tx?.body?.votingProcedures; + export const getTxType = (tx: Wallet.Cardano.Tx): TxType => { const inspector = createTxInspector({ minted: assetsMintedInspector, burned: assetsBurnedInspector, dRepRegistration: dRepRegistrationInspector, - dRepRetirement: dRepRetirementInspector + dRepRetirement: dRepRetirementInspector, + votingProcedures: votingProceduresInspector }); - const { minted, burned, dRepRegistration, dRepRetirement } = inspector(tx as Wallet.Cardano.HydratedTx); + const { minted, burned, dRepRegistration, dRepRetirement, votingProcedures } = inspector( + tx as Wallet.Cardano.HydratedTx + ); const isMintTransaction = minted.length > 0; const isBurnTransaction = burned.length > 0; + if (votingProcedures) { + return TxType.VotingProcedures; + } + if (isMintTransaction) { return TxType.Mint; } diff --git a/apps/browser-extension-wallet/src/lib/translations/en.json b/apps/browser-extension-wallet/src/lib/translations/en.json index 3e5590100..621892c14 100644 --- a/apps/browser-extension-wallet/src/lib/translations/en.json +++ b/apps/browser-extension-wallet/src/lib/translations/en.json @@ -1113,6 +1113,22 @@ "tryingToUseAssetNotInWallet": "This DApp is trying to use token not held in your wallet.", "noCollateral": "Wallet should not be able to sign dapp txs without collateral." }, + "votingProcedures": { + "title": "Confirm Vote", + "voterType": "Voter type", + "procedureTitle": "Procedure", + "actionIdTitle": "Action ID", + "vote": "Vote", + "actionId": { + "index": "Index", + "txHash": "TX Hash" + }, + "anchor": { + "hash": "Anchor Hash", + "url": "Anchor URL" + }, + "dRepId": "DRep ID" + }, "drepRegistration": { "title": "Confirm DRep Registration", "metadata": "Metadata", diff --git a/packages/core/.storybook/preview.js b/packages/core/.storybook/preview.js index 8a971ba68..7ffa549ee 100644 --- a/packages/core/.storybook/preview.js +++ b/packages/core/.storybook/preview.js @@ -4,7 +4,7 @@ import 'normalize.css'; import './theme.scss'; import { ThemeColorScheme, ThemeProvider } from '@lace/ui'; -const preview = { +export const preview = { parameters: { actions: { argTypesRegex: '^on[A-Z].*' }, controls: { @@ -13,14 +13,15 @@ const preview = { date: /Date$/ } } - }, - decorators: [ - (Story) => ( + } +}; + +export const decorators = [ + (Story) => { + return ( - ) - ] -}; - -export default preview; + ); + } +]; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 9b38a4b41..b6db918e6 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -30,3 +30,4 @@ export * from '@ui/components/MnemonicWordsAutoComplete'; export * from '@ui/components/AddressCard'; export * from '@ui/components/ConfirmDRepRegistration'; export * from '@ui/components/ConfirmDRepRetirement'; +export * from '@ui/components/VotingProcedures'; diff --git a/packages/core/src/ui/components/VotingProcedures/VotingProcedures.stories.ts b/packages/core/src/ui/components/VotingProcedures/VotingProcedures.stories.ts new file mode 100644 index 000000000..72a297d79 --- /dev/null +++ b/packages/core/src/ui/components/VotingProcedures/VotingProcedures.stories.ts @@ -0,0 +1,107 @@ +import type { Meta, StoryObj } from '@storybook/react'; + +import { VotingProcedures } from './VotingProcedures'; +import { ComponentProps } from 'react'; + +const meta: Meta = { + title: 'VotingProcedures', + component: VotingProcedures, + parameters: { + layout: 'centered' + } +}; + +export default meta; +type Story = StoryObj; + +const data: ComponentProps = { + dappInfo: { + logo: 'https://cdn.mint.handle.me/favicon.png', + name: 'Mint', + url: 'https://preprod.mint.handle.me' + }, + data: [ + { + voter: { + type: 'DRep', + dRepId: 'drep1cs234l5mtapethapx8cq97nkpa27xf84phruh5f6jqxa78ymlp4' + }, + votes: [ + { + actionId: { + index: 0, + txHash: '26bfdcc75a7f4d0cd8c71f0189bc5ca5ad2f4a3db6240c82b5a0edac7f9203e0', + txHashUrl: + 'https://cexplorer.io/address/addr1q9wlvfl74g9h8txw5v0lfew2gjsw9z56d5kj8mmv5d8tudcx9eh8zefr3cxuje02lu6tgy083xkl39rr5xkj483vvd6q8nlapq' + }, + votingProcedure: { + anchor: { + hash: '9067f223838d88b83f660c05eedf7f6f65c45de31e522c1bcb6a1eb287b17e89', + url: 'https://shorturl.at/eK145' + }, + vote: 'Yes' + } + } + ] + } + ], + translations: { + voterType: 'Voter type', + procedureTitle: 'Procedure', + actionIdTitle: 'Action ID', + vote: 'Vote', + actionId: { + index: 'Index', + txHash: 'TX Hash' + }, + anchor: { + hash: 'Anchor Hash', + url: 'Anchor URL' + }, + dRepId: 'DRep ID' + } +}; + +export const Overview: Story = { + args: { + ...data + } +}; +export const WithError: Story = { + args: { + ...data, + errorMessage: 'Something went wrong' + } +}; + +export const MultipleVotes: Story = { + args: { + ...data, + data: [ + ...data.data, + { + voter: { + type: 'DRep', + dRepId: 'drep1cs234l5mtapethapx8cq97nkpa27xf84phruh5f6jqxa78ymlp4' + }, + votes: [ + { + actionId: { + index: 0, + txHash: '26bfdcc75a7f4d0cd8c71f0189bc5ca5ad2f4a3db6240c82b5a0edac7f9203e0', + txHashUrl: + 'https://cexplorer.io/address/addr1q9wlvfl74g9h8txw5v0lfew2gjsw9z56d5kj8mmv5d8tudcx9eh8zefr3cxuje02lu6tgy083xkl39rr5xkj483vvd6q8nlapq' + }, + votingProcedure: { + anchor: { + hash: '9067f223838d88b83f660c05eedf7f6f65c45de31e522c1bcb6a1eb287b17e89', + url: 'https://shorturl.at/eK145' + }, + vote: 'Yes' + } + } + ] + } + ] + } +}; diff --git a/packages/core/src/ui/components/VotingProcedures/VotingProcedures.tsx b/packages/core/src/ui/components/VotingProcedures/VotingProcedures.tsx new file mode 100644 index 000000000..654f4b76f --- /dev/null +++ b/packages/core/src/ui/components/VotingProcedures/VotingProcedures.tsx @@ -0,0 +1,127 @@ +import React, { Fragment } from 'react'; +import { Box, Cell, Grid, Flex, Metadata, MetadataLink, Text, Divider, sx } from '@lace/ui'; +import { DappInfo, DappInfoProps } from '../DappInfo'; +import { ErrorPane, Ellipsis } from '@lace/common'; + +type VotingProcedure = { + voter: { + type: string; + dRepId: string; + }; + votes: { + actionId: { + index: number; + txHash: string; + txHashUrl: string; + }; + votingProcedure: { + vote: string; + anchor?: { + url: string; + hash: string; + }; + }; + }[]; +}; + +interface Props { + dappInfo: Omit; + errorMessage?: string; + data: VotingProcedure[]; + translations: { + actionIdTitle: string; + actionId: { + index: string; + txHash: string; + }; + anchor: { + url: string; + hash: string; + }; + dRepId: string; + procedureTitle: string; + vote: string; + voterType: string; + }; +} + +const indexCounter = (text: string, idx: number, length: number): string => (length > 1 ? `${text} ${idx + 1}` : text); + +export const VotingProcedures = ({ dappInfo, errorMessage, data, translations }: Props): JSX.Element => { + const textCss = sx({ + color: '$text_primary' + }); + + return ( + + + + + {errorMessage && ( + + + + )} + {data.map(({ voter, votes }, idx) => ( + 0 ? '$40' : '$0'}> + + + + {indexCounter(translations.vote, idx, data.length)} + + + + + + + + + + + + {votes.map(({ actionId, votingProcedure }) => ( + + + + {indexCounter(translations.procedureTitle, idx, votes.length)} + + + + + + {votingProcedure.anchor && ( + <> + + + + + + + + )} + + + + + + {indexCounter(translations.actionIdTitle, idx, votes.length)} + + + + + + + + + + ))} + + + ))} + + ); +}; diff --git a/packages/core/src/ui/components/VotingProcedures/index.ts b/packages/core/src/ui/components/VotingProcedures/index.ts new file mode 100644 index 000000000..0bc283f6b --- /dev/null +++ b/packages/core/src/ui/components/VotingProcedures/index.ts @@ -0,0 +1 @@ +export { VotingProcedures } from './VotingProcedures'; diff --git a/packages/ui/package.json b/packages/ui/package.json index 96b82cd53..d132baa60 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -94,5 +94,17 @@ "wait-on": "^7.0.1", "webpack": "^5.76.1", "webpack-dev-server": "^4.11.1" + }, + "resolutions": { + "@storybook/addon-actions": "^6.5.16", + "@storybook/addon-essentials": "^6.5.16", + "@storybook/addon-interactions": "^6.5.16", + "@storybook/addon-links": "^6.5.16", + "@storybook/builder-webpack5": "6.5.16", + "@storybook/jest": "^0.0.10", + "@storybook/manager-webpack5": "6.5.16", + "@storybook/react": "^6.5.16", + "@storybook/test-runner": "^0.10.0", + "@storybook/testing-library": "^0.0.13" } } diff --git a/packages/ui/src/design-system/index.ts b/packages/ui/src/design-system/index.ts index 69b4af6b6..083cf49f0 100644 --- a/packages/ui/src/design-system/index.ts +++ b/packages/ui/src/design-system/index.ts @@ -24,5 +24,5 @@ export { ToastBar } from './toast-bar'; export * from './tooltip'; export { Message } from './message'; export { PasswordBox } from './password-box'; -export { Metadata } from './metadata'; +export { Metadata, MetadataLink } from './metadata'; export { TextLink } from './text-link'; diff --git a/packages/ui/src/design-system/metadata/index.ts b/packages/ui/src/design-system/metadata/index.ts index 6060859e4..d97b0957f 100644 --- a/packages/ui/src/design-system/metadata/index.ts +++ b/packages/ui/src/design-system/metadata/index.ts @@ -1 +1,2 @@ export { Metadata } from './metadata.component'; +export { MetadataLink } from './metadata-link.component'; diff --git a/packages/ui/src/design-system/metadata/metadata-link.component.tsx b/packages/ui/src/design-system/metadata/metadata-link.component.tsx new file mode 100644 index 000000000..5eb52078c --- /dev/null +++ b/packages/ui/src/design-system/metadata/metadata-link.component.tsx @@ -0,0 +1,45 @@ +import React from 'react'; + +import { Flex } from '../flex'; +import { Grid, Cell } from '../grid'; +import { TextLink } from '../text-link'; +import * as Typography from '../typography'; + +import * as cx from './metadata.css'; + +import type { OmitClassName } from '../../types'; + +type Props = OmitClassName<'div'> & { + label: string; + text: string; + url: string; +}; + +export const MetadataLink = ({ + label, + text, + url, + ...props +}: Readonly): JSX.Element => { + return ( + + + + {label} + + + + + + + + + + + ); +}; diff --git a/packages/ui/src/design-system/text-link/text-link.css.ts b/packages/ui/src/design-system/text-link/text-link.css.ts index 010a970b8..681ccc4f6 100644 --- a/packages/ui/src/design-system/text-link/text-link.css.ts +++ b/packages/ui/src/design-system/text-link/text-link.css.ts @@ -48,6 +48,7 @@ export const label = style([ color: vars.colors.$text_link_label_color_disabled, }, }, + wordBreak: 'break-all', }, ]); From e5f30b61af08f2495e5b8c56587fc6d7c18d8183 Mon Sep 17 00:00:00 2001 From: Lucas Date: Tue, 24 Oct 2023 16:39:30 -0300 Subject: [PATCH 04/22] [LW-8491] Voting delegation confirmation (#648) * feat(core): setup storybook * feat(core): add lace/ui package * feat: check for DRep transaction * feat: integrate confirm drep registration component * refactor: remove insufficient funds warning; break down main component * feat: add certificate data * feat: add drep retirement container * feat(extension): use consistent naming of DRep ID * fix: add cardano symbol to deposit amount * refactor: certificate inspector factory * feat: voting delegation * fix: type errors * fix: merge conflicts --------- Co-authored-by: Michael Chappell <7581002+mchappell@users.noreply.github.com> --- .../ConfirmDRepRegistrationContainer.tsx | 9 ++- .../ConfirmDRepRetirementContainer.tsx | 9 ++- .../ConfirmTransactionContent.tsx | 4 ++ .../ConfirmVoteDelegationContainer.tsx | 42 +++++++++++ .../components/confirm-transaction/utils.ts | 43 ++++++------ .../src/lib/translations/en.json | 8 +++ packages/core/src/index.ts | 1 + .../ConfirmVoteDelegation.stories.ts | 69 +++++++++++++++++++ .../ConfirmVoteDelegation.tsx | 56 +++++++++++++++ .../components/ConfirmVoteDelegation/index.ts | 1 + .../VotingProcedures/VotingProcedures.tsx | 2 +- packages/ui/package.json | 24 +++---- 12 files changed, 226 insertions(+), 42 deletions(-) create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmVoteDelegationContainer.tsx create mode 100644 packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.stories.ts create mode 100644 packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.tsx create mode 100644 packages/core/src/ui/components/ConfirmVoteDelegation/index.ts diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepRegistrationContainer.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepRegistrationContainer.tsx index f9a32a49c..3b349e045 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepRegistrationContainer.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepRegistrationContainer.tsx @@ -2,10 +2,12 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { ConfirmDRepRegistration } from '@lace/core'; import { SignTxData } from './types'; -import { dRepRegistrationInspector, drepIDasBech32FromHash } from './utils'; +import { certificateInspectorFactory, drepIDasBech32FromHash } from './utils'; import { Wallet } from '@lace/cardano'; import { useWalletStore } from '@src/stores'; +const { CertificateType } = Wallet.Cardano; + interface Props { signTxData: SignTxData; errorMessage?: string; @@ -13,11 +15,12 @@ interface Props { export const ConfirmDRepRegistrationContainer = ({ signTxData, errorMessage }: Props): React.ReactElement => { const { t } = useTranslation(); - const certificate = dRepRegistrationInspector(signTxData.tx); const { walletUI: { cardanoCoin } } = useWalletStore(); - + const certificate = certificateInspectorFactory( + CertificateType.RegisterDelegateRepresentative + )(signTxData.tx); const depositPaidWithCardanoSymbol = `${Wallet.util.lovelacesToAdaString(certificate.deposit.toString())} ${ cardanoCoin.symbol }`; diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepRetirementContainer.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepRetirementContainer.tsx index 1bb2cb14a..dc926c88e 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepRetirementContainer.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepRetirementContainer.tsx @@ -2,11 +2,13 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { ConfirmDRepRetirement } from '@lace/core'; import { SignTxData } from './types'; -import { dRepRetirementInspector, drepIDasBech32FromHash, getOwnRetirementMessageKey } from './utils'; +import { certificateInspectorFactory, drepIDasBech32FromHash, getOwnRetirementMessageKey } from './utils'; import { Wallet } from '@lace/cardano'; import { useWalletStore } from '@src/stores'; import { useIsOwnPubDRepKey } from './hooks'; +const { CertificateType } = Wallet.Cardano; + interface Props { signTxData: SignTxData; errorMessage?: string; @@ -14,12 +16,13 @@ interface Props { export const ConfirmDRepRetirementContainer = ({ signTxData, errorMessage }: Props): React.ReactElement => { const { t } = useTranslation(); - const certificate = dRepRetirementInspector(signTxData.tx); const { walletUI: { cardanoCoin }, inMemoryWallet } = useWalletStore(); - + const certificate = certificateInspectorFactory( + CertificateType.UnregisterDelegateRepresentative + )(signTxData.tx); const depositPaidWithCardanoSymbol = `${Wallet.util.lovelacesToAdaString(certificate.deposit.toString())} ${ cardanoCoin.symbol }`; diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransactionContent.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransactionContent.tsx index 9df9c6f88..85b8aed71 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransactionContent.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransactionContent.tsx @@ -5,6 +5,7 @@ import { DappTransactionContainer } from './DappTransactionContainer'; import { TxType } from './utils'; import { SignTxData } from './types'; import { ConfirmDRepRetirementContainer } from './ConfirmDRepRetirementContainer'; +import { ConfirmVoteDelegationContainer } from './ConfirmVoteDelegationContainer'; import { VotingProceduresContainer } from './VotingProceduresContainer'; interface Props { @@ -23,6 +24,9 @@ export const ConfirmTransactionContent = ({ txType, signTxData, errorMessage }: if (txType === TxType.DRepRetirement) { return ; } + if (txType === TxType.VoteDelegation) { + return ; + } if (txType === TxType.VotingProcedures) { return ; } diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmVoteDelegationContainer.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmVoteDelegationContainer.tsx new file mode 100644 index 000000000..3e578cc90 --- /dev/null +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmVoteDelegationContainer.tsx @@ -0,0 +1,42 @@ +import React from 'react'; +import { useTranslation } from 'react-i18next'; +import { ConfirmVoteDelegation } from '@lace/core'; +import { SignTxData } from './types'; +import { certificateInspectorFactory } from './utils'; +import { Wallet } from '@lace/cardano'; + +const { CertificateType } = Wallet.Cardano; + +interface Props { + signTxData: SignTxData; + errorMessage?: string; +} + +export const ConfirmVoteDelegationContainer = ({ signTxData, errorMessage }: Props): React.ReactElement => { + const { t } = useTranslation(); + const certificate = certificateInspectorFactory( + CertificateType.VoteDelegation + )(signTxData.tx); + const dRep = certificate.dRep; + + return ( + + ); +}; diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts index e3765947d..8381f0c29 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts @@ -8,6 +8,8 @@ import { runtime } from 'webextension-polyfill'; import { of } from 'rxjs'; import { sectionTitle, DAPP_VIEWS } from '../../config'; +const { CertificateType } = Wallet.Cardano; + const DAPP_TOAST_DURATION = 50; export enum TxType { @@ -16,6 +18,7 @@ export enum TxType { Burn = 'Burn', DRepRegistration = 'DRepRegistration', DRepRetirement = 'DRepRetirement', + VoteDelegation = 'VoteDelegation', VotingProcedures = 'VotingProcedures' } @@ -28,6 +31,10 @@ export const getTitleKey = (txType: TxType): string => { return 'core.drepRetirement.title'; } + if (txType === TxType.VoteDelegation) { + return 'core.voteDelegation.title'; + } + if (txType === TxType.VotingProcedures) { return 'core.votingProcedures.title'; } @@ -79,25 +86,10 @@ export const getTransactionAssetsId = (outputs: CardanoTxOut[]): Wallet.Cardano. return assetIds; }; -const isDRepRegistrationCertificate = (type: Wallet.Cardano.CertificateType) => - type === Wallet.Cardano.CertificateType.RegisterDelegateRepresentative; - -const isDRepRetirementCertificate = (type: Wallet.Cardano.CertificateType) => - type === Wallet.Cardano.CertificateType.UnregisterDelegateRepresentative; - -export const dRepRegistrationInspector = ( - tx: Wallet.Cardano.Tx -): Wallet.Cardano.RegisterDelegateRepresentativeCertificate | undefined => - tx?.body?.certificates?.find(({ __typename }) => isDRepRegistrationCertificate(__typename)) as - | Wallet.Cardano.RegisterDelegateRepresentativeCertificate - | undefined; - -export const dRepRetirementInspector = ( - tx: Wallet.Cardano.Tx -): Wallet.Cardano.UnRegisterDelegateRepresentativeCertificate | undefined => - tx?.body?.certificates?.find(({ __typename }) => isDRepRetirementCertificate(__typename)) as - | Wallet.Cardano.UnRegisterDelegateRepresentativeCertificate - | undefined; +export const certificateInspectorFactory = + (type: Wallet.Cardano.CertificateType) => + (tx: Wallet.Cardano.Tx): T | undefined => + tx?.body?.certificates?.find((certificate) => certificate.__typename === type) as T | undefined; export const votingProceduresInspector = (tx: Wallet.Cardano.Tx): Wallet.Cardano.VotingProcedures | undefined => tx?.body?.votingProcedures; @@ -106,12 +98,13 @@ export const getTxType = (tx: Wallet.Cardano.Tx): TxType => { const inspector = createTxInspector({ minted: assetsMintedInspector, burned: assetsBurnedInspector, - dRepRegistration: dRepRegistrationInspector, - dRepRetirement: dRepRetirementInspector, - votingProcedures: votingProceduresInspector + votingProcedures: votingProceduresInspector, + dRepRegistration: certificateInspectorFactory(CertificateType.RegisterDelegateRepresentative), + dRepRetirement: certificateInspectorFactory(CertificateType.UnregisterDelegateRepresentative), + voteDelegation: certificateInspectorFactory(CertificateType.VoteDelegation) }); - const { minted, burned, dRepRegistration, dRepRetirement, votingProcedures } = inspector( + const { minted, burned, dRepRegistration, dRepRetirement, voteDelegation, votingProcedures } = inspector( tx as Wallet.Cardano.HydratedTx ); const isMintTransaction = minted.length > 0; @@ -137,6 +130,10 @@ export const getTxType = (tx: Wallet.Cardano.Tx): TxType => { return TxType.DRepRetirement; } + if (voteDelegation) { + return TxType.VoteDelegation; + } + return TxType.Send; }; diff --git a/apps/browser-extension-wallet/src/lib/translations/en.json b/apps/browser-extension-wallet/src/lib/translations/en.json index 621892c14..2ead13f28 100644 --- a/apps/browser-extension-wallet/src/lib/translations/en.json +++ b/apps/browser-extension-wallet/src/lib/translations/en.json @@ -1145,6 +1145,14 @@ "isOwnRetirement": "This is your DRep retirement.", "isNotOwnRetirement": "The presented DRepID does not match your wallet's DRepID." }, + "voteDelegation": { + "title": "Confirm vote delegation", + "metadata": "Metadata", + "drepId": "Drep ID", + "alwaysAbstain": "Abstain", + "alwaysNoConfidence": "No Confidence", + "option": "Yes" + }, "destinationAddressInput": { "recipientAddress": "Recipient's address or $handle" }, diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index b6db918e6..066310c1b 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -30,4 +30,5 @@ export * from '@ui/components/MnemonicWordsAutoComplete'; export * from '@ui/components/AddressCard'; export * from '@ui/components/ConfirmDRepRegistration'; export * from '@ui/components/ConfirmDRepRetirement'; +export * from '@ui/components/ConfirmVoteDelegation'; export * from '@ui/components/VotingProcedures'; diff --git a/packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.stories.ts b/packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.stories.ts new file mode 100644 index 000000000..5d23ca14b --- /dev/null +++ b/packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.stories.ts @@ -0,0 +1,69 @@ +import type { Meta, StoryObj } from '@storybook/react'; + +import { ConfirmVoteDelegation } from './ConfirmVoteDelegation'; +import { ComponentProps } from 'react'; + +const meta: Meta = { + title: 'ConfirmVoteDelegation', + component: ConfirmVoteDelegation, + parameters: { + layout: 'centered' + } +}; + +export default meta; +type Story = StoryObj; + +const data: ComponentProps = { + dappInfo: { + logo: 'https://cdn.mint.handle.me/favicon.png', + name: 'Mint', + url: 'https://preprod.mint.handle.me' + }, + translations: { + labels: { + drepId: 'Drep ID', + alwaysAbstain: 'Abstain', + alwaysNoConfidence: 'No Confidence' + }, + option: 'Yes', + metadata: 'Metadata' + }, + metadata: { + drepId: 'drep1ruvgm0auzdplfn7g2jf3kcnpnw5mlhwxaxj8crag8h6t2ye9y9g', + alwaysAbstain: false, + alwaysNoConfidence: false + } +}; + +export const Overview: Story = { + args: { + ...data + } +}; +export const WithError: Story = { + args: { + ...data, + errorMessage: 'Something went wrong' + } +}; + +export const WithAbstain: Story = { + args: { + ...data, + metadata: { + alwaysAbstain: true, + alwaysNoConfidence: false + } + } +}; + +export const WithNoConfidence: Story = { + args: { + ...data, + metadata: { + alwaysAbstain: false, + alwaysNoConfidence: true + } + } +}; diff --git a/packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.tsx b/packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.tsx new file mode 100644 index 000000000..cad483cc3 --- /dev/null +++ b/packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.tsx @@ -0,0 +1,56 @@ +import React from 'react'; +import { Box, Cell, Grid, TransactionSummary, Flex } from '@lace/ui'; +import { DappInfo, DappInfoProps } from '../DappInfo'; +import { ErrorPane } from '@lace/common'; + +interface Props { + dappInfo: Omit; + errorMessage?: string; + translations: { + labels: { + drepId: string; + alwaysAbstain: string; + alwaysNoConfidence: string; + }; + option: string; + metadata: string; + }; + metadata: { + drepId?: string; + alwaysAbstain: boolean; + alwaysNoConfidence: boolean; + }; +} + +export const ConfirmVoteDelegation = ({ dappInfo, errorMessage, translations, metadata }: Props): JSX.Element => ( + + + + + {errorMessage && ( + + + + )} + + + + + {metadata.drepId && ( + + + + )} + {metadata.alwaysAbstain && ( + + + + )} + {metadata.alwaysNoConfidence && ( + + + + )} + + +); diff --git a/packages/core/src/ui/components/ConfirmVoteDelegation/index.ts b/packages/core/src/ui/components/ConfirmVoteDelegation/index.ts new file mode 100644 index 000000000..33e8e6755 --- /dev/null +++ b/packages/core/src/ui/components/ConfirmVoteDelegation/index.ts @@ -0,0 +1 @@ +export { ConfirmVoteDelegation } from './ConfirmVoteDelegation'; diff --git a/packages/core/src/ui/components/VotingProcedures/VotingProcedures.tsx b/packages/core/src/ui/components/VotingProcedures/VotingProcedures.tsx index 654f4b76f..c7824f988 100644 --- a/packages/core/src/ui/components/VotingProcedures/VotingProcedures.tsx +++ b/packages/core/src/ui/components/VotingProcedures/VotingProcedures.tsx @@ -1,7 +1,7 @@ import React, { Fragment } from 'react'; import { Box, Cell, Grid, Flex, Metadata, MetadataLink, Text, Divider, sx } from '@lace/ui'; import { DappInfo, DappInfoProps } from '../DappInfo'; -import { ErrorPane, Ellipsis } from '@lace/common'; +import { ErrorPane } from '@lace/common'; type VotingProcedure = { voter: { diff --git a/packages/ui/package.json b/packages/ui/package.json index d132baa60..c5e31ae81 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -29,6 +29,18 @@ "typecheck": "tsc --noEmit", "watch": "yarn build --watch" }, + "resolutions": { + "@storybook/addon-actions": "^6.5.16", + "@storybook/addon-essentials": "^6.5.16", + "@storybook/addon-interactions": "^6.5.16", + "@storybook/addon-links": "^6.5.16", + "@storybook/builder-webpack5": "6.5.16", + "@storybook/jest": "^0.0.10", + "@storybook/manager-webpack5": "6.5.16", + "@storybook/react": "^6.5.16", + "@storybook/test-runner": "^0.10.0", + "@storybook/testing-library": "^0.0.13" + }, "dependencies": { "@radix-ui/react-alert-dialog": "^1.0.4", "@radix-ui/react-avatar": "^1.0.2", @@ -94,17 +106,5 @@ "wait-on": "^7.0.1", "webpack": "^5.76.1", "webpack-dev-server": "^4.11.1" - }, - "resolutions": { - "@storybook/addon-actions": "^6.5.16", - "@storybook/addon-essentials": "^6.5.16", - "@storybook/addon-interactions": "^6.5.16", - "@storybook/addon-links": "^6.5.16", - "@storybook/builder-webpack5": "6.5.16", - "@storybook/jest": "^0.0.10", - "@storybook/manager-webpack5": "6.5.16", - "@storybook/react": "^6.5.16", - "@storybook/test-runner": "^0.10.0", - "@storybook/testing-library": "^0.0.13" } } From fc0ba662870bd26707d1b30d441b8fffc0cbdf7e Mon Sep 17 00:00:00 2001 From: Michael Chappell <7581002+mchappell@users.noreply.github.com> Date: Wed, 25 Oct 2023 19:02:38 +0100 Subject: [PATCH 05/22] chore: modify sanchonet urls (#667) --- .github/workflows/e2e-tests-linux.yml | 3 --- .github/workflows/smoke-tests.yml | 3 --- apps/browser-extension-wallet/.env.defaults | 2 +- apps/browser-extension-wallet/.env.example | 2 +- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/e2e-tests-linux.yml b/.github/workflows/e2e-tests-linux.yml index 47f32d5fc..71eec19cf 100644 --- a/.github/workflows/e2e-tests-linux.yml +++ b/.github/workflows/e2e-tests-linux.yml @@ -50,9 +50,6 @@ jobs: uses: ./.github/shared/build with: LACE_EXTENSION_KEY: ${{ secrets.MANIFEST_PUBLIC_KEY }} - CARDANO_SERVICES_URL_MAINNET: ${{ secrets.CARDANO_SERVICES_DEV_URL_MAINNET }} - CARDANO_SERVICES_URL_PREPROD: ${{ secrets.CARDANO_SERVICES_DEV_URL_PREPROD }} - CARDANO_SERVICES_URL_PREVIEW: ${{ secrets.CARDANO_SERVICES_DEV_URL_PREVIEW }} - name: Start XVFB run: | Xvfb :99 & diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 5066293a9..5c2526ad4 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -26,9 +26,6 @@ jobs: uses: ./.github/shared/build with: LACE_EXTENSION_KEY: ${{ secrets.MANIFEST_PUBLIC_KEY }} - CARDANO_SERVICES_URL_MAINNET: ${{ secrets.CARDANO_SERVICES_DEV_URL_MAINNET }} - CARDANO_SERVICES_URL_PREPROD: ${{ secrets.CARDANO_SERVICES_DEV_URL_PREPROD }} - CARDANO_SERVICES_URL_PREVIEW: ${{ secrets.CARDANO_SERVICES_DEV_URL_PREVIEW }} - name: Start XVFB run: | Xvfb :99 & diff --git a/apps/browser-extension-wallet/.env.defaults b/apps/browser-extension-wallet/.env.defaults index a13fed41e..1f1d818e7 100644 --- a/apps/browser-extension-wallet/.env.defaults +++ b/apps/browser-extension-wallet/.env.defaults @@ -61,7 +61,7 @@ CARDANO_SERVICES_URL_MAINNET=https://backend.live-mainnet.eks.lw.iog.io CARDANO_SERVICES_URL_PREPROD=https://backend.live-preprod.eks.lw.iog.io CARDANO_SERVICES_URL_PREVIEW=https://backend.live-preview.eks.lw.iog.io # TODO: update this with a valid sanchonet url -CARDANO_SERVICES_URL_SANCHONET=https://backend.live-preprod.eks.lw.iog.io +CARDANO_SERVICES_URL_SANCHONET=https://backend.dev-sanchonet.eks.lw.iog.io # Explorer URLs CEXPLORER_URL_MAINNET=https://cexplorer.io diff --git a/apps/browser-extension-wallet/.env.example b/apps/browser-extension-wallet/.env.example index 3af21b976..f7630915a 100644 --- a/apps/browser-extension-wallet/.env.example +++ b/apps/browser-extension-wallet/.env.example @@ -62,7 +62,7 @@ CARDANO_SERVICES_URL_MAINNET=https://backend.live-mainnet.eks.lw.iog.io CARDANO_SERVICES_URL_PREPROD=https://backend.live-preprod.eks.lw.iog.io CARDANO_SERVICES_URL_PREVIEW=https://backend.live-preview.eks.lw.iog.io # TODO: update this with a valid sanchonet url -CARDANO_SERVICES_URL_SANCHONET=https://backend.live-preprod.eks.lw.iog.io +CARDANO_SERVICES_URL_SANCHONET=https://backend.dev-sanchonet.eks.lw.iog.io # Explorer URLs CEXPLORER_URL_MAINNET=https://cexplorer.io From a8918c884c3e7eddd3e39459777d20c21cc60164 Mon Sep 17 00:00:00 2001 From: Lucas Date: Wed, 1 Nov 2023 13:24:50 -0300 Subject: [PATCH 06/22] feat: drep update certificate signing (#664) --- .../ConfirmDRepUpdateContainer.tsx | 40 +++++++++++++ .../ConfirmTransactionContent.tsx | 4 ++ .../components/confirm-transaction/utils.ts | 12 +++- .../src/lib/translations/en.json | 7 +++ packages/core/src/index.ts | 1 + .../ConfirmDRepUpdate.stories.ts | 58 +++++++++++++++++++ .../ConfirmDRepUpdate/ConfirmDRepUpdate.tsx | 53 +++++++++++++++++ .../ui/components/ConfirmDRepUpdate/index.ts | 1 + 8 files changed, 175 insertions(+), 1 deletion(-) create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepUpdateContainer.tsx create mode 100644 packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.stories.ts create mode 100644 packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.tsx create mode 100644 packages/core/src/ui/components/ConfirmDRepUpdate/index.ts diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepUpdateContainer.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepUpdateContainer.tsx new file mode 100644 index 000000000..17852419a --- /dev/null +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmDRepUpdateContainer.tsx @@ -0,0 +1,40 @@ +import React from 'react'; +import { useTranslation } from 'react-i18next'; +import { ConfirmDRepUpdate } from '@lace/core'; +import { SignTxData } from './types'; +import { certificateInspectorFactory, drepIDasBech32FromHash } from './utils'; +import { Wallet } from '@lace/cardano'; + +const { CertificateType } = Wallet.Cardano; + +interface Props { + signTxData: SignTxData; + errorMessage?: string; +} + +export const ConfirmDRepUpdateContainer = ({ signTxData, errorMessage }: Props): React.ReactElement => { + const { t } = useTranslation(); + const certificate = certificateInspectorFactory( + CertificateType.UpdateDelegateRepresentative + )(signTxData.tx); + + return ( + + ); +}; diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransactionContent.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransactionContent.tsx index 85b8aed71..59d375581 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransactionContent.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransactionContent.tsx @@ -7,6 +7,7 @@ import { SignTxData } from './types'; import { ConfirmDRepRetirementContainer } from './ConfirmDRepRetirementContainer'; import { ConfirmVoteDelegationContainer } from './ConfirmVoteDelegationContainer'; import { VotingProceduresContainer } from './VotingProceduresContainer'; +import { ConfirmDRepUpdateContainer } from './ConfirmDRepUpdateContainer'; interface Props { txType?: TxType; @@ -24,6 +25,9 @@ export const ConfirmTransactionContent = ({ txType, signTxData, errorMessage }: if (txType === TxType.DRepRetirement) { return ; } + if (txType === TxType.DRepUpdate) { + return ; + } if (txType === TxType.VoteDelegation) { return ; } diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts index 8381f0c29..8a8f838bd 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts @@ -18,6 +18,7 @@ export enum TxType { Burn = 'Burn', DRepRegistration = 'DRepRegistration', DRepRetirement = 'DRepRetirement', + DRepUpdate = 'DRepUpdate', VoteDelegation = 'VoteDelegation', VotingProcedures = 'VotingProcedures' } @@ -31,6 +32,10 @@ export const getTitleKey = (txType: TxType): string => { return 'core.drepRetirement.title'; } + if (txType === TxType.DRepUpdate) { + return 'core.drepUpdate.title'; + } + if (txType === TxType.VoteDelegation) { return 'core.voteDelegation.title'; } @@ -101,10 +106,11 @@ export const getTxType = (tx: Wallet.Cardano.Tx): TxType => { votingProcedures: votingProceduresInspector, dRepRegistration: certificateInspectorFactory(CertificateType.RegisterDelegateRepresentative), dRepRetirement: certificateInspectorFactory(CertificateType.UnregisterDelegateRepresentative), + dRepUpdate: certificateInspectorFactory(CertificateType.UpdateDelegateRepresentative), voteDelegation: certificateInspectorFactory(CertificateType.VoteDelegation) }); - const { minted, burned, dRepRegistration, dRepRetirement, voteDelegation, votingProcedures } = inspector( + const { minted, burned, dRepRegistration, dRepRetirement, dRepUpdate, voteDelegation, votingProcedures } = inspector( tx as Wallet.Cardano.HydratedTx ); const isMintTransaction = minted.length > 0; @@ -134,6 +140,10 @@ export const getTxType = (tx: Wallet.Cardano.Tx): TxType => { return TxType.VoteDelegation; } + if (dRepUpdate) { + return TxType.DRepUpdate; + } + return TxType.Send; }; diff --git a/apps/browser-extension-wallet/src/lib/translations/en.json b/apps/browser-extension-wallet/src/lib/translations/en.json index 2ead13f28..cf2781123 100644 --- a/apps/browser-extension-wallet/src/lib/translations/en.json +++ b/apps/browser-extension-wallet/src/lib/translations/en.json @@ -1145,6 +1145,13 @@ "isOwnRetirement": "This is your DRep retirement.", "isNotOwnRetirement": "The presented DRepID does not match your wallet's DRepID." }, + "drepUpdate": { + "title": "Confirm DRep update", + "metadata": "Metadata", + "drepId": "Drep ID", + "url": "URL", + "hash": "Hash" + }, "voteDelegation": { "title": "Confirm vote delegation", "metadata": "Metadata", diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 066310c1b..cd74f3960 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -30,5 +30,6 @@ export * from '@ui/components/MnemonicWordsAutoComplete'; export * from '@ui/components/AddressCard'; export * from '@ui/components/ConfirmDRepRegistration'; export * from '@ui/components/ConfirmDRepRetirement'; +export * from '@ui/components/ConfirmDRepUpdate'; export * from '@ui/components/ConfirmVoteDelegation'; export * from '@ui/components/VotingProcedures'; diff --git a/packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.stories.ts b/packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.stories.ts new file mode 100644 index 000000000..26028b865 --- /dev/null +++ b/packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.stories.ts @@ -0,0 +1,58 @@ +import type { Meta, StoryObj } from '@storybook/react'; + +import { ConfirmDRepUpdate } from './ConfirmDRepUpdate'; +import { ComponentProps } from 'react'; + +const meta: Meta = { + title: 'ConfirmDRepUpdate', + component: ConfirmDRepUpdate, + parameters: { + layout: 'centered' + } +}; + +export default meta; +type Story = StoryObj; + +const data: ComponentProps = { + dappInfo: { + logo: 'https://cdn.mint.handle.me/favicon.png', + name: 'Mint', + url: 'https://preprod.mint.handle.me' + }, + translations: { + labels: { + drepId: 'Drep ID', + hash: 'Hash', + url: 'URL' + }, + metadata: 'Metadata' + }, + metadata: { + drepId: '65ge6g54g5dd5', + hash: '9bba8233cdd086f0325daba465d568a88970d42536f9e71e92a80d5922ded885', + url: 'https://raw.githubusercontent.com/Ryun1/gov-metadata/main/governace-action/metadata.jsonldr1q99...uqvzlalu' + } +}; + +export const Overview: Story = { + args: { + ...data + } +}; + +export const Empty: Story = { + args: { + ...data, + metadata: { + drepId: '65ge6g54g5dd5' + } + } +}; + +export const WithError: Story = { + args: { + ...data, + errorMessage: 'Something went wrong' + } +}; diff --git a/packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.tsx b/packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.tsx new file mode 100644 index 000000000..10f148a23 --- /dev/null +++ b/packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.tsx @@ -0,0 +1,53 @@ +import React from 'react'; +import { Box, Cell, Grid, TransactionSummary, Flex } from '@lace/ui'; +import { DappInfo, DappInfoProps } from '../DappInfo'; +import { ErrorPane } from '@lace/common'; + +interface Props { + dappInfo: Omit; + errorMessage?: string; + translations: { + labels: { + url: string; + hash: string; + drepId: string; + }; + metadata: string; + }; + metadata: { + url?: string; + hash?: string; + drepId: string; + }; +} + +export const ConfirmDRepUpdate = ({ dappInfo, errorMessage, translations, metadata }: Props): JSX.Element => ( + + + + + {errorMessage && ( + + + + )} + + + + + {metadata.url && ( + + + + )} + {metadata.hash && ( + + + + )} + + + + + +); diff --git a/packages/core/src/ui/components/ConfirmDRepUpdate/index.ts b/packages/core/src/ui/components/ConfirmDRepUpdate/index.ts new file mode 100644 index 000000000..1017f7880 --- /dev/null +++ b/packages/core/src/ui/components/ConfirmDRepUpdate/index.ts @@ -0,0 +1 @@ +export { ConfirmDRepUpdate } from './ConfirmDRepUpdate'; From e4641e197088d1a963b453ddee8ba8936485437d Mon Sep 17 00:00:00 2001 From: Michael Chappell <7581002+mchappell@users.noreply.github.com> Date: Tue, 7 Nov 2023 08:53:35 +0000 Subject: [PATCH 07/22] fix(extension): updated padding and missing bech32 addressing --- .../ConfirmVoteDelegationContainer.tsx | 4 +- .../VotingProceduresContainer.tsx | 48 +++++++++++-------- .../ConfirmDRepRegistration.tsx | 4 +- .../ConfirmDRepRetirement.tsx | 6 +-- .../ConfirmDRepUpdate/ConfirmDRepUpdate.tsx | 4 +- .../ConfirmVoteDelegation.tsx | 4 +- .../VotingProcedures/VotingProcedures.tsx | 4 +- 7 files changed, 41 insertions(+), 33 deletions(-) diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmVoteDelegationContainer.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmVoteDelegationContainer.tsx index 3e578cc90..bbd58e646 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmVoteDelegationContainer.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmVoteDelegationContainer.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { ConfirmVoteDelegation } from '@lace/core'; import { SignTxData } from './types'; -import { certificateInspectorFactory } from './utils'; +import { certificateInspectorFactory, drepIDasBech32FromHash } from './utils'; import { Wallet } from '@lace/cardano'; const { CertificateType } = Wallet.Cardano; @@ -25,7 +25,7 @@ export const ConfirmVoteDelegationContainer = ({ signTxData, errorMessage }: Pro metadata={{ alwaysAbstain: Wallet.Cardano.isDRepAlwaysAbstain(dRep), alwaysNoConfidence: Wallet.Cardano.isDRepAlwaysNoConfidence(dRep), - ...(Wallet.Cardano.isDRepCredential(dRep) ? { drepId: dRep.hash } : {}) + ...(Wallet.Cardano.isDRepCredential(dRep) ? { drepId: drepIDasBech32FromHash(dRep.hash) } : {}) }} translations={{ metadata: t('core.voteDelegation.metadata'), diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/VotingProceduresContainer.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/VotingProceduresContainer.tsx index 8104ef919..ea135ee37 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/VotingProceduresContainer.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/VotingProceduresContainer.tsx @@ -2,7 +2,7 @@ import React, { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { VotingProcedures } from '@lace/core'; import { SignTxData } from './types'; -import { votingProceduresInspector } from './utils'; +import { drepIDasBech32FromHash, votingProceduresInspector } from './utils'; import { Wallet } from '@lace/cardano'; import { useWalletStore } from '@src/stores'; import { config } from '@src/config'; @@ -12,7 +12,7 @@ interface Props { errorMessage?: string; } -const getVoterType = (voterType: Wallet.Cardano.VoterType): string => { +const getVoterType = (voterType: Wallet.Cardano.VoterType): 'Constitutional Committee' | 'SPO' | 'DRep' => { switch (voterType) { case Wallet.Cardano.VoterType.ccHotKeyHash: case Wallet.Cardano.VoterType.ccHotScriptHash: @@ -52,26 +52,34 @@ export const VotingProceduresContainer = ({ signTxData, errorMessage }: Props): return ( ({ - voter: { - type: getVoterType(votingProcedure.voter.__typename), - dRepId: votingProcedure.voter.credential.hash.toString() - }, - votes: votingProcedure.votes.map((vote) => ({ - actionId: { - index: vote.actionId.actionIndex, - txHash: vote.actionId.id.toString(), - txHashUrl: `${explorerBaseUrl}/${vote.actionId.id}` + data={votingProcedures.map((votingProcedure) => { + const voterType = getVoterType(votingProcedure.voter.__typename); + + const drepId = + voterType === 'DRep' + ? drepIDasBech32FromHash(votingProcedure.voter.credential.hash) + : votingProcedure.voter.credential.hash.toString(); + return { + voter: { + type: voterType, + dRepId: drepId }, - votingProcedure: { - vote: getVote(vote.votingProcedure.vote), - anchor: { - url: vote.votingProcedure.anchor?.url, - hash: vote.votingProcedure.anchor?.dataHash.toString() + votes: votingProcedure.votes.map((vote) => ({ + actionId: { + index: vote.actionId.actionIndex, + txHash: vote.actionId.id.toString(), + txHashUrl: `${explorerBaseUrl}/${vote.actionId.id}` + }, + votingProcedure: { + vote: getVote(vote.votingProcedure.vote), + anchor: !!vote.votingProcedure.anchor?.url && { + url: vote.votingProcedure.anchor?.url, + hash: vote.votingProcedure.anchor?.dataHash.toString() + } } - } - })) - }))} + })) + }; + })} translations={{ voterType: t('core.votingProcedures.voterType'), procedureTitle: t('core.votingProcedures.procedureTitle'), diff --git a/packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.tsx b/packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.tsx index 704101505..9246cb3c8 100644 --- a/packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.tsx +++ b/packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.tsx @@ -24,11 +24,11 @@ interface Props { export const ConfirmDRepRegistration = ({ dappInfo, errorMessage, translations, metadata }: Props): JSX.Element => ( - + {errorMessage && ( - + )} diff --git a/packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.tsx b/packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.tsx index b658e268e..ece0e83d6 100644 --- a/packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.tsx +++ b/packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.tsx @@ -21,15 +21,15 @@ interface Props { export const ConfirmDRepRetirement = ({ dappInfo, errorMessage, translations, metadata }: Props): JSX.Element => ( - + {errorMessage && ( - + )} - + diff --git a/packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.tsx b/packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.tsx index 10f148a23..d712827f1 100644 --- a/packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.tsx +++ b/packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.tsx @@ -23,11 +23,11 @@ interface Props { export const ConfirmDRepUpdate = ({ dappInfo, errorMessage, translations, metadata }: Props): JSX.Element => ( - + {errorMessage && ( - + )} diff --git a/packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.tsx b/packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.tsx index cad483cc3..eebab72b2 100644 --- a/packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.tsx +++ b/packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.tsx @@ -24,11 +24,11 @@ interface Props { export const ConfirmVoteDelegation = ({ dappInfo, errorMessage, translations, metadata }: Props): JSX.Element => ( - + {errorMessage && ( - + )} diff --git a/packages/core/src/ui/components/VotingProcedures/VotingProcedures.tsx b/packages/core/src/ui/components/VotingProcedures/VotingProcedures.tsx index c7824f988..1dcf20f24 100644 --- a/packages/core/src/ui/components/VotingProcedures/VotingProcedures.tsx +++ b/packages/core/src/ui/components/VotingProcedures/VotingProcedures.tsx @@ -16,7 +16,7 @@ type VotingProcedure = { }; votingProcedure: { vote: string; - anchor?: { + anchor: { url: string; hash: string; }; @@ -34,7 +34,7 @@ interface Props { index: string; txHash: string; }; - anchor: { + anchor?: { url: string; hash: string; }; From 481b966e381f6f0d22193ebb6845acade1faa04a Mon Sep 17 00:00:00 2001 From: Michael Chappell <7581002+mchappell@users.noreply.github.com> Date: Tue, 14 Nov 2023 14:22:23 +0000 Subject: [PATCH 08/22] fix: no explorer for sanchonet --- apps/browser-extension-wallet/.env.defaults | 1 + apps/browser-extension-wallet/src/config.ts | 13 ++++--------- .../VotingProceduresContainer.tsx | 13 ++++++++----- .../PostHogClientProvider/client/config.ts | 12 ++++++++---- .../components/TransactionDetailsProxy.tsx | 16 +++++++++++----- .../AssetDetailsDrawer/AssetDetails.tsx | 17 ++++++++++++++--- .../ActivityDetail/TransactionDetails.tsx | 4 ++-- .../VotingProcedures/VotingProcedures.tsx | 16 +++++++++++----- 8 files changed, 59 insertions(+), 33 deletions(-) diff --git a/apps/browser-extension-wallet/.env.defaults b/apps/browser-extension-wallet/.env.defaults index 1f1d818e7..5925a8b29 100644 --- a/apps/browser-extension-wallet/.env.defaults +++ b/apps/browser-extension-wallet/.env.defaults @@ -55,6 +55,7 @@ PRODUCTION_MODE_TRACKING=false POSTHOG_DEV_TOKEN_MAINNET=phc_gH96Lx5lEVXTTWEyytSdTFPDk3Xsxwi4BqG88mKObd1 POSTHOG_DEV_TOKEN_PREPROD=phc_Xlmldm6EYSfQVgB9Uxm3b2xC1noDlgFFXpF9AJ6SMfJ POSTHOG_DEV_TOKEN_PREVIEW=phc_e8SaOOWpXpNE59TnpLumeUjWm4iv024AWjhQqU406jr +POSTHOG_DEV_TOKEN_SANCHONET=phc_OUu6sPucDu5S6skRmYbWN5Jn8TpggWTQu1Y1ETkm3xt # Cardano Services CARDANO_SERVICES_URL_MAINNET=https://backend.live-mainnet.eks.lw.iog.io diff --git a/apps/browser-extension-wallet/src/config.ts b/apps/browser-extension-wallet/src/config.ts index 45cbd5346..bdb23b42b 100644 --- a/apps/browser-extension-wallet/src/config.ts +++ b/apps/browser-extension-wallet/src/config.ts @@ -22,7 +22,7 @@ export type Config = { ADA_PRICE_CHECK_INTERVAL: number; TOKEN_PRICE_CHECK_INTERVAL: number; AVAILABLE_CHAINS: Wallet.ChainName[]; - CEXPLORER_BASE_URL: Record; + CEXPLORER_BASE_URL: Record, string>; CEXPLORER_URL_PATHS: CExplorerUrlPaths; SAVED_PRICE_DURATION: number; }; @@ -38,12 +38,8 @@ const envChecks = (chosenChain: Wallet.ChainName): void => { throw new Error('env vars not complete'); } - if ( - !process.env.CEXPLORER_URL_MAINNET || - !process.env.CEXPLORER_URL_PREVIEW || - !process.env.CEXPLORER_URL_PREPROD || - !process.env.CEXPLORER_URL_SANCHONET - ) { + // TODO Update if sanchonet explorer becomes available + if (!process.env.CEXPLORER_URL_MAINNET || !process.env.CEXPLORER_URL_PREVIEW || !process.env.CEXPLORER_URL_PREPROD) { throw new Error('explorer vars not complete'); } @@ -90,8 +86,7 @@ export const config = (): Config => { CEXPLORER_BASE_URL: { Mainnet: `${process.env.CEXPLORER_URL_MAINNET}`, Preprod: `${process.env.CEXPLORER_URL_PREPROD}`, - Preview: `${process.env.CEXPLORER_URL_PREVIEW}`, - Sanchonet: `${process.env.CEXPLORER_URL_SANCHONET}` + Preview: `${process.env.CEXPLORER_URL_PREVIEW}` }, CEXPLORER_URL_PATHS: { Tx: 'tx', diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/VotingProceduresContainer.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/VotingProceduresContainer.tsx index ea135ee37..7d6af9463 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/VotingProceduresContainer.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/VotingProceduresContainer.tsx @@ -44,10 +44,13 @@ export const VotingProceduresContainer = ({ signTxData, errorMessage }: Props): const { environmentName } = useWalletStore(); const { CEXPLORER_BASE_URL, CEXPLORER_URL_PATHS } = config(); - const explorerBaseUrl = useMemo( - () => `${CEXPLORER_BASE_URL[environmentName]}/${CEXPLORER_URL_PATHS.Tx}`, - [CEXPLORER_BASE_URL, CEXPLORER_URL_PATHS.Tx, environmentName] - ); + const explorerBaseUrl = useMemo(() => { + if (environmentName === 'Sanchonet') { + return; + } + // eslint-disable-next-line consistent-return + return `${CEXPLORER_BASE_URL[environmentName]}/${CEXPLORER_URL_PATHS.Tx}`; + }, [CEXPLORER_BASE_URL, CEXPLORER_URL_PATHS.Tx, environmentName]); return ( = { [Wallet.Cardano.NetworkMagics.Mainnet]: process.env.POSTHOG_DEV_TOKEN_MAINNET, [Wallet.Cardano.NetworkMagics.Preprod]: process.env.POSTHOG_DEV_TOKEN_PREPROD, - [Wallet.Cardano.NetworkMagics.Preview]: process.env.POSTHOG_DEV_TOKEN_PREVIEW + [Wallet.Cardano.NetworkMagics.Preview]: process.env.POSTHOG_DEV_TOKEN_PREVIEW, + [Wallet.Cardano.NetworkMagics.Sanchonet]: process.env.POSTHOG_DEV_TOKEN_SANCHONET }; export const PRODUCTION_NETWORK_ID_TO_POSTHOG_TOKEN_MAP: Record = { [Wallet.Cardano.NetworkMagics.Mainnet]: process.env.POSTHOG_PRODUCTION_TOKEN_MAINNET, [Wallet.Cardano.NetworkMagics.Preprod]: process.env.POSTHOG_PRODUCTION_TOKEN_PREPROD, - [Wallet.Cardano.NetworkMagics.Preview]: process.env.POSTHOG_PRODUCTION_TOKEN_PREVIEW + [Wallet.Cardano.NetworkMagics.Preview]: process.env.POSTHOG_PRODUCTION_TOKEN_PREVIEW, + [Wallet.Cardano.NetworkMagics.Sanchonet]: process.env.POSTHOG_PRODUCTION_TOKEN_SANCHONET }; export const DEV_NETWORK_ID_TO_POSTHOG_PROJECT_ID_MAP: Record = { [Wallet.Cardano.NetworkMagics.Mainnet]: 6315, [Wallet.Cardano.NetworkMagics.Preprod]: 6316, - [Wallet.Cardano.NetworkMagics.Preview]: 4874 + [Wallet.Cardano.NetworkMagics.Preview]: 4874, + [Wallet.Cardano.NetworkMagics.Sanchonet]: 11_178 }; export const PRODUCTION_NETWORK_ID_TO_POSTHOG_PROJECT_ID_MAP: Record = { [Wallet.Cardano.NetworkMagics.Mainnet]: 6621, [Wallet.Cardano.NetworkMagics.Preprod]: 6620, - [Wallet.Cardano.NetworkMagics.Preview]: 6619 + [Wallet.Cardano.NetworkMagics.Preview]: 6619, + [Wallet.Cardano.NetworkMagics.Sanchonet]: 11_179 }; diff --git a/apps/browser-extension-wallet/src/views/browser-view/features/activity/components/TransactionDetailsProxy.tsx b/apps/browser-extension-wallet/src/views/browser-view/features/activity/components/TransactionDetailsProxy.tsx index f96efee30..c80b7d22a 100644 --- a/apps/browser-extension-wallet/src/views/browser-view/features/activity/components/TransactionDetailsProxy.tsx +++ b/apps/browser-extension-wallet/src/views/browser-view/features/activity/components/TransactionDetailsProxy.tsx @@ -29,10 +29,12 @@ export const TransactionDetailsProxy = withAddressBookContext( const { list: addressList } = useAddressBookContext(); const { CEXPLORER_BASE_URL, CEXPLORER_URL_PATHS } = config(); - const explorerBaseUrl = useMemo( - () => `${CEXPLORER_BASE_URL[environmentName]}/${CEXPLORER_URL_PATHS.Tx}`, - [CEXPLORER_BASE_URL, CEXPLORER_URL_PATHS.Tx, environmentName] - ); + // TODO, remove if sanchonet gets an explorer + const explorerBaseUrl = useMemo(() => { + if (environmentName === 'Sanchonet') return; + // eslint-disable-next-line consistent-return + return `${CEXPLORER_BASE_URL[environmentName]}/${CEXPLORER_URL_PATHS.Tx}`; + }, [CEXPLORER_BASE_URL, CEXPLORER_URL_PATHS.Tx, environmentName]); const getHeaderDescription = () => { if (activityInfo.type === 'delegation') return '1 token'; return ` (${activityInfo?.assetAmount})`; @@ -72,6 +74,10 @@ export const TransactionDetailsProxy = withAddressBookContext( [addressList] ); + const environmentSpecificProps = { + ...(explorerBaseUrl && { openExternalLink: handleOpenExternalLink }) + }; + return ( // eslint-disable-next-line react/jsx-pascal-case analytics.sendEventToPostHog(PostHogAction.ActivityActivityDetailInputsClick)} sendAnalyticsOutputs={() => analytics.sendEventToPostHog(PostHogAction.ActivityActivityDetailOutputsClick)} + {...environmentSpecificProps} /> ); } diff --git a/apps/browser-extension-wallet/src/views/browser-view/features/assets/components/AssetDetailsDrawer/AssetDetails.tsx b/apps/browser-extension-wallet/src/views/browser-view/features/assets/components/AssetDetailsDrawer/AssetDetails.tsx index beac455ca..89c670e2d 100644 --- a/apps/browser-extension-wallet/src/views/browser-view/features/assets/components/AssetDetailsDrawer/AssetDetails.tsx +++ b/apps/browser-extension-wallet/src/views/browser-view/features/assets/components/AssetDetailsDrawer/AssetDetails.tsx @@ -48,7 +48,12 @@ export const AssetDetails = ({ const { environmentName } = useWalletStore(); const openExternalLink = useExternalLinkOpener(); - const explorerBaseUrl = useMemo(() => CEXPLORER_BASE_URL[environmentName], [environmentName]); + // TODO remove if sanchonet gets an explorer + const explorerBaseUrl = useMemo(() => { + if (environmentName === 'Sanchonet') return; + // eslint-disable-next-line consistent-return + return CEXPLORER_BASE_URL[environmentName]; + }, [environmentName]); const isTxListLoading = activityListStatus === StateStatus.IDLE || activityListStatus === StateStatus.LOADING; return ( @@ -111,13 +116,19 @@ export const AssetDetails = ({ name: t('browserView.assetDetails.fingerprint'), value: fingerprint, showCopyIcon: true, - onClick: () => openExternalLink(`${explorerBaseUrl}/${CEXPLORER_URL_PATHS.Asset}/${fingerprint}`) + // TODO remove if sanchonet gets an explorer + ...(explorerBaseUrl && { + onClick: () => openExternalLink(`${explorerBaseUrl}/${CEXPLORER_URL_PATHS.Asset}/${fingerprint}`) + }) }, { name: t('browserView.assetDetails.policyId'), value: policyId, showCopyIcon: true, - onClick: () => openExternalLink(`${explorerBaseUrl}/${CEXPLORER_URL_PATHS.Policy}/${policyId}`) + // TODO remove if sanchonet gets an explorer + ...(explorerBaseUrl && { + onClick: () => openExternalLink(`${explorerBaseUrl}/${CEXPLORER_URL_PATHS.Policy}/${policyId}`) + }) } ]} /> diff --git a/packages/core/src/ui/components/ActivityDetail/TransactionDetails.tsx b/packages/core/src/ui/components/ActivityDetail/TransactionDetails.tsx index e54e20cc1..4c18e38c9 100644 --- a/packages/core/src/ui/components/ActivityDetail/TransactionDetails.tsx +++ b/packages/core/src/ui/components/ActivityDetail/TransactionDetails.tsx @@ -141,8 +141,8 @@ export const TransactionDetails = ({
diff --git a/packages/core/src/ui/components/VotingProcedures/VotingProcedures.tsx b/packages/core/src/ui/components/VotingProcedures/VotingProcedures.tsx index 1dcf20f24..232b6aa43 100644 --- a/packages/core/src/ui/components/VotingProcedures/VotingProcedures.tsx +++ b/packages/core/src/ui/components/VotingProcedures/VotingProcedures.tsx @@ -12,14 +12,14 @@ type VotingProcedure = { actionId: { index: number; txHash: string; - txHashUrl: string; + txHashUrl?: string; // Dependent on having an explorer to link }; votingProcedure: { vote: string; anchor: { url: string; hash: string; - }; + } | null; }; }[]; }; @@ -111,9 +111,15 @@ export const VotingProcedures = ({ dappInfo, errorMessage, data, translations }: {indexCounter(translations.actionIdTitle, idx, votes.length)} - - - + {actionId.txHashUrl && ( + + + + )} From dbf9ded9ed8a7be18739a66176e391299e232241 Mon Sep 17 00:00:00 2001 From: vetalcore Date: Thu, 23 Nov 2023 13:17:13 +0200 Subject: [PATCH 09/22] chore(extension): add unit tests for dapp/confirm-tx (#743) --- .../dapp/components/ConfirmTransaction.tsx | 280 ------------ .../__tests__/ConfirmTransaction.test.tsx | 133 ------ .../ConfirmTransaction.tsx | 28 +- .../VotingProceduresContainer.tsx | 17 +- .../ConfirmDRepRegistrationContainer.test.tsx | 177 ++++++++ .../ConfirmDRepRetirementContainer.test.tsx | 220 +++++++++ .../ConfirmDRepUpdateContainer.test.tsx | 168 +++++++ .../__tests__/ConfirmTransaction.test.tsx | 306 +++++++++++++ .../ConfirmTransactionContent.test.tsx | 213 +++++++++ .../ConfirmVoteDelegationContainer.test.tsx | 216 +++++++++ .../DappTransactionContainer.test.tsx | 235 ++++++++++ .../VotingProceduresContainer.test.tsx | 294 ++++++++++++ .../__tests__/hooks.test.tsx | 417 ++++++++++++++++++ .../__tests__/utils.test.tsx | 158 +++++++ .../components/confirm-transaction/hooks.ts | 15 +- .../components/confirm-transaction/utils.ts | 48 +- .../__tests__/useActionExecution.test.ts | 2 +- .../__tests__/activity-detail-slice.test.ts | 31 ++ .../stores/slices/activity-detail-slice.ts | 2 +- 19 files changed, 2479 insertions(+), 481 deletions(-) delete mode 100644 apps/browser-extension-wallet/src/features/dapp/components/ConfirmTransaction.tsx delete mode 100644 apps/browser-extension-wallet/src/features/dapp/components/__tests__/ConfirmTransaction.test.tsx create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepRegistrationContainer.test.tsx create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepRetirementContainer.test.tsx create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepUpdateContainer.test.tsx create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmTransaction.test.tsx create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmTransactionContent.test.tsx create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmVoteDelegationContainer.test.tsx create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/DappTransactionContainer.test.tsx create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/VotingProceduresContainer.test.tsx create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/hooks.test.tsx create mode 100644 apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/utils.test.tsx create mode 100644 apps/browser-extension-wallet/src/stores/slices/__tests__/activity-detail-slice.test.ts diff --git a/apps/browser-extension-wallet/src/features/dapp/components/ConfirmTransaction.tsx b/apps/browser-extension-wallet/src/features/dapp/components/ConfirmTransaction.tsx deleted file mode 100644 index 90b912655..000000000 --- a/apps/browser-extension-wallet/src/features/dapp/components/ConfirmTransaction.tsx +++ /dev/null @@ -1,280 +0,0 @@ -import React, { useState, useEffect, useMemo, useCallback } from 'react'; -import { Button, PostHogAction, useObservable } from '@lace/common'; -import { useTranslation } from 'react-i18next'; -import { DappTransaction } from '@lace/core'; -import { Layout } from './Layout'; -import { useViewsFlowContext } from '@providers/ViewFlowProvider'; -import { sectionTitle, DAPP_VIEWS } from '../config'; -import styles from './ConfirmTransaction.module.scss'; -import { Wallet } from '@lace/cardano'; -import { useAddressBookContext, withAddressBookContext } from '@src/features/address-book/context'; -import { useWalletStore } from '@stores'; -import { AddressListType } from '@views/browser/features/activity'; -import { consumeRemoteApi, exposeApi, RemoteApiPropertyType } from '@cardano-sdk/web-extension'; -import { DappDataService } from '@lib/scripts/types'; -import { DAPP_CHANNELS } from '@src/utils/constants'; -import { runtime } from 'webextension-polyfill'; -import { useRedirection } from '@hooks'; -import { assetsBurnedInspector, assetsMintedInspector, createTxInspector } from '@cardano-sdk/core'; -import { Skeleton } from 'antd'; -import { dAppRoutePaths } from '@routes'; -import { UserPromptService } from '@lib/scripts/background/services'; -import { of } from 'rxjs'; -import { CardanoTxOut } from '@src/types'; -import { getAssetsInformation, TokenInfo } from '@src/utils/get-assets-information'; -import * as HardwareLedger from '../../../../../../node_modules/@cardano-sdk/hardware-ledger/dist/cjs'; -import { useAnalyticsContext } from '@providers'; -import { TX_CREATION_TYPE_KEY, TxCreationType } from '@providers/AnalyticsProvider/analyticsTracker'; - -const DAPP_TOAST_DURATION = 50; - -const dappDataApi = consumeRemoteApi>( - { - baseChannel: DAPP_CHANNELS.dappData, - properties: { - getSignTxData: RemoteApiPropertyType.MethodReturningPromise - } - }, - { logger: console, runtime } -); - -// eslint-disable-next-line sonarjs/cognitive-complexity -export const ConfirmTransaction = withAddressBookContext((): React.ReactElement => { - const { - utils: { setNextView } - } = useViewsFlowContext(); - const { t } = useTranslation(); - const { - walletInfo, - inMemoryWallet, - getKeyAgentType, - blockchainProvider: { assetProvider } - } = useWalletStore(); - const { list: addressList } = useAddressBookContext(); - const analytics = useAnalyticsContext(); - - const [tx, setTx] = useState(); - const assets = useObservable(inMemoryWallet.assetInfo$); - const [errorMessage, setErrorMessage] = useState(); - const redirectToSignFailure = useRedirection(dAppRoutePaths.dappTxSignFailure); - const [isConfirmingTx, setIsConfirmingTx] = useState(); - const keyAgentType = getKeyAgentType(); - const isUsingHardwareWallet = useMemo( - () => keyAgentType !== Wallet.KeyManagement.KeyAgentType.InMemory, - [keyAgentType] - ); - const [assetsInfo, setAssetsInfo] = useState(); - const [dappInfo, setDappInfo] = useState(); - - const getTransactionAssetsId = (outputs: CardanoTxOut[]) => { - const assetIds: Wallet.Cardano.AssetId[] = []; - const assetMaps = outputs.map((output) => output.value.assets); - for (const asset of assetMaps) { - if (asset) { - for (const id of asset.keys()) { - !assetIds.includes(id) && assetIds.push(id); - } - } - } - return assetIds; - }; - - const assetIds = useMemo(() => tx?.body?.outputs && getTransactionAssetsId(tx.body.outputs), [tx?.body?.outputs]); - - useEffect(() => { - if (assetIds?.length > 0) { - getAssetsInformation(assetIds, assets, { - assetProvider, - extraData: { nftMetadata: true, tokenMetadata: true } - }) - .then((result) => setAssetsInfo(result)) - .catch((error) => { - console.error(error); - }); - } - }, [assetIds, assetProvider, assets]); - - const cancelTransaction = useCallback((close = false) => { - exposeApi>( - { - api$: of({ - async allowSignTx(): Promise { - return Promise.reject(); - } - }), - baseChannel: DAPP_CHANNELS.userPrompt, - properties: { allowSignTx: RemoteApiPropertyType.MethodReturningPromise } - }, - { logger: console, runtime } - ); - close && setTimeout(() => window.close(), DAPP_TOAST_DURATION); - }, []); - - window.addEventListener('beforeunload', cancelTransaction); - - const signWithHardwareWallet = async () => { - setIsConfirmingTx(true); - try { - HardwareLedger.LedgerKeyAgent.establishDeviceConnection(Wallet.KeyManagement.CommunicationType.Web) - .then(() => { - exposeApi>( - { - api$: of({ - async allowSignTx(): Promise { - return Promise.resolve(true); - } - }), - baseChannel: DAPP_CHANNELS.userPrompt, - properties: { allowSignTx: RemoteApiPropertyType.MethodReturningPromise } - }, - { logger: console, runtime } - ); - }) - .catch((error) => { - throw error; - }); - } catch (error) { - console.error('error', error); - cancelTransaction(false); - redirectToSignFailure(); - } - }; - - useEffect(() => { - dappDataApi - .getSignTxData() - .then(({ dappInfo: backgroundDappInfo, tx: backgroundTx }) => { - setDappInfo(backgroundDappInfo); - setTx(backgroundTx); - }) - .catch((error) => { - setErrorMessage(error); - console.error(error); - }); - }, []); - - const createAssetList = useCallback( - (txAssets: Wallet.Cardano.TokenMap) => { - if (!assetsInfo) return []; - const assetList: Wallet.Cip30SignTxAssetItem[] = []; - // eslint-disable-next-line unicorn/no-array-for-each - txAssets.forEach(async (value, key) => { - const walletAsset = assets.get(key) || assetsInfo?.get(key); - assetList.push({ - name: walletAsset.name.toString() || key.toString(), - ticker: walletAsset.tokenMetadata?.ticker || walletAsset.nftMetadata?.name, - amount: Wallet.util.calculateAssetBalance(value, walletAsset) - }); - }); - return assetList; - }, - [assets, assetsInfo] - ); - - const addressToNameMap = useMemo( - () => new Map(addressList?.map((item: AddressListType) => [item.address, item.name])), - [addressList] - ); - - const txSummary: Wallet.Cip30SignTxSummary | undefined = useMemo(() => { - if (!tx) return; - const inspector = createTxInspector({ - minted: assetsMintedInspector, - burned: assetsBurnedInspector - }); - - const { minted, burned } = inspector(tx as Wallet.Cardano.HydratedTx); - const isMintTransaction = minted.length > 0; - const isBurnTransaction = burned.length > 0; - - let txType: 'Send' | 'Mint' | 'Burn'; - if (isMintTransaction) { - txType = 'Mint'; - } else if (isBurnTransaction) { - txType = 'Burn'; - } else { - txType = 'Send'; - } - - const externalOutputs = tx.body.outputs.filter((output) => { - if (txType === 'Send') { - return walletInfo.addresses.every((addr) => output.address !== addr.address); - } - return true; - }); - - // eslint-disable-next-line unicorn/no-array-reduce - const txSummaryOutputs: Wallet.Cip30SignTxSummary['outputs'] = externalOutputs.reduce((acc, txOut) => { - // Don't show withdrawl tx's etc - if (txOut.address.toString() === walletInfo.addresses[0].address.toString()) return acc; - - return [ - ...acc, - { - coins: Wallet.util.lovelacesToAdaString(txOut.value.coins.toString()), - recipient: addressToNameMap?.get(txOut.address.toString()) || txOut.address.toString(), - ...(txOut.value.assets?.size > 0 && { assets: createAssetList(txOut.value.assets) }) - } - ]; - }, []); - - // eslint-disable-next-line consistent-return - return { - fee: Wallet.util.lovelacesToAdaString(tx.body.fee.toString()), - outputs: txSummaryOutputs, - type: txType - }; - }, [tx, walletInfo.addresses, createAssetList, addressToNameMap]); - - const translations = { - transaction: t('core.dappTransaction.transaction'), - amount: t('core.dappTransaction.amount'), - recipient: t('core.dappTransaction.recipient'), - fee: t('core.dappTransaction.fee'), - adaFollowingNumericValue: t('general.adaFollowingNumericValue') - }; - - const onConfirm = () => { - analytics.sendEventToPostHog(PostHogAction.SendTransactionSummaryConfirmClick, { - [TX_CREATION_TYPE_KEY]: TxCreationType.External - }); - - isUsingHardwareWallet ? signWithHardwareWallet() : setNextView(); - }; - - return ( - - {tx && txSummary ? ( - - ) : ( - - )} -
- - -
-
- ); -}); diff --git a/apps/browser-extension-wallet/src/features/dapp/components/__tests__/ConfirmTransaction.test.tsx b/apps/browser-extension-wallet/src/features/dapp/components/__tests__/ConfirmTransaction.test.tsx deleted file mode 100644 index 5bf5130d4..000000000 --- a/apps/browser-extension-wallet/src/features/dapp/components/__tests__/ConfirmTransaction.test.tsx +++ /dev/null @@ -1,133 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable import/imports-first */ -const mockGetKeyAgentType = jest.fn(); -const mockUseWalletStore = jest.fn(); -const error = 'error in getSignTxData'; -const mockConsumeRemoteApi = jest.fn().mockReturnValue({ - getSignTxData: async () => await Promise.reject(error) -}); -const mockCreateTxInspector = jest.fn().mockReturnValue(() => ({ minted: [] as any, burned: [] as any })); -import * as React from 'react'; -import { cleanup, render, waitFor } from '@testing-library/react'; -import { ConfirmTransaction } from '../confirm-transaction/ConfirmTransaction'; -import '@testing-library/jest-dom'; -import { I18nextProvider } from 'react-i18next'; -import { StoreProvider } from '@src/stores'; -import { - AnalyticsProvider, - AppSettingsProvider, - BackgroundServiceAPIProvider, - BackgroundServiceAPIProviderProps, - DatabaseProvider, - ViewFlowProvider -} from '@src/providers'; -import { APP_MODE_BROWSER } from '@src/utils/constants'; -import i18n from '@lib/i18n'; -import { BehaviorSubject } from 'rxjs'; -import { act } from 'react-dom/test-utils'; -import { sendViewsFlowState } from '../../config'; -import { PostHogClientProvider } from '@providers/PostHogClientProvider'; -import { postHogClientMocks } from '@src/utils/mocks/test-helpers'; - -const assetInfo$ = new BehaviorSubject(new Map()); -const available$ = new BehaviorSubject([]); - -const assetProvider = { - getAsset: () => ({}), - getAssets: (): any[] => [] -}; -const inMemoryWallet = { - assetInfo$, - balance: { - utxo: { - available$ - } - } -}; - -jest.mock('@src/stores', () => ({ - ...jest.requireActual('@src/stores'), - useWalletStore: mockUseWalletStore -})); - -jest.mock('@cardano-sdk/web-extension', () => { - const original = jest.requireActual('@cardano-sdk/web-extension'); - return { - __esModule: true, - ...original, - consumeRemoteApi: mockConsumeRemoteApi - }; -}); - -jest.mock('@cardano-sdk/core', () => { - const original = jest.requireActual('@cardano-sdk/core'); - return { - __esModule: true, - ...original, - createTxInspector: mockCreateTxInspector - }; -}); - -const testIds = { - dappTransactionConfirm: 'dapp-transaction-confirm' -}; - -const backgroundService = { - getBackgroundStorage: jest.fn(), - setBackgroundStorage: jest.fn() -} as unknown as BackgroundServiceAPIProviderProps['value']; - -const getWrapper = - () => - ({ children }: { children: React.ReactNode }) => - ( - - - - - - - - {children} - - - - - - - - ); - -describe('Testing ConfirmTransaction component', () => { - window.ResizeObserver = ResizeObserver; - describe('Testing errors', () => { - beforeEach(() => { - mockUseWalletStore.mockImplementation(() => ({ - getKeyAgentType: mockGetKeyAgentType, - inMemoryWallet, - walletUI: {}, - walletInfo: {}, - blockchainProvider: { assetProvider } - })); - }); - - afterEach(() => { - jest.resetModules(); - jest.resetAllMocks(); - cleanup(); - }); - - test('should disable confirm button and show proper error if getSignTxData throws', async () => { - let queryByTestId: any; - act(() => { - ({ queryByTestId } = render(, { - wrapper: getWrapper() - })); - }); - - await waitFor(async () => { - expect(queryByTestId(testIds.dappTransactionConfirm).closest('button')).toHaveAttribute('disabled'); - }); - }); - }); -}); diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.tsx index ee3ce584a..ba6ea4571 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.tsx @@ -1,4 +1,5 @@ -import React from 'react'; +/* eslint-disable no-console */ +import React, { useMemo } from 'react'; import { Button } from '@lace/common'; import { useTranslation } from 'react-i18next'; import { Layout } from '../Layout'; @@ -14,21 +15,24 @@ import { runtime } from 'webextension-polyfill'; import { getTitleKey, getTxType } from './utils'; import { ConfirmTransactionContent } from './ConfirmTransactionContent'; -const dappDataApi = consumeRemoteApi>( - { - baseChannel: DAPP_CHANNELS.dappData, - properties: { - getSignTxData: RemoteApiPropertyType.MethodReturningPromise - } - }, - { logger: console, runtime } -); - export const ConfirmTransaction = (): React.ReactElement => { const { t } = useTranslation(); const { utils: { setNextView } } = useViewsFlowContext(); + const dappDataApi = useMemo( + () => + consumeRemoteApi>( + { + baseChannel: DAPP_CHANNELS.dappData, + properties: { + getSignTxData: RemoteApiPropertyType.MethodReturningPromise + } + }, + { logger: console, runtime } + ), + [] + ); const { getKeyAgentType } = useWalletStore(); const { signTxData, errorMessage } = useSignTxData(dappDataApi.getSignTxData); const keyAgentType = getKeyAgentType(); @@ -46,7 +50,7 @@ export const ConfirmTransaction = (): React.ReactElement => {
Date: Tue, 28 Nov 2023 10:54:19 +0100 Subject: [PATCH 15/22] fix(extension): translation keys casing and unit tests (#756) --- .../ConfirmDRepRegistrationContainer.test.tsx | 10 +++++----- .../ConfirmDRepRetirementContainer.test.tsx | 10 +++++----- .../ConfirmDRepUpdateContainer.test.tsx | 8 ++++---- .../ConfirmVoteDelegationContainer.test.tsx | 10 +++++----- .../VotingProceduresContainer.test.tsx | 18 +++++++++--------- .../__tests__/utils.test.tsx | 4 ++-- .../components/confirm-transaction/utils.ts | 2 +- 7 files changed, 31 insertions(+), 31 deletions(-) diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepRegistrationContainer.test.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepRegistrationContainer.test.tsx index 13619e395..d63017f1e 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepRegistrationContainer.test.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepRegistrationContainer.test.tsx @@ -161,12 +161,12 @@ describe('Testing ConfirmDRepRegistrationContainer component', () => { url: certificate.anchor?.url }, translations: { - metadata: t('core.drepRegistration.metadata'), + metadata: t('core.DRepRegistration.metadata'), labels: { - depositPaid: t('core.drepRegistration.depositPaid'), - drepId: t('core.drepRegistration.drepId'), - hash: t('core.drepRegistration.hash'), - url: t('core.drepRegistration.url') + depositPaid: t('core.DRepRegistration.depositPaid'), + drepId: t('core.DRepRegistration.drepId'), + hash: t('core.DRepRegistration.hash'), + url: t('core.DRepRegistration.url') } }, errorMessage diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepRetirementContainer.test.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepRetirementContainer.test.tsx index 3e0cae4eb..bb0fe2b21 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepRetirementContainer.test.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepRetirementContainer.test.tsx @@ -173,10 +173,10 @@ describe('Testing ConfirmDRepRetirementContainer component', () => { drepId: Cardano.DRepID(HexBlob.toTypedBech32('drep', Wallet.HexBlob(certificate.dRepCredential.hash))) }, translations: { - metadata: t('core.drepRetirement.metadata'), + metadata: t('core.DRepRetirement.metadata'), labels: { - depositReturned: t('core.drepRetirement.depositReturned'), - drepId: t('core.drepRetirement.drepId') + depositReturned: t('core.DRepRetirement.depositReturned'), + drepId: t('core.DRepRetirement.drepId') } }, errorMessage @@ -198,7 +198,7 @@ describe('Testing ConfirmDRepRetirementContainer component', () => { expect(queryByTestId('ConfirmDRepRetirementContainer')).toBeInTheDocument(); expect( mockConfirmDRepRetirement.mock.calls[mockConfirmDRepRetirement.mock.calls.length - 1][0].errorMessage - ).toEqual(t('core.drepRetirement.isOwnRetirement')); + ).toEqual(t('core.DRepRetirement.isOwnRetirement')); }); test('should render ConfirmDRepRetirementContainer component with proper error for not own retirement', async () => { @@ -215,6 +215,6 @@ describe('Testing ConfirmDRepRetirementContainer component', () => { expect( mockConfirmDRepRetirement.mock.calls[mockConfirmDRepRetirement.mock.calls.length - 1][0].errorMessage - ).toEqual(t('core.drepRetirement.isNotOwnRetirement')); + ).toEqual(t('core.DRepRetirement.isNotOwnRetirement')); }); }); diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepUpdateContainer.test.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepUpdateContainer.test.tsx index 17c4e55e0..eba21c333 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepUpdateContainer.test.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepUpdateContainer.test.tsx @@ -153,11 +153,11 @@ describe('Testing ConfirmDRepUpdateContainer component', () => { url: certificate.anchor?.url }, translations: { - metadata: t('core.drepUpdate.metadata'), + metadata: t('core.DRepUpdate.metadata'), labels: { - drepId: t('core.drepUpdate.drepId'), - hash: t('core.drepUpdate.hash'), - url: t('core.drepUpdate.url') + drepId: t('core.DRepUpdate.drepId'), + hash: t('core.DRepUpdate.hash'), + url: t('core.DRepUpdate.url') } }, errorMessage diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmVoteDelegationContainer.test.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmVoteDelegationContainer.test.tsx index c462bfc45..dadcfafa2 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmVoteDelegationContainer.test.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmVoteDelegationContainer.test.tsx @@ -155,12 +155,12 @@ describe('Testing ConfirmVoteDelegationContainer component', () => { ) }, translations: { - metadata: t('core.voteDelegation.metadata'), - option: t('core.voteDelegation.option'), + metadata: t('core.VoteDelegation.metadata'), + option: t('core.VoteDelegation.option'), labels: { - drepId: t('core.voteDelegation.drepId'), - alwaysAbstain: t('core.voteDelegation.alwaysAbstain'), - alwaysNoConfidence: t('core.voteDelegation.alwaysNoConfidence') + drepId: t('core.VoteDelegation.drepId'), + alwaysAbstain: t('core.VoteDelegation.alwaysAbstain'), + alwaysNoConfidence: t('core.VoteDelegation.alwaysNoConfidence') } }, errorMessage diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/VotingProceduresContainer.test.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/VotingProceduresContainer.test.tsx index c02aa5f70..00a65675c 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/VotingProceduresContainer.test.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/VotingProceduresContainer.test.tsx @@ -230,19 +230,19 @@ describe('Testing VotingProceduresContainer component', () => { })) })), translations: { - voterType: t('core.votingProcedures.voterType'), - procedureTitle: t('core.votingProcedures.procedureTitle'), - actionIdTitle: t('core.votingProcedures.actionIdTitle'), - vote: t('core.votingProcedures.vote'), + voterType: t('core.VotingProcedures.voterType'), + procedureTitle: t('core.VotingProcedures.procedureTitle'), + actionIdTitle: t('core.VotingProcedures.actionIdTitle'), + vote: t('core.VotingProcedures.vote'), actionId: { - index: t('core.votingProcedures.actionId.index'), - txHash: t('core.votingProcedures.actionId.txHash') + index: t('core.VotingProcedures.actionId.index'), + txHash: t('core.VotingProcedures.actionId.txHash') }, anchor: { - hash: t('core.votingProcedures.anchor.hash'), - url: t('core.votingProcedures.anchor.url') + hash: t('core.VotingProcedures.anchor.hash'), + url: t('core.VotingProcedures.anchor.url') }, - dRepId: t('core.votingProcedures.dRepId') + dRepId: t('core.VotingProcedures.dRepId') }, errorMessage }, diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/utils.test.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/utils.test.tsx index 0cc51248c..2d8a3f39f 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/utils.test.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/utils.test.tsx @@ -152,7 +152,7 @@ describe('Testing utils', () => { test('testing getOwnRetirementMessageKey', () => { expect(getOwnRetirementMessageKey(undefined)).toEqual(''); - expect(getOwnRetirementMessageKey(true)).toEqual('core.drepRetirement.isOwnRetirement'); - expect(getOwnRetirementMessageKey(false)).toEqual('core.drepRetirement.isNotOwnRetirement'); + expect(getOwnRetirementMessageKey(true)).toEqual('core.DRepRetirement.isOwnRetirement'); + expect(getOwnRetirementMessageKey(false)).toEqual('core.DRepRetirement.isNotOwnRetirement'); }); }); diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts index 756fc1799..4a6e3d99d 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts @@ -136,5 +136,5 @@ export const getOwnRetirementMessageKey = (isOwnRetirement: boolean | undefined) if (isOwnRetirement === undefined) { return ''; } - return isOwnRetirement ? 'core.drepRetirement.isOwnRetirement' : 'core.drepRetirement.isNotOwnRetirement'; + return isOwnRetirement ? 'core.DRepRetirement.isOwnRetirement' : 'core.DRepRetirement.isNotOwnRetirement'; }; From fcc660f3f775f31ef7ad90da73019b9f3d093818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20W=C5=82odek?= Date: Tue, 28 Nov 2023 11:22:03 +0100 Subject: [PATCH 16/22] chore(all): exclude stories and tests from the rollup builds (#752) * chore(core): fix extension of stories .ts -> .tsx (impacts: rollup) * chore(all): exclude test files from rollup builds --- ...istration.stories.ts => ConfirmDRepRegistration.stories.tsx} | 0 ...pRetirement.stories.ts => ConfirmDRepRetirement.stories.tsx} | 0 ...nfirmDRepUpdate.stories.ts => ConfirmDRepUpdate.stories.tsx} | 0 ...eDelegation.stories.ts => ConfirmVoteDelegation.stories.tsx} | 0 .../{DappTransaction.stories.ts => DappTransaction.stories.tsx} | 0 ...VotingProcedures.stories.ts => VotingProcedures.stories.tsx} | 0 rollup.config.js | 2 +- 7 files changed, 1 insertion(+), 1 deletion(-) rename packages/core/src/ui/components/ConfirmDRepRegistration/{ConfirmDRepRegistration.stories.ts => ConfirmDRepRegistration.stories.tsx} (100%) rename packages/core/src/ui/components/ConfirmDRepRetirement/{ConfirmDRepRetirement.stories.ts => ConfirmDRepRetirement.stories.tsx} (100%) rename packages/core/src/ui/components/ConfirmDRepUpdate/{ConfirmDRepUpdate.stories.ts => ConfirmDRepUpdate.stories.tsx} (100%) rename packages/core/src/ui/components/ConfirmVoteDelegation/{ConfirmVoteDelegation.stories.ts => ConfirmVoteDelegation.stories.tsx} (100%) rename packages/core/src/ui/components/DappTransaction/{DappTransaction.stories.ts => DappTransaction.stories.tsx} (100%) rename packages/core/src/ui/components/VotingProcedures/{VotingProcedures.stories.ts => VotingProcedures.stories.tsx} (100%) diff --git a/packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.stories.ts b/packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.stories.tsx similarity index 100% rename from packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.stories.ts rename to packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.stories.tsx diff --git a/packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.stories.ts b/packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.stories.tsx similarity index 100% rename from packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.stories.ts rename to packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.stories.tsx diff --git a/packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.stories.ts b/packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.stories.tsx similarity index 100% rename from packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.stories.ts rename to packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.stories.tsx diff --git a/packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.stories.ts b/packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.stories.tsx similarity index 100% rename from packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.stories.ts rename to packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.stories.tsx diff --git a/packages/core/src/ui/components/DappTransaction/DappTransaction.stories.ts b/packages/core/src/ui/components/DappTransaction/DappTransaction.stories.tsx similarity index 100% rename from packages/core/src/ui/components/DappTransaction/DappTransaction.stories.ts rename to packages/core/src/ui/components/DappTransaction/DappTransaction.stories.tsx diff --git a/packages/core/src/ui/components/VotingProcedures/VotingProcedures.stories.ts b/packages/core/src/ui/components/VotingProcedures/VotingProcedures.stories.tsx similarity index 100% rename from packages/core/src/ui/components/VotingProcedures/VotingProcedures.stories.ts rename to packages/core/src/ui/components/VotingProcedures/VotingProcedures.stories.tsx diff --git a/rollup.config.js b/rollup.config.js index d2ef16661..aef7832d8 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -11,7 +11,7 @@ export default ({ tsPluginOptions = { tsconfig: 'src/tsconfig.json', composite: false, - exclude: ['**/*.stories.tsx'] + exclude: ['**/*.stories.tsx', '**/*.test.ts', '**/*.test.tsx'] } } = {}) => ({ input: 'src/index.ts', From 5b81b19b201fea3c4a94948a5bb6199958b8a3c0 Mon Sep 17 00:00:00 2001 From: mirceahasegan <105701265+mirceahasegan@users.noreply.github.com> Date: Wed, 29 Nov 2023 17:44:49 +0100 Subject: [PATCH 17/22] Chore/update for sdk conway era (#734) * chore: stake pools sort by ros * chore: metrics require lastRos and ros --- apps/browser-extension-wallet/src/api/mock.ts | 4 ++- .../src/utils/mocks/test-helpers.tsx | 4 ++- .../StakePoolsTable/StakePoolsTable.tsx | 2 +- .../test/mocks/StakepoolSearchProviderStub.ts | 28 ++++++++++++++----- .../cardano/src/wallet/test/mocks/mock.ts | 4 ++- .../__tests__/stake-pool-transformer.test.ts | 4 ++- .../StakePoolsTable/StakePoolsTable.tsx | 2 +- 7 files changed, 35 insertions(+), 13 deletions(-) diff --git a/apps/browser-extension-wallet/src/api/mock.ts b/apps/browser-extension-wallet/src/api/mock.ts index 62dc74e7c..54dc9047b 100644 --- a/apps/browser-extension-wallet/src/api/mock.ts +++ b/apps/browser-extension-wallet/src/api/mock.ts @@ -126,7 +126,9 @@ const getDetailsForAll = (): PoolDetails => ({ livePledge: BigInt('2000000000'), saturation: Percent(0.95), size: undefined, - stake: undefined + stake: undefined, + lastRos: Percent(1), + ros: Percent(2) }, relays: undefined, rewardAccount: Wallet.Cardano.RewardAccount('stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj'), diff --git a/apps/browser-extension-wallet/src/utils/mocks/test-helpers.tsx b/apps/browser-extension-wallet/src/utils/mocks/test-helpers.tsx index ab736b870..ee2bed4e9 100644 --- a/apps/browser-extension-wallet/src/utils/mocks/test-helpers.tsx +++ b/apps/browser-extension-wallet/src/utils/mocks/test-helpers.tsx @@ -262,7 +262,9 @@ export const cardanoStakePoolMock: Wallet.StakePoolSearchResults = { saturation: Percent(0.0512), stake: undefined, size: undefined, - apy: Percent(0.013) + apy: Percent(0.013), + lastRos: Percent(1), + ros: Percent(2) }, owners: [ Wallet.Cardano.RewardAccount('stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj'), diff --git a/apps/browser-extension-wallet/src/views/browser-view/features/staking/components/StakePoolsTable/StakePoolsTable.tsx b/apps/browser-extension-wallet/src/views/browser-view/features/staking/components/StakePoolsTable/StakePoolsTable.tsx index 9b671719a..fd10a3e36 100644 --- a/apps/browser-extension-wallet/src/views/browser-view/features/staking/components/StakePoolsTable/StakePoolsTable.tsx +++ b/apps/browser-extension-wallet/src/views/browser-view/features/staking/components/StakePoolsTable/StakePoolsTable.tsx @@ -26,7 +26,7 @@ type stakePoolsTableProps = { }; const DEFAULT_SORT_OPTIONS: StakePoolSortOptions = { - field: 'apy', + field: 'ros', order: 'desc' }; diff --git a/packages/cardano/src/wallet/test/mocks/StakepoolSearchProviderStub.ts b/packages/cardano/src/wallet/test/mocks/StakepoolSearchProviderStub.ts index abacce350..3a62f7ea9 100644 --- a/packages/cardano/src/wallet/test/mocks/StakepoolSearchProviderStub.ts +++ b/packages/cardano/src/wallet/test/mocks/StakepoolSearchProviderStub.ts @@ -20,7 +20,9 @@ export const pools: Partial[] = [ livePledge: BigInt('2000000000'), saturation: Percent(0.211), size: undefined, - stake: undefined + stake: undefined, + lastRos: Percent(1), + ros: Percent(2) }, margin: { numerator: 2.01, @@ -58,7 +60,9 @@ export const pools: Partial[] = [ stake: { live: BigInt('201000000'), active: BigInt('201000000') - } + }, + lastRos: Percent(1), + ros: Percent(2) }, metadata: { name: 'THE AMSTERDAM NODE', @@ -92,7 +96,9 @@ export const pools: Partial[] = [ stake: { live: BigInt('77000000'), active: BigInt('77000000') - } + }, + lastRos: Percent(1), + ros: Percent(2) } }, { @@ -114,7 +120,9 @@ export const pools: Partial[] = [ stake: { live: BigInt('34000000'), active: BigInt('34000000') - } + }, + lastRos: Percent(1), + ros: Percent(2) }, metadata: { name: 'stakit.io Pool by TOBG', @@ -144,7 +152,9 @@ export const pools: Partial[] = [ stake: { live: BigInt('53000000'), active: BigInt('53000000') - } + }, + lastRos: Percent(1), + ros: Percent(2) }, margin: { numerator: 0.79, @@ -172,7 +182,9 @@ export const pools: Partial[] = [ stake: { live: BigInt('53000000'), active: BigInt('53000000') - } + }, + lastRos: Percent(1), + ros: Percent(2) }, metadata: { name: 'VEGASPool', @@ -202,7 +214,9 @@ const detailsForAll: PoolDetails = { stake: { live: BigInt('34000000'), active: BigInt('34000000') - } + }, + lastRos: Percent(1), + ros: Percent(2) }, relays: undefined, rewardAccount: Cardano.RewardAccount('stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj'), diff --git a/packages/cardano/src/wallet/test/mocks/mock.ts b/packages/cardano/src/wallet/test/mocks/mock.ts index 723ea89e2..023b48fce 100644 --- a/packages/cardano/src/wallet/test/mocks/mock.ts +++ b/packages/cardano/src/wallet/test/mocks/mock.ts @@ -32,7 +32,9 @@ export const stakePoolMock: Cardano.StakePool = { livePledge: BigInt('2000000000'), saturation: Percent(0.5), stake: undefined, - size: undefined + size: undefined, + lastRos: Percent(1), + ros: Percent(2) }, owners: [ Cardano.RewardAccount('stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj'), diff --git a/packages/cardano/src/wallet/util/__tests__/stake-pool-transformer.test.ts b/packages/cardano/src/wallet/util/__tests__/stake-pool-transformer.test.ts index cd6dfaa23..a8d343bf9 100644 --- a/packages/cardano/src/wallet/util/__tests__/stake-pool-transformer.test.ts +++ b/packages/cardano/src/wallet/util/__tests__/stake-pool-transformer.test.ts @@ -40,7 +40,9 @@ const cardanoStakePoolMock: StakePoolSearchResults = { saturation: Percent(0.0512), stake: undefined, size: undefined, - apy: Percent(0.013) + apy: Percent(0.013), + lastRos: Percent(1), + ros: Percent(2) }, owners: [ Cardano.RewardAccount('stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj'), diff --git a/packages/staking/src/features/BrowsePools/StakePoolsTable/StakePoolsTable.tsx b/packages/staking/src/features/BrowsePools/StakePoolsTable/StakePoolsTable.tsx index 610ceee53..390725ac0 100644 --- a/packages/staking/src/features/BrowsePools/StakePoolsTable/StakePoolsTable.tsx +++ b/packages/staking/src/features/BrowsePools/StakePoolsTable/StakePoolsTable.tsx @@ -15,7 +15,7 @@ type StakePoolsTableProps = { }; const DEFAULT_SORT_OPTIONS: StakePoolSortOptions = { - field: 'apy', + field: 'ros', order: 'desc', }; From 049fd31b1bc7bf18e7bca07cc44395a3ed280d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20W=C5=82odek?= Date: Thu, 30 Nov 2023 10:41:03 +0100 Subject: [PATCH 18/22] Revert "Chore/update for sdk conway era (#734)" (#767) This reverts commit 5b81b19b201fea3c4a94948a5bb6199958b8a3c0. --- apps/browser-extension-wallet/src/api/mock.ts | 4 +-- .../src/utils/mocks/test-helpers.tsx | 4 +-- .../StakePoolsTable/StakePoolsTable.tsx | 2 +- .../test/mocks/StakepoolSearchProviderStub.ts | 28 +++++-------------- .../cardano/src/wallet/test/mocks/mock.ts | 4 +-- .../__tests__/stake-pool-transformer.test.ts | 4 +-- .../StakePoolsTable/StakePoolsTable.tsx | 2 +- 7 files changed, 13 insertions(+), 35 deletions(-) diff --git a/apps/browser-extension-wallet/src/api/mock.ts b/apps/browser-extension-wallet/src/api/mock.ts index 54dc9047b..62dc74e7c 100644 --- a/apps/browser-extension-wallet/src/api/mock.ts +++ b/apps/browser-extension-wallet/src/api/mock.ts @@ -126,9 +126,7 @@ const getDetailsForAll = (): PoolDetails => ({ livePledge: BigInt('2000000000'), saturation: Percent(0.95), size: undefined, - stake: undefined, - lastRos: Percent(1), - ros: Percent(2) + stake: undefined }, relays: undefined, rewardAccount: Wallet.Cardano.RewardAccount('stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj'), diff --git a/apps/browser-extension-wallet/src/utils/mocks/test-helpers.tsx b/apps/browser-extension-wallet/src/utils/mocks/test-helpers.tsx index ee2bed4e9..ab736b870 100644 --- a/apps/browser-extension-wallet/src/utils/mocks/test-helpers.tsx +++ b/apps/browser-extension-wallet/src/utils/mocks/test-helpers.tsx @@ -262,9 +262,7 @@ export const cardanoStakePoolMock: Wallet.StakePoolSearchResults = { saturation: Percent(0.0512), stake: undefined, size: undefined, - apy: Percent(0.013), - lastRos: Percent(1), - ros: Percent(2) + apy: Percent(0.013) }, owners: [ Wallet.Cardano.RewardAccount('stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj'), diff --git a/apps/browser-extension-wallet/src/views/browser-view/features/staking/components/StakePoolsTable/StakePoolsTable.tsx b/apps/browser-extension-wallet/src/views/browser-view/features/staking/components/StakePoolsTable/StakePoolsTable.tsx index fd10a3e36..9b671719a 100644 --- a/apps/browser-extension-wallet/src/views/browser-view/features/staking/components/StakePoolsTable/StakePoolsTable.tsx +++ b/apps/browser-extension-wallet/src/views/browser-view/features/staking/components/StakePoolsTable/StakePoolsTable.tsx @@ -26,7 +26,7 @@ type stakePoolsTableProps = { }; const DEFAULT_SORT_OPTIONS: StakePoolSortOptions = { - field: 'ros', + field: 'apy', order: 'desc' }; diff --git a/packages/cardano/src/wallet/test/mocks/StakepoolSearchProviderStub.ts b/packages/cardano/src/wallet/test/mocks/StakepoolSearchProviderStub.ts index 3a62f7ea9..abacce350 100644 --- a/packages/cardano/src/wallet/test/mocks/StakepoolSearchProviderStub.ts +++ b/packages/cardano/src/wallet/test/mocks/StakepoolSearchProviderStub.ts @@ -20,9 +20,7 @@ export const pools: Partial[] = [ livePledge: BigInt('2000000000'), saturation: Percent(0.211), size: undefined, - stake: undefined, - lastRos: Percent(1), - ros: Percent(2) + stake: undefined }, margin: { numerator: 2.01, @@ -60,9 +58,7 @@ export const pools: Partial[] = [ stake: { live: BigInt('201000000'), active: BigInt('201000000') - }, - lastRos: Percent(1), - ros: Percent(2) + } }, metadata: { name: 'THE AMSTERDAM NODE', @@ -96,9 +92,7 @@ export const pools: Partial[] = [ stake: { live: BigInt('77000000'), active: BigInt('77000000') - }, - lastRos: Percent(1), - ros: Percent(2) + } } }, { @@ -120,9 +114,7 @@ export const pools: Partial[] = [ stake: { live: BigInt('34000000'), active: BigInt('34000000') - }, - lastRos: Percent(1), - ros: Percent(2) + } }, metadata: { name: 'stakit.io Pool by TOBG', @@ -152,9 +144,7 @@ export const pools: Partial[] = [ stake: { live: BigInt('53000000'), active: BigInt('53000000') - }, - lastRos: Percent(1), - ros: Percent(2) + } }, margin: { numerator: 0.79, @@ -182,9 +172,7 @@ export const pools: Partial[] = [ stake: { live: BigInt('53000000'), active: BigInt('53000000') - }, - lastRos: Percent(1), - ros: Percent(2) + } }, metadata: { name: 'VEGASPool', @@ -214,9 +202,7 @@ const detailsForAll: PoolDetails = { stake: { live: BigInt('34000000'), active: BigInt('34000000') - }, - lastRos: Percent(1), - ros: Percent(2) + } }, relays: undefined, rewardAccount: Cardano.RewardAccount('stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj'), diff --git a/packages/cardano/src/wallet/test/mocks/mock.ts b/packages/cardano/src/wallet/test/mocks/mock.ts index 023b48fce..723ea89e2 100644 --- a/packages/cardano/src/wallet/test/mocks/mock.ts +++ b/packages/cardano/src/wallet/test/mocks/mock.ts @@ -32,9 +32,7 @@ export const stakePoolMock: Cardano.StakePool = { livePledge: BigInt('2000000000'), saturation: Percent(0.5), stake: undefined, - size: undefined, - lastRos: Percent(1), - ros: Percent(2) + size: undefined }, owners: [ Cardano.RewardAccount('stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj'), diff --git a/packages/cardano/src/wallet/util/__tests__/stake-pool-transformer.test.ts b/packages/cardano/src/wallet/util/__tests__/stake-pool-transformer.test.ts index a8d343bf9..cd6dfaa23 100644 --- a/packages/cardano/src/wallet/util/__tests__/stake-pool-transformer.test.ts +++ b/packages/cardano/src/wallet/util/__tests__/stake-pool-transformer.test.ts @@ -40,9 +40,7 @@ const cardanoStakePoolMock: StakePoolSearchResults = { saturation: Percent(0.0512), stake: undefined, size: undefined, - apy: Percent(0.013), - lastRos: Percent(1), - ros: Percent(2) + apy: Percent(0.013) }, owners: [ Cardano.RewardAccount('stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj'), diff --git a/packages/staking/src/features/BrowsePools/StakePoolsTable/StakePoolsTable.tsx b/packages/staking/src/features/BrowsePools/StakePoolsTable/StakePoolsTable.tsx index 390725ac0..610ceee53 100644 --- a/packages/staking/src/features/BrowsePools/StakePoolsTable/StakePoolsTable.tsx +++ b/packages/staking/src/features/BrowsePools/StakePoolsTable/StakePoolsTable.tsx @@ -15,7 +15,7 @@ type StakePoolsTableProps = { }; const DEFAULT_SORT_OPTIONS: StakePoolSortOptions = { - field: 'ros', + field: 'apy', order: 'desc', }; From 595aafecf4d44dec83de814211914a11bc9ba5ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojtek=20K=C5=82os?= <114915819+wklos-iohk@users.noreply.github.com> Date: Thu, 30 Nov 2023 11:50:05 +0100 Subject: [PATCH 19/22] test(extension): add test ids for governance actions (#765) --- .../ConfirmDRepRegistration.tsx | 18 ++++++++++++----- .../ConfirmDRepRetirement.tsx | 14 ++++++++++--- .../ConfirmDRepUpdate/ConfirmDRepUpdate.tsx | 12 +++++++---- .../ConfirmVoteDelegation.tsx | 20 +++++++++++++++---- .../transaction-summary-address.component.tsx | 14 +++++++++++-- ...transaction-summary-metadata.component.tsx | 13 ++++++++++-- 6 files changed, 71 insertions(+), 20 deletions(-) diff --git a/packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.tsx b/packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.tsx index 9246cb3c8..644b457fe 100644 --- a/packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.tsx +++ b/packages/core/src/ui/components/ConfirmDRepRegistration/ConfirmDRepRegistration.tsx @@ -34,23 +34,31 @@ export const ConfirmDRepRegistration = ({ dappInfo, errorMessage, translations, )} - + {metadata.url && ( - + )} {metadata.hash && ( - + )} - + - + diff --git a/packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.tsx b/packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.tsx index ece0e83d6..59219813a 100644 --- a/packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.tsx +++ b/packages/core/src/ui/components/ConfirmDRepRetirement/ConfirmDRepRetirement.tsx @@ -31,13 +31,21 @@ export const ConfirmDRepRetirement = ({ dappInfo, errorMessage, translations, me )} - + - + - + diff --git a/packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.tsx b/packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.tsx index d712827f1..e86ee2b77 100644 --- a/packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.tsx +++ b/packages/core/src/ui/components/ConfirmDRepUpdate/ConfirmDRepUpdate.tsx @@ -33,20 +33,24 @@ export const ConfirmDRepUpdate = ({ dappInfo, errorMessage, translations, metada )} - + {metadata.url && ( - + )} {metadata.hash && ( - + )} - + diff --git a/packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.tsx b/packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.tsx index eebab72b2..4eae2a274 100644 --- a/packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.tsx +++ b/packages/core/src/ui/components/ConfirmVoteDelegation/ConfirmVoteDelegation.tsx @@ -34,21 +34,33 @@ export const ConfirmVoteDelegation = ({ dappInfo, errorMessage, translations, me )} - + {metadata.drepId && ( - + )} {metadata.alwaysAbstain && ( - + )} {metadata.alwaysNoConfidence && ( - + )} diff --git a/packages/ui/src/design-system/transaction-summary/transaction-summary-address.component.tsx b/packages/ui/src/design-system/transaction-summary/transaction-summary-address.component.tsx index 83234cfa0..087402100 100644 --- a/packages/ui/src/design-system/transaction-summary/transaction-summary-address.component.tsx +++ b/packages/ui/src/design-system/transaction-summary/transaction-summary-address.component.tsx @@ -11,23 +11,33 @@ import type { OmitClassName } from '../../types'; type Props = OmitClassName<'div'> & { label: string; address: string; + testID?: string; }; export const Address = ({ label, address, + testID, ...props }: Readonly): JSX.Element => { return ( - + {label} - {address} + + {address} + diff --git a/packages/ui/src/design-system/transaction-summary/transaction-summary-metadata.component.tsx b/packages/ui/src/design-system/transaction-summary/transaction-summary-metadata.component.tsx index 82d4d0c05..ccde339e4 100644 --- a/packages/ui/src/design-system/transaction-summary/transaction-summary-metadata.component.tsx +++ b/packages/ui/src/design-system/transaction-summary/transaction-summary-metadata.component.tsx @@ -11,23 +11,32 @@ import type { OmitClassName } from '../../types'; type Props = OmitClassName<'div'> & { label: string; text: string; + testID?: string; }; export const Metadata = ({ label, text, + testID, ...props }: Readonly): JSX.Element => { return ( - + {label} - + {text} From 1bc62f021227ab01cc4cba8a96953cbbbdbf655b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20W=C5=82odek?= Date: Fri, 1 Dec 2023 12:32:57 +0100 Subject: [PATCH 20/22] Merge main into feat/sanchonet (#763) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(staking): maintenance 24 Nov 2023 (#754) * feat(staking): maintenance 24 Nov 2023 * [LW-9151] Edit account name component (#746) * feat(ui): input component * feat(extension): edit account drawer * feat(extension): add unit test * feat: rename input component * feat(ui): use pseudo parameters * feat(ui): input width * feat(ui): input disabled style * feat(extension): add ui package * feat: update lock file * feat(ui): remove redundant styles * feat(extension): [LW-5806] update Minting transaction display from dapps (#608) * feat: identify minting txs from dapps and display proper UI to confirm refs: LW-5806 * feat(extension): update dapp transaction styling * refactor(extension,core): fix sonarcloud quality checks * ci(core): add @lace/ui to dependencies * test(extension): add mocks in ConfirmTransaction.test.tsx * test(extension): remove leftover from local testing * refactor(core): add missing newline at end of file --------- Co-authored-by: przemyslaw.wlodek * test(extension): maintenance 27 nov (#757) * test(extension): maintenance nov 27 * test(extension): clear failed request test logs * test(extension): add real time console test logging, remove unnecessary logs * test(extension): update wdio version * test(extension): add node option env variable for e2e github runs * test(extension): move node options to e2e test sections * test(extension): increase max-old-space-size * test(extension): downgrade wdio to stable version, remove node env variable * feat(staking): [LW-6437, LW-8877] past epochs rewards chart (#718) --------- Co-authored-by: refi93 Co-authored-by: przemyslaw.wlodek Co-authored-by: januszjanus * feat(extension): track manual re-sync and hd wallet discovery (#712) * feat(staking): [LW-8929, LW-8777] apply pool search also to selected pools (#706) --------- Co-authored-by: refi93 * feat(staking,common): enable manageDelegation CTA from pool details (#720) Co-authored-by: przemyslaw.wlodek * feat(staking): load multi-delegation for HW wallets (#686) --------- Signed-off-by: Kamil Džurman Co-authored-by: Rafael Korbaš Co-authored-by: januszjanus Co-authored-by: przemyslaw.wlodek * test(extension): test maintenance 29 Nov - fix Dapp e2e (#760) * feat(extension): [LW-9028] Add wallet concepts to menu (#742) * feat(extension): update dropdown menu with new wallet component * feat(extension): add add new wallet option to profile dropdown * refactor(ui): add test id * refactor(extension): add test id for multi wallet * refactor(extension): increase button width to match figma * refactor(extension): remove copy address tooltip from multi-wallet menu it em * refactor(extension): align top navigation buttons with side panel * refactor(extension): update the expand button styling * refactor(extension): update network pill and expand button styling * refactor(extension): update network pill border radius * refactor(extension): limit network pill change to popup only * fix(extension): fix moving left side bar * refactor(extension,core,cardano): post-merge fixes * chore(extension): fix unit tests + rename * chore(extension): fix unit tests and mocks * chore(extension): remove TODO comments * chore(core): review comments --------- Signed-off-by: Kamil Džurman Co-authored-by: Janusz Janus Co-authored-by: Lucas Co-authored-by: Leonel Gobbi <57540576+lgobbi-atix@users.noreply.github.com> Co-authored-by: bslabiak <112852128+bslabiak@users.noreply.github.com> Co-authored-by: Tomek Marciniak <16132011+mrcnk@users.noreply.github.com> Co-authored-by: refi93 Co-authored-by: Kamil Džurman Co-authored-by: Lukasz Jagiela <12641433+ljagiela@users.noreply.github.com> Co-authored-by: Renan Valentin --- apps/browser-extension-wallet/.env.defaults | 4 +- apps/browser-extension-wallet/.env.example | 3 +- .../DropdownMenu/DropdownMenu.module.scss | 4 + .../components/DropdownMenu/DropdownMenu.tsx | 50 ++- .../ExpandButton/ExpandButton.module.scss | 15 + .../components/ExpandButton/ExpandButton.tsx | 30 +- .../DropdownMenuOverlay.module.scss | 9 +- .../DropdownMenuOverlay.tsx | 4 +- .../components/AddNewWalletLink.tsx | 20 + .../components/UserInfo.tsx | 67 ++- .../DropdownMenuOverlay/components/index.ts | 1 + .../MainMenu/MainHeader.module.scss | 9 + .../src/components/MainMenu/MainHeader.tsx | 14 +- .../NetworkPill/NetworkPill.module.scss | 7 + .../components/NetworkPill/NetworkPill.tsx | 26 +- .../EditAccount/EditAccountDrawer.test.tsx | 57 +++ .../EditAccount/EditAccountDrawer.tsx | 60 +++ .../account/components/EditAccount/hooks.ts | 11 + .../ConfirmTransaction.tsx | 23 +- .../ConfirmTransactionContent.tsx | 14 +- .../DappTransactionContainer.tsx | 29 +- .../__tests__/ConfirmTransaction.test.tsx | 4 +- .../ConfirmTransactionContent.test.tsx | 27 +- .../DappTransactionContainer.test.tsx | 41 +- .../__tests__/hooks.test.tsx | 21 +- .../__tests__/utils.test.tsx | 29 +- .../components/confirm-transaction/hooks.ts | 126 +++++- .../components/confirm-transaction/utils.ts | 41 +- .../src/hooks/useMultiDelegationEnabled.ts | 16 +- .../src/lib/translations/en.json | 23 + .../src/providers/index.ts | 1 + .../src/routes/wallet-paths.ts | 6 + .../stores/slices/activity-detail-slice.ts | 17 +- .../src/utils/mocks/tx.ts | 6 + .../Layout/SectionLayout.modules.scss | 16 + .../components/Layout/SidePanel.tsx | 16 +- .../LeftSidePanel/LeftSidePanel.module.scss | 6 + .../LeftSidePanel/LeftSidePanel.tsx | 6 +- .../SendReceiveBox/SendReceiveBox.module.scss | 3 +- .../components/SettingsWalletBase.tsx | 16 +- .../components/HardwareWalletFlow.tsx | 9 + .../components/WalletSetupWizard.tsx | 10 + .../src/views/browser-view/index.tsx | 23 +- packages/cardano/src/wallet/types.ts | 27 +- packages/common/src/analytics/types.ts | 4 + .../TransactionDetails.module.scss | 25 +- .../ActivityDetail/TransactionDetails.tsx | 39 +- .../ActivityDetail/TransactionFee.module.scss | 109 +++++ .../ActivityDetail/TransactionFee.tsx | 42 ++ .../src/ui/components/ActivityDetail/index.ts | 1 + .../DappTransaction.module.scss | 96 +---- .../DappTransaction/DappTransaction.tsx | 141 +++--- .../DappTxAsset/DappTxAsset.module.scss | 41 ++ .../DappTxAsset/DappTxAsset.tsx | 23 + .../DappTransaction/DappTxAsset/index.ts | 1 + .../DappTxHeader/DappTxHeader.module.scss | 27 ++ .../DappTxHeader/DappTxHeader.tsx | 20 + .../DappTxOutput/DappTxOutput.module.scss | 67 +++ .../DappTxOutput/DappTxOutput.tsx | 42 ++ packages/core/src/ui/lib/translations/en.json | 12 + packages/e2e-tests/package.json | 18 +- .../src/assert/dAppConnectorAssert.ts | 10 +- .../dappConnector/confirmTransactionPage.ts | 20 +- .../src/features/EmptyStatesExtended.feature | 1 - .../src/features/EmptyStatesPopup.feature | 1 - .../src/features/FullExperiencePopup.feature | 1 - .../MultiDelegationPageExtended.feature | 12 - .../features/MultiDelegationPagePopup.feature | 1 - ...tidelegationDelegatedFundsExtended.feature | 2 - ...MultidelegationDelegatedFundsPopup.feature | 11 +- .../features/NavigationMainExtended.feature | 15 +- .../src/features/NavigationMainPopup.feature | 1 - .../analytics/AnalyticsSendExtended.feature | 3 +- ...elegationSwitchingPoolsExtendedE2E.feature | 1 - .../e2e-tests/src/hooks/beforeTagHooks.ts | 63 +-- .../src/pageobject/dAppConnectorPageObject.ts | 2 +- .../e2e-tests/src/utils/networkManager.ts | 9 +- packages/e2e-tests/src/utils/utils.ts | 1 - packages/e2e-tests/wdio.conf.base.ts | 7 +- packages/staking/package.json | 3 + .../StakePoolsTable/StakePoolsTable.tsx | 26 +- .../src/features/Drawer/StakePoolDetail.tsx | 25 +- .../Drawer/StakePoolDetailsDrawer.tsx | 23 +- .../src/features/Drawer/TransactionFail.tsx | 4 +- .../StakePoolConfirmationFooter.tsx | 59 +-- .../src/features/activity/Activity.tsx | 12 +- .../activity/EpochsSwitch.module.scss | 4 + .../src/features/activity/EpochsSwitch.tsx | 33 ++ .../PastEpochsRewards/PastEpochsRewards.tsx | 23 + .../PastEpochsRewards/PoolIndicator.tsx | 7 + .../PastEpochsRewards/RewardsChart.tsx | 41 ++ .../PastEpochsRewards/RewardsChartTooltip.tsx | 45 ++ .../hooks/useRewardsByEpoch.ts | 82 ++++ .../hooks/useRewardsChartPoolsColorMapper.tsx | 47 ++ .../activity/PastEpochsRewards/index.ts | 1 + .../src/features/activity/RewardsHistory.tsx | 2 +- .../src/features/i18n/translations/en.ts | 6 + packages/staking/src/features/i18n/types.ts | 8 + .../stateMachine/commands.ts | 37 +- .../stateMachine/processExpandedViewCases.ts | 86 ++-- .../stateMachine/types.ts | 3 + packages/ui/src/design-system/index.ts | 1 + .../profile-dropdown-trigger.component.tsx | 1 + ...profile-dropdown-wallet-card.component.tsx | 18 +- ...profile-dropdown-wallet-icon.component.tsx | 5 +- ...ofile-dropdown-wallet-option.component.tsx | 8 + .../ui/src/design-system/text-box/index.ts | 2 + .../text-box/text-box.component.tsx | 72 ++++ .../design-system/text-box/text-box.css.ts | 57 +++ .../text-box/text-box.stories.tsx | 96 +++++ yarn.lock | 402 ++++++++++++------ 111 files changed, 2349 insertions(+), 706 deletions(-) create mode 100644 apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/components/AddNewWalletLink.tsx create mode 100644 apps/browser-extension-wallet/src/features/account/components/EditAccount/EditAccountDrawer.test.tsx create mode 100644 apps/browser-extension-wallet/src/features/account/components/EditAccount/EditAccountDrawer.tsx create mode 100644 apps/browser-extension-wallet/src/features/account/components/EditAccount/hooks.ts create mode 100644 packages/core/src/ui/components/ActivityDetail/TransactionFee.module.scss create mode 100644 packages/core/src/ui/components/ActivityDetail/TransactionFee.tsx create mode 100644 packages/core/src/ui/components/DappTransaction/DappTxAsset/DappTxAsset.module.scss create mode 100644 packages/core/src/ui/components/DappTransaction/DappTxAsset/DappTxAsset.tsx create mode 100644 packages/core/src/ui/components/DappTransaction/DappTxAsset/index.ts create mode 100644 packages/core/src/ui/components/DappTransaction/DappTxHeader/DappTxHeader.module.scss create mode 100644 packages/core/src/ui/components/DappTransaction/DappTxHeader/DappTxHeader.tsx create mode 100644 packages/core/src/ui/components/DappTransaction/DappTxOutput/DappTxOutput.module.scss create mode 100644 packages/core/src/ui/components/DappTransaction/DappTxOutput/DappTxOutput.tsx create mode 100644 packages/staking/src/features/activity/EpochsSwitch.module.scss create mode 100644 packages/staking/src/features/activity/EpochsSwitch.tsx create mode 100644 packages/staking/src/features/activity/PastEpochsRewards/PastEpochsRewards.tsx create mode 100644 packages/staking/src/features/activity/PastEpochsRewards/PoolIndicator.tsx create mode 100644 packages/staking/src/features/activity/PastEpochsRewards/RewardsChart.tsx create mode 100644 packages/staking/src/features/activity/PastEpochsRewards/RewardsChartTooltip.tsx create mode 100644 packages/staking/src/features/activity/PastEpochsRewards/hooks/useRewardsByEpoch.ts create mode 100644 packages/staking/src/features/activity/PastEpochsRewards/hooks/useRewardsChartPoolsColorMapper.tsx create mode 100644 packages/staking/src/features/activity/PastEpochsRewards/index.ts create mode 100644 packages/ui/src/design-system/text-box/index.ts create mode 100644 packages/ui/src/design-system/text-box/text-box.component.tsx create mode 100644 packages/ui/src/design-system/text-box/text-box.css.ts create mode 100644 packages/ui/src/design-system/text-box/text-box.stories.tsx diff --git a/apps/browser-extension-wallet/.env.defaults b/apps/browser-extension-wallet/.env.defaults index f7da95948..006147c92 100644 --- a/apps/browser-extension-wallet/.env.defaults +++ b/apps/browser-extension-wallet/.env.defaults @@ -18,7 +18,8 @@ USE_DIFFERENT_MNEMONIC_LENGTHS=true USE_NFT_FOLDERS=true USE_MULTI_CURRENCY=true USE_HIDE_MY_BALANCE=true -USE_MULTI_DELEGATION_STAKING=true +USE_MULTI_DELEGATION_STAKING_LEDGER=false +USE_MULTI_DELEGATION_STAKING_TREZOR=false USE_ADA_HANDLE=true USE_DATA_CHECK=false USE_POSTHOG_ANALYTICS=true @@ -27,6 +28,7 @@ USE_MULTI_DELEGATION_STAKING_ACTIVITY=false USE_POSTHOG_ANALYTICS_FOR_OPTED_OUT=false USE_MATOMO_ANALYTICS_FOR_OPTED_OUT=false +USE_MULTI_WALLET=false # In App URLs CATALYST_GOOGLE_PLAY_URL=https://play.google.com/store/apps/details?id=io.iohk.vitvoting diff --git a/apps/browser-extension-wallet/.env.example b/apps/browser-extension-wallet/.env.example index 1f7505ca9..ae66e0ab8 100644 --- a/apps/browser-extension-wallet/.env.example +++ b/apps/browser-extension-wallet/.env.example @@ -18,7 +18,8 @@ USE_DIFFERENT_MNEMONIC_LENGTHS=true USE_NFT_FOLDERS=true USE_MULTI_CURRENCY=true USE_HIDE_MY_BALANCE=true -USE_MULTI_DELEGATION_STAKING=true +USE_MULTI_DELEGATION_STAKING_LEDGER=false +USE_MULTI_DELEGATION_STAKING_TREZOR=false USE_ADA_HANDLE=true USE_HANDLE_AB=false USE_DATA_CHECK=false diff --git a/apps/browser-extension-wallet/src/components/DropdownMenu/DropdownMenu.module.scss b/apps/browser-extension-wallet/src/components/DropdownMenu/DropdownMenu.module.scss index 7d8322a7b..5dbc2da41 100644 --- a/apps/browser-extension-wallet/src/components/DropdownMenu/DropdownMenu.module.scss +++ b/apps/browser-extension-wallet/src/components/DropdownMenu/DropdownMenu.module.scss @@ -45,3 +45,7 @@ transform: rotateX(180deg); } } + +.profileDropdownTrigger { + flex-shrink: 0; +} diff --git a/apps/browser-extension-wallet/src/components/DropdownMenu/DropdownMenu.tsx b/apps/browser-extension-wallet/src/components/DropdownMenu/DropdownMenu.tsx index f1d754cbb..a91c2c635 100644 --- a/apps/browser-extension-wallet/src/components/DropdownMenu/DropdownMenu.tsx +++ b/apps/browser-extension-wallet/src/components/DropdownMenu/DropdownMenu.tsx @@ -11,6 +11,9 @@ import { useWalletStore } from '@src/stores'; import { UserAvatar } from '../MainMenu/DropdownMenuOverlay/components'; import { useAnalyticsContext } from '@providers'; import { PostHogAction } from '@providers/AnalyticsProvider/analyticsTracker'; +import { ProfileDropdown } from '@lace/ui'; +import { useGetHandles } from '@hooks'; +import { getAssetImageUrl } from '@src/utils/get-asset-image-url'; export interface DropdownMenuProps { isPopup?: boolean; @@ -20,6 +23,8 @@ export const DropdownMenu = ({ isPopup }: DropdownMenuProps): React.ReactElement const analytics = useAnalyticsContext(); const { walletInfo } = useWalletStore(); const [open, setOpen] = useState(false); + const [handle] = useGetHandles(); + const handleImage = handle?.profilePic; const Chevron = isPopup ? ChevronSmall : ChevronNormal; const sendAnalyticsEvent = (event: PostHogAction) => { @@ -41,20 +46,39 @@ export const DropdownMenu = ({ isPopup }: DropdownMenuProps): React.ReactElement placement="bottomRight" trigger={['click']} > - +
+ ) : ( + + )} ); }; diff --git a/apps/browser-extension-wallet/src/components/ExpandButton/ExpandButton.module.scss b/apps/browser-extension-wallet/src/components/ExpandButton/ExpandButton.module.scss index dfa9d4f4f..e16f9a4a5 100644 --- a/apps/browser-extension-wallet/src/components/ExpandButton/ExpandButton.module.scss +++ b/apps/browser-extension-wallet/src/components/ExpandButton/ExpandButton.module.scss @@ -36,6 +36,21 @@ } } +.multiWallet { + max-width: size_unit(6); + width: size_unit(6); + height: size_unit(6); + border-radius: size_unit(2); + flex-shrink: 0; + + &:hover { + max-width: size_unit(6); + width: size_unit(6); + gap: 0px; + padding: 0; + } +} + .text { color: var(--text-color-secondary); white-space: nowrap; diff --git a/apps/browser-extension-wallet/src/components/ExpandButton/ExpandButton.tsx b/apps/browser-extension-wallet/src/components/ExpandButton/ExpandButton.tsx index 1e7da942e..5abafd532 100644 --- a/apps/browser-extension-wallet/src/components/ExpandButton/ExpandButton.tsx +++ b/apps/browser-extension-wallet/src/components/ExpandButton/ExpandButton.tsx @@ -1,11 +1,31 @@ -import React from 'react'; +/* eslint-disable react/no-multi-comp */ +import React, { ReactNode } from 'react'; import ExpandIcon from '../../assets/icons/expand.component.svg'; +import classnames from 'classnames'; +import { Tooltip } from 'antd'; import styles from './ExpandButton.module.scss'; +const RenderTooltipIfMultiWallet = ({ children, label }: { children: ReactNode; label: string }) => { + if (process.env.USE_MULTI_WALLET === 'true') { + return {children}; + } + + return <>{children}; +}; + export const ExpandButton = ({ label, onClick }: { label: string; onClick: () => void }): React.ReactElement => ( - - - {label} - + + + + {process.env.USE_MULTI_WALLET !== 'true' && {label}} + + ); diff --git a/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/DropdownMenuOverlay.module.scss b/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/DropdownMenuOverlay.module.scss index 098024b80..e43bee1f1 100644 --- a/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/DropdownMenuOverlay.module.scss +++ b/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/DropdownMenuOverlay.module.scss @@ -17,7 +17,6 @@ .userInfoWrapper { display: flex; flex-direction: column; - padding: 10px size_unit(2) size_unit(2.75); gap: size_unit(2); .userInfo { @@ -50,6 +49,14 @@ } } + .singleWalletWrapper { + padding: 10px size_unit(2) size_unit(2.75); + } + + .multiWalletWrapper { + padding-bottom: size_unit(2.75); + } + .walletStatusInfo { cursor: default; display: flex; diff --git a/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/DropdownMenuOverlay.tsx b/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/DropdownMenuOverlay.tsx index da8edbfe4..b48c5e927 100644 --- a/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/DropdownMenuOverlay.tsx +++ b/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/DropdownMenuOverlay.tsx @@ -8,7 +8,8 @@ import { ThemeSwitcher, LockWallet, UserInfo, - NetworkChoise + NetworkChoise, + AddNewWalletLink } from './components'; import styles from './DropdownMenuOverlay.module.scss'; import { NetworkInfo } from './components/NetworkInfo'; @@ -42,6 +43,7 @@ export const DropdownMenuOverlay: VFC = ({ <> {topSection} + {process.env.USE_MULTI_WALLET === 'true' && } diff --git a/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/components/AddNewWalletLink.tsx b/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/components/AddNewWalletLink.tsx new file mode 100644 index 000000000..281fa80ea --- /dev/null +++ b/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/components/AddNewWalletLink.tsx @@ -0,0 +1,20 @@ +import React from 'react'; +import { walletRoutePaths } from '@routes'; +import { Menu } from 'antd'; +import { useTranslation } from 'react-i18next'; +import { Link } from 'react-router-dom'; +import styles from '../DropdownMenuOverlay.module.scss'; + +const handleOnClicked = (): void => void 0; + +export const AddNewWalletLink = (): React.ReactElement => { + const { t } = useTranslation(); + + return ( + + + {t('browserView.sideMenu.links.addNewWallet')} + + + ); +}; diff --git a/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/components/UserInfo.tsx b/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/components/UserInfo.tsx index 801c51ae8..e36d810bd 100644 --- a/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/components/UserInfo.tsx +++ b/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/components/UserInfo.tsx @@ -11,6 +11,8 @@ import { UserAvatar } from './UserAvatar'; import { useGetHandles } from '@hooks'; import { useAnalyticsContext } from '@providers'; import { PostHogAction } from '@providers/AnalyticsProvider/analyticsTracker'; +import { ProfileDropdown } from '@lace/ui'; +import { getAssetImageUrl } from '@src/utils/get-asset-image-url'; const ADRESS_FIRST_PART_LENGTH = 10; const ADRESS_LAST_PART_LENGTH = 5; @@ -36,6 +38,7 @@ export const UserInfo = ({ avatarVisible = true }: UserInfoProps): React.ReactEl const walletName = addEllipsis(walletInfo.name.toString(), WALLET_NAME_MAX_LENGTH, 0); const [handle] = useGetHandles(); const handleName = handle?.nftMetadata?.name; + const handleImage = handle?.profilePic; const handleOnAddressCopy = () => { toast.notify({ duration: TOAST_DEFAULT_DURATION, text: t('general.clipboard.copiedToClipboard') }); @@ -44,29 +47,51 @@ export const UserInfo = ({ avatarVisible = true }: UserInfoProps): React.ReactEl return ( -
+
- - {handleName ? t('settings.copyHandle') : t('settings.copyAddress')} - - } - > -
- {avatarVisible && } -
-

- {walletName} -

-

- {handleName || shortenedWalletAddress} -

+ {process.env.USE_MULTI_WALLET === 'true' ? ( + + ) : ( + + {handleName ? t('settings.copyHandle') : t('settings.copyAddress')} + + } + > +
+ {avatarVisible && } +
+

+ {walletName} +

+

+ {handleName || shortenedWalletAddress} +

+
-
- + + )}
diff --git a/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/components/index.ts b/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/components/index.ts index 040f0a990..5382f3cf6 100644 --- a/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/components/index.ts +++ b/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/components/index.ts @@ -8,3 +8,4 @@ export * from './UserInfo'; export * from './UserAvatar'; export * from './NetworkChoise'; export * from './NetworkInfo'; +export * from './AddNewWalletLink'; diff --git a/apps/browser-extension-wallet/src/components/MainMenu/MainHeader.module.scss b/apps/browser-extension-wallet/src/components/MainMenu/MainHeader.module.scss index cb96dbc1c..853218748 100644 --- a/apps/browser-extension-wallet/src/components/MainMenu/MainHeader.module.scss +++ b/apps/browser-extension-wallet/src/components/MainMenu/MainHeader.module.scss @@ -36,3 +36,12 @@ } } } + +.multiWallet { + flex-wrap: wrap; +} + +.multiWalletNetworkPillBox { + width: 100%; + margin-bottom: 12px; +} diff --git a/apps/browser-extension-wallet/src/components/MainMenu/MainHeader.tsx b/apps/browser-extension-wallet/src/components/MainMenu/MainHeader.tsx index 734aad4c8..ac2c66beb 100644 --- a/apps/browser-extension-wallet/src/components/MainMenu/MainHeader.tsx +++ b/apps/browser-extension-wallet/src/components/MainMenu/MainHeader.tsx @@ -4,6 +4,7 @@ import styles from './MainHeader.module.scss'; import LaceLogoMark from '../../assets/branding/lace-logo-mark.component.svg'; import { useTranslation } from 'react-i18next'; import { walletRoutePaths } from '@routes'; +import classNames from 'classnames'; import { DropdownMenu } from '@components/DropdownMenu'; import { ExpandButton } from '@components/ExpandButton'; @@ -30,7 +31,16 @@ export const MainHeader = (): React.ReactElement => { return (
-
+
+ {process.env.USE_MULTI_WALLET === 'true' && ( +
+ +
+ )} { onClick={() => analytics.sendEventToPostHog(PostHogAction.WalletLaceClick)} > - + {process.env.USE_MULTI_WALLET !== 'true' && }
{ +export const NetworkPill = ({ isExpandable, isPopup = false }: NetworkPillProp): ReactElement => { const { environmentName } = useWalletStore(); const { t } = useTranslation(); const { isOnline, isBackendFailing } = useNetwork(); @@ -19,10 +20,19 @@ export const NetworkPill = ({ isExpandable }: NetworkPillProp): ReactElement => if (isOnline && !isBackendFailing && environmentName !== 'Mainnet') { return (
- {environmentName} + + {environmentName} +
); } @@ -30,7 +40,10 @@ export const NetworkPill = ({ isExpandable }: NetworkPillProp): ReactElement => return (
@@ -45,7 +58,10 @@ export const NetworkPill = ({ isExpandable }: NetworkPillProp): ReactElement => return (
diff --git a/apps/browser-extension-wallet/src/features/account/components/EditAccount/EditAccountDrawer.test.tsx b/apps/browser-extension-wallet/src/features/account/components/EditAccount/EditAccountDrawer.test.tsx new file mode 100644 index 000000000..7f06c9d6d --- /dev/null +++ b/apps/browser-extension-wallet/src/features/account/components/EditAccount/EditAccountDrawer.test.tsx @@ -0,0 +1,57 @@ +import React from 'react'; +import { render, fireEvent, screen } from '@testing-library/react'; +import { EditAccountDrawer } from './EditAccountDrawer'; +import '@testing-library/jest-dom'; + +jest.mock('react-i18next', () => ({ + useTranslation: () => ({ t: jest.fn() }) +})); + +describe('EditAccountDrawer', () => { + const onSaveMock = jest.fn(); + const hideMock = jest.fn(); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('displays default account name', () => { + render(); + + expect(screen.getByTestId('edit-account')).toBeInTheDocument(); + expect(screen.getByTestId('drawer-navigation-title')).toHaveTextContent('Account #1'); + expect(screen.getByTestId('edit-account-name-input')).toHaveValue(''); + expect(screen.getByTestId('edit-account-save-btn')).toBeDisabled(); + }); + + it('displays correct account name', () => { + render(); + + expect(screen.getByTestId('edit-account')).toBeInTheDocument(); + expect(screen.getByTestId('drawer-navigation-title')).toHaveTextContent('Test Account'); + expect(screen.getByTestId('edit-account-name-input')).toHaveValue('Test Account'); + expect(screen.getByTestId('edit-account-save-btn')).toBeDisabled(); + }); + + it('updates input value on change and enables save button', () => { + render(); + + const input = screen.getByTestId('edit-account-name-input'); + + fireEvent.change(input, { target: { value: 'New Account Name' } }); + fireEvent.click(screen.getByTestId('edit-account-save-btn')); + + expect(input).toHaveValue('New Account Name'); + expect(screen.getByTestId('drawer-navigation-title')).toHaveTextContent('Test Account'); + expect(screen.getByTestId('edit-account-save-btn')).toBeEnabled(); + expect(onSaveMock).toHaveBeenCalledWith('New Account Name'); + }); + + it('calls hide function when Cancel button is clicked', () => { + render(); + + fireEvent.click(screen.getByTestId('edit-account-cancel-btn')); + + expect(hideMock).toHaveBeenCalled(); + }); +}); diff --git a/apps/browser-extension-wallet/src/features/account/components/EditAccount/EditAccountDrawer.tsx b/apps/browser-extension-wallet/src/features/account/components/EditAccount/EditAccountDrawer.tsx new file mode 100644 index 000000000..1e1f27b56 --- /dev/null +++ b/apps/browser-extension-wallet/src/features/account/components/EditAccount/EditAccountDrawer.tsx @@ -0,0 +1,60 @@ +import React, { useState } from 'react'; +import { useTranslation } from 'react-i18next'; +import { Box, Flex, Button, Text, TextBox } from '@lace/ui'; +import { Drawer, DrawerNavigation } from '@lace/common'; + +export type Props = { + onSave: (name: string) => void; + visible: boolean; + hide: () => void; + name: string; + index: string; +}; + +export const EditAccountDrawer = ({ name, index, visible, onSave, hide }: Props): React.ReactElement => { + const { t } = useTranslation(); + const [currentName, setCurrentName] = useState(name); + + return ( + } + footer={ + + + onSave(currentName)} + data-testid="edit-account-save-btn" + label={t('account.edit.footer.save')} + /> + + + + } + > +
+ + {t('account.edit.title')} + + + {t('account.edit.subtitle')} + + setCurrentName(e.target.value)} + /> +
+
+ ); +}; diff --git a/apps/browser-extension-wallet/src/features/account/components/EditAccount/hooks.ts b/apps/browser-extension-wallet/src/features/account/components/EditAccount/hooks.ts new file mode 100644 index 000000000..f17ee3d5f --- /dev/null +++ b/apps/browser-extension-wallet/src/features/account/components/EditAccount/hooks.ts @@ -0,0 +1,11 @@ +import { useState } from 'react'; + +export const useEditAccountDrawer = (): { isOpen: boolean; open: () => void; hide: () => void } => { + const [visible, setVisible] = useState(false); + + return { + isOpen: visible, + open: () => setVisible(true), + hide: () => setVisible(false) + }; +}; diff --git a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.tsx b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.tsx index ba6ea4571..f90eea8d7 100644 --- a/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.tsx +++ b/apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/ConfirmTransaction.tsx @@ -1,6 +1,6 @@ /* eslint-disable no-console */ import React, { useMemo } from 'react'; -import { Button } from '@lace/common'; +import { Button, PostHogAction } from '@lace/common'; import { useTranslation } from 'react-i18next'; import { Layout } from '../Layout'; import { useViewsFlowContext } from '@providers/ViewFlowProvider'; @@ -14,6 +14,9 @@ import { DAPP_CHANNELS } from '@src/utils/constants'; import { runtime } from 'webextension-polyfill'; import { getTitleKey, getTxType } from './utils'; import { ConfirmTransactionContent } from './ConfirmTransactionContent'; +import { TX_CREATION_TYPE_KEY, TxCreationType } from '@providers/AnalyticsProvider/analyticsTracker'; +import { txSubmitted$ } from '@providers/AnalyticsProvider/onChain'; +import { useAnalyticsContext } from '@providers'; export const ConfirmTransaction = (): React.ReactElement => { const { t } = useTranslation(); @@ -34,6 +37,7 @@ export const ConfirmTransaction = (): React.ReactElement => { [] ); const { getKeyAgentType } = useWalletStore(); + const analytics = useAnalyticsContext(); const { signTxData, errorMessage } = useSignTxData(dappDataApi.getSignTxData); const keyAgentType = getKeyAgentType(); const isUsingHardwareWallet = keyAgentType !== Wallet.KeyManagement.KeyAgentType.InMemory; @@ -41,6 +45,19 @@ export const ConfirmTransaction = (): React.ReactElement => { const { isConfirmingTx, signWithHardwareWallet } = useSignWithHardwareWallet(); const txType = signTxData ? getTxType(signTxData.tx) : undefined; const title = txType ? t(getTitleKey(txType)) : ''; + const onConfirm = () => { + analytics.sendEventToPostHog(PostHogAction.SendTransactionSummaryConfirmClick, { + [TX_CREATION_TYPE_KEY]: TxCreationType.External + }); + + txSubmitted$.next({ + id: signTxData.tx?.id.toString(), + date: new Date().toString(), + creationType: TxCreationType.External + }); + + isUsingHardwareWallet ? signWithHardwareWallet() : setNextView(); + }; useOnBeforeUnload(disallowSignTx); @@ -49,9 +66,7 @@ export const ConfirmTransaction = (): React.ReactElement => {
- {fee && fee !== '-' && ( -
-
-
{t('package.core.activityDetails.transactionFee')}
- - {Info ? ( - - ) : ( - - )} - -
- -
-
- {`${fee} ${coinSymbol}`} - - {amountTransformer(fee)} - -
-
-
+ + + )} - {deposit && renderDepositValueSection({ value: deposit, label: t('package.core.activityDetails.deposit') })} {depositReclaim && renderDepositValueSection({ diff --git a/packages/core/src/ui/components/ActivityDetail/TransactionFee.module.scss b/packages/core/src/ui/components/ActivityDetail/TransactionFee.module.scss new file mode 100644 index 000000000..7ba475863 --- /dev/null +++ b/packages/core/src/ui/components/ActivityDetail/TransactionFee.module.scss @@ -0,0 +1,109 @@ +@import '../../styles/theme.scss'; +@import '../../../../../common/src/ui/styles/abstracts/typography'; + +.txFeeContainer { + display: flex; + align-items: center; + justify-content: center; + gap: size_unit(1); +} + +.txfee { + color: var(--text-color-primary); + font-size: var(--body, 16px); + font-weight: 600; + line-height: size_unit(3); +} + +.details { + color: var(--text-color-primary, #ffffff); + display: flex; + justify-content: space-between; + align-items: flex-start; + width: 100%; + + .title { + display: flex; + flex: 0 0 50%; + align-self: baseline; + color: var(--text-color-primary, #ffffff); + @include text-body-semi-bold; + } + + .detail { + align-items: end; + display: flex; + flex-direction: column; + gap: size_unit(2); + color: var(--text-color-primary, #ffffff); + text-align: right; + word-break: break-all; + @include text-body-medium; + + @media (max-width: $breakpoint-popup) { + flex-direction: column; + } + + &.hash { + @include text-address; + font-weight: 500; + text-align: right; + cursor: pointer; + } + &.txLink { + color: var(--text-color-blue, #3489f7); + line-height: 17px; + @media (max-width: $breakpoint-popup) { + flex: 60%; + } + } + &.poolId { + color: var(--text-color-secondary); + font-size: var(--bodySmall); + font-weight: 500; + line-height: 17px; + } + } + + .timestamp { + flex: 0 0 35%; + } + + .amount { + display: flex; + flex-direction: column; + width: 100%; + align-items: flex-end; + + .ada { + color: var(--text-color-primary, #ffffff); + } + + .fiat { + color: var(--text-color-secondary, #878e9e); + } + + .addrName { + margin-bottom: size_unit(1); + } + } + + .addressDetail { + font-size: var(--bodySmall, 14px); + font-weight: 400; + line-height: size_unit(2); + text-align: right; + margin-bottom: size_unit(5); + @media (max-width: $breakpoint-popup) { + margin-bottom: size_unit(6); + } + } + + .metadataLabel { + display: flex; + flex: 0 0 50%; + align-self: baseline; + @include text-bodyLarge-bold; + color: var(--text-color-primary); + } +} diff --git a/packages/core/src/ui/components/ActivityDetail/TransactionFee.tsx b/packages/core/src/ui/components/ActivityDetail/TransactionFee.tsx new file mode 100644 index 000000000..ba4f3fd62 --- /dev/null +++ b/packages/core/src/ui/components/ActivityDetail/TransactionFee.tsx @@ -0,0 +1,42 @@ +/* eslint-disable no-magic-numbers */ +import React from 'react'; +import { InfoCircleOutlined } from '@ant-design/icons'; +import { Tooltip } from 'antd'; +import styles from './TransactionFee.module.scss'; +import { ReactComponent as Info } from '../../assets/icons/info-icon.component.svg'; +import { useTranslate } from '@src/ui/hooks'; + +export interface TransactionFeeProps { + fee: string; + amountTransformer: (amount: string) => string; + coinSymbol: string; +} +export const TransactionFee = ({ fee, amountTransformer, coinSymbol }: TransactionFeeProps): React.ReactElement => { + const { t } = useTranslate(); + + return ( +
+
+
+ {t('package.core.activityDetails.transactionFee')} +
+ + {Info ? ( + + ) : ( + + )} + +
+ +
+
+ {`${fee} ${coinSymbol}`} + + {amountTransformer(fee)} + +
+
+
+ ); +}; diff --git a/packages/core/src/ui/components/ActivityDetail/index.ts b/packages/core/src/ui/components/ActivityDetail/index.ts index 26ccb7a4b..7ba95eea8 100644 --- a/packages/core/src/ui/components/ActivityDetail/index.ts +++ b/packages/core/src/ui/components/ActivityDetail/index.ts @@ -3,3 +3,4 @@ export * from './RewardsDetails'; export * from './ActivityTypeIcon'; export * from './TransactionDetailAsset'; export * from './TransactionInputOutput'; +export * from './TransactionFee'; diff --git a/packages/core/src/ui/components/DappTransaction/DappTransaction.module.scss b/packages/core/src/ui/components/DappTransaction/DappTransaction.module.scss index ac80eec8e..ea1eb99b3 100644 --- a/packages/core/src/ui/components/DappTransaction/DappTransaction.module.scss +++ b/packages/core/src/ui/components/DappTransaction/DappTransaction.module.scss @@ -1,5 +1,6 @@ @import '../../styles/theme.scss'; @import '../../../../../common/src/ui/styles/abstracts/_typography.scss'; + .dappInfo { margin: size_unit(1) 0px; } @@ -12,92 +13,14 @@ margin: size_unit(4) 0 size_unit(2) 0px; padding: size_unit(3) 0; border-top: 2px solid var(--light-mode-light-grey-plus, var(--dark-mode-mid-grey)); + gap: size_unit(3); } .error { margin: size_unit(2) 0px; } -.header { - font-size: var(--bodyLarge); - letter-spacing: -0.015em; - margin-bottom: size_unit(1); - display: flex; - justify-content: space-between; - align-items: center; - - .title { - font-weight: 600; - line-height: size_unit(3); - /* or 133% */ - /* Secondary - Black */ - color: var(--text-color-primary); - } - .type { - font-weight: 500; - line-height: size_unit(4); - /* or 178% */ - text-align: right; - /* Primary - Purple */ - color: var(--primary-default, #7f5af0); - } -} -.body { - display: flex; - flex-direction: column; - gap: size_unit(2); -} -.detail { - display: flex; - justify-content: space-between; - align-items: baseline; - - > * { - display: flex; - flex: 0 1 50%; - min-width: 0; - } - - .title { - font-weight: 500; - font-size: var(--body); - line-height: size_unit(3); - /* or 150% */ - /* Secondary - Black */ - color: var(--text-color-primary); - text-align: right; - } - .value { - display: flex; - align-items: flex-end; - flex-direction: column; - - font-size: var(--bodySmall); - font-weight: 500; - line-height: size_unit(2); - /* Secondary - Black */ - color: var(--text-color-primary); - - .bold { - font-weight: 600; - line-height: size_unit(3); - font-size: var(--body); - word-break: break-all; - } - - .rightAligned { - text-align: right; - > div { - justify-content: flex-end; - } - div, - p { - text-align: right; - } - } - } -} .warningAlert { flex-direction: row; background: var(--lace-cream); @@ -118,15 +41,12 @@ margin: 0; } } -:global(.__react_component_tooltip) { - @include tooltip-default; -} -.sub { - @include text-bodySmall-medium; - /* or 171% */ - letter-spacing: -0.015em; - /* Data - Dark Grey */ +.feeContainer { + display: flex; + flex-direction: row; + align-items: flex-start; + justify-content: space-between; + @include text-body-semi-bold; color: var(--text-color-primary); - text-align: right; } diff --git a/packages/core/src/ui/components/DappTransaction/DappTransaction.tsx b/packages/core/src/ui/components/DappTransaction/DappTransaction.tsx index d7c4da265..6b0d0bce8 100644 --- a/packages/core/src/ui/components/DappTransaction/DappTransaction.tsx +++ b/packages/core/src/ui/components/DappTransaction/DappTransaction.tsx @@ -1,91 +1,84 @@ +/* eslint-disable sonarjs/no-duplicate-string */ import React from 'react'; -import { Ellipsis, ErrorPane } from '@lace/common'; +import { ErrorPane } from '@lace/common'; +import { Wallet } from '@lace/cardano'; import { DappInfo, DappInfoProps } from '../DappInfo'; +import { DappTxHeader } from './DappTxHeader/DappTxHeader'; +import { DappTxAsset } from './DappTxAsset/DappTxAsset'; +import { DappTxOutput } from './DappTxOutput/DappTxOutput'; import styles from './DappTransaction.module.scss'; -import { TranslationsFor } from '@ui/utils/types'; - -type TransactionDetails = { - fee: string; - outputs: { - coins: string; - recipient: string; - assets?: { - name: string; - amount: string; - ticker?: string; - }[]; - }[]; - type: 'Send' | 'Mint' | 'Burn'; -}; +import { useTranslate } from '@src/ui/hooks'; +import { TransactionFee } from '@ui/components/ActivityDetail'; export interface DappTransactionProps { /** Transaction details such as type, amount, fee and address */ - transaction: TransactionDetails; + transaction: Wallet.Cip30SignTxSummary; /** dApp information such as logo, name and url */ dappInfo: Omit; /** Optional error message */ errorMessage?: string; - translations: TranslationsFor<'transaction' | 'amount' | 'recipient' | 'fee' | 'adaFollowingNumericValue'>; + fiatCurrencyCode?: string; + fiatCurrencyPrice?: number; + coinSymbol?: string; } export const DappTransaction = ({ - transaction: { type, outputs, fee }, + transaction: { type, outputs, fee, mintedAssets, burnedAssets }, dappInfo, errorMessage, - translations -}: DappTransactionProps): React.ReactElement => ( -
- - {errorMessage && } -
-
-
- {translations.transaction} -
-
- {type} -
+ fiatCurrencyCode, + fiatCurrencyPrice, + coinSymbol +}: DappTransactionProps): React.ReactElement => { + const { t } = useTranslate(); + return ( +
+ + {errorMessage && } +
+ {type === Wallet.Cip30TxType.Mint && mintedAssets?.length > 0 && ( + <> + + {mintedAssets.map((asset) => ( + + ))} + + )} + {type === Wallet.Cip30TxType.Burn && burnedAssets?.length > 0 && ( + <> + 0 ? undefined : t('package.core.dappTransaction.transaction')} + subtitle={t('package.core.dappTransaction.burn')} + /> + {burnedAssets.map((asset) => ( + + ))} + + )} + {type === Wallet.Cip30TxType.Send && ( + <> + + {outputs.map((output) => ( + + ))} + + )} + {fee && fee !== '-' && ( + + `${Wallet.util.convertAdaToFiat({ ada, fiat: fiatCurrencyPrice })} ${fiatCurrencyCode}` + } + coinSymbol={coinSymbol} + /> + )}
- {outputs.map((output) => ( -
-
-
- {translations.amount} -
-
-
- {output.coins.toString()} ADA -
- {outputs.length === 1 && ( -
- {translations.fee}: {fee.toString()} ADA -
- )} - {output.assets && - output.assets.map((asset) => ( -
- {asset.amount} {asset.ticker || asset.name} -
- ))} -
-
-
-
- {translations.recipient} -
-
- -
-
-
- ))} - {outputs.length > 1 && ( -
-
- {translations.fee}: {fee.toString()} ADA -
-
- )}
-
-); + ); +}; diff --git a/packages/core/src/ui/components/DappTransaction/DappTxAsset/DappTxAsset.module.scss b/packages/core/src/ui/components/DappTransaction/DappTxAsset/DappTxAsset.module.scss new file mode 100644 index 000000000..0d5bf78af --- /dev/null +++ b/packages/core/src/ui/components/DappTransaction/DappTxAsset/DappTxAsset.module.scss @@ -0,0 +1,41 @@ +@import '../../../styles/theme.scss'; +@import '../../../../../../common/src/ui/styles/abstracts/_typography.scss'; + +.body { + display: flex; + flex-direction: column; + gap: size_unit(3); + background-color: var(--light-mode-light-grey, var(--dark-mode-grey, #f9f9f9)); + border-radius: size_unit(2); + padding: size_unit(2); + + .detail { + @include text-body-semi-bold; + display: flex; + justify-content: space-between; + align-items: center; + + .title { + color: var(--text-color-primary); + line-height: 1; + } + + .value { + display: flex; + max-width: 50%; + align-items: flex-end; + flex-direction: column; + gap: size_unit(2); + + font-size: var(--bodySmall); + font-weight: 500; + line-height: 1; + /* Secondary - Black */ + color: var(--text-color-primary); + } + + .ellipsis > p { + margin: 0; + } + } +} diff --git a/packages/core/src/ui/components/DappTransaction/DappTxAsset/DappTxAsset.tsx b/packages/core/src/ui/components/DappTransaction/DappTxAsset/DappTxAsset.tsx new file mode 100644 index 000000000..b77540343 --- /dev/null +++ b/packages/core/src/ui/components/DappTransaction/DappTxAsset/DappTxAsset.tsx @@ -0,0 +1,23 @@ +import React from 'react'; +import styles from './DappTxAsset.module.scss'; +import { Ellipsis } from '@lace/common'; +import { useTranslate } from '@src/ui/hooks'; +import { Wallet } from '@lace/cardano'; + +export const DappTxAsset = ({ amount, name, ticker }: Wallet.Cip30SignTxAssetItem): React.ReactElement => { + const { t } = useTranslate(); + return ( +
+
+
{t('package.core.dappTransaction.asset')}
+
+ +
+
+
+
{t('package.core.dappTransaction.quantity')}
+
{amount}
+
+
+ ); +}; diff --git a/packages/core/src/ui/components/DappTransaction/DappTxAsset/index.ts b/packages/core/src/ui/components/DappTransaction/DappTxAsset/index.ts new file mode 100644 index 000000000..3418661f1 --- /dev/null +++ b/packages/core/src/ui/components/DappTransaction/DappTxAsset/index.ts @@ -0,0 +1 @@ +export { DappTxAsset } from './DappTxAsset'; diff --git a/packages/core/src/ui/components/DappTransaction/DappTxHeader/DappTxHeader.module.scss b/packages/core/src/ui/components/DappTransaction/DappTxHeader/DappTxHeader.module.scss new file mode 100644 index 000000000..94eefef49 --- /dev/null +++ b/packages/core/src/ui/components/DappTransaction/DappTxHeader/DappTxHeader.module.scss @@ -0,0 +1,27 @@ +@import '../../../styles/theme.scss'; +@import '../../../../../../common/src/ui/styles/abstracts/_typography.scss'; + +.header { + font-size: var(--bodyLarge); + letter-spacing: -0.015em; + margin-bottom: size_unit(1); + display: flex; + justify-content: space-between; + align-items: center; + + .title { + font-weight: 600; + line-height: size_unit(3); + /* or 133% */ + /* Secondary - Black */ + color: var(--text-color-primary); + } + .type { + font-weight: 500; + line-height: size_unit(4); + /* or 178% */ + text-align: right; + /* Primary - Purple */ + color: var(--primary-default, #7f5af0); + } +} diff --git a/packages/core/src/ui/components/DappTransaction/DappTxHeader/DappTxHeader.tsx b/packages/core/src/ui/components/DappTransaction/DappTxHeader/DappTxHeader.tsx new file mode 100644 index 000000000..8117fcd3e --- /dev/null +++ b/packages/core/src/ui/components/DappTransaction/DappTxHeader/DappTxHeader.tsx @@ -0,0 +1,20 @@ +import React from 'react'; +import styles from './DappTxHeader.module.scss'; + +export interface DappTxHeaderProps { + title?: string; + subtitle?: string; +} + +export const DappTxHeader = (props: DappTxHeaderProps): React.ReactElement => ( +
+
+ {props?.title ?? ''} +
+ {props?.subtitle && ( +
+ {props.subtitle} +
+ )} +
+); diff --git a/packages/core/src/ui/components/DappTransaction/DappTxOutput/DappTxOutput.module.scss b/packages/core/src/ui/components/DappTransaction/DappTxOutput/DappTxOutput.module.scss new file mode 100644 index 000000000..04c3b12f0 --- /dev/null +++ b/packages/core/src/ui/components/DappTransaction/DappTxOutput/DappTxOutput.module.scss @@ -0,0 +1,67 @@ +@import '../../../styles/theme.scss'; +@import '../../../../../../common/src/ui/styles/abstracts/_typography.scss'; + +.body { + display: flex; + flex-direction: column; + gap: size_unit(3); + background-color: var(--light-mode-light-grey, var(--dark-mode-grey, #f9f9f9)); + border-radius: size_unit(2); + padding: size_unit(2); +} + +.detail { + display: flex; + justify-content: space-between; + align-items: baseline; + + > * { + display: flex; + flex: 0 1 50%; + min-width: 0; + } + + .title { + font-weight: 500; + font-size: var(--body); + line-height: size_unit(3); + /* or 150% */ + /* Secondary - Black */ + color: var(--text-color-primary); + text-align: right; + } + .value { + display: flex; + align-items: flex-end; + flex-direction: column; + gap: size_unit(2); + + font-size: var(--bodySmall); + font-weight: 500; + line-height: size_unit(2); + /* Secondary - Black */ + color: var(--text-color-primary); + + .bold { + font-weight: 600; + line-height: size_unit(3); + font-size: var(--body); + word-break: break-all; + } + + .rightAligned { + text-align: right; + > div { + justify-content: flex-end; + } + div, + p { + text-align: right; + } + } + } +} + +:global(.__react_component_tooltip) { + @include tooltip-default; +} diff --git a/packages/core/src/ui/components/DappTransaction/DappTxOutput/DappTxOutput.tsx b/packages/core/src/ui/components/DappTransaction/DappTxOutput/DappTxOutput.tsx new file mode 100644 index 000000000..9eccd4e0e --- /dev/null +++ b/packages/core/src/ui/components/DappTransaction/DappTxOutput/DappTxOutput.tsx @@ -0,0 +1,42 @@ +import React from 'react'; +import { Ellipsis } from '@lace/common'; +import styles from './DappTxOutput.module.scss'; +import { useTranslate } from '@src/ui/hooks'; +import { Wallet } from '@lace/cardano'; + +export interface DappTxOutputProps { + coins: string; + recipient: string; + assets?: Wallet.Cip30SignTxAssetItem[]; +} + +export const DappTxOutput = ({ recipient, coins, assets }: DappTxOutputProps): React.ReactElement => { + const { t } = useTranslate(); + return ( +
+
+
+ {t('package.core.dappTransaction.sending')} +
+
+
+ {coins.toString()} ADA +
+ {assets?.map((asset) => ( +
+ {asset.amount} {asset.ticker || asset.name} +
+ ))} +
+
+
+
+ {t('package.core.dappTransaction.recipient')} +
+
+ +
+
+
+ ); +}; diff --git a/packages/core/src/ui/lib/translations/en.json b/packages/core/src/ui/lib/translations/en.json index c73e862cb..7336752ff 100644 --- a/packages/core/src/ui/lib/translations/en.json +++ b/packages/core/src/ui/lib/translations/en.json @@ -100,6 +100,18 @@ "noMatchPassword": "Oops! The passwords don't match.", "secondLevelPasswordStrengthFeedback": "Getting there! Add some symbols and numbers to make it stronger.", "firstLevelPasswordStrengthFeedback": "Weak password. Add some numbers and characters to make it stronger." + }, + "dappTransaction": { + "asset": "Asset", + "burn": "Burn", + "fee": "Transaction Fee", + "insufficientFunds": "You do not have enough funds to complete the transaction", + "mint": "Mint", + "quantity": "Quantity", + "recipient": "Recipient", + "send": "Send", + "sending": "Sending", + "transaction": "Transaction" } } } diff --git a/packages/e2e-tests/package.json b/packages/e2e-tests/package.json index 4af33bf87..55746c84a 100755 --- a/packages/e2e-tests/package.json +++ b/packages/e2e-tests/package.json @@ -34,14 +34,14 @@ "@types/flat": "5.0.2", "@typescript-eslint/eslint-plugin": "6.0.0", "@typescript-eslint/parser": "6.0.0", - "@wdio/allure-reporter": "8.24.0", - "@wdio/cli": "8.24.0", - "@wdio/config": "8.24.0", - "@wdio/cucumber-framework": "8.24.0", - "@wdio/devtools-service": "8.24.0", - "@wdio/local-runner": "8.24.0", - "@wdio/spec-reporter": "8.24.0", - "@wdio/types": "8.24.0", + "@wdio/allure-reporter": "8.20.0", + "@wdio/cli": "8.20.0", + "@wdio/config": "8.20.0", + "@wdio/cucumber-framework": "8.20.0", + "@wdio/devtools-service": "8.20.0", + "@wdio/local-runner": "8.20.0", + "@wdio/spec-reporter": "8.20.0", + "@wdio/types": "8.20.0", "allure-commandline": "2.24.1", "clipboardy": "2.3.0", "eslint": "8.38.0", @@ -53,6 +53,6 @@ "ts-node": "10.9.1", "typescript": "4.9.5", "wdio-intercept-service": "4.4.0", - "webdriverio": "8.24.0" + "webdriverio": "8.20.0" } } diff --git a/packages/e2e-tests/src/assert/dAppConnectorAssert.ts b/packages/e2e-tests/src/assert/dAppConnectorAssert.ts index f19c85e0c..cf484e412 100644 --- a/packages/e2e-tests/src/assert/dAppConnectorAssert.ts +++ b/packages/e2e-tests/src/assert/dAppConnectorAssert.ts @@ -289,13 +289,19 @@ class DAppConnectorAssert { await ConfirmTransactionPage.transactionAmountTitle.waitForDisplayed(); expect(await ConfirmTransactionPage.transactionAmountTitle.getText()).to.equal( - await t('dapp.confirm.details.amount') + await t('package.core.dappTransaction.sending', 'core') ); await ConfirmTransactionPage.transactionAmountValue.waitForDisplayed(); expect(await ConfirmTransactionPage.transactionAmountValue.getText()).to.equal(expectedTransactionData.amountADA); - await ConfirmTransactionPage.transactionAmountFee.waitForDisplayed(); + await ConfirmTransactionPage.transactionFeeTitle.waitForDisplayed(); + expect(await ConfirmTransactionPage.transactionFeeTitle.getText()).to.equal( + await t('package.core.activityDetails.transactionFee', 'core') + ); + await ConfirmTransactionPage.transactionFeeTooltipIcon.waitForDisplayed(); + await ConfirmTransactionPage.transactionFeeValueAda.waitForDisplayed(); + await ConfirmTransactionPage.transactionFeeValueFiat.waitForDisplayed(); if (expectedTransactionData.amountAsset && expectedTransactionData.amountAsset !== '0') { await ConfirmTransactionPage.transactionAmountAsset.waitForDisplayed(); diff --git a/packages/e2e-tests/src/elements/dappConnector/confirmTransactionPage.ts b/packages/e2e-tests/src/elements/dappConnector/confirmTransactionPage.ts index ffdfc455f..1b8636a7d 100644 --- a/packages/e2e-tests/src/elements/dappConnector/confirmTransactionPage.ts +++ b/packages/e2e-tests/src/elements/dappConnector/confirmTransactionPage.ts @@ -7,7 +7,10 @@ class ConfirmTransactionPage extends CommonDappPageElements { private TRANSACTION_TYPE = '[data-testid="dapp-transaction-type"]'; private TRANSACTION_AMOUNT_TITLE = '[data-testid="dapp-transaction-amount-title"]'; private TRANSACTION_AMOUNT_VALUE = '[data-testid="dapp-transaction-amount-value"]'; - private TRANSACTION_AMOUNT_FEE = '[data-testid="dapp-transaction-amount-fee"]'; + private TRANSACTION_AMOUNT_FEE_TITLE = '[data-testid="tx-fee-title"]'; + private TRANSACTION_AMOUNT_FEE_TITLE_TOOLTIP_ICON = '[data-testid="tx-fee-tooltip-icon"]'; + private TRANSACTION_AMOUNT_FEE_VALUE_ADA = '[data-testid="tx-fee-ada"]'; + private TRANSACTION_AMOUNT_FEE_VALUE_FIAT = '[data-testid="tx-fee-fiat"]'; private TRANSACTION_AMOUNT_ASSET = '[data-testid="dapp-transaction-asset"]'; private TRANSACTION_RECIPIENT_TITLE = '[data-testid="dapp-transaction-recipient-title"]'; private TRANSACTION_RECIPIENT_ADDRESS = '[data-testid="dapp-transaction-recipient-address"]'; @@ -29,9 +32,20 @@ class ConfirmTransactionPage extends CommonDappPageElements { get transactionAmountValue(): ChainablePromiseElement { return $(this.TRANSACTION_AMOUNT_VALUE); } + get transactionFeeTitle(): ChainablePromiseElement { + return $(this.TRANSACTION_AMOUNT_FEE_TITLE); + } + + get transactionFeeTooltipIcon(): ChainablePromiseElement { + return $(this.TRANSACTION_AMOUNT_FEE_TITLE_TOOLTIP_ICON); + } + + get transactionFeeValueAda(): ChainablePromiseElement { + return $(this.TRANSACTION_AMOUNT_FEE_VALUE_ADA); + } - get transactionAmountFee(): ChainablePromiseElement { - return $(this.TRANSACTION_AMOUNT_FEE); + get transactionFeeValueFiat(): ChainablePromiseElement { + return $(this.TRANSACTION_AMOUNT_FEE_VALUE_FIAT); } get transactionAmountAsset(): ChainablePromiseElement { diff --git a/packages/e2e-tests/src/features/EmptyStatesExtended.feature b/packages/e2e-tests/src/features/EmptyStatesExtended.feature index b1437d70e..273e140f5 100644 --- a/packages/e2e-tests/src/features/EmptyStatesExtended.feature +++ b/packages/e2e-tests/src/features/EmptyStatesExtended.feature @@ -29,7 +29,6 @@ Feature: Empty states @LW-8447 Scenario: Extended View - Staking empty state - When I disable showing Multidelegation beta banner And I navigate to Staking extended page Then I see empty state banner for Staking page in extended mode When I click "Copy" button on empty state banner diff --git a/packages/e2e-tests/src/features/EmptyStatesPopup.feature b/packages/e2e-tests/src/features/EmptyStatesPopup.feature index c58982208..daa1864c5 100644 --- a/packages/e2e-tests/src/features/EmptyStatesPopup.feature +++ b/packages/e2e-tests/src/features/EmptyStatesPopup.feature @@ -28,7 +28,6 @@ Feature: Empty states @LW-8470 Scenario: Popup View - Staking empty state - When I disable showing Multidelegation beta banner And I navigate to Staking popup page Then I see empty state banner for Staking page in popup mode When I click "Copy" button on empty state banner diff --git a/packages/e2e-tests/src/features/FullExperiencePopup.feature b/packages/e2e-tests/src/features/FullExperiencePopup.feature index 9cbc58ea8..2209cd493 100644 --- a/packages/e2e-tests/src/features/FullExperiencePopup.feature +++ b/packages/e2e-tests/src/features/FullExperiencePopup.feature @@ -12,7 +12,6 @@ Feature: Full experience - popup view @LW-3446 Scenario Outline: Popup View - opened - "Expand" button click - Given I disable showing Multidelegation beta banner And I am on popup page When I click on "Expand" button Then the page is displayed on a new tab in extended view diff --git a/packages/e2e-tests/src/features/MultiDelegationPageExtended.feature b/packages/e2e-tests/src/features/MultiDelegationPageExtended.feature index ca562f657..1b571b3a7 100644 --- a/packages/e2e-tests/src/features/MultiDelegationPageExtended.feature +++ b/packages/e2e-tests/src/features/MultiDelegationPageExtended.feature @@ -7,7 +7,6 @@ Feature: Staking Page - Extended View @LW-8931 @Testnet Scenario: Extended View - Start Staking component Given I save token: "Cardano" balance - And I disable showing Multidelegation beta banner When I navigate to Staking extended page Then I see Start Staking page in extended mode @@ -23,14 +22,12 @@ Feature: Staking Page - Extended View @LW-8449 @Testnet @Mainnet Scenario: Extended View - Staking search control is displayed with appropriate content - Given I disable showing Multidelegation beta banner When I navigate to Staking extended page And I click Browse pools tab Then I see the stake pool search control with appropriate content @LW-8448 @Testnet Scenario Outline: Extended View - Stake pool search for "" returns the expected number of results with appropriate content - Given I disable showing Multidelegation beta banner When I navigate to Staking extended page And I click Browse pools tab And I input "" into stake pool search bar @@ -49,7 +46,6 @@ Feature: Staking Page - Extended View @LW-8448 @Mainnet Scenario Outline: Extended View - Stake pool search for "" returns the expected number of results with appropriate content - Given I disable showing Multidelegation beta banner When I navigate to Staking extended page And I click Browse pools tab And I input "" into stake pool search bar @@ -69,12 +65,10 @@ Feature: Staking Page - Extended View @LW-8466 @Testnet @Mainnet Scenario: Extended View - "About staking" widget Given I am on Staking extended page - And I close Multi-delegation beta modal Then I see "About staking" widget with all relevant items @LW-8465 @Testnet @Mainnet Scenario Outline: Extended View - "About staking" widget item click - - Given I disable showing Multidelegation beta banner And I am on Staking extended page When I click on a widget item with subtitle: "" Then I see a "" article with title "" @@ -87,13 +81,11 @@ Feature: Staking Page - Extended View @LW-8469 @Testnet @Mainnet Scenario: Extended View - Network info component is present with expected content - Given I disable showing Multidelegation beta banner When I navigate to Staking extended page Then I see the Network Info component with the expected content @LW-8499 @Testnet @Mainnet Scenario Outline: Extended View - Staking - Show tooltip for column names in browse pools section - Given I disable showing Multidelegation beta banner When I navigate to Staking extended page And I click Browse pools tab When I hover over "" column name in stake pool list @@ -105,7 +97,6 @@ Feature: Staking Page - Extended View @LW-8637 @Testnet @Mainnet Scenario: Extended View - Staking password screen details - Given I disable showing Multidelegation beta banner When I navigate to Staking extended page And I click Overview tab And I click Browse pools tab @@ -118,7 +109,6 @@ Feature: Staking Page - Extended View @LW-8445 @Testnet Scenario: Extended View - Selecting stakepool from list opens drawer with appropriate details - Given I disable showing Multidelegation beta banner And I am on Staking extended page And I click Browse pools tab And I input "ADA Capital" into stake pool search bar @@ -127,7 +117,6 @@ Feature: Staking Page - Extended View @LW-8438 @Testnet Scenario: Extended View - Staking - Stakepool details drawer - Close drawer - Given I disable showing Multidelegation beta banner And I am on Staking extended page And I click Browse pools tab And I input "ADA Capital" into stake pool search bar @@ -137,7 +126,6 @@ Feature: Staking Page - Extended View @LW-8463 @Testnet @Mainnet Scenario: Extended View - Stake pool list item - Given I disable showing Multidelegation beta banner And I am on Staking extended page And I click Browse pools tab And I wait for stake pool list to be populated diff --git a/packages/e2e-tests/src/features/MultiDelegationPagePopup.feature b/packages/e2e-tests/src/features/MultiDelegationPagePopup.feature index da12730b1..f0810fafb 100644 --- a/packages/e2e-tests/src/features/MultiDelegationPagePopup.feature +++ b/packages/e2e-tests/src/features/MultiDelegationPagePopup.feature @@ -7,7 +7,6 @@ Feature: Staking Page - Popup View @LW-8933 @Testnet Scenario: Popup View - Start Staking component Given I save token: "Cardano" balance - And I disable showing Multidelegation beta banner When I navigate to Staking popup page Then I see Start Staking page in popup mode diff --git a/packages/e2e-tests/src/features/MultidelegationDelegatedFundsExtended.feature b/packages/e2e-tests/src/features/MultidelegationDelegatedFundsExtended.feature index 422a2d405..000d5aba0 100644 --- a/packages/e2e-tests/src/features/MultidelegationDelegatedFundsExtended.feature +++ b/packages/e2e-tests/src/features/MultidelegationDelegatedFundsExtended.feature @@ -6,7 +6,6 @@ Feature: Staking Page - Extended View @LW-8436 @LW-8439 @LW-8440 @LW-8598 Scenario Outline: Extended View - Staking - Close drawer - Given I disable showing Multidelegation beta banner When I navigate to Staking extended page And I click Browse pools tab And I pick "1" pools for delegation from browse pools view: "ADA Capital" @@ -28,7 +27,6 @@ Feature: Staking Page - Extended View @LW-8450 Scenario Outline: Extended View - Staking - Hover over currently staking element: - Given I disable showing Multidelegation beta banner And I navigate to Staking extended page When I hover over in currently staking component Then I see tooltip for element in currently staking component diff --git a/packages/e2e-tests/src/features/MultidelegationDelegatedFundsPopup.feature b/packages/e2e-tests/src/features/MultidelegationDelegatedFundsPopup.feature index a397fdee1..a138ee1ae 100644 --- a/packages/e2e-tests/src/features/MultidelegationDelegatedFundsPopup.feature +++ b/packages/e2e-tests/src/features/MultidelegationDelegatedFundsPopup.feature @@ -7,15 +7,14 @@ Feature: Staking Page - Popup View @LW-8330 Scenario Outline: Popup View - Delegation card displays correct data Given I open wallet: "" in: popup mode - And I disable showing Multidelegation beta banner And I disable showing Multidelegation persistence banner When I navigate to Staking popup page Then I see Delegation title displayed for multidelegation And I see Delegation card displaying correct data Examples: - | walletName | - | MultidelegationDelegatedSingle | - | MultidelegationDelegatedMulti | + | walletName | + | MultidelegationDelegatedSingle | + | MultidelegationDelegatedMulti | @LW-8338 Scenario Outline: Popup View - Delegated pools cards are present @@ -31,9 +30,7 @@ Feature: Staking Page - Popup View @LW-8480 Scenario Outline: Popup View - Staking - Hover over currently staking element: - Given Lace is ready for test - And I disable showing Multidelegation beta banner - And I navigate to Staking popup page + Given I navigate to Staking popup page When I hover over in currently staking component Then I see tooltip for element in currently staking component Examples: diff --git a/packages/e2e-tests/src/features/NavigationMainExtended.feature b/packages/e2e-tests/src/features/NavigationMainExtended.feature index a12cae4da..d9d7cd27e 100644 --- a/packages/e2e-tests/src/features/NavigationMainExtended.feature +++ b/packages/e2e-tests/src/features/NavigationMainExtended.feature @@ -3,7 +3,6 @@ Feature: Main Navigation - Extended view Background: Given Lace is ready for test - And I disable showing Multidelegation beta banner @LW-2692 @Smoke Scenario: Extended view - Main navigation is displayed with all items @@ -38,13 +37,13 @@ Feature: Main Navigation - Extended view When I click on the logo icon Then I see Tokens counter with total number of tokens displayed Examples: - | section | validateIfSectionIsDisplayed | - | Tokens | I see Tokens counter with total number of tokens displayed | - | NFTs | I see NFTs counter with total number of NFTs displayed | - | Transactions | Transactions section is displayed | - | Staking | I see Delegation title displayed for multidelegation | - | Settings | I see settings page | - | Address Book | I see address book title | + | section | validateIfSectionIsDisplayed | + | Tokens | I see Tokens counter with total number of tokens displayed | + | NFTs | I see NFTs counter with total number of NFTs displayed | + | Transactions | Transactions section is displayed | + | Staking | I see Delegation title displayed for multidelegation | + | Settings | I see settings page | + | Address Book | I see address book title | @LW-6662 Scenario Outline: Extended view - Main Navigation - Right side panel not displayed in
section diff --git a/packages/e2e-tests/src/features/NavigationMainPopup.feature b/packages/e2e-tests/src/features/NavigationMainPopup.feature index 9aba459aa..86acaab89 100644 --- a/packages/e2e-tests/src/features/NavigationMainPopup.feature +++ b/packages/e2e-tests/src/features/NavigationMainPopup.feature @@ -32,7 +32,6 @@ Feature: Main Navigation - Popup View @LW-2610 Scenario Outline: Extended view - Click Lace logo -
And Wallet is synced - And I disable showing Multidelegation beta banner And I navigate to
popup page And When I click on the logo icon diff --git a/packages/e2e-tests/src/features/analytics/AnalyticsSendExtended.feature b/packages/e2e-tests/src/features/analytics/AnalyticsSendExtended.feature index f159bf2ea..4a7edbc96 100644 --- a/packages/e2e-tests/src/features/analytics/AnalyticsSendExtended.feature +++ b/packages/e2e-tests/src/features/analytics/AnalyticsSendExtended.feature @@ -15,6 +15,7 @@ Feature: Analytics - Posthog - Sending - Extended View | ADA | Cardano | tADA | 1.1234 | When I click "Add bundle" button on "Send" page And I enter "$test_handle_1" in the bundle 2 recipient's address + And Green tick icon is displayed next to ADA handle And I enter a value of: 1 to the "tADA" asset in bundle 2 And I click "Review transaction" button on "Send" page Then I validate latest analytics single event "send | transaction data | review transaction | click" @@ -29,7 +30,7 @@ Feature: Analytics - Posthog - Sending - Extended View And I click "View transaction" button on submitted transaction page And Local storage unconfirmedTransaction contains tx with type: "internal" And I validate latest analytics single event "send | all done | view transaction | click" - When the Sent transaction is displayed with value: "1.12 tADA" and tokens count 1 + When the Sent transaction is displayed with value: "2.12 tADA" and tokens count 1 Then I validate latest analytics single event "send | transaction confirmed" And I validate that the "send | transaction confirmed" event includes property "tx_creation_type" with value "internal" in posthog And I validate that 7 analytics event(s) have been sent diff --git a/packages/e2e-tests/src/features/e2e/MultidelegationSwitchingPoolsExtendedE2E.feature b/packages/e2e-tests/src/features/e2e/MultidelegationSwitchingPoolsExtendedE2E.feature index e30451b57..f441fc755 100644 --- a/packages/e2e-tests/src/features/e2e/MultidelegationSwitchingPoolsExtendedE2E.feature +++ b/packages/e2e-tests/src/features/e2e/MultidelegationSwitchingPoolsExtendedE2E.feature @@ -3,7 +3,6 @@ Feature: Staking Page - Switching pools - Extended Browser View - E2E Background: Given Wallet is synced - And I disable showing Multidelegation beta banner And I navigate to Staking extended page @LW-7819 @Testnet @Pending diff --git a/packages/e2e-tests/src/hooks/beforeTagHooks.ts b/packages/e2e-tests/src/hooks/beforeTagHooks.ts index b58e8583e..760d72fdd 100644 --- a/packages/e2e-tests/src/hooks/beforeTagHooks.ts +++ b/packages/e2e-tests/src/hooks/beforeTagHooks.ts @@ -30,22 +30,31 @@ Before( { tags: '@AddressBook-extended or @Transactions-Extended or @Tokens-extended or @Staking-Extended or @LockWallet-extended or @Top-Navigation-Extended or @NFTs-Extended or @NFT-Folders-Extended or @SendTx-Bundles-Extended or @SendTx-Simple-Extended or @MainNavigation-Extended or @Send-Transaction-Metadata-Extended or @Settings-Extended or @DAppConnector or @DAppConnector-Extended' }, - async () => await extendedViewWalletInitialization() + async () => { + await extendedViewWalletInitialization(); + await localStorageInitializer.disableShowingMultidelegationBetaBanner(); + } ); Before( { tags: '@Tokens-popup or @Transactions-Popup or @Staking-Popup or @LockWallet-popup or @Top-Navigation-Popup or @AddressBook-popup or @Common-Popup or @SendTx-Simple-Popup or @MainNavigation-Popup or @Settings-Popup or @NFTs-Popup or @NFT-Folders-Popup or @Send-Transaction-Metadata-Popup or @ForgotPassword or @DAppConnector-Popup' }, - async () => await popupViewWalletInitialization() + async () => { + await popupViewWalletInitialization(); + await localStorageInitializer.disableShowingMultidelegationBetaBanner(); + } ); -Before( - { tags: '@EmptyStates-Extended' }, - async () => await extendedViewWalletInitialization(TestWalletName.TAWalletNoFunds) -); +Before({ tags: '@EmptyStates-Extended' }, async () => { + await extendedViewWalletInitialization(TestWalletName.TAWalletNoFunds); + await localStorageInitializer.disableShowingMultidelegationBetaBanner(); +}); -Before({ tags: '@EmptyStates-Popup' }, async () => await popupViewWalletInitialization(TestWalletName.TAWalletNoFunds)); +Before({ tags: '@EmptyStates-Popup' }, async () => { + await popupViewWalletInitialization(TestWalletName.TAWalletNoFunds); + await localStorageInitializer.disableShowingMultidelegationBetaBanner(); +}); Before( { tags: '@SendTx-MultipleSelection-Popup' }, @@ -104,15 +113,15 @@ Before( async () => await extendedViewWalletInitialization(TestWalletName.TAWalletDelegatedFunds) ); -Before( - { tags: '@Staking-NonDelegatedFunds-Extended' }, - async () => await extendedViewWalletInitialization(TestWalletName.TAWalletNonDelegatedFunds) -); +Before({ tags: '@Staking-NonDelegatedFunds-Extended' }, async () => { + await extendedViewWalletInitialization(TestWalletName.TAWalletNonDelegatedFunds); + await localStorageInitializer.disableShowingMultidelegationBetaBanner(); +}); -Before( - { tags: '@Staking-NonDelegatedFunds-Popup' }, - async () => await popupViewWalletInitialization(TestWalletName.TAWalletNonDelegatedFunds) -); +Before({ tags: '@Staking-NonDelegatedFunds-Popup' }, async () => { + await popupViewWalletInitialization(TestWalletName.TAWalletNonDelegatedFunds); + await localStorageInitializer.disableShowingMultidelegationBetaBanner(); +}); Before( { tags: '@Staking-SwitchingPools-Extended-E2E' }, @@ -126,10 +135,10 @@ Before( Before({ tags: '@AdaHandle-popup' }, async () => await popupViewWalletInitialization(TestWalletName.WalletAdaHandle)); -Before( - { tags: '@Multidelegation-SwitchingPools-Extended-E2E' }, - async () => await extendedViewWalletInitialization(TestWalletName.WalletMultidelegationSwitchPoolsE2E) -); +Before({ tags: '@Multidelegation-SwitchingPools-Extended-E2E' }, async () => { + await extendedViewWalletInitialization(TestWalletName.WalletMultidelegationSwitchPoolsE2E); + await localStorageInitializer.disableShowingMultidelegationBetaBanner(); +}); Before( { tags: '@HdWallet-extended' }, @@ -141,12 +150,12 @@ Before( async () => await extendedViewWalletInitialization(TestWalletName.WalletSendNftHdWalletE2E) ); -Before( - { tags: '@Multidelegation-DelegatedFunds-Popup' }, - async () => await popupViewWalletInitialization(TestWalletName.MultidelegationDelegatedSingle) -); +Before({ tags: '@Multidelegation-DelegatedFunds-Popup' }, async () => { + await popupViewWalletInitialization(TestWalletName.MultidelegationDelegatedSingle); + await localStorageInitializer.disableShowingMultidelegationBetaBanner(); +}); -Before( - { tags: '@Multidelegation-DelegatedFunds-Extended' }, - async () => await extendedViewWalletInitialization(TestWalletName.MultidelegationDelegatedSingle) -); +Before({ tags: '@Multidelegation-DelegatedFunds-Extended' }, async () => { + await extendedViewWalletInitialization(TestWalletName.MultidelegationDelegatedSingle); + await localStorageInitializer.disableShowingMultidelegationBetaBanner(); +}); diff --git a/packages/e2e-tests/src/pageobject/dAppConnectorPageObject.ts b/packages/e2e-tests/src/pageobject/dAppConnectorPageObject.ts index b451bb89c..fcbdf3c56 100644 --- a/packages/e2e-tests/src/pageobject/dAppConnectorPageObject.ts +++ b/packages/e2e-tests/src/pageobject/dAppConnectorPageObject.ts @@ -96,7 +96,7 @@ class DAppConnectorPageObject { } async saveDappTransactionFeeValue() { - let feeValue = await ConfirmTransactionPage.transactionAmountFee.getText(); + let feeValue = await ConfirmTransactionPage.transactionFeeValueAda.getText(); feeValue = feeValue.replace(' ADA', '').replace('Fee: ', ''); await testContext.save('feeValueDAppTx', feeValue); } diff --git a/packages/e2e-tests/src/utils/networkManager.ts b/packages/e2e-tests/src/utils/networkManager.ts index aa78c6b04..0d3ebcee4 100644 --- a/packages/e2e-tests/src/utils/networkManager.ts +++ b/packages/e2e-tests/src/utils/networkManager.ts @@ -107,7 +107,10 @@ export class NetworkManager { const approximateTimestamp = new Date().toString(); const combinedFailedRequestInfo = `URL:\n${request.response.url}\n\nRESPONSE CODE:\n${request.response.status}\n\nAPPROXIMATE TIME:\n${approximateTimestamp}\n\nRESPONSE BODY:\n${responseBody}\n\nREQUEST PAYLOAD:\n${requestPayload}`; allure.addAttachment('Failed request', combinedFailedRequestInfo, 'text/plain'); - console.error('Failed request', combinedFailedRequestInfo); + console.error( + 'Failed request', + `URL: ${request.response.url} | RESPONSE CODE: ${request.response.status}` + ); } }); }); @@ -125,8 +128,8 @@ export class NetworkManager { let postData = ''; try { postData = JSON.stringify(await client.send('Network.getRequestPostData', { requestId })); - } catch (error) { - Logger.warn(`${error}`); + } catch { + /* empty */ } return postData; }; diff --git a/packages/e2e-tests/src/utils/utils.ts b/packages/e2e-tests/src/utils/utils.ts index 78dcd470b..52f00d497 100644 --- a/packages/e2e-tests/src/utils/utils.ts +++ b/packages/e2e-tests/src/utils/utils.ts @@ -42,7 +42,6 @@ class ExtensionUtils { break; } } - Logger.log(`Using network: ${network} with id: ${id}`); return { name: network, id }; } diff --git a/packages/e2e-tests/wdio.conf.base.ts b/packages/e2e-tests/wdio.conf.base.ts index 65cd4f434..572e84010 100755 --- a/packages/e2e-tests/wdio.conf.base.ts +++ b/packages/e2e-tests/wdio.conf.base.ts @@ -22,7 +22,12 @@ export const config: WebdriverIO.Config = { connectionRetryCount: 3, framework: 'cucumber', reporters: [ - 'spec', + [ + 'spec', + { + realtimeReporting: true + } + ], [ 'allure', { diff --git a/packages/staking/package.json b/packages/staking/package.json index 4d44c0062..bc2f8734e 100644 --- a/packages/staking/package.json +++ b/packages/staking/package.json @@ -59,11 +59,14 @@ "i18next": "^22.5.1", "immer": "^10.0.2", "lodash": "4.17.21", + "rambda": "^8.5.0", "react-copy-to-clipboard": "^5.1.0", "react-i18next": "^12.3.1", + "recharts": "^2.9.2", "zustand": "^4.4.1" }, "devDependencies": { + "@cardano-sdk/core": "0.21.0", "@cardano-sdk/input-selection": "0.12.4", "@cardano-sdk/tx-construction": "0.14.2", "@cardano-sdk/util": "0.14.2", diff --git a/packages/staking/src/features/BrowsePools/StakePoolsTable/StakePoolsTable.tsx b/packages/staking/src/features/BrowsePools/StakePoolsTable/StakePoolsTable.tsx index 610ceee53..5d30e2bcf 100644 --- a/packages/staking/src/features/BrowsePools/StakePoolsTable/StakePoolsTable.tsx +++ b/packages/staking/src/features/BrowsePools/StakePoolsTable/StakePoolsTable.tsx @@ -2,6 +2,7 @@ import { Wallet } from '@lace/cardano'; import { PostHogAction, Search, getRandomIcon } from '@lace/common'; import { Box } from '@lace/ui'; import debounce from 'lodash/debounce'; +import uniqBy from 'lodash/uniqBy'; import { useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { StateStatus, useOutsideHandles } from '../../outside-handles-provider'; @@ -92,13 +93,26 @@ export const StakePoolsTable = ({ scrollableTargetId }: StakePoolsTableProps) => setSearchValue(searchString); }; + // imitates apps/browser-extension-wallet/src/stores/slices/stake-pool-search-slice.ts + const naiveSelectedPoolsSearch = (searchString: string, pools: Wallet.Cardano.StakePool[]) => { + const lowerCaseSearchString = searchString.toLowerCase(); + return pools.filter( + (pool) => + pool.metadata?.name.toLowerCase().includes(lowerCaseSearchString) || + pool.metadata?.ticker.toLowerCase().includes(lowerCaseSearchString) || + pool.id.toLowerCase() === lowerCaseSearchString + ); + }; + const combinedUnique = useMemo(() => { - const combinedStakePools = [...selectedPortfolioStakePools, ...stakePools]; - const combinedUniqueIds = [...new Set(combinedStakePools.map((pool) => pool.id))]; - return combinedUniqueIds.map((id) => - combinedStakePools.find((pool) => pool.id === id) - ) as Wallet.Cardano.StakePool[]; - }, [stakePools, selectedPortfolioStakePools]); + const combinedStakePools = [ + ...(searchValue + ? naiveSelectedPoolsSearch(searchValue, selectedPortfolioStakePools) + : selectedPortfolioStakePools), + ...stakePools, + ]; + return uniqBy(combinedStakePools, (p) => p.id); + }, [stakePools, selectedPortfolioStakePools, searchValue]); const list = useMemo( () => diff --git a/packages/staking/src/features/Drawer/StakePoolDetail.tsx b/packages/staking/src/features/Drawer/StakePoolDetail.tsx index 53ef0295c..7582ca944 100644 --- a/packages/staking/src/features/Drawer/StakePoolDetail.tsx +++ b/packages/staking/src/features/Drawer/StakePoolDetail.tsx @@ -209,6 +209,12 @@ const makeActionButtons = ( ): ActionButtonSpec[] => ( [ + manageDelegation && { + callback: tmpNoop, + dataTestId: 'stake-pool-details-manage-delegation-btn', + label: t('drawer.details.manageDelegation'), + ...getSpecOverride(manageDelegation), + }, stakeOnThisPool && { callback: tmpNoop, dataTestId: 'stake-pool-details-stake-btn', @@ -233,12 +239,6 @@ const makeActionButtons = ( label: t('drawer.details.unselectPool'), ...getSpecOverride(unselectPool), }, - manageDelegation && { - callback: tmpNoop, - dataTestId: 'stake-pool-details-manage-delegation-btn', - label: t('drawer.details.manageDelegation'), - ...getSpecOverride(manageDelegation), - }, ] as (ActionButtonSpec | false)[] ).filter(Boolean) as ActionButtonSpec[]; @@ -291,13 +291,19 @@ export const StakePoolDetailFooter = ({ popupView }: StakePoolDetailFooterProps) }); }, [viewedStakePool, analytics, portfolioMutators]); + const onManageDelegationClick = useCallback(() => { + if (!viewedStakePool) return; + analytics.sendEventToPostHog(PostHogAction.StakingBrowsePoolsStakePoolDetailManageDelegation); + portfolioMutators.executeCommand({ + type: 'ManageDelegationFromDetails', + }); + }, [viewedStakePool, analytics, portfolioMutators]); + const actionButtons = useMemo( () => makeActionButtons(t, { addStakingPool: ableToSelect && !selectionsEmpty && { callback: onSelectClick }, - // TODO: disabling this button for now - // eslint-disable-next-line sonarjs/no-redundant-boolean - manageDelegation: false && poolInCurrentPortfolio, + manageDelegation: poolInCurrentPortfolio && { callback: onManageDelegationClick }, selectForMultiStaking: ableToSelect && selectionsEmpty && { callback: onSelectClick }, stakeOnThisPool: selectionsEmpty && ableToStakeOnlyOnThisPool && { callback: onStakeOnThisPool }, unselectPool: poolSelected && { callback: onUnselectClick }, @@ -306,6 +312,7 @@ export const StakePoolDetailFooter = ({ popupView }: StakePoolDetailFooterProps) t, ableToSelect, selectionsEmpty, + onManageDelegationClick, onSelectClick, poolInCurrentPortfolio, ableToStakeOnlyOnThisPool, diff --git a/packages/staking/src/features/Drawer/StakePoolDetailsDrawer.tsx b/packages/staking/src/features/Drawer/StakePoolDetailsDrawer.tsx index 6675b0c91..3e0c481dc 100644 --- a/packages/staking/src/features/Drawer/StakePoolDetailsDrawer.tsx +++ b/packages/staking/src/features/Drawer/StakePoolDetailsDrawer.tsx @@ -72,17 +72,20 @@ export const StakePoolDetailsDrawer = ({ }); }, [password, portfolioMutators, backgroundServiceAPIContextSetWalletPassword, removePassword]); + const shouldShowBackIcon = + activeDrawerStep && typeof showBackIcon === 'function' ? showBackIcon(activeDrawerStep) : showBackIcon; + useKeyboardShortcut(['Escape'], () => { - if (activeDrawerStep && typeof showBackIcon === 'function' ? showBackIcon(activeDrawerStep) : showBackIcon) { + if (shouldShowBackIcon) { onGoBack(); } else { closeDrawer(); } }); - const createArrowIconCallback = () => { - if (activeDrawerStep && typeof showBackIcon === 'function' ? showBackIcon(activeDrawerStep) : showBackIcon) { - return popupView ? closeDrawer : onGoBack; + const arrowIconCallback = () => { + if (shouldShowBackIcon) { + return popupView ? closeDrawer() : onGoBack(); } // eslint-disable-next-line consistent-return, unicorn/no-useless-undefined return undefined; @@ -97,10 +100,14 @@ export const StakePoolDetailsDrawer = ({ { - onBackButtonClick?.(); - createArrowIconCallback(); - }} + onArrowIconClick={ + !shouldShowBackIcon + ? undefined + : () => { + onBackButtonClick?.(); + arrowIconCallback(); + } + } onCloseIconClick={() => { if ( activeDrawerStep && typeof showCloseIcon === 'function' ? showCloseIcon(activeDrawerStep) : showCloseIcon diff --git a/packages/staking/src/features/Drawer/TransactionFail.tsx b/packages/staking/src/features/Drawer/TransactionFail.tsx index 149b5d847..369f861b5 100644 --- a/packages/staking/src/features/Drawer/TransactionFail.tsx +++ b/packages/staking/src/features/Drawer/TransactionFail.tsx @@ -99,8 +99,8 @@ export const TransactionFailFooter = ({ popupView }: TransactionFailProps): Reac ) : (