diff --git a/package.json b/package.json index 20af9d9190..7e68d6447a 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "devDependencies": { "@crustio/crust-pin": "^1.0.0", "@pinata/sdk": "^1.2.1", - "@polkadot/dev": "^0.73.17", + "@polkadot/dev": "^0.74.1", "@types/chart.js": "^2.9.37", "@types/file-saver": "^2.0.5", "@types/react-beautiful-dnd": "^13.1.4", diff --git a/packages/apps-config/tsconfig.build.json b/packages/apps-config/tsconfig.build.json index da24d9f225..5df00c785e 100644 --- a/packages/apps-config/tsconfig.build.json +++ b/packages/apps-config/tsconfig.build.json @@ -3,7 +3,13 @@ "compilerOptions": { "baseUrl": "..", "outDir": "./build", - "rootDir": "./src" + "rootDir": "./src", + /* Some of our types dependencies are not playing along nicely */ + "verbatimModuleSyntax": false }, + "exclude": [ + "**/build-*", + "**/*.spec.ts" + ], "references": [] } diff --git a/packages/apps-config/tsconfig.spec.json b/packages/apps-config/tsconfig.spec.json new file mode 100644 index 0000000000..cd3d7f37b2 --- /dev/null +++ b/packages/apps-config/tsconfig.spec.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "..", + "outDir": "./build", + "rootDir": "./src", + "emitDeclarationOnly": false, + "noEmit": true + }, + "include": [ + "**/*.spec.ts" + ], + "references": [ + { "path": "../apps-config/tsconfig.build.json" } + ] +} diff --git a/packages/apps-electron/package.json b/packages/apps-electron/package.json index 4afaa89e42..7b28f70527 100644 --- a/packages/apps-electron/package.json +++ b/packages/apps-electron/package.json @@ -15,7 +15,7 @@ "sideEffects": false, "version": "0.130.2-13-x", "dependencies": { - "@polkadot/dev": "^0.73.17", + "@polkadot/dev": "^0.74.1", "@polkadot/react-components": "^0.130.2-13-x", "electron-log": "^5.0.0-beta.23", "electron-updater": "^5.3.0", diff --git a/packages/apps-electron/tsconfig.build.json b/packages/apps-electron/tsconfig.build.json index fc725e563d..0e0dd03ed0 100644 --- a/packages/apps-electron/tsconfig.build.json +++ b/packages/apps-electron/tsconfig.build.json @@ -7,5 +7,12 @@ /* Since this is a forced-by-electron-CJS-module, we have to switch this off */ "verbatimModuleSyntax": false }, - "references": [] + "exclude": [ + "webpack.*.cjs" + ], + "references": [ + { "path": "../apps/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/apps-routing/tsconfig.build.json b/packages/apps-routing/tsconfig.build.json index da24d9f225..e539ac5a02 100644 --- a/packages/apps-routing/tsconfig.build.json +++ b/packages/apps-routing/tsconfig.build.json @@ -5,5 +5,47 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../page-accounts/tsconfig.build.json" }, + { "path": "../page-addresses/tsconfig.build.json" }, + { "path": "../page-alliance/tsconfig.build.json" }, + { "path": "../page-assets/tsconfig.build.json" }, + { "path": "../page-bounties/tsconfig.build.json" }, + { "path": "../page-calendar/tsconfig.build.json" }, + { "path": "../page-claims/tsconfig.build.json" }, + { "path": "../page-collator/tsconfig.build.json" }, + { "path": "../page-contracts/tsconfig.build.json" }, + { "path": "../page-council/tsconfig.build.json" }, + { "path": "../page-democracy/tsconfig.build.json" }, + { "path": "../page-explorer/tsconfig.build.json" }, + { "path": "../page-extrinsics/tsconfig.build.json" }, + { "path": "../page-fellowship/tsconfig.build.json" }, + { "path": "../page-files/tsconfig.build.json" }, + { "path": "../page-gilt/tsconfig.build.json" }, + { "path": "../page-js/tsconfig.build.json" }, + { "path": "../page-membership/tsconfig.build.json" }, + { "path": "../page-nfts/tsconfig.build.json" }, + { "path": "../page-nis/tsconfig.build.json" }, + { "path": "../page-parachains/tsconfig.build.json" }, + { "path": "../page-poll/tsconfig.build.json" }, + { "path": "../page-preimages/tsconfig.build.json" }, + { "path": "../page-ranked/tsconfig.build.json" }, + { "path": "../page-referenda/tsconfig.build.json" }, + { "path": "../page-rpc/tsconfig.build.json" }, + { "path": "../page-runtime/tsconfig.build.json" }, + { "path": "../page-scheduler/tsconfig.build.json" }, + { "path": "../page-settings/tsconfig.build.json" }, + { "path": "../page-signing/tsconfig.build.json" }, + { "path": "../page-society/tsconfig.build.json" }, + { "path": "../page-staking/tsconfig.build.json" }, + { "path": "../page-staking2/tsconfig.build.json" }, + { "path": "../page-storage/tsconfig.build.json" }, + { "path": "../page-sudo/tsconfig.build.json" }, + { "path": "../page-tech-comm/tsconfig.build.json" }, + { "path": "../page-treasury/tsconfig.build.json" }, + { "path": "../page-utilities/tsconfig.build.json" }, + { "path": "../page-whitelist/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/apps/package.json b/packages/apps/package.json index 0d06a73458..02609c7a01 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -18,7 +18,7 @@ "dependencies": { "@polkadot/apps-config": "^0.130.2-13-x", "@polkadot/apps-routing": "^0.130.2-13-x", - "@polkadot/dev": "^0.73.17", + "@polkadot/dev": "^0.74.1", "@polkadot/react-api": "^0.130.2-13-x", "@polkadot/react-components": "^0.130.2-13-x", "@polkadot/react-hooks": "^0.130.2-13-x", diff --git a/packages/apps/public/locales/en/app-staking.json b/packages/apps/public/locales/en/app-staking.json index ae34f04f6f..6617ac4e0e 100644 --- a/packages/apps/public/locales/en/app-staking.json +++ b/packages/apps/public/locales/en/app-staking.json @@ -14,7 +14,6 @@ "Aura": "Aura", "Babe": "Babe", "Bags": "Bags", - "Blocks nominations": "Blocks nominations", "Bond": "Bond", "Bond & Nominate": "Bond & Nominate", "Bond & Validate": "Bond & Validate", @@ -29,10 +28,8 @@ "Change reward destination": "Change reward destination", "Change session keys": "Change session keys", "Change validator preferences": "Change validator preferences", - "Chilled": "Chilled", "Controller account": "Controller account", "Distinct stash and controller accounts are recommended to ensure fund security. You will be allowed to make the transaction, but take care to not tie up all funds, only use a portion of the available funds during this period.": "Distinct stash and controller accounts are recommended to ensure fund security. You will be allowed to make the transaction, but take care to not tie up all funds, only use a portion of the available funds during this period.", - "Era points": "Era points", "For fund security, your session key should not match your stash key.": "For fund security, your session key should not match your stash key.", "Free balance": "Free balance", "Grandpa": "Grandpa", @@ -47,7 +44,6 @@ "Most profitable": "Most profitable", "Move up {{jumpCount}}": "Move up {{jumpCount}}", "My bags": "My bags", - "Next session": "Next session", "No active validators found": "No active validators found", "No active validators to check": "No active validators to check", "No available bags": "No available bags", @@ -60,7 +56,6 @@ "Nominate Validators": "Nominate Validators", "Nominate selected": "Nominate selected", "Nominate validators": "Nominate validators", - "Nominating": "Nominating", "Nominations ({{count}})": "Nominations ({{count}})", "Nominator": "Nominator", "Nominators": "Nominators", @@ -71,13 +66,10 @@ "Once transmitted the new selection will only take effect in 2 eras since the selection criteria for the next era was done at the end of the previous era. Until then, the nominations will show as inactive.": "Once transmitted the new selection will only take effect in 2 eras since the selection criteria for the next era was done at the end of the previous era. Until then, the nominations will show as inactive.", "Once transmitted the new selection will only take effect in 2 eras taking the new validator election cycle into account. Until then, the nominations will show as inactive.": "Once transmitted the new selection will only take effect in 2 eras taking the new validator election cycle into account. Until then, the nominations will show as inactive.", "One of your available nomination accounts, keyed by the stash. The transaction will be sent from the controller.": "One of your available nomination accounts, keyed by the stash. The transaction will be sent from the controller.", - "Online message": "Online message", - "Oversubscribed": "Oversubscribed", "Oversubscribed nominations ({{count}})": "Oversubscribed nominations ({{count}})", "Overview": "Overview", "Own stashes": "Own stashes", "Own validators": "Own validators", - "Para validator": "Para validator", "Parachains": "Parachains", "Payout": "Payout", "Payout all": "Payout all", @@ -89,7 +81,6 @@ "Pools": "Pools", "Preparing target display": "Preparing target display", "Preparing validator list": "Preparing validator list", - "Produced blocks": "Produced blocks", "Rebag": "Rebag", "Rebag dislocated entries": "Rebag dislocated entries", "Rebag {{count}}": "Rebag {{count}}", @@ -115,7 +106,6 @@ "Setup Nominator {{step}}/{{NUM_STEPS}}": "Setup Nominator {{step}}/{{NUM_STEPS}}", "Setup Validator {{step}}/{{NUM_STEPS}}": "Setup Validator {{step}}/{{NUM_STEPS}}", "Since this transaction deals with funding, the stash account will be used.": "Since this transaction deals with funding, the stash account will be used.", - "Slashed": "Slashed", "Slashed in era {{eras}}": "Slashed in era {{eras}}", "Slashes": "Slashes", "Specified payment account": "Specified payment account", diff --git a/packages/apps/public/locales/en/app-staking2.json b/packages/apps/public/locales/en/app-staking2.json index d432e8cfe4..55efc4fe44 100644 --- a/packages/apps/public/locales/en/app-staking2.json +++ b/packages/apps/public/locales/en/app-staking2.json @@ -2,22 +2,32 @@ "Active": "Active", "Add pool": "Add pool", "All pools": "All pools", + "Blocks nominations": "Blocks nominations", + "Chilled": "Chilled", "Create": "Create", "Create nomination pool": "Create nomination pool", + "Era points": "Era points", "Join": "Join", "Join nomination pool": "Join nomination pool", "Members ({{count}})": "Members ({{count}})", + "Next session": "Next session", "No available nomination pools": "No available nomination pools", "No members": "No members", "No nominees": "No nominees", "No session validators found": "No session validators found", "No waiting validators found": "No waiting validators found", + "Nominating": "Nominating", "Nominees ({{count}})": "Nominees ({{count}})", + "Online message": "Online message", + "Oversubscribed": "Oversubscribed", "Own pools": "Own pools", + "Para validator": "Para validator", "Pools": "Pools", + "Produced blocks": "Produced blocks", "Retrieving nomination pools": "Retrieving nomination pools", "Retrieving session validators": "Retrieving session validators", "Retrieving waiting validators": "Retrieving waiting validators", + "Slashed": "Slashed", "The account that will join the pool.": "The account that will join the pool.", "The id that will be assigned to this nomination pool.": "The id that will be assigned to this nomination pool.", "The initial value to assign to the pool. It is set to the maximum of the minimum bond and the minium nomination value.": "The initial value to assign to the pool. It is set to the maximum of the minimum bond and the minium nomination value.", diff --git a/packages/apps/public/locales/en/react-components.json b/packages/apps/public/locales/en/react-components.json index 958b6c3d56..cbbb53db4e 100644 --- a/packages/apps/public/locales/en/react-components.json +++ b/packages/apps/public/locales/en/react-components.json @@ -20,7 +20,6 @@ "Judge": "Judge", "Make Transfer": "Make Transfer", "Multisig": "Multisig", - "No execution details available for this proposal": "No execution details available for this proposal", "No identity associated with account": "No identity associated with account", "No judgements": "No judgements", "Nominator": "Nominator", @@ -72,21 +71,18 @@ "click to select or drag and drop the file here": "click to select or drag and drop the file here", "clipboard": "clipboard", "commission": "commission", - "contract event": "contract event", "democracy": "democracy", "discord": "discord", "email": "email", "everything": "everything", "existential deposit": "existential deposit", "external links": "external links", - "extrinsic hash": "extrinsic hash", "filter by name, address, or account index": "filter by name, address, or account index", "identity": "identity", "identity hash": "identity hash", "index": "index", "invalid/unknown registrar account": "invalid/unknown registrar account", "judgement": "judgement", - "lifetime": "lifetime", "link": "link", "lock expired": "lock expired", "locked": "locked", @@ -97,7 +93,6 @@ "only this network": "only this network", "parent": "parent", "per block": "per block", - "preimage": "preimage", "proposed by": "proposed by", "redeemable": "redeemable", "referenda": "referenda", @@ -110,11 +105,9 @@ "session keys": "session keys", "session next": "session next", "signatories": "signatories", - "signature {{type}}": "signature {{type}}", "strong": "strong", "subs": "subs", "threshold": "threshold", - "tip": "tip", "total": "total", "transactions": "transactions", "transferrable": "transferrable", diff --git a/packages/apps/public/locales/en/react-params.json b/packages/apps/public/locales/en/react-params.json index b4cd945852..02ba54b7a1 100644 --- a/packages/apps/public/locales/en/react-params.json +++ b/packages/apps/public/locales/en/react-params.json @@ -11,17 +11,24 @@ "Locked6x": "Locked6x", "Nay": "Nay", "No": "No", + "No execution details available for this proposal": "No execution details available for this proposal", "None": "None", "Remove item": "Remove item", "Yes": "Yes", "aye: bool": "aye: bool", "call hash / {{section}}.{{method}}": "call hash / {{section}}.{{method}}", "click to select or drag and drop JSON key/value (hex-encoded) file": "click to select or drag and drop JSON key/value (hex-encoded) file", + "contract event": "contract event", "conviction: Conviction": "conviction: Conviction", "details": "details", + "extrinsic hash": "extrinsic hash", "file upload": "file upload", "hash a file": "hash a file", "include option": "include option", + "lifetime": "lifetime", + "preimage": "preimage", + "signature {{type}}": "signature {{type}}", + "tip": "tip", "type": "type", "{{count}} key/value pairs encoded for submission": "{{count}} key/value pairs encoded for submission" } \ No newline at end of file diff --git a/packages/apps/tsconfig.build.json b/packages/apps/tsconfig.build.json index da24d9f225..5b93239707 100644 --- a/packages/apps/tsconfig.build.json +++ b/packages/apps/tsconfig.build.json @@ -5,5 +5,15 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "exclude": [ + "public/*", + "webpack.*.cjs" + ], + "references": [ + { "path": "../apps-config/tsconfig.build.json" }, + { "path": "../apps-routing/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-signer/tsconfig.build.json" } + ] } diff --git a/packages/page-accounts/src/modals/MultisigApprove.tsx b/packages/page-accounts/src/modals/MultisigApprove.tsx index 1f509a1c78..2ca8db2942 100644 --- a/packages/page-accounts/src/modals/MultisigApprove.tsx +++ b/packages/page-accounts/src/modals/MultisigApprove.tsx @@ -7,8 +7,9 @@ import type { CallFunction } from '@polkadot/types/types'; import React, { useEffect, useMemo, useRef, useState } from 'react'; -import { AddressMini, Call as CallDisplay, Dropdown, Expander, Input, InputAddress, MarkError, Modal, styled, Toggle, TxButton } from '@polkadot/react-components'; +import { AddressMini, Dropdown, Expander, Input, InputAddress, MarkError, Modal, styled, Toggle, TxButton } from '@polkadot/react-components'; import { useAccounts, useApi, useWeight } from '@polkadot/react-hooks'; +import { Call as CallDisplay } from '@polkadot/react-params'; import { assert, isHex } from '@polkadot/util'; import { useTranslation } from '../translate.js'; diff --git a/packages/page-accounts/tsconfig.build.json b/packages/page-accounts/tsconfig.build.json index da24d9f225..6c65650bbd 100644 --- a/packages/page-accounts/tsconfig.build.json +++ b/packages/page-accounts/tsconfig.build.json @@ -5,5 +5,17 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "exclude": [ + "**/*.spec.ts", + "**/*.spec.tsx", + "**/test/**/*" + ], + "references": [ + { "path": "../page-claims/tsconfig.build.json" }, + { "path": "../page-referenda/tsconfig.build.json" }, + { "path": "../page-settings/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-params/tsconfig.build.json" } + ] } diff --git a/packages/page-accounts/tsconfig.spec.json b/packages/page-accounts/tsconfig.spec.json new file mode 100644 index 0000000000..7e211957e0 --- /dev/null +++ b/packages/page-accounts/tsconfig.spec.json @@ -0,0 +1,20 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "..", + "outDir": "./build", + "rootDir": "./src", + "emitDeclarationOnly": false, + "noEmit": true + }, + "include": [ + "**/*.spec.ts", + "**/*.spec.tsx" + ], + "references": [ + { "path": "../apps-config/tsconfig.build.json" }, + { "path": "../page-accounts/tsconfig.build.json" }, + { "path": "../page-accounts/tsconfig.test.json" }, + { "path": "../test-support/tsconfig.build.json" } + ] +} diff --git a/packages/page-accounts/tsconfig.test.json b/packages/page-accounts/tsconfig.test.json new file mode 100644 index 0000000000..b6e0d780ae --- /dev/null +++ b/packages/page-accounts/tsconfig.test.json @@ -0,0 +1,18 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "..", + "outDir": "./build", + "rootDir": ".", + // "emitDeclarationOnly": false, + // "noEmit": true + }, + "include": [ + "**/test/**/*" + ], + "references": [ + { "path": "../apps-config/tsconfig.build.json" }, + { "path": "../page-accounts/tsconfig.build.json" }, + { "path": "../test-support/tsconfig.build.json" } + ] +} diff --git a/packages/page-addresses/tsconfig.build.json b/packages/page-addresses/tsconfig.build.json index da24d9f225..3076dcc909 100644 --- a/packages/page-addresses/tsconfig.build.json +++ b/packages/page-addresses/tsconfig.build.json @@ -5,5 +5,13 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "exclude": [ + "**/*.spec.ts", + "**/*.spec.tsx", + "**/test/**/*" + ], + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-addresses/tsconfig.spec.json b/packages/page-addresses/tsconfig.spec.json new file mode 100644 index 0000000000..5d5b44a250 --- /dev/null +++ b/packages/page-addresses/tsconfig.spec.json @@ -0,0 +1,19 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "..", + "outDir": "./build", + "rootDir": "./src", + "emitDeclarationOnly": false, + "noEmit": true + }, + "include": [ + "**/*.spec.ts", + "**/*.spec.tsx" + ], + "references": [ + { "path": "../page-addresses/tsconfig.build.json" }, + { "path": "../page-addresses/tsconfig.test.json" }, + { "path": "../test-support/tsconfig.build.json" } + ] +} diff --git a/packages/page-addresses/tsconfig.test.json b/packages/page-addresses/tsconfig.test.json new file mode 100644 index 0000000000..948e7db4c9 --- /dev/null +++ b/packages/page-addresses/tsconfig.test.json @@ -0,0 +1,18 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "..", + "outDir": "./build", + "rootDir": ".", + // "emitDeclarationOnly": false, + // "noEmit": true + }, + "include": [ + "**/test/**/*" + ], + "references": [ + { "path": "../apps-config/tsconfig.build.json" }, + { "path": "../page-addresses/tsconfig.build.json" }, + { "path": "../test-support/tsconfig.build.json" } + ] +} diff --git a/packages/page-alliance/tsconfig.build.json b/packages/page-alliance/tsconfig.build.json index da24d9f225..39a2783086 100644 --- a/packages/page-alliance/tsconfig.build.json +++ b/packages/page-alliance/tsconfig.build.json @@ -5,5 +5,9 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../page-tech-comm/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-assets/src/Balances/Account.tsx b/packages/page-assets/src/Balances/Account.tsx index 0389d796c2..0111303c00 100644 --- a/packages/page-assets/src/Balances/Account.tsx +++ b/packages/page-assets/src/Balances/Account.tsx @@ -1,6 +1,9 @@ // Copyright 2017-2023 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 +// augment package +import '@polkadot/api-augment/substrate'; + import type { PalletAssetsAssetAccount } from '@polkadot/types/lookup'; import type { bool } from '@polkadot/types-codec'; import type { BN } from '@polkadot/util'; @@ -13,7 +16,10 @@ import { FormatBalance } from '@polkadot/react-query'; import { useTranslation } from '../translate.js'; import Transfer from './Transfer.js'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore This looks correct in the editor, but incorrect in composite mode interface Account extends PalletAssetsAssetAccount { + isFrozen?: bool; sufficient?: bool } @@ -35,7 +41,7 @@ function Account ({ account: { balance, isFrozen, reason, sufficient }, accountI - {isFrozen.isTrue ? t('Yes') : t('No')} + {isFrozen?.isTrue ? t('Yes') : t('No')} {sufficient diff --git a/packages/page-assets/src/index.tsx b/packages/page-assets/src/index.tsx index 2193e7118d..67cacca45a 100644 --- a/packages/page-assets/src/index.tsx +++ b/packages/page-assets/src/index.tsx @@ -1,6 +1,7 @@ // Copyright 2017-2023 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 +// augment package import '@polkadot/api-augment/substrate'; import type { BN } from '@polkadot/util'; diff --git a/packages/page-assets/tsconfig.build.json b/packages/page-assets/tsconfig.build.json index da24d9f225..935d9cc2dd 100644 --- a/packages/page-assets/tsconfig.build.json +++ b/packages/page-assets/tsconfig.build.json @@ -5,5 +5,8 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-bounties/tsconfig.build.json b/packages/page-bounties/tsconfig.build.json index da24d9f225..3076dcc909 100644 --- a/packages/page-bounties/tsconfig.build.json +++ b/packages/page-bounties/tsconfig.build.json @@ -5,5 +5,13 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "exclude": [ + "**/*.spec.ts", + "**/*.spec.tsx", + "**/test/**/*" + ], + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-bounties/tsconfig.spec.json b/packages/page-bounties/tsconfig.spec.json new file mode 100644 index 0000000000..3c9faba853 --- /dev/null +++ b/packages/page-bounties/tsconfig.spec.json @@ -0,0 +1,19 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "..", + "outDir": "./build", + "rootDir": "./src", + "emitDeclarationOnly": false, + "noEmit": true + }, + "include": [ + "**/*.spec.ts", + "**/*.spec.tsx" + ], + "references": [ + { "path": "../page-bounties/tsconfig.build.json" }, + { "path": "../page-bounties/tsconfig.test.json" }, + { "path": "../test-support/tsconfig.build.json" } + ] +} diff --git a/packages/page-bounties/tsconfig.test.json b/packages/page-bounties/tsconfig.test.json new file mode 100644 index 0000000000..560db49dfe --- /dev/null +++ b/packages/page-bounties/tsconfig.test.json @@ -0,0 +1,18 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "..", + "outDir": "./build", + "rootDir": ".", + // "emitDeclarationOnly": false, + // "noEmit": true + }, + "include": [ + "**/test/**/*" + ], + "references": [ + { "path": "../apps-config/tsconfig.build.json" }, + { "path": "../page-bounties/tsconfig.build.json" }, + { "path": "../test-support/tsconfig.build.json" } + ] +} diff --git a/packages/page-calendar/tsconfig.build.json b/packages/page-calendar/tsconfig.build.json index da24d9f225..220d7cd4ec 100644 --- a/packages/page-calendar/tsconfig.build.json +++ b/packages/page-calendar/tsconfig.build.json @@ -5,5 +5,9 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../page-parachains/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-claims/src/util.ts b/packages/page-claims/src/util.ts index 2da96c4b3a..0f9e5c00f3 100644 --- a/packages/page-claims/src/util.ts +++ b/packages/page-claims/src/util.ts @@ -5,7 +5,7 @@ import type { EcdsaSignature, EthereumAddress, StatementKind } from '@polkadot/t import secp256k1 from 'secp256k1/elliptic.js'; -import { statics } from '@polkadot/react-api'; +import { statics } from '@polkadot/react-api/statics'; import { assert, hexToU8a, stringToU8a, u8aConcat, u8aToBuffer } from '@polkadot/util'; import { keccakAsHex, keccakAsU8a } from '@polkadot/util-crypto'; diff --git a/packages/page-claims/tsconfig.build.json b/packages/page-claims/tsconfig.build.json index da24d9f225..eea4903a7d 100644 --- a/packages/page-claims/tsconfig.build.json +++ b/packages/page-claims/tsconfig.build.json @@ -5,5 +5,9 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-api/tsconfig.xref.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-collator/tsconfig.build.json b/packages/page-collator/tsconfig.build.json index da24d9f225..935d9cc2dd 100644 --- a/packages/page-collator/tsconfig.build.json +++ b/packages/page-collator/tsconfig.build.json @@ -5,5 +5,8 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-contracts/src/store.ts b/packages/page-contracts/src/store.ts index 713bda4ab0..e404c27ffe 100644 --- a/packages/page-contracts/src/store.ts +++ b/packages/page-contracts/src/store.ts @@ -8,7 +8,7 @@ import { EventEmitter } from 'eventemitter3'; import store from 'store'; import { Abi } from '@polkadot/api-contract'; -import { statics } from '@polkadot/react-api'; +import { statics } from '@polkadot/react-api/statics'; import { isString } from '@polkadot/util'; const KEY_CODE = 'code:'; diff --git a/packages/page-contracts/src/useAbi.ts b/packages/page-contracts/src/useAbi.ts index f76382b850..d5763abb7f 100644 --- a/packages/page-contracts/src/useAbi.ts +++ b/packages/page-contracts/src/useAbi.ts @@ -4,7 +4,7 @@ import { useCallback, useEffect, useState } from 'react'; import { Abi } from '@polkadot/api-contract'; -import { statics } from '@polkadot/react-api'; +import { statics } from '@polkadot/react-api/statics'; import { createNamedHook } from '@polkadot/react-hooks'; import { u8aToString } from '@polkadot/util'; diff --git a/packages/page-contracts/tsconfig.build.json b/packages/page-contracts/tsconfig.build.json index da24d9f225..5b6bcfaf0b 100644 --- a/packages/page-contracts/tsconfig.build.json +++ b/packages/page-contracts/tsconfig.build.json @@ -5,5 +5,10 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-api/tsconfig.xref.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-params/tsconfig.build.json" } + ] } diff --git a/packages/page-council/src/Motions/Close.tsx b/packages/page-council/src/Motions/Close.tsx index fc143680a3..62ae1d81e5 100644 --- a/packages/page-council/src/Motions/Close.tsx +++ b/packages/page-council/src/Motions/Close.tsx @@ -5,8 +5,9 @@ import type { Hash, Proposal, ProposalIndex } from '@polkadot/types/interfaces'; import React, { useState } from 'react'; -import { Button, InputAddress, Modal, ProposedAction, TxButton } from '@polkadot/react-components'; +import { Button, InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useCollectiveInstance, useToggle, useWeight } from '@polkadot/react-hooks'; +import { ProposedAction } from '@polkadot/react-params'; import { useTranslation } from '../translate.js'; diff --git a/packages/page-council/src/Motions/ProposeMotion.tsx b/packages/page-council/src/Motions/ProposeMotion.tsx index 6ddcd65bf0..8c3ccc6cec 100644 --- a/packages/page-council/src/Motions/ProposeMotion.tsx +++ b/packages/page-council/src/Motions/ProposeMotion.tsx @@ -6,8 +6,9 @@ import type { SubmittableExtrinsic } from '@polkadot/api/types'; import React, { useCallback, useEffect, useState } from 'react'; import { getProposalThreshold } from '@polkadot/apps-config'; -import { Button, Extrinsic, InputAddress, InputNumber, Modal, TxButton } from '@polkadot/react-components'; +import { Button, InputAddress, InputNumber, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useCollectiveInstance, useToggle } from '@polkadot/react-hooks'; +import { Extrinsic } from '@polkadot/react-params'; import { BN, BN_ZERO } from '@polkadot/util'; import { useTranslation } from '../translate.js'; diff --git a/packages/page-council/src/Motions/Voting.tsx b/packages/page-council/src/Motions/Voting.tsx index 4334b3d9d6..846028802b 100644 --- a/packages/page-council/src/Motions/Voting.tsx +++ b/packages/page-council/src/Motions/Voting.tsx @@ -5,8 +5,9 @@ import type { AccountId, Hash, Proposal, ProposalIndex } from '@polkadot/types/i import React, { useState } from 'react'; -import { Button, MarkWarning, Modal, ProposedAction, TxButton, VoteAccount } from '@polkadot/react-components'; +import { Button, MarkWarning, Modal, TxButton, VoteAccount } from '@polkadot/react-components'; import { useAccounts, useApi, useCollectiveInstance, useToggle } from '@polkadot/react-hooks'; +import { ProposedAction } from '@polkadot/react-params'; import { useTranslation } from '../translate.js'; diff --git a/packages/page-council/tsconfig.build.json b/packages/page-council/tsconfig.build.json index da24d9f225..ad20ea6975 100644 --- a/packages/page-council/tsconfig.build.json +++ b/packages/page-council/tsconfig.build.json @@ -5,5 +5,10 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../page-democracy/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-params/tsconfig.build.json" } + ] } diff --git a/packages/page-democracy/src/Overview/ExternalCell.tsx b/packages/page-democracy/src/Overview/ExternalCell.tsx index 2c7a36e4df..5df22e55ac 100644 --- a/packages/page-democracy/src/Overview/ExternalCell.tsx +++ b/packages/page-democracy/src/Overview/ExternalCell.tsx @@ -6,9 +6,8 @@ import type { Hash } from '@polkadot/types/interfaces'; import React from 'react'; -import { CallExpander } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { Holder } from '@polkadot/react-params'; +import { CallExpander, Holder } from '@polkadot/react-params'; import { useTranslation } from '../translate.js'; diff --git a/packages/page-democracy/src/Overview/PreImage.tsx b/packages/page-democracy/src/Overview/PreImage.tsx index 320130f96c..8b85403d3f 100644 --- a/packages/page-democracy/src/Overview/PreImage.tsx +++ b/packages/page-democracy/src/Overview/PreImage.tsx @@ -7,8 +7,9 @@ import type { HexString } from '@polkadot/util/types'; import React, { useEffect, useMemo, useState } from 'react'; -import { Extrinsic, InputAddress, InputBalance, Modal, Static, styled, TxButton } from '@polkadot/react-components'; +import { InputAddress, InputBalance, Modal, Static, styled, TxButton } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; +import { Extrinsic } from '@polkadot/react-params'; import { Available } from '@polkadot/react-query'; import { BN, BN_ZERO, isString } from '@polkadot/util'; import { blake2AsHex } from '@polkadot/util-crypto'; diff --git a/packages/page-democracy/src/Overview/ProposalCell.tsx b/packages/page-democracy/src/Overview/ProposalCell.tsx index bd8f967d9c..4bcdeff9d1 100644 --- a/packages/page-democracy/src/Overview/ProposalCell.tsx +++ b/packages/page-democracy/src/Overview/ProposalCell.tsx @@ -7,8 +7,9 @@ import type { HexString } from '@polkadot/util/types'; import React from 'react'; -import { CallExpander, styled } from '@polkadot/react-components'; +import { styled } from '@polkadot/react-components'; import { useApi, usePreimage } from '@polkadot/react-hooks'; +import { CallExpander } from '@polkadot/react-params'; import { useTranslation } from '../translate.js'; import ExternalCell from './ExternalCell.js'; diff --git a/packages/page-democracy/src/Overview/Seconding.tsx b/packages/page-democracy/src/Overview/Seconding.tsx index c81c35b3db..18493b6e61 100644 --- a/packages/page-democracy/src/Overview/Seconding.tsx +++ b/packages/page-democracy/src/Overview/Seconding.tsx @@ -7,8 +7,9 @@ import type { BN } from '@polkadot/util'; import React, { useState } from 'react'; -import { Button, InputAddress, InputBalance, Modal, ProposedAction, TxButton } from '@polkadot/react-components'; +import { Button, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; import { useAccounts, useApi, useToggle } from '@polkadot/react-hooks'; +import { ProposedAction } from '@polkadot/react-params'; import { useTranslation } from '../translate.js'; diff --git a/packages/page-democracy/src/Overview/Voting.tsx b/packages/page-democracy/src/Overview/Voting.tsx index c3430c3883..a38ae97f0c 100644 --- a/packages/page-democracy/src/Overview/Voting.tsx +++ b/packages/page-democracy/src/Overview/Voting.tsx @@ -6,8 +6,9 @@ import type { BN } from '@polkadot/util'; import React, { useMemo, useState } from 'react'; -import { Button, ConvictionDropdown, Modal, ProposedAction, TxButton, VoteAccount, VoteValue } from '@polkadot/react-components'; +import { Button, ConvictionDropdown, Modal, TxButton, VoteAccount, VoteValue } from '@polkadot/react-components'; import { useAccounts, useApi, useToggle } from '@polkadot/react-hooks'; +import { ProposedAction } from '@polkadot/react-params'; import { useTranslation } from '../translate.js'; diff --git a/packages/page-democracy/tsconfig.build.json b/packages/page-democracy/tsconfig.build.json index da24d9f225..8ecaf7ac85 100644 --- a/packages/page-democracy/tsconfig.build.json +++ b/packages/page-democracy/tsconfig.build.json @@ -5,5 +5,9 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-params/tsconfig.build.json" } + ] } diff --git a/packages/page-explorer/src/BlockInfo/Extrinsic.tsx b/packages/page-explorer/src/BlockInfo/Extrinsic.tsx index c22ac17c51..1a8e569433 100644 --- a/packages/page-explorer/src/BlockInfo/Extrinsic.tsx +++ b/packages/page-explorer/src/BlockInfo/Extrinsic.tsx @@ -7,8 +7,9 @@ import type { ICompact, INumber } from '@polkadot/types/types'; import React, { useMemo } from 'react'; -import { AddressMini, CallExpander, LinkExternal, styled } from '@polkadot/react-components'; +import { AddressMini, LinkExternal, styled } from '@polkadot/react-components'; import { convertWeight } from '@polkadot/react-hooks/useWeight'; +import { CallExpander } from '@polkadot/react-params'; import { BN, formatNumber } from '@polkadot/util'; import Event from '../Event.js'; diff --git a/packages/page-explorer/src/Event.tsx b/packages/page-explorer/src/Event.tsx index b6f80e5f07..38faa889f3 100644 --- a/packages/page-explorer/src/Event.tsx +++ b/packages/page-explorer/src/Event.tsx @@ -5,7 +5,8 @@ import type { EventRecord } from '@polkadot/types/interfaces'; import React from 'react'; -import { Event as EventDisplay, Expander } from '@polkadot/react-components'; +import { Expander } from '@polkadot/react-components'; +import { Event as EventDisplay } from '@polkadot/react-params'; interface Props { className?: string; diff --git a/packages/page-explorer/tsconfig.build.json b/packages/page-explorer/tsconfig.build.json index da24d9f225..8ecaf7ac85 100644 --- a/packages/page-explorer/tsconfig.build.json +++ b/packages/page-explorer/tsconfig.build.json @@ -5,5 +5,9 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-params/tsconfig.build.json" } + ] } diff --git a/packages/page-extrinsics/src/Decoder.tsx b/packages/page-extrinsics/src/Decoder.tsx index 1ad0f12b61..94526fb10c 100644 --- a/packages/page-extrinsics/src/Decoder.tsx +++ b/packages/page-extrinsics/src/Decoder.tsx @@ -9,8 +9,9 @@ import type { DecodedExtrinsic } from './types.js'; import React, { useCallback, useState } from 'react'; import { useParams } from 'react-router-dom'; -import { Call as CallDisplay, Input, InputExtrinsic, MarkError, styled } from '@polkadot/react-components'; +import { Input, InputExtrinsic, MarkError, styled } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; +import { Call as CallDisplay } from '@polkadot/react-params'; import { assert, compactToU8a, isHex, u8aConcat, u8aEq } from '@polkadot/util'; import Decoded from './Decoded.js'; diff --git a/packages/page-extrinsics/src/Submission.tsx b/packages/page-extrinsics/src/Submission.tsx index 47cfda9ec1..9ea83e86f0 100644 --- a/packages/page-extrinsics/src/Submission.tsx +++ b/packages/page-extrinsics/src/Submission.tsx @@ -7,8 +7,9 @@ import type { DecodedExtrinsic } from './types.js'; import React, { useCallback, useState } from 'react'; -import { Button, Extrinsic, InputAddress, MarkError, TxButton } from '@polkadot/react-components'; +import { Button, InputAddress, MarkError, TxButton } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; +import { Extrinsic } from '@polkadot/react-params'; import { BalanceFree } from '@polkadot/react-query'; import Decoded from './Decoded.js'; diff --git a/packages/page-extrinsics/tsconfig.build.json b/packages/page-extrinsics/tsconfig.build.json index da24d9f225..8ecaf7ac85 100644 --- a/packages/page-extrinsics/tsconfig.build.json +++ b/packages/page-extrinsics/tsconfig.build.json @@ -5,5 +5,9 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-params/tsconfig.build.json" } + ] } diff --git a/packages/page-fellowship/tsconfig.build.json b/packages/page-fellowship/tsconfig.build.json index da24d9f225..b7b6e3f3c1 100644 --- a/packages/page-fellowship/tsconfig.build.json +++ b/packages/page-fellowship/tsconfig.build.json @@ -5,5 +5,9 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../page-ranked/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-files/tsconfig.build.json b/packages/page-files/tsconfig.build.json new file mode 100644 index 0000000000..935d9cc2dd --- /dev/null +++ b/packages/page-files/tsconfig.build.json @@ -0,0 +1,12 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "..", + "outDir": "./build", + "rootDir": "./src" + }, + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] +} diff --git a/packages/page-gilt/tsconfig.build.json b/packages/page-gilt/tsconfig.build.json index da24d9f225..935d9cc2dd 100644 --- a/packages/page-gilt/tsconfig.build.json +++ b/packages/page-gilt/tsconfig.build.json @@ -5,5 +5,8 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-js/tsconfig.build.json b/packages/page-js/tsconfig.build.json index da24d9f225..935d9cc2dd 100644 --- a/packages/page-js/tsconfig.build.json +++ b/packages/page-js/tsconfig.build.json @@ -5,5 +5,8 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-membership/tsconfig.build.json b/packages/page-membership/tsconfig.build.json index da24d9f225..39a2783086 100644 --- a/packages/page-membership/tsconfig.build.json +++ b/packages/page-membership/tsconfig.build.json @@ -5,5 +5,9 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../page-tech-comm/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-nfts/tsconfig.build.json b/packages/page-nfts/tsconfig.build.json index da24d9f225..935d9cc2dd 100644 --- a/packages/page-nfts/tsconfig.build.json +++ b/packages/page-nfts/tsconfig.build.json @@ -5,5 +5,8 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-nis/tsconfig.build.json b/packages/page-nis/tsconfig.build.json index da24d9f225..935d9cc2dd 100644 --- a/packages/page-nis/tsconfig.build.json +++ b/packages/page-nis/tsconfig.build.json @@ -5,5 +5,8 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-parachains/tsconfig.build.json b/packages/page-parachains/tsconfig.build.json index da24d9f225..14b7035fe3 100644 --- a/packages/page-parachains/tsconfig.build.json +++ b/packages/page-parachains/tsconfig.build.json @@ -5,5 +5,10 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../apps-config/tsconfig.build.json" }, + { "path": "../page-explorer/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-poll/tsconfig.build.json b/packages/page-poll/tsconfig.build.json index da24d9f225..935d9cc2dd 100644 --- a/packages/page-poll/tsconfig.build.json +++ b/packages/page-poll/tsconfig.build.json @@ -5,5 +5,8 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-preimages/src/Preimages/Add/Partial.tsx b/packages/page-preimages/src/Preimages/Add/Partial.tsx index 341eaacd06..8059c5447a 100644 --- a/packages/page-preimages/src/Preimages/Add/Partial.tsx +++ b/packages/page-preimages/src/Preimages/Add/Partial.tsx @@ -9,8 +9,9 @@ import type { HashState } from './types.js'; import React, { useCallback, useState } from 'react'; -import { Extrinsic, InputBalance, Modal, Static } from '@polkadot/react-components'; +import { InputBalance, Modal, Static } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; +import { Extrinsic } from '@polkadot/react-params'; import { BN_ZERO } from '@polkadot/util'; import { blake2AsHex } from '@polkadot/util-crypto'; diff --git a/packages/page-preimages/src/Preimages/Call.tsx b/packages/page-preimages/src/Preimages/Call.tsx index 8ac07cc2f5..a1290ab68f 100644 --- a/packages/page-preimages/src/Preimages/Call.tsx +++ b/packages/page-preimages/src/Preimages/Call.tsx @@ -5,8 +5,9 @@ import type { Preimage } from '@polkadot/react-hooks/types'; import React from 'react'; -import { AddressMini, CallExpander, MarkError, MarkWarning } from '@polkadot/react-components'; +import { AddressMini, MarkError, MarkWarning } from '@polkadot/react-components'; import { ZERO_ACCOUNT } from '@polkadot/react-hooks/useWeight'; +import { CallExpander } from '@polkadot/react-params'; import { useTranslation } from '../translate.js'; diff --git a/packages/page-preimages/tsconfig.build.json b/packages/page-preimages/tsconfig.build.json index da24d9f225..8ecaf7ac85 100644 --- a/packages/page-preimages/tsconfig.build.json +++ b/packages/page-preimages/tsconfig.build.json @@ -5,5 +5,9 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-params/tsconfig.build.json" } + ] } diff --git a/packages/page-ranked/tsconfig.build.json b/packages/page-ranked/tsconfig.build.json index da24d9f225..b565a8aaef 100644 --- a/packages/page-ranked/tsconfig.build.json +++ b/packages/page-ranked/tsconfig.build.json @@ -5,5 +5,9 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../page-referenda/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-referenda/src/Referenda/RefOngoing.tsx b/packages/page-referenda/src/Referenda/RefOngoing.tsx index 7898f95ecb..8dded8b30b 100644 --- a/packages/page-referenda/src/Referenda/RefOngoing.tsx +++ b/packages/page-referenda/src/Referenda/RefOngoing.tsx @@ -10,9 +10,10 @@ import type { Referendum, ReferendumProps as Props } from '../types.js'; import React, { useMemo } from 'react'; -import { CallExpander, Progress } from '@polkadot/react-components'; +import { Progress } from '@polkadot/react-components'; import { useApi, usePreimage } from '@polkadot/react-hooks'; import { getPreimageHash } from '@polkadot/react-hooks/usePreimage'; +import { CallExpander } from '@polkadot/react-params'; import { useTranslation } from '../translate.js'; import Deposits from './Deposits/index.js'; diff --git a/packages/page-referenda/src/Referenda/Vote/index.tsx b/packages/page-referenda/src/Referenda/Vote/index.tsx index e57e45ae96..d38362ced8 100644 --- a/packages/page-referenda/src/Referenda/Vote/index.tsx +++ b/packages/page-referenda/src/Referenda/Vote/index.tsx @@ -9,8 +9,9 @@ import type { PalletVote, TrackInfo } from '../../types.js'; import React, { useMemo, useState } from 'react'; -import { Button, Modal, ProposedAction, styled, ToggleGroup, TxButton, VoteAccount } from '@polkadot/react-components'; +import { Button, Modal, styled, ToggleGroup, TxButton, VoteAccount } from '@polkadot/react-components'; import { useAccounts, useApi, useToggle } from '@polkadot/react-hooks'; +import { ProposedAction } from '@polkadot/react-params'; import { useTranslation } from '../../translate.js'; import VoteAbstain from './VoteAbstain.js'; diff --git a/packages/page-referenda/tsconfig.build.json b/packages/page-referenda/tsconfig.build.json index da24d9f225..0787495ea3 100644 --- a/packages/page-referenda/tsconfig.build.json +++ b/packages/page-referenda/tsconfig.build.json @@ -5,5 +5,10 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../page-preimages/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-params/tsconfig.build.json" } + ] } diff --git a/packages/page-rpc/tsconfig.build.json b/packages/page-rpc/tsconfig.build.json index da24d9f225..8ecaf7ac85 100644 --- a/packages/page-rpc/tsconfig.build.json +++ b/packages/page-rpc/tsconfig.build.json @@ -5,5 +5,9 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-params/tsconfig.build.json" } + ] } diff --git a/packages/page-runtime/tsconfig.build.json b/packages/page-runtime/tsconfig.build.json index da24d9f225..8ecaf7ac85 100644 --- a/packages/page-runtime/tsconfig.build.json +++ b/packages/page-runtime/tsconfig.build.json @@ -5,5 +5,9 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-params/tsconfig.build.json" } + ] } diff --git a/packages/page-scheduler/src/Scheduled.tsx b/packages/page-scheduler/src/Scheduled.tsx index 9a13fb52b0..92801f7ef4 100644 --- a/packages/page-scheduler/src/Scheduled.tsx +++ b/packages/page-scheduler/src/Scheduled.tsx @@ -7,8 +7,8 @@ import type { ScheduledExt } from './types.js'; import React from 'react'; import Hash from '@polkadot/app-preimages/Preimages/Hash'; -import { CallExpander } from '@polkadot/react-components'; import { usePreimage } from '@polkadot/react-hooks'; +import { CallExpander } from '@polkadot/react-params'; import { BlockToTime } from '@polkadot/react-query'; import { formatNumber } from '@polkadot/util'; diff --git a/packages/page-scheduler/tsconfig.build.json b/packages/page-scheduler/tsconfig.build.json index da24d9f225..7d82806ff7 100644 --- a/packages/page-scheduler/tsconfig.build.json +++ b/packages/page-scheduler/tsconfig.build.json @@ -5,5 +5,10 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../page-democracy/tsconfig.build.json" }, + { "path": "../page-preimages/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-settings/tsconfig.build.json b/packages/page-settings/tsconfig.build.json index da24d9f225..6e8af8d52f 100644 --- a/packages/page-settings/tsconfig.build.json +++ b/packages/page-settings/tsconfig.build.json @@ -5,5 +5,10 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../apps-config/tsconfig.build.json" }, + { "path": "../react-api/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-signing/tsconfig.build.json b/packages/page-signing/tsconfig.build.json index da24d9f225..935d9cc2dd 100644 --- a/packages/page-signing/tsconfig.build.json +++ b/packages/page-signing/tsconfig.build.json @@ -5,5 +5,8 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-society/tsconfig.build.json b/packages/page-society/tsconfig.build.json index da24d9f225..935d9cc2dd 100644 --- a/packages/page-society/tsconfig.build.json +++ b/packages/page-society/tsconfig.build.json @@ -5,5 +5,8 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-staking/src/Targets/index.tsx b/packages/page-staking/src/Targets/index.tsx index ba5197cb15..9d14cda3f4 100644 --- a/packages/page-staking/src/Targets/index.tsx +++ b/packages/page-staking/src/Targets/index.tsx @@ -9,6 +9,7 @@ import type { NominatedByMap, SortedTargets, TargetSortBy, ValidatorInfo } from import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import Legend from '@polkadot/app-staking2/Legend'; import { Button, Icon, styled, Table, Toggle } from '@polkadot/react-components'; import { useApi, useAvailableSlashes, useBlocksPerDays, useSavedFlags } from '@polkadot/react-hooks'; import { BN_HUNDRED } from '@polkadot/util'; @@ -16,7 +17,6 @@ import { BN_HUNDRED } from '@polkadot/util'; import { MAX_NOMINATIONS } from '../constants.js'; import ElectionBanner from '../ElectionBanner.js'; import Filtering from '../Filtering.js'; -import Legend from '../Legend.js'; import { useTranslation } from '../translate.js'; import useIdentities from '../useIdentities.js'; import Nominate from './Nominate.js'; diff --git a/packages/page-staking/src/Validators/CurrentList.tsx b/packages/page-staking/src/Validators/CurrentList.tsx index 374af159a2..57cae5e489 100644 --- a/packages/page-staking/src/Validators/CurrentList.tsx +++ b/packages/page-staking/src/Validators/CurrentList.tsx @@ -8,11 +8,11 @@ import type { NominatedByMap, SortedTargets, ValidatorInfo } from '../types.js'; import React, { useMemo, useRef, useState } from 'react'; +import Legend from '@polkadot/app-staking2/Legend'; import { Table } from '@polkadot/react-components'; import { useApi, useBlockAuthors, useNextTick } from '@polkadot/react-hooks'; import Filtering from '../Filtering.js'; -import Legend from '../Legend.js'; import { useTranslation } from '../translate.js'; import Address from './Address/index.js'; diff --git a/packages/page-staking/tsconfig.build.json b/packages/page-staking/tsconfig.build.json index da24d9f225..01d00ca8da 100644 --- a/packages/page-staking/tsconfig.build.json +++ b/packages/page-staking/tsconfig.build.json @@ -5,5 +5,10 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../page-explorer/tsconfig.build.json" }, + { "path": "../page-staking2/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-staking/src/Legend.tsx b/packages/page-staking2/src/Legend.tsx similarity index 100% rename from packages/page-staking/src/Legend.tsx rename to packages/page-staking2/src/Legend.tsx diff --git a/packages/page-staking2/src/Validators/index.tsx b/packages/page-staking2/src/Validators/index.tsx index 5bd1cf90bd..97b8169651 100644 --- a/packages/page-staking2/src/Validators/index.tsx +++ b/packages/page-staking2/src/Validators/index.tsx @@ -5,9 +5,9 @@ import type { SessionInfo } from '../types.js'; import React, { useRef, useState } from 'react'; -import Legend from '@polkadot/app-staking/Legend'; import { Button, styled, ToggleGroup } from '@polkadot/react-components'; +import Legend from '../Legend.js'; import { useTranslation } from '../translate.js'; import useValidatorsActive from '../useValidatorsActive.js'; import Active from './Active/index.js'; diff --git a/packages/page-staking2/tsconfig.build.json b/packages/page-staking2/tsconfig.build.json index da24d9f225..935d9cc2dd 100644 --- a/packages/page-staking2/tsconfig.build.json +++ b/packages/page-staking2/tsconfig.build.json @@ -5,5 +5,8 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-storage/tsconfig.build.json b/packages/page-storage/tsconfig.build.json index da24d9f225..8ecaf7ac85 100644 --- a/packages/page-storage/tsconfig.build.json +++ b/packages/page-storage/tsconfig.build.json @@ -5,5 +5,9 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-params/tsconfig.build.json" } + ] } diff --git a/packages/page-sudo/src/Sudo.tsx b/packages/page-sudo/src/Sudo.tsx index b489790492..d9afa86e25 100644 --- a/packages/page-sudo/src/Sudo.tsx +++ b/packages/page-sudo/src/Sudo.tsx @@ -6,8 +6,9 @@ import type { BN } from '@polkadot/util'; import React, { useCallback, useState } from 'react'; -import { Button, Extrinsic, Icon, InputNumber, styled, Toggle, TxButton } from '@polkadot/react-components'; +import { Button, Icon, InputNumber, styled, Toggle, TxButton } from '@polkadot/react-components'; import { useApi, useToggle } from '@polkadot/react-hooks'; +import { Extrinsic } from '@polkadot/react-params'; import { BN_ZERO, isFunction } from '@polkadot/util'; import { useTranslation } from './translate.js'; diff --git a/packages/page-sudo/tsconfig.build.json b/packages/page-sudo/tsconfig.build.json index da24d9f225..8ecaf7ac85 100644 --- a/packages/page-sudo/tsconfig.build.json +++ b/packages/page-sudo/tsconfig.build.json @@ -5,5 +5,9 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-params/tsconfig.build.json" } + ] } diff --git a/packages/page-tech-comm/src/Proposals/Close.tsx b/packages/page-tech-comm/src/Proposals/Close.tsx index 8db7704b4a..248020aac5 100644 --- a/packages/page-tech-comm/src/Proposals/Close.tsx +++ b/packages/page-tech-comm/src/Proposals/Close.tsx @@ -6,8 +6,9 @@ import type { Hash, Proposal, ProposalIndex } from '@polkadot/types/interfaces'; import React, { useState } from 'react'; -import { Button, InputAddress, Modal, ProposedAction, TxButton } from '@polkadot/react-components'; +import { Button, InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useCollectiveInstance, useToggle, useWeight } from '@polkadot/react-hooks'; +import { ProposedAction } from '@polkadot/react-params'; import { useTranslation } from '../translate.js'; diff --git a/packages/page-tech-comm/src/Proposals/Propose.tsx b/packages/page-tech-comm/src/Proposals/Propose.tsx index 10282e2bd5..848fe81b3d 100644 --- a/packages/page-tech-comm/src/Proposals/Propose.tsx +++ b/packages/page-tech-comm/src/Proposals/Propose.tsx @@ -6,8 +6,9 @@ import type { CollectiveType } from '@polkadot/react-hooks/types'; import React, { useCallback, useState } from 'react'; -import { Button, Extrinsic, InputAddress, InputNumber, Modal, TxButton } from '@polkadot/react-components'; +import { Button, InputAddress, InputNumber, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useCollectiveInstance, useModal } from '@polkadot/react-hooks'; +import { Extrinsic } from '@polkadot/react-params'; import { BN } from '@polkadot/util'; import { useTranslation } from '../translate.js'; diff --git a/packages/page-tech-comm/tsconfig.build.json b/packages/page-tech-comm/tsconfig.build.json index da24d9f225..ad20ea6975 100644 --- a/packages/page-tech-comm/tsconfig.build.json +++ b/packages/page-tech-comm/tsconfig.build.json @@ -5,5 +5,10 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../page-democracy/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-params/tsconfig.build.json" } + ] } diff --git a/packages/page-treasury/tsconfig.build.json b/packages/page-treasury/tsconfig.build.json index da24d9f225..935d9cc2dd 100644 --- a/packages/page-treasury/tsconfig.build.json +++ b/packages/page-treasury/tsconfig.build.json @@ -5,5 +5,8 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-utilities/tsconfig.build.json b/packages/page-utilities/tsconfig.build.json index da24d9f225..fb25879bc4 100644 --- a/packages/page-utilities/tsconfig.build.json +++ b/packages/page-utilities/tsconfig.build.json @@ -5,5 +5,9 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../page-settings/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/page-whitelist/tsconfig.build.json b/packages/page-whitelist/tsconfig.build.json index da24d9f225..81be68d910 100644 --- a/packages/page-whitelist/tsconfig.build.json +++ b/packages/page-whitelist/tsconfig.build.json @@ -5,5 +5,9 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../page-preimages/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/react-api/src/Api.tsx b/packages/react-api/src/Api.tsx index 3e2d6f94f9..d3295c4478 100644 --- a/packages/react-api/src/Api.tsx +++ b/packages/react-api/src/Api.tsx @@ -18,7 +18,7 @@ import { web3Accounts, web3Enable } from '@polkadot/extension-dapp'; import { TokenUnit } from '@polkadot/react-components/InputConsts/units'; import { useApiUrl, useEndpoint, useQueue } from '@polkadot/react-hooks'; import { ApiCtx } from '@polkadot/react-hooks/ctx/Api'; -import { ApiSigner } from '@polkadot/react-signer'; +import { ApiSigner } from '@polkadot/react-signer/signers'; import { keyring } from '@polkadot/ui-keyring'; import { settings } from '@polkadot/ui-settings'; import { formatBalance, isNumber, isTestChain, objectSpread, stringify } from '@polkadot/util'; diff --git a/packages/react-api/src/util/getEnvironment.ts b/packages/react-api/src/util/getEnvironment.ts index 81ef8b90ce..055a9b8d50 100644 --- a/packages/react-api/src/util/getEnvironment.ts +++ b/packages/react-api/src/util/getEnvironment.ts @@ -7,9 +7,7 @@ import type { Environment } from '../types.js'; function isElectron () { if (process?.versions?.electron) { return true; - } - - if (window?.process?.type === 'renderer') { + } else if ((window?.process as unknown as (Record | undefined))?.type === 'renderer') { return true; } diff --git a/packages/react-api/tsconfig.build.json b/packages/react-api/tsconfig.build.json index da24d9f225..cc84a45667 100644 --- a/packages/react-api/tsconfig.build.json +++ b/packages/react-api/tsconfig.build.json @@ -5,5 +5,20 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "exclude": [ + "src/statics.ts", + "src/types.ts", + "src/hoc/*", + "src/transform/*", + "src/util/*" + ], + "references": [ + { "path": "../apps-config/tsconfig.build.json" }, + { "path": "../react-api/tsconfig.xref.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-hooks/tsconfig.build.json" }, + { "path": "../react-hooks/tsconfig.xref.json" }, + { "path": "../react-signer/tsconfig.xref.json" } + ] } diff --git a/packages/react-api/tsconfig.xref.json b/packages/react-api/tsconfig.xref.json new file mode 100644 index 0000000000..a28ba516cb --- /dev/null +++ b/packages/react-api/tsconfig.xref.json @@ -0,0 +1,18 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "..", + "outDir": "./build", + "rootDir": "./src" + }, + "include": [ + "src/statics.ts", + "src/types.ts", + "src/hoc/*", + "src/transform/*", + "src/util/*" + ], + "references": [ + { "path": "../react-hooks/tsconfig.xref.json" } + ] +} diff --git a/packages/react-components/src/AccountName.tsx b/packages/react-components/src/AccountName.tsx index d454e54bb6..c33773edb2 100644 --- a/packages/react-components/src/AccountName.tsx +++ b/packages/react-components/src/AccountName.tsx @@ -7,7 +7,7 @@ import type { AccountId, AccountIndex, Address } from '@polkadot/types/interface import React, { useCallback, useContext, useEffect, useState } from 'react'; -import { statics } from '@polkadot/react-api'; +import { statics } from '@polkadot/react-api/statics'; import { useDeriveAccountInfo, useSystemApi } from '@polkadot/react-hooks'; import { AccountSidebarCtx } from '@polkadot/react-hooks/ctx/AccountSidebar'; import { formatNumber, isCodec, isFunction, stringToU8a, u8aEmpty, u8aEq, u8aToBn } from '@polkadot/util'; diff --git a/packages/react-components/src/Popup/types.ts b/packages/react-components/src/Popup/types.ts index f02ff13a19..06d45b16cd 100644 --- a/packages/react-components/src/Popup/types.ts +++ b/packages/react-components/src/Popup/types.ts @@ -3,7 +3,15 @@ import type React from 'react'; +export interface ElementPosition { + x: number, + y: number, + width: number, + height: number, +} + export type HorizontalPosition = 'left' | 'middle' | 'right' + export type VerticalPosition = 'top' | 'bottom' export interface PopupWindowProps { diff --git a/packages/react-components/src/Popup/utils.ts b/packages/react-components/src/Popup/utils.ts index ee9dc607a8..efa0a24312 100644 --- a/packages/react-components/src/Popup/utils.ts +++ b/packages/react-components/src/Popup/utils.ts @@ -2,8 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { WindowSize } from '@polkadot/react-hooks/ctx/types'; -import type { ElementPosition } from '@polkadot/react-hooks/useElementPosition'; -import type { HorizontalPosition, VerticalPosition } from './types.js'; +import type { ElementPosition, HorizontalPosition, VerticalPosition } from './types.js'; interface Coords { x: number; diff --git a/packages/react-components/src/Status/checks.ts b/packages/react-components/src/Status/checks.ts index d6f6c4b41e..cb25d19a06 100644 --- a/packages/react-components/src/Status/checks.ts +++ b/packages/react-components/src/Status/checks.ts @@ -1,6 +1,9 @@ // Copyright 2017-2023 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 +// we use augmented types in this tsconfig +import '@polkadot/api-augment/substrate'; + import type { DispatchError, DispatchResult, Event, EventRecord } from '@polkadot/types/interfaces'; import type { XcmV3TraitsOutcome } from '@polkadot/types/lookup'; diff --git a/packages/react-components/src/constants.ts b/packages/react-components/src/constants.ts index 21cb99088f..ab6a0efeb0 100644 --- a/packages/react-components/src/constants.ts +++ b/packages/react-components/src/constants.ts @@ -1,54 +1,8 @@ // Copyright 2017-2023 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { ComponentMap } from '@polkadot/react-params/types'; - -import BalanceParam from '@polkadot/react-params/Param/Balance'; - export const rewardDestinationOptions = [ { text: 'Stash account (increase the amount at stake)', value: 0 }, { text: 'Stash account (do not increase the amount at stake)', value: 1 }, { text: 'Controller account', value: 2 } ]; - -export const balanceCalls = [ - 'auctions.bid', - 'balances.forceTransfer', 'balances.forceUnreserve', 'balances.setBalance', 'balances.transfer', 'balances.transferAllowDeath', 'balances.transferKeepAlive', - 'bounties.proposeBounty', 'bounties.proposeCurator', - 'childBounties.proposeCurator', - 'claims.mintClaim', - 'convictionVoting.delegate', 'convictionVoting.vote', - 'crowdloan.contribute', 'crowdloan.create', 'crowdloan.edit', - 'democracy.delegate', 'democracy.propose', 'democracy.vote', - 'identity.requestJudgement', 'identity.setFee', - 'nominationPools.bondExtra', 'nominationPools.join', 'nominationPools.unbond', - 'phragmenElection.vote', - 'society.bid', 'society.vouch', - 'staking.bond', 'staking.bondExtra', 'staking.rebond', 'staking.unbond', - 'tips.tip', 'tips.tipNew', - 'treasury.proposeSpend', 'treasury.spend', - 'vesting.forceVestedTransfer', 'vesting.vestedTransfer' -]; - -// needs expansion with events from above -export const balanceEvents = [ - 'auctions.BidAccepted', 'auctions.ReserveConfiscated', 'auctions.Reserved', 'auctions.Unreserved', - 'balances.Deposit', 'balances.DustLost', 'balances.Endowed', 'balances.Transfer', 'balances.Unreserved', 'balances.Withdraw', - 'bounties.BountyClaimed', 'bounties.BountyRejected', - 'claims.Claimed', - 'convictionVoting.Voted', - 'crowdloan.Contributed', 'crowdloan.Withdrew', - 'democracy.Voted', - 'nominationPools.Bonded', 'nominationPools.PaidOut', 'nominationPools.PoolSlashed', 'nominationPools.Unbonded', 'nominationPools.UnbondingPoolSlashed', - 'referenda.DecisionDepositPlaced', 'referenda.DecisionDepositRefunded', 'referenda.DepositSlashed', 'referenda.SubmissionDepositRefunded', - 'staking.Bonded', 'staking.Rewarded', 'staking.Unbonded', 'staking.Withdrawn', - 'transactionPayment.TransactionFeePaid', - 'treasury.Deposit' -]; - -export const balanceCallsOverrides: ComponentMap = { - 'Compact': BalanceParam, - u128: BalanceParam -}; - -export const balanceEventsOverrides = balanceCallsOverrides; diff --git a/packages/react-components/src/index.ts b/packages/react-components/src/index.ts index 37ba653c2c..0d172e4a0d 100644 --- a/packages/react-components/src/index.ts +++ b/packages/react-components/src/index.ts @@ -18,8 +18,6 @@ export { default as BatchWarning } from './BatchWarning.js'; export { default as Bonded } from './Bonded.js'; export { default as Button } from './Button/index.js'; export { default as ButtonCancel } from './ButtonCancel.js'; -export { default as Call } from './Call.js'; -export { default as CallExpander } from './CallExpander.js'; export { default as Card } from './Card.js'; export { default as CardSummary } from './CardSummary.js'; export { default as ChainImg } from './ChainImg.js'; @@ -34,11 +32,9 @@ export { default as Dropdown } from './Dropdown.js'; export { default as EditButton } from './EditButton.js'; export { default as Editor } from './Editor.js'; export { default as ErrorBoundary } from './ErrorBoundary.js'; -export { default as Event } from './Event.js'; export { default as ExpandButton } from './ExpandButton.js'; export { default as Expander } from './Expander.js'; export { default as ExpanderScroll } from './ExpanderScroll.js'; -export { default as Extrinsic } from './Extrinsic.js'; export { default as FilterInput } from './FilterInput.js'; export { default as FilterOverlay } from './FilterOverlay.js'; export { default as Flag } from './Flag.js'; @@ -80,7 +76,6 @@ export { default as Password } from './Password.js'; export { default as PasswordStrength } from './PasswordStrength.js'; export { default as Popup } from './Popup/index.js'; export { default as Progress } from './Progress.js'; -export { default as ProposedAction } from './ProposedAction.js'; export { default as Row } from './Row.js'; export { default as Sidebar } from './Sidebar.js'; export { default as SortDropdown } from './SortDropdown.js'; diff --git a/packages/react-components/src/util/getContractAbi.ts b/packages/react-components/src/util/getContractAbi.ts index 71e8a5166e..a50589219c 100644 --- a/packages/react-components/src/util/getContractAbi.ts +++ b/packages/react-components/src/util/getContractAbi.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { Abi } from '@polkadot/api-contract'; -import { statics } from '@polkadot/react-api'; +import { statics } from '@polkadot/react-api/statics'; import { getAddressMeta } from './getAddressMeta.js'; diff --git a/packages/react-components/tsconfig.build.json b/packages/react-components/tsconfig.build.json index da24d9f225..2e005bbe26 100644 --- a/packages/react-components/tsconfig.build.json +++ b/packages/react-components/tsconfig.build.json @@ -5,5 +5,22 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "exclude": [ + "**/*.spec.ts", + "**/*.spec.tsx", + "src/Popup/types.ts", + "src/Popup/utils.ts", + "src/Status/checks.ts", + "src/Status/constants.ts", + "src/Status/types.ts", + "src/styled.ts", + "src/types.ts", + "src/util/*" + ], + "references": [ + { "path": "../apps-config/tsconfig.build.json" }, + { "path": "../react-api/tsconfig.xref.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-query/tsconfig.build.json" } + ] } diff --git a/packages/react-components/tsconfig.spec.json b/packages/react-components/tsconfig.spec.json new file mode 100644 index 0000000000..5d7f52d009 --- /dev/null +++ b/packages/react-components/tsconfig.spec.json @@ -0,0 +1,20 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "..", + "outDir": "./build", + "rootDir": "./src", + "emitDeclarationOnly": false, + "noEmit": true + }, + "include": [ + "**/*.spec.ts", + "**/*.spec.tsx" + ], + "references": [ + { "path": "../page-accounts/tsconfig.test.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../test-support/tsconfig.build.json" } + ] +} diff --git a/packages/react-components/tsconfig.xref.json b/packages/react-components/tsconfig.xref.json new file mode 100644 index 0000000000..5c260a6362 --- /dev/null +++ b/packages/react-components/tsconfig.xref.json @@ -0,0 +1,23 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "..", + "outDir": "./build", + "rootDir": "./src" + }, + "include": [ + "src/Popup/types.ts", + "src/Popup/utils.ts", + "src/Status/checks.ts", + "src/Status/constants.ts", + "src/Status/types.ts", + "src/styled.ts", + "src/types.ts", + "src/util/*" + ], + "references": [ + { "path": "../react-api/tsconfig.xref.json" }, + { "path": "../react-hooks/tsconfig.xref.json" }, + { "path": "../react-params/tsconfig.xref.json" } + ] +} diff --git a/packages/react-hooks/src/ctx/Api.tsx b/packages/react-hooks/src/ctx/Api.tsx index 4c3f6e8e5e..36e940b732 100644 --- a/packages/react-hooks/src/ctx/Api.tsx +++ b/packages/react-hooks/src/ctx/Api.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { ApiProps } from '@polkadot/react-api/types'; +import type { ApiProps } from './types.js'; import React from 'react'; diff --git a/packages/react-hooks/src/ctx/types.ts b/packages/react-hooks/src/ctx/types.ts index cc706e9395..7e14dbb05c 100644 --- a/packages/react-hooks/src/ctx/types.ts +++ b/packages/react-hooks/src/ctx/types.ts @@ -1,10 +1,43 @@ // Copyright 2017-2023 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { ApiPromise } from '@polkadot/api'; +import type { SubmittableExtrinsicFunction } from '@polkadot/api/promise/types'; import type { HeaderExtended } from '@polkadot/api-derive/types'; +import type { LinkOption } from '@polkadot/apps-config/endpoints/types'; +import type { InjectedExtension } from '@polkadot/extension-inject/types'; import type { ProviderStats } from '@polkadot/rpc-provider/types'; import type { BlockNumber, EventRecord } from '@polkadot/types/interfaces'; +export interface ApiState { + apiDefaultTx: SubmittableExtrinsicFunction; + apiDefaultTxSudo: SubmittableExtrinsicFunction; + chainSS58: number; + hasInjectedAccounts: boolean; + isApiReady: boolean; + isDevelopment: boolean; + isEthereum: boolean; + specName: string; + specVersion: string; + systemChain: string; + systemName: string; + systemVersion: string; +} + +export interface ApiProps extends ApiState { + api: ApiPromise; + apiEndpoint: LinkOption | null; + apiError: string | null; + apiRelay: ApiPromise | null; + apiUrl?: string; + createLink: (path: string, apiUrl?: string) => string; + extensions?: InjectedExtension[]; + isApiConnected: boolean; + isApiInitialized: boolean; + isElectron: boolean; + isWaitingInjected: boolean; +} + export interface Accounts { allAccounts: string[]; allAccountsHex: string[]; diff --git a/packages/react-hooks/src/index.ts b/packages/react-hooks/src/index.ts index 9083097175..f2d7f7effd 100644 --- a/packages/react-hooks/src/index.ts +++ b/packages/react-hooks/src/index.ts @@ -1,6 +1,9 @@ // Copyright 2017-2023 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 +// we use augmented types in this tsconfig +import '@polkadot/api-augment/substrate'; + export { createNamedHook } from './createNamedHook.js'; export * from './ctx/index.js'; export { useAccountId } from './useAccountId.js'; diff --git a/packages/react-hooks/src/useElementPosition.ts b/packages/react-hooks/src/useElementPosition.ts index 8b6a60c890..2e4853c258 100644 --- a/packages/react-hooks/src/useElementPosition.ts +++ b/packages/react-hooks/src/useElementPosition.ts @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type React from 'react'; +import type { ElementPosition } from '@polkadot/react-components/Popup/types'; import { useEffect, useState } from 'react'; @@ -10,13 +11,6 @@ import { useIsMountedRef } from './useIsMountedRef.js'; import { useScroll } from './useScroll.js'; import { useWindowSize } from './useWindowSize.js'; -export interface ElementPosition { - x: number, - y: number, - width: number, - height: number, -} - function useElementPositionImpl (ref: React.MutableRefObject): ElementPosition | undefined { const [elementPosition, setElementPosition] = useState(); const mountedRef = useIsMountedRef(); diff --git a/packages/react-hooks/tsconfig.build.json b/packages/react-hooks/tsconfig.build.json index da24d9f225..c39f53ccdc 100644 --- a/packages/react-hooks/tsconfig.build.json +++ b/packages/react-hooks/tsconfig.build.json @@ -5,5 +5,12 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "exclude": [ + "src/ctx/Api.tsx", + "src/ctx/types.ts" + ], + "references": [ + { "path": "../apps-config/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" } + ] } diff --git a/packages/react-hooks/tsconfig.xref.json b/packages/react-hooks/tsconfig.xref.json new file mode 100644 index 0000000000..30dcfbd702 --- /dev/null +++ b/packages/react-hooks/tsconfig.xref.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "..", + "outDir": "./build", + "rootDir": "./src" + }, + "include": [ + "src/ctx/Api.tsx", + "src/ctx/types.ts" + ], + "references": [ + { "path": "../apps-config/tsconfig.build.json" } + ] +} diff --git a/packages/react-components/src/Params/Call.tsx b/packages/react-params/src/Extra/Call.tsx similarity index 97% rename from packages/react-components/src/Params/Call.tsx rename to packages/react-params/src/Extra/Call.tsx index 1579451d0a..9eec7283cc 100644 --- a/packages/react-components/src/Params/Call.tsx +++ b/packages/react-params/src/Extra/Call.tsx @@ -3,8 +3,8 @@ import type { ApiPromise } from '@polkadot/api'; import type { SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api/types'; -import type { Props, RawParam } from '@polkadot/react-params/types'; import type { Call } from '@polkadot/types/interfaces'; +import type { Props, RawParam } from '../types.js'; import React, { useState } from 'react'; diff --git a/packages/react-components/src/Params/Extrinsic.tsx b/packages/react-params/src/Extra/Extrinsic.tsx similarity index 95% rename from packages/react-components/src/Params/Extrinsic.tsx rename to packages/react-params/src/Extra/Extrinsic.tsx index 3715f17b12..774f74353f 100644 --- a/packages/react-components/src/Params/Extrinsic.tsx +++ b/packages/react-params/src/Extra/Extrinsic.tsx @@ -6,7 +6,7 @@ import type { RawParam, RawParamOnChange, RawParamOnEnter, RawParamOnEscape } fr import React, { useCallback } from 'react'; -import BaseExtrinsic from '../Extrinsic.js'; +import { Extrinsic as BaseExtrinsic } from '../Named/index.js'; interface Props { className?: string; diff --git a/packages/react-components/src/Params/OpaqueCall.tsx b/packages/react-params/src/Extra/OpaqueCall.tsx similarity index 100% rename from packages/react-components/src/Params/OpaqueCall.tsx rename to packages/react-params/src/Extra/OpaqueCall.tsx diff --git a/packages/react-components/src/Params/Proposal.tsx b/packages/react-params/src/Extra/Proposal.tsx similarity index 100% rename from packages/react-components/src/Params/Proposal.tsx rename to packages/react-params/src/Extra/Proposal.tsx diff --git a/packages/react-components/src/Params/index.ts b/packages/react-params/src/Extra/index.ts similarity index 100% rename from packages/react-components/src/Params/index.ts rename to packages/react-params/src/Extra/index.ts diff --git a/packages/react-components/src/Call.tsx b/packages/react-params/src/Named/Call.tsx similarity index 87% rename from packages/react-components/src/Call.tsx rename to packages/react-params/src/Named/Call.tsx index 91b19ace39..b8e3ab7cf6 100644 --- a/packages/react-components/src/Call.tsx +++ b/packages/react-params/src/Named/Call.tsx @@ -8,14 +8,13 @@ import type { BN } from '@polkadot/util'; import React, { useEffect, useState } from 'react'; +import { Static, styled } from '@polkadot/react-components'; import Params from '@polkadot/react-params'; import { FormatBalance } from '@polkadot/react-query'; import { Enum, getTypeDef } from '@polkadot/types'; -import { balanceCalls, balanceCallsOverrides } from './constants.js'; -import Static from './Static.js'; -import { styled } from './styled.js'; -import { useTranslation } from './translate.js'; +import { balanceCalls, balanceCallsOverrides } from '../overrides.js'; +import { useTranslation } from '../translate.js'; export interface Props { callName?: string; @@ -25,7 +24,7 @@ export interface Props { labelSignature?: React.ReactNode; mortality?: string; onError?: () => void; - value: IExtrinsic | IMethod; + value?: IExtrinsic | IMethod | null; withBorder?: boolean; withExpander?: boolean; withHash?: boolean; @@ -44,15 +43,15 @@ interface Value { } interface Extracted { - hash: string | null; + hash?: string | null; overrides?: ComponentMap; - params: Param[]; + params?: Param[]; signature: string | null; signatureType: string | null; - values: Value[]; + values?: Value[]; } -function isExtrinsic (value: IExtrinsic | IMethod): value is IExtrinsic { +function isExtrinsic (value: unknown): value is IExtrinsic { return !!(value as IExtrinsic).signature; } @@ -62,20 +61,20 @@ function getRawSignature (value: IExtrinsic): ExtrinsicSignature | undefined { return (value as any)._raw?.signature?.multiSignature as ExtrinsicSignature; } -function extractState (value: IExtrinsic | IMethod, withHash?: boolean, withSignature?: boolean, callName?: string): Extracted { +function extractState (value?: IExtrinsic | IMethod | null, withHash?: boolean, withSignature?: boolean, callName?: string): Extracted { const overrides = callName && balanceCalls.includes(callName) ? balanceCallsOverrides : undefined; - const params = value.meta.args.map(({ name, type }): Param => ({ + const params = value?.meta.args.map(({ name, type }): Param => ({ name: name.toString(), type: getTypeDef(type.toString()) })); - const values = value.args.map((value): Value => ({ + const values = value?.args.map((value): Value => ({ isValid: true, value })); const hash = withHash - ? value.hash.toHex() + ? value?.hash.toHex() : null; let signature: string | null = null; let signatureType: string | null = null; @@ -107,7 +106,7 @@ function Call ({ callName, children, className = '', labelHash, labelSignature, onError={onError} overrides={overrides} params={params} - registry={value.registry} + registry={value?.registry} values={values} withBorder={withBorder} withExpander={withExpander} diff --git a/packages/react-components/src/CallExpander.tsx b/packages/react-params/src/Named/CallExpander.tsx similarity index 93% rename from packages/react-components/src/CallExpander.tsx rename to packages/react-params/src/Named/CallExpander.tsx index 89341da31c..fd10bf38a7 100644 --- a/packages/react-components/src/CallExpander.tsx +++ b/packages/react-params/src/Named/CallExpander.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2023 @polkadot/react-components authors & contributors +// Copyright 2017-2023 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { Call, Extrinsic } from '@polkadot/types/interfaces'; @@ -6,8 +6,9 @@ import type { BN } from '@polkadot/util'; import React, { useMemo } from 'react'; +import { Expander } from '@polkadot/react-components'; + import CallDisplay from './Call.js'; -import Expander from './Expander.js'; interface Props { children?: React.ReactNode; diff --git a/packages/react-components/src/Event.tsx b/packages/react-params/src/Named/Event.tsx similarity index 91% rename from packages/react-components/src/Event.tsx rename to packages/react-params/src/Named/Event.tsx index a0022cc66b..b2cc5c3da2 100644 --- a/packages/react-components/src/Event.tsx +++ b/packages/react-params/src/Named/Event.tsx @@ -8,12 +8,12 @@ import type { Codec } from '@polkadot/types/types'; import React, { useMemo } from 'react'; +import { Input } from '@polkadot/react-components'; +import { getContractAbi } from '@polkadot/react-components/util'; import Params from '@polkadot/react-params'; -import { getContractAbi } from './util/index.js'; -import { balanceEvents, balanceEventsOverrides } from './constants.js'; -import Input from './Input.js'; -import { useTranslation } from './translate.js'; +import { balanceEvents, balanceEventsOverrides } from '../overrides.js'; +import { useTranslation } from '../translate.js'; export interface Props { children?: React.ReactNode; diff --git a/packages/react-components/src/Extrinsic.tsx b/packages/react-params/src/Named/Extrinsic.tsx similarity index 94% rename from packages/react-components/src/Extrinsic.tsx rename to packages/react-params/src/Named/Extrinsic.tsx index 39f62227de..3b5f5e1493 100644 --- a/packages/react-components/src/Extrinsic.tsx +++ b/packages/react-params/src/Named/Extrinsic.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2023 @polkadot/app-extrinsics authors & contributors +// Copyright 2017-2023 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api/types'; @@ -7,13 +7,13 @@ import type { TypeDef } from '@polkadot/types/types'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; +import { InputExtrinsic } from '@polkadot/react-components'; import Params from '@polkadot/react-params'; import { getTypeDef } from '@polkadot/types/create'; import { isUndefined, objectSpread } from '@polkadot/util'; -import InputExtrinsic from './InputExtrinsic/index.js'; -import paramComponents from './Params/index.js'; -import { balanceCalls, balanceCallsOverrides } from './constants.js'; +import paramComponents from '../Extra/index.js'; +import { balanceCalls, balanceCallsOverrides } from '../overrides.js'; interface Props { className?: string; diff --git a/packages/react-components/src/ProposedAction.tsx b/packages/react-params/src/Named/ProposedAction.tsx similarity index 90% rename from packages/react-components/src/ProposedAction.tsx rename to packages/react-params/src/Named/ProposedAction.tsx index 122663132f..1d91eae2d8 100644 --- a/packages/react-components/src/ProposedAction.tsx +++ b/packages/react-params/src/Named/ProposedAction.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2023 @polkadot/app-democracy authors & contributors +// Copyright 2017-2023 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { Call } from '@polkadot/types/interfaces'; @@ -8,8 +8,8 @@ import React from 'react'; import { formatNumber, isString, isUndefined } from '@polkadot/util'; +import { useTranslation } from '../translate.js'; import CallExpander from './CallExpander.js'; -import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/react-params/src/Named/index.ts b/packages/react-params/src/Named/index.ts new file mode 100644 index 0000000000..acb8d2bb9c --- /dev/null +++ b/packages/react-params/src/Named/index.ts @@ -0,0 +1,8 @@ +// Copyright 2017-2023 @polkadot/react-params authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +export { default as Call } from './Call.js'; +export { default as CallExpander } from './CallExpander.js'; +export { default as Event } from './Event.js'; +export { default as Extrinsic } from './Extrinsic.js'; +export { default as ProposedAction } from './ProposedAction.js'; diff --git a/packages/react-params/src/Param/Call.tsx b/packages/react-params/src/Param/Call.tsx index ee1fb13407..7b4b2edafe 100644 --- a/packages/react-params/src/Param/Call.tsx +++ b/packages/react-params/src/Param/Call.tsx @@ -6,8 +6,9 @@ import type { Props } from '../types.js'; import React from 'react'; -import { Call, Static } from '@polkadot/react-components'; +import { Static } from '@polkadot/react-components'; +import { Call } from '../Named/index.js'; import { useTranslation } from '../translate.js'; import Bare from './Bare.js'; import Unknown from './Unknown.js'; diff --git a/packages/react-params/src/index.tsx b/packages/react-params/src/index.tsx index 8e9ba8cad6..43d930a804 100644 --- a/packages/react-params/src/index.tsx +++ b/packages/react-params/src/index.tsx @@ -7,7 +7,7 @@ import type { ComponentMap, ParamDef, RawParam, RawParamOnChangeValue, RawParams import React from 'react'; -import { statics } from '@polkadot/react-api'; +import { statics } from '@polkadot/react-api/statics'; import { ErrorBoundary } from '@polkadot/react-components'; import { stringify } from '@polkadot/util'; @@ -16,6 +16,8 @@ import ParamComp from './ParamComp.js'; import translate from './translate.js'; import { createValue } from './values.js'; +export * from './Named/index.js'; + interface Props extends I18nProps { children?: React.ReactNode; isDisabled?: boolean; @@ -25,7 +27,7 @@ interface Props extends I18nProps { onError?: () => void; onEscape?: () => void; overrides?: ComponentMap; - params: ParamDef[]; + params?: ParamDef[]; registry?: Registry; values?: RawParams | null; withBorder?: boolean; @@ -44,7 +46,7 @@ class Params extends React.PureComponent { params: null }; - public static getDerivedStateFromProps ({ isDisabled, params, registry = statics.api.registry, values }: Props, prevState: State): Pick | null { + public static getDerivedStateFromProps ({ isDisabled, params = [], registry = statics.api.registry, values }: Props, prevState: State): Pick | null { if (isDisabled || stringify(prevState.params) === stringify(params)) { return null; } @@ -97,7 +99,7 @@ class Params extends React.PureComponent { >
- {values && params.map(({ name, type }: ParamDef, index: number): React.ReactNode => ( + {values && params?.map(({ name, type }: ParamDef, index: number): React.ReactNode => ( ': BalanceParam, + u128: BalanceParam +}; + +export const balanceEventsOverrides = balanceCallsOverrides; diff --git a/packages/react-params/tsconfig.build.json b/packages/react-params/tsconfig.build.json index da24d9f225..da54afa434 100644 --- a/packages/react-params/tsconfig.build.json +++ b/packages/react-params/tsconfig.build.json @@ -5,5 +5,10 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-api/tsconfig.xref.json" }, + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-params/tsconfig.xref.json" } + ] } diff --git a/packages/react-params/tsconfig.xref.json b/packages/react-params/tsconfig.xref.json new file mode 100644 index 0000000000..f9fb4a8d66 --- /dev/null +++ b/packages/react-params/tsconfig.xref.json @@ -0,0 +1,12 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "..", + "outDir": "./build", + "rootDir": "./src" + }, + "include": [ + "src/types.ts" + ], + "references": [] +} diff --git a/packages/react-query/src/BlockToTime.tsx b/packages/react-query/src/BlockToTime.tsx index 82fbb0360f..35d81ab770 100644 --- a/packages/react-query/src/BlockToTime.tsx +++ b/packages/react-query/src/BlockToTime.tsx @@ -6,7 +6,7 @@ import type { BN } from '@polkadot/util'; import React from 'react'; -import { styled } from '@polkadot/react-components'; +import { styled } from '@polkadot/react-components/styled'; import { useBlockTime } from '@polkadot/react-hooks'; interface Props { diff --git a/packages/react-query/src/Elapsed.tsx b/packages/react-query/src/Elapsed.tsx index f74a2ad924..64696d852d 100644 --- a/packages/react-query/src/Elapsed.tsx +++ b/packages/react-query/src/Elapsed.tsx @@ -5,7 +5,7 @@ import type { BN } from '@polkadot/util'; import React, { useEffect, useState } from 'react'; -import { styled } from '@polkadot/react-components'; +import { styled } from '@polkadot/react-components/styled'; import { bnToBn } from '@polkadot/util'; type Ticker = (now: number) => void; diff --git a/packages/react-query/src/FormatBalance.tsx b/packages/react-query/src/FormatBalance.tsx index ae2e52bed9..bf6c4078fc 100644 --- a/packages/react-query/src/FormatBalance.tsx +++ b/packages/react-query/src/FormatBalance.tsx @@ -7,7 +7,7 @@ import type { BN } from '@polkadot/util'; import React, { useMemo } from 'react'; -import { styled } from '@polkadot/react-components'; +import { styled } from '@polkadot/react-components/styled'; import { useApi } from '@polkadot/react-hooks'; import { formatBalance, isString } from '@polkadot/util'; diff --git a/packages/react-query/tsconfig.build.json b/packages/react-query/tsconfig.build.json index da24d9f225..4390f3e846 100644 --- a/packages/react-query/tsconfig.build.json +++ b/packages/react-query/tsconfig.build.json @@ -5,5 +5,7 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "references": [ + { "path": "../react-hooks/tsconfig.build.json" } + ] } diff --git a/packages/react-signer/src/Transaction.tsx b/packages/react-signer/src/Transaction.tsx index d6ee59ca80..ce3dd22b9b 100644 --- a/packages/react-signer/src/Transaction.tsx +++ b/packages/react-signer/src/Transaction.tsx @@ -6,7 +6,8 @@ import type { BN } from '@polkadot/util'; import React from 'react'; -import { CallExpander, Modal, styled } from '@polkadot/react-components'; +import { Modal, styled } from '@polkadot/react-components'; +import { CallExpander } from '@polkadot/react-params'; import PaymentInfo from './PaymentInfo.js'; import { useTranslation } from './translate.js'; diff --git a/packages/react-signer/src/signers/index.ts b/packages/react-signer/src/signers/index.ts index 07b4f97e11..6b090a85f7 100644 --- a/packages/react-signer/src/signers/index.ts +++ b/packages/react-signer/src/signers/index.ts @@ -1,6 +1,9 @@ // Copyright 2017-2023 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 +// we use augmented types in this tsconfig +import '@polkadot/api-augment/substrate'; + export { AccountSigner } from './AccountSigner.js'; export { ApiSigner } from './ApiSigner.js'; export { LedgerSigner } from './LedgerSigner.js'; diff --git a/packages/react-signer/tsconfig.build.json b/packages/react-signer/tsconfig.build.json index da24d9f225..efbbdc2b2a 100644 --- a/packages/react-signer/tsconfig.build.json +++ b/packages/react-signer/tsconfig.build.json @@ -5,5 +5,16 @@ "outDir": "./build", "rootDir": "./src" }, - "references": [] + "exclude": [ + "src/signers/*", + "src/types.ts", + "src/util.ts" + ], + "references": [ + { "path": "../react-components/tsconfig.build.json" }, + { "path": "../react-components/tsconfig.xref.json" }, + { "path": "../react-hooks/tsconfig.build.json" }, + { "path": "../react-params/tsconfig.build.json" }, + { "path": "../react-signer/tsconfig.xref.json" } + ] } diff --git a/packages/react-signer/tsconfig.xref.json b/packages/react-signer/tsconfig.xref.json new file mode 100644 index 0000000000..bb8da2f5ec --- /dev/null +++ b/packages/react-signer/tsconfig.xref.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": "..", + "outDir": "./build", + "rootDir": "./src" + }, + "include": [ + "src/signers/*", + "src/types.ts", + "src/util.ts" + ], + "references": [ + { "path": "../react-components/tsconfig.xref.json" } + ] +} diff --git a/packages/test-support/src/api/index.ts b/packages/test-support/src/api/index.ts index 3b03746b11..b7e4beb1e9 100644 --- a/packages/test-support/src/api/index.ts +++ b/packages/test-support/src/api/index.ts @@ -1,5 +1,7 @@ // Copyright 2017-2023 @polkadot/test-support authors & contributors // SPDX-License-Identifier: Apache-2.0 +import '@polkadot/api-augment/substrate'; + export * from './createApi.js'; export * from './createAugmentedApi.js'; diff --git a/packages/test-support/tsconfig.build.json b/packages/test-support/tsconfig.build.json index 0eaf4c7138..54a63a9c8f 100644 --- a/packages/test-support/tsconfig.build.json +++ b/packages/test-support/tsconfig.build.json @@ -1,10 +1,21 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { + "baseUrl": "..", + "outDir": "./build", + "rootDir": "./src", "module": "CommonJS", - "target": "es2018" + "target": "es2018", + /* This is a cjs target, so ignore */ + "verbatimModuleSyntax": false }, - "references": [], + "exclude": [ + "scripts/*" + ], + "references": [ + { "path": "../react-api/tsconfig.build.json" }, + { "path": "../react-api/tsconfig.xref.json" } + ], "ts-node": { "require": [ "tsconfig-paths/register" diff --git a/tsconfig.base.json b/tsconfig.base.json index 382dae4265..0cac87df5a 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -60,8 +60,8 @@ "@polkadot/app-signing": ["page-signing/src/index.tsx"], "@polkadot/app-society": ["page-society/src/index.tsx"], "@polkadot/app-staking": ["page-staking/src/index.tsx"], - "@polkadot/app-staking/Legend": ["page-staking/src/Legend.tsx"], "@polkadot/app-staking2": ["page-staking2/src/index.tsx"], + "@polkadot/app-staking2/Legend": ["page-staking2/src/Legend.tsx"], "@polkadot/app-staking2/Pools": ["page-staking2/src/Pools/index.tsx"], "@polkadot/app-staking2/Pools/*": ["page-staking2/src/Pools/*.ts"], "@polkadot/app-storage": ["page-storage/src/index.tsx"], @@ -82,6 +82,7 @@ "@polkadot/react-components/InputConsts/*": ["react-components/src/InputConsts/*.ts"], "@polkadot/react-components/Popup/*": ["react-components/src/Popup/*.ts"], "@polkadot/react-components/Status/*": ["react-components/src/Status/*.ts"], + "@polkadot/react-components/styled": ["react-components/src/styled.ts"], "@polkadot/react-components/styles": ["react-components/src/styles/index.ts"], "@polkadot/react-components/styles/*": ["react-components/src/styles/*.ts"], "@polkadot/react-components/types": ["react-components/src/types.ts"], @@ -99,6 +100,7 @@ "@polkadot/react-params/valueToText": ["react-params/src/valueToText.tsx"], "@polkadot/react-query": ["react-query/src/index.ts"], "@polkadot/react-signer": ["react-signer/src/index.tsx"], + "@polkadot/react-signer/signers": ["react-signer/src/signers/index.ts"], "@polkadot/test-support/api": ["test-support/src/api/index.ts"], "@polkadot/test-support/creation/*": ["test-support/src/creation/*.ts"], "@polkadot/test-support/hooks": ["test-support/src/hooks/index.ts"], diff --git a/tsconfig.build.json b/tsconfig.build.json index 463dc975dd..78c57270e2 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,21 +1,71 @@ { - "extends": "./tsconfig.base.json", "compilerOptions": { - "baseUrl": "./packages", - "composite": true, - "outDir": "./build", - /* - * We have a couple of issues that forces us to disable this - - * 1. apps-electron is still CJS - * 2. some of our packaged dependencies are problematic - * - * (also disabled in tsconfig.json) - */ - "verbatimModuleSyntax": false + "composite": true }, - "exclude": [ - "build/**/*", - "**/build/**/*" - ], - "references": [] + "files": [], + "references": [ + { "path": "./packages/apps/tsconfig.build.json" }, + { "path": "./packages/apps-config/tsconfig.build.json" }, + { "path": "./packages/apps-config/tsconfig.spec.json" }, + { "path": "./packages/apps-electron/tsconfig.build.json" }, + { "path": "./packages/apps-routing/tsconfig.build.json" }, + { "path": "./packages/page-accounts/tsconfig.build.json" }, + { "path": "./packages/page-accounts/tsconfig.spec.json" }, + { "path": "./packages/page-accounts/tsconfig.test.json" }, + { "path": "./packages/page-addresses/tsconfig.build.json" }, + { "path": "./packages/page-addresses/tsconfig.spec.json" }, + { "path": "./packages/page-addresses/tsconfig.test.json" }, + { "path": "./packages/page-alliance/tsconfig.build.json" }, + { "path": "./packages/page-assets/tsconfig.build.json" }, + { "path": "./packages/page-bounties/tsconfig.build.json" }, + { "path": "./packages/page-bounties/tsconfig.spec.json" }, + { "path": "./packages/page-bounties/tsconfig.test.json" }, + { "path": "./packages/page-calendar/tsconfig.build.json" }, + { "path": "./packages/page-claims/tsconfig.build.json" }, + { "path": "./packages/page-collator/tsconfig.build.json" }, + { "path": "./packages/page-contracts/tsconfig.build.json" }, + { "path": "./packages/page-council/tsconfig.build.json" }, + { "path": "./packages/page-democracy/tsconfig.build.json" }, + { "path": "./packages/page-explorer/tsconfig.build.json" }, + { "path": "./packages/page-extrinsics/tsconfig.build.json" }, + { "path": "./packages/page-fellowship/tsconfig.build.json" }, + { "path": "./packages/page-files/tsconfig.build.json" }, + { "path": "./packages/page-gilt/tsconfig.build.json" }, + { "path": "./packages/page-js/tsconfig.build.json" }, + { "path": "./packages/page-membership/tsconfig.build.json" }, + { "path": "./packages/page-nfts/tsconfig.build.json" }, + { "path": "./packages/page-nis/tsconfig.build.json" }, + { "path": "./packages/page-parachains/tsconfig.build.json" }, + { "path": "./packages/page-poll/tsconfig.build.json" }, + { "path": "./packages/page-preimages/tsconfig.build.json" }, + { "path": "./packages/page-ranked/tsconfig.build.json" }, + { "path": "./packages/page-referenda/tsconfig.build.json" }, + { "path": "./packages/page-rpc/tsconfig.build.json" }, + { "path": "./packages/page-runtime/tsconfig.build.json" }, + { "path": "./packages/page-scheduler/tsconfig.build.json" }, + { "path": "./packages/page-settings/tsconfig.build.json" }, + { "path": "./packages/page-signing/tsconfig.build.json" }, + { "path": "./packages/page-society/tsconfig.build.json" }, + { "path": "./packages/page-staking/tsconfig.build.json" }, + { "path": "./packages/page-staking2/tsconfig.build.json" }, + { "path": "./packages/page-storage/tsconfig.build.json" }, + { "path": "./packages/page-sudo/tsconfig.build.json" }, + { "path": "./packages/page-tech-comm/tsconfig.build.json" }, + { "path": "./packages/page-treasury/tsconfig.build.json" }, + { "path": "./packages/page-utilities/tsconfig.build.json" }, + { "path": "./packages/page-whitelist/tsconfig.build.json" }, + { "path": "./packages/react-api/tsconfig.build.json" }, + { "path": "./packages/react-api/tsconfig.xref.json" }, + { "path": "./packages/react-components/tsconfig.build.json" }, + { "path": "./packages/react-components/tsconfig.spec.json" }, + { "path": "./packages/react-components/tsconfig.xref.json" }, + { "path": "./packages/react-hooks/tsconfig.build.json" }, + { "path": "./packages/react-hooks/tsconfig.xref.json" }, + { "path": "./packages/react-params/tsconfig.build.json" }, + { "path": "./packages/react-params/tsconfig.xref.json" }, + { "path": "./packages/react-query/tsconfig.build.json" }, + { "path": "./packages/react-signer/tsconfig.build.json" }, + { "path": "./packages/react-signer/tsconfig.xref.json" }, + { "path": "./packages/test-support/tsconfig.build.json" } + ] } diff --git a/yarn.lock b/yarn.lock index b6d5f27f6a..de6bd19440 100644 --- a/yarn.lock +++ b/yarn.lock @@ -355,21 +355,21 @@ __metadata: languageName: node linkType: hard -"@eslint-community/eslint-utils@npm:^4.2.0": - version: 4.2.0 - resolution: "@eslint-community/eslint-utils@npm:4.2.0" +"@eslint-community/eslint-utils@npm:^4.1.2, @eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": + version: 4.4.0 + resolution: "@eslint-community/eslint-utils@npm:4.4.0" dependencies: eslint-visitor-keys: ^3.3.0 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - checksum: 82fdd1cc2a5d169def0e665ec790580ef708e7df9c91f20006595dc90e3bd42ec31c8976a2eeccd336286301a72e937c0ddf3ab4b7377d7014997c36333a7d22 + checksum: cdfe3ae42b4f572cbfb46d20edafe6f36fc5fb52bf2d90875c58aefe226892b9677fef60820e2832caf864a326fe4fc225714c46e8389ccca04d5f9288aabd22 languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.4.0": - version: 4.4.0 - resolution: "@eslint-community/regexpp@npm:4.4.0" - checksum: 2d127af0c752b80e8a782eacfe996a86925d21de92da3ffc6f9e615e701145e44a62e26bdd88bfac2cd76779c39ba8d9875a91046ec5e7e5f23cb647c247ea6a +"@eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.5.0": + version: 4.5.1 + resolution: "@eslint-community/regexpp@npm:4.5.1" + checksum: 6d901166d64998d591fab4db1c2f872981ccd5f6fe066a1ad0a93d4e11855ecae6bfb76660869a469563e8882d4307228cebd41142adb409d182f2966771e57e languageName: node linkType: hard @@ -1865,7 +1865,7 @@ __metadata: version: 0.0.0-use.local resolution: "@polkadot/apps-electron@workspace:packages/apps-electron" dependencies: - "@polkadot/dev": ^0.73.17 + "@polkadot/dev": ^0.74.1 "@polkadot/react-components": ^0.130.2-13-x "@types/tmp": ^0.2.3 copy-webpack-plugin: ^11.0.0 @@ -1897,7 +1897,7 @@ __metadata: dependencies: "@polkadot/apps-config": ^0.130.2-13-x "@polkadot/apps-routing": ^0.130.2-13-x - "@polkadot/dev": ^0.73.17 + "@polkadot/dev": ^0.74.1 "@polkadot/react-api": ^0.130.2-13-x "@polkadot/react-components": ^0.130.2-13-x "@polkadot/react-hooks": ^0.130.2-13-x @@ -1931,34 +1931,34 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/dev-test@npm:^0.73.17": - version: 0.73.17 - resolution: "@polkadot/dev-test@npm:0.73.17" +"@polkadot/dev-test@npm:^0.74.1": + version: 0.74.1 + resolution: "@polkadot/dev-test@npm:0.74.1" dependencies: jsdom: ^22.0.0 - tslib: ^2.5.0 - checksum: 6f1445bc80e39cf876e855723ead48488d81f03834b6387b11afcbd61209e5c113c064d497fe7db3e8710976bb469832eb08647169505134d69d6768ccf5256c + tslib: ^2.5.1 + checksum: b7b532bb068ae4616ac1359c5ba63c3d9ff28936d23281eb9d316ca9efa81e4b10672336b66ad2314de2dccea04877632aa56f6e725d8c8e41522f0eb09dcd40 languageName: node linkType: hard -"@polkadot/dev-ts@npm:^0.73.17": - version: 0.73.17 - resolution: "@polkadot/dev-ts@npm:0.73.17" +"@polkadot/dev-ts@npm:^0.74.1": + version: 0.74.1 + resolution: "@polkadot/dev-ts@npm:0.74.1" dependencies: json5: ^2.2.3 - tslib: ^2.5.0 + tslib: ^2.5.1 typescript: ^5.0.4 - checksum: 9656f481564d5e031270a2d9a91a90ae5c0897044dedc5b897a360df9205ad09506c8fab0f1a1aae7ddc26a6fc20ae2a163288d2d13595254d2ca6ab061ac93d + checksum: 6e1c21dc15cf958033ce59c577474c24f0bad61210cd9fa0eed821ba222e736a4c7688e367b9cba1f42c848884182682732fbc333330cbd6a2b5bc5acf09e915 languageName: node linkType: hard -"@polkadot/dev@npm:^0.73.17": - version: 0.73.17 - resolution: "@polkadot/dev@npm:0.73.17" +"@polkadot/dev@npm:^0.74.1": + version: 0.74.1 + resolution: "@polkadot/dev@npm:0.74.1" dependencies: "@eslint/js": ^8.40.0 - "@polkadot/dev-test": ^0.73.17 - "@polkadot/dev-ts": ^0.73.17 + "@polkadot/dev-test": ^0.74.1 + "@polkadot/dev-ts": ^0.74.1 "@rollup/plugin-alias": ^5.0.0 "@rollup/plugin-commonjs": ^25.0.0 "@rollup/plugin-dynamic-import-vars": ^2.0.3 @@ -1967,8 +1967,8 @@ __metadata: "@rollup/plugin-node-resolve": ^15.0.2 "@rushstack/eslint-patch": ^1.2.0 "@tsconfig/strictest": ^2.0.1 - "@typescript-eslint/eslint-plugin": ^5.59.5 - "@typescript-eslint/parser": ^5.59.5 + "@typescript-eslint/eslint-plugin": ^5.59.6 + "@typescript-eslint/parser": ^5.59.6 eslint: ^8.40.0 eslint-config-standard: ^17.0.0 eslint-import-resolver-node: ^0.3.7 @@ -1977,7 +1977,7 @@ __metadata: eslint-plugin-import: ^2.27.5 eslint-plugin-import-newlines: ^1.3.1 eslint-plugin-jest: ^27.2.1 - eslint-plugin-n: ^15.7.0 + eslint-plugin-n: ^16.0.0 eslint-plugin-promise: ^6.1.1 eslint-plugin-react: ^7.32.2 eslint-plugin-react-hooks: ^4.6.0 @@ -1985,12 +1985,17 @@ __metadata: eslint-plugin-sort-destructure-keys: ^1.5.0 gh-pages: ^5.0.0 gh-release: ^7.0.2 + json5: ^2.2.3 madge: ^6.0.0 - rollup: ^3.21.6 + react: ^18.2.0 + react-dom: ^18.2.0 + react-is: ^18.2.0 + rollup: ^3.22.0 rollup-plugin-cleanup: ^3.2.1 - tslib: ^2.5.0 + styled-components: ^5.3.10 + tslib: ^2.5.1 typescript: ^5.0.4 - webpack: ^5.82.1 + webpack: ^5.83.1 webpack-cli: ^5.1.1 webpack-dev-server: ^4.15.0 webpack-merge: ^5.8.0 @@ -2020,7 +2025,7 @@ __metadata: polkadot-exec-rollup: scripts/polkadot-exec-rollup.mjs polkadot-exec-tsc: scripts/polkadot-exec-tsc.mjs polkadot-exec-webpack: scripts/polkadot-exec-webpack.mjs - checksum: 43057fdcfa519df1bef02c679bb9b5a813ac0ab418ade7d26541544839d6b58447a8dc2fa41cb7f5d781bd624f199448cf136537dec3cdc04707f688075fceb4 + checksum: 89c8cd6ae49c509a24b4daf280f03da555d06c21758d40dcaac22fe95bdf221fd12370e7bd60c7872659e01ec549e0c017902362a1813bf116821e1abf155f6f languageName: node linkType: hard @@ -3773,14 +3778,14 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^5.59.5": - version: 5.59.5 - resolution: "@typescript-eslint/eslint-plugin@npm:5.59.5" +"@typescript-eslint/eslint-plugin@npm:^5.59.6": + version: 5.59.6 + resolution: "@typescript-eslint/eslint-plugin@npm:5.59.6" dependencies: "@eslint-community/regexpp": ^4.4.0 - "@typescript-eslint/scope-manager": 5.59.5 - "@typescript-eslint/type-utils": 5.59.5 - "@typescript-eslint/utils": 5.59.5 + "@typescript-eslint/scope-manager": 5.59.6 + "@typescript-eslint/type-utils": 5.59.6 + "@typescript-eslint/utils": 5.59.6 debug: ^4.3.4 grapheme-splitter: ^1.0.4 ignore: ^5.2.0 @@ -3793,43 +3798,43 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: cc0e5ad8d70e140f0dada2fd1ad69d7c31d3f3dfe75939286fdc3950ff2e37033889acc7c9d92c074b67de3bbb6e46916d688e848fb98dde63b23c08a8b07884 + checksum: fc495b5eadc70603f0d677921a70f151ac94453ebd76b77abbf7ed213c09daf05a3e2b2e2b16139b30dc6574d068d988e4e53c017759f3d3307fa394cfd4ae39 languageName: node linkType: hard -"@typescript-eslint/parser@npm:^5.59.5": - version: 5.59.5 - resolution: "@typescript-eslint/parser@npm:5.59.5" +"@typescript-eslint/parser@npm:^5.59.6": + version: 5.59.6 + resolution: "@typescript-eslint/parser@npm:5.59.6" dependencies: - "@typescript-eslint/scope-manager": 5.59.5 - "@typescript-eslint/types": 5.59.5 - "@typescript-eslint/typescript-estree": 5.59.5 + "@typescript-eslint/scope-manager": 5.59.6 + "@typescript-eslint/types": 5.59.6 + "@typescript-eslint/typescript-estree": 5.59.6 debug: ^4.3.4 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: typescript: optional: true - checksum: ef4122074f2c00be1dabbb3fb5534280f81b45f8de6c1a696092af5175684fea65bc002814546d06f880ea5beff2006589e2633662e92d65035437c8e2d9134c + checksum: 1f6e259f501e3d13f9632bd71da2cf3d11150f1276079522e8d5c392a07c3aea867c855481981fca3bf32beb6bef046ef64cdfceba8ea4150f27099e44d9a92c languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:5.59.5": - version: 5.59.5 - resolution: "@typescript-eslint/scope-manager@npm:5.59.5" +"@typescript-eslint/scope-manager@npm:5.59.6": + version: 5.59.6 + resolution: "@typescript-eslint/scope-manager@npm:5.59.6" dependencies: - "@typescript-eslint/types": 5.59.5 - "@typescript-eslint/visitor-keys": 5.59.5 - checksum: b3d8a5b70e741b9bef60d0a297da77e844cb744895f31fb6880fdac4c53f7c58f3e04065a7d644afb6e1dc51591285ec866eca2fbd2ad50de6b376031aaccfbd + "@typescript-eslint/types": 5.59.6 + "@typescript-eslint/visitor-keys": 5.59.6 + checksum: 65cce7b3fc320e264ef966da9a26bb7cba014ec5a0c9c5518cb08a624d67ac6eb67dd8e2df49b33eeaaaacaf42c73f291d56f93a9d1ec82c58bd1e7e872e530b languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:5.59.5": - version: 5.59.5 - resolution: "@typescript-eslint/type-utils@npm:5.59.5" +"@typescript-eslint/type-utils@npm:5.59.6": + version: 5.59.6 + resolution: "@typescript-eslint/type-utils@npm:5.59.6" dependencies: - "@typescript-eslint/typescript-estree": 5.59.5 - "@typescript-eslint/utils": 5.59.5 + "@typescript-eslint/typescript-estree": 5.59.6 + "@typescript-eslint/utils": 5.59.6 debug: ^4.3.4 tsutils: ^3.21.0 peerDependencies: @@ -3837,7 +3842,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 9ef2b219c71abe3d2ffa4c791ec3da8d120b6a202e7f9c7722d1e8193f8709d6ebec2abc2862b9fa78dffe6214d033898d21c925fc961feb4488070b66aab9f5 + checksum: f8e09dc16f413090ec464d48bd86e1b44a569e5a6ed78370f3e8132e80a464dfcdc1525f4f0706b79e397841b1865016cb38353475264beec49851d78a7fdd36 languageName: node linkType: hard @@ -3848,19 +3853,19 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:5.59.5": - version: 5.59.5 - resolution: "@typescript-eslint/types@npm:5.59.5" - checksum: 98c93d354d6410934f468ba8bd468d2746f20b2910c0ef5b08fc788c0742aa7cb82eb2edc4194c85d3fabac5563c1a91d377e84bf5c25caeb4ac9e871aabd4bb +"@typescript-eslint/types@npm:5.59.6": + version: 5.59.6 + resolution: "@typescript-eslint/types@npm:5.59.6" + checksum: e898ca629d95b69f5dbfb7c9a3d28f943e5a372d37bf7efaefb41341d2d7147372cd4956b35b637e9b3a1b8555d64a5b35776650b815c4227b114513247ec2b5 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:5.59.5, @typescript-eslint/typescript-estree@npm:^5.13.0": - version: 5.59.5 - resolution: "@typescript-eslint/typescript-estree@npm:5.59.5" +"@typescript-eslint/typescript-estree@npm:5.59.6, @typescript-eslint/typescript-estree@npm:^5.13.0": + version: 5.59.6 + resolution: "@typescript-eslint/typescript-estree@npm:5.59.6" dependencies: - "@typescript-eslint/types": 5.59.5 - "@typescript-eslint/visitor-keys": 5.59.5 + "@typescript-eslint/types": 5.59.6 + "@typescript-eslint/visitor-keys": 5.59.6 debug: ^4.3.4 globby: ^11.1.0 is-glob: ^4.0.3 @@ -3869,7 +3874,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10a8c01ad53da115ca698668941dcb18c497035ba07faf08237bfa3ab92185bdfaf1df93562915a936b49e9f72a4cc6b10b1d9296b7cdc8c34ba0ca323c37677 + checksum: 65b7879e8cd4ccb987c1e1fa75cd84250cb46799ba0de6cdcaec70f6700b45ae4efcebb24163ca7946152e1b12595ee58e35bfb31ea6d35b3f39deaf973d4f1a languageName: node linkType: hard @@ -3891,21 +3896,21 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@npm:5.59.5, @typescript-eslint/utils@npm:^5.10.0, @typescript-eslint/utils@npm:^5.57.0": - version: 5.59.5 - resolution: "@typescript-eslint/utils@npm:5.59.5" +"@typescript-eslint/utils@npm:5.59.6, @typescript-eslint/utils@npm:^5.10.0, @typescript-eslint/utils@npm:^5.57.0": + version: 5.59.6 + resolution: "@typescript-eslint/utils@npm:5.59.6" dependencies: "@eslint-community/eslint-utils": ^4.2.0 "@types/json-schema": ^7.0.9 "@types/semver": ^7.3.12 - "@typescript-eslint/scope-manager": 5.59.5 - "@typescript-eslint/types": 5.59.5 - "@typescript-eslint/typescript-estree": 5.59.5 + "@typescript-eslint/scope-manager": 5.59.6 + "@typescript-eslint/types": 5.59.6 + "@typescript-eslint/typescript-estree": 5.59.6 eslint-scope: ^5.1.1 semver: ^7.3.7 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 2703972653d3c6eab2423d9a2586908086afa3b89580969ed38e454bc372265d5ca9fadf7967e4ea639d482ad069f763981ef4a03a42d79df28f43f00ee9d43a + checksum: 40ffe1d2f1fbf6c30aa05f4a68785fb1e77aa09772ea45b001daf4068e504830cf60a441a819b2c6ffe4a19216aba404869300b2ce6bc2a67d093f74ded504a7 languageName: node linkType: hard @@ -3919,13 +3924,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:5.59.5": - version: 5.59.5 - resolution: "@typescript-eslint/visitor-keys@npm:5.59.5" +"@typescript-eslint/visitor-keys@npm:5.59.6": + version: 5.59.6 + resolution: "@typescript-eslint/visitor-keys@npm:5.59.6" dependencies: - "@typescript-eslint/types": 5.59.5 + "@typescript-eslint/types": 5.59.6 eslint-visitor-keys: ^3.3.0 - checksum: 94db281ec8ea3a7ede46763aaa0d3349e035b19334fd03e2e560f89c70faebcfa937d51b53d2eaad2506b60a5d901428cc8b5a65ad8e90ca1c12a133dbe977fc + checksum: 8f216411344f5ed618ab838fa3fc4b04f3041f33e08d9b160df4db988f496c71f934c4b0362f686ce63ecf7f5d926c67190d5116c91945c1957544728449ec6b languageName: node linkType: hard @@ -7978,15 +7983,15 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-es@npm:^4.1.0": - version: 4.1.0 - resolution: "eslint-plugin-es@npm:4.1.0" +"eslint-plugin-es-x@npm:^6.1.0": + version: 6.1.0 + resolution: "eslint-plugin-es-x@npm:6.1.0" dependencies: - eslint-utils: ^2.0.0 - regexpp: ^3.0.0 + "@eslint-community/eslint-utils": ^4.1.2 + "@eslint-community/regexpp": ^4.5.0 peerDependencies: - eslint: ">=4.19.1" - checksum: 26b87a216d3625612b1d3ca8653ac8a1d261046d2a973bb0eb2759070267d2bfb0509051facdeb5ae03dc8dfb51a434be23aff7309a752ca901d637da535677f + eslint: ">=8" + checksum: b347d34655fef18b20cbc4a9e362b65aa547a3703fff4162342ee987d4804f2607d2e3f21f140b6c005e3b790e09b4a0fabd0b87eb7c89918654fc5d4b2b510c languageName: node linkType: hard @@ -8052,21 +8057,21 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-n@npm:^15.7.0": - version: 15.7.0 - resolution: "eslint-plugin-n@npm:15.7.0" +"eslint-plugin-n@npm:^16.0.0": + version: 16.0.0 + resolution: "eslint-plugin-n@npm:16.0.0" dependencies: + "@eslint-community/eslint-utils": ^4.4.0 builtins: ^5.0.1 - eslint-plugin-es: ^4.1.0 - eslint-utils: ^3.0.0 + eslint-plugin-es-x: ^6.1.0 ignore: ^5.1.1 - is-core-module: ^2.11.0 + is-core-module: ^2.12.0 minimatch: ^3.1.2 - resolve: ^1.22.1 - semver: ^7.3.8 + resolve: ^1.22.2 + semver: ^7.5.0 peerDependencies: eslint: ">=7.0.0" - checksum: cfbcc67e62adf27712afdeadf13223cb9717f95d4af8442056d9d4c97a8b88af76b7969f75deaac26fa98481023d6b7c9e43a28909e7f0468f40b3024b7bcfae + checksum: 77bb74747ee021cd33d6027a1e13620a910a05755e42e29b4f810ef52800ae62bd21057c5e7de66dc3b8cbc9bc8332eeea4c9e14ed889284e549278d1520fe3e languageName: node linkType: hard @@ -8153,33 +8158,6 @@ __metadata: languageName: node linkType: hard -"eslint-utils@npm:^2.0.0": - version: 2.1.0 - resolution: "eslint-utils@npm:2.1.0" - dependencies: - eslint-visitor-keys: ^1.1.0 - checksum: 27500938f348da42100d9e6ad03ae29b3de19ba757ae1a7f4a087bdcf83ac60949bbb54286492ca61fac1f5f3ac8692dd21537ce6214240bf95ad0122f24d71d - languageName: node - linkType: hard - -"eslint-utils@npm:^3.0.0": - version: 3.0.0 - resolution: "eslint-utils@npm:3.0.0" - dependencies: - eslint-visitor-keys: ^2.0.0 - peerDependencies: - eslint: ">=5" - checksum: 0668fe02f5adab2e5a367eee5089f4c39033af20499df88fe4e6aba2015c20720404d8c3d6349b6f716b08fdf91b9da4e5d5481f265049278099c4c836ccb619 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^1.1.0": - version: 1.3.0 - resolution: "eslint-visitor-keys@npm:1.3.0" - checksum: 37a19b712f42f4c9027e8ba98c2b06031c17e0c0a4c696cd429bd9ee04eb43889c446f2cd545e1ff51bef9593fcec94ecd2c2ef89129fcbbf3adadbef520376a - languageName: node - linkType: hard - "eslint-visitor-keys@npm:^2.0.0": version: 2.0.0 resolution: "eslint-visitor-keys@npm:2.0.0" @@ -10604,12 +10582,12 @@ fsevents@~2.3.2: languageName: node linkType: hard -"is-core-module@npm:^2.11.0, is-core-module@npm:^2.9.0": - version: 2.11.0 - resolution: "is-core-module@npm:2.11.0" +"is-core-module@npm:^2.11.0, is-core-module@npm:^2.12.0, is-core-module@npm:^2.9.0": + version: 2.12.1 + resolution: "is-core-module@npm:2.12.1" dependencies: has: ^1.0.3 - checksum: f96fd490c6b48eb4f6d10ba815c6ef13f410b0ba6f7eb8577af51697de523e5f2cd9de1c441b51d27251bf0e4aebc936545e33a5d26d5d51f28d25698d4a8bab + checksum: f04ea30533b5e62764e7b2e049d3157dc0abd95ef44275b32489ea2081176ac9746ffb1cdb107445cf1ff0e0dfcad522726ca27c27ece64dadf3795428b8e468 languageName: node linkType: hard @@ -13753,7 +13731,7 @@ fsevents@~2.3.2: dependencies: "@crustio/crust-pin": ^1.0.0 "@pinata/sdk": ^1.2.1 - "@polkadot/dev": ^0.73.17 + "@polkadot/dev": ^0.74.1 "@types/chart.js": ^2.9.37 "@types/file-saver": ^2.0.5 "@types/react-beautiful-dnd": ^13.1.4 @@ -14767,13 +14745,6 @@ fsevents@~2.3.2: languageName: node linkType: hard -"regexpp@npm:^3.0.0": - version: 3.2.0 - resolution: "regexpp@npm:3.2.0" - checksum: a78dc5c7158ad9ddcfe01aa9144f46e192ddbfa7b263895a70a5c6c73edd9ce85faf7c0430e59ac38839e1734e275b9c3de5c57ee3ab6edc0e0b1bdebefccef8 - languageName: node - linkType: hard - "registry-auth-token@npm:^4.0.0": version: 4.2.1 resolution: "registry-auth-token@npm:4.2.1" @@ -15003,16 +14974,16 @@ fsevents@~2.3.2: languageName: node linkType: hard -"resolve@^1.1.6, resolve@^1.10.0, resolve@^1.20.0, resolve@npm:^1.21.0, resolve@npm:^1.22.1": - version: 1.22.1 - resolution: "resolve@npm:1.22.1" +"resolve@^1.1.6, resolve@^1.10.0, resolve@^1.20.0, resolve@npm:^1.21.0, resolve@npm:^1.22.1, resolve@npm:^1.22.2": + version: 1.22.3 + resolution: "resolve@npm:1.22.3" dependencies: - is-core-module: ^2.9.0 + is-core-module: ^2.12.0 path-parse: ^1.0.7 supports-preserve-symlinks-flag: ^1.0.0 bin: resolve: bin/resolve - checksum: 07af5fc1e81aa1d866cbc9e9460fbb67318a10fa3c4deadc35c3ad8a898ee9a71a86a65e4755ac3195e0ea0cfbe201eb323ebe655ce90526fd61917313a34e4e + checksum: fb834b81348428cb545ff1b828a72ea28feb5a97c026a1cf40aa1008352c72811ff4d4e71f2035273dc536dcfcae20c13604ba6283c612d70fa0b6e44519c374 languageName: node linkType: hard @@ -15029,16 +15000,16 @@ fsevents@~2.3.2: languageName: node linkType: hard -"resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.21.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin": - version: 1.22.1 - resolution: "resolve@patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b" +"resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.21.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin, resolve@patch:resolve@^1.22.2#~builtin": + version: 1.22.3 + resolution: "resolve@patch:resolve@npm%3A1.22.3#~builtin::version=1.22.3&hash=07638b" dependencies: - is-core-module: ^2.9.0 + is-core-module: ^2.12.0 path-parse: ^1.0.7 supports-preserve-symlinks-flag: ^1.0.0 bin: resolve: bin/resolve - checksum: 5656f4d0bedcf8eb52685c1abdf8fbe73a1603bb1160a24d716e27a57f6cecbe2432ff9c89c2bd57542c3a7b9d14b1882b73bfe2e9d7849c9a4c0b8b39f02b8b + checksum: ad59734723b596d0891321c951592ed9015a77ce84907f89c9d9307dd0c06e11a67906a3e628c4cae143d3e44898603478af0ddeb2bba3f229a9373efe342665 languageName: node linkType: hard @@ -15175,9 +15146,9 @@ fsevents@~2.3.2: languageName: node linkType: hard -"rollup@npm:^3.21.6": - version: 3.21.6 - resolution: "rollup@npm:3.21.6" +"rollup@npm:^3.22.0": + version: 3.22.0 + resolution: "rollup@npm:3.22.0" dependencies: fsevents: ~2.3.2 dependenciesMeta: @@ -15185,7 +15156,7 @@ fsevents@~2.3.2: optional: true bin: rollup: dist/bin/rollup - checksum: bb6786ee0d755f253d3aa3820b05806a482abe9c9fd6dad14df83b386a370d48af20c4be66f732a15b5e89c0ae6269a7b82736b64f34ae61552c58de0eecedeb + checksum: 6da2bfe1eb16714ccd4bf56ca92430309dc71b4492a3c38502f68f645433dcc789fb79f3761fc2269aa0cf20ece7821c4d7c95b860b7343c2ed52ed1c36c9a90 languageName: node linkType: hard @@ -15477,14 +15448,14 @@ fsevents@~2.3.2: languageName: node linkType: hard -"semver@npm:^7.0.0, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8": - version: 7.3.8 - resolution: "semver@npm:7.3.8" +"semver@npm:^7.0.0, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.0": + version: 7.5.1 + resolution: "semver@npm:7.5.1" dependencies: lru-cache: ^6.0.0 bin: semver: bin/semver.js - checksum: ba9c7cbbf2b7884696523450a61fee1a09930d888b7a8d7579025ad93d459b2d1949ee5bbfeb188b2be5f4ac163544c5e98491ad6152df34154feebc2cc337c1 + checksum: d16dbedad53c65b086f79524b9ef766bf38670b2395bdad5c957f824dcc566b624988013564f4812bcace3f9d405355c3635e2007396a39d1bffc71cfec4a2fc languageName: node linkType: hard @@ -16904,10 +16875,10 @@ fsevents@~2.3.2: languageName: node linkType: hard -"tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.5.0": - version: 2.5.0 - resolution: "tslib@npm:2.5.0" - checksum: ae3ed5f9ce29932d049908ebfdf21b3a003a85653a9a140d614da6b767a93ef94f460e52c3d787f0e4f383546981713f165037dc2274df212ea9f8a4541004e1 +"tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.5.0, tslib@npm:^2.5.1": + version: 2.5.2 + resolution: "tslib@npm:2.5.2" + checksum: 4d3c1e238b94127ed0e88aa0380db3c2ddae581dc0f4bae5a982345e9f50ee5eda90835b8bfba99b02df10a5734470be197158c36f9129ac49fdc14a6a9da222 languageName: node linkType: hard @@ -18114,9 +18085,9 @@ fsevents@~2.3.2: languageName: node linkType: hard -"webpack@npm:^5.82.1": - version: 5.82.1 - resolution: "webpack@npm:5.82.1" +"webpack@npm:^5.83.1": + version: 5.83.1 + resolution: "webpack@npm:5.83.1" dependencies: "@types/eslint-scope": ^3.7.3 "@types/estree": ^1.0.0 @@ -18147,7 +18118,7 @@ fsevents@~2.3.2: optional: true bin: webpack: bin/webpack.js - checksum: 747ee7ebd238c15249c2652060e3c6ca6d62cc66dcf7e4e2824ecd4875b7ea5e01fce8f4179080a3e84dfdb3c8d0992700444c7c5a05ef47b38c0623d3ac76de + checksum: 219d5ef50380bc0fd3702ed17feddf13819d8173b78f7a5b857dc74ac177e63d1f79c050792754411cc088bbc02e0971b989efddadbb8e393cf27d64c0ad9ff8 languageName: node linkType: hard