@everymatrix/player-elevate-card 1.56.2 → 1.57.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/{general-styling-wrapper_5.cjs.entry.js → general-styling-wrapper_6.cjs.entry.js} +224 -9
- package/dist/cjs/{index-ea33d8f2.js → index-5e07cb40.js} +6 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/player-elevate-card.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/player-elevate-card/player-elevate-card.stories.js +58 -0
- package/dist/collection/components/player-rakeback-card/player-rakeback-card.css +87 -0
- package/dist/collection/components/player-rakeback-card/player-rakeback-card.js +339 -0
- package/dist/collection/utils/locale.utils.js +68 -8
- package/dist/esm/{general-styling-wrapper_5.entry.js → general-styling-wrapper_6.entry.js} +224 -10
- package/dist/esm/{index-98f17aff.js → index-f1097e33.js} +6 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/player-elevate-card.js +3 -3
- package/dist/player-elevate-card/p-5a173e2d.entry.js +1 -0
- package/dist/player-elevate-card/{p-17f8d580.js → p-9222d554.js} +1 -1
- package/dist/player-elevate-card/player-elevate-card.esm.js +1 -1
- package/dist/storybook/main.js +47 -0
- package/dist/storybook/preview.js +9 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/packages/stencil/player-elevate-card/storybook/main.d.ts +3 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/packages/stencil/player-elevate-card/storybook/preview.d.ts +70 -0
- package/dist/types/components/player-elevate-card/player-elevate-card.stories.d.ts +5 -0
- package/dist/types/components/player-rakeback-card/player-rakeback-card.d.ts +63 -0
- package/dist/types/components.d.ts +79 -0
- package/package.json +1 -1
- package/dist/player-elevate-card/p-45b4751e.entry.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement, a as getAssetPath, F as Fragment, c as createEvent } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement, a as getAssetPath, F as Fragment, c as createEvent } from './index-f1097e33.js';
|
|
2
2
|
|
|
3
3
|
const mergeTranslations = (url, target) => {
|
|
4
4
|
return new Promise((resolve) => {
|
|
@@ -81,6 +81,7 @@ const SUPPORTED_LANGUAGES = ['en', 'zh-hk', 'it', 'fr', 'tr', 'hr'];
|
|
|
81
81
|
const TRANSLATIONS = {
|
|
82
82
|
en: {
|
|
83
83
|
redeem: 'Redeem',
|
|
84
|
+
claim: 'Claim',
|
|
84
85
|
expireOn: 'Expire on ',
|
|
85
86
|
pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
|
|
86
87
|
pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
|
|
@@ -95,9 +96,13 @@ const TRANSLATIONS = {
|
|
|
95
96
|
xp: 'XP',
|
|
96
97
|
sp: 'Coins',
|
|
97
98
|
termAndConditions: 'Term & Conditions',
|
|
99
|
+
rakebackTitle: 'Available Rakeback',
|
|
100
|
+
loading: 'Loading',
|
|
101
|
+
minutesCanClaim: 'Next Claim is available in ${minutes} minutes'
|
|
98
102
|
},
|
|
99
103
|
'zh-hk': {
|
|
100
104
|
redeem: '兑奖',
|
|
105
|
+
claim: '返佣',
|
|
101
106
|
expireOn: 'Expire on ',
|
|
102
107
|
pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
|
|
103
108
|
pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
|
|
@@ -112,9 +117,13 @@ const TRANSLATIONS = {
|
|
|
112
117
|
xp: 'XP',
|
|
113
118
|
sp: 'Coins',
|
|
114
119
|
termAndConditions: 'Term & Conditions',
|
|
120
|
+
rakebackTitle: '可用的返利',
|
|
121
|
+
loading: '加載中',
|
|
122
|
+
minutesCanClaim: '下次可領取時間為${minutes}分鐘後'
|
|
115
123
|
},
|
|
116
124
|
de: {
|
|
117
125
|
redeem: 'Redeem',
|
|
126
|
+
claim: 'Anspruch',
|
|
118
127
|
expireOn: 'Expire on ',
|
|
119
128
|
pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
|
|
120
129
|
pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
|
|
@@ -129,9 +138,13 @@ const TRANSLATIONS = {
|
|
|
129
138
|
xp: 'XP',
|
|
130
139
|
sp: 'Coins',
|
|
131
140
|
termAndConditions: 'Term & Conditions',
|
|
141
|
+
rakebackTitle: 'Verfügbarer Rakeback',
|
|
142
|
+
loading: 'Laden',
|
|
143
|
+
minutesCanClaim: 'Nächster Anspruch ist in ${minutes} Minuten verfügbar'
|
|
132
144
|
},
|
|
133
145
|
it: {
|
|
134
146
|
redeem: 'Redeem',
|
|
147
|
+
claim: 'Richiesta',
|
|
135
148
|
expireOn: 'Expire on ',
|
|
136
149
|
pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
|
|
137
150
|
pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
|
|
@@ -146,9 +159,13 @@ const TRANSLATIONS = {
|
|
|
146
159
|
xp: 'XP',
|
|
147
160
|
sp: 'Coins',
|
|
148
161
|
termAndConditions: 'Term & Conditions',
|
|
162
|
+
rakebackTitle: 'Rakeback Disponibile',
|
|
163
|
+
loading: 'Caricamento',
|
|
164
|
+
minutesCanClaim: 'La prossima richiesta sarà disponibile tra ${minutes} minuti'
|
|
149
165
|
},
|
|
150
166
|
fr: {
|
|
151
167
|
redeem: 'Redeem',
|
|
168
|
+
claim: 'Réclamer',
|
|
152
169
|
expireOn: 'Expire on ',
|
|
153
170
|
pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
|
|
154
171
|
pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
|
|
@@ -163,12 +180,20 @@ const TRANSLATIONS = {
|
|
|
163
180
|
xp: 'XP',
|
|
164
181
|
sp: 'Coins',
|
|
165
182
|
termAndConditions: 'Term & Conditions',
|
|
183
|
+
rakebackTitle: 'Rakeback Disponible',
|
|
184
|
+
loading: 'Chargement',
|
|
185
|
+
minutesCanClaim: 'La prochaine réclamation sera disponible dans ${minutes} minutes'
|
|
166
186
|
},
|
|
167
187
|
es: {
|
|
168
|
-
redeem: 'Redeem'
|
|
188
|
+
redeem: 'Redeem',
|
|
189
|
+
claim: 'Reclamar',
|
|
190
|
+
rakebackTitle: 'Rakeback Disponible',
|
|
191
|
+
loading: 'Cargando',
|
|
192
|
+
minutesCanClaim: 'La próxima reclamación estará disponible en ${minutes} minutos'
|
|
169
193
|
},
|
|
170
194
|
tr: {
|
|
171
195
|
redeem: 'Redeem',
|
|
196
|
+
claim: 'Talep',
|
|
172
197
|
expireOn: 'Expire on ',
|
|
173
198
|
pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
|
|
174
199
|
pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
|
|
@@ -183,15 +208,27 @@ const TRANSLATIONS = {
|
|
|
183
208
|
xp: 'XP',
|
|
184
209
|
sp: 'Coins',
|
|
185
210
|
termAndConditions: 'Term & Conditions',
|
|
211
|
+
rakebackTitle: 'Mevcut Rakeback',
|
|
212
|
+
loading: 'Yükleniyor',
|
|
213
|
+
minutesCanClaim: 'Sonraki talep ${minutes} dakika içinde kullanılabilir'
|
|
186
214
|
},
|
|
187
215
|
ru: {
|
|
188
|
-
redeem: 'Redeem'
|
|
216
|
+
redeem: 'Redeem',
|
|
217
|
+
claim: 'Требовать',
|
|
218
|
+
rakebackTitle: 'Доступный Рейкбек',
|
|
219
|
+
loading: 'Загрузка',
|
|
220
|
+
minutesCanClaim: 'Следующее требование будет доступно через ${minutes} минут'
|
|
189
221
|
},
|
|
190
222
|
ro: {
|
|
191
|
-
redeem: 'Redeem'
|
|
223
|
+
redeem: 'Redeem',
|
|
224
|
+
claim: 'Revendicare',
|
|
225
|
+
rakebackTitle: 'Rakeback Disponibil',
|
|
226
|
+
loading: 'Se încarcă',
|
|
227
|
+
minutesCanClaim: 'Următoarea revendicare va fi disponibilă în ${minutes} minute'
|
|
192
228
|
},
|
|
193
229
|
hr: {
|
|
194
230
|
redeem: 'Otkupiti',
|
|
231
|
+
claim: 'Zahtjev',
|
|
195
232
|
expireOn: 'Istječe',
|
|
196
233
|
pointsToBeExpired: '${expirationPoints} bodova ističe za ${expireDay} dana',
|
|
197
234
|
pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
|
|
@@ -202,21 +239,44 @@ const TRANSLATIONS = {
|
|
|
202
239
|
spendablePoints: 'Bodovi za potrošit:',
|
|
203
240
|
details: 'Detalji',
|
|
204
241
|
xp: 'XP',
|
|
242
|
+
rakebackTitle: 'Dostupan Rakeback',
|
|
243
|
+
loading: 'Učitavanje',
|
|
244
|
+
minutesCanClaim: 'Sljedeći zahtjev bit će dostupan za ${minutes} minuta'
|
|
205
245
|
},
|
|
206
246
|
hu: {
|
|
207
|
-
redeem: 'Redeem'
|
|
247
|
+
redeem: 'Redeem',
|
|
248
|
+
claim: 'Igény',
|
|
249
|
+
rakebackTitle: 'Elérhető Rakeback',
|
|
250
|
+
loading: 'Betöltés',
|
|
251
|
+
minutesCanClaim: 'A következő igény ${minutes} perc múlva lesz elérhető'
|
|
208
252
|
},
|
|
209
253
|
pl: {
|
|
210
|
-
redeem: 'Redeem'
|
|
254
|
+
redeem: 'Redeem',
|
|
255
|
+
claim: 'Roszczenie',
|
|
256
|
+
rakebackTitle: 'Dostępny Rakeback',
|
|
257
|
+
loading: 'Ładowanie',
|
|
258
|
+
minutesCanClaim: 'Następne roszczenie będzie dostępne za ${minutes} minut'
|
|
211
259
|
},
|
|
212
260
|
pt: {
|
|
213
|
-
redeem: 'Redeem'
|
|
261
|
+
redeem: 'Redeem',
|
|
262
|
+
claim: 'Reivindicar',
|
|
263
|
+
rakebackTitle: 'Rakeback Disponível',
|
|
264
|
+
loading: 'Carregando',
|
|
265
|
+
minutesCanClaim: 'Próxima reivindicação disponível em ${minutes} minutos'
|
|
214
266
|
},
|
|
215
267
|
sl: {
|
|
216
|
-
redeem: 'Redeem'
|
|
268
|
+
redeem: 'Redeem',
|
|
269
|
+
claim: 'Zahtevek',
|
|
270
|
+
rakebackTitle: 'Razpoložljiv Rakeback',
|
|
271
|
+
loading: 'Nalaganje',
|
|
272
|
+
minutesCanClaim: 'Naslednji zahtevek bo na voljo čez ${minutes} minut'
|
|
217
273
|
},
|
|
218
274
|
sr: {
|
|
219
|
-
redeem: 'Redeem'
|
|
275
|
+
redeem: 'Redeem',
|
|
276
|
+
claim: 'Zahtev',
|
|
277
|
+
rakebackTitle: 'Dostupan Rakeback',
|
|
278
|
+
loading: 'Učitavanje',
|
|
279
|
+
minutesCanClaim: 'Sledeći zahtev biće dostupan za ${minutes} minuta'
|
|
220
280
|
}
|
|
221
281
|
};
|
|
222
282
|
const translate = (key, customLang) => {
|
|
@@ -3138,4 +3198,158 @@ const PlayerElevatePointcard = class {
|
|
|
3138
3198
|
};
|
|
3139
3199
|
PlayerElevatePointcard.style = PlayerElevatePointcardStyle0;
|
|
3140
3200
|
|
|
3141
|
-
|
|
3201
|
+
const playerRakebackCardCss = ":host{display:block}@keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0deg)}}.RakebackCard{border:2px solid var(--em-color-border-primary, #003E5C);padding:32px;border-radius:var(--emw--border-radius-medium, 12px);overflow:hidden;font-family:inherit}.RakebackCard .RakebackCardContent .RakebackTitle{font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-semibold, 500);color:var(--em-color-text-secondary, #727672)}.RakebackCard .RakebackCardContent .RakebackDetails{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-top:17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo{display:flex;flex-wrap:wrap;align-items:center;gap:0 17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh{width:52px;height:52px;cursor:pointer}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh.RakebackLoading{animation:rotate 0.5s linear infinite}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer{color:var(--em-color-text-primary, #fff);display:flex;align-items:center;gap:8px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackNum{display:inline-block;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-2x-large, 36px)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackCurrency{display:inline-block;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-small, 14px);margin-top:14px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton{font-family:inherit;cursor:pointer;width:90px;height:34px;border-radius:var(--emw--border-radius-large, 99px);border:2px solid var(--em-color-border-success, #083B17);display:flex;justify-content:center;align-items:center;color:var(--em-color-text-primary, #fff);background:linear-gradient(180deg, var(--em-color-gradient-1, #24B24E) 0%, var(--em-color-gradient-1, #24B24E) 100%)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton.disabled{cursor:not-allowed;opacity:0.4}.RakebackCard .RakebackCardContent .RakebackCoolOff,.RakebackCard .RakebackCardContent .RakebackError{margin-top:8px;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-x-small, 12px);color:var(--em-color-text-error, #FF7A73);text-align:center}";
|
|
3202
|
+
const PlayerRakebackCardStyle0 = playerRakebackCardCss;
|
|
3203
|
+
|
|
3204
|
+
const PlayerRakebackCard = class {
|
|
3205
|
+
constructor(hostRef) {
|
|
3206
|
+
registerInstance(this, hostRef);
|
|
3207
|
+
/**
|
|
3208
|
+
* Truncate number to specified decimal places (without rounding)
|
|
3209
|
+
* @param num Number to be processed
|
|
3210
|
+
* @param digits Number of decimal places to keep
|
|
3211
|
+
*/
|
|
3212
|
+
this.truncateNumber = (num, digits = 2) => {
|
|
3213
|
+
const str = num.toString();
|
|
3214
|
+
const [integer, decimal = ''] = str.split('.');
|
|
3215
|
+
return digits > 0 ? `${integer}.${decimal ? decimal.slice(0, digits) : '00'}` : `${integer}`;
|
|
3216
|
+
};
|
|
3217
|
+
this.sendRakebackClaimedEvent = () => {
|
|
3218
|
+
if (!this.endpoint || !this.session || !this.rakebackInfo.claimable || this.isLoading) {
|
|
3219
|
+
return;
|
|
3220
|
+
}
|
|
3221
|
+
window.postMessage({ type: 'RakebackClaimTrigger', points: this.rakebackInfo.points }, window.location.href);
|
|
3222
|
+
};
|
|
3223
|
+
this.endpoint = undefined;
|
|
3224
|
+
this.theme = 'Dark';
|
|
3225
|
+
this.session = undefined;
|
|
3226
|
+
this.language = 'en';
|
|
3227
|
+
this.clientStyling = '';
|
|
3228
|
+
this.clientStylingUrl = '';
|
|
3229
|
+
this.translationUrl = '';
|
|
3230
|
+
this.show = true;
|
|
3231
|
+
this.rakebackInfo = {
|
|
3232
|
+
hasRakebackWallet: false,
|
|
3233
|
+
points: 0.0,
|
|
3234
|
+
currency: 'TRY',
|
|
3235
|
+
claimable: false,
|
|
3236
|
+
minutesCanClaim: 0,
|
|
3237
|
+
showCanClaim: false
|
|
3238
|
+
};
|
|
3239
|
+
this.isLoading = false;
|
|
3240
|
+
this.coolingOffPeriod = false;
|
|
3241
|
+
this.showTheWidget = false;
|
|
3242
|
+
}
|
|
3243
|
+
async onSessionOrEndpointChange() {
|
|
3244
|
+
await this.loadRakebackInfo();
|
|
3245
|
+
}
|
|
3246
|
+
async onShowOrHasRakebackWalletChange() {
|
|
3247
|
+
this.showTheWidget = this.show && this.rakebackInfo.hasRakebackWallet;
|
|
3248
|
+
}
|
|
3249
|
+
handleMessage(event) {
|
|
3250
|
+
const { type } = event === null || event === void 0 ? void 0 : event.data;
|
|
3251
|
+
if (type === 'RakebackClaimConfirmed') {
|
|
3252
|
+
this.claimRakeback();
|
|
3253
|
+
}
|
|
3254
|
+
}
|
|
3255
|
+
async loadRakebackInfo() {
|
|
3256
|
+
if (!this.endpoint || !this.session) {
|
|
3257
|
+
return;
|
|
3258
|
+
}
|
|
3259
|
+
this.isLoading = true;
|
|
3260
|
+
try {
|
|
3261
|
+
const url = new URL(`${this.endpoint}/v1/elevate/playerInfo?language=${this.language}`);
|
|
3262
|
+
const response = await fetch(url.href, {
|
|
3263
|
+
method: 'GET',
|
|
3264
|
+
headers: {
|
|
3265
|
+
'X-Sessionid': this.session,
|
|
3266
|
+
'Content-Type': 'application/json'
|
|
3267
|
+
}
|
|
3268
|
+
});
|
|
3269
|
+
if (!response.ok) {
|
|
3270
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
3271
|
+
}
|
|
3272
|
+
const data = await response.json();
|
|
3273
|
+
if (!data.success) {
|
|
3274
|
+
throw new Error(data.errorMessage || 'Failed to load rakeback info');
|
|
3275
|
+
}
|
|
3276
|
+
const { rakebackWallet } = data === null || data === void 0 ? void 0 : data.data;
|
|
3277
|
+
if (!rakebackWallet) {
|
|
3278
|
+
window.postMessage({ type: 'RakebackWalletMissing' }, window.location.href);
|
|
3279
|
+
return;
|
|
3280
|
+
}
|
|
3281
|
+
const { total, claimable, currency, minutesCanClaim } = rakebackWallet || {};
|
|
3282
|
+
this.rakebackInfo = {
|
|
3283
|
+
hasRakebackWallet: true,
|
|
3284
|
+
points: (total === null || total === void 0 ? void 0 : total.points) ? this.truncateNumber(total.points, 2) : `0.00`,
|
|
3285
|
+
currency: currency || '',
|
|
3286
|
+
claimable: claimable || false,
|
|
3287
|
+
showCanClaim: Boolean(minutesCanClaim && minutesCanClaim > 0),
|
|
3288
|
+
minutesCanClaim: minutesCanClaim
|
|
3289
|
+
? minutesCanClaim <= 1 && minutesCanClaim > 0
|
|
3290
|
+
? 1
|
|
3291
|
+
: this.truncateNumber(minutesCanClaim, 0)
|
|
3292
|
+
: 0
|
|
3293
|
+
};
|
|
3294
|
+
}
|
|
3295
|
+
catch (err) {
|
|
3296
|
+
console.error('Error loading rakeback info:', err);
|
|
3297
|
+
window.postMessage({ type: 'RakebackClaimError', message: err.message }, window.location.href);
|
|
3298
|
+
}
|
|
3299
|
+
finally {
|
|
3300
|
+
this.isLoading = false;
|
|
3301
|
+
}
|
|
3302
|
+
}
|
|
3303
|
+
async claimRakeback() {
|
|
3304
|
+
this.isLoading = true;
|
|
3305
|
+
try {
|
|
3306
|
+
const url = new URL(`${this.endpoint}/v1/elevate/rakeback/claim`);
|
|
3307
|
+
const response = await fetch(url.href, {
|
|
3308
|
+
method: 'PUT',
|
|
3309
|
+
headers: {
|
|
3310
|
+
'X-Sessionid': this.session,
|
|
3311
|
+
'Content-Type': 'application/json'
|
|
3312
|
+
},
|
|
3313
|
+
body: JSON.stringify({})
|
|
3314
|
+
});
|
|
3315
|
+
if (!response.ok) {
|
|
3316
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
3317
|
+
}
|
|
3318
|
+
const data = await response.json();
|
|
3319
|
+
if (!data.success) {
|
|
3320
|
+
throw new Error(data.errorMessage || 'Failed to claim rakeback');
|
|
3321
|
+
}
|
|
3322
|
+
// Refresh rakeback information
|
|
3323
|
+
await this.loadRakebackInfo();
|
|
3324
|
+
// Send event notification for successful redemption
|
|
3325
|
+
window.postMessage({ type: 'RakebackClaimed', points: this.rakebackInfo.points }, window.location.href);
|
|
3326
|
+
}
|
|
3327
|
+
catch (err) {
|
|
3328
|
+
console.error('Error claiming rakeback:', err);
|
|
3329
|
+
window.postMessage({ type: 'RakebackClaimError', message: err.message }, window.location.href);
|
|
3330
|
+
}
|
|
3331
|
+
finally {
|
|
3332
|
+
this.isLoading = false;
|
|
3333
|
+
}
|
|
3334
|
+
}
|
|
3335
|
+
async componentWillLoad() {
|
|
3336
|
+
await this.loadRakebackInfo();
|
|
3337
|
+
await this.onShowOrHasRakebackWalletChange();
|
|
3338
|
+
}
|
|
3339
|
+
render() {
|
|
3340
|
+
return this.showTheWidget ? (h("div", { class: "RakebackCard" }, h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("div", { class: "RakebackCardContent" }, h("div", { class: "RakebackTitle" }, translate('rakebackTitle', this.language)), h("div", { class: "RakebackDetails" }, h("div", { class: "RakebackInfo" }, h("div", { class: "RakebackNumContainer" }, h("span", { class: "RakebackNum" }, this.rakebackInfo.points), h("span", { class: "RakebackCurrency" }, this.rakebackInfo.currency))), h("div", { class: `RakebackButton ${this.isLoading || !this.rakebackInfo.claimable ? 'disabled' : ''}`, onClick: this.sendRakebackClaimedEvent }, translate('claim', this.language))), !this.rakebackInfo.claimable && this.rakebackInfo.showCanClaim && (h("div", { class: "RakebackCoolOff" }, translateWithParams('minutesCanClaim', {
|
|
3341
|
+
lang: this.language,
|
|
3342
|
+
minutes: this.rakebackInfo.minutesCanClaim
|
|
3343
|
+
})))))) : null;
|
|
3344
|
+
}
|
|
3345
|
+
static get watchers() { return {
|
|
3346
|
+
"session": ["onSessionOrEndpointChange"],
|
|
3347
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
3348
|
+
"language": ["onSessionOrEndpointChange"],
|
|
3349
|
+
"show": ["onShowOrHasRakebackWalletChange"],
|
|
3350
|
+
"rakebackInfo": ["onShowOrHasRakebackWalletChange"]
|
|
3351
|
+
}; }
|
|
3352
|
+
};
|
|
3353
|
+
PlayerRakebackCard.style = PlayerRakebackCardStyle0;
|
|
3354
|
+
|
|
3355
|
+
export { GeneralStylingWrapper as general_styling_wrapper, PlayerElevateCard as player_elevate_card, PlayerElevateCardData as player_elevate_card_data, PlayerElevateLoyaltycard as player_elevate_loyaltycard, PlayerElevatePointcard as player_elevate_pointcard, PlayerRakebackCard as player_rakeback_card };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const NAMESPACE = 'player-elevate-card';
|
|
2
|
-
const BUILD = /* player-elevate-card */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean:
|
|
2
|
+
const BUILD = /* player-elevate-card */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -49,10 +49,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
49
49
|
}
|
|
50
50
|
switch(bundleId) {
|
|
51
51
|
|
|
52
|
-
case 'general-styling-
|
|
52
|
+
case 'general-styling-wrapper_6':
|
|
53
53
|
return import(
|
|
54
54
|
/* webpackMode: "lazy" */
|
|
55
|
-
'./general-styling-
|
|
55
|
+
'./general-styling-wrapper_6.entry.js').then(processMod, consoleError);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
return import(
|
|
@@ -342,6 +342,9 @@ var convertToPrivate = (node) => {
|
|
|
342
342
|
};
|
|
343
343
|
var parsePropertyValue = (propValue, propType) => {
|
|
344
344
|
if (propValue != null && !isComplexType(propValue)) {
|
|
345
|
+
if (propType & 4 /* Boolean */) {
|
|
346
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
347
|
+
}
|
|
345
348
|
if (propType & 1 /* String */) {
|
|
346
349
|
return String(propValue);
|
|
347
350
|
}
|
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-f1097e33.js';
|
|
2
|
+
export { s as setNonce } from './index-f1097e33.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([["general-styling-
|
|
8
|
+
return bootstrapLazy([["general-styling-wrapper_6",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -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-f1097e33.js';
|
|
2
|
+
export { s as setNonce } from './index-f1097e33.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([["general-styling-
|
|
19
|
+
return bootstrapLazy([["general-styling-wrapper_6",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]]], options);
|
|
20
20
|
});
|