From e2651bdff2eac072ed2394f69e2cf59a8c53cdba Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 28 Mar 2022 23:41:07 -0300 Subject: [PATCH] add extension to every import --- .../src/NavigationBar.tsx | 6 +-- .../src/background.dev.ts | 6 +-- .../src/background.ts | 8 ++-- .../src/chromeBadge.ts | 2 +- .../src/components/BalanceTable.tsx | 4 +- .../src/components/BankDetailsByPaytoType.tsx | 6 +-- .../src/components/Banner.stories.tsx | 8 ++-- .../src/components/Banner.tsx | 12 ++--- .../src/components/CheckboxOutlined.tsx | 2 +- .../src/components/DebugCheckbox.tsx | 2 +- .../src/components/Diagnostics.tsx | 2 +- .../src/components/EditableText.tsx | 2 +- .../src/components/ErrorMessage.tsx | 2 +- .../src/components/ErrorTalerOperation.tsx | 4 +- .../src/components/JustInDevMode.tsx | 2 +- .../src/components/Loading.tsx | 4 +- .../src/components/LoadingError.tsx | 6 +-- .../src/components/MultiActionButton.tsx | 6 ++- .../src/components/Part.tsx | 2 +- .../PendingTransactions.stories.tsx | 6 +-- .../src/components/PendingTransactions.tsx | 12 ++--- .../src/components/SelectList.tsx | 4 +- .../src/components/TransactionItem.tsx | 10 ++--- .../src/context/devContext.ts | 2 +- .../src/context/iocContext.ts | 2 +- .../src/context/translation.ts | 4 +- .../src/cta/Deposit.stories.tsx | 4 +- .../src/cta/Deposit.tsx | 14 +++--- .../src/cta/Pay.stories.tsx | 4 +- .../taler-wallet-webextension/src/cta/Pay.tsx | 20 ++++----- .../src/cta/Refund.stories.tsx | 4 +- .../src/cta/Refund.tsx | 14 +++--- .../src/cta/TermsOfServiceSection.tsx | 10 ++--- .../src/cta/Tip.stories.tsx | 4 +- .../taler-wallet-webextension/src/cta/Tip.tsx | 13 +++--- .../src/cta/Withdraw.stories.tsx | 6 +-- .../src/cta/Withdraw.tsx | 24 +++++----- .../src/cta/return-coins.tsx | 2 +- .../src/cta/termsExample.ts | 1 + .../src/hooks/useAsyncAsHook.ts | 2 +- .../src/hooks/useBackupDeviceName.ts | 2 +- .../src/hooks/useDiagnostics.ts | 2 +- .../src/hooks/useExtendedPermissions.ts | 6 +-- .../src/hooks/useLang.ts | 2 +- .../src/hooks/useProviderStatus.ts | 2 +- .../src/hooks/useTalerActionURL.test.ts | 6 +-- .../src/hooks/useTalerActionURL.ts | 2 +- .../src/mui/Avatar.tsx | 1 + .../src/mui/Button.stories.tsx | 2 +- .../src/mui/Button.tsx | 2 + .../src/mui/Grid.stories.tsx | 2 +- .../src/mui/Grid.tsx | 1 + .../src/mui/Paper.stories.tsx | 4 +- .../src/mui/Paper.tsx | 6 ++- .../src/mui/TextField.stories.tsx | 2 +- .../src/mui/TextField.tsx | 43 +++++++++--------- .../src/mui/Typography.tsx | 3 +- .../src/mui/colors/manipulation.test.ts | 2 +- .../src/mui/colors/manipulation.ts | 8 ++-- .../src/mui/index.stories.tsx | 8 ++-- .../src/mui/input/FormControl.tsx | 13 +++--- .../src/mui/input/FormHelperText.tsx | 3 +- .../src/mui/input/FormLabel.tsx | 3 +- .../src/mui/input/InputBase.tsx | 5 ++- .../src/mui/input/InputLabel.tsx | 5 ++- .../src/mui/input/InputStandard.tsx | 5 ++- .../src/mui/style.tsx | 4 +- .../src/platform/chrome.ts | 2 +- .../src/platform/dev.ts | 5 +-- .../src/platform/firefox.ts | 2 +- .../src/popup/Application.tsx | 24 +++++----- .../src/popup/Balance.stories.tsx | 4 +- .../src/popup/BalancePage.tsx | 22 +++++----- .../src/popup/NoBalanceHelp.tsx | 7 ++- .../src/popup/TalerActionFound.stories.tsx | 4 +- .../src/popup/TalerActionFound.tsx | 10 +++-- .../src/popup/index.stories.tsx | 4 +- .../src/popupEntryPoint.dev.tsx | 8 ++-- .../src/popupEntryPoint.tsx | 10 ++--- .../src/stories.test.ts | 9 ++-- .../taler-wallet-webextension/src/stories.tsx | 12 ++--- .../src/wallet/AddNewActionView.stories.tsx | 4 +- .../src/wallet/AddNewActionView.tsx | 10 +++-- .../src/wallet/Application.tsx | 44 +++++++++---------- .../src/wallet/Backup.stories.tsx | 4 +- .../src/wallet/BackupPage.tsx | 14 +++--- .../wallet/CreateManualWithdraw.stories.tsx | 4 +- .../src/wallet/CreateManualWithdraw.test.ts | 4 +- .../src/wallet/CreateManualWithdraw.tsx | 10 ++--- .../src/wallet/DepositPage.stories.tsx | 4 +- .../src/wallet/DepositPage.test.ts | 4 +- .../src/wallet/DepositPage.tsx | 19 ++++---- .../src/wallet/DeveloperPage.stories.tsx | 4 +- .../src/wallet/DeveloperPage.tsx | 16 +++---- .../src/wallet/ExchangeAddConfirm.stories.tsx | 6 +-- .../src/wallet/ExchangeAddConfirm.tsx | 12 ++--- .../src/wallet/ExchangeAddPage.tsx | 10 ++--- .../src/wallet/ExchangeAddSetUrl.stories.tsx | 6 +-- .../src/wallet/ExchangeSetUrl.tsx | 6 +-- .../src/wallet/History.stories.tsx | 4 +- .../src/wallet/History.tsx | 22 +++++----- .../src/wallet/ManualWithdrawPage.tsx | 14 +++--- .../ProviderAddConfirmProvider.stories.tsx | 4 +- .../src/wallet/ProviderAddPage.tsx | 12 ++--- .../src/wallet/ProviderAddSetUrl.stories.tsx | 4 +- .../src/wallet/ProviderDetail.stories.tsx | 4 +- .../src/wallet/ProviderDetailPage.tsx | 16 +++---- .../src/wallet/ReserveCreated.stories.tsx | 4 +- .../src/wallet/ReserveCreated.tsx | 14 +++--- .../src/wallet/Settings.stories.tsx | 4 +- .../src/wallet/Settings.tsx | 26 +++++------ .../src/wallet/Transaction.stories.tsx | 6 +-- .../src/wallet/Transaction.tsx | 20 ++++----- .../src/wallet/Welcome.stories.tsx | 4 +- .../src/wallet/Welcome.tsx | 12 ++--- .../src/wallet/index.stories.tsx | 30 ++++++------- .../src/walletEntryPoint.dev.tsx | 8 ++-- .../src/walletEntryPoint.tsx | 10 ++--- .../src/wxBackend.ts | 12 ++--- 119 files changed, 479 insertions(+), 447 deletions(-) diff --git a/packages/taler-wallet-webextension/src/NavigationBar.tsx b/packages/taler-wallet-webextension/src/NavigationBar.tsx index 680c34a9b..8b545b981 100644 --- a/packages/taler-wallet-webextension/src/NavigationBar.tsx +++ b/packages/taler-wallet-webextension/src/NavigationBar.tsx @@ -25,13 +25,13 @@ * Imports. */ import { h, VNode } from "preact"; -import { JustInDevMode } from "./components/JustInDevMode"; +import { JustInDevMode } from "./components/JustInDevMode.js"; import { NavigationHeader, NavigationHeaderHolder, SvgIcon, -} from "./components/styled"; -import { useTranslationContext } from "./context/translation"; +} from "./components/styled/index.js"; +import { useTranslationContext } from "./context/translation.js"; import settingsIcon from "./svg/settings_black_24dp.svg"; /** diff --git a/packages/taler-wallet-webextension/src/background.dev.ts b/packages/taler-wallet-webextension/src/background.dev.ts index 1493ec246..d27d83bab 100644 --- a/packages/taler-wallet-webextension/src/background.dev.ts +++ b/packages/taler-wallet-webextension/src/background.dev.ts @@ -23,9 +23,9 @@ /** * Imports. */ -import { platform, setupPlatform } from "./platform/api"; -import devAPI from "./platform/dev" -import { wxMain } from "./wxBackend"; +import { platform, setupPlatform } from "./platform/api.js"; +import devAPI from "./platform/dev.js"; +import { wxMain } from "./wxBackend.js"; console.log("Wallet setup for Dev API") setupPlatform(devAPI) diff --git a/packages/taler-wallet-webextension/src/background.ts b/packages/taler-wallet-webextension/src/background.ts index 7cda6e9ef..d0abd4805 100644 --- a/packages/taler-wallet-webextension/src/background.ts +++ b/packages/taler-wallet-webextension/src/background.ts @@ -23,10 +23,10 @@ /** * Imports. */ -import { platform, setupPlatform } from "./platform/api"; -import firefoxAPI from "./platform/firefox" -import chromeAPI from "./platform/chrome" -import { wxMain } from "./wxBackend"; +import { platform, setupPlatform } from "./platform/api.js"; +import firefoxAPI from "./platform/firefox.js"; +import chromeAPI from "./platform/chrome.js"; +import { wxMain } from "./wxBackend.js"; const isFirefox = typeof (window as any)['InstallTrigger'] !== 'undefined' diff --git a/packages/taler-wallet-webextension/src/chromeBadge.ts b/packages/taler-wallet-webextension/src/chromeBadge.ts index 74c2fcd2f..71cce4472 100644 --- a/packages/taler-wallet-webextension/src/chromeBadge.ts +++ b/packages/taler-wallet-webextension/src/chromeBadge.ts @@ -14,7 +14,7 @@ TALER; see the file COPYING. If not, see */ -import { platform } from "./platform/api"; +import { platform } from "./platform/api.js"; /** * Polyfill for requestAnimationFrame, which diff --git a/packages/taler-wallet-webextension/src/components/BalanceTable.tsx b/packages/taler-wallet-webextension/src/components/BalanceTable.tsx index c69625cd2..e67fb6b4d 100644 --- a/packages/taler-wallet-webextension/src/components/BalanceTable.tsx +++ b/packages/taler-wallet-webextension/src/components/BalanceTable.tsx @@ -14,9 +14,9 @@ TALER; see the file COPYING. If not, see */ -import { Amounts, amountToPretty, Balance } from "@gnu-taler/taler-util"; +import { Amounts, Balance } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; -import { TableWithRoundRows as TableWithRoundedRows } from "./styled"; +import { TableWithRoundRows as TableWithRoundedRows } from "./styled/index.js"; export function BalanceTable({ balances, diff --git a/packages/taler-wallet-webextension/src/components/BankDetailsByPaytoType.tsx b/packages/taler-wallet-webextension/src/components/BankDetailsByPaytoType.tsx index f55f5c846..aff2badac 100644 --- a/packages/taler-wallet-webextension/src/components/BankDetailsByPaytoType.tsx +++ b/packages/taler-wallet-webextension/src/components/BankDetailsByPaytoType.tsx @@ -17,9 +17,9 @@ import { PaytoUri } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useEffect, useState } from "preact/hooks"; -import { useTranslationContext } from "../context/translation"; -import { CopiedIcon, CopyIcon } from "../svg"; -import { ButtonBox, TooltipRight } from "./styled"; +import { useTranslationContext } from "../context/translation.js"; +import { CopiedIcon, CopyIcon } from "../svg/index.js"; +import { ButtonBox, TooltipRight } from "./styled/index.js"; export interface BankDetailsProps { payto: PaytoUri | undefined; diff --git a/packages/taler-wallet-webextension/src/components/Banner.stories.tsx b/packages/taler-wallet-webextension/src/components/Banner.stories.tsx index 258bd0676..e4fc63ac1 100644 --- a/packages/taler-wallet-webextension/src/components/Banner.stories.tsx +++ b/packages/taler-wallet-webextension/src/components/Banner.stories.tsx @@ -19,11 +19,11 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { Banner } from "./Banner"; +import { Banner } from "./Banner.js"; import { Fragment, h, VNode } from "preact"; -import { Avatar } from "../mui/Avatar"; -import { Icon, SvgIcon } from "./styled"; -import { Typography } from "../mui/Typography"; +import { Avatar } from "../mui/Avatar.js"; +import { Icon, SvgIcon } from "./styled/index.js"; +import { Typography } from "../mui/Typography.js"; export default { title: "mui/banner", diff --git a/packages/taler-wallet-webextension/src/components/Banner.tsx b/packages/taler-wallet-webextension/src/components/Banner.tsx index 77d79d873..7bbacee8d 100644 --- a/packages/taler-wallet-webextension/src/components/Banner.tsx +++ b/packages/taler-wallet-webextension/src/components/Banner.tsx @@ -1,10 +1,10 @@ import { h, Fragment, VNode, JSX } from "preact"; -import { Divider } from "../mui/Divider"; -import { Button } from "../mui/Button"; -import { Typography } from "../mui/Typography"; -import { Avatar } from "../mui/Avatar"; -import { Grid } from "../mui/Grid"; -import { Paper } from "../mui/Paper"; +import { Divider } from "../mui/Divider.js"; +import { Button } from "../mui/Button.js"; +import { Typography } from "../mui/Typography.js"; +import { Avatar } from "../mui/Avatar.js"; +import { Grid } from "../mui/Grid.js"; +import { Paper } from "../mui/Paper.js"; interface Props extends JSX.HTMLAttributes { title?: string; diff --git a/packages/taler-wallet-webextension/src/components/CheckboxOutlined.tsx b/packages/taler-wallet-webextension/src/components/CheckboxOutlined.tsx index de7fb5e6c..959f354a4 100644 --- a/packages/taler-wallet-webextension/src/components/CheckboxOutlined.tsx +++ b/packages/taler-wallet-webextension/src/components/CheckboxOutlined.tsx @@ -14,7 +14,7 @@ GNU Taler; see the file COPYING. If not, see */ -import { Outlined, StyledCheckboxLabel } from "./styled"; +import { Outlined, StyledCheckboxLabel } from "./styled/index.js"; import { h, VNode } from "preact"; interface Props { diff --git a/packages/taler-wallet-webextension/src/components/DebugCheckbox.tsx b/packages/taler-wallet-webextension/src/components/DebugCheckbox.tsx index dc42b9ef7..8d431f683 100644 --- a/packages/taler-wallet-webextension/src/components/DebugCheckbox.tsx +++ b/packages/taler-wallet-webextension/src/components/DebugCheckbox.tsx @@ -15,7 +15,7 @@ */ import { h, VNode } from "preact"; -import { useTranslationContext } from "../context/translation"; +import { useTranslationContext } from "../context/translation.js"; export function DebugCheckbox({ enabled, diff --git a/packages/taler-wallet-webextension/src/components/Diagnostics.tsx b/packages/taler-wallet-webextension/src/components/Diagnostics.tsx index 0cffff693..98e4e7a03 100644 --- a/packages/taler-wallet-webextension/src/components/Diagnostics.tsx +++ b/packages/taler-wallet-webextension/src/components/Diagnostics.tsx @@ -16,7 +16,7 @@ import { WalletDiagnostics } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; -import { useTranslationContext } from "../context/translation"; +import { useTranslationContext } from "../context/translation.js"; interface Props { timedOut: boolean; diff --git a/packages/taler-wallet-webextension/src/components/EditableText.tsx b/packages/taler-wallet-webextension/src/components/EditableText.tsx index 8f342ef28..5b0ece5a6 100644 --- a/packages/taler-wallet-webextension/src/components/EditableText.tsx +++ b/packages/taler-wallet-webextension/src/components/EditableText.tsx @@ -16,7 +16,7 @@ import { h, VNode } from "preact"; import { useRef, useState } from "preact/hooks"; -import { useTranslationContext } from "../context/translation"; +import { useTranslationContext } from "../context/translation.js"; interface Props { value: string; diff --git a/packages/taler-wallet-webextension/src/components/ErrorMessage.tsx b/packages/taler-wallet-webextension/src/components/ErrorMessage.tsx index d6765c13d..88725e9cb 100644 --- a/packages/taler-wallet-webextension/src/components/ErrorMessage.tsx +++ b/packages/taler-wallet-webextension/src/components/ErrorMessage.tsx @@ -16,7 +16,7 @@ import { VNode, h, ComponentChildren } from "preact"; import { useState } from "preact/hooks"; import arrowDown from "../svg/chevron-down.svg"; -import { ErrorBox } from "./styled"; +import { ErrorBox } from "./styled/index.js"; export function ErrorMessage({ title, diff --git a/packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx b/packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx index 9fd8f7a03..5e94578a4 100644 --- a/packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx +++ b/packages/taler-wallet-webextension/src/components/ErrorTalerOperation.tsx @@ -17,8 +17,8 @@ import { TalerErrorDetail } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; import arrowDown from "../svg/chevron-down.svg"; -import { useDevContext } from "../context/devContext"; -import { ErrorBox } from "./styled"; +import { useDevContext } from "../context/devContext.js"; +import { ErrorBox } from "./styled/index.js"; export function ErrorTalerOperation({ title, diff --git a/packages/taler-wallet-webextension/src/components/JustInDevMode.tsx b/packages/taler-wallet-webextension/src/components/JustInDevMode.tsx index d447f87eb..28e503095 100644 --- a/packages/taler-wallet-webextension/src/components/JustInDevMode.tsx +++ b/packages/taler-wallet-webextension/src/components/JustInDevMode.tsx @@ -1,5 +1,5 @@ import { ComponentChildren, Fragment, h, VNode } from "preact"; -import { useDevContext } from "../context/devContext"; +import { useDevContext } from "../context/devContext.js"; export function JustInDevMode({ children, diff --git a/packages/taler-wallet-webextension/src/components/Loading.tsx b/packages/taler-wallet-webextension/src/components/Loading.tsx index d28953a10..c0749a3f0 100644 --- a/packages/taler-wallet-webextension/src/components/Loading.tsx +++ b/packages/taler-wallet-webextension/src/components/Loading.tsx @@ -15,8 +15,8 @@ */ import { Fragment, h, VNode } from "preact"; import { useEffect, useState } from "preact/hooks"; -import { useTranslationContext } from "../context/translation"; -import { CenteredText } from "./styled"; +import { useTranslationContext } from "../context/translation.js"; +import { CenteredText } from "./styled/index.js"; export function Loading(): VNode { const { i18n } = useTranslationContext(); diff --git a/packages/taler-wallet-webextension/src/components/LoadingError.tsx b/packages/taler-wallet-webextension/src/components/LoadingError.tsx index ea0ff40d6..c1e5918f5 100644 --- a/packages/taler-wallet-webextension/src/components/LoadingError.tsx +++ b/packages/taler-wallet-webextension/src/components/LoadingError.tsx @@ -14,9 +14,9 @@ TALER; see the file COPYING. If not, see */ import { h, VNode } from "preact"; -import { HookError } from "../hooks/useAsyncAsHook"; -import { ErrorMessage } from "./ErrorMessage"; -import { ErrorTalerOperation } from "./ErrorTalerOperation"; +import { HookError } from "../hooks/useAsyncAsHook.js"; +import { ErrorMessage } from "./ErrorMessage.js"; +import { ErrorTalerOperation } from "./ErrorTalerOperation.js"; export interface Props { title: VNode; diff --git a/packages/taler-wallet-webextension/src/components/MultiActionButton.tsx b/packages/taler-wallet-webextension/src/components/MultiActionButton.tsx index d1b5e45ad..c4ccaa696 100644 --- a/packages/taler-wallet-webextension/src/components/MultiActionButton.tsx +++ b/packages/taler-wallet-webextension/src/components/MultiActionButton.tsx @@ -1,6 +1,10 @@ import { h, VNode } from "preact"; import arrowDown from "../svg/chevron-down.svg"; -import { ButtonBoxPrimary, ButtonPrimary, ParagraphClickable } from "./styled"; +import { + ButtonBoxPrimary, + ButtonPrimary, + ParagraphClickable, +} from "./styled/index.js"; import { useState } from "preact/hooks"; export interface Props { diff --git a/packages/taler-wallet-webextension/src/components/Part.tsx b/packages/taler-wallet-webextension/src/components/Part.tsx index 89cc51391..1d38d16bf 100644 --- a/packages/taler-wallet-webextension/src/components/Part.tsx +++ b/packages/taler-wallet-webextension/src/components/Part.tsx @@ -14,7 +14,7 @@ GNU Taler; see the file COPYING. If not, see */ import { AmountLike } from "@gnu-taler/taler-util"; -import { ExtraLargeText, LargeText, SmallLightText } from "./styled"; +import { ExtraLargeText, LargeText, SmallLightText } from "./styled/index.js"; import { h, VNode } from "preact"; export type Kind = "positive" | "negative" | "neutral"; diff --git a/packages/taler-wallet-webextension/src/components/PendingTransactions.stories.tsx b/packages/taler-wallet-webextension/src/components/PendingTransactions.stories.tsx index ea29d4a78..27146479b 100644 --- a/packages/taler-wallet-webextension/src/components/PendingTransactions.stories.tsx +++ b/packages/taler-wallet-webextension/src/components/PendingTransactions.stories.tsx @@ -19,9 +19,9 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { PendingTransactionsView as TestedComponent } from "./PendingTransactions"; +import { PendingTransactionsView as TestedComponent } from "./PendingTransactions.js"; import { Fragment, h, VNode } from "preact"; -import { createExample } from "../test-utils"; +import { createExample } from "../test-utils.js"; import { TalerProtocolTimestamp, Transaction, @@ -73,7 +73,7 @@ export const TenPendingTransactions = createExample(TestedComponent, { { amountEffective: "USD:10", type: TransactionType.Withdrawal, - timestamp: TalerProtocolTimestamp.fromSeconds(1) + timestamp: TalerProtocolTimestamp.fromSeconds(1), } as Transaction, { amountEffective: "USD:10", diff --git a/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx b/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx index 7923eb6ad..0a101acd0 100644 --- a/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx +++ b/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx @@ -6,12 +6,12 @@ import { } from "@gnu-taler/taler-util"; import { PendingTaskInfo } from "@gnu-taler/taler-wallet-core"; import { Fragment, h, JSX } from "preact"; -import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; -import { Avatar } from "../mui/Avatar"; -import { Typography } from "../mui/Typography"; -import Banner from "./Banner"; -import { Time } from "./Time"; -import * as wxApi from "../wxApi"; +import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; +import { Avatar } from "../mui/Avatar.js"; +import { Typography } from "../mui/Typography.js"; +import Banner from "./Banner.js"; +import { Time } from "./Time.js"; +import * as wxApi from "../wxApi.js"; interface Props extends JSX.HTMLAttributes { goToTransaction: (id: string) => void; diff --git a/packages/taler-wallet-webextension/src/components/SelectList.tsx b/packages/taler-wallet-webextension/src/components/SelectList.tsx index 122b473b1..aa17d82b8 100644 --- a/packages/taler-wallet-webextension/src/components/SelectList.tsx +++ b/packages/taler-wallet-webextension/src/components/SelectList.tsx @@ -15,8 +15,8 @@ */ import { Fragment, h, VNode } from "preact"; -import { useTranslationContext } from "../context/translation"; -import { NiceSelect } from "./styled"; +import { useTranslationContext } from "../context/translation.js"; +import { NiceSelect } from "./styled/index.js"; interface Props { value?: string; diff --git a/packages/taler-wallet-webextension/src/components/TransactionItem.tsx b/packages/taler-wallet-webextension/src/components/TransactionItem.tsx index d7eae7bb6..985ddf552 100644 --- a/packages/taler-wallet-webextension/src/components/TransactionItem.tsx +++ b/packages/taler-wallet-webextension/src/components/TransactionItem.tsx @@ -23,9 +23,9 @@ import { TransactionType, } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; -import { useTranslationContext } from "../context/translation"; -import { Avatar } from "../mui/Avatar"; -import { Pages } from "../NavigationBar"; +import { useTranslationContext } from "../context/translation.js"; +import { Avatar } from "../mui/Avatar.js"; +import { Pages } from "../NavigationBar.js"; import { Column, ExtraLargeText, @@ -33,8 +33,8 @@ import { LargeText, LightText, SmallLightText, -} from "./styled"; -import { Time } from "./Time"; +} from "./styled/index.js"; +import { Time } from "./Time.js"; export function TransactionItem(props: { tx: Transaction }): VNode { const tx = props.tx; diff --git a/packages/taler-wallet-webextension/src/context/devContext.ts b/packages/taler-wallet-webextension/src/context/devContext.ts index 4b8ba2bcd..c568866eb 100644 --- a/packages/taler-wallet-webextension/src/context/devContext.ts +++ b/packages/taler-wallet-webextension/src/context/devContext.ts @@ -21,7 +21,7 @@ import { createContext, h, VNode } from "preact"; import { useContext } from "preact/hooks"; -import { useLocalStorage } from "../hooks/useLocalStorage"; +import { useLocalStorage } from "../hooks/useLocalStorage.js"; interface Type { devMode: boolean; diff --git a/packages/taler-wallet-webextension/src/context/iocContext.ts b/packages/taler-wallet-webextension/src/context/iocContext.ts index a24b0c1ca..aaf1f8b67 100644 --- a/packages/taler-wallet-webextension/src/context/iocContext.ts +++ b/packages/taler-wallet-webextension/src/context/iocContext.ts @@ -21,7 +21,7 @@ import { createContext, h, VNode } from "preact"; import { useContext } from "preact/hooks"; -import { platform } from "../platform/api"; +import { platform } from "../platform/api.js"; interface Type { findTalerUriInActiveTab: () => Promise; diff --git a/packages/taler-wallet-webextension/src/context/translation.ts b/packages/taler-wallet-webextension/src/context/translation.ts index 82ea41e32..b39a7e0de 100644 --- a/packages/taler-wallet-webextension/src/context/translation.ts +++ b/packages/taler-wallet-webextension/src/context/translation.ts @@ -21,10 +21,10 @@ import { createContext, h, VNode } from "preact"; import { useContext, useEffect } from "preact/hooks"; -import { useLang } from "../hooks/useLang"; +import { useLang } from "../hooks/useLang.js"; //@ts-ignore: type declaration import * as jedLib from "jed"; -import { strings } from "../i18n/strings"; +import { strings } from "../i18n/strings.js"; import { setupI18n, i18n } from "@gnu-taler/taler-util"; interface Type { diff --git a/packages/taler-wallet-webextension/src/cta/Deposit.stories.tsx b/packages/taler-wallet-webextension/src/cta/Deposit.stories.tsx index df5947bb1..923ea9e96 100644 --- a/packages/taler-wallet-webextension/src/cta/Deposit.stories.tsx +++ b/packages/taler-wallet-webextension/src/cta/Deposit.stories.tsx @@ -20,8 +20,8 @@ */ import { ContractTerms, PreparePayResultType } from "@gnu-taler/taler-util"; -import { createExample } from "../test-utils"; -import { PaymentRequestView as TestedComponent } from "./Deposit"; +import { createExample } from "../test-utils.js"; +import { PaymentRequestView as TestedComponent } from "./Deposit.js"; export default { title: "cta/deposit", diff --git a/packages/taler-wallet-webextension/src/cta/Deposit.tsx b/packages/taler-wallet-webextension/src/cta/Deposit.tsx index 1b90a7ec1..3b6b798ee 100644 --- a/packages/taler-wallet-webextension/src/cta/Deposit.tsx +++ b/packages/taler-wallet-webextension/src/cta/Deposit.tsx @@ -38,19 +38,19 @@ import { import { TalerError } from "@gnu-taler/taler-wallet-core"; import { Fragment, h, VNode } from "preact"; import { useEffect, useState } from "preact/hooks"; -import { ErrorTalerOperation } from "../components/ErrorTalerOperation"; -import { LogoHeader } from "../components/LogoHeader"; -import { Part } from "../components/Part"; +import { ErrorTalerOperation } from "../components/ErrorTalerOperation.js"; +import { LogoHeader } from "../components/LogoHeader.js"; +import { Part } from "../components/Part.js"; import { ErrorBox, SubTitle, SuccessBox, WalletAction, WarningBox, -} from "../components/styled"; -import { useTranslationContext } from "../context/translation"; -import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; -import * as wxApi from "../wxApi"; +} from "../components/styled/index.js"; +import { useTranslationContext } from "../context/translation.js"; +import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; +import * as wxApi from "../wxApi.js"; interface Props { talerPayUri?: string; diff --git a/packages/taler-wallet-webextension/src/cta/Pay.stories.tsx b/packages/taler-wallet-webextension/src/cta/Pay.stories.tsx index 2fdcd992c..3804ab3d3 100644 --- a/packages/taler-wallet-webextension/src/cta/Pay.stories.tsx +++ b/packages/taler-wallet-webextension/src/cta/Pay.stories.tsx @@ -20,8 +20,8 @@ */ import { ContractTerms, PreparePayResultType } from "@gnu-taler/taler-util"; -import { createExample } from "../test-utils"; -import { PaymentRequestView as TestedComponent } from "./Pay"; +import { createExample } from "../test-utils.js"; +import { PaymentRequestView as TestedComponent } from "./Pay.js"; export default { title: "cta/pay", diff --git a/packages/taler-wallet-webextension/src/cta/Pay.tsx b/packages/taler-wallet-webextension/src/cta/Pay.tsx index 28b84a534..4d1758e2e 100644 --- a/packages/taler-wallet-webextension/src/cta/Pay.tsx +++ b/packages/taler-wallet-webextension/src/cta/Pay.tsx @@ -39,12 +39,12 @@ import { import { TalerError } from "@gnu-taler/taler-wallet-core"; import { Fragment, h, VNode } from "preact"; import { useEffect, useState } from "preact/hooks"; -import { ErrorMessage } from "../components/ErrorMessage"; -import { Loading } from "../components/Loading"; -import { LoadingError } from "../components/LoadingError"; -import { LogoHeader } from "../components/LogoHeader"; -import { Part } from "../components/Part"; -import { QR } from "../components/QR"; +import { ErrorMessage } from "../components/ErrorMessage.js"; +import { Loading } from "../components/Loading.js"; +import { LoadingError } from "../components/LoadingError.js"; +import { LogoHeader } from "../components/LogoHeader.js"; +import { Part } from "../components/Part.js"; +import { QR } from "../components/QR.js"; import { ButtonSuccess, Link, @@ -55,10 +55,10 @@ import { SuccessBox, WalletAction, WarningBox, -} from "../components/styled"; -import { useTranslationContext } from "../context/translation"; -import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; -import * as wxApi from "../wxApi"; +} from "../components/styled/index.js"; +import { useTranslationContext } from "../context/translation.js"; +import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; +import * as wxApi from "../wxApi.js"; interface Props { talerPayUri?: string; diff --git a/packages/taler-wallet-webextension/src/cta/Refund.stories.tsx b/packages/taler-wallet-webextension/src/cta/Refund.stories.tsx index e71170ff1..c48841719 100644 --- a/packages/taler-wallet-webextension/src/cta/Refund.stories.tsx +++ b/packages/taler-wallet-webextension/src/cta/Refund.stories.tsx @@ -20,8 +20,8 @@ */ import { OrderShortInfo } from "@gnu-taler/taler-util"; -import { createExample } from "../test-utils"; -import { View as TestedComponent } from "./Refund"; +import { createExample } from "../test-utils.js"; +import { View as TestedComponent } from "./Refund.js"; export default { title: "cta/refund", diff --git a/packages/taler-wallet-webextension/src/cta/Refund.tsx b/packages/taler-wallet-webextension/src/cta/Refund.tsx index 99fe1f019..23231328a 100644 --- a/packages/taler-wallet-webextension/src/cta/Refund.tsx +++ b/packages/taler-wallet-webextension/src/cta/Refund.tsx @@ -28,9 +28,9 @@ import { } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; import { useEffect, useState } from "preact/hooks"; -import { SubTitle, Title } from "../components/styled"; -import { useTranslationContext } from "../context/translation"; -import * as wxApi from "../wxApi"; +import { SubTitle, Title } from "../components/styled/index.js"; +import { useTranslationContext } from "../context/translation.js"; +import * as wxApi from "../wxApi.js"; interface Props { talerRefundUri?: string; @@ -144,8 +144,6 @@ export function renderAmount(amount: AmountJson | string): VNode { ); } -export const AmountView = ({ - amount, -}: { - amount: AmountJson | string; -}): VNode => renderAmount(amount); +function AmountView({ amount }: { amount: AmountJson | string }): VNode { + return renderAmount(amount); +} diff --git a/packages/taler-wallet-webextension/src/cta/TermsOfServiceSection.tsx b/packages/taler-wallet-webextension/src/cta/TermsOfServiceSection.tsx index 2073ef775..0320a8c15 100644 --- a/packages/taler-wallet-webextension/src/cta/TermsOfServiceSection.tsx +++ b/packages/taler-wallet-webextension/src/cta/TermsOfServiceSection.tsx @@ -1,6 +1,6 @@ import { Fragment, h, VNode } from "preact"; -import { CheckboxOutlined } from "../components/CheckboxOutlined"; -import { ExchangeXmlTos } from "../components/ExchangeToS"; +import { CheckboxOutlined } from "../components/CheckboxOutlined.js"; +import { ExchangeXmlTos } from "../components/ExchangeToS.js"; import { ButtonSuccess, ButtonWarning, @@ -8,9 +8,9 @@ import { TermsOfService, WarningBox, WarningText, -} from "../components/styled"; -import { useTranslationContext } from "../context/translation"; -import { TermsState } from "../utils/index"; +} from "../components/styled/index.js"; +import { useTranslationContext } from "../context/translation.js"; +import { TermsState } from "../utils/index.js"; interface Props { reviewing: boolean; diff --git a/packages/taler-wallet-webextension/src/cta/Tip.stories.tsx b/packages/taler-wallet-webextension/src/cta/Tip.stories.tsx index e475a9610..9637be087 100644 --- a/packages/taler-wallet-webextension/src/cta/Tip.stories.tsx +++ b/packages/taler-wallet-webextension/src/cta/Tip.stories.tsx @@ -20,8 +20,8 @@ */ import { AbsoluteTime, TalerProtocolTimestamp } from "@gnu-taler/taler-util"; -import { createExample } from "../test-utils"; -import { View as TestedComponent } from "./Tip"; +import { createExample } from "../test-utils.js"; +import { View as TestedComponent } from "./Tip.js"; export default { title: "cta/tip", diff --git a/packages/taler-wallet-webextension/src/cta/Tip.tsx b/packages/taler-wallet-webextension/src/cta/Tip.tsx index f05b72fe9..2725140b0 100644 --- a/packages/taler-wallet-webextension/src/cta/Tip.tsx +++ b/packages/taler-wallet-webextension/src/cta/Tip.tsx @@ -28,10 +28,10 @@ import { } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; import { useEffect, useState } from "preact/hooks"; -import { Loading } from "../components/Loading"; -import { Title } from "../components/styled"; -import { useTranslationContext } from "../context/translation"; -import * as wxApi from "../wxApi"; +import { Loading } from "../components/Loading.js"; +import { Title } from "../components/styled/index.js"; +import { useTranslationContext } from "../context/translation.js"; +import * as wxApi from "../wxApi.js"; interface Props { talerTipUri?: string; @@ -160,5 +160,6 @@ function renderAmount(amount: AmountJson | string): VNode { ); } -const AmountView = ({ amount }: { amount: AmountJson | string }): VNode => - renderAmount(amount); +function AmountView({ amount }: { amount: AmountJson | string }): VNode { + return renderAmount(amount); +} diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw.stories.tsx b/packages/taler-wallet-webextension/src/cta/Withdraw.stories.tsx index 3f548366a..dee063637 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw.stories.tsx +++ b/packages/taler-wallet-webextension/src/cta/Withdraw.stories.tsx @@ -20,9 +20,9 @@ */ import { amountFractionalBase, ExchangeListItem } from "@gnu-taler/taler-util"; -import { createExample } from "../test-utils"; -import { termsHtml, termsPdf, termsPlain, termsXml } from "./termsExample"; -import { View as TestedComponent } from "./Withdraw"; +import { createExample } from "../test-utils.js"; +import { termsHtml, termsPdf, termsPlain, termsXml } from "./termsExample.js"; +import { View as TestedComponent } from "./Withdraw.js"; function parseFromString(s: string): Document { if (typeof window === "undefined") { diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw.tsx b/packages/taler-wallet-webextension/src/cta/Withdraw.tsx index a5e52d258..feac2cebb 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw.tsx +++ b/packages/taler-wallet-webextension/src/cta/Withdraw.tsx @@ -29,28 +29,28 @@ import { } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; -import { Loading } from "../components/Loading"; -import { LoadingError } from "../components/LoadingError"; -import { ErrorTalerOperation } from "../components/ErrorTalerOperation"; -import { LogoHeader } from "../components/LogoHeader"; -import { Part } from "../components/Part"; -import { SelectList } from "../components/SelectList"; +import { Loading } from "../components/Loading.js"; +import { LoadingError } from "../components/LoadingError.js"; +import { ErrorTalerOperation } from "../components/ErrorTalerOperation.js"; +import { LogoHeader } from "../components/LogoHeader.js"; +import { Part } from "../components/Part.js"; +import { SelectList } from "../components/SelectList.js"; import { ButtonSuccess, ButtonWarning, LinkSuccess, SubTitle, WalletAction, -} from "../components/styled"; -import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; +} from "../components/styled/index.js"; +import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; import { amountToString, buildTermsOfServiceState, TermsState, -} from "../utils/index"; -import * as wxApi from "../wxApi"; -import { TermsOfServiceSection } from "./TermsOfServiceSection"; -import { useTranslationContext } from "../context/translation"; +} from "../utils/index.js"; +import * as wxApi from "../wxApi.js"; +import { TermsOfServiceSection } from "./TermsOfServiceSection.js"; +import { useTranslationContext } from "../context/translation.js"; import { TalerError } from "@gnu-taler/taler-wallet-core"; interface Props { diff --git a/packages/taler-wallet-webextension/src/cta/return-coins.tsx b/packages/taler-wallet-webextension/src/cta/return-coins.tsx index e7a784e2c..d4ea06361 100644 --- a/packages/taler-wallet-webextension/src/cta/return-coins.tsx +++ b/packages/taler-wallet-webextension/src/cta/return-coins.tsx @@ -15,7 +15,7 @@ */ import { h, VNode } from "preact"; -import { useTranslationContext } from "../context/translation"; +import { useTranslationContext } from "../context/translation.js"; /** * Return coins to own bank account. * diff --git a/packages/taler-wallet-webextension/src/cta/termsExample.ts b/packages/taler-wallet-webextension/src/cta/termsExample.ts index d42e49c86..986874c18 100644 --- a/packages/taler-wallet-webextension/src/cta/termsExample.ts +++ b/packages/taler-wallet-webextension/src/cta/termsExample.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-useless-escape */ /* This file is part of GNU Taler (C) 2021 Taler Systems S.A. diff --git a/packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts b/packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts index 8d31de94f..5bd2d6f81 100644 --- a/packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts +++ b/packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts @@ -20,7 +20,7 @@ import { } from "@gnu-taler/taler-util"; import { TalerError } from "@gnu-taler/taler-wallet-core"; import { useEffect, useState } from "preact/hooks"; -import * as wxApi from "../wxApi"; +import * as wxApi from "../wxApi.js"; interface HookOk { hasError: false; diff --git a/packages/taler-wallet-webextension/src/hooks/useBackupDeviceName.ts b/packages/taler-wallet-webextension/src/hooks/useBackupDeviceName.ts index 1aa711a90..7f484b0a4 100644 --- a/packages/taler-wallet-webextension/src/hooks/useBackupDeviceName.ts +++ b/packages/taler-wallet-webextension/src/hooks/useBackupDeviceName.ts @@ -15,7 +15,7 @@ */ import { useEffect, useState } from "preact/hooks"; -import * as wxApi from "../wxApi"; +import * as wxApi from "../wxApi.js"; export interface BackupDeviceName { name: string; diff --git a/packages/taler-wallet-webextension/src/hooks/useDiagnostics.ts b/packages/taler-wallet-webextension/src/hooks/useDiagnostics.ts index 48aff2602..c4baeb3cf 100644 --- a/packages/taler-wallet-webextension/src/hooks/useDiagnostics.ts +++ b/packages/taler-wallet-webextension/src/hooks/useDiagnostics.ts @@ -16,7 +16,7 @@ import { WalletDiagnostics } from "@gnu-taler/taler-util"; import { useEffect, useState } from "preact/hooks"; -import * as wxApi from "../wxApi"; +import * as wxApi from "../wxApi.js"; export function useDiagnostics(): [WalletDiagnostics | undefined, boolean] { const [timedOut, setTimedOut] = useState(false); diff --git a/packages/taler-wallet-webextension/src/hooks/useExtendedPermissions.ts b/packages/taler-wallet-webextension/src/hooks/useExtendedPermissions.ts index f0ec2ca45..8d563cb6d 100644 --- a/packages/taler-wallet-webextension/src/hooks/useExtendedPermissions.ts +++ b/packages/taler-wallet-webextension/src/hooks/useExtendedPermissions.ts @@ -15,9 +15,9 @@ */ import { useState, useEffect } from "preact/hooks"; -import * as wxApi from "../wxApi"; -import { platform } from "../platform/api"; -import { getReadRequestPermissions } from "../permissions"; +import * as wxApi from "../wxApi.js"; +import { platform } from "../platform/api.js"; +import { getReadRequestPermissions } from "../permissions.js"; export function useExtendedPermissions(): [boolean, () => Promise] { const [enabled, setEnabled] = useState(false); diff --git a/packages/taler-wallet-webextension/src/hooks/useLang.ts b/packages/taler-wallet-webextension/src/hooks/useLang.ts index 959297647..0436f25df 100644 --- a/packages/taler-wallet-webextension/src/hooks/useLang.ts +++ b/packages/taler-wallet-webextension/src/hooks/useLang.ts @@ -14,7 +14,7 @@ GNU Taler; see the file COPYING. If not, see */ -import { useNotNullLocalStorage } from "./useLocalStorage"; +import { useNotNullLocalStorage } from "./useLocalStorage.js"; function getBrowserLang(): string | undefined { if (window.navigator.languages) return window.navigator.languages[0] diff --git a/packages/taler-wallet-webextension/src/hooks/useProviderStatus.ts b/packages/taler-wallet-webextension/src/hooks/useProviderStatus.ts index ea167463e..14af7c0aa 100644 --- a/packages/taler-wallet-webextension/src/hooks/useProviderStatus.ts +++ b/packages/taler-wallet-webextension/src/hooks/useProviderStatus.ts @@ -16,7 +16,7 @@ import { ProviderInfo } from "@gnu-taler/taler-wallet-core"; import { useEffect, useState } from "preact/hooks"; -import * as wxApi from "../wxApi"; +import * as wxApi from "../wxApi.js"; export interface ProviderStatus { info?: ProviderInfo; diff --git a/packages/taler-wallet-webextension/src/hooks/useTalerActionURL.test.ts b/packages/taler-wallet-webextension/src/hooks/useTalerActionURL.test.ts index 082b3a05c..ed51d00ee 100644 --- a/packages/taler-wallet-webextension/src/hooks/useTalerActionURL.test.ts +++ b/packages/taler-wallet-webextension/src/hooks/useTalerActionURL.test.ts @@ -13,9 +13,9 @@ You should have received a copy of the GNU General Public License along with GNU Taler; see the file COPYING. If not, see */ -import { useTalerActionURL } from "./useTalerActionURL" -import { mountHook } from "../test-utils"; -import { IoCProviderForTesting } from "../context/iocContext"; +import { useTalerActionURL } from "./useTalerActionURL.js" +import { mountHook } from "../test-utils.js"; +import { IoCProviderForTesting } from "../context/iocContext.js"; import { h, VNode } from "preact"; import { expect } from "chai"; diff --git a/packages/taler-wallet-webextension/src/hooks/useTalerActionURL.ts b/packages/taler-wallet-webextension/src/hooks/useTalerActionURL.ts index 53e1e912d..be0a3262e 100644 --- a/packages/taler-wallet-webextension/src/hooks/useTalerActionURL.ts +++ b/packages/taler-wallet-webextension/src/hooks/useTalerActionURL.ts @@ -15,7 +15,7 @@ */ import { useEffect, useState } from "preact/hooks"; -import { useIocContext } from "../context/iocContext"; +import { useIocContext } from "../context/iocContext.js"; export function useTalerActionURL(): [ string | undefined, diff --git a/packages/taler-wallet-webextension/src/mui/Avatar.tsx b/packages/taler-wallet-webextension/src/mui/Avatar.tsx index 091964a63..c1df00a13 100644 --- a/packages/taler-wallet-webextension/src/mui/Avatar.tsx +++ b/packages/taler-wallet-webextension/src/mui/Avatar.tsx @@ -1,5 +1,6 @@ import { css } from "@linaria/core"; import { h, JSX, VNode, ComponentChildren } from "preact"; +// eslint-disable-next-line import/extensions import { theme } from "./style"; const root = css` diff --git a/packages/taler-wallet-webextension/src/mui/Button.stories.tsx b/packages/taler-wallet-webextension/src/mui/Button.stories.tsx index 9750c6a94..145e1a159 100644 --- a/packages/taler-wallet-webextension/src/mui/Button.stories.tsx +++ b/packages/taler-wallet-webextension/src/mui/Button.stories.tsx @@ -19,7 +19,7 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { Button } from "./Button"; +import { Button } from "./Button.js"; import { Fragment, h } from "preact"; import DeleteIcon from "../svg/delete_24px.svg"; import SendIcon from "../svg/send_24px.svg"; diff --git a/packages/taler-wallet-webextension/src/mui/Button.tsx b/packages/taler-wallet-webextension/src/mui/Button.tsx index 8da5b86be..083bbea0d 100644 --- a/packages/taler-wallet-webextension/src/mui/Button.tsx +++ b/packages/taler-wallet-webextension/src/mui/Button.tsx @@ -1,6 +1,8 @@ import { ComponentChildren, h, VNode } from "preact"; import { css } from "@linaria/core"; +// eslint-disable-next-line import/extensions import { theme, ripple, Colors } from "./style"; +// eslint-disable-next-line import/extensions import { alpha } from "./colors/manipulation"; interface Props { diff --git a/packages/taler-wallet-webextension/src/mui/Grid.stories.tsx b/packages/taler-wallet-webextension/src/mui/Grid.stories.tsx index 7db608d27..fc4f9a585 100644 --- a/packages/taler-wallet-webextension/src/mui/Grid.stories.tsx +++ b/packages/taler-wallet-webextension/src/mui/Grid.stories.tsx @@ -19,7 +19,7 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { Grid } from "./Grid"; +import { Grid } from "./Grid.js"; import { Fragment, h } from "preact"; export default { diff --git a/packages/taler-wallet-webextension/src/mui/Grid.tsx b/packages/taler-wallet-webextension/src/mui/Grid.tsx index d05b91f18..5d1b79b2a 100644 --- a/packages/taler-wallet-webextension/src/mui/Grid.tsx +++ b/packages/taler-wallet-webextension/src/mui/Grid.tsx @@ -1,6 +1,7 @@ import { css } from "@linaria/core"; import { h, JSX, VNode, ComponentChildren, createContext } from "preact"; import { useContext } from "preact/hooks"; +// eslint-disable-next-line import/extensions import { theme } from "./style"; type ResponsiveKeys = "xs" | "sm" | "md" | "lg" | "xl"; diff --git a/packages/taler-wallet-webextension/src/mui/Paper.stories.tsx b/packages/taler-wallet-webextension/src/mui/Paper.stories.tsx index f263526f2..bc80bd500 100644 --- a/packages/taler-wallet-webextension/src/mui/Paper.stories.tsx +++ b/packages/taler-wallet-webextension/src/mui/Paper.stories.tsx @@ -19,8 +19,8 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { Paper } from "./Paper"; -import { createExample } from "../test-utils"; +import { Paper } from "./Paper.js"; +import { createExample } from "../test-utils.js"; import { h } from "preact"; export default { diff --git a/packages/taler-wallet-webextension/src/mui/Paper.tsx b/packages/taler-wallet-webextension/src/mui/Paper.tsx index 6209aa7a0..eeb4083d4 100644 --- a/packages/taler-wallet-webextension/src/mui/Paper.tsx +++ b/packages/taler-wallet-webextension/src/mui/Paper.tsx @@ -1,6 +1,8 @@ import { css } from "@linaria/core"; import { h, JSX, VNode, ComponentChildren } from "preact"; +// eslint-disable-next-line import/extensions import { alpha } from "./colors/manipulation"; +// eslint-disable-next-line import/extensions import { theme } from "./style"; const borderVariant = { @@ -56,7 +58,7 @@ export function Paper({ } // Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61 -const getOverlayAlpha = (elevation: number): number => { +function getOverlayAlpha(elevation: number): number { let alphaValue; if (elevation < 1) { alphaValue = 5.11916 * elevation ** 2; @@ -64,4 +66,4 @@ const getOverlayAlpha = (elevation: number): number => { alphaValue = 4.5 * Math.log(elevation + 1) + 2; } return Number((alphaValue / 100).toFixed(2)); -}; +} diff --git a/packages/taler-wallet-webextension/src/mui/TextField.stories.tsx b/packages/taler-wallet-webextension/src/mui/TextField.stories.tsx index a2f7e1e66..bc8505454 100644 --- a/packages/taler-wallet-webextension/src/mui/TextField.stories.tsx +++ b/packages/taler-wallet-webextension/src/mui/TextField.stories.tsx @@ -22,7 +22,7 @@ import { styled } from "@linaria/react"; import { Fragment, h } from "preact"; import { useState } from "preact/hooks"; -import { TextField, Props } from "./TextField"; +import { TextField, Props } from "./TextField.js"; export default { title: "mui/TextField", diff --git a/packages/taler-wallet-webextension/src/mui/TextField.tsx b/packages/taler-wallet-webextension/src/mui/TextField.tsx index ada8d5d85..c79c21ced 100644 --- a/packages/taler-wallet-webextension/src/mui/TextField.tsx +++ b/packages/taler-wallet-webextension/src/mui/TextField.tsx @@ -1,13 +1,14 @@ import { ComponentChildren, h, VNode } from "preact"; -import { FormControl } from "./input/FormControl"; -import { FormHelperText } from "./input/FormHelperText"; -import { InputFilled } from "./input/InputFilled"; -import { InputLabel } from "./input/InputLabel"; -import { InputOutlined } from "./input/InputOutlined"; -import { InputStandard } from "./input/InputStandard"; -import { SelectFilled } from "./input/SelectFilled"; -import { SelectOutlined } from "./input/SelectOutlined"; -import { SelectStandard } from "./input/SelectStandard"; +import { FormControl } from "./input/FormControl.js"; +import { FormHelperText } from "./input/FormHelperText.js"; +import { InputFilled } from "./input/InputFilled.js"; +import { InputLabel } from "./input/InputLabel.js"; +import { InputOutlined } from "./input/InputOutlined.js"; +import { InputStandard } from "./input/InputStandard.js"; +import { SelectFilled } from "./input/SelectFilled.js"; +import { SelectOutlined } from "./input/SelectOutlined.js"; +import { SelectStandard } from "./input/SelectStandard.js"; +// eslint-disable-next-line import/extensions import { Colors } from "./style"; export interface Props { @@ -36,6 +37,18 @@ export interface Props { children?: ComponentChildren; } +const inputVariant = { + standard: InputStandard, + filled: InputFilled, + outlined: InputOutlined, +}; + +const selectVariant = { + standard: SelectStandard, + filled: SelectFilled, + outlined: SelectOutlined, +}; + export function TextField({ label, select, @@ -55,15 +68,3 @@ export function TextField({ ); } - -const inputVariant = { - standard: InputStandard, - filled: InputFilled, - outlined: InputOutlined, -}; - -const selectVariant = { - standard: SelectStandard, - filled: SelectFilled, - outlined: SelectOutlined, -}; diff --git a/packages/taler-wallet-webextension/src/mui/Typography.tsx b/packages/taler-wallet-webextension/src/mui/Typography.tsx index bfaddd7f8..ecd2b8ec3 100644 --- a/packages/taler-wallet-webextension/src/mui/Typography.tsx +++ b/packages/taler-wallet-webextension/src/mui/Typography.tsx @@ -1,5 +1,6 @@ import { css } from "@linaria/core"; -import { h, Fragment, VNode, ComponentChildren } from "preact"; +import { ComponentChildren, h, VNode } from "preact"; +// eslint-disable-next-line import/extensions import { theme } from "./style"; type VariantEnum = diff --git a/packages/taler-wallet-webextension/src/mui/colors/manipulation.test.ts b/packages/taler-wallet-webextension/src/mui/colors/manipulation.test.ts index 77b3ec884..192e9f402 100644 --- a/packages/taler-wallet-webextension/src/mui/colors/manipulation.test.ts +++ b/packages/taler-wallet-webextension/src/mui/colors/manipulation.test.ts @@ -11,7 +11,7 @@ import { getContrastRatio, getLuminance, lighten, -} from './manipulation'; +} from './manipulation.js'; describe('utils/colorManipulator', () => { describe('recomposeColor', () => { diff --git a/packages/taler-wallet-webextension/src/mui/colors/manipulation.ts b/packages/taler-wallet-webextension/src/mui/colors/manipulation.ts index 633c80c94..55d0523b7 100644 --- a/packages/taler-wallet-webextension/src/mui/colors/manipulation.ts +++ b/packages/taler-wallet-webextension/src/mui/colors/manipulation.ts @@ -22,7 +22,7 @@ export interface ColorObjectWithoutAlpha { * @param {number} max The upper boundary of the output range * @returns {number} A number in the range [min, max] */ -function clamp(value: number, min: number = 0, max: number = 1): number { +function clamp(value: number, min = 0, max = 1): number { // if (process.env.NODE_ENV !== 'production') { // if (value < min || value > max) { // console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`); @@ -76,8 +76,8 @@ export function decomposeColor(color: string): ColorObject { const marker = color.indexOf('('); const type = color.substring(0, marker); - if (type != 'rgba' && type != 'hsla' && type != 'rgb' && type != 'hsl') { - } + // if (type != 'rgba' && type != 'hsla' && type != 'rgb' && type != 'hsl') { + // } const values = color.substring(marker + 1, color.length - 1).split(',') if (type == 'rgb' || type == 'hsl') { @@ -268,6 +268,6 @@ export function lighten(color: string, coefficient: number): string { * @param {number} coefficient=0.15 - multiplier in the range 0 - 1 * @returns {string} A CSS color string. Hex input values are returned as rgb */ -export function emphasize(color: string, coefficient: number = 0.15): string { +export function emphasize(color: string, coefficient = 0.15): string { return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient); } diff --git a/packages/taler-wallet-webextension/src/mui/index.stories.tsx b/packages/taler-wallet-webextension/src/mui/index.stories.tsx index 7755c6f6a..302114ed5 100644 --- a/packages/taler-wallet-webextension/src/mui/index.stories.tsx +++ b/packages/taler-wallet-webextension/src/mui/index.stories.tsx @@ -19,9 +19,9 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import * as a1 from "./Button.stories"; -import * as a3 from "./Grid.stories"; -import * as a4 from "./Paper.stories"; -import * as a5 from "./TextField.stories"; +import * as a1 from "./Button.stories.js"; +import * as a3 from "./Grid.stories.js"; +import * as a4 from "./Paper.stories.js"; +import * as a5 from "./TextField.stories.js"; export default [a1, a3, a4, a5]; diff --git a/packages/taler-wallet-webextension/src/mui/input/FormControl.tsx b/packages/taler-wallet-webextension/src/mui/input/FormControl.tsx index 7a8395705..d4fa0368e 100644 --- a/packages/taler-wallet-webextension/src/mui/input/FormControl.tsx +++ b/packages/taler-wallet-webextension/src/mui/input/FormControl.tsx @@ -1,6 +1,7 @@ import { css } from "@linaria/core"; import { ComponentChildren, createContext, h } from "preact"; import { useContext, useState } from "preact/hooks"; +// eslint-disable-next-line import/extensions import { Colors } from "../style"; export interface Props { @@ -43,6 +44,8 @@ const fullWidthStyle = css` width: 100%; `; +export const FormControlContext = createContext(null); + export function FormControl({ color = "primary", disabled = false, @@ -121,8 +124,6 @@ export interface FCCProps { variant: "filled" | "outlined" | "standard"; } -export const FormControlContext = createContext(null); - const defaultContextValue: FCCProps = { color: "primary", disabled: false, @@ -132,10 +133,10 @@ const defaultContextValue: FCCProps = { fullWidth: false, hiddenLabel: false, size: "medium", - onBlur: () => {}, - onEmpty: () => {}, - onFilled: () => {}, - onFocus: () => {}, + onBlur: () => null, + onEmpty: () => null, + onFilled: () => null, + onFocus: () => null, required: false, variant: "outlined", }; diff --git a/packages/taler-wallet-webextension/src/mui/input/FormHelperText.tsx b/packages/taler-wallet-webextension/src/mui/input/FormHelperText.tsx index 4854a6384..da10eec11 100644 --- a/packages/taler-wallet-webextension/src/mui/input/FormHelperText.tsx +++ b/packages/taler-wallet-webextension/src/mui/input/FormHelperText.tsx @@ -1,7 +1,8 @@ import { css } from "@linaria/core"; import { ComponentChildren, h } from "preact"; +// eslint-disable-next-line import/extensions import { theme } from "../style"; -import { useFormControl } from "./FormControl"; +import { useFormControl } from "./FormControl.js"; const root = css` color: ${theme.palette.text.secondary}; diff --git a/packages/taler-wallet-webextension/src/mui/input/FormLabel.tsx b/packages/taler-wallet-webextension/src/mui/input/FormLabel.tsx index e5ca53263..fffef41db 100644 --- a/packages/taler-wallet-webextension/src/mui/input/FormLabel.tsx +++ b/packages/taler-wallet-webextension/src/mui/input/FormLabel.tsx @@ -1,7 +1,8 @@ import { css } from "@linaria/core"; import { ComponentChildren, h } from "preact"; +// eslint-disable-next-line import/extensions import { Colors, theme } from "../style"; -import { useFormControl } from "./FormControl"; +import { useFormControl } from "./FormControl.js"; export interface Props { class?: string; diff --git a/packages/taler-wallet-webextension/src/mui/input/InputBase.tsx b/packages/taler-wallet-webextension/src/mui/input/InputBase.tsx index 5714eb1ba..331d9ce95 100644 --- a/packages/taler-wallet-webextension/src/mui/input/InputBase.tsx +++ b/packages/taler-wallet-webextension/src/mui/input/InputBase.tsx @@ -1,8 +1,9 @@ import { css } from "@linaria/core"; import { h, JSX } from "preact"; -import { useEffect, useLayoutEffect, useState } from "preact/hooks"; +import { useLayoutEffect } from "preact/hooks"; +// eslint-disable-next-line import/extensions import { theme } from "../style"; -import { FormControlContext, useFormControl } from "./FormControl"; +import { FormControlContext, useFormControl } from "./FormControl.js"; const rootStyle = css` color: ${theme.palette.text.primary}; diff --git a/packages/taler-wallet-webextension/src/mui/input/InputLabel.tsx b/packages/taler-wallet-webextension/src/mui/input/InputLabel.tsx index c70c5bfc0..6d6aae4f3 100644 --- a/packages/taler-wallet-webextension/src/mui/input/InputLabel.tsx +++ b/packages/taler-wallet-webextension/src/mui/input/InputLabel.tsx @@ -1,8 +1,9 @@ import { css } from "@linaria/core"; import { ComponentChildren, h } from "preact"; +// eslint-disable-next-line import/extensions import { Colors, theme } from "../style"; -import { useFormControl } from "./FormControl"; -import { FormLabel } from "./FormLabel"; +import { useFormControl } from "./FormControl.js"; +import { FormLabel } from "./FormLabel.js"; const root = css` display: block; diff --git a/packages/taler-wallet-webextension/src/mui/input/InputStandard.tsx b/packages/taler-wallet-webextension/src/mui/input/InputStandard.tsx index ba5145719..9d79a7019 100644 --- a/packages/taler-wallet-webextension/src/mui/input/InputStandard.tsx +++ b/packages/taler-wallet-webextension/src/mui/input/InputStandard.tsx @@ -1,8 +1,9 @@ import { css } from "@linaria/core"; import { h, VNode } from "preact"; +// eslint-disable-next-line import/extensions import { Colors, theme } from "../style"; -import { useFormControl } from "./FormControl"; -import { InputBase, InputBaseComponent, InputBaseRoot } from "./InputBase"; +import { useFormControl } from "./FormControl.js"; +import { InputBase, InputBaseComponent, InputBaseRoot } from "./InputBase.js"; export interface Props { autoComplete?: string; diff --git a/packages/taler-wallet-webextension/src/mui/style.tsx b/packages/taler-wallet-webextension/src/mui/style.tsx index 3fa3b7e33..df4f5176c 100644 --- a/packages/taler-wallet-webextension/src/mui/style.tsx +++ b/packages/taler-wallet-webextension/src/mui/style.tsx @@ -9,7 +9,9 @@ import { lightBlue, green, grey, + // eslint-disable-next-line import/extensions } from "./colors/constants"; +// eslint-disable-next-line import/extensions import { getContrastRatio } from "./colors/manipulation"; export type Colors = @@ -184,7 +186,7 @@ function createTheme() { return createUnaryUnit(theme, 8); } - function createSpacing(spacingInput: number = 8): Spacing { + function createSpacing(spacingInput = 8): Spacing { // Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout. // Smaller components, such as icons, can align to a 4dp grid. // https://material.io/design/layout/understanding-layout.html#usage diff --git a/packages/taler-wallet-webextension/src/platform/chrome.ts b/packages/taler-wallet-webextension/src/platform/chrome.ts index 91ccc220d..5134a5c15 100644 --- a/packages/taler-wallet-webextension/src/platform/chrome.ts +++ b/packages/taler-wallet-webextension/src/platform/chrome.ts @@ -15,7 +15,7 @@ */ import { classifyTalerUri, CoreApiResponse, TalerUriType } from "@gnu-taler/taler-util"; -import { getReadRequestPermissions } from "../permissions"; +import { getReadRequestPermissions } from "../permissions.js"; import { CrossBrowserPermissionsApi, MessageFromBackend, Permissions, PlatformAPI } from "./api.js"; const api: PlatformAPI = { diff --git a/packages/taler-wallet-webextension/src/platform/dev.ts b/packages/taler-wallet-webextension/src/platform/dev.ts index def249e47..87f542bc0 100644 --- a/packages/taler-wallet-webextension/src/platform/dev.ts +++ b/packages/taler-wallet-webextension/src/platform/dev.ts @@ -15,7 +15,7 @@ */ import { classifyTalerUri, CoreApiResponse, TalerUriType } from "@gnu-taler/taler-util"; -import { MessageFromBackend, PlatformAPI } from "./api"; +import { MessageFromBackend, PlatformAPI } from "./api.js"; const frames = ["popup", "wallet"] @@ -133,8 +133,7 @@ const api: PlatformAPI = ({ type IframeMessageType = IframeMessageNotification | IframeMessageResponse | IframeMessageCommand; interface IframeMessageNotification { type: "notification"; - header: { - }, + header: Record, body: MessageFromBackend } interface IframeMessageResponse { diff --git a/packages/taler-wallet-webextension/src/platform/firefox.ts b/packages/taler-wallet-webextension/src/platform/firefox.ts index dad90626b..2f2c0fc1d 100644 --- a/packages/taler-wallet-webextension/src/platform/firefox.ts +++ b/packages/taler-wallet-webextension/src/platform/firefox.ts @@ -15,7 +15,7 @@ */ import { CrossBrowserPermissionsApi, Permissions, PlatformAPI } from "./api.js"; -import chromePlatform, { contains as chromeContains, remove as chromeRemove, request as chromeRequest } from "./chrome"; +import chromePlatform, { contains as chromeContains, remove as chromeRemove, request as chromeRequest } from "./chrome.js"; const api: PlatformAPI = { ...chromePlatform, diff --git a/packages/taler-wallet-webextension/src/popup/Application.tsx b/packages/taler-wallet-webextension/src/popup/Application.tsx index 71b2d6c49..72579b05b 100644 --- a/packages/taler-wallet-webextension/src/popup/Application.tsx +++ b/packages/taler-wallet-webextension/src/popup/Application.tsx @@ -25,21 +25,21 @@ import { Fragment, h, VNode } from "preact"; import Router, { route, Route } from "preact-router"; import { Match } from "preact-router/match"; import { useEffect, useState } from "preact/hooks"; -import PendingTransactions from "../components/PendingTransactions"; -import { PopupBox } from "../components/styled"; -import { DevContextProvider } from "../context/devContext"; -import { IoCProviderForRuntime } from "../context/iocContext"; +import PendingTransactions from "../components/PendingTransactions.js"; +import { PopupBox } from "../components/styled/index.js"; +import { DevContextProvider } from "../context/devContext.js"; +import { IoCProviderForRuntime } from "../context/iocContext.js"; import { TranslationProvider, useTranslationContext, -} from "../context/translation"; -import { useTalerActionURL } from "../hooks/useTalerActionURL"; -import { Pages, PopupNavBar } from "../NavigationBar"; -import { platform } from "../platform/api"; -import { BackupPage } from "../wallet/BackupPage"; -import { ProviderDetailPage } from "../wallet/ProviderDetailPage"; -import { BalancePage } from "./BalancePage"; -import { TalerActionFound } from "./TalerActionFound"; +} from "../context/translation.js"; +import { useTalerActionURL } from "../hooks/useTalerActionURL.js"; +import { Pages, PopupNavBar } from "../NavigationBar.js"; +import { platform } from "../platform/api.js"; +import { BackupPage } from "../wallet/BackupPage.js"; +import { ProviderDetailPage } from "../wallet/ProviderDetailPage.js"; +import { BalancePage } from "./BalancePage.js"; +import { TalerActionFound } from "./TalerActionFound.js"; function CheckTalerActionComponent(): VNode { const [talerActionUrl] = useTalerActionURL(); diff --git a/packages/taler-wallet-webextension/src/popup/Balance.stories.tsx b/packages/taler-wallet-webextension/src/popup/Balance.stories.tsx index 1af3b5858..bb07ee0dd 100644 --- a/packages/taler-wallet-webextension/src/popup/Balance.stories.tsx +++ b/packages/taler-wallet-webextension/src/popup/Balance.stories.tsx @@ -19,8 +19,8 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { createExample } from "../test-utils"; -import { BalanceView as TestedComponent } from "./BalancePage"; +import { createExample } from "../test-utils.js"; +import { BalanceView as TestedComponent } from "./BalancePage.js"; export default { title: "popup/balance", diff --git a/packages/taler-wallet-webextension/src/popup/BalancePage.tsx b/packages/taler-wallet-webextension/src/popup/BalancePage.tsx index 2dc0f81e3..520e5b744 100644 --- a/packages/taler-wallet-webextension/src/popup/BalancePage.tsx +++ b/packages/taler-wallet-webextension/src/popup/BalancePage.tsx @@ -22,17 +22,17 @@ import { } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; -import { BalanceTable } from "../components/BalanceTable"; -import { JustInDevMode } from "../components/JustInDevMode"; -import { Loading } from "../components/Loading"; -import { LoadingError } from "../components/LoadingError"; -import { MultiActionButton } from "../components/MultiActionButton"; -import { ButtonBoxPrimary, ButtonPrimary } from "../components/styled"; -import { useTranslationContext } from "../context/translation"; -import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; -import { AddNewActionView } from "../wallet/AddNewActionView"; -import * as wxApi from "../wxApi"; -import { NoBalanceHelp } from "./NoBalanceHelp"; +import { BalanceTable } from "../components/BalanceTable.js"; +import { JustInDevMode } from "../components/JustInDevMode.js"; +import { Loading } from "../components/Loading.js"; +import { LoadingError } from "../components/LoadingError.js"; +import { MultiActionButton } from "../components/MultiActionButton.js"; +import { ButtonBoxPrimary, ButtonPrimary } from "../components/styled/index.js"; +import { useTranslationContext } from "../context/translation.js"; +import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; +import { AddNewActionView } from "../wallet/AddNewActionView.js"; +import * as wxApi from "../wxApi.js"; +import { NoBalanceHelp } from "./NoBalanceHelp.js"; export interface Props { goToWalletDeposit: (currency: string) => void; diff --git a/packages/taler-wallet-webextension/src/popup/NoBalanceHelp.tsx b/packages/taler-wallet-webextension/src/popup/NoBalanceHelp.tsx index 92c2bec0a..3ec7b314c 100644 --- a/packages/taler-wallet-webextension/src/popup/NoBalanceHelp.tsx +++ b/packages/taler-wallet-webextension/src/popup/NoBalanceHelp.tsx @@ -1,6 +1,6 @@ import { h, VNode } from "preact"; -import { ButtonBoxWarning, WarningBox } from "../components/styled"; -import { useTranslationContext } from "../context/translation"; +import { ButtonBoxWarning, WarningBox } from "../components/styled/index.js"; +import { useTranslationContext } from "../context/translation.js"; export function NoBalanceHelp({ goToWalletManualWithdraw, @@ -13,8 +13,7 @@ export function NoBalanceHelp({

You have no balance. - - {" "} + {" "} Withdraw some funds into your wallet.

goToWalletManualWithdraw()}> diff --git a/packages/taler-wallet-webextension/src/popup/TalerActionFound.stories.tsx b/packages/taler-wallet-webextension/src/popup/TalerActionFound.stories.tsx index f20403d6a..ad4dcb59c 100644 --- a/packages/taler-wallet-webextension/src/popup/TalerActionFound.stories.tsx +++ b/packages/taler-wallet-webextension/src/popup/TalerActionFound.stories.tsx @@ -19,8 +19,8 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { createExample } from "../test-utils"; -import { TalerActionFound as TestedComponent } from "./TalerActionFound"; +import { createExample } from "../test-utils.js"; +import { TalerActionFound as TestedComponent } from "./TalerActionFound.js"; export default { title: "popup/TalerActionFound", diff --git a/packages/taler-wallet-webextension/src/popup/TalerActionFound.tsx b/packages/taler-wallet-webextension/src/popup/TalerActionFound.tsx index 50ea32d12..babfcc8c8 100644 --- a/packages/taler-wallet-webextension/src/popup/TalerActionFound.tsx +++ b/packages/taler-wallet-webextension/src/popup/TalerActionFound.tsx @@ -21,9 +21,13 @@ import { classifyTalerUri, TalerUriType } from "@gnu-taler/taler-util"; import { Fragment, h } from "preact"; -import { platform } from "../platform/api"; -import { ButtonPrimary, ButtonSuccess, Title } from "../components/styled"; -import { useTranslationContext } from "../context/translation"; +import { platform } from "../platform/api.js"; +import { + ButtonPrimary, + ButtonSuccess, + Title, +} from "../components/styled/index.js"; +import { useTranslationContext } from "../context/translation.js"; export interface Props { url: string; diff --git a/packages/taler-wallet-webextension/src/popup/index.stories.tsx b/packages/taler-wallet-webextension/src/popup/index.stories.tsx index 6965e2dbc..e027f2611 100644 --- a/packages/taler-wallet-webextension/src/popup/index.stories.tsx +++ b/packages/taler-wallet-webextension/src/popup/index.stories.tsx @@ -19,7 +19,7 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import * as a2 from "./Balance.stories"; -import * as a6 from "./TalerActionFound.stories"; +import * as a2 from "./Balance.stories.js"; +import * as a6 from "./TalerActionFound.stories.js"; export default [a2, a6]; diff --git a/packages/taler-wallet-webextension/src/popupEntryPoint.dev.tsx b/packages/taler-wallet-webextension/src/popupEntryPoint.dev.tsx index 551b47bfc..d32f4f0fb 100644 --- a/packages/taler-wallet-webextension/src/popupEntryPoint.dev.tsx +++ b/packages/taler-wallet-webextension/src/popupEntryPoint.dev.tsx @@ -22,10 +22,10 @@ import { setupI18n } from "@gnu-taler/taler-util"; import { Fragment, h, render } from "preact"; -import { strings } from "./i18n/strings"; -import { setupPlatform } from "./platform/api"; -import devAPI from "./platform/dev"; -import { Application } from "./popup/Application"; +import { strings } from "./i18n/strings.js"; +import { setupPlatform } from "./platform/api.js"; +import devAPI from "./platform/dev.js"; +import { Application } from "./popup/Application.js"; console.log("Wallet setup for Dev API"); setupPlatform(devAPI); diff --git a/packages/taler-wallet-webextension/src/popupEntryPoint.tsx b/packages/taler-wallet-webextension/src/popupEntryPoint.tsx index d68918f7f..68e7bf91a 100644 --- a/packages/taler-wallet-webextension/src/popupEntryPoint.tsx +++ b/packages/taler-wallet-webextension/src/popupEntryPoint.tsx @@ -22,11 +22,11 @@ import { setupI18n } from "@gnu-taler/taler-util"; import { Fragment, h, render } from "preact"; -import { strings } from "./i18n/strings"; -import { setupPlatform } from "./platform/api"; -import chromeAPI from "./platform/chrome"; -import firefoxAPI from "./platform/firefox"; -import { Application } from "./popup/Application"; +import { strings } from "./i18n/strings.js"; +import { setupPlatform } from "./platform/api.js"; +import chromeAPI from "./platform/chrome.js"; +import firefoxAPI from "./platform/firefox.js"; +import { Application } from "./popup/Application.js"; //FIXME: create different entry point for any platform instead of //switching in runtime diff --git a/packages/taler-wallet-webextension/src/stories.test.ts b/packages/taler-wallet-webextension/src/stories.test.ts index dc33dbde5..cd6f88135 100644 --- a/packages/taler-wallet-webextension/src/stories.test.ts +++ b/packages/taler-wallet-webextension/src/stories.test.ts @@ -18,12 +18,12 @@ * * @author Sebastian Javier Marchano (sebasjm) */ -import * as popup from "./popup/index.stories"; -import * as wallet from "./wallet/index.stories"; -import * as mui from "./mui/index.stories"; +import * as popup from "./popup/index.stories.js"; +import * as wallet from "./wallet/index.stories.js"; +import * as mui from "./mui/index.stories.js"; import { setupI18n } from "@gnu-taler/taler-util"; -import { renderNodeOrBrowser } from "./test-utils"; +import { renderNodeOrBrowser } from "./test-utils.js"; setupI18n("en", { en: {} }); function testThisStory(st: any): any { @@ -32,7 +32,6 @@ function testThisStory(st: any): any { const Component = (st as any)[k]; if (k === "default" || !Component) return; - // eslint-disable-next-line jest/expect-expect it(`example: ${k}`, () => { renderNodeOrBrowser(Component, Component.args); }); diff --git a/packages/taler-wallet-webextension/src/stories.tsx b/packages/taler-wallet-webextension/src/stories.tsx index 2f410f68c..9b988b0d8 100644 --- a/packages/taler-wallet-webextension/src/stories.tsx +++ b/packages/taler-wallet-webextension/src/stories.tsx @@ -30,12 +30,12 @@ import { VNode, } from "preact"; import { useEffect, useErrorBoundary, useState } from "preact/hooks"; -import { LogoHeader } from "./components/LogoHeader"; -import { PopupBox, WalletBox } from "./components/styled"; -import * as mui from "./mui/index.stories"; -import { PopupNavBar, WalletNavBar } from "./NavigationBar"; -import * as popup from "./popup/index.stories"; -import * as wallet from "./wallet/index.stories"; +import { LogoHeader } from "./components/LogoHeader.js"; +import { PopupBox, WalletBox } from "./components/styled/index.js"; +import * as mui from "./mui/index.stories.js"; +import { PopupNavBar, WalletNavBar } from "./NavigationBar.js"; +import * as popup from "./popup/index.stories.js"; +import * as wallet from "./wallet/index.stories.js"; setupI18n("en", { en: {} }); diff --git a/packages/taler-wallet-webextension/src/wallet/AddNewActionView.stories.tsx b/packages/taler-wallet-webextension/src/wallet/AddNewActionView.stories.tsx index 54e4eb1f2..e80d06530 100644 --- a/packages/taler-wallet-webextension/src/wallet/AddNewActionView.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/AddNewActionView.stories.tsx @@ -19,8 +19,8 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { createExample } from "../test-utils"; -import { AddNewActionView as TestedComponent } from "./AddNewActionView"; +import { createExample } from "../test-utils.js"; +import { AddNewActionView as TestedComponent } from "./AddNewActionView.js"; export default { title: "wallet/add new action", diff --git a/packages/taler-wallet-webextension/src/wallet/AddNewActionView.tsx b/packages/taler-wallet-webextension/src/wallet/AddNewActionView.tsx index 751dbfba7..728bf0945 100644 --- a/packages/taler-wallet-webextension/src/wallet/AddNewActionView.tsx +++ b/packages/taler-wallet-webextension/src/wallet/AddNewActionView.tsx @@ -1,9 +1,13 @@ import { classifyTalerUri, TalerUriType } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; -import { platform } from "../platform/api"; -import { Button, ButtonSuccess, InputWithLabel } from "../components/styled"; -import { useTranslationContext } from "../context/translation"; +import { platform } from "../platform/api.js"; +import { + Button, + ButtonSuccess, + InputWithLabel, +} from "../components/styled/index.js"; +import { useTranslationContext } from "../context/translation.js"; export interface Props { onCancel: () => void; diff --git a/packages/taler-wallet-webextension/src/wallet/Application.tsx b/packages/taler-wallet-webextension/src/wallet/Application.tsx index 7ecec1cb7..a5197d5b4 100644 --- a/packages/taler-wallet-webextension/src/wallet/Application.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Application.tsx @@ -25,31 +25,31 @@ import { Fragment, h, VNode } from "preact"; import Router, { route, Route } from "preact-router"; import Match from "preact-router/match"; import { useEffect, useState } from "preact/hooks"; -import { LogoHeader } from "../components/LogoHeader"; -import PendingTransactions from "../components/PendingTransactions"; -import { SuccessBox, WalletBox } from "../components/styled"; -import { DevContextProvider } from "../context/devContext"; -import { IoCProviderForRuntime } from "../context/iocContext"; +import { LogoHeader } from "../components/LogoHeader.js"; +import PendingTransactions from "../components/PendingTransactions.js"; +import { SuccessBox, WalletBox } from "../components/styled/index.js"; +import { DevContextProvider } from "../context/devContext.js"; +import { IoCProviderForRuntime } from "../context/iocContext.js"; import { TranslationProvider, useTranslationContext, -} from "../context/translation"; -import { PayPage } from "../cta/Pay"; -import { RefundPage } from "../cta/Refund"; -import { TipPage } from "../cta/Tip"; -import { WithdrawPage } from "../cta/Withdraw"; -import { Pages, WalletNavBar } from "../NavigationBar"; -import { DeveloperPage } from "./DeveloperPage"; -import { BackupPage } from "./BackupPage"; -import { DepositPage } from "./DepositPage"; -import { ExchangeAddPage } from "./ExchangeAddPage"; -import { HistoryPage } from "./History"; -import { ManualWithdrawPage } from "./ManualWithdrawPage"; -import { ProviderAddPage } from "./ProviderAddPage"; -import { ProviderDetailPage } from "./ProviderDetailPage"; -import { SettingsPage } from "./Settings"; -import { TransactionPage } from "./Transaction"; -import { WelcomePage } from "./Welcome"; +} from "../context/translation.js"; +import { PayPage } from "../cta/Pay.js"; +import { RefundPage } from "../cta/Refund.js"; +import { TipPage } from "../cta/Tip.js"; +import { WithdrawPage } from "../cta/Withdraw.js"; +import { Pages, WalletNavBar } from "../NavigationBar.js"; +import { DeveloperPage } from "./DeveloperPage.js"; +import { BackupPage } from "./BackupPage.js"; +import { DepositPage } from "./DepositPage.js"; +import { ExchangeAddPage } from "./ExchangeAddPage.js"; +import { HistoryPage } from "./History.js"; +import { ManualWithdrawPage } from "./ManualWithdrawPage.js"; +import { ProviderAddPage } from "./ProviderAddPage.js"; +import { ProviderDetailPage } from "./ProviderDetailPage.js"; +import { SettingsPage } from "./Settings.js"; +import { TransactionPage } from "./Transaction.js"; +import { WelcomePage } from "./Welcome.js"; export function Application(): VNode { const [globalNotification, setGlobalNotification] = useState< diff --git a/packages/taler-wallet-webextension/src/wallet/Backup.stories.tsx b/packages/taler-wallet-webextension/src/wallet/Backup.stories.tsx index 92536db85..fad18376a 100644 --- a/packages/taler-wallet-webextension/src/wallet/Backup.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Backup.stories.tsx @@ -21,8 +21,8 @@ import { ProviderPaymentType } from "@gnu-taler/taler-wallet-core"; import { addDays } from "date-fns"; -import { BackupView as TestedComponent } from "./BackupPage"; -import { createExample } from "../test-utils"; +import { BackupView as TestedComponent } from "./BackupPage.js"; +import { createExample } from "../test-utils.js"; import { TalerProtocolTimestamp } from "@gnu-taler/taler-util"; export default { diff --git a/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx b/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx index 8c12201b9..1f06847cf 100644 --- a/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx @@ -27,8 +27,8 @@ import { intervalToDuration, } from "date-fns"; import { Fragment, h, VNode } from "preact"; -import { Loading } from "../components/Loading"; -import { LoadingError } from "../components/LoadingError"; +import { Loading } from "../components/Loading.js"; +import { LoadingError } from "../components/LoadingError.js"; import { BoldLight, ButtonPrimary, @@ -39,11 +39,11 @@ import { RowBorderGray, SmallLightText, SmallText, -} from "../components/styled"; -import { useTranslationContext } from "../context/translation"; -import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; -import { Pages } from "../NavigationBar"; -import * as wxApi from "../wxApi"; +} from "../components/styled/index.js"; +import { useTranslationContext } from "../context/translation.js"; +import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; +import { Pages } from "../NavigationBar.js"; +import * as wxApi from "../wxApi.js"; interface Props { onAddProvider: () => void; diff --git a/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.stories.tsx b/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.stories.tsx index 407d4ef34..96f821dc6 100644 --- a/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.stories.tsx @@ -19,8 +19,8 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { createExample } from "../test-utils"; -import { CreateManualWithdraw as TestedComponent } from "./CreateManualWithdraw"; +import { createExample } from "../test-utils.js"; +import { CreateManualWithdraw as TestedComponent } from "./CreateManualWithdraw.js"; export default { title: "wallet/manual withdraw/creation", diff --git a/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.test.ts b/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.test.ts index 0fb125147..24456cc7c 100644 --- a/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.test.ts +++ b/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.test.ts @@ -19,9 +19,9 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { SelectFieldHandler, TextFieldHandler, useComponentState } from "./CreateManualWithdraw"; +import { SelectFieldHandler, TextFieldHandler, useComponentState } from "./CreateManualWithdraw.js"; import { expect } from "chai"; -import { mountHook } from "../test-utils"; +import { mountHook } from "../test-utils.js"; const exchangeListWithARSandUSD = { diff --git a/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx b/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx index 2691fbdf5..52ad797fa 100644 --- a/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx +++ b/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx @@ -22,8 +22,8 @@ import { AmountJson, Amounts } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; -import { ErrorMessage } from "../components/ErrorMessage"; -import { SelectList } from "../components/SelectList"; +import { ErrorMessage } from "../components/ErrorMessage.js"; +import { SelectList } from "../components/SelectList.js"; import { BoldLight, ButtonPrimary, @@ -34,9 +34,9 @@ import { LinkPrimary, SubTitle, Title, -} from "../components/styled"; -import { useTranslationContext } from "../context/translation"; -import { Pages } from "../NavigationBar"; +} from "../components/styled/index.js"; +import { useTranslationContext } from "../context/translation.js"; +import { Pages } from "../NavigationBar.js"; export interface Props { error: string | undefined; diff --git a/packages/taler-wallet-webextension/src/wallet/DepositPage.stories.tsx b/packages/taler-wallet-webextension/src/wallet/DepositPage.stories.tsx index ddd4cdc90..915bde01c 100644 --- a/packages/taler-wallet-webextension/src/wallet/DepositPage.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/DepositPage.stories.tsx @@ -21,8 +21,8 @@ import { Amounts, Balance, parsePaytoUri } from "@gnu-taler/taler-util"; import { DepositFee } from "@gnu-taler/taler-wallet-core/src/operations/deposits"; -import { createExample } from "../test-utils"; -import { View as TestedComponent } from "./DepositPage"; +import { createExample } from "../test-utils.js"; +import { View as TestedComponent } from "./DepositPage.js"; export default { title: "wallet/deposit", diff --git a/packages/taler-wallet-webextension/src/wallet/DepositPage.test.ts b/packages/taler-wallet-webextension/src/wallet/DepositPage.test.ts index 8ff95fdcf..1e7b0a54f 100644 --- a/packages/taler-wallet-webextension/src/wallet/DepositPage.test.ts +++ b/packages/taler-wallet-webextension/src/wallet/DepositPage.test.ts @@ -19,9 +19,9 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { useComponentState } from "./DepositPage"; +import { useComponentState } from "./DepositPage.js"; import { expect } from "chai"; -import { mountHook } from "../test-utils"; +import { mountHook } from "../test-utils.js"; import { Amounts, Balance } from "@gnu-taler/taler-util"; diff --git a/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx b/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx index 2f1f84d94..3874b65f5 100644 --- a/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx @@ -24,9 +24,9 @@ import { import { DepositFee } from "@gnu-taler/taler-wallet-core/src/operations/deposits"; import { Fragment, h, VNode } from "preact"; import { useEffect, useState } from "preact/hooks"; -import { Loading } from "../components/Loading"; -import { LoadingError } from "../components/LoadingError"; -import { SelectList } from "../components/SelectList"; +import { Loading } from "../components/Loading.js"; +import { LoadingError } from "../components/LoadingError.js"; +import { SelectList } from "../components/SelectList.js"; import { Button, ButtonPrimary, @@ -35,11 +35,14 @@ import { InputWithLabel, SubTitle, WarningBox, -} from "../components/styled"; -import { useTranslationContext } from "../context/translation"; -import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; -import * as wxApi from "../wxApi"; -import { SelectFieldHandler, TextFieldHandler } from "./CreateManualWithdraw"; +} from "../components/styled/index.js"; +import { useTranslationContext } from "../context/translation.js"; +import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; +import * as wxApi from "../wxApi.js"; +import { + SelectFieldHandler, + TextFieldHandler, +} from "./CreateManualWithdraw.js"; interface Props { currency: string; diff --git a/packages/taler-wallet-webextension/src/wallet/DeveloperPage.stories.tsx b/packages/taler-wallet-webextension/src/wallet/DeveloperPage.stories.tsx index 4dcfe2316..4696c8d5c 100644 --- a/packages/taler-wallet-webextension/src/wallet/DeveloperPage.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/DeveloperPage.stories.tsx @@ -20,8 +20,8 @@ */ import { PendingTaskType } from "@gnu-taler/taler-wallet-core"; -import { createExample } from "../test-utils"; -import { View as TestedComponent } from "./DeveloperPage"; +import { createExample } from "../test-utils.js"; +import { View as TestedComponent } from "./DeveloperPage.js"; export default { title: "wallet/developer", diff --git a/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx b/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx index f4d717df6..8709e2ba7 100644 --- a/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx @@ -24,13 +24,13 @@ import { PendingTaskInfo } from "@gnu-taler/taler-wallet-core"; import { format } from "date-fns"; import { Fragment, h, VNode } from "preact"; import { useRef, useState } from "preact/hooks"; -import { Diagnostics } from "../components/Diagnostics"; -import { NotifyUpdateFadeOut } from "../components/styled"; -import { Time } from "../components/Time"; -import { useTranslationContext } from "../context/translation"; -import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; -import { useDiagnostics } from "../hooks/useDiagnostics"; -import * as wxApi from "../wxApi"; +import { Diagnostics } from "../components/Diagnostics.js"; +import { NotifyUpdateFadeOut } from "../components/styled/index.js"; +import { Time } from "../components/Time.js"; +import { useTranslationContext } from "../context/translation.js"; +import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; +import { useDiagnostics } from "../hooks/useDiagnostics.js"; +import * as wxApi from "../wxApi.js"; export function DeveloperPage(): VNode { const [status, timedOut] = useDiagnostics(); @@ -372,8 +372,6 @@ function toBase64(str: string): string { ); } -function runIntegrationTest() {} - export async function confirmReset( confirmTheResetMessage: string, ): Promise { diff --git a/packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.stories.tsx b/packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.stories.tsx index 36b81d24c..762458316 100644 --- a/packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.stories.tsx @@ -19,9 +19,9 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { termsXml } from "../cta/termsExample"; -import { createExample } from "../test-utils"; -import { View as TestedComponent } from "./ExchangeAddConfirm"; +import { termsXml } from "../cta/termsExample.js"; +import { createExample } from "../test-utils.js"; +import { View as TestedComponent } from "./ExchangeAddConfirm.js"; function parseFromString(s: string): Document { if (typeof window === "undefined") { diff --git a/packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.tsx b/packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.tsx index e36fa112f..135cf68d8 100644 --- a/packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.tsx @@ -5,12 +5,12 @@ import { ButtonSuccess, ButtonWarning, Title, -} from "../components/styled"; -import { useTranslationContext } from "../context/translation"; -import { TermsOfServiceSection } from "../cta/TermsOfServiceSection"; -import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; -import { buildTermsOfServiceState, TermsState } from "../utils/index"; -import * as wxApi from "../wxApi"; +} from "../components/styled/index.js"; +import { useTranslationContext } from "../context/translation.js"; +import { TermsOfServiceSection } from "../cta/TermsOfServiceSection.js"; +import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; +import { buildTermsOfServiceState, TermsState } from "../utils/index.js"; +import * as wxApi from "../wxApi.js"; export interface Props { url: string; diff --git a/packages/taler-wallet-webextension/src/wallet/ExchangeAddPage.tsx b/packages/taler-wallet-webextension/src/wallet/ExchangeAddPage.tsx index b968e8412..df423bb2b 100644 --- a/packages/taler-wallet-webextension/src/wallet/ExchangeAddPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ExchangeAddPage.tsx @@ -20,11 +20,11 @@ import { } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; import { useState } from "preact/hooks"; -import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; -import { queryToSlashKeys } from "../utils/index"; -import * as wxApi from "../wxApi"; -import { ExchangeAddConfirmPage } from "./ExchangeAddConfirm"; -import { ExchangeSetUrlPage } from "./ExchangeSetUrl"; +import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; +import { queryToSlashKeys } from "../utils/index.js"; +import * as wxApi from "../wxApi.js"; +import { ExchangeAddConfirmPage } from "./ExchangeAddConfirm.js"; +import { ExchangeSetUrlPage } from "./ExchangeSetUrl.js"; interface Props { currency?: string; diff --git a/packages/taler-wallet-webextension/src/wallet/ExchangeAddSetUrl.stories.tsx b/packages/taler-wallet-webextension/src/wallet/ExchangeAddSetUrl.stories.tsx index 221a9da10..392c4732f 100644 --- a/packages/taler-wallet-webextension/src/wallet/ExchangeAddSetUrl.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ExchangeAddSetUrl.stories.tsx @@ -19,9 +19,9 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { createExample } from "../test-utils"; -import { queryToSlashKeys } from "../utils/index"; -import { ExchangeSetUrlPage as TestedComponent } from "./ExchangeSetUrl"; +import { createExample } from "../test-utils.js"; +import { queryToSlashKeys } from "../utils/index.js"; +import { ExchangeSetUrlPage as TestedComponent } from "./ExchangeSetUrl.js"; export default { title: "wallet/exchange add/set url", diff --git a/packages/taler-wallet-webextension/src/wallet/ExchangeSetUrl.tsx b/packages/taler-wallet-webextension/src/wallet/ExchangeSetUrl.tsx index 6b8a6194d..e7b7ccaac 100644 --- a/packages/taler-wallet-webextension/src/wallet/ExchangeSetUrl.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ExchangeSetUrl.tsx @@ -4,7 +4,7 @@ import { } from "@gnu-taler/taler-util"; import { Fragment, h } from "preact"; import { useEffect, useState } from "preact/hooks"; -import { ErrorMessage } from "../components/ErrorMessage"; +import { ErrorMessage } from "../components/ErrorMessage.js"; import { Button, ButtonPrimary, @@ -13,8 +13,8 @@ import { SubTitle, Title, WarningBox, -} from "../components/styled"; -import { useTranslationContext } from "../context/translation"; +} from "../components/styled/index.js"; +import { useTranslationContext } from "../context/translation.js"; export interface Props { initialValue?: string; diff --git a/packages/taler-wallet-webextension/src/wallet/History.stories.tsx b/packages/taler-wallet-webextension/src/wallet/History.stories.tsx index 8138e63dd..9c1cd2d03 100644 --- a/packages/taler-wallet-webextension/src/wallet/History.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/History.stories.tsx @@ -32,8 +32,8 @@ import { TransactionWithdrawal, WithdrawalType, } from "@gnu-taler/taler-util"; -import { HistoryView as TestedComponent } from "./History"; -import { createExample } from "../test-utils"; +import { HistoryView as TestedComponent } from "./History.js"; +import { createExample } from "../test-utils.js"; export default { title: "wallet/balance", diff --git a/packages/taler-wallet-webextension/src/wallet/History.tsx b/packages/taler-wallet-webextension/src/wallet/History.tsx index 5d00e2e01..ed1552879 100644 --- a/packages/taler-wallet-webextension/src/wallet/History.tsx +++ b/packages/taler-wallet-webextension/src/wallet/History.tsx @@ -22,8 +22,8 @@ import { } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; -import { Loading } from "../components/Loading"; -import { LoadingError } from "../components/LoadingError"; +import { Loading } from "../components/Loading.js"; +import { LoadingError } from "../components/LoadingError.js"; import { ButtonBoxPrimary, ButtonBoxWarning, @@ -33,13 +33,13 @@ import { DateSeparator, NiceSelect, WarningBox, -} from "../components/styled"; -import { Time } from "../components/Time"; -import { TransactionItem } from "../components/TransactionItem"; -import { useTranslationContext } from "../context/translation"; -import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; -import { NoBalanceHelp } from "../popup/NoBalanceHelp"; -import * as wxApi from "../wxApi"; +} from "../components/styled/index.js"; +import { Time } from "../components/Time.js"; +import { TransactionItem } from "../components/TransactionItem.js"; +import { useTranslationContext } from "../context/translation.js"; +import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; +import { NoBalanceHelp } from "../popup/NoBalanceHelp.js"; +import * as wxApi from "../wxApi.js"; interface Props { currency?: string; @@ -126,7 +126,9 @@ export function HistoryView({ .filter((t) => t.amountRaw.split(":")[0] === selectedCurrency) .reduce((rv, x) => { const theDate = - x.timestamp.t_s === "never" ? 0 : normalizeToDay(x.timestamp.t_s * 1000); + x.timestamp.t_s === "never" + ? 0 + : normalizeToDay(x.timestamp.t_s * 1000); if (theDate) { (rv[theDate] = rv[theDate] || []).push(x); } diff --git a/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx b/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx index bea8f0029..3fbdadee4 100644 --- a/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx @@ -24,13 +24,13 @@ import { } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; import { useState } from "preact/hooks"; -import { Loading } from "../components/Loading"; -import { LoadingError } from "../components/LoadingError"; -import { useTranslationContext } from "../context/translation"; -import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; -import * as wxApi from "../wxApi"; -import { CreateManualWithdraw } from "./CreateManualWithdraw"; -import { ReserveCreated } from "./ReserveCreated"; +import { Loading } from "../components/Loading.js"; +import { LoadingError } from "../components/LoadingError.js"; +import { useTranslationContext } from "../context/translation.js"; +import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; +import * as wxApi from "../wxApi.js"; +import { CreateManualWithdraw } from "./CreateManualWithdraw.js"; +import { ReserveCreated } from "./ReserveCreated.js"; interface Props { currency?: string; diff --git a/packages/taler-wallet-webextension/src/wallet/ProviderAddConfirmProvider.stories.tsx b/packages/taler-wallet-webextension/src/wallet/ProviderAddConfirmProvider.stories.tsx index 5c4e56b15..dd8e82071 100644 --- a/packages/taler-wallet-webextension/src/wallet/ProviderAddConfirmProvider.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ProviderAddConfirmProvider.stories.tsx @@ -19,8 +19,8 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { createExample } from "../test-utils"; -import { ConfirmProviderView as TestedComponent } from "./ProviderAddPage"; +import { createExample } from "../test-utils.js"; +import { ConfirmProviderView as TestedComponent } from "./ProviderAddPage.js"; export default { title: "wallet/backup/confirm", diff --git a/packages/taler-wallet-webextension/src/wallet/ProviderAddPage.tsx b/packages/taler-wallet-webextension/src/wallet/ProviderAddPage.tsx index ae4ba7e1e..863da9439 100644 --- a/packages/taler-wallet-webextension/src/wallet/ProviderAddPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ProviderAddPage.tsx @@ -22,8 +22,8 @@ import { } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { useEffect, useState } from "preact/hooks"; -import { Checkbox } from "../components/Checkbox"; -import { ErrorMessage } from "../components/ErrorMessage"; +import { Checkbox } from "../components/Checkbox.js"; +import { ErrorMessage } from "../components/ErrorMessage.js"; import { Button, ButtonPrimary, @@ -32,10 +32,10 @@ import { SmallLightText, SubTitle, Title, -} from "../components/styled"; -import { useTranslationContext } from "../context/translation"; -import { queryToSlashConfig } from "../utils/index"; -import * as wxApi from "../wxApi"; +} from "../components/styled/index.js"; +import { useTranslationContext } from "../context/translation.js"; +import { queryToSlashConfig } from "../utils/index.js"; +import * as wxApi from "../wxApi.js"; interface Props { currency: string; diff --git a/packages/taler-wallet-webextension/src/wallet/ProviderAddSetUrl.stories.tsx b/packages/taler-wallet-webextension/src/wallet/ProviderAddSetUrl.stories.tsx index 75292b7e4..5190bfdf8 100644 --- a/packages/taler-wallet-webextension/src/wallet/ProviderAddSetUrl.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ProviderAddSetUrl.stories.tsx @@ -19,8 +19,8 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { createExample } from "../test-utils"; -import { SetUrlView as TestedComponent } from "./ProviderAddPage"; +import { createExample } from "../test-utils.js"; +import { SetUrlView as TestedComponent } from "./ProviderAddPage.js"; export default { title: "wallet/backup/add", diff --git a/packages/taler-wallet-webextension/src/wallet/ProviderDetail.stories.tsx b/packages/taler-wallet-webextension/src/wallet/ProviderDetail.stories.tsx index c4c070fa8..b63bc0657 100644 --- a/packages/taler-wallet-webextension/src/wallet/ProviderDetail.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ProviderDetail.stories.tsx @@ -21,8 +21,8 @@ import { TalerProtocolTimestamp } from "@gnu-taler/taler-util"; import { ProviderPaymentType } from "@gnu-taler/taler-wallet-core"; -import { createExample } from "../test-utils"; -import { ProviderView as TestedComponent } from "./ProviderDetailPage"; +import { createExample } from "../test-utils.js"; +import { ProviderView as TestedComponent } from "./ProviderDetailPage.js"; export default { title: "wallet/backup/details", diff --git a/packages/taler-wallet-webextension/src/wallet/ProviderDetailPage.tsx b/packages/taler-wallet-webextension/src/wallet/ProviderDetailPage.tsx index afd9612ee..f908b4638 100644 --- a/packages/taler-wallet-webextension/src/wallet/ProviderDetailPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ProviderDetailPage.tsx @@ -22,20 +22,20 @@ import { ProviderPaymentType, } from "@gnu-taler/taler-wallet-core"; import { Fragment, h, VNode } from "preact"; -import { ErrorMessage } from "../components/ErrorMessage"; -import { Loading } from "../components/Loading"; -import { LoadingError } from "../components/LoadingError"; +import { ErrorMessage } from "../components/ErrorMessage.js"; +import { Loading } from "../components/Loading.js"; +import { LoadingError } from "../components/LoadingError.js"; import { Button, ButtonDestructive, ButtonPrimary, PaymentStatus, SmallLightText, -} from "../components/styled"; -import { Time } from "../components/Time"; -import { useTranslationContext } from "../context/translation"; -import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; -import * as wxApi from "../wxApi"; +} from "../components/styled/index.js"; +import { Time } from "../components/Time.js"; +import { useTranslationContext } from "../context/translation.js"; +import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; +import * as wxApi from "../wxApi.js"; interface Props { pid: string; diff --git a/packages/taler-wallet-webextension/src/wallet/ReserveCreated.stories.tsx b/packages/taler-wallet-webextension/src/wallet/ReserveCreated.stories.tsx index 6e490fdfd..4e5595ef6 100644 --- a/packages/taler-wallet-webextension/src/wallet/ReserveCreated.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ReserveCreated.stories.tsx @@ -19,8 +19,8 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { createExample } from "../test-utils"; -import { ReserveCreated as TestedComponent } from "./ReserveCreated"; +import { createExample } from "../test-utils.js"; +import { ReserveCreated as TestedComponent } from "./ReserveCreated.js"; export default { title: "wallet/manual withdraw/reserve created", diff --git a/packages/taler-wallet-webextension/src/wallet/ReserveCreated.tsx b/packages/taler-wallet-webextension/src/wallet/ReserveCreated.tsx index 83ebfb51a..16a64af5b 100644 --- a/packages/taler-wallet-webextension/src/wallet/ReserveCreated.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ReserveCreated.tsx @@ -7,11 +7,15 @@ import { PaytoUri, } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; -import { BankDetailsByPaytoType } from "../components/BankDetailsByPaytoType"; -import { QR } from "../components/QR"; -import { ButtonDestructive, Title, WarningBox } from "../components/styled"; -import { useTranslationContext } from "../context/translation"; -import { amountToString } from "../utils/index"; +import { BankDetailsByPaytoType } from "../components/BankDetailsByPaytoType.js"; +import { QR } from "../components/QR.js"; +import { + ButtonDestructive, + Title, + WarningBox, +} from "../components/styled/index.js"; +import { useTranslationContext } from "../context/translation.js"; +import { amountToString } from "../utils/index.js"; export interface Props { reservePub: string; paytoURI: PaytoUri | undefined; diff --git a/packages/taler-wallet-webextension/src/wallet/Settings.stories.tsx b/packages/taler-wallet-webextension/src/wallet/Settings.stories.tsx index 8acf9d210..f50778945 100644 --- a/packages/taler-wallet-webextension/src/wallet/Settings.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Settings.stories.tsx @@ -19,8 +19,8 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { createExample } from "../test-utils"; -import { SettingsView as TestedComponent } from "./Settings"; +import { createExample } from "../test-utils.js"; +import { SettingsView as TestedComponent } from "./Settings.js"; export default { title: "wallet/settings", diff --git a/packages/taler-wallet-webextension/src/wallet/Settings.tsx b/packages/taler-wallet-webextension/src/wallet/Settings.tsx index 478ce00a8..8e843e75e 100644 --- a/packages/taler-wallet-webextension/src/wallet/Settings.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Settings.tsx @@ -16,9 +16,9 @@ import { ExchangeListItem } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; -import { Checkbox } from "../components/Checkbox"; -import { JustInDevMode } from "../components/JustInDevMode"; -import { SelectList } from "../components/SelectList"; +import { Checkbox } from "../components/Checkbox.js"; +import { JustInDevMode } from "../components/JustInDevMode.js"; +import { SelectList } from "../components/SelectList.js"; import { DestructiveText, Input, @@ -26,16 +26,16 @@ import { SubTitle, SuccessText, WarningText, -} from "../components/styled"; -import { useDevContext } from "../context/devContext"; -import { useTranslationContext } from "../context/translation"; -import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; -import { useBackupDeviceName } from "../hooks/useBackupDeviceName"; -import { useExtendedPermissions } from "../hooks/useExtendedPermissions"; -import { useLang } from "../hooks/useLang"; -import { Pages } from "../NavigationBar"; -import { buildTermsOfServiceStatus } from "../utils/index"; -import * as wxApi from "../wxApi"; +} from "../components/styled/index.js"; +import { useDevContext } from "../context/devContext.js"; +import { useTranslationContext } from "../context/translation.js"; +import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; +import { useBackupDeviceName } from "../hooks/useBackupDeviceName.js"; +import { useExtendedPermissions } from "../hooks/useExtendedPermissions.js"; +import { useLang } from "../hooks/useLang.js"; +import { Pages } from "../NavigationBar.js"; +import { buildTermsOfServiceStatus } from "../utils/index.js"; +import * as wxApi from "../wxApi.js"; export function SettingsPage(): VNode { const [permissionsEnabled, togglePermissions] = useExtendedPermissions(); diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx index f02938420..f81487c86 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.stories.tsx @@ -33,12 +33,12 @@ import { WithdrawalType, } from "@gnu-taler/taler-util"; import { ComponentChildren, h } from "preact"; -import { DevContextProviderForTesting } from "../context/devContext"; +import { DevContextProviderForTesting } from "../context/devContext.js"; import { createExample, createExampleWithCustomContext as createExampleInCustomContext, -} from "../test-utils"; -import { TransactionView as TestedComponent } from "./Transaction"; +} from "../test-utils.js"; +import { TransactionView as TestedComponent } from "./Transaction.js"; export default { title: "wallet/history/details", diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx index 5cef86da8..8fe6f9f32 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx @@ -28,11 +28,11 @@ import { differenceInSeconds } from "date-fns"; import { ComponentChildren, Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; import emptyImg from "../../static/img/empty.png"; -import { BankDetailsByPaytoType } from "../components/BankDetailsByPaytoType"; -import { ErrorTalerOperation } from "../components/ErrorTalerOperation"; -import { Loading } from "../components/Loading"; -import { LoadingError } from "../components/LoadingError"; -import { Part } from "../components/Part"; +import { BankDetailsByPaytoType } from "../components/BankDetailsByPaytoType.js"; +import { ErrorTalerOperation } from "../components/ErrorTalerOperation.js"; +import { Loading } from "../components/Loading.js"; +import { LoadingError } from "../components/LoadingError.js"; +import { Part } from "../components/Part.js"; import { Button, ButtonDestructive, @@ -45,11 +45,11 @@ import { SmallLightText, SubTitle, WarningBox, -} from "../components/styled"; -import { Time } from "../components/Time"; -import { useTranslationContext } from "../context/translation"; -import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; -import * as wxApi from "../wxApi"; +} from "../components/styled/index.js"; +import { Time } from "../components/Time.js"; +import { useTranslationContext } from "../context/translation.js"; +import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; +import * as wxApi from "../wxApi.js"; interface Props { tid: string; diff --git a/packages/taler-wallet-webextension/src/wallet/Welcome.stories.tsx b/packages/taler-wallet-webextension/src/wallet/Welcome.stories.tsx index 7e6588fac..424eb9d7f 100644 --- a/packages/taler-wallet-webextension/src/wallet/Welcome.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Welcome.stories.tsx @@ -19,8 +19,8 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { createExample } from "../test-utils"; -import { View as TestedComponent } from "./Welcome"; +import { createExample } from "../test-utils.js"; +import { View as TestedComponent } from "./Welcome.js"; export default { title: "wallet/welcome", diff --git a/packages/taler-wallet-webextension/src/wallet/Welcome.tsx b/packages/taler-wallet-webextension/src/wallet/Welcome.tsx index 1c068cfa3..e7b83e27d 100644 --- a/packages/taler-wallet-webextension/src/wallet/Welcome.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Welcome.tsx @@ -22,12 +22,12 @@ import { WalletDiagnostics } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; -import { Checkbox } from "../components/Checkbox"; -import { Diagnostics } from "../components/Diagnostics"; -import { SubTitle, Title } from "../components/styled"; -import { useTranslationContext } from "../context/translation"; -import { useDiagnostics } from "../hooks/useDiagnostics"; -import { useExtendedPermissions } from "../hooks/useExtendedPermissions"; +import { Checkbox } from "../components/Checkbox.js"; +import { Diagnostics } from "../components/Diagnostics.js"; +import { SubTitle, Title } from "../components/styled/index.js"; +import { useTranslationContext } from "../context/translation.js"; +import { useDiagnostics } from "../hooks/useDiagnostics.js"; +import { useExtendedPermissions } from "../hooks/useExtendedPermissions.js"; export function WelcomePage(): VNode { const [permissionsEnabled, togglePermissions] = useExtendedPermissions(); diff --git a/packages/taler-wallet-webextension/src/wallet/index.stories.tsx b/packages/taler-wallet-webextension/src/wallet/index.stories.tsx index b03177825..bfc453639 100644 --- a/packages/taler-wallet-webextension/src/wallet/index.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/index.stories.tsx @@ -19,21 +19,21 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import * as a1 from "./Backup.stories"; -import * as a3 from "./CreateManualWithdraw.stories"; -import * as a4 from "./DepositPage.stories"; -import * as a5 from "./ExchangeAddConfirm.stories"; -import * as a6 from "./ExchangeAddSetUrl.stories"; -import * as a7 from "./History.stories"; -import * as a8 from "./ProviderAddConfirmProvider.stories"; -import * as a9 from "./ProviderAddSetUrl.stories"; -import * as a10 from "./ProviderDetail.stories"; -import * as a11 from "./ReserveCreated.stories"; -import * as a12 from "./Settings.stories"; -import * as a13 from "./Transaction.stories"; -import * as a14 from "./Welcome.stories"; -import * as a15 from "./AddNewActionView.stories"; -import * as a16 from "./DeveloperPage.stories"; +import * as a1 from "./Backup.stories.js"; +import * as a3 from "./CreateManualWithdraw.stories.js"; +import * as a4 from "./DepositPage.stories.js"; +import * as a5 from "./ExchangeAddConfirm.stories.js"; +import * as a6 from "./ExchangeAddSetUrl.stories.js"; +import * as a7 from "./History.stories.js"; +import * as a8 from "./ProviderAddConfirmProvider.stories.js"; +import * as a9 from "./ProviderAddSetUrl.stories.js"; +import * as a10 from "./ProviderDetail.stories.js"; +import * as a11 from "./ReserveCreated.stories.js"; +import * as a12 from "./Settings.stories.js"; +import * as a13 from "./Transaction.stories.js"; +import * as a14 from "./Welcome.stories.js"; +import * as a15 from "./AddNewActionView.stories.js"; +import * as a16 from "./DeveloperPage.stories.js"; export default [ a1, diff --git a/packages/taler-wallet-webextension/src/walletEntryPoint.dev.tsx b/packages/taler-wallet-webextension/src/walletEntryPoint.dev.tsx index ceceaf04c..9a1615e9e 100644 --- a/packages/taler-wallet-webextension/src/walletEntryPoint.dev.tsx +++ b/packages/taler-wallet-webextension/src/walletEntryPoint.dev.tsx @@ -22,10 +22,10 @@ import { setupI18n } from "@gnu-taler/taler-util"; import { Fragment, h, render } from "preact"; -import { strings } from "./i18n/strings"; -import { setupPlatform } from "./platform/api"; -import devAPI from "./platform/dev"; -import { Application } from "./wallet/Application"; +import { strings } from "./i18n/strings.js"; +import { setupPlatform } from "./platform/api.js"; +import devAPI from "./platform/dev.js"; +import { Application } from "./wallet/Application.js"; console.log("Wallet setup for Dev API"); setupPlatform(devAPI); diff --git a/packages/taler-wallet-webextension/src/walletEntryPoint.tsx b/packages/taler-wallet-webextension/src/walletEntryPoint.tsx index 549eee507..c83ffdddb 100644 --- a/packages/taler-wallet-webextension/src/walletEntryPoint.tsx +++ b/packages/taler-wallet-webextension/src/walletEntryPoint.tsx @@ -22,11 +22,11 @@ import { setupI18n } from "@gnu-taler/taler-util"; import { Fragment, h, render } from "preact"; -import { strings } from "./i18n/strings"; -import { setupPlatform } from "./platform/api"; -import chromeAPI from "./platform/chrome"; -import firefoxAPI from "./platform/firefox"; -import { Application } from "./wallet/Application"; +import { strings } from "./i18n/strings.js"; +import { setupPlatform } from "./platform/api.js"; +import chromeAPI from "./platform/chrome.js"; +import firefoxAPI from "./platform/firefox.js"; +import { Application } from "./wallet/Application.js"; const isFirefox = typeof (window as any)["InstallTrigger"] !== "undefined"; diff --git a/packages/taler-wallet-webextension/src/wxBackend.ts b/packages/taler-wallet-webextension/src/wxBackend.ts index 6b73acd02..1dd88a6a1 100644 --- a/packages/taler-wallet-webextension/src/wxBackend.ts +++ b/packages/taler-wallet-webextension/src/wxBackend.ts @@ -40,12 +40,12 @@ import { Wallet, WalletStoresV1 } from "@gnu-taler/taler-wallet-core"; -import { BrowserCryptoWorkerFactory } from "./browserCryptoWorkerFactory"; -import { BrowserHttpLib } from "./browserHttpLib"; -import { getReadRequestPermissions } from "./permissions"; -import { MessageFromBackend, platform } from "./platform/api"; -import { SynchronousCryptoWorkerFactory } from "./serviceWorkerCryptoWorkerFactory"; -import { ServiceWorkerHttpLib } from "./serviceWorkerHttpLib"; +import { BrowserCryptoWorkerFactory } from "./browserCryptoWorkerFactory.js"; +import { BrowserHttpLib } from "./browserHttpLib.js"; +import { getReadRequestPermissions } from "./permissions.js"; +import { MessageFromBackend, platform } from "./platform/api.js"; +import { SynchronousCryptoWorkerFactory } from "./serviceWorkerCryptoWorkerFactory.js"; +import { ServiceWorkerHttpLib } from "./serviceWorkerHttpLib.js"; /** * Currently active wallet instance. Might be unloaded and