diff --git a/package.json b/package.json index 757144076c..fc866bf706 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.70.4", + "@polkadot/dev": "^0.71.1", "@types/chart.js": "^2.9.37", "@types/file-saver": "^2.0.5", "@types/react-beautiful-dnd": "^13.1.3", diff --git a/packages/apps-config/src/api/chain/index.ts b/packages/apps-config/src/api/chain/index.ts index b7f5eb8766..34faa6ff4a 100644 --- a/packages/apps-config/src/api/chain/index.ts +++ b/packages/apps-config/src/api/chain/index.ts @@ -3,7 +3,7 @@ import type { OverrideBundleDefinition } from '@polkadot/types/types'; -import kilt from './kilt'; +import kilt from './kilt.js'; // NOTE: The mapping is done from chain name in system.chain const chain: Record = { diff --git a/packages/apps-config/src/api/derives.ts b/packages/apps-config/src/api/derives.ts index 5e1a35b222..35a0ef6ae9 100644 --- a/packages/apps-config/src/api/derives.ts +++ b/packages/apps-config/src/api/derives.ts @@ -3,10 +3,10 @@ import type { OverrideBundleDefinition, OverrideBundleType } from '@polkadot/types/types'; -import equilibrium from './spec/equilibrium'; -import genshiro from './spec/genshiro'; -import interbtc from './spec/interbtc'; -import subspace from './spec/subspace'; +import equilibrium from './spec/equilibrium.js'; +import genshiro from './spec/genshiro.js'; +import interbtc from './spec/interbtc.js'; +import subspace from './spec/subspace.js'; const mapping: [OverrideBundleDefinition, string[]][] = [ [equilibrium, ['Equilibrium']], diff --git a/packages/apps-config/src/api/index.spec.ts b/packages/apps-config/src/api/index.spec.ts index f861eeede3..c3a887d9cc 100644 --- a/packages/apps-config/src/api/index.spec.ts +++ b/packages/apps-config/src/api/index.spec.ts @@ -3,8 +3,8 @@ import type { OverrideBundleDefinition } from '@polkadot/types/types'; -import spec from './spec'; -import { typesBundle } from '.'; +import spec from './spec/index.js'; +import { typesBundle } from './index.js'; function getDerives (spec: Record): string[] { return Object diff --git a/packages/apps-config/src/api/index.ts b/packages/apps-config/src/api/index.ts index 1843efb610..95b722dd16 100644 --- a/packages/apps-config/src/api/index.ts +++ b/packages/apps-config/src/api/index.ts @@ -1,10 +1,10 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { applyDerives } from './derives'; -import { typesBundle as typesOnlyBundle } from './typesBundle'; +import { applyDerives } from './derives.js'; +import { typesBundle as typesOnlyBundle } from './typesBundle.js'; -export * from './constants'; -export * from './params'; +export * from './params/index.js'; +export * from './constants.js'; export const typesBundle = applyDerives(typesOnlyBundle); diff --git a/packages/apps-config/src/api/params/index.ts b/packages/apps-config/src/api/params/index.ts index 219de45180..ef397c8a66 100644 --- a/packages/apps-config/src/api/params/index.ts +++ b/packages/apps-config/src/api/params/index.ts @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -export * from './inflation'; -export * from './proposalThresholds'; -export * from './teleport'; -export * from './tracks'; +export * from './inflation.js'; +export * from './proposalThresholds.js'; +export * from './teleport.js'; +export * from './tracks/index.js'; diff --git a/packages/apps-config/src/api/params/inflation.ts b/packages/apps-config/src/api/params/inflation.ts index d600dd783d..56e2211986 100644 --- a/packages/apps-config/src/api/params/inflation.ts +++ b/packages/apps-config/src/api/params/inflation.ts @@ -3,7 +3,7 @@ import type { ApiPromise } from '@polkadot/api'; -import { DOCK_POS_TESTNET_GENESIS, KUSAMA_GENESIS, NEATCOIN_GENESIS, NFTMART_GENESIS, POLKADOT_GENESIS } from '../constants'; +import { DOCK_POS_TESTNET_GENESIS, KUSAMA_GENESIS, NEATCOIN_GENESIS, NFTMART_GENESIS, POLKADOT_GENESIS } from '../constants.js'; interface InflationParams { auctionAdjust: number; diff --git a/packages/apps-config/src/api/params/proposalThresholds.ts b/packages/apps-config/src/api/params/proposalThresholds.ts index b41e6cc71a..2968f3693c 100644 --- a/packages/apps-config/src/api/params/proposalThresholds.ts +++ b/packages/apps-config/src/api/params/proposalThresholds.ts @@ -3,7 +3,7 @@ import type { ApiPromise } from '@polkadot/api'; -import { KULUPU_GENESIS, KUSAMA_GENESIS, POLKADOT_GENESIS } from '../constants'; +import { KULUPU_GENESIS, KUSAMA_GENESIS, POLKADOT_GENESIS } from '../constants.js'; // normal fast-track proposals const FAST_TRACK: Record = { diff --git a/packages/apps-config/src/api/params/teleport.ts b/packages/apps-config/src/api/params/teleport.ts index 03c35261cd..e78df02ab6 100644 --- a/packages/apps-config/src/api/params/teleport.ts +++ b/packages/apps-config/src/api/params/teleport.ts @@ -3,7 +3,7 @@ import type { ApiPromise } from '@polkadot/api'; -import { KUSAMA_GENESIS } from '../constants'; +import { KUSAMA_GENESIS } from '../constants.js'; // 4 * BaseXcmWeight on Kusama const KUSAMA_WEIGHT = 4 * 1_000_000_000; diff --git a/packages/apps-config/src/api/params/tracks/index.ts b/packages/apps-config/src/api/params/tracks/index.ts index d7a0db24aa..bf32da77fa 100644 --- a/packages/apps-config/src/api/params/tracks/index.ts +++ b/packages/apps-config/src/api/params/tracks/index.ts @@ -2,11 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import type { ApiPromise } from '@polkadot/api'; -import type { TrackInfo } from './types'; +import type { TrackInfo } from './types.js'; -import { KUSAMA_GENESIS, POLKADOT_GENESIS } from '../../constants'; -import { kusama } from './kusama'; -import { polkadot } from './polkadot'; +import { KUSAMA_GENESIS, POLKADOT_GENESIS } from '../../constants.js'; +import { kusama } from './kusama.js'; +import { polkadot } from './polkadot.js'; const KNOWN_GENE_TRACKS: Record> = { [KUSAMA_GENESIS]: kusama, diff --git a/packages/apps-config/src/api/params/tracks/kusama.ts b/packages/apps-config/src/api/params/tracks/kusama.ts index 24ea4e13ad..082a037301 100644 --- a/packages/apps-config/src/api/params/tracks/kusama.ts +++ b/packages/apps-config/src/api/params/tracks/kusama.ts @@ -1,11 +1,11 @@ // Copyright 2017-2023 @polkadot/app-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { TrackInfo } from './types'; +import type { TrackInfo } from './types.js'; import { BN } from '@polkadot/util'; -import { compareFellowshipRank, formatSpendFactory } from './util'; +import { compareFellowshipRank, formatSpendFactory } from './util.js'; // hardcoded here since this is static (hopefully no re-denomination anytime...) const formatSpend = formatSpendFactory({ diff --git a/packages/apps-config/src/api/params/tracks/polkadot.ts b/packages/apps-config/src/api/params/tracks/polkadot.ts index f51f750ed3..3cc6ef05cf 100644 --- a/packages/apps-config/src/api/params/tracks/polkadot.ts +++ b/packages/apps-config/src/api/params/tracks/polkadot.ts @@ -1,11 +1,11 @@ // Copyright 2017-2023 @polkadot/app-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { TrackInfo } from './types'; +import type { TrackInfo } from './types.js'; import { BN } from '@polkadot/util'; -import { compareFellowshipRank, formatSpendFactory } from './util'; +import { compareFellowshipRank, formatSpendFactory } from './util.js'; // hardcoded here since this is static (hopefully no re-denomination anytime...) const formatSpend = formatSpendFactory({ diff --git a/packages/apps-config/src/api/spec/genshiro.ts b/packages/apps-config/src/api/spec/genshiro.ts index 75a3d27746..2ced580f62 100644 --- a/packages/apps-config/src/api/spec/genshiro.ts +++ b/packages/apps-config/src/api/spec/genshiro.ts @@ -5,7 +5,7 @@ import type { OverrideBundleDefinition } from '@polkadot/types/types'; import eqDefs from '@equilab/definitions'; -import { createCustomAccount, u64FromCurrency } from './equilibrium'; +import { createCustomAccount, u64FromCurrency } from './equilibrium.js'; const { genshiro } = eqDefs; diff --git a/packages/apps-config/src/api/spec/index.ts b/packages/apps-config/src/api/spec/index.ts index f21d53190e..effa8283d4 100644 --- a/packages/apps-config/src/api/spec/index.ts +++ b/packages/apps-config/src/api/spec/index.ts @@ -3,132 +3,132 @@ import type { OverrideBundleDefinition } from '@polkadot/types/types'; -import acala from './acala'; -import ajuna from './ajuna'; -import altair from './altair'; -import apron from './apron'; -import aresGladios from './ares-gladios'; -import aresParachain from './ares-parachain'; -import astar from './astar'; -import automata from './automata'; -import bajun from './bajun'; -import basilisk from './basilisk'; -import beresheet from './beresheet'; -import bifrost from './bifrost'; -import bifrostAsgard from './bifrost-asgard'; -import bifrostParachain from './bifrost-parachain'; -import bitcountry from './bitcountry'; -import bitcountryPioneer from './bitcountry-pioneer'; -import bitcountryParachain from './bitcountry-rococo'; -import centrifuge from './centrifuge'; -import centrifugeChain from './centrifuge-chain'; -import chainx from './chainx'; -import clover from './clover'; -import cloverRococo from './clover-rococo'; -import coinversation from './coinversation'; -import competitorsClub from './competitors-club'; -import contracts from './contracts'; -import crab from './crab'; -import crownSterlingChain from './crown-sterling'; -import crust from './crust'; -import testPara from './cumulus-test-parachain'; -import darwinia from './darwinia'; -import datahighwayParachain from './datahighway'; -import dockMainnet from './dock-mainnet'; -import dockTestnet from './dock-testnet'; -import dotmog from './dotmog'; -import eave from './eave'; -import edgeware from './edgeware'; -import encointerNodeNotee from './encointer-node-notee'; -import encointerNodeTeeproxy from './encointer-node-teeproxy'; -import encointerPara from './encointer-para'; -import equilibrium from './equilibrium'; -import fantour from './fantour'; -import frequency from './frequency'; -import galital from './galital'; -import galitalParachain from './galital-parachain'; -import galois from './galois'; -import gamepower from './gamepower'; -import genshiro from './genshiro'; -import hanonycash from './hanonycash'; -import hydrate from './hydrate'; -import idavoll from './idavoll'; -import imbue from './imbue'; -import integritee from './integritee'; -import interbtc from './interbtc'; -import ipse from './ipse'; -import jupiter from './jupiter'; -import jupiterRococo from './jupiter-rococo'; -import jur from './jur'; -import khala from './khala'; -import konomi from './konomi'; -import kpron from './kpron'; -import kulupu from './kulupu'; -import kusari from './kusari'; -import kylin from './kylin'; -import laminar from './laminar'; -import litentry from './litentry'; -import logion from './logion'; -import logionParachain from './logion-parachain'; -import mangata from './mangata'; -import manta from './manta'; -import mathchain from './mathchain'; -import moonbeam from './moonbeam'; -import mybank from './mybank'; -import neatcoin from './neatcoin'; -import nftmart from './nftmart'; -import nodle from './nodle'; -import oak from './oak'; -import opal from './opal'; -import opportunity from './opportunity'; -import origintrail from './origintrail'; -import pangolin from './pangolin'; -import pangoro from './pangoro'; -import parallel from './parallel'; -import parami from './parami'; -import phoenix from './phoenix'; -import pichiu from './pichiu'; -import polkadex from './polkadex'; -import polkafoundry from './polkafoundry'; -import polymesh from './polymesh'; -import pontem from './pontem'; -import prism from './prism'; -import quartz from './quartz'; -import realis from './realis'; -import riochain from './riochain'; -import robonomics from './robonomics'; -import rootnet from './rootnet'; -import sapphire from './sapphire'; -import shibuya from './shibuya'; -import shiden from './shiden'; -import snowbridge from './snowbridge'; -import soraSubstrate from './soraSubstrate'; -import spanner from './spanner'; -import stafi from './stafi'; -import standard from './standard'; -import subdao from './subdao'; -import subgame from './subgame'; -import subsocial from './subsocial'; -import subspace from './subspace'; -import substrateContractsNode from './substrateContractsNode'; -import swapdex from './swapdex'; -import t0rn from './t0rn'; -import ternoa from './ternoa'; -import trustbase from './trustbase'; -import turing from './turing'; -import uart from './uart'; -import unique from './unique'; -import unitnetwork from './unitnetwork'; -import unitv from './unitv'; -import vln from './vln'; -import vlnrococo from './vln-rococo'; -import vodka from './vodka'; -import web3games from './web3games'; -import westlake from './westlake'; -import zCloak from './zCloak'; -import zeitgeist from './zeitgeist'; -import zenlink from './zenlink'; -import zero from './zero'; +import acala from './acala.js'; +import ajuna from './ajuna.js'; +import altair from './altair.js'; +import apron from './apron.js'; +import aresGladios from './ares-gladios.js'; +import aresParachain from './ares-parachain.js'; +import astar from './astar.js'; +import automata from './automata.js'; +import bajun from './bajun.js'; +import basilisk from './basilisk.js'; +import beresheet from './beresheet.js'; +import bifrost from './bifrost.js'; +import bifrostAsgard from './bifrost-asgard.js'; +import bifrostParachain from './bifrost-parachain.js'; +import bitcountry from './bitcountry.js'; +import bitcountryPioneer from './bitcountry-pioneer.js'; +import bitcountryParachain from './bitcountry-rococo.js'; +import centrifuge from './centrifuge.js'; +import centrifugeChain from './centrifuge-chain.js'; +import chainx from './chainx.js'; +import clover from './clover.js'; +import cloverRococo from './clover-rococo.js'; +import coinversation from './coinversation.js'; +import competitorsClub from './competitors-club.js'; +import contracts from './contracts.js'; +import crab from './crab.js'; +import crownSterlingChain from './crown-sterling.js'; +import crust from './crust.js'; +import testPara from './cumulus-test-parachain.js'; +import darwinia from './darwinia.js'; +import datahighwayParachain from './datahighway.js'; +import dockMainnet from './dock-mainnet.js'; +import dockTestnet from './dock-testnet.js'; +import dotmog from './dotmog.js'; +import eave from './eave.js'; +import edgeware from './edgeware.js'; +import encointerNodeNotee from './encointer-node-notee.js'; +import encointerNodeTeeproxy from './encointer-node-teeproxy.js'; +import encointerPara from './encointer-para.js'; +import equilibrium from './equilibrium.js'; +import fantour from './fantour.js'; +import frequency from './frequency.js'; +import galital from './galital.js'; +import galitalParachain from './galital-parachain.js'; +import galois from './galois.js'; +import gamepower from './gamepower.js'; +import genshiro from './genshiro.js'; +import hanonycash from './hanonycash.js'; +import hydrate from './hydrate.js'; +import idavoll from './idavoll.js'; +import imbue from './imbue.js'; +import integritee from './integritee.js'; +import interbtc from './interbtc.js'; +import ipse from './ipse.js'; +import jupiter from './jupiter.js'; +import jupiterRococo from './jupiter-rococo.js'; +import jur from './jur.js'; +import khala from './khala.js'; +import konomi from './konomi.js'; +import kpron from './kpron.js'; +import kulupu from './kulupu.js'; +import kusari from './kusari.js'; +import kylin from './kylin.js'; +import laminar from './laminar.js'; +import litentry from './litentry.js'; +import logion from './logion.js'; +import logionParachain from './logion-parachain.js'; +import mangata from './mangata.js'; +import manta from './manta.js'; +import mathchain from './mathchain.js'; +import moonbeam from './moonbeam.js'; +import mybank from './mybank.js'; +import neatcoin from './neatcoin.js'; +import nftmart from './nftmart.js'; +import nodle from './nodle.js'; +import oak from './oak.js'; +import opal from './opal.js'; +import opportunity from './opportunity.js'; +import origintrail from './origintrail.js'; +import pangolin from './pangolin.js'; +import pangoro from './pangoro.js'; +import parallel from './parallel.js'; +import parami from './parami.js'; +import phoenix from './phoenix.js'; +import pichiu from './pichiu.js'; +import polkadex from './polkadex.js'; +import polkafoundry from './polkafoundry.js'; +import polymesh from './polymesh.js'; +import pontem from './pontem.js'; +import prism from './prism.js'; +import quartz from './quartz.js'; +import realis from './realis.js'; +import riochain from './riochain.js'; +import robonomics from './robonomics.js'; +import rootnet from './rootnet.js'; +import sapphire from './sapphire.js'; +import shibuya from './shibuya.js'; +import shiden from './shiden.js'; +import snowbridge from './snowbridge.js'; +import soraSubstrate from './soraSubstrate.js'; +import spanner from './spanner.js'; +import stafi from './stafi.js'; +import standard from './standard.js'; +import subdao from './subdao.js'; +import subgame from './subgame.js'; +import subsocial from './subsocial.js'; +import subspace from './subspace.js'; +import substrateContractsNode from './substrateContractsNode.js'; +import swapdex from './swapdex.js'; +import t0rn from './t0rn.js'; +import ternoa from './ternoa.js'; +import trustbase from './trustbase.js'; +import turing from './turing.js'; +import uart from './uart.js'; +import unique from './unique.js'; +import unitnetwork from './unitnetwork.js'; +import unitv from './unitv.js'; +import vln from './vln.js'; +import vlnrococo from './vln-rococo.js'; +import vodka from './vodka.js'; +import web3games from './web3games.js'; +import westlake from './westlake.js'; +import zCloak from './zCloak.js'; +import zeitgeist from './zeitgeist.js'; +import zenlink from './zenlink.js'; +import zero from './zero.js'; // NOTE: The mapping is done from specName in state.getRuntimeVersion const spec: Record = { diff --git a/packages/apps-config/src/api/spec/zeitgeist.ts b/packages/apps-config/src/api/spec/zeitgeist.ts index 088529f1aa..050bf73cbd 100644 --- a/packages/apps-config/src/api/spec/zeitgeist.ts +++ b/packages/apps-config/src/api/spec/zeitgeist.ts @@ -5,7 +5,7 @@ import type { OverrideBundleDefinition } from '@polkadot/types/types'; import * as typeDefs from '@zeitgeistpm/type-defs'; -import { typesFromDefs } from '../util'; +import { typesFromDefs } from '../util.js'; const bundle = { alias: { diff --git a/packages/apps-config/src/api/typesBundle.spec.ts b/packages/apps-config/src/api/typesBundle.spec.ts index 048c60d376..eabca8143f 100644 --- a/packages/apps-config/src/api/typesBundle.spec.ts +++ b/packages/apps-config/src/api/typesBundle.spec.ts @@ -5,8 +5,8 @@ import fs from 'node:fs'; import { objectSpread } from '@polkadot/util'; -import chain from './chain'; -import spec from './spec'; +import chain from './chain/index.js'; +import spec from './spec/index.js'; // Technically this shouldn't be a test - it was that way since historically we // didn't use something like ts-node. Now however we can actually replace this diff --git a/packages/apps-config/src/ci/chainEndpoints.spec.ts b/packages/apps-config/src/ci/chainEndpoints.spec.ts index 1c40d24327..8847f8db74 100644 --- a/packages/apps-config/src/ci/chainEndpoints.spec.ts +++ b/packages/apps-config/src/ci/chainEndpoints.spec.ts @@ -4,8 +4,8 @@ import { assert, isString } from '@polkadot/util'; import { WebSocket } from '@polkadot/x-ws'; -import { createWsEndpoints } from '../endpoints'; -import { fetchJson } from './fetch'; +import { createWsEndpoints } from '../endpoints/index.js'; +import { fetchJson } from './fetch.js'; interface Endpoint { name: string; diff --git a/packages/apps-config/src/detectPackage.ts b/packages/apps-config/src/detectPackage.ts index 299b056dd5..70e278d746 100644 --- a/packages/apps-config/src/detectPackage.ts +++ b/packages/apps-config/src/detectPackage.ts @@ -5,7 +5,7 @@ import { detectPackage } from '@polkadot/util'; -import others from './detectOther'; -import { packageInfo } from './packageInfo'; +import others from './detectOther.js'; +import { packageInfo } from './packageInfo.js'; detectPackage(packageInfo, null, others); diff --git a/packages/apps-config/src/endpoints/development.ts b/packages/apps-config/src/endpoints/development.ts index 69363d976c..d7a5fbc343 100644 --- a/packages/apps-config/src/endpoints/development.ts +++ b/packages/apps-config/src/endpoints/development.ts @@ -1,8 +1,8 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { TFunction } from '../types'; -import type { LinkOption } from './types'; +import type { TFunction } from '../types.js'; +import type { LinkOption } from './types.js'; export const CUSTOM_ENDPOINT_KEY = 'polkadot-app-custom-endpoints'; diff --git a/packages/apps-config/src/endpoints/index.spec.ts b/packages/apps-config/src/endpoints/index.spec.ts index d2c15d48af..9d87749f6d 100644 --- a/packages/apps-config/src/endpoints/index.spec.ts +++ b/packages/apps-config/src/endpoints/index.spec.ts @@ -5,7 +5,7 @@ import { strict as assert } from 'node:assert'; import { isNumber, isString } from '@polkadot/util'; -import { createWsEndpoints } from '.'; +import { createWsEndpoints } from './index.js'; interface Endpoint { name: string; diff --git a/packages/apps-config/src/endpoints/index.ts b/packages/apps-config/src/endpoints/index.ts index dc3a16c56d..faf3a5897c 100644 --- a/packages/apps-config/src/endpoints/index.ts +++ b/packages/apps-config/src/endpoints/index.ts @@ -1,17 +1,17 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { TFunction, TOptions } from '../types'; -import type { LinkOption } from './types'; +import type { TFunction, TOptions } from '../types.js'; +import type { LinkOption } from './types.js'; -import { createCustom, createDev, createOwn } from './development'; -import { prodChains, prodRelayKusama, prodRelayPolkadot } from './production'; -import { testChains, testRelayRococo, testRelayWestend } from './testing'; -import { expandEndpoints } from './util'; +import { createCustom, createDev, createOwn } from './development.js'; +import { prodChains, prodRelayKusama, prodRelayPolkadot } from './production.js'; +import { testChains, testRelayRococo, testRelayWestend } from './testing.js'; +import { expandEndpoints } from './util.js'; -export { CUSTOM_ENDPOINT_KEY } from './development'; -export * from './production'; -export * from './testing'; +export { CUSTOM_ENDPOINT_KEY } from './development.js'; +export * from './production.js'; +export * from './testing.js'; function defaultT (keyOrText: string, text?: string, options?: TOptions): string { return ( diff --git a/packages/apps-config/src/endpoints/production.ts b/packages/apps-config/src/endpoints/production.ts index 0bf894d821..0d5058e08a 100644 --- a/packages/apps-config/src/endpoints/production.ts +++ b/packages/apps-config/src/endpoints/production.ts @@ -1,13 +1,13 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { EndpointOption } from './types'; +import type { EndpointOption } from './types.js'; -import { chains3dpassPNG, chainsAlephSVG, chainsBittensorPNG, chainsCreditcoinPNG, chainsDebioSVG, chainsEquilibriumSVG, chainsGenshiroSVG, chainsLogionPNG, chainsMyriadPNG, chainsSpannerPNG } from '../ui/logos/chains'; -import { nodesAresOdysseySVG, nodesAutomataPNG, nodesCentrifugePNG, nodesChainxSVG, nodesCompetitorsClubPNG, nodesCrabSVG, nodesCrownSterlingPNG, nodesCrustSVG, nodesDarwiniaSVG, nodesDatahighwayPNG, nodesDockPNG, nodesEdgewareWhitePNG, nodesEfinitySVG, nodesHanyonycashPNG, nodesHumanodePNG, nodesJoystreamSVG, nodesKulupuSVG, nodesKusariSVG, nodesMathSVG, nodesMinixPNG, nodesNftmartPNG, nodesNodleSVG, nodesPolkadexSVG, nodesPolymeshSVG, nodesRiochainSVG, nodesRobonomicsSVG, nodesSherpaxPNG, nodesSoraSubstrateSVG, nodesStafiPNG, nodesSubgameSVG, nodesSubsocialSVG, nodesSwapdexSVG, nodesTernoaSVG, nodesThebifrostPNG, nodesUniartsPNG, nodesUnitnetworkPNG } from '../ui/logos/nodes'; +import { chains3dpassPNG, chainsAlephSVG, chainsBittensorPNG, chainsCreditcoinPNG, chainsDebioSVG, chainsEquilibriumSVG, chainsGenshiroSVG, chainsLogionPNG, chainsMyriadPNG, chainsSpannerPNG } from '../ui/logos/chains/index.js'; +import { nodesAresOdysseySVG, nodesAutomataPNG, nodesCentrifugePNG, nodesChainxSVG, nodesCompetitorsClubPNG, nodesCrabSVG, nodesCrownSterlingPNG, nodesCrustSVG, nodesDarwiniaSVG, nodesDatahighwayPNG, nodesDockPNG, nodesEdgewareWhitePNG, nodesEfinitySVG, nodesHanyonycashPNG, nodesHumanodePNG, nodesJoystreamSVG, nodesKulupuSVG, nodesKusariSVG, nodesMathSVG, nodesMinixPNG, nodesNftmartPNG, nodesNodleSVG, nodesPolkadexSVG, nodesPolymeshSVG, nodesRiochainSVG, nodesRobonomicsSVG, nodesSherpaxPNG, nodesSoraSubstrateSVG, nodesStafiPNG, nodesSubgameSVG, nodesSubsocialSVG, nodesSwapdexSVG, nodesTernoaSVG, nodesThebifrostPNG, nodesUniartsPNG, nodesUnitnetworkPNG } from '../ui/logos/nodes/index.js'; -export * from './productionRelayKusama'; -export * from './productionRelayPolkadot'; +export * from './productionRelayKusama.js'; +export * from './productionRelayPolkadot.js'; // The available endpoints that will show in the dropdown. For the most part (with the exception of // Polkadot) we try to keep this to live chains only, with RPCs hosted by the community/chain vendor diff --git a/packages/apps-config/src/endpoints/productionRelayKusama.ts b/packages/apps-config/src/endpoints/productionRelayKusama.ts index 0652520b30..7caf3c3f8c 100644 --- a/packages/apps-config/src/endpoints/productionRelayKusama.ts +++ b/packages/apps-config/src/endpoints/productionRelayKusama.ts @@ -1,12 +1,12 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { EndpointOption } from './types'; +import type { EndpointOption } from './types.js'; -import { KUSAMA_GENESIS } from '../api/constants'; -import { chainsAbandPNG, chainsAltairSVG, chainsAmplitudeSVG, chainsDorafactoryPNG, chainsGenshiroSVG, chainsGmJPEG, chainsKaruraSVG, chainsKicoPNG, chainsKintsugiPNG, chainsKusamaSVG, chainsListenPNG, chainsMangataPNG, chainsRiodefiPNG, chainsShidenPNG, chainsTinkerPNG, chainsTuringPNG, chainsUnorthodoxPNG } from '../ui/logos/chains'; -import { nodesApronPNG, nodesAresMarsPNG, nodesBajunPNG, nodesBasiliskPNG, nodesBifrostSVG, nodesBitcountryPNG, nodesBridgeHubBlackSVG, nodesCalamariPNG, nodesCrabSVG, nodesDatahighwayPNG, nodesEncointerBlueSVG, nodesImbuePNG, nodesIntegriteeSVG, nodesIpciSVG, nodesKabochaSVG, nodesKhalaSVG, nodesKrestPNG, nodesLitmusPNG, nodesLoomNetworkPNG, nodesMoonriverSVG, nodesParallelSVG, nodesPicassoPNG, nodesPichiuPNG, nodesPolkasmithSVG, nodesQuartzPNG, nodesRobonomicsSVG, nodesSakuraSVG, nodesShadowSVG, nodesSnowPNG, nodesSoraSubstrateSVG, nodesStatemineSVG, nodesSubgameSVG, nodesSubsocialXSVG, nodesTrustbasePNG, nodesZeitgeistPNG, nodesZeroSVG } from '../ui/logos/nodes'; -import { getTeleports } from './util'; +import { KUSAMA_GENESIS } from '../api/constants.js'; +import { chainsAbandPNG, chainsAltairSVG, chainsAmplitudeSVG, chainsDorafactoryPNG, chainsGenshiroSVG, chainsGmJPEG, chainsKaruraSVG, chainsKicoPNG, chainsKintsugiPNG, chainsKusamaSVG, chainsListenPNG, chainsMangataPNG, chainsRiodefiPNG, chainsShidenPNG, chainsTinkerPNG, chainsTuringPNG, chainsUnorthodoxPNG } from '../ui/logos/chains/index.js'; +import { nodesApronPNG, nodesAresMarsPNG, nodesBajunPNG, nodesBasiliskPNG, nodesBifrostSVG, nodesBitcountryPNG, nodesBridgeHubBlackSVG, nodesCalamariPNG, nodesCrabSVG, nodesDatahighwayPNG, nodesEncointerBlueSVG, nodesImbuePNG, nodesIntegriteeSVG, nodesIpciSVG, nodesKabochaSVG, nodesKhalaSVG, nodesKrestPNG, nodesLitmusPNG, nodesLoomNetworkPNG, nodesMoonriverSVG, nodesParallelSVG, nodesPicassoPNG, nodesPichiuPNG, nodesPolkasmithSVG, nodesQuartzPNG, nodesRobonomicsSVG, nodesSakuraSVG, nodesShadowSVG, nodesSnowPNG, nodesSoraSubstrateSVG, nodesStatemineSVG, nodesSubgameSVG, nodesSubsocialXSVG, nodesTrustbasePNG, nodesZeitgeistPNG, nodesZeroSVG } from '../ui/logos/nodes/index.js'; +import { getTeleports } from './util.js'; // The available endpoints that will show in the dropdown. For the most part (with the exception of // Polkadot) we try to keep this to live chains only, with RPCs hosted by the community/chain vendor diff --git a/packages/apps-config/src/endpoints/productionRelayPolkadot.ts b/packages/apps-config/src/endpoints/productionRelayPolkadot.ts index d6041ba87e..4acafe9f6d 100644 --- a/packages/apps-config/src/endpoints/productionRelayPolkadot.ts +++ b/packages/apps-config/src/endpoints/productionRelayPolkadot.ts @@ -1,12 +1,12 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { EndpointOption } from './types'; +import type { EndpointOption } from './types.js'; -import { POLKADOT_GENESIS } from '../api/constants'; -import { chainsAcalaSVG, chainsBitgreenPNG, chainsComposableFinancePNG, chainsEquilibriumSVG, chainsFrequencySVG, chainsGeminisPNG, chainsOakPNG, chainsOrigintrailPNG, chainsPeaqPNG, chainsPendulumSVG, chainsPolkadotCircleSVG, chainsSnakenetSVG, chainsTotemSVG, chainsWatrPNG } from '../ui/logos/chains'; -import { nodesAjunaPNG, nodesAresOdysseySVG, nodesAstarPNG, nodesAventusSVG, nodesBifrostSVG, nodesBridgeHubSVG, nodesCentrifugePNG, nodesCloverSVG, nodesCoinversationPNG, nodesCrustParachainSVG, nodesDarwiniaSVG, nodesEfinitySVG, nodesHashedPNG, nodesIntegriteeSVG, nodesInterlaySVG, nodesKiltPNG, nodesKylinPNG, nodesLitentryPNG, nodesMantaPNG, nodesMoonbeamSVG, nodesNodleSVG, nodesOmnibtcSVG, nodesParallelSVG, nodesPhalaSVG, nodesPolkadexSVG, nodesStatemineSVG, nodesSubdaoPNG, nodesSubgameSVG, nodesUniqueSVG } from '../ui/logos/nodes'; -import { getTeleports } from './util'; +import { POLKADOT_GENESIS } from '../api/constants.js'; +import { chainsAcalaSVG, chainsBitgreenPNG, chainsComposableFinancePNG, chainsEquilibriumSVG, chainsFrequencySVG, chainsGeminisPNG, chainsOakPNG, chainsOrigintrailPNG, chainsPeaqPNG, chainsPendulumSVG, chainsPolkadotCircleSVG, chainsSnakenetSVG, chainsTotemSVG, chainsWatrPNG } from '../ui/logos/chains/index.js'; +import { nodesAjunaPNG, nodesAresOdysseySVG, nodesAstarPNG, nodesAventusSVG, nodesBifrostSVG, nodesBridgeHubSVG, nodesCentrifugePNG, nodesCloverSVG, nodesCoinversationPNG, nodesCrustParachainSVG, nodesDarwiniaSVG, nodesEfinitySVG, nodesHashedPNG, nodesIntegriteeSVG, nodesInterlaySVG, nodesKiltPNG, nodesKylinPNG, nodesLitentryPNG, nodesMantaPNG, nodesMoonbeamSVG, nodesNodleSVG, nodesOmnibtcSVG, nodesParallelSVG, nodesPhalaSVG, nodesPolkadexSVG, nodesStatemineSVG, nodesSubdaoPNG, nodesSubgameSVG, nodesUniqueSVG } from '../ui/logos/nodes/index.js'; +import { getTeleports } from './util.js'; // The available endpoints that will show in the dropdown. For the most part (with the exception of // Polkadot) we try to keep this to live chains only, with RPCs hosted by the community/chain vendor diff --git a/packages/apps-config/src/endpoints/testing.ts b/packages/apps-config/src/endpoints/testing.ts index 204e265137..07ce4b4871 100644 --- a/packages/apps-config/src/endpoints/testing.ts +++ b/packages/apps-config/src/endpoints/testing.ts @@ -1,13 +1,13 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { EndpointOption } from './types'; +import type { EndpointOption } from './types.js'; -import { chains3dpassPNG, chainsAcalaSVG, chainsAlephSVG, chainsBrainstormPNG, chainsCreditcoinTestPNG, chainsDebioSVG, chainsEquilibriumSVG, chainsFerrumPNG, chainsKintsugiPNG, chainsLogionPNG, chainsMyriadPNG, chainsShidenPNG, chainsSkyekiwiPNG, chainsTanglePNG, chainsVaraSVG } from '../ui/logos/chains'; -import { nodesAjunaPNG, nodesArcticPNG, nodesAresGladiosSVG, nodesAutomataPNG, nodesBifrostSVG, nodesBitcountryPNG, nodesCessPNG, nodesCloverSVG, nodesCrustMaxwellSVG, nodesDatahighwayPNG, nodesDockPNG, nodesDolphinSVG, nodesDotmogSVG, nodesEdgewareWhitePNG, nodesEncointerBlueSVG, nodesFantourPNG, nodesGalitalLogoPNG, nodesGamepowerSVG, nodesGeekSVG, nodesInterlaySVG, nodesIpsePNG, nodesJazPNG, nodesJupiterSVG, nodesKhalaSVG, nodesKiltPNG, nodesKlugPNG, nodesKylinPNG, nodesLaminarCircleSVG, nodesLitentryPNG, nodesMantaPNG, nodesMathSVG, nodesMinixPNG, nodesMoonbaseAlphaSVG, nodesMybankPNG, nodesNftmartPNG, nodesNodleSVG, nodesOpalLogoPNG, nodesOpportunityPNG, nodesPangoroSVG, nodesPhalaSVG, nodesPhoenixPNG, nodesPichiuPNG, nodesPolkadexSVG, nodesPolkafoundrySVG, nodesPolymeshSVG, nodesPontemSVG, nodesPrismPNG, nodesRealisPNG, nodesRiochainSVG, nodesSherpaxPNG, nodesSoonsocialPNG, nodesSoraSubstrateSVG, nodesSubdaoPNG, nodesSubgameSVG, nodesSubspacePNG, nodesTernoaSVG, nodesThebifrostPNG, nodesUniartsPNG, nodesUniqueSVG, nodesUnitnetworkPNG, nodesWeb3gamesSVG, nodesZCloakSVG, nodesZeitgeistPNG } from '../ui/logos/nodes'; +import { chains3dpassPNG, chainsAcalaSVG, chainsAlephSVG, chainsBrainstormPNG, chainsCreditcoinTestPNG, chainsDebioSVG, chainsEquilibriumSVG, chainsFerrumPNG, chainsKintsugiPNG, chainsLogionPNG, chainsMyriadPNG, chainsShidenPNG, chainsSkyekiwiPNG, chainsTanglePNG, chainsVaraSVG } from '../ui/logos/chains/index.js'; +import { nodesAjunaPNG, nodesArcticPNG, nodesAresGladiosSVG, nodesAutomataPNG, nodesBifrostSVG, nodesBitcountryPNG, nodesCessPNG, nodesCloverSVG, nodesCrustMaxwellSVG, nodesDatahighwayPNG, nodesDockPNG, nodesDolphinSVG, nodesDotmogSVG, nodesEdgewareWhitePNG, nodesEncointerBlueSVG, nodesFantourPNG, nodesGalitalLogoPNG, nodesGamepowerSVG, nodesGeekSVG, nodesInterlaySVG, nodesIpsePNG, nodesJazPNG, nodesJupiterSVG, nodesKhalaSVG, nodesKiltPNG, nodesKlugPNG, nodesKylinPNG, nodesLaminarCircleSVG, nodesLitentryPNG, nodesMantaPNG, nodesMathSVG, nodesMinixPNG, nodesMoonbaseAlphaSVG, nodesMybankPNG, nodesNftmartPNG, nodesNodleSVG, nodesOpalLogoPNG, nodesOpportunityPNG, nodesPangoroSVG, nodesPhalaSVG, nodesPhoenixPNG, nodesPichiuPNG, nodesPolkadexSVG, nodesPolkafoundrySVG, nodesPolymeshSVG, nodesPontemSVG, nodesPrismPNG, nodesRealisPNG, nodesRiochainSVG, nodesSherpaxPNG, nodesSoonsocialPNG, nodesSoraSubstrateSVG, nodesSubdaoPNG, nodesSubgameSVG, nodesSubspacePNG, nodesTernoaSVG, nodesThebifrostPNG, nodesUniartsPNG, nodesUniqueSVG, nodesUnitnetworkPNG, nodesWeb3gamesSVG, nodesZCloakSVG, nodesZeitgeistPNG } from '../ui/logos/nodes/index.js'; -export * from './testingRelayRococo'; -export * from './testingRelayWestend'; +export * from './testingRelayRococo.js'; +export * from './testingRelayWestend.js'; // The available endpoints that will show in the dropdown. For the most part (with the exception of // Polkadot) we try to keep this to live chains only, with RPCs hosted by the community/chain vendor diff --git a/packages/apps-config/src/endpoints/testingRelayRococo.ts b/packages/apps-config/src/endpoints/testingRelayRococo.ts index 2580d04d3d..d0d0580b0a 100644 --- a/packages/apps-config/src/endpoints/testingRelayRococo.ts +++ b/packages/apps-config/src/endpoints/testingRelayRococo.ts @@ -1,12 +1,12 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { EndpointOption } from './types'; +import type { EndpointOption } from './types.js'; -import { ROCOCO_GENESIS } from '../api/constants'; -import { chainsAcurastPNG, chainsAmplitudeSVG, chainsBitgreenPNG, chainsFrequencySVG, chainsGenshiroSVG, chainsHydratePNG, chainsIdiyanaleLogoWhiteSVG, chainsJurPNG, chainsMangataPNG, chainsMoonsamaPNG, chainsOrigintrailTestnetPNG, chainsRococoSVG, chainsSnowbridgePNG, chainsT0rnPNG, chainsTanglePNG, chainsTinkerPNG, chainsTotemSVG, chainsTuringPNG, chainsVirtoPNG, chainsWatrPNG } from '../ui/logos/chains'; -import { nodesArcticPNG, nodesAventusSVG, nodesBajunPNG, nodesBasiliskPNG, nodesBasiliskRococoBgPNG, nodesBifrostSVG, nodesBridgeHubBlackSVG, nodesCentrifugePNG, nodesConftiSVG, nodesCrustParachainSVG, nodesDaliPNG, nodesDatahighwayPNG, nodesDolphinSVG, nodesEncointerBlueSVG, nodesGiantPNG, nodesHelixstreetPNG, nodesImbuePNG, nodesIntegriteeSVG, nodesKabochaSVG, nodesKiltPNG, nodesLitentryPNG, nodesMd5PNG, nodesNodleSVG, nodesOliSVG, nodesPangolinSVG, nodesPolkadexSVG, nodesRobonomicsSVG, nodesRocfinitySVG, nodesSoonsocialXPNG, nodesSoraSubstrateSVG, nodesStatemineSVG, nodesSubstrateContractsNodePNG, nodesUnitnetworkPNG, nodesZeitgeistPNG, nodesZeroSVG } from '../ui/logos/nodes'; -import { getTeleports } from './util'; +import { ROCOCO_GENESIS } from '../api/constants.js'; +import { chainsAcurastPNG, chainsAmplitudeSVG, chainsBitgreenPNG, chainsFrequencySVG, chainsGenshiroSVG, chainsHydratePNG, chainsIdiyanaleLogoWhiteSVG, chainsJurPNG, chainsMangataPNG, chainsMoonsamaPNG, chainsOrigintrailTestnetPNG, chainsRococoSVG, chainsSnowbridgePNG, chainsT0rnPNG, chainsTanglePNG, chainsTinkerPNG, chainsTotemSVG, chainsTuringPNG, chainsVirtoPNG, chainsWatrPNG } from '../ui/logos/chains/index.js'; +import { nodesArcticPNG, nodesAventusSVG, nodesBajunPNG, nodesBasiliskPNG, nodesBasiliskRococoBgPNG, nodesBifrostSVG, nodesBridgeHubBlackSVG, nodesCentrifugePNG, nodesConftiSVG, nodesCrustParachainSVG, nodesDaliPNG, nodesDatahighwayPNG, nodesDolphinSVG, nodesEncointerBlueSVG, nodesGiantPNG, nodesHelixstreetPNG, nodesImbuePNG, nodesIntegriteeSVG, nodesKabochaSVG, nodesKiltPNG, nodesLitentryPNG, nodesMd5PNG, nodesNodleSVG, nodesOliSVG, nodesPangolinSVG, nodesPolkadexSVG, nodesRobonomicsSVG, nodesRocfinitySVG, nodesSoonsocialXPNG, nodesSoraSubstrateSVG, nodesStatemineSVG, nodesSubstrateContractsNodePNG, nodesUnitnetworkPNG, nodesZeitgeistPNG, nodesZeroSVG } from '../ui/logos/nodes/index.js'; +import { getTeleports } from './util.js'; // The available endpoints that will show in the dropdown. For the most part (with the exception of // Polkadot) we try to keep this to live chains only, with RPCs hosted by the community/chain vendor diff --git a/packages/apps-config/src/endpoints/testingRelayWestend.ts b/packages/apps-config/src/endpoints/testingRelayWestend.ts index 809f1d8dfd..9c182dcef2 100644 --- a/packages/apps-config/src/endpoints/testingRelayWestend.ts +++ b/packages/apps-config/src/endpoints/testingRelayWestend.ts @@ -1,12 +1,12 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { EndpointOption } from './types'; +import type { EndpointOption } from './types.js'; -import { WESTEND_GENESIS } from '../api/constants'; -import { chainsKaruraSVG, chainsStandardPNG } from '../ui/logos/chains'; -import { nodesBridgeHubSVG, nodesCentrifugePNG, nodesIntegriteeSVG, nodesInterlaySVG, nodesKhalaSVG, nodesKiltPNG, nodesKylinPNG, nodesMoonshadowPNG, nodesPangoroSVG, nodesStatemineSVG, nodesWestendColourSVG } from '../ui/logos/nodes'; -import { getTeleports } from './util'; +import { WESTEND_GENESIS } from '../api/constants.js'; +import { chainsKaruraSVG, chainsStandardPNG } from '../ui/logos/chains/index.js'; +import { nodesBridgeHubSVG, nodesCentrifugePNG, nodesIntegriteeSVG, nodesInterlaySVG, nodesKhalaSVG, nodesKiltPNG, nodesKylinPNG, nodesMoonshadowPNG, nodesPangoroSVG, nodesStatemineSVG, nodesWestendColourSVG } from '../ui/logos/nodes/index.js'; +import { getTeleports } from './util.js'; // The available endpoints that will show in the dropdown. For the most part (with the exception of // Polkadot) we try to keep this to live chains only, with RPCs hosted by the community/chain vendor diff --git a/packages/apps-config/src/endpoints/types.ts b/packages/apps-config/src/endpoints/types.ts index 7035980242..ae16bbf6fa 100644 --- a/packages/apps-config/src/endpoints/types.ts +++ b/packages/apps-config/src/endpoints/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Option } from '../settings/types'; +import type { Option } from '../settings/types.js'; interface BaseOption { dnslink?: string; diff --git a/packages/apps-config/src/endpoints/util.ts b/packages/apps-config/src/endpoints/util.ts index db5cea8c50..aca9116e91 100644 --- a/packages/apps-config/src/endpoints/util.ts +++ b/packages/apps-config/src/endpoints/util.ts @@ -1,8 +1,8 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { TFunction } from '../types'; -import type { EndpointOption, LinkOption } from './types'; +import type { TFunction } from '../types.js'; +import type { EndpointOption, LinkOption } from './types.js'; interface SortOption { isUnreachable?: boolean; diff --git a/packages/apps-config/src/extensions/index.ts b/packages/apps-config/src/extensions/index.ts index 899e039177..ae618346df 100644 --- a/packages/apps-config/src/extensions/index.ts +++ b/packages/apps-config/src/extensions/index.ts @@ -1,9 +1,9 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Browser, Extension, Known } from './types'; +import type { Browser, Extension, Known } from './types.js'; -import { PolkadotJs } from './polkadot-js'; +import { PolkadotJs } from './polkadot-js.js'; // The list of known extensions including the links to tem on the store. This is // used when no extensions are actually available, promoting the user to install diff --git a/packages/apps-config/src/extensions/polkadot-js.ts b/packages/apps-config/src/extensions/polkadot-js.ts index d2a4c81074..482f474f22 100644 --- a/packages/apps-config/src/extensions/polkadot-js.ts +++ b/packages/apps-config/src/extensions/polkadot-js.ts @@ -1,10 +1,10 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Known } from './types'; +import type { Known } from './types.js'; -import { extensionsPolkadotJsSVG } from '../ui/logos/extensions'; -import { externalEmptySVG } from '../ui/logos/external'; +import { extensionsPolkadotJsSVG } from '../ui/logos/extensions/index.js'; +import { externalEmptySVG } from '../ui/logos/external/index.js'; export const PolkadotJs: Known = { all: { diff --git a/packages/apps-config/src/index.ts b/packages/apps-config/src/index.ts index 28e444ebb5..14d377b6d6 100644 --- a/packages/apps-config/src/index.ts +++ b/packages/apps-config/src/index.ts @@ -1,9 +1,9 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -export * from './api'; -export * from './endpoints'; -export * from './extensions'; -export * from './links'; -export * from './settings'; -export * from './ui'; +export * from './api/index.js'; +export * from './endpoints/index.js'; +export * from './extensions/index.js'; +export * from './links/index.js'; +export * from './settings/index.js'; +export * from './ui/index.js'; diff --git a/packages/apps-config/src/links/commonwealth.ts b/packages/apps-config/src/links/commonwealth.ts index aad470e0cd..41cbe5cb5a 100644 --- a/packages/apps-config/src/links/commonwealth.ts +++ b/packages/apps-config/src/links/commonwealth.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { ExternalDef } from './types'; +import type { ExternalDef } from './types.js'; -import { externalCommonwealthPNG } from '../ui/logos/external'; +import { externalCommonwealthPNG } from '../ui/logos/external/index.js'; const HASH_PATHS = ['proposal/councilmotion']; diff --git a/packages/apps-config/src/links/dotreasury.ts b/packages/apps-config/src/links/dotreasury.ts index e0d024672a..8b22a6bfdc 100644 --- a/packages/apps-config/src/links/dotreasury.ts +++ b/packages/apps-config/src/links/dotreasury.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { ExternalDef } from './types'; +import type { ExternalDef } from './types.js'; -import { externalDotreasurySVG } from '../ui/logos/external'; +import { externalDotreasurySVG } from '../ui/logos/external/index.js'; export const Dotreasury: ExternalDef = { chains: { diff --git a/packages/apps-config/src/links/dotscanner.ts b/packages/apps-config/src/links/dotscanner.ts index 3e3e9cede6..8c335c38a7 100644 --- a/packages/apps-config/src/links/dotscanner.ts +++ b/packages/apps-config/src/links/dotscanner.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { ExternalDef } from './types'; +import type { ExternalDef } from './types.js'; -import { externalDotscannerPNG } from '../ui/logos/external'; +import { externalDotscannerPNG } from '../ui/logos/external/index.js'; export const DotScanner: ExternalDef = { chains: { diff --git a/packages/apps-config/src/links/index.ts b/packages/apps-config/src/links/index.ts index ca292d9742..8a7af7d2c2 100644 --- a/packages/apps-config/src/links/index.ts +++ b/packages/apps-config/src/links/index.ts @@ -1,20 +1,20 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { ExternalDef } from './types'; +import type { ExternalDef } from './types.js'; -import { Commonwealth } from './commonwealth'; -import { Dotreasury } from './dotreasury'; -import { DotScanner } from './dotscanner'; -import { KodaDot } from './kodadot'; -import { Polkaholic } from './polkaholic'; -import { Polkascan } from './polkascan'; -import { PolkassemblyIo, PolkassemblyNetwork } from './polkassembly'; -import { Singular } from './singular'; -import { Statescan } from './statescan'; -import { SubId } from './subid'; -import { Subscan } from './subscan'; -import { Subsquare } from './subsquare'; +import { Commonwealth } from './commonwealth.js'; +import { Dotreasury } from './dotreasury.js'; +import { DotScanner } from './dotscanner.js'; +import { KodaDot } from './kodadot.js'; +import { Polkaholic } from './polkaholic.js'; +import { Polkascan } from './polkascan.js'; +import { PolkassemblyIo, PolkassemblyNetwork } from './polkassembly.js'; +import { Singular } from './singular.js'; +import { Statescan } from './statescan.js'; +import { SubId } from './subid.js'; +import { Subscan } from './subscan.js'; +import { Subsquare } from './subsquare.js'; export const externalLinks: Record = { Commonwealth, diff --git a/packages/apps-config/src/links/kodadot.ts b/packages/apps-config/src/links/kodadot.ts index 72cb500629..a1a677de3f 100644 --- a/packages/apps-config/src/links/kodadot.ts +++ b/packages/apps-config/src/links/kodadot.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { ExternalDef } from './types'; +import type { ExternalDef } from './types.js'; -import { externalKodadotPNG } from '../ui/logos/external'; +import { externalKodadotPNG } from '../ui/logos/external/index.js'; const getNetwork = (_chain: string) => { const chain = _chain === 'kusama' ? 'rmrk' : _chain; diff --git a/packages/apps-config/src/links/polkaholic.ts b/packages/apps-config/src/links/polkaholic.ts index 08b0655502..e9ec24359c 100644 --- a/packages/apps-config/src/links/polkaholic.ts +++ b/packages/apps-config/src/links/polkaholic.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { ExternalDef } from './types'; +import type { ExternalDef } from './types.js'; -import { externalPolkaholicPNG } from '../ui/logos/external'; +import { externalPolkaholicPNG } from '../ui/logos/external/index.js'; export const Polkaholic: ExternalDef = { chains: { diff --git a/packages/apps-config/src/links/polkascan.ts b/packages/apps-config/src/links/polkascan.ts index 68df7300ab..9e7a4f5efb 100644 --- a/packages/apps-config/src/links/polkascan.ts +++ b/packages/apps-config/src/links/polkascan.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { ExternalDef } from './types'; +import type { ExternalDef } from './types.js'; -import { externalPolkascanPNG } from '../ui/logos/external'; +import { externalPolkascanPNG } from '../ui/logos/external/index.js'; export const Polkascan: ExternalDef = { chains: { diff --git a/packages/apps-config/src/links/polkassembly.ts b/packages/apps-config/src/links/polkassembly.ts index 8e659646c0..43eff993cd 100644 --- a/packages/apps-config/src/links/polkassembly.ts +++ b/packages/apps-config/src/links/polkassembly.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { ExternalDef } from './types'; +import type { ExternalDef } from './types.js'; -import { externalPolkassemblyPNG } from '../ui/logos/external'; +import { externalPolkassemblyPNG } from '../ui/logos/external/index.js'; export const PolkassemblyIo: ExternalDef = { chains: { diff --git a/packages/apps-config/src/links/polkastats.ts b/packages/apps-config/src/links/polkastats.ts index bcfc743fe5..748b793efb 100644 --- a/packages/apps-config/src/links/polkastats.ts +++ b/packages/apps-config/src/links/polkastats.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { ExternalDef } from './types'; +import type { ExternalDef } from './types.js'; -import { externalPolkastatsPNG } from '../ui/logos/external'; +import { externalPolkastatsPNG } from '../ui/logos/external/index.js'; // NOTE Not maintained, see breakage reports in // https://github.com/polkadot-js/apps/issues/8903 diff --git a/packages/apps-config/src/links/singular.ts b/packages/apps-config/src/links/singular.ts index a9804e0040..d2faa0ae47 100644 --- a/packages/apps-config/src/links/singular.ts +++ b/packages/apps-config/src/links/singular.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { ExternalDef } from './types'; +import type { ExternalDef } from './types.js'; -import { externalSingularSVG } from '../ui/logos/external'; +import { externalSingularSVG } from '../ui/logos/external/index.js'; const getNetwork = (_chain: string) => { switch (_chain) { diff --git a/packages/apps-config/src/links/statescan.ts b/packages/apps-config/src/links/statescan.ts index 489d418e7a..0cedf2cac9 100644 --- a/packages/apps-config/src/links/statescan.ts +++ b/packages/apps-config/src/links/statescan.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { ExternalDef } from './types'; +import type { ExternalDef } from './types.js'; -import { externalStatescanSVG } from '../ui/logos/external'; +import { externalStatescanSVG } from '../ui/logos/external/index.js'; export const Statescan: ExternalDef = { chains: { diff --git a/packages/apps-config/src/links/subid.ts b/packages/apps-config/src/links/subid.ts index c015ee2633..673ef7c0e4 100644 --- a/packages/apps-config/src/links/subid.ts +++ b/packages/apps-config/src/links/subid.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { ExternalDef } from './types'; +import type { ExternalDef } from './types.js'; -import { externalSubidSVG } from '../ui/logos/external'; +import { externalSubidSVG } from '../ui/logos/external/index.js'; export const SubId: ExternalDef = { chains: { diff --git a/packages/apps-config/src/links/subscan.ts b/packages/apps-config/src/links/subscan.ts index f49bbc2d58..2bcd0deb0d 100644 --- a/packages/apps-config/src/links/subscan.ts +++ b/packages/apps-config/src/links/subscan.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { ExternalDef } from './types'; +import type { ExternalDef } from './types.js'; -import { externalSubscanPNG } from '../ui/logos/external'; +import { externalSubscanPNG } from '../ui/logos/external/index.js'; export const Subscan: ExternalDef = { chains: { diff --git a/packages/apps-config/src/links/subsquare.ts b/packages/apps-config/src/links/subsquare.ts index d77f0a3cff..407517b362 100644 --- a/packages/apps-config/src/links/subsquare.ts +++ b/packages/apps-config/src/links/subsquare.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { ExternalDef } from './types'; +import type { ExternalDef } from './types.js'; -import { externalSubsquareSVG } from '../ui/logos/external'; +import { externalSubsquareSVG } from '../ui/logos/external/index.js'; export const Subsquare: ExternalDef = { chains: { diff --git a/packages/apps-config/src/settings/index.ts b/packages/apps-config/src/settings/index.ts index 2688ef17c9..4889ff7e03 100644 --- a/packages/apps-config/src/settings/index.ts +++ b/packages/apps-config/src/settings/index.ts @@ -1,6 +1,6 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -export * from './ethereumChains'; -export * from './languages'; -export * from './ss58'; +export * from './ethereumChains.js'; +export * from './languages.js'; +export * from './ss58.js'; diff --git a/packages/apps-config/src/settings/languages.ts b/packages/apps-config/src/settings/languages.ts index b6a3a57ebc..ba4d4c18a1 100644 --- a/packages/apps-config/src/settings/languages.ts +++ b/packages/apps-config/src/settings/languages.ts @@ -1,8 +1,8 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { TFunction } from '../types'; -import type { Option } from './types'; +import type { TFunction } from '../types.js'; +import type { Option } from './types.js'; export function createLanguages (t: TFunction): Option[] { return [ diff --git a/packages/apps-config/src/settings/ss58.ts b/packages/apps-config/src/settings/ss58.ts index a044b5dd12..0fd3aacba8 100644 --- a/packages/apps-config/src/settings/ss58.ts +++ b/packages/apps-config/src/settings/ss58.ts @@ -1,8 +1,8 @@ // Copyright 2017-2023 @polkadot/ui-settings authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { TFunction } from '../types'; -import type { Option } from './types'; +import type { TFunction } from '../types.js'; +import type { Option } from './types.js'; import { selectableNetworks } from '@polkadot/networks'; diff --git a/packages/apps-config/src/ui/index.ts b/packages/apps-config/src/ui/index.ts index 18e7bf504d..0e0ad2eb3c 100644 --- a/packages/apps-config/src/ui/index.ts +++ b/packages/apps-config/src/ui/index.ts @@ -1,8 +1,8 @@ // Copyright 2017-2023 @polkadot/apps-config authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { identityNodes, identitySpec } from './identityIcons'; -import { sanitize } from './util'; +import { identityNodes, identitySpec } from './identityIcons/index.js'; +import { sanitize } from './util.js'; export function getSystemIcon (systemName: string, specName: string): 'beachball' | 'polkadot' | 'substrate' { return ( diff --git a/packages/apps-config/src/ui/logos/chains/index.ts b/packages/apps-config/src/ui/logos/chains/index.ts index fe2f15e6be..62f47ecae5 100644 --- a/packages/apps-config/src/ui/logos/chains/index.ts +++ b/packages/apps-config/src/ui/logos/chains/index.ts @@ -3,62 +3,62 @@ // Do not edit. Auto-generated via node scripts/imgConvert.mjs -export { chains3dpassPNG } from './generated/3dpassPNG'; -export { chainsAbandPNG } from './generated/abandPNG'; -export { chainsAcalaSVG } from './generated/acalaSVG'; -export { chainsAcurastPNG } from './generated/acurastPNG'; -export { chainsAlephSVG } from './generated/alephSVG'; -export { chainsAltairSVG } from './generated/altairSVG'; -export { chainsAmplitudeSVG } from './generated/amplitudeSVG'; -export { chainsBitgreenPNG } from './generated/bitgreenPNG'; -export { chainsBittensorPNG } from './generated/bittensorPNG'; -export { chainsBrainstormPNG } from './generated/brainstormPNG'; -export { chainsComposableFinancePNG } from './generated/composableFinancePNG'; -export { chainsCreditcoinPNG } from './generated/creditcoinPNG'; -export { chainsCreditcoinTestPNG } from './generated/creditcoin-testPNG'; -export { chainsDebioSVG } from './generated/debioSVG'; -export { chainsDorafactoryPNG } from './generated/dorafactoryPNG'; -export { chainsDustyPNG } from './generated/dustyPNG'; -export { chainsEquilibriumSVG } from './generated/equilibriumSVG'; -export { chainsFerrumPNG } from './generated/ferrumPNG'; -export { chainsFrequencySVG } from './generated/frequencySVG'; -export { chainsGeminisPNG } from './generated/geminisPNG'; -export { chainsGenshiroSVG } from './generated/genshiroSVG'; -export { chainsGmJPEG } from './generated/gmJPEG'; -export { chainsHydratePNG } from './generated/hydratePNG'; -export { chainsIdiyanaleLogoWhiteSVG } from './generated/idiyanale_logo_whiteSVG'; -export { chainsJurPNG } from './generated/jurPNG'; -export { chainsKaruraSVG } from './generated/karuraSVG'; -export { chainsKicoPNG } from './generated/kicoPNG'; -export { chainsKintsugiPNG } from './generated/kintsugiPNG'; -export { chainsKusamaSVG } from './generated/kusamaSVG'; -export { chainsListenPNG } from './generated/listenPNG'; -export { chainsLogionPNG } from './generated/logionPNG'; -export { chainsMangataPNG } from './generated/mangataPNG'; -export { chainsMangataxPNG } from './generated/mangataxPNG'; -export { chainsMoonsamaPNG } from './generated/moonsamaPNG'; -export { chainsMyriadPNG } from './generated/myriadPNG'; -export { chainsOakPNG } from './generated/oakPNG'; -export { chainsOrigintrailPNG } from './generated/origintrailPNG'; -export { chainsOrigintrailTestnetPNG } from './generated/origintrail-testnetPNG'; -export { chainsPeaqPNG } from './generated/peaqPNG'; -export { chainsPendulumSVG } from './generated/pendulumSVG'; -export { chainsPicassoSVG } from './generated/picassoSVG'; -export { chainsPolkadotCircleSVG } from './generated/polkadot-circleSVG'; -export { chainsRiodefiPNG } from './generated/riodefiPNG'; -export { chainsRococoSVG } from './generated/rococoSVG'; -export { chainsShidenPNG } from './generated/shidenPNG'; -export { chainsSkyekiwiPNG } from './generated/skyekiwiPNG'; -export { chainsSnakenetSVG } from './generated/snakenetSVG'; -export { chainsSnowbridgePNG } from './generated/snowbridgePNG'; -export { chainsSpannerPNG } from './generated/spannerPNG'; -export { chainsStandardPNG } from './generated/standardPNG'; -export { chainsT0rnPNG } from './generated/t0rnPNG'; -export { chainsTanglePNG } from './generated/tanglePNG'; -export { chainsTinkerPNG } from './generated/tinkerPNG'; -export { chainsTotemSVG } from './generated/totemSVG'; -export { chainsTuringPNG } from './generated/turingPNG'; -export { chainsUnorthodoxPNG } from './generated/unorthodoxPNG'; -export { chainsVaraSVG } from './generated/varaSVG'; -export { chainsVirtoPNG } from './generated/virtoPNG'; -export { chainsWatrPNG } from './generated/watrPNG'; +export { chains3dpassPNG } from './generated/3dpassPNG.js'; +export { chainsAbandPNG } from './generated/abandPNG.js'; +export { chainsAcalaSVG } from './generated/acalaSVG.js'; +export { chainsAcurastPNG } from './generated/acurastPNG.js'; +export { chainsAlephSVG } from './generated/alephSVG.js'; +export { chainsAltairSVG } from './generated/altairSVG.js'; +export { chainsAmplitudeSVG } from './generated/amplitudeSVG.js'; +export { chainsBitgreenPNG } from './generated/bitgreenPNG.js'; +export { chainsBittensorPNG } from './generated/bittensorPNG.js'; +export { chainsBrainstormPNG } from './generated/brainstormPNG.js'; +export { chainsComposableFinancePNG } from './generated/composableFinancePNG.js'; +export { chainsCreditcoinPNG } from './generated/creditcoinPNG.js'; +export { chainsCreditcoinTestPNG } from './generated/creditcoin-testPNG.js'; +export { chainsDebioSVG } from './generated/debioSVG.js'; +export { chainsDorafactoryPNG } from './generated/dorafactoryPNG.js'; +export { chainsDustyPNG } from './generated/dustyPNG.js'; +export { chainsEquilibriumSVG } from './generated/equilibriumSVG.js'; +export { chainsFerrumPNG } from './generated/ferrumPNG.js'; +export { chainsFrequencySVG } from './generated/frequencySVG.js'; +export { chainsGeminisPNG } from './generated/geminisPNG.js'; +export { chainsGenshiroSVG } from './generated/genshiroSVG.js'; +export { chainsGmJPEG } from './generated/gmJPEG.js'; +export { chainsHydratePNG } from './generated/hydratePNG.js'; +export { chainsIdiyanaleLogoWhiteSVG } from './generated/idiyanale_logo_whiteSVG.js'; +export { chainsJurPNG } from './generated/jurPNG.js'; +export { chainsKaruraSVG } from './generated/karuraSVG.js'; +export { chainsKicoPNG } from './generated/kicoPNG.js'; +export { chainsKintsugiPNG } from './generated/kintsugiPNG.js'; +export { chainsKusamaSVG } from './generated/kusamaSVG.js'; +export { chainsListenPNG } from './generated/listenPNG.js'; +export { chainsLogionPNG } from './generated/logionPNG.js'; +export { chainsMangataPNG } from './generated/mangataPNG.js'; +export { chainsMangataxPNG } from './generated/mangataxPNG.js'; +export { chainsMoonsamaPNG } from './generated/moonsamaPNG.js'; +export { chainsMyriadPNG } from './generated/myriadPNG.js'; +export { chainsOakPNG } from './generated/oakPNG.js'; +export { chainsOrigintrailPNG } from './generated/origintrailPNG.js'; +export { chainsOrigintrailTestnetPNG } from './generated/origintrail-testnetPNG.js'; +export { chainsPeaqPNG } from './generated/peaqPNG.js'; +export { chainsPendulumSVG } from './generated/pendulumSVG.js'; +export { chainsPicassoSVG } from './generated/picassoSVG.js'; +export { chainsPolkadotCircleSVG } from './generated/polkadot-circleSVG.js'; +export { chainsRiodefiPNG } from './generated/riodefiPNG.js'; +export { chainsRococoSVG } from './generated/rococoSVG.js'; +export { chainsShidenPNG } from './generated/shidenPNG.js'; +export { chainsSkyekiwiPNG } from './generated/skyekiwiPNG.js'; +export { chainsSnakenetSVG } from './generated/snakenetSVG.js'; +export { chainsSnowbridgePNG } from './generated/snowbridgePNG.js'; +export { chainsSpannerPNG } from './generated/spannerPNG.js'; +export { chainsStandardPNG } from './generated/standardPNG.js'; +export { chainsT0rnPNG } from './generated/t0rnPNG.js'; +export { chainsTanglePNG } from './generated/tanglePNG.js'; +export { chainsTinkerPNG } from './generated/tinkerPNG.js'; +export { chainsTotemSVG } from './generated/totemSVG.js'; +export { chainsTuringPNG } from './generated/turingPNG.js'; +export { chainsUnorthodoxPNG } from './generated/unorthodoxPNG.js'; +export { chainsVaraSVG } from './generated/varaSVG.js'; +export { chainsVirtoPNG } from './generated/virtoPNG.js'; +export { chainsWatrPNG } from './generated/watrPNG.js'; diff --git a/packages/apps-config/src/ui/logos/extensions/index.ts b/packages/apps-config/src/ui/logos/extensions/index.ts index 6b3aad37eb..1c642a5249 100644 --- a/packages/apps-config/src/ui/logos/extensions/index.ts +++ b/packages/apps-config/src/ui/logos/extensions/index.ts @@ -3,4 +3,4 @@ // Do not edit. Auto-generated via node scripts/imgConvert.mjs -export { extensionsPolkadotJsSVG } from './generated/polkadot-jsSVG'; +export { extensionsPolkadotJsSVG } from './generated/polkadot-jsSVG.js'; diff --git a/packages/apps-config/src/ui/logos/external/index.ts b/packages/apps-config/src/ui/logos/external/index.ts index b7ec1d0e10..fdcf5b173a 100644 --- a/packages/apps-config/src/ui/logos/external/index.ts +++ b/packages/apps-config/src/ui/logos/external/index.ts @@ -3,17 +3,17 @@ // Do not edit. Auto-generated via node scripts/imgConvert.mjs -export { externalCommonwealthPNG } from './generated/commonwealthPNG'; -export { externalDotreasurySVG } from './generated/dotreasurySVG'; -export { externalDotscannerPNG } from './generated/dotscannerPNG'; -export { externalEmptySVG } from './generated/emptySVG'; -export { externalKodadotPNG } from './generated/kodadotPNG'; -export { externalPolkaholicPNG } from './generated/polkaholicPNG'; -export { externalPolkascanPNG } from './generated/polkascanPNG'; -export { externalPolkassemblyPNG } from './generated/polkassemblyPNG'; -export { externalPolkastatsPNG } from './generated/polkastatsPNG'; -export { externalSingularSVG } from './generated/singularSVG'; -export { externalStatescanSVG } from './generated/statescanSVG'; -export { externalSubidSVG } from './generated/subidSVG'; -export { externalSubscanPNG } from './generated/subscanPNG'; -export { externalSubsquareSVG } from './generated/subsquareSVG'; +export { externalCommonwealthPNG } from './generated/commonwealthPNG.js'; +export { externalDotreasurySVG } from './generated/dotreasurySVG.js'; +export { externalDotscannerPNG } from './generated/dotscannerPNG.js'; +export { externalEmptySVG } from './generated/emptySVG.js'; +export { externalKodadotPNG } from './generated/kodadotPNG.js'; +export { externalPolkaholicPNG } from './generated/polkaholicPNG.js'; +export { externalPolkascanPNG } from './generated/polkascanPNG.js'; +export { externalPolkassemblyPNG } from './generated/polkassemblyPNG.js'; +export { externalPolkastatsPNG } from './generated/polkastatsPNG.js'; +export { externalSingularSVG } from './generated/singularSVG.js'; +export { externalStatescanSVG } from './generated/statescanSVG.js'; +export { externalSubidSVG } from './generated/subidSVG.js'; +export { externalSubscanPNG } from './generated/subscanPNG.js'; +export { externalSubsquareSVG } from './generated/subsquareSVG.js'; diff --git a/packages/apps-config/src/ui/logos/nodes/index.ts b/packages/apps-config/src/ui/logos/nodes/index.ts index 7e3bfbf137..e9cdf46568 100644 --- a/packages/apps-config/src/ui/logos/nodes/index.ts +++ b/packages/apps-config/src/ui/logos/nodes/index.ts @@ -3,148 +3,148 @@ // Do not edit. Auto-generated via node scripts/imgConvert.mjs -export { nodesAjunaPNG } from './generated/ajunaPNG'; -export { nodesApronPNG } from './generated/apronPNG'; -export { nodesArcticPNG } from './generated/arcticPNG'; -export { nodesAresGladiosSVG } from './generated/ares-gladiosSVG'; -export { nodesAresMarsPNG } from './generated/ares-marsPNG'; -export { nodesAresOdysseySVG } from './generated/ares-odysseySVG'; -export { nodesAresPNG } from './generated/aresPNG'; -export { nodesAstarPNG } from './generated/astarPNG'; -export { nodesAutomataPNG } from './generated/automataPNG'; -export { nodesAventusSVG } from './generated/aventusSVG'; -export { nodesBajunPNG } from './generated/bajunPNG'; -export { nodesBasiliskPNG } from './generated/basiliskPNG'; -export { nodesBasiliskRococoBgPNG } from './generated/basilisk-rococo-bgPNG'; -export { nodesBeastSVG } from './generated/beastSVG'; -export { nodesBifrostSVG } from './generated/bifrostSVG'; -export { nodesBitcountryPNG } from './generated/bitcountryPNG'; -export { nodesBridgeHubBlackSVG } from './generated/bridgeHubBlackSVG'; -export { nodesBridgeHubSVG } from './generated/bridgeHubSVG'; -export { nodesCalamariPNG } from './generated/calamariPNG'; -export { nodesCentrifugePNG } from './generated/centrifugePNG'; -export { nodesCessPNG } from './generated/cessPNG'; -export { nodesChainxSVG } from './generated/chainxSVG'; -export { nodesCloverSVG } from './generated/cloverSVG'; -export { nodesCoinversationPNG } from './generated/coinversationPNG'; -export { nodesCompetitorsClubPNG } from './generated/competitors-clubPNG'; -export { nodesConftiSVG } from './generated/conftiSVG'; -export { nodesCrabSVG } from './generated/crabSVG'; -export { nodesCrownSterlingPNG } from './generated/crown-sterlingPNG'; -export { nodesCrustMaxwellSVG } from './generated/crust-maxwellSVG'; -export { nodesCrustParachainSVG } from './generated/crustParachainSVG'; -export { nodesCrustSVG } from './generated/crustSVG'; -export { nodesDaliPNG } from './generated/daliPNG'; -export { nodesDarwiniaSVG } from './generated/darwiniaSVG'; -export { nodesDatahighwayPNG } from './generated/datahighwayPNG'; -export { nodesDockPNG } from './generated/dockPNG'; -export { nodesDolphinSVG } from './generated/dolphinSVG'; -export { nodesDotmogSVG } from './generated/dotmogSVG'; -export { nodesEaveSVG } from './generated/eaveSVG'; -export { nodesEdgewareWhitePNG } from './generated/edgeware-whitePNG'; -export { nodesEfinitySVG } from './generated/efinitySVG'; -export { nodesEncointerBlueSVG } from './generated/encointer-blueSVG'; -export { nodesFantourPNG } from './generated/fantourPNG'; -export { nodesGalitalLogoPNG } from './generated/galital-logoPNG'; -export { nodesGamepowerSVG } from './generated/gamepowerSVG'; -export { nodesGeekSVG } from './generated/geekSVG'; -export { nodesGiantPNG } from './generated/giantPNG'; -export { nodesHanyonycashPNG } from './generated/hanyonycashPNG'; -export { nodesHashedPNG } from './generated/hashedPNG'; -export { nodesHelixstreetPNG } from './generated/helixstreetPNG'; -export { nodesHumanodePNG } from './generated/humanodePNG'; -export { nodesIdavollPNG } from './generated/idavollPNG'; -export { nodesImbuePNG } from './generated/imbuePNG'; -export { nodesIntegriteeSVG } from './generated/integriteeSVG'; -export { nodesInterlaySVG } from './generated/interlaySVG'; -export { nodesIpciSVG } from './generated/ipciSVG'; -export { nodesIpsePNG } from './generated/ipsePNG'; -export { nodesIpseSVG } from './generated/ipseSVG'; -export { nodesJazPNG } from './generated/jazPNG'; -export { nodesJoystreamSVG } from './generated/joystreamSVG'; -export { nodesJupiterSVG } from './generated/jupiterSVG'; -export { nodesKabochaSVG } from './generated/kabochaSVG'; -export { nodesKhalaSVG } from './generated/khalaSVG'; -export { nodesKiltPNG } from './generated/kiltPNG'; -export { nodesKlugPNG } from './generated/klugPNG'; -export { nodesKonomiPNG } from './generated/konomiPNG'; -export { nodesKrestPNG } from './generated/krestPNG'; -export { nodesKulupuSVG } from './generated/kulupuSVG'; -export { nodesKusariSVG } from './generated/kusariSVG'; -export { nodesKylinPNG } from './generated/kylinPNG'; -export { nodesLaminarCircleSVG } from './generated/laminar-circleSVG'; -export { nodesLitentryPNG } from './generated/litentryPNG'; -export { nodesLitmusPNG } from './generated/litmusPNG'; -export { nodesLoomNetworkPNG } from './generated/loom_networkPNG'; -export { nodesMantaPNG } from './generated/mantaPNG'; -export { nodesMathSVG } from './generated/mathSVG'; -export { nodesMd5PNG } from './generated/md5PNG'; -export { nodesMinixPNG } from './generated/minixPNG'; -export { nodesMoonbaseAlphaSVG } from './generated/moonbase_alphaSVG'; -export { nodesMoonbeamSVG } from './generated/moonbeamSVG'; -export { nodesMoonriverSVG } from './generated/moonriverSVG'; -export { nodesMoonrockPNG } from './generated/moonrockPNG'; -export { nodesMoonshadowPNG } from './generated/moonshadowPNG'; -export { nodesMybankPNG } from './generated/mybankPNG'; -export { nodesNftmartPNG } from './generated/nftmartPNG'; -export { nodesNodleSVG } from './generated/nodleSVG'; -export { nodesOliSVG } from './generated/oliSVG'; -export { nodesOmnibtcSVG } from './generated/omnibtcSVG'; -export { nodesOpalLogoPNG } from './generated/opal-logoPNG'; -export { nodesOpportunityPNG } from './generated/opportunityPNG'; -export { nodesPangolinSVG } from './generated/pangolinSVG'; -export { nodesPangoroSVG } from './generated/pangoroSVG'; -export { nodesParallelSVG } from './generated/parallelSVG'; -export { nodesParamiJPEG } from './generated/paramiJPEG'; -export { nodesPhalaSVG } from './generated/phalaSVG'; -export { nodesPhoenixPNG } from './generated/phoenixPNG'; -export { nodesPicassoPNG } from './generated/picassoPNG'; -export { nodesPichiuPNG } from './generated/pichiuPNG'; -export { nodesPlasmPNG } from './generated/plasmPNG'; -export { nodesPolkadexSVG } from './generated/polkadexSVG'; -export { nodesPolkafoundrySVG } from './generated/polkafoundrySVG'; -export { nodesPolkasmithSVG } from './generated/polkasmithSVG'; -export { nodesPolymeshSVG } from './generated/polymeshSVG'; -export { nodesPontemSVG } from './generated/pontemSVG'; -export { nodesPrismPNG } from './generated/prismPNG'; -export { nodesQuartzPNG } from './generated/quartzPNG'; -export { nodesRealisPNG } from './generated/realisPNG'; -export { nodesRiochainSVG } from './generated/riochainSVG'; -export { nodesRobonomicsSVG } from './generated/robonomicsSVG'; -export { nodesRocfinitySVG } from './generated/rocfinitySVG'; -export { nodesSakuraSVG } from './generated/sakuraSVG'; -export { nodesShadowSVG } from './generated/shadowSVG'; -export { nodesShellSVG } from './generated/shellSVG'; -export { nodesSherpaxPNG } from './generated/sherpaxPNG'; -export { nodesSinglavenderSVG } from './generated/singlavenderSVG'; -export { nodesSnowPNG } from './generated/snowPNG'; -export { nodesSoonsocialPNG } from './generated/soonsocialPNG'; -export { nodesSoonsocialXPNG } from './generated/soonsocialXPNG'; -export { nodesSoraSubstrateSVG } from './generated/sora-substrateSVG'; -export { nodesStafiPNG } from './generated/stafiPNG'; -export { nodesStatemineSVG } from './generated/statemineSVG'; -export { nodesSubdaoPNG } from './generated/subdaoPNG'; -export { nodesSubgameSVG } from './generated/subgameSVG'; -export { nodesSubsocialSVG } from './generated/subsocialSVG'; -export { nodesSubsocialXSVG } from './generated/subsocialXSVG'; -export { nodesSubspacePNG } from './generated/subspacePNG'; -export { nodesSubstrateCircleSVG } from './generated/substrate-circleSVG'; -export { nodesSubstrateContractsNodePNG } from './generated/substrate-contracts-nodePNG'; -export { nodesSubstrateHexagonSVG } from './generated/substrate-hexagonSVG'; -export { nodesSubstrateWhiteSVG } from './generated/substrate-whiteSVG'; -export { nodesSwapdexSVG } from './generated/swapdexSVG'; -export { nodesTernoaSVG } from './generated/ternoaSVG'; -export { nodesThebifrostPNG } from './generated/thebifrostPNG'; -export { nodesTrustbasePNG } from './generated/trustbasePNG'; -export { nodesUniartsPNG } from './generated/uniartsPNG'; -export { nodesUniqueSVG } from './generated/uniqueSVG'; -export { nodesUnitnetworkPNG } from './generated/unitnetworkPNG'; -export { nodesUnitvPNG } from './generated/unitvPNG'; -export { nodesValiuPNG } from './generated/valiuPNG'; -export { nodesVaraSVG } from './generated/varaSVG'; -export { nodesWeb3gamesSVG } from './generated/web3gamesSVG'; -export { nodesWestendColourSVG } from './generated/westend_colourSVG'; -export { nodesZCloakSVG } from './generated/zCloakSVG'; -export { nodesZeitgeistPNG } from './generated/zeitgeistPNG'; -export { nodesZenlinkSVG } from './generated/zenlinkSVG'; -export { nodesZeroSVG } from './generated/zeroSVG'; +export { nodesAjunaPNG } from './generated/ajunaPNG.js'; +export { nodesApronPNG } from './generated/apronPNG.js'; +export { nodesArcticPNG } from './generated/arcticPNG.js'; +export { nodesAresGladiosSVG } from './generated/ares-gladiosSVG.js'; +export { nodesAresMarsPNG } from './generated/ares-marsPNG.js'; +export { nodesAresOdysseySVG } from './generated/ares-odysseySVG.js'; +export { nodesAresPNG } from './generated/aresPNG.js'; +export { nodesAstarPNG } from './generated/astarPNG.js'; +export { nodesAutomataPNG } from './generated/automataPNG.js'; +export { nodesAventusSVG } from './generated/aventusSVG.js'; +export { nodesBajunPNG } from './generated/bajunPNG.js'; +export { nodesBasiliskPNG } from './generated/basiliskPNG.js'; +export { nodesBasiliskRococoBgPNG } from './generated/basilisk-rococo-bgPNG.js'; +export { nodesBeastSVG } from './generated/beastSVG.js'; +export { nodesBifrostSVG } from './generated/bifrostSVG.js'; +export { nodesBitcountryPNG } from './generated/bitcountryPNG.js'; +export { nodesBridgeHubBlackSVG } from './generated/bridgeHubBlackSVG.js'; +export { nodesBridgeHubSVG } from './generated/bridgeHubSVG.js'; +export { nodesCalamariPNG } from './generated/calamariPNG.js'; +export { nodesCentrifugePNG } from './generated/centrifugePNG.js'; +export { nodesCessPNG } from './generated/cessPNG.js'; +export { nodesChainxSVG } from './generated/chainxSVG.js'; +export { nodesCloverSVG } from './generated/cloverSVG.js'; +export { nodesCoinversationPNG } from './generated/coinversationPNG.js'; +export { nodesCompetitorsClubPNG } from './generated/competitors-clubPNG.js'; +export { nodesConftiSVG } from './generated/conftiSVG.js'; +export { nodesCrabSVG } from './generated/crabSVG.js'; +export { nodesCrownSterlingPNG } from './generated/crown-sterlingPNG.js'; +export { nodesCrustMaxwellSVG } from './generated/crust-maxwellSVG.js'; +export { nodesCrustParachainSVG } from './generated/crustParachainSVG.js'; +export { nodesCrustSVG } from './generated/crustSVG.js'; +export { nodesDaliPNG } from './generated/daliPNG.js'; +export { nodesDarwiniaSVG } from './generated/darwiniaSVG.js'; +export { nodesDatahighwayPNG } from './generated/datahighwayPNG.js'; +export { nodesDockPNG } from './generated/dockPNG.js'; +export { nodesDolphinSVG } from './generated/dolphinSVG.js'; +export { nodesDotmogSVG } from './generated/dotmogSVG.js'; +export { nodesEaveSVG } from './generated/eaveSVG.js'; +export { nodesEdgewareWhitePNG } from './generated/edgeware-whitePNG.js'; +export { nodesEfinitySVG } from './generated/efinitySVG.js'; +export { nodesEncointerBlueSVG } from './generated/encointer-blueSVG.js'; +export { nodesFantourPNG } from './generated/fantourPNG.js'; +export { nodesGalitalLogoPNG } from './generated/galital-logoPNG.js'; +export { nodesGamepowerSVG } from './generated/gamepowerSVG.js'; +export { nodesGeekSVG } from './generated/geekSVG.js'; +export { nodesGiantPNG } from './generated/giantPNG.js'; +export { nodesHanyonycashPNG } from './generated/hanyonycashPNG.js'; +export { nodesHashedPNG } from './generated/hashedPNG.js'; +export { nodesHelixstreetPNG } from './generated/helixstreetPNG.js'; +export { nodesHumanodePNG } from './generated/humanodePNG.js'; +export { nodesIdavollPNG } from './generated/idavollPNG.js'; +export { nodesImbuePNG } from './generated/imbuePNG.js'; +export { nodesIntegriteeSVG } from './generated/integriteeSVG.js'; +export { nodesInterlaySVG } from './generated/interlaySVG.js'; +export { nodesIpciSVG } from './generated/ipciSVG.js'; +export { nodesIpsePNG } from './generated/ipsePNG.js'; +export { nodesIpseSVG } from './generated/ipseSVG.js'; +export { nodesJazPNG } from './generated/jazPNG.js'; +export { nodesJoystreamSVG } from './generated/joystreamSVG.js'; +export { nodesJupiterSVG } from './generated/jupiterSVG.js'; +export { nodesKabochaSVG } from './generated/kabochaSVG.js'; +export { nodesKhalaSVG } from './generated/khalaSVG.js'; +export { nodesKiltPNG } from './generated/kiltPNG.js'; +export { nodesKlugPNG } from './generated/klugPNG.js'; +export { nodesKonomiPNG } from './generated/konomiPNG.js'; +export { nodesKrestPNG } from './generated/krestPNG.js'; +export { nodesKulupuSVG } from './generated/kulupuSVG.js'; +export { nodesKusariSVG } from './generated/kusariSVG.js'; +export { nodesKylinPNG } from './generated/kylinPNG.js'; +export { nodesLaminarCircleSVG } from './generated/laminar-circleSVG.js'; +export { nodesLitentryPNG } from './generated/litentryPNG.js'; +export { nodesLitmusPNG } from './generated/litmusPNG.js'; +export { nodesLoomNetworkPNG } from './generated/loom_networkPNG.js'; +export { nodesMantaPNG } from './generated/mantaPNG.js'; +export { nodesMathSVG } from './generated/mathSVG.js'; +export { nodesMd5PNG } from './generated/md5PNG.js'; +export { nodesMinixPNG } from './generated/minixPNG.js'; +export { nodesMoonbaseAlphaSVG } from './generated/moonbase_alphaSVG.js'; +export { nodesMoonbeamSVG } from './generated/moonbeamSVG.js'; +export { nodesMoonriverSVG } from './generated/moonriverSVG.js'; +export { nodesMoonrockPNG } from './generated/moonrockPNG.js'; +export { nodesMoonshadowPNG } from './generated/moonshadowPNG.js'; +export { nodesMybankPNG } from './generated/mybankPNG.js'; +export { nodesNftmartPNG } from './generated/nftmartPNG.js'; +export { nodesNodleSVG } from './generated/nodleSVG.js'; +export { nodesOliSVG } from './generated/oliSVG.js'; +export { nodesOmnibtcSVG } from './generated/omnibtcSVG.js'; +export { nodesOpalLogoPNG } from './generated/opal-logoPNG.js'; +export { nodesOpportunityPNG } from './generated/opportunityPNG.js'; +export { nodesPangolinSVG } from './generated/pangolinSVG.js'; +export { nodesPangoroSVG } from './generated/pangoroSVG.js'; +export { nodesParallelSVG } from './generated/parallelSVG.js'; +export { nodesParamiJPEG } from './generated/paramiJPEG.js'; +export { nodesPhalaSVG } from './generated/phalaSVG.js'; +export { nodesPhoenixPNG } from './generated/phoenixPNG.js'; +export { nodesPicassoPNG } from './generated/picassoPNG.js'; +export { nodesPichiuPNG } from './generated/pichiuPNG.js'; +export { nodesPlasmPNG } from './generated/plasmPNG.js'; +export { nodesPolkadexSVG } from './generated/polkadexSVG.js'; +export { nodesPolkafoundrySVG } from './generated/polkafoundrySVG.js'; +export { nodesPolkasmithSVG } from './generated/polkasmithSVG.js'; +export { nodesPolymeshSVG } from './generated/polymeshSVG.js'; +export { nodesPontemSVG } from './generated/pontemSVG.js'; +export { nodesPrismPNG } from './generated/prismPNG.js'; +export { nodesQuartzPNG } from './generated/quartzPNG.js'; +export { nodesRealisPNG } from './generated/realisPNG.js'; +export { nodesRiochainSVG } from './generated/riochainSVG.js'; +export { nodesRobonomicsSVG } from './generated/robonomicsSVG.js'; +export { nodesRocfinitySVG } from './generated/rocfinitySVG.js'; +export { nodesSakuraSVG } from './generated/sakuraSVG.js'; +export { nodesShadowSVG } from './generated/shadowSVG.js'; +export { nodesShellSVG } from './generated/shellSVG.js'; +export { nodesSherpaxPNG } from './generated/sherpaxPNG.js'; +export { nodesSinglavenderSVG } from './generated/singlavenderSVG.js'; +export { nodesSnowPNG } from './generated/snowPNG.js'; +export { nodesSoonsocialPNG } from './generated/soonsocialPNG.js'; +export { nodesSoonsocialXPNG } from './generated/soonsocialXPNG.js'; +export { nodesSoraSubstrateSVG } from './generated/sora-substrateSVG.js'; +export { nodesStafiPNG } from './generated/stafiPNG.js'; +export { nodesStatemineSVG } from './generated/statemineSVG.js'; +export { nodesSubdaoPNG } from './generated/subdaoPNG.js'; +export { nodesSubgameSVG } from './generated/subgameSVG.js'; +export { nodesSubsocialSVG } from './generated/subsocialSVG.js'; +export { nodesSubsocialXSVG } from './generated/subsocialXSVG.js'; +export { nodesSubspacePNG } from './generated/subspacePNG.js'; +export { nodesSubstrateCircleSVG } from './generated/substrate-circleSVG.js'; +export { nodesSubstrateContractsNodePNG } from './generated/substrate-contracts-nodePNG.js'; +export { nodesSubstrateHexagonSVG } from './generated/substrate-hexagonSVG.js'; +export { nodesSubstrateWhiteSVG } from './generated/substrate-whiteSVG.js'; +export { nodesSwapdexSVG } from './generated/swapdexSVG.js'; +export { nodesTernoaSVG } from './generated/ternoaSVG.js'; +export { nodesThebifrostPNG } from './generated/thebifrostPNG.js'; +export { nodesTrustbasePNG } from './generated/trustbasePNG.js'; +export { nodesUniartsPNG } from './generated/uniartsPNG.js'; +export { nodesUniqueSVG } from './generated/uniqueSVG.js'; +export { nodesUnitnetworkPNG } from './generated/unitnetworkPNG.js'; +export { nodesUnitvPNG } from './generated/unitvPNG.js'; +export { nodesValiuPNG } from './generated/valiuPNG.js'; +export { nodesVaraSVG } from './generated/varaSVG.js'; +export { nodesWeb3gamesSVG } from './generated/web3gamesSVG.js'; +export { nodesWestendColourSVG } from './generated/westend_colourSVG.js'; +export { nodesZCloakSVG } from './generated/zCloakSVG.js'; +export { nodesZeitgeistPNG } from './generated/zeitgeistPNG.js'; +export { nodesZenlinkSVG } from './generated/zenlinkSVG.js'; +export { nodesZeroSVG } from './generated/zeroSVG.js'; diff --git a/packages/apps-electron/package.json b/packages/apps-electron/package.json index 69d2de5b6f..42a22b408e 100644 --- a/packages/apps-electron/package.json +++ b/packages/apps-electron/package.json @@ -12,7 +12,7 @@ "sideEffects": false, "version": "0.124.2-124-x", "dependencies": { - "@polkadot/dev": "^0.70.4", + "@polkadot/dev": "^0.71.1", "@polkadot/react-components": "^0.124.2-124-x", "electron-log": "^5.0.0-beta.16", "electron-updater": "^5.3.0" diff --git a/packages/apps-electron/src/api/electron-main-api.ts b/packages/apps-electron/src/api/electron-main-api.ts index 81b13cdabc..429bf4e954 100644 --- a/packages/apps-electron/src/api/electron-main-api.ts +++ b/packages/apps-electron/src/api/electron-main-api.ts @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { AccountStoreApi } from './account-store-api'; +import { AccountStoreApi } from './account-store-api.js'; export interface ElectronMainApi { accountStore: AccountStoreApi diff --git a/packages/apps-electron/src/api/global-exported-api.ts b/packages/apps-electron/src/api/global-exported-api.ts index f1692ab3ec..206e0df730 100644 --- a/packages/apps-electron/src/api/global-exported-api.ts +++ b/packages/apps-electron/src/api/global-exported-api.ts @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ElectronMainApi } from './electron-main-api'; +import { ElectronMainApi } from './electron-main-api.js'; declare global { interface Window { diff --git a/packages/apps-electron/src/electron/index.ts b/packages/apps-electron/src/electron/index.ts index f4626cf449..887ada9476 100644 --- a/packages/apps-electron/src/electron/index.ts +++ b/packages/apps-electron/src/electron/index.ts @@ -3,10 +3,10 @@ import { app, shell } from 'electron'; -import { registerAccountStoreHandlers } from '../main/account-store'; -import { setupAutoUpdater } from './autoUpdater'; -import { setupContentSecurityPolicy } from './contentSecurityPolicy'; -import { createWindow } from './window'; +import { registerAccountStoreHandlers } from '../main/account-store.js'; +import { setupAutoUpdater } from './autoUpdater.js'; +import { setupContentSecurityPolicy } from './contentSecurityPolicy.js'; +import { createWindow } from './window.js'; const ENV = process.env.NODE_ENV || 'production'; diff --git a/packages/apps-electron/src/index.tsx b/packages/apps-electron/src/index.tsx index d2d8ad9409..9ccfcf7ce8 100644 --- a/packages/apps-electron/src/index.tsx +++ b/packages/apps-electron/src/index.tsx @@ -11,8 +11,8 @@ import { createRoot } from 'react-dom/client'; import Root from '@polkadot/apps/Root'; -import { electronMainApi } from './api/global-exported-api'; -import { RemoteElectronStore } from './renderer/remote-electron-store'; +import { electronMainApi } from './api/global-exported-api.js'; +import { RemoteElectronStore } from './renderer/remote-electron-store.js'; const rootId = 'root'; const rootElement = document.getElementById(rootId); diff --git a/packages/apps-electron/src/main/account-store.spec.ts b/packages/apps-electron/src/main/account-store.spec.ts index ced37ccc0f..63982df844 100644 --- a/packages/apps-electron/src/main/account-store.spec.ts +++ b/packages/apps-electron/src/main/account-store.spec.ts @@ -7,8 +7,8 @@ import * as tmp from 'tmp'; import { FileStore } from '@polkadot/ui-keyring/stores'; -import { accountStoreIpcHandler } from './account-store'; -import { IpcMainHandler } from './ipc-main-handler'; +import { accountStoreIpcHandler } from './account-store.js'; +import { IpcMainHandler } from './ipc-main-handler.js'; const exampleAccount = (address: string): KeyringJson => ({ address, diff --git a/packages/apps-electron/src/main/account-store.ts b/packages/apps-electron/src/main/account-store.ts index 9ee8552646..1d3a4e39e7 100644 --- a/packages/apps-electron/src/main/account-store.ts +++ b/packages/apps-electron/src/main/account-store.ts @@ -8,8 +8,8 @@ import path from 'path'; import { FileStore } from '@polkadot/ui-keyring/stores'; -import { IpcMainHandler } from './ipc-main-handler'; -import { registerIpcHandler } from './register-ipc-handler'; +import { IpcMainHandler } from './ipc-main-handler.js'; +import { registerIpcHandler } from './register-ipc-handler.js'; const ACCOUNTS_SUBFOLDER = 'polkadot-accounts'; diff --git a/packages/apps-electron/src/main/register-ipc-handler.ts b/packages/apps-electron/src/main/register-ipc-handler.ts index 158e70995f..5f0bcb5077 100644 --- a/packages/apps-electron/src/main/register-ipc-handler.ts +++ b/packages/apps-electron/src/main/register-ipc-handler.ts @@ -3,7 +3,7 @@ import electron from 'electron'; -import { IpcMainHandler } from './ipc-main-handler'; +import { IpcMainHandler } from './ipc-main-handler.js'; export const registerIpcHandler = (ipcHandler: IpcMainHandler): void => { for (const [channel, listener] of Object.entries(ipcHandler)) { diff --git a/packages/apps-electron/src/renderer/remote-electron-store.spec.ts b/packages/apps-electron/src/renderer/remote-electron-store.spec.ts index 65ab6a55b0..976e876820 100644 --- a/packages/apps-electron/src/renderer/remote-electron-store.spec.ts +++ b/packages/apps-electron/src/renderer/remote-electron-store.spec.ts @@ -3,7 +3,7 @@ import type { KeyringJson } from '@polkadot/ui-keyring/types'; -import { RemoteElectronStore } from './remote-electron-store'; +import { RemoteElectronStore } from './remote-electron-store.js'; describe('Remote Electron Store', () => { const accountStore = { diff --git a/packages/apps-electron/src/renderer/remote-electron-store.ts b/packages/apps-electron/src/renderer/remote-electron-store.ts index 934c405d43..8f53b38283 100644 --- a/packages/apps-electron/src/renderer/remote-electron-store.ts +++ b/packages/apps-electron/src/renderer/remote-electron-store.ts @@ -3,7 +3,7 @@ import type { KeyringJson, KeyringStore } from '@polkadot/ui-keyring/types'; -import { AccountStoreApi } from '../api/account-store-api'; +import { AccountStoreApi } from '../api/account-store-api.js'; export class RemoteElectronStore implements KeyringStore { readonly #accountStore: AccountStoreApi; diff --git a/packages/apps-electron/webpack.main.cjs b/packages/apps-electron/webpack.main.cjs index c946f395c7..0a5c20b11c 100644 --- a/packages/apps-electron/webpack.main.cjs +++ b/packages/apps-electron/webpack.main.cjs @@ -51,6 +51,9 @@ function createWebpack () { alias: { '@polkadot/hw-ledger-transports': require.resolve('@polkadot/hw-ledger-transports/node') }, + extensionAlias: { + '.js': ['.ts', '.tsx', '.js'] + }, extensions: ['.js', '.jsx', '.json', '.mjs', '.ts', '.tsx'] }, target: 'electron-main' diff --git a/packages/apps-routing/src/accounts.ts b/packages/apps-routing/src/accounts.ts index 0c3cdf6e33..3ac7d3d67b 100644 --- a/packages/apps-routing/src/accounts.ts +++ b/packages/apps-routing/src/accounts.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component, { useCounter } from '@polkadot/app-accounts'; diff --git a/packages/apps-routing/src/addresses.ts b/packages/apps-routing/src/addresses.ts index 769e07d792..a8c2f65317 100644 --- a/packages/apps-routing/src/addresses.ts +++ b/packages/apps-routing/src/addresses.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-addresses'; diff --git a/packages/apps-routing/src/alliance.ts b/packages/apps-routing/src/alliance.ts index 49e47df0e9..03709394f9 100644 --- a/packages/apps-routing/src/alliance.ts +++ b/packages/apps-routing/src/alliance.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component, { useCounter } from '@polkadot/app-alliance'; diff --git a/packages/apps-routing/src/assets.ts b/packages/apps-routing/src/assets.ts index b532071e00..345309db61 100644 --- a/packages/apps-routing/src/assets.ts +++ b/packages/apps-routing/src/assets.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-assets'; diff --git a/packages/apps-routing/src/bounties.ts b/packages/apps-routing/src/bounties.ts index 9978d92805..0ccd6139d6 100644 --- a/packages/apps-routing/src/bounties.ts +++ b/packages/apps-routing/src/bounties.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component, { useCounter } from '@polkadot/app-bounties'; diff --git a/packages/apps-routing/src/calendar.ts b/packages/apps-routing/src/calendar.ts index fff7c6f017..5824c9143d 100644 --- a/packages/apps-routing/src/calendar.ts +++ b/packages/apps-routing/src/calendar.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-calendar'; diff --git a/packages/apps-routing/src/claims.ts b/packages/apps-routing/src/claims.ts index 554b94e7b9..2db9633515 100644 --- a/packages/apps-routing/src/claims.ts +++ b/packages/apps-routing/src/claims.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component, { useCounter } from '@polkadot/app-claims'; diff --git a/packages/apps-routing/src/collator.ts b/packages/apps-routing/src/collator.ts index 59032316e6..1942172c67 100644 --- a/packages/apps-routing/src/collator.ts +++ b/packages/apps-routing/src/collator.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-collator'; diff --git a/packages/apps-routing/src/contracts.ts b/packages/apps-routing/src/contracts.ts index 4914f89d58..975633f1d6 100644 --- a/packages/apps-routing/src/contracts.ts +++ b/packages/apps-routing/src/contracts.ts @@ -3,7 +3,7 @@ import type { TFunction } from 'i18next'; import type { ApiPromise } from '@polkadot/api'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-contracts'; import { assertReturn } from '@polkadot/util'; diff --git a/packages/apps-routing/src/council.ts b/packages/apps-routing/src/council.ts index e21385e662..ba082bf2e6 100644 --- a/packages/apps-routing/src/council.ts +++ b/packages/apps-routing/src/council.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component, { useCounter } from '@polkadot/app-council'; diff --git a/packages/apps-routing/src/democracy.ts b/packages/apps-routing/src/democracy.ts index 77b1df4dc0..c83a2f5c0e 100644 --- a/packages/apps-routing/src/democracy.ts +++ b/packages/apps-routing/src/democracy.ts @@ -3,7 +3,7 @@ import type { TFunction } from 'i18next'; import type { ApiPromise } from '@polkadot/api'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component, { useCounter } from '@polkadot/app-democracy'; diff --git a/packages/apps-routing/src/explorer.ts b/packages/apps-routing/src/explorer.ts index 72052689c6..91f9cdd575 100644 --- a/packages/apps-routing/src/explorer.ts +++ b/packages/apps-routing/src/explorer.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-explorer'; diff --git a/packages/apps-routing/src/extrinsics.ts b/packages/apps-routing/src/extrinsics.ts index 9cee811add..7caa557673 100644 --- a/packages/apps-routing/src/extrinsics.ts +++ b/packages/apps-routing/src/extrinsics.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-extrinsics'; diff --git a/packages/apps-routing/src/fellowship.ts b/packages/apps-routing/src/fellowship.ts index 7f9d15af19..f21a6be026 100644 --- a/packages/apps-routing/src/fellowship.ts +++ b/packages/apps-routing/src/fellowship.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component, { useCounter } from '@polkadot/app-fellowship'; diff --git a/packages/apps-routing/src/files.ts b/packages/apps-routing/src/files.ts index ad2d2b6299..daa5eca1c5 100644 --- a/packages/apps-routing/src/files.ts +++ b/packages/apps-routing/src/files.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-files'; diff --git a/packages/apps-routing/src/gilt.ts b/packages/apps-routing/src/gilt.ts index 859cce1be5..f2e427ffcf 100644 --- a/packages/apps-routing/src/gilt.ts +++ b/packages/apps-routing/src/gilt.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-gilt'; diff --git a/packages/apps-routing/src/index.ts b/packages/apps-routing/src/index.ts index c220e48840..f20c7a4936 100644 --- a/packages/apps-routing/src/index.ts +++ b/packages/apps-routing/src/index.ts @@ -2,48 +2,48 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Routes } from './types'; +import type { Routes } from './types.js'; -import accounts from './accounts'; -import addresses from './addresses'; -import alliance from './alliance'; -import assets from './assets'; -import bounties from './bounties'; -import calendar from './calendar'; -import claims from './claims'; -import collator from './collator'; -import contracts from './contracts'; -import council from './council'; -import democracy from './democracy'; -import explorer from './explorer'; -import extrinsics from './extrinsics'; -import fellowship from './fellowship'; -import files from './files'; -import gilt from './gilt'; -import js from './js'; -import membership from './membership'; -import nfts from './nfts'; -import parachains from './parachains'; -import poll from './poll'; -import preimages from './preimages'; -import ranked from './ranked'; -import referenda from './referenda'; -import rpc from './rpc'; -import runtime from './runtime'; -import scheduler from './scheduler'; -import settings from './settings'; -import signing from './signing'; -import society from './society'; -import staking from './staking'; -import staking2 from './staking2'; -import storage from './storage'; -import sudo from './sudo'; -import techcomm from './techcomm'; -import teleport from './teleport'; -import transfer from './transfer'; -import treasury from './treasury'; -import utilities from './utilities'; -import whitelist from './whitelist'; +import accounts from './accounts.js'; +import addresses from './addresses.js'; +import alliance from './alliance.js'; +import assets from './assets.js'; +import bounties from './bounties.js'; +import calendar from './calendar.js'; +import claims from './claims.js'; +import collator from './collator.js'; +import contracts from './contracts.js'; +import council from './council.js'; +import democracy from './democracy.js'; +import explorer from './explorer.js'; +import extrinsics from './extrinsics.js'; +import fellowship from './fellowship.js'; +import files from './files.js'; +import gilt from './gilt.js'; +import js from './js.js'; +import membership from './membership.js'; +import nfts from './nfts.js'; +import parachains from './parachains.js'; +import poll from './poll.js'; +import preimages from './preimages.js'; +import ranked from './ranked.js'; +import referenda from './referenda.js'; +import rpc from './rpc.js'; +import runtime from './runtime.js'; +import scheduler from './scheduler.js'; +import settings from './settings.js'; +import signing from './signing.js'; +import society from './society.js'; +import staking from './staking.js'; +import staking2 from './staking2.js'; +import storage from './storage.js'; +import sudo from './sudo.js'; +import techcomm from './techcomm.js'; +import teleport from './teleport.js'; +import transfer from './transfer.js'; +import treasury from './treasury.js'; +import utilities from './utilities.js'; +import whitelist from './whitelist.js'; export default function create (t: TFunction): Routes { return [ diff --git a/packages/apps-routing/src/js.ts b/packages/apps-routing/src/js.ts index ef02c303b5..f382464fe4 100644 --- a/packages/apps-routing/src/js.ts +++ b/packages/apps-routing/src/js.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-js'; diff --git a/packages/apps-routing/src/membership.ts b/packages/apps-routing/src/membership.ts index 1e3356c5ca..8dd645f815 100644 --- a/packages/apps-routing/src/membership.ts +++ b/packages/apps-routing/src/membership.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component, { useCounter } from '@polkadot/app-membership'; diff --git a/packages/apps-routing/src/nfts.ts b/packages/apps-routing/src/nfts.ts index 2d7b4d8a90..fe84b45665 100644 --- a/packages/apps-routing/src/nfts.ts +++ b/packages/apps-routing/src/nfts.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-nfts'; diff --git a/packages/apps-routing/src/parachains.ts b/packages/apps-routing/src/parachains.ts index 5dad7ec663..f242ba5590 100644 --- a/packages/apps-routing/src/parachains.ts +++ b/packages/apps-routing/src/parachains.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-parachains'; diff --git a/packages/apps-routing/src/poll.ts b/packages/apps-routing/src/poll.ts index c6acd58c3f..177ceadc6f 100644 --- a/packages/apps-routing/src/poll.ts +++ b/packages/apps-routing/src/poll.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-poll'; diff --git a/packages/apps-routing/src/preimages.ts b/packages/apps-routing/src/preimages.ts index 29c48b4d2b..7eeaf327b5 100644 --- a/packages/apps-routing/src/preimages.ts +++ b/packages/apps-routing/src/preimages.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-preimages'; diff --git a/packages/apps-routing/src/ranked.ts b/packages/apps-routing/src/ranked.ts index 3006e256cb..ecc51fddee 100644 --- a/packages/apps-routing/src/ranked.ts +++ b/packages/apps-routing/src/ranked.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component, { useCounter } from '@polkadot/app-ranked'; diff --git a/packages/apps-routing/src/referenda.ts b/packages/apps-routing/src/referenda.ts index 86a2cda61a..8d42e944a3 100644 --- a/packages/apps-routing/src/referenda.ts +++ b/packages/apps-routing/src/referenda.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component, { useCounter } from '@polkadot/app-referenda'; diff --git a/packages/apps-routing/src/rpc.ts b/packages/apps-routing/src/rpc.ts index 8dd6783ba8..d4f26fadda 100644 --- a/packages/apps-routing/src/rpc.ts +++ b/packages/apps-routing/src/rpc.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-rpc'; diff --git a/packages/apps-routing/src/runtime.ts b/packages/apps-routing/src/runtime.ts index a2a1a84aaa..4dfcd91f14 100644 --- a/packages/apps-routing/src/runtime.ts +++ b/packages/apps-routing/src/runtime.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-runtime'; diff --git a/packages/apps-routing/src/scheduler.ts b/packages/apps-routing/src/scheduler.ts index 9dd3fb502d..9ec45007c3 100644 --- a/packages/apps-routing/src/scheduler.ts +++ b/packages/apps-routing/src/scheduler.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-scheduler'; diff --git a/packages/apps-routing/src/settings.ts b/packages/apps-routing/src/settings.ts index 0bb6616fef..50e461c01d 100644 --- a/packages/apps-routing/src/settings.ts +++ b/packages/apps-routing/src/settings.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component, { useCounter } from '@polkadot/app-settings'; diff --git a/packages/apps-routing/src/signing.ts b/packages/apps-routing/src/signing.ts index 675afb69bb..536a731ece 100644 --- a/packages/apps-routing/src/signing.ts +++ b/packages/apps-routing/src/signing.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-signing'; diff --git a/packages/apps-routing/src/society.ts b/packages/apps-routing/src/society.ts index 3f42f4eb59..9bf4d192fa 100644 --- a/packages/apps-routing/src/society.ts +++ b/packages/apps-routing/src/society.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component, { useCounter } from '@polkadot/app-society'; diff --git a/packages/apps-routing/src/staking.ts b/packages/apps-routing/src/staking.ts index dbb79034a2..ca8bc0f473 100644 --- a/packages/apps-routing/src/staking.ts +++ b/packages/apps-routing/src/staking.ts @@ -4,7 +4,7 @@ import type { TFunction } from 'i18next'; import type { ApiPromise } from '@polkadot/api'; import type { PalletStakingExposure } from '@polkadot/types/lookup'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-staking'; import { ZERO_ACCOUNT } from '@polkadot/react-hooks/useWeight'; diff --git a/packages/apps-routing/src/staking2.ts b/packages/apps-routing/src/staking2.ts index 532534a52c..cd6d0d2587 100644 --- a/packages/apps-routing/src/staking2.ts +++ b/packages/apps-routing/src/staking2.ts @@ -4,7 +4,7 @@ import type { TFunction } from 'i18next'; import type { ApiPromise } from '@polkadot/api'; import type { PalletStakingExposure } from '@polkadot/types/lookup'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-staking2'; import { ZERO_ACCOUNT } from '@polkadot/react-hooks/useWeight'; diff --git a/packages/apps-routing/src/storage.ts b/packages/apps-routing/src/storage.ts index b4c9944968..da62ef9ff5 100644 --- a/packages/apps-routing/src/storage.ts +++ b/packages/apps-routing/src/storage.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-storage'; diff --git a/packages/apps-routing/src/sudo.ts b/packages/apps-routing/src/sudo.ts index e61817520b..60acdbb595 100644 --- a/packages/apps-routing/src/sudo.ts +++ b/packages/apps-routing/src/sudo.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-sudo'; diff --git a/packages/apps-routing/src/techcomm.ts b/packages/apps-routing/src/techcomm.ts index b8e2fb926d..2c1b4b2886 100644 --- a/packages/apps-routing/src/techcomm.ts +++ b/packages/apps-routing/src/techcomm.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component, { useCounter } from '@polkadot/app-tech-comm'; diff --git a/packages/apps-routing/src/teleport.ts b/packages/apps-routing/src/teleport.ts index 92098dd726..70d7ecabfd 100644 --- a/packages/apps-routing/src/teleport.ts +++ b/packages/apps-routing/src/teleport.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Modal from '@polkadot/app-parachains/Teleport'; diff --git a/packages/apps-routing/src/transfer.ts b/packages/apps-routing/src/transfer.ts index 4f7e4b0b0d..a24cf1239f 100644 --- a/packages/apps-routing/src/transfer.ts +++ b/packages/apps-routing/src/transfer.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Modal from '@polkadot/app-accounts/modals/Transfer'; diff --git a/packages/apps-routing/src/treasury.ts b/packages/apps-routing/src/treasury.ts index 734e89509f..7eb14540c1 100644 --- a/packages/apps-routing/src/treasury.ts +++ b/packages/apps-routing/src/treasury.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component, { useCounter } from '@polkadot/app-treasury'; diff --git a/packages/apps-routing/src/utilities.ts b/packages/apps-routing/src/utilities.ts index e30243af1f..6277112e94 100644 --- a/packages/apps-routing/src/utilities.ts +++ b/packages/apps-routing/src/utilities.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-utilities'; diff --git a/packages/apps-routing/src/whitelist.ts b/packages/apps-routing/src/whitelist.ts index e01d00547d..aa96179384 100644 --- a/packages/apps-routing/src/whitelist.ts +++ b/packages/apps-routing/src/whitelist.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { TFunction } from 'i18next'; -import type { Route } from './types'; +import type { Route } from './types.js'; import Component from '@polkadot/app-whitelist'; diff --git a/packages/apps/package.json b/packages/apps/package.json index 70fb64eb86..4bfd22ed9f 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -15,7 +15,7 @@ "dependencies": { "@polkadot/apps-config": "^0.124.2-124-x", "@polkadot/apps-routing": "^0.124.2-124-x", - "@polkadot/dev": "^0.70.4", + "@polkadot/dev": "^0.71.1", "@polkadot/react-api": "^0.124.2-124-x", "@polkadot/react-components": "^0.124.2-124-x", "@polkadot/react-hooks": "^0.124.2-124-x", diff --git a/packages/apps/src/Apps.tsx b/packages/apps/src/Apps.tsx index fa8ad273c8..a114c7b8cc 100644 --- a/packages/apps/src/Apps.tsx +++ b/packages/apps/src/Apps.tsx @@ -11,10 +11,10 @@ import GlobalStyle from '@polkadot/react-components/styles'; import { useApi, useTheme } from '@polkadot/react-hooks'; import Signer from '@polkadot/react-signer'; -import ConnectingOverlay from './overlays/Connecting'; -import Content from './Content'; -import Menu from './Menu'; -import WarmUp from './WarmUp'; +import Content from './Content/index.js'; +import Menu from './Menu/index.js'; +import ConnectingOverlay from './overlays/Connecting.js'; +import WarmUp from './WarmUp.js'; export const PORTAL_ID = 'portals'; diff --git a/packages/apps/src/Content/Status.tsx b/packages/apps/src/Content/Status.tsx index 12ea9305c1..95667e0750 100644 --- a/packages/apps/src/Content/Status.tsx +++ b/packages/apps/src/Content/Status.tsx @@ -12,7 +12,7 @@ import { useAccounts, useApi, useCall, useQueue } from '@polkadot/react-hooks'; import { stringToU8a } from '@polkadot/util'; import { xxhashAsHex } from '@polkadot/util-crypto'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { optionsAll?: KeyringOptions; diff --git a/packages/apps/src/Content/index.tsx b/packages/apps/src/Content/index.tsx index da06dcb868..9edc4586d6 100644 --- a/packages/apps/src/Content/index.tsx +++ b/packages/apps/src/Content/index.tsx @@ -10,10 +10,10 @@ import createRoutes from '@polkadot/apps-routing'; import { ErrorBoundary, Spinner, styled, TabsCtx } from '@polkadot/react-components'; import { useApi, useQueue } from '@polkadot/react-hooks'; -import { findMissingApis } from '../endpoint'; -import { useTranslation } from '../translate'; -import NotFound from './NotFound'; -import Status from './Status'; +import { findMissingApis } from '../endpoint.js'; +import { useTranslation } from '../translate.js'; +import NotFound from './NotFound.js'; +import Status from './Status.js'; interface Props { className?: string; diff --git a/packages/apps/src/Endpoints/Group.tsx b/packages/apps/src/Endpoints/Group.tsx index 896dfd429a..5eff78bd4b 100644 --- a/packages/apps/src/Endpoints/Group.tsx +++ b/packages/apps/src/Endpoints/Group.tsx @@ -1,13 +1,13 @@ // Copyright 2017-2023 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Group } from './types'; +import type { Group } from './types.js'; import React, { useCallback, useMemo } from 'react'; import { Icon, styled } from '@polkadot/react-components'; -import Network from './Network'; +import Network from './Network.js'; interface Props { affinities: Record; diff --git a/packages/apps/src/Endpoints/Network.tsx b/packages/apps/src/Endpoints/Network.tsx index a3fbb7e237..3920030daf 100644 --- a/packages/apps/src/Endpoints/Network.tsx +++ b/packages/apps/src/Endpoints/Network.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Network } from './types'; +import type { Network } from './types.js'; import React, { useCallback, useMemo } from 'react'; import { ChainImg, styled } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Url from './Url'; +import { useTranslation } from '../translate.js'; +import Url from './Url.js'; interface Props { affinity?: string; // unused - previous selection diff --git a/packages/apps/src/Endpoints/index.tsx b/packages/apps/src/Endpoints/index.tsx index 2b084b16ff..35288aa224 100644 --- a/packages/apps/src/Endpoints/index.tsx +++ b/packages/apps/src/Endpoints/index.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { LinkOption } from '@polkadot/apps-config/endpoints/types'; -import type { Group } from './types'; +import type { Group } from './types.js'; // ok, this seems to be an eslint bug, this _is_ a package import import punycode from 'punycode/'; @@ -14,8 +14,8 @@ import { Button, Input, Sidebar, styled } from '@polkadot/react-components'; import { settings } from '@polkadot/ui-settings'; import { isAscii } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import GroupDisplay from './Group'; +import { useTranslation } from '../translate.js'; +import GroupDisplay from './Group.js'; interface Props { className?: string; diff --git a/packages/apps/src/Menu/ChainInfo.tsx b/packages/apps/src/Menu/ChainInfo.tsx index 100adf0874..953273814a 100644 --- a/packages/apps/src/Menu/ChainInfo.tsx +++ b/packages/apps/src/Menu/ChainInfo.tsx @@ -9,7 +9,7 @@ import { ChainImg, Icon, styled } from '@polkadot/react-components'; import { useApi, useCall, useIpfs, useToggle } from '@polkadot/react-hooks'; import { BestNumber, Chain } from '@polkadot/react-query'; -import Endpoints from '../Endpoints'; +import Endpoints from '../Endpoints/index.js'; interface Props { className?: string; diff --git a/packages/apps/src/Menu/Grouping.tsx b/packages/apps/src/Menu/Grouping.tsx index 43543b03e3..7058c60fed 100644 --- a/packages/apps/src/Menu/Grouping.tsx +++ b/packages/apps/src/Menu/Grouping.tsx @@ -1,13 +1,13 @@ // Copyright 2017-2023 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Group } from './types'; +import type { Group } from './types.js'; import React from 'react'; import { Icon, styled } from '@polkadot/react-components'; -import Item from './Item'; +import Item from './Item.js'; interface Props extends Group { className?: string; diff --git a/packages/apps/src/Menu/Item.tsx b/packages/apps/src/Menu/Item.tsx index 1319a0ab5c..a8435c9c79 100644 --- a/packages/apps/src/Menu/Item.tsx +++ b/packages/apps/src/Menu/Item.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/apps authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { ItemRoute } from './types'; +import type { ItemRoute } from './types.js'; import React from 'react'; diff --git a/packages/apps/src/Menu/NodeInfo.tsx b/packages/apps/src/Menu/NodeInfo.tsx index 1a1d7cc425..96bc4ebcf2 100644 --- a/packages/apps/src/Menu/NodeInfo.tsx +++ b/packages/apps/src/Menu/NodeInfo.tsx @@ -9,7 +9,7 @@ import { styled } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; import { NodeName, NodeVersion } from '@polkadot/react-query'; -import { packageInfo } from '../packageInfo'; +import { packageInfo } from '../packageInfo.js'; const uiInfo = `apps v${packageInfo.version.replace('-x', '')}`; diff --git a/packages/apps/src/Menu/index.tsx b/packages/apps/src/Menu/index.tsx index 846db93619..a6d9195f7c 100644 --- a/packages/apps/src/Menu/index.tsx +++ b/packages/apps/src/Menu/index.tsx @@ -5,7 +5,7 @@ import type { TFunction } from 'i18next'; import type { Route, Routes } from '@polkadot/apps-routing/types'; import type { ApiProps } from '@polkadot/react-api/types'; import type { AccountId } from '@polkadot/types/interfaces'; -import type { Group, Groups, ItemRoute } from './types'; +import type { Group, Groups, ItemRoute } from './types.js'; import React, { useMemo, useRef } from 'react'; import { useLocation } from 'react-router-dom'; @@ -14,12 +14,12 @@ import createRoutes from '@polkadot/apps-routing'; import { styled } from '@polkadot/react-components'; import { useAccounts, useApi, useCall, useTeleport } from '@polkadot/react-hooks'; -import { findMissingApis } from '../endpoint'; -import { useTranslation } from '../translate'; -import ChainInfo from './ChainInfo'; -import Grouping from './Grouping'; -import Item from './Item'; -import NodeInfo from './NodeInfo'; +import { findMissingApis } from '../endpoint.js'; +import { useTranslation } from '../translate.js'; +import ChainInfo from './ChainInfo.js'; +import Grouping from './Grouping.js'; +import Item from './Item.js'; +import NodeInfo from './NodeInfo.js'; interface Props { className?: string; diff --git a/packages/apps/src/Root.tsx b/packages/apps/src/Root.tsx index de47a857de..2ed836bf74 100644 --- a/packages/apps/src/Root.tsx +++ b/packages/apps/src/Root.tsx @@ -12,8 +12,8 @@ import { ApiCtxRoot } from '@polkadot/react-api'; import { ApiStatsCtxRoot, BlockAuthorsCtxRoot, BlockEventsCtxRoot, KeyringCtxRoot, QueueCtxRoot, WindowSizeCtxRoot } from '@polkadot/react-hooks'; import { settings } from '@polkadot/ui-settings'; -import Apps from './Apps'; -import { darkTheme, lightTheme } from './themes'; +import Apps from './Apps.js'; +import { darkTheme, lightTheme } from './themes.js'; interface Props { isElectron: boolean; diff --git a/packages/apps/src/detectPackage.ts b/packages/apps/src/detectPackage.ts index 818f2219da..4b6791cfcf 100644 --- a/packages/apps/src/detectPackage.ts +++ b/packages/apps/src/detectPackage.ts @@ -5,7 +5,7 @@ import { detectPackage } from '@polkadot/util'; -import others from './detectOther'; -import { packageInfo } from './packageInfo'; +import others from './detectOther.js'; +import { packageInfo } from './packageInfo.js'; detectPackage(packageInfo, null, others); diff --git a/packages/apps/src/index.tsx b/packages/apps/src/index.tsx index e7d458dee7..c19e68660a 100644 --- a/packages/apps/src/index.tsx +++ b/packages/apps/src/index.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // setup these right at front -import './initSettings'; +import './initSettings.js'; import 'semantic-ui-css/semantic.min.css'; import '@polkadot/react-components/i18n'; import '@polkadot/api-augment/substrate'; @@ -10,7 +10,7 @@ import '@polkadot/api-augment/substrate'; import React from 'react'; import { createRoot } from 'react-dom/client'; -import Root from './Root'; +import Root from './Root.js'; const rootId = 'root'; const rootElement = document.getElementById(rootId); diff --git a/packages/apps/src/overlays/Connecting.tsx b/packages/apps/src/overlays/Connecting.tsx index 24189d3a23..2adef1b4ad 100644 --- a/packages/apps/src/overlays/Connecting.tsx +++ b/packages/apps/src/overlays/Connecting.tsx @@ -6,8 +6,8 @@ import React from 'react'; import { useApi } from '@polkadot/react-hooks'; import { settings } from '@polkadot/ui-settings'; -import { useTranslation } from '../translate'; -import BaseOverlay from './Base'; +import { useTranslation } from '../translate.js'; +import BaseOverlay from './Base.js'; const wsUrl = settings.apiType.param; const isWs = settings.apiType.type === 'json-rpc' && typeof wsUrl === 'string' && wsUrl.startsWith('ws://'); diff --git a/packages/apps/webpack.base.cjs b/packages/apps/webpack.base.cjs index f13366fa38..acd65d0818 100644 --- a/packages/apps/webpack.base.cjs +++ b/packages/apps/webpack.base.cjs @@ -146,6 +146,9 @@ function createWebpack (context, mode = 'production') { ].concat(plugins), resolve: { alias, + extensionAlias: { + '.js': ['.js', '.ts', '.tsx'] + }, extensions: ['.js', '.jsx', '.mjs', '.ts', '.tsx'], fallback: { assert: require.resolve('assert/'), diff --git a/packages/page-accounts/src/Accounts/Account.tsx b/packages/page-accounts/src/Accounts/Account.tsx index 122caec640..12998fd710 100644 --- a/packages/page-accounts/src/Accounts/Account.tsx +++ b/packages/page-accounts/src/Accounts/Account.tsx @@ -8,7 +8,7 @@ import type { ActionStatus } from '@polkadot/react-components/Status/types'; import type { Option } from '@polkadot/types'; import type { ProxyDefinition, RecoveryConfig } from '@polkadot/types/interfaces'; import type { KeyringAddress, KeyringJson$Meta } from '@polkadot/ui-keyring/types'; -import type { AccountBalance, Delegation } from '../types'; +import type { AccountBalance, Delegation } from '../types.js'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; @@ -19,22 +19,22 @@ import { useAccountInfo, useApi, useBalancesAll, useBestNumber, useCall, useLedg import { keyring } from '@polkadot/ui-keyring'; import { BN, BN_ZERO, formatBalance, formatNumber, isFunction } from '@polkadot/util'; -import Backup from '../modals/Backup'; -import ChangePass from '../modals/ChangePass'; -import DelegateModal from '../modals/Delegate'; -import Derive from '../modals/Derive'; -import IdentityMain from '../modals/IdentityMain'; -import IdentitySub from '../modals/IdentitySub'; -import MultisigApprove from '../modals/MultisigApprove'; -import ProxyOverview from '../modals/ProxyOverview'; -import RecoverAccount from '../modals/RecoverAccount'; -import RecoverSetup from '../modals/RecoverSetup'; -import Transfer from '../modals/Transfer'; -import UndelegateModal from '../modals/Undelegate'; -import { useTranslation } from '../translate'; -import { createMenuGroup } from '../util'; -import useMultisigApprovals from './useMultisigApprovals'; -import useProxies from './useProxies'; +import Backup from '../modals/Backup.js'; +import ChangePass from '../modals/ChangePass.js'; +import DelegateModal from '../modals/Delegate.js'; +import Derive from '../modals/Derive.js'; +import IdentityMain from '../modals/IdentityMain.js'; +import IdentitySub from '../modals/IdentitySub.js'; +import MultisigApprove from '../modals/MultisigApprove.js'; +import ProxyOverview from '../modals/ProxyOverview.js'; +import RecoverAccount from '../modals/RecoverAccount.js'; +import RecoverSetup from '../modals/RecoverSetup.js'; +import Transfer from '../modals/Transfer.js'; +import UndelegateModal from '../modals/Undelegate.js'; +import { useTranslation } from '../translate.js'; +import { createMenuGroup } from '../util.js'; +import useMultisigApprovals from './useMultisigApprovals.js'; +import useProxies from './useProxies.js'; interface Props { account: KeyringAddress; diff --git a/packages/page-accounts/src/Accounts/BannerClaims.tsx b/packages/page-accounts/src/Accounts/BannerClaims.tsx index 27911c318c..3111125bd5 100644 --- a/packages/page-accounts/src/Accounts/BannerClaims.tsx +++ b/packages/page-accounts/src/Accounts/BannerClaims.tsx @@ -5,8 +5,8 @@ import React from 'react'; import useClaimCounter from '@polkadot/app-claims/useCounter'; // exceptionally CRAP idea -import { useTranslation } from '../translate'; -import Banner from './Banner'; +import { useTranslation } from '../translate.js'; +import Banner from './Banner.js'; function BannerExtension (): React.ReactElement | null { const claimCount = useClaimCounter(); diff --git a/packages/page-accounts/src/Accounts/BannerExtension.tsx b/packages/page-accounts/src/Accounts/BannerExtension.tsx index 48057a18d5..9e17e031dc 100644 --- a/packages/page-accounts/src/Accounts/BannerExtension.tsx +++ b/packages/page-accounts/src/Accounts/BannerExtension.tsx @@ -12,8 +12,8 @@ import { onlyOnWeb } from '@polkadot/react-api/hoc'; import { useApi } from '@polkadot/react-hooks'; import { stringUpperFirst } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Banner from './Banner'; +import { useTranslation } from '../translate.js'; +import Banner from './Banner.js'; // it would have been really good to import this from detect, however... not exported type Browser = 'chrome' | 'firefox'; diff --git a/packages/page-accounts/src/Accounts/Summary.tsx b/packages/page-accounts/src/Accounts/Summary.tsx index 5806819ef9..a792289324 100644 --- a/packages/page-accounts/src/Accounts/Summary.tsx +++ b/packages/page-accounts/src/Accounts/Summary.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { AccountBalance } from '../types'; +import type { AccountBalance } from '../types.js'; import React from 'react'; diff --git a/packages/page-accounts/src/Accounts/index.spec.ts b/packages/page-accounts/src/Accounts/index.spec.ts index 0a9181e69f..b3e93f5faa 100644 --- a/packages/page-accounts/src/Accounts/index.spec.ts +++ b/packages/page-accounts/src/Accounts/index.spec.ts @@ -9,8 +9,8 @@ import { toShortAddress } from '@polkadot/react-components/util/toShortAddress'; import { AddressFlags } from '@polkadot/react-hooks/types'; import { anAccountWithBalance, anAccountWithBalanceAndMeta, anAccountWithInfo, anAccountWithInfoAndMeta, anAccountWithMeta, anAccountWithStaking } from '@polkadot/test-support/creation/account'; import { makeStakingLedger as ledger } from '@polkadot/test-support/creation/stakingInfo/stakingLedger'; -import { alice, bob, MemoryStore } from '@polkadot/test-support/keyring'; -import { Table } from '@polkadot/test-support/pagesElements'; +import { alice, bob, MemoryStore } from '@polkadot/test-support/keyring/index'; +import { Table } from '@polkadot/test-support/pagesElements/index'; import { balance, showBalance } from '@polkadot/test-support/utils/balance'; import { mockApiHooks } from '@polkadot/test-support/utils/mockApiHooks'; import { u32 } from '@polkadot/types'; @@ -19,8 +19,8 @@ import { AccountId, Multisig, ProxyDefinition, Timepoint, Voting, VotingDelegati import { keyring } from '@polkadot/ui-keyring'; import { BN } from '@polkadot/util'; -import { AccountRow } from '../../test/pageElements/AccountRow'; -import { AccountsPage } from '../../test/pages/accountsPage'; +import { AccountRow } from '../../test/pageElements/AccountRow.js'; +import { AccountsPage } from '../../test/pages/accountsPage.js'; // FIXME isSplit Table describe.skip('Accounts page', () => { diff --git a/packages/page-accounts/src/Accounts/index.tsx b/packages/page-accounts/src/Accounts/index.tsx index fa14104f0e..e525adad9e 100644 --- a/packages/page-accounts/src/Accounts/index.tsx +++ b/packages/page-accounts/src/Accounts/index.tsx @@ -4,8 +4,8 @@ import type { ActionStatus } from '@polkadot/react-components/Status/types'; import type { KeyringAddress } from '@polkadot/ui-keyring/types'; import type { BN } from '@polkadot/util'; -import type { AccountBalance, Delegation, SortedAccount } from '../types'; -import type { SortCategory } from '../util'; +import type { AccountBalance, Delegation, SortedAccount } from '../types.js'; +import type { SortCategory } from '../util.js'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; @@ -16,18 +16,18 @@ import { keyring } from '@polkadot/ui-keyring'; import { settings } from '@polkadot/ui-settings'; import { BN_ZERO, isFunction } from '@polkadot/util'; -import CreateModal from '../modals/Create'; -import ImportModal from '../modals/Import'; -import Ledger from '../modals/Ledger'; -import Multisig from '../modals/MultisigCreate'; -import Proxy from '../modals/ProxiedAdd'; -import Qr from '../modals/Qr'; -import { useTranslation } from '../translate'; -import { SORT_CATEGORY, sortAccounts } from '../util'; -import Account from './Account'; -import BannerClaims from './BannerClaims'; -import BannerExtension from './BannerExtension'; -import Summary from './Summary'; +import CreateModal from '../modals/Create.js'; +import ImportModal from '../modals/Import.js'; +import Ledger from '../modals/Ledger.js'; +import Multisig from '../modals/MultisigCreate.js'; +import Proxy from '../modals/ProxiedAdd.js'; +import Qr from '../modals/Qr.js'; +import { useTranslation } from '../translate.js'; +import { SORT_CATEGORY, sortAccounts } from '../util.js'; +import Account from './Account.js'; +import BannerClaims from './BannerClaims.js'; +import BannerExtension from './BannerExtension.js'; +import Summary from './Summary.js'; interface Balances { accounts: Record; diff --git a/packages/page-accounts/src/CreateAccount.slow.spec.tsx b/packages/page-accounts/src/CreateAccount.slow.spec.tsx index c759290a5a..0e704a891e 100644 --- a/packages/page-accounts/src/CreateAccount.slow.spec.tsx +++ b/packages/page-accounts/src/CreateAccount.slow.spec.tsx @@ -11,9 +11,9 @@ import { ThemeProvider } from 'styled-components'; import AccountsApp from '@polkadot/app-accounts'; import { lightTheme } from '@polkadot/apps/themes'; import { ApiCtxRoot } from '@polkadot/react-api'; -import { MemoryStore } from '@polkadot/test-support/keyring'; -import { WaitForApi } from '@polkadot/test-support/react'; -import { SUBSTRATE_PORT } from '@polkadot/test-support/substrate'; +import { MemoryStore } from '@polkadot/test-support/keyring/index'; +import { WaitForApi } from '@polkadot/test-support/react/index'; +import { SUBSTRATE_PORT } from '@polkadot/test-support/substrate/index'; function noop (): void { // do nothing diff --git a/packages/page-accounts/src/Sidebar/AccountMenuButtons.tsx b/packages/page-accounts/src/Sidebar/AccountMenuButtons.tsx index 02ba77b1c1..8a3046d8e0 100644 --- a/packages/page-accounts/src/Sidebar/AccountMenuButtons.tsx +++ b/packages/page-accounts/src/Sidebar/AccountMenuButtons.tsx @@ -8,8 +8,8 @@ import { useApi, useToggle } from '@polkadot/react-hooks'; import { AddressFlags } from '@polkadot/react-hooks/types'; import { isFunction } from '@polkadot/util'; -import Transfer from '../modals/Transfer'; -import { useTranslation } from '../translate'; +import Transfer from '../modals/Transfer.js'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-accounts/src/Sidebar/AddressSection.tsx b/packages/page-accounts/src/Sidebar/AddressSection.tsx index 7914ec2bbd..91781b3100 100644 --- a/packages/page-accounts/src/Sidebar/AddressSection.tsx +++ b/packages/page-accounts/src/Sidebar/AddressSection.tsx @@ -8,7 +8,7 @@ import { AccountName, Button, IdentityIcon, Input } from '@polkadot/react-compon import { useToggle } from '@polkadot/react-hooks'; import { AddressFlags } from '@polkadot/react-hooks/types'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { value: string, diff --git a/packages/page-accounts/src/Sidebar/Balances.tsx b/packages/page-accounts/src/Sidebar/Balances.tsx index 2a7a1afeb6..e8ef01782b 100644 --- a/packages/page-accounts/src/Sidebar/Balances.tsx +++ b/packages/page-accounts/src/Sidebar/Balances.tsx @@ -5,7 +5,7 @@ import React from 'react'; import { AddressInfo, styled } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { address: string; diff --git a/packages/page-accounts/src/Sidebar/Flags.tsx b/packages/page-accounts/src/Sidebar/Flags.tsx index 3a1402794c..41cd4cc7c1 100644 --- a/packages/page-accounts/src/Sidebar/Flags.tsx +++ b/packages/page-accounts/src/Sidebar/Flags.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { Flag, styled } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { flags: AddressFlags; diff --git a/packages/page-accounts/src/Sidebar/Identity.tsx b/packages/page-accounts/src/Sidebar/Identity.tsx index 3e5904a363..40a4bfabee 100644 --- a/packages/page-accounts/src/Sidebar/Identity.tsx +++ b/packages/page-accounts/src/Sidebar/Identity.tsx @@ -9,10 +9,10 @@ import { AddressMini, AvatarItem, Expander, IconLink } from '@polkadot/react-com import { useApi, useRegistrars, useSubidentities, useToggle } from '@polkadot/react-hooks'; import { isHex } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Judgements from './Judgements'; -import RegistrarJudgement from './RegistrarJudgement'; -import UserIcon from './UserIcon'; +import { useTranslation } from '../translate.js'; +import Judgements from './Judgements.js'; +import RegistrarJudgement from './RegistrarJudgement.js'; +import UserIcon from './UserIcon.js'; interface Props { address: string; diff --git a/packages/page-accounts/src/Sidebar/JudgementTag.tsx b/packages/page-accounts/src/Sidebar/JudgementTag.tsx index ee232901ea..2e8f51fab0 100644 --- a/packages/page-accounts/src/Sidebar/JudgementTag.tsx +++ b/packages/page-accounts/src/Sidebar/JudgementTag.tsx @@ -7,7 +7,7 @@ import React, { useMemo } from 'react'; import { AddressSmall, Menu, Popup, Tag } from '@polkadot/react-components'; -import { getJudgementColor } from '../util'; +import { getJudgementColor } from '../util.js'; interface Props { judgement: Judgement diff --git a/packages/page-accounts/src/Sidebar/Judgements.tsx b/packages/page-accounts/src/Sidebar/Judgements.tsx index e864d5a584..0718042e83 100644 --- a/packages/page-accounts/src/Sidebar/Judgements.tsx +++ b/packages/page-accounts/src/Sidebar/Judgements.tsx @@ -6,8 +6,8 @@ import React from 'react'; import { styled, Tag } from '@polkadot/react-components'; import { useJudgements } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import JudgementTag from './JudgementTag'; +import { useTranslation } from '../translate.js'; +import JudgementTag from './JudgementTag.js'; interface Props { address: string; diff --git a/packages/page-accounts/src/Sidebar/Multisig.tsx b/packages/page-accounts/src/Sidebar/Multisig.tsx index 67caef8e6f..b668908afb 100644 --- a/packages/page-accounts/src/Sidebar/Multisig.tsx +++ b/packages/page-accounts/src/Sidebar/Multisig.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { AddressMini } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { isMultisig: boolean; diff --git a/packages/page-accounts/src/Sidebar/RegistrarJudgement.tsx b/packages/page-accounts/src/Sidebar/RegistrarJudgement.tsx index cd20fdde6f..d8e86b4bef 100644 --- a/packages/page-accounts/src/Sidebar/RegistrarJudgement.tsx +++ b/packages/page-accounts/src/Sidebar/RegistrarJudgement.tsx @@ -10,7 +10,7 @@ import React, { useEffect, useState } from 'react'; import { Dropdown, Input, InputAddress, MarkError, Modal, Spinner, TxButton } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { address: string; diff --git a/packages/page-accounts/src/Sidebar/Sidebar.spec.tsx b/packages/page-accounts/src/Sidebar/Sidebar.spec.tsx index 61331e5399..6ec649444c 100644 --- a/packages/page-accounts/src/Sidebar/Sidebar.spec.tsx +++ b/packages/page-accounts/src/Sidebar/Sidebar.spec.tsx @@ -6,14 +6,14 @@ import { fireEvent, screen, waitFor, within } from '@testing-library/react'; import i18next from '@polkadot/react-components/i18n'; import { AddressFlags } from '@polkadot/react-hooks/types'; import { anAccount, anAccountWithInfo, anAccountWithMeta } from '@polkadot/test-support/creation/account'; -import { alice, bob, MemoryStore } from '@polkadot/test-support/keyring'; +import { alice, bob, MemoryStore } from '@polkadot/test-support/keyring/index'; import { charlieShortAddress, ferdieShortAddress, mockRegistration, registrars } from '@polkadot/test-support/mockData/registrations'; import { Sidebar } from '@polkadot/test-support/pagesElements/Sidebar'; import { mockApiHooks } from '@polkadot/test-support/utils/mockApiHooks'; import { RegistrationJudgement } from '@polkadot/types/interfaces'; import { keyring } from '@polkadot/ui-keyring'; -import { AccountsPage } from '../../test/pages/accountsPage'; +import { AccountsPage } from '../../test/pages/accountsPage.js'; // FIXME: these all need to be wrapped in waitFor .... describe.skip('Sidebar', () => { diff --git a/packages/page-accounts/src/Sidebar/Sidebar.tsx b/packages/page-accounts/src/Sidebar/Sidebar.tsx index 062fb5a4b6..22bc48ae94 100644 --- a/packages/page-accounts/src/Sidebar/Sidebar.tsx +++ b/packages/page-accounts/src/Sidebar/Sidebar.tsx @@ -8,10 +8,10 @@ import Sidebar from '@polkadot/react-components/Sidebar'; import { colorLink } from '@polkadot/react-components/styles/theme'; import { useAccountInfo } from '@polkadot/react-hooks'; -import Balances from './Balances'; -import Identity from './Identity'; -import Multisig from './Multisig'; -import SidebarEditableSection from './SidebarEditableSection'; +import Balances from './Balances.js'; +import Identity from './Identity.js'; +import Multisig from './Multisig.js'; +import SidebarEditableSection from './SidebarEditableSection.js'; interface Props { address: string; diff --git a/packages/page-accounts/src/Sidebar/SidebarEditableSection.tsx b/packages/page-accounts/src/Sidebar/SidebarEditableSection.tsx index d326a51f0d..37b68fa007 100644 --- a/packages/page-accounts/src/Sidebar/SidebarEditableSection.tsx +++ b/packages/page-accounts/src/Sidebar/SidebarEditableSection.tsx @@ -7,9 +7,9 @@ import { Tags } from '@polkadot/react-components'; import { useAccountInfo, useOutsideClick } from '@polkadot/react-hooks'; import { keyring } from '@polkadot/ui-keyring'; -import AccountMenuButtons from './AccountMenuButtons'; -import AddressSection from './AddressSection'; -import Flags from './Flags'; +import AccountMenuButtons from './AccountMenuButtons.js'; +import AddressSection from './AddressSection.js'; +import Flags from './Flags.js'; interface Props { accountIndex: string | undefined; diff --git a/packages/page-accounts/src/Sidebar/index.tsx b/packages/page-accounts/src/Sidebar/index.tsx index 8eec88d007..a5b63eb6b2 100644 --- a/packages/page-accounts/src/Sidebar/index.tsx +++ b/packages/page-accounts/src/Sidebar/index.tsx @@ -3,7 +3,7 @@ import React, { useCallback, useState } from 'react'; -import Sidebar from './Sidebar'; +import Sidebar from './Sidebar.js'; interface Props { children: React.ReactNode; diff --git a/packages/page-accounts/src/Vanity/Match.tsx b/packages/page-accounts/src/Vanity/Match.tsx index 94e51d9cd8..02d757189e 100644 --- a/packages/page-accounts/src/Vanity/Match.tsx +++ b/packages/page-accounts/src/Vanity/Match.tsx @@ -6,7 +6,7 @@ import React, { useCallback, useMemo } from 'react'; import { Button, IdentityIcon, styled } from '@polkadot/react-components'; import { u8aToHex } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { address: string; diff --git a/packages/page-accounts/src/Vanity/index.tsx b/packages/page-accounts/src/Vanity/index.tsx index e3cc33d015..de9265b7c1 100644 --- a/packages/page-accounts/src/Vanity/index.tsx +++ b/packages/page-accounts/src/Vanity/index.tsx @@ -15,9 +15,9 @@ import generator from '@polkadot/vanitygen/generator'; import matchRegex from '@polkadot/vanitygen/regex'; import generatorSort from '@polkadot/vanitygen/sort'; -import CreateModal from '../modals/Create'; -import { useTranslation } from '../translate'; -import Match from './Match'; +import CreateModal from '../modals/Create.js'; +import { useTranslation } from '../translate.js'; +import Match from './Match.js'; interface Props { className?: string; diff --git a/packages/page-accounts/src/index.tsx b/packages/page-accounts/src/index.tsx index 2428cf1603..4e7b71e706 100644 --- a/packages/page-accounts/src/index.tsx +++ b/packages/page-accounts/src/index.tsx @@ -9,10 +9,10 @@ import { Route, Switch } from 'react-router'; import { Tabs } from '@polkadot/react-components'; import { useAccounts, useIpfs } from '@polkadot/react-hooks'; -import Accounts from './Accounts'; -import { useTranslation } from './translate'; -import useCounter from './useCounter'; -import Vanity from './Vanity'; +import Accounts from './Accounts/index.js'; +import Vanity from './Vanity/index.js'; +import { useTranslation } from './translate.js'; +import useCounter from './useCounter.js'; export { useCounter }; diff --git a/packages/page-accounts/src/modals/Backup.tsx b/packages/page-accounts/src/modals/Backup.tsx index ef7d99e6e6..5b60962bfb 100644 --- a/packages/page-accounts/src/modals/Backup.tsx +++ b/packages/page-accounts/src/modals/Backup.tsx @@ -8,7 +8,7 @@ import { AddressRow, Button, Modal, Password } from '@polkadot/react-components' import { keyring } from '@polkadot/ui-keyring'; import { nextTick } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { onClose: () => void; diff --git a/packages/page-accounts/src/modals/ChangePass.tsx b/packages/page-accounts/src/modals/ChangePass.tsx index 86a6244b9d..02d55effee 100644 --- a/packages/page-accounts/src/modals/ChangePass.tsx +++ b/packages/page-accounts/src/modals/ChangePass.tsx @@ -7,7 +7,7 @@ import { AddressRow, Button, Modal, Password, PasswordStrength } from '@polkadot import { keyring } from '@polkadot/ui-keyring'; import { nextTick } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-accounts/src/modals/Create.spec.tsx b/packages/page-accounts/src/modals/Create.spec.tsx index 456995672d..287bcef063 100644 --- a/packages/page-accounts/src/modals/Create.spec.tsx +++ b/packages/page-accounts/src/modals/Create.spec.tsx @@ -4,12 +4,12 @@ import { fireEvent, screen, waitForElementToBeRemoved } from '@testing-library/react'; import i18next from '@polkadot/react-components/i18n'; -import { MemoryStore } from '@polkadot/test-support/keyring'; +import { MemoryStore } from '@polkadot/test-support/keyring/index'; import { assertButtonDisabled, assertText, clickButton, fillInput } from '@polkadot/test-support/utils/renderedScreenUtils'; import { keyring } from '@polkadot/ui-keyring'; import { cryptoWaitReady } from '@polkadot/util-crypto'; -import { AccountsPage } from '../../test/pages/accountsPage'; +import { AccountsPage } from '../../test/pages/accountsPage.js'; const spy = jest.spyOn(keyring, 'addUri'); diff --git a/packages/page-accounts/src/modals/Create.tsx b/packages/page-accounts/src/modals/Create.tsx index bec1dcd460..f43bef2567 100644 --- a/packages/page-accounts/src/modals/Create.tsx +++ b/packages/page-accounts/src/modals/Create.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { ActionStatus } from '@polkadot/react-components/Status/types'; -import type { AddressState, CreateOptions, CreateProps, DeriveValidationOutput, PairType, SeedType } from '../types'; +import type { AddressState, CreateOptions, CreateProps, DeriveValidationOutput, PairType, SeedType } from '../types.js'; import React, { useCallback, useRef, useState } from 'react'; @@ -14,13 +14,13 @@ import { settings } from '@polkadot/ui-settings'; import { isHex, nextTick, u8aToHex } from '@polkadot/util'; import { hdLedger, hdValidatePath, keyExtractSuri, mnemonicGenerate, mnemonicValidate, randomAsU8a } from '@polkadot/util-crypto'; -import { useTranslation } from '../translate'; -import { tryCreateAccount } from '../util'; -import CreateAccountInputs from './CreateAccountInputs'; -import CreateConfirmation from './CreateConfirmation'; -import CreateEthDerivationPath, { ETH_DEFAULT_PATH } from './CreateEthDerivationPath'; -import CreateSuriLedger from './CreateSuriLedger'; -import ExternalWarning from './ExternalWarning'; +import { useTranslation } from '../translate.js'; +import { tryCreateAccount } from '../util.js'; +import CreateAccountInputs from './CreateAccountInputs.js'; +import CreateConfirmation from './CreateConfirmation.js'; +import CreateEthDerivationPath, { ETH_DEFAULT_PATH } from './CreateEthDerivationPath.js'; +import CreateSuriLedger from './CreateSuriLedger.js'; +import ExternalWarning from './ExternalWarning.js'; const DEFAULT_PAIR_TYPE = 'sr25519'; const STEPS_COUNT = 3; diff --git a/packages/page-accounts/src/modals/CreateAccountInputs.tsx b/packages/page-accounts/src/modals/CreateAccountInputs.tsx index d27c6f34cb..20cc80ee3c 100644 --- a/packages/page-accounts/src/modals/CreateAccountInputs.tsx +++ b/packages/page-accounts/src/modals/CreateAccountInputs.tsx @@ -6,7 +6,7 @@ import React, { useCallback } from 'react'; import { Input, Modal } from '@polkadot/react-components'; import { useTranslation } from '@polkadot/react-components/translate'; -import PasswordInput from './PasswordInput'; +import PasswordInput from './PasswordInput.js'; interface AccountName { name: string; diff --git a/packages/page-accounts/src/modals/CreateConfirmation.tsx b/packages/page-accounts/src/modals/CreateConfirmation.tsx index 10490d3c02..39bc61843f 100644 --- a/packages/page-accounts/src/modals/CreateConfirmation.tsx +++ b/packages/page-accounts/src/modals/CreateConfirmation.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { AddressRow, Modal, Static } from '@polkadot/react-components'; import { isHex } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { address?: string; diff --git a/packages/page-accounts/src/modals/CreateEthDerivationPath.tsx b/packages/page-accounts/src/modals/CreateEthDerivationPath.tsx index 8de78f7a31..8a157519f5 100644 --- a/packages/page-accounts/src/modals/CreateEthDerivationPath.tsx +++ b/packages/page-accounts/src/modals/CreateEthDerivationPath.tsx @@ -9,8 +9,8 @@ import { Checkbox, Dropdown, Input, InputNumber, MarkError, MarkWarning, Modal } import { useToggle } from '@polkadot/react-hooks'; import { BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import { DeriveValidationOutput } from '../types'; +import { useTranslation } from '../translate.js'; +import { DeriveValidationOutput } from '../types.js'; interface Props { className?: string; diff --git a/packages/page-accounts/src/modals/CreateSuriLedger.tsx b/packages/page-accounts/src/modals/CreateSuriLedger.tsx index 4c3aaafd39..cdfb6d4351 100644 --- a/packages/page-accounts/src/modals/CreateSuriLedger.tsx +++ b/packages/page-accounts/src/modals/CreateSuriLedger.tsx @@ -6,8 +6,8 @@ import React, { useEffect, useRef, useState } from 'react'; import { selectableNetworks } from '@polkadot/networks'; import { Dropdown, MarkError, Modal } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import { AVAIL_INDEXES } from './Ledger'; +import { useTranslation } from '../translate.js'; +import { AVAIL_INDEXES } from './Ledger.js'; interface Props { className?: string; diff --git a/packages/page-accounts/src/modals/Delegate.tsx b/packages/page-accounts/src/modals/Delegate.tsx index 8099dda522..77a1705055 100644 --- a/packages/page-accounts/src/modals/Delegate.tsx +++ b/packages/page-accounts/src/modals/Delegate.tsx @@ -3,7 +3,7 @@ import type { Conviction } from '@polkadot/types/interfaces'; import type { BN } from '@polkadot/util'; -import type { AmountValidateState } from '../Accounts/types'; +import type { AmountValidateState } from '../Accounts/types.js'; import React, { useState } from 'react'; @@ -12,8 +12,8 @@ import { useApi } from '@polkadot/react-hooks'; import { BalanceFree } from '@polkadot/react-query'; import { BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import ValidateAmount from './InputValidateAmount'; +import { useTranslation } from '../translate.js'; +import ValidateAmount from './InputValidateAmount.js'; interface Props { onClose: () => void; diff --git a/packages/page-accounts/src/modals/Derive.tsx b/packages/page-accounts/src/modals/Derive.tsx index 95d17ad5af..70ab4381fa 100644 --- a/packages/page-accounts/src/modals/Derive.tsx +++ b/packages/page-accounts/src/modals/Derive.tsx @@ -13,10 +13,10 @@ import { keyring } from '@polkadot/ui-keyring'; import { nextTick } from '@polkadot/util'; import { keyExtractPath } from '@polkadot/util-crypto'; -import { useTranslation } from '../translate'; -import { tryCreateAccount } from '../util'; -import CreateAccountInputs from './CreateAccountInputs'; -import CreateConfirmation from './CreateConfirmation'; +import { useTranslation } from '../translate.js'; +import { tryCreateAccount } from '../util.js'; +import CreateAccountInputs from './CreateAccountInputs.js'; +import CreateConfirmation from './CreateConfirmation.js'; interface Props { className?: string; diff --git a/packages/page-accounts/src/modals/ExternalWarning.tsx b/packages/page-accounts/src/modals/ExternalWarning.tsx index 5649e07dab..a41286346f 100644 --- a/packages/page-accounts/src/modals/ExternalWarning.tsx +++ b/packages/page-accounts/src/modals/ExternalWarning.tsx @@ -5,7 +5,7 @@ import React from 'react'; import { MarkWarning } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; const isElectron = navigator.userAgent.toLowerCase().indexOf(' electron/') > -1; diff --git a/packages/page-accounts/src/modals/IdentityMain.tsx b/packages/page-accounts/src/modals/IdentityMain.tsx index bd4a505b3a..6d84250d17 100644 --- a/packages/page-accounts/src/modals/IdentityMain.tsx +++ b/packages/page-accounts/src/modals/IdentityMain.tsx @@ -11,7 +11,7 @@ import { getAddressMeta } from '@polkadot/react-components/util'; import { useApi, useCall } from '@polkadot/react-hooks'; import { u8aToString } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { address: string; diff --git a/packages/page-accounts/src/modals/IdentitySub.tsx b/packages/page-accounts/src/modals/IdentitySub.tsx index 47785cbb18..b4d632448c 100644 --- a/packages/page-accounts/src/modals/IdentitySub.tsx +++ b/packages/page-accounts/src/modals/IdentitySub.tsx @@ -12,7 +12,7 @@ import { Button, Columar, Input, InputAddress, Modal, Spinner, TxButton } from ' import { useAccounts, useApi, useCall, useSubidentities } from '@polkadot/react-hooks'; import { u8aToString } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { address: string; diff --git a/packages/page-accounts/src/modals/Import.tsx b/packages/page-accounts/src/modals/Import.tsx index fe4f94d461..df659915a7 100644 --- a/packages/page-accounts/src/modals/Import.tsx +++ b/packages/page-accounts/src/modals/Import.tsx @@ -4,7 +4,7 @@ import type { Dispatch, SetStateAction } from 'react'; import type { KeyringPair, KeyringPair$Json } from '@polkadot/keyring/types'; import type { ActionStatus } from '@polkadot/react-components/Status/types'; -import type { ModalProps } from '../types'; +import type { ModalProps } from '../types.js'; import React, { useCallback, useMemo, useState } from 'react'; @@ -13,8 +13,8 @@ import { useApi } from '@polkadot/react-hooks'; import { keyring } from '@polkadot/ui-keyring'; import { assert, nextTick, u8aToString } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import ExternalWarning from './ExternalWarning'; +import { useTranslation } from '../translate.js'; +import ExternalWarning from './ExternalWarning.js'; interface Props extends ModalProps { className?: string; diff --git a/packages/page-accounts/src/modals/InputValidateAmount.tsx b/packages/page-accounts/src/modals/InputValidateAmount.tsx index a0659c3f13..a7e83c93f0 100644 --- a/packages/page-accounts/src/modals/InputValidateAmount.tsx +++ b/packages/page-accounts/src/modals/InputValidateAmount.tsx @@ -3,7 +3,7 @@ import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; import type { BN } from '@polkadot/util'; -import type { AmountValidateState } from '../Accounts/types'; +import type { AmountValidateState } from '../Accounts/types.js'; import React, { useEffect, useState } from 'react'; @@ -11,7 +11,7 @@ import { MarkError, MarkWarning } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { amount?: BN | null; diff --git a/packages/page-accounts/src/modals/Ledger.tsx b/packages/page-accounts/src/modals/Ledger.tsx index 0f6aa3dbc8..05ef0b7492 100644 --- a/packages/page-accounts/src/modals/Ledger.tsx +++ b/packages/page-accounts/src/modals/Ledger.tsx @@ -11,7 +11,7 @@ import { useApi, useLedger } from '@polkadot/react-hooks'; import { keyring } from '@polkadot/ui-keyring'; import { arrayRange } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Option { text: string; diff --git a/packages/page-accounts/src/modals/MultisigApprove.tsx b/packages/page-accounts/src/modals/MultisigApprove.tsx index dfc49a2e5d..382511a4f8 100644 --- a/packages/page-accounts/src/modals/MultisigApprove.tsx +++ b/packages/page-accounts/src/modals/MultisigApprove.tsx @@ -11,7 +11,7 @@ import { AddressMini, Call as CallDisplay, Dropdown, Expander, Input, InputAddre import { useAccounts, useApi, useWeight } from '@polkadot/react-hooks'; import { assert, isHex } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { address: string; diff --git a/packages/page-accounts/src/modals/MultisigCreate.tsx b/packages/page-accounts/src/modals/MultisigCreate.tsx index e972231ff3..329a7ddb2a 100644 --- a/packages/page-accounts/src/modals/MultisigCreate.tsx +++ b/packages/page-accounts/src/modals/MultisigCreate.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { ActionStatus } from '@polkadot/react-components/Status/types'; -import type { ModalProps } from '../types'; +import type { ModalProps } from '../types.js'; import React, { useCallback, useState } from 'react'; @@ -12,8 +12,8 @@ import { keyring } from '@polkadot/ui-keyring'; import { assert, BN, u8aToString } from '@polkadot/util'; import { validateAddress } from '@polkadot/util-crypto'; -import useKnownAddresses from '../Accounts/useKnownAddresses'; -import { useTranslation } from '../translate'; +import useKnownAddresses from '../Accounts/useKnownAddresses.js'; +import { useTranslation } from '../translate.js'; interface Props extends ModalProps { className?: string; diff --git a/packages/page-accounts/src/modals/PasswordInput.tsx b/packages/page-accounts/src/modals/PasswordInput.tsx index 3f8a01a0d4..e8c7db584f 100644 --- a/packages/page-accounts/src/modals/PasswordInput.tsx +++ b/packages/page-accounts/src/modals/PasswordInput.tsx @@ -6,7 +6,7 @@ import React, { useCallback, useEffect, useState } from 'react'; import { Modal, Password, PasswordStrength } from '@polkadot/react-components'; import { keyring } from '@polkadot/ui-keyring'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; type Props = { onChange: (password: string, isPasswordValid: boolean) => void; diff --git a/packages/page-accounts/src/modals/ProxiedAdd.tsx b/packages/page-accounts/src/modals/ProxiedAdd.tsx index d31146ef00..bf006bb48f 100644 --- a/packages/page-accounts/src/modals/ProxiedAdd.tsx +++ b/packages/page-accounts/src/modals/ProxiedAdd.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { ActionStatus } from '@polkadot/react-components/Status/types'; -import type { ModalProps } from '../types'; +import type { ModalProps } from '../types.js'; import React, { useCallback, useState } from 'react'; @@ -10,8 +10,8 @@ import { Button, Input, InputAddressSimple, Modal } from '@polkadot/react-compon import { useApi } from '@polkadot/react-hooks'; import { keyring } from '@polkadot/ui-keyring'; -import useProxies from '../Accounts/useProxies'; -import { useTranslation } from '../translate'; +import useProxies from '../Accounts/useProxies.js'; +import { useTranslation } from '../translate.js'; interface Props extends ModalProps { className?: string; diff --git a/packages/page-accounts/src/modals/ProxyOverview.tsx b/packages/page-accounts/src/modals/ProxyOverview.tsx index d0cac4adb6..5bd50fb40c 100644 --- a/packages/page-accounts/src/modals/ProxyOverview.tsx +++ b/packages/page-accounts/src/modals/ProxyOverview.tsx @@ -14,7 +14,7 @@ import { BatchWarning, Button, Dropdown, InputAddress, InputBalance, MarkError, import { useApi, useTxBatch } from '@polkadot/react-hooks'; import { BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; type PrevProxy = [AccountId | null, KitchensinkRuntimeProxyType]; diff --git a/packages/page-accounts/src/modals/Qr.tsx b/packages/page-accounts/src/modals/Qr.tsx index a39b378a8f..067be78426 100644 --- a/packages/page-accounts/src/modals/Qr.tsx +++ b/packages/page-accounts/src/modals/Qr.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { ActionStatus } from '@polkadot/react-components/Status/types'; -import type { ModalProps } from '../types'; +import type { ModalProps } from '../types.js'; import React, { useCallback, useMemo, useState } from 'react'; @@ -10,8 +10,8 @@ import { AddressRow, Button, Input, InputAddress, MarkWarning, Modal, QrScanAddr import { useApi, useIpfs } from '@polkadot/react-hooks'; import { keyring } from '@polkadot/ui-keyring'; -import { useTranslation } from '../translate'; -import PasswordInput from './PasswordInput'; +import { useTranslation } from '../translate.js'; +import PasswordInput from './PasswordInput.js'; interface Scanned { content: string; diff --git a/packages/page-accounts/src/modals/RecoverAccount.tsx b/packages/page-accounts/src/modals/RecoverAccount.tsx index f4f019061d..2c8e4dd0b6 100644 --- a/packages/page-accounts/src/modals/RecoverAccount.tsx +++ b/packages/page-accounts/src/modals/RecoverAccount.tsx @@ -6,7 +6,7 @@ import React, { useState } from 'react'; import { InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { address: string; diff --git a/packages/page-accounts/src/modals/RecoverSetup.tsx b/packages/page-accounts/src/modals/RecoverSetup.tsx index 55464baa2f..68b6458306 100644 --- a/packages/page-accounts/src/modals/RecoverSetup.tsx +++ b/packages/page-accounts/src/modals/RecoverSetup.tsx @@ -9,8 +9,8 @@ import { InputAddress, InputAddressMulti, InputNumber, Modal, TxButton } from '@ import { useApi } from '@polkadot/react-hooks'; import { sortAddresses } from '@polkadot/util-crypto'; -import useKnownAddresses from '../Accounts/useKnownAddresses'; -import { useTranslation } from '../translate'; +import useKnownAddresses from '../Accounts/useKnownAddresses.js'; +import { useTranslation } from '../translate.js'; interface Props { address: string; diff --git a/packages/page-accounts/src/modals/Transfer.tsx b/packages/page-accounts/src/modals/Transfer.tsx index 8439ae32f4..1515313f6e 100644 --- a/packages/page-accounts/src/modals/Transfer.tsx +++ b/packages/page-accounts/src/modals/Transfer.tsx @@ -14,7 +14,7 @@ import { useApi, useCall } from '@polkadot/react-hooks'; import { Available } from '@polkadot/react-query'; import { BN_HUNDRED, BN_ZERO, isFunction, nextTick } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-accounts/src/modals/Undelegate.tsx b/packages/page-accounts/src/modals/Undelegate.tsx index b0c6895fe6..a38d249213 100644 --- a/packages/page-accounts/src/modals/Undelegate.tsx +++ b/packages/page-accounts/src/modals/Undelegate.tsx @@ -6,7 +6,7 @@ import React from 'react'; import { InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { accountDelegating: string | null; diff --git a/packages/page-accounts/src/util.tsx b/packages/page-accounts/src/util.tsx index c8a7869887..562fe07f37 100644 --- a/packages/page-accounts/src/util.tsx +++ b/packages/page-accounts/src/util.tsx @@ -5,7 +5,7 @@ import type { ActionStatus } from '@polkadot/react-components/Status/types'; import type { DisplayedJudgement } from '@polkadot/react-components/types'; import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import type { CreateResult } from '@polkadot/ui-keyring/types'; -import type { AccountBalance, SortedAccount } from './types'; +import type { AccountBalance, SortedAccount } from './types.js'; import FileSaver from 'file-saver'; import React from 'react'; diff --git a/packages/page-accounts/test/pages/accountsPage.tsx b/packages/page-accounts/test/pages/accountsPage.tsx index 7e5e91c6f6..c1e653f57b 100644 --- a/packages/page-accounts/test/pages/accountsPage.tsx +++ b/packages/page-accounts/test/pages/accountsPage.tsx @@ -11,8 +11,8 @@ import { AccountOverrides } from '@polkadot/test-support/types'; import { assertText, clickButton } from '@polkadot/test-support/utils/renderedScreenUtils'; import { settings } from '@polkadot/ui-settings'; -import AccountOverview from '../../src/Accounts/index'; -import { AccountRow } from '../pageElements/AccountRow'; +import AccountOverview from '../../src/Accounts/index.js'; +import { AccountRow } from '../pageElements/AccountRow.js'; const NOOP_CHANGE = () => undefined; diff --git a/packages/page-addresses/src/Contacts/Address.tsx b/packages/page-addresses/src/Contacts/Address.tsx index 42ff3bf13d..77634cf01c 100644 --- a/packages/page-addresses/src/Contacts/Address.tsx +++ b/packages/page-addresses/src/Contacts/Address.tsx @@ -12,7 +12,7 @@ import { useApi, useBalancesAll, useDeriveAccountInfo, useToggle } from '@polkad import { keyring } from '@polkadot/ui-keyring'; import { isFunction } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { address: string; diff --git a/packages/page-addresses/src/Contacts/index.spec.ts b/packages/page-addresses/src/Contacts/index.spec.ts index 8520be61c3..cdbc0b8fdb 100644 --- a/packages/page-addresses/src/Contacts/index.spec.ts +++ b/packages/page-addresses/src/Contacts/index.spec.ts @@ -5,12 +5,12 @@ import { screen } from '@testing-library/react'; import i18next from '@polkadot/react-components/i18n'; import { aContactWithBalance } from '@polkadot/test-support/creation/contact'; -import { MemoryStore } from '@polkadot/test-support/keyring'; -import { Table } from '@polkadot/test-support/pagesElements'; +import { MemoryStore } from '@polkadot/test-support/keyring/index'; +import { Table } from '@polkadot/test-support/pagesElements/index'; import { balance } from '@polkadot/test-support/utils/balance'; import { keyring } from '@polkadot/ui-keyring'; -import { AddressesPage } from '../../test/pages/addressesPage'; +import { AddressesPage } from '../../test/pages/addressesPage.js'; // FIXME isSplit Table describe.skip('Addresses page', () => { diff --git a/packages/page-addresses/src/Contacts/index.tsx b/packages/page-addresses/src/Contacts/index.tsx index 46472d65a2..ddf339c8c6 100644 --- a/packages/page-addresses/src/Contacts/index.tsx +++ b/packages/page-addresses/src/Contacts/index.tsx @@ -8,9 +8,9 @@ import React, { useEffect, useRef, useState } from 'react'; import { Button, FilterInput, styled, SummaryBox, Table } from '@polkadot/react-components'; import { useAddresses, useFavorites, useNextTick, useToggle } from '@polkadot/react-hooks'; -import CreateModal from '../modals/Create'; -import { useTranslation } from '../translate'; -import Address from './Address'; +import CreateModal from '../modals/Create.js'; +import { useTranslation } from '../translate.js'; +import Address from './Address.js'; type SortedAddress = { address: string; isFavorite: boolean }; diff --git a/packages/page-addresses/src/index.tsx b/packages/page-addresses/src/index.tsx index 385e93bbae..db8e47630b 100644 --- a/packages/page-addresses/src/index.tsx +++ b/packages/page-addresses/src/index.tsx @@ -8,8 +8,8 @@ import { Route, Switch } from 'react-router'; import { Tabs } from '@polkadot/react-components'; -import Contacts from './Contacts'; -import { useTranslation } from './translate'; +import Contacts from './Contacts/index.js'; +import { useTranslation } from './translate.js'; function AddressesApp ({ basePath, onStatusChange }: Props): React.ReactElement { const { t } = useTranslation(); diff --git a/packages/page-addresses/src/modals/Create.tsx b/packages/page-addresses/src/modals/Create.tsx index 862ef940e9..cf0f6c038c 100644 --- a/packages/page-addresses/src/modals/Create.tsx +++ b/packages/page-addresses/src/modals/Create.tsx @@ -3,7 +3,7 @@ import type { DeriveAccountInfo } from '@polkadot/api-derive/types'; import type { ActionStatus } from '@polkadot/react-components/Status/types'; -import type { ModalProps as Props } from '../types'; +import type { ModalProps as Props } from '../types.js'; import React, { useCallback, useState } from 'react'; @@ -13,7 +13,7 @@ import { keyring } from '@polkadot/ui-keyring'; import { hexToU8a } from '@polkadot/util'; import { ethereumEncode } from '@polkadot/util-crypto'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface AddrState { address: string; diff --git a/packages/page-addresses/src/util.tsx b/packages/page-addresses/src/util.tsx index 79544e420c..e436cc0aa2 100644 --- a/packages/page-addresses/src/util.tsx +++ b/packages/page-addresses/src/util.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { KeyringAddress } from '@polkadot/ui-keyring/types'; -import type { SortedAccount } from './types'; +import type { SortedAccount } from './types.js'; import React from 'react'; diff --git a/packages/page-addresses/test/pages/addressesPage.tsx b/packages/page-addresses/test/pages/addressesPage.tsx index 1b2f2afc93..8bcbfad2a1 100644 --- a/packages/page-addresses/test/pages/addressesPage.tsx +++ b/packages/page-addresses/test/pages/addressesPage.tsx @@ -5,11 +5,11 @@ import React from 'react'; import { aContact } from '@polkadot/test-support/creation/contact'; import { Page } from '@polkadot/test-support/pages/Page'; -import { Row } from '@polkadot/test-support/pagesElements'; +import { Row } from '@polkadot/test-support/pagesElements/index'; import { AccountOverrides as ContactOverrides } from '@polkadot/test-support/types'; import { mockAccountHooks } from '@polkadot/test-support/utils/accountDefaults'; -import AddressOverview from '../../src/Contacts/index'; +import AddressOverview from '../../src/Contacts/index.js'; const NOOP_CHANGE = () => undefined; diff --git a/packages/page-alliance/src/Announcements/Accouncement.tsx b/packages/page-alliance/src/Announcements/Accouncement.tsx index 6f16fe8cd7..2a5a16fa31 100644 --- a/packages/page-alliance/src/Announcements/Accouncement.tsx +++ b/packages/page-alliance/src/Announcements/Accouncement.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-alliance authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Cid } from '../types'; +import type { Cid } from '../types.js'; import React from 'react'; diff --git a/packages/page-alliance/src/Announcements/index.tsx b/packages/page-alliance/src/Announcements/index.tsx index f8cead9b93..56a518c3dc 100644 --- a/packages/page-alliance/src/Announcements/index.tsx +++ b/packages/page-alliance/src/Announcements/index.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-alliance authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Cid } from '../types'; +import type { Cid } from '../types.js'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Accouncement from './Accouncement'; +import { useTranslation } from '../translate.js'; +import Accouncement from './Accouncement.js'; interface Props { accouncements?: Cid[]; diff --git a/packages/page-alliance/src/Members/Join.tsx b/packages/page-alliance/src/Members/Join.tsx index 7e0a9f87f7..cca0fbe184 100644 --- a/packages/page-alliance/src/Members/Join.tsx +++ b/packages/page-alliance/src/Members/Join.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-alliance authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Member, Unscrupulous } from '../types'; +import type { Member, Unscrupulous } from '../types.js'; import React, { useMemo, useState } from 'react'; import { InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; import { useAccounts, useApi } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-alliance/src/Members/Member.tsx b/packages/page-alliance/src/Members/Member.tsx index a8e6a1a577..1516216871 100644 --- a/packages/page-alliance/src/Members/Member.tsx +++ b/packages/page-alliance/src/Members/Member.tsx @@ -2,15 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { Member as MemberType } from '../types'; +import type { Member as MemberType } from '../types.js'; import React, { useCallback, useMemo } from 'react'; import { AddressSmall, Menu, Popup, Tag } from '@polkadot/react-components'; import { useAccounts, useApi, useQueue } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import useMemberInfo from '../useMemberInfo'; +import { useTranslation } from '../translate.js'; +import useMemberInfo from '../useMemberInfo.js'; interface Props { bestNumber?: BN; diff --git a/packages/page-alliance/src/Members/Summary.tsx b/packages/page-alliance/src/Members/Summary.tsx index 0a5ac02383..254e7be94e 100644 --- a/packages/page-alliance/src/Members/Summary.tsx +++ b/packages/page-alliance/src/Members/Summary.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-alliance authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Member as MemberType, Rule } from '../types'; +import type { Member as MemberType, Rule } from '../types.js'; import React from 'react'; @@ -9,7 +9,7 @@ import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { useIpfsLink } from '@polkadot/react-hooks'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-alliance/src/Members/index.tsx b/packages/page-alliance/src/Members/index.tsx index 04d8034df4..9b56758016 100644 --- a/packages/page-alliance/src/Members/index.tsx +++ b/packages/page-alliance/src/Members/index.tsx @@ -1,17 +1,17 @@ // Copyright 2017-2023 @polkadot/app-alliance authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Member as MemberType, Rule, Unscrupulous } from '../types'; +import type { Member as MemberType, Rule, Unscrupulous } from '../types.js'; import React, { useRef } from 'react'; import { Button, Table } from '@polkadot/react-components'; import { useBestNumber, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import Join from './Join'; -import Member from './Member'; -import Summary from './Summary'; +import { useTranslation } from '../translate.js'; +import Join from './Join.js'; +import Member from './Member.js'; +import Summary from './Summary.js'; interface Props { className?: string; diff --git a/packages/page-alliance/src/Unscrupulous/index.tsx b/packages/page-alliance/src/Unscrupulous/index.tsx index a59874aaab..e62abfd37e 100644 --- a/packages/page-alliance/src/Unscrupulous/index.tsx +++ b/packages/page-alliance/src/Unscrupulous/index.tsx @@ -1,15 +1,15 @@ // Copyright 2017-2023 @polkadot/app-alliance authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Unscrupulous as UnscrupulousType } from '../types'; +import type { Unscrupulous as UnscrupulousType } from '../types.js'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Account from './Account'; -import Website from './Website'; +import { useTranslation } from '../translate.js'; +import Account from './Account.js'; +import Website from './Website.js'; interface Props { className?: string; diff --git a/packages/page-alliance/src/index.tsx b/packages/page-alliance/src/index.tsx index b2a249d1ec..3cb3568a18 100644 --- a/packages/page-alliance/src/index.tsx +++ b/packages/page-alliance/src/index.tsx @@ -10,16 +10,16 @@ import Motions from '@polkadot/app-tech-comm/Proposals'; import { Tabs } from '@polkadot/react-components'; import { useApi, useCall, useCollectiveMembers } from '@polkadot/react-hooks'; -import Announcements from './Announcements'; -import Members from './Members'; -import { useTranslation } from './translate'; -import Unscrupulous from './Unscrupulous'; -import useAnnoucements from './useAnnoucements'; -import useMembers from './useMembers'; -import useRule from './useRule'; -import useUnscrupulous from './useUnscrupulous'; +import Announcements from './Announcements/index.js'; +import Members from './Members/index.js'; +import Unscrupulous from './Unscrupulous/index.js'; +import { useTranslation } from './translate.js'; +import useAnnoucements from './useAnnoucements.js'; +import useMembers from './useMembers.js'; +import useRule from './useRule.js'; +import useUnscrupulous from './useUnscrupulous.js'; -export { default as useCounter } from './useCounter'; +export { default as useCounter } from './useCounter.js'; interface Props { basePath: string; diff --git a/packages/page-alliance/src/useAnnoucements.ts b/packages/page-alliance/src/useAnnoucements.ts index aed94626a1..c7b9461931 100644 --- a/packages/page-alliance/src/useAnnoucements.ts +++ b/packages/page-alliance/src/useAnnoucements.ts @@ -2,11 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import type { PalletAllianceCid } from '@polkadot/types/lookup'; -import type { Cid } from './types'; +import type { Cid } from './types.js'; import { createNamedHook, useApi, useCall } from '@polkadot/react-hooks'; -import { createCid } from './util'; +import { createCid } from './util.js'; const OPT_ANN = { transform: (cids: PalletAllianceCid[]): Cid[] => diff --git a/packages/page-alliance/src/useMemberInfo.ts b/packages/page-alliance/src/useMemberInfo.ts index a278168c4b..07a7b5bb94 100644 --- a/packages/page-alliance/src/useMemberInfo.ts +++ b/packages/page-alliance/src/useMemberInfo.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { bool, Option, UInt } from '@polkadot/types'; -import type { MemberInfo } from './types'; +import type { MemberInfo } from './types.js'; import { useMemo } from 'react'; diff --git a/packages/page-alliance/src/useMembers.ts b/packages/page-alliance/src/useMembers.ts index efaed0fbdf..446ce29541 100644 --- a/packages/page-alliance/src/useMembers.ts +++ b/packages/page-alliance/src/useMembers.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { AccountId32 } from '@polkadot/types/interfaces'; -import type { Member } from './types'; +import type { Member } from './types.js'; import { useEffect, useState } from 'react'; diff --git a/packages/page-alliance/src/useRule.ts b/packages/page-alliance/src/useRule.ts index 1e20226a2d..69fbe24da4 100644 --- a/packages/page-alliance/src/useRule.ts +++ b/packages/page-alliance/src/useRule.ts @@ -3,11 +3,11 @@ import type { Option } from '@polkadot/types'; import type { PalletAllianceCid } from '@polkadot/types/lookup'; -import type { Rule } from './types'; +import type { Rule } from './types.js'; import { createNamedHook, useApi, useCall } from '@polkadot/react-hooks'; -import { createCid } from './util'; +import { createCid } from './util.js'; const OPT_RULE = { transform: (opt: Option): Rule => diff --git a/packages/page-alliance/src/useUnscrupulous.ts b/packages/page-alliance/src/useUnscrupulous.ts index f95c5208cc..01b0356c63 100644 --- a/packages/page-alliance/src/useUnscrupulous.ts +++ b/packages/page-alliance/src/useUnscrupulous.ts @@ -3,7 +3,7 @@ import type { Bytes } from '@polkadot/types'; import type { AccountId32 } from '@polkadot/types/interfaces'; -import type { Unscrupulous } from './types'; +import type { Unscrupulous } from './types.js'; import { useMemo } from 'react'; diff --git a/packages/page-alliance/src/util.spec.ts b/packages/page-alliance/src/util.spec.ts index 9be98035af..646110b25f 100644 --- a/packages/page-alliance/src/util.spec.ts +++ b/packages/page-alliance/src/util.spec.ts @@ -4,7 +4,7 @@ import { Metadata, TypeRegistry } from '@polkadot/types'; import substrate from '@polkadot/types-support/metadata/static-substrate'; -import { createCid, createPalletCid } from './util'; +import { createCid, createPalletCid } from './util.js'; const registry = new TypeRegistry(); const metadata = new Metadata(registry, substrate); diff --git a/packages/page-alliance/src/util.ts b/packages/page-alliance/src/util.ts index 45e0a5294c..645f53ca7e 100644 --- a/packages/page-alliance/src/util.ts +++ b/packages/page-alliance/src/util.ts @@ -3,7 +3,7 @@ import type { PalletAllianceCid } from '@polkadot/types/lookup'; import type { Registry } from '@polkadot/types/types'; -import type { Cid } from './types'; +import type { Cid } from './types.js'; import { fromIpfsCid, toIpfsCid } from '@polkadot/react-params/util'; diff --git a/packages/page-assets/src/Balances/Account.tsx b/packages/page-assets/src/Balances/Account.tsx index 76461fd37e..0389d796c2 100644 --- a/packages/page-assets/src/Balances/Account.tsx +++ b/packages/page-assets/src/Balances/Account.tsx @@ -10,8 +10,8 @@ import React from 'react'; import { AddressSmall } from '@polkadot/react-components'; import { FormatBalance } from '@polkadot/react-query'; -import { useTranslation } from '../translate'; -import Transfer from './Transfer'; +import { useTranslation } from '../translate.js'; +import Transfer from './Transfer.js'; interface Account extends PalletAssetsAssetAccount { sufficient?: bool diff --git a/packages/page-assets/src/Balances/Transfer.tsx b/packages/page-assets/src/Balances/Transfer.tsx index 7dab2d3a7f..1abe2b9360 100644 --- a/packages/page-assets/src/Balances/Transfer.tsx +++ b/packages/page-assets/src/Balances/Transfer.tsx @@ -8,7 +8,7 @@ import React, { useState } from 'react'; import { Button, InputAddress, InputBalance, Modal, Toggle, TxButton } from '@polkadot/react-components'; import { useApi, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { accountId: string; diff --git a/packages/page-assets/src/Balances/index.tsx b/packages/page-assets/src/Balances/index.tsx index 113d8cb453..4a419ae251 100644 --- a/packages/page-assets/src/Balances/index.tsx +++ b/packages/page-assets/src/Balances/index.tsx @@ -1,16 +1,16 @@ // Copyright 2017-2023 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { AssetInfo, AssetInfoComplete } from '../types'; +import type { AssetInfo, AssetInfoComplete } from '../types.js'; import React, { useEffect, useMemo, useRef, useState } from 'react'; import { Dropdown, styled, Table } from '@polkadot/react-components'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Account from './Account'; -import useBalances from './useBalances'; +import { useTranslation } from '../translate.js'; +import Account from './Account.js'; +import useBalances from './useBalances.js'; interface Props { className?: string; diff --git a/packages/page-assets/src/Overview/Asset.tsx b/packages/page-assets/src/Overview/Asset.tsx index 4612395428..c3987aeea9 100644 --- a/packages/page-assets/src/Overview/Asset.tsx +++ b/packages/page-assets/src/Overview/Asset.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { AssetInfo } from '../types'; +import type { AssetInfo } from '../types.js'; import React, { useMemo } from 'react'; import { AddressSmall, Table } from '@polkadot/react-components'; import { FormatBalance } from '@polkadot/react-query'; -import Mint from './Mint'; +import Mint from './Mint/index.js'; interface Props { className?: string; diff --git a/packages/page-assets/src/Overview/Assets.tsx b/packages/page-assets/src/Overview/Assets.tsx index 7e5ba407df..184f106958 100644 --- a/packages/page-assets/src/Overview/Assets.tsx +++ b/packages/page-assets/src/Overview/Assets.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { AssetInfo } from '../types'; +import type { AssetInfo } from '../types.js'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Asset from './Asset'; +import { useTranslation } from '../translate.js'; +import Asset from './Asset.js'; interface Props { className?: string; diff --git a/packages/page-assets/src/Overview/Create/Create.tsx b/packages/page-assets/src/Overview/Create/Create.tsx index 91d2f9bf44..3e51c869b4 100644 --- a/packages/page-assets/src/Overview/Create/Create.tsx +++ b/packages/page-assets/src/Overview/Create/Create.tsx @@ -3,16 +3,16 @@ import type { BatchOptions } from '@polkadot/react-hooks/types'; import type { BN } from '@polkadot/util'; -import type { InfoState, TeamState } from './types'; +import type { InfoState, TeamState } from './types.js'; import React, { useMemo, useState } from 'react'; import { Button, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useStepper, useTxBatch } from '@polkadot/react-hooks'; -import { useTranslation } from '../../translate'; -import Info from './Info'; -import Team from './Team'; +import { useTranslation } from '../../translate.js'; +import Info from './Info.js'; +import Team from './Team.js'; interface Props { assetIds: BN[]; diff --git a/packages/page-assets/src/Overview/Create/Info.tsx b/packages/page-assets/src/Overview/Create/Info.tsx index a5e6612f16..b860b54a5c 100644 --- a/packages/page-assets/src/Overview/Create/Info.tsx +++ b/packages/page-assets/src/Overview/Create/Info.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { InfoState } from './types'; +import type { InfoState } from './types.js'; import React, { useEffect, useMemo, useState } from 'react'; @@ -10,7 +10,7 @@ import { Input, InputAddress, InputBalance, InputNumber, Modal } from '@polkadot import { useApi } from '@polkadot/react-hooks'; import { BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props { assetIds: BN[]; diff --git a/packages/page-assets/src/Overview/Create/Team.tsx b/packages/page-assets/src/Overview/Create/Team.tsx index 4447958047..ade35f637c 100644 --- a/packages/page-assets/src/Overview/Create/Team.tsx +++ b/packages/page-assets/src/Overview/Create/Team.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { TeamState } from './types'; +import type { TeamState } from './types.js'; import React, { useEffect, useState } from 'react'; import { InputAddress, Modal } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props { accountId: string; diff --git a/packages/page-assets/src/Overview/Create/index.tsx b/packages/page-assets/src/Overview/Create/index.tsx index c46dba0171..b844029193 100644 --- a/packages/page-assets/src/Overview/Create/index.tsx +++ b/packages/page-assets/src/Overview/Create/index.tsx @@ -8,8 +8,8 @@ import React from 'react'; import { Button } from '@polkadot/react-components'; import { useAccounts, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../../translate'; -import Create from './Create'; +import { useTranslation } from '../../translate.js'; +import Create from './Create.js'; interface Props { assetIds?: BN[]; diff --git a/packages/page-assets/src/Overview/Mint/Mint.tsx b/packages/page-assets/src/Overview/Mint/Mint.tsx index 11d0dda934..6b90579dde 100644 --- a/packages/page-assets/src/Overview/Mint/Mint.tsx +++ b/packages/page-assets/src/Overview/Mint/Mint.tsx @@ -9,7 +9,7 @@ import React, { useMemo, useState } from 'react'; import { InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props { className?: string; diff --git a/packages/page-assets/src/Overview/Mint/index.tsx b/packages/page-assets/src/Overview/Mint/index.tsx index 261de611e5..1187654707 100644 --- a/packages/page-assets/src/Overview/Mint/index.tsx +++ b/packages/page-assets/src/Overview/Mint/index.tsx @@ -9,8 +9,8 @@ import React from 'react'; import { Button } from '@polkadot/react-components'; import { useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../../translate'; -import Modal from './Mint'; +import { useTranslation } from '../../translate.js'; +import Modal from './Mint.js'; interface Props { className?: string; diff --git a/packages/page-assets/src/Overview/Summary.tsx b/packages/page-assets/src/Overview/Summary.tsx index 8f4ccd2c52..11a7c4de6d 100644 --- a/packages/page-assets/src/Overview/Summary.tsx +++ b/packages/page-assets/src/Overview/Summary.tsx @@ -6,7 +6,7 @@ import React from 'react'; import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-assets/src/Overview/index.tsx b/packages/page-assets/src/Overview/index.tsx index c10fcbdf44..459281344b 100644 --- a/packages/page-assets/src/Overview/index.tsx +++ b/packages/page-assets/src/Overview/index.tsx @@ -2,15 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { AssetInfo } from '../types'; +import type { AssetInfo } from '../types.js'; import React from 'react'; import { Button } from '@polkadot/react-components'; -import Assets from './Assets'; -import Create from './Create'; -import Summary from './Summary'; +import Create from './Create/index.js'; +import Assets from './Assets.js'; +import Summary from './Summary.js'; interface Props { className?: string; diff --git a/packages/page-assets/src/index.tsx b/packages/page-assets/src/index.tsx index 15f9489803..7ac8cc9d2d 100644 --- a/packages/page-assets/src/index.tsx +++ b/packages/page-assets/src/index.tsx @@ -12,11 +12,11 @@ import { Tabs } from '@polkadot/react-components'; import { useAccounts } from '@polkadot/react-hooks'; import { BN_ONE } from '@polkadot/util'; -import Balances from './Balances'; -import Overview from './Overview'; -import { useTranslation } from './translate'; -import useAssetIds from './useAssetIds'; -import useAssetInfos from './useAssetInfos'; +import Balances from './Balances/index.js'; +import Overview from './Overview/index.js'; +import { useTranslation } from './translate.js'; +import useAssetIds from './useAssetIds.js'; +import useAssetInfos from './useAssetInfos.js'; interface Props { basePath: string; diff --git a/packages/page-assets/src/useAssetInfos.ts b/packages/page-assets/src/useAssetInfos.ts index 0c4dbfaa78..939bdf6fd4 100644 --- a/packages/page-assets/src/useAssetInfos.ts +++ b/packages/page-assets/src/useAssetInfos.ts @@ -5,7 +5,7 @@ import type { Option } from '@polkadot/types'; import type { AccountId } from '@polkadot/types/interfaces'; import type { PalletAssetsAssetDetails, PalletAssetsAssetMetadata } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { AssetInfo } from './types'; +import type { AssetInfo } from './types.js'; import { useEffect, useState } from 'react'; diff --git a/packages/page-bounties/src/Bounties.slow.spec.tsx b/packages/page-bounties/src/Bounties.slow.spec.tsx index 5a44b7c5bd..e09ab0e450 100644 --- a/packages/page-bounties/src/Bounties.slow.spec.tsx +++ b/packages/page-bounties/src/Bounties.slow.spec.tsx @@ -11,10 +11,10 @@ import { ThemeProvider } from 'styled-components'; import BountiesApp from '@polkadot/app-bounties/index'; import { lightTheme } from '@polkadot/apps/themes'; import { ApiCtxRoot } from '@polkadot/react-api'; -import { createApi } from '@polkadot/test-support/api'; -import { MemoryStore } from '@polkadot/test-support/keyring'; +import { createApi } from '@polkadot/test-support/api/index'; +import { MemoryStore } from '@polkadot/test-support/keyring/index'; import { aliceSigner } from '@polkadot/test-support/keyring/signers'; -import { WaitForApi } from '@polkadot/test-support/react'; +import { WaitForApi } from '@polkadot/test-support/react/index'; import { execute } from '@polkadot/test-support/transaction/execute'; import { BN } from '@polkadot/util'; diff --git a/packages/page-bounties/src/Bounties.spec.ts b/packages/page-bounties/src/Bounties.spec.ts index aa5c03dc2e..747e8ab2a7 100644 --- a/packages/page-bounties/src/Bounties.spec.ts +++ b/packages/page-bounties/src/Bounties.spec.ts @@ -10,19 +10,19 @@ import { fireEvent } from '@testing-library/react'; import { ApiPromise } from '@polkadot/api'; import i18next from '@polkadot/react-components/i18n'; -import { createAugmentedApi } from '@polkadot/test-support/api'; +import { createAugmentedApi } from '@polkadot/test-support/api/index'; import { balanceOf } from '@polkadot/test-support/creation/balance'; import { BountyFactory } from '@polkadot/test-support/creation/bounties/bountyFactory'; import { proposalFactory } from '@polkadot/test-support/creation/treasury/proposalFactory'; import { mockHooks } from '@polkadot/test-support/hooks/mockHooks'; -import { MemoryStore } from '@polkadot/test-support/keyring'; import { alice, bob } from '@polkadot/test-support/keyring/addresses'; +import { MemoryStore } from '@polkadot/test-support/keyring/index'; import { keyring } from '@polkadot/ui-keyring'; import { BN } from '@polkadot/util'; -import { defaultBountyUpdatePeriod, mockBountyHooks } from '../test/hooks/defaults'; -import { BountiesPage } from '../test/pages/bountiesPage'; -import { BLOCKS_PERCENTAGE_LEFT_TO_SHOW_WARNING } from './BountyNextActionInfo/BountyActionMessage'; +import { defaultBountyUpdatePeriod, mockBountyHooks } from '../test/hooks/defaults.js'; +import { BountiesPage } from '../test/pages/bountiesPage.js'; +import { BLOCKS_PERCENTAGE_LEFT_TO_SHOW_WARNING } from './BountyNextActionInfo/BountyActionMessage.js'; jest.mock('@polkadot/react-hooks/useTreasury', () => ({ useTreasury: () => mockHooks.treasury diff --git a/packages/page-bounties/src/Bounties.tsx b/packages/page-bounties/src/Bounties.tsx index 35e98d9e82..f026a0eef0 100644 --- a/packages/page-bounties/src/Bounties.tsx +++ b/packages/page-bounties/src/Bounties.tsx @@ -8,10 +8,10 @@ import React, { useMemo, useRef } from 'react'; import Summary from '@polkadot/app-bounties/Summary'; import { Button, styled, Table } from '@polkadot/react-components'; -import Bounty from './Bounty'; -import BountyCreate from './BountyCreate'; -import { useBounties } from './hooks'; -import { useTranslation } from './translate'; +import { useBounties } from './hooks/index.js'; +import Bounty from './Bounty.js'; +import BountyCreate from './BountyCreate.js'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-bounties/src/Bounty.tsx b/packages/page-bounties/src/Bounty.tsx index 6b696913b8..0d43791a67 100644 --- a/packages/page-bounties/src/Bounty.tsx +++ b/packages/page-bounties/src/Bounty.tsx @@ -11,17 +11,17 @@ import { AddressSmall, Columar, ExpandButton, LinkExternal, styled, Table } from import { useToggle } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; -import BountyActionMessage from './BountyNextActionInfo/BountyActionMessage'; -import { getProposalToDisplay } from './helpers/extendedStatuses'; -import { BountyActions } from './BountyActions'; -import BountyExtraActions from './BountyExtraActions'; -import BountyInfos from './BountyInfos'; -import BountyStatusView from './BountyStatusView'; -import Curator from './Curator'; -import DueBlocks from './DueBlocks'; -import { useBountyStatus } from './hooks'; -import { useTranslation } from './translate'; -import VotersColumn from './VotersColumn'; +import { BountyActions } from './BountyActions/index.js'; +import BountyExtraActions from './BountyExtraActions/index.js'; +import BountyInfos from './BountyInfos/index.js'; +import BountyActionMessage from './BountyNextActionInfo/BountyActionMessage.js'; +import { getProposalToDisplay } from './helpers/extendedStatuses.js'; +import { useBountyStatus } from './hooks/index.js'; +import BountyStatusView from './BountyStatusView.js'; +import Curator from './Curator.js'; +import DueBlocks from './DueBlocks.js'; +import { useTranslation } from './translate.js'; +import VotersColumn from './VotersColumn.js'; interface Props { bestNumber: BN; diff --git a/packages/page-bounties/src/BountyActions/AwardBounty.tsx b/packages/page-bounties/src/BountyActions/AwardBounty.tsx index d6c7c29692..02586c6d43 100644 --- a/packages/page-bounties/src/BountyActions/AwardBounty.tsx +++ b/packages/page-bounties/src/BountyActions/AwardBounty.tsx @@ -8,9 +8,9 @@ import React, { useMemo, useState } from 'react'; import { Button, InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useAccounts, useToggle } from '@polkadot/react-hooks'; -import { truncateTitle } from '../helpers'; -import { useBounties } from '../hooks'; -import { useTranslation } from '../translate'; +import { truncateTitle } from '../helpers/index.js'; +import { useBounties } from '../hooks/index.js'; +import { useTranslation } from '../translate.js'; interface Props { curatorId: AccountId; diff --git a/packages/page-bounties/src/BountyActions/BountyAcceptCurator.tsx b/packages/page-bounties/src/BountyActions/BountyAcceptCurator.tsx index 8c011893dd..279a3b1aaa 100644 --- a/packages/page-bounties/src/BountyActions/BountyAcceptCurator.tsx +++ b/packages/page-bounties/src/BountyActions/BountyAcceptCurator.tsx @@ -9,9 +9,9 @@ import React, { useMemo } from 'react'; import { Button, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; import { useToggle } from '@polkadot/react-hooks'; -import { permillOf, truncateTitle } from '../helpers'; -import { useBounties, useUserRole } from '../hooks'; -import { useTranslation } from '../translate'; +import { permillOf, truncateTitle } from '../helpers/index.js'; +import { useBounties, useUserRole } from '../hooks/index.js'; +import { useTranslation } from '../translate.js'; interface Props { curatorId: AccountId; diff --git a/packages/page-bounties/src/BountyActions/BountyClaimAction.tsx b/packages/page-bounties/src/BountyActions/BountyClaimAction.tsx index a26201ef57..1b6904a656 100644 --- a/packages/page-bounties/src/BountyActions/BountyClaimAction.tsx +++ b/packages/page-bounties/src/BountyActions/BountyClaimAction.tsx @@ -10,8 +10,8 @@ import { useBounties } from '@polkadot/app-bounties/hooks'; import { TxButton } from '@polkadot/react-components'; import { useAccounts } from '@polkadot/react-hooks'; -import { isClaimable } from '../helpers'; -import { useTranslation } from '../translate'; +import { isClaimable } from '../helpers/index.js'; +import { useTranslation } from '../translate.js'; interface Props { beneficiaryId: AccountId; diff --git a/packages/page-bounties/src/BountyActions/BountyInitiateVoting.tsx b/packages/page-bounties/src/BountyActions/BountyInitiateVoting.tsx index 9d9a71ef45..eab0041407 100644 --- a/packages/page-bounties/src/BountyActions/BountyInitiateVoting.tsx +++ b/packages/page-bounties/src/BountyActions/BountyInitiateVoting.tsx @@ -11,9 +11,9 @@ import { Button, InputAddress, Modal, TxButton } from '@polkadot/react-component import { useApi, useCollectiveInstance, useCollectiveMembers, useToggle } from '@polkadot/react-hooks'; import { BN } from '@polkadot/util'; -import { truncateTitle } from '../helpers'; -import { useBounties } from '../hooks'; -import { useTranslation } from '../translate'; +import { truncateTitle } from '../helpers/index.js'; +import { useBounties } from '../hooks/index.js'; +import { useTranslation } from '../translate.js'; interface Props { description: string; diff --git a/packages/page-bounties/src/BountyActions/ProposeCuratorAction.tsx b/packages/page-bounties/src/BountyActions/ProposeCuratorAction.tsx index 87faffc458..6f79ebe5f4 100644 --- a/packages/page-bounties/src/BountyActions/ProposeCuratorAction.tsx +++ b/packages/page-bounties/src/BountyActions/ProposeCuratorAction.tsx @@ -11,9 +11,9 @@ import { Button, InputAddress, InputBalance, MarkError, Modal, TxButton } from ' import { useApi, useCollectiveInstance, useCollectiveMembers, useToggle } from '@polkadot/react-hooks'; import { BN } from '@polkadot/util'; -import { truncateTitle } from '../helpers'; -import { useBounties } from '../hooks'; -import { useTranslation } from '../translate'; +import { truncateTitle } from '../helpers/index.js'; +import { useBounties } from '../hooks/index.js'; +import { useTranslation } from '../translate.js'; interface Props { description: string diff --git a/packages/page-bounties/src/BountyActions/index.tsx b/packages/page-bounties/src/BountyActions/index.tsx index 099ee2ef19..44d154b0df 100644 --- a/packages/page-bounties/src/BountyActions/index.tsx +++ b/packages/page-bounties/src/BountyActions/index.tsx @@ -7,12 +7,12 @@ import type { BN } from '@polkadot/util'; import React, { useMemo } from 'react'; -import { useBountyStatus } from '../hooks'; -import AwardBounty from './AwardBounty'; -import BountyAcceptCurator from './BountyAcceptCurator'; -import BountyClaimAction from './BountyClaimAction'; -import BountyInitiateVoting from './BountyInitiateVoting'; -import ProposeCuratorAction from './ProposeCuratorAction'; +import { useBountyStatus } from '../hooks/index.js'; +import AwardBounty from './AwardBounty.js'; +import BountyAcceptCurator from './BountyAcceptCurator.js'; +import BountyClaimAction from './BountyClaimAction.js'; +import BountyInitiateVoting from './BountyInitiateVoting.js'; +import ProposeCuratorAction from './ProposeCuratorAction.js'; interface Props { bestNumber: BN; diff --git a/packages/page-bounties/src/BountyCreate.tsx b/packages/page-bounties/src/BountyCreate.tsx index ab667e0652..0d61908031 100644 --- a/packages/page-bounties/src/BountyCreate.tsx +++ b/packages/page-bounties/src/BountyCreate.tsx @@ -10,8 +10,8 @@ import { Button, Input, InputAddress, InputBalance, MarkError, Modal, TxButton } import { useToggle } from '@polkadot/react-hooks'; import { BN_ZERO } from '@polkadot/util'; -import { calculateBountyBond, countUtf8Bytes } from './helpers'; -import { useTranslation } from './translate'; +import { calculateBountyBond, countUtf8Bytes } from './helpers/index.js'; +import { useTranslation } from './translate.js'; const MIN_TITLE_LEN = 1; const TITLE_DEFAULT_VALUE = ''; diff --git a/packages/page-bounties/src/BountyExtraActions/BountyRejectCurator.tsx b/packages/page-bounties/src/BountyExtraActions/BountyRejectCurator.tsx index 38978bb5ed..3a24fcfea4 100644 --- a/packages/page-bounties/src/BountyExtraActions/BountyRejectCurator.tsx +++ b/packages/page-bounties/src/BountyExtraActions/BountyRejectCurator.tsx @@ -8,8 +8,8 @@ import React from 'react'; import { useBounties } from '@polkadot/app-bounties/hooks'; import { InputAddress, Modal, TxButton } from '@polkadot/react-components'; -import { truncateTitle } from '../helpers'; -import { useTranslation } from '../translate'; +import { truncateTitle } from '../helpers/index.js'; +import { useTranslation } from '../translate.js'; interface Props { curatorId: AccountId; diff --git a/packages/page-bounties/src/BountyExtraActions/CloseBounty.tsx b/packages/page-bounties/src/BountyExtraActions/CloseBounty.tsx index 59df153d1b..5386869403 100644 --- a/packages/page-bounties/src/BountyExtraActions/CloseBounty.tsx +++ b/packages/page-bounties/src/BountyExtraActions/CloseBounty.tsx @@ -10,9 +10,9 @@ import { InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useCollectiveInstance, useCollectiveMembers } from '@polkadot/react-hooks'; import { BN } from '@polkadot/util'; -import { truncateTitle } from '../helpers'; -import { useBounties } from '../hooks'; -import { useTranslation } from '../translate'; +import { truncateTitle } from '../helpers/index.js'; +import { useBounties } from '../hooks/index.js'; +import { useTranslation } from '../translate.js'; interface Props { description: string; diff --git a/packages/page-bounties/src/BountyExtraActions/ExtendBountyExpiryAction.tsx b/packages/page-bounties/src/BountyExtraActions/ExtendBountyExpiryAction.tsx index c978e4b596..e650947ce9 100644 --- a/packages/page-bounties/src/BountyExtraActions/ExtendBountyExpiryAction.tsx +++ b/packages/page-bounties/src/BountyExtraActions/ExtendBountyExpiryAction.tsx @@ -8,10 +8,10 @@ import React, { useCallback, useMemo, useState } from 'react'; import { Input, InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useBlockTime } from '@polkadot/react-hooks'; -import { truncateTitle } from '../helpers'; -import { increaseDateByBlocks } from '../helpers/increaseDateByBlocks'; -import { useBounties } from '../hooks'; -import { useTranslation } from '../translate'; +import { increaseDateByBlocks } from '../helpers/increaseDateByBlocks.js'; +import { truncateTitle } from '../helpers/index.js'; +import { useBounties } from '../hooks/index.js'; +import { useTranslation } from '../translate.js'; interface Props { curatorId: AccountId; diff --git a/packages/page-bounties/src/BountyExtraActions/GiveUp.tsx b/packages/page-bounties/src/BountyExtraActions/GiveUp.tsx index 9d1e37690b..7bde416585 100644 --- a/packages/page-bounties/src/BountyExtraActions/GiveUp.tsx +++ b/packages/page-bounties/src/BountyExtraActions/GiveUp.tsx @@ -7,9 +7,9 @@ import React from 'react'; import { InputAddress, Modal, TxButton } from '@polkadot/react-components'; -import { truncateTitle } from '../helpers'; -import { useBounties } from '../hooks'; -import { useTranslation } from '../translate'; +import { truncateTitle } from '../helpers/index.js'; +import { useBounties } from '../hooks/index.js'; +import { useTranslation } from '../translate.js'; interface Props { curatorId: AccountId; diff --git a/packages/page-bounties/src/BountyExtraActions/SlashCurator.tsx b/packages/page-bounties/src/BountyExtraActions/SlashCurator.tsx index c8612aabab..e7ad2b070f 100644 --- a/packages/page-bounties/src/BountyExtraActions/SlashCurator.tsx +++ b/packages/page-bounties/src/BountyExtraActions/SlashCurator.tsx @@ -11,10 +11,10 @@ import { InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useAccounts, useApi, useCollectiveInstance, useCollectiveMembers } from '@polkadot/react-hooks'; import { BN } from '@polkadot/util'; -import { truncateTitle } from '../helpers'; -import { useBounties } from '../hooks'; -import { useTranslation } from '../translate'; -import { ValidUnassignCuratorAction } from '../types'; +import { truncateTitle } from '../helpers/index.js'; +import { useBounties } from '../hooks/index.js'; +import { useTranslation } from '../translate.js'; +import { ValidUnassignCuratorAction } from '../types.js'; interface Props { action: ValidUnassignCuratorAction; diff --git a/packages/page-bounties/src/BountyExtraActions/index.tsx b/packages/page-bounties/src/BountyExtraActions/index.tsx index d4f3ced615..aa92223a37 100644 --- a/packages/page-bounties/src/BountyExtraActions/index.tsx +++ b/packages/page-bounties/src/BountyExtraActions/index.tsx @@ -10,15 +10,15 @@ import { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; import { Menu, Popup } from '@polkadot/react-components'; import { useCollectiveMembers, useToggle } from '@polkadot/react-hooks'; -import { determineUnassignCuratorAction } from '../helpers'; -import { useBountyStatus, useUserRole } from '../hooks'; -import { useTranslation } from '../translate'; -import { ValidUnassignCuratorAction } from '../types'; -import BountyRejectCurator from './BountyRejectCurator'; -import CloseBounty from './CloseBounty'; -import ExtendBountyExpiryAction from './ExtendBountyExpiryAction'; -import GiveUp from './GiveUp'; -import SlashCurator from './SlashCurator'; +import { determineUnassignCuratorAction } from '../helpers/index.js'; +import { useBountyStatus, useUserRole } from '../hooks/index.js'; +import { useTranslation } from '../translate.js'; +import { ValidUnassignCuratorAction } from '../types.js'; +import BountyRejectCurator from './BountyRejectCurator.js'; +import CloseBounty from './CloseBounty.js'; +import ExtendBountyExpiryAction from './ExtendBountyExpiryAction.js'; +import GiveUp from './GiveUp.js'; +import SlashCurator from './SlashCurator.js'; interface Props { bestNumber: BN; diff --git a/packages/page-bounties/src/BountyInfos/VotingDescriptionInfo.tsx b/packages/page-bounties/src/BountyInfos/VotingDescriptionInfo.tsx index fa7d8f464c..f9b27840e8 100644 --- a/packages/page-bounties/src/BountyInfos/VotingDescriptionInfo.tsx +++ b/packages/page-bounties/src/BountyInfos/VotingDescriptionInfo.tsx @@ -8,8 +8,8 @@ import React, { useRef } from 'react'; import { LabelHelp, styled } from '@polkadot/react-components'; -import { proposalNameToDisplay } from '../helpers/extendedStatuses'; -import { useTranslation } from '../translate'; +import { proposalNameToDisplay } from '../helpers/extendedStatuses.js'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-bounties/src/BountyInfos/VotingLink.tsx b/packages/page-bounties/src/BountyInfos/VotingLink.tsx index 1f41e41991..d06d8f1f96 100644 --- a/packages/page-bounties/src/BountyInfos/VotingLink.tsx +++ b/packages/page-bounties/src/BountyInfos/VotingLink.tsx @@ -5,7 +5,7 @@ import React from 'react'; import { styled } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-bounties/src/BountyInfos/VotingSummary.tsx b/packages/page-bounties/src/BountyInfos/VotingSummary.tsx index a74a310fd1..2f14a0a045 100644 --- a/packages/page-bounties/src/BountyInfos/VotingSummary.tsx +++ b/packages/page-bounties/src/BountyInfos/VotingSummary.tsx @@ -10,8 +10,8 @@ import VotingDescriptionInfo from '@polkadot/app-bounties/BountyInfos/VotingDesc import { styled } from '@polkadot/react-components'; import { useCollectiveMembers } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import VotingLink from './VotingLink'; +import { useTranslation } from '../translate.js'; +import VotingLink from './VotingLink.js'; interface Props { className?: string; diff --git a/packages/page-bounties/src/BountyInfos/index.tsx b/packages/page-bounties/src/BountyInfos/index.tsx index 2ab949c1e7..cef2c73275 100644 --- a/packages/page-bounties/src/BountyInfos/index.tsx +++ b/packages/page-bounties/src/BountyInfos/index.tsx @@ -8,10 +8,10 @@ import React, { useMemo } from 'react'; import { AddressSmall } from '@polkadot/react-components'; -import Description from '../Description'; -import { getProposalToDisplay } from '../helpers/extendedStatuses'; -import { useTranslation } from '../translate'; -import VotingSummary from './VotingSummary'; +import Description from '../Description.js'; +import { getProposalToDisplay } from '../helpers/extendedStatuses.js'; +import { useTranslation } from '../translate.js'; +import VotingSummary from './VotingSummary.js'; interface Props { beneficiary?: AccountId; diff --git a/packages/page-bounties/src/BountyNextActionInfo/BountyActionMessage.tsx b/packages/page-bounties/src/BountyNextActionInfo/BountyActionMessage.tsx index 2ddc7dd20a..f6fb76de49 100644 --- a/packages/page-bounties/src/BountyNextActionInfo/BountyActionMessage.tsx +++ b/packages/page-bounties/src/BountyNextActionInfo/BountyActionMessage.tsx @@ -8,9 +8,9 @@ import React, { useMemo } from 'react'; import { useBountyStatus } from '@polkadot/app-bounties/hooks'; import { BN, BN_HUNDRED, BN_ZERO } from '@polkadot/util'; -import { useBounties } from '../hooks'; -import { useTranslation } from '../translate'; -import BountyInfo from './BountyInfo'; +import { useBounties } from '../hooks/index.js'; +import { useTranslation } from '../translate.js'; +import BountyInfo from './BountyInfo.js'; interface Props { bestNumber: BN; diff --git a/packages/page-bounties/src/BountyNextActionInfo/BountyInfo.tsx b/packages/page-bounties/src/BountyNextActionInfo/BountyInfo.tsx index ce2699694a..cef08287d1 100644 --- a/packages/page-bounties/src/BountyNextActionInfo/BountyInfo.tsx +++ b/packages/page-bounties/src/BountyNextActionInfo/BountyInfo.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { Icon, styled } from '@polkadot/react-components'; -import { bountySvgColor } from '../theme'; +import { bountySvgColor } from '../theme.js'; interface Props { className?: string; diff --git a/packages/page-bounties/src/BountyStatusView.tsx b/packages/page-bounties/src/BountyStatusView.tsx index 98233d5fe8..b83c97e587 100644 --- a/packages/page-bounties/src/BountyStatusView.tsx +++ b/packages/page-bounties/src/BountyStatusView.tsx @@ -1,12 +1,13 @@ // Copyright 2017-2023 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 +import type { StatusName } from './types.js'; + import React from 'react'; import { styled } from '@polkadot/react-components'; -import { insertSpaceBeforeCapitalLetter } from './helpers'; -import { StatusName } from './types'; +import { insertSpaceBeforeCapitalLetter } from './helpers/index.js'; interface Props { bountyStatus: StatusName; diff --git a/packages/page-bounties/src/Curator.tsx b/packages/page-bounties/src/Curator.tsx index a29f7e1341..fcff8925a2 100644 --- a/packages/page-bounties/src/Curator.tsx +++ b/packages/page-bounties/src/Curator.tsx @@ -7,8 +7,8 @@ import React from 'react'; import { AddressSmall } from '@polkadot/react-components'; -import Description from './Description'; -import { useTranslation } from './translate'; +import Description from './Description.js'; +import { useTranslation } from './translate.js'; interface Props { curator: Codec; diff --git a/packages/page-bounties/src/Summary.tsx b/packages/page-bounties/src/Summary.tsx index 9fb783c77c..6114c20644 100644 --- a/packages/page-bounties/src/Summary.tsx +++ b/packages/page-bounties/src/Summary.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { BountyApi } from './hooks/useBounties'; +import type { BountyApi } from './hooks/useBounties.js'; import React, { useMemo } from 'react'; @@ -10,7 +10,7 @@ import { useTreasury } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; import { BN, formatNumber } from '@polkadot/util'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-bounties/src/VotersColumn.tsx b/packages/page-bounties/src/VotersColumn.tsx index 8c6ffd9bf9..919b10b8d8 100644 --- a/packages/page-bounties/src/VotersColumn.tsx +++ b/packages/page-bounties/src/VotersColumn.tsx @@ -9,8 +9,8 @@ import React, { useMemo } from 'react'; import { AddressSmall, Icon, styled } from '@polkadot/react-components'; -import { getProposalToDisplay } from './helpers/extendedStatuses'; -import { useTranslation } from './translate'; +import { getProposalToDisplay } from './helpers/extendedStatuses.js'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-bounties/src/helpers/determineUnassignCuratorAction.spec.ts b/packages/page-bounties/src/helpers/determineUnassignCuratorAction.spec.ts index 50b1b947ab..d5e3af95a5 100644 --- a/packages/page-bounties/src/helpers/determineUnassignCuratorAction.spec.ts +++ b/packages/page-bounties/src/helpers/determineUnassignCuratorAction.spec.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { determineUnassignCuratorAction } from '@polkadot/app-bounties/helpers/determineUnassignCuratorAction'; -import { createAugmentedApi } from '@polkadot/test-support/api'; +import { createAugmentedApi } from '@polkadot/test-support/api/index'; import { BountyFactory } from '@polkadot/test-support/creation/bounties/bountyFactory'; import { BN } from '@polkadot/util'; diff --git a/packages/page-bounties/src/helpers/determineUnassignCuratorAction.ts b/packages/page-bounties/src/helpers/determineUnassignCuratorAction.ts index ac5ba0314b..f2fe8ccaef 100644 --- a/packages/page-bounties/src/helpers/determineUnassignCuratorAction.ts +++ b/packages/page-bounties/src/helpers/determineUnassignCuratorAction.ts @@ -6,7 +6,7 @@ import type { BN } from '@polkadot/util'; import { BN_ZERO } from '@polkadot/util'; -import { UserRole, ValidUnassignCuratorAction } from '../types'; +import { UserRole, ValidUnassignCuratorAction } from '../types.js'; export function determineUnassignCuratorAction (roles: UserRole[], status: BountyStatus, blocksUntilUpdate?: BN): ValidUnassignCuratorAction[] { const actions: ValidUnassignCuratorAction[] = []; diff --git a/packages/page-bounties/src/helpers/extendedStatuses.ts b/packages/page-bounties/src/helpers/extendedStatuses.ts index c2b55369aa..3475a19552 100644 --- a/packages/page-bounties/src/helpers/extendedStatuses.ts +++ b/packages/page-bounties/src/helpers/extendedStatuses.ts @@ -4,7 +4,7 @@ import type { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; import type { BountyStatus } from '@polkadot/types/interfaces'; -import { BountyVotingStatuses, StatusName } from '../types'; +import { BountyVotingStatuses, StatusName } from '../types.js'; const validProposalNames: BountyVotingStatuses = { Active: ['closeBounty', 'unassignCurator'], diff --git a/packages/page-bounties/src/helpers/getBountyStatus.spec.ts b/packages/page-bounties/src/helpers/getBountyStatus.spec.ts index d8b7ad173d..1d079420e8 100644 --- a/packages/page-bounties/src/helpers/getBountyStatus.spec.ts +++ b/packages/page-bounties/src/helpers/getBountyStatus.spec.ts @@ -3,7 +3,7 @@ import { TypeRegistry } from '@polkadot/types/create'; -import { getBountyStatus } from './getBountyStatus'; +import { getBountyStatus } from './getBountyStatus.js'; describe('get bounty status', () => { let registry: TypeRegistry; diff --git a/packages/page-bounties/src/helpers/getBountyStatus.ts b/packages/page-bounties/src/helpers/getBountyStatus.ts index eccfabff79..5599cd4d9f 100644 --- a/packages/page-bounties/src/helpers/getBountyStatus.ts +++ b/packages/page-bounties/src/helpers/getBountyStatus.ts @@ -3,7 +3,7 @@ import type { BountyStatus } from '@polkadot/types/interfaces'; -import { BountyStatusType, StatusName } from '../types'; +import { BountyStatusType, StatusName } from '../types.js'; export const getBountyStatus = (status: BountyStatus): BountyStatusType => { const statusAsString = status.type as StatusName; diff --git a/packages/page-bounties/src/helpers/index.tsx b/packages/page-bounties/src/helpers/index.tsx index 58d4c9c67e..4dfabdb148 100644 --- a/packages/page-bounties/src/helpers/index.tsx +++ b/packages/page-bounties/src/helpers/index.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2023 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -export * from './calculateBountyBond'; -export * from './getBountyStatus'; -export * from './isClaimable'; -export * from './stringHelpers'; -export * from './determineUnassignCuratorAction'; -export * from './permillOf'; +export * from './calculateBountyBond.js'; +export * from './getBountyStatus.js'; +export * from './isClaimable.js'; +export * from './stringHelpers.js'; +export * from './determineUnassignCuratorAction.js'; +export * from './permillOf.js'; diff --git a/packages/page-bounties/src/helpers/isClaimable.spec.ts b/packages/page-bounties/src/helpers/isClaimable.spec.ts index 56ea4f5608..b0f4298d8a 100644 --- a/packages/page-bounties/src/helpers/isClaimable.spec.ts +++ b/packages/page-bounties/src/helpers/isClaimable.spec.ts @@ -4,7 +4,7 @@ import { TypeRegistry } from '@polkadot/types/create'; import { BN } from '@polkadot/util'; -import { isClaimable } from './isClaimable'; +import { isClaimable } from './isClaimable.js'; describe('Is claimable', () => { const registry = new TypeRegistry(); diff --git a/packages/page-bounties/src/helpers/truncateTitle.spec.ts b/packages/page-bounties/src/helpers/truncateTitle.spec.ts index 4b2c355b5d..c1eac74a9f 100644 --- a/packages/page-bounties/src/helpers/truncateTitle.spec.ts +++ b/packages/page-bounties/src/helpers/truncateTitle.spec.ts @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { truncateTitle } from './stringHelpers'; +import { truncateTitle } from './stringHelpers.js'; describe('Truncate title', () => { it('does not truncate short title', () => { diff --git a/packages/page-bounties/src/hooks/index.ts b/packages/page-bounties/src/hooks/index.ts index 75ba38f351..a18c183c34 100644 --- a/packages/page-bounties/src/hooks/index.ts +++ b/packages/page-bounties/src/hooks/index.ts @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -export * from './useBounties'; -export * from './useBalance'; -export * from './useUserRole'; -export * from './useBountyStatus'; +export * from './useBounties.js'; +export * from './useBalance.js'; +export * from './useUserRole.js'; +export * from './useBountyStatus.js'; diff --git a/packages/page-bounties/src/hooks/useUserRole.ts b/packages/page-bounties/src/hooks/useUserRole.ts index 1e09b7aef5..a0f3df9fbd 100644 --- a/packages/page-bounties/src/hooks/useUserRole.ts +++ b/packages/page-bounties/src/hooks/useUserRole.ts @@ -7,7 +7,7 @@ import { useMemo } from 'react'; import { createNamedHook, useAccounts, useCollectiveMembers } from '@polkadot/react-hooks'; -import { UserRole } from '../types'; +import { UserRole } from '../types.js'; export type UserRolesInfo = { roles: UserRole[], isCurator: boolean }; diff --git a/packages/page-bounties/src/index.tsx b/packages/page-bounties/src/index.tsx index 19b70acae4..315d29bae2 100644 --- a/packages/page-bounties/src/index.tsx +++ b/packages/page-bounties/src/index.tsx @@ -5,10 +5,10 @@ import React, { useRef } from 'react'; import { Tabs } from '@polkadot/react-components'; -import Bounties from './Bounties'; -import { useTranslation } from './translate'; +import Bounties from './Bounties.js'; +import { useTranslation } from './translate.js'; -export { default as useCounter } from './useCounter'; +export { default as useCounter } from './useCounter.js'; interface Props { basePath: string; diff --git a/packages/page-bounties/test/hooks/defaults.ts b/packages/page-bounties/test/hooks/defaults.ts index 52ef85c29a..c28ac25e80 100644 --- a/packages/page-bounties/test/hooks/defaults.ts +++ b/packages/page-bounties/test/hooks/defaults.ts @@ -7,7 +7,7 @@ import { DeriveBounties } from '@polkadot/api-derive/types'; import { balanceOf } from '@polkadot/test-support/creation/balance'; import { BN, BN_ONE } from '@polkadot/util'; -import { BountyApi } from '../../src/hooks'; +import { BountyApi } from '../../src/hooks/index.js'; export const defaultBountyUpdatePeriod = new BN(100000); diff --git a/packages/page-bounties/test/pages/bountiesPage.tsx b/packages/page-bounties/test/pages/bountiesPage.tsx index 9ee0ad2b0a..b81bfde39f 100644 --- a/packages/page-bounties/test/pages/bountiesPage.tsx +++ b/packages/page-bounties/test/pages/bountiesPage.tsx @@ -24,10 +24,10 @@ import { BountyFactory } from '@polkadot/test-support/creation/bounties/bountyFa import { TypeRegistry } from '@polkadot/types/create'; import { BountyIndex, BountyStatus } from '@polkadot/types/interfaces'; -import { mockBountyHooks } from '../hooks/defaults'; -import { clickButtonWithName } from '../utils/clickButtonWithName'; -import { clickElementWithTestId } from '../utils/clickElementWithTestId'; -import { clickElementWithText } from '../utils/clickElementWithText'; +import { mockBountyHooks } from '../hooks/defaults.js'; +import { clickButtonWithName } from '../utils/clickButtonWithName.js'; +import { clickElementWithTestId } from '../utils/clickElementWithTestId.js'; +import { clickElementWithText } from '../utils/clickElementWithText.js'; function aGenesisHash () { return new TypeRegistry().createType('Hash', POLKADOT_GENESIS); diff --git a/packages/page-calendar/src/Day.tsx b/packages/page-calendar/src/Day.tsx index 3912aade49..f94f77551b 100644 --- a/packages/page-calendar/src/Day.tsx +++ b/packages/page-calendar/src/Day.tsx @@ -1,16 +1,16 @@ // Copyright 2017-2023 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { EntryInfoTyped } from './types'; +import type { EntryInfoTyped } from './types.js'; import React, { useCallback, useMemo, useRef } from 'react'; import { Button, styled } from '@polkadot/react-components'; -import { MONTHS } from './constants'; -import DayHour from './DayHour'; -import DayTime from './DayTime'; -import { useTranslation } from './translate'; +import { MONTHS } from './constants.js'; +import DayHour from './DayHour.js'; +import DayTime from './DayTime.js'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-calendar/src/DayHour.tsx b/packages/page-calendar/src/DayHour.tsx index df73203fa6..eaeca138b7 100644 --- a/packages/page-calendar/src/DayHour.tsx +++ b/packages/page-calendar/src/DayHour.tsx @@ -1,13 +1,13 @@ // Copyright 2017-2023 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { EntryInfoTyped } from './types'; +import type { EntryInfoTyped } from './types.js'; import React, { useMemo } from 'react'; import { styled } from '@polkadot/react-components'; -import DayItem from './DayItem'; +import DayItem from './DayItem.js'; interface Props { className?: string; diff --git a/packages/page-calendar/src/DayItem.tsx b/packages/page-calendar/src/DayItem.tsx index 9a2a739020..a2a0fab6f4 100644 --- a/packages/page-calendar/src/DayItem.tsx +++ b/packages/page-calendar/src/DayItem.tsx @@ -1,15 +1,15 @@ // Copyright 2017-2023 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { EntryInfoTyped } from './types'; +import type { EntryInfoTyped } from './types.js'; import React, { useCallback, useMemo, useState } from 'react'; import { Button, styled } from '@polkadot/react-components'; import { formatNumber, isString } from '@polkadot/util'; -import { useTranslation } from './translate'; -import { dateCalendarFormat } from './util'; +import { useTranslation } from './translate.js'; +import { dateCalendarFormat } from './util.js'; interface Props { className?: string; diff --git a/packages/page-calendar/src/Month.tsx b/packages/page-calendar/src/Month.tsx index aef7b41ec8..f643fd48f3 100644 --- a/packages/page-calendar/src/Month.tsx +++ b/packages/page-calendar/src/Month.tsx @@ -1,15 +1,15 @@ // Copyright 2017-2023 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { DateState, EntryInfo } from './types'; +import type { DateState, EntryInfo } from './types.js'; import React, { useMemo, useRef } from 'react'; import { Button, styled } from '@polkadot/react-components'; -import { DAYS, MONTHS } from './constants'; -import MonthDay from './MonthDay'; -import { useTranslation } from './translate'; +import { DAYS, MONTHS } from './constants.js'; +import MonthDay from './MonthDay.js'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-calendar/src/MonthDay.tsx b/packages/page-calendar/src/MonthDay.tsx index 065965c76a..23455fc8ff 100644 --- a/packages/page-calendar/src/MonthDay.tsx +++ b/packages/page-calendar/src/MonthDay.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { EntryInfo } from './types'; +import type { EntryInfo } from './types.js'; import React, { useCallback, useMemo } from 'react'; diff --git a/packages/page-calendar/src/UpcomingEvents.tsx b/packages/page-calendar/src/UpcomingEvents.tsx index 99835dc7a3..fc95d61a65 100644 --- a/packages/page-calendar/src/UpcomingEvents.tsx +++ b/packages/page-calendar/src/UpcomingEvents.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { EntryInfoTyped } from './types'; +import type { EntryInfoTyped } from './types.js'; import React, { useCallback, useMemo } from 'react'; import { Button, styled } from '@polkadot/react-components'; -import DayItem from './DayItem'; -import { useTranslation } from './translate'; +import DayItem from './DayItem.js'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-calendar/src/index.tsx b/packages/page-calendar/src/index.tsx index 16dac82195..e89eb9b488 100644 --- a/packages/page-calendar/src/index.tsx +++ b/packages/page-calendar/src/index.tsx @@ -1,18 +1,18 @@ // Copyright 2017-2023 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { DateState } from './types'; +import type { DateState } from './types.js'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { styled, Tabs } from '@polkadot/react-components'; -import Day from './Day'; -import Month from './Month'; -import { useTranslation } from './translate'; -import UpcomingEvents from './UpcomingEvents'; -import useScheduled from './useScheduled'; -import { getDateState, nextMonth, prevMonth } from './util'; +import Day from './Day.js'; +import Month from './Month.js'; +import { useTranslation } from './translate.js'; +import UpcomingEvents from './UpcomingEvents.js'; +import useScheduled from './useScheduled.js'; +import { getDateState, nextMonth, prevMonth } from './util.js'; interface Props { basePath: string; diff --git a/packages/page-calendar/src/useScheduled.ts b/packages/page-calendar/src/useScheduled.ts index bf038dd099..cc94872234 100644 --- a/packages/page-calendar/src/useScheduled.ts +++ b/packages/page-calendar/src/useScheduled.ts @@ -6,7 +6,7 @@ import type { Option } from '@polkadot/types'; import type { BlockNumber, EraIndex, LeasePeriodOf, Scheduled, UnappliedSlash } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; import type { BN } from '@polkadot/util'; -import type { EntryInfo, EntryInfoTyped, EntryType } from './types'; +import type { EntryInfo, EntryInfoTyped, EntryType } from './types.js'; import { useEffect, useState } from 'react'; diff --git a/packages/page-calendar/src/util.ts b/packages/page-calendar/src/util.ts index 0def9a6a84..3b381b99b8 100644 --- a/packages/page-calendar/src/util.ts +++ b/packages/page-calendar/src/util.ts @@ -1,9 +1,9 @@ // Copyright 2017-2023 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { DateState } from './types'; +import type { DateState } from './types.js'; -import { DAYS } from './constants'; +import { DAYS } from './constants.js'; export function newZeroDate (input: Date): Date { const date = new Date(input); diff --git a/packages/page-claims/src/Attest.tsx b/packages/page-claims/src/Attest.tsx index 3ab779a66e..e16b72845a 100644 --- a/packages/page-claims/src/Attest.tsx +++ b/packages/page-claims/src/Attest.tsx @@ -13,10 +13,10 @@ import { useAccounts, useApi } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; import { BN_ZERO } from '@polkadot/util'; -import { ClaimStyles } from './Claim'; -import Statement from './Statement'; -import { useTranslation } from './translate'; -import { getStatement } from './util'; +import { ClaimStyles } from './Claim.js'; +import Statement from './Statement.js'; +import { useTranslation } from './translate.js'; +import { getStatement } from './util.js'; interface Props { accountId: string; diff --git a/packages/page-claims/src/Claim.tsx b/packages/page-claims/src/Claim.tsx index f187d2287c..2751725d46 100644 --- a/packages/page-claims/src/Claim.tsx +++ b/packages/page-claims/src/Claim.tsx @@ -15,8 +15,8 @@ import { useApi } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; import { BN_ZERO } from '@polkadot/util'; -import { useTranslation } from './translate'; -import { addrToChecksum, getStatement } from './util'; +import { useTranslation } from './translate.js'; +import { addrToChecksum, getStatement } from './util.js'; interface Props { accountId: string; diff --git a/packages/page-claims/src/Statement.tsx b/packages/page-claims/src/Statement.tsx index af51b4aded..69891af291 100644 --- a/packages/page-claims/src/Statement.tsx +++ b/packages/page-claims/src/Statement.tsx @@ -7,8 +7,8 @@ import React from 'react'; import { styled } from '@polkadot/react-components'; -import { useTranslation } from './translate'; -import { getStatement } from './util'; +import { useTranslation } from './translate.js'; +import { getStatement } from './util.js'; export interface Props { className?: string; diff --git a/packages/page-claims/src/Warning.tsx b/packages/page-claims/src/Warning.tsx index 5defc5be15..aa00086331 100644 --- a/packages/page-claims/src/Warning.tsx +++ b/packages/page-claims/src/Warning.tsx @@ -5,8 +5,8 @@ import React from 'react'; import { AddressMini, Card, styled } from '@polkadot/react-components'; -import { useTranslation } from './translate'; -import usePolkadotPreclaims from './usePolkadotPreclaims'; +import { useTranslation } from './translate.js'; +import usePolkadotPreclaims from './usePolkadotPreclaims.js'; export interface Props{ className?: string; diff --git a/packages/page-claims/src/index.tsx b/packages/page-claims/src/index.tsx index 28bcc19822..3d11337e01 100644 --- a/packages/page-claims/src/index.tsx +++ b/packages/page-claims/src/index.tsx @@ -15,14 +15,14 @@ import { useApi, useCall } from '@polkadot/react-hooks'; import { u8aToHex, u8aToString } from '@polkadot/util'; import { decodeAddress } from '@polkadot/util-crypto'; -import AttestDisplay from './Attest'; -import ClaimDisplay from './Claim'; -import Statement from './Statement'; -import { useTranslation } from './translate'; -import { getStatement, recoverFromJSON } from './util'; -import Warning from './Warning'; +import AttestDisplay from './Attest.js'; +import ClaimDisplay from './Claim.js'; +import Statement from './Statement.js'; +import { useTranslation } from './translate.js'; +import { getStatement, recoverFromJSON } from './util.js'; +import Warning from './Warning.js'; -export { default as useCounter } from './useCounter'; +export { default as useCounter } from './useCounter.js'; enum Step { Account = 0, diff --git a/packages/page-claims/src/useCounter.ts b/packages/page-claims/src/useCounter.ts index b9d6cbf760..c17c20d14c 100644 --- a/packages/page-claims/src/useCounter.ts +++ b/packages/page-claims/src/useCounter.ts @@ -3,7 +3,7 @@ import { createNamedHook } from '@polkadot/react-hooks'; -import usePolkadotPreclaims from './usePolkadotPreclaims'; +import usePolkadotPreclaims from './usePolkadotPreclaims.js'; function useCounterImpl (): number { const needAttest = usePolkadotPreclaims(); diff --git a/packages/page-claims/src/util.spec.ts b/packages/page-claims/src/util.spec.ts index 50e5784293..29118573a9 100644 --- a/packages/page-claims/src/util.spec.ts +++ b/packages/page-claims/src/util.spec.ts @@ -3,7 +3,7 @@ import { hexToU8a } from '@polkadot/util'; -import { publicToAddr, recoverFromJSON } from './util'; +import { publicToAddr, recoverFromJSON } from './util.js'; describe('util', (): void => { it('converts a publicKey to address via publicToAddr', (): void => { diff --git a/packages/page-collator/src/Collator.tsx b/packages/page-collator/src/Collator.tsx index 5eb469cb0b..a56082a6ca 100644 --- a/packages/page-collator/src/Collator.tsx +++ b/packages/page-collator/src/Collator.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-collator authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Collator as CollatorType } from './types'; +import type { Collator as CollatorType } from './types.js'; import React, { useMemo } from 'react'; diff --git a/packages/page-collator/src/Collators.tsx b/packages/page-collator/src/Collators.tsx index 16abccf791..1c2c258850 100644 --- a/packages/page-collator/src/Collators.tsx +++ b/packages/page-collator/src/Collators.tsx @@ -6,10 +6,10 @@ import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; import { useBlockAuthors } from '@polkadot/react-hooks'; -import Collator from './Collator'; -import Summary from './Summary'; -import { useTranslation } from './translate'; -import useCollators from './useCollators'; +import Collator from './Collator.js'; +import Summary from './Summary.js'; +import { useTranslation } from './translate.js'; +import useCollators from './useCollators.js'; interface Props { className?: string; diff --git a/packages/page-collator/src/Summary.tsx b/packages/page-collator/src/Summary.tsx index a114d79ae7..16c35d4c79 100644 --- a/packages/page-collator/src/Summary.tsx +++ b/packages/page-collator/src/Summary.tsx @@ -9,7 +9,7 @@ import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-collator/src/index.tsx b/packages/page-collator/src/index.tsx index b7aefeb350..e141af0ab6 100644 --- a/packages/page-collator/src/index.tsx +++ b/packages/page-collator/src/index.tsx @@ -5,8 +5,8 @@ import React, { useRef } from 'react'; import { Tabs } from '@polkadot/react-components'; -import Collators from './Collators'; -import { useTranslation } from './translate'; +import Collators from './Collators.js'; +import { useTranslation } from './translate.js'; interface Props { basePath: string; diff --git a/packages/page-collator/src/useCollators.ts b/packages/page-collator/src/useCollators.ts index 57d2714407..0f7f52a1fd 100644 --- a/packages/page-collator/src/useCollators.ts +++ b/packages/page-collator/src/useCollators.ts @@ -4,7 +4,7 @@ import type { BTreeSet } from '@polkadot/types'; import type { AccountId32, Balance } from '@polkadot/types/interfaces'; import type { BN } from '@polkadot/util'; -import type { Collator } from './types'; +import type { Collator } from './types.js'; import { useEffect, useMemo, useState } from 'react'; diff --git a/packages/page-contracts/src/Codes/Add.tsx b/packages/page-contracts/src/Codes/Add.tsx index c552445c96..689f0ea10f 100644 --- a/packages/page-contracts/src/Codes/Add.tsx +++ b/packages/page-contracts/src/Codes/Add.tsx @@ -6,11 +6,11 @@ import React, { useCallback, useState } from 'react'; import { Button, Input, Modal } from '@polkadot/react-components'; import { isNull } from '@polkadot/util'; -import { ABI, InputName } from '../shared'; -import store from '../store'; -import { useTranslation } from '../translate'; -import useAbi from '../useAbi'; -import ValidateCode from './ValidateCode'; +import { ABI, InputName } from '../shared/index.js'; +import store from '../store.js'; +import { useTranslation } from '../translate.js'; +import useAbi from '../useAbi.js'; +import ValidateCode from './ValidateCode.js'; interface Props { onClose: () => void; diff --git a/packages/page-contracts/src/Codes/Code.tsx b/packages/page-contracts/src/Codes/Code.tsx index 53f2505789..1c260e3348 100644 --- a/packages/page-contracts/src/Codes/Code.tsx +++ b/packages/page-contracts/src/Codes/Code.tsx @@ -3,17 +3,17 @@ import type { Option } from '@polkadot/types'; import type { Codec } from '@polkadot/types/types'; -import type { CodeStored } from '../types'; +import type { CodeStored } from '../types.js'; import React, { useCallback } from 'react'; import { Button, Card, CopyButton, Forget, styled } from '@polkadot/react-components'; import { useApi, useCall, useToggle } from '@polkadot/react-hooks'; -import { CodeRow, Messages } from '../shared'; -import store from '../store'; -import { useTranslation } from '../translate'; -import useAbi from '../useAbi'; +import { CodeRow, Messages } from '../shared/index.js'; +import store from '../store.js'; +import { useTranslation } from '../translate.js'; +import useAbi from '../useAbi.js'; interface Props { className?: string; diff --git a/packages/page-contracts/src/Codes/Upload.tsx b/packages/page-contracts/src/Codes/Upload.tsx index 6d65e2b4a3..3671866c3b 100644 --- a/packages/page-contracts/src/Codes/Upload.tsx +++ b/packages/page-contracts/src/Codes/Upload.tsx @@ -13,11 +13,11 @@ import { Available } from '@polkadot/react-query'; import { keyring } from '@polkadot/ui-keyring'; import { BN, BN_ZERO, isNull, isWasm, stringify } from '@polkadot/util'; -import { ABI, InputMegaGas, InputName, MessageSignature, Params } from '../shared'; -import store from '../store'; -import { useTranslation } from '../translate'; -import useAbi from '../useAbi'; -import useWeight from '../useWeight'; +import { ABI, InputMegaGas, InputName, MessageSignature, Params } from '../shared/index.js'; +import store from '../store.js'; +import { useTranslation } from '../translate.js'; +import useAbi from '../useAbi.js'; +import useWeight from '../useWeight.js'; interface Props { onClose: () => void; diff --git a/packages/page-contracts/src/Codes/ValidateCode.tsx b/packages/page-contracts/src/Codes/ValidateCode.tsx index b2b60fc713..6bb0e0907f 100644 --- a/packages/page-contracts/src/Codes/ValidateCode.tsx +++ b/packages/page-contracts/src/Codes/ValidateCode.tsx @@ -12,7 +12,7 @@ import { InfoForInput } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { isHex } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { codeHash?: string | null; diff --git a/packages/page-contracts/src/Codes/index.tsx b/packages/page-contracts/src/Codes/index.tsx index 22ccae33bd..4867353d41 100644 --- a/packages/page-contracts/src/Codes/index.tsx +++ b/packages/page-contracts/src/Codes/index.tsx @@ -5,9 +5,9 @@ import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; -import contracts from '../store'; -import { useTranslation } from '../translate'; -import Code from './Code'; +import contracts from '../store.js'; +import { useTranslation } from '../translate.js'; +import Code from './Code.js'; interface Props { onShowDeploy: (codeHash: string, constructorIndex: number) => void; diff --git a/packages/page-contracts/src/Contracts/Add.tsx b/packages/page-contracts/src/Contracts/Add.tsx index 3799b48528..e917191a6c 100644 --- a/packages/page-contracts/src/Contracts/Add.tsx +++ b/packages/page-contracts/src/Contracts/Add.tsx @@ -9,10 +9,10 @@ import { AddressRow, Button, Input, Modal } from '@polkadot/react-components'; import { useApi, useNonEmptyString } from '@polkadot/react-hooks'; import { keyring } from '@polkadot/ui-keyring'; -import { ABI, InputName } from '../shared'; -import { useTranslation } from '../translate'; -import useAbi from '../useAbi'; -import ValidateAddr from './ValidateAddr'; +import { ABI, InputName } from '../shared/index.js'; +import { useTranslation } from '../translate.js'; +import useAbi from '../useAbi.js'; +import ValidateAddr from './ValidateAddr.js'; interface Props { onClose: () => void; diff --git a/packages/page-contracts/src/Contracts/Call.tsx b/packages/page-contracts/src/Contracts/Call.tsx index a3cdff4620..ba70aee5be 100644 --- a/packages/page-contracts/src/Contracts/Call.tsx +++ b/packages/page-contracts/src/Contracts/Call.tsx @@ -4,7 +4,7 @@ import type { SubmittableExtrinsic } from '@polkadot/api/types'; import type { ContractPromise } from '@polkadot/api-contract'; import type { ContractCallOutcome } from '@polkadot/api-contract/types'; -import type { CallResult } from './types'; +import type { CallResult } from './types.js'; import React, { useCallback, useEffect, useState } from 'react'; @@ -14,11 +14,11 @@ import { convertWeight } from '@polkadot/react-hooks/useWeight'; import { Available } from '@polkadot/react-query'; import { BN, BN_ONE, BN_ZERO } from '@polkadot/util'; -import { InputMegaGas, Params } from '../shared'; -import { useTranslation } from '../translate'; -import useWeight from '../useWeight'; -import Outcome from './Outcome'; -import { getCallMessageOptions } from './util'; +import { InputMegaGas, Params } from '../shared/index.js'; +import { useTranslation } from '../translate.js'; +import useWeight from '../useWeight.js'; +import Outcome from './Outcome.js'; +import { getCallMessageOptions } from './util.js'; interface Props { className?: string; diff --git a/packages/page-contracts/src/Contracts/Contract.tsx b/packages/page-contracts/src/Contracts/Contract.tsx index 31327cf39e..0e1a3326b1 100644 --- a/packages/page-contracts/src/Contracts/Contract.tsx +++ b/packages/page-contracts/src/Contracts/Contract.tsx @@ -6,7 +6,7 @@ import type { ContractCallOutcome } from '@polkadot/api-contract/types'; import type { ActionStatus } from '@polkadot/react-components/Status/types'; import type { Option } from '@polkadot/types'; import type { ContractInfo } from '@polkadot/types/interfaces'; -import type { ContractLink } from './types'; +import type { ContractLink } from './types.js'; import React, { useCallback } from 'react'; @@ -15,8 +15,8 @@ import { useApi, useCall, useToggle } from '@polkadot/react-hooks'; import { keyring } from '@polkadot/ui-keyring'; import { isUndefined } from '@polkadot/util'; -import Messages from '../shared/Messages'; -import { useTranslation } from '../translate'; +import Messages from '../shared/Messages.js'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-contracts/src/Contracts/ContractsTable.tsx b/packages/page-contracts/src/Contracts/ContractsTable.tsx index 3d14e3e1ed..a085f53112 100644 --- a/packages/page-contracts/src/Contracts/ContractsTable.tsx +++ b/packages/page-contracts/src/Contracts/ContractsTable.tsx @@ -5,7 +5,7 @@ import type { ApiPromise } from '@polkadot/api'; import type { ContractPromise } from '@polkadot/api-contract'; import type { ContractCallOutcome } from '@polkadot/api-contract/types'; import type { SignedBlockExtended } from '@polkadot/api-derive/types'; -import type { ContractLink } from './types'; +import type { ContractLink } from './types.js'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; @@ -13,10 +13,10 @@ import { Table } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Call from './Call'; -import Contract from './Contract'; -import { getContractForAddress } from './util'; +import { useTranslation } from '../translate.js'; +import Call from './Call.js'; +import Contract from './Contract.js'; +import { getContractForAddress } from './util.js'; export interface Props { contracts: string[]; diff --git a/packages/page-contracts/src/Contracts/Deploy.tsx b/packages/page-contracts/src/Contracts/Deploy.tsx index 478a8a2148..5b46465b1a 100644 --- a/packages/page-contracts/src/Contracts/Deploy.tsx +++ b/packages/page-contracts/src/Contracts/Deploy.tsx @@ -14,11 +14,11 @@ import { keyring } from '@polkadot/ui-keyring'; import { BN, BN_ZERO, isHex, stringify } from '@polkadot/util'; import { randomAsHex } from '@polkadot/util-crypto'; -import { ABI, InputMegaGas, InputName, MessageSignature, Params } from '../shared'; -import store from '../store'; -import { useTranslation } from '../translate'; -import useAbi from '../useAbi'; -import useWeight from '../useWeight'; +import { ABI, InputMegaGas, InputName, MessageSignature, Params } from '../shared/index.js'; +import store from '../store.js'; +import { useTranslation } from '../translate.js'; +import useAbi from '../useAbi.js'; +import useWeight from '../useWeight.js'; interface Props { codeHash: string; diff --git a/packages/page-contracts/src/Contracts/Outcome.tsx b/packages/page-contracts/src/Contracts/Outcome.tsx index 4ff8ac8948..b5651a51cd 100644 --- a/packages/page-contracts/src/Contracts/Outcome.tsx +++ b/packages/page-contracts/src/Contracts/Outcome.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { CallResult } from './types'; +import type { CallResult } from './types.js'; import React from 'react'; import { Button, IdentityIcon, Output, styled } from '@polkadot/react-components'; import valueToText from '@polkadot/react-params/valueToText'; -import MessageSignature from '../shared/MessageSignature'; +import MessageSignature from '../shared/MessageSignature.js'; interface Props { className?: string; diff --git a/packages/page-contracts/src/Contracts/Summary.tsx b/packages/page-contracts/src/Contracts/Summary.tsx index 646e19f1e3..64ed0eb977 100644 --- a/packages/page-contracts/src/Contracts/Summary.tsx +++ b/packages/page-contracts/src/Contracts/Summary.tsx @@ -9,7 +9,7 @@ import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { trigger: number; diff --git a/packages/page-contracts/src/Contracts/ValidateAddr.tsx b/packages/page-contracts/src/Contracts/ValidateAddr.tsx index c31ae30ea9..feb5f82106 100644 --- a/packages/page-contracts/src/Contracts/ValidateAddr.tsx +++ b/packages/page-contracts/src/Contracts/ValidateAddr.tsx @@ -10,7 +10,7 @@ import { InfoForInput } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { keyring } from '@polkadot/ui-keyring'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { address?: string | null; diff --git a/packages/page-contracts/src/Contracts/index.tsx b/packages/page-contracts/src/Contracts/index.tsx index 77db885e94..c7243e00e3 100644 --- a/packages/page-contracts/src/Contracts/index.tsx +++ b/packages/page-contracts/src/Contracts/index.tsx @@ -6,16 +6,16 @@ import React, { useCallback, useState } from 'react'; import { Button, styled } from '@polkadot/react-components'; import { useToggle } from '@polkadot/react-hooks'; -import Codes from '../Codes'; -import CodeAdd from '../Codes/Add'; -import CodeUpload from '../Codes/Upload'; -import { useTranslation } from '../translate'; -import { useCodes } from '../useCodes'; -import { useContracts } from '../useContracts'; -import ContractAdd from './Add'; -import ContractsTable from './ContractsTable'; -import Deploy from './Deploy'; -import Summary from './Summary'; +import CodeAdd from '../Codes/Add.js'; +import Codes from '../Codes/index.js'; +import CodeUpload from '../Codes/Upload.js'; +import { useTranslation } from '../translate.js'; +import { useCodes } from '../useCodes.js'; +import { useContracts } from '../useContracts.js'; +import ContractAdd from './Add.js'; +import ContractsTable from './ContractsTable.js'; +import Deploy from './Deploy.js'; +import Summary from './Summary.js'; interface Props { className?: string; diff --git a/packages/page-contracts/src/Contracts/util.tsx b/packages/page-contracts/src/Contracts/util.tsx index a9b62a633e..371806a16f 100644 --- a/packages/page-contracts/src/Contracts/util.tsx +++ b/packages/page-contracts/src/Contracts/util.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { ContractPromise } from '@polkadot/api-contract'; import { getContractAbi } from '@polkadot/react-components/util'; -import MessageSignature from '../shared/MessageSignature'; +import MessageSignature from '../shared/MessageSignature.js'; export function findCallMethod (callContract: ContractPromise | null, callMethodIndex = 0): AbiMessage | null { const message = callContract && callContract.abi.messages[callMethodIndex]; diff --git a/packages/page-contracts/src/RemoveABI.tsx b/packages/page-contracts/src/RemoveABI.tsx index 469bec1b4e..00c0546c6e 100644 --- a/packages/page-contracts/src/RemoveABI.tsx +++ b/packages/page-contracts/src/RemoveABI.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { CodeStored } from './types'; +import type { CodeStored } from './types.js'; import React, { useCallback } from 'react'; import { Button, Modal } from '@polkadot/react-components'; -import CodeRow from './shared/CodeRow'; -import { useTranslation } from './translate'; +import CodeRow from './shared/CodeRow.js'; +import { useTranslation } from './translate.js'; interface Props { code: CodeStored; diff --git a/packages/page-contracts/src/index.tsx b/packages/page-contracts/src/index.tsx index 24ff99ec1b..c7a5ec402a 100644 --- a/packages/page-contracts/src/index.tsx +++ b/packages/page-contracts/src/index.tsx @@ -8,7 +8,7 @@ import React, { useRef } from 'react'; import { useTranslation } from '@polkadot/app-contracts/translate'; import { Tabs } from '@polkadot/react-components'; -import Contracts from './Contracts'; +import Contracts from './Contracts/index.js'; function ContractsApp ({ basePath, className = '' }: Props): React.ReactElement { const { t } = useTranslation(); diff --git a/packages/page-contracts/src/shared/ABI.tsx b/packages/page-contracts/src/shared/ABI.tsx index 0f01ab1108..cd68983a6d 100644 --- a/packages/page-contracts/src/shared/ABI.tsx +++ b/packages/page-contracts/src/shared/ABI.tsx @@ -6,8 +6,8 @@ import React from 'react'; import { Abi } from '@polkadot/api-contract'; import { IconLink, InputFile, Labelled } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Messages from './Messages'; +import { useTranslation } from '../translate.js'; +import Messages from './Messages.js'; interface Props { className?: string; diff --git a/packages/page-contracts/src/shared/CodeRow.tsx b/packages/page-contracts/src/shared/CodeRow.tsx index b704ddd895..a1943d8fb6 100644 --- a/packages/page-contracts/src/shared/CodeRow.tsx +++ b/packages/page-contracts/src/shared/CodeRow.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { CodeStored } from '../types'; +import type { CodeStored } from '../types.js'; import React, { useCallback, useEffect, useState } from 'react'; import { Icon, styled } from '@polkadot/react-components'; import Row from '@polkadot/react-components/Row'; -import contracts from '../store'; +import contracts from '../store.js'; interface Props { buttons?: React.ReactNode; diff --git a/packages/page-contracts/src/shared/InputMegaGas.tsx b/packages/page-contracts/src/shared/InputMegaGas.tsx index 2037274a6e..c6700ba3b8 100644 --- a/packages/page-contracts/src/shared/InputMegaGas.tsx +++ b/packages/page-contracts/src/shared/InputMegaGas.tsx @@ -2,14 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { UseWeight } from '../types'; +import type { UseWeight } from '../types.js'; import React, { useEffect, useMemo, useState } from 'react'; import { InputNumber, styled, Toggle } from '@polkadot/react-components'; import { BN_MILLION, BN_ONE, BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-contracts/src/shared/InputName.tsx b/packages/page-contracts/src/shared/InputName.tsx index cb7edfae78..5bdb29a23c 100644 --- a/packages/page-contracts/src/shared/InputName.tsx +++ b/packages/page-contracts/src/shared/InputName.tsx @@ -5,7 +5,7 @@ import React from 'react'; import { Input } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-contracts/src/shared/Message.tsx b/packages/page-contracts/src/shared/Message.tsx index 247af5d146..ac6f1497a4 100644 --- a/packages/page-contracts/src/shared/Message.tsx +++ b/packages/page-contracts/src/shared/Message.tsx @@ -8,8 +8,8 @@ import React, { useCallback } from 'react'; import { Button, Output, styled } from '@polkadot/react-components'; import valueToText from '@polkadot/react-params/valueToText'; -import { useTranslation } from '../translate'; -import MessageSignature from './MessageSignature'; +import { useTranslation } from '../translate.js'; +import MessageSignature from './MessageSignature.js'; export interface Props { className?: string; diff --git a/packages/page-contracts/src/shared/MessageSignature.tsx b/packages/page-contracts/src/shared/MessageSignature.tsx index f98381f1e2..9437f0852b 100644 --- a/packages/page-contracts/src/shared/MessageSignature.tsx +++ b/packages/page-contracts/src/shared/MessageSignature.tsx @@ -9,7 +9,7 @@ import { Icon, styled, Tooltip } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; import { encodeTypeDef } from '@polkadot/types/create'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; const MAX_PARAM_LENGTH = 20; diff --git a/packages/page-contracts/src/shared/Messages.tsx b/packages/page-contracts/src/shared/Messages.tsx index 322becc4c5..d1c13fd158 100644 --- a/packages/page-contracts/src/shared/Messages.tsx +++ b/packages/page-contracts/src/shared/Messages.tsx @@ -13,8 +13,8 @@ import { Expander, styled } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Message from './Message'; +import { useTranslation } from '../translate.js'; +import Message from './Message.js'; export interface Props { className?: string; diff --git a/packages/page-contracts/src/shared/index.tsx b/packages/page-contracts/src/shared/index.tsx index 3a701f31e5..e30dd0607e 100644 --- a/packages/page-contracts/src/shared/index.tsx +++ b/packages/page-contracts/src/shared/index.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2023 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as ABI } from './ABI'; -export { default as CodeRow } from './CodeRow'; -export { default as InputMegaGas } from './InputMegaGas'; -export { default as InputName } from './InputName'; -export { default as Messages } from './Messages'; -export { default as MessageSignature } from './MessageSignature'; -export { default as Params } from './Params'; +export { default as ABI } from './ABI.js'; +export { default as CodeRow } from './CodeRow.js'; +export { default as InputMegaGas } from './InputMegaGas.js'; +export { default as InputName } from './InputName.js'; +export { default as Messages } from './Messages.js'; +export { default as MessageSignature } from './MessageSignature.js'; +export { default as Params } from './Params.js'; diff --git a/packages/page-contracts/src/store.ts b/packages/page-contracts/src/store.ts index a81e2c49ae..fd70bba9d2 100644 --- a/packages/page-contracts/src/store.ts +++ b/packages/page-contracts/src/store.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { Hash } from '@polkadot/types/interfaces'; -import type { CodeJson, CodeStored } from './types'; +import type { CodeJson, CodeStored } from './types.js'; import EventEmitter from 'eventemitter3'; import store from 'store'; diff --git a/packages/page-contracts/src/useAbi.ts b/packages/page-contracts/src/useAbi.ts index 02b38b53eb..82707d9836 100644 --- a/packages/page-contracts/src/useAbi.ts +++ b/packages/page-contracts/src/useAbi.ts @@ -8,7 +8,7 @@ import { api } from '@polkadot/react-api'; import { createNamedHook } from '@polkadot/react-hooks'; import { u8aToString } from '@polkadot/util'; -import store from './store'; +import store from './store.js'; interface AbiState { abi: string | null; diff --git a/packages/page-contracts/src/useCodes.ts b/packages/page-contracts/src/useCodes.ts index ae675589e1..43d1009da5 100644 --- a/packages/page-contracts/src/useCodes.ts +++ b/packages/page-contracts/src/useCodes.ts @@ -1,13 +1,13 @@ // Copyright 2017-2023 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { CodeStored } from './types'; +import type { CodeStored } from './types.js'; import { useEffect, useState } from 'react'; import { createNamedHook, useIsMountedRef } from '@polkadot/react-hooks'; -import store from './store'; +import store from './store.js'; interface UseCodes { allCodes: CodeStored[]; diff --git a/packages/page-contracts/src/useWeight.ts b/packages/page-contracts/src/useWeight.ts index d25e2229a5..bf0d19b983 100644 --- a/packages/page-contracts/src/useWeight.ts +++ b/packages/page-contracts/src/useWeight.ts @@ -3,7 +3,7 @@ import type { Weight } from '@polkadot/types/interfaces'; import type { BN } from '@polkadot/util'; -import type { UseWeight } from './types'; +import type { UseWeight } from './types.js'; import { useCallback, useMemo, useState } from 'react'; diff --git a/packages/page-council/src/Motions/Close.tsx b/packages/page-council/src/Motions/Close.tsx index 1ca6178f20..fc143680a3 100644 --- a/packages/page-council/src/Motions/Close.tsx +++ b/packages/page-council/src/Motions/Close.tsx @@ -8,7 +8,7 @@ import React, { useState } from 'react'; import { Button, InputAddress, Modal, ProposedAction, TxButton } from '@polkadot/react-components'; import { useApi, useCollectiveInstance, useToggle, useWeight } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { hasFailed: boolean; diff --git a/packages/page-council/src/Motions/Motion.tsx b/packages/page-council/src/Motions/Motion.tsx index ff08f53b89..ee7aee9466 100644 --- a/packages/page-council/src/Motions/Motion.tsx +++ b/packages/page-council/src/Motions/Motion.tsx @@ -12,9 +12,9 @@ import { useAccounts, useCollectiveInstance, useVotingStatus } from '@polkadot/r import { BlockToTime } from '@polkadot/react-query'; import { formatNumber } from '@polkadot/util'; -import Close from './Close'; -import Voters from './Voters'; -import Voting from './Voting'; +import Close from './Close.js'; +import Voters from './Voters.js'; +import Voting from './Voting.js'; interface Props { className?: string; diff --git a/packages/page-council/src/Motions/ProposeExternal.tsx b/packages/page-council/src/Motions/ProposeExternal.tsx index 8d1ef7c9c1..90baa0deaa 100644 --- a/packages/page-council/src/Motions/ProposeExternal.tsx +++ b/packages/page-council/src/Motions/ProposeExternal.tsx @@ -12,7 +12,7 @@ import { Button, Input, InputAddress, InputNumber, Modal, TxButton } from '@polk import { useApi, useCollectiveInstance, usePreimage, useToggle } from '@polkadot/react-hooks'; import { BN_ZERO, isFunction, isHex } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-council/src/Motions/ProposeMotion.tsx b/packages/page-council/src/Motions/ProposeMotion.tsx index ec0e3fd543..6ddcd65bf0 100644 --- a/packages/page-council/src/Motions/ProposeMotion.tsx +++ b/packages/page-council/src/Motions/ProposeMotion.tsx @@ -10,7 +10,7 @@ import { Button, Extrinsic, InputAddress, InputNumber, Modal, TxButton } from '@ import { useApi, useCollectiveInstance, useToggle } from '@polkadot/react-hooks'; import { BN, BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { isMember: boolean; diff --git a/packages/page-council/src/Motions/Slashing.tsx b/packages/page-council/src/Motions/Slashing.tsx index 7c87c4bbc6..86a8ce0339 100644 --- a/packages/page-council/src/Motions/Slashing.tsx +++ b/packages/page-council/src/Motions/Slashing.tsx @@ -9,7 +9,7 @@ import { getSlashProposalThreshold } from '@polkadot/apps-config'; import { Button, Dropdown, Input, InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useAvailableSlashes, useCollectiveInstance, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-council/src/Motions/Voters.tsx b/packages/page-council/src/Motions/Voters.tsx index ed166c45d4..24c2362dfd 100644 --- a/packages/page-council/src/Motions/Voters.tsx +++ b/packages/page-council/src/Motions/Voters.tsx @@ -7,7 +7,7 @@ import React, { useCallback, useMemo } from 'react'; import { AddressMini, ExpanderScroll } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { isAye?: boolean; diff --git a/packages/page-council/src/Motions/Voting.tsx b/packages/page-council/src/Motions/Voting.tsx index a16ce24119..4334b3d9d6 100644 --- a/packages/page-council/src/Motions/Voting.tsx +++ b/packages/page-council/src/Motions/Voting.tsx @@ -8,7 +8,7 @@ import React, { useState } from 'react'; import { Button, MarkWarning, Modal, ProposedAction, TxButton, VoteAccount } from '@polkadot/react-components'; import { useAccounts, useApi, useCollectiveInstance, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { hash: Hash; diff --git a/packages/page-council/src/Motions/index.tsx b/packages/page-council/src/Motions/index.tsx index f195b4e067..b2660c398a 100644 --- a/packages/page-council/src/Motions/index.tsx +++ b/packages/page-council/src/Motions/index.tsx @@ -9,11 +9,11 @@ import React, { useRef } from 'react'; import { Button, Table } from '@polkadot/react-components'; import { useCollectiveMembers } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import Motion from './Motion'; -import ProposeExternal from './ProposeExternal'; -import ProposeMotion from './ProposeMotion'; -import Slashing from './Slashing'; +import { useTranslation } from '../translate.js'; +import Motion from './Motion.js'; +import ProposeExternal from './ProposeExternal.js'; +import ProposeMotion from './ProposeMotion.js'; +import Slashing from './Slashing.js'; interface Props { className?: string; diff --git a/packages/page-council/src/Overview/Candidate.tsx b/packages/page-council/src/Overview/Candidate.tsx index 5c05014f2e..4163a858be 100644 --- a/packages/page-council/src/Overview/Candidate.tsx +++ b/packages/page-council/src/Overview/Candidate.tsx @@ -8,8 +8,8 @@ import React from 'react'; import { AddressSmall, Tag } from '@polkadot/react-components'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Voters from './Voters'; +import { useTranslation } from '../translate.js'; +import Voters from './Voters.js'; interface Props { className?: string; diff --git a/packages/page-council/src/Overview/Candidates.tsx b/packages/page-council/src/Overview/Candidates.tsx index 0d1783f081..8852bbaaaf 100644 --- a/packages/page-council/src/Overview/Candidates.tsx +++ b/packages/page-council/src/Overview/Candidates.tsx @@ -8,8 +8,8 @@ import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Candidate from './Candidate'; +import { useTranslation } from '../translate.js'; +import Candidate from './Candidate.js'; interface Props { allVotes?: Record; diff --git a/packages/page-council/src/Overview/Members.tsx b/packages/page-council/src/Overview/Members.tsx index 53966f57d3..c91b9f8659 100644 --- a/packages/page-council/src/Overview/Members.tsx +++ b/packages/page-council/src/Overview/Members.tsx @@ -8,8 +8,8 @@ import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Candidate from './Candidate'; +import { useTranslation } from '../translate.js'; +import Candidate from './Candidate.js'; interface Props { allVotes?: Record; diff --git a/packages/page-council/src/Overview/SubmitCandidacy.tsx b/packages/page-council/src/Overview/SubmitCandidacy.tsx index 4b5e301a9e..ecdaceb83d 100644 --- a/packages/page-council/src/Overview/SubmitCandidacy.tsx +++ b/packages/page-council/src/Overview/SubmitCandidacy.tsx @@ -2,15 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 import type { u128 } from '@polkadot/types'; -import type { ComponentProps as Props } from './types'; +import type { ComponentProps as Props } from './types.js'; import React, { useState } from 'react'; import { Button, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useModal } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import { useModuleElections } from '../useModuleElections'; +import { useTranslation } from '../translate.js'; +import { useModuleElections } from '../useModuleElections.js'; function SubmitCandidacy ({ electionsInfo }: Props): React.ReactElement | null { const { api } = useApi(); diff --git a/packages/page-council/src/Overview/Summary.tsx b/packages/page-council/src/Overview/Summary.tsx index 3e7d9e11b5..814a40b66f 100644 --- a/packages/page-council/src/Overview/Summary.tsx +++ b/packages/page-council/src/Overview/Summary.tsx @@ -3,14 +3,14 @@ import type { DeriveElectionsInfo } from '@polkadot/api-derive/types'; import type { BlockNumber } from '@polkadot/types/interfaces'; -import type { ComponentProps } from './types'; +import type { ComponentProps } from './types.js'; import React from 'react'; import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { BN_THREE, BN_TWO, BN_ZERO, formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props extends ComponentProps { bestNumber?: BlockNumber; diff --git a/packages/page-council/src/Overview/Vote.tsx b/packages/page-council/src/Overview/Vote.tsx index 06e63f8e67..e7c0455247 100644 --- a/packages/page-council/src/Overview/Vote.tsx +++ b/packages/page-council/src/Overview/Vote.tsx @@ -10,8 +10,8 @@ import { Button, InputAddress, InputAddressMulti, InputBalance, Modal, TxButton, import { useApi, useToggle } from '@polkadot/react-hooks'; import { BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import { useModuleElections } from '../useModuleElections'; +import { useTranslation } from '../translate.js'; +import { useModuleElections } from '../useModuleElections.js'; interface Props { className?: string; diff --git a/packages/page-council/src/Overview/index.tsx b/packages/page-council/src/Overview/index.tsx index ecb9864f34..bfed48205d 100644 --- a/packages/page-council/src/Overview/index.tsx +++ b/packages/page-council/src/Overview/index.tsx @@ -9,12 +9,12 @@ import React from 'react'; import { Button } from '@polkadot/react-components'; import { useApi, useBestNumber, useCall } from '@polkadot/react-hooks'; -import { useModuleElections } from '../useModuleElections'; -import Candidates from './Candidates'; -import Members from './Members'; -import SubmitCandidacy from './SubmitCandidacy'; -import Summary from './Summary'; -import Vote from './Vote'; +import { useModuleElections } from '../useModuleElections.js'; +import Candidates from './Candidates.js'; +import Members from './Members.js'; +import SubmitCandidacy from './SubmitCandidacy.js'; +import Summary from './Summary.js'; +import Vote from './Vote.js'; interface Props { className?: string; diff --git a/packages/page-council/src/index.tsx b/packages/page-council/src/index.tsx index abfe4a7757..00c965e2f4 100644 --- a/packages/page-council/src/index.tsx +++ b/packages/page-council/src/index.tsx @@ -11,10 +11,10 @@ import { useLocation } from 'react-router-dom'; import { Tabs } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import Motions from './Motions'; -import Overview from './Overview'; -import { useTranslation } from './translate'; -import useCounter from './useCounter'; +import Motions from './Motions/index.js'; +import Overview from './Overview/index.js'; +import { useTranslation } from './translate.js'; +import useCounter from './useCounter.js'; export { useCounter }; diff --git a/packages/page-democracy/src/Overview/External.tsx b/packages/page-democracy/src/Overview/External.tsx index c89d27195f..8d40d4a8e0 100644 --- a/packages/page-democracy/src/Overview/External.tsx +++ b/packages/page-democracy/src/Overview/External.tsx @@ -8,9 +8,9 @@ import React from 'react'; import { AddressMini, Button, Columar, ExpandButton, LinkExternal, Table } from '@polkadot/react-components'; import { useCollectiveMembers, useToggle } from '@polkadot/react-hooks'; -import Fasttrack from './Fasttrack'; -import PreImageButton from './PreImageButton'; -import ProposalCell from './ProposalCell'; +import Fasttrack from './Fasttrack.js'; +import PreImageButton from './PreImageButton.js'; +import ProposalCell from './ProposalCell.js'; interface Props { className?: string; diff --git a/packages/page-democracy/src/Overview/ExternalCell.tsx b/packages/page-democracy/src/Overview/ExternalCell.tsx index 3e1979b2a9..2c7a36e4df 100644 --- a/packages/page-democracy/src/Overview/ExternalCell.tsx +++ b/packages/page-democracy/src/Overview/ExternalCell.tsx @@ -10,7 +10,7 @@ import { CallExpander } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { Holder } from '@polkadot/react-params'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-democracy/src/Overview/Externals.tsx b/packages/page-democracy/src/Overview/Externals.tsx index 3d85f79d8e..cb07e0ae4f 100644 --- a/packages/page-democracy/src/Overview/Externals.tsx +++ b/packages/page-democracy/src/Overview/Externals.tsx @@ -8,8 +8,8 @@ import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import External from './External'; +import { useTranslation } from '../translate.js'; +import External from './External.js'; interface Props { className?: string; diff --git a/packages/page-democracy/src/Overview/Fasttrack.tsx b/packages/page-democracy/src/Overview/Fasttrack.tsx index 7abe535c63..dfef796083 100644 --- a/packages/page-democracy/src/Overview/Fasttrack.tsx +++ b/packages/page-democracy/src/Overview/Fasttrack.tsx @@ -12,7 +12,7 @@ import { Button, Input, InputAddress, InputNumber, Modal, Toggle, TxButton } fro import { useApi, useCall, useCollectiveInstance, useToggle } from '@polkadot/react-hooks'; import { BN, isString } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { imageHash: Hash | HexString; diff --git a/packages/page-democracy/src/Overview/PreImage.tsx b/packages/page-democracy/src/Overview/PreImage.tsx index 61936cc2a2..320130f96c 100644 --- a/packages/page-democracy/src/Overview/PreImage.tsx +++ b/packages/page-democracy/src/Overview/PreImage.tsx @@ -13,7 +13,7 @@ import { Available } from '@polkadot/react-query'; import { BN, BN_ZERO, isString } from '@polkadot/util'; import { blake2AsHex } from '@polkadot/util-crypto'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-democracy/src/Overview/PreImageButton.tsx b/packages/page-democracy/src/Overview/PreImageButton.tsx index fe70d1e1dc..5f0b06a7b0 100644 --- a/packages/page-democracy/src/Overview/PreImageButton.tsx +++ b/packages/page-democracy/src/Overview/PreImageButton.tsx @@ -9,8 +9,8 @@ import React from 'react'; import { Button } from '@polkadot/react-components'; import { useApi, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import PreImage from './PreImage'; +import { useTranslation } from '../translate.js'; +import PreImage from './PreImage.js'; interface Props { imageHash: Hash | HexString; diff --git a/packages/page-democracy/src/Overview/Proposal.tsx b/packages/page-democracy/src/Overview/Proposal.tsx index 1352bfc755..ecea9c5cb6 100644 --- a/packages/page-democracy/src/Overview/Proposal.tsx +++ b/packages/page-democracy/src/Overview/Proposal.tsx @@ -9,10 +9,10 @@ import { AddressMini, Button, Columar, ExpandButton, ExpanderScroll, LinkExterna import { useToggle } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; -import { useTranslation } from '../translate'; -import PreImageButton from './PreImageButton'; -import ProposalCell from './ProposalCell'; -import Seconding from './Seconding'; +import { useTranslation } from '../translate.js'; +import PreImageButton from './PreImageButton.js'; +import ProposalCell from './ProposalCell.js'; +import Seconding from './Seconding.js'; interface Props { className?: string; diff --git a/packages/page-democracy/src/Overview/ProposalCell.tsx b/packages/page-democracy/src/Overview/ProposalCell.tsx index b793444b40..bd8f967d9c 100644 --- a/packages/page-democracy/src/Overview/ProposalCell.tsx +++ b/packages/page-democracy/src/Overview/ProposalCell.tsx @@ -10,9 +10,9 @@ import React from 'react'; import { CallExpander, styled } from '@polkadot/react-components'; import { useApi, usePreimage } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import ExternalCell from './ExternalCell'; -import TreasuryCell from './TreasuryCell'; +import { useTranslation } from '../translate.js'; +import ExternalCell from './ExternalCell.js'; +import TreasuryCell from './TreasuryCell.js'; interface Props { className?: string; diff --git a/packages/page-democracy/src/Overview/Proposals.tsx b/packages/page-democracy/src/Overview/Proposals.tsx index 056c0dd174..b687853ecf 100644 --- a/packages/page-democracy/src/Overview/Proposals.tsx +++ b/packages/page-democracy/src/Overview/Proposals.tsx @@ -8,8 +8,8 @@ import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import ProposalDisplay from './Proposal'; +import { useTranslation } from '../translate.js'; +import ProposalDisplay from './Proposal.js'; interface Props { className?: string; diff --git a/packages/page-democracy/src/Overview/Propose.tsx b/packages/page-democracy/src/Overview/Propose.tsx index f7f9eb8834..73a1e95594 100644 --- a/packages/page-democracy/src/Overview/Propose.tsx +++ b/packages/page-democracy/src/Overview/Propose.tsx @@ -11,7 +11,7 @@ import { useApi, useCall, usePreimage } from '@polkadot/react-hooks'; import { Available } from '@polkadot/react-query'; import { isFunction, isHex } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-democracy/src/Overview/Referendum.tsx b/packages/page-democracy/src/Overview/Referendum.tsx index 5d21a5cc46..b0c4c60517 100644 --- a/packages/page-democracy/src/Overview/Referendum.tsx +++ b/packages/page-democracy/src/Overview/Referendum.tsx @@ -11,12 +11,12 @@ import { useAccounts, useApi, useBestNumber, useCall, useToggle } from '@polkado import { BlockToTime } from '@polkadot/react-query'; import { BN, BN_ONE, formatNumber, isBoolean } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import useChangeCalc from '../useChangeCalc'; -import PreImageButton from './PreImageButton'; -import ProposalCell from './ProposalCell'; -import ReferendumVotes from './ReferendumVotes'; -import Voting from './Voting'; +import { useTranslation } from '../translate.js'; +import useChangeCalc from '../useChangeCalc.js'; +import PreImageButton from './PreImageButton.js'; +import ProposalCell from './ProposalCell.js'; +import ReferendumVotes from './ReferendumVotes.js'; +import Voting from './Voting.js'; interface Props { className?: string; diff --git a/packages/page-democracy/src/Overview/ReferendumVotes.tsx b/packages/page-democracy/src/Overview/ReferendumVotes.tsx index fb8371b858..80d5004fb7 100644 --- a/packages/page-democracy/src/Overview/ReferendumVotes.tsx +++ b/packages/page-democracy/src/Overview/ReferendumVotes.tsx @@ -10,8 +10,8 @@ import { ExpanderScroll } from '@polkadot/react-components'; import { FormatBalance } from '@polkadot/react-query'; import { BN_TEN, formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import ReferendumVote from './ReferendumVote'; +import { useTranslation } from '../translate.js'; +import ReferendumVote from './ReferendumVote.js'; interface Props { change: BN; diff --git a/packages/page-democracy/src/Overview/Referendums.tsx b/packages/page-democracy/src/Overview/Referendums.tsx index ef78a38d22..f0ab578952 100644 --- a/packages/page-democracy/src/Overview/Referendums.tsx +++ b/packages/page-democracy/src/Overview/Referendums.tsx @@ -7,8 +7,8 @@ import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Referendum from './Referendum'; +import { useTranslation } from '../translate.js'; +import Referendum from './Referendum.js'; interface Props { className?: string; diff --git a/packages/page-democracy/src/Overview/Seconding.tsx b/packages/page-democracy/src/Overview/Seconding.tsx index 532f7232bc..c81c35b3db 100644 --- a/packages/page-democracy/src/Overview/Seconding.tsx +++ b/packages/page-democracy/src/Overview/Seconding.tsx @@ -10,7 +10,7 @@ import React, { useState } from 'react'; import { Button, InputAddress, InputBalance, Modal, ProposedAction, TxButton } from '@polkadot/react-components'; import { useAccounts, useApi, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-democracy/src/Overview/Summary.tsx b/packages/page-democracy/src/Overview/Summary.tsx index 4212d29643..9060d98bfc 100644 --- a/packages/page-democracy/src/Overview/Summary.tsx +++ b/packages/page-democracy/src/Overview/Summary.tsx @@ -9,7 +9,7 @@ import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { useApi, useBestNumber, useCall, useCallMulti } from '@polkadot/react-hooks'; import { BN_ONE, BN_THREE, BN_TWO, formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { referendumCount?: number; diff --git a/packages/page-democracy/src/Overview/TreasuryCell.tsx b/packages/page-democracy/src/Overview/TreasuryCell.tsx index fe8b8a90ff..bd2fa24fd6 100644 --- a/packages/page-democracy/src/Overview/TreasuryCell.tsx +++ b/packages/page-democracy/src/Overview/TreasuryCell.tsx @@ -12,7 +12,7 @@ import { useApi, useCall } from '@polkadot/react-hooks'; import Params from '@polkadot/react-params'; import { getTypeDef } from '@polkadot/types/create'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-democracy/src/Overview/Voting.tsx b/packages/page-democracy/src/Overview/Voting.tsx index ce5b584e19..c3430c3883 100644 --- a/packages/page-democracy/src/Overview/Voting.tsx +++ b/packages/page-democracy/src/Overview/Voting.tsx @@ -9,7 +9,7 @@ import React, { useMemo, useState } from 'react'; import { Button, ConvictionDropdown, Modal, ProposedAction, TxButton, VoteAccount, VoteValue } from '@polkadot/react-components'; import { useAccounts, useApi, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { proposal?: Proposal; diff --git a/packages/page-democracy/src/Overview/index.tsx b/packages/page-democracy/src/Overview/index.tsx index cacfd40523..a47d1e246b 100644 --- a/packages/page-democracy/src/Overview/index.tsx +++ b/packages/page-democracy/src/Overview/index.tsx @@ -8,13 +8,13 @@ import React from 'react'; import { Button } from '@polkadot/react-components'; import { useApi, useCall, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import Externals from './Externals'; -import PreImage from './PreImage'; -import Proposals from './Proposals'; -import Propose from './Propose'; -import Referendums from './Referendums'; -import Summary from './Summary'; +import { useTranslation } from '../translate.js'; +import Externals from './Externals.js'; +import PreImage from './PreImage.js'; +import Proposals from './Proposals.js'; +import Propose from './Propose.js'; +import Referendums from './Referendums.js'; +import Summary from './Summary.js'; interface Props { className?: string; diff --git a/packages/page-democracy/src/index.tsx b/packages/page-democracy/src/index.tsx index 031dda5aeb..52dd507f8f 100644 --- a/packages/page-democracy/src/index.tsx +++ b/packages/page-democracy/src/index.tsx @@ -6,10 +6,10 @@ import { Route, Switch } from 'react-router'; import { Tabs } from '@polkadot/react-components'; -import Overview from './Overview'; -import { useTranslation } from './translate'; +import Overview from './Overview/index.js'; +import { useTranslation } from './translate.js'; -export { default as useCounter } from './useCounter'; +export { default as useCounter } from './useCounter.js'; interface Props { basePath: string; diff --git a/packages/page-democracy/src/useChangeCalc.ts b/packages/page-democracy/src/useChangeCalc.ts index 398a2e76ba..8c831b260c 100644 --- a/packages/page-democracy/src/useChangeCalc.ts +++ b/packages/page-democracy/src/useChangeCalc.ts @@ -9,7 +9,7 @@ import { useEffect, useState } from 'react'; import { createNamedHook, useApi, useCall } from '@polkadot/react-hooks'; import { BN_ZERO } from '@polkadot/util'; -import { approxChanges } from './util'; +import { approxChanges } from './util.js'; interface Result { changeAye: BN; diff --git a/packages/page-democracy/src/util.spec.ts b/packages/page-democracy/src/util.spec.ts index 22d40305d7..df5fe63b52 100644 --- a/packages/page-democracy/src/util.spec.ts +++ b/packages/page-democracy/src/util.spec.ts @@ -5,7 +5,7 @@ import { calcPassing } from '@polkadot/api-derive/democracy/util'; import { TypeRegistry } from '@polkadot/types/create'; import { BN } from '@polkadot/util'; -import { approxChanges } from './util'; +import { approxChanges } from './util.js'; const ACTUAL = { sqrtElectorate: new BN('2949443240'), diff --git a/packages/page-explorer/src/Api/index.tsx b/packages/page-explorer/src/Api/index.tsx index 8f56f72a28..fdd2ee6bf5 100644 --- a/packages/page-explorer/src/Api/index.tsx +++ b/packages/page-explorer/src/Api/index.tsx @@ -10,8 +10,8 @@ import { CardSummary, NextTick, styled, SummaryBox } from '@polkadot/react-compo import { useApiStats } from '@polkadot/react-hooks'; import { formatNumber } from '@polkadot/util'; -import Chart from '../Latency/Chart'; -import { useTranslation } from '../translate'; +import Chart from '../Latency/Chart.js'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-explorer/src/BlockHeaders.tsx b/packages/page-explorer/src/BlockHeaders.tsx index 8853fa9f5b..d2ee89a61c 100644 --- a/packages/page-explorer/src/BlockHeaders.tsx +++ b/packages/page-explorer/src/BlockHeaders.tsx @@ -7,8 +7,8 @@ import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; -import BlockHeader from './BlockHeader'; -import { useTranslation } from './translate'; +import BlockHeader from './BlockHeader.js'; +import { useTranslation } from './translate.js'; interface Props { headers: HeaderExtended[]; diff --git a/packages/page-explorer/src/BlockInfo/ByHash.tsx b/packages/page-explorer/src/BlockInfo/ByHash.tsx index 5b93dfe8bf..0cb3b8be7b 100644 --- a/packages/page-explorer/src/BlockInfo/ByHash.tsx +++ b/packages/page-explorer/src/BlockInfo/ByHash.tsx @@ -13,12 +13,12 @@ import { useApi, useIsMountedRef } from '@polkadot/react-hooks'; import { convertWeight } from '@polkadot/react-hooks/useWeight'; import { formatNumber } from '@polkadot/util'; -import Events from '../Events'; -import { useTranslation } from '../translate'; -import Extrinsics from './Extrinsics'; -import Justifications from './Justifications'; -import Logs from './Logs'; -import Summary from './Summary'; +import Events from '../Events.js'; +import { useTranslation } from '../translate.js'; +import Extrinsics from './Extrinsics.js'; +import Justifications from './Justifications.js'; +import Logs from './Logs.js'; +import Summary from './Summary.js'; interface Props { className?: string; diff --git a/packages/page-explorer/src/BlockInfo/ByNumber.tsx b/packages/page-explorer/src/BlockInfo/ByNumber.tsx index c1bdbb6989..672e5d91c5 100644 --- a/packages/page-explorer/src/BlockInfo/ByNumber.tsx +++ b/packages/page-explorer/src/BlockInfo/ByNumber.tsx @@ -7,7 +7,7 @@ import React, { useEffect, useState } from 'react'; import { useApi, useIsMountedRef } from '@polkadot/react-hooks'; -import BlockByHash from './ByHash'; +import BlockByHash from './ByHash.js'; interface Props { value: string; diff --git a/packages/page-explorer/src/BlockInfo/Extrinsic.tsx b/packages/page-explorer/src/BlockInfo/Extrinsic.tsx index 559796db55..c22ac17c51 100644 --- a/packages/page-explorer/src/BlockInfo/Extrinsic.tsx +++ b/packages/page-explorer/src/BlockInfo/Extrinsic.tsx @@ -11,8 +11,8 @@ import { AddressMini, CallExpander, LinkExternal, styled } from '@polkadot/react import { convertWeight } from '@polkadot/react-hooks/useWeight'; import { BN, formatNumber } from '@polkadot/util'; -import Event from '../Event'; -import { useTranslation } from '../translate'; +import Event from '../Event.js'; +import { useTranslation } from '../translate.js'; interface Props { blockNumber?: BlockNumber; diff --git a/packages/page-explorer/src/BlockInfo/Extrinsics.tsx b/packages/page-explorer/src/BlockInfo/Extrinsics.tsx index b0a2af54f5..5ce2a4eea4 100644 --- a/packages/page-explorer/src/BlockInfo/Extrinsics.tsx +++ b/packages/page-explorer/src/BlockInfo/Extrinsics.tsx @@ -9,8 +9,8 @@ import React, { useMemo } from 'react'; import { Table } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import ExtrinsicDisplay from './Extrinsic'; +import { useTranslation } from '../translate.js'; +import ExtrinsicDisplay from './Extrinsic.js'; interface Props { blockNumber?: BlockNumber; diff --git a/packages/page-explorer/src/BlockInfo/Justifications.tsx b/packages/page-explorer/src/BlockInfo/Justifications.tsx index 45e35b64af..49d95cf867 100644 --- a/packages/page-explorer/src/BlockInfo/Justifications.tsx +++ b/packages/page-explorer/src/BlockInfo/Justifications.tsx @@ -11,7 +11,7 @@ import { Expander, Table } from '@polkadot/react-components'; import Params from '@polkadot/react-params'; import { getTypeDef } from '@polkadot/types/create'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { value: Option; diff --git a/packages/page-explorer/src/BlockInfo/Logs.tsx b/packages/page-explorer/src/BlockInfo/Logs.tsx index a895c2213f..9890619e98 100644 --- a/packages/page-explorer/src/BlockInfo/Logs.tsx +++ b/packages/page-explorer/src/BlockInfo/Logs.tsx @@ -11,7 +11,7 @@ import Params from '@polkadot/react-params'; import { Raw, Struct, Tuple, Vec } from '@polkadot/types'; import { getTypeDef } from '@polkadot/types/create'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { value?: DigestItem[]; diff --git a/packages/page-explorer/src/BlockInfo/Summary.tsx b/packages/page-explorer/src/BlockInfo/Summary.tsx index 4da2d5850e..21c4e93f51 100644 --- a/packages/page-explorer/src/BlockInfo/Summary.tsx +++ b/packages/page-explorer/src/BlockInfo/Summary.tsx @@ -12,7 +12,7 @@ import { convertWeight } from '@polkadot/react-hooks/useWeight'; import { FormatBalance } from '@polkadot/react-query'; import { BN, BN_ONE, BN_THREE, BN_TWO, formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { events?: KeyedEvent[] | null; diff --git a/packages/page-explorer/src/BlockInfo/index.tsx b/packages/page-explorer/src/BlockInfo/index.tsx index 5212dec27d..6437edcf18 100644 --- a/packages/page-explorer/src/BlockInfo/index.tsx +++ b/packages/page-explorer/src/BlockInfo/index.tsx @@ -7,9 +7,9 @@ import { useParams } from 'react-router-dom'; import { useBestNumber } from '@polkadot/react-hooks'; import { isHex } from '@polkadot/util'; -import Query from '../Query'; -import BlockByHash from './ByHash'; -import BlockByNumber from './ByNumber'; +import Query from '../Query.js'; +import BlockByHash from './ByHash.js'; +import BlockByNumber from './ByNumber.js'; function Entry (): React.ReactElement | null { const bestNumber = useBestNumber(); diff --git a/packages/page-explorer/src/Events.tsx b/packages/page-explorer/src/Events.tsx index 86625da439..6cf967c7f2 100644 --- a/packages/page-explorer/src/Events.tsx +++ b/packages/page-explorer/src/Events.tsx @@ -9,8 +9,8 @@ import { Link } from 'react-router-dom'; import { MarkError, Table } from '@polkadot/react-components'; import { formatNumber } from '@polkadot/util'; -import Event from './Event'; -import { useTranslation } from './translate'; +import Event from './Event.js'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-explorer/src/Forks.tsx b/packages/page-explorer/src/Forks.tsx index 07f0e45daf..83e10a2f9c 100644 --- a/packages/page-explorer/src/Forks.tsx +++ b/packages/page-explorer/src/Forks.tsx @@ -9,7 +9,7 @@ import { CardSummary, IdentityIcon, styled, SummaryBox } from '@polkadot/react-c import { useApi } from '@polkadot/react-hooks'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface LinkHeader { author: string | null; diff --git a/packages/page-explorer/src/Latency/Chart.tsx b/packages/page-explorer/src/Latency/Chart.tsx index 710871b0d0..fec81a193b 100644 --- a/packages/page-explorer/src/Latency/Chart.tsx +++ b/packages/page-explorer/src/Latency/Chart.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { ChartOptions } from 'chart.js'; -import type { ChartContents } from './types'; +import type { ChartContents } from './types.js'; import React from 'react'; diff --git a/packages/page-explorer/src/Latency/index.tsx b/packages/page-explorer/src/Latency/index.tsx index e6f68bf487..8a7b3c1e64 100644 --- a/packages/page-explorer/src/Latency/index.tsx +++ b/packages/page-explorer/src/Latency/index.tsx @@ -1,16 +1,16 @@ // Copyright 2017-2023 @polkadot/app-explorer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { ChartContents, Detail } from './types'; +import type { ChartContents, Detail } from './types.js'; import React, { useEffect, useMemo, useState } from 'react'; import { CardSummary, NextTick, styled, SummaryBox } from '@polkadot/react-components'; import { formatNumber, nextTick } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Chart from './Chart'; -import useLatency from './useLatency'; +import { useTranslation } from '../translate.js'; +import Chart from './Chart.js'; +import useLatency from './useLatency.js'; interface Props { className?: string; diff --git a/packages/page-explorer/src/Latency/useLatency.ts b/packages/page-explorer/src/Latency/useLatency.ts index 631d4fcc97..09e319ce78 100644 --- a/packages/page-explorer/src/Latency/useLatency.ts +++ b/packages/page-explorer/src/Latency/useLatency.ts @@ -5,7 +5,7 @@ import type { ApiPromise } from '@polkadot/api'; import type { SignedBlockExtended } from '@polkadot/api-derive/types'; import type { GenericExtrinsic, u32 } from '@polkadot/types'; import type { Block } from '@polkadot/types/interfaces'; -import type { Detail, Result } from './types'; +import type { Detail, Result } from './types.js'; import { useEffect, useMemo, useRef, useState } from 'react'; diff --git a/packages/page-explorer/src/Main.tsx b/packages/page-explorer/src/Main.tsx index 4387a1c25e..204df741bb 100644 --- a/packages/page-explorer/src/Main.tsx +++ b/packages/page-explorer/src/Main.tsx @@ -8,10 +8,10 @@ import React from 'react'; import { Columar } from '@polkadot/react-components'; -import BlockHeaders from './BlockHeaders'; -import Events from './Events'; -import Query from './Query'; -import Summary from './Summary'; +import BlockHeaders from './BlockHeaders.js'; +import Events from './Events.js'; +import Query from './Query.js'; +import Summary from './Summary.js'; interface Props { eventCount: number; diff --git a/packages/page-explorer/src/NodeInfo/Peers.tsx b/packages/page-explorer/src/NodeInfo/Peers.tsx index 344a6ffd72..9d1029a27e 100644 --- a/packages/page-explorer/src/NodeInfo/Peers.tsx +++ b/packages/page-explorer/src/NodeInfo/Peers.tsx @@ -8,7 +8,7 @@ import React, { useMemo, useRef } from 'react'; import { styled, Table } from '@polkadot/react-components'; import { formatNumber, stringPascalCase } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-explorer/src/NodeInfo/Summary.tsx b/packages/page-explorer/src/NodeInfo/Summary.tsx index 14ab89f146..2aca24dfc5 100644 --- a/packages/page-explorer/src/NodeInfo/Summary.tsx +++ b/packages/page-explorer/src/NodeInfo/Summary.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-nodeinfo authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Info } from './types'; +import type { Info } from './types.js'; import React, { useEffect, useState } from 'react'; @@ -9,7 +9,7 @@ import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { BestNumber, Elapsed } from '@polkadot/react-query'; import { BN_ZERO, formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { nextRefresh: number; diff --git a/packages/page-explorer/src/NodeInfo/index.tsx b/packages/page-explorer/src/NodeInfo/index.tsx index 72f17665ea..e9d0197dad 100644 --- a/packages/page-explorer/src/NodeInfo/index.tsx +++ b/packages/page-explorer/src/NodeInfo/index.tsx @@ -1,17 +1,17 @@ // Copyright 2017-2023 @polkadot/app-nodeinfo authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Info } from './types'; +import type { Info } from './types.js'; import React, { useEffect, useState } from 'react'; import { ApiPromise } from '@polkadot/api'; import { useApi } from '@polkadot/react-hooks'; -import Extrinsics from '../BlockInfo/Extrinsics'; -import { useTranslation } from '../translate'; -import Peers from './Peers'; -import Summary from './Summary'; +import Extrinsics from '../BlockInfo/Extrinsics.js'; +import { useTranslation } from '../translate.js'; +import Peers from './Peers.js'; +import Summary from './Summary.js'; const POLL_TIMEOUT = 9900; diff --git a/packages/page-explorer/src/Query.tsx b/packages/page-explorer/src/Query.tsx index 9c83a1ecd3..6b73c2dd75 100644 --- a/packages/page-explorer/src/Query.tsx +++ b/packages/page-explorer/src/Query.tsx @@ -6,7 +6,7 @@ import React, { useCallback, useState } from 'react'; import { Button, FilterOverlay, Input, styled } from '@polkadot/react-components'; import { isHex } from '@polkadot/util'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-explorer/src/Summary.tsx b/packages/page-explorer/src/Summary.tsx index 52aa6da574..bbd769da93 100644 --- a/packages/page-explorer/src/Summary.tsx +++ b/packages/page-explorer/src/Summary.tsx @@ -8,8 +8,8 @@ import { useApi } from '@polkadot/react-hooks'; import { BestFinalized, BestNumber, BlockToTime, TimeNow, TotalInactive, TotalIssuance } from '@polkadot/react-query'; import { BN_ONE, formatNumber } from '@polkadot/util'; -import SummarySession from './SummarySession'; -import { useTranslation } from './translate'; +import SummarySession from './SummarySession.js'; +import { useTranslation } from './translate.js'; interface Props { eventCount: number; diff --git a/packages/page-explorer/src/SummarySession.tsx b/packages/page-explorer/src/SummarySession.tsx index ffa9b55703..f26f4bd968 100644 --- a/packages/page-explorer/src/SummarySession.tsx +++ b/packages/page-explorer/src/SummarySession.tsx @@ -11,7 +11,7 @@ import { useApi, useCall } from '@polkadot/react-hooks'; import { Elapsed } from '@polkadot/react-query'; import { BN_THREE, BN_TWO, formatNumber } from '@polkadot/util'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-explorer/src/index.tsx b/packages/page-explorer/src/index.tsx index ecbe8f466f..90c766a865 100644 --- a/packages/page-explorer/src/index.tsx +++ b/packages/page-explorer/src/index.tsx @@ -12,13 +12,13 @@ import { Tabs } from '@polkadot/react-components'; import { useApi, useBlockAuthors, useBlockEvents } from '@polkadot/react-hooks'; import { isFunction } from '@polkadot/util'; -import Api from './Api'; -import BlockInfo from './BlockInfo'; -import Forks from './Forks'; -import Latency from './Latency'; -import Main from './Main'; -import NodeInfo from './NodeInfo'; -import { useTranslation } from './translate'; +import Api from './Api/index.js'; +import BlockInfo from './BlockInfo/index.js'; +import Latency from './Latency/index.js'; +import NodeInfo from './NodeInfo/index.js'; +import Forks from './Forks.js'; +import Main from './Main.js'; +import { useTranslation } from './translate.js'; interface Props { basePath: string; diff --git a/packages/page-extrinsics/src/Decoded.tsx b/packages/page-extrinsics/src/Decoded.tsx index f9009ef602..16bc80bdd0 100644 --- a/packages/page-extrinsics/src/Decoded.tsx +++ b/packages/page-extrinsics/src/Decoded.tsx @@ -11,7 +11,7 @@ import React, { useMemo } from 'react'; import { Columar, Inspect as DecodedInspect, Output, styled } from '@polkadot/react-components'; import { u8aToHex } from '@polkadot/util'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-extrinsics/src/Decoder.tsx b/packages/page-extrinsics/src/Decoder.tsx index fdca966e51..1ad0f12b61 100644 --- a/packages/page-extrinsics/src/Decoder.tsx +++ b/packages/page-extrinsics/src/Decoder.tsx @@ -4,7 +4,7 @@ import type { SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api/types'; import type { Call, ExtrinsicPayload } from '@polkadot/types/interfaces'; import type { HexString } from '@polkadot/util/types'; -import type { DecodedExtrinsic } from './types'; +import type { DecodedExtrinsic } from './types.js'; import React, { useCallback, useState } from 'react'; import { useParams } from 'react-router-dom'; @@ -13,8 +13,8 @@ import { Call as CallDisplay, Input, InputExtrinsic, MarkError, styled } from '@ import { useApi } from '@polkadot/react-hooks'; import { assert, compactToU8a, isHex, u8aConcat, u8aEq } from '@polkadot/util'; -import Decoded from './Decoded'; -import { useTranslation } from './translate'; +import Decoded from './Decoded.js'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-extrinsics/src/Submission.tsx b/packages/page-extrinsics/src/Submission.tsx index 7cf65b76e4..47cfda9ec1 100644 --- a/packages/page-extrinsics/src/Submission.tsx +++ b/packages/page-extrinsics/src/Submission.tsx @@ -3,7 +3,7 @@ import type { SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api/types'; import type { RawParam } from '@polkadot/react-params/types'; -import type { DecodedExtrinsic } from './types'; +import type { DecodedExtrinsic } from './types.js'; import React, { useCallback, useState } from 'react'; @@ -11,8 +11,8 @@ import { Button, Extrinsic, InputAddress, MarkError, TxButton } from '@polkadot/ import { useApi } from '@polkadot/react-hooks'; import { BalanceFree } from '@polkadot/react-query'; -import Decoded from './Decoded'; -import { useTranslation } from './translate'; +import Decoded from './Decoded.js'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-extrinsics/src/index.tsx b/packages/page-extrinsics/src/index.tsx index 50e119e5a5..f4f699309a 100644 --- a/packages/page-extrinsics/src/index.tsx +++ b/packages/page-extrinsics/src/index.tsx @@ -4,16 +4,16 @@ import type { TFunction } from 'i18next'; import type { TabItem } from '@polkadot/react-components/Tabs/types'; import type { AppProps as Props } from '@polkadot/react-components/types'; -import type { DecodedExtrinsic } from './types'; +import type { DecodedExtrinsic } from './types.js'; import React, { useRef, useState } from 'react'; import { Route, Switch } from 'react-router'; import { Tabs } from '@polkadot/react-components'; -import Decoder from './Decoder'; -import Submission from './Submission'; -import { useTranslation } from './translate'; +import Decoder from './Decoder.js'; +import Submission from './Submission.js'; +import { useTranslation } from './translate.js'; function createPathRef (basePath: string): Record { return { diff --git a/packages/page-fellowship/src/index.tsx b/packages/page-fellowship/src/index.tsx index 0a374fb049..38ee56e388 100644 --- a/packages/page-fellowship/src/index.tsx +++ b/packages/page-fellowship/src/index.tsx @@ -5,7 +5,7 @@ import React from 'react'; import Main from '@polkadot/app-ranked/App'; -export { default as useCounter } from './useCounter'; +export { default as useCounter } from './useCounter.js'; interface Props { basePath: string; diff --git a/packages/page-files/src/CrustFiles.tsx b/packages/page-files/src/CrustFiles.tsx index e51efed367..08cd68bfbf 100644 --- a/packages/page-files/src/CrustFiles.tsx +++ b/packages/page-files/src/CrustFiles.tsx @@ -9,10 +9,10 @@ import React, { useCallback, useRef, useState } from 'react'; import { Badge, Button, CopyButton, Icon, styled, Table } from '@polkadot/react-components'; import { useQueue } from '@polkadot/react-hooks'; -import { useFiles } from './hooks'; -import { useTranslation } from './translate'; -import { DirFile, FileInfo, SaveFile } from './types'; -import UploadModal from './UploadModal'; +import { useFiles } from './hooks.js'; +import { useTranslation } from './translate.js'; +import { DirFile, FileInfo, SaveFile } from './types.js'; +import UploadModal from './UploadModal.js'; const MCopyButton = styled(CopyButton)` .copySpan { diff --git a/packages/page-files/src/UploadModal.tsx b/packages/page-files/src/UploadModal.tsx index 31240ab092..add9d798eb 100644 --- a/packages/page-files/src/UploadModal.tsx +++ b/packages/page-files/src/UploadModal.tsx @@ -3,7 +3,7 @@ import type { TFunction } from 'i18next'; import type { Signer } from '@polkadot/api/types'; -import type { AuthIpfsEndpoint } from './types'; +import type { AuthIpfsEndpoint } from './types.js'; import axios, { CancelTokenSource } from 'axios'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; @@ -13,9 +13,9 @@ import { Available, Button, Dropdown, InputAddress, Label, MarkError, Modal, Pas import { keyring } from '@polkadot/ui-keyring'; import { isFunction, nextTick, stringToHex, stringToU8a, u8aToHex } from '@polkadot/util'; -import Progress from './Progress'; -import { useTranslation } from './translate'; -import { DirFile, FileInfo, SaveFile, UploadRes } from './types'; +import Progress from './Progress.js'; +import { useTranslation } from './translate.js'; +import { DirFile, FileInfo, SaveFile, UploadRes } from './types.js'; export interface Props { className?: string; diff --git a/packages/page-files/src/hooks.ts b/packages/page-files/src/hooks.ts index 5595e7054b..15ea6c0a44 100644 --- a/packages/page-files/src/hooks.ts +++ b/packages/page-files/src/hooks.ts @@ -4,7 +4,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import store from 'store'; -import { SaveFile } from './types'; +import { SaveFile } from './types.js'; export interface Files { files: SaveFile[], diff --git a/packages/page-files/src/index.tsx b/packages/page-files/src/index.tsx index 31b30e37e4..8b4537b64a 100644 --- a/packages/page-files/src/index.tsx +++ b/packages/page-files/src/index.tsx @@ -7,8 +7,8 @@ import React, { useRef } from 'react'; import { Tabs } from '@polkadot/react-components'; -import CrustFiles from './CrustFiles'; -import { useTranslation } from './translate'; +import CrustFiles from './CrustFiles.js'; +import { useTranslation } from './translate.js'; interface Props { basePath: string; diff --git a/packages/page-gilt/src/Overview/BidAdd.tsx b/packages/page-gilt/src/Overview/BidAdd.tsx index c52ab62bd9..51873f52bd 100644 --- a/packages/page-gilt/src/Overview/BidAdd.tsx +++ b/packages/page-gilt/src/Overview/BidAdd.tsx @@ -11,7 +11,7 @@ import { useApi, useToggle } from '@polkadot/react-hooks'; import { Available } from '@polkadot/react-query'; import { BN_ONE } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-gilt/src/Overview/Queue.tsx b/packages/page-gilt/src/Overview/Queue.tsx index cff4fd256c..d106ba926f 100644 --- a/packages/page-gilt/src/Overview/Queue.tsx +++ b/packages/page-gilt/src/Overview/Queue.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-gilt authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { QueueTotal } from './types'; +import type { QueueTotal } from './types.js'; import React from 'react'; diff --git a/packages/page-gilt/src/Overview/Queues.tsx b/packages/page-gilt/src/Overview/Queues.tsx index e4dddff5a1..a21e00ee79 100644 --- a/packages/page-gilt/src/Overview/Queues.tsx +++ b/packages/page-gilt/src/Overview/Queues.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-gilt authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { QueueTotal } from './types'; +import type { QueueTotal } from './types.js'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Queue from './Queue'; +import { useTranslation } from '../translate.js'; +import Queue from './Queue.js'; interface Props { className?: string; diff --git a/packages/page-gilt/src/Overview/Summary.tsx b/packages/page-gilt/src/Overview/Summary.tsx index 01bd52b92f..41e98ee1b3 100644 --- a/packages/page-gilt/src/Overview/Summary.tsx +++ b/packages/page-gilt/src/Overview/Summary.tsx @@ -10,7 +10,7 @@ import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { useApi, useBestNumber } from '@polkadot/react-hooks'; import { BN, BN_HUNDRED, BN_QUINTILL, formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { activeTotal?: ActiveGiltsTotal; diff --git a/packages/page-gilt/src/Overview/index.tsx b/packages/page-gilt/src/Overview/index.tsx index e5ed53be89..c68d69d784 100644 --- a/packages/page-gilt/src/Overview/index.tsx +++ b/packages/page-gilt/src/Overview/index.tsx @@ -5,11 +5,11 @@ import React, { useMemo } from 'react'; import { Button } from '@polkadot/react-components'; -import { useProxies } from '../useProxies'; -import BidAdd from './BidAdd'; -import Queues from './Queues'; -import Summary from './Summary'; -import useInfo from './useInfo'; +import { useProxies } from '../useProxies.js'; +import BidAdd from './BidAdd.js'; +import Queues from './Queues.js'; +import Summary from './Summary.js'; +import useInfo from './useInfo.js'; interface Props { className?: string; diff --git a/packages/page-gilt/src/Overview/useInfo.ts b/packages/page-gilt/src/Overview/useInfo.ts index f939934061..db51fe04ea 100644 --- a/packages/page-gilt/src/Overview/useInfo.ts +++ b/packages/page-gilt/src/Overview/useInfo.ts @@ -3,7 +3,7 @@ import type { u32 } from '@polkadot/types'; import type { ActiveGiltsTotal, BalanceOf } from '@polkadot/types/interfaces'; -import type { GiltInfo, QueueTotal } from './types'; +import type { GiltInfo, QueueTotal } from './types.js'; import { useMemo } from 'react'; diff --git a/packages/page-gilt/src/index.tsx b/packages/page-gilt/src/index.tsx index f48f302620..3b75b8ecea 100644 --- a/packages/page-gilt/src/index.tsx +++ b/packages/page-gilt/src/index.tsx @@ -6,8 +6,8 @@ import { Route, Switch } from 'react-router'; import { Tabs } from '@polkadot/react-components'; -import Overview from './Overview'; -import { useTranslation } from './translate'; +import Overview from './Overview/index.js'; +import { useTranslation } from './translate.js'; interface Props { basePath: string; diff --git a/packages/page-js/src/ActionButtons.tsx b/packages/page-js/src/ActionButtons.tsx index 72143f890f..e65cb82df5 100644 --- a/packages/page-js/src/ActionButtons.tsx +++ b/packages/page-js/src/ActionButtons.tsx @@ -5,7 +5,7 @@ import React, { useCallback, useState } from 'react'; import { Button, Input, Popup } from '@polkadot/react-components'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-js/src/Output.tsx b/packages/page-js/src/Output.tsx index c117f70b26..4ec0a351df 100644 --- a/packages/page-js/src/Output.tsx +++ b/packages/page-js/src/Output.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-js authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Log } from './types'; +import type { Log } from './types.js'; import React from 'react'; diff --git a/packages/page-js/src/Playground.tsx b/packages/page-js/src/Playground.tsx index 7a16fc7696..b98c78f44b 100644 --- a/packages/page-js/src/Playground.tsx +++ b/packages/page-js/src/Playground.tsx @@ -5,7 +5,7 @@ import type { ApiPromise } from '@polkadot/api'; import type { KeyringInstance } from '@polkadot/keyring/types'; import type { ApiProps } from '@polkadot/react-api/types'; import type { AppProps as Props } from '@polkadot/react-components/types'; -import type { Log, LogType, Snippet } from './types'; +import type { Log, LogType, Snippet } from './types.js'; import React, { useCallback, useEffect, useRef, useState } from 'react'; @@ -16,12 +16,12 @@ import uiKeyring from '@polkadot/ui-keyring'; import * as util from '@polkadot/util'; import * as hashing from '@polkadot/util-crypto'; -import makeWrapper from './snippets/wrapping'; -import ActionButtons from './ActionButtons'; -import { CUSTOM_LABEL, STORE_EXAMPLES, STORE_SELECTED } from './constants'; -import Output from './Output'; -import allSnippets from './snippets'; -import { useTranslation } from './translate'; +import allSnippets from './snippets/index.js'; +import makeWrapper from './snippets/wrapping.js'; +import ActionButtons from './ActionButtons.js'; +import { CUSTOM_LABEL, STORE_EXAMPLES, STORE_SELECTED } from './constants.js'; +import Output from './Output.js'; +import { useTranslation } from './translate.js'; interface Injected { api: ApiPromise; diff --git a/packages/page-js/src/index.tsx b/packages/page-js/src/index.tsx index b51d4b42af..4cad37d061 100644 --- a/packages/page-js/src/index.tsx +++ b/packages/page-js/src/index.tsx @@ -5,7 +5,7 @@ import type { AppProps as Props } from '@polkadot/react-components/types'; import React from 'react'; -import Playground from './Playground'; +import Playground from './Playground.js'; function JsApp (props: Props): React.ReactElement { return ; diff --git a/packages/page-js/src/snippets/index.ts b/packages/page-js/src/snippets/index.ts index d91d5d62da..0e43bbe62f 100644 --- a/packages/page-js/src/snippets/index.ts +++ b/packages/page-js/src/snippets/index.ts @@ -1,12 +1,12 @@ // Copyright 2017-2023 @polkadot/app-js authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Snippet } from './../types'; +import type { Snippet } from './../types.js'; -import { constsStakingParameters } from './consts-examples'; -import { extrinsicMakeTransfer } from './extrinsics-examples'; -import { rpcNetworkAuthoring, rpcNewHead, rpcQueryState, rpcSysthemInfo } from './rpc-examples'; -import { storageGetInfo, storageKeys, storageListenToBalanceChange, storageListenToMultipleBalancesChange, storageRetrieveInfoOnQueryKeys, storageSystemEvents } from './storage-examples'; +import { constsStakingParameters } from './consts-examples.js'; +import { extrinsicMakeTransfer } from './extrinsics-examples.js'; +import { rpcNetworkAuthoring, rpcNewHead, rpcQueryState, rpcSysthemInfo } from './rpc-examples.js'; +import { storageGetInfo, storageKeys, storageListenToBalanceChange, storageListenToMultipleBalancesChange, storageRetrieveInfoOnQueryKeys, storageSystemEvents } from './storage-examples.js'; const snippets: Snippet[] = [ rpcNetworkAuthoring, diff --git a/packages/page-membership/src/index.tsx b/packages/page-membership/src/index.tsx index dc0a8074c3..0452c0d589 100644 --- a/packages/page-membership/src/index.tsx +++ b/packages/page-membership/src/index.tsx @@ -5,7 +5,7 @@ import React from 'react'; import App from '@polkadot/app-tech-comm/App'; -export { default as useCounter } from './useCounter'; +export { default as useCounter } from './useCounter.js'; interface Props { basePath: string; diff --git a/packages/page-nfts/src/AccountItems/Item.tsx b/packages/page-nfts/src/AccountItems/Item.tsx index 141adee9f4..89201055f4 100644 --- a/packages/page-nfts/src/AccountItems/Item.tsx +++ b/packages/page-nfts/src/AccountItems/Item.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-nfts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { ItemInfo } from './types'; +import type { ItemInfo } from './types.js'; import React from 'react'; diff --git a/packages/page-nfts/src/AccountItems/index.tsx b/packages/page-nfts/src/AccountItems/index.tsx index fc81268237..a4d5b0fdc8 100644 --- a/packages/page-nfts/src/AccountItems/index.tsx +++ b/packages/page-nfts/src/AccountItems/index.tsx @@ -1,17 +1,17 @@ // Copyright 2017-2023 @polkadot/app-nfts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { CollectionInfo, CollectionInfoComplete } from '../types'; +import type { CollectionInfo, CollectionInfoComplete } from '../types.js'; import React, { useEffect, useMemo, useRef, useState } from 'react'; import { Dropdown, styled, Table } from '@polkadot/react-components'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Item from './Item'; -import useAccountItems from './useAccountItems'; -import useItemsInfos from './useItemsInfos'; +import { useTranslation } from '../translate.js'; +import Item from './Item.js'; +import useAccountItems from './useAccountItems.js'; +import useItemsInfos from './useItemsInfos.js'; interface Props { className?: string; diff --git a/packages/page-nfts/src/AccountItems/useAccountItems.ts b/packages/page-nfts/src/AccountItems/useAccountItems.ts index f55ecd844d..c762e154b5 100644 --- a/packages/page-nfts/src/AccountItems/useAccountItems.ts +++ b/packages/page-nfts/src/AccountItems/useAccountItems.ts @@ -3,7 +3,7 @@ import type { StorageKey, u32 } from '@polkadot/types'; import type { AccountId32 } from '@polkadot/types/interfaces'; -import type { AccountItem } from '../types'; +import type { AccountItem } from '../types.js'; import { useEffect, useState } from 'react'; diff --git a/packages/page-nfts/src/AccountItems/useItemsInfos.ts b/packages/page-nfts/src/AccountItems/useItemsInfos.ts index 86ae92306a..0ac659b968 100644 --- a/packages/page-nfts/src/AccountItems/useItemsInfos.ts +++ b/packages/page-nfts/src/AccountItems/useItemsInfos.ts @@ -4,8 +4,8 @@ import type { Option } from '@polkadot/types'; import type { PalletUniquesItemMetadata } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { AccountItem } from '../types'; -import type { ItemInfo, ItemSupportedIpfsData } from './types'; +import type { AccountItem } from '../types.js'; +import type { ItemInfo, ItemSupportedIpfsData } from './types.js'; import { useEffect, useMemo, useState } from 'react'; diff --git a/packages/page-nfts/src/Overview/Collection.tsx b/packages/page-nfts/src/Overview/Collection.tsx index 7bcb734344..d987127745 100644 --- a/packages/page-nfts/src/Overview/Collection.tsx +++ b/packages/page-nfts/src/Overview/Collection.tsx @@ -2,14 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { CollectionInfo } from '../types'; +import type { CollectionInfo } from '../types.js'; import React from 'react'; import { AddressSmall, IconLink, Table } from '@polkadot/react-components'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-nfts/src/Overview/Collections.tsx b/packages/page-nfts/src/Overview/Collections.tsx index 3e6907b767..9c8c681238 100644 --- a/packages/page-nfts/src/Overview/Collections.tsx +++ b/packages/page-nfts/src/Overview/Collections.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-nfts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { CollectionInfo } from '../types'; +import type { CollectionInfo } from '../types.js'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Collection from './Collection'; +import { useTranslation } from '../translate.js'; +import Collection from './Collection.js'; interface Props { className?: string; diff --git a/packages/page-nfts/src/Overview/Summary.tsx b/packages/page-nfts/src/Overview/Summary.tsx index 29ca114680..5c88dce5aa 100644 --- a/packages/page-nfts/src/Overview/Summary.tsx +++ b/packages/page-nfts/src/Overview/Summary.tsx @@ -6,7 +6,7 @@ import React from 'react'; import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-nfts/src/Overview/index.tsx b/packages/page-nfts/src/Overview/index.tsx index b9969df3cc..6ac2e288f6 100644 --- a/packages/page-nfts/src/Overview/index.tsx +++ b/packages/page-nfts/src/Overview/index.tsx @@ -2,12 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { CollectionInfo } from '../types'; +import type { CollectionInfo } from '../types.js'; import React from 'react'; -import Collections from './Collections'; -import Summary from './Summary'; +import Collections from './Collections.js'; +import Summary from './Summary.js'; interface Props { className?: string; diff --git a/packages/page-nfts/src/index.tsx b/packages/page-nfts/src/index.tsx index e401a041f6..4124aedc52 100644 --- a/packages/page-nfts/src/index.tsx +++ b/packages/page-nfts/src/index.tsx @@ -9,11 +9,11 @@ import { Route, Switch } from 'react-router'; import { Tabs } from '@polkadot/react-components'; import { useAccounts } from '@polkadot/react-hooks'; -import AccountItems from './AccountItems'; -import Overview from './Overview'; -import { useTranslation } from './translate'; -import useCollectionIds from './useCollectionIds'; -import useCollectionInfos from './useCollectionInfos'; +import AccountItems from './AccountItems/index.js'; +import Overview from './Overview/index.js'; +import { useTranslation } from './translate.js'; +import useCollectionIds from './useCollectionIds.js'; +import useCollectionInfos from './useCollectionInfos.js'; interface Props { basePath: string; diff --git a/packages/page-nfts/src/useCollectionInfos.ts b/packages/page-nfts/src/useCollectionInfos.ts index 9fc0c44469..b02e5268d9 100644 --- a/packages/page-nfts/src/useCollectionInfos.ts +++ b/packages/page-nfts/src/useCollectionInfos.ts @@ -5,13 +5,13 @@ import type { Option } from '@polkadot/types'; import type { AccountId } from '@polkadot/types/interfaces'; import type { PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { CollectionInfo } from './types'; +import type { CollectionInfo } from './types.js'; import { useEffect, useMemo, useState } from 'react'; import { createNamedHook, useAccounts, useApi, useCall, useIpfsFetch } from '@polkadot/react-hooks'; -import { CollectionSupportedIpfsData } from './types'; +import { CollectionSupportedIpfsData } from './types.js'; type IpfsData = Map; diff --git a/packages/page-parachains/src/Auctions/Auction.tsx b/packages/page-parachains/src/Auctions/Auction.tsx index 9e8f268d9d..ce2467e2ba 100644 --- a/packages/page-parachains/src/Auctions/Auction.tsx +++ b/packages/page-parachains/src/Auctions/Auction.tsx @@ -2,16 +2,16 @@ // SPDX-License-Identifier: Apache-2.0 import type { ParaId } from '@polkadot/types/interfaces'; -import type { AuctionInfo, Campaign, Campaigns, WinnerData, Winning } from '../types'; +import type { AuctionInfo, Campaign, Campaigns, WinnerData, Winning } from '../types.js'; import React, { useCallback, useMemo, useRef } from 'react'; import { Table } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import { useLeaseRangeMax } from '../useLeaseRanges'; -import WinRange from './WinRange'; +import { useTranslation } from '../translate.js'; +import { useLeaseRangeMax } from '../useLeaseRanges.js'; +import WinRange from './WinRange.js'; interface Props { auctionInfo?: AuctionInfo; diff --git a/packages/page-parachains/src/Auctions/Bid.tsx b/packages/page-parachains/src/Auctions/Bid.tsx index 6f2e894e31..547a0c8ebc 100644 --- a/packages/page-parachains/src/Auctions/Bid.tsx +++ b/packages/page-parachains/src/Auctions/Bid.tsx @@ -3,7 +3,7 @@ import type { BlockNumber } from '@polkadot/types/interfaces'; import type { BN } from '@polkadot/util'; -import type { AuctionInfo, OwnedId, OwnerInfo, Winning } from '../types'; +import type { AuctionInfo, OwnedId, OwnerInfo, Winning } from '../types.js'; import React, { useMemo, useState } from 'react'; @@ -11,9 +11,9 @@ import { Button, Dropdown, InputBalance, Modal, TxButton } from '@polkadot/react import { useAccounts, useApi, useBestNumber, useToggle } from '@polkadot/react-hooks'; import { BN_ZERO, formatNumber } from '@polkadot/util'; -import InputOwner from '../InputOwner'; -import { useTranslation } from '../translate'; -import { useLeaseRanges } from '../useLeaseRanges'; +import InputOwner from '../InputOwner.js'; +import { useTranslation } from '../translate.js'; +import { useLeaseRanges } from '../useLeaseRanges.js'; interface Props { auctionInfo?: AuctionInfo; diff --git a/packages/page-parachains/src/Auctions/Summary.tsx b/packages/page-parachains/src/Auctions/Summary.tsx index 4be5443042..f950426c57 100644 --- a/packages/page-parachains/src/Auctions/Summary.tsx +++ b/packages/page-parachains/src/Auctions/Summary.tsx @@ -3,7 +3,7 @@ import type { u32 } from '@polkadot/types'; import type { Balance, BlockNumber } from '@polkadot/types/interfaces'; -import type { AuctionInfo, Winning } from '../types'; +import type { AuctionInfo, Winning } from '../types.js'; import React from 'react'; @@ -12,7 +12,7 @@ import { useApi, useBestNumber, useCall } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; import { BN_ONE, formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { auctionInfo?: AuctionInfo; diff --git a/packages/page-parachains/src/Auctions/WinRange.tsx b/packages/page-parachains/src/Auctions/WinRange.tsx index f41568d74c..cc5fadcd36 100644 --- a/packages/page-parachains/src/Auctions/WinRange.tsx +++ b/packages/page-parachains/src/Auctions/WinRange.tsx @@ -2,14 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { AuctionInfo, WinnerData } from '../types'; +import type { AuctionInfo, WinnerData } from '../types.js'; import React from 'react'; import { AddressMini, ParaLink, Table } from '@polkadot/react-components'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { auctionInfo: AuctionInfo; diff --git a/packages/page-parachains/src/Auctions/index.tsx b/packages/page-parachains/src/Auctions/index.tsx index c145f42735..700ac57163 100644 --- a/packages/page-parachains/src/Auctions/index.tsx +++ b/packages/page-parachains/src/Auctions/index.tsx @@ -1,15 +1,15 @@ // Copyright 2017-2023 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { AuctionInfo, Campaigns, OwnedId, Winning } from '../types'; +import type { AuctionInfo, Campaigns, OwnedId, Winning } from '../types.js'; import React from 'react'; import { Button } from '@polkadot/react-components'; -import Auction from './Auction'; -import Bid from './Bid'; -import Summary from './Summary'; +import Auction from './Auction.js'; +import Bid from './Bid.js'; +import Summary from './Summary.js'; interface Props { auctionInfo?: AuctionInfo; diff --git a/packages/page-parachains/src/Crowdloan/Contribute.tsx b/packages/page-parachains/src/Crowdloan/Contribute.tsx index 33d322cf2e..0e6ca69432 100644 --- a/packages/page-parachains/src/Crowdloan/Contribute.tsx +++ b/packages/page-parachains/src/Crowdloan/Contribute.tsx @@ -11,7 +11,7 @@ import { Button, Input, InputAddress, InputBalance, MarkWarning, Modal, TxButton import { useAccounts, useApi, useToggle } from '@polkadot/react-hooks'; import { formatBalance, isHex } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { cap: Balance; diff --git a/packages/page-parachains/src/Crowdloan/Fund.tsx b/packages/page-parachains/src/Crowdloan/Fund.tsx index 1488e8a47e..c65c10a485 100644 --- a/packages/page-parachains/src/Crowdloan/Fund.tsx +++ b/packages/page-parachains/src/Crowdloan/Fund.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { Campaign, LeasePeriod } from '../types'; +import type { Campaign, LeasePeriod } from '../types.js'; import React, { useEffect, useMemo, useState } from 'react'; @@ -11,10 +11,10 @@ import { useAccounts, useApi, useParaEndpoints } from '@polkadot/react-hooks'; import { BlockToTime, FormatBalance } from '@polkadot/react-query'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Contribute from './Contribute'; -import Refund from './Refund'; -import useContributions from './useContributions'; +import { useTranslation } from '../translate.js'; +import Contribute from './Contribute.js'; +import Refund from './Refund.js'; +import useContributions from './useContributions.js'; interface Props { bestHash?: string; diff --git a/packages/page-parachains/src/Crowdloan/FundAdd.tsx b/packages/page-parachains/src/Crowdloan/FundAdd.tsx index 7eb67c4649..19c7208100 100644 --- a/packages/page-parachains/src/Crowdloan/FundAdd.tsx +++ b/packages/page-parachains/src/Crowdloan/FundAdd.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { AuctionInfo, LeasePeriod, OwnedId, OwnerInfo } from '../types'; +import type { AuctionInfo, LeasePeriod, OwnedId, OwnerInfo } from '../types.js'; import React, { useState } from 'react'; @@ -10,9 +10,9 @@ import { Button, InputBalance, InputNumber, Modal, TxButton } from '@polkadot/re import { useApi, useToggle } from '@polkadot/react-hooks'; import { BN_ONE, BN_ZERO } from '@polkadot/util'; -import InputOwner from '../InputOwner'; -import { useTranslation } from '../translate'; -import { useLeaseRanges } from '../useLeaseRanges'; +import InputOwner from '../InputOwner.js'; +import { useTranslation } from '../translate.js'; +import { useLeaseRanges } from '../useLeaseRanges.js'; interface Props { auctionInfo?: AuctionInfo; diff --git a/packages/page-parachains/src/Crowdloan/Funds.tsx b/packages/page-parachains/src/Crowdloan/Funds.tsx index bfe386d9d6..c3dc2c93a6 100644 --- a/packages/page-parachains/src/Crowdloan/Funds.tsx +++ b/packages/page-parachains/src/Crowdloan/Funds.tsx @@ -3,15 +3,15 @@ import type { ParaId } from '@polkadot/types/interfaces'; import type { BN } from '@polkadot/util'; -import type { Campaign, LeasePeriod } from '../types'; +import type { Campaign, LeasePeriod } from '../types.js'; import React, { useMemo, useRef } from 'react'; import { MarkWarning, Table } from '@polkadot/react-components'; import { useBestHash, useIsParasLinked } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import Fund from './Fund'; +import { useTranslation } from '../translate.js'; +import Fund from './Fund.js'; interface Props { bestNumber?: BN; diff --git a/packages/page-parachains/src/Crowdloan/Refund.tsx b/packages/page-parachains/src/Crowdloan/Refund.tsx index c8ab9f2121..3ca1e8560d 100644 --- a/packages/page-parachains/src/Crowdloan/Refund.tsx +++ b/packages/page-parachains/src/Crowdloan/Refund.tsx @@ -8,7 +8,7 @@ import React, { useState } from 'react'; import { Button, InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useAccounts, useApi, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-parachains/src/Crowdloan/Summary.tsx b/packages/page-parachains/src/Crowdloan/Summary.tsx index a1de62b537..9291517da7 100644 --- a/packages/page-parachains/src/Crowdloan/Summary.tsx +++ b/packages/page-parachains/src/Crowdloan/Summary.tsx @@ -9,7 +9,7 @@ import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { FormatBalance } from '@polkadot/react-query'; import { BN_THREE, BN_TWO, formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { activeCap: BN; diff --git a/packages/page-parachains/src/Crowdloan/index.tsx b/packages/page-parachains/src/Crowdloan/index.tsx index 236c85cd19..d8c7e669c7 100644 --- a/packages/page-parachains/src/Crowdloan/index.tsx +++ b/packages/page-parachains/src/Crowdloan/index.tsx @@ -1,16 +1,16 @@ // Copyright 2017-2023 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { AuctionInfo, Campaigns, LeasePeriod, OwnedId } from '../types'; +import type { AuctionInfo, Campaigns, LeasePeriod, OwnedId } from '../types.js'; import React from 'react'; import { Button } from '@polkadot/react-components'; import { useBestNumber } from '@polkadot/react-hooks'; -import FundAdd from './FundAdd'; -import Funds from './Funds'; -import Summary from './Summary'; +import FundAdd from './FundAdd.js'; +import Funds from './Funds.js'; +import Summary from './Summary.js'; interface Props { auctionInfo?: AuctionInfo; diff --git a/packages/page-parachains/src/InputOwner.tsx b/packages/page-parachains/src/InputOwner.tsx index 5cf34aa098..1e33f789b1 100644 --- a/packages/page-parachains/src/InputOwner.tsx +++ b/packages/page-parachains/src/InputOwner.tsx @@ -1,13 +1,13 @@ // Copyright 2017-2023 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { OwnedId, OwnerInfo } from './types'; +import type { OwnedId, OwnerInfo } from './types.js'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { Dropdown, InputAddress, MarkError, Modal } from '@polkadot/react-components'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface Props { noCodeCheck?: boolean; diff --git a/packages/page-parachains/src/Overview/LeaseBlocks.tsx b/packages/page-parachains/src/Overview/LeaseBlocks.tsx index 83f013cfd5..72b3e5dc31 100644 --- a/packages/page-parachains/src/Overview/LeaseBlocks.tsx +++ b/packages/page-parachains/src/Overview/LeaseBlocks.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { LeasePeriod } from '../types'; +import type { LeasePeriod } from '../types.js'; import React, { useMemo } from 'react'; diff --git a/packages/page-parachains/src/Overview/Lifecycle.tsx b/packages/page-parachains/src/Overview/Lifecycle.tsx index 365984cd26..f6bd68bf0e 100644 --- a/packages/page-parachains/src/Overview/Lifecycle.tsx +++ b/packages/page-parachains/src/Overview/Lifecycle.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { PolkadotRuntimeParachainsParasParaLifecycle } from '@polkadot/types/lookup'; -import type { QueuedAction } from '../types'; +import type { QueuedAction } from '../types.js'; import React from 'react'; diff --git a/packages/page-parachains/src/Overview/Parachain.tsx b/packages/page-parachains/src/Overview/Parachain.tsx index 9791bc737e..ef842921e7 100644 --- a/packages/page-parachains/src/Overview/Parachain.tsx +++ b/packages/page-parachains/src/Overview/Parachain.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 import type { AccountId, GroupIndex, ParaId } from '@polkadot/types/interfaces'; -import type { LeasePeriod, QueuedAction } from '../types'; -import type { EventMapInfo, ValidatorInfo } from './types'; +import type { LeasePeriod, QueuedAction } from '../types.js'; +import type { EventMapInfo, ValidatorInfo } from './types.js'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; @@ -11,11 +11,11 @@ import { AddressMini, Badge, Expander, ParaLink, styled, Table } from '@polkadot import { BlockToTime } from '@polkadot/react-query'; import { BN, formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Lifecycle from './Lifecycle'; -import ParachainInfo from './ParachainInfo'; -import Periods from './Periods'; -import useParaInfo from './useParaInfo'; +import { useTranslation } from '../translate.js'; +import Lifecycle from './Lifecycle.js'; +import ParachainInfo from './ParachainInfo.js'; +import Periods from './Periods.js'; +import useParaInfo from './useParaInfo.js'; interface Props { bestNumber?: BN; diff --git a/packages/page-parachains/src/Overview/ParachainInfo.tsx b/packages/page-parachains/src/Overview/ParachainInfo.tsx index 79b7df5937..2d673c164d 100644 --- a/packages/page-parachains/src/Overview/ParachainInfo.tsx +++ b/packages/page-parachains/src/Overview/ParachainInfo.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { styled } from '@polkadot/react-components'; import { formatNumber } from '@polkadot/util'; -import useChainDetails from './useChainDetails'; +import useChainDetails from './useChainDetails.js'; interface Props { className?: string; diff --git a/packages/page-parachains/src/Overview/Parachains.tsx b/packages/page-parachains/src/Overview/Parachains.tsx index e12ae3d989..d0e26bb2fa 100644 --- a/packages/page-parachains/src/Overview/Parachains.tsx +++ b/packages/page-parachains/src/Overview/Parachains.tsx @@ -2,17 +2,17 @@ // SPDX-License-Identifier: Apache-2.0 import type { ParaId } from '@polkadot/types/interfaces'; -import type { LeasePeriod, QueuedAction, ScheduledProposals } from '../types'; +import type { LeasePeriod, QueuedAction, ScheduledProposals } from '../types.js'; import React, { useMemo, useRef } from 'react'; import { Table } from '@polkadot/react-components'; import { useBestNumber, useIsParasLinked } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import Parachain from './Parachain'; -import useEvents from './useEvents'; -import useValidators from './useValidators'; +import { useTranslation } from '../translate.js'; +import Parachain from './Parachain.js'; +import useEvents from './useEvents.js'; +import useValidators from './useValidators.js'; interface Props { actionsQueue: QueuedAction[]; diff --git a/packages/page-parachains/src/Overview/Periods.tsx b/packages/page-parachains/src/Overview/Periods.tsx index b1a7cebadf..295baa8256 100644 --- a/packages/page-parachains/src/Overview/Periods.tsx +++ b/packages/page-parachains/src/Overview/Periods.tsx @@ -2,13 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { LeasePeriod } from '../types'; +import type { LeasePeriod } from '../types.js'; import React, { useMemo } from 'react'; import { BN_ONE, formatNumber } from '@polkadot/util'; -import LeaseBlocks from './LeaseBlocks'; +import LeaseBlocks from './LeaseBlocks.js'; interface Props { className?: string; diff --git a/packages/page-parachains/src/Overview/Summary.tsx b/packages/page-parachains/src/Overview/Summary.tsx index 2980ad3109..a7525dc8d7 100644 --- a/packages/page-parachains/src/Overview/Summary.tsx +++ b/packages/page-parachains/src/Overview/Summary.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { LeasePeriod } from '../types'; +import type { LeasePeriod } from '../types.js'; import React from 'react'; @@ -10,7 +10,7 @@ import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { BestFinalized } from '@polkadot/react-query'; import { BN_THREE, BN_TWO, formatNumber, isNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { leasePeriod?: LeasePeriod; diff --git a/packages/page-parachains/src/Overview/index.tsx b/packages/page-parachains/src/Overview/index.tsx index 5f97c59bcd..cbecb4ce40 100644 --- a/packages/page-parachains/src/Overview/index.tsx +++ b/packages/page-parachains/src/Overview/index.tsx @@ -2,12 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 import type { ParaId } from '@polkadot/types/interfaces'; -import type { LeasePeriod, Proposals, QueuedAction } from '../types'; +import type { LeasePeriod, Proposals, QueuedAction } from '../types.js'; import React from 'react'; -import Parachains from './Parachains'; -import Summary from './Summary'; +import Parachains from './Parachains.js'; +import Summary from './Summary.js'; interface Props { actionsQueue: QueuedAction[]; diff --git a/packages/page-parachains/src/Overview/useEvents.ts b/packages/page-parachains/src/Overview/useEvents.ts index 9a934f38dd..69b8b270bc 100644 --- a/packages/page-parachains/src/Overview/useEvents.ts +++ b/packages/page-parachains/src/Overview/useEvents.ts @@ -7,7 +7,7 @@ import type { Event } from '@polkadot/types/interfaces'; import type { PolkadotPrimitivesV2CandidateReceipt } from '@polkadot/types/lookup'; import type { IEvent } from '@polkadot/types/types'; import type { BN } from '@polkadot/util'; -import type { EventMapInfo } from './types'; +import type { EventMapInfo } from './types.js'; import { useEffect, useState } from 'react'; diff --git a/packages/page-parachains/src/Overview/useValidators.ts b/packages/page-parachains/src/Overview/useValidators.ts index 35d9bbc6df..a3142d67e6 100644 --- a/packages/page-parachains/src/Overview/useValidators.ts +++ b/packages/page-parachains/src/Overview/useValidators.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { AccountId, CoreAssignment, GroupIndex, ParaId, ParaValidatorIndex } from '@polkadot/types/interfaces'; -import type { ValidatorInfo } from './types'; +import type { ValidatorInfo } from './types.js'; import { useEffect, useMemo, useState } from 'react'; diff --git a/packages/page-parachains/src/Parathreads/Actions.tsx b/packages/page-parachains/src/Parathreads/Actions.tsx index 1227b3bb1c..5da2c7495c 100644 --- a/packages/page-parachains/src/Parathreads/Actions.tsx +++ b/packages/page-parachains/src/Parathreads/Actions.tsx @@ -3,17 +3,17 @@ import type { ParaId } from '@polkadot/types/interfaces'; import type { BN } from '@polkadot/util'; -import type { OwnedId } from '../types'; +import type { OwnedId } from '../types.js'; import React from 'react'; import { Button } from '@polkadot/react-components'; import { useApi, useCall, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import { LOWEST_PUBLIC_ID } from './constants'; -import RegisterId from './RegisterId'; -import RegisterThread from './RegisterThread'; +import { useTranslation } from '../translate.js'; +import { LOWEST_PUBLIC_ID } from './constants.js'; +import RegisterId from './RegisterId.js'; +import RegisterThread from './RegisterThread.js'; interface Props { className?: string; diff --git a/packages/page-parachains/src/Parathreads/Parathread.tsx b/packages/page-parachains/src/Parathreads/Parathread.tsx index bee44c8eac..06bd5b56d3 100644 --- a/packages/page-parachains/src/Parathreads/Parathread.tsx +++ b/packages/page-parachains/src/Parathreads/Parathread.tsx @@ -2,18 +2,18 @@ // SPDX-License-Identifier: Apache-2.0 import type { ParaId } from '@polkadot/types/interfaces'; -import type { LeaseInfo, LeasePeriod, QueuedAction } from '../types'; +import type { LeaseInfo, LeasePeriod, QueuedAction } from '../types.js'; import React, { useMemo } from 'react'; import { AddressSmall, ParaLink, Table, TxButton } from '@polkadot/react-components'; import { useAccounts, useApi } from '@polkadot/react-hooks'; -import Lifecycle from '../Overview/Lifecycle'; -// import ParachainInfo from '../Overview/ParachainInfo'; -import Periods from '../Overview/Periods'; -import { useTranslation } from '../translate'; -import useThreadInfo from './useThreadInfo'; +import Lifecycle from '../Overview/Lifecycle.js'; +// import ParachainInfo from '../Overview/ParachainInfo.js'; +import Periods from '../Overview/Periods.js'; +import { useTranslation } from '../translate.js'; +import useThreadInfo from './useThreadInfo.js'; interface Props { id: ParaId; diff --git a/packages/page-parachains/src/Parathreads/RegisterId.tsx b/packages/page-parachains/src/Parathreads/RegisterId.tsx index 3b01c30e07..154d04ab6f 100644 --- a/packages/page-parachains/src/Parathreads/RegisterId.tsx +++ b/packages/page-parachains/src/Parathreads/RegisterId.tsx @@ -9,7 +9,7 @@ import React, { useState } from 'react'; import { InputAddress, InputBalance, InputNumber, Modal, TxButton } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-parachains/src/Parathreads/RegisterThread.tsx b/packages/page-parachains/src/Parathreads/RegisterThread.tsx index a4a5029c73..e8567daabb 100644 --- a/packages/page-parachains/src/Parathreads/RegisterThread.tsx +++ b/packages/page-parachains/src/Parathreads/RegisterThread.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { BalanceOf } from '@polkadot/types/interfaces'; -import type { OwnedId, OwnerInfo } from '../types'; +import type { OwnedId, OwnerInfo } from '../types.js'; import React, { useCallback, useMemo, useState } from 'react'; @@ -10,9 +10,9 @@ import { InputAddress, InputBalance, InputFile, InputNumber, Modal, TxButton } f import { useApi } from '@polkadot/react-hooks'; import { BN, compactAddLength } from '@polkadot/util'; -import InputOwner from '../InputOwner'; -import { useTranslation } from '../translate'; -import { LOWEST_INVALID_ID } from './constants'; +import InputOwner from '../InputOwner.js'; +import { useTranslation } from '../translate.js'; +import { LOWEST_INVALID_ID } from './constants.js'; interface Props { className?: string; diff --git a/packages/page-parachains/src/Parathreads/index.tsx b/packages/page-parachains/src/Parathreads/index.tsx index 86c65df5bd..ba11fcb959 100644 --- a/packages/page-parachains/src/Parathreads/index.tsx +++ b/packages/page-parachains/src/Parathreads/index.tsx @@ -2,16 +2,16 @@ // SPDX-License-Identifier: Apache-2.0 import type { ParaId } from '@polkadot/types/interfaces'; -import type { LeasePeriod, OwnedId, QueuedAction } from '../types'; +import type { LeasePeriod, OwnedId, QueuedAction } from '../types.js'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Actions from './Actions'; -import Parathread from './Parathread'; -import useParaMap from './useParaMap'; +import { useTranslation } from '../translate.js'; +import Actions from './Actions.js'; +import Parathread from './Parathread.js'; +import useParaMap from './useParaMap.js'; interface Props { actionsQueue: QueuedAction[]; diff --git a/packages/page-parachains/src/Parathreads/useParaMap.ts b/packages/page-parachains/src/Parathreads/useParaMap.ts index 0b1923c7ee..8ebe89a72f 100644 --- a/packages/page-parachains/src/Parathreads/useParaMap.ts +++ b/packages/page-parachains/src/Parathreads/useParaMap.ts @@ -4,7 +4,7 @@ import type { Option } from '@polkadot/types'; import type { AccountId, BalanceOf, ParaId } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; -import type { LeaseInfo } from '../types'; +import type { LeaseInfo } from '../types.js'; import { useCallback } from 'react'; diff --git a/packages/page-parachains/src/Proposals/Actions.tsx b/packages/page-parachains/src/Proposals/Actions.tsx index e2c90458c1..afebea807c 100644 --- a/packages/page-parachains/src/Proposals/Actions.tsx +++ b/packages/page-parachains/src/Proposals/Actions.tsx @@ -6,8 +6,8 @@ import React from 'react'; import { Button } from '@polkadot/react-components'; import { useAccounts, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import Propose from './Propose'; +import { useTranslation } from '../translate.js'; +import Propose from './Propose.js'; interface Props { className?: string; diff --git a/packages/page-parachains/src/Proposals/Proposal.tsx b/packages/page-parachains/src/Proposals/Proposal.tsx index 94132532c5..53b1383673 100644 --- a/packages/page-parachains/src/Proposals/Proposal.tsx +++ b/packages/page-parachains/src/Proposals/Proposal.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { ParaId } from '@polkadot/types/interfaces'; -import type { ScheduledProposals } from '../types'; +import type { ScheduledProposals } from '../types.js'; import React, { useCallback, useMemo } from 'react'; @@ -11,9 +11,9 @@ import { useAccounts, useApi, useSudo } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import { sliceHex } from '../util'; -import useProposal from './useProposal'; +import { useTranslation } from '../translate.js'; +import { sliceHex } from '../util.js'; +import useProposal from './useProposal.js'; interface Props { approvedIds: ParaId[]; diff --git a/packages/page-parachains/src/Proposals/Proposals.tsx b/packages/page-parachains/src/Proposals/Proposals.tsx index 4387ab6f9f..c800de129e 100644 --- a/packages/page-parachains/src/Proposals/Proposals.tsx +++ b/packages/page-parachains/src/Proposals/Proposals.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Proposals as UseProposals } from '../types'; +import type { Proposals as UseProposals } from '../types.js'; import React, { useMemo, useRef } from 'react'; import { Table } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Proposal from './Proposal'; +import { useTranslation } from '../translate.js'; +import Proposal from './Proposal.js'; interface Props { proposals?: UseProposals; diff --git a/packages/page-parachains/src/Proposals/Propose.tsx b/packages/page-parachains/src/Proposals/Propose.tsx index 0eb1d91f29..ef77b200dd 100644 --- a/packages/page-parachains/src/Proposals/Propose.tsx +++ b/packages/page-parachains/src/Proposals/Propose.tsx @@ -9,7 +9,7 @@ import { Button, Input, InputAddress, InputBalance, InputFile, InputNumber, Inpu import { useApi } from '@polkadot/react-hooks'; import { BN, BN_TEN, BN_THOUSAND, BN_ZERO, compactAddLength } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-parachains/src/Proposals/index.tsx b/packages/page-parachains/src/Proposals/index.tsx index 78e3563ca5..b97f2ad49b 100644 --- a/packages/page-parachains/src/Proposals/index.tsx +++ b/packages/page-parachains/src/Proposals/index.tsx @@ -1,12 +1,12 @@ // Copyright 2017-2023 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Proposals } from '../types'; +import type { Proposals } from '../types.js'; import React from 'react'; -import Actions from './Actions'; -import ProposalList from './Proposals'; +import Actions from './Actions.js'; +import ProposalList from './Proposals.js'; interface Props { className?: string; diff --git a/packages/page-parachains/src/Proposals/useProposal.ts b/packages/page-parachains/src/Proposals/useProposal.ts index ffac41f916..37a2a8662d 100644 --- a/packages/page-parachains/src/Proposals/useProposal.ts +++ b/packages/page-parachains/src/Proposals/useProposal.ts @@ -3,7 +3,7 @@ import type { Option } from '@polkadot/types'; import type { ParachainProposal, ParaId } from '@polkadot/types/interfaces'; -import type { ProposalExt, ScheduledProposals } from '../types'; +import type { ProposalExt, ScheduledProposals } from '../types.js'; import { useMemo } from 'react'; diff --git a/packages/page-parachains/src/Teleport.tsx b/packages/page-parachains/src/Teleport.tsx index f48f89daaf..25092a3dd4 100644 --- a/packages/page-parachains/src/Teleport.tsx +++ b/packages/page-parachains/src/Teleport.tsx @@ -13,7 +13,7 @@ import { useApi, useApiUrl, useTeleport } from '@polkadot/react-hooks'; import { Available } from '@polkadot/react-query'; import { BN_ZERO, isFunction } from '@polkadot/util'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface Props { onClose: () => void; diff --git a/packages/page-parachains/src/index.tsx b/packages/page-parachains/src/index.tsx index 9c7b037f8f..36dd992a70 100644 --- a/packages/page-parachains/src/index.tsx +++ b/packages/page-parachains/src/index.tsx @@ -12,20 +12,20 @@ import { useLocation } from 'react-router-dom'; import { Tabs } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import Auctions from './Auctions'; -import Crowdloan from './Crowdloan'; -import Overview from './Overview'; -import Parathreads from './Parathreads'; -import Proposals from './Proposals'; -import { useTranslation } from './translate'; -import useActionsQueue from './useActionsQueue'; -import useAuctionInfo from './useAuctionInfo'; -import useFunds from './useFunds'; -import useLeasePeriod from './useLeasePeriod'; -import useOwnedIds from './useOwnedIds'; -import useProposals from './useProposals'; -import useUpcomingIds from './useUpcomingIds'; -import useWinningData from './useWinningData'; +import Auctions from './Auctions/index.js'; +import Crowdloan from './Crowdloan/index.js'; +import Overview from './Overview/index.js'; +import Parathreads from './Parathreads/index.js'; +import Proposals from './Proposals/index.js'; +import { useTranslation } from './translate.js'; +import useActionsQueue from './useActionsQueue.js'; +import useAuctionInfo from './useAuctionInfo.js'; +import useFunds from './useFunds.js'; +import useLeasePeriod from './useLeasePeriod.js'; +import useOwnedIds from './useOwnedIds.js'; +import useProposals from './useProposals.js'; +import useUpcomingIds from './useUpcomingIds.js'; +import useWinningData from './useWinningData.js'; interface Props { basePath: string; diff --git a/packages/page-parachains/src/useActionsQueue.ts b/packages/page-parachains/src/useActionsQueue.ts index 75700fc2a5..10ca439e55 100644 --- a/packages/page-parachains/src/useActionsQueue.ts +++ b/packages/page-parachains/src/useActionsQueue.ts @@ -3,7 +3,7 @@ import type { ParaId, SessionIndex } from '@polkadot/types/interfaces'; import type { BN } from '@polkadot/util'; -import type { QueuedAction } from './types'; +import type { QueuedAction } from './types.js'; import { useMemo } from 'react'; diff --git a/packages/page-parachains/src/useAuctionInfo.tsx b/packages/page-parachains/src/useAuctionInfo.tsx index 280e4111b3..729041ce4d 100644 --- a/packages/page-parachains/src/useAuctionInfo.tsx +++ b/packages/page-parachains/src/useAuctionInfo.tsx @@ -4,7 +4,7 @@ import type { Option } from '@polkadot/types'; import type { AuctionIndex, BlockNumber, LeasePeriodOf } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; -import type { AuctionInfo } from './types'; +import type { AuctionInfo } from './types.js'; import { createNamedHook, useApi, useCallMulti } from '@polkadot/react-hooks'; diff --git a/packages/page-parachains/src/useFunds.ts b/packages/page-parachains/src/useFunds.ts index 110d860875..ebe177915b 100644 --- a/packages/page-parachains/src/useFunds.ts +++ b/packages/page-parachains/src/useFunds.ts @@ -5,7 +5,7 @@ import type { Option, StorageKey } from '@polkadot/types'; import type { AccountId, BalanceOf, BlockNumber, ParaId } from '@polkadot/types/interfaces'; import type { PolkadotRuntimeCommonCrowdloanFundInfo } from '@polkadot/types/lookup'; import type { INumber, ITuple } from '@polkadot/types/types'; -import type { Campaign, Campaigns } from './types'; +import type { Campaign, Campaigns } from './types.js'; import { useEffect, useState } from 'react'; @@ -13,7 +13,7 @@ import { createNamedHook, useApi, useBestNumber, useCall, useEventTrigger, useIs import { BN, BN_ZERO, u8aConcat, u8aEq } from '@polkadot/util'; import { encodeAddress } from '@polkadot/util-crypto'; -import { CROWD_PREFIX } from './constants'; +import { CROWD_PREFIX } from './constants.js'; const EMPTY: Campaigns = { activeCap: BN_ZERO, diff --git a/packages/page-parachains/src/useLeasePeriod.ts b/packages/page-parachains/src/useLeasePeriod.ts index f6f6104e49..7d8dece018 100644 --- a/packages/page-parachains/src/useLeasePeriod.ts +++ b/packages/page-parachains/src/useLeasePeriod.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { BlockNumber } from '@polkadot/types/interfaces'; -import type { LeasePeriod } from './types'; +import type { LeasePeriod } from './types.js'; import { useMemo } from 'react'; diff --git a/packages/page-parachains/src/useOwnedIds.ts b/packages/page-parachains/src/useOwnedIds.ts index 36e451012e..52eb5cae53 100644 --- a/packages/page-parachains/src/useOwnedIds.ts +++ b/packages/page-parachains/src/useOwnedIds.ts @@ -4,7 +4,7 @@ import type { Option, StorageKey } from '@polkadot/types'; import type { Hash, ParaId } from '@polkadot/types/interfaces'; import type { PolkadotRuntimeCommonParasRegistrarParaInfo } from '@polkadot/types/lookup'; -import type { OwnedId, OwnedIdPartial } from './types'; +import type { OwnedId, OwnedIdPartial } from './types.js'; import { useMemo } from 'react'; diff --git a/packages/page-parachains/src/useProposals.ts b/packages/page-parachains/src/useProposals.ts index cf2046b9fb..cae37647d4 100644 --- a/packages/page-parachains/src/useProposals.ts +++ b/packages/page-parachains/src/useProposals.ts @@ -3,7 +3,7 @@ import type { StorageKey } from '@polkadot/types'; import type { ParaId, SessionIndex } from '@polkadot/types/interfaces'; -import type { Proposals } from './types'; +import type { Proposals } from './types.js'; import { useMemo } from 'react'; diff --git a/packages/page-parachains/src/useWinningData.ts b/packages/page-parachains/src/useWinningData.ts index b66cf0436d..c06d6ce7bc 100644 --- a/packages/page-parachains/src/useWinningData.ts +++ b/packages/page-parachains/src/useWinningData.ts @@ -3,15 +3,15 @@ import type { Option, StorageKey } from '@polkadot/types'; import type { BlockNumber, WinningData } from '@polkadot/types/interfaces'; -import type { AuctionInfo, WinnerData, Winning } from './types'; +import type { AuctionInfo, WinnerData, Winning } from './types.js'; import { useEffect, useRef, useState } from 'react'; import { createNamedHook, useApi, useBestNumber, useCall, useEventTrigger, useIsMountedRef } from '@polkadot/react-hooks'; import { BN, BN_ONE, BN_ZERO, u8aEq } from '@polkadot/util'; -import { CROWD_PREFIX } from './constants'; -import { useLeaseRanges } from './useLeaseRanges'; +import { CROWD_PREFIX } from './constants.js'; +import { useLeaseRanges } from './useLeaseRanges.js'; const FIRST_PARAM = [0]; diff --git a/packages/page-poll/src/index.tsx b/packages/page-poll/src/index.tsx index 429cd859a8..afdaeff8ea 100644 --- a/packages/page-poll/src/index.tsx +++ b/packages/page-poll/src/index.tsx @@ -12,7 +12,7 @@ import { useApi, useBestNumber, useCallMulti } from '@polkadot/react-hooks'; import { BlockToTime, FormatBalance } from '@polkadot/react-query'; import { BN, BN_MILLION, BN_ONE, BN_ZERO, bnMax, formatBalance, formatNumber } from '@polkadot/util'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface Props { basePath: string; diff --git a/packages/page-preimages/src/Preimages/Add/Partial.tsx b/packages/page-preimages/src/Preimages/Add/Partial.tsx index f7502384d6..341eaacd06 100644 --- a/packages/page-preimages/src/Preimages/Add/Partial.tsx +++ b/packages/page-preimages/src/Preimages/Add/Partial.tsx @@ -5,7 +5,7 @@ import type { ApiPromise } from '@polkadot/api'; import type { SubmittableExtrinsic } from '@polkadot/api/types'; import type { BN } from '@polkadot/util'; import type { HexString } from '@polkadot/util/types'; -import type { HashState } from './types'; +import type { HashState } from './types.js'; import React, { useCallback, useState } from 'react'; @@ -14,7 +14,7 @@ import { useApi } from '@polkadot/react-hooks'; import { BN_ZERO } from '@polkadot/util'; import { blake2AsHex } from '@polkadot/util-crypto'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props { className?: string; diff --git a/packages/page-preimages/src/Preimages/Add/index.tsx b/packages/page-preimages/src/Preimages/Add/index.tsx index f0821f5ccb..602f2a4ef5 100644 --- a/packages/page-preimages/src/Preimages/Add/index.tsx +++ b/packages/page-preimages/src/Preimages/Add/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-preimages authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { HashState } from './types'; +import type { HashState } from './types.js'; import React, { useState } from 'react'; @@ -9,8 +9,8 @@ import { Button, InputAddress, Modal, TxButton } from '@polkadot/react-component import { useToggle } from '@polkadot/react-hooks'; import { Available } from '@polkadot/react-query'; -import { useTranslation } from '../../translate'; -import Proposal, { EMPTY_PROPOSAL } from './Partial'; +import { useTranslation } from '../../translate.js'; +import Proposal, { EMPTY_PROPOSAL } from './Partial.js'; interface Props { className?: string; diff --git a/packages/page-preimages/src/Preimages/Call.tsx b/packages/page-preimages/src/Preimages/Call.tsx index fa83fbfa2d..8ac07cc2f5 100644 --- a/packages/page-preimages/src/Preimages/Call.tsx +++ b/packages/page-preimages/src/Preimages/Call.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { AddressMini, CallExpander, MarkError, MarkWarning } from '@polkadot/react-components'; import { ZERO_ACCOUNT } from '@polkadot/react-hooks/useWeight'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-preimages/src/Preimages/Free.tsx b/packages/page-preimages/src/Preimages/Free.tsx index f15c51a3ba..dbe63725d9 100644 --- a/packages/page-preimages/src/Preimages/Free.tsx +++ b/packages/page-preimages/src/Preimages/Free.tsx @@ -8,7 +8,7 @@ import React, { useMemo } from 'react'; import { TxButton } from '@polkadot/react-components'; import { useAccounts, useApi } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-preimages/src/Preimages/Preimage.tsx b/packages/page-preimages/src/Preimages/Preimage.tsx index b36ff3a4b5..ac876facfe 100644 --- a/packages/page-preimages/src/Preimages/Preimage.tsx +++ b/packages/page-preimages/src/Preimages/Preimage.tsx @@ -8,9 +8,9 @@ import React from 'react'; import { usePreimage } from '@polkadot/react-hooks'; import { formatNumber } from '@polkadot/util'; -import Call from './Call'; -import Free from './Free'; -import Hash from './Hash'; +import Call from './Call.js'; +import Free from './Free.js'; +import Hash from './Hash.js'; interface Props { className?: string; diff --git a/packages/page-preimages/src/Preimages/Summary.tsx b/packages/page-preimages/src/Preimages/Summary.tsx index 69539af6e3..6a7638905c 100644 --- a/packages/page-preimages/src/Preimages/Summary.tsx +++ b/packages/page-preimages/src/Preimages/Summary.tsx @@ -6,7 +6,7 @@ import React from 'react'; import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-preimages/src/Preimages/index.tsx b/packages/page-preimages/src/Preimages/index.tsx index efec98ef03..d746c1acab 100644 --- a/packages/page-preimages/src/Preimages/index.tsx +++ b/packages/page-preimages/src/Preimages/index.tsx @@ -7,11 +7,11 @@ import React, { useRef } from 'react'; import { Button, styled, Table } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import usePreimages from '../usePreimages'; -import Add from './Add'; -import Preimage from './Preimage'; -import Summary from './Summary'; +import { useTranslation } from '../translate.js'; +import usePreimages from '../usePreimages.js'; +import Add from './Add/index.js'; +import Preimage from './Preimage.js'; +import Summary from './Summary.js'; interface Props { className?: string; diff --git a/packages/page-preimages/src/index.tsx b/packages/page-preimages/src/index.tsx index 0afa4bd00b..b44d50eb90 100644 --- a/packages/page-preimages/src/index.tsx +++ b/packages/page-preimages/src/index.tsx @@ -5,8 +5,8 @@ import React, { useRef } from 'react'; import { Tabs } from '@polkadot/react-components'; -import Preimages from './Preimages'; -import { useTranslation } from './translate'; +import Preimages from './Preimages/index.js'; +import { useTranslation } from './translate.js'; interface Props { basePath: string; diff --git a/packages/page-ranked/src/App.tsx b/packages/page-ranked/src/App.tsx index d59cc3f96c..98278016be 100644 --- a/packages/page-ranked/src/App.tsx +++ b/packages/page-ranked/src/App.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-ranked authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { PalletColl, PalletPoll } from './types'; +import type { PalletColl, PalletPoll } from './types.js'; import React, { useMemo } from 'react'; import { Route, Switch } from 'react-router'; @@ -9,9 +9,9 @@ import { Route, Switch } from 'react-router'; import Referenda, { useCounter } from '@polkadot/app-referenda/Referenda'; import { Tabs } from '@polkadot/react-components'; -import Members from './Members'; -import { useTranslation } from './translate'; -import useMembers from './useMembers'; +import Members from './Members/index.js'; +import { useTranslation } from './translate.js'; +import useMembers from './useMembers.js'; interface Props { basePath: string; diff --git a/packages/page-ranked/src/Members/Member.tsx b/packages/page-ranked/src/Members/Member.tsx index 8ff67a4b8a..65e0fec87a 100644 --- a/packages/page-ranked/src/Members/Member.tsx +++ b/packages/page-ranked/src/Members/Member.tsx @@ -2,13 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 import type { FlagColor } from '@polkadot/react-components/types'; -import type { Member as MemberType } from '../types'; +import type { Member as MemberType } from '../types.js'; import React from 'react'; import { AddressSmall, Tag } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-ranked/src/Members/Summary.tsx b/packages/page-ranked/src/Members/Summary.tsx index f68146c50c..47c0a87bf6 100644 --- a/packages/page-ranked/src/Members/Summary.tsx +++ b/packages/page-ranked/src/Members/Summary.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-referenda authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Member as MemberType } from '../types'; +import type { Member as MemberType } from '../types.js'; import React from 'react'; import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-ranked/src/Members/index.tsx b/packages/page-ranked/src/Members/index.tsx index 3e1ed1ef07..da08be9e7f 100644 --- a/packages/page-ranked/src/Members/index.tsx +++ b/packages/page-ranked/src/Members/index.tsx @@ -1,15 +1,15 @@ // Copyright 2017-2023 @polkadot/app-ranked authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Member as MemberType } from '../types'; +import type { Member as MemberType } from '../types.js'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Member from './Member'; -import Summary from './Summary'; +import { useTranslation } from '../translate.js'; +import Member from './Member.js'; +import Summary from './Summary.js'; interface Props { className?: string; diff --git a/packages/page-ranked/src/index.tsx b/packages/page-ranked/src/index.tsx index aa536ff065..816275e182 100644 --- a/packages/page-ranked/src/index.tsx +++ b/packages/page-ranked/src/index.tsx @@ -3,9 +3,9 @@ import React from 'react'; -import Main from './App'; +import Main from './App.js'; -export { default as useCounter } from './useCounter'; +export { default as useCounter } from './useCounter.js'; interface Props { basePath: string; diff --git a/packages/page-ranked/src/useMemberIds.ts b/packages/page-ranked/src/useMemberIds.ts index 561b15d8d2..fc1da5352b 100644 --- a/packages/page-ranked/src/useMemberIds.ts +++ b/packages/page-ranked/src/useMemberIds.ts @@ -4,7 +4,7 @@ import type { Changes } from '@polkadot/react-hooks/useEventChanges'; import type { StorageKey } from '@polkadot/types'; import type { AccountId32, EventRecord } from '@polkadot/types/interfaces'; -import type { PalletColl } from './types'; +import type { PalletColl } from './types.js'; import { createNamedHook, useApi, useEventChanges, useMapKeys } from '@polkadot/react-hooks'; diff --git a/packages/page-ranked/src/useMembers.ts b/packages/page-ranked/src/useMembers.ts index 55cededa7c..3a6288c1b6 100644 --- a/packages/page-ranked/src/useMembers.ts +++ b/packages/page-ranked/src/useMembers.ts @@ -5,13 +5,13 @@ import type { Option } from '@polkadot/types'; import type { AccountId32 } from '@polkadot/types/interfaces'; import type { PalletRankedCollectiveMemberRecord } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { Member, PalletColl } from './types'; +import type { Member, PalletColl } from './types.js'; import { useMemo } from 'react'; import { createNamedHook, useApi, useCall } from '@polkadot/react-hooks'; -import useMembersIds from './useMemberIds'; +import useMembersIds from './useMemberIds.js'; interface Result { memberIds: string[]; diff --git a/packages/page-referenda/src/Referenda/Delegate/Activity.tsx b/packages/page-referenda/src/Referenda/Delegate/Activity.tsx index 7cb3256867..c84ee459b8 100644 --- a/packages/page-referenda/src/Referenda/Delegate/Activity.tsx +++ b/packages/page-referenda/src/Referenda/Delegate/Activity.tsx @@ -1,16 +1,16 @@ // Copyright 2017-2023 @polkadot/app-referenda authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { PalletReferenda, TrackDescription, TrackInfoExt } from '../../types'; -import type { VoteResultItem } from './types'; +import type { PalletReferenda, TrackDescription, TrackInfoExt } from '../../types.js'; +import type { VoteResultItem } from './types.js'; import React, { useMemo } from 'react'; import { MarkWarning, styled, Table } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { useTranslation } from '../../translate'; -import { getTrackInfo } from '../../util'; +import { useTranslation } from '../../translate.js'; +import { getTrackInfo } from '../../util.js'; interface Props { allowEmpty?: boolean; diff --git a/packages/page-referenda/src/Referenda/Delegate/index.tsx b/packages/page-referenda/src/Referenda/Delegate/index.tsx index cea1d0f16e..164358c5eb 100644 --- a/packages/page-referenda/src/Referenda/Delegate/index.tsx +++ b/packages/page-referenda/src/Referenda/Delegate/index.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { PalletReferenda, PalletVote, TrackDescription } from '../../types'; +import type { PalletReferenda, PalletVote, TrackDescription } from '../../types.js'; import React, { useCallback, useMemo, useState } from 'react'; @@ -10,12 +10,12 @@ import { Button, ConvictionDropdown, InputAddress, Modal, Toggle, ToggleGroup, T import { useAccounts, useApi, useStepper, useToggle } from '@polkadot/react-hooks'; import { isFunction } from '@polkadot/util'; -import { useTranslation } from '../../translate'; -import TrackDropdown from '../Submit/TrackDropdown'; -import Activity from './Activity'; -import useActivityAccount from './useActivityAccount'; -import useActivityFellows from './useActivityFellows'; -import useActivityNominators from './useActivityNominators'; +import { useTranslation } from '../../translate.js'; +import TrackDropdown from '../Submit/TrackDropdown.js'; +import Activity from './Activity.js'; +import useActivityAccount from './useActivityAccount.js'; +import useActivityFellows from './useActivityFellows.js'; +import useActivityNominators from './useActivityNominators.js'; interface Props { className?: string; diff --git a/packages/page-referenda/src/Referenda/Delegate/useActivity.ts b/packages/page-referenda/src/Referenda/Delegate/useActivity.ts index 73ccfde317..8d209f80e7 100644 --- a/packages/page-referenda/src/Referenda/Delegate/useActivity.ts +++ b/packages/page-referenda/src/Referenda/Delegate/useActivity.ts @@ -1,13 +1,13 @@ // Copyright 2017-2023 @polkadot/app-referenda authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { PalletVote } from '../../types'; -import type { VoteResult } from './types'; +import type { PalletVote } from '../../types.js'; +import type { VoteResult } from './types.js'; import { createNamedHook } from '@polkadot/react-hooks'; -import useSuperIds from './useSuperIds'; -import useVotingFor from './useVotingFor'; +import useSuperIds from './useSuperIds.js'; +import useVotingFor from './useVotingFor.js'; function useActivityImpl (palletVote: PalletVote, accountIds?: string[] | null): VoteResult | null | undefined { const identities = useSuperIds(accountIds); diff --git a/packages/page-referenda/src/Referenda/Delegate/useActivityAccount.ts b/packages/page-referenda/src/Referenda/Delegate/useActivityAccount.ts index 46ac3f97cb..b21b940951 100644 --- a/packages/page-referenda/src/Referenda/Delegate/useActivityAccount.ts +++ b/packages/page-referenda/src/Referenda/Delegate/useActivityAccount.ts @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-referenda authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { PalletVote } from '../../types'; -import type { VoteResultItem } from './types'; +import type { PalletVote } from '../../types.js'; +import type { VoteResultItem } from './types.js'; import { useMemo } from 'react'; import { createNamedHook } from '@polkadot/react-hooks'; -import useVotingFor from './useVotingFor'; +import useVotingFor from './useVotingFor.js'; function useActivityAccountImpl (palletVote: PalletVote, accountId?: string | null): VoteResultItem[] | null | undefined { const params = useMemo( diff --git a/packages/page-referenda/src/Referenda/Delegate/useActivityFellows.ts b/packages/page-referenda/src/Referenda/Delegate/useActivityFellows.ts index 187eac8633..f8a9977b26 100644 --- a/packages/page-referenda/src/Referenda/Delegate/useActivityFellows.ts +++ b/packages/page-referenda/src/Referenda/Delegate/useActivityFellows.ts @@ -1,13 +1,13 @@ // Copyright 2017-2023 @polkadot/app-referenda authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { PalletVote } from '../../types'; -import type { VoteResult } from './types'; +import type { PalletVote } from '../../types.js'; +import type { VoteResult } from './types.js'; import { createNamedHook } from '@polkadot/react-hooks'; -import useActivity from './useActivity'; -import useFellows from './useFellows'; +import useActivity from './useActivity.js'; +import useFellows from './useFellows.js'; function useActivityFellowsImpl (palletVote: PalletVote): VoteResult | null | undefined { const fellows = useFellows(); diff --git a/packages/page-referenda/src/Referenda/Delegate/useActivityNominators.ts b/packages/page-referenda/src/Referenda/Delegate/useActivityNominators.ts index c64fcab086..14416c2692 100644 --- a/packages/page-referenda/src/Referenda/Delegate/useActivityNominators.ts +++ b/packages/page-referenda/src/Referenda/Delegate/useActivityNominators.ts @@ -1,13 +1,13 @@ // Copyright 2017-2023 @polkadot/app-referenda authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { PalletVote } from '../../types'; -import type { VoteResult } from './types'; +import type { PalletVote } from '../../types.js'; +import type { VoteResult } from './types.js'; import { createNamedHook } from '@polkadot/react-hooks'; -import useActivity from './useActivity'; -import useNominators from './useNominators'; +import useActivity from './useActivity.js'; +import useNominators from './useNominators.js'; function useActivityNominatorsImpl (palletVote: PalletVote): VoteResult | null | undefined { const nominators = useNominators(); diff --git a/packages/page-referenda/src/Referenda/Delegate/useVotingFor.ts b/packages/page-referenda/src/Referenda/Delegate/useVotingFor.ts index 7a89eec62f..49ee9418fd 100644 --- a/packages/page-referenda/src/Referenda/Delegate/useVotingFor.ts +++ b/packages/page-referenda/src/Referenda/Delegate/useVotingFor.ts @@ -3,15 +3,15 @@ import type { PalletConvictionVotingVoteVoting } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { PalletVote } from '../../types'; -import type { LockResult, VoteResult, VoteResultItem } from './types'; +import type { PalletVote } from '../../types.js'; +import type { LockResult, VoteResult, VoteResultItem } from './types.js'; import { useMemo } from 'react'; import { createNamedHook, useApi, useCall } from '@polkadot/react-hooks'; import { isFunction } from '@polkadot/util'; -import useVotingLocks from './useVotingLocks'; +import useVotingLocks from './useVotingLocks.js'; type ForParam = [accountId: string, classId: BN]; diff --git a/packages/page-referenda/src/Referenda/Delegate/useVotingLocks.ts b/packages/page-referenda/src/Referenda/Delegate/useVotingLocks.ts index 2e11f6daed..e8a09e918b 100644 --- a/packages/page-referenda/src/Referenda/Delegate/useVotingLocks.ts +++ b/packages/page-referenda/src/Referenda/Delegate/useVotingLocks.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 import type { INumber } from '@polkadot/types/types'; -import type { PalletVote } from '../../types'; -import type { LockResult } from './types'; +import type { PalletVote } from '../../types.js'; +import type { LockResult } from './types.js'; import { useMemo } from 'react'; diff --git a/packages/page-referenda/src/Referenda/Deposits/Place.tsx b/packages/page-referenda/src/Referenda/Deposits/Place.tsx index 78868389fd..affefcb959 100644 --- a/packages/page-referenda/src/Referenda/Deposits/Place.tsx +++ b/packages/page-referenda/src/Referenda/Deposits/Place.tsx @@ -3,7 +3,7 @@ import type { PalletReferendaTrackInfo } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { PalletReferenda } from '../../types'; +import type { PalletReferenda } from '../../types.js'; import React, { useState } from 'react'; @@ -11,7 +11,7 @@ import { Button, InputAddress, InputBalance, InputNumber, Modal, TxButton } from import { useApi, useToggle } from '@polkadot/react-hooks'; import { Available } from '@polkadot/react-query'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props { className?: string; diff --git a/packages/page-referenda/src/Referenda/Deposits/Refund.tsx b/packages/page-referenda/src/Referenda/Deposits/Refund.tsx index eb8e034b04..b9f80e2354 100644 --- a/packages/page-referenda/src/Referenda/Deposits/Refund.tsx +++ b/packages/page-referenda/src/Referenda/Deposits/Refund.tsx @@ -2,14 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { PalletReferenda } from '../../types'; +import type { PalletReferenda } from '../../types.js'; import React, { useState } from 'react'; import { Button, InputAddress, InputNumber, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props { className?: string; diff --git a/packages/page-referenda/src/Referenda/Deposits/index.tsx b/packages/page-referenda/src/Referenda/Deposits/index.tsx index 33613543cb..4b196bd5dd 100644 --- a/packages/page-referenda/src/Referenda/Deposits/index.tsx +++ b/packages/page-referenda/src/Referenda/Deposits/index.tsx @@ -3,14 +3,14 @@ import type { PalletReferendaDeposit, PalletReferendaTrackInfo } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { PalletReferenda } from '../../types'; +import type { PalletReferenda } from '../../types.js'; import React from 'react'; import { AddressMini, styled } from '@polkadot/react-components'; -import Place from './Place'; -import Refund from './Refund'; +import Place from './Place.js'; +import Refund from './Refund.js'; interface Props { canDeposit?: boolean; diff --git a/packages/page-referenda/src/Referenda/Group.tsx b/packages/page-referenda/src/Referenda/Group.tsx index d68f7471d8..9121a7fffd 100644 --- a/packages/page-referenda/src/Referenda/Group.tsx +++ b/packages/page-referenda/src/Referenda/Group.tsx @@ -2,16 +2,16 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { PalletReferenda, PalletVote, ReferendaGroup, TrackDescription } from '../types'; +import type { PalletReferenda, PalletVote, ReferendaGroup, TrackDescription } from '../types.js'; import React, { useMemo } from 'react'; import { ExpandButton, Table } from '@polkadot/react-components'; import { useApi, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import { getTrackInfo } from '../util'; -import Referendum from './Referendum'; +import { useTranslation } from '../translate.js'; +import { getTrackInfo } from '../util.js'; +import Referendum from './Referendum.js'; interface Props extends ReferendaGroup { activeIssuance?: BN; diff --git a/packages/page-referenda/src/Referenda/RefKilled.tsx b/packages/page-referenda/src/Referenda/RefKilled.tsx index 503db6f814..76d9baf687 100644 --- a/packages/page-referenda/src/Referenda/RefKilled.tsx +++ b/packages/page-referenda/src/Referenda/RefKilled.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2023 @polkadot/app-referenda authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { ReferendumProps as Props } from '../types'; +import type { ReferendumProps as Props } from '../types.js'; import React, { useMemo } from 'react'; -import RefEnd from './RefEnd'; +import RefEnd from './RefEnd.js'; function RefOther ({ value: { info } }: Props): React.ReactElement { const when = useMemo( diff --git a/packages/page-referenda/src/Referenda/RefOngoing.tsx b/packages/page-referenda/src/Referenda/RefOngoing.tsx index 02668342f7..7898f95ecb 100644 --- a/packages/page-referenda/src/Referenda/RefOngoing.tsx +++ b/packages/page-referenda/src/Referenda/RefOngoing.tsx @@ -6,7 +6,7 @@ import type { Hash } from '@polkadot/types/interfaces'; import type { PalletConvictionVotingTally, PalletRankedCollectiveTally, PalletReferendaDeposit, PalletReferendaReferendumStatusConvictionVotingTally, PalletReferendaReferendumStatusRankedCollectiveTally, PalletReferendaTrackInfo } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; import type { HexString } from '@polkadot/util/types'; -import type { Referendum, ReferendumProps as Props } from '../types'; +import type { Referendum, ReferendumProps as Props } from '../types.js'; import React, { useMemo } from 'react'; @@ -14,12 +14,12 @@ import { CallExpander, Progress } from '@polkadot/react-components'; import { useApi, usePreimage } from '@polkadot/react-hooks'; import { getPreimageHash } from '@polkadot/react-hooks/usePreimage'; -import { useTranslation } from '../translate'; -import Deposits from './Deposits'; -import RefEnd from './RefEnd'; -import { unwrapDeposit } from './util'; -import Vote from './Vote'; -import Votes from './Votes'; +import { useTranslation } from '../translate.js'; +import Deposits from './Deposits/index.js'; +import Vote from './Vote/index.js'; +import RefEnd from './RefEnd.js'; +import { unwrapDeposit } from './util.js'; +import Votes from './Votes.js'; interface Expanded { decisionDeposit: PalletReferendaDeposit | null; diff --git a/packages/page-referenda/src/Referenda/RefTuple.tsx b/packages/page-referenda/src/Referenda/RefTuple.tsx index dfd8520a4e..12b4421740 100644 --- a/packages/page-referenda/src/Referenda/RefTuple.tsx +++ b/packages/page-referenda/src/Referenda/RefTuple.tsx @@ -3,13 +3,13 @@ import type { PalletReferendaDeposit } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { Referendum, ReferendumProps as Props } from '../types'; +import type { Referendum, ReferendumProps as Props } from '../types.js'; import React, { useMemo } from 'react'; -import Deposits from './Deposits'; -import RefEnd from './RefEnd'; -import { unwrapDeposit } from './util'; +import Deposits from './Deposits/index.js'; +import RefEnd from './RefEnd.js'; +import { unwrapDeposit } from './util.js'; interface Expanded { decision: PalletReferendaDeposit | null; diff --git a/packages/page-referenda/src/Referenda/Referendum.tsx b/packages/page-referenda/src/Referenda/Referendum.tsx index f0b932bb5e..a6705c56d5 100644 --- a/packages/page-referenda/src/Referenda/Referendum.tsx +++ b/packages/page-referenda/src/Referenda/Referendum.tsx @@ -5,7 +5,7 @@ import type { ChartOptions, ChartTypeRegistry, TooltipItem } from 'chart.js'; import type { TFunction } from 'i18next'; import type { PalletConvictionVotingTally, PalletRankedCollectiveTally, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletReferendaTrackInfo } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { CurveGraph, ReferendumProps as Props } from '../types'; +import type { CurveGraph, ReferendumProps as Props } from '../types.js'; import React, { useMemo } from 'react'; @@ -14,10 +14,10 @@ import { useBestNumber, useBlockInterval, useToggle } from '@polkadot/react-hook import { calcBlockTime } from '@polkadot/react-hooks/useBlockTime'; import { BN_MILLION, BN_THOUSAND, bnMax, bnToBn, formatNumber, objectSpread } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Killed from './RefKilled'; -import Ongoing from './RefOngoing'; -import Tuple from './RefTuple'; +import { useTranslation } from '../translate.js'; +import Killed from './RefKilled.js'; +import Ongoing from './RefOngoing.js'; +import Tuple from './RefTuple.js'; const COMPONENTS: Record> = { Killed, diff --git a/packages/page-referenda/src/Referenda/Submit/TrackDropdown.tsx b/packages/page-referenda/src/Referenda/Submit/TrackDropdown.tsx index d9f32ff83d..9501940a70 100644 --- a/packages/page-referenda/src/Referenda/Submit/TrackDropdown.tsx +++ b/packages/page-referenda/src/Referenda/Submit/TrackDropdown.tsx @@ -2,14 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { PalletReferenda, TrackDescription } from '../../types'; +import type { PalletReferenda, TrackDescription } from '../../types.js'; import React from 'react'; import { Dropdown, styled } from '@polkadot/react-components'; -import { useTranslation } from '../../translate'; -import useTrackOptions from './useTrackOptions'; +import { useTranslation } from '../../translate.js'; +import useTrackOptions from './useTrackOptions.js'; interface Props { className?: string; diff --git a/packages/page-referenda/src/Referenda/Submit/index.tsx b/packages/page-referenda/src/Referenda/Submit/index.tsx index 5aa818b324..b9767708de 100644 --- a/packages/page-referenda/src/Referenda/Submit/index.tsx +++ b/packages/page-referenda/src/Referenda/Submit/index.tsx @@ -4,7 +4,7 @@ import type { RawParam } from '@polkadot/react-params/types'; import type { BN } from '@polkadot/util'; import type { HexString } from '@polkadot/util/types'; -import type { PalletReferenda, TrackDescription } from '../../types'; +import type { PalletReferenda, TrackDescription } from '../../types.js'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; @@ -15,9 +15,9 @@ import { Available } from '@polkadot/react-query'; import { getTypeDef } from '@polkadot/types/create'; import { BN_HUNDRED, BN_ONE, BN_THOUSAND, BN_ZERO, isHex } from '@polkadot/util'; -import { useTranslation } from '../../translate'; -import { getTrackInfo } from '../../util'; -import TrackDropdown from './TrackDropdown'; +import { useTranslation } from '../../translate.js'; +import { getTrackInfo } from '../../util.js'; +import TrackDropdown from './TrackDropdown.js'; interface Props { className?: string; diff --git a/packages/page-referenda/src/Referenda/Submit/useTrackOptions.tsx b/packages/page-referenda/src/Referenda/Submit/useTrackOptions.tsx index 7d46831c01..9441157dbe 100644 --- a/packages/page-referenda/src/Referenda/Submit/useTrackOptions.tsx +++ b/packages/page-referenda/src/Referenda/Submit/useTrackOptions.tsx @@ -3,15 +3,15 @@ import type { ApiPromise } from '@polkadot/api'; import type { BN } from '@polkadot/util'; -import type { TrackDescription } from '../../types'; -import type { TrackOption } from './types'; +import type { TrackDescription } from '../../types.js'; +import type { TrackOption } from './types.js'; import React, { useMemo } from 'react'; import { createNamedHook, useApi } from '@polkadot/react-hooks'; import { bnToBn } from '@polkadot/util'; -import { getTrackInfo, getTrackName } from '../../util'; +import { getTrackInfo, getTrackName } from '../../util.js'; function getTrackOptions (api: ApiPromise, specName: string, palletReferenda: string, tracks: TrackDescription[], include?: (BN | number)[], exclude?: (BN | number)[]): TrackOption[] { const includeBn = include && include.map((v) => bnToBn(v)); diff --git a/packages/page-referenda/src/Referenda/Summary.tsx b/packages/page-referenda/src/Referenda/Summary.tsx index e77f4cd259..69583482a5 100644 --- a/packages/page-referenda/src/Referenda/Summary.tsx +++ b/packages/page-referenda/src/Referenda/Summary.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { Summary as SummaryType } from '../types'; +import type { Summary as SummaryType } from '../types.js'; import React from 'react'; @@ -11,7 +11,7 @@ import { useApi } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; import { formatNumber, isFunction } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-referenda/src/Referenda/Vote/VoteAbstain.tsx b/packages/page-referenda/src/Referenda/Vote/VoteAbstain.tsx index eeb13ed655..35202b93d5 100644 --- a/packages/page-referenda/src/Referenda/Vote/VoteAbstain.tsx +++ b/packages/page-referenda/src/Referenda/Vote/VoteAbstain.tsx @@ -2,13 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { VoteTypeProps as Props } from '../types'; +import type { VoteTypeProps as Props } from '../types.js'; import React, { useEffect, useState } from 'react'; import { Modal, VoteValue } from '@polkadot/react-components'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; function VoteAbstain ({ accountId, id, onChange }: Props): React.ReactElement { const { t } = useTranslation(); diff --git a/packages/page-referenda/src/Referenda/Vote/VoteSplit.tsx b/packages/page-referenda/src/Referenda/Vote/VoteSplit.tsx index 7544c13701..8e6a6b979e 100644 --- a/packages/page-referenda/src/Referenda/Vote/VoteSplit.tsx +++ b/packages/page-referenda/src/Referenda/Vote/VoteSplit.tsx @@ -2,13 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { VoteTypeProps as Props } from '../types'; +import type { VoteTypeProps as Props } from '../types.js'; import React, { useEffect, useState } from 'react'; import { Modal, VoteValue } from '@polkadot/react-components'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; function VoteSplit ({ accountId, id, onChange }: Props): React.ReactElement { const { t } = useTranslation(); diff --git a/packages/page-referenda/src/Referenda/Vote/VoteStandard.tsx b/packages/page-referenda/src/Referenda/Vote/VoteStandard.tsx index 86dfec6f1d..44fb6fb592 100644 --- a/packages/page-referenda/src/Referenda/Vote/VoteStandard.tsx +++ b/packages/page-referenda/src/Referenda/Vote/VoteStandard.tsx @@ -2,13 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { VoteTypeProps } from '../types'; +import type { VoteTypeProps } from '../types.js'; import React, { useEffect, useState } from 'react'; import { ConvictionDropdown, Modal, VoteValue } from '@polkadot/react-components'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props extends VoteTypeProps { voteLockingPeriod: BN; diff --git a/packages/page-referenda/src/Referenda/Vote/index.tsx b/packages/page-referenda/src/Referenda/Vote/index.tsx index 87138891c3..e57e45ae96 100644 --- a/packages/page-referenda/src/Referenda/Vote/index.tsx +++ b/packages/page-referenda/src/Referenda/Vote/index.tsx @@ -5,17 +5,17 @@ import type { TFunction } from 'i18next'; import type { ApiPromise } from '@polkadot/api'; import type { Preimage } from '@polkadot/react-hooks/types'; import type { BN } from '@polkadot/util'; -import type { PalletVote, TrackInfo } from '../../types'; +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 { useAccounts, useApi, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../../translate'; -import VoteAbstain from './VoteAbstain'; -import VoteSplit from './VoteSplit'; -import VoteStandard from './VoteStandard'; +import { useTranslation } from '../../translate.js'; +import VoteAbstain from './VoteAbstain.js'; +import VoteSplit from './VoteSplit.js'; +import VoteStandard from './VoteStandard.js'; interface Props { className?: string; diff --git a/packages/page-referenda/src/Referenda/Votes.tsx b/packages/page-referenda/src/Referenda/Votes.tsx index 81251a5f32..3139479fc9 100644 --- a/packages/page-referenda/src/Referenda/Votes.tsx +++ b/packages/page-referenda/src/Referenda/Votes.tsx @@ -3,7 +3,7 @@ import type { PalletConvictionVotingTally, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { PalletVote } from '../types'; +import type { PalletVote } from '../types.js'; import React, { useCallback, useMemo } from 'react'; @@ -11,8 +11,8 @@ import { AddressMini, Expander } from '@polkadot/react-components'; import { FormatBalance } from '@polkadot/react-query'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import useVotes from './useVotes'; +import { useTranslation } from '../translate.js'; +import useVotes from './useVotes.js'; interface Props { className?: string; diff --git a/packages/page-referenda/src/Referenda/index.tsx b/packages/page-referenda/src/Referenda/index.tsx index ffa4b6b6f7..89d1495487 100644 --- a/packages/page-referenda/src/Referenda/index.tsx +++ b/packages/page-referenda/src/Referenda/index.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { PalletReferenda, PalletVote, ReferendaGroup } from '../types'; +import type { PalletReferenda, PalletVote, ReferendaGroup } from '../types.js'; import React, { useMemo, useState } from 'react'; @@ -11,15 +11,15 @@ import { Button, Dropdown, styled } from '@polkadot/react-components'; import { useAccounts, useApi, useCall } from '@polkadot/react-hooks'; import { BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import useReferenda from '../useReferenda'; -import useSummary from '../useSummary'; -import Delegate from './Delegate'; -import Group from './Group'; -import Submit from './Submit'; -import Summary from './Summary'; +import { useTranslation } from '../translate.js'; +import useReferenda from '../useReferenda.js'; +import useSummary from '../useSummary.js'; +import Delegate from './Delegate/index.js'; +import Submit from './Submit/index.js'; +import Group from './Group.js'; +import Summary from './Summary.js'; -export { useCounterNamed as useCounter } from '../useCounter'; +export { useCounterNamed as useCounter } from '../useCounter.js'; interface Props { className?: string; diff --git a/packages/page-referenda/src/Referenda/useVotes.ts b/packages/page-referenda/src/Referenda/useVotes.ts index c463786e24..94dbe7c768 100644 --- a/packages/page-referenda/src/Referenda/useVotes.ts +++ b/packages/page-referenda/src/Referenda/useVotes.ts @@ -7,7 +7,7 @@ import type { Option, StorageKey, u32 } from '@polkadot/types'; import type { AccountId, EventRecord } from '@polkadot/types/interfaces'; import type { PalletRankedCollectiveVoteRecord } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { PalletVote } from '../types'; +import type { PalletVote } from '../types.js'; import { useMemo } from 'react'; diff --git a/packages/page-referenda/src/Referenda/util.ts b/packages/page-referenda/src/Referenda/util.ts index a8bad45bef..44b61887d1 100644 --- a/packages/page-referenda/src/Referenda/util.ts +++ b/packages/page-referenda/src/Referenda/util.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { PalletReferendaDeposit } from '@polkadot/types/lookup'; -import type { Referendum } from '../types'; +import type { Referendum } from '../types.js'; import { Option } from '@polkadot/types'; diff --git a/packages/page-referenda/src/index.tsx b/packages/page-referenda/src/index.tsx index 9ab2896704..08c431b7a3 100644 --- a/packages/page-referenda/src/index.tsx +++ b/packages/page-referenda/src/index.tsx @@ -5,10 +5,10 @@ import React, { useRef } from 'react'; import { Tabs } from '@polkadot/react-components'; -import Referenda from './Referenda'; -import { useTranslation } from './translate'; +import Referenda from './Referenda/index.js'; +import { useTranslation } from './translate.js'; -export { default as useCounter } from './useCounter'; +export { default as useCounter } from './useCounter.js'; interface Props { basePath: string; diff --git a/packages/page-referenda/src/useAccountLocks.ts b/packages/page-referenda/src/useAccountLocks.ts index 3d32fd78cd..8d08425657 100644 --- a/packages/page-referenda/src/useAccountLocks.ts +++ b/packages/page-referenda/src/useAccountLocks.ts @@ -5,7 +5,7 @@ import type { ApiPromise } from '@polkadot/api'; import type { Option } from '@polkadot/types'; import type { PalletConvictionVotingVoteCasting, PalletConvictionVotingVoteVoting, PalletReferendaReferendumInfoConvictionVotingTally } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { Lock, PalletReferenda, PalletVote } from './types'; +import type { Lock, PalletReferenda, PalletVote } from './types.js'; import { useMemo } from 'react'; diff --git a/packages/page-referenda/src/useCounter.ts b/packages/page-referenda/src/useCounter.ts index a7d9b61d6b..be508f39a8 100644 --- a/packages/page-referenda/src/useCounter.ts +++ b/packages/page-referenda/src/useCounter.ts @@ -1,13 +1,13 @@ // Copyright 2017-2023 @polkadot/app-referenda authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { PalletReferenda } from './types'; +import type { PalletReferenda } from './types.js'; import { useMemo } from 'react'; import { createNamedHook } from '@polkadot/react-hooks'; -import useReferenda from './useReferenda'; +import useReferenda from './useReferenda.js'; export function useCounterNamed (palletReferenda: PalletReferenda): number { const [grouped] = useReferenda(palletReferenda); diff --git a/packages/page-referenda/src/useReferenda.ts b/packages/page-referenda/src/useReferenda.ts index 29750f82e0..82c6a651b7 100644 --- a/packages/page-referenda/src/useReferenda.ts +++ b/packages/page-referenda/src/useReferenda.ts @@ -3,15 +3,15 @@ import type { Option } from '@polkadot/types'; import type { BN } from '@polkadot/util'; -import type { PalletReferenda, ReferendaGroup, ReferendaGroupKnown, Referendum, TrackDescription } from './types'; +import type { PalletReferenda, ReferendaGroup, ReferendaGroupKnown, Referendum, TrackDescription } from './types.js'; import { useMemo } from 'react'; import { createNamedHook, useApi, useCall } from '@polkadot/react-hooks'; -import useReferendaIds from './useReferendaIds'; -import useTracks from './useTracks'; -import { calcDecidingEnd, getTrackName, isConvictionVote } from './util'; +import useReferendaIds from './useReferendaIds.js'; +import useTracks from './useTracks.js'; +import { calcDecidingEnd, getTrackName, isConvictionVote } from './util.js'; function sortOngoing (a: Referendum, b: Referendum): number { const ao = a.info.asOngoing; diff --git a/packages/page-referenda/src/useReferendaIds.ts b/packages/page-referenda/src/useReferendaIds.ts index 09d8b629a6..2d630a1bad 100644 --- a/packages/page-referenda/src/useReferendaIds.ts +++ b/packages/page-referenda/src/useReferendaIds.ts @@ -5,7 +5,7 @@ import type { Changes } from '@polkadot/react-hooks/useEventChanges'; import type { StorageKey, u32 } from '@polkadot/types'; import type { EventRecord } from '@polkadot/types/interfaces'; import type { BN } from '@polkadot/util'; -import type { PalletReferenda } from './types'; +import type { PalletReferenda } from './types.js'; import { createNamedHook, useApi, useEventChanges, useMapKeys } from '@polkadot/react-hooks'; diff --git a/packages/page-referenda/src/useSummary.ts b/packages/page-referenda/src/useSummary.ts index 7a09635d87..e5f55cc6a5 100644 --- a/packages/page-referenda/src/useSummary.ts +++ b/packages/page-referenda/src/useSummary.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { u32 } from '@polkadot/types'; -import type { PalletReferenda, ReferendaGroup, Summary } from './types'; +import type { PalletReferenda, ReferendaGroup, Summary } from './types.js'; import { useMemo } from 'react'; diff --git a/packages/page-referenda/src/useTracks.ts b/packages/page-referenda/src/useTracks.ts index 0351b9adc2..843485619b 100644 --- a/packages/page-referenda/src/useTracks.ts +++ b/packages/page-referenda/src/useTracks.ts @@ -3,13 +3,13 @@ import type { PalletReferendaTrackInfo } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { PalletReferenda, TrackDescription } from './types'; +import type { PalletReferenda, TrackDescription } from './types.js'; import { useMemo } from 'react'; import { createNamedHook, useApi } from '@polkadot/react-hooks'; -import { calcCurves } from './util'; +import { calcCurves } from './util.js'; function expandTracks (tracks: [BN, PalletReferendaTrackInfo][]): TrackDescription[] { return tracks.map(([id, info]) => ({ diff --git a/packages/page-referenda/src/util.spec.ts b/packages/page-referenda/src/util.spec.ts index d27ef6dde0..97b4a8b0be 100644 --- a/packages/page-referenda/src/util.spec.ts +++ b/packages/page-referenda/src/util.spec.ts @@ -6,7 +6,7 @@ import type { BN } from '@polkadot/util'; import { BN_BILLION, BN_ZERO, bnToBn } from '@polkadot/util'; -import { curveDelay, curveThreshold } from './util'; +import { curveDelay, curveThreshold } from './util.js'; function curveLinear (ceil: BN | string | number, floor: BN | string | number, length: BN | string | number): PalletReferendaCurve { return { diff --git a/packages/page-referenda/src/util.ts b/packages/page-referenda/src/util.ts index 25f7f30de5..55fdf89d72 100644 --- a/packages/page-referenda/src/util.ts +++ b/packages/page-referenda/src/util.ts @@ -3,7 +3,7 @@ import type { ApiPromise } from '@polkadot/api'; import type { PalletConvictionVotingTally, PalletRankedCollectiveTally, PalletReferendaCurve, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletReferendaTrackInfo } from '@polkadot/types/lookup'; -import type { CurveGraph, TrackDescription, TrackInfoExt } from './types'; +import type { CurveGraph, TrackDescription, TrackInfoExt } from './types.js'; import { getGovernanceTracks } from '@polkadot/apps-config'; import { BN, BN_BILLION, BN_ONE, BN_ZERO, bnMax, bnMin, formatNumber, objectSpread, stringPascalCase } from '@polkadot/util'; diff --git a/packages/page-rpc/src/Rpc/Account.tsx b/packages/page-rpc/src/Rpc/Account.tsx index ade7abe09b..0adf9e2b5c 100644 --- a/packages/page-rpc/src/Rpc/Account.tsx +++ b/packages/page-rpc/src/Rpc/Account.tsx @@ -9,7 +9,7 @@ import { InputAddress, Labelled, styled } from '@polkadot/react-components'; import { Nonce } from '@polkadot/react-query'; import { BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-rpc/src/Rpc/Selection.tsx b/packages/page-rpc/src/Rpc/Selection.tsx index 5951bac420..3c6725d1da 100644 --- a/packages/page-rpc/src/Rpc/Selection.tsx +++ b/packages/page-rpc/src/Rpc/Selection.tsx @@ -13,7 +13,7 @@ import { getTypeDef } from '@polkadot/types/create'; import jsonrpc from '@polkadot/types/interfaces/jsonrpc'; import { isNull } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { queueRpc: QueueTxRpcAdd; diff --git a/packages/page-rpc/src/Rpc/index.tsx b/packages/page-rpc/src/Rpc/index.tsx index 79e53ec900..d7a78b6e4d 100644 --- a/packages/page-rpc/src/Rpc/index.tsx +++ b/packages/page-rpc/src/Rpc/index.tsx @@ -5,8 +5,8 @@ import React from 'react'; import { useQueue } from '@polkadot/react-hooks'; -import Results from './Results'; -import Selection from './Selection'; +import Results from './Results.js'; +import Selection from './Selection.js'; function RpcApp (): React.ReactElement { const { queueRpc, txqueue } = useQueue(); diff --git a/packages/page-rpc/src/index.tsx b/packages/page-rpc/src/index.tsx index 662b2c3573..a715c23dba 100644 --- a/packages/page-rpc/src/index.tsx +++ b/packages/page-rpc/src/index.tsx @@ -8,8 +8,8 @@ import { Route, Switch } from 'react-router'; import { Tabs } from '@polkadot/react-components'; -import Rpc from './Rpc'; -import { useTranslation } from './translate'; +import Rpc from './Rpc/index.js'; +import { useTranslation } from './translate.js'; function RpcApp ({ basePath }: Props): React.ReactElement { const { t } = useTranslation(); diff --git a/packages/page-runtime/src/Runtime/Results.tsx b/packages/page-runtime/src/Runtime/Results.tsx index 65708c5032..9cacb314e7 100644 --- a/packages/page-runtime/src/Runtime/Results.tsx +++ b/packages/page-runtime/src/Runtime/Results.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-runtime authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Result } from './types'; +import type { Result } from './types.js'; import React from 'react'; diff --git a/packages/page-runtime/src/Runtime/Selection.tsx b/packages/page-runtime/src/Runtime/Selection.tsx index 077b9d9497..67adb58a23 100644 --- a/packages/page-runtime/src/Runtime/Selection.tsx +++ b/packages/page-runtime/src/Runtime/Selection.tsx @@ -10,7 +10,7 @@ import { Button, InputCalls } from '@polkadot/react-components'; import Params from '@polkadot/react-params'; import { getTypeDef } from '@polkadot/types/create'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { onSubmit: (call: DefinitionCallNamed, values: RawParam[]) => void; diff --git a/packages/page-runtime/src/Runtime/index.tsx b/packages/page-runtime/src/Runtime/index.tsx index 9cc9e5afb2..427a5be3b2 100644 --- a/packages/page-runtime/src/Runtime/index.tsx +++ b/packages/page-runtime/src/Runtime/index.tsx @@ -3,14 +3,14 @@ import type { RawParam } from '@polkadot/react-params/types'; import type { DefinitionCallNamed } from '@polkadot/types/types'; -import type { Result } from './types'; +import type { Result } from './types.js'; import React, { useCallback, useState } from 'react'; import { useApi } from '@polkadot/react-hooks'; -import Results from './Results'; -import Selection from './Selection'; +import Results from './Results.js'; +import Selection from './Selection.js'; let id = 0; diff --git a/packages/page-runtime/src/index.tsx b/packages/page-runtime/src/index.tsx index 09ea948c5f..d7a9d1fbc5 100644 --- a/packages/page-runtime/src/index.tsx +++ b/packages/page-runtime/src/index.tsx @@ -8,8 +8,8 @@ import { Route, Switch } from 'react-router'; import { Tabs } from '@polkadot/react-components'; -import Runtime from './Runtime'; -import { useTranslation } from './translate'; +import Runtime from './Runtime/index.js'; +import { useTranslation } from './translate.js'; function RuntimeApp ({ basePath }: Props): React.ReactElement { const { t } = useTranslation(); diff --git a/packages/page-scheduler/src/DispatchQueue.tsx b/packages/page-scheduler/src/DispatchQueue.tsx index 74e451551b..cfa5701398 100644 --- a/packages/page-scheduler/src/DispatchQueue.tsx +++ b/packages/page-scheduler/src/DispatchQueue.tsx @@ -8,8 +8,8 @@ import React, { useMemo, useRef } from 'react'; import { Table } from '@polkadot/react-components'; import { useApi, useBestNumber, useCall } from '@polkadot/react-hooks'; -import DispatchEntry from './DispatchEntry'; -import { useTranslation } from './translate'; +import DispatchEntry from './DispatchEntry.js'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-scheduler/src/Scheduled.tsx b/packages/page-scheduler/src/Scheduled.tsx index cd1e5eae7a..9a13fb52b0 100644 --- a/packages/page-scheduler/src/Scheduled.tsx +++ b/packages/page-scheduler/src/Scheduled.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { BlockNumber } from '@polkadot/types/interfaces'; -import type { ScheduledExt } from './types'; +import type { ScheduledExt } from './types.js'; import React from 'react'; diff --git a/packages/page-scheduler/src/Scheduler.tsx b/packages/page-scheduler/src/Scheduler.tsx index 1550d5f5e5..8716b4a0f3 100644 --- a/packages/page-scheduler/src/Scheduler.tsx +++ b/packages/page-scheduler/src/Scheduler.tsx @@ -6,15 +6,15 @@ import type { Bytes, Option, u8, u32 } from '@polkadot/types'; import type { BlockNumber, Call, Hash, Scheduled } from '@polkadot/types/interfaces'; import type { FrameSupportPreimagesBounded, PalletSchedulerScheduled } from '@polkadot/types/lookup'; import type { Codec, ITuple } from '@polkadot/types/types'; -import type { ScheduledExt } from './types'; +import type { ScheduledExt } from './types.js'; import React, { useMemo, useRef } from 'react'; import { Table } from '@polkadot/react-components'; import { useApi, useBestNumber, useCall } from '@polkadot/react-hooks'; -import ScheduledView from './Scheduled'; -import { useTranslation } from './translate'; +import ScheduledView from './Scheduled.js'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-scheduler/src/index.tsx b/packages/page-scheduler/src/index.tsx index ae137d95e5..f7507d9610 100644 --- a/packages/page-scheduler/src/index.tsx +++ b/packages/page-scheduler/src/index.tsx @@ -6,9 +6,9 @@ import React, { useMemo } from 'react'; import { Tabs } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import DispatchQueue from './DispatchQueue'; -import Scheduler from './Scheduler'; -import { useTranslation } from './translate'; +import DispatchQueue from './DispatchQueue.js'; +import Scheduler from './Scheduler.js'; +import { useTranslation } from './translate.js'; interface Props { basePath: string; diff --git a/packages/page-settings/src/Developer.tsx b/packages/page-settings/src/Developer.tsx index e5dfaeed60..b5d0a5b7ae 100644 --- a/packages/page-settings/src/Developer.tsx +++ b/packages/page-settings/src/Developer.tsx @@ -12,7 +12,7 @@ import { Button, CopyButton, Editor, InputFile, styled } from '@polkadot/react-c import { useApi } from '@polkadot/react-hooks'; import { isJsonObject, stringToU8a, u8aToString } from '@polkadot/util'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; const EMPTY_CODE = '{\n\n}'; const EMPTY_TYPES = {}; diff --git a/packages/page-settings/src/General.tsx b/packages/page-settings/src/General.tsx index 65098d2fd8..3ec806a996 100644 --- a/packages/page-settings/src/General.tsx +++ b/packages/page-settings/src/General.tsx @@ -12,8 +12,8 @@ import { Button, Dropdown, MarkWarning } from '@polkadot/react-components'; import { useApi, useIpfs, useLedger } from '@polkadot/react-hooks'; import { settings } from '@polkadot/ui-settings'; -import { useTranslation } from './translate'; -import { createIdenticon, createOption, save, saveAndReload } from './util'; +import { useTranslation } from './translate.js'; +import { createIdenticon, createOption, save, saveAndReload } from './util.js'; interface Props { className?: string; diff --git a/packages/page-settings/src/I18n/index.tsx b/packages/page-settings/src/I18n/index.tsx index 9e148d461d..660b3e12e3 100644 --- a/packages/page-settings/src/I18n/index.tsx +++ b/packages/page-settings/src/I18n/index.tsx @@ -10,8 +10,8 @@ import languageCache from '@polkadot/react-components/i18n/cache'; import { useToggle } from '@polkadot/react-hooks'; import { settings } from '@polkadot/ui-settings'; -import { useTranslation } from '../translate'; -import StringInput from './StringInput'; +import { useTranslation } from '../translate.js'; +import StringInput from './StringInput.js'; type Progress = [[number, number, number], Record]; type Strings = Record; diff --git a/packages/page-settings/src/Metadata/Extensions.tsx b/packages/page-settings/src/Metadata/Extensions.tsx index cf6c74ce05..8dd4d42f66 100644 --- a/packages/page-settings/src/Metadata/Extensions.tsx +++ b/packages/page-settings/src/Metadata/Extensions.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-settings authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { ChainInfo } from '../types'; +import type { ChainInfo } from '../types.js'; import React, { useCallback, useMemo, useRef, useState } from 'react'; @@ -10,9 +10,9 @@ import { externalEmptySVG } from '@polkadot/apps-config/ui/logos/external'; import { Button, Dropdown, Spinner, styled, Table } from '@polkadot/react-components'; import { useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import useExtensions from '../useExtensions'; -import iconOption from './iconOption'; +import { useTranslation } from '../translate.js'; +import useExtensions from '../useExtensions.js'; +import iconOption from './iconOption.js'; interface Props { chainInfo: ChainInfo | null; diff --git a/packages/page-settings/src/Metadata/NetworkSpecs.tsx b/packages/page-settings/src/Metadata/NetworkSpecs.tsx index 1e37ab8017..3b9a03bbd9 100644 --- a/packages/page-settings/src/Metadata/NetworkSpecs.tsx +++ b/packages/page-settings/src/Metadata/NetworkSpecs.tsx @@ -2,15 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 import type { NetworkSpecsStruct } from '@polkadot/ui-settings/types'; -import type { ChainInfo, ChainType } from '../types'; +import type { ChainInfo, ChainType } from '../types.js'; import React, { useCallback, useEffect, useReducer, useRef, useState } from 'react'; import { ChainImg, Input, QrNetworkSpecs, Spinner, styled, Table } from '@polkadot/react-components'; import { useApi, useDebounce } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import ChainColorIndicator from './ChainColorIndicator'; +import { useTranslation } from '../translate.js'; +import ChainColorIndicator from './ChainColorIndicator.js'; interface Props { chainInfo: ChainInfo | null; diff --git a/packages/page-settings/src/Metadata/index.tsx b/packages/page-settings/src/Metadata/index.tsx index f78e644ffe..41051e91de 100644 --- a/packages/page-settings/src/Metadata/index.tsx +++ b/packages/page-settings/src/Metadata/index.tsx @@ -5,9 +5,9 @@ import React from 'react'; import { useApi } from '@polkadot/react-hooks'; -import useChainInfo from '../useChainInfo'; -import Extensions from './Extensions'; -import NetworkSpecs from './NetworkSpecs'; +import useChainInfo from '../useChainInfo.js'; +import Extensions from './Extensions.js'; +import NetworkSpecs from './NetworkSpecs.js'; export default function Metadata (): React.ReactElement { const { isDevelopment } = useApi(); diff --git a/packages/page-settings/src/index.tsx b/packages/page-settings/src/index.tsx index 895bd8e6cb..9576df997d 100644 --- a/packages/page-settings/src/index.tsx +++ b/packages/page-settings/src/index.tsx @@ -9,12 +9,12 @@ import { Route, Switch } from 'react-router'; import { Tabs } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import Developer from './Developer'; -import General from './General'; -import I18n from './I18n'; -import Metadata from './Metadata'; -import { useTranslation } from './translate'; -import useCounter from './useCounter'; +import I18n from './I18n/index.js'; +import Metadata from './Metadata/index.js'; +import Developer from './Developer.js'; +import General from './General.js'; +import { useTranslation } from './translate.js'; +import useCounter from './useCounter.js'; export { useCounter }; diff --git a/packages/page-settings/src/useChainInfo.ts b/packages/page-settings/src/useChainInfo.ts index 8ba4c099a8..caf3360f37 100644 --- a/packages/page-settings/src/useChainInfo.ts +++ b/packages/page-settings/src/useChainInfo.ts @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-settings authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { ChainInfo } from './types'; +import type { ChainInfo } from './types.js'; import { useMemo } from 'react'; diff --git a/packages/page-settings/src/useCounter.ts b/packages/page-settings/src/useCounter.ts index 20c8f8d42a..4ac2d97748 100644 --- a/packages/page-settings/src/useCounter.ts +++ b/packages/page-settings/src/useCounter.ts @@ -3,7 +3,7 @@ import { createNamedHook } from '@polkadot/react-hooks'; -import useExtensions from './useExtensions'; +import useExtensions from './useExtensions.js'; function useCounterImpl (): number { const { count } = useExtensions(); diff --git a/packages/page-signing/src/Sign.tsx b/packages/page-signing/src/Sign.tsx index 7192d872ed..eae7845eae 100644 --- a/packages/page-signing/src/Sign.tsx +++ b/packages/page-signing/src/Sign.tsx @@ -12,8 +12,8 @@ import { useToggle } from '@polkadot/react-hooks'; import { keyring } from '@polkadot/ui-keyring'; import { isFunction, isHex, u8aToHex, u8aWrapBytes } from '@polkadot/util'; -import { useTranslation } from './translate'; -import Unlock from './Unlock'; +import { useTranslation } from './translate.js'; +import Unlock from './Unlock.js'; interface Props { className?: string; diff --git a/packages/page-signing/src/Unlock.tsx b/packages/page-signing/src/Unlock.tsx index 0fdd4d4b8a..91fce7d64d 100644 --- a/packages/page-signing/src/Unlock.tsx +++ b/packages/page-signing/src/Unlock.tsx @@ -8,7 +8,7 @@ import React, { useCallback, useEffect, useState } from 'react'; import { Button, InputAddress, Modal, Password } from '@polkadot/react-components'; import { nextTick } from '@polkadot/util'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface Props { onClose: () => void; diff --git a/packages/page-signing/src/Verify.tsx b/packages/page-signing/src/Verify.tsx index 8861924cd0..e6781af0cd 100644 --- a/packages/page-signing/src/Verify.tsx +++ b/packages/page-signing/src/Verify.tsx @@ -12,7 +12,7 @@ import { settings } from '@polkadot/ui-settings'; import { isHex } from '@polkadot/util'; import { signatureVerify } from '@polkadot/util-crypto'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; type CryptoTypes = KeypairType | 'unknown'; diff --git a/packages/page-signing/src/index.tsx b/packages/page-signing/src/index.tsx index 4645951a15..eca29b929f 100644 --- a/packages/page-signing/src/index.tsx +++ b/packages/page-signing/src/index.tsx @@ -8,9 +8,9 @@ import { Route, Switch } from 'react-router'; import { Tabs } from '@polkadot/react-components'; -import Sign from './Sign'; -import { useTranslation } from './translate'; -import Verify from './Verify'; +import Sign from './Sign.js'; +import { useTranslation } from './translate.js'; +import Verify from './Verify.js'; function SigningApp ({ basePath }: Props): React.ReactElement { const { t } = useTranslation(); diff --git a/packages/page-society/src/Candidates/Bid.tsx b/packages/page-society/src/Candidates/Bid.tsx index d76a40ab8e..3e0e7deae6 100644 --- a/packages/page-society/src/Candidates/Bid.tsx +++ b/packages/page-society/src/Candidates/Bid.tsx @@ -8,8 +8,8 @@ import React, { useMemo } from 'react'; import { AddressSmall, Table, TxButton } from '@polkadot/react-components'; import { useAccounts, useApi } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import BidType from './BidType'; +import { useTranslation } from '../translate.js'; +import BidType from './BidType.js'; interface Props { index: number; diff --git a/packages/page-society/src/Candidates/BidNew.tsx b/packages/page-society/src/Candidates/BidNew.tsx index cd1ad963d3..31be75adb4 100644 --- a/packages/page-society/src/Candidates/BidNew.tsx +++ b/packages/page-society/src/Candidates/BidNew.tsx @@ -8,7 +8,7 @@ import React, { useState } from 'react'; import { InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { onClose: () => void; diff --git a/packages/page-society/src/Candidates/Bids.tsx b/packages/page-society/src/Candidates/Bids.tsx index 5a7a752d69..55e165e7f6 100644 --- a/packages/page-society/src/Candidates/Bids.tsx +++ b/packages/page-society/src/Candidates/Bids.tsx @@ -8,8 +8,8 @@ import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import BidRow from './Bid'; +import { useTranslation } from '../translate.js'; +import BidRow from './Bid.js'; interface Props { className?: string; diff --git a/packages/page-society/src/Candidates/Candidate.tsx b/packages/page-society/src/Candidates/Candidate.tsx index 0d9445b782..a70ee7bd9b 100644 --- a/packages/page-society/src/Candidates/Candidate.tsx +++ b/packages/page-society/src/Candidates/Candidate.tsx @@ -4,16 +4,16 @@ import type { DeriveSocietyCandidate } from '@polkadot/api-derive/types'; import type { Option } from '@polkadot/types'; import type { AccountId, SocietyVote } from '@polkadot/types/interfaces'; -import type { VoteType } from '../types'; +import type { VoteType } from '../types.js'; import React, { useMemo } from 'react'; import { AddressSmall, Table } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import Votes from '../Overview/Votes'; -import BidType from './BidType'; -import CandidateVoting from './CandidateVoting'; +import Votes from '../Overview/Votes.js'; +import BidType from './BidType.js'; +import CandidateVoting from './CandidateVoting.js'; interface Props { allMembers: string[]; diff --git a/packages/page-society/src/Candidates/CandidateVoting.tsx b/packages/page-society/src/Candidates/CandidateVoting.tsx index 08864814c2..34e4c2ca9f 100644 --- a/packages/page-society/src/Candidates/CandidateVoting.tsx +++ b/packages/page-society/src/Candidates/CandidateVoting.tsx @@ -6,7 +6,7 @@ import React, { useRef, useState } from 'react'; import { Button, Dropdown, InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { candidateId: string; diff --git a/packages/page-society/src/Candidates/Candidates.tsx b/packages/page-society/src/Candidates/Candidates.tsx index d03c4e5143..5427a49f78 100644 --- a/packages/page-society/src/Candidates/Candidates.tsx +++ b/packages/page-society/src/Candidates/Candidates.tsx @@ -7,8 +7,8 @@ import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Candidate from './Candidate'; +import { useTranslation } from '../translate.js'; +import Candidate from './Candidate.js'; interface Props { allMembers: string[]; diff --git a/packages/page-society/src/Candidates/VouchFor.tsx b/packages/page-society/src/Candidates/VouchFor.tsx index 275b7e0587..07f14d8480 100644 --- a/packages/page-society/src/Candidates/VouchFor.tsx +++ b/packages/page-society/src/Candidates/VouchFor.tsx @@ -8,7 +8,7 @@ import React, { useState } from 'react'; import { InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { allMembers: string[]; diff --git a/packages/page-society/src/Candidates/index.tsx b/packages/page-society/src/Candidates/index.tsx index b6a814ccf6..e4e70c7c7a 100644 --- a/packages/page-society/src/Candidates/index.tsx +++ b/packages/page-society/src/Candidates/index.tsx @@ -8,11 +8,11 @@ import React from 'react'; import { Button } from '@polkadot/react-components'; import { useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import BidNew from './BidNew'; -import Bids from './Bids'; -import AllCandidates from './Candidates'; -import VouchFor from './VouchFor'; +import { useTranslation } from '../translate.js'; +import BidNew from './BidNew.js'; +import Bids from './Bids.js'; +import AllCandidates from './Candidates.js'; +import VouchFor from './VouchFor.js'; interface Props { allMembers: string[]; diff --git a/packages/page-society/src/Overview/Defender.tsx b/packages/page-society/src/Overview/Defender.tsx index b00c37bca8..431bfd47b9 100644 --- a/packages/page-society/src/Overview/Defender.tsx +++ b/packages/page-society/src/Overview/Defender.tsx @@ -3,16 +3,16 @@ import type { DeriveSociety, DeriveSocietyMember } from '@polkadot/api-derive/types'; import type { SocietyVote } from '@polkadot/types/interfaces'; -import type { VoteType } from '../types'; +import type { VoteType } from '../types.js'; import React, { useRef } from 'react'; import { AddressSmall, Table } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import DefenderVoting from './DefenderVoting'; -import Votes from './Votes'; +import { useTranslation } from '../translate.js'; +import DefenderVoting from './DefenderVoting.js'; +import Votes from './Votes.js'; interface Props { className?: string; diff --git a/packages/page-society/src/Overview/DefenderVoting.tsx b/packages/page-society/src/Overview/DefenderVoting.tsx index 486de2be70..8178a63d11 100644 --- a/packages/page-society/src/Overview/DefenderVoting.tsx +++ b/packages/page-society/src/Overview/DefenderVoting.tsx @@ -6,7 +6,7 @@ import React, { useRef, useState } from 'react'; import { Button, Dropdown, InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { isMember: boolean; diff --git a/packages/page-society/src/Overview/DesignKusama.tsx b/packages/page-society/src/Overview/DesignKusama.tsx index 5ad5096f19..2810b57502 100644 --- a/packages/page-society/src/Overview/DesignKusama.tsx +++ b/packages/page-society/src/Overview/DesignKusama.tsx @@ -9,8 +9,8 @@ import { KUSAMA_GENESIS } from '@polkadot/apps-config'; import { Button, Modal } from '@polkadot/react-components'; import { useApi, useToggle } from '@polkadot/react-hooks'; -import drawCanary, { PADD, SIZE } from '../draw/canary'; -import { useTranslation } from '../translate'; +import drawCanary, { PADD, SIZE } from '../draw/canary.js'; +import { useTranslation } from '../translate.js'; interface Props { accountId: AccountId; diff --git a/packages/page-society/src/Overview/Member.tsx b/packages/page-society/src/Overview/Member.tsx index d32e01a63a..26e7a03ef1 100644 --- a/packages/page-society/src/Overview/Member.tsx +++ b/packages/page-society/src/Overview/Member.tsx @@ -3,7 +3,7 @@ import type { Balance, BlockNumber } from '@polkadot/types/interfaces'; import type { BN } from '@polkadot/util'; -import type { MapMember } from '../types'; +import type { MapMember } from '../types.js'; import React, { useCallback, useMemo } from 'react'; @@ -12,8 +12,8 @@ import { useAccounts, useApi } from '@polkadot/react-hooks'; import { BlockToTime, FormatBalance } from '@polkadot/react-query'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import DesignKusama from './DesignKusama'; +import { useTranslation } from '../translate.js'; +import DesignKusama from './DesignKusama.js'; interface Props { bestNumber?: BN; diff --git a/packages/page-society/src/Overview/Members.tsx b/packages/page-society/src/Overview/Members.tsx index ba11c84853..71c9586385 100644 --- a/packages/page-society/src/Overview/Members.tsx +++ b/packages/page-society/src/Overview/Members.tsx @@ -1,15 +1,15 @@ // Copyright 2017-2023 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { MapMember } from '../types'; +import type { MapMember } from '../types.js'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; import { useBestNumber } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import Member from './Member'; +import { useTranslation } from '../translate.js'; +import Member from './Member.js'; interface Props { className?: string; diff --git a/packages/page-society/src/Overview/Summary.tsx b/packages/page-society/src/Overview/Summary.tsx index aeaba63c97..47cf3b7628 100644 --- a/packages/page-society/src/Overview/Summary.tsx +++ b/packages/page-society/src/Overview/Summary.tsx @@ -10,7 +10,7 @@ import { CardSummary, styled, SummaryBox } from '@polkadot/react-components'; import { useApi, useBestNumber, useCall } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-society/src/Overview/Votes.tsx b/packages/page-society/src/Overview/Votes.tsx index 9f2640f333..c8312ea04a 100644 --- a/packages/page-society/src/Overview/Votes.tsx +++ b/packages/page-society/src/Overview/Votes.tsx @@ -1,12 +1,12 @@ // Copyright 2017-2023 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { VoteSplit, VoteType } from '../types'; +import type { VoteSplit, VoteType } from '../types.js'; import React, { useEffect, useState } from 'react'; -import { useTranslation } from '../translate'; -import VotesExpander from './VotesExpander'; +import { useTranslation } from '../translate.js'; +import VotesExpander from './VotesExpander.js'; interface Props { votes?: VoteType[]; diff --git a/packages/page-society/src/Overview/VotesExpander.tsx b/packages/page-society/src/Overview/VotesExpander.tsx index fa438a31a6..cbab8fe6ff 100644 --- a/packages/page-society/src/Overview/VotesExpander.tsx +++ b/packages/page-society/src/Overview/VotesExpander.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { VoteType } from '../types'; +import type { VoteType } from '../types.js'; import React from 'react'; diff --git a/packages/page-society/src/Overview/index.tsx b/packages/page-society/src/Overview/index.tsx index f33685b919..72cce500d8 100644 --- a/packages/page-society/src/Overview/index.tsx +++ b/packages/page-society/src/Overview/index.tsx @@ -3,15 +3,15 @@ import type { DeriveSociety } from '@polkadot/api-derive/types'; import type { BN } from '@polkadot/util'; -import type { MapMember } from '../types'; +import type { MapMember } from '../types.js'; import React from 'react'; import { styled } from '@polkadot/react-components'; -import Defender from './Defender'; -import Members from './Members'; -import Summary from './Summary'; +import Defender from './Defender.js'; +import Members from './Members.js'; +import Summary from './Summary.js'; interface Props { className?: string; diff --git a/packages/page-society/src/Suspended/Suspension.tsx b/packages/page-society/src/Suspended/Suspension.tsx index bb523e07a3..0f2a646d95 100644 --- a/packages/page-society/src/Suspended/Suspension.tsx +++ b/packages/page-society/src/Suspended/Suspension.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { AddressSmall, Table } from '@polkadot/react-components'; -import BidType from '../Candidates/BidType'; +import BidType from '../Candidates/BidType.js'; interface Props { balance?: BalanceOf; diff --git a/packages/page-society/src/Suspended/index.tsx b/packages/page-society/src/Suspended/index.tsx index 107f2ef65b..0a86d18648 100644 --- a/packages/page-society/src/Suspended/index.tsx +++ b/packages/page-society/src/Suspended/index.tsx @@ -11,8 +11,8 @@ import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import Suspension from './Suspension'; +import { useTranslation } from '../translate.js'; +import Suspension from './Suspension.js'; interface Props { className?: string; diff --git a/packages/page-society/src/index.tsx b/packages/page-society/src/index.tsx index d7cb9ab99e..eda73d3a4f 100644 --- a/packages/page-society/src/index.tsx +++ b/packages/page-society/src/index.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { DeriveSociety, DeriveSocietyMember } from '@polkadot/api-derive/types'; -import type { MapMember } from './types'; +import type { MapMember } from './types.js'; import React, { useMemo } from 'react'; import { Route, Switch } from 'react-router'; @@ -11,13 +11,13 @@ import { Tabs } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { BN, BN_THREE, BN_TWO } from '@polkadot/util'; -import Candidates from './Candidates'; -import Overview from './Overview'; -import Suspended from './Suspended'; -import { useTranslation } from './translate'; -import useCounter from './useCounter'; -import useMembers from './useMembers'; -import useVoters from './useVoters'; +import Candidates from './Candidates/index.js'; +import Overview from './Overview/index.js'; +import Suspended from './Suspended/index.js'; +import { useTranslation } from './translate.js'; +import useCounter from './useCounter.js'; +import useMembers from './useMembers.js'; +import useVoters from './useVoters.js'; interface Props { basePath: string; diff --git a/packages/page-society/src/useMembers.ts b/packages/page-society/src/useMembers.ts index 4adc21270f..20d4c9ba5c 100644 --- a/packages/page-society/src/useMembers.ts +++ b/packages/page-society/src/useMembers.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { DeriveSocietyMember } from '@polkadot/api-derive/types'; -import type { OwnMembers } from './types'; +import type { OwnMembers } from './types.js'; import { useEffect, useState } from 'react'; diff --git a/packages/page-society/src/useVoters.ts b/packages/page-society/src/useVoters.ts index 61133e7ef3..e778dc1038 100644 --- a/packages/page-society/src/useVoters.ts +++ b/packages/page-society/src/useVoters.ts @@ -3,7 +3,7 @@ import type { ApiPromise } from '@polkadot/api'; import type { DeriveSocietyCandidate } from '@polkadot/api-derive/types'; -import type { Voters } from './types'; +import type { Voters } from './types.js'; import { useEffect, useState } from 'react'; diff --git a/packages/page-staking/src/Actions/Account/BondExtra.tsx b/packages/page-staking/src/Actions/Account/BondExtra.tsx index 5f6dbe58ee..f9f65425b0 100644 --- a/packages/page-staking/src/Actions/Account/BondExtra.tsx +++ b/packages/page-staking/src/Actions/Account/BondExtra.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types'; -import type { AmountValidateState } from '../types'; +import type { AmountValidateState } from '../types.js'; import React, { useMemo, useState } from 'react'; @@ -12,8 +12,8 @@ import { useApi, useCall } from '@polkadot/react-hooks'; import { BalanceFree } from '@polkadot/react-query'; import { BN, BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../../translate'; -import ValidateAmount from './InputValidateAmount'; +import { useTranslation } from '../../translate.js'; +import ValidateAmount from './InputValidateAmount.js'; interface Props { controllerId: string | null; diff --git a/packages/page-staking/src/Actions/Account/InjectKeys.tsx b/packages/page-staking/src/Actions/Account/InjectKeys.tsx index b012a3dafa..9e4f6e76bf 100644 --- a/packages/page-staking/src/Actions/Account/InjectKeys.tsx +++ b/packages/page-staking/src/Actions/Account/InjectKeys.tsx @@ -11,7 +11,7 @@ import { keyring } from '@polkadot/ui-keyring'; import { assert, u8aToHex } from '@polkadot/util'; import { keyExtractSuri, mnemonicValidate } from '@polkadot/util-crypto'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props { onClose: () => void; diff --git a/packages/page-staking/src/Actions/Account/InputValidateAmount.tsx b/packages/page-staking/src/Actions/Account/InputValidateAmount.tsx index 4bbf97c7eb..8132dce2b6 100644 --- a/packages/page-staking/src/Actions/Account/InputValidateAmount.tsx +++ b/packages/page-staking/src/Actions/Account/InputValidateAmount.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; -import type { AmountValidateState } from '../types'; +import type { AmountValidateState } from '../types.js'; import React, { useEffect, useState } from 'react'; @@ -10,7 +10,7 @@ import { MarkError, MarkWarning } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { BN, BN_TEN, BN_THOUSAND, BN_ZERO, formatBalance } from '@polkadot/util'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props { controllerId: string | null; diff --git a/packages/page-staking/src/Actions/Account/InputValidationController.tsx b/packages/page-staking/src/Actions/Account/InputValidationController.tsx index 1f2af6cf15..2791ebf1ad 100644 --- a/packages/page-staking/src/Actions/Account/InputValidationController.tsx +++ b/packages/page-staking/src/Actions/Account/InputValidationController.tsx @@ -10,7 +10,7 @@ import React, { useEffect, useState } from 'react'; import { MarkError, MarkWarning } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props { accountId: string | null; diff --git a/packages/page-staking/src/Actions/Account/InputValidationSessionKey.tsx b/packages/page-staking/src/Actions/Account/InputValidationSessionKey.tsx index 466579ed60..3378cb02d1 100644 --- a/packages/page-staking/src/Actions/Account/InputValidationSessionKey.tsx +++ b/packages/page-staking/src/Actions/Account/InputValidationSessionKey.tsx @@ -7,7 +7,7 @@ import React, { useEffect, useState } from 'react'; import { MarkWarning } from '@polkadot/react-components'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props extends I18nProps { controllerId: string; diff --git a/packages/page-staking/src/Actions/Account/InputValidationUnstakeThreshold.tsx b/packages/page-staking/src/Actions/Account/InputValidationUnstakeThreshold.tsx index cf22ce0a94..ab6011f931 100644 --- a/packages/page-staking/src/Actions/Account/InputValidationUnstakeThreshold.tsx +++ b/packages/page-staking/src/Actions/Account/InputValidationUnstakeThreshold.tsx @@ -8,7 +8,7 @@ import React, { useEffect, useState } from 'react'; import { MarkWarning } from '@polkadot/react-components'; import { BN_TEN } from '@polkadot/util'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props { unstakeThreshold: BN | undefined; diff --git a/packages/page-staking/src/Actions/Account/KickNominees.tsx b/packages/page-staking/src/Actions/Account/KickNominees.tsx index 14560f80f6..e54924f83b 100644 --- a/packages/page-staking/src/Actions/Account/KickNominees.tsx +++ b/packages/page-staking/src/Actions/Account/KickNominees.tsx @@ -9,8 +9,8 @@ import React, { useEffect, useMemo, useState } from 'react'; import { InputAddressMulti, Modal, Spinner, TxButton } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { useTranslation } from '../../translate'; -import SenderInfo from '../partials/SenderInfo'; +import { useTranslation } from '../../translate.js'; +import SenderInfo from '../partials/SenderInfo.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Actions/Account/ListNominees.tsx b/packages/page-staking/src/Actions/Account/ListNominees.tsx index 96c99aa4a9..595173bf95 100644 --- a/packages/page-staking/src/Actions/Account/ListNominees.tsx +++ b/packages/page-staking/src/Actions/Account/ListNominees.tsx @@ -10,8 +10,8 @@ import { AddressMini, ExpanderScroll, MarkWarning } from '@polkadot/react-compon import { useApi, useCall } from '@polkadot/react-hooks'; import { isFunction, isToBn } from '@polkadot/util'; -import { useTranslation } from '../../translate'; -import useInactives from '../useInactives'; +import { useTranslation } from '../../translate.js'; +import useInactives from '../useInactives.js'; interface Props { nominating?: string[]; diff --git a/packages/page-staking/src/Actions/Account/Nominate.tsx b/packages/page-staking/src/Actions/Account/Nominate.tsx index a03f192310..dbc39e8d30 100644 --- a/packages/page-staking/src/Actions/Account/Nominate.tsx +++ b/packages/page-staking/src/Actions/Account/Nominate.tsx @@ -2,15 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { SortedTargets } from '../../types'; -import type { NominateInfo } from '../partials/types'; +import type { SortedTargets } from '../../types.js'; +import type { NominateInfo } from '../partials/types.js'; import React, { useState } from 'react'; import { Modal, styled, TxButton } from '@polkadot/react-components'; -import { useTranslation } from '../../translate'; -import NominatePartial from '../partials/Nominate'; +import { useTranslation } from '../../translate.js'; +import NominatePartial from '../partials/Nominate.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Actions/Account/Rebond.tsx b/packages/page-staking/src/Actions/Account/Rebond.tsx index 0cb40f3c0a..a727d54b93 100644 --- a/packages/page-staking/src/Actions/Account/Rebond.tsx +++ b/packages/page-staking/src/Actions/Account/Rebond.tsx @@ -9,8 +9,8 @@ import { InputBalance, Modal, TxButton } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; import { BN, BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../../translate'; -import SenderInfo from '../partials/SenderInfo'; +import { useTranslation } from '../../translate.js'; +import SenderInfo from '../partials/SenderInfo.js'; interface Props { controllerId: string | null; diff --git a/packages/page-staking/src/Actions/Account/SetControllerAccount.tsx b/packages/page-staking/src/Actions/Account/SetControllerAccount.tsx index d6e3a58658..a3da576130 100644 --- a/packages/page-staking/src/Actions/Account/SetControllerAccount.tsx +++ b/packages/page-staking/src/Actions/Account/SetControllerAccount.tsx @@ -6,8 +6,8 @@ import React, { useCallback, useState } from 'react'; import { InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { useTranslation } from '../../translate'; -import InputValidationController from './InputValidationController'; +import { useTranslation } from '../../translate.js'; +import InputValidationController from './InputValidationController.js'; interface Props { defaultControllerId: string; diff --git a/packages/page-staking/src/Actions/Account/SetRewardDestination.tsx b/packages/page-staking/src/Actions/Account/SetRewardDestination.tsx index 62b60c8100..37acc43771 100644 --- a/packages/page-staking/src/Actions/Account/SetRewardDestination.tsx +++ b/packages/page-staking/src/Actions/Account/SetRewardDestination.tsx @@ -3,15 +3,15 @@ import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; import type { RewardDestination } from '@polkadot/types/interfaces'; -import type { DestinationType } from '../types'; +import type { DestinationType } from '../types.js'; import React, { useMemo, useState } from 'react'; import { Dropdown, InputAddress, MarkError, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { useTranslation } from '../../translate'; -import { createDestCurr } from '../destOptions'; +import { useTranslation } from '../../translate.js'; +import { createDestCurr } from '../destOptions.js'; interface Props { defaultDestination?: RewardDestination; diff --git a/packages/page-staking/src/Actions/Account/SetSessionKey.tsx b/packages/page-staking/src/Actions/Account/SetSessionKey.tsx index c466b6914d..cbe79702d8 100644 --- a/packages/page-staking/src/Actions/Account/SetSessionKey.tsx +++ b/packages/page-staking/src/Actions/Account/SetSessionKey.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { SessionInfo } from '../partials/types'; +import type { SessionInfo } from '../partials/types.js'; import React, { useState } from 'react'; import { Modal, TxButton } from '@polkadot/react-components'; -import { useTranslation } from '../../translate'; -import SessionKeyPartital from '../partials/SessionKey'; +import { useTranslation } from '../../translate.js'; +import SessionKeyPartital from '../partials/SessionKey.js'; interface Props { controllerId: string; diff --git a/packages/page-staking/src/Actions/Account/Unbond.tsx b/packages/page-staking/src/Actions/Account/Unbond.tsx index 7f146ac762..17cc45afec 100644 --- a/packages/page-staking/src/Actions/Account/Unbond.tsx +++ b/packages/page-staking/src/Actions/Account/Unbond.tsx @@ -11,8 +11,8 @@ import { useApi } from '@polkadot/react-hooks'; import { BlockToTime, FormatBalance } from '@polkadot/react-query'; import { BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../../translate'; -import useUnbondDuration from '../useUnbondDuration'; +import { useTranslation } from '../../translate.js'; +import useUnbondDuration from '../useUnbondDuration.js'; interface Props { controllerId?: AccountId | string | null; diff --git a/packages/page-staking/src/Actions/Account/Validate.tsx b/packages/page-staking/src/Actions/Account/Validate.tsx index 370f9e3543..314e976567 100644 --- a/packages/page-staking/src/Actions/Account/Validate.tsx +++ b/packages/page-staking/src/Actions/Account/Validate.tsx @@ -2,14 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { ValidateInfo } from '../partials/types'; +import type { ValidateInfo } from '../partials/types.js'; import React, { useState } from 'react'; import { Modal, TxButton } from '@polkadot/react-components'; -import { useTranslation } from '../../translate'; -import ValidatePartial from '../partials/Validate'; +import { useTranslation } from '../../translate.js'; +import ValidatePartial from '../partials/Validate.js'; interface Props { controllerId: string; diff --git a/packages/page-staking/src/Actions/Account/WarnBond.tsx b/packages/page-staking/src/Actions/Account/WarnBond.tsx index 2a00e05720..a5ea3dda63 100644 --- a/packages/page-staking/src/Actions/Account/WarnBond.tsx +++ b/packages/page-staking/src/Actions/Account/WarnBond.tsx @@ -9,7 +9,7 @@ import React, { useMemo } from 'react'; import { MarkWarning } from '@polkadot/react-components'; import { formatBalance } from '@polkadot/util'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props { minBond?: BN; diff --git a/packages/page-staking/src/Actions/Account/index.tsx b/packages/page-staking/src/Actions/Account/index.tsx index 9cb6d36f52..5aa2632d4d 100644 --- a/packages/page-staking/src/Actions/Account/index.tsx +++ b/packages/page-staking/src/Actions/Account/index.tsx @@ -4,8 +4,8 @@ import type { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types'; import type { StakerState } from '@polkadot/react-hooks/types'; import type { PalletStakingUnappliedSlash } from '@polkadot/types/lookup'; -import type { SortedTargets } from '../../types'; -import type { Slash } from '../types'; +import type { SortedTargets } from '../../types.js'; +import type { Slash } from '../types.js'; import React, { useCallback, useMemo } from 'react'; @@ -14,20 +14,20 @@ import { AddressInfo, AddressMini, AddressSmall, Badge, Button, Menu, Popup, Sta import { useApi, useCall, useQueue, useToggle } from '@polkadot/react-hooks'; import { BN, formatNumber, isFunction } from '@polkadot/util'; -import { useTranslation } from '../../translate'; -import useSlashingSpans from '../useSlashingSpans'; -import BondExtra from './BondExtra'; -import InjectKeys from './InjectKeys'; -import KickNominees from './KickNominees'; -import ListNominees from './ListNominees'; -import Nominate from './Nominate'; -import Rebond from './Rebond'; -import SetControllerAccount from './SetControllerAccount'; -import SetRewardDestination from './SetRewardDestination'; -import SetSessionKey from './SetSessionKey'; -import Unbond from './Unbond'; -import Validate from './Validate'; -import WarnBond from './WarnBond'; +import { useTranslation } from '../../translate.js'; +import useSlashingSpans from '../useSlashingSpans.js'; +import BondExtra from './BondExtra.js'; +import InjectKeys from './InjectKeys.js'; +import KickNominees from './KickNominees.js'; +import ListNominees from './ListNominees.js'; +import Nominate from './Nominate.js'; +import Rebond from './Rebond.js'; +import SetControllerAccount from './SetControllerAccount.js'; +import SetRewardDestination from './SetRewardDestination.js'; +import SetSessionKey from './SetSessionKey.js'; +import Unbond from './Unbond.js'; +import Validate from './Validate.js'; +import WarnBond from './WarnBond.js'; interface Props { allSlashes?: [BN, PalletStakingUnappliedSlash[]][]; diff --git a/packages/page-staking/src/Actions/Accounts.tsx b/packages/page-staking/src/Actions/Accounts.tsx index 7792c7dfab..f724bcee4b 100644 --- a/packages/page-staking/src/Actions/Accounts.tsx +++ b/packages/page-staking/src/Actions/Accounts.tsx @@ -3,15 +3,15 @@ import type { StakerState } from '@polkadot/react-hooks/types'; import type { PalletStakingUnappliedSlash } from '@polkadot/types/lookup'; -import type { SortedTargets } from '../types'; +import type { SortedTargets } from '../types.js'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; import { BN } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Account from './Account'; +import { useTranslation } from '../translate.js'; +import Account from './Account/index.js'; interface Props { allSlashes: [BN, PalletStakingUnappliedSlash[]][]; diff --git a/packages/page-staking/src/Actions/NewNominator.tsx b/packages/page-staking/src/Actions/NewNominator.tsx index 99ed488b76..3fa6463e3e 100644 --- a/packages/page-staking/src/Actions/NewNominator.tsx +++ b/packages/page-staking/src/Actions/NewNominator.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { SortedTargets } from '../types'; -import type { BondInfo, NominateInfo } from './partials/types'; +import type { SortedTargets } from '../types.js'; +import type { BondInfo, NominateInfo } from './partials/types.js'; import React, { useCallback, useState } from 'react'; @@ -10,9 +10,9 @@ import { BatchWarning, Button, Modal, TxButton } from '@polkadot/react-component import { useApi, useToggle } from '@polkadot/react-hooks'; import { isFunction } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import BondPartial from './partials/Bond'; -import NominatePartial from './partials/Nominate'; +import { useTranslation } from '../translate.js'; +import BondPartial from './partials/Bond.js'; +import NominatePartial from './partials/Nominate.js'; interface Props { isInElection?: boolean; diff --git a/packages/page-staking/src/Actions/NewStash.tsx b/packages/page-staking/src/Actions/NewStash.tsx index 21a92bd375..df7ba9e09e 100644 --- a/packages/page-staking/src/Actions/NewStash.tsx +++ b/packages/page-staking/src/Actions/NewStash.tsx @@ -1,15 +1,15 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { BondInfo } from './partials/types'; +import type { BondInfo } from './partials/types.js'; import React, { useCallback, useState } from 'react'; import { Button, Modal, TxButton } from '@polkadot/react-components'; import { useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import BondPartial from './partials/Bond'; +import { useTranslation } from '../translate.js'; +import BondPartial from './partials/Bond.js'; function NewStash (): React.ReactElement { const { t } = useTranslation(); diff --git a/packages/page-staking/src/Actions/NewValidator.tsx b/packages/page-staking/src/Actions/NewValidator.tsx index fda194befb..18aea22381 100644 --- a/packages/page-staking/src/Actions/NewValidator.tsx +++ b/packages/page-staking/src/Actions/NewValidator.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { SortedTargets } from '../types'; -import type { BondInfo, SessionInfo, ValidateInfo } from './partials/types'; +import type { SortedTargets } from '../types.js'; +import type { BondInfo, SessionInfo, ValidateInfo } from './partials/types.js'; import React, { useCallback, useState } from 'react'; @@ -11,10 +11,10 @@ import { BatchWarning, Button, Modal, TxButton } from '@polkadot/react-component import { useApi, useToggle } from '@polkadot/react-hooks'; import { isFunction } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import BondPartial from './partials/Bond'; -import SessionKeyPartial from './partials/SessionKey'; -import ValidatePartial from './partials/Validate'; +import { useTranslation } from '../translate.js'; +import BondPartial from './partials/Bond.js'; +import SessionKeyPartial from './partials/SessionKey.js'; +import ValidatePartial from './partials/Validate.js'; interface Props { isInElection?: boolean; diff --git a/packages/page-staking/src/Actions/Pool/Account.tsx b/packages/page-staking/src/Actions/Pool/Account.tsx index 84515ae5b0..130648e754 100644 --- a/packages/page-staking/src/Actions/Pool/Account.tsx +++ b/packages/page-staking/src/Actions/Pool/Account.tsx @@ -4,7 +4,7 @@ import type { DeriveSessionProgress, DeriveUnlocking } from '@polkadot/api-derive/types'; import type { PoolInfo } from '@polkadot/app-staking2/Pools/types'; import type { PalletNominationPoolsPoolMember, PalletNominationPoolsPoolRoles } from '@polkadot/types/lookup'; -import type { SortedTargets } from '../../types'; +import type { SortedTargets } from '../../types.js'; import React, { useCallback, useMemo } from 'react'; @@ -13,13 +13,13 @@ import { useApi, useQueue, useToggle } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; import { BN, formatNumber } from '@polkadot/util'; -import { useTranslation } from '../../translate'; -import ListNominees from '../Account/ListNominees'; -import Nominate from '../Account/Nominate'; -import useSlashingSpans from '../useSlashingSpans'; -import BondExtra from './BondExtra'; -import Unbond from './Unbond'; -import useAccountInfo from './useAccountInfo'; +import { useTranslation } from '../../translate.js'; +import ListNominees from '../Account/ListNominees.js'; +import Nominate from '../Account/Nominate.js'; +import useSlashingSpans from '../useSlashingSpans.js'; +import BondExtra from './BondExtra.js'; +import Unbond from './Unbond.js'; +import useAccountInfo from './useAccountInfo.js'; interface Props { accountId: string; diff --git a/packages/page-staking/src/Actions/Pool/BondExtra.tsx b/packages/page-staking/src/Actions/Pool/BondExtra.tsx index 7849e7663b..31dfc987a4 100644 --- a/packages/page-staking/src/Actions/Pool/BondExtra.tsx +++ b/packages/page-staking/src/Actions/Pool/BondExtra.tsx @@ -11,8 +11,8 @@ import { useApi } from '@polkadot/react-hooks'; import { BalanceFree } from '@polkadot/react-query'; import { BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../../translate'; -import PoolInfo from '../partials/PoolInfo'; +import { useTranslation } from '../../translate.js'; +import PoolInfo from '../partials/PoolInfo.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Actions/Pool/Unbond.tsx b/packages/page-staking/src/Actions/Pool/Unbond.tsx index 58976f73a9..7312ca0993 100644 --- a/packages/page-staking/src/Actions/Pool/Unbond.tsx +++ b/packages/page-staking/src/Actions/Pool/Unbond.tsx @@ -9,9 +9,9 @@ import { InputBalance, Modal, Static, TxButton } from '@polkadot/react-component import { useApi } from '@polkadot/react-hooks'; import { BlockToTime, FormatBalance } from '@polkadot/react-query'; -import { useTranslation } from '../../translate'; -import PoolInfo from '../partials/PoolInfo'; -import useUnbondDuration from '../useUnbondDuration'; +import { useTranslation } from '../../translate.js'; +import PoolInfo from '../partials/PoolInfo.js'; +import useUnbondDuration from '../useUnbondDuration.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Actions/Pool/index.tsx b/packages/page-staking/src/Actions/Pool/index.tsx index 661a513410..6b1028cdcd 100644 --- a/packages/page-staking/src/Actions/Pool/index.tsx +++ b/packages/page-staking/src/Actions/Pool/index.tsx @@ -4,13 +4,13 @@ import type { DeriveSessionProgress } from '@polkadot/api-derive/types'; import type { u32 } from '@polkadot/types'; import type { PalletNominationPoolsPoolMember } from '@polkadot/types/lookup'; -import type { SortedTargets } from '../../types'; +import type { SortedTargets } from '../../types.js'; import React from 'react'; import usePoolInfo from '@polkadot/app-staking2/Pools/usePoolInfo'; -import Account from './Account'; +import Account from './Account.js'; interface Props { count: number; diff --git a/packages/page-staking/src/Actions/Pool/useAccountInfo.ts b/packages/page-staking/src/Actions/Pool/useAccountInfo.ts index a87b0d4649..9fea2e3191 100644 --- a/packages/page-staking/src/Actions/Pool/useAccountInfo.ts +++ b/packages/page-staking/src/Actions/Pool/useAccountInfo.ts @@ -3,7 +3,7 @@ import type { Option } from '@polkadot/types'; import type { PalletNominationPoolsPoolMember } from '@polkadot/types/lookup'; -import type { AccountInfo } from './types'; +import type { AccountInfo } from './types.js'; import { useEffect, useState } from 'react'; diff --git a/packages/page-staking/src/Actions/Pools.tsx b/packages/page-staking/src/Actions/Pools.tsx index 9b9c001d81..8e11d04856 100644 --- a/packages/page-staking/src/Actions/Pools.tsx +++ b/packages/page-staking/src/Actions/Pools.tsx @@ -4,7 +4,7 @@ import type { DeriveSessionProgress } from '@polkadot/api-derive/types'; import type { OwnPool } from '@polkadot/app-staking2/Pools/types'; import type { PalletStakingUnappliedSlash } from '@polkadot/types/lookup'; -import type { SortedTargets } from '../types'; +import type { SortedTargets } from '../types.js'; import React, { useRef } from 'react'; @@ -12,8 +12,8 @@ import { Table } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { BN } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Pool from './Pool'; +import { useTranslation } from '../translate.js'; +import Pool from './Pool/index.js'; interface Props { allSlashes: [BN, PalletStakingUnappliedSlash[]][]; diff --git a/packages/page-staking/src/Actions/index.tsx b/packages/page-staking/src/Actions/index.tsx index c59159b3bf..e9017975d8 100644 --- a/packages/page-staking/src/Actions/index.tsx +++ b/packages/page-staking/src/Actions/index.tsx @@ -5,7 +5,7 @@ import '@polkadot/api-augment'; import type { OwnPool } from '@polkadot/app-staking2/Pools/types'; import type { StakerState } from '@polkadot/react-hooks/types'; -import type { SortedTargets } from '../types'; +import type { SortedTargets } from '../types.js'; import React, { useMemo, useRef, useState } from 'react'; @@ -14,13 +14,13 @@ import { useApi, useAvailableSlashes } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; import { BN, BN_ZERO } from '@polkadot/util'; -import ElectionBanner from '../ElectionBanner'; -import { useTranslation } from '../translate'; -import Accounts from './Accounts'; -import NewNominator from './NewNominator'; -import NewStash from './NewStash'; -import NewValidator from './NewValidator'; -import Pools from './Pools'; +import ElectionBanner from '../ElectionBanner.js'; +import { useTranslation } from '../translate.js'; +import Accounts from './Accounts.js'; +import NewNominator from './NewNominator.js'; +import NewStash from './NewStash.js'; +import NewValidator from './NewValidator.js'; +import Pools from './Pools.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Actions/partials/Bond.tsx b/packages/page-staking/src/Actions/partials/Bond.tsx index 5476959c02..b959cc2136 100644 --- a/packages/page-staking/src/Actions/partials/Bond.tsx +++ b/packages/page-staking/src/Actions/partials/Bond.tsx @@ -3,8 +3,8 @@ import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; import type { BN } from '@polkadot/util'; -import type { AmountValidateState, DestinationType } from '../types'; -import type { BondInfo } from './types'; +import type { AmountValidateState, DestinationType } from '../types.js'; +import type { BondInfo } from './types.js'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; @@ -13,11 +13,11 @@ import { useApi, useCall } from '@polkadot/react-hooks'; import { BalanceFree, BlockToTime } from '@polkadot/react-query'; import { BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../../translate'; -import InputValidateAmount from '../Account/InputValidateAmount'; -import InputValidationController from '../Account/InputValidationController'; -import { createDestCurr } from '../destOptions'; -import useUnbondDuration from '../useUnbondDuration'; +import { useTranslation } from '../../translate.js'; +import InputValidateAmount from '../Account/InputValidateAmount.js'; +import InputValidationController from '../Account/InputValidationController.js'; +import { createDestCurr } from '../destOptions.js'; +import useUnbondDuration from '../useUnbondDuration.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Actions/partials/Nominate.tsx b/packages/page-staking/src/Actions/partials/Nominate.tsx index 79b639d73e..24e4c0e3ac 100644 --- a/packages/page-staking/src/Actions/partials/Nominate.tsx +++ b/packages/page-staking/src/Actions/partials/Nominate.tsx @@ -2,18 +2,18 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { SortedTargets } from '../../types'; -import type { NominateInfo } from './types'; +import type { SortedTargets } from '../../types.js'; +import type { NominateInfo } from './types.js'; import React, { useEffect, useState } from 'react'; import { InputAddressMulti, MarkWarning, Modal, styled } from '@polkadot/react-components'; import { useApi, useFavorites } from '@polkadot/react-hooks'; -import { MAX_NOMINATIONS, STORE_FAVS_BASE } from '../../constants'; -import { useTranslation } from '../../translate'; -import PoolInfo from './PoolInfo'; -import SenderInfo from './SenderInfo'; +import { MAX_NOMINATIONS, STORE_FAVS_BASE } from '../../constants.js'; +import { useTranslation } from '../../translate.js'; +import PoolInfo from './PoolInfo.js'; +import SenderInfo from './SenderInfo.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Actions/partials/PoolInfo.tsx b/packages/page-staking/src/Actions/partials/PoolInfo.tsx index 6a20bcee0f..50d4b2e8fe 100644 --- a/packages/page-staking/src/Actions/partials/PoolInfo.tsx +++ b/packages/page-staking/src/Actions/partials/PoolInfo.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { InputAddress, InputNumber, Modal } from '@polkadot/react-components'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Actions/partials/SenderInfo.tsx b/packages/page-staking/src/Actions/partials/SenderInfo.tsx index 32ad653bcc..1b9d3fc007 100644 --- a/packages/page-staking/src/Actions/partials/SenderInfo.tsx +++ b/packages/page-staking/src/Actions/partials/SenderInfo.tsx @@ -5,7 +5,7 @@ import React from 'react'; import { InputAddress, Modal } from '@polkadot/react-components'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Actions/partials/SessionKey.tsx b/packages/page-staking/src/Actions/partials/SessionKey.tsx index 677538dd4b..bec32610ec 100644 --- a/packages/page-staking/src/Actions/partials/SessionKey.tsx +++ b/packages/page-staking/src/Actions/partials/SessionKey.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { SessionInfo } from './types'; +import type { SessionInfo } from './types.js'; import React, { useEffect, useState } from 'react'; @@ -9,7 +9,7 @@ import { Input, InputAddress, Modal } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; import { isHex } from '@polkadot/util'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Actions/partials/Validate.tsx b/packages/page-staking/src/Actions/partials/Validate.tsx index 5d3734e48e..e82470b796 100644 --- a/packages/page-staking/src/Actions/partials/Validate.tsx +++ b/packages/page-staking/src/Actions/partials/Validate.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { ValidateInfo } from './types'; +import type { ValidateInfo } from './types.js'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; @@ -9,7 +9,7 @@ import { Dropdown, InputAddress, InputNumber, MarkError, Modal } from '@polkadot import { useApi } from '@polkadot/react-hooks'; import { BN, BN_HUNDRED as MAX_COMM, BN_ONE, bnMax, isFunction } from '@polkadot/util'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Bags/Bag.tsx b/packages/page-staking/src/Bags/Bag.tsx index 9c965a685e..3cddd4272a 100644 --- a/packages/page-staking/src/Bags/Bag.tsx +++ b/packages/page-staking/src/Bags/Bag.tsx @@ -4,17 +4,17 @@ import type { AccountId32 } from '@polkadot/types/interfaces'; import type { PalletBagsListListBag } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { ListNode, StashNode } from './types'; +import type { ListNode, StashNode } from './types.js'; import React, { useEffect, useState } from 'react'; import { AddressMini, Table } from '@polkadot/react-components'; import { formatNumber } from '@polkadot/util'; -import Rebag from './Rebag'; -import Stash from './Stash'; -import useBagEntries from './useBagEntries'; -import useBonded from './useBonded'; +import Rebag from './Rebag.js'; +import Stash from './Stash.js'; +import useBagEntries from './useBagEntries.js'; +import useBonded from './useBonded.js'; interface Props { bagLower: BN; diff --git a/packages/page-staking/src/Bags/Rebag.tsx b/packages/page-staking/src/Bags/Rebag.tsx index 4ad020e0ca..d3caf619d5 100644 --- a/packages/page-staking/src/Bags/Rebag.tsx +++ b/packages/page-staking/src/Bags/Rebag.tsx @@ -2,15 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { BagMap } from './types'; +import type { BagMap } from './types.js'; import React, { useMemo, useState } from 'react'; import { Button, InputAddress, InputAddressMulti, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useToggle, useTxBatch } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import useBagsNodes from './useBagsNodes'; +import { useTranslation } from '../translate.js'; +import useBagsNodes from './useBagsNodes.js'; interface Props { bagLower: BN; diff --git a/packages/page-staking/src/Bags/Stash.tsx b/packages/page-staking/src/Bags/Stash.tsx index 2cc35c44ea..8674594242 100644 --- a/packages/page-staking/src/Bags/Stash.tsx +++ b/packages/page-staking/src/Bags/Stash.tsx @@ -2,14 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { ListNode } from './types'; +import type { ListNode } from './types.js'; import React, { useMemo } from 'react'; import { AddressMini, styled, TxButton } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { bagLower: BN; diff --git a/packages/page-staking/src/Bags/Summary.tsx b/packages/page-staking/src/Bags/Summary.tsx index efe03ffbae..54fb2197a5 100644 --- a/packages/page-staking/src/Bags/Summary.tsx +++ b/packages/page-staking/src/Bags/Summary.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { BagMap } from './types'; +import type { BagMap } from './types.js'; import React, { useMemo } from 'react'; @@ -10,8 +10,8 @@ import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { useCall } from '@polkadot/react-hooks'; import { formatNumber, isNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import useQueryModule from './useQueryModule'; +import { useTranslation } from '../translate.js'; +import useQueryModule from './useQueryModule.js'; interface Props { bags?: unknown[]; diff --git a/packages/page-staking/src/Bags/index.tsx b/packages/page-staking/src/Bags/index.tsx index dafeafb544..18cfac8b34 100644 --- a/packages/page-staking/src/Bags/index.tsx +++ b/packages/page-staking/src/Bags/index.tsx @@ -2,17 +2,17 @@ // SPDX-License-Identifier: Apache-2.0 import type { StakerState } from '@polkadot/react-hooks/types'; -import type { BagInfo, BagMap, StashNode } from './types'; +import type { BagInfo, BagMap, StashNode } from './types.js'; import React, { useMemo, useRef, useState } from 'react'; import { Button, MarkWarning, Table, ToggleGroup } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Bag from './Bag'; -import Summary from './Summary'; -import useBagsList from './useBagsList'; -import useBagsNodes from './useBagsNodes'; +import { useTranslation } from '../translate.js'; +import Bag from './Bag.js'; +import Summary from './Summary.js'; +import useBagsList from './useBagsList.js'; +import useBagsNodes from './useBagsNodes.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Bags/useBagEntries.tsx b/packages/page-staking/src/Bags/useBagEntries.tsx index db3bdae6d2..5df74b9b56 100644 --- a/packages/page-staking/src/Bags/useBagEntries.tsx +++ b/packages/page-staking/src/Bags/useBagEntries.tsx @@ -9,7 +9,7 @@ import { useEffect, useState } from 'react'; import { createNamedHook, useCall } from '@polkadot/react-hooks'; -import useQueryModule from './useQueryModule'; +import useQueryModule from './useQueryModule.js'; interface Result { isCompleted: boolean; diff --git a/packages/page-staking/src/Bags/useBagsList.ts b/packages/page-staking/src/Bags/useBagsList.ts index d1fcf14683..6a56eeb4b2 100644 --- a/packages/page-staking/src/Bags/useBagsList.ts +++ b/packages/page-staking/src/Bags/useBagsList.ts @@ -4,14 +4,14 @@ import type { Option, StorageKey, u64 } from '@polkadot/types'; import type { PalletBagsListListBag } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { BagInfo } from './types'; +import type { BagInfo } from './types.js'; import { useEffect, useState } from 'react'; import { createNamedHook, useCall, useMapKeys } from '@polkadot/react-hooks'; import { BN_ZERO } from '@polkadot/util'; -import useQueryModule from './useQueryModule'; +import useQueryModule from './useQueryModule.js'; const KEY_OPTS = { transform: (keys: StorageKey<[u64]>[]): BN[] => diff --git a/packages/page-staking/src/Bags/useBagsNodes.tsx b/packages/page-staking/src/Bags/useBagsNodes.tsx index 54f235e5e2..c08aebfc32 100644 --- a/packages/page-staking/src/Bags/useBagsNodes.tsx +++ b/packages/page-staking/src/Bags/useBagsNodes.tsx @@ -3,13 +3,13 @@ import type { Option } from '@polkadot/types'; import type { PalletBagsListListNode } from '@polkadot/types/lookup'; -import type { BagMap } from './types'; +import type { BagMap } from './types.js'; import { useEffect, useState } from 'react'; import { createNamedHook, useCall } from '@polkadot/react-hooks'; -import useQueryModule from './useQueryModule'; +import useQueryModule from './useQueryModule.js'; const MULTI_OPTS = { transform: (opts: Option[]): BagMap => diff --git a/packages/page-staking/src/Bags/useBonded.ts b/packages/page-staking/src/Bags/useBonded.ts index c74f740537..f99e200a0a 100644 --- a/packages/page-staking/src/Bags/useBonded.ts +++ b/packages/page-staking/src/Bags/useBonded.ts @@ -3,7 +3,7 @@ import type { DeriveStakingAccount } from '@polkadot/api-derive/types'; import type { AccountId32 } from '@polkadot/types/interfaces'; -import type { ListNode } from './types'; +import type { ListNode } from './types.js'; import { createNamedHook, useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/page-staking/src/ElectionBanner.tsx b/packages/page-staking/src/ElectionBanner.tsx index 13d77eceb7..1b6ffaa367 100644 --- a/packages/page-staking/src/ElectionBanner.tsx +++ b/packages/page-staking/src/ElectionBanner.tsx @@ -5,7 +5,7 @@ import React from 'react'; import { MarkWarning } from '@polkadot/react-components'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface Props { isInElection?: boolean; diff --git a/packages/page-staking/src/Filtering.tsx b/packages/page-staking/src/Filtering.tsx index a1a82ff8e6..6519d9831e 100644 --- a/packages/page-staking/src/Filtering.tsx +++ b/packages/page-staking/src/Filtering.tsx @@ -8,7 +8,7 @@ import { Input, Toggle } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; import { isString } from '@polkadot/util'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface Props { children?: React.ReactNode; diff --git a/packages/page-staking/src/Legend.tsx b/packages/page-staking/src/Legend.tsx index 1aa109d87e..57a3ae1650 100644 --- a/packages/page-staking/src/Legend.tsx +++ b/packages/page-staking/src/Legend.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { Badge, styled, Tag } from '@polkadot/react-components'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Payouts/PayButton.tsx b/packages/page-staking/src/Payouts/PayButton.tsx index a78f54c448..8a37afc12f 100644 --- a/packages/page-staking/src/Payouts/PayButton.tsx +++ b/packages/page-staking/src/Payouts/PayButton.tsx @@ -3,7 +3,7 @@ import type { SubmittableExtrinsic } from '@polkadot/api/types'; import type { EraIndex } from '@polkadot/types/interfaces'; -import type { PayoutValidator } from './types'; +import type { PayoutValidator } from './types.js'; import React, { useEffect, useMemo, useState } from 'react'; @@ -11,7 +11,7 @@ import { ApiPromise } from '@polkadot/api'; import { AddressMini, Button, InputAddress, Modal, Static, styled, TxButton } from '@polkadot/react-components'; import { useApi, useToggle, useTxBatch } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Payouts/Stash.tsx b/packages/page-staking/src/Payouts/Stash.tsx index f02454971d..4487ad1247 100644 --- a/packages/page-staking/src/Payouts/Stash.tsx +++ b/packages/page-staking/src/Payouts/Stash.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { PayoutStash } from './types'; +import type { PayoutStash } from './types.js'; import React, { useEffect, useState } from 'react'; @@ -10,8 +10,8 @@ import { AddressSmall, Table } from '@polkadot/react-components'; import { BlockToTime } from '@polkadot/react-query'; import { BN_MILLION } from '@polkadot/util'; -import useEraBlocks from './useEraBlocks'; -import { createErasString } from './util'; +import useEraBlocks from './useEraBlocks.js'; +import { createErasString } from './util.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Payouts/Validator.tsx b/packages/page-staking/src/Payouts/Validator.tsx index 45b8a94c4c..ee211020c8 100644 --- a/packages/page-staking/src/Payouts/Validator.tsx +++ b/packages/page-staking/src/Payouts/Validator.tsx @@ -2,17 +2,17 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { PayoutValidator } from './types'; +import type { PayoutValidator } from './types.js'; import React, { useMemo } from 'react'; import { AddressMini, AddressSmall, Expander, Table } from '@polkadot/react-components'; import { BlockToTime } from '@polkadot/react-query'; -import { useTranslation } from '../translate'; -import PayButton from './PayButton'; -import useEraBlocks from './useEraBlocks'; -import { createErasString } from './util'; +import { useTranslation } from '../translate.js'; +import PayButton from './PayButton.js'; +import useEraBlocks from './useEraBlocks.js'; +import { createErasString } from './util.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Payouts/index.tsx b/packages/page-staking/src/Payouts/index.tsx index f699f98aa9..e2be50f6ad 100644 --- a/packages/page-staking/src/Payouts/index.tsx +++ b/packages/page-staking/src/Payouts/index.tsx @@ -5,7 +5,7 @@ import type { TFunction } from 'i18next'; import type { DeriveStakerReward } from '@polkadot/api-derive/types'; import type { OwnPool } from '@polkadot/app-staking2/Pools/types'; import type { StakerState } from '@polkadot/react-hooks/types'; -import type { PayoutStash, PayoutValidator } from './types'; +import type { PayoutStash, PayoutValidator } from './types.js'; import React, { useMemo, useRef, useState } from 'react'; @@ -13,11 +13,11 @@ import { Button, MarkWarning, styled, Table, ToggleGroup } from '@polkadot/react import { useApi, useBlockInterval, useCall, useOwnEraRewards } from '@polkadot/react-hooks'; import { BN, BN_THREE } from '@polkadot/util'; -import ElectionBanner from '../ElectionBanner'; -import { useTranslation } from '../translate'; -import PayButton from './PayButton'; -import Stash from './Stash'; -import Validator from './Validator'; +import ElectionBanner from '../ElectionBanner.js'; +import { useTranslation } from '../translate.js'; +import PayButton from './PayButton.js'; +import Stash from './Stash.js'; +import Validator from './Validator.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Query/Chart.tsx b/packages/page-staking/src/Query/Chart.tsx index 8393dc44c2..21aac344ed 100644 --- a/packages/page-staking/src/Query/Chart.tsx +++ b/packages/page-staking/src/Query/Chart.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { LineData } from './types'; +import type { LineData } from './types.js'; import React, { useMemo } from 'react'; diff --git a/packages/page-staking/src/Query/ChartPoints.tsx b/packages/page-staking/src/Query/ChartPoints.tsx index 9c28b636b7..d09d60cf99 100644 --- a/packages/page-staking/src/Query/ChartPoints.tsx +++ b/packages/page-staking/src/Query/ChartPoints.tsx @@ -2,14 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 import type { DeriveStakerPoints } from '@polkadot/api-derive/types'; -import type { LineData, Props } from './types'; +import type { LineData, Props } from './types.js'; import React, { useEffect, useMemo, useRef, useState } from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import Chart from './Chart'; +import { useTranslation } from '../translate.js'; +import Chart from './Chart.js'; const COLORS_POINTS = [undefined, '#acacac']; diff --git a/packages/page-staking/src/Query/ChartPrefs.tsx b/packages/page-staking/src/Query/ChartPrefs.tsx index c465305620..846920a67c 100644 --- a/packages/page-staking/src/Query/ChartPrefs.tsx +++ b/packages/page-staking/src/Query/ChartPrefs.tsx @@ -2,15 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 import type { DeriveStakerPrefs } from '@polkadot/api-derive/types'; -import type { LineData, Props } from './types'; +import type { LineData, Props } from './types.js'; import React, { useEffect, useMemo, useRef, useState } from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; import { BN, BN_BILLION } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Chart from './Chart'; +import { useTranslation } from '../translate.js'; +import Chart from './Chart.js'; const MULT = new BN(100 * 100); const COLORS_POINTS = [undefined, '#acacac']; diff --git a/packages/page-staking/src/Query/ChartRewards.tsx b/packages/page-staking/src/Query/ChartRewards.tsx index 1a2b3289d2..08b601a7ee 100644 --- a/packages/page-staking/src/Query/ChartRewards.tsx +++ b/packages/page-staking/src/Query/ChartRewards.tsx @@ -2,16 +2,16 @@ // SPDX-License-Identifier: Apache-2.0 import type { DeriveEraRewards, DeriveOwnSlashes, DeriveStakerPoints } from '@polkadot/api-derive/types'; -import type { LineData, Props } from './types'; +import type { LineData, Props } from './types.js'; import React, { useEffect, useMemo, useState } from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; import { BN, formatBalance } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Chart from './Chart'; -import { balanceToNumber } from './util'; +import { useTranslation } from '../translate.js'; +import Chart from './Chart.js'; +import { balanceToNumber } from './util.js'; const COLORS_REWARD = ['#8c2200', '#008c22', '#acacac']; diff --git a/packages/page-staking/src/Query/ChartStake.tsx b/packages/page-staking/src/Query/ChartStake.tsx index b57a3dcd30..a904590e1f 100644 --- a/packages/page-staking/src/Query/ChartStake.tsx +++ b/packages/page-staking/src/Query/ChartStake.tsx @@ -2,16 +2,16 @@ // SPDX-License-Identifier: Apache-2.0 import type { DeriveOwnExposure } from '@polkadot/api-derive/types'; -import type { LineData, Props } from './types'; +import type { LineData, Props } from './types.js'; import React, { useEffect, useMemo, useState } from 'react'; import { useApi, useCall } from '@polkadot/react-hooks'; import { BN, formatBalance } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Chart from './Chart'; -import { balanceToNumber } from './util'; +import { useTranslation } from '../translate.js'; +import Chart from './Chart.js'; +import { balanceToNumber } from './util.js'; const COLORS_STAKE = [undefined, '#8c2200', '#acacac']; diff --git a/packages/page-staking/src/Query/Validator.tsx b/packages/page-staking/src/Query/Validator.tsx index 2d832ac205..0cf8ba1264 100644 --- a/packages/page-staking/src/Query/Validator.tsx +++ b/packages/page-staking/src/Query/Validator.tsx @@ -1,16 +1,16 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Props } from './types'; +import type { Props } from './types.js'; import React from 'react'; import { Columar, styled } from '@polkadot/react-components'; -import ChartPoints from './ChartPoints'; -import ChartPrefs from './ChartPrefs'; -import ChartRewards from './ChartRewards'; -import ChartStake from './ChartStake'; +import ChartPoints from './ChartPoints.js'; +import ChartPrefs from './ChartPrefs.js'; +import ChartRewards from './ChartRewards.js'; +import ChartStake from './ChartStake.js'; function Validator ({ className = '', labels, validatorId }: Props): React.ReactElement | null { return ( diff --git a/packages/page-staking/src/Query/index.tsx b/packages/page-staking/src/Query/index.tsx index d2422b4a3f..075d30f858 100644 --- a/packages/page-staking/src/Query/index.tsx +++ b/packages/page-staking/src/Query/index.tsx @@ -9,8 +9,8 @@ import { useParams } from 'react-router-dom'; import { Button, InputAddressSimple, Spinner } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import Validator from './Validator'; +import { useTranslation } from '../translate.js'; +import Validator from './Validator.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Query/useBlockCounts.tsx b/packages/page-staking/src/Query/useBlockCounts.tsx index 3e8b99dcff..f21b329b4e 100644 --- a/packages/page-staking/src/Query/useBlockCounts.tsx +++ b/packages/page-staking/src/Query/useBlockCounts.tsx @@ -3,7 +3,7 @@ import type { DeriveSessionIndexes } from '@polkadot/api-derive/types'; import type { u32 } from '@polkadot/types'; -import type { SessionRewards } from '../types'; +import type { SessionRewards } from '../types.js'; import { useEffect, useState } from 'react'; diff --git a/packages/page-staking/src/Slashes/Era.tsx b/packages/page-staking/src/Slashes/Era.tsx index c93eae4d5f..d093bd0b1a 100644 --- a/packages/page-staking/src/Slashes/Era.tsx +++ b/packages/page-staking/src/Slashes/Era.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { SubmittableExtrinsic } from '@polkadot/api/types'; -import type { SlashEra } from './types'; +import type { SlashEra } from './types.js'; import React, { useCallback, useRef, useState } from 'react'; @@ -10,9 +10,9 @@ import { Button, Table, TxButton } from '@polkadot/react-components'; import { useApi, useCollectiveInstance } from '@polkadot/react-hooks'; import { BN_ONE, isFunction } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Row from './Row'; -import Summary from './Summary'; +import { useTranslation } from '../translate.js'; +import Row from './Row.js'; +import Summary from './Summary.js'; interface Props { buttons: React.ReactNode; diff --git a/packages/page-staking/src/Slashes/Row.tsx b/packages/page-staking/src/Slashes/Row.tsx index 411ee7af7b..aab2ccead1 100644 --- a/packages/page-staking/src/Slashes/Row.tsx +++ b/packages/page-staking/src/Slashes/Row.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Slash } from './types'; +import type { Slash } from './types.js'; import React, { useCallback } from 'react'; @@ -10,7 +10,7 @@ import { useApi } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { index: number; diff --git a/packages/page-staking/src/Slashes/Summary.tsx b/packages/page-staking/src/Slashes/Summary.tsx index 5171197a0c..c1a3f3f737 100644 --- a/packages/page-staking/src/Slashes/Summary.tsx +++ b/packages/page-staking/src/Slashes/Summary.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { DeriveSessionProgress } from '@polkadot/api-derive/types'; -import type { SlashEra } from './types'; +import type { SlashEra } from './types.js'; import React, { useMemo } from 'react'; @@ -11,7 +11,7 @@ import { useApi, useCall } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; import { BN, BN_ONE, formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { slash: SlashEra; diff --git a/packages/page-staking/src/Slashes/index.tsx b/packages/page-staking/src/Slashes/index.tsx index 1d6911d767..6651ceb7f6 100644 --- a/packages/page-staking/src/Slashes/index.tsx +++ b/packages/page-staking/src/Slashes/index.tsx @@ -3,7 +3,7 @@ import type { StakerState } from '@polkadot/react-hooks/types'; import type { UnappliedSlash } from '@polkadot/types/interfaces'; -import type { Slash, SlashEra } from './types'; +import type { Slash, SlashEra } from './types.js'; import React, { useMemo, useRef, useState } from 'react'; @@ -12,8 +12,8 @@ import { Table, ToggleGroup } from '@polkadot/react-components'; import { useAccounts, useApi, useCollectiveMembers } from '@polkadot/react-hooks'; import { BN, BN_ONE, formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Era from './Era'; +import { useTranslation } from '../translate.js'; +import Era from './Era.js'; interface Props { ownStashes?: StakerState[]; diff --git a/packages/page-staking/src/Targets/Nominate.tsx b/packages/page-staking/src/Targets/Nominate.tsx index 895ef93408..26cc5e0378 100644 --- a/packages/page-staking/src/Targets/Nominate.tsx +++ b/packages/page-staking/src/Targets/Nominate.tsx @@ -8,7 +8,7 @@ import React, { useCallback, useMemo, useState } from 'react'; import { AddressMini, Button, InputAddress, Modal, Static, styled, TxButton } from '@polkadot/react-components'; import { useApi, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Targets/Summary.tsx b/packages/page-staking/src/Targets/Summary.tsx index 4eaffdaed5..2dd7a52a8f 100644 --- a/packages/page-staking/src/Targets/Summary.tsx +++ b/packages/page-staking/src/Targets/Summary.tsx @@ -12,7 +12,7 @@ import { useApi, useCall } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; import { BN_THREE, BN_TWO, BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { avgStaked?: BN; diff --git a/packages/page-staking/src/Targets/Validator.tsx b/packages/page-staking/src/Targets/Validator.tsx index 4ce7c0352f..b0b6417342 100644 --- a/packages/page-staking/src/Targets/Validator.tsx +++ b/packages/page-staking/src/Targets/Validator.tsx @@ -3,7 +3,7 @@ import type { UnappliedSlash } from '@polkadot/types/interfaces'; import type { BN } from '@polkadot/util'; -import type { NominatedBy, ValidatorInfo } from '../types'; +import type { NominatedBy, ValidatorInfo } from '../types.js'; import React, { useCallback, useMemo } from 'react'; @@ -13,8 +13,8 @@ import { useApi, useBlockTime, useDeriveAccountInfo } from '@polkadot/react-hook import { FormatBalance } from '@polkadot/react-query'; import { formatNumber } from '@polkadot/util'; -import MaxBadge from '../MaxBadge'; -import { useTranslation } from '../translate'; +import MaxBadge from '../MaxBadge.js'; +import { useTranslation } from '../translate.js'; interface Props { allSlashes?: [BN, UnappliedSlash[]][]; diff --git a/packages/page-staking/src/Targets/index.tsx b/packages/page-staking/src/Targets/index.tsx index 33ef82b667..ba5197cb15 100644 --- a/packages/page-staking/src/Targets/index.tsx +++ b/packages/page-staking/src/Targets/index.tsx @@ -5,7 +5,7 @@ import type { DeriveHasIdentity, DeriveStakingOverview } from '@polkadot/api-der import type { StakerState } from '@polkadot/react-hooks/types'; import type { u32 } from '@polkadot/types-codec'; import type { BN } from '@polkadot/util'; -import type { NominatedByMap, SortedTargets, TargetSortBy, ValidatorInfo } from '../types'; +import type { NominatedByMap, SortedTargets, TargetSortBy, ValidatorInfo } from '../types.js'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; @@ -13,16 +13,16 @@ 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'; -import { MAX_NOMINATIONS } from '../constants'; -import ElectionBanner from '../ElectionBanner'; -import Filtering from '../Filtering'; -import Legend from '../Legend'; -import { useTranslation } from '../translate'; -import useIdentities from '../useIdentities'; -import Nominate from './Nominate'; -import Summary from './Summary'; -import useOwnNominators from './useOwnNominators'; -import Validator from './Validator'; +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'; +import Summary from './Summary.js'; +import useOwnNominators from './useOwnNominators.js'; +import Validator from './Validator.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Validators/ActionsBanner.tsx b/packages/page-staking/src/Validators/ActionsBanner.tsx index f6ef90957a..a8f5dbd221 100644 --- a/packages/page-staking/src/Validators/ActionsBanner.tsx +++ b/packages/page-staking/src/Validators/ActionsBanner.tsx @@ -5,7 +5,7 @@ import React from 'react'; import { MarkWarning } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; function ActionsBanner (): React.ReactElement | null { const { t } = useTranslation(); diff --git a/packages/page-staking/src/Validators/Address/NominatedBy.tsx b/packages/page-staking/src/Validators/Address/NominatedBy.tsx index f9f3f982e7..c8d5c600e7 100644 --- a/packages/page-staking/src/Validators/Address/NominatedBy.tsx +++ b/packages/page-staking/src/Validators/Address/NominatedBy.tsx @@ -3,7 +3,7 @@ import type { ApiPromise } from '@polkadot/api'; import type { SlashingSpans } from '@polkadot/types/interfaces'; -import type { NominatedBy as NominatedByType } from '../../types'; +import type { NominatedBy as NominatedByType } from '../../types.js'; import React, { useMemo } from 'react'; @@ -11,7 +11,7 @@ import { AddressMini, ExpanderScroll } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../../translate'; +import { useTranslation } from '../../translate.js'; interface Props { nominators?: NominatedByType[]; diff --git a/packages/page-staking/src/Validators/Address/StakeOther.tsx b/packages/page-staking/src/Validators/Address/StakeOther.tsx index 9a9781f20f..0cce6b869d 100644 --- a/packages/page-staking/src/Validators/Address/StakeOther.tsx +++ b/packages/page-staking/src/Validators/Address/StakeOther.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { NominatorValue } from './types'; +import type { NominatorValue } from './types.js'; import React, { useMemo } from 'react'; diff --git a/packages/page-staking/src/Validators/Address/Status.tsx b/packages/page-staking/src/Validators/Address/Status.tsx index d24f9e1a0a..15b5ceea39 100644 --- a/packages/page-staking/src/Validators/Address/Status.tsx +++ b/packages/page-staking/src/Validators/Address/Status.tsx @@ -8,7 +8,7 @@ import React, { useMemo } from 'react'; import { Badge } from '@polkadot/react-components'; import { useAccounts } from '@polkadot/react-hooks'; -import MaxBadge from '../../MaxBadge'; +import MaxBadge from '../../MaxBadge.js'; interface Props { isChilled?: boolean; diff --git a/packages/page-staking/src/Validators/Address/index.tsx b/packages/page-staking/src/Validators/Address/index.tsx index 8d0dc75732..47725cbc09 100644 --- a/packages/page-staking/src/Validators/Address/index.tsx +++ b/packages/page-staking/src/Validators/Address/index.tsx @@ -5,8 +5,8 @@ import type { DeriveHeartbeatAuthor } from '@polkadot/api-derive/types'; import type { Option } from '@polkadot/types'; import type { SlashingSpans, ValidatorPrefs } from '@polkadot/types/interfaces'; import type { BN } from '@polkadot/util'; -import type { NominatedBy as NominatedByType, ValidatorInfo } from '../../types'; -import type { NominatorValue } from './types'; +import type { NominatedBy as NominatedByType, ValidatorInfo } from '../../types.js'; +import type { NominatorValue } from './types.js'; import React, { useMemo } from 'react'; @@ -17,10 +17,10 @@ import { useApi, useCall, useDeriveAccountInfo, useToggle } from '@polkadot/reac import { FormatBalance } from '@polkadot/react-query'; import { BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../../translate'; -import NominatedBy from './NominatedBy'; -import StakeOther from './StakeOther'; -import Status from './Status'; +import { useTranslation } from '../../translate.js'; +import NominatedBy from './NominatedBy.js'; +import StakeOther from './StakeOther.js'; +import Status from './Status.js'; interface Props { address: string; diff --git a/packages/page-staking/src/Validators/CurrentList.tsx b/packages/page-staking/src/Validators/CurrentList.tsx index 6462a34918..374af159a2 100644 --- a/packages/page-staking/src/Validators/CurrentList.tsx +++ b/packages/page-staking/src/Validators/CurrentList.tsx @@ -4,17 +4,17 @@ import type { DeriveHeartbeats, DeriveStakingOverview } from '@polkadot/api-derive/types'; import type { AccountId } from '@polkadot/types/interfaces'; import type { BN } from '@polkadot/util'; -import type { NominatedByMap, SortedTargets, ValidatorInfo } from '../types'; +import type { NominatedByMap, SortedTargets, ValidatorInfo } from '../types.js'; import React, { useMemo, useRef, useState } from 'react'; import { Table } from '@polkadot/react-components'; import { useApi, useBlockAuthors, useNextTick } from '@polkadot/react-hooks'; -import Filtering from '../Filtering'; -import Legend from '../Legend'; -import { useTranslation } from '../translate'; -import Address from './Address'; +import Filtering from '../Filtering.js'; +import Legend from '../Legend.js'; +import { useTranslation } from '../translate.js'; +import Address from './Address/index.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Validators/Summary.tsx b/packages/page-staking/src/Validators/Summary.tsx index 273747d05c..c94f1f7f34 100644 --- a/packages/page-staking/src/Validators/Summary.tsx +++ b/packages/page-staking/src/Validators/Summary.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { DeriveStakingOverview } from '@polkadot/api-derive/types'; -import type { SortedTargets } from '../types'; +import type { SortedTargets } from '../types.js'; import React from 'react'; @@ -10,7 +10,7 @@ import SummarySession from '@polkadot/app-explorer/SummarySession'; import { CardSummary, styled, SummaryBox } from '@polkadot/react-components'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/Validators/index.tsx b/packages/page-staking/src/Validators/index.tsx index 2b42278aec..3da98af63d 100644 --- a/packages/page-staking/src/Validators/index.tsx +++ b/packages/page-staking/src/Validators/index.tsx @@ -4,17 +4,17 @@ import type { DeriveHeartbeats, DeriveStakingOverview } from '@polkadot/api-derive/types'; import type { StakerState } from '@polkadot/react-hooks/types'; import type { BN } from '@polkadot/util'; -import type { NominatedByMap, SortedTargets } from '../types'; +import type { NominatedByMap, SortedTargets } from '../types.js'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { Button, ToggleGroup } from '@polkadot/react-components'; import { useApi, useBlockAuthors, useCall } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import ActionsBanner from './ActionsBanner'; -import CurrentList from './CurrentList'; -import Summary from './Summary'; +import { useTranslation } from '../translate.js'; +import ActionsBanner from './ActionsBanner.js'; +import CurrentList from './CurrentList.js'; +import Summary from './Summary.js'; interface Props { className?: string; diff --git a/packages/page-staking/src/index.tsx b/packages/page-staking/src/index.tsx index ce8964a646..2b703f9e92 100644 --- a/packages/page-staking/src/index.tsx +++ b/packages/page-staking/src/index.tsx @@ -16,17 +16,17 @@ import { styled, Tabs } from '@polkadot/react-components'; import { useAccounts, useApi, useAvailableSlashes, useCall, useCallMulti, useFavorites, useOwnStashInfos } from '@polkadot/react-hooks'; import { isFunction } from '@polkadot/util'; -import Actions from './Actions'; -import Bags from './Bags'; -import { STORE_FAVS_BASE } from './constants'; -import Payouts from './Payouts'; -import Query from './Query'; -import Slashes from './Slashes'; -import Targets from './Targets'; -import { useTranslation } from './translate'; -import useNominations from './useNominations'; -import useSortedTargets from './useSortedTargets'; -import Validators from './Validators'; +import Actions from './Actions/index.js'; +import Bags from './Bags/index.js'; +import Payouts from './Payouts/index.js'; +import Query from './Query/index.js'; +import Slashes from './Slashes/index.js'; +import Targets from './Targets/index.js'; +import Validators from './Validators/index.js'; +import { STORE_FAVS_BASE } from './constants.js'; +import { useTranslation } from './translate.js'; +import useNominations from './useNominations.js'; +import useSortedTargets from './useSortedTargets.js'; const HIDDEN_ACC = ['actions', 'payout']; diff --git a/packages/page-staking/src/useNominations.ts b/packages/page-staking/src/useNominations.ts index d9cd2c98f3..56cbdc64be 100644 --- a/packages/page-staking/src/useNominations.ts +++ b/packages/page-staking/src/useNominations.ts @@ -3,7 +3,7 @@ import type { Option, StorageKey } from '@polkadot/types'; import type { Nominations } from '@polkadot/types/interfaces'; -import type { NominatedByMap } from './types'; +import type { NominatedByMap } from './types.js'; import { useMemo } from 'react'; diff --git a/packages/page-staking/src/useSortedTargets.ts b/packages/page-staking/src/useSortedTargets.ts index 356763f6a6..b7d372173f 100644 --- a/packages/page-staking/src/useSortedTargets.ts +++ b/packages/page-staking/src/useSortedTargets.ts @@ -5,7 +5,7 @@ import type { ApiPromise } from '@polkadot/api'; import type { DeriveSessionInfo, DeriveStakingElected, DeriveStakingWaiting } from '@polkadot/api-derive/types'; import type { Inflation } from '@polkadot/react-hooks/types'; import type { Option, u32 } from '@polkadot/types'; -import type { SortedTargets, TargetSortBy, ValidatorInfo } from './types'; +import type { SortedTargets, TargetSortBy, ValidatorInfo } from './types.js'; import { useMemo } from 'react'; diff --git a/packages/page-staking2/src/Pools/Create.tsx b/packages/page-staking2/src/Pools/Create.tsx index 9dc5075880..5c4169c272 100644 --- a/packages/page-staking2/src/Pools/Create.tsx +++ b/packages/page-staking2/src/Pools/Create.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { Params } from './types'; +import type { Params } from './types.js'; import React, { useMemo, useState } from 'react'; @@ -10,8 +10,8 @@ import { Button, Input, InputAddress, InputBalance, InputNumber, Modal, TxButton import { useApi, useToggle } from '@polkadot/react-hooks'; import { bnMax } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import useAmountError from './useAmountError'; +import { useTranslation } from '../translate.js'; +import useAmountError from './useAmountError.js'; interface Props { className?: string; diff --git a/packages/page-staking2/src/Pools/Join.tsx b/packages/page-staking2/src/Pools/Join.tsx index 8eaa012436..17ce3398b1 100644 --- a/packages/page-staking2/src/Pools/Join.tsx +++ b/packages/page-staking2/src/Pools/Join.tsx @@ -2,15 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { Params } from './types'; +import type { Params } from './types.js'; import React, { useState } from 'react'; import { Button, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import useAmountError from './useAmountError'; +import { useTranslation } from '../translate.js'; +import useAmountError from './useAmountError.js'; interface Props { className?: string; diff --git a/packages/page-staking2/src/Pools/Pool.tsx b/packages/page-staking2/src/Pools/Pool.tsx index e979013a6b..10dc1dc31f 100644 --- a/packages/page-staking2/src/Pools/Pool.tsx +++ b/packages/page-staking2/src/Pools/Pool.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { MembersMapEntry, Params } from './types'; +import type { MembersMapEntry, Params } from './types.js'; import React, { useCallback } from 'react'; @@ -10,9 +10,9 @@ import { AddressMini, ExpandButton, ExpanderScroll, Spinner, styled, Table } fro import { useToggle } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; -import { useTranslation } from '../translate'; -import Join from './Join'; -import usePoolInfo from './usePoolInfo'; +import { useTranslation } from '../translate.js'; +import Join from './Join.js'; +import usePoolInfo from './usePoolInfo.js'; interface Props { className?: string; diff --git a/packages/page-staking2/src/Pools/Pools.tsx b/packages/page-staking2/src/Pools/Pools.tsx index f1992c70ce..d639408f1a 100644 --- a/packages/page-staking2/src/Pools/Pools.tsx +++ b/packages/page-staking2/src/Pools/Pools.tsx @@ -2,17 +2,17 @@ // SPDX-License-Identifier: Apache-2.0 import type { BN } from '@polkadot/util'; -import type { OwnPool, Params } from './types'; +import type { OwnPool, Params } from './types.js'; import React, { useMemo, useRef, useState } from 'react'; import { Button, Table, ToggleGroup } from '@polkadot/react-components'; import { arrayFlatten } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Create from './Create'; -import Pool from './Pool'; -import useMembers from './useMembers'; +import { useTranslation } from '../translate.js'; +import Create from './Create.js'; +import Pool from './Pool.js'; +import useMembers from './useMembers.js'; interface Props { className?: string; diff --git a/packages/page-staking2/src/Pools/Summary.tsx b/packages/page-staking2/src/Pools/Summary.tsx index d6de7bc17d..7085f0ac63 100644 --- a/packages/page-staking2/src/Pools/Summary.tsx +++ b/packages/page-staking2/src/Pools/Summary.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Params } from './types'; +import type { Params } from './types.js'; import React from 'react'; import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { formatNumber, isNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-staking2/src/Pools/index.tsx b/packages/page-staking2/src/Pools/index.tsx index e900cae03e..b06697b640 100644 --- a/packages/page-staking2/src/Pools/index.tsx +++ b/packages/page-staking2/src/Pools/index.tsx @@ -1,15 +1,15 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { OwnPool } from './types'; +import type { OwnPool } from './types.js'; import React from 'react'; -import Pools from './Pools'; -import Summary from './Summary'; -import useOwnPools from './useOwnPools'; -import useParams from './useParams'; -import usePoolIds from './usePoolIds'; +import Pools from './Pools.js'; +import Summary from './Summary.js'; +import useOwnPools from './useOwnPools.js'; +import useParams from './useParams.js'; +import usePoolIds from './usePoolIds.js'; interface Props { className?: string; diff --git a/packages/page-staking2/src/Pools/useMembers.ts b/packages/page-staking2/src/Pools/useMembers.ts index f18cb0fc8c..bc4768dfda 100644 --- a/packages/page-staking2/src/Pools/useMembers.ts +++ b/packages/page-staking2/src/Pools/useMembers.ts @@ -5,7 +5,7 @@ import type { Changes } from '@polkadot/react-hooks/useEventChanges'; import type { bool, Option, StorageKey, u32, u128 } from '@polkadot/types'; import type { AccountId32, EventRecord } from '@polkadot/types/interfaces'; import type { PalletNominationPoolsPoolMember } from '@polkadot/types/lookup'; -import type { MembersMap, MembersMapEntry } from './types'; +import type { MembersMap, MembersMapEntry } from './types.js'; import { useEffect, useState } from 'react'; diff --git a/packages/page-staking2/src/Pools/useOwnPools.ts b/packages/page-staking2/src/Pools/useOwnPools.ts index c6cc7c5db9..20910b69aa 100644 --- a/packages/page-staking2/src/Pools/useOwnPools.ts +++ b/packages/page-staking2/src/Pools/useOwnPools.ts @@ -3,13 +3,13 @@ import type { Option } from '@polkadot/types'; import type { PalletNominationPoolsPoolMember } from '@polkadot/types/lookup'; -import type { OwnPool, OwnPoolBase } from './types'; +import type { OwnPool, OwnPoolBase } from './types.js'; import { useMemo } from 'react'; import { createNamedHook, useAccounts, useApi, useCall } from '@polkadot/react-hooks'; -import { createAccounts } from './usePoolAccounts'; +import { createAccounts } from './usePoolAccounts.js'; const OPT_MULTI = { transform: ([[ids], opts]: [[string[]], Option[]]): OwnPoolBase[] => { diff --git a/packages/page-staking2/src/Pools/useParams.ts b/packages/page-staking2/src/Pools/useParams.ts index 58512e0dd4..1e494edbfd 100644 --- a/packages/page-staking2/src/Pools/useParams.ts +++ b/packages/page-staking2/src/Pools/useParams.ts @@ -3,7 +3,7 @@ import type { Option, u32 } from '@polkadot/types'; import type { BN } from '@polkadot/util'; -import type { Params } from './types'; +import type { Params } from './types.js'; import { createNamedHook, useApi, useCallMulti } from '@polkadot/react-hooks'; import { BN_ONE, BN_ZERO } from '@polkadot/util'; diff --git a/packages/page-staking2/src/Pools/usePoolAccounts.ts b/packages/page-staking2/src/Pools/usePoolAccounts.ts index 7606cf5521..ace3687e75 100644 --- a/packages/page-staking2/src/Pools/usePoolAccounts.ts +++ b/packages/page-staking2/src/Pools/usePoolAccounts.ts @@ -3,7 +3,7 @@ import type { ApiPromise } from '@polkadot/api'; import type { BN } from '@polkadot/util'; -import type { PoolAccounts } from './types'; +import type { PoolAccounts } from './types.js'; import { useMemo } from 'react'; diff --git a/packages/page-staking2/src/Pools/usePoolInfo.ts b/packages/page-staking2/src/Pools/usePoolInfo.ts index 8feed3da26..f08dbcd6c5 100644 --- a/packages/page-staking2/src/Pools/usePoolInfo.ts +++ b/packages/page-staking2/src/Pools/usePoolInfo.ts @@ -4,14 +4,14 @@ import type { Bytes, Option } from '@polkadot/types'; import type { FrameSystemAccountInfo, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsRewardPool, PalletStakingNominations } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { PoolInfo, PoolInfoBase } from './types'; +import type { PoolInfo, PoolInfoBase } from './types.js'; import { useMemo } from 'react'; import { createNamedHook, useApi, useCallMulti } from '@polkadot/react-hooks'; import { BN_ZERO, bnMax } from '@polkadot/util'; -import usePoolAccounts from './usePoolAccounts'; +import usePoolAccounts from './usePoolAccounts.js'; const OPT_MULTI = { defaultValue: null, diff --git a/packages/page-staking2/src/Validators/Active/Entry.tsx b/packages/page-staking2/src/Validators/Active/Entry.tsx index acb26ff04a..ae53224622 100644 --- a/packages/page-staking2/src/Validators/Active/Entry.tsx +++ b/packages/page-staking2/src/Validators/Active/Entry.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { SessionInfo, Validator } from '../../types'; +import type { SessionInfo, Validator } from '../../types.js'; import React, { useMemo, useRef } from 'react'; @@ -10,11 +10,11 @@ import { useToggle } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; import { formatNumber } from '@polkadot/util'; -import useExposure from '../useExposure'; -import useHeartbeat from '../useHeartbeat'; -import Bottom from './Row/Bottom'; -import Middle from './Row/Middle'; -import Top from './Row/Top'; +import useExposure from '../useExposure.js'; +import useHeartbeat from '../useHeartbeat.js'; +import Bottom from './Row/Bottom.js'; +import Middle from './Row/Middle.js'; +import Top from './Row/Top.js'; interface Props { className?: string; diff --git a/packages/page-staking2/src/Validators/Active/Row/Top.tsx b/packages/page-staking2/src/Validators/Active/Row/Top.tsx index c2439d0249..0f2df37a66 100644 --- a/packages/page-staking2/src/Validators/Active/Row/Top.tsx +++ b/packages/page-staking2/src/Validators/Active/Row/Top.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Validator } from '../../../types'; -import type { UseHeartbeat } from '../../types'; +import type { Validator } from '../../../types.js'; +import type { UseHeartbeat } from '../../types.js'; import React from 'react'; import { AddressSmall, Table } from '@polkadot/react-components'; -import Status from '../Status'; +import Status from '../Status.js'; interface Props { children?: React.ReactNode; diff --git a/packages/page-staking2/src/Validators/Active/Status.tsx b/packages/page-staking2/src/Validators/Active/Status.tsx index 6a95230ffa..5fa6c7be59 100644 --- a/packages/page-staking2/src/Validators/Active/Status.tsx +++ b/packages/page-staking2/src/Validators/Active/Status.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Validator } from '../../types'; -import type { UseHeartbeat } from '../types'; +import type { Validator } from '../../types.js'; +import type { UseHeartbeat } from '../types.js'; import React, { useMemo } from 'react'; diff --git a/packages/page-staking2/src/Validators/Active/index.tsx b/packages/page-staking2/src/Validators/Active/index.tsx index 45d59cdbf0..b16dfc25b4 100644 --- a/packages/page-staking2/src/Validators/Active/index.tsx +++ b/packages/page-staking2/src/Validators/Active/index.tsx @@ -1,16 +1,16 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { SessionInfo, Validator } from '../../types'; -import type { UsePoints } from '../types'; +import type { SessionInfo, Validator } from '../../types.js'; +import type { UsePoints } from '../types.js'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; import { useNextTick } from '@polkadot/react-hooks'; -import { useTranslation } from '../../translate'; -import Entry from './Entry'; +import { useTranslation } from '../../translate.js'; +import Entry from './Entry.js'; interface Props { className?: string; diff --git a/packages/page-staking2/src/Validators/Waiting/Entry.tsx b/packages/page-staking2/src/Validators/Waiting/Entry.tsx index e5b36f1274..f9ded40a42 100644 --- a/packages/page-staking2/src/Validators/Waiting/Entry.tsx +++ b/packages/page-staking2/src/Validators/Waiting/Entry.tsx @@ -1,15 +1,15 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Validator } from '../../types'; +import type { Validator } from '../../types.js'; import React from 'react'; import { useToggle } from '@polkadot/react-hooks'; -import Bottom from '../Active/Row/Bottom'; -import Middle from '../Active/Row/Middle'; -import Top from '../Active/Row/Top'; +import Bottom from '../Active/Row/Bottom.js'; +import Middle from '../Active/Row/Middle.js'; +import Top from '../Active/Row/Top.js'; interface Props { className?: string; diff --git a/packages/page-staking2/src/Validators/Waiting/index.tsx b/packages/page-staking2/src/Validators/Waiting/index.tsx index 1c2c96ea8f..259fdc87f0 100644 --- a/packages/page-staking2/src/Validators/Waiting/index.tsx +++ b/packages/page-staking2/src/Validators/Waiting/index.tsx @@ -1,16 +1,16 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { SessionInfo, Validator } from '../../types'; +import type { SessionInfo, Validator } from '../../types.js'; import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; import { useNextTick } from '@polkadot/react-hooks'; -import { useTranslation } from '../../translate'; -import useValidatorsWaiting from '../../useValidatorsWaiting'; -import Entry from './Entry'; +import { useTranslation } from '../../translate.js'; +import useValidatorsWaiting from '../../useValidatorsWaiting.js'; +import Entry from './Entry.js'; interface Props { className?: string; diff --git a/packages/page-staking2/src/Validators/index.tsx b/packages/page-staking2/src/Validators/index.tsx index b1d163ef90..5bd1cf90bd 100644 --- a/packages/page-staking2/src/Validators/index.tsx +++ b/packages/page-staking2/src/Validators/index.tsx @@ -1,18 +1,18 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { SessionInfo } from '../types'; +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 { useTranslation } from '../translate'; -import useValidatorsActive from '../useValidatorsActive'; -import Active from './Active'; -import usePoints from './usePoints'; -import Waiting from './Waiting'; +import { useTranslation } from '../translate.js'; +import useValidatorsActive from '../useValidatorsActive.js'; +import Active from './Active/index.js'; +import Waiting from './Waiting/index.js'; +import usePoints from './usePoints.js'; interface Props { className?: string; diff --git a/packages/page-staking2/src/Validators/useExposure.ts b/packages/page-staking2/src/Validators/useExposure.ts index 4c29318a7f..45ec1d0eeb 100644 --- a/packages/page-staking2/src/Validators/useExposure.ts +++ b/packages/page-staking2/src/Validators/useExposure.ts @@ -2,15 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 import type { PalletStakingExposure } from '@polkadot/types/lookup'; -import type { SessionInfo, Validator } from '../types'; -import type { UseExposure, UseExposureExposure } from './types'; +import type { SessionInfo, Validator } from '../types.js'; +import type { UseExposure, UseExposureExposure } from './types.js'; import { useMemo } from 'react'; import { createNamedHook, useApi, useCall } from '@polkadot/react-hooks'; import { BN } from '@polkadot/util'; -import { useCacheMap } from '../useCache'; +import { useCacheMap } from '../useCache.js'; const OPT_EXPOSURE = { transform: ({ others, own, total }: PalletStakingExposure): UseExposureExposure => ({ diff --git a/packages/page-staking2/src/Validators/useHeartbeat.ts b/packages/page-staking2/src/Validators/useHeartbeat.ts index 8de6502a6c..0ea162144c 100644 --- a/packages/page-staking2/src/Validators/useHeartbeat.ts +++ b/packages/page-staking2/src/Validators/useHeartbeat.ts @@ -3,15 +3,15 @@ import type { Option, u32 } from '@polkadot/types'; import type { Codec } from '@polkadot/types/types'; -import type { SessionInfo, Validator } from '../types'; -import type { UseHeartbeat } from './types'; +import type { SessionInfo, Validator } from '../types.js'; +import type { UseHeartbeat } from './types.js'; import { useMemo } from 'react'; import { createNamedHook, useApi, useCall } from '@polkadot/react-hooks'; import { isBoolean, isNumber } from '@polkadot/util'; -import { useCacheMap } from '../useCache'; +import { useCacheMap } from '../useCache.js'; const EMPTY: UseHeartbeat = {}; diff --git a/packages/page-staking2/src/Validators/usePoints.ts b/packages/page-staking2/src/Validators/usePoints.ts index 57e96b447d..254e47a9e6 100644 --- a/packages/page-staking2/src/Validators/usePoints.ts +++ b/packages/page-staking2/src/Validators/usePoints.ts @@ -2,15 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 import type { PalletStakingEraRewardPoints } from '@polkadot/types/lookup'; -import type { SessionInfo } from '../types'; -import type { UsePoints } from './types'; +import type { SessionInfo } from '../types.js'; +import type { UsePoints } from './types.js'; import { useMemo } from 'react'; import { createNamedHook, useApi, useCall } from '@polkadot/react-hooks'; import { BN_ZERO } from '@polkadot/util'; -import { useCacheValue } from '../useCache'; +import { useCacheValue } from '../useCache.js'; const OPT_POINTS = { transform: ({ individual }: PalletStakingEraRewardPoints): UsePoints => diff --git a/packages/page-staking2/src/index.tsx b/packages/page-staking2/src/index.tsx index a63c815935..bc2cd61742 100644 --- a/packages/page-staking2/src/index.tsx +++ b/packages/page-staking2/src/index.tsx @@ -10,12 +10,12 @@ import { Tabs } from '@polkadot/react-components'; import { useApi, useFavorites } from '@polkadot/react-hooks'; import { isFunction } from '@polkadot/util'; -import { STORE_FAVS_BASE } from './constants'; -import Pools from './Pools'; -import { useTranslation } from './translate'; -import { clearCache } from './useCache'; -import useSessionInfo from './useSessionInfo'; -import Validators from './Validators'; +import Pools from './Pools/index.js'; +import Validators from './Validators/index.js'; +import { STORE_FAVS_BASE } from './constants.js'; +import { useTranslation } from './translate.js'; +import { clearCache } from './useCache.js'; +import useSessionInfo from './useSessionInfo.js'; function createPathRef (basePath: string): Record { return { diff --git a/packages/page-staking2/src/useElectedValidators.ts b/packages/page-staking2/src/useElectedValidators.ts index 5f0e03c19e..40113197b9 100644 --- a/packages/page-staking2/src/useElectedValidators.ts +++ b/packages/page-staking2/src/useElectedValidators.ts @@ -3,13 +3,13 @@ import type { StorageKey, u32 } from '@polkadot/types'; import type { AccountId32 } from '@polkadot/types/interfaces'; -import type { SessionInfo } from './types'; +import type { SessionInfo } from './types.js'; import { useMemo } from 'react'; import { createNamedHook, useApi, useMapKeys } from '@polkadot/react-hooks'; -import { useCacheValue } from './useCache'; +import { useCacheValue } from './useCache.js'; const OPT_ELECTED = { transform: (keys: StorageKey<[u32, AccountId32]>[]): string[] => diff --git a/packages/page-staking2/src/useSessionInfo.ts b/packages/page-staking2/src/useSessionInfo.ts index 7f75882292..559bbb0f8f 100644 --- a/packages/page-staking2/src/useSessionInfo.ts +++ b/packages/page-staking2/src/useSessionInfo.ts @@ -4,7 +4,7 @@ import type { Option, u32 } from '@polkadot/types'; import type { PalletStakingActiveEraInfo } from '@polkadot/types/lookup'; import type { BN } from '@polkadot/util'; -import type { SessionInfo } from './types'; +import type { SessionInfo } from './types.js'; import { useMemo } from 'react'; diff --git a/packages/page-staking2/src/useTaggedValidators.ts b/packages/page-staking2/src/useTaggedValidators.ts index 62e1adf06c..cb8a6b2087 100644 --- a/packages/page-staking2/src/useTaggedValidators.ts +++ b/packages/page-staking2/src/useTaggedValidators.ts @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { SessionInfo, Validator } from './types'; +import type { SessionInfo, Validator } from './types.js'; import { useMemo } from 'react'; import { createNamedHook, useAccounts } from '@polkadot/react-hooks'; import { objectSpread } from '@polkadot/util'; -import useElectedValidators from './useElectedValidators'; +import useElectedValidators from './useElectedValidators.js'; function sort (a: Validator, b: Validator): number { return a.isFavorite === b.isFavorite diff --git a/packages/page-staking2/src/useValidatorsActive.ts b/packages/page-staking2/src/useValidatorsActive.ts index d6ebc224c5..4898148483 100644 --- a/packages/page-staking2/src/useValidatorsActive.ts +++ b/packages/page-staking2/src/useValidatorsActive.ts @@ -3,15 +3,15 @@ import type { u32 } from '@polkadot/types'; import type { AccountId32 } from '@polkadot/types/interfaces'; -import type { SessionInfo, Validator } from './types'; +import type { SessionInfo, Validator } from './types.js'; import { useMemo } from 'react'; import { createNamedHook, useApi, useCall } from '@polkadot/react-hooks'; import { objectSpread } from '@polkadot/util'; -import { useCacheValue } from './useCache'; -import useTaggedValidators from './useTaggedValidators'; +import { useCacheValue } from './useCache.js'; +import useTaggedValidators from './useTaggedValidators.js'; const OPT_VALIDATORS = { transform: (validators: AccountId32[]): Validator[] => diff --git a/packages/page-staking2/src/useValidatorsAll.ts b/packages/page-staking2/src/useValidatorsAll.ts index 823590ca20..08b449c26d 100644 --- a/packages/page-staking2/src/useValidatorsAll.ts +++ b/packages/page-staking2/src/useValidatorsAll.ts @@ -4,14 +4,14 @@ import type { Changes } from '@polkadot/react-hooks/useEventChanges'; import type { StorageKey } from '@polkadot/types'; import type { AccountId32, EventRecord } from '@polkadot/types/interfaces'; -import type { SessionInfo, Validator } from './types'; +import type { SessionInfo, Validator } from './types.js'; import { useMemo } from 'react'; import { createNamedHook, useApi, useEventChanges, useMapKeys } from '@polkadot/react-hooks'; -import { useCacheValue } from './useCache'; -import useTaggedValidators from './useTaggedValidators'; +import { useCacheValue } from './useCache.js'; +import useTaggedValidators from './useTaggedValidators.js'; const EMPTY_PARAMS: unknown[] = []; diff --git a/packages/page-staking2/src/useValidatorsWaiting.ts b/packages/page-staking2/src/useValidatorsWaiting.ts index d8a7a9f283..214ea29b35 100644 --- a/packages/page-staking2/src/useValidatorsWaiting.ts +++ b/packages/page-staking2/src/useValidatorsWaiting.ts @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { SessionInfo, Validator } from './types'; +import type { SessionInfo, Validator } from './types.js'; import { useMemo } from 'react'; import { createNamedHook } from '@polkadot/react-hooks'; -import { useCacheValue } from './useCache'; -import useValidatorsAll from './useValidatorsAll'; +import { useCacheValue } from './useCache.js'; +import useValidatorsAll from './useValidatorsAll.js'; function excludeValidators (from: Validator[], exclude: Validator[]): Validator[] { return from.filter(({ stashId }) => diff --git a/packages/page-storage/src/Queries.tsx b/packages/page-storage/src/Queries.tsx index 9cb33ee9e9..61bda49b06 100644 --- a/packages/page-storage/src/Queries.tsx +++ b/packages/page-storage/src/Queries.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2023 @polkadot/app-storage authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { QueryTypes } from './types'; +import type { QueryTypes } from './types.js'; import React from 'react'; -import Query from './Query'; +import Query from './Query.js'; interface Props { onRemove: (id: number) => void; diff --git a/packages/page-storage/src/Query.tsx b/packages/page-storage/src/Query.tsx index 790b1cdaa1..83d99c3672 100644 --- a/packages/page-storage/src/Query.tsx +++ b/packages/page-storage/src/Query.tsx @@ -6,7 +6,7 @@ import type { ComponentRenderer, DefaultProps, RenderFn } from '@polkadot/react- import type { ConstValue } from '@polkadot/react-components/InputConsts/types'; import type { Option, Raw } from '@polkadot/types'; import type { Registry } from '@polkadot/types/types'; -import type { QueryTypes, StorageModuleQuery } from './types'; +import type { QueryTypes, StorageModuleQuery } from './types.js'; import React, { useCallback, useMemo } from 'react'; diff --git a/packages/page-storage/src/Selection/Consts.tsx b/packages/page-storage/src/Selection/Consts.tsx index 137772cc1c..32349076ef 100644 --- a/packages/page-storage/src/Selection/Consts.tsx +++ b/packages/page-storage/src/Selection/Consts.tsx @@ -3,14 +3,14 @@ import type { ConstValue } from '@polkadot/react-components/InputConsts/types'; import type { ConstantCodec } from '@polkadot/types/metadata/decorate/types'; -import type { ComponentProps as Props } from '../types'; +import type { ComponentProps as Props } from '../types.js'; import React, { useCallback, useState } from 'react'; import { Button, InputConsts } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; function Consts ({ onAdd }: Props): React.ReactElement { const { t } = useTranslation(); diff --git a/packages/page-storage/src/Selection/Modules.tsx b/packages/page-storage/src/Selection/Modules.tsx index 834f50fb90..7fb081c120 100644 --- a/packages/page-storage/src/Selection/Modules.tsx +++ b/packages/page-storage/src/Selection/Modules.tsx @@ -5,7 +5,7 @@ import type { QueryableStorageEntry } from '@polkadot/api/types'; import type { RawParams, TypeDefExt } from '@polkadot/react-params/types'; import type { StorageEntryTypeLatest } from '@polkadot/types/interfaces'; import type { Inspect, Registry } from '@polkadot/types/types'; -import type { ComponentProps as Props } from '../types'; +import type { ComponentProps as Props } from '../types.js'; import React, { useCallback, useMemo, useState } from 'react'; @@ -18,7 +18,7 @@ import { getSiName } from '@polkadot/types/metadata/util'; import { TypeDefInfo } from '@polkadot/types/types'; import { compactStripLength, isHex, isNull, isUndefined, u8aToHex } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; type ParamsType = { name?: string, type: TypeDefExt }[]; diff --git a/packages/page-storage/src/Selection/Raw.tsx b/packages/page-storage/src/Selection/Raw.tsx index e8e2a6eeed..7b6281202d 100644 --- a/packages/page-storage/src/Selection/Raw.tsx +++ b/packages/page-storage/src/Selection/Raw.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/app-storage authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { ComponentProps as Props } from '../types'; +import type { ComponentProps as Props } from '../types.js'; import React, { useCallback, useState } from 'react'; import { Button, Input } from '@polkadot/react-components'; import { compactAddLength, u8aToU8a } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; function Raw ({ onAdd }: Props): React.ReactElement { const { t } = useTranslation(); diff --git a/packages/page-storage/src/Selection/index.tsx b/packages/page-storage/src/Selection/index.tsx index 91569d7b6b..d45bcdf3e5 100644 --- a/packages/page-storage/src/Selection/index.tsx +++ b/packages/page-storage/src/Selection/index.tsx @@ -1,17 +1,17 @@ // Copyright 2017-2023 @polkadot/app-storage authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { ParitalQueryTypes, QueryTypes } from '../types'; +import type { ParitalQueryTypes, QueryTypes } from '../types.js'; import React, { useCallback, useRef } from 'react'; import { Route, Switch } from 'react-router'; import { Tabs } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Consts from './Consts'; -import Modules from './Modules'; -import Raw from './Raw'; +import { useTranslation } from '../translate.js'; +import Consts from './Consts.js'; +import Modules from './Modules.js'; +import Raw from './Raw.js'; interface Props { basePath: string; diff --git a/packages/page-storage/src/index.tsx b/packages/page-storage/src/index.tsx index d0582203c5..c44a136396 100644 --- a/packages/page-storage/src/index.tsx +++ b/packages/page-storage/src/index.tsx @@ -2,14 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 import type { AppProps as Props } from '@polkadot/react-components/types'; -import type { QueryTypes } from './types'; +import type { QueryTypes } from './types.js'; import React, { useCallback, useState } from 'react'; import { styled } from '@polkadot/react-components'; -import Queries from './Queries'; -import Selection from './Selection'; +import Selection from './Selection/index.js'; +import Queries from './Queries.js'; function StorageApp ({ basePath, className = '' }: Props): React.ReactElement { const [queue, setQueue] = useState([]); diff --git a/packages/page-sudo/src/SetKey.tsx b/packages/page-sudo/src/SetKey.tsx index 51297d9049..c046b7449e 100644 --- a/packages/page-sudo/src/SetKey.tsx +++ b/packages/page-sudo/src/SetKey.tsx @@ -6,7 +6,7 @@ import React, { useEffect, useState } from 'react'; import { AddressMini, InputAddress, Labelled, styled, TxButton } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface Props { allAccounts: string[]; diff --git a/packages/page-sudo/src/Sudo.tsx b/packages/page-sudo/src/Sudo.tsx index 1cdc8c9573..b489790492 100644 --- a/packages/page-sudo/src/Sudo.tsx +++ b/packages/page-sudo/src/Sudo.tsx @@ -10,7 +10,7 @@ import { Button, Extrinsic, Icon, InputNumber, styled, Toggle, TxButton } from ' import { useApi, useToggle } from '@polkadot/react-hooks'; import { BN_ZERO, isFunction } from '@polkadot/util'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-sudo/src/index.tsx b/packages/page-sudo/src/index.tsx index 89001e0de9..6a971664d3 100644 --- a/packages/page-sudo/src/index.tsx +++ b/packages/page-sudo/src/index.tsx @@ -9,9 +9,9 @@ import { Route, Switch } from 'react-router'; import { Icon, Tabs } from '@polkadot/react-components'; import { useSudo } from '@polkadot/react-hooks'; -import SetKey from './SetKey'; -import Sudo from './Sudo'; -import { useTranslation } from './translate'; +import SetKey from './SetKey.js'; +import Sudo from './Sudo.js'; +import { useTranslation } from './translate.js'; function SudoApp ({ basePath }: Props): React.ReactElement { const { t } = useTranslation(); diff --git a/packages/page-tech-comm/src/App.tsx b/packages/page-tech-comm/src/App.tsx index db833a4b56..f96a1d29d5 100644 --- a/packages/page-tech-comm/src/App.tsx +++ b/packages/page-tech-comm/src/App.tsx @@ -10,9 +10,9 @@ import { Route, Switch } from 'react-router'; import { Tabs } from '@polkadot/react-components'; import { useApi, useCall, useCollectiveMembers } from '@polkadot/react-hooks'; -import Overview from './Overview'; -import Proposals from './Proposals'; -import { useTranslation } from './translate'; +import Overview from './Overview/index.js'; +import Proposals from './Proposals/index.js'; +import { useTranslation } from './translate.js'; interface Props { basePath: string; diff --git a/packages/page-tech-comm/src/Overview/Members.tsx b/packages/page-tech-comm/src/Overview/Members.tsx index c259252ff0..be24b5712d 100644 --- a/packages/page-tech-comm/src/Overview/Members.tsx +++ b/packages/page-tech-comm/src/Overview/Members.tsx @@ -5,7 +5,7 @@ import React, { useRef } from 'react'; import { AddressSmall, Table, Tag } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-tech-comm/src/Overview/Summary.tsx b/packages/page-tech-comm/src/Overview/Summary.tsx index bb62f214d1..0c501e6eba 100644 --- a/packages/page-tech-comm/src/Overview/Summary.tsx +++ b/packages/page-tech-comm/src/Overview/Summary.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type { u32 } from '@polkadot/types'; -import type { ComponentProps as Props } from '../types'; +import type { ComponentProps as Props } from '../types.js'; import React from 'react'; @@ -10,7 +10,7 @@ import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; function Summary ({ className = '', members, proposalHashes, type }: Props): React.ReactElement { const { t } = useTranslation(); diff --git a/packages/page-tech-comm/src/Overview/index.tsx b/packages/page-tech-comm/src/Overview/index.tsx index c38a851be4..05e590ac94 100644 --- a/packages/page-tech-comm/src/Overview/index.tsx +++ b/packages/page-tech-comm/src/Overview/index.tsx @@ -1,12 +1,12 @@ // Copyright 2017-2023 @polkadot/app-tech-comm authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { ComponentProps as Props } from '../types'; +import type { ComponentProps as Props } from '../types.js'; import React from 'react'; -import Members from './Members'; -import Summary from './Summary'; +import Members from './Members.js'; +import Summary from './Summary.js'; function Overview ({ className = '', isMember, members, prime, proposalHashes, type }: Props): React.ReactElement { return ( diff --git a/packages/page-tech-comm/src/Proposals/Close.tsx b/packages/page-tech-comm/src/Proposals/Close.tsx index 48b9548267..8db7704b4a 100644 --- a/packages/page-tech-comm/src/Proposals/Close.tsx +++ b/packages/page-tech-comm/src/Proposals/Close.tsx @@ -9,7 +9,7 @@ import React, { useState } from 'react'; import { Button, InputAddress, Modal, ProposedAction, TxButton } from '@polkadot/react-components'; import { useApi, useCollectiveInstance, useToggle, useWeight } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { hasFailed: boolean; diff --git a/packages/page-tech-comm/src/Proposals/Proposal.tsx b/packages/page-tech-comm/src/Proposals/Proposal.tsx index 1dca0118d4..54bd1e0f14 100644 --- a/packages/page-tech-comm/src/Proposals/Proposal.tsx +++ b/packages/page-tech-comm/src/Proposals/Proposal.tsx @@ -13,8 +13,8 @@ import { useApi, useCall, useCollectiveInstance, useVotingStatus } from '@polkad import { BlockToTime } from '@polkadot/react-query'; import { formatNumber } from '@polkadot/util'; -import Close from './Close'; -import Voting from './Voting'; +import Close from './Close.js'; +import Voting from './Voting.js'; interface Props { className?: string; diff --git a/packages/page-tech-comm/src/Proposals/Propose.tsx b/packages/page-tech-comm/src/Proposals/Propose.tsx index 74cae44d51..10282e2bd5 100644 --- a/packages/page-tech-comm/src/Proposals/Propose.tsx +++ b/packages/page-tech-comm/src/Proposals/Propose.tsx @@ -10,7 +10,7 @@ import { Button, Extrinsic, InputAddress, InputNumber, Modal, TxButton } from '@ import { useApi, useCollectiveInstance, useModal } from '@polkadot/react-hooks'; import { BN } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { defaultThreshold?: number; diff --git a/packages/page-tech-comm/src/Proposals/Voting.tsx b/packages/page-tech-comm/src/Proposals/Voting.tsx index 4938af0533..99159b6eb3 100644 --- a/packages/page-tech-comm/src/Proposals/Voting.tsx +++ b/packages/page-tech-comm/src/Proposals/Voting.tsx @@ -10,7 +10,7 @@ import React, { useState } from 'react'; import { Button, MarkWarning, Modal, TxButton, VoteAccount } from '@polkadot/react-components'; import { useAccounts, useApi, useCollectiveInstance, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { hash: Hash | string; diff --git a/packages/page-tech-comm/src/Proposals/index.tsx b/packages/page-tech-comm/src/Proposals/index.tsx index 08e334ae1f..dd35c35795 100644 --- a/packages/page-tech-comm/src/Proposals/index.tsx +++ b/packages/page-tech-comm/src/Proposals/index.tsx @@ -3,15 +3,15 @@ import type { SubmittableExtrinsicFunction } from '@polkadot/api/types'; import type { Hash } from '@polkadot/types/interfaces'; -import type { ComponentProps } from '../types'; +import type { ComponentProps } from '../types.js'; import React, { useRef } from 'react'; import { Button, Table } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Proposal from './Proposal'; -import Propose from './Propose'; +import { useTranslation } from '../translate.js'; +import Proposal from './Proposal.js'; +import Propose from './Propose.js'; interface Props extends ComponentProps { defaultProposal?: SubmittableExtrinsicFunction<'promise'>; diff --git a/packages/page-tech-comm/src/index.tsx b/packages/page-tech-comm/src/index.tsx index ffd0ea2bd5..86b2db14b8 100644 --- a/packages/page-tech-comm/src/index.tsx +++ b/packages/page-tech-comm/src/index.tsx @@ -3,9 +3,9 @@ import React from 'react'; -import App from './App'; +import App from './App.js'; -export { default as useCounter } from './useCounter'; +export { default as useCounter } from './useCounter.js'; interface Props { basePath: string; diff --git a/packages/page-treasury/src/Overview/Council.tsx b/packages/page-treasury/src/Overview/Council.tsx index 01c3b92c0a..bc9105eb62 100644 --- a/packages/page-treasury/src/Overview/Council.tsx +++ b/packages/page-treasury/src/Overview/Council.tsx @@ -10,7 +10,7 @@ import { getTreasuryProposalThreshold } from '@polkadot/apps-config'; import { Button, Dropdown, InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useCollectiveInstance, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { id: ProposalIndex; diff --git a/packages/page-treasury/src/Overview/Proposal.tsx b/packages/page-treasury/src/Overview/Proposal.tsx index 3541fc0a66..7f5d74fa79 100644 --- a/packages/page-treasury/src/Overview/Proposal.tsx +++ b/packages/page-treasury/src/Overview/Proposal.tsx @@ -9,8 +9,8 @@ import { AddressMini, AddressSmall, Columar, LinkExternal, Table } from '@polkad import { useApi, useToggle } from '@polkadot/react-hooks'; import { isFunction } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import Council from './Council'; +import { useTranslation } from '../translate.js'; +import Council from './Council.js'; interface Props { className?: string; diff --git a/packages/page-treasury/src/Overview/ProposalCreate.tsx b/packages/page-treasury/src/Overview/ProposalCreate.tsx index 692b179302..0b3cf6baed 100644 --- a/packages/page-treasury/src/Overview/ProposalCreate.tsx +++ b/packages/page-treasury/src/Overview/ProposalCreate.tsx @@ -9,7 +9,7 @@ import { Button, InputAddress, InputBalance, MarkWarning, Modal, Static, TxButto import { useApi, useToggle } from '@polkadot/react-hooks'; import { BN_HUNDRED, BN_MILLION } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-treasury/src/Overview/Proposals.tsx b/packages/page-treasury/src/Overview/Proposals.tsx index 9564119cec..3f5750bf31 100644 --- a/packages/page-treasury/src/Overview/Proposals.tsx +++ b/packages/page-treasury/src/Overview/Proposals.tsx @@ -7,8 +7,8 @@ import React, { useMemo } from 'react'; import { Table } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import Proposal from './Proposal'; +import { useTranslation } from '../translate.js'; +import Proposal from './Proposal.js'; interface Props { className?: string; diff --git a/packages/page-treasury/src/Overview/Summary.tsx b/packages/page-treasury/src/Overview/Summary.tsx index e94d96bf87..d43c8f2430 100644 --- a/packages/page-treasury/src/Overview/Summary.tsx +++ b/packages/page-treasury/src/Overview/Summary.tsx @@ -10,7 +10,7 @@ import { useApi, useBestNumber, useCall, useTreasury } from '@polkadot/react-hoo import { FormatBalance } from '@polkadot/react-query'; import { BN_THREE, BN_TWO, BN_ZERO, formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { approvalCount?: number; diff --git a/packages/page-treasury/src/Overview/index.tsx b/packages/page-treasury/src/Overview/index.tsx index 49072802a1..58ca0cbfa7 100644 --- a/packages/page-treasury/src/Overview/index.tsx +++ b/packages/page-treasury/src/Overview/index.tsx @@ -8,9 +8,9 @@ import React from 'react'; import { Button } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import ProposalCreate from './ProposalCreate'; -import Proposals from './Proposals'; -import Summary from './Summary'; +import ProposalCreate from './ProposalCreate.js'; +import Proposals from './Proposals.js'; +import Summary from './Summary.js'; interface Props { className?: string; diff --git a/packages/page-treasury/src/Tips/Tip.tsx b/packages/page-treasury/src/Tips/Tip.tsx index f68796e31f..de33310c59 100644 --- a/packages/page-treasury/src/Tips/Tip.tsx +++ b/packages/page-treasury/src/Tips/Tip.tsx @@ -12,9 +12,9 @@ import { useAccounts, useApi } from '@polkadot/react-hooks'; import { BlockToTime, FormatBalance } from '@polkadot/react-query'; import { BN_ZERO, formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; -import TipEndorse from './TipEndorse'; -import TipReason from './TipReason'; +import { useTranslation } from '../translate.js'; +import TipEndorse from './TipEndorse.js'; +import TipReason from './TipReason.js'; interface Props { bestNumber?: BlockNumber; diff --git a/packages/page-treasury/src/Tips/TipCreate.tsx b/packages/page-treasury/src/Tips/TipCreate.tsx index 50d38e6181..026906fae5 100644 --- a/packages/page-treasury/src/Tips/TipCreate.tsx +++ b/packages/page-treasury/src/Tips/TipCreate.tsx @@ -9,7 +9,7 @@ import { Button, Input, InputAddress, InputBalance, Modal, TxButton } from '@pol import { useApi, useToggle } from '@polkadot/react-hooks'; import { BN_ZERO } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { members: string[]; diff --git a/packages/page-treasury/src/Tips/TipEndorse.tsx b/packages/page-treasury/src/Tips/TipEndorse.tsx index b123294a72..ec22234c44 100644 --- a/packages/page-treasury/src/Tips/TipEndorse.tsx +++ b/packages/page-treasury/src/Tips/TipEndorse.tsx @@ -9,7 +9,7 @@ import React, { useState } from 'react'; import { Button, InputAddress, InputBalance, MarkWarning, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useCall, useToggle } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { defaultId: string | null; diff --git a/packages/page-treasury/src/Tips/Tips.tsx b/packages/page-treasury/src/Tips/Tips.tsx index e3ff340aae..3741d2f7db 100644 --- a/packages/page-treasury/src/Tips/Tips.tsx +++ b/packages/page-treasury/src/Tips/Tips.tsx @@ -11,8 +11,8 @@ import React, { useMemo, useRef, useState } from 'react'; import { styled, Table, Toggle } from '@polkadot/react-components'; import { useApi, useBestNumber, useCall } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import Tip from './Tip'; +import { useTranslation } from '../translate.js'; +import Tip from './Tip.js'; interface Props { className?: string; diff --git a/packages/page-treasury/src/Tips/index.tsx b/packages/page-treasury/src/Tips/index.tsx index 7185cfdc43..62bbd19b10 100644 --- a/packages/page-treasury/src/Tips/index.tsx +++ b/packages/page-treasury/src/Tips/index.tsx @@ -9,9 +9,9 @@ import React, { useCallback, useMemo, useState } from 'react'; import { Button, TxButton } from '@polkadot/react-components'; import { useAccounts, useApi, useTxBatch } from '@polkadot/react-hooks'; -import { useTranslation } from '../translate'; -import TipCreate from './TipCreate'; -import Tips from './Tips'; +import { useTranslation } from '../translate.js'; +import TipCreate from './TipCreate.js'; +import Tips from './Tips.js'; interface Props { className?: string; diff --git a/packages/page-treasury/src/index.tsx b/packages/page-treasury/src/index.tsx index af2abcfd74..8513a26586 100644 --- a/packages/page-treasury/src/index.tsx +++ b/packages/page-treasury/src/index.tsx @@ -8,12 +8,12 @@ import { Tabs } from '@polkadot/react-components'; import { useApi, useCollectiveMembers } from '@polkadot/react-hooks'; import { isFunction } from '@polkadot/util'; -import Overview from './Overview'; -import Tips from './Tips'; -import { useTranslation } from './translate'; -import useTipHashes from './useTipHashes'; +import Overview from './Overview/index.js'; +import Tips from './Tips/index.js'; +import { useTranslation } from './translate.js'; +import useTipHashes from './useTipHashes.js'; -export { default as useCounter } from './useCounter'; +export { default as useCounter } from './useCounter.js'; interface Props { basePath: string; diff --git a/packages/page-utilities/src/Convert.tsx b/packages/page-utilities/src/Convert.tsx index edf13193fa..7a124f4b52 100644 --- a/packages/page-utilities/src/Convert.tsx +++ b/packages/page-utilities/src/Convert.tsx @@ -11,7 +11,7 @@ import { useApi } from '@polkadot/react-hooks'; import { formatNumber } from '@polkadot/util'; import { base58Decode, checkAddressChecksum, encodeAddress, isAddress } from '@polkadot/util-crypto'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-utilities/src/Hash.tsx b/packages/page-utilities/src/Hash.tsx index e9b1280c6d..8a1fb1bbc2 100644 --- a/packages/page-utilities/src/Hash.tsx +++ b/packages/page-utilities/src/Hash.tsx @@ -7,7 +7,7 @@ import { Input, Output, Static } from '@polkadot/react-components'; import { hexToU8a, isHex, stringToU8a } from '@polkadot/util'; import { blake2AsHex } from '@polkadot/util-crypto'; -import { useTranslation } from './translate'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/page-utilities/src/index.tsx b/packages/page-utilities/src/index.tsx index 7281250fc3..1c50ed88bd 100644 --- a/packages/page-utilities/src/index.tsx +++ b/packages/page-utilities/src/index.tsx @@ -6,9 +6,9 @@ import { Route, Switch } from 'react-router'; import { Tabs } from '@polkadot/react-components'; -import Convert from './Convert'; -import Hash from './Hash'; -import { useTranslation } from './translate'; +import Convert from './Convert.js'; +import Hash from './Hash.js'; +import { useTranslation } from './translate.js'; interface Props { basePath: string; diff --git a/packages/page-whitelist/src/Hashes/Summary.tsx b/packages/page-whitelist/src/Hashes/Summary.tsx index c9b055cc47..cba2579f42 100644 --- a/packages/page-whitelist/src/Hashes/Summary.tsx +++ b/packages/page-whitelist/src/Hashes/Summary.tsx @@ -6,7 +6,7 @@ import React from 'react'; import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { formatNumber } from '@polkadot/util'; -import { useTranslation } from '../translate'; +import { useTranslation } from '../translate.js'; interface Props { className?: string; diff --git a/packages/page-whitelist/src/Hashes/index.tsx b/packages/page-whitelist/src/Hashes/index.tsx index 674af9af15..b1a5cd9055 100644 --- a/packages/page-whitelist/src/Hashes/index.tsx +++ b/packages/page-whitelist/src/Hashes/index.tsx @@ -7,10 +7,10 @@ import React, { useRef } from 'react'; import { Table } from '@polkadot/react-components'; -import { useTranslation } from '../translate'; -import useHashes from '../useHashes'; -import Details from './Details'; -import Summary from './Summary'; +import { useTranslation } from '../translate.js'; +import useHashes from '../useHashes.js'; +import Details from './Details.js'; +import Summary from './Summary.js'; interface Props { className?: string; diff --git a/packages/page-whitelist/src/index.tsx b/packages/page-whitelist/src/index.tsx index 6952a3d014..f108837a84 100644 --- a/packages/page-whitelist/src/index.tsx +++ b/packages/page-whitelist/src/index.tsx @@ -5,8 +5,8 @@ import React, { useRef } from 'react'; import { Tabs } from '@polkadot/react-components'; -import Hashes from './Hashes'; -import { useTranslation } from './translate'; +import Hashes from './Hashes/index.js'; +import { useTranslation } from './translate.js'; interface Props { basePath: string; diff --git a/packages/react-api/src/Api.tsx b/packages/react-api/src/Api.tsx index b2fb4b31a7..8f705fe1b9 100644 --- a/packages/react-api/src/Api.tsx +++ b/packages/react-api/src/Api.tsx @@ -5,7 +5,7 @@ import type { LinkOption } from '@polkadot/apps-config/endpoints/types'; import type { InjectedExtension } from '@polkadot/extension-inject/types'; import type { ChainProperties, ChainType } from '@polkadot/types/interfaces'; import type { KeyringStore } from '@polkadot/ui-keyring/types'; -import type { ApiProps, ApiState } from './types'; +import type { ApiProps, ApiState } from './types.js'; import * as Sc from '@substrate/connect'; import React, { useEffect, useMemo, useState } from 'react'; @@ -23,9 +23,9 @@ import { settings } from '@polkadot/ui-settings'; import { formatBalance, isNumber, isTestChain, objectSpread, stringify } from '@polkadot/util'; import { defaults as addressDefaults } from '@polkadot/util-crypto/address/defaults'; -import { lightSpecs, relaySpecs } from './light'; -import registry from './typeRegistry'; -import { decodeUrlTypes } from './urlTypes'; +import { lightSpecs, relaySpecs } from './light/index.js'; +import registry from './typeRegistry.js'; +import { decodeUrlTypes } from './urlTypes.js'; interface Props { children: React.ReactNode; diff --git a/packages/react-api/src/hoc/api.tsx b/packages/react-api/src/hoc/api.tsx index da828388bf..df7873f6e7 100644 --- a/packages/react-api/src/hoc/api.tsx +++ b/packages/react-api/src/hoc/api.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { ApiProps, SubtractProps } from '../types'; -import type { DefaultProps } from './types'; +import type { ApiProps, SubtractProps } from '../types.js'; +import type { DefaultProps } from './types.js'; import React from 'react'; import { assert } from '@polkadot/util'; -import { ApiCtx } from '../Api'; +import { ApiCtx } from '../Api.js'; export default function withApi

(Inner: React.ComponentType

, defaultProps: DefaultProps = {}): React.ComponentType { class WithApi extends React.PureComponent> { diff --git a/packages/react-api/src/hoc/call.tsx b/packages/react-api/src/hoc/call.tsx index 8b5e529e0b..afe14d58af 100644 --- a/packages/react-api/src/hoc/call.tsx +++ b/packages/react-api/src/hoc/call.tsx @@ -9,16 +9,16 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ -import type { ApiProps, CallState as State, OnChangeCb, SubtractProps } from '../types'; -import type { Options } from './types'; +import type { ApiProps, CallState as State, OnChangeCb, SubtractProps } from '../types.js'; +import type { Options } from './types.js'; import React from 'react'; import { assert, isNull, isUndefined, nextTick } from '@polkadot/util'; -import echoTransform from '../transform/echo'; -import { isEqual, triggerChange } from '../util'; -import withApi from './api'; +import echoTransform from '../transform/echo.js'; +import { isEqual, triggerChange } from '../util/index.js'; +import withApi from './api.js'; // FIXME This is not correct, we need some junction of derive, query & consts interface Method { diff --git a/packages/react-api/src/hoc/callDiv.tsx b/packages/react-api/src/hoc/callDiv.tsx index 12916385c0..d2dd3aa4a4 100644 --- a/packages/react-api/src/hoc/callDiv.tsx +++ b/packages/react-api/src/hoc/callDiv.tsx @@ -1,12 +1,12 @@ // Copyright 2017-2023 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { BaseProps } from '../types'; -import type { DefaultProps, Options } from './types'; +import type { BaseProps } from '../types.js'; +import type { DefaultProps, Options } from './types.js'; import React from 'react'; -import withCall from './call'; +import withCall from './call.js'; interface Props extends BaseProps { callResult?: T; diff --git a/packages/react-api/src/hoc/calls.ts b/packages/react-api/src/hoc/calls.ts index ed886f3283..457b4bd2d5 100644 --- a/packages/react-api/src/hoc/calls.ts +++ b/packages/react-api/src/hoc/calls.ts @@ -1,12 +1,12 @@ // Copyright 2017-2023 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { ApiProps, SubtractProps } from '../types'; -import type { Options } from './types'; +import type { ApiProps, SubtractProps } from '../types.js'; +import type { Options } from './types.js'; import React from 'react'; -import withCall from './call'; +import withCall from './call.js'; type Call = string | [string, Options]; diff --git a/packages/react-api/src/hoc/index.ts b/packages/react-api/src/hoc/index.ts index 7997394bec..14a4eb16d3 100644 --- a/packages/react-api/src/hoc/index.ts +++ b/packages/react-api/src/hoc/index.ts @@ -1,10 +1,10 @@ // Copyright 2017-2023 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { default as withApi } from './api'; -export { default as withCall } from './call'; -export { default as withCalls } from './calls'; -export { default as withCallDiv } from './callDiv'; -export { default as withMulti } from './multi'; -export { default as withObservable } from './observable'; -export * from './onlyOn'; +export { default as withApi } from './api.js'; +export { default as withCall } from './call.js'; +export { default as withCalls } from './calls.js'; +export { default as withCallDiv } from './callDiv.js'; +export { default as withMulti } from './multi.js'; +export { default as withObservable } from './observable.js'; +export * from './onlyOn.js'; diff --git a/packages/react-api/src/hoc/observable.tsx b/packages/react-api/src/hoc/observable.tsx index 787bb16853..6e527b6801 100644 --- a/packages/react-api/src/hoc/observable.tsx +++ b/packages/react-api/src/hoc/observable.tsx @@ -4,14 +4,14 @@ // TODO: Lots of duplicated code between this and withObservable, surely there is a better way of doing this? import type { Observable, OperatorFunction } from 'rxjs'; -import type { CallState } from '../types'; -import type { DefaultProps, HOC, Options, RenderFn } from './types'; +import type { CallState } from '../types.js'; +import type { DefaultProps, HOC, Options, RenderFn } from './types.js'; import React from 'react'; import { catchError, map, of } from 'rxjs'; -import echoTransform from '../transform/echo'; -import { intervalObservable, isEqual, triggerChange } from '../util'; +import echoTransform from '../transform/echo.js'; +import { intervalObservable, isEqual, triggerChange } from '../util/index.js'; interface State extends CallState { subscriptions: { unsubscribe: () => void }[]; diff --git a/packages/react-api/src/hoc/onlyOn.tsx b/packages/react-api/src/hoc/onlyOn.tsx index 74d74c047f..9b6634d5f2 100644 --- a/packages/react-api/src/hoc/onlyOn.tsx +++ b/packages/react-api/src/hoc/onlyOn.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2023 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Environment } from '../types'; +import type { Environment } from '../types.js'; import { ComponentType } from 'react'; -import { getEnvironment } from '../util'; +import { getEnvironment } from '../util/index.js'; const onlyOn = (environment: Environment) => >(component: T): T | (() => null) => { if (getEnvironment() === environment) { diff --git a/packages/react-api/src/hoc/types.ts b/packages/react-api/src/hoc/types.ts index cf2801ab4e..dbdfc53767 100644 --- a/packages/react-api/src/hoc/types.ts +++ b/packages/react-api/src/hoc/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { OnChangeCb } from '../types'; +import type { OnChangeCb } from '../types.js'; import React from 'react'; diff --git a/packages/react-api/src/index.ts b/packages/react-api/src/index.ts index 6581a22a04..3ccda41b4e 100644 --- a/packages/react-api/src/index.ts +++ b/packages/react-api/src/index.ts @@ -1,5 +1,5 @@ // Copyright 2017-2023 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { api, ApiCtx, ApiCtxRoot, DEFAULT_DECIMALS, DEFAULT_SS58 } from './Api'; -export { withApi, withCallDiv, withCalls, withMulti, withObservable } from './hoc'; +export { api, ApiCtx, ApiCtxRoot, DEFAULT_DECIMALS, DEFAULT_SS58 } from './Api.js'; +export { withApi, withCallDiv, withCalls, withMulti, withObservable } from './hoc/index.js'; diff --git a/packages/react-api/src/light.spec.ts b/packages/react-api/src/light.spec.ts index 2ce3bb12e3..f44872460a 100644 --- a/packages/react-api/src/light.spec.ts +++ b/packages/react-api/src/light.spec.ts @@ -7,7 +7,7 @@ import process from 'process'; import { assert } from '@polkadot/util'; -import { lightSpecs } from './light'; +import { lightSpecs } from './light/index.js'; const srcRel = 'packages/react-api/src'; const specDir = path.join(process.cwd(), srcRel); diff --git a/packages/react-api/src/light/index.ts b/packages/react-api/src/light/index.ts index 496088a914..e10e7fc3bb 100644 --- a/packages/react-api/src/light/index.ts +++ b/packages/react-api/src/light/index.ts @@ -3,8 +3,8 @@ import { WellKnownChain } from '@substrate/connect'; -import { specs as kusama } from './kusama'; -import { specs as polkadot } from './polkadot'; +import { specs as kusama } from './kusama/index.js'; +import { specs as polkadot } from './polkadot/index.js'; export const lightSpecs: Record> = Object diff --git a/packages/react-api/src/util/getEnvironment.ts b/packages/react-api/src/util/getEnvironment.ts index a6fea57d50..8166aae366 100644 --- a/packages/react-api/src/util/getEnvironment.ts +++ b/packages/react-api/src/util/getEnvironment.ts @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Environment } from '../types'; +import type { Environment } from '../types.js'; // https://github.com/electron/electron/issues/2288 function isElectron () { diff --git a/packages/react-api/src/util/index.ts b/packages/react-api/src/util/index.ts index 1b60ad54a1..30eb4b2cb8 100644 --- a/packages/react-api/src/util/index.ts +++ b/packages/react-api/src/util/index.ts @@ -1,11 +1,11 @@ // Copyright 2017-2023 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import getEnvironment from './getEnvironment'; -import getHistoric from './historic'; -import intervalObservable from './intervalObservable'; -import isEqual from './isEqual'; -import triggerChange from './triggerChange'; +import getEnvironment from './getEnvironment.js'; +import getHistoric from './historic.js'; +import intervalObservable from './intervalObservable.js'; +import isEqual from './isEqual.js'; +import triggerChange from './triggerChange.js'; export { getHistoric, diff --git a/packages/react-api/src/util/intervalObservable.ts b/packages/react-api/src/util/intervalObservable.ts index f08406403d..36a88fc3de 100644 --- a/packages/react-api/src/util/intervalObservable.ts +++ b/packages/react-api/src/util/intervalObservable.ts @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { CallState } from '../types'; +import type { CallState } from '../types.js'; import { interval, Subscription } from 'rxjs'; diff --git a/packages/react-api/src/util/triggerChange.ts b/packages/react-api/src/util/triggerChange.ts index df62a871b1..6b3a185427 100644 --- a/packages/react-api/src/util/triggerChange.ts +++ b/packages/react-api/src/util/triggerChange.ts @@ -1,7 +1,7 @@ // Copyright 2017-2023 @polkadot/react-api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { OnChangeCb } from '../types'; +import type { OnChangeCb } from '../types.js'; import { isFunction, isObservable } from '@polkadot/util'; diff --git a/packages/react-components/src/AccountName.tsx b/packages/react-components/src/AccountName.tsx index 62e8002b84..dc97603f3f 100644 --- a/packages/react-components/src/AccountName.tsx +++ b/packages/react-components/src/AccountName.tsx @@ -12,9 +12,9 @@ import registry from '@polkadot/react-api/typeRegistry'; import { useDeriveAccountInfo, useSystemApi } from '@polkadot/react-hooks'; import { formatNumber, isCodec, isFunction, stringToU8a, u8aEmpty, u8aEq, u8aToBn } from '@polkadot/util'; -import Badge from './Badge'; -import { styled } from './styled'; -import { getAddressName } from './util'; +import { getAddressName } from './util/index.js'; +import Badge from './Badge.js'; +import { styled } from './styled.js'; interface Props { children?: React.ReactNode; diff --git a/packages/react-components/src/AddressInfo.tsx b/packages/react-components/src/AddressInfo.tsx index 1388ca9161..bf561fdf1e 100644 --- a/packages/react-components/src/AddressInfo.tsx +++ b/packages/react-components/src/AddressInfo.tsx @@ -15,16 +15,16 @@ import { useBestNumber } from '@polkadot/react-hooks'; import { BlockToTime, FormatBalance } from '@polkadot/react-query'; import { BN_MAX_INTEGER, BN_ZERO, bnMax, formatBalance, formatNumber, isObject } from '@polkadot/util'; -import CryptoType from './CryptoType'; -import DemocracyLocks from './DemocracyLocks'; -import Expander from './Expander'; -import Icon from './Icon'; -import Label from './Label'; -import StakingRedeemable from './StakingRedeemable'; -import StakingUnbonding from './StakingUnbonding'; -import { styled } from './styled'; -import Tooltip from './Tooltip'; -import { useTranslation } from './translate'; +import CryptoType from './CryptoType.js'; +import DemocracyLocks from './DemocracyLocks.js'; +import Expander from './Expander.js'; +import Icon from './Icon.js'; +import Label from './Label.js'; +import StakingRedeemable from './StakingRedeemable.js'; +import StakingUnbonding from './StakingUnbonding.js'; +import { styled } from './styled.js'; +import Tooltip from './Tooltip.js'; +import { useTranslation } from './translate.js'; // true to display, or (for bonded) provided values [own, ...all extras] export interface BalanceActiveType { diff --git a/packages/react-components/src/AddressMini.tsx b/packages/react-components/src/AddressMini.tsx index cbca48e6a6..c6b8367ef2 100644 --- a/packages/react-components/src/AddressMini.tsx +++ b/packages/react-components/src/AddressMini.tsx @@ -7,12 +7,12 @@ import type { BN } from '@polkadot/util'; import React from 'react'; -import AccountName from './AccountName'; -import BalanceDisplay from './Balance'; -import BondedDisplay from './Bonded'; -import IdentityIcon from './IdentityIcon'; -import LockedVote from './LockedVote'; -import { styled } from './styled'; +import IdentityIcon from './IdentityIcon/index.js'; +import AccountName from './AccountName.js'; +import BalanceDisplay from './Balance.js'; +import BondedDisplay from './Bonded.js'; +import LockedVote from './LockedVote.js'; +import { styled } from './styled.js'; interface Props { balance?: BN | BN[]; diff --git a/packages/react-components/src/AddressRow.tsx b/packages/react-components/src/AddressRow.tsx index a0deff0ad8..1ee50bdf24 100644 --- a/packages/react-components/src/AddressRow.tsx +++ b/packages/react-components/src/AddressRow.tsx @@ -8,9 +8,9 @@ import React from 'react'; import { useAccountInfo } from '@polkadot/react-hooks'; import BaseIdentityIcon from '@polkadot/react-identicon'; -import IdentityIcon from './IdentityIcon'; -import Row, { RowProps } from './Row'; -import { styled } from './styled'; +import IdentityIcon from './IdentityIcon/index.js'; +import Row, { RowProps } from './Row.js'; +import { styled } from './styled.js'; export interface Props extends RowProps { isContract?: boolean; diff --git a/packages/react-components/src/AddressSmall.tsx b/packages/react-components/src/AddressSmall.tsx index 8f64cc34d1..0c4e2e29de 100644 --- a/packages/react-components/src/AddressSmall.tsx +++ b/packages/react-components/src/AddressSmall.tsx @@ -5,10 +5,10 @@ import type { AccountId, Address } from '@polkadot/types/interfaces'; import React from 'react'; -import AccountName from './AccountName'; -import IdentityIcon from './IdentityIcon'; -import ParentAccount from './ParentAccount'; -import { styled } from './styled'; +import IdentityIcon from './IdentityIcon/index.js'; +import AccountName from './AccountName.js'; +import ParentAccount from './ParentAccount.js'; +import { styled } from './styled.js'; interface Props { children?: React.ReactNode; diff --git a/packages/react-components/src/AddressToggle.tsx b/packages/react-components/src/AddressToggle.tsx index 6f79acbe08..1037905dbf 100644 --- a/packages/react-components/src/AddressToggle.tsx +++ b/packages/react-components/src/AddressToggle.tsx @@ -5,10 +5,10 @@ import React, { useCallback, useMemo } from 'react'; import { useApi, useDeriveAccountInfo } from '@polkadot/react-hooks'; -import AddressMini from './AddressMini'; -import { styled } from './styled'; -import Toggle from './Toggle'; -import { checkVisibility } from './util'; +import { checkVisibility } from './util/index.js'; +import AddressMini from './AddressMini.js'; +import { styled } from './styled.js'; +import Toggle from './Toggle.js'; interface Props { address: string; diff --git a/packages/react-components/src/AvatarItem.tsx b/packages/react-components/src/AvatarItem.tsx index d6ccbdcfef..9fd8b74194 100644 --- a/packages/react-components/src/AvatarItem.tsx +++ b/packages/react-components/src/AvatarItem.tsx @@ -3,7 +3,7 @@ import React from 'react'; -import { styled } from './styled'; +import { styled } from './styled.js'; interface Props { children?: React.ReactNode; diff --git a/packages/react-components/src/Badge.tsx b/packages/react-components/src/Badge.tsx index ea134bc427..a4bec84732 100644 --- a/packages/react-components/src/Badge.tsx +++ b/packages/react-components/src/Badge.tsx @@ -7,9 +7,9 @@ import React, { useMemo, useState } from 'react'; import { useTheme } from '@polkadot/react-hooks'; -import Icon from './Icon'; -import { styled } from './styled'; -import Tooltip from './Tooltip'; +import Icon from './Icon.js'; +import { styled } from './styled.js'; +import Tooltip from './Tooltip.js'; interface Props { className?: string; diff --git a/packages/react-components/src/BatchWarning.tsx b/packages/react-components/src/BatchWarning.tsx index e65b2c77f3..34faa5cafe 100644 --- a/packages/react-components/src/BatchWarning.tsx +++ b/packages/react-components/src/BatchWarning.tsx @@ -6,8 +6,8 @@ import React from 'react'; import { useApi } from '@polkadot/react-hooks'; import { isFunction } from '@polkadot/util'; -import MarkWarning from './MarkWarning'; -import { useTranslation } from './translate'; +import MarkWarning from './MarkWarning.js'; +import { useTranslation } from './translate.js'; function BatchWarning (): React.ReactElement | null { const { t } = useTranslation(); diff --git a/packages/react-components/src/Bonded.tsx b/packages/react-components/src/Bonded.tsx index a512d616da..a155047718 100644 --- a/packages/react-components/src/Bonded.tsx +++ b/packages/react-components/src/Bonded.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { Bonded } from '@polkadot/react-query'; -import { renderProvided } from './Balance'; +import { renderProvided } from './Balance.js'; export interface Props { bonded?: BN | BN[]; diff --git a/packages/react-components/src/Button/Group.tsx b/packages/react-components/src/Button/Group.tsx index 49d2953dc3..8d297ccbae 100644 --- a/packages/react-components/src/Button/Group.tsx +++ b/packages/react-components/src/Button/Group.tsx @@ -3,7 +3,7 @@ import React from 'react'; -import { styled } from '../styled'; +import { styled } from '../styled.js'; interface Props { children?: React.ReactNode; diff --git a/packages/react-components/src/Button/index.tsx b/packages/react-components/src/Button/index.tsx index 91f1df0081..9c36984fbb 100644 --- a/packages/react-components/src/Button/index.tsx +++ b/packages/react-components/src/Button/index.tsx @@ -1,14 +1,14 @@ // Copyright 2017-2023 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { ButtonProps as Props } from './types'; +import type { ButtonProps as Props } from './types.js'; import React, { useCallback, useEffect } from 'react'; -import Icon from '../Icon'; -import Spinner from '../Spinner'; -import { styled } from '../styled'; -import Group from './Group'; +import Icon from '../Icon.js'; +import Spinner from '../Spinner.js'; +import { styled } from '../styled.js'; +import Group from './Group.js'; function ButtonBase ({ activeOnEnter, children, className = '', dataTestId = '', icon, isBasic, isBusy, isCircular, isDisabled, isFull, isIcon, isSelected, isToplevel, label, onClick, isReadOnly = !onClick, onMouseEnter, onMouseLeave, tabIndex, withoutLink }: Props): React.ReactElement { const _onClick = useCallback( diff --git a/packages/react-components/src/ButtonCancel.tsx b/packages/react-components/src/ButtonCancel.tsx index e0a8b3db75..f1a8cdc50e 100644 --- a/packages/react-components/src/ButtonCancel.tsx +++ b/packages/react-components/src/ButtonCancel.tsx @@ -3,8 +3,8 @@ import React from 'react'; -import Button from './Button'; -import { useTranslation } from './translate'; +import Button from './Button/index.js'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/react-components/src/Call.tsx b/packages/react-components/src/Call.tsx index 48de3a727e..91b19ace39 100644 --- a/packages/react-components/src/Call.tsx +++ b/packages/react-components/src/Call.tsx @@ -12,10 +12,10 @@ import Params from '@polkadot/react-params'; import { FormatBalance } from '@polkadot/react-query'; import { Enum, getTypeDef } from '@polkadot/types'; -import { balanceCalls, balanceCallsOverrides } from './constants'; -import Static from './Static'; -import { styled } from './styled'; -import { useTranslation } from './translate'; +import { balanceCalls, balanceCallsOverrides } from './constants.js'; +import Static from './Static.js'; +import { styled } from './styled.js'; +import { useTranslation } from './translate.js'; export interface Props { callName?: string; diff --git a/packages/react-components/src/CallExpander.tsx b/packages/react-components/src/CallExpander.tsx index c0eda9f83a..89341da31c 100644 --- a/packages/react-components/src/CallExpander.tsx +++ b/packages/react-components/src/CallExpander.tsx @@ -6,8 +6,8 @@ import type { BN } from '@polkadot/util'; import React, { useMemo } from 'react'; -import CallDisplay from './Call'; -import Expander from './Expander'; +import CallDisplay from './Call.js'; +import Expander from './Expander.js'; interface Props { children?: React.ReactNode; diff --git a/packages/react-components/src/Card.tsx b/packages/react-components/src/Card.tsx index f4ed71d0c5..bd545bdcd3 100644 --- a/packages/react-components/src/Card.tsx +++ b/packages/react-components/src/Card.tsx @@ -3,7 +3,7 @@ import React from 'react'; -import { styled } from './styled'; +import { styled } from './styled.js'; interface Props { children: React.ReactNode; diff --git a/packages/react-components/src/CardSummary.tsx b/packages/react-components/src/CardSummary.tsx index c7c824f9c5..876165179e 100644 --- a/packages/react-components/src/CardSummary.tsx +++ b/packages/react-components/src/CardSummary.tsx @@ -9,9 +9,9 @@ import React from 'react'; import { BlockToTime } from '@polkadot/react-query'; import { BN_HUNDRED, formatNumber, isUndefined } from '@polkadot/util'; -import Labelled from './Labelled'; -import Progress from './Progress'; -import { styled } from './styled'; +import Labelled from './Labelled.js'; +import Progress from './Progress.js'; +import { styled } from './styled.js'; interface ProgressProps { hideGraph?: boolean; diff --git a/packages/react-components/src/ChainImg.tsx b/packages/react-components/src/ChainImg.tsx index 00bebb2cbd..f226039a70 100644 --- a/packages/react-components/src/ChainImg.tsx +++ b/packages/react-components/src/ChainImg.tsx @@ -8,8 +8,8 @@ import React, { useMemo } from 'react'; import { externalEmptySVG } from '@polkadot/apps-config/ui/logos/external'; import { useApi } from '@polkadot/react-hooks'; -import Icon from './Icon'; -import { styled } from './styled'; +import Icon from './Icon.js'; +import { styled } from './styled.js'; interface Props { className?: string; diff --git a/packages/react-components/src/ChainLock.tsx b/packages/react-components/src/ChainLock.tsx index ca8a6c686c..bfa7a584ef 100644 --- a/packages/react-components/src/ChainLock.tsx +++ b/packages/react-components/src/ChainLock.tsx @@ -6,9 +6,9 @@ import React, { useCallback, useMemo } from 'react'; import { useApi } from '@polkadot/react-hooks'; import { chains } from '@polkadot/ui-settings/defaults/chains'; -import { styled } from './styled'; -import Toggle from './Toggle'; -import { useTranslation } from './translate'; +import { styled } from './styled.js'; +import Toggle from './Toggle.js'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/react-components/src/Chart/Base.tsx b/packages/react-components/src/Chart/Base.tsx index eb3d2d5442..a6f4c6ff5a 100644 --- a/packages/react-components/src/Chart/Base.tsx +++ b/packages/react-components/src/Chart/Base.tsx @@ -3,7 +3,7 @@ import React from 'react'; -import { styled } from '../styled'; +import { styled } from '../styled.js'; interface Props { children: React.ReactNode; diff --git a/packages/react-components/src/Chart/Doughnut.tsx b/packages/react-components/src/Chart/Doughnut.tsx index de6ebc1ef8..89abc3e858 100644 --- a/packages/react-components/src/Chart/Doughnut.tsx +++ b/packages/react-components/src/Chart/Doughnut.tsx @@ -8,7 +8,7 @@ import { Doughnut } from 'react-chartjs-2'; import { bnToBn } from '@polkadot/util'; -import Base from './Base'; +import Base from './Base.js'; interface DoughnutValue { colors: string[]; diff --git a/packages/react-components/src/Chart/HorizBar.tsx b/packages/react-components/src/Chart/HorizBar.tsx index 27f3fdb7dc..f4e8129dda 100644 --- a/packages/react-components/src/Chart/HorizBar.tsx +++ b/packages/react-components/src/Chart/HorizBar.tsx @@ -9,7 +9,7 @@ import { Bar } from 'react-chartjs-2'; import { bnToBn, isNumber } from '@polkadot/util'; -import { alphaColor } from './utils'; +import { alphaColor } from './utils.js'; interface Value { colors: string[]; diff --git a/packages/react-components/src/Chart/Line.tsx b/packages/react-components/src/Chart/Line.tsx index 1e8f7c9941..a26e0615bd 100644 --- a/packages/react-components/src/Chart/Line.tsx +++ b/packages/react-components/src/Chart/Line.tsx @@ -9,9 +9,9 @@ import * as Chart from 'react-chartjs-2'; import { isBn, objectSpread } from '@polkadot/util'; -import ErrorBoundary from '../ErrorBoundary'; -import { styled } from '../styled'; -import { alphaColor } from './utils'; +import ErrorBoundary from '../ErrorBoundary.js'; +import { styled } from '../styled.js'; +import { alphaColor } from './utils.js'; export interface Props { colors?: (string | undefined)[]; diff --git a/packages/react-components/src/Chart/index.ts b/packages/react-components/src/Chart/index.ts index 68c4b2dddd..37d9790c01 100644 --- a/packages/react-components/src/Chart/index.ts +++ b/packages/react-components/src/Chart/index.ts @@ -5,9 +5,9 @@ import * as chartJs from 'chart.js'; import annotationPlugin from 'chartjs-plugin-annotation'; import crosshairPlugin from 'chartjs-plugin-crosshair'; -import Doughnut from './Doughnut'; -import HorizBar from './HorizBar'; -import Line from './Line'; +import Doughnut from './Doughnut.js'; +import HorizBar from './HorizBar.js'; +import Line from './Line.js'; chartJs.Chart.register(chartJs.CategoryScale, chartJs.LinearScale, chartJs.LineElement, chartJs.PointElement, chartJs.Title, chartJs.Tooltip, annotationPlugin, crosshairPlugin); diff --git a/packages/react-components/src/Checkbox.tsx b/packages/react-components/src/Checkbox.tsx index fddfaa8b2f..ddc9d8ea9d 100644 --- a/packages/react-components/src/Checkbox.tsx +++ b/packages/react-components/src/Checkbox.tsx @@ -3,8 +3,8 @@ import React, { useCallback } from 'react'; -import Icon from './Icon'; -import { styled } from './styled'; +import Icon from './Icon.js'; +import { styled } from './styled.js'; interface Props { className?: string; diff --git a/packages/react-components/src/Columar.tsx b/packages/react-components/src/Columar.tsx index c4b619a3f5..62203ee2a6 100644 --- a/packages/react-components/src/Columar.tsx +++ b/packages/react-components/src/Columar.tsx @@ -3,7 +3,7 @@ import React from 'react'; -import { styled } from './styled'; +import { styled } from './styled.js'; interface Props { children: React.ReactNode; diff --git a/packages/react-components/src/ConvictionDropdown.tsx b/packages/react-components/src/ConvictionDropdown.tsx index 71650ffd57..f14472cc1e 100644 --- a/packages/react-components/src/ConvictionDropdown.tsx +++ b/packages/react-components/src/ConvictionDropdown.tsx @@ -9,8 +9,8 @@ import { useBlockInterval } from '@polkadot/react-hooks'; import { calcBlockTime } from '@polkadot/react-hooks/useBlockTime'; import { BN, BN_ZERO } from '@polkadot/util'; -import Dropdown from './Dropdown'; -import { useTranslation } from './translate'; +import Dropdown from './Dropdown.js'; +import { useTranslation } from './translate.js'; export interface Props { className?: string; diff --git a/packages/react-components/src/CopyButton.tsx b/packages/react-components/src/CopyButton.tsx index cd48e51306..2faf823aed 100644 --- a/packages/react-components/src/CopyButton.tsx +++ b/packages/react-components/src/CopyButton.tsx @@ -9,9 +9,9 @@ import CopyToClipboard from 'react-copy-to-clipboard'; import { useQueue } from '@polkadot/react-hooks'; import { isString } from '@polkadot/util'; -import Button from './Button'; -import { styled } from './styled'; -import { useTranslation } from './translate'; +import Button from './Button/index.js'; +import { styled } from './styled.js'; +import { useTranslation } from './translate.js'; interface Props { children?: React.ReactNode; diff --git a/packages/react-components/src/CryptoType.tsx b/packages/react-components/src/CryptoType.tsx index 66560ee32f..6a3c8b2520 100644 --- a/packages/react-components/src/CryptoType.tsx +++ b/packages/react-components/src/CryptoType.tsx @@ -3,8 +3,8 @@ import React, { useEffect, useState } from 'react'; -import { AccountIdIsh } from './types'; -import { getAccountCryptoType } from './util'; +import { getAccountCryptoType } from './util/index.js'; +import { AccountIdIsh } from './types.js'; interface Props { accountId: AccountIdIsh; diff --git a/packages/react-components/src/DemocracyLocks.tsx b/packages/react-components/src/DemocracyLocks.tsx index 9117f69893..48fcfb9792 100644 --- a/packages/react-components/src/DemocracyLocks.tsx +++ b/packages/react-components/src/DemocracyLocks.tsx @@ -12,10 +12,10 @@ import { useBestNumber } from '@polkadot/react-hooks'; import { BlockToTime, FormatBalance } from '@polkadot/react-query'; import { BN_ZERO, bnMax, formatBalance, formatNumber } from '@polkadot/util'; -import Icon from './Icon'; -import { styled } from './styled'; -import Tooltip from './Tooltip'; -import { useTranslation } from './translate'; +import Icon from './Icon.js'; +import { styled } from './styled.js'; +import Tooltip from './Tooltip.js'; +import { useTranslation } from './translate.js'; interface Props { className?: string; diff --git a/packages/react-components/src/Dropdown.tsx b/packages/react-components/src/Dropdown.tsx index 65cf6ef7db..33dd027c8b 100644 --- a/packages/react-components/src/Dropdown.tsx +++ b/packages/react-components/src/Dropdown.tsx @@ -8,8 +8,8 @@ import { Button as SUIButton, Dropdown as SUIDropdown } from 'semantic-ui-react' import { isUndefined } from '@polkadot/util'; -import Labelled from './Labelled'; -import { styled } from './styled'; +import Labelled from './Labelled.js'; +import { styled } from './styled.js'; interface Props