[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated (a5b5d3ec8 -> 86e1cb5b0)
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated (a5b5d3ec8 -> 86e1cb5b0) |
Date: |
Mon, 23 Jan 2023 15:26:01 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a change to branch master
in repository wallet-core.
from a5b5d3ec8 update lock
new d195a9ddc fix name
new 86e1cb5b0 fix deleted tip name and format name as merchant backend
expected
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
packages/merchant-backend-ui/README.md | 2 +-
packages/merchant-backend-ui/package.json | 1 +
packages/merchant-backend-ui/render-examples.ts | 8 +++-
packages/merchant-backend-ui/rollup.config.js | 10 ++++-
packages/merchant-backend-ui/src/index.tsx | 44 +++++++++-------------
.../src/pages/DeletedTip.stories.tsx} | 11 ++----
.../src/pages/{DepletedTip.tsx => DeletedTip.tsx} | 6 +--
.../src/pages/DepletedTip.stories.tsx | 40 --------------------
pnpm-lock.yaml | 7 +++-
9 files changed, 45 insertions(+), 84 deletions(-)
copy
packages/{merchant-backoffice-ui/src/paths/instance/products/create/Create.stories.tsx
=> merchant-backend-ui/src/pages/DeletedTip.stories.tsx} (82%)
rename packages/merchant-backend-ui/src/pages/{DepletedTip.tsx =>
DeletedTip.tsx} (92%)
delete mode 100644
packages/merchant-backend-ui/src/pages/DepletedTip.stories.tsx
diff --git a/packages/merchant-backend-ui/README.md
b/packages/merchant-backend-ui/README.md
index 44a555ae0..34cf3210a 100644
--- a/packages/merchant-backend-ui/README.md
+++ b/packages/merchant-backend-ui/README.md
@@ -4,7 +4,7 @@ Merchant Backend pages
This project generate 5 templates for the merchant backend:
- * DepletedTip
+ * DeletedTip
* OfferRefund
* OfferTip
* RequestPayment
diff --git a/packages/merchant-backend-ui/package.json
b/packages/merchant-backend-ui/package.json
index b4a886f7b..4789b96e9 100644
--- a/packages/merchant-backend-ui/package.json
+++ b/packages/merchant-backend-ui/package.json
@@ -86,6 +86,7 @@
"rollup-plugin-css-only": "^3.1.0",
"script-ext-html-webpack-plugin": "^2.1.5",
"sirv-cli": "^1.0.11",
+ "tslib": "2.4.0",
"typescript": "4.8.4"
}
}
diff --git a/packages/merchant-backend-ui/render-examples.ts
b/packages/merchant-backend-ui/render-examples.ts
index 47300ab8f..86e18fa68 100644
--- a/packages/merchant-backend-ui/render-examples.ts
+++ b/packages/merchant-backend-ui/render-examples.ts
@@ -49,9 +49,13 @@ files.forEach(file => {
const html = fs.readFileSync(`${sourceDirectory}/${file}`, 'utf8')
const testName = file.replace('.html', '')
- if (testName !== 'ShowOrderDetails') return;
+ const exampleFileName = `./src/pages/${testName}.examples`
+ if (!fs.existsSync(exampleFileName + ".ts")) {
+ console.log(`skipping ${testName}: no examples found`);
+ return;
+ }
// eslint-disable-next-line @typescript-eslint/no-var-requires
- const { exampleData } = require(`./src/pages/${testName}.examples`)
+ const { exampleData } = require(exampleFileName)
Object.keys(exampleData).forEach(exampleName => {
const example = exampleData[exampleName]
diff --git a/packages/merchant-backend-ui/rollup.config.js
b/packages/merchant-backend-ui/rollup.config.js
index 7707c13a0..5f22cc654 100644
--- a/packages/merchant-backend-ui/rollup.config.js
+++ b/packages/merchant-backend-ui/rollup.config.js
@@ -89,6 +89,12 @@ const makePlugins = (name) => [
html({ template, fileName: name }),
];
+function formatHtmlName(name) {
+ return name
+ .replace(/^[A-Z]/, letter => `${letter.toLowerCase()}`) //first letter
lowercase
+ .replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`) //snake case
+ .concat(".en.html"); //extension
+}
const pageDefinition = (name) => ({
input: `src/pages/${name}.tsx`,
@@ -98,13 +104,13 @@ const pageDefinition = (name) => ({
exports: 'named',
name: 'page',
},
- plugins: makePlugins(`${name}.html`),
+ plugins: makePlugins(formatHtmlName(name)),
});
export default [
pageDefinition("OfferTip"),
pageDefinition("OfferRefund"),
- pageDefinition("DepletedTip"),
+ pageDefinition("DeletedTip"),
pageDefinition("RequestPayment"),
pageDefinition("ShowOrderDetails"),
]
diff --git a/packages/merchant-backend-ui/src/index.tsx
b/packages/merchant-backend-ui/src/index.tsx
index 275f63371..4cfe8f7b4 100644
--- a/packages/merchant-backend-ui/src/index.tsx
+++ b/packages/merchant-backend-ui/src/index.tsx
@@ -15,22 +15,17 @@
*/
/**
-*
-* @author Sebastian Javier Marchano (sebasjm)
-*/
+ *
+ * @author Sebastian Javier Marchano (sebasjm)
+ */
-import { h, VNode, Fragment } from 'preact';
-import { BackendContextProvider } from './context/backend';
-import { TranslationProvider } from './context/translation';
+import { Fragment, h, VNode } from "preact";
+import { BackendContextProvider } from "./context/backend";
+import { TranslationProvider } from "./context/translation";
// import { Page as RequestPayment } from './RequestPayment';
-import "./css/pure-min.css"
-import { Route, Router } from 'preact-router';
-import { Footer } from './components/Footer';
-// import OfferTip from './pages/OfferTip';
-// import {OfferRefund} from './pages/OfferRefund';
-// import DepletedTip from './pages/DepletedTip';
-// import RequestPayment from './pages/RequestPayment';
-// import ShowOrderDetails from './pages/ShowOrderDetails';
+import { Route, Router } from "preact-router";
+import { Footer } from "./components/Footer";
+import "./css/pure-min.css";
export default function Application(): VNode {
return (
@@ -45,17 +40,12 @@ export default function Application(): VNode {
}
function ApplicationStatusRoutes(): VNode {
- return <Fragment>
- <Router>
- {/* <Route path="offer_tip" component={OfferTip} />
- <Route path="offer_refund" component={OfferRefund} />
- <Route path="depleted_tip" component={DepletedTip} />
- <Route path="request_payment" component={RequestPayment} />
- <Route path="show_order_details" component={ShowOrderDetails} /> */}
- <Route default component={() => <div>
- hello!
- </div>} />
- </Router>
- <Footer />
- </Fragment>
+ return (
+ <Fragment>
+ <Router>
+ <Route default component={() => <div>hello!</div>} />
+ </Router>
+ <Footer />
+ </Fragment>
+ );
}
diff --git
a/packages/merchant-backoffice-ui/src/paths/instance/products/create/Create.stories.tsx
b/packages/merchant-backend-ui/src/pages/DeletedTip.stories.tsx
similarity index 82%
copy from
packages/merchant-backoffice-ui/src/paths/instance/products/create/Create.stories.tsx
copy to packages/merchant-backend-ui/src/pages/DeletedTip.stories.tsx
index 2fc0819bb..a249c4074 100644
---
a/packages/merchant-backoffice-ui/src/paths/instance/products/create/Create.stories.tsx
+++ b/packages/merchant-backend-ui/src/pages/DeletedTip.stories.tsx
@@ -1,6 +1,6 @@
/*
This file is part of GNU Taler
- (C) 2021-2023 Taler Systems S.A.
+ (C) 2021 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
@@ -20,15 +20,12 @@
*/
import { h, VNode, FunctionalComponent } from "preact";
-import { CreatePage as TestedComponent } from "./CreatePage.js";
+import { DeletedTip as TestedComponent } from "./DeletedTip";
export default {
- title: "Pages/Product/Create",
+ title: "DeletedTip",
component: TestedComponent,
- argTypes: {
- onCreate: { action: "onCreate" },
- onBack: { action: "onBack" },
- },
+ argTypes: {},
};
function createExample<Props>(
diff --git a/packages/merchant-backend-ui/src/pages/DepletedTip.tsx
b/packages/merchant-backend-ui/src/pages/DeletedTip.tsx
similarity index 92%
rename from packages/merchant-backend-ui/src/pages/DepletedTip.tsx
rename to packages/merchant-backend-ui/src/pages/DeletedTip.tsx
index 61fc52cdf..10f3c6a17 100644
--- a/packages/merchant-backend-ui/src/pages/DepletedTip.tsx
+++ b/packages/merchant-backend-ui/src/pages/DeletedTip.tsx
@@ -29,7 +29,7 @@ function Head(): VNode {
return <title>Status of your tip</title>;
}
-export function DepletedTip(): VNode {
+export function DeletedTip(): VNode {
return (
<Page>
<section>
@@ -43,7 +43,7 @@ export function DepletedTip(): VNode {
export function mount(): void {
try {
- render(<DepletedTip />, document.body);
+ render(<DeletedTip />, document.body);
} catch (e) {
console.error("got error", e);
if (e instanceof Error) {
@@ -55,6 +55,6 @@ export function mount(): void {
export function buildTimeRendering(): { head: string; body: string } {
return {
head: renderToString(<Head />),
- body: renderToString(<DepletedTip />),
+ body: renderToString(<DeletedTip />),
};
}
diff --git a/packages/merchant-backend-ui/src/pages/DepletedTip.stories.tsx
b/packages/merchant-backend-ui/src/pages/DepletedTip.stories.tsx
deleted file mode 100644
index c20f6dc18..000000000
--- a/packages/merchant-backend-ui/src/pages/DepletedTip.stories.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- This file is part of GNU Taler
- (C) 2021 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/>
- */
-
-/**
-*
-* @author Sebastian Javier Marchano (sebasjm)
-*/
-
-import { h, VNode, FunctionalComponent } from 'preact';
-import { DepletedTip as TestedComponent } from './DepletedTip';
-
-
-export default {
- title: 'DepletedTip',
- component: TestedComponent,
- argTypes: {
- },
-};
-
-function createExample<Props>(Component: FunctionalComponent<Props>, props:
Partial<Props>) {
- const r = (args: any) => <Component {...args} />
- r.args = props
- return r
-}
-
-export const Example = createExample(TestedComponent, {
-});
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index eaa570b96..6d59121db 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -219,6 +219,7 @@ importers:
script-ext-html-webpack-plugin: ^2.1.5
sirv-cli: ^1.0.11
swr: ^0.5.5
+ tslib: 2.4.0
typescript: 4.8.4
yup: ^0.32.9
dependencies:
@@ -249,7 +250,7 @@ importers:
'@rollup/plugin-image': 2.1.1_rollup@2.79.1
'@rollup/plugin-json': 4.1.0_rollup@2.79.1
'@rollup/plugin-replace': 3.1.0_rollup@2.79.1
- '@rollup/plugin-typescript': 11.0.0_gypgyaqhine6mwjfvh7icfhviq
+ '@rollup/plugin-typescript': 11.0.0_hafrwlgfjmvsm7253l3bfjzhnq
'@types/history': 4.7.11
'@types/mocha': 8.2.3
'@types/mustache': 4.2.1
@@ -269,6 +270,7 @@ importers:
rollup-plugin-css-only: 3.1.0_rollup@2.79.1
script-ext-html-webpack-plugin: 2.1.5
sirv-cli: 1.0.14
+ tslib: 2.4.0
typescript: 4.8.4
packages/merchant-backoffice-ui:
@@ -3644,7 +3646,7 @@ packages:
rollup: 2.79.1
dev: true
- /@rollup/plugin-typescript/11.0.0_gypgyaqhine6mwjfvh7icfhviq:
+ /@rollup/plugin-typescript/11.0.0_hafrwlgfjmvsm7253l3bfjzhnq:
resolution: {integrity:
sha512-goPyCWBiimk1iJgSTgsehFD5OOFHiAknrRJjqFCudcW8JtWiBlK284Xnn4flqMqg6YAjVG/EE+3aVzrL5qNSzQ==}
engines: {node: '>=14.0.0'}
peerDependencies:
@@ -3660,6 +3662,7 @@ packages:
'@rollup/pluginutils': 5.0.2_rollup@2.79.1
resolve: 1.22.1
rollup: 2.79.1
+ tslib: 2.4.0
typescript: 4.8.4
dev: true
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-wallet-core] branch master updated (a5b5d3ec8 -> 86e1cb5b0),
gnunet <=