@everymatrix/user-transaction-history 1.54.12 → 1.56.0
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-affbdde9.js → index-cf677425.js} +11 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/user-transaction-history.cjs.entry.js +87 -30
- package/dist/cjs/user-transaction-history.cjs.js +2 -2
- package/dist/collection/components/user-transaction-history/user-transaction-history.js +53 -29
- package/dist/esm/{index-0a27499c.js → index-12dd2b03.js} +11 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/user-transaction-history.entry.js +87 -30
- package/dist/esm/user-transaction-history.js +3 -3
- package/dist/types/components/user-transaction-history/user-transaction-history.d.ts +6 -3
- package/dist/types/components.d.ts +2 -0
- package/dist/user-transaction-history/p-71a8cd66.js +2 -0
- package/dist/user-transaction-history/p-ce923f40.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-2782f82e.entry.js +0 -1
- package/dist/user-transaction-history/p-6e36bace.js +0 -2
|
@@ -21,7 +21,7 @@ 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, modernPropertyDecls: 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
27
|
Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -985,6 +985,9 @@ var postUpdateComponent = (hostRef) => {
|
|
|
985
985
|
{
|
|
986
986
|
addHydratedFlag(elm);
|
|
987
987
|
}
|
|
988
|
+
{
|
|
989
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
990
|
+
}
|
|
988
991
|
endPostUpdate();
|
|
989
992
|
{
|
|
990
993
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1299,6 +1302,9 @@ var connectedCallback = (elm) => {
|
|
|
1299
1302
|
}
|
|
1300
1303
|
};
|
|
1301
1304
|
var disconnectInstance = (instance, elm) => {
|
|
1305
|
+
{
|
|
1306
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1307
|
+
}
|
|
1302
1308
|
};
|
|
1303
1309
|
var disconnectedCallback = async (elm) => {
|
|
1304
1310
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1309,8 +1315,10 @@ var disconnectedCallback = async (elm) => {
|
|
|
1309
1315
|
hostRef.$rmListeners$ = void 0;
|
|
1310
1316
|
}
|
|
1311
1317
|
}
|
|
1312
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1313
|
-
hostRef.$
|
|
1318
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1319
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1320
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1321
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1314
1322
|
}
|
|
1315
1323
|
}
|
|
1316
1324
|
if (rootAppliedStyles.has(elm)) {
|
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-cf677425.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-cf677425.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
|
/*
|
|
196
252
|
* Language of the application.
|
|
197
253
|
*/
|
|
@@ -217,24 +273,39 @@ const UserTransactionHistory = class {
|
|
|
217
273
|
watchMultiple() {
|
|
218
274
|
this.loadTransactions();
|
|
219
275
|
}
|
|
276
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
277
|
+
if (newValue != oldValue) {
|
|
278
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
282
|
+
if (newValue != oldValue) {
|
|
283
|
+
if (this.clientStylingUrl)
|
|
284
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
220
287
|
async componentWillLoad() {
|
|
221
288
|
if (this.translationUrl) {
|
|
222
289
|
await Localization.loadCustomTranslations(this.translationUrl);
|
|
223
290
|
}
|
|
224
291
|
this.loadTransactions();
|
|
225
292
|
}
|
|
226
|
-
|
|
227
|
-
this.
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
this.setStyles(this.clientStyling);
|
|
293
|
+
componentDidLoad() {
|
|
294
|
+
if (this.stylingContainer) {
|
|
295
|
+
if (window.emMessageBus != undefined) {
|
|
296
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
231
297
|
}
|
|
232
|
-
|
|
233
|
-
this.
|
|
298
|
+
else {
|
|
299
|
+
if (this.clientStyling)
|
|
300
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
301
|
+
if (this.clientStylingUrl)
|
|
302
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
234
303
|
}
|
|
235
|
-
this.stylingAppended = true;
|
|
236
304
|
}
|
|
237
305
|
}
|
|
306
|
+
componentDidRender() {
|
|
307
|
+
this.getComponentHeight();
|
|
308
|
+
}
|
|
238
309
|
getComponentHeight() {
|
|
239
310
|
var _a;
|
|
240
311
|
if (this.mobile) {
|
|
@@ -274,11 +345,14 @@ const UserTransactionHistory = class {
|
|
|
274
345
|
showFilter() {
|
|
275
346
|
this.showMobileFilter = !this.showMobileFilter;
|
|
276
347
|
}
|
|
348
|
+
disconnectedCallback() {
|
|
349
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
350
|
+
}
|
|
277
351
|
render() {
|
|
278
352
|
var _a;
|
|
279
353
|
const filterSrc = index.getAssetPath('../assets/filter.svg');
|
|
280
354
|
const warningSrc = index.getAssetPath('../assets/warning.svg');
|
|
281
|
-
return (index.h(index.Host, { key: '
|
|
355
|
+
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() }, '>')))));
|
|
282
356
|
}
|
|
283
357
|
async loadTransactions() {
|
|
284
358
|
this.showLoader = true;
|
|
@@ -313,25 +387,6 @@ const UserTransactionHistory = class {
|
|
|
313
387
|
const endDate = (_b = this.to) !== null && _b !== void 0 ? _b : new Date(now.getFullYear(), now.getMonth() + 1, 0).toISOString();
|
|
314
388
|
return `offset=${offset}&endDate=${endDate}&startDate=${startDate}&type=${this.type}&limit=${this.pageSize}`;
|
|
315
389
|
}
|
|
316
|
-
setStyles(styles) {
|
|
317
|
-
const cssFile = document.createElement('style');
|
|
318
|
-
cssFile.innerHTML = styles;
|
|
319
|
-
this.stylingContainer.prepend(cssFile);
|
|
320
|
-
}
|
|
321
|
-
async setClientStylingByURL() {
|
|
322
|
-
try {
|
|
323
|
-
const response = await fetch(this.clientStylingUrl);
|
|
324
|
-
if (!response.ok) {
|
|
325
|
-
const err = await response.text();
|
|
326
|
-
throw new Error(err);
|
|
327
|
-
}
|
|
328
|
-
const styles = await response.text();
|
|
329
|
-
this.setStyles(styles);
|
|
330
|
-
}
|
|
331
|
-
catch (ex) {
|
|
332
|
-
console.error(`Failed to load client styles ${this.clientStylingUrl}`, ex);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
390
|
static get assetsDirs() { return ["../assets"]; }
|
|
336
391
|
get el() { return index.getElement(this); }
|
|
337
392
|
static get watchers() { return {
|
|
@@ -340,6 +395,8 @@ const UserTransactionHistory = class {
|
|
|
340
395
|
"session": ["watchMultiple"],
|
|
341
396
|
"userId": ["watchMultiple"],
|
|
342
397
|
"pageSize": ["watchMultiple"],
|
|
398
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
399
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
343
400
|
"showMobileFilter": ["getComponentHeight"]
|
|
344
401
|
}; }
|
|
345
402
|
};
|
|
@@ -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-cf677425.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -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
|
/*
|
|
14
14
|
* Language of the application.
|
|
15
15
|
*/
|
|
@@ -35,24 +35,39 @@ export class UserTransactionHistory {
|
|
|
35
35
|
watchMultiple() {
|
|
36
36
|
this.loadTransactions();
|
|
37
37
|
}
|
|
38
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
39
|
+
if (newValue != oldValue) {
|
|
40
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
44
|
+
if (newValue != oldValue) {
|
|
45
|
+
if (this.clientStylingUrl)
|
|
46
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
38
49
|
async componentWillLoad() {
|
|
39
50
|
if (this.translationUrl) {
|
|
40
51
|
await Localization.loadCustomTranslations(this.translationUrl);
|
|
41
52
|
}
|
|
42
53
|
this.loadTransactions();
|
|
43
54
|
}
|
|
44
|
-
|
|
45
|
-
this.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
this.setStyles(this.clientStyling);
|
|
55
|
+
componentDidLoad() {
|
|
56
|
+
if (this.stylingContainer) {
|
|
57
|
+
if (window.emMessageBus != undefined) {
|
|
58
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
49
59
|
}
|
|
50
|
-
|
|
51
|
-
this.
|
|
60
|
+
else {
|
|
61
|
+
if (this.clientStyling)
|
|
62
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
63
|
+
if (this.clientStylingUrl)
|
|
64
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
52
65
|
}
|
|
53
|
-
this.stylingAppended = true;
|
|
54
66
|
}
|
|
55
67
|
}
|
|
68
|
+
componentDidRender() {
|
|
69
|
+
this.getComponentHeight();
|
|
70
|
+
}
|
|
56
71
|
getComponentHeight() {
|
|
57
72
|
var _a;
|
|
58
73
|
if (this.mobile) {
|
|
@@ -92,11 +107,14 @@ export class UserTransactionHistory {
|
|
|
92
107
|
showFilter() {
|
|
93
108
|
this.showMobileFilter = !this.showMobileFilter;
|
|
94
109
|
}
|
|
110
|
+
disconnectedCallback() {
|
|
111
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
112
|
+
}
|
|
95
113
|
render() {
|
|
96
114
|
var _a;
|
|
97
115
|
const filterSrc = getAssetPath('../assets/filter.svg');
|
|
98
116
|
const warningSrc = getAssetPath('../assets/warning.svg');
|
|
99
|
-
return (h(Host, { key: '
|
|
117
|
+
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() }, '>')))));
|
|
100
118
|
}
|
|
101
119
|
async loadTransactions() {
|
|
102
120
|
this.showLoader = true;
|
|
@@ -131,25 +149,6 @@ export class UserTransactionHistory {
|
|
|
131
149
|
const endDate = (_b = this.to) !== null && _b !== void 0 ? _b : new Date(now.getFullYear(), now.getMonth() + 1, 0).toISOString();
|
|
132
150
|
return `offset=${offset}&endDate=${endDate}&startDate=${startDate}&type=${this.type}&limit=${this.pageSize}`;
|
|
133
151
|
}
|
|
134
|
-
setStyles(styles) {
|
|
135
|
-
const cssFile = document.createElement('style');
|
|
136
|
-
cssFile.innerHTML = styles;
|
|
137
|
-
this.stylingContainer.prepend(cssFile);
|
|
138
|
-
}
|
|
139
|
-
async setClientStylingByURL() {
|
|
140
|
-
try {
|
|
141
|
-
const response = await fetch(this.clientStylingUrl);
|
|
142
|
-
if (!response.ok) {
|
|
143
|
-
const err = await response.text();
|
|
144
|
-
throw new Error(err);
|
|
145
|
-
}
|
|
146
|
-
const styles = await response.text();
|
|
147
|
-
this.setStyles(styles);
|
|
148
|
-
}
|
|
149
|
-
catch (ex) {
|
|
150
|
-
console.error(`Failed to load client styles ${this.clientStylingUrl}`, ex);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
152
|
static get is() { return "user-transaction-history"; }
|
|
154
153
|
static get encapsulation() { return "shadow"; }
|
|
155
154
|
static get originalStyleUrls() {
|
|
@@ -320,6 +319,25 @@ export class UserTransactionHistory {
|
|
|
320
319
|
"attribute": "client-styling-url",
|
|
321
320
|
"reflect": true,
|
|
322
321
|
"defaultValue": "null"
|
|
322
|
+
},
|
|
323
|
+
"mbSource": {
|
|
324
|
+
"type": "string",
|
|
325
|
+
"mutable": false,
|
|
326
|
+
"complexType": {
|
|
327
|
+
"original": "string",
|
|
328
|
+
"resolved": "string",
|
|
329
|
+
"references": {}
|
|
330
|
+
},
|
|
331
|
+
"required": false,
|
|
332
|
+
"optional": false,
|
|
333
|
+
"docs": {
|
|
334
|
+
"tags": [],
|
|
335
|
+
"text": ""
|
|
336
|
+
},
|
|
337
|
+
"getter": false,
|
|
338
|
+
"setter": false,
|
|
339
|
+
"attribute": "mb-source",
|
|
340
|
+
"reflect": true
|
|
323
341
|
}
|
|
324
342
|
};
|
|
325
343
|
}
|
|
@@ -352,6 +370,12 @@ export class UserTransactionHistory {
|
|
|
352
370
|
}, {
|
|
353
371
|
"propName": "pageSize",
|
|
354
372
|
"methodName": "watchMultiple"
|
|
373
|
+
}, {
|
|
374
|
+
"propName": "clientStyling",
|
|
375
|
+
"methodName": "handleClientStylingChange"
|
|
376
|
+
}, {
|
|
377
|
+
"propName": "clientStylingUrl",
|
|
378
|
+
"methodName": "handleClientStylingUrlChange"
|
|
355
379
|
}, {
|
|
356
380
|
"propName": "showMobileFilter",
|
|
357
381
|
"methodName": "getComponentHeight"
|
|
@@ -1,5 +1,5 @@
|
|
|
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, modernPropertyDecls: 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
5
|
Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -963,6 +963,9 @@ var postUpdateComponent = (hostRef) => {
|
|
|
963
963
|
{
|
|
964
964
|
addHydratedFlag(elm);
|
|
965
965
|
}
|
|
966
|
+
{
|
|
967
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
968
|
+
}
|
|
966
969
|
endPostUpdate();
|
|
967
970
|
{
|
|
968
971
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1277,6 +1280,9 @@ var connectedCallback = (elm) => {
|
|
|
1277
1280
|
}
|
|
1278
1281
|
};
|
|
1279
1282
|
var disconnectInstance = (instance, elm) => {
|
|
1283
|
+
{
|
|
1284
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1285
|
+
}
|
|
1280
1286
|
};
|
|
1281
1287
|
var disconnectedCallback = async (elm) => {
|
|
1282
1288
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1287,8 +1293,10 @@ var disconnectedCallback = async (elm) => {
|
|
|
1287
1293
|
hostRef.$rmListeners$ = void 0;
|
|
1288
1294
|
}
|
|
1289
1295
|
}
|
|
1290
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1291
|
-
hostRef.$
|
|
1296
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1297
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1298
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1299
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1292
1300
|
}
|
|
1293
1301
|
}
|
|
1294
1302
|
if (rootAppliedStyles.has(elm)) {
|
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-12dd2b03.js';
|
|
2
|
+
export { s as setNonce } from './index-12dd2b03.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-12dd2b03.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
|
/*
|
|
192
248
|
* Language of the application.
|
|
193
249
|
*/
|
|
@@ -213,24 +269,39 @@ const UserTransactionHistory = class {
|
|
|
213
269
|
watchMultiple() {
|
|
214
270
|
this.loadTransactions();
|
|
215
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
|
+
}
|
|
216
283
|
async componentWillLoad() {
|
|
217
284
|
if (this.translationUrl) {
|
|
218
285
|
await Localization.loadCustomTranslations(this.translationUrl);
|
|
219
286
|
}
|
|
220
287
|
this.loadTransactions();
|
|
221
288
|
}
|
|
222
|
-
|
|
223
|
-
this.
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
this.setStyles(this.clientStyling);
|
|
289
|
+
componentDidLoad() {
|
|
290
|
+
if (this.stylingContainer) {
|
|
291
|
+
if (window.emMessageBus != undefined) {
|
|
292
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
227
293
|
}
|
|
228
|
-
|
|
229
|
-
this.
|
|
294
|
+
else {
|
|
295
|
+
if (this.clientStyling)
|
|
296
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
297
|
+
if (this.clientStylingUrl)
|
|
298
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
230
299
|
}
|
|
231
|
-
this.stylingAppended = true;
|
|
232
300
|
}
|
|
233
301
|
}
|
|
302
|
+
componentDidRender() {
|
|
303
|
+
this.getComponentHeight();
|
|
304
|
+
}
|
|
234
305
|
getComponentHeight() {
|
|
235
306
|
var _a;
|
|
236
307
|
if (this.mobile) {
|
|
@@ -270,11 +341,14 @@ const UserTransactionHistory = class {
|
|
|
270
341
|
showFilter() {
|
|
271
342
|
this.showMobileFilter = !this.showMobileFilter;
|
|
272
343
|
}
|
|
344
|
+
disconnectedCallback() {
|
|
345
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
346
|
+
}
|
|
273
347
|
render() {
|
|
274
348
|
var _a;
|
|
275
349
|
const filterSrc = getAssetPath('../assets/filter.svg');
|
|
276
350
|
const warningSrc = getAssetPath('../assets/warning.svg');
|
|
277
|
-
return (h(Host, { key: '
|
|
351
|
+
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() }, '>')))));
|
|
278
352
|
}
|
|
279
353
|
async loadTransactions() {
|
|
280
354
|
this.showLoader = true;
|
|
@@ -309,25 +383,6 @@ const UserTransactionHistory = class {
|
|
|
309
383
|
const endDate = (_b = this.to) !== null && _b !== void 0 ? _b : new Date(now.getFullYear(), now.getMonth() + 1, 0).toISOString();
|
|
310
384
|
return `offset=${offset}&endDate=${endDate}&startDate=${startDate}&type=${this.type}&limit=${this.pageSize}`;
|
|
311
385
|
}
|
|
312
|
-
setStyles(styles) {
|
|
313
|
-
const cssFile = document.createElement('style');
|
|
314
|
-
cssFile.innerHTML = styles;
|
|
315
|
-
this.stylingContainer.prepend(cssFile);
|
|
316
|
-
}
|
|
317
|
-
async setClientStylingByURL() {
|
|
318
|
-
try {
|
|
319
|
-
const response = await fetch(this.clientStylingUrl);
|
|
320
|
-
if (!response.ok) {
|
|
321
|
-
const err = await response.text();
|
|
322
|
-
throw new Error(err);
|
|
323
|
-
}
|
|
324
|
-
const styles = await response.text();
|
|
325
|
-
this.setStyles(styles);
|
|
326
|
-
}
|
|
327
|
-
catch (ex) {
|
|
328
|
-
console.error(`Failed to load client styles ${this.clientStylingUrl}`, ex);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
386
|
static get assetsDirs() { return ["../assets"]; }
|
|
332
387
|
get el() { return getElement(this); }
|
|
333
388
|
static get watchers() { return {
|
|
@@ -336,6 +391,8 @@ const UserTransactionHistory = class {
|
|
|
336
391
|
"session": ["watchMultiple"],
|
|
337
392
|
"userId": ["watchMultiple"],
|
|
338
393
|
"pageSize": ["watchMultiple"],
|
|
394
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
395
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
339
396
|
"showMobileFilter": ["getComponentHeight"]
|
|
340
397
|
}; }
|
|
341
398
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
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-12dd2b03.js';
|
|
2
|
+
export { s as setNonce } from './index-12dd2b03.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -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;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>{e.set(n.t=t,n)},l=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r=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={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},d=t=>Promise.resolve(t),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),m=!1,v=[],y=[],w=(t,e)=>n=>{t.push(n),m||(m=!0,e&&4&h.o?g($):h.raf($))},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},$=()=>{b(v),b(y),(m=v.length>0)&&h.raf($)},g=t=>d().then(t),S=w(y,!0),j=t=>{const e=new URL(t,h.l);return e.origin!==a.location.origin?e.href:e.pathname},k=t=>"object"==(t=typeof t)||"function"===t;function O(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>C,map:()=>x,ok:()=>E,unwrap:()=>P,unwrapErr:()=>R});var E=t=>({isOk:!0,isErr:!1,value:t}),C=t=>({isOk:!1,isErr:!0,value:t});function x(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>E(t))):E(n)}if(t.isErr)return C(t.value);throw"should never get here"}var M,P=t=>{if(t.isOk)return t.value;throw t.value},R=t=>{if(t.isErr)return t.value;throw t.value},L=(t,e,...n)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!k(o))&&(o+=""),s&&i?r[r.length-1].i+=o:r.push(s?A(null,o):o),i=s)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,r,H);const u=A(t,null);return u.u=e,r.length>0&&(u.h=r),u.p=l,u},A=(t,e)=>({o:0,m:t,i:e,v:null,h:null,u:null,p:null}),D={},H={forEach:(t,e)=>t.map(N).forEach(e),map:(t,e)=>t.map(N).map(e).map(T)},N=t=>({vattrs:t.u,vchildren:t.h,vkey:t.p,vname:t.$,vtag:t.m,vtext:t.i}),T=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),L(t.vtag,e,...t.vchildren||[])}const e=A(t.vtag,t.vtext);return e.u=t.vattrs,e.h=t.vchildren,e.p=t.vkey,e.$=t.vname,e},U=(t,e)=>null==t||k(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?t+"":t,W=t=>n(t).$hostElement$,F=new WeakMap,V=t=>"sc-"+t.S,q=(t,e,n,o,s,i)=>{if(n!==o){let r=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=_(n);let s=_(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("key"===e);else if("ref"===e)o&&o(t);else if(r||"o"!==e[0]||"n"!==e[1]){const l=k(o);if((r||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]==l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}let a=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(e=c,a=!0),null==o||!1===o?!1===o&&""!==t.getAttribute(e)||(a?t.removeAttributeNS(u,e):t.removeAttribute(e)):(!r||4&i||s)&&!l&&(o=!0===o?"":o,a?t.setAttributeNS(u,e,o):t.setAttribute(e,o))}else if(e="-"===e[2]?e.slice(3):l(a,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(z);e=e.replace(B,""),n&&h.rel(t,e,n,l),o&&h.ael(t,e,o,l)}}},G=/\s/,_=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(G):[]),z="Capture",B=RegExp(z+"$"),I=(t,e,n)=>{const o=11===e.v.nodeType&&e.v.host?e.v.host:e.v,l=t&&t.u||{},s=e.u||{};for(const t of J(Object.keys(l)))t in s||q(o,t,l[t],void 0,n,e.o);for(const t of J(Object.keys(s)))q(o,t,l[t],s[t],n,e.o)};function J(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var K=!1,Q=(t,e,n)=>{const o=e.h[n];let l,s,i=0;if(null!==o.i)l=o.v=f.createTextNode(o.i);else{if(K||(K="svg"===o.m),l=o.v=f.createElementNS(K?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.m),K&&"foreignObject"===o.m&&(K=!1),I(null,o,K),o.h)for(i=0;i<o.h.length;++i)s=Q(t,o,i),s&&l.appendChild(s);"svg"===o.m?K=!1:"foreignObject"===l.tagName&&(K=!0)}return l["s-hn"]=M,l},X=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===M&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=Q(null,n,l),i&&(o[l].v=i,nt(r,i,e)))},Y=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.v;et(e),t&&t.remove()}}},Z=(t,e,n=!1)=>t.m===e.m&&(n?(n&&!t.p&&e.p&&(t.p=e.p),!0):t.p===e.p),tt=(t,e,n=!1)=>{const o=e.v=t.v,l=t.h,s=e.h,i=e.m,r=e.i;null===r?(I(t,e,K="svg"===i||"foreignObject"!==i&&K),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=e.length-1,h=e[0],d=e[f],p=o.length-1,m=o[0],v=o[p];for(;r<=f&&c<=p;)if(null==h)h=e[++r];else if(null==d)d=e[--f];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(Z(h,m,l))tt(h,m,l),h=e[++r],m=o[++c];else if(Z(d,v,l))tt(d,v,l),d=e[--f],v=o[--p];else if(Z(h,v,l))tt(h,v,l),nt(t,h.v,d.v.nextSibling),h=e[++r],v=o[--p];else if(Z(d,m,l))tt(d,m,l),nt(t,d.v,h.v),d=e[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].p&&e[a].p===m.p){u=a;break}u>=0?(i=e[u],i.m!==m.m?s=Q(e&&e[c],n,u):(tt(i,m,l),e[u]=void 0,s=i.v),m=o[++c]):(s=Q(e&&e[c],n,c),m=o[++c]),s&&nt(h.v.parentNode,s,h.v)}r>f?X(t,null==o[p+1]?null:o[p+1].v,n,o,c,p):c>p&&Y(e,r,f)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),X(o,null,e,s,0,s.length-1)):!n&&null!==l&&Y(l,0,l.length-1),K&&"svg"===i&&(K=!1)):t.i!==r&&(o.data=r)},et=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(et)},nt=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),ot=(t,e)=>{if(e&&!t.j&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.j=()=>{e["s-p"].splice(n-1,1),o()})))}},lt=(t,e)=>{if(t.o|=16,!(4&t.o))return ot(t,t.k),S((()=>st(t,e)));t.o|=512},st=(t,e)=>{const n=t.$hostElement$,o=t.t;if(!o)throw Error(`Can't render component <${n.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 e&&(t.o|=256,t.O&&(t.O.map((([t,e])=>ht(o,t,e,n))),t.O=void 0),l=ht(o,"componentWillLoad",void 0,n)),it(l,(()=>ct(t,o,e)))},it=(t,e)=>rt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),rt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ct=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.C,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=V(e),l=r.get(o);if(t=11===t.nodeType?t:f,l)if("string"==typeof l){let s,i=F.get(t=t.head||t);if(i||F.set(t,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||f.createElement("style"),s.innerHTML=l;const i=null!=(n=h.M)?n:O(f);if(null!=i&&s.setAttribute("nonce",i),!(1&e.o))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(p){const e=new CSSStyleSheet;e.replaceSync(l),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(s)}else t.append(s);1&e.o&&t.insertBefore(s,null)}4&e.o&&(s.innerHTML+=c),i&&i.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);(10&o&&2&o||128&o)&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);ut(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>at(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},ut=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.C,s=t.P||A(null,null),i=(t=>t&&t.m===D)(e)?e:L(null,null,e);if(M=o.tagName,l.R&&(i.u=i.u||{},l.R.map((([t,e])=>i.u[e]=o[t]))),n&&i.u)for(const t of Object.keys(i.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.u[t]=o[t]);i.m=null,i.o|=4,t.P=i,i.v=s.v=o.shadowRoot||o,tt(s,i,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},at=t=>{const e=t.$hostElement$,n=t.t,o=t.k;ht(n,"componentDidRender",void 0,e),64&t.o||(t.o|=64,dt(e),ht(n,"componentDidLoad",void 0,e),t.L(e),o||ft()),t.j&&(t.j(),t.j=void 0),512&t.o&&g((()=>lt(t,!1))),t.o&=-517},ft=()=>{g((()=>(t=>{const e=h.ce("appload",{detail:{namespace:"user-transaction-history"}});return t.dispatchEvent(e),e})(a)))},ht=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},dt=t=>t.classList.add("hydrated"),pt=(t,e,o,l)=>{const i=n(t);if(!i)throw Error(`Couldn't find host element for "${l.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 r=i.$hostElement$,c=i.A.get(e),u=i.o,a=i.t;if(o=U(o,l.D[e][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(i.A.set(e,o),a)){if(l.H&&128&u){const t=l.H[e];t&&t.map((t=>{try{a[t](o,c,e)}catch(t){s(t,r)}}))}2==(18&u)&<(i,!1)}},mt=(t,e,o)=>{var l,s;const i=t.prototype;if(e.D||e.H||t.watchers){t.watchers&&!e.H&&(e.H=t.watchers);const r=Object.entries(null!=(l=e.D)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.D[t][0]|=2048),r&&(e.D[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.D[t][0]))return((t,e)=>n(this).A.get(e))(0,t);const o=n(this),l=o?o.t:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=n(this);if(r){const n=32&l?this[t]:i.$hostElement$[t];return void 0===n&&i.A.get(t)?s=i.A.get(t):!i.A.get(t)&&n&&i.A.set(t,n),r.call(this,U(s,l)),void pt(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&o&&4096&e.D[t][0]))return pt(this,t,s,e),void(1&o&&!i.t&&i.N.then((()=>{4096&e.D[t][0]&&i.t[t]!==i.A.get(t)&&(i.t[t]=s)})));const n=()=>{const n=i.t[t];!i.A.get(t)&&n&&i.A.set(t,n),i.t[t]=U(s,l),pt(this,t,i.t[t],e)};i.t?n():i.N.then((()=>n()))}}})}})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){h.jmp((()=>{var r;const c=o.get(t);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 o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=e.H)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.H)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,n])=>{var l;const s=n[1]||t;return o.set(s,t),512&n[0]&&(null==(l=e.R)||l.push([t,s])),s}))]))}}return t},vt=(t,e)=>{ht(t,"disconnectedCallback",void 0,e||t)},yt=(t,o={})=>{var l;const u=[],d=o.exclude||[],m=a.customElements,v=f.head,y=v.querySelector("meta[charset]"),w=f.createElement("style"),b=[];let $,g=!0;Object.assign(h,o),h.l=new URL(o.resourcesUrl||"./",f.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((o=>{var l;const c={o:o[0],S:o[1],D:o[2],T:o[3]};4&c.o&&(S=!0),c.D=o[2],c.T=o[3],c.R=[],c.H=null!=(l=o[4])?l:{};const a=c.S,f=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,C:n,A:new Map};o.N=new Promise((t=>o.L=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,c),1&c.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.S}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){const t=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,wt(this,t,c.T)),$&&(clearTimeout($),$=null),g?b.push(this):h.jmp((()=>(t=>{if(!(1&h.o)){const e=n(t),o=e.C,l=()=>{};if(1&e.o)wt(t,e,o.T),(null==e?void 0:e.t)||(null==e?void 0:e.N)&&e.N.then((()=>{}));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){ot(e,e.k=n);break}}o.D&&Object.entries(o.D).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.U){const l=((t,e)=>{const n=t.S.replace(/-/g,"_"),o=t.U;if(!o)return;const l=i.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{s(t,e.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.S}#${e.W}" was not found`);o.isProxied||(n.H=o.watchers,mt(o,n,2),o.isProxied=!0);const r=()=>{};e.o|=8;try{new o(e)}catch(e){s(e,t)}e.o&=-9,e.o|=128,r()}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=V(n);if(!r.has(e)){const o=()=>{};((t,e,n)=>{let o=r.get(t);p&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,r.set(t,o)})(e,t,!!(1&n.o)),o()}}}const l=e.k,c=()=>lt(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this)))}disconnectedCallback(){h.jmp((()=>(async t=>{if(!(1&h.o)){const e=n(t);e.F&&(e.F.map((t=>t())),e.F=void 0),(null==e?void 0:e.t)?vt(e.t,t):(null==e?void 0:e.N)&&e.N.then((()=>vt(e.t,t)))}F.has(t)&&F.delete(t),t.shadowRoot&&F.has(t.shadowRoot)&&F.delete(t.shadowRoot)})(this))),h.raf((()=>{var t;const e=n(this),o=b.findIndex((t=>t===this));o>-1&&b.splice(o,1),(null==(t=null==e?void 0:e.P)?void 0:t.v)instanceof Node&&!e.P.v.isConnected&&delete e.P.v}))}componentOnReady(){return n(this).N}};c.U=t[0],d.includes(a)||m.get(a)||(u.push(a),m.define(a,mt(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 t=null!=(l=h.M)?l:O(f);null!=t&&w.setAttribute("nonce",t),v.insertBefore(w,y?y.nextSibling:v.firstChild)}g=!1,b.length?b.map((t=>t.connectedCallback())):h.jmp((()=>$=setTimeout(ft,30)))},wt=(t,e,n)=>{n&&n.map((([n,o,l])=>{const s=$t(t,n),i=bt(e,l),r=gt(n);h.ael(s,o,i,r),(e.F=e.F||[]).push((()=>h.rel(s,o,i,r)))}))},bt=(t,e)=>n=>{var o;try{256&t.o?null==(o=t.t)||o[e](n):(t.O=t.O||[]).push([e,n])}catch(e){s(e,t.$hostElement$)}},$t=(t,e)=>8&e?a:t,gt=t=>({passive:!!(1&t),capture:!!(2&t)}),St=t=>h.M=t;export{D as H,W as a,yt as b,j as g,L as h,d as p,o as r,St as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,r as e,g as a,H as o,a as i}from"./p-71a8cd66.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)))))))};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.language=n.defaultLanguage,this.mobile=!1,this.clientStyling=null,this.clientStylingUrl=null,this.page=0,this.pageSize=this.pageSizes[0],this.showMobileFilter=!1,this.type="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 i=a("../assets/filter.svg"),s=a("../assets/warning.svg");return t(o,{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: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:"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,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}`}static get assetsDirs(){return["../assets"]}get el(){return i(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 e,b as t}from"./p-
|
|
1
|
+
import{p as e,b as t}from"./p-71a8cd66.js";export{s as setNonce}from"./p-71a8cd66.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-ce923f40",[[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 +0,0 @@
|
|
|
1
|
-
import{h as t,r as e,g as a,H as o,a as i}from"./p-6e36bace.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.language=n.defaultLanguage,this.mobile=!1,this.clientStyling=null,this.clientStylingUrl=null,this.page=0,this.pageSize=this.pageSizes[0],this.showMobileFilter=!1,this.type="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}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>{e.set(n.t=t,n)},l=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="http://www.w3.org/1999/xlink",f="undefined"!=typeof window?window:{},a=f.document||{head:{}},h={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},d=t=>Promise.resolve(t),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),m=!1,v=[],y=[],w=(t,e)=>n=>{t.push(n),m||(m=!0,e&&4&h.o?g(b):h.raf(b))},$=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},b=()=>{$(v),$(y),(m=v.length>0)&&h.raf(b)},g=t=>d().then(t),S=w(y,!0),j=t=>{const e=new URL(t,h.l);return e.origin!==f.location.origin?e.href:e.pathname},O=t=>"object"==(t=typeof t)||"function"===t;function k(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>x,map:()=>C,ok:()=>E,unwrap:()=>P,unwrapErr:()=>R});var E=t=>({isOk:!0,isErr:!1,value:t}),x=t=>({isOk:!1,isErr:!0,value:t});function C(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>E(t))):E(n)}if(t.isErr)return x(t.value);throw"should never get here"}var M,P=t=>{if(t.isOk)return t.value;throw t.value},R=t=>{if(t.isErr)return t.value;throw t.value},A=(t,e,...n)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!O(o))&&(o+=""),s&&i?r[r.length-1].i+=o:r.push(s?H(null,o):o),i=s)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,r,N);const u=H(t,null);return u.u=e,r.length>0&&(u.h=r),u.p=l,u},H=(t,e)=>({o:0,m:t,i:e,v:null,h:null,u:null,p:null}),L={},N={forEach:(t,e)=>t.map(T).forEach(e),map:(t,e)=>t.map(T).map(e).map(U)},T=t=>({vattrs:t.u,vchildren:t.h,vkey:t.p,vname:t.$,vtag:t.m,vtext:t.i}),U=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),A(t.vtag,e,...t.vchildren||[])}const e=H(t.vtag,t.vtext);return e.u=t.vattrs,e.h=t.vchildren,e.p=t.vkey,e.$=t.vname,e},D=(t,e)=>null==t||O(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?t+"":t,W=t=>n(t).$hostElement$,F=new WeakMap,V=t=>"sc-"+t.S,q=(t,e,n,o,s,i)=>{if(n!==o){let r=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=_(n);let s=_(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("key"===e);else if("ref"===e)o&&o(t);else if(r||"o"!==e[0]||"n"!==e[1]){const l=O(o);if((r||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]==l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}let f=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(e=c,f=!0),null==o||!1===o?!1===o&&""!==t.getAttribute(e)||(f?t.removeAttributeNS(u,e):t.removeAttribute(e)):(!r||4&i||s)&&!l&&(o=!0===o?"":o,f?t.setAttributeNS(u,e,o):t.setAttribute(e,o))}else if(e="-"===e[2]?e.slice(3):l(f,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(z);e=e.replace(B,""),n&&h.rel(t,e,n,l),o&&h.ael(t,e,o,l)}}},G=/\s/,_=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(G):[]),z="Capture",B=RegExp(z+"$"),I=(t,e,n)=>{const o=11===e.v.nodeType&&e.v.host?e.v.host:e.v,l=t&&t.u||{},s=e.u||{};for(const t of J(Object.keys(l)))t in s||q(o,t,l[t],void 0,n,e.o);for(const t of J(Object.keys(s)))q(o,t,l[t],s[t],n,e.o)};function J(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var K=!1,Q=(t,e,n)=>{const o=e.h[n];let l,s,i=0;if(null!==o.i)l=o.v=a.createTextNode(o.i);else{if(K||(K="svg"===o.m),l=o.v=a.createElementNS(K?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.m),K&&"foreignObject"===o.m&&(K=!1),I(null,o,K),o.h)for(i=0;i<o.h.length;++i)s=Q(t,o,i),s&&l.appendChild(s);"svg"===o.m?K=!1:"foreignObject"===l.tagName&&(K=!0)}return l["s-hn"]=M,l},X=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===M&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=Q(null,n,l),i&&(o[l].v=i,nt(r,i,e)))},Y=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.v;et(e),t&&t.remove()}}},Z=(t,e,n=!1)=>t.m===e.m&&(n?(n&&!t.p&&e.p&&(t.p=e.p),!0):t.p===e.p),tt=(t,e,n=!1)=>{const o=e.v=t.v,l=t.h,s=e.h,i=e.m,r=e.i;null===r?(I(t,e,K="svg"===i||"foreignObject"!==i&&K),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=e.length-1,h=e[0],d=e[a],p=o.length-1,m=o[0],v=o[p];for(;r<=a&&c<=p;)if(null==h)h=e[++r];else if(null==d)d=e[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(Z(h,m,l))tt(h,m,l),h=e[++r],m=o[++c];else if(Z(d,v,l))tt(d,v,l),d=e[--a],v=o[--p];else if(Z(h,v,l))tt(h,v,l),nt(t,h.v,d.v.nextSibling),h=e[++r],v=o[--p];else if(Z(d,m,l))tt(d,m,l),nt(t,d.v,h.v),d=e[--a],m=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].p&&e[f].p===m.p){u=f;break}u>=0?(i=e[u],i.m!==m.m?s=Q(e&&e[c],n,u):(tt(i,m,l),e[u]=void 0,s=i.v),m=o[++c]):(s=Q(e&&e[c],n,c),m=o[++c]),s&&nt(h.v.parentNode,s,h.v)}r>a?X(t,null==o[p+1]?null:o[p+1].v,n,o,c,p):c>p&&Y(e,r,a)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),X(o,null,e,s,0,s.length-1)):!n&&null!==l&&Y(l,0,l.length-1),K&&"svg"===i&&(K=!1)):t.i!==r&&(o.data=r)},et=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(et)},nt=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),ot=(t,e)=>{if(e&&!t.j&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.j=()=>{e["s-p"].splice(n-1,1),o()})))}},lt=(t,e)=>{if(t.o|=16,!(4&t.o))return ot(t,t.O),S((()=>st(t,e)));t.o|=512},st=(t,e)=>{const n=t.$hostElement$,o=t.t;if(!o)throw Error(`Can't render component <${n.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 e&&(t.o|=256,t.k&&(t.k.map((([t,e])=>ht(o,t,e,n))),t.k=void 0),l=ht(o,"componentWillLoad",void 0,n)),it(l,(()=>ct(t,o,e)))},it=(t,e)=>rt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),rt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ct=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.C,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=V(e),l=r.get(o);if(t=11===t.nodeType?t:a,l)if("string"==typeof l){let s,i=F.get(t=t.head||t);if(i||F.set(t,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||a.createElement("style"),s.innerHTML=l;const i=null!=(n=h.M)?n:k(a);if(null!=i&&s.setAttribute("nonce",i),!(1&e.o))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(p){const e=new CSSStyleSheet;e.replaceSync(l),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(s)}else t.append(s);1&e.o&&t.insertBefore(s,null)}4&e.o&&(s.innerHTML+=c),i&&i.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);(10&o&&2&o||128&o)&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);ut(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>ft(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},ut=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.C,s=t.P||H(null,null),i=(t=>t&&t.m===L)(e)?e:A(null,null,e);if(M=o.tagName,l.R&&(i.u=i.u||{},l.R.map((([t,e])=>i.u[e]=o[t]))),n&&i.u)for(const t of Object.keys(i.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.u[t]=o[t]);i.m=null,i.o|=4,t.P=i,i.v=s.v=o.shadowRoot||o,tt(s,i,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},ft=t=>{const e=t.$hostElement$,n=t.O;ht(t.t,"componentDidRender",void 0,e),64&t.o||(t.o|=64,dt(e),t.A(e),n||at()),t.j&&(t.j(),t.j=void 0),512&t.o&&g((()=>lt(t,!1))),t.o&=-517},at=()=>{g((()=>(t=>{const e=h.ce("appload",{detail:{namespace:"user-transaction-history"}});return t.dispatchEvent(e),e})(f)))},ht=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},dt=t=>t.classList.add("hydrated"),pt=(t,e,o,l)=>{const i=n(t);if(!i)throw Error(`Couldn't find host element for "${l.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 r=i.$hostElement$,c=i.H.get(e),u=i.o,f=i.t;if(o=D(o,l.L[e][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(i.H.set(e,o),f)){if(l.N&&128&u){const t=l.N[e];t&&t.map((t=>{try{f[t](o,c,e)}catch(t){s(t,r)}}))}2==(18&u)&<(i,!1)}},mt=(t,e,o)=>{var l,s;const i=t.prototype;if(e.L||e.N||t.watchers){t.watchers&&!e.N&&(e.N=t.watchers);const r=Object.entries(null!=(l=e.L)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.L[t][0]|=2048),r&&(e.L[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.L[t][0]))return((t,e)=>n(this).H.get(e))(0,t);const o=n(this),l=o?o.t:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=n(this);if(r){const n=32&l?this[t]:i.$hostElement$[t];return void 0===n&&i.H.get(t)?s=i.H.get(t):!i.H.get(t)&&n&&i.H.set(t,n),r.call(this,D(s,l)),void pt(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&o&&4096&e.L[t][0]))return pt(this,t,s,e),void(1&o&&!i.t&&i.T.then((()=>{4096&e.L[t][0]&&i.t[t]!==i.H.get(t)&&(i.t[t]=s)})));const n=()=>{const n=i.t[t];!i.H.get(t)&&n&&i.H.set(t,n),i.t[t]=D(s,l),pt(this,t,i.t[t],e)};i.t?n():i.T.then((()=>n()))}}})}})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){h.jmp((()=>{var r;const c=o.get(t);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 o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=e.N)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.N)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,n])=>{var l;const s=n[1]||t;return o.set(s,t),512&n[0]&&(null==(l=e.R)||l.push([t,s])),s}))]))}}return t},vt=(t,o={})=>{var l;const u=[],d=o.exclude||[],m=f.customElements,v=a.head,y=v.querySelector("meta[charset]"),w=a.createElement("style"),$=[];let b,g=!0;Object.assign(h,o),h.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((o=>{var l;const c={o:o[0],S:o[1],L:o[2],U:o[3]};4&c.o&&(S=!0),c.L=o[2],c.U=o[3],c.R=[],c.N=null!=(l=o[4])?l:{};const f=c.S,a=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,C:n,H:new Map};o.T=new Promise((t=>o.A=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,c),1&c.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.S}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){const t=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,yt(this,t,c.U)),b&&(clearTimeout(b),b=null),g?$.push(this):h.jmp((()=>(t=>{if(!(1&h.o)){const e=n(t),o=e.C,l=()=>{};if(1&e.o)yt(t,e,o.U),(null==e?void 0:e.t)||(null==e?void 0:e.T)&&e.T.then((()=>{}));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){ot(e,e.O=n);break}}o.L&&Object.entries(o.L).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.D){const l=((t,e)=>{const n=t.S.replace(/-/g,"_"),o=t.D;if(!o)return;const l=i.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{s(t,e.$hostElement$)}))
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.S}#${e.W}" was not found`);o.isProxied||(n.N=o.watchers,mt(o,n,2),o.isProxied=!0);const r=()=>{};e.o|=8;try{new o(e)}catch(e){s(e,t)}e.o&=-9,e.o|=128,r()}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=V(n);if(!r.has(e)){const o=()=>{};((t,e,n)=>{let o=r.get(t);p&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,r.set(t,o)})(e,t,!!(1&n.o)),o()}}}const l=e.O,c=()=>lt(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this)))}disconnectedCallback(){h.jmp((()=>(async t=>{if(!(1&h.o)){const e=n(t);e.F&&(e.F.map((t=>t())),e.F=void 0),(null==e?void 0:e.t)||(null==e?void 0:e.T)&&e.T.then((()=>{}))}F.has(t)&&F.delete(t),t.shadowRoot&&F.has(t.shadowRoot)&&F.delete(t.shadowRoot)})(this))),h.raf((()=>{var t;const e=n(this),o=$.findIndex((t=>t===this));o>-1&&$.splice(o,1),(null==(t=null==e?void 0:e.P)?void 0:t.v)instanceof Node&&!e.P.v.isConnected&&delete e.P.v}))}componentOnReady(){return n(this).T}};c.D=t[0],d.includes(f)||m.get(f)||(u.push(f),m.define(f,mt(a,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 t=null!=(l=h.M)?l:k(a);null!=t&&w.setAttribute("nonce",t),v.insertBefore(w,y?y.nextSibling:v.firstChild)}g=!1,$.length?$.map((t=>t.connectedCallback())):h.jmp((()=>b=setTimeout(at,30)))},yt=(t,e,n)=>{n&&n.map((([n,o,l])=>{const s=$t(t,n),i=wt(e,l),r=bt(n);h.ael(s,o,i,r),(e.F=e.F||[]).push((()=>h.rel(s,o,i,r)))}))},wt=(t,e)=>n=>{var o;try{256&t.o?null==(o=t.t)||o[e](n):(t.k=t.k||[]).push([e,n])}catch(e){s(e,t.$hostElement$)}},$t=(t,e)=>8&e?f:t,bt=t=>({passive:!!(1&t),capture:!!(2&t)}),gt=t=>h.M=t;export{L as H,W as a,vt as b,j as g,A as h,d as p,o as r,gt as s}
|