* Bump deps

* Adjust withTranslation usage

* Omit<T, 't'>

* Adjust translate Props

* Adjust straglers
This commit is contained in:
Jaco 2023-08-23 14:36:40 +03:00 committed by GitHub
parent 3712d4e9a1
commit bb75a7b27f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 493 additions and 654 deletions

View File

@ -69,7 +69,7 @@
"devDependencies": {
"@crustio/crust-pin": "^1.0.0",
"@pinata/sdk": "^1.2.1",
"@polkadot/dev": "^0.76.17",
"@polkadot/dev": "^0.76.18",
"@types/chart.js": "^2.9.37",
"@types/file-saver": "^2.0.5",
"@types/react-beautiful-dnd": "^13.1.4",
@ -77,14 +77,14 @@
"@types/react-dom": "^18.2.7",
"@types/react-router-dom": "^5.3.3",
"@types/store": "^2.0.2",
"concurrently": "^8.2.0",
"concurrently": "^8.2.1",
"devtron": "^1.4.0",
"dnslink-cloudflare": "^3.0.0",
"electron": "25.0.1",
"electron-builder": "23.6.0",
"electron-builder-notarize": "^1.5.1",
"extensionless": "^1.4.5",
"i18next-scanner": "^4.2.0",
"i18next-scanner": "^4.3.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-is": "^18.2.0",
@ -96,9 +96,9 @@
"@polkadot/api-base": "^10.9.1",
"@polkadot/api-contract": "^10.9.1",
"@polkadot/api-derive": "^10.9.1",
"@polkadot/hw-ledger": "^12.4.1",
"@polkadot/keyring": "^12.4.1",
"@polkadot/networks": "^12.4.1",
"@polkadot/hw-ledger": "^12.4.2",
"@polkadot/keyring": "^12.4.2",
"@polkadot/networks": "^12.4.2",
"@polkadot/phishing": "^0.21.5",
"@polkadot/rpc-augment": "^10.9.1",
"@polkadot/rpc-core": "^10.9.1",
@ -109,16 +109,16 @@
"@polkadot/types-create": "^10.9.1",
"@polkadot/types-known": "^10.9.1",
"@polkadot/types-support": "^10.9.1",
"@polkadot/util": "^12.4.1",
"@polkadot/util-crypto": "^12.4.1",
"@polkadot/util": "^12.4.2",
"@polkadot/util-crypto": "^12.4.2",
"@polkadot/wasm-crypto": "^7.2.2",
"@polkadot/x-bigint": "^12.4.1",
"@polkadot/x-fetch": "^12.4.1",
"@polkadot/x-global": "^12.4.1",
"@polkadot/x-randomvalues": "^12.4.1",
"@polkadot/x-textdecoder": "^12.4.1",
"@polkadot/x-textencoder": "^12.4.1",
"@polkadot/x-ws": "^12.4.1",
"@polkadot/x-bigint": "^12.4.2",
"@polkadot/x-fetch": "^12.4.2",
"@polkadot/x-global": "^12.4.2",
"@polkadot/x-randomvalues": "^12.4.2",
"@polkadot/x-textdecoder": "^12.4.2",
"@polkadot/x-textencoder": "^12.4.2",
"@polkadot/x-ws": "^12.4.2",
"typescript": "^5.1.6"
}
}

View File

@ -38,14 +38,14 @@
"@phala/typedefs": "0.2.33",
"@polkadot/api": "^10.9.1",
"@polkadot/api-derive": "^10.9.1",
"@polkadot/networks": "^12.4.1",
"@polkadot/react-identicon": "^3.6.1",
"@polkadot/networks": "^12.4.2",
"@polkadot/react-identicon": "^3.6.2",
"@polkadot/types": "^10.9.1",
"@polkadot/types-codec": "^10.9.1",
"@polkadot/util": "^12.4.1",
"@polkadot/util": "^12.4.2",
"@polkadot/wasm-util": "^7.2.2",
"@polkadot/x-fetch": "^12.4.1",
"@polkadot/x-ws": "^12.4.1",
"@polkadot/x-fetch": "^12.4.2",
"@polkadot/x-ws": "^12.4.2",
"@polymeshassociation/polymesh-types": "5.5.2",
"@snowfork/snowbridge-types": "0.2.7",
"@sora-substrate/type-definitions": "1.20.1",

View File

