@everymatrix/user-transaction-history 1.55.0 → 1.56.2
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/{index-4252bc97.js → index-8b5843ec.js} +18 -44
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/user-transaction-history.cjs.entry.js +88 -30
- package/dist/cjs/user-transaction-history.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/user-transaction-history/user-transaction-history.js +52 -29
- package/dist/esm/{index-e8249896.js → index-7c5e707a.js} +18 -44
- package/dist/esm/loader.js +3 -3
- package/dist/esm/user-transaction-history.entry.js +88 -30
- package/dist/esm/user-transaction-history.js +4 -4
- package/dist/types/components/user-transaction-history/user-transaction-history.d.ts +6 -3
- package/dist/types/components.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -6
- package/dist/user-transaction-history/p-437ed177.js +2 -0
- package/dist/user-transaction-history/p-a465efd0.entry.js +1 -0
- package/dist/user-transaction-history/user-transaction-history.esm.js +1 -1
- package/package.json +1 -1
- package/dist/user-transaction-history/p-380caf32.js +0 -2
- package/dist/user-transaction-history/p-7972bcc3.entry.js +0 -1
|
@@ -21,10 +21,10 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'user-transaction-history';
|
|
24
|
-
const BUILD = /* user-transaction-history */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad:
|
|
24
|
+
const BUILD = /* user-transaction-history */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
@@ -409,31 +409,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
409
409
|
if (nonce != null) {
|
|
410
410
|
styleElm.setAttribute("nonce", nonce);
|
|
411
411
|
}
|
|
412
|
-
|
|
413
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
414
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
415
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
416
|
-
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
417
|
-
} else if ("host" in styleContainerNode) {
|
|
418
|
-
if (supportsConstructableStylesheets) {
|
|
419
|
-
const stylesheet = new CSSStyleSheet();
|
|
420
|
-
stylesheet.replaceSync(style);
|
|
421
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
422
|
-
} else {
|
|
423
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
424
|
-
if (existingStyleContainer) {
|
|
425
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
426
|
-
} else {
|
|
427
|
-
styleContainerNode.prepend(styleElm);
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
} else {
|
|
431
|
-
styleContainerNode.append(styleElm);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
435
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
436
|
-
}
|
|
412
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
|
|
437
413
|
}
|
|
438
414
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
439
415
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -456,7 +432,7 @@ var attachStyles = (hostRef) => {
|
|
|
456
432
|
const scopeId2 = addStyle(
|
|
457
433
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
458
434
|
cmpMeta);
|
|
459
|
-
if (flags & 10 /* needsScopedEncapsulation */
|
|
435
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
460
436
|
elm["s-sc"] = scopeId2;
|
|
461
437
|
elm.classList.add(scopeId2 + "-h");
|
|
462
438
|
}
|
|
@@ -525,11 +501,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
525
501
|
if (memberName === "list") {
|
|
526
502
|
isProp = false;
|
|
527
503
|
} else if (oldValue == null || elm[memberName] != n) {
|
|
528
|
-
|
|
529
|
-
elm[memberName] = n;
|
|
530
|
-
} else {
|
|
531
|
-
elm.setAttribute(memberName, n);
|
|
532
|
-
}
|
|
504
|
+
elm[memberName] = n;
|
|
533
505
|
}
|
|
534
506
|
} else {
|
|
535
507
|
elm[memberName] = newValue;
|
|
@@ -620,9 +592,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
620
592
|
{
|
|
621
593
|
updateElement(null, newVNode2, isSvgMode);
|
|
622
594
|
}
|
|
623
|
-
|
|
624
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
625
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
595
|
+
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
626
596
|
elm.classList.add(elm["s-si"] = scopeId);
|
|
627
597
|
}
|
|
628
598
|
if (newVNode2.$children$) {
|
|
@@ -787,10 +757,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
787
757
|
elm.textContent = "";
|
|
788
758
|
}
|
|
789
759
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
790
|
-
} else if (
|
|
791
|
-
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
792
|
-
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
793
|
-
) {
|
|
760
|
+
} else if (oldChildren !== null) {
|
|
794
761
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
795
762
|
}
|
|
796
763
|
if (isSvgMode && tag === "svg") {
|
|
@@ -953,6 +920,9 @@ var postUpdateComponent = (hostRef) => {
|
|
|
953
920
|
{
|
|
954
921
|
addHydratedFlag(elm);
|
|
955
922
|
}
|
|
923
|
+
{
|
|
924
|
+
safeCall(instance, "componentDidLoad");
|
|
925
|
+
}
|
|
956
926
|
endPostUpdate();
|
|
957
927
|
{
|
|
958
928
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1065,8 +1035,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1065
1035
|
if (this.hasOwnProperty(propName)) {
|
|
1066
1036
|
newValue = this[propName];
|
|
1067
1037
|
delete this[propName];
|
|
1068
|
-
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" &&
|
|
1069
|
-
this[propName] == newValue) {
|
|
1038
|
+
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
|
|
1070
1039
|
return;
|
|
1071
1040
|
} else if (propName == null) {
|
|
1072
1041
|
const hostRef = getHostRef(this);
|
|
@@ -1213,6 +1182,9 @@ var connectedCallback = (elm) => {
|
|
|
1213
1182
|
}
|
|
1214
1183
|
};
|
|
1215
1184
|
var disconnectInstance = (instance) => {
|
|
1185
|
+
{
|
|
1186
|
+
safeCall(instance, "disconnectedCallback");
|
|
1187
|
+
}
|
|
1216
1188
|
};
|
|
1217
1189
|
var disconnectedCallback = async (elm) => {
|
|
1218
1190
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1223,8 +1195,10 @@ var disconnectedCallback = async (elm) => {
|
|
|
1223
1195
|
hostRef.$rmListeners$ = void 0;
|
|
1224
1196
|
}
|
|
1225
1197
|
}
|
|
1226
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1227
|
-
hostRef.$
|
|
1198
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1199
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
1200
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1201
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1228
1202
|
}
|
|
1229
1203
|
}
|
|
1230
1204
|
};
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-8b5843ec.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["user-transaction-history.cjs",[[1,"user-transaction-history",{"endpoint":[513],"session":[513],"language":[513],"userId":[513,"user-id"],"translationUrl":[513,"translation-url"],"mobile":[516],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"page":[32],"pageSize":[32],"showMobileFilter":[32],"to":[32],"from":[32],"type":[32],"transactions":[32],"showLoader":[32]},[[9,"resize","getComponentHeight"]],{"page":["watchMultiple"],"type":["watchMultiple"],"session":["watchMultiple"],"userId":["watchMultiple"],"pageSize":["watchMultiple"],"showMobileFilter":["getComponentHeight"]}]]]], options);
|
|
11
|
+
return index.bootstrapLazy([["user-transaction-history.cjs",[[1,"user-transaction-history",{"endpoint":[513],"session":[513],"language":[513],"userId":[513,"user-id"],"translationUrl":[513,"translation-url"],"mobile":[516],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"page":[32],"pageSize":[32],"showMobileFilter":[32],"to":[32],"from":[32],"type":[32],"transactions":[32],"showLoader":[32]},[[9,"resize","getComponentHeight"]],{"page":["watchMultiple"],"type":["watchMultiple"],"session":["watchMultiple"],"userId":["watchMultiple"],"pageSize":["watchMultiple"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"showMobileFilter":["getComponentHeight"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-8b5843ec.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_TRANSLATIONS = {
|
|
8
8
|
"en": {
|
|
@@ -183,6 +183,63 @@ const TableComponent = ({ source, language }) => {
|
|
|
183
183
|
index.h("span", { class: transaction.status.toLowerCase() }, transaction.status)))))));
|
|
184
184
|
};
|
|
185
185
|
|
|
186
|
+
/**
|
|
187
|
+
* @name setClientStyling
|
|
188
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content received
|
|
189
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
190
|
+
* @param {string} clientStyling The style content
|
|
191
|
+
*/
|
|
192
|
+
function setClientStyling(stylingContainer, clientStyling) {
|
|
193
|
+
if (stylingContainer) {
|
|
194
|
+
const sheet = document.createElement('style');
|
|
195
|
+
sheet.innerHTML = clientStyling;
|
|
196
|
+
stylingContainer.appendChild(sheet);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @name setClientStylingURL
|
|
202
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
|
|
203
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
204
|
+
* @param {string} clientStylingUrl The URL of the style content
|
|
205
|
+
*/
|
|
206
|
+
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
207
|
+
const url = new URL(clientStylingUrl);
|
|
208
|
+
|
|
209
|
+
fetch(url.href)
|
|
210
|
+
.then((res) => res.text())
|
|
211
|
+
.then((data) => {
|
|
212
|
+
const cssFile = document.createElement('style');
|
|
213
|
+
cssFile.innerHTML = data;
|
|
214
|
+
if (stylingContainer) {
|
|
215
|
+
stylingContainer.appendChild(cssFile);
|
|
216
|
+
}
|
|
217
|
+
})
|
|
218
|
+
.catch((err) => {
|
|
219
|
+
console.error('There was an error while trying to load client styling from URL', err);
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* @name setStreamLibrary
|
|
225
|
+
* @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
|
|
226
|
+
* @param {HTMLElement} stylingContainer The highest element of the widget
|
|
227
|
+
* @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
|
|
228
|
+
* @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
|
|
229
|
+
*/
|
|
230
|
+
function setStreamStyling(stylingContainer, domain, subscription) {
|
|
231
|
+
if (window.emMessageBus) {
|
|
232
|
+
const sheet = document.createElement('style');
|
|
233
|
+
|
|
234
|
+
window.emMessageBus.subscribe(domain, (data) => {
|
|
235
|
+
sheet.innerHTML = data;
|
|
236
|
+
if (stylingContainer) {
|
|
237
|
+
stylingContainer.appendChild(sheet);
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
186
243
|
const userTransactionHistoryCss = ":host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--hoverBackground:#ffffff;--background:#e4e6e8;--success:#7ac345;--heightScrollableContainer:400px;--borderColor:#d3d3d3;--borderColorButton:#c4c4c4;--textColor:#002554;--textColorHover:#7ac345;--errorColor:#c23b21;--loaderColor:#7ac345;--headerTableBackground:#cdcdcd;--borderTable:#dedede;--shadowBorderTable:#f1f1f1;--backgroundTable:#ffffff;font-family:Roboto, Arial, sans-serif;font-size:14px;color:var(--textColor);display:block;background-color:var(--background)}:host .wrapper{height:100%;padding:1rem}:host .types{display:flex;width:100%;gap:5px}:host .transaction-type{background:inherit;font-weight:600;padding:0.6rem 1.6rem;border:1px solid #6c757d;cursor:pointer}:host .transaction-type:hover{color:var(--activeButtonBackground);border-color:var(--activeButtonBackground);background:var(--hoverBackground)}:host .clicked{background-color:var(--activeButtonBackground);border-color:var(--activeButtonBackground)}:host .types-mobile{justify-content:center;margin-bottom:15px}:host .types-desktop{justify-content:flex-end;margin-bottom:3rem}:host .page-size{display:flex;width:100%;justify-content:flex-end;align-items:center}:host .page-size button{background:transparent;border:none;cursor:pointer;margin:0.4rem;width:2rem;height:2rem}:host .page-size button:hover{color:var(--textColorHover)}:host .page-size button.active{background:var(--activeButtonBackground);color:var(--textColor);font-weight:600;border-radius:0.4rem}:host .period{display:flex;width:100%;align-items:flex-end;justify-content:center;gap:10px;background:#f0f0f0;border-bottom:2px solid #e9e9e9;padding:1.6rem 0 0;margin-bottom:4rem}@media (max-width: 801px){:host .period{margin-bottom:0;flex-direction:column;align-items:stretch;width:auto;padding:1.4rem 2.8rem;box-shadow:0 4px 5px 0 rgba(90, 90, 90, 0.24)}}:host .period .range{color:var(--errorColor)}:host .period .filter-btn{height:40px;background:transparent;border:0.1rem solid var(--borderColorButton);min-width:12rem;max-width:17rem;cursor:pointer}@media (max-width: 801px){:host .period .filter-btn{max-width:none;min-width:none;margin-top:1rem}}:host .period .filter-btn:hover{border:none;background:var(--hoverBackground)}:host .period .duet-date__input{padding:7px 60px 7px 7px}:host .period+button{padding:9px 15px}:host .period-content{display:flex;flex-direction:row;width:100%;justify-content:center;align-items:flex-end;margin:0 auto 1.6rem}@media (max-width: 801px){:host .period-content{flex-direction:column;align-items:stretch}}:host .period-content span{height:40px;display:flex;align-items:center;justify-content:center}@media (max-width: 801px){:host .period-content span{display:none}}:host .period-content .filter-btn{margin-left:60px}@media (max-width: 801px){:host .period-content .filter-btn{margin-left:0}}:host .period-content .date-input{padding:0 4px}@media (max-width: 801px){:host .period-content .date-input{width:auto}:host .period-content .date-input:first-child{margin-bottom:0.5rem}}:host .period-content .date-input label{display:inline-block;margin-bottom:0.9rem}:host .period-content .date-input input{border:0.1rem solid var(--borderColor);box-sizing:border-box;border-radius:0.2rem}:host .pagination{display:flex;width:100%;justify-content:center;margin-top:1.5rem}:host .pagination button{cursor:pointer;border:none;background-color:var(--activeButtonBackground);color:#fff;opacity:0.5;padding:7px 12px}:host .pagination button:hover{opacity:1}:host .pagination button:focus{opacity:1}:host button.active{color:var(--activeButtonFont);background-color:var(--activeButtonBackground)}.mobile-filter-button{display:flex;justify-content:center;align-items:center;width:100%;height:2.8rem;background:inherit;border:1px solid var(--borderColorButton)}.mobile-filter-button img{height:50%;margin-right:0.5rem}.noData{display:flex;align-items:center;box-shadow:0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);padding:1.1rem;border-radius:0.6rem}.noData span{margin-left:0.5rem}.table{height:var(--heightScrollableContainer);overflow-y:auto}.table .mobile-table{height:100%}.data-transaction{border-bottom:1px solid var(--borderColor);background-color:var(--hoverBackground);padding:0 20px;display:grid;grid-template-columns:repeat(2, 1fr)}.data-transaction .text-style-status{font-weight:600}.data-transaction .text-style-status .success{color:var(--success)}.data-transaction .text-style-status .error{color:var(--errorColor)}.data-transaction .text-style{text-align:end}.data-transaction .date{font-size:12px;display:flex;align-items:center}.loader{display:inline-block;position:absolute;width:80px;height:80px;top:calc(50% - 40px);left:calc(50% - 40px);z-index:100}.loader::before{content:\"\";position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(255, 255, 255, 0.6)}.loader div{position:absolute;width:6px;height:6px;background:var(--loaderColor);border-radius:50%;animation:loader 1.2s linear infinite}.loader div:nth-child(1){animation-delay:0s;top:37px;left:66px}.loader div:nth-child(2){animation-delay:-0.1s;top:22px;left:62px}.loader div:nth-child(3){animation-delay:-0.2s;top:11px;left:52px}.loader div:nth-child(4){animation-delay:-0.3s;top:7px;left:37px}.loader div:nth-child(5){animation-delay:-0.4s;top:11px;left:22px}.loader div:nth-child(6){animation-delay:-0.5s;top:22px;left:11px}.loader div:nth-child(7){animation-delay:-0.6s;top:37px;left:7px}.loader div:nth-child(8){animation-delay:-0.7s;top:52px;left:11px}.loader div:nth-child(9){animation-delay:-0.8s;top:62px;left:22px}.loader div:nth-child(10){animation-delay:-0.9s;top:66px;left:37px}.loader div:nth-child(11){animation-delay:-1s;top:62px;left:52px}.loader div:nth-child(12){animation-delay:-1.1s;top:52px;left:62px}@keyframes loader{0%,20%,80%,100%{transform:scale(1)}50%{transform:scale(1.5)}}.table thead th{position:sticky;top:0}table{border-collapse:collapse;width:100%}table th{padding:14px 24px;text-align:left;font-weight:600;color:var(--textColor);background:var(--headerTableBackground)}table td{padding:1rem 1.7rem;box-shadow:0 -1px 0 0 var(--shadowBorderTable) inset;border-bottom:0.1rem solid var(--borderTable);text-align:left;color:var(--textColor)}table tbody{background:var(--backgroundTable)}table .success{color:var(--success)}table .error{color:var(--errorColor)}vaadin-date-picker{min-width:320px}@media (max-width: 1261px){vaadin-date-picker{width:auto;min-width:auto}}@media (max-width: 801px){vaadin-date-picker{width:100%}}";
|
|
187
244
|
const UserTransactionHistoryStyle0 = userTransactionHistoryCss;
|
|
188
245
|
|
|
@@ -191,7 +248,6 @@ const UserTransactionHistory = class {
|
|
|
191
248
|
index.registerInstance(this, hostRef);
|
|
192
249
|
this.pageSizes = [10, 25, 50];
|
|
193
250
|
this.pagination = null;
|
|
194
|
-
this.stylingAppended = false;
|
|
195
251
|
this.endpoint = undefined;
|
|
196
252
|
this.session = undefined;
|
|
197
253
|
this.language = Localization.defaultLanguage;
|
|
@@ -200,6 +256,7 @@ const UserTransactionHistory = class {
|
|
|
200
256
|
this.mobile = false;
|
|
201
257
|
this.clientStyling = null;
|
|
202
258
|
this.clientStylingUrl = null;
|
|
259
|
+
this.mbSource = undefined;
|
|
203
260
|
this.page = 0;
|
|
204
261
|
this.pageSize = this.pageSizes[0];
|
|
205
262
|
this.showMobileFilter = false;
|
|
@@ -212,24 +269,39 @@ const UserTransactionHistory = class {
|
|
|
212
269
|
watchMultiple() {
|
|
213
270
|
this.loadTransactions();
|
|
214
271
|
}
|
|
272
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
273
|
+
if (newValue != oldValue) {
|
|
274
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
278
|
+
if (newValue != oldValue) {
|
|
279
|
+
if (this.clientStylingUrl)
|
|
280
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
215
283
|
async componentWillLoad() {
|
|
216
284
|
if (this.translationUrl) {
|
|
217
285
|
await Localization.loadCustomTranslations(this.translationUrl);
|
|
218
286
|
}
|
|
219
287
|
this.loadTransactions();
|
|
220
288
|
}
|
|
221
|
-
|
|
222
|
-
this.
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
this.setStyles(this.clientStyling);
|
|
289
|
+
componentDidLoad() {
|
|
290
|
+
if (this.stylingContainer) {
|
|
291
|
+
if (window.emMessageBus != undefined) {
|
|
292
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
226
293
|
}
|
|
227
|
-
|
|
228
|
-
this.
|
|
294
|
+
else {
|
|
295
|
+
if (this.clientStyling)
|
|
296
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
297
|
+
if (this.clientStylingUrl)
|
|
298
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
229
299
|
}
|
|
230
|
-
this.stylingAppended = true;
|
|
231
300
|
}
|
|
232
301
|
}
|
|
302
|
+
componentDidRender() {
|
|
303
|
+
this.getComponentHeight();
|
|
304
|
+
}
|
|
233
305
|
getComponentHeight() {
|
|
234
306
|
var _a;
|
|
235
307
|
if (this.mobile) {
|
|
@@ -269,11 +341,14 @@ const UserTransactionHistory = class {
|
|
|
269
341
|
showFilter() {
|
|
270
342
|
this.showMobileFilter = !this.showMobileFilter;
|
|
271
343
|
}
|
|
344
|
+
disconnectedCallback() {
|
|
345
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
346
|
+
}
|
|
272
347
|
render() {
|
|
273
348
|
var _a;
|
|
274
349
|
const filterSrc = index.getAssetPath('../assets/filter.svg');
|
|
275
350
|
const warningSrc = index.getAssetPath('../assets/warning.svg');
|
|
276
|
-
return (index.h(index.Host, { key: '
|
|
351
|
+
return (index.h(index.Host, { key: '8d6470d73afff5dbc8a8c3a1a47426223971ad47' }, this.showLoader ? index.h(Loader, null) : '', index.h("div", { key: '8c32d9425b701747559ea1e63a3b2c4bb31780ab', class: "wrapper", ref: el => (this.stylingContainer = el) }, index.h("div", { key: 'b2a9216bfcfa5950c174f6e06a179e2ae3790f6b', class: { 'types types-mobile': this.mobile, 'types types-desktop': !this.mobile } }, index.h("button", { key: 'e2ce33fe2ab27abab68bd721b8b945bde5d672ac', class: 'transaction-type' + ' ' + (this.type === '0' ? 'clicked' : ''), onClick: () => this.changeTransactionsType('0') }, Localization.translate('deposit', this.language)), index.h("button", { key: '6d80bef56bf4ec590cc2e4aa704f930a47b29f3c', class: 'transaction-type' + ' ' + (this.type === '1' ? 'clicked' : ''), onClick: () => this.changeTransactionsType('1') }, Localization.translate('withdrawals', this.language))), !this.mobile ? index.h(PageSize, { language: this.language, pageSizes: this.pageSizes, currentPageSize: this.pageSize, changePageSize: s => this.changePageSize(s) }) : '', this.mobile ? (index.h("button", { class: "mobile-filter-button", onClick: () => this.showFilter() }, index.h("img", { src: filterSrc, alt: "Filter" }), Localization.translate('filter', this.language))) : (''), !this.mobile || (this.showMobileFilter && this.mobile) ? index.h(Filters, { language: this.language, applyFilters: (from, to) => this.applyFilters(from, to) }) : '', ((_a = this.transactions) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (index.h("div", { class: "table" }, this.mobile ? (index.h("div", { class: "mobile-table" }, this.transactions.map(transaction => (index.h(TransactionComponent, Object.assign({}, transaction)))))) : (index.h(TableComponent, { source: this.transactions, language: this.language })))) : (index.h("div", { class: "noData" }, index.h("img", { src: warningSrc, alt: "Warning" }), index.h("span", null, Localization.translate('noData', this.language)))), index.h("div", { key: '9b7950ed91c4795f4355ce406d7cba40c46c0184', class: "pagination" }, index.h("button", { key: 'bc7b2bce0a21763fc5a10d2249b74c2d9805d3b5', onClick: () => this.prev() }, '<'), index.h("button", { key: '69210c5b101a24563babdbe6b3361d091afc2cc0', onClick: () => this.next() }, '>')))));
|
|
277
352
|
}
|
|
278
353
|
async loadTransactions() {
|
|
279
354
|
this.showLoader = true;
|
|
@@ -308,25 +383,6 @@ const UserTransactionHistory = class {
|
|
|
308
383
|
const endDate = (_b = this.to) !== null && _b !== void 0 ? _b : new Date(now.getFullYear(), now.getMonth() + 1, 0).toISOString();
|
|
309
384
|
return `offset=${offset}&endDate=${endDate}&startDate=${startDate}&type=${this.type}&limit=${this.pageSize}`;
|
|
310
385
|
}
|
|
311
|
-
setStyles(styles) {
|
|
312
|
-
const cssFile = document.createElement('style');
|
|
313
|
-
cssFile.innerHTML = styles;
|
|
314
|
-
this.stylingContainer.prepend(cssFile);
|
|
315
|
-
}
|
|
316
|
-
async setClientStylingByURL() {
|
|
317
|
-
try {
|
|
318
|
-
const response = await fetch(this.clientStylingUrl);
|
|
319
|
-
if (!response.ok) {
|
|
320
|
-
const err = await response.text();
|
|
321
|
-
throw new Error(err);
|
|
322
|
-
}
|
|
323
|
-
const styles = await response.text();
|
|
324
|
-
this.setStyles(styles);
|
|
325
|
-
}
|
|
326
|
-
catch (ex) {
|
|
327
|
-
console.error(`Failed to load client styles ${this.clientStylingUrl}`, ex);
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
386
|
static get assetsDirs() { return ["../assets"]; }
|
|
331
387
|
get el() { return index.getElement(this); }
|
|
332
388
|
static get watchers() { return {
|
|
@@ -335,6 +391,8 @@ const UserTransactionHistory = class {
|
|
|
335
391
|
"session": ["watchMultiple"],
|
|
336
392
|
"userId": ["watchMultiple"],
|
|
337
393
|
"pageSize": ["watchMultiple"],
|
|
394
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
395
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
338
396
|
"showMobileFilter": ["getComponentHeight"]
|
|
339
397
|
}; }
|
|
340
398
|
};
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-8b5843ec.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
|
-
Stencil Client Patch Browser v4.
|
|
9
|
+
Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
10
10
|
*/
|
|
11
11
|
var patchBrowser = () => {
|
|
12
12
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('user-transaction-history.cjs.js', document.baseURI).href));
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["user-transaction-history.cjs",[[1,"user-transaction-history",{"endpoint":[513],"session":[513],"language":[513],"userId":[513,"user-id"],"translationUrl":[513,"translation-url"],"mobile":[516],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"page":[32],"pageSize":[32],"showMobileFilter":[32],"to":[32],"from":[32],"type":[32],"transactions":[32],"showLoader":[32]},[[9,"resize","getComponentHeight"]],{"page":["watchMultiple"],"type":["watchMultiple"],"session":["watchMultiple"],"userId":["watchMultiple"],"pageSize":["watchMultiple"],"showMobileFilter":["getComponentHeight"]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["user-transaction-history.cjs",[[1,"user-transaction-history",{"endpoint":[513],"session":[513],"language":[513],"userId":[513,"user-id"],"translationUrl":[513,"translation-url"],"mobile":[516],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"page":[32],"pageSize":[32],"showMobileFilter":[32],"to":[32],"from":[32],"type":[32],"transactions":[32],"showLoader":[32]},[[9,"resize","getComponentHeight"]],{"page":["watchMultiple"],"type":["watchMultiple"],"session":["watchMultiple"],"userId":["watchMultiple"],"pageSize":["watchMultiple"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"showMobileFilter":["getComponentHeight"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -5,11 +5,11 @@ import { TransactionComponent } from "../internal/transaction";
|
|
|
5
5
|
import { PageSize } from "../internal/page-size";
|
|
6
6
|
import { Filters } from "../internal/filters";
|
|
7
7
|
import { TableComponent } from "../internal/table";
|
|
8
|
+
import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
|
|
8
9
|
export class UserTransactionHistory {
|
|
9
10
|
constructor() {
|
|
10
11
|
this.pageSizes = [10, 25, 50];
|
|
11
12
|
this.pagination = null;
|
|
12
|
-
this.stylingAppended = false;
|
|
13
13
|
this.endpoint = undefined;
|
|
14
14
|
this.session = undefined;
|
|
15
15
|
this.language = Localization.defaultLanguage;
|
|
@@ -18,6 +18,7 @@ export class UserTransactionHistory {
|
|
|
18
18
|
this.mobile = false;
|
|
19
19
|
this.clientStyling = null;
|
|
20
20
|
this.clientStylingUrl = null;
|
|
21
|
+
this.mbSource = undefined;
|
|
21
22
|
this.page = 0;
|
|
22
23
|
this.pageSize = this.pageSizes[0];
|
|
23
24
|
this.showMobileFilter = false;
|
|
@@ -30,24 +31,39 @@ export class UserTransactionHistory {
|
|
|
30
31
|
watchMultiple() {
|
|
31
32
|
this.loadTransactions();
|
|
32
33
|
}
|
|
34
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
35
|
+
if (newValue != oldValue) {
|
|
36
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
40
|
+
if (newValue != oldValue) {
|
|
41
|
+
if (this.clientStylingUrl)
|
|
42
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
33
45
|
async componentWillLoad() {
|
|
34
46
|
if (this.translationUrl) {
|
|
35
47
|
await Localization.loadCustomTranslations(this.translationUrl);
|
|
36
48
|
}
|
|
37
49
|
this.loadTransactions();
|
|
38
50
|
}
|
|
39
|
-
|
|
40
|
-
this.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
this.setStyles(this.clientStyling);
|
|
51
|
+
componentDidLoad() {
|
|
52
|
+
if (this.stylingContainer) {
|
|
53
|
+
if (window.emMessageBus != undefined) {
|
|
54
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
44
55
|
}
|
|
45
|
-
|
|
46
|
-
this.
|
|
56
|
+
else {
|
|
57
|
+
if (this.clientStyling)
|
|
58
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
59
|
+
if (this.clientStylingUrl)
|
|
60
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
47
61
|
}
|
|
48
|
-
this.stylingAppended = true;
|
|
49
62
|
}
|
|
50
63
|
}
|
|
64
|
+
componentDidRender() {
|
|
65
|
+
this.getComponentHeight();
|
|
66
|
+
}
|
|
51
67
|
getComponentHeight() {
|
|
52
68
|
var _a;
|
|
53
69
|
if (this.mobile) {
|
|
@@ -87,11 +103,14 @@ export class UserTransactionHistory {
|
|
|
87
103
|
showFilter() {
|
|
88
104
|
this.showMobileFilter = !this.showMobileFilter;
|
|
89
105
|
}
|
|
106
|
+
disconnectedCallback() {
|
|
107
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
108
|
+
}
|
|
90
109
|
render() {
|
|
91
110
|
var _a;
|
|
92
111
|
const filterSrc = getAssetPath('../assets/filter.svg');
|
|
93
112
|
const warningSrc = getAssetPath('../assets/warning.svg');
|
|
94
|
-
return (h(Host, { key: '
|
|
113
|
+
return (h(Host, { key: '8d6470d73afff5dbc8a8c3a1a47426223971ad47' }, this.showLoader ? h(Loader, null) : '', h("div", { key: '8c32d9425b701747559ea1e63a3b2c4bb31780ab', class: "wrapper", ref: el => (this.stylingContainer = el) }, h("div", { key: 'b2a9216bfcfa5950c174f6e06a179e2ae3790f6b', class: { 'types types-mobile': this.mobile, 'types types-desktop': !this.mobile } }, h("button", { key: 'e2ce33fe2ab27abab68bd721b8b945bde5d672ac', class: 'transaction-type' + ' ' + (this.type === '0' ? 'clicked' : ''), onClick: () => this.changeTransactionsType('0') }, Localization.translate('deposit', this.language)), h("button", { key: '6d80bef56bf4ec590cc2e4aa704f930a47b29f3c', class: 'transaction-type' + ' ' + (this.type === '1' ? 'clicked' : ''), onClick: () => this.changeTransactionsType('1') }, Localization.translate('withdrawals', this.language))), !this.mobile ? h(PageSize, { language: this.language, pageSizes: this.pageSizes, currentPageSize: this.pageSize, changePageSize: s => this.changePageSize(s) }) : '', this.mobile ? (h("button", { class: "mobile-filter-button", onClick: () => this.showFilter() }, h("img", { src: filterSrc, alt: "Filter" }), Localization.translate('filter', this.language))) : (''), !this.mobile || (this.showMobileFilter && this.mobile) ? h(Filters, { language: this.language, applyFilters: (from, to) => this.applyFilters(from, to) }) : '', ((_a = this.transactions) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (h("div", { class: "table" }, this.mobile ? (h("div", { class: "mobile-table" }, this.transactions.map(transaction => (h(TransactionComponent, Object.assign({}, transaction)))))) : (h(TableComponent, { source: this.transactions, language: this.language })))) : (h("div", { class: "noData" }, h("img", { src: warningSrc, alt: "Warning" }), h("span", null, Localization.translate('noData', this.language)))), h("div", { key: '9b7950ed91c4795f4355ce406d7cba40c46c0184', class: "pagination" }, h("button", { key: 'bc7b2bce0a21763fc5a10d2249b74c2d9805d3b5', onClick: () => this.prev() }, '<'), h("button", { key: '69210c5b101a24563babdbe6b3361d091afc2cc0', onClick: () => this.next() }, '>')))));
|
|
95
114
|
}
|
|
96
115
|
async loadTransactions() {
|
|
97
116
|
this.showLoader = true;
|
|
@@ -126,25 +145,6 @@ export class UserTransactionHistory {
|
|
|
126
145
|
const endDate = (_b = this.to) !== null && _b !== void 0 ? _b : new Date(now.getFullYear(), now.getMonth() + 1, 0).toISOString();
|
|
127
146
|
return `offset=${offset}&endDate=${endDate}&startDate=${startDate}&type=${this.type}&limit=${this.pageSize}`;
|
|
128
147
|
}
|
|
129
|
-
setStyles(styles) {
|
|
130
|
-
const cssFile = document.createElement('style');
|
|
131
|
-
cssFile.innerHTML = styles;
|
|
132
|
-
this.stylingContainer.prepend(cssFile);
|
|
133
|
-
}
|
|
134
|
-
async setClientStylingByURL() {
|
|
135
|
-
try {
|
|
136
|
-
const response = await fetch(this.clientStylingUrl);
|
|
137
|
-
if (!response.ok) {
|
|
138
|
-
const err = await response.text();
|
|
139
|
-
throw new Error(err);
|
|
140
|
-
}
|
|
141
|
-
const styles = await response.text();
|
|
142
|
-
this.setStyles(styles);
|
|
143
|
-
}
|
|
144
|
-
catch (ex) {
|
|
145
|
-
console.error(`Failed to load client styles ${this.clientStylingUrl}`, ex);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
148
|
static get is() { return "user-transaction-history"; }
|
|
149
149
|
static get encapsulation() { return "shadow"; }
|
|
150
150
|
static get originalStyleUrls() {
|
|
@@ -299,6 +299,23 @@ export class UserTransactionHistory {
|
|
|
299
299
|
"attribute": "client-styling-url",
|
|
300
300
|
"reflect": true,
|
|
301
301
|
"defaultValue": "null"
|
|
302
|
+
},
|
|
303
|
+
"mbSource": {
|
|
304
|
+
"type": "string",
|
|
305
|
+
"mutable": false,
|
|
306
|
+
"complexType": {
|
|
307
|
+
"original": "string",
|
|
308
|
+
"resolved": "string",
|
|
309
|
+
"references": {}
|
|
310
|
+
},
|
|
311
|
+
"required": false,
|
|
312
|
+
"optional": false,
|
|
313
|
+
"docs": {
|
|
314
|
+
"tags": [],
|
|
315
|
+
"text": ""
|
|
316
|
+
},
|
|
317
|
+
"attribute": "mb-source",
|
|
318
|
+
"reflect": true
|
|
302
319
|
}
|
|
303
320
|
};
|
|
304
321
|
}
|
|
@@ -331,6 +348,12 @@ export class UserTransactionHistory {
|
|
|
331
348
|
}, {
|
|
332
349
|
"propName": "pageSize",
|
|
333
350
|
"methodName": "watchMultiple"
|
|
351
|
+
}, {
|
|
352
|
+
"propName": "clientStyling",
|
|
353
|
+
"methodName": "handleClientStylingChange"
|
|
354
|
+
}, {
|
|
355
|
+
"propName": "clientStylingUrl",
|
|
356
|
+
"methodName": "handleClientStylingUrlChange"
|
|
334
357
|
}, {
|
|
335
358
|
"propName": "showMobileFilter",
|
|
336
359
|
"methodName": "getComponentHeight"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const NAMESPACE = 'user-transaction-history';
|
|
2
|
-
const BUILD = /* user-transaction-history */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad:
|
|
2
|
+
const BUILD = /* user-transaction-history */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __export = (target, all) => {
|
|
@@ -387,31 +387,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
387
387
|
if (nonce != null) {
|
|
388
388
|
styleElm.setAttribute("nonce", nonce);
|
|
389
389
|
}
|
|
390
|
-
|
|
391
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
392
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
393
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
394
|
-
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
395
|
-
} else if ("host" in styleContainerNode) {
|
|
396
|
-
if (supportsConstructableStylesheets) {
|
|
397
|
-
const stylesheet = new CSSStyleSheet();
|
|
398
|
-
stylesheet.replaceSync(style);
|
|
399
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
400
|
-
} else {
|
|
401
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
402
|
-
if (existingStyleContainer) {
|
|
403
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
404
|
-
} else {
|
|
405
|
-
styleContainerNode.prepend(styleElm);
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
} else {
|
|
409
|
-
styleContainerNode.append(styleElm);
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
413
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
414
|
-
}
|
|
390
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
|
|
415
391
|
}
|
|
416
392
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
417
393
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -434,7 +410,7 @@ var attachStyles = (hostRef) => {
|
|
|
434
410
|
const scopeId2 = addStyle(
|
|
435
411
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
436
412
|
cmpMeta);
|
|
437
|
-
if (flags & 10 /* needsScopedEncapsulation */
|
|
413
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
438
414
|
elm["s-sc"] = scopeId2;
|
|
439
415
|
elm.classList.add(scopeId2 + "-h");
|
|
440
416
|
}
|
|
@@ -503,11 +479,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
503
479
|
if (memberName === "list") {
|
|
504
480
|
isProp = false;
|
|
505
481
|
} else if (oldValue == null || elm[memberName] != n) {
|
|
506
|
-
|
|
507
|
-
elm[memberName] = n;
|
|
508
|
-
} else {
|
|
509
|
-
elm.setAttribute(memberName, n);
|
|
510
|
-
}
|
|
482
|
+
elm[memberName] = n;
|
|
511
483
|
}
|
|
512
484
|
} else {
|
|
513
485
|
elm[memberName] = newValue;
|
|
@@ -598,9 +570,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
598
570
|
{
|
|
599
571
|
updateElement(null, newVNode2, isSvgMode);
|
|
600
572
|
}
|
|
601
|
-
|
|
602
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
603
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
573
|
+
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
604
574
|
elm.classList.add(elm["s-si"] = scopeId);
|
|
605
575
|
}
|
|
606
576
|
if (newVNode2.$children$) {
|
|
@@ -765,10 +735,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
765
735
|
elm.textContent = "";
|
|
766
736
|
}
|
|
767
737
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
768
|
-
} else if (
|
|
769
|
-
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
770
|
-
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
771
|
-
) {
|
|
738
|
+
} else if (oldChildren !== null) {
|
|
772
739
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
773
740
|
}
|
|
774
741
|
if (isSvgMode && tag === "svg") {
|
|
@@ -931,6 +898,9 @@ var postUpdateComponent = (hostRef) => {
|
|
|
931
898
|
{
|
|
932
899
|
addHydratedFlag(elm);
|
|
933
900
|
}
|
|
901
|
+
{
|
|
902
|
+
safeCall(instance, "componentDidLoad");
|
|
903
|
+
}
|
|
934
904
|
endPostUpdate();
|
|
935
905
|
{
|
|
936
906
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1043,8 +1013,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1043
1013
|
if (this.hasOwnProperty(propName)) {
|
|
1044
1014
|
newValue = this[propName];
|
|
1045
1015
|
delete this[propName];
|
|
1046
|
-
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" &&
|
|
1047
|
-
this[propName] == newValue) {
|
|
1016
|
+
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
|
|
1048
1017
|
return;
|
|
1049
1018
|
} else if (propName == null) {
|
|
1050
1019
|
const hostRef = getHostRef(this);
|
|
@@ -1191,6 +1160,9 @@ var connectedCallback = (elm) => {
|
|
|
1191
1160
|
}
|
|
1192
1161
|
};
|
|
1193
1162
|
var disconnectInstance = (instance) => {
|
|
1163
|
+
{
|
|
1164
|
+
safeCall(instance, "disconnectedCallback");
|
|
1165
|
+
}
|
|
1194
1166
|
};
|
|
1195
1167
|
var disconnectedCallback = async (elm) => {
|
|
1196
1168
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1201,8 +1173,10 @@ var disconnectedCallback = async (elm) => {
|
|
|
1201
1173
|
hostRef.$rmListeners$ = void 0;
|
|
1202
1174
|
}
|
|
1203
1175
|
}
|
|
1204
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1205
|
-
hostRef.$
|
|
1176
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1177
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
1178
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1179
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1206
1180
|
}
|
|
1207
1181
|
}
|
|
1208
1182
|
};
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-7c5e707a.js';
|
|
2
|
+
export { s as setNonce } from './index-7c5e707a.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["user-transaction-history",[[1,"user-transaction-history",{"endpoint":[513],"session":[513],"language":[513],"userId":[513,"user-id"],"translationUrl":[513,"translation-url"],"mobile":[516],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"page":[32],"pageSize":[32],"showMobileFilter":[32],"to":[32],"from":[32],"type":[32],"transactions":[32],"showLoader":[32]},[[9,"resize","getComponentHeight"]],{"page":["watchMultiple"],"type":["watchMultiple"],"session":["watchMultiple"],"userId":["watchMultiple"],"pageSize":["watchMultiple"],"showMobileFilter":["getComponentHeight"]}]]]], options);
|
|
8
|
+
return bootstrapLazy([["user-transaction-history",[[1,"user-transaction-history",{"endpoint":[513],"session":[513],"language":[513],"userId":[513,"user-id"],"translationUrl":[513,"translation-url"],"mobile":[516],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"page":[32],"pageSize":[32],"showMobileFilter":[32],"to":[32],"from":[32],"type":[32],"transactions":[32],"showLoader":[32]},[[9,"resize","getComponentHeight"]],{"page":["watchMultiple"],"type":["watchMultiple"],"session":["watchMultiple"],"userId":["watchMultiple"],"pageSize":["watchMultiple"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"showMobileFilter":["getComponentHeight"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, r as registerInstance, g as getAssetPath, H as Host, a as getElement } from './index-
|
|
1
|
+
import { h, r as registerInstance, g as getAssetPath, H as Host, a as getElement } from './index-7c5e707a.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_TRANSLATIONS = {
|
|
4
4
|
"en": {
|
|
@@ -179,6 +179,63 @@ const TableComponent = ({ source, language }) => {
|
|
|
179
179
|
h("span", { class: transaction.status.toLowerCase() }, transaction.status)))))));
|
|
180
180
|
};
|
|
181
181
|
|
|
182
|
+
/**
|
|
183
|
+
* @name setClientStyling
|
|
184
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content received
|
|
185
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
186
|
+
* @param {string} clientStyling The style content
|
|
187
|
+
*/
|
|
188
|
+
function setClientStyling(stylingContainer, clientStyling) {
|
|
189
|
+
if (stylingContainer) {
|
|
190
|
+
const sheet = document.createElement('style');
|
|
191
|
+
sheet.innerHTML = clientStyling;
|
|
192
|
+
stylingContainer.appendChild(sheet);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* @name setClientStylingURL
|
|
198
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
|
|
199
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
200
|
+
* @param {string} clientStylingUrl The URL of the style content
|
|
201
|
+
*/
|
|
202
|
+
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
203
|
+
const url = new URL(clientStylingUrl);
|
|
204
|
+
|
|
205
|
+
fetch(url.href)
|
|
206
|
+
.then((res) => res.text())
|
|
207
|
+
.then((data) => {
|
|
208
|
+
const cssFile = document.createElement('style');
|
|
209
|
+
cssFile.innerHTML = data;
|
|
210
|
+
if (stylingContainer) {
|
|
211
|
+
stylingContainer.appendChild(cssFile);
|
|
212
|
+
}
|
|
213
|
+
})
|
|
214
|
+
.catch((err) => {
|
|
215
|
+
console.error('There was an error while trying to load client styling from URL', err);
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* @name setStreamLibrary
|
|
221
|
+
* @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
|
|
222
|
+
* @param {HTMLElement} stylingContainer The highest element of the widget
|
|
223
|
+
* @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
|
|
224
|
+
* @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
|
|
225
|
+
*/
|
|
226
|
+
function setStreamStyling(stylingContainer, domain, subscription) {
|
|
227
|
+
if (window.emMessageBus) {
|
|
228
|
+
const sheet = document.createElement('style');
|
|
229
|
+
|
|
230
|
+
window.emMessageBus.subscribe(domain, (data) => {
|
|
231
|
+
sheet.innerHTML = data;
|
|
232
|
+
if (stylingContainer) {
|
|
233
|
+
stylingContainer.appendChild(sheet);
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
182
239
|
const userTransactionHistoryCss = ":host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--hoverBackground:#ffffff;--background:#e4e6e8;--success:#7ac345;--heightScrollableContainer:400px;--borderColor:#d3d3d3;--borderColorButton:#c4c4c4;--textColor:#002554;--textColorHover:#7ac345;--errorColor:#c23b21;--loaderColor:#7ac345;--headerTableBackground:#cdcdcd;--borderTable:#dedede;--shadowBorderTable:#f1f1f1;--backgroundTable:#ffffff;font-family:Roboto, Arial, sans-serif;font-size:14px;color:var(--textColor);display:block;background-color:var(--background)}:host .wrapper{height:100%;padding:1rem}:host .types{display:flex;width:100%;gap:5px}:host .transaction-type{background:inherit;font-weight:600;padding:0.6rem 1.6rem;border:1px solid #6c757d;cursor:pointer}:host .transaction-type:hover{color:var(--activeButtonBackground);border-color:var(--activeButtonBackground);background:var(--hoverBackground)}:host .clicked{background-color:var(--activeButtonBackground);border-color:var(--activeButtonBackground)}:host .types-mobile{justify-content:center;margin-bottom:15px}:host .types-desktop{justify-content:flex-end;margin-bottom:3rem}:host .page-size{display:flex;width:100%;justify-content:flex-end;align-items:center}:host .page-size button{background:transparent;border:none;cursor:pointer;margin:0.4rem;width:2rem;height:2rem}:host .page-size button:hover{color:var(--textColorHover)}:host .page-size button.active{background:var(--activeButtonBackground);color:var(--textColor);font-weight:600;border-radius:0.4rem}:host .period{display:flex;width:100%;align-items:flex-end;justify-content:center;gap:10px;background:#f0f0f0;border-bottom:2px solid #e9e9e9;padding:1.6rem 0 0;margin-bottom:4rem}@media (max-width: 801px){:host .period{margin-bottom:0;flex-direction:column;align-items:stretch;width:auto;padding:1.4rem 2.8rem;box-shadow:0 4px 5px 0 rgba(90, 90, 90, 0.24)}}:host .period .range{color:var(--errorColor)}:host .period .filter-btn{height:40px;background:transparent;border:0.1rem solid var(--borderColorButton);min-width:12rem;max-width:17rem;cursor:pointer}@media (max-width: 801px){:host .period .filter-btn{max-width:none;min-width:none;margin-top:1rem}}:host .period .filter-btn:hover{border:none;background:var(--hoverBackground)}:host .period .duet-date__input{padding:7px 60px 7px 7px}:host .period+button{padding:9px 15px}:host .period-content{display:flex;flex-direction:row;width:100%;justify-content:center;align-items:flex-end;margin:0 auto 1.6rem}@media (max-width: 801px){:host .period-content{flex-direction:column;align-items:stretch}}:host .period-content span{height:40px;display:flex;align-items:center;justify-content:center}@media (max-width: 801px){:host .period-content span{display:none}}:host .period-content .filter-btn{margin-left:60px}@media (max-width: 801px){:host .period-content .filter-btn{margin-left:0}}:host .period-content .date-input{padding:0 4px}@media (max-width: 801px){:host .period-content .date-input{width:auto}:host .period-content .date-input:first-child{margin-bottom:0.5rem}}:host .period-content .date-input label{display:inline-block;margin-bottom:0.9rem}:host .period-content .date-input input{border:0.1rem solid var(--borderColor);box-sizing:border-box;border-radius:0.2rem}:host .pagination{display:flex;width:100%;justify-content:center;margin-top:1.5rem}:host .pagination button{cursor:pointer;border:none;background-color:var(--activeButtonBackground);color:#fff;opacity:0.5;padding:7px 12px}:host .pagination button:hover{opacity:1}:host .pagination button:focus{opacity:1}:host button.active{color:var(--activeButtonFont);background-color:var(--activeButtonBackground)}.mobile-filter-button{display:flex;justify-content:center;align-items:center;width:100%;height:2.8rem;background:inherit;border:1px solid var(--borderColorButton)}.mobile-filter-button img{height:50%;margin-right:0.5rem}.noData{display:flex;align-items:center;box-shadow:0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);padding:1.1rem;border-radius:0.6rem}.noData span{margin-left:0.5rem}.table{height:var(--heightScrollableContainer);overflow-y:auto}.table .mobile-table{height:100%}.data-transaction{border-bottom:1px solid var(--borderColor);background-color:var(--hoverBackground);padding:0 20px;display:grid;grid-template-columns:repeat(2, 1fr)}.data-transaction .text-style-status{font-weight:600}.data-transaction .text-style-status .success{color:var(--success)}.data-transaction .text-style-status .error{color:var(--errorColor)}.data-transaction .text-style{text-align:end}.data-transaction .date{font-size:12px;display:flex;align-items:center}.loader{display:inline-block;position:absolute;width:80px;height:80px;top:calc(50% - 40px);left:calc(50% - 40px);z-index:100}.loader::before{content:\"\";position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(255, 255, 255, 0.6)}.loader div{position:absolute;width:6px;height:6px;background:var(--loaderColor);border-radius:50%;animation:loader 1.2s linear infinite}.loader div:nth-child(1){animation-delay:0s;top:37px;left:66px}.loader div:nth-child(2){animation-delay:-0.1s;top:22px;left:62px}.loader div:nth-child(3){animation-delay:-0.2s;top:11px;left:52px}.loader div:nth-child(4){animation-delay:-0.3s;top:7px;left:37px}.loader div:nth-child(5){animation-delay:-0.4s;top:11px;left:22px}.loader div:nth-child(6){animation-delay:-0.5s;top:22px;left:11px}.loader div:nth-child(7){animation-delay:-0.6s;top:37px;left:7px}.loader div:nth-child(8){animation-delay:-0.7s;top:52px;left:11px}.loader div:nth-child(9){animation-delay:-0.8s;top:62px;left:22px}.loader div:nth-child(10){animation-delay:-0.9s;top:66px;left:37px}.loader div:nth-child(11){animation-delay:-1s;top:62px;left:52px}.loader div:nth-child(12){animation-delay:-1.1s;top:52px;left:62px}@keyframes loader{0%,20%,80%,100%{transform:scale(1)}50%{transform:scale(1.5)}}.table thead th{position:sticky;top:0}table{border-collapse:collapse;width:100%}table th{padding:14px 24px;text-align:left;font-weight:600;color:var(--textColor);background:var(--headerTableBackground)}table td{padding:1rem 1.7rem;box-shadow:0 -1px 0 0 var(--shadowBorderTable) inset;border-bottom:0.1rem solid var(--borderTable);text-align:left;color:var(--textColor)}table tbody{background:var(--backgroundTable)}table .success{color:var(--success)}table .error{color:var(--errorColor)}vaadin-date-picker{min-width:320px}@media (max-width: 1261px){vaadin-date-picker{width:auto;min-width:auto}}@media (max-width: 801px){vaadin-date-picker{width:100%}}";
|
|
183
240
|
const UserTransactionHistoryStyle0 = userTransactionHistoryCss;
|
|
184
241
|
|
|
@@ -187,7 +244,6 @@ const UserTransactionHistory = class {
|
|
|
187
244
|
registerInstance(this, hostRef);
|
|
188
245
|
this.pageSizes = [10, 25, 50];
|
|
189
246
|
this.pagination = null;
|
|
190
|
-
this.stylingAppended = false;
|
|
191
247
|
this.endpoint = undefined;
|
|
192
248
|
this.session = undefined;
|
|
193
249
|
this.language = Localization.defaultLanguage;
|
|
@@ -196,6 +252,7 @@ const UserTransactionHistory = class {
|
|
|
196
252
|
this.mobile = false;
|
|
197
253
|
this.clientStyling = null;
|
|
198
254
|
this.clientStylingUrl = null;
|
|
255
|
+
this.mbSource = undefined;
|
|
199
256
|
this.page = 0;
|
|
200
257
|
this.pageSize = this.pageSizes[0];
|
|
201
258
|
this.showMobileFilter = false;
|
|
@@ -208,24 +265,39 @@ const UserTransactionHistory = class {
|
|
|
208
265
|
watchMultiple() {
|
|
209
266
|
this.loadTransactions();
|
|
210
267
|
}
|
|
268
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
269
|
+
if (newValue != oldValue) {
|
|
270
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
274
|
+
if (newValue != oldValue) {
|
|
275
|
+
if (this.clientStylingUrl)
|
|
276
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
211
279
|
async componentWillLoad() {
|
|
212
280
|
if (this.translationUrl) {
|
|
213
281
|
await Localization.loadCustomTranslations(this.translationUrl);
|
|
214
282
|
}
|
|
215
283
|
this.loadTransactions();
|
|
216
284
|
}
|
|
217
|
-
|
|
218
|
-
this.
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
this.setStyles(this.clientStyling);
|
|
285
|
+
componentDidLoad() {
|
|
286
|
+
if (this.stylingContainer) {
|
|
287
|
+
if (window.emMessageBus != undefined) {
|
|
288
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
222
289
|
}
|
|
223
|
-
|
|
224
|
-
this.
|
|
290
|
+
else {
|
|
291
|
+
if (this.clientStyling)
|
|
292
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
293
|
+
if (this.clientStylingUrl)
|
|
294
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
225
295
|
}
|
|
226
|
-
this.stylingAppended = true;
|
|
227
296
|
}
|
|
228
297
|
}
|
|
298
|
+
componentDidRender() {
|
|
299
|
+
this.getComponentHeight();
|
|
300
|
+
}
|
|
229
301
|
getComponentHeight() {
|
|
230
302
|
var _a;
|
|
231
303
|
if (this.mobile) {
|
|
@@ -265,11 +337,14 @@ const UserTransactionHistory = class {
|
|
|
265
337
|
showFilter() {
|
|
266
338
|
this.showMobileFilter = !this.showMobileFilter;
|
|
267
339
|
}
|
|
340
|
+
disconnectedCallback() {
|
|
341
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
342
|
+
}
|
|
268
343
|
render() {
|
|
269
344
|
var _a;
|
|
270
345
|
const filterSrc = getAssetPath('../assets/filter.svg');
|
|
271
346
|
const warningSrc = getAssetPath('../assets/warning.svg');
|
|
272
|
-
return (h(Host, { key: '
|
|
347
|
+
return (h(Host, { key: '8d6470d73afff5dbc8a8c3a1a47426223971ad47' }, this.showLoader ? h(Loader, null) : '', h("div", { key: '8c32d9425b701747559ea1e63a3b2c4bb31780ab', class: "wrapper", ref: el => (this.stylingContainer = el) }, h("div", { key: 'b2a9216bfcfa5950c174f6e06a179e2ae3790f6b', class: { 'types types-mobile': this.mobile, 'types types-desktop': !this.mobile } }, h("button", { key: 'e2ce33fe2ab27abab68bd721b8b945bde5d672ac', class: 'transaction-type' + ' ' + (this.type === '0' ? 'clicked' : ''), onClick: () => this.changeTransactionsType('0') }, Localization.translate('deposit', this.language)), h("button", { key: '6d80bef56bf4ec590cc2e4aa704f930a47b29f3c', class: 'transaction-type' + ' ' + (this.type === '1' ? 'clicked' : ''), onClick: () => this.changeTransactionsType('1') }, Localization.translate('withdrawals', this.language))), !this.mobile ? h(PageSize, { language: this.language, pageSizes: this.pageSizes, currentPageSize: this.pageSize, changePageSize: s => this.changePageSize(s) }) : '', this.mobile ? (h("button", { class: "mobile-filter-button", onClick: () => this.showFilter() }, h("img", { src: filterSrc, alt: "Filter" }), Localization.translate('filter', this.language))) : (''), !this.mobile || (this.showMobileFilter && this.mobile) ? h(Filters, { language: this.language, applyFilters: (from, to) => this.applyFilters(from, to) }) : '', ((_a = this.transactions) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (h("div", { class: "table" }, this.mobile ? (h("div", { class: "mobile-table" }, this.transactions.map(transaction => (h(TransactionComponent, Object.assign({}, transaction)))))) : (h(TableComponent, { source: this.transactions, language: this.language })))) : (h("div", { class: "noData" }, h("img", { src: warningSrc, alt: "Warning" }), h("span", null, Localization.translate('noData', this.language)))), h("div", { key: '9b7950ed91c4795f4355ce406d7cba40c46c0184', class: "pagination" }, h("button", { key: 'bc7b2bce0a21763fc5a10d2249b74c2d9805d3b5', onClick: () => this.prev() }, '<'), h("button", { key: '69210c5b101a24563babdbe6b3361d091afc2cc0', onClick: () => this.next() }, '>')))));
|
|
273
348
|
}
|
|
274
349
|
async loadTransactions() {
|
|
275
350
|
this.showLoader = true;
|
|
@@ -304,25 +379,6 @@ const UserTransactionHistory = class {
|
|
|
304
379
|
const endDate = (_b = this.to) !== null && _b !== void 0 ? _b : new Date(now.getFullYear(), now.getMonth() + 1, 0).toISOString();
|
|
305
380
|
return `offset=${offset}&endDate=${endDate}&startDate=${startDate}&type=${this.type}&limit=${this.pageSize}`;
|
|
306
381
|
}
|
|
307
|
-
setStyles(styles) {
|
|
308
|
-
const cssFile = document.createElement('style');
|
|
309
|
-
cssFile.innerHTML = styles;
|
|
310
|
-
this.stylingContainer.prepend(cssFile);
|
|
311
|
-
}
|
|
312
|
-
async setClientStylingByURL() {
|
|
313
|
-
try {
|
|
314
|
-
const response = await fetch(this.clientStylingUrl);
|
|
315
|
-
if (!response.ok) {
|
|
316
|
-
const err = await response.text();
|
|
317
|
-
throw new Error(err);
|
|
318
|
-
}
|
|
319
|
-
const styles = await response.text();
|
|
320
|
-
this.setStyles(styles);
|
|
321
|
-
}
|
|
322
|
-
catch (ex) {
|
|
323
|
-
console.error(`Failed to load client styles ${this.clientStylingUrl}`, ex);
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
382
|
static get assetsDirs() { return ["../assets"]; }
|
|
327
383
|
get el() { return getElement(this); }
|
|
328
384
|
static get watchers() { return {
|
|
@@ -331,6 +387,8 @@ const UserTransactionHistory = class {
|
|
|
331
387
|
"session": ["watchMultiple"],
|
|
332
388
|
"userId": ["watchMultiple"],
|
|
333
389
|
"pageSize": ["watchMultiple"],
|
|
390
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
391
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
334
392
|
"showMobileFilter": ["getComponentHeight"]
|
|
335
393
|
}; }
|
|
336
394
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-7c5e707a.js';
|
|
2
|
+
export { s as setNonce } from './index-7c5e707a.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v4.
|
|
6
|
+
Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
var patchBrowser = () => {
|
|
9
9
|
const importMeta = import.meta.url;
|
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["user-transaction-history",[[1,"user-transaction-history",{"endpoint":[513],"session":[513],"language":[513],"userId":[513,"user-id"],"translationUrl":[513,"translation-url"],"mobile":[516],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"page":[32],"pageSize":[32],"showMobileFilter":[32],"to":[32],"from":[32],"type":[32],"transactions":[32],"showLoader":[32]},[[9,"resize","getComponentHeight"]],{"page":["watchMultiple"],"type":["watchMultiple"],"session":["watchMultiple"],"userId":["watchMultiple"],"pageSize":["watchMultiple"],"showMobileFilter":["getComponentHeight"]}]]]], options);
|
|
19
|
+
return bootstrapLazy([["user-transaction-history",[[1,"user-transaction-history",{"endpoint":[513],"session":[513],"language":[513],"userId":[513,"user-id"],"translationUrl":[513,"translation-url"],"mobile":[516],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"page":[32],"pageSize":[32],"showMobileFilter":[32],"to":[32],"from":[32],"type":[32],"transactions":[32],"showLoader":[32]},[[9,"resize","getComponentHeight"]],{"page":["watchMultiple"],"type":["watchMultiple"],"session":["watchMultiple"],"userId":["watchMultiple"],"pageSize":["watchMultiple"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"showMobileFilter":["getComponentHeight"]}]]]], options);
|
|
20
20
|
});
|
|
@@ -3,7 +3,7 @@ export declare class UserTransactionHistory {
|
|
|
3
3
|
private pageSizes;
|
|
4
4
|
private pagination;
|
|
5
5
|
private stylingContainer;
|
|
6
|
-
private
|
|
6
|
+
private stylingSubscription;
|
|
7
7
|
el: HTMLElement;
|
|
8
8
|
endpoint: string | null;
|
|
9
9
|
session: string;
|
|
@@ -13,6 +13,7 @@ export declare class UserTransactionHistory {
|
|
|
13
13
|
mobile: boolean;
|
|
14
14
|
clientStyling: string | null;
|
|
15
15
|
clientStylingUrl: string | null;
|
|
16
|
+
mbSource: string;
|
|
16
17
|
page: number;
|
|
17
18
|
pageSize: number;
|
|
18
19
|
showMobileFilter: boolean;
|
|
@@ -22,7 +23,10 @@ export declare class UserTransactionHistory {
|
|
|
22
23
|
transactions: Transaction[];
|
|
23
24
|
showLoader: boolean;
|
|
24
25
|
watchMultiple(): void;
|
|
26
|
+
handleClientStylingChange(newValue: any, oldValue: any): void;
|
|
27
|
+
handleClientStylingUrlChange(newValue: any, oldValue: any): void;
|
|
25
28
|
componentWillLoad(): Promise<void>;
|
|
29
|
+
componentDidLoad(): void;
|
|
26
30
|
componentDidRender(): void;
|
|
27
31
|
getComponentHeight(): void;
|
|
28
32
|
setHeightTableProperty(): void;
|
|
@@ -32,9 +36,8 @@ export declare class UserTransactionHistory {
|
|
|
32
36
|
next(): void;
|
|
33
37
|
applyFilters(from: string | null, to: string | null): void;
|
|
34
38
|
showFilter(): void;
|
|
39
|
+
disconnectedCallback(): void;
|
|
35
40
|
render(): any;
|
|
36
41
|
private loadTransactions;
|
|
37
42
|
private getParams;
|
|
38
|
-
private setStyles;
|
|
39
|
-
private setClientStylingByURL;
|
|
40
43
|
}
|
|
@@ -11,6 +11,7 @@ export namespace Components {
|
|
|
11
11
|
"clientStylingUrl": string | null;
|
|
12
12
|
"endpoint": string | null;
|
|
13
13
|
"language": string;
|
|
14
|
+
"mbSource": string;
|
|
14
15
|
"mobile": boolean;
|
|
15
16
|
"session": string;
|
|
16
17
|
"translationUrl": string;
|
|
@@ -34,6 +35,7 @@ declare namespace LocalJSX {
|
|
|
34
35
|
"clientStylingUrl"?: string | null;
|
|
35
36
|
"endpoint"?: string | null;
|
|
36
37
|
"language"?: string;
|
|
38
|
+
"mbSource"?: string;
|
|
37
39
|
"mobile"?: boolean;
|
|
38
40
|
"session"?: string;
|
|
39
41
|
"translationUrl"?: string;
|
|
@@ -1015,8 +1015,6 @@ export declare namespace JSXBase {
|
|
|
1015
1015
|
autoPlay?: boolean;
|
|
1016
1016
|
autoplay?: boolean | string;
|
|
1017
1017
|
controls?: boolean;
|
|
1018
|
-
controlslist?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
|
|
1019
|
-
controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
|
|
1020
1018
|
crossOrigin?: string;
|
|
1021
1019
|
crossorigin?: string;
|
|
1022
1020
|
loop?: boolean;
|
|
@@ -1566,10 +1564,6 @@ export declare namespace JSXBase {
|
|
|
1566
1564
|
onSubmitCapture?: (event: Event) => void;
|
|
1567
1565
|
onInvalid?: (event: Event) => void;
|
|
1568
1566
|
onInvalidCapture?: (event: Event) => void;
|
|
1569
|
-
onBeforeToggle?: (event: Event) => void;
|
|
1570
|
-
onBeforeToggleCapture?: (event: Event) => void;
|
|
1571
|
-
onToggle?: (event: Event) => void;
|
|
1572
|
-
onToggleCapture?: (event: Event) => void;
|
|
1573
1567
|
onLoad?: (event: Event) => void;
|
|
1574
1568
|
onLoadCapture?: (event: Event) => void;
|
|
1575
1569
|
onError?: (event: Event) => void;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="http://www.w3.org/1999/xlink",a="undefined"!=typeof window?window:{},f=a.document||{head:{}},h={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},p=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),m=!1,y=[],v=[],w=(e,t)=>n=>{e.push(n),m||(m=!0,t&&4&h.l?g(b):h.raf(b))},$=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{$(y),$(v),(m=y.length>0)&&h.raf(b)},g=e=>p().then(e),S=w(v,!0),j=e=>{const t=new URL(e,h.o);return t.origin!==a.location.origin?t.href:t.pathname},k={},O=e=>"object"==(e=typeof e)||"function"===e;function E(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>C,map:()=>M,ok:()=>x,unwrap:()=>L,unwrapErr:()=>T});var x=e=>({isOk:!0,isErr:!1,value:e}),C=e=>({isOk:!1,isErr:!0,value:e});function M(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>x(e))):x(n)}if(e.isErr)return C(e.value);throw"should never get here"}var P,R,L=e=>{if(e.isOk)return e.value;throw e.value},T=e=>{if(e.isErr)return e.value;throw e.value},U=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!O(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?A(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,i,H);const u=A(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},A=(e,t)=>({l:0,m:e,i:t,v:null,h:null,u:null,p:null}),D={},H={forEach:(e,t)=>e.map(N).forEach(t),map:(e,t)=>e.map(N).map(t).map(W)},N=e=>({vattrs:e.u,vchildren:e.h,vkey:e.p,vname:e.$,vtag:e.m,vtext:e.i}),W=e=>{if("function"==typeof e.vtag){const t={...e.vattrs};return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),U(e.vtag,t,...e.vchildren||[])}const t=A(e.vtag,e.vtext);return t.u=e.vattrs,t.h=e.vchildren,t.p=e.vkey,t.$=e.vname,t},F=e=>n(e).$hostElement$,q=new WeakMap,G=e=>"sc-"+e.S,V=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=z(n),s=z(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=O(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}let a=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(t=c,a=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(a?e.removeAttributeNS(u,t):e.removeAttribute(t)):(!i||4&r||s)&&!o&&(l=!0===l?"":l,a?e.setAttributeNS(u,t,l):e.setAttribute(t,l))}else if(t="-"===t[2]?t.slice(3):o(a,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(B);t=t.replace(I,""),n&&h.rel(e,t,n,o),l&&h.ael(e,t,l,o)}}},_=/\s/,z=e=>e?e.split(_):[],B="Capture",I=RegExp(B+"$"),J=(e,t,n)=>{const l=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.u||k,s=t.u||k;for(const e of K(Object.keys(o)))e in s||V(l,e,o[e],void 0,n,t.l);for(const e of K(Object.keys(s)))V(l,e,o[e],s[e],n,t.l)};function K(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var Q=!1,X=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.v=f.createTextNode(l.i);else{if(Q||(Q="svg"===l.m),o=l.v=f.createElementNS(Q?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",l.m),Q&&"foreignObject"===l.m&&(Q=!1),J(null,l,Q),null!=P&&o["s-si"]!==P&&o.classList.add(o["s-si"]=P),l.h)for(r=0;r<l.h.length;++r)s=X(e,l,r),s&&o.appendChild(s);"svg"===l.m?Q=!1:"foreignObject"===o.tagName&&(Q=!0)}return o["s-hn"]=R,o},Y=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===R&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=X(null,n,o),r&&(l[o].v=r,le(i,r,t)))},Z=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.v;ne(t),e&&e.remove()}}},ee=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),te=(e,t,n=!1)=>{const l=t.v=e.v,o=e.h,s=t.h,r=t.m,i=t.i;null===i?(J(e,t,Q="svg"===r||"foreignObject"!==r&&Q),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],p=t[f],d=l.length-1,m=l[0],y=l[d];for(;i<=f&&c<=d;)if(null==h)h=t[++i];else if(null==p)p=t[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--d];else if(ee(h,m,o))te(h,m,o),h=t[++i],m=l[++c];else if(ee(p,y,o))te(p,y,o),p=t[--f],y=l[--d];else if(ee(h,y,o))te(h,y,o),le(e,h.v,p.v.nextSibling),h=t[++i],y=l[--d];else if(ee(p,m,o))te(p,m,o),le(e,p.v,h.v),p=t[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(r=t[u],r.m!==m.m?s=X(t&&t[c],n,u):(te(r,m,o),t[u]=void 0,s=r.v),m=l[++c]):(s=X(t&&t[c],n,c),m=l[++c]),s&&le(h.v.parentNode,s,h.v)}i>f?Y(e,null==l[d+1]?null:l[d+1].v,n,l,c,d):c>d&&Z(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),Y(l,null,t,s,0,s.length-1)):null!==o&&Z(o,0,o.length-1),Q&&"svg"===r&&(Q=!1)):e.i!==i&&(l.data=i)},ne=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(ne)},le=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),oe=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},se=(e,t)=>{if(e.l|=16,!(4&e.l))return oe(e,e.k),S((()=>re(e,t)));e.l|=512},re=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return t&&(e.l|=256,e.O&&(e.O.map((([e,t])=>pe(n,e,t))),e.O=void 0),l=pe(n,"componentWillLoad")),ie(l,(()=>ue(e,n,t)))},ie=(e,t)=>ce(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),ce=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,ue=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.C,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=G(t),o=i.get(l);if(e=11===e.nodeType?e:f,o)if("string"==typeof o){let s,r=q.get(e=e.head||e);if(r||q.set(e,r=new Set),!r.has(l)){{s=f.createElement("style"),s.innerHTML=o;const t=null!=(n=h.M)?n:E(f);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);ae(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>fe(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},ae=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.C,s=e.P||A(null,null),r=(e=>e&&e.m===D)(t)?t:U(null,null,t);if(R=l.tagName,o.R&&(r.u=r.u||{},o.R.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.P=r,r.v=s.v=l.shadowRoot||l,P=l["s-sc"],te(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},fe=e=>{const t=e.$hostElement$,n=e.t,l=e.k;pe(n,"componentDidRender"),64&e.l||(e.l|=64,de(t),pe(n,"componentDidLoad"),e.L(t),l||he()),e.j&&(e.j(),e.j=void 0),512&e.l&&g((()=>se(e,!1))),e.l&=-517},he=()=>{de(f.documentElement),g((()=>(e=>{const t=h.ce("appload",{detail:{namespace:"user-transaction-history"}});return e.dispatchEvent(t),t})(a)))},pe=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},de=e=>e.classList.add("hydrated"),me=(e,t,l)=>{var o,r;const i=e.prototype;if(t.T||t.U||e.watchers){e.watchers&&!t.U&&(t.U=e.watchers);const c=Object.entries(null!=(o=t.T)?o:{});if(c.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).A.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.S}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.A.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||O(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(l,o.T[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.A.set(t,l),a)){if(o.U&&128&u){const e=o.U[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&se(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){h.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.U)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.U)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.R)||o.push([e,s])),s}))]))}}return e},ye=e=>{pe(e,"disconnectedCallback")},ve=(e,l={})=>{var o;const u=[],p=l.exclude||[],m=a.customElements,y=f.head,v=y.querySelector("meta[charset]"),w=f.createElement("style"),$=[];let b,g=!0;Object.assign(h,l),h.o=new URL(l.resourcesUrl||"./",f.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],S:l[1],T:l[2],D:l[3]};4&c.l&&(S=!0),c.T=l[2],c.D=l[3],c.R=[],c.U=null!=(o=l[4])?o:{};const a=c.S,f=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,C:n,A:new Map};l.H=new Promise((e=>l.L=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.S}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){const e=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,we(this,e,c.D)),b&&(clearTimeout(b),b=null),g?$.push(this):h.jmp((()=>(e=>{if(!(1&h.l)){const t=n(e),l=t.C,o=()=>{};if(1&t.l)we(e,t,l.D),(null==t?void 0:t.t)||(null==t?void 0:t.H)&&t.H.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){oe(t,t.k=n);break}}l.T&&Object.entries(l.T).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.N){const e=(e=>{const t=e.S.replace(/-/g,"_"),n=e.N;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.S}#${t.W}" was not found`);l.isProxied||(n.U=l.watchers,me(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=G(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.k,c=()=>se(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){h.jmp((()=>(async()=>{if(!(1&h.l)){const e=n(this);e.F&&(e.F.map((e=>e())),e.F=void 0),(null==e?void 0:e.t)?ye(e.t):(null==e?void 0:e.H)&&e.H.then((()=>ye(e.t)))}})()))}componentOnReady(){return n(this).H}};c.N=e[0],p.includes(a)||m.get(a)||(u.push(a),m.define(a,me(f,c,1)))}))})),u.length>0&&(S&&(w.textContent+=c),w.textContent+=u.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const e=null!=(o=h.M)?o:E(f);null!=e&&w.setAttribute("nonce",e),y.insertBefore(w,v?v.nextSibling:y.firstChild)}g=!1,$.length?$.map((e=>e.connectedCallback())):h.jmp((()=>b=setTimeout(he,30)))},we=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=be(e,n),r=$e(t,o),i=ge(n);h.ael(s,l,r,i),(t.F=t.F||[]).push((()=>h.rel(s,l,r,i)))}))},$e=(e,t)=>n=>{var l;try{256&e.l?null==(l=e.t)||l[t](n):(e.O=e.O||[]).push([t,n])}catch(e){s(e)}},be=(e,t)=>8&t?a:e,ge=e=>({passive:!!(1&e),capture:!!(2&e)}),Se=e=>h.M=e;export{D as H,F as a,ve as b,j as g,U as h,p,l as r,Se as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,r as e,g as a,H as i,a as o}from"./p-437ed177.js";class n{constructor(){}static async loadCustomTranslations(t){try{const e=await fetch(t,{headers:{"Content-Type":"application/json"}});if(!e.ok){const t=await e.text();throw new Error(t)}const a=await e.json();n.updateTranslations(a)}catch(e){console.error(`Failed to load translations ${t}. ${e.message}`)}}static translate(t,e){var a,i;const o=n.getAvaliableLanguages(e);return(null===(i=null===(a=n.customTranslation)||void 0===a?void 0:a[o.customLanguage])||void 0===i?void 0:i[t])||n.defaultTranslation[o.predefinedLanguage][t]}static getAvaliableLanguages(t){var e;const a=(null===(e=n.customLanguages)||void 0===e?void 0:e.includes(t))?t:n.defaultLanguage;return{predefinedLanguage:n.supportedLanguages.includes(t)?t:n.defaultLanguage,customLanguage:a}}static updateTranslations(t){n.customLanguages=Array.from(new Set([...n.supportedLanguages,...Object.keys(t).map((t=>t.toLowerCase()))])),n.customTranslation=t}}n.defaultLanguage="en",n.supportedLanguages=["en"],n.defaultTranslation={en:{deposit:"Deposit",withdrawals:"Withdrawals",show:"Show",from:"From",to:"To",filter:"Filter",transactionId:"Transaction ID",date:"Date",amount:"Amount",productType:"Product Type",status:"Status",noData:"There are no account activities"},hr:{deposit:"Uplate",withdrawals:"Isplate",show:"Prikaži",from:"Od",to:"Do",filter:"Filter",transactionId:"ID transakcije",date:"Datum",amount:"Iznos",productType:"Vrsta proizvoda",status:"Status",noData:"Nema aktivnosti na računu"}};const r=()=>t("div",{class:"loader"},t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null));class s{constructor(){}static dateToFormatedString(t){return`${t.toLocaleDateString("en-gb")}, ${t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}`}}class l{constructor(){}static format(t,e){let a=`${e} ${t}`;try{a=new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(e)}catch(t){}return a}}const d=e=>t("div",{class:"data-transaction"},t("p",null,e.productType),t("p",{class:"text-style text-style-status"},t("span",{class:e.status.toLowerCase()},e.status)),t("p",{class:"date"},e.transId," | ",s.dateToFormatedString(new Date(e.created))),t("p",{class:"text-style"},l.format(e.currency,e.realAmount)," ")),c=e=>t("div",{class:"page-size"},t("span",null,n.translate("show",e.language)),e.pageSizes.map((a=>t("button",{class:e.currentPageSize===a?"active":"",onClick:()=>e.changePageSize(a)},a)))),h=({from:e,to:a,applyFilters:i,language:o})=>{let r,s;return t("div",{class:"period"},t("div",{class:"period-content"},t("div",{class:"date-input"},t("vaadin-date-picker",{value:e,ref:t=>r=t,label:n.translate("from",o),onChange:()=>{e=r.value}})),t("span",null,t("svg",{width:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"m21 11.75c0-.414-.336-.75-.75-.75h-16.5c-.414 0-.75.336-.75.75s.336.75.75.75h16.5c.414 0 .75-.336.75-.75z","fill-rule":"nonzero",fill:"#5d687b"}))),t("div",{class:"date-input"},t("vaadin-date-picker",{value:a,ref:t=>s=t,label:n.translate("to",o),onChange:()=>{a=s.value}})),t("button",{class:"filter-btn",onClick:()=>i(e,a)},n.translate("filter",o))))},p=({source:e,language:a})=>{const i=[{name:n.translate("transactionId",a)},{name:n.translate("date",a)},{name:n.translate("amount",a)},{name:n.translate("productType",a)},{name:n.translate("status",a)}];return t("table",null,t("thead",null,t("tr",null,i.map((e=>t("th",null,e.name))))),t("tbody",null,e.map((e=>t("tr",null,t("td",null,e.transId),t("td",null,s.dateToFormatedString(new Date(e.created))),t("td",null,l.format(e.currency,e.realAmount)," "),t("td",null,e.productType),t("td",null,t("span",{class:e.status.toLowerCase()},e.status)))))))};function u(t,e){if(t){const a=document.createElement("style");a.innerHTML=e,t.appendChild(a)}}function g(t,e){const a=new URL(e);fetch(a.href).then((t=>t.text())).then((e=>{const a=document.createElement("style");a.innerHTML=e,t&&t.appendChild(a)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}const b=class{constructor(t){e(this,t),this.pageSizes=[10,25,50],this.pagination=null,this.endpoint=void 0,this.session=void 0,this.language=n.defaultLanguage,this.userId=void 0,this.translationUrl=void 0,this.mobile=!1,this.clientStyling=null,this.clientStylingUrl=null,this.mbSource=void 0,this.page=0,this.pageSize=this.pageSizes[0],this.showMobileFilter=!1,this.to=void 0,this.from=void 0,this.type="0",this.transactions=void 0,this.showLoader=!0}watchMultiple(){this.loadTransactions()}handleClientStylingChange(t,e){t!=e&&u(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&this.clientStylingUrl&&g(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){this.translationUrl&&await n.loadCustomTranslations(this.translationUrl),this.loadTransactions()}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?function(t,e){if(window.emMessageBus){const a=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{a.innerHTML=e,t&&t.appendChild(a)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&u(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&g(this.stylingContainer,this.clientStylingUrl)))}componentDidRender(){this.getComponentHeight()}getComponentHeight(){var t;if(this.mobile){let e=this.el.getBoundingClientRect().height-(null===(t=this.el.shadowRoot.querySelector(".table"))||void 0===t?void 0:t.getBoundingClientRect().y);this.el.style.setProperty("--heightScrollableContainer",e+"px")}}setHeightTableProperty(){let t=this.getComponentHeight();this.el.style.setProperty("--heightScrollableContainer",t+"px")}changeTransactionsType(t){this.type=t}changePageSize(t){this.pageSize=t}prev(){var t;(null===(t=this.pagination)||void 0===t?void 0:t.previous)&&this.page--}next(){var t;(null===(t=this.pagination)||void 0===t?void 0:t.next)&&this.page++}applyFilters(t,e){this.from=t?new Date(t).toISOString():null,this.to=e?new Date(e).toISOString():null,this.loadTransactions()}showFilter(){this.showMobileFilter=!this.showMobileFilter}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){var e;const o=a("../assets/filter.svg"),s=a("../assets/warning.svg");return t(i,{key:"8d6470d73afff5dbc8a8c3a1a47426223971ad47"},this.showLoader?t(r,null):"",t("div",{key:"8c32d9425b701747559ea1e63a3b2c4bb31780ab",class:"wrapper",ref:t=>this.stylingContainer=t},t("div",{key:"b2a9216bfcfa5950c174f6e06a179e2ae3790f6b",class:{"types types-mobile":this.mobile,"types types-desktop":!this.mobile}},t("button",{key:"e2ce33fe2ab27abab68bd721b8b945bde5d672ac",class:"transaction-type "+("0"===this.type?"clicked":""),onClick:()=>this.changeTransactionsType("0")},n.translate("deposit",this.language)),t("button",{key:"6d80bef56bf4ec590cc2e4aa704f930a47b29f3c",class:"transaction-type "+("1"===this.type?"clicked":""),onClick:()=>this.changeTransactionsType("1")},n.translate("withdrawals",this.language))),this.mobile?"":t(c,{language:this.language,pageSizes:this.pageSizes,currentPageSize:this.pageSize,changePageSize:t=>this.changePageSize(t)}),this.mobile?t("button",{class:"mobile-filter-button",onClick:()=>this.showFilter()},t("img",{src:o,alt:"Filter"}),n.translate("filter",this.language)):"",!this.mobile||this.showMobileFilter&&this.mobile?t(h,{language:this.language,applyFilters:(t,e)=>this.applyFilters(t,e)}):"",(null===(e=this.transactions)||void 0===e?void 0:e.length)>0?t("div",{class:"table"},this.mobile?t("div",{class:"mobile-table"},this.transactions.map((e=>t(d,Object.assign({},e))))):t(p,{source:this.transactions,language:this.language})):t("div",{class:"noData"},t("img",{src:s,alt:"Warning"}),t("span",null,n.translate("noData",this.language))),t("div",{key:"9b7950ed91c4795f4355ce406d7cba40c46c0184",class:"pagination"},t("button",{key:"bc7b2bce0a21763fc5a10d2249b74c2d9805d3b5",onClick:()=>this.prev()},"<"),t("button",{key:"69210c5b101a24563babdbe6b3361d091afc2cc0",onClick:()=>this.next()},">"))))}async loadTransactions(){this.showLoader=!0;try{const t=`${this.endpoint}/v1/player/${this.userId}/transactions/banking?${this.getParams()}`,e=await fetch(t,{headers:{"X-Sessionid":this.session,"Content-Type":"application/json"}});if(!e.ok){const t=await e.text();throw new Error(t)}const a=await e.json();this.pagination=a.pagination,this.transactions=a.transactions}catch(t){console.error(t)}finally{this.showLoader=!1}}getParams(){var t,e;const a=new Date,i=(this.page*this.pageSize).toString(),o=null!==(t=this.from)&&void 0!==t?t:new Date(a.getFullYear(),a.getMonth(),1).toISOString();return`offset=${i}&endDate=${null!==(e=this.to)&&void 0!==e?e:new Date(a.getFullYear(),a.getMonth()+1,0).toISOString()}&startDate=${o}&type=${this.type}&limit=${this.pageSize}`}static get assetsDirs(){return["../assets"]}get el(){return o(this)}static get watchers(){return{page:["watchMultiple"],type:["watchMultiple"],session:["watchMultiple"],userId:["watchMultiple"],pageSize:["watchMultiple"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],showMobileFilter:["getComponentHeight"]}}};b.style=':host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--hoverBackground:#ffffff;--background:#e4e6e8;--success:#7ac345;--heightScrollableContainer:400px;--borderColor:#d3d3d3;--borderColorButton:#c4c4c4;--textColor:#002554;--textColorHover:#7ac345;--errorColor:#c23b21;--loaderColor:#7ac345;--headerTableBackground:#cdcdcd;--borderTable:#dedede;--shadowBorderTable:#f1f1f1;--backgroundTable:#ffffff;font-family:Roboto, Arial, sans-serif;font-size:14px;color:var(--textColor);display:block;background-color:var(--background)}:host .wrapper{height:100%;padding:1rem}:host .types{display:flex;width:100%;gap:5px}:host .transaction-type{background:inherit;font-weight:600;padding:0.6rem 1.6rem;border:1px solid #6c757d;cursor:pointer}:host .transaction-type:hover{color:var(--activeButtonBackground);border-color:var(--activeButtonBackground);background:var(--hoverBackground)}:host .clicked{background-color:var(--activeButtonBackground);border-color:var(--activeButtonBackground)}:host .types-mobile{justify-content:center;margin-bottom:15px}:host .types-desktop{justify-content:flex-end;margin-bottom:3rem}:host .page-size{display:flex;width:100%;justify-content:flex-end;align-items:center}:host .page-size button{background:transparent;border:none;cursor:pointer;margin:0.4rem;width:2rem;height:2rem}:host .page-size button:hover{color:var(--textColorHover)}:host .page-size button.active{background:var(--activeButtonBackground);color:var(--textColor);font-weight:600;border-radius:0.4rem}:host .period{display:flex;width:100%;align-items:flex-end;justify-content:center;gap:10px;background:#f0f0f0;border-bottom:2px solid #e9e9e9;padding:1.6rem 0 0;margin-bottom:4rem}@media (max-width: 801px){:host .period{margin-bottom:0;flex-direction:column;align-items:stretch;width:auto;padding:1.4rem 2.8rem;box-shadow:0 4px 5px 0 rgba(90, 90, 90, 0.24)}}:host .period .range{color:var(--errorColor)}:host .period .filter-btn{height:40px;background:transparent;border:0.1rem solid var(--borderColorButton);min-width:12rem;max-width:17rem;cursor:pointer}@media (max-width: 801px){:host .period .filter-btn{max-width:none;min-width:none;margin-top:1rem}}:host .period .filter-btn:hover{border:none;background:var(--hoverBackground)}:host .period .duet-date__input{padding:7px 60px 7px 7px}:host .period+button{padding:9px 15px}:host .period-content{display:flex;flex-direction:row;width:100%;justify-content:center;align-items:flex-end;margin:0 auto 1.6rem}@media (max-width: 801px){:host .period-content{flex-direction:column;align-items:stretch}}:host .period-content span{height:40px;display:flex;align-items:center;justify-content:center}@media (max-width: 801px){:host .period-content span{display:none}}:host .period-content .filter-btn{margin-left:60px}@media (max-width: 801px){:host .period-content .filter-btn{margin-left:0}}:host .period-content .date-input{padding:0 4px}@media (max-width: 801px){:host .period-content .date-input{width:auto}:host .period-content .date-input:first-child{margin-bottom:0.5rem}}:host .period-content .date-input label{display:inline-block;margin-bottom:0.9rem}:host .period-content .date-input input{border:0.1rem solid var(--borderColor);box-sizing:border-box;border-radius:0.2rem}:host .pagination{display:flex;width:100%;justify-content:center;margin-top:1.5rem}:host .pagination button{cursor:pointer;border:none;background-color:var(--activeButtonBackground);color:#fff;opacity:0.5;padding:7px 12px}:host .pagination button:hover{opacity:1}:host .pagination button:focus{opacity:1}:host button.active{color:var(--activeButtonFont);background-color:var(--activeButtonBackground)}.mobile-filter-button{display:flex;justify-content:center;align-items:center;width:100%;height:2.8rem;background:inherit;border:1px solid var(--borderColorButton)}.mobile-filter-button img{height:50%;margin-right:0.5rem}.noData{display:flex;align-items:center;box-shadow:0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);padding:1.1rem;border-radius:0.6rem}.noData span{margin-left:0.5rem}.table{height:var(--heightScrollableContainer);overflow-y:auto}.table .mobile-table{height:100%}.data-transaction{border-bottom:1px solid var(--borderColor);background-color:var(--hoverBackground);padding:0 20px;display:grid;grid-template-columns:repeat(2, 1fr)}.data-transaction .text-style-status{font-weight:600}.data-transaction .text-style-status .success{color:var(--success)}.data-transaction .text-style-status .error{color:var(--errorColor)}.data-transaction .text-style{text-align:end}.data-transaction .date{font-size:12px;display:flex;align-items:center}.loader{display:inline-block;position:absolute;width:80px;height:80px;top:calc(50% - 40px);left:calc(50% - 40px);z-index:100}.loader::before{content:"";position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(255, 255, 255, 0.6)}.loader div{position:absolute;width:6px;height:6px;background:var(--loaderColor);border-radius:50%;animation:loader 1.2s linear infinite}.loader div:nth-child(1){animation-delay:0s;top:37px;left:66px}.loader div:nth-child(2){animation-delay:-0.1s;top:22px;left:62px}.loader div:nth-child(3){animation-delay:-0.2s;top:11px;left:52px}.loader div:nth-child(4){animation-delay:-0.3s;top:7px;left:37px}.loader div:nth-child(5){animation-delay:-0.4s;top:11px;left:22px}.loader div:nth-child(6){animation-delay:-0.5s;top:22px;left:11px}.loader div:nth-child(7){animation-delay:-0.6s;top:37px;left:7px}.loader div:nth-child(8){animation-delay:-0.7s;top:52px;left:11px}.loader div:nth-child(9){animation-delay:-0.8s;top:62px;left:22px}.loader div:nth-child(10){animation-delay:-0.9s;top:66px;left:37px}.loader div:nth-child(11){animation-delay:-1s;top:62px;left:52px}.loader div:nth-child(12){animation-delay:-1.1s;top:52px;left:62px}@keyframes loader{0%,20%,80%,100%{transform:scale(1)}50%{transform:scale(1.5)}}.table thead th{position:sticky;top:0}table{border-collapse:collapse;width:100%}table th{padding:14px 24px;text-align:left;font-weight:600;color:var(--textColor);background:var(--headerTableBackground)}table td{padding:1rem 1.7rem;box-shadow:0 -1px 0 0 var(--shadowBorderTable) inset;border-bottom:0.1rem solid var(--borderTable);text-align:left;color:var(--textColor)}table tbody{background:var(--backgroundTable)}table .success{color:var(--success)}table .error{color:var(--errorColor)}vaadin-date-picker{min-width:320px}@media (max-width: 1261px){vaadin-date-picker{width:auto;min-width:auto}}@media (max-width: 801px){vaadin-date-picker{width:100%}}';export{b as user_transaction_history}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as e,b as t}from"./p-437ed177.js";export{s as setNonce}from"./p-437ed177.js";import{g as i}from"./p-e1255160.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((async e=>(await i(),t([["p-a465efd0",[[1,"user-transaction-history",{endpoint:[513],session:[513],language:[513],userId:[513,"user-id"],translationUrl:[513,"translation-url"],mobile:[516],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],mbSource:[513,"mb-source"],page:[32],pageSize:[32],showMobileFilter:[32],to:[32],from:[32],type:[32],transactions:[32],showLoader:[32]},[[9,"resize","getComponentHeight"]],{page:["watchMultiple"],type:["watchMultiple"],session:["watchMultiple"],userId:["watchMultiple"],pageSize:["watchMultiple"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],showMobileFilter:["getComponentHeight"]}]]]],e))));
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="http://www.w3.org/1999/xlink",a="undefined"!=typeof window?window:{},f=a.document||{head:{}},h={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},p=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),m=!1,y=[],w=[],v=(e,t)=>n=>{e.push(n),m||(m=!0,t&&4&h.l?g(b):h.raf(b))},$=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{$(y),$(w),(m=y.length>0)&&h.raf(b)},g=e=>p().then(e),S=v(w,!0),j=e=>{const t=new URL(e,h.o);return t.origin!==a.location.origin?t.href:t.pathname},k={},O=e=>"object"==(e=typeof e)||"function"===e;function E(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>C,map:()=>M,ok:()=>x,unwrap:()=>R,unwrapErr:()=>A});var x=e=>({isOk:!0,isErr:!1,value:e}),C=e=>({isOk:!1,isErr:!0,value:e});function M(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>x(e))):x(n)}if(e.isErr)return C(e.value);throw"should never get here"}var P,R=e=>{if(e.isOk)return e.value;throw e.value},A=e=>{if(e.isErr)return e.value;throw e.value},H=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!O(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?D(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,i,T);const u=D(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},D=(e,t)=>({l:0,m:e,i:t,v:null,h:null,u:null,p:null}),L={},T={forEach:(e,t)=>e.map(U).forEach(t),map:(e,t)=>e.map(U).map(t).map(N)},U=e=>({vattrs:e.u,vchildren:e.h,vkey:e.p,vname:e.$,vtag:e.m,vtext:e.i}),N=e=>{if("function"==typeof e.vtag){const t={...e.vattrs};return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),H(e.vtag,t,...e.vchildren||[])}const t=D(e.vtag,e.vtext);return t.u=e.vattrs,t.h=e.vchildren,t.p=e.vkey,t.$=e.vname,t},W=e=>n(e).$hostElement$,F=new WeakMap,q=e=>"sc-"+e.S,G=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=_(n),s=_(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=O(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||("function"==typeof e.__lookupSetter__(t)?e[t]=o:e.setAttribute(t,o))}}catch(e){}let a=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(t=c,a=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(a?e.removeAttributeNS(u,t):e.removeAttribute(t)):(!i||4&r||s)&&!o&&(l=!0===l?"":l,a?e.setAttributeNS(u,t,l):e.setAttribute(t,l))}else if(t="-"===t[2]?t.slice(3):o(a,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(z);t=t.replace(B,""),n&&h.rel(e,t,n,o),l&&h.ael(e,t,l,o)}}},V=/\s/,_=e=>e?e.split(V):[],z="Capture",B=RegExp(z+"$"),I=(e,t,n)=>{const l=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.u||k,s=t.u||k;for(const e of J(Object.keys(o)))e in s||G(l,e,o[e],void 0,n,t.l);for(const e of J(Object.keys(s)))G(l,e,o[e],s[e],n,t.l)};function J(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var K=!1,Q=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.v=f.createTextNode(l.i);else{if(K||(K="svg"===l.m),o=l.v=f.createElementNS(K?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",l.m),K&&"foreignObject"===l.m&&(K=!1),I(null,l,K),o.getRootNode().querySelector("body"),l.h)for(r=0;r<l.h.length;++r)s=Q(e,l,r),s&&o.appendChild(s);"svg"===l.m?K=!1:"foreignObject"===o.tagName&&(K=!0)}return o["s-hn"]=P,o},X=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===P&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=Q(null,n,o),r&&(l[o].v=r,ne(i,r,t)))},Y=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.v;te(t),e&&e.remove()}}},Z=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),ee=(e,t,n=!1)=>{const l=t.v=e.v,o=e.h,s=t.h,r=t.m,i=t.i;null===i?(I(e,t,K="svg"===r||"foreignObject"!==r&&K),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],p=t[f],d=l.length-1,m=l[0],y=l[d];for(;i<=f&&c<=d;)if(null==h)h=t[++i];else if(null==p)p=t[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--d];else if(Z(h,m,o))ee(h,m,o),h=t[++i],m=l[++c];else if(Z(p,y,o))ee(p,y,o),p=t[--f],y=l[--d];else if(Z(h,y,o))ee(h,y,o),ne(e,h.v,p.v.nextSibling),h=t[++i],y=l[--d];else if(Z(p,m,o))ee(p,m,o),ne(e,p.v,h.v),p=t[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(r=t[u],r.m!==m.m?s=Q(t&&t[c],n,u):(ee(r,m,o),t[u]=void 0,s=r.v),m=l[++c]):(s=Q(t&&t[c],n,c),m=l[++c]),s&&ne(h.v.parentNode,s,h.v)}i>f?X(e,null==l[d+1]?null:l[d+1].v,n,l,c,d):c>d&&Y(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),X(l,null,t,s,0,s.length-1)):!n&&null!==o&&Y(o,0,o.length-1),K&&"svg"===r&&(K=!1)):e.i!==i&&(l.data=i)},te=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(te)},ne=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),le=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},oe=(e,t)=>{if(e.l|=16,!(4&e.l))return le(e,e.k),S((()=>se(e,t)));e.l|=512},se=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return t&&(e.l|=256,e.O&&(e.O.map((([e,t])=>he(n,e,t))),e.O=void 0),l=he(n,"componentWillLoad")),re(l,(()=>ce(e,n,t)))},re=(e,t)=>ie(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),ie=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,ce=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.C,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=q(t),o=i.get(l);if(e=11===e.nodeType?e:f,o)if("string"==typeof o){let s,r=F.get(e=e.head||e);if(r||F.set(e,r=new Set),!r.has(l)){{s=f.createElement("style"),s.innerHTML=o;const l=null!=(n=h.M)?n:E(f);if(null!=l&&s.setAttribute("nonce",l),!(1&t.l))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,n)}else if("host"in e)if(d){const t=new CSSStyleSheet;t.replaceSync(o),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=o+t.innerHTML:e.prepend(s)}else e.append(s);1&t.l&&"HEAD"!==e.nodeName&&e.insertBefore(s,null)}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&2&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);ue(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>ae(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},ue=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.C,s=e.P||D(null,null),r=(e=>e&&e.m===L)(t)?t:H(null,null,t);if(P=l.tagName,o.R&&(r.u=r.u||{},o.R.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.P=r,r.v=s.v=l.shadowRoot||l,ee(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},ae=e=>{const t=e.$hostElement$,n=e.k;he(e.t,"componentDidRender"),64&e.l||(e.l|=64,pe(t),e.A(t),n||fe()),e.j&&(e.j(),e.j=void 0),512&e.l&&g((()=>oe(e,!1))),e.l&=-517},fe=()=>{pe(f.documentElement),g((()=>(e=>{const t=h.ce("appload",{detail:{namespace:"user-transaction-history"}});return e.dispatchEvent(t),t})(a)))},he=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},pe=e=>e.classList.add("hydrated"),de=(e,t,l)=>{var o,r;const i=e.prototype;if(t.H||t.D||e.watchers){e.watchers&&!t.D&&(t.D=e.watchers);const c=Object.entries(null!=(o=t.H)?o:{});if(c.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).L.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.S}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.L.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||O(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(l,o.H[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.L.set(t,l),a)){if(o.D&&128&u){const e=o.D[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&oe(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){h.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.D)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.D)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.R)||o.push([e,s])),s}))]))}}return e},me=(e,l={})=>{var o;const u=[],p=l.exclude||[],m=a.customElements,y=f.head,w=y.querySelector("meta[charset]"),v=f.createElement("style"),$=[];let b,g=!0;Object.assign(h,l),h.o=new URL(l.resourcesUrl||"./",f.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],S:l[1],H:l[2],T:l[3]};4&c.l&&(S=!0),c.H=l[2],c.T=l[3],c.R=[],c.D=null!=(o=l[4])?o:{};const a=c.S,f=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,C:n,L:new Map};l.U=new Promise((e=>l.A=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.S}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){const e=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,ye(this,e,c.T)),b&&(clearTimeout(b),b=null),g?$.push(this):h.jmp((()=>(e=>{if(!(1&h.l)){const t=n(e),l=t.C,o=()=>{};if(1&t.l)ye(e,t,l.T),(null==t?void 0:t.t)||(null==t?void 0:t.U)&&t.U.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){le(t,t.k=n);break}}l.H&&Object.entries(l.H).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.N){const e=(e=>{const t=e.S.replace(/-/g,"_"),n=e.N;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.S}#${t.W}" was not found`);l.isProxied||(n.D=l.watchers,de(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=q(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.k,c=()=>oe(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){h.jmp((()=>(async()=>{if(!(1&h.l)){const e=n(this);e.F&&(e.F.map((e=>e())),e.F=void 0),(null==e?void 0:e.t)||(null==e?void 0:e.U)&&e.U.then((()=>{}))}})()))}componentOnReady(){return n(this).U}};c.N=e[0],p.includes(a)||m.get(a)||(u.push(a),m.define(a,de(f,c,1)))}))})),u.length>0&&(S&&(v.textContent+=c),v.textContent+=u.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",v.innerHTML.length)){v.setAttribute("data-styles","");const e=null!=(o=h.M)?o:E(f);null!=e&&v.setAttribute("nonce",e),y.insertBefore(v,w?w.nextSibling:y.firstChild)}g=!1,$.length?$.map((e=>e.connectedCallback())):h.jmp((()=>b=setTimeout(fe,30)))},ye=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=ve(e,n),r=we(t,o),i=$e(n);h.ael(s,l,r,i),(t.F=t.F||[]).push((()=>h.rel(s,l,r,i)))}))},we=(e,t)=>n=>{var l;try{256&e.l?null==(l=e.t)||l[t](n):(e.O=e.O||[]).push([t,n])}catch(e){s(e)}},ve=(e,t)=>8&t?a:e,$e=e=>({passive:!!(1&e),capture:!!(2&e)}),be=e=>h.M=e;export{L as H,W as a,me as b,j as g,H as h,p,l as r,be as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t,r as e,g as a,H as o,a as i}from"./p-380caf32.js";class n{constructor(){}static async loadCustomTranslations(t){try{const e=await fetch(t,{headers:{"Content-Type":"application/json"}});if(!e.ok){const t=await e.text();throw new Error(t)}const a=await e.json();n.updateTranslations(a)}catch(e){console.error(`Failed to load translations ${t}. ${e.message}`)}}static translate(t,e){var a,o;const i=n.getAvaliableLanguages(e);return(null===(o=null===(a=n.customTranslation)||void 0===a?void 0:a[i.customLanguage])||void 0===o?void 0:o[t])||n.defaultTranslation[i.predefinedLanguage][t]}static getAvaliableLanguages(t){var e;const a=(null===(e=n.customLanguages)||void 0===e?void 0:e.includes(t))?t:n.defaultLanguage;return{predefinedLanguage:n.supportedLanguages.includes(t)?t:n.defaultLanguage,customLanguage:a}}static updateTranslations(t){n.customLanguages=Array.from(new Set([...n.supportedLanguages,...Object.keys(t).map((t=>t.toLowerCase()))])),n.customTranslation=t}}n.defaultLanguage="en",n.supportedLanguages=["en"],n.defaultTranslation={en:{deposit:"Deposit",withdrawals:"Withdrawals",show:"Show",from:"From",to:"To",filter:"Filter",transactionId:"Transaction ID",date:"Date",amount:"Amount",productType:"Product Type",status:"Status",noData:"There are no account activities"},hr:{deposit:"Uplate",withdrawals:"Isplate",show:"Prikaži",from:"Od",to:"Do",filter:"Filter",transactionId:"ID transakcije",date:"Datum",amount:"Iznos",productType:"Vrsta proizvoda",status:"Status",noData:"Nema aktivnosti na računu"}};const r=()=>t("div",{class:"loader"},t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null),t("div",null));class s{constructor(){}static dateToFormatedString(t){return`${t.toLocaleDateString("en-gb")}, ${t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}`}}class l{constructor(){}static format(t,e){let a=`${e} ${t}`;try{a=new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(e)}catch(t){}return a}}const d=e=>t("div",{class:"data-transaction"},t("p",null,e.productType),t("p",{class:"text-style text-style-status"},t("span",{class:e.status.toLowerCase()},e.status)),t("p",{class:"date"},e.transId," | ",s.dateToFormatedString(new Date(e.created))),t("p",{class:"text-style"},l.format(e.currency,e.realAmount)," ")),c=e=>t("div",{class:"page-size"},t("span",null,n.translate("show",e.language)),e.pageSizes.map((a=>t("button",{class:e.currentPageSize===a?"active":"",onClick:()=>e.changePageSize(a)},a)))),h=({from:e,to:a,applyFilters:o,language:i})=>{let r,s;return t("div",{class:"period"},t("div",{class:"period-content"},t("div",{class:"date-input"},t("vaadin-date-picker",{value:e,ref:t=>r=t,label:n.translate("from",i),onChange:()=>{e=r.value}})),t("span",null,t("svg",{width:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"m21 11.75c0-.414-.336-.75-.75-.75h-16.5c-.414 0-.75.336-.75.75s.336.75.75.75h16.5c.414 0 .75-.336.75-.75z","fill-rule":"nonzero",fill:"#5d687b"}))),t("div",{class:"date-input"},t("vaadin-date-picker",{value:a,ref:t=>s=t,label:n.translate("to",i),onChange:()=>{a=s.value}})),t("button",{class:"filter-btn",onClick:()=>o(e,a)},n.translate("filter",i))))},p=({source:e,language:a})=>{const o=[{name:n.translate("transactionId",a)},{name:n.translate("date",a)},{name:n.translate("amount",a)},{name:n.translate("productType",a)},{name:n.translate("status",a)}];return t("table",null,t("thead",null,t("tr",null,o.map((e=>t("th",null,e.name))))),t("tbody",null,e.map((e=>t("tr",null,t("td",null,e.transId),t("td",null,s.dateToFormatedString(new Date(e.created))),t("td",null,l.format(e.currency,e.realAmount)," "),t("td",null,e.productType),t("td",null,t("span",{class:e.status.toLowerCase()},e.status)))))))},u=class{constructor(t){e(this,t),this.pageSizes=[10,25,50],this.pagination=null,this.stylingAppended=!1,this.endpoint=void 0,this.session=void 0,this.language=n.defaultLanguage,this.userId=void 0,this.translationUrl=void 0,this.mobile=!1,this.clientStyling=null,this.clientStylingUrl=null,this.page=0,this.pageSize=this.pageSizes[0],this.showMobileFilter=!1,this.to=void 0,this.from=void 0,this.type="0",this.transactions=void 0,this.showLoader=!0}watchMultiple(){this.loadTransactions()}async componentWillLoad(){this.translationUrl&&await n.loadCustomTranslations(this.translationUrl),this.loadTransactions()}componentDidRender(){this.getComponentHeight(),!this.stylingAppended&&this.stylingContainer&&(this.clientStyling&&this.setStyles(this.clientStyling),this.clientStylingUrl&&this.setClientStylingByURL(),this.stylingAppended=!0)}getComponentHeight(){var t;if(this.mobile){let e=this.el.getBoundingClientRect().height-(null===(t=this.el.shadowRoot.querySelector(".table"))||void 0===t?void 0:t.getBoundingClientRect().y);this.el.style.setProperty("--heightScrollableContainer",e+"px")}}setHeightTableProperty(){let t=this.getComponentHeight();this.el.style.setProperty("--heightScrollableContainer",t+"px")}changeTransactionsType(t){this.type=t}changePageSize(t){this.pageSize=t}prev(){var t;(null===(t=this.pagination)||void 0===t?void 0:t.previous)&&this.page--}next(){var t;(null===(t=this.pagination)||void 0===t?void 0:t.next)&&this.page++}applyFilters(t,e){this.from=t?new Date(t).toISOString():null,this.to=e?new Date(e).toISOString():null,this.loadTransactions()}showFilter(){this.showMobileFilter=!this.showMobileFilter}render(){var e;const i=a("../assets/filter.svg"),s=a("../assets/warning.svg");return t(o,{key:"c850ba36433277706247f4b7c0c08b0ae0fb8c76"},this.showLoader?t(r,null):"",t("div",{key:"20b817b5c9cf14e8af0db2ba417d09e21b6921d7",class:"wrapper",ref:t=>this.stylingContainer=t},t("div",{key:"3943f4ab79cb0e72083821b424000f96779e78a5",class:{"types types-mobile":this.mobile,"types types-desktop":!this.mobile}},t("button",{key:"d1f3dfc1f4fc7013bd81c92663f578129f63c0e7",class:"transaction-type "+("0"===this.type?"clicked":""),onClick:()=>this.changeTransactionsType("0")},n.translate("deposit",this.language)),t("button",{key:"46989070ef6703fdf7c8c7ac6628e9dce731fec6",class:"transaction-type "+("1"===this.type?"clicked":""),onClick:()=>this.changeTransactionsType("1")},n.translate("withdrawals",this.language))),this.mobile?"":t(c,{language:this.language,pageSizes:this.pageSizes,currentPageSize:this.pageSize,changePageSize:t=>this.changePageSize(t)}),this.mobile?t("button",{class:"mobile-filter-button",onClick:()=>this.showFilter()},t("img",{src:i,alt:"Filter"}),n.translate("filter",this.language)):"",!this.mobile||this.showMobileFilter&&this.mobile?t(h,{language:this.language,applyFilters:(t,e)=>this.applyFilters(t,e)}):"",(null===(e=this.transactions)||void 0===e?void 0:e.length)>0?t("div",{class:"table"},this.mobile?t("div",{class:"mobile-table"},this.transactions.map((e=>t(d,Object.assign({},e))))):t(p,{source:this.transactions,language:this.language})):t("div",{class:"noData"},t("img",{src:s,alt:"Warning"}),t("span",null,n.translate("noData",this.language))),t("div",{key:"50710657788295389a20d59e0092dd033e428268",class:"pagination"},t("button",{key:"cd29c880eab413a06666dc12c8df38d3ffdcfe2f",onClick:()=>this.prev()},"<"),t("button",{key:"df351ecd4237433a8ab38766669ac48d2548ed6a",onClick:()=>this.next()},">"))))}async loadTransactions(){this.showLoader=!0;try{const t=`${this.endpoint}/v1/player/${this.userId}/transactions/banking?${this.getParams()}`,e=await fetch(t,{headers:{"X-Sessionid":this.session,"Content-Type":"application/json"}});if(!e.ok){const t=await e.text();throw new Error(t)}const a=await e.json();this.pagination=a.pagination,this.transactions=a.transactions}catch(t){console.error(t)}finally{this.showLoader=!1}}getParams(){var t,e;const a=new Date,o=(this.page*this.pageSize).toString(),i=null!==(t=this.from)&&void 0!==t?t:new Date(a.getFullYear(),a.getMonth(),1).toISOString();return`offset=${o}&endDate=${null!==(e=this.to)&&void 0!==e?e:new Date(a.getFullYear(),a.getMonth()+1,0).toISOString()}&startDate=${i}&type=${this.type}&limit=${this.pageSize}`}setStyles(t){const e=document.createElement("style");e.innerHTML=t,this.stylingContainer.prepend(e)}async setClientStylingByURL(){try{const t=await fetch(this.clientStylingUrl);if(!t.ok){const e=await t.text();throw new Error(e)}const e=await t.text();this.setStyles(e)}catch(t){console.error(`Failed to load client styles ${this.clientStylingUrl}`,t)}}static get assetsDirs(){return["../assets"]}get el(){return i(this)}static get watchers(){return{page:["watchMultiple"],type:["watchMultiple"],session:["watchMultiple"],userId:["watchMultiple"],pageSize:["watchMultiple"],showMobileFilter:["getComponentHeight"]}}};u.style=':host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--hoverBackground:#ffffff;--background:#e4e6e8;--success:#7ac345;--heightScrollableContainer:400px;--borderColor:#d3d3d3;--borderColorButton:#c4c4c4;--textColor:#002554;--textColorHover:#7ac345;--errorColor:#c23b21;--loaderColor:#7ac345;--headerTableBackground:#cdcdcd;--borderTable:#dedede;--shadowBorderTable:#f1f1f1;--backgroundTable:#ffffff;font-family:Roboto, Arial, sans-serif;font-size:14px;color:var(--textColor);display:block;background-color:var(--background)}:host .wrapper{height:100%;padding:1rem}:host .types{display:flex;width:100%;gap:5px}:host .transaction-type{background:inherit;font-weight:600;padding:0.6rem 1.6rem;border:1px solid #6c757d;cursor:pointer}:host .transaction-type:hover{color:var(--activeButtonBackground);border-color:var(--activeButtonBackground);background:var(--hoverBackground)}:host .clicked{background-color:var(--activeButtonBackground);border-color:var(--activeButtonBackground)}:host .types-mobile{justify-content:center;margin-bottom:15px}:host .types-desktop{justify-content:flex-end;margin-bottom:3rem}:host .page-size{display:flex;width:100%;justify-content:flex-end;align-items:center}:host .page-size button{background:transparent;border:none;cursor:pointer;margin:0.4rem;width:2rem;height:2rem}:host .page-size button:hover{color:var(--textColorHover)}:host .page-size button.active{background:var(--activeButtonBackground);color:var(--textColor);font-weight:600;border-radius:0.4rem}:host .period{display:flex;width:100%;align-items:flex-end;justify-content:center;gap:10px;background:#f0f0f0;border-bottom:2px solid #e9e9e9;padding:1.6rem 0 0;margin-bottom:4rem}@media (max-width: 801px){:host .period{margin-bottom:0;flex-direction:column;align-items:stretch;width:auto;padding:1.4rem 2.8rem;box-shadow:0 4px 5px 0 rgba(90, 90, 90, 0.24)}}:host .period .range{color:var(--errorColor)}:host .period .filter-btn{height:40px;background:transparent;border:0.1rem solid var(--borderColorButton);min-width:12rem;max-width:17rem;cursor:pointer}@media (max-width: 801px){:host .period .filter-btn{max-width:none;min-width:none;margin-top:1rem}}:host .period .filter-btn:hover{border:none;background:var(--hoverBackground)}:host .period .duet-date__input{padding:7px 60px 7px 7px}:host .period+button{padding:9px 15px}:host .period-content{display:flex;flex-direction:row;width:100%;justify-content:center;align-items:flex-end;margin:0 auto 1.6rem}@media (max-width: 801px){:host .period-content{flex-direction:column;align-items:stretch}}:host .period-content span{height:40px;display:flex;align-items:center;justify-content:center}@media (max-width: 801px){:host .period-content span{display:none}}:host .period-content .filter-btn{margin-left:60px}@media (max-width: 801px){:host .period-content .filter-btn{margin-left:0}}:host .period-content .date-input{padding:0 4px}@media (max-width: 801px){:host .period-content .date-input{width:auto}:host .period-content .date-input:first-child{margin-bottom:0.5rem}}:host .period-content .date-input label{display:inline-block;margin-bottom:0.9rem}:host .period-content .date-input input{border:0.1rem solid var(--borderColor);box-sizing:border-box;border-radius:0.2rem}:host .pagination{display:flex;width:100%;justify-content:center;margin-top:1.5rem}:host .pagination button{cursor:pointer;border:none;background-color:var(--activeButtonBackground);color:#fff;opacity:0.5;padding:7px 12px}:host .pagination button:hover{opacity:1}:host .pagination button:focus{opacity:1}:host button.active{color:var(--activeButtonFont);background-color:var(--activeButtonBackground)}.mobile-filter-button{display:flex;justify-content:center;align-items:center;width:100%;height:2.8rem;background:inherit;border:1px solid var(--borderColorButton)}.mobile-filter-button img{height:50%;margin-right:0.5rem}.noData{display:flex;align-items:center;box-shadow:0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);padding:1.1rem;border-radius:0.6rem}.noData span{margin-left:0.5rem}.table{height:var(--heightScrollableContainer);overflow-y:auto}.table .mobile-table{height:100%}.data-transaction{border-bottom:1px solid var(--borderColor);background-color:var(--hoverBackground);padding:0 20px;display:grid;grid-template-columns:repeat(2, 1fr)}.data-transaction .text-style-status{font-weight:600}.data-transaction .text-style-status .success{color:var(--success)}.data-transaction .text-style-status .error{color:var(--errorColor)}.data-transaction .text-style{text-align:end}.data-transaction .date{font-size:12px;display:flex;align-items:center}.loader{display:inline-block;position:absolute;width:80px;height:80px;top:calc(50% - 40px);left:calc(50% - 40px);z-index:100}.loader::before{content:"";position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(255, 255, 255, 0.6)}.loader div{position:absolute;width:6px;height:6px;background:var(--loaderColor);border-radius:50%;animation:loader 1.2s linear infinite}.loader div:nth-child(1){animation-delay:0s;top:37px;left:66px}.loader div:nth-child(2){animation-delay:-0.1s;top:22px;left:62px}.loader div:nth-child(3){animation-delay:-0.2s;top:11px;left:52px}.loader div:nth-child(4){animation-delay:-0.3s;top:7px;left:37px}.loader div:nth-child(5){animation-delay:-0.4s;top:11px;left:22px}.loader div:nth-child(6){animation-delay:-0.5s;top:22px;left:11px}.loader div:nth-child(7){animation-delay:-0.6s;top:37px;left:7px}.loader div:nth-child(8){animation-delay:-0.7s;top:52px;left:11px}.loader div:nth-child(9){animation-delay:-0.8s;top:62px;left:22px}.loader div:nth-child(10){animation-delay:-0.9s;top:66px;left:37px}.loader div:nth-child(11){animation-delay:-1s;top:62px;left:52px}.loader div:nth-child(12){animation-delay:-1.1s;top:52px;left:62px}@keyframes loader{0%,20%,80%,100%{transform:scale(1)}50%{transform:scale(1.5)}}.table thead th{position:sticky;top:0}table{border-collapse:collapse;width:100%}table th{padding:14px 24px;text-align:left;font-weight:600;color:var(--textColor);background:var(--headerTableBackground)}table td{padding:1rem 1.7rem;box-shadow:0 -1px 0 0 var(--shadowBorderTable) inset;border-bottom:0.1rem solid var(--borderTable);text-align:left;color:var(--textColor)}table tbody{background:var(--backgroundTable)}table .success{color:var(--success)}table .error{color:var(--errorColor)}vaadin-date-picker{min-width:320px}@media (max-width: 1261px){vaadin-date-picker{width:auto;min-width:auto}}@media (max-width: 801px){vaadin-date-picker{width:100%}}';export{u as user_transaction_history}
|