@everymatrix/loyalty-shop 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/LoyaltyPagination-B2XwqERr.cjs +14 -0
- package/components/LoyaltyPagination-B8amLojn.cjs +14 -0
- package/components/{LoyaltyPagination-CvGlrsHL.js → LoyaltyPagination-BqHc2i2H.js} +2841 -2576
- package/components/LoyaltyPagination-DOu-qNFO.js +7260 -0
- package/components/LoyaltyPointsCard-BjF9SVWO.js +249 -0
- package/components/LoyaltyPointsCard-C2Xj_0zZ.cjs +18 -0
- package/components/{LoyaltyPointsCard-4xMK1Yj3.js → LoyaltyPointsCard-DKq6yH_i.js} +60 -59
- package/components/LoyaltyPointsCard-DO9GoE9Q.cjs +18 -0
- package/components/{LoyaltyShop-BolB3kh1.js → LoyaltyShop-CBH93UYT.js} +168 -169
- package/components/LoyaltyShop-CCeVtHJ7.cjs +27 -0
- package/components/LoyaltyShop-CnX4zXMd.cjs +27 -0
- package/components/LoyaltyShop-aSar2Vkc.js +478 -0
- package/components/LoyaltyShopItem-BvxV4bEm.cjs +5 -0
- package/components/LoyaltyShopItem-CYoPPSZj.cjs +5 -0
- package/components/{LoyaltyShopItem-BF51hsPa.js → LoyaltyShopItem-DL7R43c_.js} +115 -109
- package/components/LoyaltyShopItem-bzNnPlQa.js +353 -0
- package/es2015/loyalty-shop.cjs +1 -0
- package/es2015/loyalty-shop.js +28 -0
- package/esnext/loyalty-shop.cjs +1 -1
- package/esnext/loyalty-shop.js +7 -2
- package/package.json +10 -4
- package/components/LoyaltyPagination-BfDVbl1b.js +0 -138
- package/components/LoyaltyPagination-BqAUwwMS.cjs +0 -16
- package/components/LoyaltyPagination-Ct4i2m7L.cjs +0 -12
- package/components/LoyaltyPagination-UwvULUW0.js +0 -137
- package/components/LoyaltyPointsCard-Cqwkhg0M.cjs +0 -18
- package/components/LoyaltyShop-B-D5synj.js +0 -6724
- package/components/LoyaltyShop-CIrwO8kv.cjs +0 -31
- package/components/LoyaltyShop-ChhuDPwH.js +0 -6624
- package/components/LoyaltyShop-DLj15-su.cjs +0 -27
- package/components/LoyaltyShopItem-lB3kVETK.cjs +0 -5
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { c as O, p as P, a as ae, b as o, s as ne, d as se, e as oe, f as le, g as ie, i as z, h as x, j as C, D as f, k as l, l as re, m as s, u as v, n as L, o as E, q as A, r as S, t as M, v as F, w as R, x as de, $ as pe, y as ce } from "./LoyaltyPagination-DOu-qNFO.js";
|
|
2
|
+
typeof globalThis.HTMLElement == "undefined" && (globalThis.HTMLElement = class {
|
|
3
|
+
}, globalThis.customElements = { define() {
|
|
4
|
+
}, get() {
|
|
5
|
+
}, whenDefined() {
|
|
6
|
+
} });
|
|
7
|
+
const ye = {
|
|
8
|
+
en: {
|
|
9
|
+
tokens: "Tokens",
|
|
10
|
+
tokenBalance: "Token Balance",
|
|
11
|
+
requestRakeback: "Request Rakeback",
|
|
12
|
+
pointsToExpire: "{points} Tokens to expire on {date}"
|
|
13
|
+
},
|
|
14
|
+
tr: {
|
|
15
|
+
tokens: "Tokens",
|
|
16
|
+
tokenBalance: "Token Bakiyesi",
|
|
17
|
+
requestRakeback: "Rakeback Talebi",
|
|
18
|
+
pointsToExpire: "{date} tarihinde {points} Tokens sona erecek"
|
|
19
|
+
},
|
|
20
|
+
da: {
|
|
21
|
+
tokens: "Tokens",
|
|
22
|
+
tokenBalance: "Tokenbalance",
|
|
23
|
+
requestRakeback: "Anmod om Rakeback",
|
|
24
|
+
pointsToExpire: "{points} Tokens udløber den {date}"
|
|
25
|
+
},
|
|
26
|
+
de: {
|
|
27
|
+
tokens: "Token",
|
|
28
|
+
tokenBalance: "Token-Guthaben",
|
|
29
|
+
requestRakeback: "Rakeback anfordern",
|
|
30
|
+
pointsToExpire: "{points} Token verfallen am {date}"
|
|
31
|
+
},
|
|
32
|
+
nl: {
|
|
33
|
+
tokens: "Tokens",
|
|
34
|
+
tokenBalance: "Tokensaldo",
|
|
35
|
+
requestRakeback: "Rakeback aanvragen",
|
|
36
|
+
pointsToExpire: "{points} Tokens verlopen op {date}"
|
|
37
|
+
},
|
|
38
|
+
fr: {
|
|
39
|
+
tokens: "Jetons",
|
|
40
|
+
tokenBalance: "Solde de jetons",
|
|
41
|
+
requestRakeback: "Demander un Rakeback",
|
|
42
|
+
pointsToExpire: "{points} jetons expirent le {date}"
|
|
43
|
+
},
|
|
44
|
+
hu: {
|
|
45
|
+
tokens: "Tokenek",
|
|
46
|
+
tokenBalance: "Token egyenleg",
|
|
47
|
+
requestRakeback: "Rakeback igénylése",
|
|
48
|
+
pointsToExpire: "{points} token lejár ekkor: {date}"
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var ve = R('<div class="loyalty-points svelte-1hsy08w"><div class="loyalty-points__content svelte-1hsy08w"><div class="loyalty-points__value svelte-1hsy08w"><span class="loyalty-points__skeleton loyalty-points__skeleton--amount svelte-1hsy08w"></span> <span class="loyalty-points__skeleton loyalty-points__skeleton--description svelte-1hsy08w"></span></div></div></div>'), ue = R('<span class="loyalty-points__expiry svelte-1hsy08w"> </span>'), ke = R('<div class="loyalty-points svelte-1hsy08w"><div class="loyalty-points__content svelte-1hsy08w"><div class="loyalty-points__value svelte-1hsy08w"><span class="loyalty-points__amount svelte-1hsy08w"> </span> <span class="loyalty-points__description svelte-1hsy08w"> </span> <!></div></div></div>');
|
|
52
|
+
const _e = {
|
|
53
|
+
hash: "svelte-1hsy08w",
|
|
54
|
+
code: `.loyalty-points.svelte-1hsy08w {padding:11px 16px;display:inline-flex;flex-direction:column;background-color:var(--app-container-bg-default, #022652);border-radius:6px;border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));width:100%;box-sizing:border-box;}.loyalty-points__content.svelte-1hsy08w {display:flex;align-items:center;justify-content:space-between;gap:12px;}.loyalty-points__value.svelte-1hsy08w {display:flex;flex-direction:column;gap:6px;}.loyalty-points__amount.svelte-1hsy08w {color:var(--text-default, #FFFFFF);font-size:16px;font-weight:700;line-height:140%;}.loyalty-points__description.svelte-1hsy08w {color:var(--text-subtle, #DFE3E8);font-size:14px;font-weight:400;}.loyalty-points__expiry.svelte-1hsy08w {color:var(--text-super-subtle, #DFE3E8);font-size:12px;font-weight:400;}.loyalty-points__skeleton.svelte-1hsy08w {display:block;border-radius:6px;background:linear-gradient(
|
|
55
|
+
90deg,
|
|
56
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
|
|
57
|
+
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
58
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 100%
|
|
59
|
+
);background-size:200% 100%;
|
|
60
|
+
animation: svelte-1hsy08w-shimmer 3s linear infinite;}.loyalty-points__skeleton--amount.svelte-1hsy08w {width:120px;height:22px;}.loyalty-points__skeleton--description.svelte-1hsy08w {width:90px;height:20px;}
|
|
61
|
+
|
|
62
|
+
@keyframes svelte-1hsy08w-shimmer {
|
|
63
|
+
0% {
|
|
64
|
+
background-position: 200% 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
100% {
|
|
68
|
+
background-position: -200% 0;
|
|
69
|
+
}
|
|
70
|
+
}`
|
|
71
|
+
};
|
|
72
|
+
function N(_, a) {
|
|
73
|
+
P(a, !0), ae(_, _e);
|
|
74
|
+
const i = () => de(pe, "$_", u), [u, k] = re(), r = o(a, "apiEndpoint", 7, ""), d = o(a, "userSession", 7, ""), c = o(a, "locale", 7, ""), n = o(a, "dateFormat", 7, f), T = o(a, "onLevelLoaded", 7, (e) => {
|
|
75
|
+
});
|
|
76
|
+
ne({ withLocale: c(), translations: {} }), Object.entries(ye).forEach(([e, t]) => {
|
|
77
|
+
se(e, t);
|
|
78
|
+
});
|
|
79
|
+
const D = oe(() => ({
|
|
80
|
+
apiEndpoint: r(),
|
|
81
|
+
userSession: d(),
|
|
82
|
+
locale: c(),
|
|
83
|
+
loadLevels: !1,
|
|
84
|
+
onLevelLoaded: T()
|
|
85
|
+
})), w = v(() => D.spendableWalletTotal), I = v(() => {
|
|
86
|
+
var e, t;
|
|
87
|
+
return (t = (e = s(w)) == null ? void 0 : e.points) != null ? t : 0;
|
|
88
|
+
}), W = v(() => s(I).toLocaleString()), G = v(() => D.loading && s(w) === void 0), g = v(() => {
|
|
89
|
+
var e, t;
|
|
90
|
+
return [...(t = (e = s(w)) == null ? void 0 : e.aboutToExpire) != null ? t : []].filter((y) => y.points > 0).sort((y, b) => new Date(y.expireTime).getTime() - new Date(b.expireTime).getTime())[0];
|
|
91
|
+
}), J = v(() => s(g) ? ce(s(g).expireTime, n()) : "");
|
|
92
|
+
var K = {
|
|
93
|
+
get apiEndpoint() {
|
|
94
|
+
return r();
|
|
95
|
+
},
|
|
96
|
+
set apiEndpoint(e = "") {
|
|
97
|
+
r(e), l();
|
|
98
|
+
},
|
|
99
|
+
get userSession() {
|
|
100
|
+
return d();
|
|
101
|
+
},
|
|
102
|
+
set userSession(e = "") {
|
|
103
|
+
d(e), l();
|
|
104
|
+
},
|
|
105
|
+
get locale() {
|
|
106
|
+
return c();
|
|
107
|
+
},
|
|
108
|
+
set locale(e = "") {
|
|
109
|
+
c(e), l();
|
|
110
|
+
},
|
|
111
|
+
get dateFormat() {
|
|
112
|
+
return n();
|
|
113
|
+
},
|
|
114
|
+
set dateFormat(e = f) {
|
|
115
|
+
n(e), l();
|
|
116
|
+
},
|
|
117
|
+
get onLevelLoaded() {
|
|
118
|
+
return T();
|
|
119
|
+
},
|
|
120
|
+
set onLevelLoaded(e = (t) => {
|
|
121
|
+
}) {
|
|
122
|
+
T(e), l();
|
|
123
|
+
}
|
|
124
|
+
}, B = le(), Q = ie(B);
|
|
125
|
+
{
|
|
126
|
+
var U = (e) => {
|
|
127
|
+
var t = ve();
|
|
128
|
+
x(e, t);
|
|
129
|
+
}, V = (e) => {
|
|
130
|
+
var t = ke(), y = L(t), b = L(y), q = L(b), Y = E(q), j = A(q, 2), Z = E(j, !0), $ = A(j, 2);
|
|
131
|
+
{
|
|
132
|
+
var ee = (p) => {
|
|
133
|
+
var m = ue(), h = E(m, !0);
|
|
134
|
+
M((te) => F(h, te), [
|
|
135
|
+
() => i()("pointsToExpire", {
|
|
136
|
+
values: {
|
|
137
|
+
points: s(g).points.toLocaleString(),
|
|
138
|
+
date: s(J)
|
|
139
|
+
}
|
|
140
|
+
})
|
|
141
|
+
]), x(p, m);
|
|
142
|
+
};
|
|
143
|
+
z($, (p) => {
|
|
144
|
+
s(g) && p(ee);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
S(b), S(y), S(t), M(
|
|
148
|
+
(p, m) => {
|
|
149
|
+
var h;
|
|
150
|
+
F(Y, `${(h = s(W)) != null ? h : ""}
|
|
151
|
+
${p != null ? p : ""}`), F(Z, m);
|
|
152
|
+
},
|
|
153
|
+
[() => i()("tokens"), () => i()("tokenBalance")]
|
|
154
|
+
), x(e, t);
|
|
155
|
+
};
|
|
156
|
+
z(Q, (e) => {
|
|
157
|
+
s(G) ? e(U) : e(V, -1);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
x(_, B);
|
|
161
|
+
var X = C(K);
|
|
162
|
+
return k(), X;
|
|
163
|
+
}
|
|
164
|
+
O(
|
|
165
|
+
N,
|
|
166
|
+
{
|
|
167
|
+
apiEndpoint: {},
|
|
168
|
+
userSession: {},
|
|
169
|
+
locale: {},
|
|
170
|
+
dateFormat: {},
|
|
171
|
+
onLevelLoaded: {}
|
|
172
|
+
},
|
|
173
|
+
[],
|
|
174
|
+
[],
|
|
175
|
+
{ mode: "open" }
|
|
176
|
+
);
|
|
177
|
+
function H(_, a) {
|
|
178
|
+
P(a, !0);
|
|
179
|
+
let i = o(a, "apiEndpoint", 7, ""), u = o(a, "userSession", 7, ""), k = o(a, "locale", 7, ""), r = o(a, "dateFormat", 7, f), d = o(a, "onLevelLoaded");
|
|
180
|
+
var c = {
|
|
181
|
+
get apiEndpoint() {
|
|
182
|
+
return i();
|
|
183
|
+
},
|
|
184
|
+
set apiEndpoint(n = "") {
|
|
185
|
+
i(n), l();
|
|
186
|
+
},
|
|
187
|
+
get userSession() {
|
|
188
|
+
return u();
|
|
189
|
+
},
|
|
190
|
+
set userSession(n = "") {
|
|
191
|
+
u(n), l();
|
|
192
|
+
},
|
|
193
|
+
get locale() {
|
|
194
|
+
return k();
|
|
195
|
+
},
|
|
196
|
+
set locale(n = "") {
|
|
197
|
+
k(n), l();
|
|
198
|
+
},
|
|
199
|
+
get dateFormat() {
|
|
200
|
+
return r();
|
|
201
|
+
},
|
|
202
|
+
set dateFormat(n = f) {
|
|
203
|
+
r(n), l();
|
|
204
|
+
},
|
|
205
|
+
get onLevelLoaded() {
|
|
206
|
+
return d();
|
|
207
|
+
},
|
|
208
|
+
set onLevelLoaded(n) {
|
|
209
|
+
d(n), l();
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
return N(_, {
|
|
213
|
+
get apiEndpoint() {
|
|
214
|
+
return i();
|
|
215
|
+
},
|
|
216
|
+
get userSession() {
|
|
217
|
+
return u();
|
|
218
|
+
},
|
|
219
|
+
get locale() {
|
|
220
|
+
return k();
|
|
221
|
+
},
|
|
222
|
+
get dateFormat() {
|
|
223
|
+
return r();
|
|
224
|
+
},
|
|
225
|
+
get onLevelLoaded() {
|
|
226
|
+
return d();
|
|
227
|
+
}
|
|
228
|
+
}), C(c);
|
|
229
|
+
}
|
|
230
|
+
customElements.define("loyalty-points-card", O(
|
|
231
|
+
H,
|
|
232
|
+
{
|
|
233
|
+
apiEndpoint: {},
|
|
234
|
+
userSession: {},
|
|
235
|
+
locale: {},
|
|
236
|
+
dateFormat: {},
|
|
237
|
+
onLevelLoaded: {}
|
|
238
|
+
},
|
|
239
|
+
[],
|
|
240
|
+
[]
|
|
241
|
+
));
|
|
242
|
+
const be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
243
|
+
__proto__: null,
|
|
244
|
+
default: H
|
|
245
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
246
|
+
export {
|
|
247
|
+
N as L,
|
|
248
|
+
be as a
|
|
249
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./LoyaltyPagination-B8amLojn.cjs"),N={en:{tokens:"Tokens",tokenBalance:"Token Balance",requestRakeback:"Request Rakeback",pointsToExpire:"{points} Tokens to expire on {date}"},tr:{tokens:"Tokens",tokenBalance:"Token Bakiyesi",requestRakeback:"Rakeback Talebi",pointsToExpire:"{date} tarihinde {points} Tokens sona erecek"},da:{tokens:"Tokens",tokenBalance:"Tokenbalance",requestRakeback:"Anmod om Rakeback",pointsToExpire:"{points} Tokens udløber den {date}"},de:{tokens:"Token",tokenBalance:"Token-Guthaben",requestRakeback:"Rakeback anfordern",pointsToExpire:"{points} Token verfallen am {date}"},nl:{tokens:"Tokens",tokenBalance:"Tokensaldo",requestRakeback:"Rakeback aanvragen",pointsToExpire:"{points} Tokens verlopen op {date}"},fr:{tokens:"Jetons",tokenBalance:"Solde de jetons",requestRakeback:"Demander un Rakeback",pointsToExpire:"{points} jetons expirent le {date}"},hu:{tokens:"Tokenek",tokenBalance:"Token egyenleg",requestRakeback:"Rakeback igénylése",pointsToExpire:"{points} token lejár ekkor: {date}"}};var H=e.from_html('<div class="loyalty-points svelte-1hsy08w"><div class="loyalty-points__content svelte-1hsy08w"><div class="loyalty-points__value svelte-1hsy08w"><span class="loyalty-points__skeleton loyalty-points__skeleton--amount svelte-1hsy08w"></span> <span class="loyalty-points__skeleton loyalty-points__skeleton--description svelte-1hsy08w"></span></div></div></div>'),I=e.from_html('<span class="loyalty-points__expiry svelte-1hsy08w"> </span>'),W=e.from_html('<div class="loyalty-points svelte-1hsy08w"><div class="loyalty-points__content svelte-1hsy08w"><div class="loyalty-points__value svelte-1hsy08w"><span class="loyalty-points__amount svelte-1hsy08w"> </span> <span class="loyalty-points__description svelte-1hsy08w"> </span> <!></div></div></div>');const G={hash:"svelte-1hsy08w",code:`.loyalty-points.svelte-1hsy08w {padding:11px 16px;display:inline-flex;flex-direction:column;background-color:var(--app-container-bg-default, #022652);border-radius:6px;border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));width:100%;box-sizing:border-box;}.loyalty-points__content.svelte-1hsy08w {display:flex;align-items:center;justify-content:space-between;gap:12px;}.loyalty-points__value.svelte-1hsy08w {display:flex;flex-direction:column;gap:6px;}.loyalty-points__amount.svelte-1hsy08w {color:var(--text-default, #FFFFFF);font-size:16px;font-weight:700;line-height:140%;}.loyalty-points__description.svelte-1hsy08w {color:var(--text-subtle, #DFE3E8);font-size:14px;font-weight:400;}.loyalty-points__expiry.svelte-1hsy08w {color:var(--text-super-subtle, #DFE3E8);font-size:12px;font-weight:400;}.loyalty-points__skeleton.svelte-1hsy08w {display:block;border-radius:6px;background:linear-gradient(
|
|
2
|
+
90deg,
|
|
3
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
|
|
4
|
+
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
5
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 100%
|
|
6
|
+
);background-size:200% 100%;
|
|
7
|
+
animation: svelte-1hsy08w-shimmer 3s linear infinite;}.loyalty-points__skeleton--amount.svelte-1hsy08w {width:120px;height:22px;}.loyalty-points__skeleton--description.svelte-1hsy08w {width:90px;height:20px;}
|
|
8
|
+
|
|
9
|
+
@keyframes svelte-1hsy08w-shimmer {
|
|
10
|
+
0% {
|
|
11
|
+
background-position: 200% 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
100% {
|
|
15
|
+
background-position: -200% 0;
|
|
16
|
+
}
|
|
17
|
+
}`};function g(y,n){e.push(n,!0),e.append_styles(y,G);const a=()=>e.store_get(e.$format,"$_",d),[d,p]=e.setup_stores(),l=e.prop(n,"apiEndpoint",7,""),i=e.prop(n,"userSession",7,""),r=e.prop(n,"locale",7,""),o=e.prop(n,"dateFormat",7,e.DATE_FORMATS),_=e.prop(n,"onLevelLoaded",7,t=>{});e.setupI18n({withLocale:r(),translations:{}}),Object.entries(N).forEach(([t,s])=>{e.addNewMessages(t,s)});const h=e.createElevateData(()=>({apiEndpoint:l(),userSession:i(),locale:r(),loadLevels:!1,onLevelLoaded:_()})),k=e.user_derived(()=>h.spendableWalletTotal),w=e.user_derived(()=>e.get(k)?.points??0),E=e.user_derived(()=>e.get(w).toLocaleString()),S=e.user_derived(()=>h.loading&&e.get(k)===void 0),u=e.user_derived(()=>[...e.get(k)?.aboutToExpire??[]].filter(t=>t.points>0).sort((t,s)=>new Date(t.expireTime).getTime()-new Date(s.expireTime).getTime())[0]),F=e.user_derived(()=>e.get(u)?e.formatDate(e.get(u).expireTime,o()):"");var R={get apiEndpoint(){return l()},set apiEndpoint(t=""){l(t),e.flushSync()},get userSession(){return i()},set userSession(t=""){i(t),e.flushSync()},get locale(){return r()},set locale(t=""){r(t),e.flushSync()},get dateFormat(){return o()},set dateFormat(t=e.DATE_FORMATS){o(t),e.flushSync()},get onLevelLoaded(){return _()},set onLevelLoaded(t=s=>{}){_(t),e.flushSync()}},b=e.comment(),D=e.first_child(b);{var A=t=>{var s=H();e.append(t,s)},B=t=>{var s=W(),m=e.child(s),f=e.child(m),x=e.child(f),M=e.only_child(x),T=e.sibling(x,2),O=e.only_child(T,!0),P=e.sibling(T,2);{var j=c=>{var v=I(),z=e.only_child(v,!0);e.template_effect(C=>e.set_text(z,C),[()=>a()("pointsToExpire",{values:{points:e.get(u).points.toLocaleString(),date:e.get(F)}})]),e.append(c,v)};e.if_block(P,c=>{e.get(u)&&c(j)})}e.reset(f),e.reset(m),e.reset(s),e.template_effect((c,v)=>{e.set_text(M,`${e.get(E)??""}
|
|
18
|
+
${c??""}`),e.set_text(O,v)},[()=>a()("tokens"),()=>a()("tokenBalance")]),e.append(t,s)};e.if_block(D,t=>{e.get(S)?t(A):t(B,-1)})}e.append(y,b);var q=e.pop(R);return p(),q}e.create_custom_element(g,{apiEndpoint:{},userSession:{},locale:{},dateFormat:{},onLevelLoaded:{}},[],[],{mode:"open"});function L(y,n){e.push(n,!0);let a=e.prop(n,"apiEndpoint",7,""),d=e.prop(n,"userSession",7,""),p=e.prop(n,"locale",7,""),l=e.prop(n,"dateFormat",7,e.DATE_FORMATS),i=e.prop(n,"onLevelLoaded");var r={get apiEndpoint(){return a()},set apiEndpoint(o=""){a(o),e.flushSync()},get userSession(){return d()},set userSession(o=""){d(o),e.flushSync()},get locale(){return p()},set locale(o=""){p(o),e.flushSync()},get dateFormat(){return l()},set dateFormat(o=e.DATE_FORMATS){l(o),e.flushSync()},get onLevelLoaded(){return i()},set onLevelLoaded(o){i(o),e.flushSync()}};return g(y,{get apiEndpoint(){return a()},get userSession(){return d()},get locale(){return p()},get dateFormat(){return l()},get onLevelLoaded(){return i()}}),e.pop(r)}customElements.define("loyalty-points-card",e.create_custom_element(L,{apiEndpoint:{},userSession:{},locale:{},dateFormat:{},onLevelLoaded:{}},[],[]));const J=Object.freeze(Object.defineProperty({__proto__:null,default:L},Symbol.toStringTag,{value:"Module"}));exports.LoyaltyPointsCard=g;exports.LoyaltyPointsCard_ce=J;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
|
|
1
|
+
import { c as M, p as O, a as ae, b as o, s as ne, d as se, e as oe, f as le, g as ie, i as j, h as b, j as P, D as m, k as l, l as re, m as n, u as c, n as f, o as T, q as z, r as w, t as A, v as L, w as E, x as de, $ as pe, y as ce } from "./LoyaltyPagination-BqHc2i2H.js";
|
|
2
|
+
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
3
|
+
}, globalThis.customElements = { define() {
|
|
4
|
+
}, get() {
|
|
5
|
+
}, whenDefined() {
|
|
6
|
+
} });
|
|
7
|
+
const ye = {
|
|
3
8
|
en: {
|
|
4
9
|
tokens: "Tokens",
|
|
5
10
|
tokenBalance: "Token Balance",
|
|
@@ -43,8 +48,8 @@ const ce = {
|
|
|
43
48
|
pointsToExpire: "{points} token lejár ekkor: {date}"
|
|
44
49
|
}
|
|
45
50
|
};
|
|
46
|
-
var ve =
|
|
47
|
-
const
|
|
51
|
+
var ve = E('<div class="loyalty-points svelte-1hsy08w"><div class="loyalty-points__content svelte-1hsy08w"><div class="loyalty-points__value svelte-1hsy08w"><span class="loyalty-points__skeleton loyalty-points__skeleton--amount svelte-1hsy08w"></span> <span class="loyalty-points__skeleton loyalty-points__skeleton--description svelte-1hsy08w"></span></div></div></div>'), ue = E('<span class="loyalty-points__expiry svelte-1hsy08w"> </span>'), ke = E('<div class="loyalty-points svelte-1hsy08w"><div class="loyalty-points__content svelte-1hsy08w"><div class="loyalty-points__value svelte-1hsy08w"><span class="loyalty-points__amount svelte-1hsy08w"> </span> <span class="loyalty-points__description svelte-1hsy08w"> </span> <!></div></div></div>');
|
|
52
|
+
const _e = {
|
|
48
53
|
hash: "svelte-1hsy08w",
|
|
49
54
|
code: `.loyalty-points.svelte-1hsy08w {padding:11px 16px;display:inline-flex;flex-direction:column;background-color:var(--app-container-bg-default, #022652);border-radius:6px;border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));width:100%;box-sizing:border-box;}.loyalty-points__content.svelte-1hsy08w {display:flex;align-items:center;justify-content:space-between;gap:12px;}.loyalty-points__value.svelte-1hsy08w {display:flex;flex-direction:column;gap:6px;}.loyalty-points__amount.svelte-1hsy08w {color:var(--text-default, #FFFFFF);font-size:16px;font-weight:700;line-height:140%;}.loyalty-points__description.svelte-1hsy08w {color:var(--text-subtle, #DFE3E8);font-size:14px;font-weight:400;}.loyalty-points__expiry.svelte-1hsy08w {color:var(--text-super-subtle, #DFE3E8);font-size:12px;font-weight:400;}.loyalty-points__skeleton.svelte-1hsy08w {display:block;border-radius:6px;background:linear-gradient(
|
|
50
55
|
90deg,
|
|
@@ -64,20 +69,20 @@ const ke = {
|
|
|
64
69
|
}
|
|
65
70
|
}`
|
|
66
71
|
};
|
|
67
|
-
function C(
|
|
68
|
-
O(t, !0),
|
|
69
|
-
const i = () =>
|
|
72
|
+
function C(k, t) {
|
|
73
|
+
O(t, !0), ae(k, _e);
|
|
74
|
+
const i = () => de(pe, "$_", y), [y, v] = re(), r = o(t, "apiEndpoint", 7, ""), d = o(t, "userSession", 7, ""), p = o(t, "locale", 7, ""), a = o(t, "dateFormat", 7, m), h = o(t, "onLevelLoaded", 7, (e) => {
|
|
70
75
|
});
|
|
71
|
-
|
|
72
|
-
|
|
76
|
+
ne({ withLocale: p(), translations: {} }), Object.entries(ye).forEach(([e, s]) => {
|
|
77
|
+
se(e, s);
|
|
73
78
|
});
|
|
74
|
-
const
|
|
79
|
+
const S = oe(() => ({
|
|
75
80
|
apiEndpoint: r(),
|
|
76
81
|
userSession: d(),
|
|
77
82
|
locale: p(),
|
|
78
83
|
loadLevels: !1,
|
|
79
|
-
onLevelLoaded:
|
|
80
|
-
})),
|
|
84
|
+
onLevelLoaded: h()
|
|
85
|
+
})), x = c(() => S.spendableWalletTotal), H = c(() => n(x)?.points ?? 0), I = c(() => n(H).toLocaleString()), W = c(() => S.loading && n(x) === void 0), _ = c(() => [...n(x)?.aboutToExpire ?? []].filter((e) => e.points > 0).sort((e, s) => new Date(e.expireTime).getTime() - new Date(s.expireTime).getTime())[0]), G = c(() => n(_) ? ce(n(_).expireTime, a()) : "");
|
|
81
86
|
var J = {
|
|
82
87
|
get apiEndpoint() {
|
|
83
88
|
return r();
|
|
@@ -100,60 +105,56 @@ function C(b, t) {
|
|
|
100
105
|
get dateFormat() {
|
|
101
106
|
return a();
|
|
102
107
|
},
|
|
103
|
-
set dateFormat(e =
|
|
108
|
+
set dateFormat(e = m) {
|
|
104
109
|
a(e), l();
|
|
105
110
|
},
|
|
106
111
|
get onLevelLoaded() {
|
|
107
|
-
return
|
|
112
|
+
return h();
|
|
108
113
|
},
|
|
109
|
-
set onLevelLoaded(e = (
|
|
114
|
+
set onLevelLoaded(e = (s) => {
|
|
110
115
|
}) {
|
|
111
|
-
|
|
116
|
+
h(e), l();
|
|
112
117
|
}
|
|
113
|
-
},
|
|
118
|
+
}, F = le(), K = ie(F);
|
|
114
119
|
{
|
|
115
|
-
var
|
|
116
|
-
var
|
|
117
|
-
|
|
118
|
-
},
|
|
119
|
-
var
|
|
120
|
-
y(w);
|
|
121
|
-
var L = j(w, 2), X = v(L, !0);
|
|
122
|
-
y(L);
|
|
123
|
-
var Y = j(L, 2);
|
|
120
|
+
var Q = (e) => {
|
|
121
|
+
var s = ve();
|
|
122
|
+
b(e, s);
|
|
123
|
+
}, U = (e) => {
|
|
124
|
+
var s = ke(), R = f(s), D = f(R), B = f(D), X = T(B), q = z(B, 2), Y = T(q, !0), Z = z(q, 2);
|
|
124
125
|
{
|
|
125
|
-
var
|
|
126
|
-
var g =
|
|
127
|
-
|
|
126
|
+
var $ = (u) => {
|
|
127
|
+
var g = ue(), ee = T(g, !0);
|
|
128
|
+
A((te) => L(ee, te), [
|
|
128
129
|
() => i()("pointsToExpire", {
|
|
129
130
|
values: {
|
|
130
|
-
points: n(
|
|
131
|
+
points: n(_).points.toLocaleString(),
|
|
131
132
|
date: n(G)
|
|
132
133
|
}
|
|
133
134
|
})
|
|
134
|
-
]),
|
|
135
|
+
]), b(u, g);
|
|
135
136
|
};
|
|
136
|
-
|
|
137
|
-
n(
|
|
137
|
+
j(Z, (u) => {
|
|
138
|
+
n(_) && u($);
|
|
138
139
|
});
|
|
139
140
|
}
|
|
140
|
-
|
|
141
|
-
(
|
|
142
|
-
|
|
143
|
-
${
|
|
141
|
+
w(D), w(R), w(s), A(
|
|
142
|
+
(u, g) => {
|
|
143
|
+
L(X, `${n(I) ?? ""}
|
|
144
|
+
${u ?? ""}`), L(Y, g);
|
|
144
145
|
},
|
|
145
146
|
[() => i()("tokens"), () => i()("tokenBalance")]
|
|
146
|
-
),
|
|
147
|
+
), b(e, s);
|
|
147
148
|
};
|
|
148
|
-
|
|
149
|
-
n(W) ? e(
|
|
149
|
+
j(K, (e) => {
|
|
150
|
+
n(W) ? e(Q) : e(U, -1);
|
|
150
151
|
});
|
|
151
152
|
}
|
|
152
|
-
|
|
153
|
-
var
|
|
154
|
-
return
|
|
153
|
+
b(k, F);
|
|
154
|
+
var V = P(J);
|
|
155
|
+
return v(), V;
|
|
155
156
|
}
|
|
156
|
-
|
|
157
|
+
M(
|
|
157
158
|
C,
|
|
158
159
|
{
|
|
159
160
|
apiEndpoint: {},
|
|
@@ -166,9 +167,9 @@ A(
|
|
|
166
167
|
[],
|
|
167
168
|
{ mode: "open" }
|
|
168
169
|
);
|
|
169
|
-
function
|
|
170
|
+
function N(k, t) {
|
|
170
171
|
O(t, !0);
|
|
171
|
-
let i =
|
|
172
|
+
let i = o(t, "apiEndpoint", 7, ""), y = o(t, "userSession", 7, ""), v = o(t, "locale", 7, ""), r = o(t, "dateFormat", 7, m), d = o(t, "onLevelLoaded");
|
|
172
173
|
var p = {
|
|
173
174
|
get apiEndpoint() {
|
|
174
175
|
return i();
|
|
@@ -177,21 +178,21 @@ function M(b, t) {
|
|
|
177
178
|
i(a), l();
|
|
178
179
|
},
|
|
179
180
|
get userSession() {
|
|
180
|
-
return
|
|
181
|
+
return y();
|
|
181
182
|
},
|
|
182
183
|
set userSession(a = "") {
|
|
183
|
-
|
|
184
|
+
y(a), l();
|
|
184
185
|
},
|
|
185
186
|
get locale() {
|
|
186
|
-
return
|
|
187
|
+
return v();
|
|
187
188
|
},
|
|
188
189
|
set locale(a = "") {
|
|
189
|
-
|
|
190
|
+
v(a), l();
|
|
190
191
|
},
|
|
191
192
|
get dateFormat() {
|
|
192
193
|
return r();
|
|
193
194
|
},
|
|
194
|
-
set dateFormat(a =
|
|
195
|
+
set dateFormat(a = m) {
|
|
195
196
|
r(a), l();
|
|
196
197
|
},
|
|
197
198
|
get onLevelLoaded() {
|
|
@@ -201,15 +202,15 @@ function M(b, t) {
|
|
|
201
202
|
d(a), l();
|
|
202
203
|
}
|
|
203
204
|
};
|
|
204
|
-
return C(
|
|
205
|
+
return C(k, {
|
|
205
206
|
get apiEndpoint() {
|
|
206
207
|
return i();
|
|
207
208
|
},
|
|
208
209
|
get userSession() {
|
|
209
|
-
return
|
|
210
|
+
return y();
|
|
210
211
|
},
|
|
211
212
|
get locale() {
|
|
212
|
-
return
|
|
213
|
+
return v();
|
|
213
214
|
},
|
|
214
215
|
get dateFormat() {
|
|
215
216
|
return r();
|
|
@@ -219,8 +220,8 @@ function M(b, t) {
|
|
|
219
220
|
}
|
|
220
221
|
}), P(p);
|
|
221
222
|
}
|
|
222
|
-
customElements.define("loyalty-points-card",
|
|
223
|
-
|
|
223
|
+
customElements.define("loyalty-points-card", M(
|
|
224
|
+
N,
|
|
224
225
|
{
|
|
225
226
|
apiEndpoint: {},
|
|
226
227
|
userSession: {},
|
|
@@ -231,11 +232,11 @@ customElements.define("loyalty-points-card", A(
|
|
|
231
232
|
[],
|
|
232
233
|
[]
|
|
233
234
|
));
|
|
234
|
-
const
|
|
235
|
+
const be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
235
236
|
__proto__: null,
|
|
236
|
-
default:
|
|
237
|
+
default: N
|
|
237
238
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
238
239
|
export {
|
|
239
240
|
C as L,
|
|
240
|
-
|
|
241
|
+
be as a
|
|
241
242
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
typeof globalThis.HTMLElement=="undefined"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./LoyaltyPagination-B2XwqERr.cjs"),N={en:{tokens:"Tokens",tokenBalance:"Token Balance",requestRakeback:"Request Rakeback",pointsToExpire:"{points} Tokens to expire on {date}"},tr:{tokens:"Tokens",tokenBalance:"Token Bakiyesi",requestRakeback:"Rakeback Talebi",pointsToExpire:"{date} tarihinde {points} Tokens sona erecek"},da:{tokens:"Tokens",tokenBalance:"Tokenbalance",requestRakeback:"Anmod om Rakeback",pointsToExpire:"{points} Tokens udløber den {date}"},de:{tokens:"Token",tokenBalance:"Token-Guthaben",requestRakeback:"Rakeback anfordern",pointsToExpire:"{points} Token verfallen am {date}"},nl:{tokens:"Tokens",tokenBalance:"Tokensaldo",requestRakeback:"Rakeback aanvragen",pointsToExpire:"{points} Tokens verlopen op {date}"},fr:{tokens:"Jetons",tokenBalance:"Solde de jetons",requestRakeback:"Demander un Rakeback",pointsToExpire:"{points} jetons expirent le {date}"},hu:{tokens:"Tokenek",tokenBalance:"Token egyenleg",requestRakeback:"Rakeback igénylése",pointsToExpire:"{points} token lejár ekkor: {date}"}};var H=e.from_html('<div class="loyalty-points svelte-1hsy08w"><div class="loyalty-points__content svelte-1hsy08w"><div class="loyalty-points__value svelte-1hsy08w"><span class="loyalty-points__skeleton loyalty-points__skeleton--amount svelte-1hsy08w"></span> <span class="loyalty-points__skeleton loyalty-points__skeleton--description svelte-1hsy08w"></span></div></div></div>'),I=e.from_html('<span class="loyalty-points__expiry svelte-1hsy08w"> </span>'),W=e.from_html('<div class="loyalty-points svelte-1hsy08w"><div class="loyalty-points__content svelte-1hsy08w"><div class="loyalty-points__value svelte-1hsy08w"><span class="loyalty-points__amount svelte-1hsy08w"> </span> <span class="loyalty-points__description svelte-1hsy08w"> </span> <!></div></div></div>');const G={hash:"svelte-1hsy08w",code:`.loyalty-points.svelte-1hsy08w {padding:11px 16px;display:inline-flex;flex-direction:column;background-color:var(--app-container-bg-default, #022652);border-radius:6px;border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));width:100%;box-sizing:border-box;}.loyalty-points__content.svelte-1hsy08w {display:flex;align-items:center;justify-content:space-between;gap:12px;}.loyalty-points__value.svelte-1hsy08w {display:flex;flex-direction:column;gap:6px;}.loyalty-points__amount.svelte-1hsy08w {color:var(--text-default, #FFFFFF);font-size:16px;font-weight:700;line-height:140%;}.loyalty-points__description.svelte-1hsy08w {color:var(--text-subtle, #DFE3E8);font-size:14px;font-weight:400;}.loyalty-points__expiry.svelte-1hsy08w {color:var(--text-super-subtle, #DFE3E8);font-size:12px;font-weight:400;}.loyalty-points__skeleton.svelte-1hsy08w {display:block;border-radius:6px;background:linear-gradient(
|
|
2
|
+
90deg,
|
|
3
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
|
|
4
|
+
color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
|
|
5
|
+
var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 100%
|
|
6
|
+
);background-size:200% 100%;
|
|
7
|
+
animation: svelte-1hsy08w-shimmer 3s linear infinite;}.loyalty-points__skeleton--amount.svelte-1hsy08w {width:120px;height:22px;}.loyalty-points__skeleton--description.svelte-1hsy08w {width:90px;height:20px;}
|
|
8
|
+
|
|
9
|
+
@keyframes svelte-1hsy08w-shimmer {
|
|
10
|
+
0% {
|
|
11
|
+
background-position: 200% 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
100% {
|
|
15
|
+
background-position: -200% 0;
|
|
16
|
+
}
|
|
17
|
+
}`};function m(u,o){e.push(o,!0),e.append_styles(u,G);const a=()=>e.store_get(e.$format,"$_",c),[c,y]=e.setup_stores(),l=e.prop(o,"apiEndpoint",7,""),i=e.prop(o,"userSession",7,""),d=e.prop(o,"locale",7,""),s=e.prop(o,"dateFormat",7,e.DATE_FORMATS),h=e.prop(o,"onLevelLoaded",7,t=>{});e.setupI18n({withLocale:d(),translations:{}}),Object.entries(N).forEach(([t,n])=>{e.addNewMessages(t,n)});const f=e.createElevateData(()=>({apiEndpoint:l(),userSession:i(),locale:d(),loadLevels:!1,onLevelLoaded:h()})),b=e.user_derived(()=>f.spendableWalletTotal),E=e.user_derived(()=>{var t,n;return(n=(t=e.get(b))==null?void 0:t.points)!=null?n:0}),S=e.user_derived(()=>e.get(E).toLocaleString()),F=e.user_derived(()=>f.loading&&e.get(b)===void 0),v=e.user_derived(()=>{var t,n;return[...(n=(t=e.get(b))==null?void 0:t.aboutToExpire)!=null?n:[]].filter(p=>p.points>0).sort((p,_)=>new Date(p.expireTime).getTime()-new Date(_.expireTime).getTime())[0]}),R=e.user_derived(()=>e.get(v)?e.formatDate(e.get(v).expireTime,s()):"");var D={get apiEndpoint(){return l()},set apiEndpoint(t=""){l(t),e.flushSync()},get userSession(){return i()},set userSession(t=""){i(t),e.flushSync()},get locale(){return d()},set locale(t=""){d(t),e.flushSync()},get dateFormat(){return s()},set dateFormat(t=e.DATE_FORMATS){s(t),e.flushSync()},get onLevelLoaded(){return h()},set onLevelLoaded(t=n=>{}){h(t),e.flushSync()}},x=e.comment(),A=e.first_child(x);{var B=t=>{var n=H();e.append(t,n)},q=t=>{var n=W(),p=e.child(n),_=e.child(p),T=e.child(_),O=e.only_child(T),L=e.sibling(T,2),P=e.only_child(L,!0),j=e.sibling(L,2);{var z=r=>{var k=I(),g=e.only_child(k,!0);e.template_effect(C=>e.set_text(g,C),[()=>a()("pointsToExpire",{values:{points:e.get(v).points.toLocaleString(),date:e.get(R)}})]),e.append(r,k)};e.if_block(j,r=>{e.get(v)&&r(z)})}e.reset(_),e.reset(p),e.reset(n),e.template_effect((r,k)=>{var g;e.set_text(O,`${(g=e.get(S))!=null?g:""}
|
|
18
|
+
${r!=null?r:""}`),e.set_text(P,k)},[()=>a()("tokens"),()=>a()("tokenBalance")]),e.append(t,n)};e.if_block(A,t=>{e.get(F)?t(B):t(q,-1)})}e.append(u,x);var M=e.pop(D);return y(),M}e.create_custom_element(m,{apiEndpoint:{},userSession:{},locale:{},dateFormat:{},onLevelLoaded:{}},[],[],{mode:"open"});function w(u,o){e.push(o,!0);let a=e.prop(o,"apiEndpoint",7,""),c=e.prop(o,"userSession",7,""),y=e.prop(o,"locale",7,""),l=e.prop(o,"dateFormat",7,e.DATE_FORMATS),i=e.prop(o,"onLevelLoaded");var d={get apiEndpoint(){return a()},set apiEndpoint(s=""){a(s),e.flushSync()},get userSession(){return c()},set userSession(s=""){c(s),e.flushSync()},get locale(){return y()},set locale(s=""){y(s),e.flushSync()},get dateFormat(){return l()},set dateFormat(s=e.DATE_FORMATS){l(s),e.flushSync()},get onLevelLoaded(){return i()},set onLevelLoaded(s){i(s),e.flushSync()}};return m(u,{get apiEndpoint(){return a()},get userSession(){return c()},get locale(){return y()},get dateFormat(){return l()},get onLevelLoaded(){return i()}}),e.pop(d)}customElements.define("loyalty-points-card",e.create_custom_element(w,{apiEndpoint:{},userSession:{},locale:{},dateFormat:{},onLevelLoaded:{}},[],[]));const J=Object.freeze(Object.defineProperty({__proto__:null,default:w},Symbol.toStringTag,{value:"Module"}));exports.LoyaltyPointsCard=m;exports.LoyaltyPointsCard_ce=J;
|