@ -22,7 +22,7 @@
"electron-updater": "^5.3.0"
},
"devDependencies": {
"@polkadot/dev": "^0.76.17",
"@polkadot/dev": "^0.76.18",
"@types/tmp": "^0.2.3",
"copy-webpack-plugin": "^11.0.0",
"electron": "25.0.1",

View File

@ -18,7 +18,7 @@
"dependencies": {
"@polkadot/apps-config": "^0.132.2-66-x",
"@polkadot/apps-routing": "^0.132.2-66-x",
"@polkadot/dev": "^0.76.17",
"@polkadot/dev": "^0.76.18",
"@polkadot/react-api": "^0.132.2-66-x",
"@polkadot/react-components": "^0.132.2-66-x",
"@polkadot/react-hooks": "^0.132.2-66-x",

View File

@ -8,6 +8,10 @@ interface TOptions {
replace?: Record<string, unknown>;
}
export function useTranslation (): { t: (key: string, optionsOrText?: string | TOptions, options?: TOptions) => string } {
return useTranslationBase('apps');
interface Translation {
t: (key: string, optionsOrText?: string | TOptions, options?: TOptions) => string
}
export function useTranslation (): Translation {
return useTranslationBase('apps') as unknown as Translation;
}

View File

@ -16,11 +16,11 @@
"type": "module",
"version": "0.132.2-66-x",
"dependencies": {
"@polkadot/hw-ledger": "^12.4.1",
"@polkadot/hw-ledger": "^12.4.2",
"@polkadot/phishing": "^0.21.5",
"@polkadot/react-components": "^0.132.2-66-x",
"@polkadot/react-hooks": "^0.132.2-66-x",
"@polkadot/util": "^12.4.1",
"@polkadot/util": "^12.4.2",
"@polkadot/vanitygen": "^0.55.3",
"detect-browser": "^5.3.0",
"file-saver": "^2.0.5"

View File

@ -1,10 +1,8 @@
// Copyright 2017-2023 @polkadot/app-contracts authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { useTranslation as useTranslationBase, withTranslation } from 'react-i18next';
import { useTranslation as useTranslationBase } from 'react-i18next';
export function useTranslation (): { t: (key: string, options?: { replace: Record<string, unknown> }) => string } {
return useTranslationBase('app-contracts');
}
export default withTranslation(['app-contracts']);

View File

@ -8,6 +8,10 @@ export interface TOptions {
replace?: Record<string, unknown>
}
export function useTranslation (): { t: (key: string, optionsOrText?: string | TOptions, options?: TOptions) => string } {
return useTranslationBase('app-settings');
interface Translation {
t: (key: string, optionsOrText?: string | TOptions, options?: TOptions) => string
}
export function useTranslation (): Translation {
return useTranslationBase('app-settings') as unknown as Translation;
}

View File

@ -8,6 +8,10 @@ interface TOptions {
replace?: Record<string, unknown>;
}
export function useTranslation (): { t: (key: string, optionsOrText?: string | TOptions, options?: TOptions) => string } {
return useTranslationBase('app-utilities');
interface Translation {
t: (key: string, optionsOrText?: string | TOptions, options?: TOptions) => string
}
export function useTranslation (): Translation {
return useTranslationBase('app-utilities') as unknown as Translation;
}

View File

@ -19,27 +19,27 @@
"@fortawesome/fontawesome-svg-core": "^6.4.2",
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"@fortawesome/react-fontawesome": "^0.2.0",
"@polkadot/keyring": "^12.4.1",
"@polkadot/keyring": "^12.4.2",
"@polkadot/react-api": "^0.132.2-66-x",
"@polkadot/react-identicon": "^3.6.1",
"@polkadot/react-qr": "^3.6.1",
"@polkadot/react-identicon": "^3.6.2",
"@polkadot/react-qr": "^3.6.2",
"@polkadot/react-query": "^0.132.2-66-x",
"@polkadot/ui-keyring": "^3.6.1",
"@polkadot/ui-settings": "^3.6.1",
"@polkadot/util": "^12.4.1",
"@polkadot/util-crypto": "^12.4.1",
"@polkadot/ui-keyring": "^3.6.2",
"@polkadot/ui-settings": "^3.6.2",
"@polkadot/util": "^12.4.2",
"@polkadot/util-crypto": "^12.4.2",
"chart.js": "^4.3.3",
"chartjs-plugin-annotation": "^3.0.1",
"chartjs-plugin-crosshair": "^1.2.0",
"codeflask": "^1.4.1",
"i18next": "^22.5.1",
"i18next-browser-languagedetector": "^7.0.2",
"i18next": "^23.4.5",
"i18next-browser-languagedetector": "^7.1.0",
"owasp-password-strength-test": "^1.3.0",
"react-beautiful-dnd": "^13.1.1",
"react-chartjs-2": "^5.2.0",
"react-copy-to-clipboard": "^5.1.0",
"react-dropzone": "^14.2.3",
"react-i18next": "^12.3.1",
"react-i18next": "^13.2.0",
"react-markdown": "^8.0.7",
"react-router": "^6.15.0",
"react-router-dom": "^6.15.0",
@ -55,7 +55,7 @@
"@types/chartjs-plugin-crosshair": "^1.1.1",
"@types/codeflask": "^1.4.3",
"@types/owasp-password-strength-test": "^1.3.0",
"@types/react": "^18.2.20",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7"
},
"peerDependencies": {

View File

@ -71,4 +71,4 @@ class ErrorBoundary extends React.Component<Props> {
}
}
export default translate<React.ComponentType<Props>>(ErrorBoundary);
export default translate<Props>(ErrorBoundary);

View File

@ -1,10 +1,14 @@
// Copyright 2017-2023 @polkadot/react-components authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type React from 'react';
import { useTranslation as useTranslationBase, withTranslation } from 'react-i18next';
export function useTranslation (): { t: (key: string, options?: { replace: Record<string, unknown> }) => string } {
return useTranslationBase('react-components');
}
export default withTranslation(['react-components']);
export default function translate <T, P = Omit<T, 't'>> (C: React.ComponentClass<T>): React.ComponentType<P> {
return withTranslation(['react-components'])(C) as unknown as React.ComponentType<P>;
}

View File

@ -16,8 +16,8 @@
"type": "module",
"version": "0.132.2-66-x",
"dependencies": {
"@polkadot/hw-ledger": "^12.4.1",
"@polkadot/hw-ledger-transports": "^12.4.1",
"@polkadot/hw-ledger": "^12.4.2",
"@polkadot/hw-ledger-transports": "^12.4.2",
"is-ipfs": "^8.0.1"
},
"peerDependencies": {

View File

@ -1,10 +1,8 @@
// Copyright 2017-2023 @polkadot/react-hooks authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { useTranslation as useTranslationBase, withTranslation } from 'react-i18next';
import { useTranslation as useTranslationBase } from 'react-i18next';
export function useTranslation (): { t: (key: string, options?: { replace: Record<string, unknown> }) => string } {
return useTranslationBase('react-hooks');
}
export default withTranslation(['react-hooks']);

View File

@ -161,4 +161,4 @@ class Params extends React.PureComponent<Props, State> {
};
}
export default translate<React.ComponentType<Props>>(Params);
export default translate<Props>(Params);

View File

@ -1,10 +1,14 @@
// Copyright 2017-2023 @polkadot/react-params authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type React from 'react';
import { useTranslation as useTranslationBase, withTranslation } from 'react-i18next';
export function useTranslation (): { t: (key: string, options?: { replace: Record<string, unknown> }) => string } {
return useTranslationBase('react-params');
}
export default withTranslation(['react-params']);
export default function translate <T, P = Omit<T, 't'>> (C: React.ComponentClass<T>): React.ComponentType<P> {
return withTranslation(['react-params'])(C) as unknown as React.ComponentType<P>;
}

View File

@ -1,10 +1,8 @@
// Copyright 2017-2023 @polkadot/react-query authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { useTranslation as useTranslationBase, withTranslation } from 'react-i18next';
import { useTranslation as useTranslationBase } from 'react-i18next';
export function useTranslation (): { t: (key: string, options?: { replace: Record<string, unknown> }) => string } {
return useTranslationBase('react-query');
}
export default withTranslation(['react-query']);

View File

@ -16,7 +16,7 @@
"type": "module",
"version": "0.132.2-66-x",
"dependencies": {
"@polkadot/hw-ledger": "^12.4.1",
"@polkadot/hw-ledger": "^12.4.2",
"@polkadot/react-components": "^0.132.2-66-x"
},
"peerDependencies": {

1019
yarn.lock

File diff suppressed because it is too large Load Diff