add extension to every import
This commit is contained in:
parent
f5d194dfc6
commit
e2651bdff2
@ -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";
|
||||
|
||||
/**
|
||||
|
@ -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)
|
||||
|
@ -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'
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
import { platform } from "./platform/api";
|
||||
import { platform } from "./platform/api.js";
|
||||
|
||||
/**
|
||||
* Polyfill for requestAnimationFrame, which
|
||||
|
@ -14,9 +14,9 @@
|
||||
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
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,
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
@ -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<HTMLDivElement> {
|
||||
title?: string;
|
||||
|
@ -14,7 +14,7 @@
|
||||
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
import { Outlined, StyledCheckboxLabel } from "./styled";
|
||||
import { Outlined, StyledCheckboxLabel } from "./styled/index.js";
|
||||
import { h, VNode } from "preact";
|
||||
|
||||
interface Props {
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { h, VNode } from "preact";
|
||||
import { useTranslationContext } from "../context/translation";
|
||||
import { useTranslationContext } from "../context/translation.js";
|
||||
|
||||
export function DebugCheckbox({
|
||||
enabled,
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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();
|
||||
|
@ -14,9 +14,9 @@
|
||||
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
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;
|
||||
|
@ -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 {
|
||||
|
@ -14,7 +14,7 @@
|
||||
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
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";
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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<string | undefined>;
|
||||
|
@ -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 {
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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") {
|
||||
|
@ -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 {
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-useless-escape */
|
||||
/*
|
||||
This file is part of GNU Taler
|
||||
(C) 2021 Taler Systems S.A.
|
||||
|
@ -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<T> {
|
||||
hasError: false;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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<void>] {
|
||||
const [enabled, setEnabled] = useState(false);
|
||||
|
@ -14,7 +14,7 @@
|
||||
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
import { useNotNullLocalStorage } from "./useLocalStorage";
|
||||
import { useNotNullLocalStorage } from "./useLocalStorage.js";
|
||||
|
||||
function getBrowserLang(): string | undefined {
|
||||
if (window.navigator.languages) return window.navigator.languages[0]
|
||||
|
@ -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;
|
||||
|
@ -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 <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
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";
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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`
|
||||
|
@ -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";
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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";
|
||||
|
@ -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 {
|
||||
|
@ -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));
|
||||
};
|
||||
}
|
||||
|
@ -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",
|
||||
|
@ -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({
|
||||
</FormControl>
|
||||
);
|
||||
}
|
||||
|
||||
const inputVariant = {
|
||||
standard: InputStandard,
|
||||
filled: InputFilled,
|
||||
outlined: InputOutlined,
|
||||
};
|
||||
|
||||
const selectVariant = {
|
||||
standard: SelectStandard,
|
||||
filled: SelectFilled,
|
||||
outlined: SelectOutlined,
|
||||
};
|
||||
|
@ -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 =
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
getContrastRatio,
|
||||
getLuminance,
|
||||
lighten,
|
||||
} from './manipulation';
|
||||
} from './manipulation.js';
|
||||
|
||||
describe('utils/colorManipulator', () => {
|
||||
describe('recomposeColor', () => {
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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];
|
||||
|
@ -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<FCCProps | null>(null);
|
||||
|
||||
export function FormControl({
|
||||
color = "primary",
|
||||
disabled = false,
|
||||
@ -121,8 +124,6 @@ export interface FCCProps {
|
||||
variant: "filled" | "outlined" | "standard";
|
||||
}
|
||||
|
||||
export const FormControlContext = createContext<FCCProps | null>(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",
|
||||
};
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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 = {
|
||||
|
@ -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<string, never>,
|
||||
body: MessageFromBackend
|
||||
}
|
||||
interface IframeMessageResponse {
|
||||
|
@ -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,
|
||||
|
@ -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();
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
|
@ -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({
|
||||
<p>
|
||||
<b>
|
||||
<i18n.Translate>You have no balance.</i18n.Translate>
|
||||
</b>
|
||||
{" "}
|
||||
</b>{" "}
|
||||
<i18n.Translate>Withdraw some funds into your wallet.</i18n.Translate>
|
||||
</p>
|
||||
<ButtonBoxWarning onClick={() => goToWalletManualWithdraw()}>
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
|
@ -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];
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
});
|
||||
|
@ -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: {} });
|
||||
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
|
@ -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<
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
@ -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 = {
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
@ -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";
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
@ -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<void> {
|
||||
|
@ -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") {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user