aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension')
-rw-r--r--packages/taler-wallet-webextension/src/browserHttpLib.ts8
-rw-r--r--packages/taler-wallet-webextension/src/components/index.stories.tsx2
-rw-r--r--packages/taler-wallet-webextension/src/mui/Button.tsx4
-rw-r--r--packages/taler-wallet-webextension/src/mui/Grid.tsx2
-rw-r--r--packages/taler-wallet-webextension/src/mui/Menu.stories.tsx3
-rw-r--r--packages/taler-wallet-webextension/src/mui/Modal.tsx4
-rw-r--r--packages/taler-wallet-webextension/src/mui/Paper.tsx4
-rw-r--r--packages/taler-wallet-webextension/src/mui/Popover.tsx6
-rw-r--r--packages/taler-wallet-webextension/src/mui/Portal.tsx8
-rw-r--r--packages/taler-wallet-webextension/src/mui/TextField.tsx2
-rw-r--r--packages/taler-wallet-webextension/src/mui/Typography.tsx2
-rw-r--r--packages/taler-wallet-webextension/src/mui/input/FormControl.tsx2
-rw-r--r--packages/taler-wallet-webextension/src/mui/input/FormHelperText.tsx2
-rw-r--r--packages/taler-wallet-webextension/src/mui/input/FormLabel.tsx2
-rw-r--r--packages/taler-wallet-webextension/src/mui/input/InputBase.tsx2
-rw-r--r--packages/taler-wallet-webextension/src/mui/input/InputFilled.tsx2
-rw-r--r--packages/taler-wallet-webextension/src/mui/input/InputLabel.tsx2
-rw-r--r--packages/taler-wallet-webextension/src/mui/input/InputStandard.tsx2
-rw-r--r--packages/taler-wallet-webextension/src/mui/style.tsx4
-rw-r--r--packages/taler-wallet-webextension/src/popup/Application.tsx2
-rw-r--r--packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts8
-rw-r--r--packages/taler-wallet-webextension/src/wallet/Application.tsx2
-rw-r--r--packages/taler-wallet-webextension/src/wallet/QrReader.tsx2
-rw-r--r--packages/taler-wallet-webextension/trim-extension.cjs2
-rw-r--r--packages/taler-wallet-webextension/tsconfig.json6
25 files changed, 41 insertions, 44 deletions
diff --git a/packages/taler-wallet-webextension/src/browserHttpLib.ts b/packages/taler-wallet-webextension/src/browserHttpLib.ts
index 3b8bb1881..2b6ca019c 100644
--- a/packages/taler-wallet-webextension/src/browserHttpLib.ts
+++ b/packages/taler-wallet-webextension/src/browserHttpLib.ts
@@ -21,13 +21,15 @@ import {
Logger,
RequestThrottler,
TalerErrorCode,
+ TalerError,
+} from "@gnu-taler/taler-util";
+
+import {
HttpRequestLibrary,
HttpRequestOptions,
HttpResponse,
Headers,
- TalerError,
-} from "@gnu-taler/taler-util";
-
+} from "@gnu-taler/taler-util/http";
const logger = new Logger("browserHttpLib");
diff --git a/packages/taler-wallet-webextension/src/components/index.stories.tsx b/packages/taler-wallet-webextension/src/components/index.stories.tsx
index 469ed82fa..4a7a068d3 100644
--- a/packages/taler-wallet-webextension/src/components/index.stories.tsx
+++ b/packages/taler-wallet-webextension/src/components/index.stories.tsx
@@ -24,5 +24,5 @@ export * as a2 from "./PendingTransactions.stories.js";
export * as a3 from "./Amount.stories.js";
export * as a4 from "./ShowFullContractTermPopup.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";
diff --git a/packages/taler-wallet-webextension/src/mui/Button.tsx b/packages/taler-wallet-webextension/src/mui/Button.tsx
index 31e97f008..aad8f5002 100644
--- a/packages/taler-wallet-webextension/src/mui/Button.tsx
+++ b/packages/taler-wallet-webextension/src/mui/Button.tsx
@@ -16,9 +16,9 @@
import { ComponentChildren, h, VNode, JSX } from "preact";
import { css } from "@linaria/core";
// 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
-import { alpha } from "./colors/manipulation";
+import { alpha } from "./colors/manipulation.js";
import { useState } from "preact/hooks";
import { SafeHandler } from "./handlers.js";
diff --git a/packages/taler-wallet-webextension/src/mui/Grid.tsx b/packages/taler-wallet-webextension/src/mui/Grid.tsx
index e9b839b2f..2db439778 100644
--- a/packages/taler-wallet-webextension/src/mui/Grid.tsx
+++ b/packages/taler-wallet-webextension/src/mui/Grid.tsx
@@ -17,7 +17,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";
+import { theme } from "./style.js";
type ResponsiveKeys = "xs" | "sm" | "md" | "lg" | "xl";
diff --git a/packages/taler-wallet-webextension/src/mui/Menu.stories.tsx b/packages/taler-wallet-webextension/src/mui/Menu.stories.tsx
index e2bba2678..200af8f57 100644
--- a/packages/taler-wallet-webextension/src/mui/Menu.stories.tsx
+++ b/packages/taler-wallet-webextension/src/mui/Menu.stories.tsx
@@ -47,8 +47,7 @@ export const BasicExample = (): VNode => {
};
import { styled } from "@linaria/react";
-// eslint-disable-next-line import/extensions
-import { theme } from "./style";
+import { theme } from "./style.js";
import { Typography } from "./Typography.js";
import { Divider } from "./Divider.js";
diff --git a/packages/taler-wallet-webextension/src/mui/Modal.tsx b/packages/taler-wallet-webextension/src/mui/Modal.tsx
index 7b1cf3f3a..0ea1372fa 100644
--- a/packages/taler-wallet-webextension/src/mui/Modal.tsx
+++ b/packages/taler-wallet-webextension/src/mui/Modal.tsx
@@ -18,11 +18,11 @@ import { css } from "@linaria/core";
import { h, JSX, VNode, ComponentChildren } from "preact";
import { useCallback, useEffect, useRef, useState } from "preact/hooks";
// eslint-disable-next-line import/extensions
-import { alpha } from "./colors/manipulation";
+import { alpha } from "./colors/manipulation.js";
import { ModalManager } from "./ModalManager.js";
import { Portal } from "./Portal.js";
// eslint-disable-next-line import/extensions
-import { theme } from "./style";
+import { theme } from "./style.js";
const baseStyle = css`
position: fixed;
diff --git a/packages/taler-wallet-webextension/src/mui/Paper.tsx b/packages/taler-wallet-webextension/src/mui/Paper.tsx
index 0c805e307..a44b1be0d 100644
--- a/packages/taler-wallet-webextension/src/mui/Paper.tsx
+++ b/packages/taler-wallet-webextension/src/mui/Paper.tsx
@@ -16,9 +16,9 @@
import { css } from "@linaria/core";
import { h, JSX, VNode, ComponentChildren } from "preact";
// eslint-disable-next-line import/extensions
-import { alpha } from "./colors/manipulation";
+import { alpha } from "./colors/manipulation.js";
// eslint-disable-next-line import/extensions
-import { theme } from "./style";
+import { theme } from "./style.js";
const borderVariant = {
outlined: css`
diff --git a/packages/taler-wallet-webextension/src/mui/Popover.tsx b/packages/taler-wallet-webextension/src/mui/Popover.tsx
index 69e0ab10a..da551c65d 100644
--- a/packages/taler-wallet-webextension/src/mui/Popover.tsx
+++ b/packages/taler-wallet-webextension/src/mui/Popover.tsx
@@ -15,11 +15,7 @@
*/
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";
+import { h, VNode, ComponentChildren } from "preact";
const baseStyle = css``;
diff --git a/packages/taler-wallet-webextension/src/mui/Portal.tsx b/packages/taler-wallet-webextension/src/mui/Portal.tsx
index 2026d7e5a..1d835abac 100644
--- a/packages/taler-wallet-webextension/src/mui/Portal.tsx
+++ b/packages/taler-wallet-webextension/src/mui/Portal.tsx
@@ -26,11 +26,9 @@ import {
cloneElement,
Fragment,
} from "preact";
-import { Ref, useEffect, useMemo, useState } from "preact/hooks";
-// eslint-disable-next-line import/extensions
-import { alpha } from "./colors/manipulation";
-// eslint-disable-next-line import/extensions
-import { theme } from "./style";
+import { Ref, useEffect, useState } from "preact/hooks";
+
+import { theme } from "./style.js";
const baseStyle = css`
position: fixed;
diff --git a/packages/taler-wallet-webextension/src/mui/TextField.tsx b/packages/taler-wallet-webextension/src/mui/TextField.tsx
index 42ac49a00..4d7c9a472 100644
--- a/packages/taler-wallet-webextension/src/mui/TextField.tsx
+++ b/packages/taler-wallet-webextension/src/mui/TextField.tsx
@@ -23,7 +23,7 @@ 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";
+import { Colors } from "./style.js";
export interface Props {
autoComplete?: string;
diff --git a/packages/taler-wallet-webextension/src/mui/Typography.tsx b/packages/taler-wallet-webextension/src/mui/Typography.tsx
index b3a9e0010..3b4357918 100644
--- a/packages/taler-wallet-webextension/src/mui/Typography.tsx
+++ b/packages/taler-wallet-webextension/src/mui/Typography.tsx
@@ -17,7 +17,7 @@ import { css } from "@linaria/core";
import { ComponentChildren, h, VNode } from "preact";
import { useTranslationContext } from "../context/translation.js";
// eslint-disable-next-line import/extensions
-import { theme } from "./style";
+import { theme } from "./style.js";
type VariantEnum =
| "body1"
diff --git a/packages/taler-wallet-webextension/src/mui/input/FormControl.tsx b/packages/taler-wallet-webextension/src/mui/input/FormControl.tsx
index e80e7f8d8..23dfcfd08 100644
--- a/packages/taler-wallet-webextension/src/mui/input/FormControl.tsx
+++ b/packages/taler-wallet-webextension/src/mui/input/FormControl.tsx
@@ -17,7 +17,7 @@ import { css } from "@linaria/core";
import { ComponentChildren, createContext, h, VNode } from "preact";
import { useContext, useMemo, useState } from "preact/hooks";
// eslint-disable-next-line import/extensions
-import { Colors } from "../style";
+import { Colors } from "../style.js";
export interface Props {
color: Colors;
diff --git a/packages/taler-wallet-webextension/src/mui/input/FormHelperText.tsx b/packages/taler-wallet-webextension/src/mui/input/FormHelperText.tsx
index 5e40ba616..5fa48a169 100644
--- a/packages/taler-wallet-webextension/src/mui/input/FormHelperText.tsx
+++ b/packages/taler-wallet-webextension/src/mui/input/FormHelperText.tsx
@@ -16,7 +16,7 @@
import { css } from "@linaria/core";
import { ComponentChildren, h, VNode } from "preact";
// eslint-disable-next-line import/extensions
-import { theme } from "../style";
+import { theme } from "../style.js";
import { useFormControl } from "./FormControl.js";
const root = css`
diff --git a/packages/taler-wallet-webextension/src/mui/input/FormLabel.tsx b/packages/taler-wallet-webextension/src/mui/input/FormLabel.tsx
index 11404b5c1..68fbdc38e 100644
--- a/packages/taler-wallet-webextension/src/mui/input/FormLabel.tsx
+++ b/packages/taler-wallet-webextension/src/mui/input/FormLabel.tsx
@@ -16,7 +16,7 @@
import { css } from "@linaria/core";
import { ComponentChildren, h, VNode } from "preact";
// eslint-disable-next-line import/extensions
-import { Colors, theme } from "../style";
+import { Colors, theme } from "../style.js";
import { useFormControl } from "./FormControl.js";
export interface Props {
diff --git a/packages/taler-wallet-webextension/src/mui/input/InputBase.tsx b/packages/taler-wallet-webextension/src/mui/input/InputBase.tsx
index 94304f16b..d811a3dbb 100644
--- a/packages/taler-wallet-webextension/src/mui/input/InputBase.tsx
+++ b/packages/taler-wallet-webextension/src/mui/input/InputBase.tsx
@@ -23,7 +23,7 @@ import {
useState,
} from "preact/hooks";
// eslint-disable-next-line import/extensions
-import { theme } from "../style";
+import { theme } from "../style.js";
import { FormControlContext, useFormControl } from "./FormControl.js";
const rootStyle = css`
diff --git a/packages/taler-wallet-webextension/src/mui/input/InputFilled.tsx b/packages/taler-wallet-webextension/src/mui/input/InputFilled.tsx
index 9ab91e7fd..a984f8451 100644
--- a/packages/taler-wallet-webextension/src/mui/input/InputFilled.tsx
+++ b/packages/taler-wallet-webextension/src/mui/input/InputFilled.tsx
@@ -16,7 +16,7 @@
import { css } from "@linaria/core";
import { h, VNode } from "preact";
// eslint-disable-next-line import/extensions
-import { Colors, theme } from "../style";
+import { Colors, theme } from "../style.js";
import { useFormControl } from "./FormControl.js";
import { InputBase, InputBaseComponent, InputBaseRoot } from "./InputBase.js";
diff --git a/packages/taler-wallet-webextension/src/mui/input/InputLabel.tsx b/packages/taler-wallet-webextension/src/mui/input/InputLabel.tsx
index 35cbd7a41..2d4743e59 100644
--- a/packages/taler-wallet-webextension/src/mui/input/InputLabel.tsx
+++ b/packages/taler-wallet-webextension/src/mui/input/InputLabel.tsx
@@ -16,7 +16,7 @@
import { css } from "@linaria/core";
import { ComponentChildren, h, VNode } from "preact";
// eslint-disable-next-line import/extensions
-import { Colors, theme } from "../style";
+import { Colors, theme } from "../style.js";
import { useFormControl } from "./FormControl.js";
import { FormLabel } from "./FormLabel.js";
diff --git a/packages/taler-wallet-webextension/src/mui/input/InputStandard.tsx b/packages/taler-wallet-webextension/src/mui/input/InputStandard.tsx
index 45614f618..f5b70f07c 100644
--- a/packages/taler-wallet-webextension/src/mui/input/InputStandard.tsx
+++ b/packages/taler-wallet-webextension/src/mui/input/InputStandard.tsx
@@ -16,7 +16,7 @@
import { css } from "@linaria/core";
import { h, VNode } from "preact";
// eslint-disable-next-line import/extensions
-import { Colors, theme } from "../style";
+import { Colors, theme } from "../style.js";
import { useFormControl } from "./FormControl.js";
import { InputBase, InputBaseComponent, InputBaseRoot } from "./InputBase.js";
diff --git a/packages/taler-wallet-webextension/src/mui/style.tsx b/packages/taler-wallet-webextension/src/mui/style.tsx
index c3071b314..3fcf3ac1e 100644
--- a/packages/taler-wallet-webextension/src/mui/style.tsx
+++ b/packages/taler-wallet-webextension/src/mui/style.tsx
@@ -26,9 +26,9 @@ import {
purple,
red,
// eslint-disable-next-line import/extensions
-} from "./colors/constants";
+} from "./colors/constants.js";
// eslint-disable-next-line import/extensions
-import { getContrastRatio } from "./colors/manipulation";
+import { getContrastRatio } from "./colors/manipulation.js";
export type Colors =
| "primary"
diff --git a/packages/taler-wallet-webextension/src/popup/Application.tsx b/packages/taler-wallet-webextension/src/popup/Application.tsx
index ebbbc4c2a..acb16b1d5 100644
--- a/packages/taler-wallet-webextension/src/popup/Application.tsx
+++ b/packages/taler-wallet-webextension/src/popup/Application.tsx
@@ -22,7 +22,7 @@
import { createHashHistory } from "history";
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 PendingTransactions from "../components/PendingTransactions.js";
import { PopupBox } from "../components/styled/index.js";
diff --git a/packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts b/packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts
index 00c0085ef..921acd63b 100644
--- a/packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts
+++ b/packages/taler-wallet-webextension/src/serviceWorkerHttpLib.ts
@@ -18,15 +18,17 @@
* Imports.
*/
import {
- Logger,
RequestThrottler,
TalerErrorCode,
+ TalerError,
+} from "@gnu-taler/taler-util";
+
+import {
Headers,
HttpRequestLibrary,
HttpRequestOptions,
HttpResponse,
- TalerError,
-} from "@gnu-taler/taler-util";
+} from "@gnu-taler/taler-util/http";
/**
* An implementation of the [[HttpRequestLibrary]] using the
diff --git a/packages/taler-wallet-webextension/src/wallet/Application.tsx b/packages/taler-wallet-webextension/src/wallet/Application.tsx
index 007f12bb7..bc6678a21 100644
--- a/packages/taler-wallet-webextension/src/wallet/Application.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Application.tsx
@@ -23,7 +23,7 @@
import { TranslatedString } from "@gnu-taler/taler-util";
import { createHashHistory } from "history";
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 { CurrentAlerts } from "../components/CurrentAlerts.js";
import { LogoHeader } from "../components/LogoHeader.js";
diff --git a/packages/taler-wallet-webextension/src/wallet/QrReader.tsx b/packages/taler-wallet-webextension/src/wallet/QrReader.tsx
index c1972823a..0cbb12d40 100644
--- a/packages/taler-wallet-webextension/src/wallet/QrReader.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/QrReader.tsx
@@ -115,7 +115,7 @@ function drawIntoCanvasAndGetQR(
context.clearRect(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 code = jsQR(imgData.data, canvas.width, canvas.height, {
+ const code = jsQR.default(imgData.data, canvas.width, canvas.height, {
inversionAttempts: "attemptBoth",
});
if (code) {
diff --git a/packages/taler-wallet-webextension/trim-extension.cjs b/packages/taler-wallet-webextension/trim-extension.cjs
index 4305e792b..00e8f9f01 100644
--- a/packages/taler-wallet-webextension/trim-extension.cjs
+++ b/packages/taler-wallet-webextension/trim-extension.cjs
@@ -7,7 +7,7 @@ module.exports = function({ types: t }) {
visitor: {
ImportDeclaration: (x) => {
const src = x.node.source;
- if (src.value.startsWith("./")) {
+ if (src.value.startsWith(".")) {
if (src.value.endsWith(".js")) {
const newVal = src.value.replace(/[.]js$/, "")
x.node.source = t.stringLiteral(newVal);
diff --git a/packages/taler-wallet-webextension/tsconfig.json b/packages/taler-wallet-webextension/tsconfig.json
index 5fc45caae..303cf879e 100644
--- a/packages/taler-wallet-webextension/tsconfig.json
+++ b/packages/taler-wallet-webextension/tsconfig.json
@@ -8,8 +8,8 @@
"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. */
"jsxFragmentFactory": "Fragment", // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#custom-jsx-factories
- "moduleResolution": "Node",
- "module": "ESNext",
+ "moduleResolution": "Node16",
+ "module": "ES2020",
"target": "ES6",
"skipLibCheck": true,
"preserveSymlinks": true,
@@ -41,4 +41,4 @@
"include": [
"src/**/*"
]
-} \ No newline at end of file
+}