@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,353 @@
|
|
|
1
|
+
var q = (g, a, o) => new Promise((d, _) => {
|
|
2
|
+
var u = (l) => {
|
|
3
|
+
try {
|
|
4
|
+
c(o.next(l));
|
|
5
|
+
} catch (r) {
|
|
6
|
+
_(r);
|
|
7
|
+
}
|
|
8
|
+
}, v = (l) => {
|
|
9
|
+
try {
|
|
10
|
+
c(o.throw(l));
|
|
11
|
+
} catch (r) {
|
|
12
|
+
_(r);
|
|
13
|
+
}
|
|
14
|
+
}, c = (l) => l.done ? d(l.value) : Promise.resolve(l.value).then(u, v);
|
|
15
|
+
c((o = o.apply(g, a)).next());
|
|
16
|
+
});
|
|
17
|
+
import { z as ve, c as Y, p as Q, a as fe, b as p, s as he, d as G, A as C, B as ye, C as ge, E as K, F as b, G as _e, H as we, m as s, f as be, g as xe, i as U, h as S, j as X, I as Ee, J as Re, K as ke, L as Se, k as m, l as Ie, n as M, q as E, o as I, r as O, t as z, v as N, M as Ne, w as j, u as T, x as Te, $ as Le, N as Ce, O as W } from "./LoyaltyPagination-DOu-qNFO.js";
|
|
18
|
+
import { L as Ue } from "./LoyaltyPointsCard-BjF9SVWO.js";
|
|
19
|
+
typeof globalThis.HTMLElement == "undefined" && (globalThis.HTMLElement = class {
|
|
20
|
+
}, globalThis.customElements = { define() {
|
|
21
|
+
}, get() {
|
|
22
|
+
}, whenDefined() {
|
|
23
|
+
} });
|
|
24
|
+
if (typeof window != "undefined") {
|
|
25
|
+
let g = function(a) {
|
|
26
|
+
return function(...o) {
|
|
27
|
+
try {
|
|
28
|
+
return a.apply(this, o);
|
|
29
|
+
} catch (d) {
|
|
30
|
+
if (d instanceof DOMException && d.message.includes("has already been used with this registry") || d instanceof Error && d.message.includes("Cannot define multiple custom elements with the same tag name"))
|
|
31
|
+
return !1;
|
|
32
|
+
throw d;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
customElements.define = g(customElements.define), import("./LoyaltyPointsCard-BjF9SVWO.js").then((a) => a.a).then((a) => {
|
|
37
|
+
const o = a.default || a;
|
|
38
|
+
customElements.get("loyalty-points-card") || customElements.define("loyalty-points-card", o.element || o);
|
|
39
|
+
}).catch((a) => {
|
|
40
|
+
console.error("BOOT ERROR:", a);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
const Me = {
|
|
44
|
+
en: {
|
|
45
|
+
tokens: "Tokens",
|
|
46
|
+
buyNow: "Buy Now",
|
|
47
|
+
back: "Back"
|
|
48
|
+
},
|
|
49
|
+
tr: {
|
|
50
|
+
tokens: "Tokens",
|
|
51
|
+
buyNow: "Şimdi Satın Al",
|
|
52
|
+
back: "Geri"
|
|
53
|
+
},
|
|
54
|
+
da: {
|
|
55
|
+
tokens: "Tokens",
|
|
56
|
+
buyNow: "Køb nu",
|
|
57
|
+
back: "Tilbage"
|
|
58
|
+
},
|
|
59
|
+
de: {
|
|
60
|
+
tokens: "Token",
|
|
61
|
+
buyNow: "Jetzt kaufen",
|
|
62
|
+
back: "Zurück"
|
|
63
|
+
},
|
|
64
|
+
nl: {
|
|
65
|
+
tokens: "Tokens",
|
|
66
|
+
buyNow: "Nu kopen",
|
|
67
|
+
back: "Terug"
|
|
68
|
+
},
|
|
69
|
+
fr: {
|
|
70
|
+
tokens: "Jetons",
|
|
71
|
+
buyNow: "Acheter",
|
|
72
|
+
back: "Retour"
|
|
73
|
+
},
|
|
74
|
+
hu: {
|
|
75
|
+
tokens: "Tokenek",
|
|
76
|
+
buyNow: "Vásárlás",
|
|
77
|
+
back: "Vissza"
|
|
78
|
+
}
|
|
79
|
+
}, Oe = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='800px'%20height='800px'%20viewBox='0%200%20120%20120'%20fill='none'%3e%3crect%20width='120'%20height='120'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M33.2503%2038.4816C33.2603%2037.0472%2034.4199%2035.8864%2035.8543%2035.875H83.1463C84.5848%2035.875%2085.7503%2037.0431%2085.7503%2038.4816V80.5184C85.7403%2081.9528%2084.5807%2083.1136%2083.1463%2083.125H35.8543C34.4158%2083.1236%2033.2503%2081.957%2033.2503%2080.5184V38.4816ZM80.5006%2041.1251H38.5006V77.8751L62.8921%2053.4783C63.9172%2052.4536%2065.5788%2052.4536%2066.6039%2053.4783L80.5006%2067.4013V41.1251ZM43.75%2051.6249C43.75%2054.5244%2046.1005%2056.8749%2049%2056.8749C51.8995%2056.8749%2054.25%2054.5244%2054.25%2051.6249C54.25%2048.7254%2051.8995%2046.3749%2049%2046.3749C46.1005%2046.3749%2043.75%2048.7254%2043.75%2051.6249Z'%20fill='%23687787'/%3e%3c/svg%3e";
|
|
80
|
+
var ze = j('<img class="loyalty-shop-item__image svelte-ravnpu"/>'), je = j('<div class="loyalty-shop-item__card loyalty-shop-item__card--description svelte-ravnpu"><p class="loyalty-shop-item__description svelte-ravnpu"> </p></div>'), Ve = j('<div class="loyalty-shop-item svelte-ravnpu"><div class="loyalty-shop-item__card svelte-ravnpu"><!> <span class="loyalty-shop-item__title svelte-ravnpu"> </span> <span class="loyalty-shop-item__points svelte-ravnpu"> </span> <button class="loyalty-shop-item__button svelte-ravnpu" type="button"> </button></div> <!> <!></div>');
|
|
81
|
+
const Ae = {
|
|
82
|
+
hash: "svelte-ravnpu",
|
|
83
|
+
code: `.loyalty-shop-item.svelte-ravnpu {display:flex;flex-direction:column;gap:12px;}.loyalty-shop-item__card.svelte-ravnpu {display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:10px;border:1px solid var(--border-default, rgba(251, 251, 251, 0.15));background-color:var(--app-container-bg-default, #022652);}.loyalty-shop-item__card--description.svelte-ravnpu {min-height:120px;}.loyalty-shop-item__image.svelte-ravnpu {width:100%;height:170px;border-radius:6px;}.loyalty-shop-item__title.svelte-ravnpu {color:var(--text-default, #ffffff);font-size:12px;font-weight:400;}.loyalty-shop-item__points.svelte-ravnpu {color:var(--text-subtle, #dfe3e8);font-size:14px;font-weight:400;}.loyalty-shop-item__button.svelte-ravnpu {margin-top:auto;width:100%;height:37px;padding:8px 16px;border:none;border-radius:6px;background:var(--button-primary-bg-default, #ffcc00);color:var(--button-primary-text-default, #261d00);font-size:12px;font-weight:400;cursor:pointer;}.loyalty-shop-item__button.svelte-ravnpu:disabled {opacity:0.4;cursor:default;}.loyalty-shop-item__description.svelte-ravnpu {color:var(--text-subtle, #dfe3e8);font-size:12px;line-height:1.4;margin:0;font-weight:500;min-height:120px;}
|
|
84
|
+
|
|
85
|
+
@media (min-width: 768px) {.loyalty-shop-item__image.svelte-ravnpu {height:clamp(170px, 30vw, 400px);object-fit:cover;}
|
|
86
|
+
}`
|
|
87
|
+
};
|
|
88
|
+
function $(g, a) {
|
|
89
|
+
Q(a, !0), fe(g, Ae);
|
|
90
|
+
const o = () => Te(Le, "$_", d), [d, _] = Ie(), u = p(a, "apiEndpoint", 7, ""), v = p(a, "userSession", 7, ""), c = p(a, "locale", 7, ""), l = p(a, "itemId", 7, ""), r = p(a, "elevateReward"), R = p(a, "translationUrl");
|
|
91
|
+
he({ withLocale: c(), translations: {} }), Object.entries(Me).forEach(([e, t]) => {
|
|
92
|
+
G(e, t);
|
|
93
|
+
});
|
|
94
|
+
let i = C(ye(r())), x = C(!1), V = C("");
|
|
95
|
+
const A = T(() => {
|
|
96
|
+
var e, t, n, f;
|
|
97
|
+
return (f = (n = (t = (e = s(i)) == null ? void 0 : e.presentation) == null ? void 0 : t.assets) == null ? void 0 : n[0]) != null ? f : "";
|
|
98
|
+
}), B = T(() => {
|
|
99
|
+
var e, t, n, f, w;
|
|
100
|
+
return (w = (f = (t = (e = s(i)) == null ? void 0 : e.presentation) == null ? void 0 : t.displayName) != null ? f : (n = s(i)) == null ? void 0 : n.displayName) != null ? w : "";
|
|
101
|
+
}), D = T(() => {
|
|
102
|
+
var e, t, n;
|
|
103
|
+
return (n = (t = (e = s(i)) == null ? void 0 : e.presentation) == null ? void 0 : t.description) != null ? n : "";
|
|
104
|
+
}), H = T(() => {
|
|
105
|
+
var e;
|
|
106
|
+
return ((e = s(i)) == null ? void 0 : e.available) === "true";
|
|
107
|
+
}), te = () => {
|
|
108
|
+
let e = new URL(R(), window.location.href);
|
|
109
|
+
fetch(e.href).then((t) => t.json()).then((t) => {
|
|
110
|
+
Object.keys(t).forEach((n) => {
|
|
111
|
+
G(n, t[n]);
|
|
112
|
+
});
|
|
113
|
+
}).catch((t) => {
|
|
114
|
+
console.log("loyalty shop item translation url err:", t);
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
ge(() => {
|
|
118
|
+
R() && te();
|
|
119
|
+
}), K(() => {
|
|
120
|
+
if (r()) {
|
|
121
|
+
b(i, r(), !0);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
if (!u() || !l())
|
|
125
|
+
return;
|
|
126
|
+
let e = !1;
|
|
127
|
+
return _e(
|
|
128
|
+
{
|
|
129
|
+
apiEndpoint: u(),
|
|
130
|
+
userSession: v(),
|
|
131
|
+
locale: c()
|
|
132
|
+
},
|
|
133
|
+
l()
|
|
134
|
+
).then((t) => {
|
|
135
|
+
e || b(i, t, !0);
|
|
136
|
+
}).catch((t) => console.error("Failed to load shop item:", t)), () => {
|
|
137
|
+
e = !0;
|
|
138
|
+
};
|
|
139
|
+
});
|
|
140
|
+
const ae = () => {
|
|
141
|
+
s(x) || !s(H) || !s(i) || Ce(s(i).displayName || s(i).presentation.displayName, s(i).id);
|
|
142
|
+
}, se = () => q(this, null, function* () {
|
|
143
|
+
var t;
|
|
144
|
+
if (!u() || !s(i) || s(x))
|
|
145
|
+
return;
|
|
146
|
+
b(x, !0), b(V, "");
|
|
147
|
+
const e = s(i).id;
|
|
148
|
+
try {
|
|
149
|
+
yield Ee({ apiEndpoint: u(), userSession: v() }, e), Re(e), ke();
|
|
150
|
+
} catch (n) {
|
|
151
|
+
b(V, (t = n == null ? void 0 : n.message) != null ? t : "Redeem failed", !0), Se(e, n);
|
|
152
|
+
} finally {
|
|
153
|
+
b(x, !1);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
K(() => {
|
|
157
|
+
const e = (t) => {
|
|
158
|
+
var n, f, w;
|
|
159
|
+
((n = t.data) == null ? void 0 : n.type) === we.REDEEM_REWARD_CONFIRMED && ((f = t.data) == null ? void 0 : f.id) === ((w = s(i)) == null ? void 0 : w.id) && se();
|
|
160
|
+
};
|
|
161
|
+
return window.addEventListener("message", e), () => window.removeEventListener("message", e);
|
|
162
|
+
});
|
|
163
|
+
var ne = {
|
|
164
|
+
get apiEndpoint() {
|
|
165
|
+
return u();
|
|
166
|
+
},
|
|
167
|
+
set apiEndpoint(e = "") {
|
|
168
|
+
u(e), m();
|
|
169
|
+
},
|
|
170
|
+
get userSession() {
|
|
171
|
+
return v();
|
|
172
|
+
},
|
|
173
|
+
set userSession(e = "") {
|
|
174
|
+
v(e), m();
|
|
175
|
+
},
|
|
176
|
+
get locale() {
|
|
177
|
+
return c();
|
|
178
|
+
},
|
|
179
|
+
set locale(e = "") {
|
|
180
|
+
c(e), m();
|
|
181
|
+
},
|
|
182
|
+
get itemId() {
|
|
183
|
+
return l();
|
|
184
|
+
},
|
|
185
|
+
set itemId(e = "") {
|
|
186
|
+
l(e), m();
|
|
187
|
+
},
|
|
188
|
+
get elevateReward() {
|
|
189
|
+
return r();
|
|
190
|
+
},
|
|
191
|
+
set elevateReward(e) {
|
|
192
|
+
r(e), m();
|
|
193
|
+
},
|
|
194
|
+
get translationUrl() {
|
|
195
|
+
return R();
|
|
196
|
+
},
|
|
197
|
+
set translationUrl(e) {
|
|
198
|
+
R(e), m();
|
|
199
|
+
}
|
|
200
|
+
}, F = be(), re = xe(F);
|
|
201
|
+
{
|
|
202
|
+
var oe = (e) => {
|
|
203
|
+
var t = Ve(), n = M(t), f = M(n);
|
|
204
|
+
{
|
|
205
|
+
var w = (h) => {
|
|
206
|
+
var y = ze();
|
|
207
|
+
z(() => {
|
|
208
|
+
W(y, "src", s(A) || Oe), W(y, "alt", s(B));
|
|
209
|
+
}), S(h, y);
|
|
210
|
+
};
|
|
211
|
+
U(f, (h) => {
|
|
212
|
+
s(A) && h(w);
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
var P = E(f, 2), le = I(P, !0), Z = E(P, 2), de = I(Z), L = E(Z, 2), ue = I(L, !0);
|
|
216
|
+
O(n);
|
|
217
|
+
var J = E(n, 2);
|
|
218
|
+
Ue(J, {
|
|
219
|
+
get apiEndpoint() {
|
|
220
|
+
return u();
|
|
221
|
+
},
|
|
222
|
+
get userSession() {
|
|
223
|
+
return v();
|
|
224
|
+
},
|
|
225
|
+
get locale() {
|
|
226
|
+
return c();
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
var ce = E(J, 2);
|
|
230
|
+
{
|
|
231
|
+
var pe = (h) => {
|
|
232
|
+
var y = je(), k = M(y), me = I(k, !0);
|
|
233
|
+
O(y), z(() => N(me, s(D))), S(h, y);
|
|
234
|
+
};
|
|
235
|
+
U(ce, (h) => {
|
|
236
|
+
s(D) && h(pe);
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
O(t), z(
|
|
240
|
+
(h, y) => {
|
|
241
|
+
var k;
|
|
242
|
+
N(le, s(B)), N(de, `${(k = s(i).points) != null ? k : ""}
|
|
243
|
+
${h != null ? h : ""}`), L.disabled = !s(H) || s(x), N(ue, y);
|
|
244
|
+
},
|
|
245
|
+
[() => o()("tokens"), () => o()("buyNow")]
|
|
246
|
+
), Ne("click", L, ae), S(e, t);
|
|
247
|
+
};
|
|
248
|
+
U(re, (e) => {
|
|
249
|
+
s(i) && e(oe);
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
S(g, F);
|
|
253
|
+
var ie = X(ne);
|
|
254
|
+
return _(), ie;
|
|
255
|
+
}
|
|
256
|
+
ve(["click"]);
|
|
257
|
+
Y(
|
|
258
|
+
$,
|
|
259
|
+
{
|
|
260
|
+
apiEndpoint: {},
|
|
261
|
+
userSession: {},
|
|
262
|
+
locale: {},
|
|
263
|
+
itemId: {},
|
|
264
|
+
elevateReward: {},
|
|
265
|
+
translationUrl: {}
|
|
266
|
+
},
|
|
267
|
+
[],
|
|
268
|
+
[],
|
|
269
|
+
{ mode: "open" }
|
|
270
|
+
);
|
|
271
|
+
function ee(g, a) {
|
|
272
|
+
Q(a, !0);
|
|
273
|
+
let o = p(a, "apiEndpoint", 7, ""), d = p(a, "userSession", 7, ""), _ = p(a, "locale", 7, ""), u = p(a, "itemId", 7, ""), v = p(a, "elevateReward"), c = p(a, "translationUrl");
|
|
274
|
+
var l = {
|
|
275
|
+
get apiEndpoint() {
|
|
276
|
+
return o();
|
|
277
|
+
},
|
|
278
|
+
set apiEndpoint(r = "") {
|
|
279
|
+
o(r), m();
|
|
280
|
+
},
|
|
281
|
+
get userSession() {
|
|
282
|
+
return d();
|
|
283
|
+
},
|
|
284
|
+
set userSession(r = "") {
|
|
285
|
+
d(r), m();
|
|
286
|
+
},
|
|
287
|
+
get locale() {
|
|
288
|
+
return _();
|
|
289
|
+
},
|
|
290
|
+
set locale(r = "") {
|
|
291
|
+
_(r), m();
|
|
292
|
+
},
|
|
293
|
+
get itemId() {
|
|
294
|
+
return u();
|
|
295
|
+
},
|
|
296
|
+
set itemId(r = "") {
|
|
297
|
+
u(r), m();
|
|
298
|
+
},
|
|
299
|
+
get elevateReward() {
|
|
300
|
+
return v();
|
|
301
|
+
},
|
|
302
|
+
set elevateReward(r) {
|
|
303
|
+
v(r), m();
|
|
304
|
+
},
|
|
305
|
+
get translationUrl() {
|
|
306
|
+
return c();
|
|
307
|
+
},
|
|
308
|
+
set translationUrl(r) {
|
|
309
|
+
c(r), m();
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
return $(g, {
|
|
313
|
+
get apiEndpoint() {
|
|
314
|
+
return o();
|
|
315
|
+
},
|
|
316
|
+
get userSession() {
|
|
317
|
+
return d();
|
|
318
|
+
},
|
|
319
|
+
get locale() {
|
|
320
|
+
return _();
|
|
321
|
+
},
|
|
322
|
+
get itemId() {
|
|
323
|
+
return u();
|
|
324
|
+
},
|
|
325
|
+
get elevateReward() {
|
|
326
|
+
return v();
|
|
327
|
+
},
|
|
328
|
+
get translationUrl() {
|
|
329
|
+
return c();
|
|
330
|
+
}
|
|
331
|
+
}), X(l);
|
|
332
|
+
}
|
|
333
|
+
customElements.define("loyalty-shop-item", Y(
|
|
334
|
+
ee,
|
|
335
|
+
{
|
|
336
|
+
apiEndpoint: {},
|
|
337
|
+
userSession: {},
|
|
338
|
+
locale: {},
|
|
339
|
+
itemId: {},
|
|
340
|
+
elevateReward: {},
|
|
341
|
+
translationUrl: {}
|
|
342
|
+
},
|
|
343
|
+
[],
|
|
344
|
+
[]
|
|
345
|
+
));
|
|
346
|
+
const Fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
347
|
+
__proto__: null,
|
|
348
|
+
default: ee
|
|
349
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
350
|
+
export {
|
|
351
|
+
$ as L,
|
|
352
|
+
Fe as a
|
|
353
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
typeof globalThis.HTMLElement=="undefined"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const s=require("../components/LoyaltyShop-CCeVtHJ7.cjs");if(typeof window!="undefined"){let o=function(e){return function(...n){try{return e.apply(this,n)}catch(t){if(t instanceof DOMException&&t.message.includes("has already been used with this registry")||t instanceof Error&&t.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw t}}};customElements.define=o(customElements.define),Promise.resolve().then(()=>require("../components/LoyaltyShop-CCeVtHJ7.cjs")).then(e=>e.LoyaltyShop_ce).then(e=>{const n=e.default||e;customElements.get("loyalty-shop")||customElements.define("loyalty-shop",n.element||n)}).catch(e=>{console.error("BOOT ERROR:",e)})}module.exports=s.LoyaltyShop;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { L as a } from "../components/LoyaltyShop-aSar2Vkc.js";
|
|
2
|
+
typeof globalThis.HTMLElement == "undefined" && (globalThis.HTMLElement = class {
|
|
3
|
+
}, globalThis.customElements = { define() {
|
|
4
|
+
}, get() {
|
|
5
|
+
}, whenDefined() {
|
|
6
|
+
} });
|
|
7
|
+
if (typeof window != "undefined") {
|
|
8
|
+
let s = function(e) {
|
|
9
|
+
return function(...n) {
|
|
10
|
+
try {
|
|
11
|
+
return e.apply(this, n);
|
|
12
|
+
} catch (t) {
|
|
13
|
+
if (t instanceof DOMException && t.message.includes("has already been used with this registry") || t instanceof Error && t.message.includes("Cannot define multiple custom elements with the same tag name"))
|
|
14
|
+
return !1;
|
|
15
|
+
throw t;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
customElements.define = s(customElements.define), import("../components/LoyaltyShop-aSar2Vkc.js").then((e) => e.a).then((e) => {
|
|
20
|
+
const n = e.default || e;
|
|
21
|
+
customElements.get("loyalty-shop") || customElements.define("loyalty-shop", n.element || n);
|
|
22
|
+
}).catch((e) => {
|
|
23
|
+
console.error("BOOT ERROR:", e);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
a as default
|
|
28
|
+
};
|
package/esnext/loyalty-shop.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const s=require("../components/LoyaltyShop-CnX4zXMd.cjs");if(typeof window<"u"){let o=function(e){return function(...n){try{return e.apply(this,n)}catch(t){if(t instanceof DOMException&&t.message.includes("has already been used with this registry")||t instanceof Error&&t.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw t}}};customElements.define=o(customElements.define),Promise.resolve().then(()=>require("../components/LoyaltyShop-CnX4zXMd.cjs")).then(e=>e.LoyaltyShop_ce).then(e=>{const n=e.default||e;customElements.get("loyalty-shop")||customElements.define("loyalty-shop",n.element||n)}).catch(e=>{console.error("BOOT ERROR:",e)})}module.exports=s.LoyaltyShop;
|
package/esnext/loyalty-shop.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { L as a } from "../components/LoyaltyShop-
|
|
1
|
+
import { L as a } from "../components/LoyaltyShop-CBH93UYT.js";
|
|
2
|
+
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
3
|
+
}, globalThis.customElements = { define() {
|
|
4
|
+
}, get() {
|
|
5
|
+
}, whenDefined() {
|
|
6
|
+
} });
|
|
2
7
|
if (typeof window < "u") {
|
|
3
8
|
let s = function(e) {
|
|
4
9
|
return function(...n) {
|
|
@@ -11,7 +16,7 @@ if (typeof window < "u") {
|
|
|
11
16
|
}
|
|
12
17
|
};
|
|
13
18
|
};
|
|
14
|
-
customElements.define = s(customElements.define), import("../components/LoyaltyShop-
|
|
19
|
+
customElements.define = s(customElements.define), import("../components/LoyaltyShop-CBH93UYT.js").then((e) => e.a).then((e) => {
|
|
15
20
|
const n = e.default || e;
|
|
16
21
|
customElements.get("loyalty-shop") || customElements.define("loyalty-shop", n.element || n);
|
|
17
22
|
}).catch((e) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/loyalty-shop",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./esnext/loyalty-shop.cjs",
|
|
6
6
|
"module": "./esnext/loyalty-shop.js",
|
|
@@ -12,10 +12,16 @@
|
|
|
12
12
|
"default": "./esnext/loyalty-shop.js"
|
|
13
13
|
},
|
|
14
14
|
"./esnext/loyalty-shop.cjs": "./esnext/loyalty-shop.cjs",
|
|
15
|
-
"./esnext/loyalty-shop.js": "./esnext/loyalty-shop.js"
|
|
15
|
+
"./esnext/loyalty-shop.js": "./esnext/loyalty-shop.js",
|
|
16
|
+
"./es2015/loyalty-shop.cjs": "./es2015/loyalty-shop.cjs",
|
|
17
|
+
"./es2015/loyalty-shop.js": "./es2015/loyalty-shop.js"
|
|
16
18
|
},
|
|
17
|
-
"files": [
|
|
19
|
+
"files": [
|
|
20
|
+
"esnext",
|
|
21
|
+
"es2015",
|
|
22
|
+
"components"
|
|
23
|
+
],
|
|
18
24
|
"publishConfig": {
|
|
19
25
|
"access": "public"
|
|
20
26
|
}
|
|
21
|
-
}
|
|
27
|
+
}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { p as at, a as st, b as _, s as nt, c as lt, u as B, d as ot, e as O, i as z, g as e, f as v, h as it, j as rt, k as E, l as pt, m as f, n as y, o as ct, t as G, q as M, r as x, v as dt, w as T, x as gt, y as _t, z as q, A as vt, $ as ft, B as m, C as yt, D as mt, E as ut } from "./LoyaltyShop-B-D5synj.js";
|
|
2
|
-
const ht = {
|
|
3
|
-
en: {
|
|
4
|
-
prev: "Previous",
|
|
5
|
-
next: "Next"
|
|
6
|
-
},
|
|
7
|
-
tr: {
|
|
8
|
-
prev: "Önceki",
|
|
9
|
-
next: "Sonraki"
|
|
10
|
-
}
|
|
11
|
-
}, D = 10, xt = 7, bt = 4;
|
|
12
|
-
var wt = x('<span class="loyalty-pagination__ellipsis svelte-lms3sp" aria-hidden="true">...</span>'), It = x('<button type="button"> </button>'), Pt = x('<div class="loyalty-pagination__pages svelte-lms3sp"><button class="loyalty-pagination__btn loyalty-pagination__btn--prev svelte-lms3sp" type="button"> </button> <!> <button class="loyalty-pagination__btn loyalty-pagination__btn--next svelte-lms3sp" type="button"> </button></div>'), kt = x('<div class="loyalty-pagination svelte-lms3sp"><!></div>');
|
|
13
|
-
const Et = {
|
|
14
|
-
hash: "svelte-lms3sp",
|
|
15
|
-
code: `
|
|
16
|
-
@layer loyalty-pagination-component {.loyalty-pagination.svelte-lms3sp {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;box-sizing:border-box;width:100%;}
|
|
17
|
-
|
|
18
|
-
@media (min-width: 768px) {.loyalty-pagination.svelte-lms3sp {width:auto;margin-left:auto;justify-content:flex-end;padding-right:10px;}.loyalty-pagination__pages.svelte-lms3sp {justify-content:flex-end;}
|
|
19
|
-
}.loyalty-pagination__pages.svelte-lms3sp {display:flex;flex-wrap:wrap;align-items:center;gap:8px;justify-content:flex-start;}.loyalty-pagination__ellipsis.svelte-lms3sp {display:inline-flex;align-items:center;justify-content:center;color:var(--text-default, #ffffff);font-size:13px;width:24px;}.loyalty-pagination__btn.svelte-lms3sp {min-width:30px;height:30px;padding:4px 8px;border:none;border-radius:4px;background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));color:var(--text-subtle, #dfe3e8);font-size:13px;font-weight:400;cursor:pointer;}.loyalty-pagination__btn--active.svelte-lms3sp {background:var(--accent, #ffcc00);color:var(--text-on-color, #261d00);}.loyalty-pagination__btn.svelte-lms3sp:disabled {cursor:default;color:var(--text-muted, rgba(251, 251, 251, 0.15));}.loyalty-pagination__btn--prev.svelte-lms3sp,
|
|
20
|
-
.loyalty-pagination__btn--next.svelte-lms3sp {width:95px;}
|
|
21
|
-
|
|
22
|
-
@media (max-width: 767px) {.loyalty-pagination__btn--prev.svelte-lms3sp,
|
|
23
|
-
.loyalty-pagination__btn--next.svelte-lms3sp {width:90px;}
|
|
24
|
-
}.loyalty-pagination__btn--prev.svelte-lms3sp:not(:disabled),
|
|
25
|
-
.loyalty-pagination__btn--next.svelte-lms3sp:not(:disabled) {color:var(--text-default, #ffffff);}
|
|
26
|
-
}`
|
|
27
|
-
};
|
|
28
|
-
function Mt(A, o) {
|
|
29
|
-
at(o, !0), st(A, Et);
|
|
30
|
-
const L = () => vt(ft, "$_", V), [V, F] = rt(), b = _(o, "offset", 7, 0), n = _(o, "limit", 7, D), w = _(o, "total", 7, 0), c = _(o, "onPageChange", 7, (t) => {
|
|
31
|
-
}), u = _(o, "locale", 7, "en");
|
|
32
|
-
nt({ withLocale: u(), translations: {} }), Object.entries(ht).forEach(([t, a]) => {
|
|
33
|
-
lt(t, a);
|
|
34
|
-
}), B(() => {
|
|
35
|
-
var t;
|
|
36
|
-
ot((t = u()) != null ? t : "en");
|
|
37
|
-
});
|
|
38
|
-
const h = E(() => Math.max(1, Math.ceil(w() / Math.max(1, n())))), i = E(() => n() > 0 ? Math.floor(b() / n()) : 0);
|
|
39
|
-
let I = pt(!1);
|
|
40
|
-
B(() => {
|
|
41
|
-
const t = window.matchMedia("(max-width: 767px)"), a = (s) => {
|
|
42
|
-
O(I, s.matches, !0);
|
|
43
|
-
};
|
|
44
|
-
return O(I, t.matches, !0), t.addEventListener("change", a), () => t.removeEventListener("change", a);
|
|
45
|
-
});
|
|
46
|
-
const R = (t, a, s) => t <= (s ? bt : xt) ? Array.from({ length: t }, (C, g) => g) : a <= 1 || a >= t - 2 ? [0, 1, "ellipsis", t - 2, t - 1] : [0, "ellipsis", a, "ellipsis", t - 1], U = E(() => R(e(h), e(i), e(I))), H = (t) => c()(t * n()), J = () => c()(Math.max(0, e(i) - 1) * n()), K = () => c()(Math.min(e(h) - 1, e(i) + 1) * n());
|
|
47
|
-
var Q = {
|
|
48
|
-
get offset() {
|
|
49
|
-
return b();
|
|
50
|
-
},
|
|
51
|
-
set offset(t = 0) {
|
|
52
|
-
b(t), f();
|
|
53
|
-
},
|
|
54
|
-
get limit() {
|
|
55
|
-
return n();
|
|
56
|
-
},
|
|
57
|
-
set limit(t = D) {
|
|
58
|
-
n(t), f();
|
|
59
|
-
},
|
|
60
|
-
get total() {
|
|
61
|
-
return w();
|
|
62
|
-
},
|
|
63
|
-
set total(t = 0) {
|
|
64
|
-
w(t), f();
|
|
65
|
-
},
|
|
66
|
-
get onPageChange() {
|
|
67
|
-
return c();
|
|
68
|
-
},
|
|
69
|
-
set onPageChange(t = (a) => {
|
|
70
|
-
}) {
|
|
71
|
-
c(t), f();
|
|
72
|
-
},
|
|
73
|
-
get locale() {
|
|
74
|
-
return u();
|
|
75
|
-
},
|
|
76
|
-
set locale(t = "en") {
|
|
77
|
-
u(t), f();
|
|
78
|
-
}
|
|
79
|
-
}, P = kt(), W = y(P);
|
|
80
|
-
{
|
|
81
|
-
var X = (t) => {
|
|
82
|
-
var a = Pt(), s = y(a), N = y(s, !0);
|
|
83
|
-
m(s);
|
|
84
|
-
var k = q(s, 2);
|
|
85
|
-
ct(k, 17, () => e(U), dt, (g, r) => {
|
|
86
|
-
var j = yt(), Z = mt(j);
|
|
87
|
-
{
|
|
88
|
-
var $ = (p) => {
|
|
89
|
-
var l = wt();
|
|
90
|
-
v(p, l);
|
|
91
|
-
}, tt = (p) => {
|
|
92
|
-
var l = It();
|
|
93
|
-
let S;
|
|
94
|
-
var et = y(l, !0);
|
|
95
|
-
m(l), G(() => {
|
|
96
|
-
S = ut(l, 1, "loyalty-pagination__btn svelte-lms3sp", null, S, {
|
|
97
|
-
"loyalty-pagination__btn--active": e(r) === e(i)
|
|
98
|
-
}), T(et, e(r) + 1);
|
|
99
|
-
}), M("click", l, () => H(e(r))), v(p, l);
|
|
100
|
-
};
|
|
101
|
-
z(Z, (p) => {
|
|
102
|
-
e(r) === "ellipsis" ? p($) : p(tt, -1);
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
v(g, j);
|
|
106
|
-
});
|
|
107
|
-
var d = q(k, 2), C = y(d, !0);
|
|
108
|
-
m(d), m(a), G(
|
|
109
|
-
(g, r) => {
|
|
110
|
-
s.disabled = e(i) <= 0, T(N, g), d.disabled = e(i) >= e(h) - 1, T(C, r);
|
|
111
|
-
},
|
|
112
|
-
[() => L()("prev"), () => L()("next")]
|
|
113
|
-
), M("click", s, J), M("click", d, K), v(t, a);
|
|
114
|
-
};
|
|
115
|
-
z(W, (t) => {
|
|
116
|
-
e(h) > 1 && t(X);
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
m(P), v(A, P);
|
|
120
|
-
var Y = it(Q);
|
|
121
|
-
return F(), Y;
|
|
122
|
-
}
|
|
123
|
-
gt(["click"]);
|
|
124
|
-
customElements.define("loyalty-pagination", _t(
|
|
125
|
-
Mt,
|
|
126
|
-
{
|
|
127
|
-
offset: {},
|
|
128
|
-
limit: {},
|
|
129
|
-
total: {},
|
|
130
|
-
onPageChange: {},
|
|
131
|
-
locale: {}
|
|
132
|
-
},
|
|
133
|
-
[],
|
|
134
|
-
[]
|
|
135
|
-
));
|
|
136
|
-
export {
|
|
137
|
-
Mt as default
|
|
138
|
-
};
|