@everymatrix/pam-statement-history 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/index-fb94c0e0.js +1297 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/pam-statement-history-b224d6b2.js +12493 -0
- package/dist/cjs/pam-statement-history.cjs.entry.js +10 -0
- package/dist/cjs/pam-statement-history.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/pam-statement-history/index.js +1 -0
- package/dist/collection/components/pam-statement-history/pam-statement-history.css +427 -0
- package/dist/collection/components/pam-statement-history/pam-statement-history.js +702 -0
- package/dist/collection/i18n.js +31 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +136 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-02b4ec70.js +1270 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/pam-statement-history-dc238928.js +12491 -0
- package/dist/esm/pam-statement-history.entry.js +2 -0
- package/dist/esm/pam-statement-history.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/pam-statement-history/app-globals-0f993ce5.js +1 -0
- package/dist/pam-statement-history/index-02b4ec70.js +2 -0
- package/dist/pam-statement-history/index.esm.js +1 -0
- package/dist/pam-statement-history/pam-statement-history-dc238928.js +6657 -0
- package/dist/pam-statement-history/pam-statement-history.entry.js +1 -0
- package/dist/pam-statement-history/pam-statement-history.esm.js +1 -0
- package/dist/stencil.config.dev.js +19 -0
- package/dist/stencil.config.js +19 -0
- package/dist/storybook/main.js +43 -0
- package/dist/storybook/preview.js +9 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-statement-history/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-statement-history/.stencil/packages/stencil/pam-statement-history/stencil.config.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-statement-history/.stencil/packages/stencil/pam-statement-history/stencil.config.dev.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-statement-history/.stencil/packages/stencil/pam-statement-history/storybook/main.d.ts +3 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-statement-history/.stencil/packages/stencil/pam-statement-history/storybook/preview.d.ts +70 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-statement-history/.stencil/tools/plugins/index.d.ts +4 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-statement-history/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-statement-history/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-statement-history/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/pam-statement-history/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
- package/dist/types/components/pam-statement-history/index.d.ts +1 -0
- package/dist/types/components/pam-statement-history/pam-statement-history.d.ts +78 -0
- package/dist/types/components.d.ts +63 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/typings.d.ts +1 -0
- package/dist/types/utils/locale.utils.d.ts +9 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +27 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
dictionary,
|
|
3
|
+
locale,
|
|
4
|
+
init,
|
|
5
|
+
addMessages,
|
|
6
|
+
_
|
|
7
|
+
} from 'svelte-i18n';
|
|
8
|
+
|
|
9
|
+
function setupI18n({ withLocale: _locale, translations }) {
|
|
10
|
+
locale.subscribe((data) => {
|
|
11
|
+
if (data == null) {
|
|
12
|
+
dictionary.set(translations);
|
|
13
|
+
locale.set(_locale);
|
|
14
|
+
}
|
|
15
|
+
}); // maybe we will need this to make sure that the i18n is set up only once
|
|
16
|
+
/*dictionary.set(translations);
|
|
17
|
+
locale.set(_locale);*/
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function addNewMessages(lang, dict) {
|
|
21
|
+
addMessages(lang, dict);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function setLocale(_locale) {
|
|
25
|
+
init({
|
|
26
|
+
fallbackLocale: 'en'
|
|
27
|
+
});
|
|
28
|
+
locale.set(_locale);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { _, setupI18n, addNewMessages, setLocale };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/pam-statement-history';
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
export const TABS = ['All', 'Payments', 'Sports', 'Casino', 'Bonus'];
|
|
2
|
+
export const FILTERS = ['1D', '1W', '1M', '3M', 'Custom'];
|
|
3
|
+
export const DAYS = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
4
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
5
|
+
const TRANSLATIONS = {
|
|
6
|
+
en: {
|
|
7
|
+
"transactionHistory": "Transaction History",
|
|
8
|
+
"all": "All",
|
|
9
|
+
"payments": "Payments",
|
|
10
|
+
"sports": "Sports",
|
|
11
|
+
"casino": "Casino",
|
|
12
|
+
"bonus": "Bonus",
|
|
13
|
+
"1d": "1D",
|
|
14
|
+
"1w": "1W",
|
|
15
|
+
"1m": "1M",
|
|
16
|
+
"3m": "3M",
|
|
17
|
+
"custom": "Custom",
|
|
18
|
+
"from": "From",
|
|
19
|
+
"to": "To",
|
|
20
|
+
"apply": "Apply",
|
|
21
|
+
"maxRange": "Max range allowed is 180 days.",
|
|
22
|
+
"loading": "Loading...",
|
|
23
|
+
"noData": "No data was found for the selected period.",
|
|
24
|
+
"errorLoading": "Failed to load transactions.",
|
|
25
|
+
"balance": "Balance:",
|
|
26
|
+
"copied": "Copied!",
|
|
27
|
+
"prev": "Prev",
|
|
28
|
+
"next": "Next",
|
|
29
|
+
"page": "Page",
|
|
30
|
+
"sun": "Sun",
|
|
31
|
+
"mon": "Mon",
|
|
32
|
+
"tue": "Tue",
|
|
33
|
+
"wed": "Wed",
|
|
34
|
+
"thu": "Thu",
|
|
35
|
+
"fri": "Fri",
|
|
36
|
+
"sat": "Sat",
|
|
37
|
+
"deposit": "Deposit",
|
|
38
|
+
"withdrawal": "Withdrawal",
|
|
39
|
+
"success": "Success",
|
|
40
|
+
"failed": "Failed",
|
|
41
|
+
"won": "Won",
|
|
42
|
+
"placed": "Placed",
|
|
43
|
+
"pendingnotification": "Pending Notification",
|
|
44
|
+
"pending": "Pending",
|
|
45
|
+
"approved": "Approved",
|
|
46
|
+
"declined": "Declined",
|
|
47
|
+
"cancelled": "Cancelled",
|
|
48
|
+
"incomplete": "Incomplete",
|
|
49
|
+
"rollback": "Rollback",
|
|
50
|
+
"failedToCopyText": "Failed to copy text: ",
|
|
51
|
+
"na": "#N/A"
|
|
52
|
+
},
|
|
53
|
+
fr: {
|
|
54
|
+
"transactionHistory": "Historique des transactions",
|
|
55
|
+
"all": "Tout",
|
|
56
|
+
"payments": "Paiements",
|
|
57
|
+
"sports": "Sports",
|
|
58
|
+
"casino": "Casino",
|
|
59
|
+
"bonus": "Bonus",
|
|
60
|
+
"1d": "1J",
|
|
61
|
+
"1w": "1S",
|
|
62
|
+
"1m": "1M",
|
|
63
|
+
"3m": "3M",
|
|
64
|
+
"custom": "Personnalisé",
|
|
65
|
+
"from": "De",
|
|
66
|
+
"to": "À",
|
|
67
|
+
"apply": "Appliquer",
|
|
68
|
+
"maxRange": "La plage maximale autorisée est de 180 jours.",
|
|
69
|
+
"loading": "Chargement...",
|
|
70
|
+
"noData": "Aucune donnée trouvée pour la période sélectionnée.",
|
|
71
|
+
"errorLoading": "Échec du chargement des transactions.",
|
|
72
|
+
"balance": "Solde :",
|
|
73
|
+
"copied": "Copié !",
|
|
74
|
+
"prev": "Précédent",
|
|
75
|
+
"next": "Suivant",
|
|
76
|
+
"page": "Page",
|
|
77
|
+
"sun": "Dim",
|
|
78
|
+
"mon": "Lun",
|
|
79
|
+
"tue": "Mar",
|
|
80
|
+
"wed": "Mer",
|
|
81
|
+
"thu": "Jeu",
|
|
82
|
+
"fri": "Ven",
|
|
83
|
+
"sat": "Sam",
|
|
84
|
+
"deposit": "Dépôt",
|
|
85
|
+
"withdrawal": "Retrait",
|
|
86
|
+
"success": "Succès",
|
|
87
|
+
"failed": "Échoué",
|
|
88
|
+
"won": "Gagné",
|
|
89
|
+
"placed": "Placé",
|
|
90
|
+
"pendingnotification": "Notification en attente",
|
|
91
|
+
"pending": "En attente",
|
|
92
|
+
"approved": "Approuvé",
|
|
93
|
+
"declined": "Refusé",
|
|
94
|
+
"cancelled": "Annulé",
|
|
95
|
+
"incomplete": "Incomplet",
|
|
96
|
+
"rollback": "Annulation",
|
|
97
|
+
"failedToCopyText": "Échec de la copie du texte : ",
|
|
98
|
+
"na": "#N/A"
|
|
99
|
+
},
|
|
100
|
+
'zh-hk': {},
|
|
101
|
+
hu: {},
|
|
102
|
+
tr: {},
|
|
103
|
+
el: {},
|
|
104
|
+
es: {},
|
|
105
|
+
pt: {},
|
|
106
|
+
hr: {}
|
|
107
|
+
};
|
|
108
|
+
export const TRANSACTION_TYPES = {
|
|
109
|
+
WITHDRAWAL: 1,
|
|
110
|
+
SYSTEM_DEBIT: 14,
|
|
111
|
+
};
|
|
112
|
+
export const translate = (key, customLang) => {
|
|
113
|
+
var _a, _b;
|
|
114
|
+
const lang = customLang || DEFAULT_LANGUAGE;
|
|
115
|
+
return ((_a = TRANSLATIONS[lang]) === null || _a === void 0 ? void 0 : _a[key]) || ((_b = TRANSLATIONS[DEFAULT_LANGUAGE]) === null || _b === void 0 ? void 0 : _b[key]);
|
|
116
|
+
};
|
|
117
|
+
export const getTranslations = (url) => {
|
|
118
|
+
return new Promise((resolve, reject) => {
|
|
119
|
+
fetch(url)
|
|
120
|
+
.then((res) => res.json())
|
|
121
|
+
.then((data) => {
|
|
122
|
+
Object.keys(data).forEach((item) => {
|
|
123
|
+
const langKey = item;
|
|
124
|
+
if (!TRANSLATIONS[langKey]) {
|
|
125
|
+
TRANSLATIONS[langKey] = {};
|
|
126
|
+
}
|
|
127
|
+
for (let key in data[item]) {
|
|
128
|
+
TRANSLATIONS[langKey][key] = data[item][key];
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
resolve(TRANSLATIONS);
|
|
132
|
+
}).catch(err => {
|
|
133
|
+
reject(err);
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
};
|