fixing web-utils new imports
This commit is contained in:
parent
b64bb455a2
commit
d03bfa714b
@ -15,120 +15,129 @@
|
|||||||
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import linaria from '@linaria/esbuild'
|
import linaria from "@linaria/esbuild";
|
||||||
import esbuild from 'esbuild'
|
import esbuild from "esbuild";
|
||||||
import path from "path"
|
import path from "path";
|
||||||
import fs from "fs"
|
import fs from "fs";
|
||||||
|
|
||||||
function getFilesInDirectory(startPath, regex) {
|
function getFilesInDirectory(startPath, regex) {
|
||||||
if (!fs.existsSync(startPath)) {
|
if (!fs.existsSync(startPath)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const files = fs.readdirSync(startPath);
|
const files = fs.readdirSync(startPath);
|
||||||
const result = files.flatMap(file => {
|
const result = files
|
||||||
const filename = path.join(startPath, file);
|
.flatMap((file) => {
|
||||||
|
const filename = path.join(startPath, file);
|
||||||
|
|
||||||
const stat = fs.lstatSync(filename);
|
const stat = fs.lstatSync(filename);
|
||||||
if (stat.isDirectory()) {
|
if (stat.isDirectory()) {
|
||||||
return getFilesInDirectory(filename, regex);
|
return getFilesInDirectory(filename, regex);
|
||||||
}
|
} else if (regex.test(filename)) {
|
||||||
else if (regex.test(filename)) {
|
return filename;
|
||||||
return filename
|
}
|
||||||
}
|
})
|
||||||
}).filter(x => !!x)
|
.filter((x) => !!x);
|
||||||
|
|
||||||
return result
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
const BASE = process.cwd()
|
const BASE = process.cwd();
|
||||||
const allTestFiles = getFilesInDirectory(path.join(BASE, 'src'), /.test.ts$/)
|
const allTestFiles = getFilesInDirectory(path.join(BASE, "src"), /.test.ts$/);
|
||||||
|
|
||||||
const preact = path.join(BASE, "node_modules", "preact", "compat", "dist", "compat.module.js");
|
const preact = path.join(
|
||||||
|
BASE,
|
||||||
|
"node_modules",
|
||||||
|
"preact",
|
||||||
|
"compat",
|
||||||
|
"dist",
|
||||||
|
"compat.module.js",
|
||||||
|
);
|
||||||
const preactCompatPlugin = {
|
const preactCompatPlugin = {
|
||||||
name: "preact-compat",
|
name: "preact-compat",
|
||||||
setup(build) {
|
setup(build) {
|
||||||
build.onResolve({ filter: /^(react-dom|react)$/ }, args => ({ path: preact }));
|
build.onResolve({ filter: /^(react-dom|react)$/ }, (args) => ({
|
||||||
}
|
path: preact,
|
||||||
}
|
}));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
const entryPoints = [
|
const entryPoints = [
|
||||||
'src/popupEntryPoint.tsx',
|
"src/popupEntryPoint.tsx",
|
||||||
'src/popupEntryPoint.dev.tsx',
|
"src/popupEntryPoint.dev.tsx",
|
||||||
'src/walletEntryPoint.tsx',
|
"src/walletEntryPoint.tsx",
|
||||||
'src/walletEntryPoint.dev.tsx',
|
"src/walletEntryPoint.dev.tsx",
|
||||||
'src/background.ts',
|
"src/background.ts",
|
||||||
'src/stories.tsx',
|
"src/stories.tsx",
|
||||||
'src/background.dev.ts',
|
"src/background.dev.ts",
|
||||||
'src/taler-wallet-interaction-loader.ts',
|
"src/taler-wallet-interaction-loader.ts",
|
||||||
'src/taler-wallet-interaction-support.ts',
|
"src/taler-wallet-interaction-support.ts",
|
||||||
'src/browserWorkerEntry.ts'
|
"src/browserWorkerEntry.ts",
|
||||||
]
|
];
|
||||||
|
|
||||||
let GIT_ROOT = BASE
|
let GIT_ROOT = BASE;
|
||||||
while (!fs.existsSync(path.join(GIT_ROOT, '.git')) && GIT_ROOT !== '/') {
|
while (!fs.existsSync(path.join(GIT_ROOT, ".git")) && GIT_ROOT !== "/") {
|
||||||
GIT_ROOT = path.join(GIT_ROOT, '../')
|
GIT_ROOT = path.join(GIT_ROOT, "../");
|
||||||
}
|
}
|
||||||
if (GIT_ROOT === '/') {
|
if (GIT_ROOT === "/") {
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
console.log("not found")
|
console.log("not found");
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
const GIT_HASH = GIT_ROOT === '/' ? undefined : git_hash()
|
const GIT_HASH = GIT_ROOT === "/" ? undefined : git_hash();
|
||||||
|
|
||||||
|
let _package = JSON.parse(fs.readFileSync(path.join(BASE, "package.json")));
|
||||||
let _package = JSON.parse(fs.readFileSync(path.join(BASE, 'package.json')));
|
|
||||||
|
|
||||||
function git_hash() {
|
function git_hash() {
|
||||||
const rev = fs.readFileSync(path.join(GIT_ROOT, '.git', 'HEAD')).toString().trim().split(/.*[: ]/).slice(-1)[0];
|
const rev = fs
|
||||||
if (rev.indexOf('/') === -1) {
|
.readFileSync(path.join(GIT_ROOT, ".git", "HEAD"))
|
||||||
|
.toString()
|
||||||
|
.trim()
|
||||||
|
.split(/.*[: ]/)
|
||||||
|
.slice(-1)[0];
|
||||||
|
if (rev.indexOf("/") === -1) {
|
||||||
return rev;
|
return rev;
|
||||||
} else {
|
} else {
|
||||||
return fs.readFileSync(path.join(GIT_ROOT, '.git', rev)).toString().trim();
|
return fs.readFileSync(path.join(GIT_ROOT, ".git", rev)).toString().trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const buildConfig = {
|
export const buildConfig = {
|
||||||
entryPoints: [...entryPoints, ...allTestFiles],
|
entryPoints: [...entryPoints, ...allTestFiles],
|
||||||
bundle: true,
|
bundle: true,
|
||||||
outdir: 'dist',
|
outdir: "dist",
|
||||||
minify: false,
|
minify: false,
|
||||||
loader: {
|
loader: {
|
||||||
'.svg': 'text',
|
".svg": "text",
|
||||||
'.png': 'dataurl',
|
".png": "dataurl",
|
||||||
'.jpeg': 'dataurl',
|
".jpeg": "dataurl",
|
||||||
},
|
},
|
||||||
target: [
|
target: ["es6"],
|
||||||
'es6'
|
format: "iife",
|
||||||
],
|
platform: "browser",
|
||||||
format: 'iife',
|
|
||||||
platform: 'browser',
|
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
jsxFactory: 'h',
|
jsxFactory: "h",
|
||||||
jsxFragment: 'Fragment',
|
jsxFragment: "Fragment",
|
||||||
define: {
|
define: {
|
||||||
'__VERSION__': `"${_package.version}"`,
|
__VERSION__: `"${_package.version}"`,
|
||||||
'__GIT_HASH__': `"${GIT_HASH}"`,
|
__GIT_HASH__: `"${GIT_HASH}"`,
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
preactCompatPlugin,
|
preactCompatPlugin,
|
||||||
linaria.default({
|
linaria.default({
|
||||||
babelOptions: {
|
babelOptions: {
|
||||||
babelrc: false,
|
babelrc: false,
|
||||||
configFile: './babel.config-linaria.json',
|
configFile: "./babel.config-linaria.json",
|
||||||
},
|
},
|
||||||
sourceMap: true,
|
sourceMap: true,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
}
|
};
|
||||||
|
|
||||||
await esbuild
|
|
||||||
.build(buildConfig)
|
|
||||||
.catch((e) => {
|
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
console.log(e)
|
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
process.exit(1)
|
|
||||||
});
|
|
||||||
|
|
||||||
|
await esbuild.build(buildConfig).catch((e) => {
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
console.log(e);
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
process.exit(1);
|
||||||
|
});
|
||||||
|
119
packages/taler-wallet-webextension/build.mjs
Executable file
119
packages/taler-wallet-webextension/build.mjs
Executable file
@ -0,0 +1,119 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
/*
|
||||||
|
This file is part of GNU Taler
|
||||||
|
(C) 2022 Taler Systems S.A.
|
||||||
|
|
||||||
|
GNU Taler is free software; you can redistribute it and/or modify it under the
|
||||||
|
terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation; either version 3, or (at your option) any later version.
|
||||||
|
|
||||||
|
GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
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 {
|
||||||
|
build,
|
||||||
|
computeConfig,
|
||||||
|
getFilesInDirectory,
|
||||||
|
} from "@gnu-taler/web-util/build";
|
||||||
|
import linaria from "@linaria/esbuild";
|
||||||
|
import esbuild from "esbuild";
|
||||||
|
import path from "path";
|
||||||
|
import fs from "fs";
|
||||||
|
|
||||||
|
const BASE = process.cwd();
|
||||||
|
|
||||||
|
const allStaticFiles = getFilesInDirectory("static");
|
||||||
|
|
||||||
|
// await build({
|
||||||
|
// source: {
|
||||||
|
// js: [
|
||||||
|
// "src/popupEntryPoint.tsx",
|
||||||
|
// "src/walletEntryPoint.tsx",
|
||||||
|
// "src/background.ts",
|
||||||
|
// "src/taler-wallet-interaction-loader.ts",
|
||||||
|
// "src/taler-wallet-interaction-support.ts",
|
||||||
|
// "src/browserWorkerEntry.ts",
|
||||||
|
// ],
|
||||||
|
// assets: allStaticFiles,
|
||||||
|
// },
|
||||||
|
// destination: "./dist/prod",
|
||||||
|
// css: "linaria",
|
||||||
|
// });
|
||||||
|
function copyFilesPlugin(files) {
|
||||||
|
return {
|
||||||
|
name: "copy-files",
|
||||||
|
setup(build) {
|
||||||
|
const outDir = build.initialOptions.outdir;
|
||||||
|
if (outDir === undefined)
|
||||||
|
throw Error("esbuild build options does not specify outdir");
|
||||||
|
build.onEnd(() => {
|
||||||
|
for (const file of files) {
|
||||||
|
const name = path.parse(file).base;
|
||||||
|
fs.copyFileSync(file, path.join(outDir, name));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const buildConfig2 = computeConfig({
|
||||||
|
source: {
|
||||||
|
js: [
|
||||||
|
"src/popupEntryPoint.tsx",
|
||||||
|
"src/walletEntryPoint.tsx",
|
||||||
|
"src/background.ts",
|
||||||
|
"src/taler-wallet-interaction-loader.ts",
|
||||||
|
"src/taler-wallet-interaction-support.ts",
|
||||||
|
"src/browserWorkerEntry.ts",
|
||||||
|
],
|
||||||
|
assets: allStaticFiles,
|
||||||
|
},
|
||||||
|
destination: "./dist/prod",
|
||||||
|
css: "linaria",
|
||||||
|
});
|
||||||
|
|
||||||
|
const preact = path.join(
|
||||||
|
BASE,
|
||||||
|
"node_modules",
|
||||||
|
"preact",
|
||||||
|
"compat",
|
||||||
|
"dist",
|
||||||
|
"compat.module.js",
|
||||||
|
);
|
||||||
|
const preactCompatPlugin = {
|
||||||
|
name: "preact-compat",
|
||||||
|
setup(build) {
|
||||||
|
build.onResolve({ filter: /^(react-dom|react)$/ }, (args) => ({
|
||||||
|
path: preact,
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const asd = linaria.default({
|
||||||
|
babelOptions: {
|
||||||
|
babelrc: false,
|
||||||
|
configFile: "./babel.config-linaria.json",
|
||||||
|
},
|
||||||
|
sourceMap: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
// buildConfig2.plugins = [
|
||||||
|
// preactCompatPlugin,
|
||||||
|
// copyFilesPlugin(allStaticFiles),
|
||||||
|
// asd,
|
||||||
|
// ];
|
||||||
|
|
||||||
|
// console.log(JSON.stringify(buildConfig, undefined, 2));
|
||||||
|
// console.log(JSON.stringify(buildConfig2, undefined, 2));
|
||||||
|
|
||||||
|
await esbuild.build(buildConfig2).catch((e) => {
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
console.log(e);
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
process.exit(1);
|
||||||
|
});
|
@ -15,19 +15,19 @@
|
|||||||
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { serve } from "@gnu-taler/web-util/lib/index.node";
|
import { serve } from "@gnu-taler/web-util/node";
|
||||||
import esbuild from 'esbuild';
|
import esbuild from "esbuild";
|
||||||
import { buildConfig } from "./build-fast-with-linaria.mjs";
|
import { buildConfig } from "./build-fast-with-linaria.mjs";
|
||||||
|
|
||||||
buildConfig.inject = ['./node_modules/@gnu-taler/web-util/lib/live-reload.mjs']
|
buildConfig.inject = ["./node_modules/@gnu-taler/web-util/lib/live-reload.mjs"];
|
||||||
|
|
||||||
serve({
|
serve({
|
||||||
folder: './dist',
|
folder: "./dist",
|
||||||
port: 8080,
|
port: 8080,
|
||||||
source: './src',
|
source: "./src",
|
||||||
development: true,
|
development: true,
|
||||||
onUpdate: async () => esbuild.build(buildConfig)
|
onUpdate: async () => esbuild.build(buildConfig),
|
||||||
})
|
});
|
||||||
|
|
||||||
// FIXME: create a mocha test in the browser as it was before
|
// FIXME: create a mocha test in the browser as it was before
|
||||||
|
|
||||||
@ -35,4 +35,3 @@ serve({
|
|||||||
// fs.writeFileSync("dev-html/mocha.css", fs.readFileSync("node_modules/mocha/mocha.css"))
|
// fs.writeFileSync("dev-html/mocha.css", fs.readFileSync("node_modules/mocha/mocha.css"))
|
||||||
// fs.writeFileSync("dev-html/mocha.js", fs.readFileSync("node_modules/mocha/mocha.js"))
|
// fs.writeFileSync("dev-html/mocha.js", fs.readFileSync("node_modules/mocha/mocha.js"))
|
||||||
// fs.writeFileSync("dev-html/mocha.js.map", fs.readFileSync("node_modules/mocha/mocha.js.map"))
|
// fs.writeFileSync("dev-html/mocha.js.map", fs.readFileSync("node_modules/mocha/mocha.js.map"))
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ import qrIcon from "./svg/qr_code_24px.svg";
|
|||||||
import settingsIcon from "./svg/settings_black_24dp.svg";
|
import settingsIcon from "./svg/settings_black_24dp.svg";
|
||||||
import warningIcon from "./svg/warning_24px.svg";
|
import warningIcon from "./svg/warning_24px.svg";
|
||||||
import { parseTalerUri, TalerUriAction } from "@gnu-taler/taler-util";
|
import { parseTalerUri, TalerUriAction } from "@gnu-taler/taler-util";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of pages used by the wallet
|
* List of pages used by the wallet
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
import { AmountJson, Amounts } from "@gnu-taler/taler-util";
|
import { AmountJson, Amounts } from "@gnu-taler/taler-util";
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { AmountFieldHandler, nullFunction, withSafe } from "../mui/handlers.js";
|
import { AmountFieldHandler, nullFunction, withSafe } from "../mui/handlers.js";
|
||||||
import { AmountField } from "./AmountField.js";
|
import { AmountField } from "./AmountField.js";
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ import {
|
|||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { AmountFieldHandler } from "../mui/handlers.js";
|
import { AmountFieldHandler } from "../mui/handlers.js";
|
||||||
import { TextField } from "../mui/TextField.js";
|
import { TextField } from "../mui/TextField.js";
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ import {
|
|||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useEffect, useRef, useState } from "preact/hooks";
|
import { useEffect, useRef, useState } from "preact/hooks";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { CopiedIcon, CopyIcon } from "../svg/index.js";
|
import { CopiedIcon, CopyIcon } from "../svg/index.js";
|
||||||
import { Amount } from "./Amount.js";
|
import { Amount } from "./Amount.js";
|
||||||
import { ButtonBox, TooltipLeft } from "./styled/index.js";
|
import { ButtonBox, TooltipLeft } from "./styled/index.js";
|
||||||
|
@ -21,7 +21,7 @@ import {
|
|||||||
useAlertContext,
|
useAlertContext,
|
||||||
} from "../context/alert.js";
|
} from "../context/alert.js";
|
||||||
import { Alert } from "../mui/Alert.js";
|
import { Alert } from "../mui/Alert.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
import { WalletDiagnostics } from "@gnu-taler/taler-util";
|
import { WalletDiagnostics } from "@gnu-taler/taler-util";
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
timedOut: boolean;
|
timedOut: boolean;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useRef, useState } from "preact/hooks";
|
import { useRef, useState } from "preact/hooks";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
value: string;
|
value: string;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
import { css } from "@linaria/core";
|
import { css } from "@linaria/core";
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useEffect, useState } from "preact/hooks";
|
import { useEffect, useState } from "preact/hooks";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import ProgressIcon from "../svg/progress.svg";
|
import ProgressIcon from "../svg/progress.svg";
|
||||||
import { CenteredText } from "./styled/index.js";
|
import { CenteredText } from "./styled/index.js";
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ const CollasibleBox = styled.div`
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
import arrowDown from "../svg/chevron-down.svg";
|
import arrowDown from "../svg/chevron-down.svg";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
|
|
||||||
export function PartCollapsible({ text, title, big, showSign }: Props): VNode {
|
export function PartCollapsible({ text, title, big, showSign }: Props): VNode {
|
||||||
const Text = big ? ExtraLargeText : LargeText;
|
const Text = big ? ExtraLargeText : LargeText;
|
||||||
|
@ -28,7 +28,7 @@ import { Amount } from "./Amount.js";
|
|||||||
import { Part } from "./Part.js";
|
import { Part } from "./Part.js";
|
||||||
import { QR } from "./QR.js";
|
import { QR } from "./QR.js";
|
||||||
import { LinkSuccess, WarningBox } from "./styled/index.js";
|
import { LinkSuccess, WarningBox } from "./styled/index.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Button } from "../mui/Button.js";
|
import { Button } from "../mui/Button.js";
|
||||||
import { ButtonHandler } from "../mui/handlers.js";
|
import { ButtonHandler } from "../mui/handlers.js";
|
||||||
import { assertUnreachable } from "../utils/index.js";
|
import { assertUnreachable } from "../utils/index.js";
|
||||||
|
@ -24,7 +24,7 @@ import {
|
|||||||
Transaction,
|
Transaction,
|
||||||
TransactionType,
|
TransactionType,
|
||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { PendingTransactionsView as TestedComponent } from "./PendingTransactions.js";
|
import { PendingTransactionsView as TestedComponent } from "./PendingTransactions.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -24,7 +24,7 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
|||||||
import { Fragment, h, JSX, VNode } from "preact";
|
import { Fragment, h, JSX, VNode } from "preact";
|
||||||
import { useEffect } from "preact/hooks";
|
import { useEffect } from "preact/hooks";
|
||||||
import { useBackendContext } from "../context/backend.js";
|
import { useBackendContext } from "../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
|
||||||
import { Avatar } from "../mui/Avatar.js";
|
import { Avatar } from "../mui/Avatar.js";
|
||||||
import { Grid } from "../mui/Grid.js";
|
import { Grid } from "../mui/Grid.js";
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
import { Amounts, Product } from "@gnu-taler/taler-util";
|
import { Amounts, Product } from "@gnu-taler/taler-util";
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { SmallLightText } from "./styled/index.js";
|
import { SmallLightText } from "./styled/index.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
|
|
||||||
export function ProductList({ products }: { products: Product[] }): VNode {
|
export function ProductList({ products }: { products: Product[] }): VNode {
|
||||||
const { i18n } = useTranslationContext();
|
const { i18n } = useTranslationContext();
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { QR } from "./QR.js";
|
import { QR } from "./QR.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
import { TranslatedString } from "@gnu-taler/taler-util";
|
import { TranslatedString } from "@gnu-taler/taler-util";
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { NiceSelect } from "./styled/index.js";
|
import { NiceSelect } from "./styled/index.js";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { WalletContractData } from "@gnu-taler/taler-wallet-core";
|
import { WalletContractData } from "@gnu-taler/taler-wallet-core";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import {
|
import {
|
||||||
ErrorView,
|
ErrorView,
|
||||||
HiddenView,
|
HiddenView,
|
||||||
|
@ -26,7 +26,7 @@ import { Modal } from "../components/Modal.js";
|
|||||||
import { Time } from "../components/Time.js";
|
import { Time } from "../components/Time.js";
|
||||||
import { alertFromError, useAlertContext } from "../context/alert.js";
|
import { alertFromError, useAlertContext } from "../context/alert.js";
|
||||||
import { useBackendContext } from "../context/backend.js";
|
import { useBackendContext } from "../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { HookError, useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
|
import { HookError, useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
|
||||||
import { ButtonHandler } from "../mui/handlers.js";
|
import { ButtonHandler } from "../mui/handlers.js";
|
||||||
import { compose, StateViewMap } from "../utils/index.js";
|
import { compose, StateViewMap } from "../utils/index.js";
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
||||||
import { useBackendContext } from "../../context/backend.js";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
// import { ReadyView } from "./views.js";
|
// import { ReadyView } from "./views.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -24,7 +24,7 @@ import {
|
|||||||
WarningBox,
|
WarningBox,
|
||||||
WarningText,
|
WarningText,
|
||||||
} from "../../components/styled/index.js";
|
} from "../../components/styled/index.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Button } from "../../mui/Button.js";
|
import { Button } from "../../mui/Button.js";
|
||||||
import { State } from "./index.js";
|
import { State } from "./index.js";
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ import {
|
|||||||
ExtendedStatus,
|
ExtendedStatus,
|
||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Avatar } from "../mui/Avatar.js";
|
import { Avatar } from "../mui/Avatar.js";
|
||||||
import { Pages } from "../NavigationBar.js";
|
import { Pages } from "../NavigationBar.js";
|
||||||
import { assertUnreachable } from "../utils/index.js";
|
import { assertUnreachable } from "../utils/index.js";
|
||||||
|
@ -25,7 +25,7 @@ import { useContext, useState } from "preact/hooks";
|
|||||||
import { HookError } from "../hooks/useAsyncAsHook.js";
|
import { HookError } from "../hooks/useAsyncAsHook.js";
|
||||||
import { SafeHandler, withSafe } from "../mui/handlers.js";
|
import { SafeHandler, withSafe } from "../mui/handlers.js";
|
||||||
import { BackgroundError } from "../wxApi.js";
|
import { BackgroundError } from "../wxApi.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
|
|
||||||
export type AlertType = "info" | "warning" | "error" | "success";
|
export type AlertType = "info" | "warning" | "error" | "success";
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ import { Amounts } from "@gnu-taler/taler-util";
|
|||||||
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
||||||
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
||||||
import { useBackendContext } from "../../context/backend.js";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
||||||
import { Props, State } from "./index.js";
|
import { Props, State } from "./index.js";
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Amounts } from "@gnu-taler/taler-util";
|
import { Amounts } from "@gnu-taler/taler-util";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { ReadyView } from "./views.js";
|
import { ReadyView } from "./views.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -23,7 +23,7 @@ import { Amounts } from "@gnu-taler/taler-util";
|
|||||||
import { expect } from "chai";
|
import { expect } from "chai";
|
||||||
import { createWalletApiMock } from "../../test-utils.js";
|
import { createWalletApiMock } from "../../test-utils.js";
|
||||||
import { useComponentState } from "./state.js";
|
import { useComponentState } from "./state.js";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { Props } from "./index.js";
|
import { Props } from "./index.js";
|
||||||
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import { Amount } from "../../components/Amount.js";
|
|||||||
import { LogoHeader } from "../../components/LogoHeader.js";
|
import { LogoHeader } from "../../components/LogoHeader.js";
|
||||||
import { Part } from "../../components/Part.js";
|
import { Part } from "../../components/Part.js";
|
||||||
import { SubTitle, WalletAction } from "../../components/styled/index.js";
|
import { SubTitle, WalletAction } from "../../components/styled/index.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Button } from "../../mui/Button.js";
|
import { Button } from "../../mui/Button.js";
|
||||||
import { State } from "./index.js";
|
import { State } from "./index.js";
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ import { isFuture, parse } from "date-fns";
|
|||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
||||||
import { useBackendContext } from "../../context/backend.js";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
||||||
import { useSelectedExchange } from "../../hooks/useSelectedExchange.js";
|
import { useSelectedExchange } from "../../hooks/useSelectedExchange.js";
|
||||||
import { RecursiveState } from "../../utils/index.js";
|
import { RecursiveState } from "../../utils/index.js";
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { nullFunction } from "../../mui/handlers.js";
|
import { nullFunction } from "../../mui/handlers.js";
|
||||||
import { ReadyView } from "./views.js";
|
import { ReadyView } from "./views.js";
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ import {
|
|||||||
SvgIcon,
|
SvgIcon,
|
||||||
WalletAction,
|
WalletAction,
|
||||||
} from "../../components/styled/index.js";
|
} from "../../components/styled/index.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Button } from "../../mui/Button.js";
|
import { Button } from "../../mui/Button.js";
|
||||||
import { TextField } from "../../mui/TextField.js";
|
import { TextField } from "../../mui/TextField.js";
|
||||||
import editIcon from "../../svg/edit_24px.svg";
|
import editIcon from "../../svg/edit_24px.svg";
|
||||||
|
@ -26,7 +26,7 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
|||||||
import { useEffect } from "preact/hooks";
|
import { useEffect } from "preact/hooks";
|
||||||
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
||||||
import { useBackendContext } from "../../context/backend.js";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
||||||
import { Props, State } from "./index.js";
|
import { Props, State } from "./index.js";
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { PreparePayResult, PreparePayResultType } from "@gnu-taler/taler-util";
|
import { PreparePayResult, PreparePayResultType } from "@gnu-taler/taler-util";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { ReadyView } from "./views.js";
|
import { ReadyView } from "./views.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -21,7 +21,7 @@ import { Part } from "../../components/Part.js";
|
|||||||
import { PaymentButtons } from "../../components/PaymentButtons.js";
|
import { PaymentButtons } from "../../components/PaymentButtons.js";
|
||||||
import { SubTitle, WalletAction } from "../../components/styled/index.js";
|
import { SubTitle, WalletAction } from "../../components/styled/index.js";
|
||||||
import { Time } from "../../components/Time.js";
|
import { Time } from "../../components/Time.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { getAmountWithFee, InvoiceDetails } from "../../wallet/Transaction.js";
|
import { getAmountWithFee, InvoiceDetails } from "../../wallet/Transaction.js";
|
||||||
import { State } from "./index.js";
|
import { State } from "./index.js";
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
|||||||
import { useEffect } from "preact/hooks";
|
import { useEffect } from "preact/hooks";
|
||||||
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
||||||
import { useBackendContext } from "../../context/backend.js";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
||||||
import { ButtonHandler } from "../../mui/handlers.js";
|
import { ButtonHandler } from "../../mui/handlers.js";
|
||||||
import { Props, State } from "./index.js";
|
import { Props, State } from "./index.js";
|
||||||
|
@ -24,7 +24,7 @@ import {
|
|||||||
MerchantContractTerms as ContractTerms,
|
MerchantContractTerms as ContractTerms,
|
||||||
PreparePayResultType,
|
PreparePayResultType,
|
||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import beer from "../../../static-dev/beer.png";
|
import beer from "../../../static-dev/beer.png";
|
||||||
import merchantIcon from "../../../static-dev/merchant-icon.jpeg";
|
import merchantIcon from "../../../static-dev/merchant-icon.jpeg";
|
||||||
import { nullFunction } from "../../mui/handlers.js";
|
import { nullFunction } from "../../mui/handlers.js";
|
||||||
|
@ -31,7 +31,7 @@ import {
|
|||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
||||||
import { expect } from "chai";
|
import { expect } from "chai";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { ErrorAlert, useAlertContext } from "../../context/alert.js";
|
import { ErrorAlert, useAlertContext } from "../../context/alert.js";
|
||||||
import { nullFunction } from "../../mui/handlers.js";
|
import { nullFunction } from "../../mui/handlers.js";
|
||||||
import { createWalletApiMock } from "../../test-utils.js";
|
import { createWalletApiMock } from "../../test-utils.js";
|
||||||
|
@ -26,7 +26,7 @@ import { Part } from "../../components/Part.js";
|
|||||||
import { PaymentButtons } from "../../components/PaymentButtons.js";
|
import { PaymentButtons } from "../../components/PaymentButtons.js";
|
||||||
import { SuccessBox, WarningBox } from "../../components/styled/index.js";
|
import { SuccessBox, WarningBox } from "../../components/styled/index.js";
|
||||||
import { Time } from "../../components/Time.js";
|
import { Time } from "../../components/Time.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import {
|
import {
|
||||||
getAmountWithFee,
|
getAmountWithFee,
|
||||||
MerchantDetails,
|
MerchantDetails,
|
||||||
|
@ -19,7 +19,7 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
|||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
||||||
import { useBackendContext } from "../../context/backend.js";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
||||||
import { AmountFieldHandler, TextFieldHandler } from "../../mui/handlers.js";
|
import { AmountFieldHandler, TextFieldHandler } from "../../mui/handlers.js";
|
||||||
import { Props, State } from "./index.js";
|
import { Props, State } from "./index.js";
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { ReadyView } from "./views.js";
|
import { ReadyView } from "./views.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { expect } from "chai";
|
import { expect } from "chai";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { nullFunction } from "../../mui/handlers.js";
|
import { nullFunction } from "../../mui/handlers.js";
|
||||||
import { createWalletApiMock } from "../../test-utils.js";
|
import { createWalletApiMock } from "../../test-utils.js";
|
||||||
import { useComponentState } from "./state.js";
|
import { useComponentState } from "./state.js";
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { AmountField } from "../../components/AmountField.js";
|
import { AmountField } from "../../components/AmountField.js";
|
||||||
import { Part } from "../../components/Part.js";
|
import { Part } from "../../components/Part.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Button } from "../../mui/Button.js";
|
import { Button } from "../../mui/Button.js";
|
||||||
import { TextField } from "../../mui/TextField.js";
|
import { TextField } from "../../mui/TextField.js";
|
||||||
import { State } from "./index.js";
|
import { State } from "./index.js";
|
||||||
|
@ -18,7 +18,7 @@ import { parseRestoreUri } from "@gnu-taler/taler-util";
|
|||||||
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
||||||
import { useAlertContext } from "../../context/alert.js";
|
import { useAlertContext } from "../../context/alert.js";
|
||||||
import { useBackendContext } from "../../context/backend.js";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Props, State } from "./index.js";
|
import { Props, State } from "./index.js";
|
||||||
|
|
||||||
export function useComponentState({
|
export function useComponentState({
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Amounts } from "@gnu-taler/taler-util";
|
import { Amounts } from "@gnu-taler/taler-util";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { ReadyView } from "./views.js";
|
import { ReadyView } from "./views.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { LogoHeader } from "../../components/LogoHeader.js";
|
import { LogoHeader } from "../../components/LogoHeader.js";
|
||||||
import { SubTitle, WalletAction } from "../../components/styled/index.js";
|
import { SubTitle, WalletAction } from "../../components/styled/index.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Button } from "../../mui/Button.js";
|
import { Button } from "../../mui/Button.js";
|
||||||
import { State } from "./index.js";
|
import { State } from "./index.js";
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
|||||||
import { useEffect, useState } from "preact/hooks";
|
import { useEffect, useState } from "preact/hooks";
|
||||||
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
||||||
import { useBackendContext } from "../../context/backend.js";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
||||||
import { Props, State } from "./index.js";
|
import { Props, State } from "./index.js";
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
import { Amounts } from "@gnu-taler/taler-util";
|
import { Amounts } from "@gnu-taler/taler-util";
|
||||||
import beer from "../../../static-dev/beer.png";
|
import beer from "../../../static-dev/beer.png";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { IgnoredView, InProgressView, ReadyView } from "./views.js";
|
import { IgnoredView, InProgressView, ReadyView } from "./views.js";
|
||||||
export default {
|
export default {
|
||||||
title: "refund",
|
title: "refund",
|
||||||
|
@ -26,7 +26,7 @@ import {
|
|||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
||||||
import { expect } from "chai";
|
import { expect } from "chai";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { nullFunction } from "../../mui/handlers.js";
|
import { nullFunction } from "../../mui/handlers.js";
|
||||||
import { createWalletApiMock } from "../../test-utils.js";
|
import { createWalletApiMock } from "../../test-utils.js";
|
||||||
import { useComponentState } from "./state.js";
|
import { useComponentState } from "./state.js";
|
||||||
|
@ -21,7 +21,7 @@ import { LogoHeader } from "../../components/LogoHeader.js";
|
|||||||
import { Part } from "../../components/Part.js";
|
import { Part } from "../../components/Part.js";
|
||||||
import { ProductList } from "../../components/ProductList.js";
|
import { ProductList } from "../../components/ProductList.js";
|
||||||
import { Link, SubTitle, WalletAction } from "../../components/styled/index.js";
|
import { Link, SubTitle, WalletAction } from "../../components/styled/index.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Button } from "../../mui/Button.js";
|
import { Button } from "../../mui/Button.js";
|
||||||
import { State } from "./index.js";
|
import { State } from "./index.js";
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ import { Amounts } from "@gnu-taler/taler-util";
|
|||||||
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
||||||
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
||||||
import { useBackendContext } from "../../context/backend.js";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
||||||
import { Props, State } from "./index.js";
|
import { Props, State } from "./index.js";
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Amounts } from "@gnu-taler/taler-util";
|
import { Amounts } from "@gnu-taler/taler-util";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { AcceptedView, ReadyView } from "./views.js";
|
import { AcceptedView, ReadyView } from "./views.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
import { Amounts } from "@gnu-taler/taler-util";
|
import { Amounts } from "@gnu-taler/taler-util";
|
||||||
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
||||||
import { expect } from "chai";
|
import { expect } from "chai";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { nullFunction } from "../../mui/handlers.js";
|
import { nullFunction } from "../../mui/handlers.js";
|
||||||
import { createWalletApiMock } from "../../test-utils.js";
|
import { createWalletApiMock } from "../../test-utils.js";
|
||||||
import { Props } from "./index.js";
|
import { Props } from "./index.js";
|
||||||
|
@ -20,7 +20,7 @@ import { Amount } from "../../components/Amount.js";
|
|||||||
import { LogoHeader } from "../../components/LogoHeader.js";
|
import { LogoHeader } from "../../components/LogoHeader.js";
|
||||||
import { Part } from "../../components/Part.js";
|
import { Part } from "../../components/Part.js";
|
||||||
import { Link, SubTitle, WalletAction } from "../../components/styled/index.js";
|
import { Link, SubTitle, WalletAction } from "../../components/styled/index.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Button } from "../../mui/Button.js";
|
import { Button } from "../../mui/Button.js";
|
||||||
import { State } from "./index.js";
|
import { State } from "./index.js";
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import { isFuture, parse } from "date-fns";
|
|||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
||||||
import { useBackendContext } from "../../context/backend.js";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
||||||
import { Props, State } from "./index.js";
|
import { Props, State } from "./index.js";
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { nullFunction } from "../../mui/handlers.js";
|
import { nullFunction } from "../../mui/handlers.js";
|
||||||
import { ReadyView } from "./views.js";
|
import { ReadyView } from "./views.js";
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ import { ErrorTalerOperation } from "../../components/ErrorTalerOperation.js";
|
|||||||
import { LogoHeader } from "../../components/LogoHeader.js";
|
import { LogoHeader } from "../../components/LogoHeader.js";
|
||||||
import { Part } from "../../components/Part.js";
|
import { Part } from "../../components/Part.js";
|
||||||
import { Link, SubTitle, WalletAction } from "../../components/styled/index.js";
|
import { Link, SubTitle, WalletAction } from "../../components/styled/index.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Button } from "../../mui/Button.js";
|
import { Button } from "../../mui/Button.js";
|
||||||
import { TextField } from "../../mui/TextField.js";
|
import { TextField } from "../../mui/TextField.js";
|
||||||
import { getAmountWithFee, TransferDetails } from "../../wallet/Transaction.js";
|
import { getAmountWithFee, TransferDetails } from "../../wallet/Transaction.js";
|
||||||
|
@ -22,7 +22,7 @@ import {
|
|||||||
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
||||||
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
||||||
import { useBackendContext } from "../../context/backend.js";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
||||||
import { Props, State } from "./index.js";
|
import { Props, State } from "./index.js";
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { ReadyView } from "./views.js";
|
import { ReadyView } from "./views.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -21,7 +21,7 @@ import { LogoHeader } from "../../components/LogoHeader.js";
|
|||||||
import { Part } from "../../components/Part.js";
|
import { Part } from "../../components/Part.js";
|
||||||
import { Link, SubTitle, WalletAction } from "../../components/styled/index.js";
|
import { Link, SubTitle, WalletAction } from "../../components/styled/index.js";
|
||||||
import { Time } from "../../components/Time.js";
|
import { Time } from "../../components/Time.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Button } from "../../mui/Button.js";
|
import { Button } from "../../mui/Button.js";
|
||||||
import { getAmountWithFee, TransferDetails } from "../../wallet/Transaction.js";
|
import { getAmountWithFee, TransferDetails } from "../../wallet/Transaction.js";
|
||||||
import { State } from "./index.js";
|
import { State } from "./index.js";
|
||||||
|
@ -26,7 +26,7 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
|||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
||||||
import { useBackendContext } from "../../context/backend.js";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
||||||
import { useSelectedExchange } from "../../hooks/useSelectedExchange.js";
|
import { useSelectedExchange } from "../../hooks/useSelectedExchange.js";
|
||||||
import { RecursiveState } from "../../utils/index.js";
|
import { RecursiveState } from "../../utils/index.js";
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { ExchangeListItem } from "@gnu-taler/taler-util";
|
import { ExchangeListItem } from "@gnu-taler/taler-util";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { nullFunction } from "../../mui/handlers.js";
|
import { nullFunction } from "../../mui/handlers.js";
|
||||||
// import { TermsState } from "../../utils/index.js";
|
// import { TermsState } from "../../utils/index.js";
|
||||||
import { SuccessView } from "./views.js";
|
import { SuccessView } from "./views.js";
|
||||||
|
@ -27,7 +27,7 @@ import {
|
|||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
||||||
import { expect } from "chai";
|
import { expect } from "chai";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { createWalletApiMock } from "../../test-utils.js";
|
import { createWalletApiMock } from "../../test-utils.js";
|
||||||
import { useComponentStateFromURI } from "./state.js";
|
import { useComponentStateFromURI } from "./state.js";
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ import { QR } from "../../components/QR.js";
|
|||||||
import { SelectList } from "../../components/SelectList.js";
|
import { SelectList } from "../../components/SelectList.js";
|
||||||
import { Input, LinkSuccess, SvgIcon } from "../../components/styled/index.js";
|
import { Input, LinkSuccess, SvgIcon } from "../../components/styled/index.js";
|
||||||
import { TermsOfService } from "../../components/TermsOfService/index.js";
|
import { TermsOfService } from "../../components/TermsOfService/index.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Button } from "../../mui/Button.js";
|
import { Button } from "../../mui/Button.js";
|
||||||
import editIcon from "../../svg/edit_24px.svg";
|
import editIcon from "../../svg/edit_24px.svg";
|
||||||
import {
|
import {
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useLocalStorage } from "@gnu-taler/web-util/lib/index.browser";
|
import { useLocalStorage } from "@gnu-taler/web-util/browser";
|
||||||
import { Settings, defaultSettings } from "../platform/api.js";
|
import { Settings, defaultSettings } from "../platform/api.js";
|
||||||
|
|
||||||
function parse_json_or_undefined<T>(str: string | undefined): T | undefined {
|
function parse_json_or_undefined<T>(str: string | undefined): T | undefined {
|
||||||
|
@ -17,7 +17,7 @@ import { expect } from "chai";
|
|||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { IoCProviderForTesting } from "../context/iocContext.js";
|
import { IoCProviderForTesting } from "../context/iocContext.js";
|
||||||
import { useTalerActionURL } from "./useTalerActionURL.js";
|
import { useTalerActionURL } from "./useTalerActionURL.js";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
|
|
||||||
describe("useTalerActionURL hook", () => {
|
describe("useTalerActionURL hook", () => {
|
||||||
it("should be set url to undefined when dismiss", async () => {
|
it("should be set url to undefined when dismiss", async () => {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
import { css } from "@linaria/core";
|
import { css } from "@linaria/core";
|
||||||
import { ComponentChildren, h, VNode } from "preact";
|
import { ComponentChildren, h, VNode } from "preact";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line import/extensions
|
||||||
import { theme } from "./style.js";
|
import { theme } from "./style.js";
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
import {
|
import {
|
||||||
TranslationProvider,
|
TranslationProvider,
|
||||||
useTranslationContext,
|
useTranslationContext,
|
||||||
} from "@gnu-taler/web-util/lib/index.browser";
|
} from "@gnu-taler/web-util/browser";
|
||||||
import { createHashHistory } from "history";
|
import { createHashHistory } from "history";
|
||||||
import { ComponentChildren, Fragment, h, VNode } from "preact";
|
import { ComponentChildren, Fragment, h, VNode } from "preact";
|
||||||
import { route, Route, Router } from "preact-router";
|
import { route, Route, Router } from "preact-router";
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { ScopeType } from "@gnu-taler/taler-util";
|
import { ScopeType } from "@gnu-taler/taler-util";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { BalanceView as TestedComponent } from "./BalancePage.js";
|
import { BalanceView as TestedComponent } from "./BalancePage.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -28,7 +28,7 @@ import {
|
|||||||
useAlertContext,
|
useAlertContext,
|
||||||
} from "../context/alert.js";
|
} from "../context/alert.js";
|
||||||
import { useBackendContext } from "../context/backend.js";
|
import { useBackendContext } from "../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
|
||||||
import { Button } from "../mui/Button.js";
|
import { Button } from "../mui/Button.js";
|
||||||
import { ButtonHandler } from "../mui/handlers.js";
|
import { ButtonHandler } from "../mui/handlers.js";
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
import { css } from "@linaria/core";
|
import { css } from "@linaria/core";
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Alert } from "../mui/Alert.js";
|
import { Alert } from "../mui/Alert.js";
|
||||||
import { Button } from "../mui/Button.js";
|
import { Button } from "../mui/Button.js";
|
||||||
import { ButtonHandler } from "../mui/handlers.js";
|
import { ButtonHandler } from "../mui/handlers.js";
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { TalerActionFound as TestedComponent } from "./TalerActionFound.js";
|
import { TalerActionFound as TestedComponent } from "./TalerActionFound.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { parseTalerUri, TalerUri, TalerUriAction } from "@gnu-taler/taler-util";
|
import { parseTalerUri, TalerUri, TalerUriAction } from "@gnu-taler/taler-util";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { Title } from "../components/styled/index.js";
|
import { Title } from "../components/styled/index.js";
|
||||||
import { Button } from "../mui/Button.js";
|
import { Button } from "../mui/Button.js";
|
||||||
|
@ -19,7 +19,8 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
import { setupI18n } from "@gnu-taler/taler-util";
|
import { setupI18n } from "@gnu-taler/taler-util";
|
||||||
import { parseGroupImport, tests } from "@gnu-taler/web-util/lib/index.browser";
|
import { parseGroupImport } from "@gnu-taler/web-util/browser";
|
||||||
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import chromeAPI from "./platform/chrome.js";
|
import chromeAPI from "./platform/chrome.js";
|
||||||
import { setupPlatform } from "./platform/foreground.js";
|
import { setupPlatform } from "./platform/foreground.js";
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ import * as mui from "./mui/index.stories.js";
|
|||||||
import * as popup from "./popup/index.stories.js";
|
import * as popup from "./popup/index.stories.js";
|
||||||
import * as wallet from "./wallet/index.stories.js";
|
import * as wallet from "./wallet/index.stories.js";
|
||||||
|
|
||||||
import { renderStories } from "@gnu-taler/web-util/lib/index.browser";
|
import { renderStories } from "@gnu-taler/web-util/browser";
|
||||||
import { AlertProvider } from "./context/alert.js";
|
import { AlertProvider } from "./context/alert.js";
|
||||||
|
|
||||||
function main(): void {
|
function main(): void {
|
||||||
|
@ -21,7 +21,7 @@ import {
|
|||||||
WalletCoreRequestType,
|
WalletCoreRequestType,
|
||||||
WalletCoreResponseType,
|
WalletCoreResponseType,
|
||||||
} from "@gnu-taler/taler-wallet-core";
|
} from "@gnu-taler/taler-wallet-core";
|
||||||
import { TranslationProvider } from "@gnu-taler/web-util/lib/index.browser";
|
import { TranslationProvider } from "@gnu-taler/web-util/browser";
|
||||||
import {
|
import {
|
||||||
ComponentChildren,
|
ComponentChildren,
|
||||||
FunctionalComponent,
|
FunctionalComponent,
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { ConfirmProviderView, SelectProviderView } from "./views.js";
|
import { ConfirmProviderView, SelectProviderView } from "./views.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { expect } from "chai";
|
import { expect } from "chai";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { nullFunction } from "../../mui/handlers.js";
|
import { nullFunction } from "../../mui/handlers.js";
|
||||||
import { createWalletApiMock } from "../../test-utils.js";
|
import { createWalletApiMock } from "../../test-utils.js";
|
||||||
import { Props } from "./index.js";
|
import { Props } from "./index.js";
|
||||||
|
@ -23,7 +23,7 @@ import {
|
|||||||
SubTitle,
|
SubTitle,
|
||||||
Title,
|
Title,
|
||||||
} from "../../components/styled/index.js";
|
} from "../../components/styled/index.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Button } from "../../mui/Button.js";
|
import { Button } from "../../mui/Button.js";
|
||||||
import { TextField } from "../../mui/TextField.js";
|
import { TextField } from "../../mui/TextField.js";
|
||||||
import { State } from "./index.js";
|
import { State } from "./index.js";
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { AddNewActionView as TestedComponent } from "./AddNewActionView.js";
|
import { AddNewActionView as TestedComponent } from "./AddNewActionView.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
import { parseTalerUri, TalerUriAction } from "@gnu-taler/taler-util";
|
import { parseTalerUri, TalerUriAction } from "@gnu-taler/taler-util";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { InputWithLabel } from "../components/styled/index.js";
|
import { InputWithLabel } from "../components/styled/index.js";
|
||||||
|
@ -24,7 +24,7 @@ import { TalerUri, TranslatedString } from "@gnu-taler/taler-util";
|
|||||||
import {
|
import {
|
||||||
TranslationProvider,
|
TranslationProvider,
|
||||||
useTranslationContext,
|
useTranslationContext,
|
||||||
} from "@gnu-taler/web-util/lib/index.browser";
|
} from "@gnu-taler/web-util/browser";
|
||||||
import { createHashHistory } from "history";
|
import { createHashHistory } from "history";
|
||||||
import { ComponentChildren, Fragment, VNode, h } from "preact";
|
import { ComponentChildren, Fragment, VNode, h } from "preact";
|
||||||
import { Route, Router, route } from "preact-router";
|
import { Route, Router, route } from "preact-router";
|
||||||
|
@ -25,7 +25,7 @@ import {
|
|||||||
BackupView as TestedComponent,
|
BackupView as TestedComponent,
|
||||||
ShowRecoveryInfo,
|
ShowRecoveryInfo,
|
||||||
} from "./BackupPage.js";
|
} from "./BackupPage.js";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { TalerProtocolTimestamp } from "@gnu-taler/taler-util";
|
import { TalerProtocolTimestamp } from "@gnu-taler/taler-util";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -48,7 +48,7 @@ import {
|
|||||||
} from "../components/styled/index.js";
|
} from "../components/styled/index.js";
|
||||||
import { alertFromError } from "../context/alert.js";
|
import { alertFromError } from "../context/alert.js";
|
||||||
import { useBackendContext } from "../context/backend.js";
|
import { useBackendContext } from "../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
|
||||||
import { Button } from "../mui/Button.js";
|
import { Button } from "../mui/Button.js";
|
||||||
import { Pages } from "../NavigationBar.js";
|
import { Pages } from "../NavigationBar.js";
|
||||||
|
@ -27,7 +27,7 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
|||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
||||||
import { useBackendContext } from "../../context/backend.js";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
||||||
import { RecursiveState } from "../../utils/index.js";
|
import { RecursiveState } from "../../utils/index.js";
|
||||||
import { Props, State } from "./index.js";
|
import { Props, State } from "./index.js";
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Amounts } from "@gnu-taler/taler-util";
|
import { Amounts } from "@gnu-taler/taler-util";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { nullFunction } from "../../mui/handlers.js";
|
import { nullFunction } from "../../mui/handlers.js";
|
||||||
import { ReadyView } from "./views.js";
|
import { ReadyView } from "./views.js";
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ import {
|
|||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
||||||
import { expect } from "chai";
|
import { expect } from "chai";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { nullFunction } from "../../mui/handlers.js";
|
import { nullFunction } from "../../mui/handlers.js";
|
||||||
import { createWalletApiMock } from "../../test-utils.js";
|
import { createWalletApiMock } from "../../test-utils.js";
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import { AmountField } from "../../components/AmountField.js";
|
|||||||
import { ErrorMessage } from "../../components/ErrorMessage.js";
|
import { ErrorMessage } from "../../components/ErrorMessage.js";
|
||||||
import { SelectList } from "../../components/SelectList.js";
|
import { SelectList } from "../../components/SelectList.js";
|
||||||
import { Input, SubTitle, WarningBox } from "../../components/styled/index.js";
|
import { Input, SubTitle, WarningBox } from "../../components/styled/index.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Button } from "../../mui/Button.js";
|
import { Button } from "../../mui/Button.js";
|
||||||
import { Grid } from "../../mui/Grid.js";
|
import { Grid } from "../../mui/Grid.js";
|
||||||
import { State } from "./index.js";
|
import { State } from "./index.js";
|
||||||
|
@ -19,7 +19,7 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
|||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
||||||
import { useBackendContext } from "../../context/backend.js";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
||||||
import { assertUnreachable, RecursiveState } from "../../utils/index.js";
|
import { assertUnreachable, RecursiveState } from "../../utils/index.js";
|
||||||
import { Contact, Props, State } from "./index.js";
|
import { Contact, Props, State } from "./index.js";
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { ReadyView, SelectCurrencyView } from "./views.js";
|
import { ReadyView, SelectCurrencyView } from "./views.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -27,7 +27,7 @@ import {
|
|||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
||||||
import { expect } from "chai";
|
import { expect } from "chai";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { nullFunction } from "../../mui/handlers.js";
|
import { nullFunction } from "../../mui/handlers.js";
|
||||||
import { createWalletApiMock } from "../../test-utils.js";
|
import { createWalletApiMock } from "../../test-utils.js";
|
||||||
import { useComponentState } from "./state.js";
|
import { useComponentState } from "./state.js";
|
||||||
|
@ -25,7 +25,7 @@ import {
|
|||||||
LinkPrimary,
|
LinkPrimary,
|
||||||
SvgIcon,
|
SvgIcon,
|
||||||
} from "../../components/styled/index.js";
|
} from "../../components/styled/index.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Button } from "../../mui/Button.js";
|
import { Button } from "../../mui/Button.js";
|
||||||
import { Grid } from "../../mui/Grid.js";
|
import { Grid } from "../../mui/Grid.js";
|
||||||
import { Paper } from "../../mui/Paper.js";
|
import { Paper } from "../../mui/Paper.js";
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { PendingTaskType } from "@gnu-taler/taler-wallet-core";
|
import { PendingTaskType } from "@gnu-taler/taler-wallet-core";
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { View as TestedComponent } from "./DeveloperPage.js";
|
import { View as TestedComponent } from "./DeveloperPage.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -34,7 +34,7 @@ import { SelectList } from "../components/SelectList.js";
|
|||||||
import { NotifyUpdateFadeOut } from "../components/styled/index.js";
|
import { NotifyUpdateFadeOut } from "../components/styled/index.js";
|
||||||
import { Time } from "../components/Time.js";
|
import { Time } from "../components/Time.js";
|
||||||
import { useBackendContext } from "../context/backend.js";
|
import { useBackendContext } from "../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
|
||||||
import { useDiagnostics } from "../hooks/useDiagnostics.js";
|
import { useDiagnostics } from "../hooks/useDiagnostics.js";
|
||||||
import { Button } from "../mui/Button.js";
|
import { Button } from "../mui/Button.js";
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { ReadyView } from "./views.js";
|
import { ReadyView } from "./views.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { State } from "./index.js";
|
import { State } from "./index.js";
|
||||||
|
|
||||||
export function ReadyView({ error }: State.Ready): VNode {
|
export function ReadyView({ error }: State.Ready): VNode {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { ExchangeAddConfirmPage as TestedComponent } from "./ExchangeAddConfirm.js";
|
import { ExchangeAddConfirmPage as TestedComponent } from "./ExchangeAddConfirm.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -17,7 +17,7 @@ import { Fragment, h, VNode } from "preact";
|
|||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { Title } from "../components/styled/index.js";
|
import { Title } from "../components/styled/index.js";
|
||||||
import { TermsOfService } from "../components/TermsOfService/index.js";
|
import { TermsOfService } from "../components/TermsOfService/index.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { Button } from "../mui/Button.js";
|
import { Button } from "../mui/Button.js";
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { tests } from "@gnu-taler/web-util/lib/index.browser";
|
import * as tests from "@gnu-taler/web-util/testing";
|
||||||
import { queryToSlashKeys } from "../utils/index.js";
|
import { queryToSlashKeys } from "../utils/index.js";
|
||||||
import { ExchangeSetUrlPage as TestedComponent } from "./ExchangeSetUrl.js";
|
import { ExchangeSetUrlPage as TestedComponent } from "./ExchangeSetUrl.js";
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ import {
|
|||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
||||||
import { useBackendContext } from "../../context/backend.js";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
|
import { useTranslationContext } from "@gnu-taler/web-util/browser";
|
||||||
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
||||||
import { Props, State } from "./index.js";
|
import { Props, State } from "./index.js";
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user