use node16 module resolution
This commit is contained in:
parent
08b120bc8d
commit
a906263f74
@ -162,7 +162,7 @@ export function useAccountDetails(
|
|||||||
> {
|
> {
|
||||||
const { fetcher } = useAuthenticatedBackend();
|
const { fetcher } = useAuthenticatedBackend();
|
||||||
|
|
||||||
const { data, error } = useSWR<
|
const { data, error } = useSWR.default<
|
||||||
HttpResponseOk<SandboxBackend.Access.BankAccountBalanceResponse>,
|
HttpResponseOk<SandboxBackend.Access.BankAccountBalanceResponse>,
|
||||||
RequestError<SandboxBackend.SandboxError>
|
RequestError<SandboxBackend.SandboxError>
|
||||||
>([`access-api/accounts/${account}`], fetcher, {
|
>([`access-api/accounts/${account}`], fetcher, {
|
||||||
@ -192,7 +192,7 @@ export function useWithdrawalDetails(
|
|||||||
> {
|
> {
|
||||||
const { fetcher } = useAuthenticatedBackend();
|
const { fetcher } = useAuthenticatedBackend();
|
||||||
|
|
||||||
const { data, error } = useSWR<
|
const { data, error } = useSWR.default<
|
||||||
HttpResponseOk<SandboxBackend.Access.BankAccountGetWithdrawalResponse>,
|
HttpResponseOk<SandboxBackend.Access.BankAccountGetWithdrawalResponse>,
|
||||||
RequestError<SandboxBackend.SandboxError>
|
RequestError<SandboxBackend.SandboxError>
|
||||||
>([`access-api/accounts/${account}/withdrawals/${wid}`], fetcher, {
|
>([`access-api/accounts/${account}/withdrawals/${wid}`], fetcher, {
|
||||||
@ -222,7 +222,7 @@ export function useTransactionDetails(
|
|||||||
> {
|
> {
|
||||||
const { fetcher } = useAuthenticatedBackend();
|
const { fetcher } = useAuthenticatedBackend();
|
||||||
|
|
||||||
const { data, error } = useSWR<
|
const { data, error } = useSWR.default<
|
||||||
HttpResponseOk<SandboxBackend.Access.BankAccountTransactionInfo>,
|
HttpResponseOk<SandboxBackend.Access.BankAccountTransactionInfo>,
|
||||||
RequestError<SandboxBackend.SandboxError>
|
RequestError<SandboxBackend.SandboxError>
|
||||||
>([`access-api/accounts/${account}/transactions/${tid}`], fetcher, {
|
>([`access-api/accounts/${account}/transactions/${tid}`], fetcher, {
|
||||||
@ -261,7 +261,7 @@ export function usePublicAccounts(
|
|||||||
data: afterData,
|
data: afterData,
|
||||||
error: afterError,
|
error: afterError,
|
||||||
isValidating: loadingAfter,
|
isValidating: loadingAfter,
|
||||||
} = useSWR<
|
} = useSWR.default<
|
||||||
HttpResponseOk<SandboxBackend.Access.PublicAccountsResponse>,
|
HttpResponseOk<SandboxBackend.Access.PublicAccountsResponse>,
|
||||||
RequestError<SandboxBackend.SandboxError>
|
RequestError<SandboxBackend.SandboxError>
|
||||||
>([`public-accounts`, args?.page, PAGE_SIZE], paginatedFetcher);
|
>([`public-accounts`, args?.page, PAGE_SIZE], paginatedFetcher);
|
||||||
@ -329,7 +329,7 @@ export function useTransactions(
|
|||||||
data: afterData,
|
data: afterData,
|
||||||
error: afterError,
|
error: afterError,
|
||||||
isValidating: loadingAfter,
|
isValidating: loadingAfter,
|
||||||
} = useSWR<
|
} = useSWR.default<
|
||||||
HttpResponseOk<SandboxBackend.Access.BankAccountTransactionsResponse>,
|
HttpResponseOk<SandboxBackend.Access.BankAccountTransactionsResponse>,
|
||||||
RequestError<SandboxBackend.SandboxError>
|
RequestError<SandboxBackend.SandboxError>
|
||||||
>(
|
>(
|
||||||
|
@ -194,7 +194,7 @@ export function useBusinessAccountDetails(
|
|||||||
> {
|
> {
|
||||||
const { fetcher } = useAuthenticatedBackend();
|
const { fetcher } = useAuthenticatedBackend();
|
||||||
|
|
||||||
const { data, error } = useSWR<
|
const { data, error } = useSWR.default<
|
||||||
HttpResponseOk<SandboxBackend.Circuit.CircuitAccountData>,
|
HttpResponseOk<SandboxBackend.Circuit.CircuitAccountData>,
|
||||||
RequestError<SandboxBackend.SandboxError>
|
RequestError<SandboxBackend.SandboxError>
|
||||||
>([`circuit-api/accounts/${account}`], fetcher, {
|
>([`circuit-api/accounts/${account}`], fetcher, {
|
||||||
@ -232,7 +232,7 @@ export function useBusinessAccounts(
|
|||||||
data: afterData,
|
data: afterData,
|
||||||
error: afterError,
|
error: afterError,
|
||||||
// isValidating: loadingAfter,
|
// isValidating: loadingAfter,
|
||||||
} = useSWR<
|
} = useSWR.default<
|
||||||
HttpResponseOk<SandboxBackend.Circuit.CircuitAccounts>,
|
HttpResponseOk<SandboxBackend.Circuit.CircuitAccounts>,
|
||||||
RequestError<SandboxBackend.SandboxError>
|
RequestError<SandboxBackend.SandboxError>
|
||||||
>(
|
>(
|
||||||
@ -302,7 +302,7 @@ export function useCashouts(): HttpResponse<
|
|||||||
> {
|
> {
|
||||||
const { fetcher, multiFetcher } = useAuthenticatedBackend();
|
const { fetcher, multiFetcher } = useAuthenticatedBackend();
|
||||||
|
|
||||||
const { data: list, error: listError } = useSWR<
|
const { data: list, error: listError } = useSWR.default<
|
||||||
HttpResponseOk<SandboxBackend.Circuit.Cashouts>,
|
HttpResponseOk<SandboxBackend.Circuit.Cashouts>,
|
||||||
RequestError<SandboxBackend.SandboxError>
|
RequestError<SandboxBackend.SandboxError>
|
||||||
>([`circuit-api/cashouts`], fetcher, {
|
>([`circuit-api/cashouts`], fetcher, {
|
||||||
@ -316,7 +316,7 @@ export function useCashouts(): HttpResponse<
|
|||||||
const paths = (list?.data.cashouts || []).map(
|
const paths = (list?.data.cashouts || []).map(
|
||||||
(cashoutId) => `circuit-api/cashouts/${cashoutId}`,
|
(cashoutId) => `circuit-api/cashouts/${cashoutId}`,
|
||||||
);
|
);
|
||||||
const { data: cashouts, error: productError } = useSWR<
|
const { data: cashouts, error: productError } = useSWR.default<
|
||||||
HttpResponseOk<SandboxBackend.Circuit.CashoutStatusResponse>[],
|
HttpResponseOk<SandboxBackend.Circuit.CashoutStatusResponse>[],
|
||||||
RequestError<SandboxBackend.SandboxError>
|
RequestError<SandboxBackend.SandboxError>
|
||||||
>([paths], multiFetcher, {
|
>([paths], multiFetcher, {
|
||||||
|
@ -19,8 +19,8 @@ import {
|
|||||||
useTranslationContext,
|
useTranslationContext,
|
||||||
} from "@gnu-taler/web-util/lib/index.browser";
|
} from "@gnu-taler/web-util/lib/index.browser";
|
||||||
import { createHashHistory } from "history";
|
import { createHashHistory } from "history";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode, } from "preact";
|
||||||
import Router, { route, Route } from "preact-router";
|
import { Router, route, Route } from "preact-router";
|
||||||
import { useEffect } from "preact/hooks";
|
import { useEffect } from "preact/hooks";
|
||||||
import { Loading } from "../components/Loading.js";
|
import { Loading } from "../components/Loading.js";
|
||||||
import { PageStateType, usePageContext } from "../context/pageState.js";
|
import { PageStateType, usePageContext } from "../context/pageState.js";
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||||
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||||
/* Module Resolution Options */
|
/* Module Resolution Options */
|
||||||
"moduleResolution": "Node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
|
"moduleResolution": "Node16" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
|
||||||
"esModuleInterop": true /* */,
|
"esModuleInterop": true /* */,
|
||||||
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
||||||
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
||||||
@ -48,4 +48,4 @@
|
|||||||
"include": [
|
"include": [
|
||||||
"src/**/*"
|
"src/**/*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,8 @@
|
|||||||
"#http-impl": {
|
"#http-impl": {
|
||||||
"type": "./lib/http-impl.node.js",
|
"type": "./lib/http-impl.node.js",
|
||||||
"node": "./lib/http-impl.node.js",
|
"node": "./lib/http-impl.node.js",
|
||||||
"qtart": "./lib/http-impl.qtart.js"
|
"qtart": "./lib/http-impl.qtart.js",
|
||||||
|
"default": "./lib/http-impl.missing.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -22,4 +22,4 @@ export * from "./index.js";
|
|||||||
|
|
||||||
// The web stuff doesn't support package.json export declarations yet,
|
// The web stuff doesn't support package.json export declarations yet,
|
||||||
// so we export more stuff here than we should.
|
// so we export more stuff here than we should.
|
||||||
export * from "./http.js";
|
export * from "./http-common.js";
|
||||||
|
@ -43,8 +43,10 @@
|
|||||||
},
|
},
|
||||||
"imports": {
|
"imports": {
|
||||||
"#host-impl": {
|
"#host-impl": {
|
||||||
|
"types": "./lib/host-impl.node.js",
|
||||||
"node": "./lib/host-impl.node.js",
|
"node": "./lib/host-impl.node.js",
|
||||||
"qtart": "./lib/host-impl.qtart.js"
|
"qtart": "./lib/host-impl.qtart.js",
|
||||||
|
"default": "./lib/host-impl.missing.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -15,4 +15,4 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export * from "./index.js";
|
export * from "./index.js";
|
||||||
export { SynchronousCryptoWorkerPlain as SynchronousCryptoWorker } from "./crypto/workers/synchronousWorkerPlain.js";
|
export { SynchronousCryptoWorkerPlain } from "./crypto/workers/synchronousWorkerPlain.js";
|
||||||
|
@ -21,13 +21,15 @@ import {
|
|||||||
Logger,
|
Logger,
|
||||||
RequestThrottler,
|
RequestThrottler,
|
||||||
TalerErrorCode,
|
TalerErrorCode,
|
||||||
|
TalerError,
|
||||||
|
} from "@gnu-taler/taler-util";
|
||||||
|
|
||||||
|
import {
|
||||||
HttpRequestLibrary,
|
HttpRequestLibrary,
|
||||||
HttpRequestOptions,
|
HttpRequestOptions,
|
||||||
HttpResponse,
|
HttpResponse,
|
||||||
Headers,
|
Headers,
|
||||||
TalerError,
|
} from "@gnu-taler/taler-util/http";
|
||||||
} from "@gnu-taler/taler-util";
|
|
||||||
|
|
||||||
|
|
||||||
const logger = new Logger("browserHttpLib");
|
const logger = new Logger("browserHttpLib");
|
||||||
|
|
||||||
|
@ -24,5 +24,5 @@ export * as a2 from "./PendingTransactions.stories.js";
|
|||||||
export * as a3 from "./Amount.stories.js";
|
export * as a3 from "./Amount.stories.js";
|
||||||
export * as a4 from "./ShowFullContractTermPopup.stories.js";
|
export * as a4 from "./ShowFullContractTermPopup.stories.js";
|
||||||
export * as a5 from "./TermsOfService/stories.js";
|
export * as a5 from "./TermsOfService/stories.js";
|
||||||
export * as a6 from "./QR.stories";
|
export * as a6 from "./QR.stories.js";
|
||||||
export * as a7 from "./AmountField.stories.js";
|
export * as a7 from "./AmountField.stories.js";
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
import { ComponentChildren, h, VNode, JSX } from "preact";
|
import { ComponentChildren, h, VNode, JSX } from "preact";
|
||||||
import { css } from "@linaria/core";
|
import { css } from "@linaria/core";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { theme, Colors, rippleEnabled, rippleEnabledOutlined } from "./style";
|
import { theme, Colors, rippleEnabled, rippleEnabledOutlined } from "./style.js";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { alpha } from "./colors/manipulation";
|
import { alpha } from "./colors/manipulation.js";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { SafeHandler } from "./handlers.js";
|
import { SafeHandler } from "./handlers.js";
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ import { css } from "@linaria/core";
|
|||||||
import { h, JSX, VNode, ComponentChildren, createContext } from "preact";
|
import { h, JSX, VNode, ComponentChildren, createContext } from "preact";
|
||||||
import { useContext } from "preact/hooks";
|
import { useContext } from "preact/hooks";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { theme } from "./style";
|
import { theme } from "./style.js";
|
||||||
|
|
||||||
type ResponsiveKeys = "xs" | "sm" | "md" | "lg" | "xl";
|
type ResponsiveKeys = "xs" | "sm" | "md" | "lg" | "xl";
|
||||||
|
|
||||||
|
@ -47,8 +47,7 @@ export const BasicExample = (): VNode => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
import { styled } from "@linaria/react";
|
import { styled } from "@linaria/react";
|
||||||
// eslint-disable-next-line import/extensions
|
import { theme } from "./style.js";
|
||||||
import { theme } from "./style";
|
|
||||||
import { Typography } from "./Typography.js";
|
import { Typography } from "./Typography.js";
|
||||||
import { Divider } from "./Divider.js";
|
import { Divider } from "./Divider.js";
|
||||||
|
|
||||||
|
@ -18,11 +18,11 @@ import { css } from "@linaria/core";
|
|||||||
import { h, JSX, VNode, ComponentChildren } from "preact";
|
import { h, JSX, VNode, ComponentChildren } from "preact";
|
||||||
import { useCallback, useEffect, useRef, useState } from "preact/hooks";
|
import { useCallback, useEffect, useRef, useState } from "preact/hooks";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { alpha } from "./colors/manipulation";
|
import { alpha } from "./colors/manipulation.js";
|
||||||
import { ModalManager } from "./ModalManager.js";
|
import { ModalManager } from "./ModalManager.js";
|
||||||
import { Portal } from "./Portal.js";
|
import { Portal } from "./Portal.js";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { theme } from "./style";
|
import { theme } from "./style.js";
|
||||||
|
|
||||||
const baseStyle = css`
|
const baseStyle = css`
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
import { css } from "@linaria/core";
|
import { css } from "@linaria/core";
|
||||||
import { h, JSX, VNode, ComponentChildren } from "preact";
|
import { h, JSX, VNode, ComponentChildren } from "preact";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { alpha } from "./colors/manipulation";
|
import { alpha } from "./colors/manipulation.js";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { theme } from "./style";
|
import { theme } from "./style.js";
|
||||||
|
|
||||||
const borderVariant = {
|
const borderVariant = {
|
||||||
outlined: css`
|
outlined: css`
|
||||||
|
@ -15,11 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { css } from "@linaria/core";
|
import { css } from "@linaria/core";
|
||||||
import { h, JSX, VNode, ComponentChildren } from "preact";
|
import { h, 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 baseStyle = css``;
|
const baseStyle = css``;
|
||||||
|
|
||||||
|
@ -26,11 +26,9 @@ import {
|
|||||||
cloneElement,
|
cloneElement,
|
||||||
Fragment,
|
Fragment,
|
||||||
} from "preact";
|
} from "preact";
|
||||||
import { Ref, useEffect, useMemo, useState } from "preact/hooks";
|
import { Ref, useEffect, useState } from "preact/hooks";
|
||||||
// eslint-disable-next-line import/extensions
|
|
||||||
import { alpha } from "./colors/manipulation";
|
import { theme } from "./style.js";
|
||||||
// eslint-disable-next-line import/extensions
|
|
||||||
import { theme } from "./style";
|
|
||||||
|
|
||||||
const baseStyle = css`
|
const baseStyle = css`
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
@ -23,7 +23,7 @@ import { SelectFilled } from "./input/SelectFilled.js";
|
|||||||
import { SelectOutlined } from "./input/SelectOutlined.js";
|
import { SelectOutlined } from "./input/SelectOutlined.js";
|
||||||
import { SelectStandard } from "./input/SelectStandard.js";
|
import { SelectStandard } from "./input/SelectStandard.js";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { Colors } from "./style";
|
import { Colors } from "./style.js";
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
autoComplete?: string;
|
autoComplete?: string;
|
||||||
|
@ -17,7 +17,7 @@ import { css } from "@linaria/core";
|
|||||||
import { ComponentChildren, h, VNode } from "preact";
|
import { ComponentChildren, h, VNode } from "preact";
|
||||||
import { useTranslationContext } from "../context/translation.js";
|
import { useTranslationContext } from "../context/translation.js";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { theme } from "./style";
|
import { theme } from "./style.js";
|
||||||
|
|
||||||
type VariantEnum =
|
type VariantEnum =
|
||||||
| "body1"
|
| "body1"
|
||||||
|
@ -17,7 +17,7 @@ import { css } from "@linaria/core";
|
|||||||
import { ComponentChildren, createContext, h, VNode } from "preact";
|
import { ComponentChildren, createContext, h, VNode } from "preact";
|
||||||
import { useContext, useMemo, useState } from "preact/hooks";
|
import { useContext, useMemo, useState } from "preact/hooks";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { Colors } from "../style";
|
import { Colors } from "../style.js";
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
color: Colors;
|
color: Colors;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
import { css } from "@linaria/core";
|
import { css } from "@linaria/core";
|
||||||
import { ComponentChildren, h, VNode } from "preact";
|
import { ComponentChildren, h, VNode } from "preact";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { theme } from "../style";
|
import { theme } from "../style.js";
|
||||||
import { useFormControl } from "./FormControl.js";
|
import { useFormControl } from "./FormControl.js";
|
||||||
|
|
||||||
const root = css`
|
const root = css`
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
import { css } from "@linaria/core";
|
import { css } from "@linaria/core";
|
||||||
import { ComponentChildren, h, VNode } from "preact";
|
import { ComponentChildren, h, VNode } from "preact";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { Colors, theme } from "../style";
|
import { Colors, theme } from "../style.js";
|
||||||
import { useFormControl } from "./FormControl.js";
|
import { useFormControl } from "./FormControl.js";
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
|
@ -23,7 +23,7 @@ import {
|
|||||||
useState,
|
useState,
|
||||||
} from "preact/hooks";
|
} from "preact/hooks";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { theme } from "../style";
|
import { theme } from "../style.js";
|
||||||
import { FormControlContext, useFormControl } from "./FormControl.js";
|
import { FormControlContext, useFormControl } from "./FormControl.js";
|
||||||
|
|
||||||
const rootStyle = css`
|
const rootStyle = css`
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
import { css } from "@linaria/core";
|
import { css } from "@linaria/core";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { Colors, theme } from "../style";
|
import { Colors, theme } from "../style.js";
|
||||||
import { useFormControl } from "./FormControl.js";
|
import { useFormControl } from "./FormControl.js";
|
||||||
import { InputBase, InputBaseComponent, InputBaseRoot } from "./InputBase.js";
|
import { InputBase, InputBaseComponent, InputBaseRoot } from "./InputBase.js";
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
import { css } from "@linaria/core";
|
import { css } from "@linaria/core";
|
||||||
import { ComponentChildren, h, VNode } from "preact";
|
import { ComponentChildren, h, VNode } from "preact";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { Colors, theme } from "../style";
|
import { Colors, theme } from "../style.js";
|
||||||
import { useFormControl } from "./FormControl.js";
|
import { useFormControl } from "./FormControl.js";
|
||||||
import { FormLabel } from "./FormLabel.js";
|
import { FormLabel } from "./FormLabel.js";
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
import { css } from "@linaria/core";
|
import { css } from "@linaria/core";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { Colors, theme } from "../style";
|
import { Colors, theme } from "../style.js";
|
||||||
import { useFormControl } from "./FormControl.js";
|
import { useFormControl } from "./FormControl.js";
|
||||||
import { InputBase, InputBaseComponent, InputBaseRoot } from "./InputBase.js";
|
import { InputBase, InputBaseComponent, InputBaseRoot } from "./InputBase.js";
|
||||||
|
|
||||||
|
@ -26,9 +26,9 @@ import {
|
|||||||
purple,
|
purple,
|
||||||
red,
|
red,
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
} from "./colors/constants";
|
} from "./colors/constants.js";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { getContrastRatio } from "./colors/manipulation";
|
import { getContrastRatio } from "./colors/manipulation.js";
|
||||||
|
|
||||||
export type Colors =
|
export type Colors =
|
||||||
| "primary"
|
| "primary"
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
import { createHashHistory } from "history";
|
import { createHashHistory } from "history";
|
||||||
import { ComponentChildren, Fragment, h, VNode } from "preact";
|
import { ComponentChildren, Fragment, h, VNode } from "preact";
|
||||||
import Router, { route, Route } from "preact-router";
|
import { route, Route, Router } from "preact-router";
|
||||||
import { useEffect, useState } from "preact/hooks";
|
import { useEffect, useState } from "preact/hooks";
|
||||||
import PendingTransactions from "../components/PendingTransactions.js";
|
import PendingTransactions from "../components/PendingTransactions.js";
|
||||||
import { PopupBox } from "../components/styled/index.js";
|
import { PopupBox } from "../components/styled/index.js";
|
||||||
|
@ -18,15 +18,17 @@
|
|||||||
* Imports.
|
* Imports.
|
||||||
*/
|
*/
|
||||||
import {
|
import {
|
||||||
Logger,
|
|
||||||
RequestThrottler,
|
RequestThrottler,
|
||||||
TalerErrorCode,
|
TalerErrorCode,
|
||||||
|
TalerError,
|
||||||
|
} from "@gnu-taler/taler-util";
|
||||||
|
|
||||||
|
import {
|
||||||
Headers,
|
Headers,
|
||||||
HttpRequestLibrary,
|
HttpRequestLibrary,
|
||||||
HttpRequestOptions,
|
HttpRequestOptions,
|
||||||
HttpResponse,
|
HttpResponse,
|
||||||
TalerError,
|
} from "@gnu-taler/taler-util/http";
|
||||||
} from "@gnu-taler/taler-util";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An implementation of the [[HttpRequestLibrary]] using the
|
* An implementation of the [[HttpRequestLibrary]] using the
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
import { TranslatedString } from "@gnu-taler/taler-util";
|
import { TranslatedString } from "@gnu-taler/taler-util";
|
||||||
import { createHashHistory } from "history";
|
import { createHashHistory } from "history";
|
||||||
import { ComponentChildren, Fragment, h, VNode } from "preact";
|
import { ComponentChildren, Fragment, h, VNode } from "preact";
|
||||||
import Router, { route, Route } from "preact-router";
|
import { route, Route, Router } from "preact-router";
|
||||||
import { useEffect } from "preact/hooks";
|
import { useEffect } from "preact/hooks";
|
||||||
import { CurrentAlerts } from "../components/CurrentAlerts.js";
|
import { CurrentAlerts } from "../components/CurrentAlerts.js";
|
||||||
import { LogoHeader } from "../components/LogoHeader.js";
|
import { LogoHeader } from "../components/LogoHeader.js";
|
||||||
|
@ -115,7 +115,7 @@ function drawIntoCanvasAndGetQR(
|
|||||||
context.clearRect(0, 0, canvas.width, canvas.height);
|
context.clearRect(0, 0, canvas.width, canvas.height);
|
||||||
context.drawImage(tag, 0, 0, canvas.width, canvas.height);
|
context.drawImage(tag, 0, 0, canvas.width, canvas.height);
|
||||||
const imgData = context.getImageData(0, 0, canvas.width, canvas.height);
|
const imgData = context.getImageData(0, 0, canvas.width, canvas.height);
|
||||||
const code = jsQR(imgData.data, canvas.width, canvas.height, {
|
const code = jsQR.default(imgData.data, canvas.width, canvas.height, {
|
||||||
inversionAttempts: "attemptBoth",
|
inversionAttempts: "attemptBoth",
|
||||||
});
|
});
|
||||||
if (code) {
|
if (code) {
|
||||||
|
@ -7,7 +7,7 @@ module.exports = function({ types: t }) {
|
|||||||
visitor: {
|
visitor: {
|
||||||
ImportDeclaration: (x) => {
|
ImportDeclaration: (x) => {
|
||||||
const src = x.node.source;
|
const src = x.node.source;
|
||||||
if (src.value.startsWith("./")) {
|
if (src.value.startsWith(".")) {
|
||||||
if (src.value.endsWith(".js")) {
|
if (src.value.endsWith(".js")) {
|
||||||
const newVal = src.value.replace(/[.]js$/, "")
|
const newVal = src.value.replace(/[.]js$/, "")
|
||||||
x.node.source = t.stringLiteral(newVal);
|
x.node.source = t.stringLiteral(newVal);
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
"jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
"jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
||||||
"jsxFactory": "h", /* Specify the JSX factory function to use when targeting react JSX emit, e.g. React.createElement or h. */
|
"jsxFactory": "h", /* Specify the JSX factory function to use when targeting react JSX emit, e.g. React.createElement or h. */
|
||||||
"jsxFragmentFactory": "Fragment", // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#custom-jsx-factories
|
"jsxFragmentFactory": "Fragment", // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#custom-jsx-factories
|
||||||
"moduleResolution": "Node",
|
"moduleResolution": "Node16",
|
||||||
"module": "ESNext",
|
"module": "ES2020",
|
||||||
"target": "ES6",
|
"target": "ES6",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"preserveSymlinks": true,
|
"preserveSymlinks": true,
|
||||||
@ -41,4 +41,4 @@
|
|||||||
"include": [
|
"include": [
|
||||||
"src/**/*"
|
"src/**/*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -12,10 +12,22 @@
|
|||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"private": false,
|
"private": false,
|
||||||
"exports": {
|
"exports": {
|
||||||
"./lib/tests/swr": "./lib/tests/swr.mjs",
|
"./lib/tests/swr": {
|
||||||
"./lib/tests/mock": "./lib/tests/mock.mjs",
|
"types": "./lib/tests/swr.js",
|
||||||
"./lib/index.browser": "./lib/index.browser.mjs",
|
"default": "./lib/tests/swr.mjs"
|
||||||
"./lib/index.node": "./lib/index.node.cjs"
|
},
|
||||||
|
"./lib/tests/mock": {
|
||||||
|
"types": "./lib/tests/mock.js",
|
||||||
|
"default": "./lib/tests/mock.mjs"
|
||||||
|
},
|
||||||
|
"./lib/index.browser": {
|
||||||
|
"types": "./lib/index.browser.js",
|
||||||
|
"default": "./lib/index.browser.mjs"
|
||||||
|
},
|
||||||
|
"./lib/index.node": {
|
||||||
|
"types": "./lib/index.node.js",
|
||||||
|
"default": "./lib/index.node.cjs"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "tsc && ./build.mjs",
|
"prepare": "tsc && ./build.mjs",
|
||||||
|
Loading…
Reference in New Issue
Block a user