@everymatrix/cashier-method-details 1.22.10
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +30 -0
- package/dist/cashier-method-details.js +661 -0
- package/dist/cashier-method-details.js.map +1 -0
- package/index.html +36 -0
- package/index.js +1 -0
- package/package.json +39 -0
- package/public/favicon.png +0 -0
- package/public/reset.css +48 -0
- package/rollup.config.js +59 -0
- package/src/CashierMethodDetails.svelte +592 -0
- package/src/CashierMethodDetails.types.ts +91 -0
- package/src/i18n.js +27 -0
- package/src/index.ts +4 -0
- package/src/translations.js +18 -0
- package/stories/CashierMethodDetails.stories.js +13 -0
- package/tsconfig.json +6 -0
package/src/i18n.js
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
import {
|
2
|
+
dictionary,
|
3
|
+
locale,
|
4
|
+
addMessages,
|
5
|
+
_
|
6
|
+
} from 'svelte-i18n';
|
7
|
+
|
8
|
+
function setupI18n({ withLocale: _locale, translations }) {
|
9
|
+
locale.subscribe((data) => {
|
10
|
+
if (data == null) {
|
11
|
+
dictionary.set(translations);
|
12
|
+
locale.set(_locale);
|
13
|
+
}
|
14
|
+
}); // maybe we will need this to make sure that the i18n is set up only once
|
15
|
+
/*dictionary.set(translations);
|
16
|
+
locale.set(_locale);*/
|
17
|
+
}
|
18
|
+
|
19
|
+
function addNewMessages(lang, dict) {
|
20
|
+
addMessages(lang, dict);
|
21
|
+
}
|
22
|
+
|
23
|
+
function setLocale(_locale) {
|
24
|
+
locale.set(_locale);
|
25
|
+
}
|
26
|
+
|
27
|
+
export { _, setupI18n, addNewMessages, setLocale };
|
package/src/index.ts
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
export const TRANSLATIONS = {
|
2
|
+
"en": {
|
3
|
+
"loading": 'Loading...',
|
4
|
+
"amountLabel": "Amount",
|
5
|
+
"makeDepositButton": "Deposit",
|
6
|
+
"confirmDepositText": "Are you sure you want to deposit",
|
7
|
+
"confirmDepositButton": "Ok",
|
8
|
+
"redirectTitle": "You are redirected to the payment\'s provider page",
|
9
|
+
"redirectMessage": "Please complete your transaction on the payment\'s provider page.",
|
10
|
+
"backToPayment": "Close",
|
11
|
+
"retryText": "Please note that your popup blocker may prevent the payment window from appearing",
|
12
|
+
"retryButton": "RETRY",
|
13
|
+
"processingButton": "Processing...",
|
14
|
+
"generalMin": "Min",
|
15
|
+
"generalMax": "Max",
|
16
|
+
"amountPlaceholder": "0.00"
|
17
|
+
},
|
18
|
+
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { html } from 'lit-element';
|
2
|
+
|
3
|
+
import CashierMethodDetails from '../src/CashierMethodDetails';
|
4
|
+
|
5
|
+
// This default export determines where your story goes in the story list
|
6
|
+
export default {
|
7
|
+
title: 'CashierMethodDetails',
|
8
|
+
};
|
9
|
+
|
10
|
+
// 👇 We create a “template” of how args map to rendering
|
11
|
+
const CashierMethodDetails = ({ aProperty }) => html`<cashier-method-details></cashier-method-details>`;
|
12
|
+
|
13
|
+
export const FirstStory = CashierMethodDetails.bind({});
|