@oddsmith/ui 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/os-leaderboard-casino/assets/fallback/config.json +1 -1
- package/dist/components/os-leaderboard-casino/assets/fallback/defaults/glam-sections.json +4 -4
- package/dist/components/os-leaderboard-casino/assets/fallback/labels.json +1 -1
- package/dist/components/os-leaderboard-casino/assets/fallback/labels.json.js +7 -7
- package/dist/components/os-leaderboard-casino/assets/fallback/manifest.json +1 -1
- package/dist/components/os-leaderboard-casino/assets/fallback/presets.json +1 -1
- package/dist/components/os-leaderboard-casino/assets/fallback/presets.json.js +1 -1
- package/dist/components/os-leaderboard-casino/assets/fallback/resolved-presets.json +8 -6
- package/dist/components/os-leaderboard-casino/assets/fallback/resolved-presets.json.js +1 -1
- package/dist/components/os-leaderboard-casino/assets/fallback/themes.json +3 -4
- package/dist/components/os-leaderboard-casino/assets/fallback/themes.json.js +3 -4
- package/dist/components/os-leaderboard-casino/assets/fallback/themes.json.js.map +1 -1
- package/dist/components/os-leaderboard-casino/container/os-leaderboard-casino.html.js +5 -3
- package/dist/components/os-leaderboard-casino/container/os-leaderboard-casino.html.js.map +1 -1
- package/dist/components/os-leaderboard-casino/container/os-leaderboard-casino.js +7 -5
- package/dist/components/os-leaderboard-casino/container/os-leaderboard-casino.js.map +1 -1
- package/dist/components/os-leaderboard-casino/container/os-leaderboard-casino.scss.js +1 -1
- package/dist/components/os-leaderboard-casino/integration/assets-context.d.ts +1 -1
- package/dist/components/os-leaderboard-casino/integration/assets-context.js +40 -35
- package/dist/components/os-leaderboard-casino/integration/assets-context.js.map +1 -1
- package/dist/components/os-leaderboard-casino/integration/resolve-input.js +31 -27
- package/dist/components/os-leaderboard-casino/integration/resolve-input.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/climb-section/climb-section.d.ts +0 -1
- package/dist/components/os-leaderboard-casino/sections/climb-section/climb-section.host.d.ts +0 -1
- package/dist/components/os-leaderboard-casino/sections/climb-section/climb-section.html.js +7 -5
- package/dist/components/os-leaderboard-casino/sections/climb-section/climb-section.html.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/climb-section/climb-section.js +33 -38
- package/dist/components/os-leaderboard-casino/sections/climb-section/climb-section.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/events-banner/components/event-icons.js +7 -5
- package/dist/components/os-leaderboard-casino/sections/events-banner/components/event-icons.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/events-banner/events-banner.js +26 -23
- package/dist/components/os-leaderboard-casino/sections/events-banner/events-banner.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/footer-section/footer-section.html.js +7 -5
- package/dist/components/os-leaderboard-casino/sections/footer-section/footer-section.html.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/footer-section/footer-section.js +11 -9
- package/dist/components/os-leaderboard-casino/sections/footer-section/footer-section.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/games-section/games-section.html.js +5 -3
- package/dist/components/os-leaderboard-casino/sections/games-section/games-section.html.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/games-section/games-section.js +15 -13
- package/dist/components/os-leaderboard-casino/sections/games-section/games-section.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/hero-section/hero-section.html.js +6 -4
- package/dist/components/os-leaderboard-casino/sections/hero-section/hero-section.html.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/hero-section/hero-section.js +6 -3
- package/dist/components/os-leaderboard-casino/sections/hero-section/hero-section.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/legals-section/legals-section.html.js +5 -3
- package/dist/components/os-leaderboard-casino/sections/legals-section/legals-section.html.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/legals-section/legals-section.js +10 -6
- package/dist/components/os-leaderboard-casino/sections/legals-section/legals-section.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/marquee-section/marquee-section.html.js +5 -3
- package/dist/components/os-leaderboard-casino/sections/marquee-section/marquee-section.html.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/marquee-section/marquee-section.js +26 -23
- package/dist/components/os-leaderboard-casino/sections/marquee-section/marquee-section.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/prize-section/components/medal-coin/medal-coin.js +10 -8
- package/dist/components/os-leaderboard-casino/sections/prize-section/components/medal-coin/medal-coin.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/prize-section/prize-section.html.js +5 -3
- package/dist/components/os-leaderboard-casino/sections/prize-section/prize-section.html.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/prize-section/prize-section.js +4 -2
- package/dist/components/os-leaderboard-casino/sections/prize-section/prize-section.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/stats-section/components/stat-rail/stat-rail.js +17 -15
- package/dist/components/os-leaderboard-casino/sections/stats-section/components/stat-rail/stat-rail.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/stats-section/stats-section.html.js +5 -3
- package/dist/components/os-leaderboard-casino/sections/stats-section/stats-section.html.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/stats-section/stats-section.js +15 -13
- package/dist/components/os-leaderboard-casino/sections/stats-section/stats-section.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/table-section/table-section.html.js +5 -3
- package/dist/components/os-leaderboard-casino/sections/table-section/table-section.html.js.map +1 -1
- package/dist/components/os-leaderboard-casino/sections/table-section/table-section.js +16 -14
- package/dist/components/os-leaderboard-casino/sections/table-section/table-section.js.map +1 -1
- package/dist/components/os-leaderboard-casino/services/icon.service.js +10 -8
- package/dist/components/os-leaderboard-casino/services/icon.service.js.map +1 -1
- package/dist/components/os-leaderboard-casino/theme/background.d.ts +4 -0
- package/dist/components/os-leaderboard-casino/theme/background.js +22 -0
- package/dist/components/os-leaderboard-casino/theme/background.js.map +1 -0
- package/dist/components/os-leaderboard-casino/theme/styles.js +3 -3
- package/dist/components/os-leaderboard-casino/theme/styles.js.map +1 -1
- package/dist/components/os-leaderboard-casino/theme/vip-mark.js +11 -9
- package/dist/components/os-leaderboard-casino/theme/vip-mark.js.map +1 -1
- package/dist/components/os-leaderboard-casino/types/assets.d.ts +2 -0
- package/dist/components/os-leaderboard-casino/types/input.d.ts +7 -1
- package/dist/shared/lib/lit/scss.js +4 -4
- package/dist/shared/vendor/lit-element-lit-element.js +45 -0
- package/dist/shared/vendor/lit-element-lit-element.js.map +1 -0
- package/dist/shared/vendor/lit-html-directive-helpers.js +32 -0
- package/dist/shared/vendor/lit-html-directive-helpers.js.map +1 -0
- package/dist/shared/vendor/lit-html-directive.js +23 -0
- package/dist/shared/vendor/lit-html-directive.js.map +1 -0
- package/dist/shared/vendor/lit-html-keyed.js +18 -0
- package/dist/shared/vendor/lit-html-keyed.js.map +1 -0
- package/dist/shared/vendor/lit-html-lit-html.js +234 -0
- package/dist/shared/vendor/lit-html-lit-html.js.map +1 -0
- package/dist/shared/vendor/lit-html-repeat.js +57 -0
- package/dist/shared/vendor/lit-html-repeat.js.map +1 -0
- package/dist/shared/vendor/lit-html-unsafe-html.js +21 -0
- package/dist/shared/vendor/lit-html-unsafe-html.js.map +1 -0
- package/dist/shared/vendor/lit-html-unsafe-svg.js +10 -0
- package/dist/shared/vendor/lit-html-unsafe-svg.js.map +1 -0
- package/dist/shared/vendor/lit-reactive-element-base.js +5 -0
- package/dist/shared/vendor/lit-reactive-element-base.js.map +1 -0
- package/dist/shared/vendor/lit-reactive-element-css-tag.js +46 -0
- package/dist/shared/vendor/lit-reactive-element-css-tag.js.map +1 -0
- package/dist/shared/vendor/lit-reactive-element-property.js +33 -0
- package/dist/shared/vendor/lit-reactive-element-property.js.map +1 -0
- package/dist/shared/vendor/lit-reactive-element-query.js +13 -0
- package/dist/shared/vendor/lit-reactive-element-query.js.map +1 -0
- package/dist/shared/vendor/lit-reactive-element-reactive-element.js +226 -0
- package/dist/shared/vendor/lit-reactive-element-reactive-element.js.map +1 -0
- package/dist/shared/vendor/lit-reactive-element-state.js +8 -0
- package/dist/shared/vendor/lit-reactive-element-state.js.map +1 -0
- package/package.json +3 -1
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import "../../../../shared/vendor/lit-reactive-element-reactive-element.js";
|
|
2
|
+
import { nothing as f } from "../../../../shared/vendor/lit-html-lit-html.js";
|
|
3
|
+
import { LitElement as l } from "../../../../shared/vendor/lit-element-lit-element.js";
|
|
4
|
+
import { property as a } from "../../../../shared/vendor/lit-reactive-element-property.js";
|
|
3
5
|
import { Component as O } from "../../../../shared/lib/lit/component.js";
|
|
4
6
|
import { scss as c } from "../../../../shared/lib/lit/scss.js";
|
|
5
7
|
import { OS_LEADERBOARD_CASINO_FOOTER as u } from "../../constants/tags.js";
|
|
6
8
|
import { osLeaderboardCasinoTheme as _ } from "../../theme/styles.js";
|
|
7
|
-
import "
|
|
9
|
+
import "../../../../shared/vendor/lit-html-unsafe-svg.js";
|
|
8
10
|
import h from "./footer-section.html.js";
|
|
9
11
|
import x from "./footer-section.scss.js";
|
|
10
12
|
var y = Object.defineProperty, d = Object.getOwnPropertyDescriptor, m = (n, e, s, o) => {
|
|
11
|
-
for (var t = o > 1 ? void 0 : o ? d(e, s) : e,
|
|
12
|
-
(
|
|
13
|
+
for (var t = o > 1 ? void 0 : o ? d(e, s) : e, i = n.length - 1, p; i >= 0; i--)
|
|
14
|
+
(p = n[i]) && (t = (o ? p(e, s, t) : p(t)) || t);
|
|
13
15
|
return o && t && y(e, s, t), t;
|
|
14
16
|
};
|
|
15
|
-
let r = class extends
|
|
17
|
+
let r = class extends l {
|
|
16
18
|
constructor() {
|
|
17
19
|
super(...arguments), this.text = "";
|
|
18
20
|
}
|
|
@@ -20,15 +22,15 @@ let r = class extends a {
|
|
|
20
22
|
return this.section?.text ?? this.text;
|
|
21
23
|
}
|
|
22
24
|
render() {
|
|
23
|
-
return this.displayText ? h(this) :
|
|
25
|
+
return this.displayText ? h(this) : f;
|
|
24
26
|
}
|
|
25
27
|
};
|
|
26
28
|
r.styles = [_, c(x)];
|
|
27
29
|
m([
|
|
28
|
-
|
|
30
|
+
a({ attribute: !1 })
|
|
29
31
|
], r.prototype, "section", 2);
|
|
30
32
|
m([
|
|
31
|
-
|
|
33
|
+
a({ type: String })
|
|
32
34
|
], r.prototype, "text", 2);
|
|
33
35
|
r = m([
|
|
34
36
|
O({ selector: u })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer-section.js","sources":["../../../../../src/components/os-leaderboard-casino/sections/footer-section/footer-section.ts"],"sourcesContent":["import { LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Component } from '@oddsmith/lib/lit/component.js';\nimport { scss } from '@oddsmith/lib/lit/scss.js';\nimport { OS_LEADERBOARD_CASINO_FOOTER } from '@os-leaderboard-casino/constants/tags.js';\nimport { osLeaderboardCasinoTheme } from '@os-leaderboard-casino/theme/index.js';\nimport type { OsLeaderboardCasinoFooterSection } from '@os-leaderboard-casino/types/sections.js';\nimport type { FooterSectionHost } from './footer-section.host.js';\nimport renderTemplate from './footer-section.html?lit-html';\nimport styles from './footer-section.scss?inline';\n\n@Component({ selector: OS_LEADERBOARD_CASINO_FOOTER })\nexport class OsLeaderboardCasinoFooter\n extends LitElement\n implements FooterSectionHost\n{\n static styles = [osLeaderboardCasinoTheme, scss(styles)];\n\n @property({ attribute: false })\n section?: OsLeaderboardCasinoFooterSection;\n\n @property({ type: String })\n text = '';\n\n get displayText(): string {\n return this.section?.text ?? this.text;\n }\n\n render() {\n if (!this.displayText) return nothing;\n return renderTemplate(this);\n }\n}\n"],"names":["OsLeaderboardCasinoFooter","LitElement","renderTemplate","nothing","osLeaderboardCasinoTheme","scss","styles","__decorateClass","property","Component","OS_LEADERBOARD_CASINO_FOOTER"],"mappings":"
|
|
1
|
+
{"version":3,"file":"footer-section.js","sources":["../../../../../src/components/os-leaderboard-casino/sections/footer-section/footer-section.ts"],"sourcesContent":["import { LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { Component } from '@oddsmith/lib/lit/component.js';\nimport { scss } from '@oddsmith/lib/lit/scss.js';\nimport { OS_LEADERBOARD_CASINO_FOOTER } from '@os-leaderboard-casino/constants/tags.js';\nimport { osLeaderboardCasinoTheme } from '@os-leaderboard-casino/theme/index.js';\nimport type { OsLeaderboardCasinoFooterSection } from '@os-leaderboard-casino/types/sections.js';\nimport type { FooterSectionHost } from './footer-section.host.js';\nimport renderTemplate from './footer-section.html?lit-html';\nimport styles from './footer-section.scss?inline';\n\n@Component({ selector: OS_LEADERBOARD_CASINO_FOOTER })\nexport class OsLeaderboardCasinoFooter\n extends LitElement\n implements FooterSectionHost\n{\n static styles = [osLeaderboardCasinoTheme, scss(styles)];\n\n @property({ attribute: false })\n section?: OsLeaderboardCasinoFooterSection;\n\n @property({ type: String })\n text = '';\n\n get displayText(): string {\n return this.section?.text ?? this.text;\n }\n\n render() {\n if (!this.displayText) return nothing;\n return renderTemplate(this);\n }\n}\n"],"names":["OsLeaderboardCasinoFooter","LitElement","renderTemplate","nothing","osLeaderboardCasinoTheme","scss","styles","__decorateClass","property","Component","OS_LEADERBOARD_CASINO_FOOTER"],"mappings":";;;;;;;;;;;;;;;;AAYO,IAAMA,IAAN,cACGC,EAEV;AAAA,EAHO,cAAA;AAAA,UAAA,GAAA,SAAA,GAUL,KAAA,OAAO;AAAA,EAAA;AAAA,EAEP,IAAI,cAAsB;AACxB,WAAO,KAAK,SAAS,QAAQ,KAAK;AAAA,EACpC;AAAA,EAEA,SAAS;AACP,WAAK,KAAK,cACHC,EAAe,IAAI,IADIC;AAAAA,EAEhC;AACF;AApBaH,EAIJ,SAAS,CAACI,GAA0BC,EAAKC,CAAM,CAAC;AAGvDC,EAAA;AAAA,EADCC,EAAS,EAAE,WAAW,GAAA,CAAO;AAAA,GANnBR,EAOX,WAAA,WAAA,CAAA;AAGAO,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GATfR,EAUX,WAAA,QAAA,CAAA;AAVWA,IAANO,EAAA;AAAA,EADNE,EAAU,EAAE,UAAUC,EAAA,CAA8B;AAAA,GACxCV,CAAA;"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import "../../../../shared/vendor/lit-reactive-element-reactive-element.js";
|
|
2
|
+
import { html as s } from "../../../../shared/vendor/lit-html-lit-html.js";
|
|
3
|
+
import "../../../../shared/vendor/lit-element-lit-element.js";
|
|
4
|
+
function r(e) {
|
|
3
5
|
return s`<section>
|
|
4
6
|
<div class="section-header">
|
|
5
7
|
<h2 class="section-title">${e.sectionTitle}</h2>
|
|
@@ -10,6 +12,6 @@ function i(e) {
|
|
|
10
12
|
`;
|
|
11
13
|
}
|
|
12
14
|
export {
|
|
13
|
-
|
|
15
|
+
r as default
|
|
14
16
|
};
|
|
15
17
|
//# sourceMappingURL=games-section.html.js.map
|
package/dist/components/os-leaderboard-casino/sections/games-section/games-section.html.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"games-section.html.js","sources":["../../../../../src/components/os-leaderboard-casino/sections/games-section/games-section.html?lit-html"],"sourcesContent":["\nimport { html } from 'lit';\n\nexport default function render(host) {\n return html`<section>\n <div class=\"section-header\">\n <h2 class=\"section-title\">${host.sectionTitle}</h2>\n <span class=\"hint\">every bet earns points</span>\n </div>\n <div class=\"games-row\">${host.renderGames()}</div>\n</section>\n`;\n}\n"],"names":["render","host","html"],"mappings":"
|
|
1
|
+
{"version":3,"file":"games-section.html.js","sources":["../../../../../src/components/os-leaderboard-casino/sections/games-section/games-section.html?lit-html"],"sourcesContent":["\nimport { html } from 'lit';\n\nexport default function render(host) {\n return html`<section>\n <div class=\"section-header\">\n <h2 class=\"section-title\">${host.sectionTitle}</h2>\n <span class=\"hint\">every bet earns points</span>\n </div>\n <div class=\"games-row\">${host.renderGames()}</div>\n</section>\n`;\n}\n"],"names":["render","host","html"],"mappings":";;;AAGe,SAASA,EAAOC,GAAM;AACnC,SAAOC;AAAAA;AAAAA,gCAEuBD,EAAK,YAAY;AAAA;AAAA;AAAA,2BAGtBA,EAAK,aAAa;AAAA;AAAA;AAG7C;"}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import "../../../../shared/vendor/lit-reactive-element-reactive-element.js";
|
|
2
|
+
import { html as l, nothing as m } from "../../../../shared/vendor/lit-html-lit-html.js";
|
|
3
|
+
import { LitElement as h } from "../../../../shared/vendor/lit-element-lit-element.js";
|
|
4
|
+
import { property as p } from "../../../../shared/vendor/lit-reactive-element-property.js";
|
|
5
|
+
import _ from "../../../../shared/vendor/keen-slider-keen-slider.es.js";
|
|
4
6
|
import { Component as f } from "../../../../shared/lib/lit/component.js";
|
|
5
7
|
import { scss as g } from "../../../../shared/lib/lit/scss.js";
|
|
6
8
|
import { OS_LEADERBOARD_CASINO_GAMES as u } from "../../constants/tags.js";
|
|
7
9
|
import { osLeaderboardCasinoTheme as v } from "../../theme/styles.js";
|
|
8
|
-
import { iconService as
|
|
10
|
+
import { iconService as d } from "../../services/icon.service.js";
|
|
9
11
|
import S from "./games-section.html.js";
|
|
10
12
|
import y from "./games-section.scss.js";
|
|
11
13
|
var C = Object.defineProperty, b = Object.getOwnPropertyDescriptor, c = (e, s, r, i) => {
|
|
12
|
-
for (var t = i > 1 ? void 0 : i ? b(s, r) : s,
|
|
13
|
-
(n = e[
|
|
14
|
+
for (var t = i > 1 ? void 0 : i ? b(s, r) : s, a = e.length - 1, n; a >= 0; a--)
|
|
15
|
+
(n = e[a]) && (t = (i ? n(s, r, t) : n(t)) || t);
|
|
14
16
|
return i && t && C(s, r, t), t;
|
|
15
17
|
};
|
|
16
18
|
const w = "(max-width: 767px)";
|
|
17
|
-
let o = class extends
|
|
19
|
+
let o = class extends h {
|
|
18
20
|
constructor() {
|
|
19
21
|
super(...arguments), this._onSliderMqChange = () => this._syncSlider(), this._syncSlider = () => {
|
|
20
22
|
if (!(this.section?.games ?? []).length) return;
|
|
@@ -24,7 +26,7 @@ let o = class extends m {
|
|
|
24
26
|
this._destroySlider();
|
|
25
27
|
return;
|
|
26
28
|
}
|
|
27
|
-
s.classList.add("keen-slider"), this._slider ? this._slider.update() : this._slider = new
|
|
29
|
+
s.classList.add("keen-slider"), this._slider ? this._slider.update() : this._slider = new _(s, {
|
|
28
30
|
mode: "free",
|
|
29
31
|
slides: { perView: "auto", spacing: 10 }
|
|
30
32
|
});
|
|
@@ -48,8 +50,8 @@ let o = class extends m {
|
|
|
48
50
|
e && e.classList.remove("keen-slider");
|
|
49
51
|
}
|
|
50
52
|
renderCard(e, s) {
|
|
51
|
-
const r =
|
|
52
|
-
return
|
|
53
|
+
const r = d.resolveGameIconName(e.id, s), i = e.imageUrl ?? d.get(r).url;
|
|
54
|
+
return l`
|
|
53
55
|
<article class="card keen-slider__slide" data-game-id=${e.id}>
|
|
54
56
|
<div class="thumb">
|
|
55
57
|
<img
|
|
@@ -67,15 +69,15 @@ let o = class extends m {
|
|
|
67
69
|
}
|
|
68
70
|
renderGames() {
|
|
69
71
|
const e = this.section?.games ?? [];
|
|
70
|
-
return
|
|
72
|
+
return l`${e.map((s, r) => this.renderCard(s, r))}`;
|
|
71
73
|
}
|
|
72
74
|
render() {
|
|
73
|
-
return (this.section?.games ?? []).length ? S(this) :
|
|
75
|
+
return (this.section?.games ?? []).length ? S(this) : m;
|
|
74
76
|
}
|
|
75
77
|
};
|
|
76
78
|
o.styles = [v, g(y)];
|
|
77
79
|
c([
|
|
78
|
-
|
|
80
|
+
p({ attribute: !1 })
|
|
79
81
|
], o.prototype, "section", 2);
|
|
80
82
|
o = c([
|
|
81
83
|
f({ selector: u })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"games-section.js","sources":["../../../../../src/components/os-leaderboard-casino/sections/games-section/games-section.ts"],"sourcesContent":["import { html, LitElement, nothing, type TemplateResult } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport KeenSlider, { type KeenSliderInstance } from 'keen-slider';\nimport { Component } from '@oddsmith/lib/lit/component.js';\nimport { scss } from '@oddsmith/lib/lit/scss.js';\nimport { OS_LEADERBOARD_CASINO_GAMES } from '@os-leaderboard-casino/constants/tags.js';\nimport { osLeaderboardCasinoTheme } from '@os-leaderboard-casino/theme/index.js';\nimport type {\n OsLeaderboardCasinoGameItem,\n OsLeaderboardCasinoGamesSection,\n} from '@os-leaderboard-casino/types/sections.js';\nimport { iconService } from '@os-leaderboard-casino/services/icon.service.js';\nimport type { GamesSectionHost } from './games-section.host.js';\nimport renderTemplate from './games-section.html?lit-html';\nimport styles from './games-section.scss?inline';\n\nconst SLIDER_MEDIA_QUERY = '(max-width: 767px)';\n\n/** Qualifying games — title + provider cards in a horizontal row. */\n@Component({ selector: OS_LEADERBOARD_CASINO_GAMES })\nexport class OsLeaderboardCasinoGames\n extends LitElement\n implements GamesSectionHost\n{\n static styles = [osLeaderboardCasinoTheme, scss(styles)];\n\n private _slider?: KeenSliderInstance;\n private _sliderMq?: MediaQueryList;\n private readonly _onSliderMqChange = () => this._syncSlider();\n\n @property({ attribute: false })\n section!: OsLeaderboardCasinoGamesSection;\n\n get sectionTitle(): string {\n return this.section?.title ?? 'Qualifying Games';\n }\n\n connectedCallback() {\n super.connectedCallback();\n this._sliderMq = window.matchMedia(SLIDER_MEDIA_QUERY);\n this._sliderMq.addEventListener('change', this._onSliderMqChange);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this._sliderMq?.removeEventListener('change', this._onSliderMqChange);\n this._sliderMq = undefined;\n this._destroySlider();\n }\n\n protected updated() {\n this._syncSlider();\n }\n\n private _destroySlider() {\n this._slider?.destroy();\n this._slider = undefined;\n\n const el = this.shadowRoot?.querySelector<HTMLElement>('.games-row');\n if (el) el.classList.remove('keen-slider');\n }\n\n private _syncSlider = () => {\n const games = this.section?.games ?? [];\n if (!games.length) return;\n\n const el = this.shadowRoot?.querySelector<HTMLElement>('.games-row');\n if (!el) return;\n\n // TODO: slider is shown only on small screens\n const useSlider = this._sliderMq?.matches ?? false;\n\n if (!useSlider) {\n this._destroySlider();\n return;\n }\n\n el.classList.add('keen-slider');\n\n if (!this._slider) {\n this._slider = new KeenSlider(el, {\n mode: 'free',\n slides: { perView: 'auto', spacing: 10 },\n });\n } else {\n this._slider.update();\n }\n };\n\n private renderCard(game: OsLeaderboardCasinoGameItem, index: number) {\n const iconName = iconService.resolveGameIconName(game.id, index);\n const imageUrl = game.imageUrl ?? iconService.get(iconName).url!;\n return html`\n <article class=\"card keen-slider__slide\" data-game-id=${game.id}>\n <div class=\"thumb\">\n <img\n src=${imageUrl}\n alt=${game.title}\n loading=\"lazy\"\n draggable=\"false\"\n />\n </div>\n <div class=\"body\">\n <div class=\"title\">${game.title}</div>\n </div>\n </article>\n `;\n }\n\n renderGames(): TemplateResult {\n const games = this.section?.games ?? [];\n return html`${games.map((game, index) => this.renderCard(game, index))}`;\n }\n\n render() {\n const games = this.section?.games ?? [];\n if (!games.length) return nothing;\n return renderTemplate(this);\n }\n}\n"],"names":["SLIDER_MEDIA_QUERY","OsLeaderboardCasinoGames","LitElement","el","KeenSlider","game","index","iconName","iconService","imageUrl","html","games","renderTemplate","nothing","osLeaderboardCasinoTheme","scss","styles","__decorateClass","property","Component","OS_LEADERBOARD_CASINO_GAMES"],"mappings":"
|
|
1
|
+
{"version":3,"file":"games-section.js","sources":["../../../../../src/components/os-leaderboard-casino/sections/games-section/games-section.ts"],"sourcesContent":["import { html, LitElement, nothing, type TemplateResult } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport KeenSlider, { type KeenSliderInstance } from 'keen-slider';\nimport { Component } from '@oddsmith/lib/lit/component.js';\nimport { scss } from '@oddsmith/lib/lit/scss.js';\nimport { OS_LEADERBOARD_CASINO_GAMES } from '@os-leaderboard-casino/constants/tags.js';\nimport { osLeaderboardCasinoTheme } from '@os-leaderboard-casino/theme/index.js';\nimport type {\n OsLeaderboardCasinoGameItem,\n OsLeaderboardCasinoGamesSection,\n} from '@os-leaderboard-casino/types/sections.js';\nimport { iconService } from '@os-leaderboard-casino/services/icon.service.js';\nimport type { GamesSectionHost } from './games-section.host.js';\nimport renderTemplate from './games-section.html?lit-html';\nimport styles from './games-section.scss?inline';\n\nconst SLIDER_MEDIA_QUERY = '(max-width: 767px)';\n\n/** Qualifying games — title + provider cards in a horizontal row. */\n@Component({ selector: OS_LEADERBOARD_CASINO_GAMES })\nexport class OsLeaderboardCasinoGames\n extends LitElement\n implements GamesSectionHost\n{\n static styles = [osLeaderboardCasinoTheme, scss(styles)];\n\n private _slider?: KeenSliderInstance;\n private _sliderMq?: MediaQueryList;\n private readonly _onSliderMqChange = () => this._syncSlider();\n\n @property({ attribute: false })\n section!: OsLeaderboardCasinoGamesSection;\n\n get sectionTitle(): string {\n return this.section?.title ?? 'Qualifying Games';\n }\n\n connectedCallback() {\n super.connectedCallback();\n this._sliderMq = window.matchMedia(SLIDER_MEDIA_QUERY);\n this._sliderMq.addEventListener('change', this._onSliderMqChange);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this._sliderMq?.removeEventListener('change', this._onSliderMqChange);\n this._sliderMq = undefined;\n this._destroySlider();\n }\n\n protected updated() {\n this._syncSlider();\n }\n\n private _destroySlider() {\n this._slider?.destroy();\n this._slider = undefined;\n\n const el = this.shadowRoot?.querySelector<HTMLElement>('.games-row');\n if (el) el.classList.remove('keen-slider');\n }\n\n private _syncSlider = () => {\n const games = this.section?.games ?? [];\n if (!games.length) return;\n\n const el = this.shadowRoot?.querySelector<HTMLElement>('.games-row');\n if (!el) return;\n\n // TODO: slider is shown only on small screens\n const useSlider = this._sliderMq?.matches ?? false;\n\n if (!useSlider) {\n this._destroySlider();\n return;\n }\n\n el.classList.add('keen-slider');\n\n if (!this._slider) {\n this._slider = new KeenSlider(el, {\n mode: 'free',\n slides: { perView: 'auto', spacing: 10 },\n });\n } else {\n this._slider.update();\n }\n };\n\n private renderCard(game: OsLeaderboardCasinoGameItem, index: number) {\n const iconName = iconService.resolveGameIconName(game.id, index);\n const imageUrl = game.imageUrl ?? iconService.get(iconName).url!;\n return html`\n <article class=\"card keen-slider__slide\" data-game-id=${game.id}>\n <div class=\"thumb\">\n <img\n src=${imageUrl}\n alt=${game.title}\n loading=\"lazy\"\n draggable=\"false\"\n />\n </div>\n <div class=\"body\">\n <div class=\"title\">${game.title}</div>\n </div>\n </article>\n `;\n }\n\n renderGames(): TemplateResult {\n const games = this.section?.games ?? [];\n return html`${games.map((game, index) => this.renderCard(game, index))}`;\n }\n\n render() {\n const games = this.section?.games ?? [];\n if (!games.length) return nothing;\n return renderTemplate(this);\n }\n}\n"],"names":["SLIDER_MEDIA_QUERY","OsLeaderboardCasinoGames","LitElement","el","KeenSlider","game","index","iconName","iconService","imageUrl","html","games","renderTemplate","nothing","osLeaderboardCasinoTheme","scss","styles","__decorateClass","property","Component","OS_LEADERBOARD_CASINO_GAMES"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,MAAMA,IAAqB;AAIpB,IAAMC,IAAN,cACGC,EAEV;AAAA,EAHO,cAAA;AAAA,UAAA,GAAA,SAAA,GAQL,KAAiB,oBAAoB,MAAM,KAAK,YAAA,GAkChD,KAAQ,cAAc,MAAM;AAE1B,UAAI,EADU,KAAK,SAAS,SAAS,CAAA,GAC1B,OAAQ;AAEnB,YAAMC,IAAK,KAAK,YAAY,cAA2B,YAAY;AACnE,UAAI,CAACA,EAAI;AAKT,UAAI,EAFc,KAAK,WAAW,WAAW,KAE7B;AACd,aAAK,eAAA;AACL;AAAA,MACF;AAEA,MAAAA,EAAG,UAAU,IAAI,aAAa,GAEzB,KAAK,UAMR,KAAK,QAAQ,OAAA,IALb,KAAK,UAAU,IAAIC,EAAWD,GAAI;AAAA,QAChC,MAAM;AAAA,QACN,QAAQ,EAAE,SAAS,QAAQ,SAAS,GAAA;AAAA,MAAG,CACxC;AAAA,IAIL;AAAA,EAAA;AAAA,EAtDA,IAA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E,WAAW,GAAA,CAAO;AAAA,GAVnBjB,EAWX,WAAA,WAAA,CAAA;AAXWA,IAANgB,EAAA;AAAA,EADNE,EAAU,EAAE,UAAUC,EAAA,CAA6B;AAAA,GACvCnB,CAAA;"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import "../../../../shared/vendor/lit-reactive-element-reactive-element.js";
|
|
2
|
+
import { html as i } from "../../../../shared/vendor/lit-html-lit-html.js";
|
|
3
|
+
import "../../../../shared/vendor/lit-element-lit-element.js";
|
|
4
|
+
function l(n) {
|
|
5
|
+
return i`<section class="hero">
|
|
4
6
|
<img
|
|
5
7
|
class="banner-img"
|
|
6
8
|
?hidden=${!n.showBanner}
|
|
@@ -29,6 +31,6 @@ function a(n) {
|
|
|
29
31
|
`;
|
|
30
32
|
}
|
|
31
33
|
export {
|
|
32
|
-
|
|
34
|
+
l as default
|
|
33
35
|
};
|
|
34
36
|
//# sourceMappingURL=hero-section.html.js.map
|
package/dist/components/os-leaderboard-casino/sections/hero-section/hero-section.html.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero-section.html.js","sources":["../../../../../src/components/os-leaderboard-casino/sections/hero-section/hero-section.html?lit-html"],"sourcesContent":["\nimport { html } from 'lit';\n\nexport default function render(host) {\n return html`<section class=\"hero\">\n <img\n class=\"banner-img\"\n ?hidden=${!host.showBanner}\n src=\"${host.bannerUrl}\"\n alt=\"${host.bannerAlt}\"\n />\n <div class=\"inner\">\n <span class=\"status ${host.status ?? ''}\" ?hidden=${!host.showStatus}>\n <i class=\"dot\" ?hidden=${!host.showActiveDot}></i>\n ${host.statusLabel}\n </span>\n <h2>${host.section.title}</h2>\n <p class=\"description\" ?hidden=${!host.showDescription}>\n ${host.section.description}\n </p>\n <div class=\"pool\" ?hidden=${!host.showPool}>\n <span class=\"label\">${host.poolLabel}</span>\n <span class=\"value ${host.poolBump ? 'bump' : ''}\"\n >${host.poolValueLabel}</span\n >\n <span class=\"rising\" ?hidden=${!host.showRising}><i></i> rising</span>\n </div>\n ${host.renderCountdown()}\n </div>\n</section>\n`;\n}\n"],"names":["render","host","html"],"mappings":"
|
|
1
|
+
{"version":3,"file":"hero-section.html.js","sources":["../../../../../src/components/os-leaderboard-casino/sections/hero-section/hero-section.html?lit-html"],"sourcesContent":["\nimport { html } from 'lit';\n\nexport default function render(host) {\n return html`<section class=\"hero\">\n <img\n class=\"banner-img\"\n ?hidden=${!host.showBanner}\n src=\"${host.bannerUrl}\"\n alt=\"${host.bannerAlt}\"\n />\n <div class=\"inner\">\n <span class=\"status ${host.status ?? ''}\" ?hidden=${!host.showStatus}>\n <i class=\"dot\" ?hidden=${!host.showActiveDot}></i>\n ${host.statusLabel}\n </span>\n <h2>${host.section.title}</h2>\n <p class=\"description\" ?hidden=${!host.showDescription}>\n ${host.section.description}\n </p>\n <div class=\"pool\" ?hidden=${!host.showPool}>\n <span class=\"label\">${host.poolLabel}</span>\n <span class=\"value ${host.poolBump ? 'bump' : ''}\"\n >${host.poolValueLabel}</span\n >\n <span class=\"rising\" ?hidden=${!host.showRising}><i></i> rising</span>\n </div>\n ${host.renderCountdown()}\n </div>\n</section>\n`;\n}\n"],"names":["render","host","html"],"mappings":";;;AAGe,SAASA,EAAOC,GAAM;AACnC,SAAOC;AAAAA;AAAAA;AAAAA,cAGK,CAACD,EAAK,UAAU;AAAA,WACnBA,EAAK,SAAS;AAAA,WACdA,EAAK,SAAS;AAAA;AAAA;AAAA,0BAGCA,EAAK,UAAU,EAAE,aAAa,CAACA,EAAK,UAAU;AAAA,+BACzC,CAACA,EAAK,aAAa;AAAA,QAC1CA,EAAK,WAAW;AAAA;AAAA,UAEdA,EAAK,QAAQ,KAAK;AAAA,qCACS,CAACA,EAAK,eAAe;AAAA,QAClDA,EAAK,QAAQ,WAAW;AAAA;AAAA,gCAEA,CAACA,EAAK,QAAQ;AAAA,4BAClBA,EAAK,SAAS;AAAA,2BACfA,EAAK,WAAW,SAAS,EAAE;AAAA,WAC3CA,EAAK,cAAc;AAAA;AAAA,qCAEO,CAACA,EAAK,UAAU;AAAA;AAAA,MAE/CA,EAAK,gBAAe,CAAE;AAAA;AAAA;AAAA;AAI5B;"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import "../../../../shared/vendor/lit-reactive-element-reactive-element.js";
|
|
2
|
+
import { nothing as u, html as p } from "../../../../shared/vendor/lit-html-lit-html.js";
|
|
3
|
+
import { LitElement as f } from "../../../../shared/vendor/lit-element-lit-element.js";
|
|
4
|
+
import { property as d } from "../../../../shared/vendor/lit-reactive-element-property.js";
|
|
5
|
+
import { state as c } from "../../../../shared/vendor/lit-reactive-element-state.js";
|
|
3
6
|
import { Component as b } from "../../../../shared/lib/lit/component.js";
|
|
4
7
|
import { scss as y } from "../../../../shared/lib/lit/scss.js";
|
|
5
8
|
import { OS_LEADERBOARD_CASINO_HERO as w } from "../../constants/tags.js";
|
|
6
9
|
import { osLeaderboardCasinoTheme as D } from "../../theme/styles.js";
|
|
7
|
-
import "
|
|
10
|
+
import "../../../../shared/vendor/lit-html-unsafe-svg.js";
|
|
8
11
|
import g from "./hero-section.html.js";
|
|
9
12
|
import T from "./hero-section.scss.js";
|
|
10
13
|
var v = Object.defineProperty, A = Object.getOwnPropertyDescriptor, l = (t, e, s, i) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero-section.js","sources":["../../../../../src/components/os-leaderboard-casino/sections/hero-section/hero-section.ts"],"sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { Component } from '@oddsmith/lib/lit/component.js';\nimport { scss } from '@oddsmith/lib/lit/scss.js';\nimport { OS_LEADERBOARD_CASINO_HERO } from '@os-leaderboard-casino/constants/tags.js';\nimport { osLeaderboardCasinoTheme } from '@os-leaderboard-casino/theme/index.js';\nimport type { LeaderboardStatus } from '@os-leaderboard-casino/types/data.js';\nimport type { OsLeaderboardCasinoHeroSection } from '@os-leaderboard-casino/types/sections.js';\nimport type { HeroSectionHost } from './hero-section.host.js';\nimport renderTemplate from './hero-section.html?lit-html';\nimport styles from './hero-section.scss?inline';\n\ninterface CountdownParts {\n expired: boolean;\n days: number;\n hours: number;\n minutes: number;\n seconds: number;\n}\n\nfunction countdownTo(endTs: string, now = Date.now()): CountdownParts {\n const remaining = Math.floor((new Date(endTs).getTime() - now) / 1000);\n if (!Number.isFinite(remaining) || remaining <= 0) {\n return { expired: true, days: 0, hours: 0, minutes: 0, seconds: 0 };\n }\n return {\n expired: false,\n days: Math.floor(remaining / 86400),\n hours: Math.floor((remaining % 86400) / 3600),\n minutes: Math.floor((remaining % 3600) / 60),\n seconds: remaining % 60,\n };\n}\n\nconst STATUS_LABELS: Record<LeaderboardStatus, string> = {\n upcoming: 'Upcoming',\n active: 'Live',\n completed: 'Finished',\n cancelled: 'Cancelled',\n};\n\n/** Glam hero — golden ring, shimmer title, prize-pool headline, glowing countdown. */\n@Component({ selector: OS_LEADERBOARD_CASINO_HERO })\nexport class OsLeaderboardCasinoHero\n extends LitElement\n implements HeroSectionHost\n{\n static styles = [osLeaderboardCasinoTheme, scss(styles)];\n\n @property({ attribute: false })\n section!: OsLeaderboardCasinoHeroSection;\n\n @state()\n private now = Date.now();\n\n /** Animated odometer value shown for `prizePoolValue`. */\n @state()\n private poolDisplay: number | null = null;\n\n @state()\n poolBump = false;\n\n private timer?: ReturnType<typeof setInterval>;\n private poolRaf?: number;\n private bumpTimer?: ReturnType<typeof setTimeout>;\n\n get showBanner(): boolean {\n return Boolean(this.section?.bannerAsset?.url);\n }\n\n get bannerUrl(): string {\n return this.section?.bannerAsset?.url ?? '';\n }\n\n get bannerAlt(): string {\n return this.section?.bannerAsset?.label || '';\n }\n\n get showStatus(): boolean {\n return Boolean(this.section?.status);\n }\n\n get status(): LeaderboardStatus | undefined {\n return this.section?.status;\n }\n\n get statusLabel(): string {\n const status = this.section?.status;\n return status ? STATUS_LABELS[status] : '';\n }\n\n get showActiveDot(): boolean {\n return this.section?.status === 'active';\n }\n\n get showDescription(): boolean {\n return Boolean(this.section?.description);\n }\n\n get showPool(): boolean {\n return this.poolDisplay != null || Boolean(this.section?.prizePool);\n }\n\n get poolValueLabel(): string {\n if (this.poolDisplay != null) return this.formatPool(this.poolDisplay);\n return this.section?.prizePool ?? '';\n }\n\n get poolLabel(): string {\n return this.section?.prizePoolLabel ?? 'Total prize pool';\n }\n\n get showRising(): boolean {\n return this.poolDisplay != null;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.timer = setInterval(() => {\n this.now = Date.now();\n }, 1000);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n if (this.timer) clearInterval(this.timer);\n if (this.poolRaf) cancelAnimationFrame(this.poolRaf);\n if (this.bumpTimer) clearTimeout(this.bumpTimer);\n }\n\n willUpdate(changed: Map<string, unknown>) {\n if (!changed.has('section')) return;\n const target = this.section?.prizePoolValue;\n if (target == null) {\n this.poolDisplay = null;\n return;\n }\n if (this.poolDisplay == null) {\n this.poolDisplay = target;\n return;\n }\n if (target !== this.poolDisplay) this.animatePool(target);\n }\n\n /** Rolling count-up from the current display value to `target`. */\n private animatePool(target: number) {\n if (this.poolRaf) cancelAnimationFrame(this.poolRaf);\n const from = this.poolDisplay ?? target;\n const duration = 1100;\n const start = performance.now();\n const tick = (t: number) => {\n const p = Math.min(1, (t - start) / duration);\n const eased = 1 - Math.pow(1 - p, 3);\n this.poolDisplay = Math.round(from + (target - from) * eased);\n if (p < 1) this.poolRaf = requestAnimationFrame(tick);\n };\n this.poolRaf = requestAnimationFrame(tick);\n\n if (target > from) {\n this.poolBump = true;\n if (this.bumpTimer) clearTimeout(this.bumpTimer);\n this.bumpTimer = setTimeout(() => {\n this.poolBump = false;\n }, 650);\n }\n }\n\n private formatPool(value: number): string {\n try {\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: this.section?.prizePoolCurrency ?? 'USD',\n maximumFractionDigits: 0,\n }).format(value);\n } catch {\n return value.toLocaleString();\n }\n }\n\n private get isFinished(): boolean {\n const status = this.section?.status;\n if (status === 'completed' || status === 'cancelled') return true;\n if (!this.section?.endTs) return false;\n return countdownTo(this.section.endTs, this.now).expired;\n }\n\n renderCountdown() {\n const endTs = this.section?.endTs;\n if (!endTs) return nothing;\n\n if (this.isFinished) {\n return html`<span class=\"ended\">🏁 Contest finished</span>`;\n }\n\n const c = countdownTo(endTs, this.now);\n const cell = (v: number, label: string) =>\n html`<div class=\"cell\">\n <b>${String(v).padStart(2, '0')}</b><span>${label}</span>\n </div>`;\n\n return html`\n <div class=\"countdown\">\n <span class=\"label\">Ends in</span>\n ${cell(c.days, 'days')}<span class=\"sep\">:</span>\n ${cell(c.hours, 'hours')}<span class=\"sep\">:</span>\n ${cell(c.minutes, 'min')}<span class=\"sep\">:</span>\n ${cell(c.seconds, 'sec')}\n </div>\n `;\n }\n\n render() {\n if (!this.section) return nothing;\n return renderTemplate(this);\n }\n}\n"],"names":["countdownTo","endTs","now","remaining","STATUS_LABELS","OsLeaderboardCasinoHero","LitElement","status","changed","target","from","duration","start","tick","t","p","eased","value","nothing","html","c","cell","v","label","renderTemplate","osLeaderboardCasinoTheme","scss","styles","__decorateClass","property","state","Component","OS_LEADERBOARD_CASINO_HERO"],"mappings":";;;;;;;;;;;;;;AAoBA,SAASA,EAAYC,GAAeC,IAAM,KAAK,OAAuB;AACpE,QAAMC,IAAY,KAAK,OAAO,IAAI,KAAKF,CAAK,EAAE,QAAA,IAAYC,KAAO,GAAI;AACrE,SAAI,CAAC,OAAO,SAASC,CAAS,KAAKA,KAAa,IACvC,EAAE,SAAS,IAAM,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,EAAA,IAE3D;AAAA,IACL,SAAS;AAAA,IACT,MAAM,KAAK,MAAMA,IAAY,KAAK;AAAA,IAClC,OAAO,KAAK,MAAOA,IAAY,QAAS,IAAI;AAAA,IAC5C,SAA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AAA;AAIAuB,EAAA;AAAA,EADPE,EAAA;AAAM,GAbIzB,EAcH,WAAA,eAAA,CAAA;AAGRuB,EAAA;AAAA,EADCE,EAAA;AAAM,GAhBIzB,EAiBX,WAAA,YAAA,CAAA;AAjBWA,IAANuB,EAAA;AAAA,EADNG,EAAU,EAAE,UAAUC,EAAA,CAA4B;AAAA,GACtC3B,CAAA;"}
|
|
1
|
+
{"version":3,"file":"hero-section.js","sources":["../../../../../src/components/os-leaderboard-casino/sections/hero-section/hero-section.ts"],"sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { Component } from '@oddsmith/lib/lit/component.js';\nimport { scss } from '@oddsmith/lib/lit/scss.js';\nimport { OS_LEADERBOARD_CASINO_HERO } from '@os-leaderboard-casino/constants/tags.js';\nimport { osLeaderboardCasinoTheme } from '@os-leaderboard-casino/theme/index.js';\nimport type { LeaderboardStatus } from '@os-leaderboard-casino/types/data.js';\nimport type { OsLeaderboardCasinoHeroSection } from '@os-leaderboard-casino/types/sections.js';\nimport type { HeroSectionHost } from './hero-section.host.js';\nimport renderTemplate from './hero-section.html?lit-html';\nimport styles from './hero-section.scss?inline';\n\ninterface CountdownParts {\n expired: boolean;\n days: number;\n hours: number;\n minutes: number;\n seconds: number;\n}\n\nfunction countdownTo(endTs: string, now = Date.now()): CountdownParts {\n const remaining = Math.floor((new Date(endTs).getTime() - now) / 1000);\n if (!Number.isFinite(remaining) || remaining <= 0) {\n return { expired: true, days: 0, hours: 0, minutes: 0, seconds: 0 };\n }\n return {\n expired: false,\n days: Math.floor(remaining / 86400),\n hours: Math.floor((remaining % 86400) / 3600),\n minutes: Math.floor((remaining % 3600) / 60),\n seconds: remaining % 60,\n };\n}\n\nconst STATUS_LABELS: Record<LeaderboardStatus, string> = {\n upcoming: 'Upcoming',\n active: 'Live',\n completed: 'Finished',\n cancelled: 'Cancelled',\n};\n\n/** Glam hero — golden ring, shimmer title, prize-pool headline, glowing countdown. */\n@Component({ selector: OS_LEADERBOARD_CASINO_HERO })\nexport class OsLeaderboardCasinoHero\n extends LitElement\n implements HeroSectionHost\n{\n static styles = [osLeaderboardCasinoTheme, scss(styles)];\n\n @property({ attribute: false })\n section!: OsLeaderboardCasinoHeroSection;\n\n @state()\n private now = Date.now();\n\n /** Animated odometer value shown for `prizePoolValue`. */\n @state()\n private poolDisplay: number | null = null;\n\n @state()\n poolBump = false;\n\n private timer?: ReturnType<typeof setInterval>;\n private poolRaf?: number;\n private bumpTimer?: ReturnType<typeof setTimeout>;\n\n get showBanner(): boolean {\n return Boolean(this.section?.bannerAsset?.url);\n }\n\n get bannerUrl(): string {\n return this.section?.bannerAsset?.url ?? '';\n }\n\n get bannerAlt(): string {\n return this.section?.bannerAsset?.label || '';\n }\n\n get showStatus(): boolean {\n return Boolean(this.section?.status);\n }\n\n get status(): LeaderboardStatus | undefined {\n return this.section?.status;\n }\n\n get statusLabel(): string {\n const status = this.section?.status;\n return status ? STATUS_LABELS[status] : '';\n }\n\n get showActiveDot(): boolean {\n return this.section?.status === 'active';\n }\n\n get showDescription(): boolean {\n return Boolean(this.section?.description);\n }\n\n get showPool(): boolean {\n return this.poolDisplay != null || Boolean(this.section?.prizePool);\n }\n\n get poolValueLabel(): string {\n if (this.poolDisplay != null) return this.formatPool(this.poolDisplay);\n return this.section?.prizePool ?? '';\n }\n\n get poolLabel(): string {\n return this.section?.prizePoolLabel ?? 'Total prize pool';\n }\n\n get showRising(): boolean {\n return this.poolDisplay != null;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.timer = setInterval(() => {\n this.now = Date.now();\n }, 1000);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n if (this.timer) clearInterval(this.timer);\n if (this.poolRaf) cancelAnimationFrame(this.poolRaf);\n if (this.bumpTimer) clearTimeout(this.bumpTimer);\n }\n\n willUpdate(changed: Map<string, unknown>) {\n if (!changed.has('section')) return;\n const target = this.section?.prizePoolValue;\n if (target == null) {\n this.poolDisplay = null;\n return;\n }\n if (this.poolDisplay == null) {\n this.poolDisplay = target;\n return;\n }\n if (target !== this.poolDisplay) this.animatePool(target);\n }\n\n /** Rolling count-up from the current display value to `target`. */\n private animatePool(target: number) {\n if (this.poolRaf) cancelAnimationFrame(this.poolRaf);\n const from = this.poolDisplay ?? target;\n const duration = 1100;\n const start = performance.now();\n const tick = (t: number) => {\n const p = Math.min(1, (t - start) / duration);\n const eased = 1 - Math.pow(1 - p, 3);\n this.poolDisplay = Math.round(from + (target - from) * eased);\n if (p < 1) this.poolRaf = requestAnimationFrame(tick);\n };\n this.poolRaf = requestAnimationFrame(tick);\n\n if (target > from) {\n this.poolBump = true;\n if (this.bumpTimer) clearTimeout(this.bumpTimer);\n this.bumpTimer = setTimeout(() => {\n this.poolBump = false;\n }, 650);\n }\n }\n\n private formatPool(value: number): string {\n try {\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: this.section?.prizePoolCurrency ?? 'USD',\n maximumFractionDigits: 0,\n }).format(value);\n } catch {\n return value.toLocaleString();\n }\n }\n\n private get isFinished(): boolean {\n const status = this.section?.status;\n if (status === 'completed' || status === 'cancelled') return true;\n if (!this.section?.endTs) return false;\n return countdownTo(this.section.endTs, this.now).expired;\n }\n\n renderCountdown() {\n const endTs = this.section?.endTs;\n if (!endTs) return nothing;\n\n if (this.isFinished) {\n return html`<span class=\"ended\">🏁 Contest finished</span>`;\n }\n\n const c = countdownTo(endTs, this.now);\n const cell = (v: number, label: string) =>\n html`<div class=\"cell\">\n <b>${String(v).padStart(2, '0')}</b><span>${label}</span>\n </div>`;\n\n return html`\n <div class=\"countdown\">\n <span class=\"label\">Ends in</span>\n ${cell(c.days, 'days')}<span class=\"sep\">:</span>\n ${cell(c.hours, 'hours')}<span class=\"sep\">:</span>\n ${cell(c.minutes, 'min')}<span class=\"sep\">:</span>\n ${cell(c.seconds, 'sec')}\n </div>\n `;\n }\n\n render() {\n if (!this.section) return nothing;\n return renderTemplate(this);\n }\n}\n"],"names":["countdownTo","endTs","now","remaining","STATUS_LABELS","OsLeaderboardCasinoHero","LitElement","status","changed","target","from","duration","start","tick","t","p","eased","value","nothing","html","c","cell","v","label","renderTemplate","osLeaderboardCasinoTheme","scss","styles","__decorateClass","property","state","Component","OS_LEADERBOARD_CASINO_HERO"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,SAASA,EAAYC,GAAeC,IAAM,KAAK,OAAuB;AACpE,QAAMC,IAAY,KAAK,OAAO,IAAI,KAAKF,CAAK,EAAE,QAAA,IAAYC,KAAO,GAAI;AACrE,SAAI,CAAC,OAAO,SAASC,CAAS,KAAKA,KAAa,IACvC,EAAE,SAAS,IAAM,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,EAAA,IAE3D;AAAA,IACL,SAAS;AAAA,IACT,MAAM,KAAK,MAAMA,IAAY,KAAK;AAAA,IAClC,OAAO,KAAK,MAAOA,IAAY,QAAS,IAAI;AAAA,IAC5C,SAAS,KAAK,MAAOA,IAAY,OAAQ,EAAE;AAAA,IAC3C,SAASA,IAAY;AAAA,EAAA;AAEzB;AAEA,MAAMC,IAAmD;AAAA,EACvD,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,WAAW;AACb;AAIO,IAAMC,IAAN,cACGC,EAEV;AAAA,EAHO,cAAA;AAAA,UAAA,GAAA,SAAA,GAUL,KAAQ,MAAM,KAAK,IAAA,GAInB,KAAQ,cAA6B,MAGrC,KAAA,WAAW;AAAA,EAAA;AAAA,EAMX,IAAI,aAAsB;AACxB,WAAO,EAAQ,KAAK,SAAS,aAAa;AAAA,EAC5C;AAAA,EAEA,IAAI,YAAoB;AACtB,WAAO,KAAK,SAAS,aAAa,OAAO;AAAA,EAC3C;AAAA,EAEA,IAAI,YAAoB;AACtB,WAAO,KAAK,SAAS,aAAa,SAAS;AAAA,EAC7C;AAAA,EAEA,IAAI,aAAsB;AACxB,WAAO,EAAQ,KAAK,SAAS;AAAA,EAC/B;AAAA,EAEA,IAAI,SA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OAAOG,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC,aAAaC,CAAK;AAAA;AAGrD,WAAOJ;AAAAA;AAAAA;AAAAA,UAGDE,EAAKD,EAAE,MAAM,MAAM,CAAC;AAAA,UACpBC,EAAKD,EAAE,OAAO,OAAO,CAAC;AAAA,UACtBC,EAAKD,EAAE,SAAS,KAAK,CAAC;AAAA,UACtBC,EAAKD,EAAE,SAAS,KAAK,CAAC;AAAA;AAAA;AAAA,EAG9B;AAAA,EAEA,SAAS;AACP,WAAK,KAAK,UACHI,EAAe,IAAI,IADAN;AAAAA,EAE5B;AACF;AA5Kab,EAIJ,SAAS,CAACoB,GAA0BC,EAAKC,CAAM,CAAC;AAGvDC,EAAA;AAAA,EADCC,EAAS,EAAE,WAAW,GAAA,CAAO;AAAA,GANnBxB,EAOX,WAAA,WAAA,CAAA;AAGQuB,EAAA;AAAA,EADPE,EAAA;AAAM,GATIzB,EAUH,WAAA,OAAA,CAAA;AAIAuB,EAAA;AAAA,EADPE,EAAA;AAAM,GAbIzB,EAcH,WAAA,eAAA,CAAA;AAGRuB,EAAA;AAAA,EADCE,EAAA;AAAM,GAhBIzB,EAiBX,WAAA,YAAA,CAAA;AAjBWA,IAANuB,EAAA;AAAA,EADNG,EAAU,EAAE,UAAUC,EAAA,CAA4B;AAAA,GACtC3B,CAAA;"}
|
package/dist/components/os-leaderboard-casino/sections/legals-section/legals-section.html.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import "../../../../shared/vendor/lit-reactive-element-reactive-element.js";
|
|
2
|
+
import { html as i } from "../../../../shared/vendor/lit-html-lit-html.js";
|
|
3
|
+
import "../../../../shared/vendor/lit-element-lit-element.js";
|
|
4
|
+
function d(l) {
|
|
3
5
|
return i`<div class="legals">
|
|
4
6
|
<nav class="legals__links">
|
|
5
7
|
${l.renderLinks()}
|
|
@@ -28,6 +30,6 @@ function e(l) {
|
|
|
28
30
|
`;
|
|
29
31
|
}
|
|
30
32
|
export {
|
|
31
|
-
|
|
33
|
+
d as default
|
|
32
34
|
};
|
|
33
35
|
//# sourceMappingURL=legals-section.html.js.map
|
package/dist/components/os-leaderboard-casino/sections/legals-section/legals-section.html.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legals-section.html.js","sources":["../../../../../src/components/os-leaderboard-casino/sections/legals-section/legals-section.html?lit-html"],"sourcesContent":["\nimport { html } from 'lit';\n\nexport default function render(host) {\n return html`<div class=\"legals\">\n <nav class=\"legals__links\">\n ${host.renderLinks()}\n </nav>\n <dialog @click=${host.onDialogClick}>\n <div class=\"dialog-panel\">\n <div class=\"dialog-header\">\n <span class=\"dialog-title\">${host.dialogTitle}</span>\n <button\n class=\"dialog-close\"\n type=\"button\"\n aria-label=\"Close\"\n @click=${host.onDialogClose}\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M2 2l10 10M12 2L2 12\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n </svg>\n </button>\n </div>\n <div class=\"dialog-body\">\n <p>${host.renderDialogContent()}</p>\n </div>\n </div>\n </dialog>\n</div>\n`;\n}\n"],"names":["render","host","html"],"mappings":"
|
|
1
|
+
{"version":3,"file":"legals-section.html.js","sources":["../../../../../src/components/os-leaderboard-casino/sections/legals-section/legals-section.html?lit-html"],"sourcesContent":["\nimport { html } from 'lit';\n\nexport default function render(host) {\n return html`<div class=\"legals\">\n <nav class=\"legals__links\">\n ${host.renderLinks()}\n </nav>\n <dialog @click=${host.onDialogClick}>\n <div class=\"dialog-panel\">\n <div class=\"dialog-header\">\n <span class=\"dialog-title\">${host.dialogTitle}</span>\n <button\n class=\"dialog-close\"\n type=\"button\"\n aria-label=\"Close\"\n @click=${host.onDialogClose}\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M2 2l10 10M12 2L2 12\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n </svg>\n </button>\n </div>\n <div class=\"dialog-body\">\n <p>${host.renderDialogContent()}</p>\n </div>\n </div>\n </dialog>\n</div>\n`;\n}\n"],"names":["render","host","html"],"mappings":";;;AAGe,SAASA,EAAOC,GAAM;AACnC,SAAOC;AAAAA;AAAAA,MAEHD,EAAK,YAAW,CAAE;AAAA;AAAA,mBAELA,EAAK,aAAa;AAAA;AAAA;AAAA,qCAGAA,EAAK,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA,mBAKlCA,EAAK,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAQxBA,EAAK,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAMvC;"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import "../../../../shared/vendor/lit-reactive-element-reactive-element.js";
|
|
2
|
+
import { html as p, nothing as m } from "../../../../shared/vendor/lit-html-lit-html.js";
|
|
3
|
+
import { LitElement as c } from "../../../../shared/vendor/lit-element-lit-element.js";
|
|
4
|
+
import { property as d } from "../../../../shared/vendor/lit-reactive-element-property.js";
|
|
5
|
+
import { state as h } from "../../../../shared/vendor/lit-reactive-element-state.js";
|
|
6
|
+
import { query as g } from "../../../../shared/vendor/lit-reactive-element-query.js";
|
|
3
7
|
import { Component as u } from "../../../../shared/lib/lit/component.js";
|
|
4
8
|
import { scss as f } from "../../../../shared/lib/lit/scss.js";
|
|
5
9
|
import { OS_LEADERBOARD_CASINO_LEGALS as _ } from "../../constants/tags.js";
|
|
6
10
|
import { osLeaderboardCasinoTheme as b } from "../../theme/styles.js";
|
|
7
|
-
import "
|
|
11
|
+
import "../../../../shared/vendor/lit-html-unsafe-svg.js";
|
|
8
12
|
import L from "./legals-section.html.js";
|
|
9
13
|
import v from "./legals-section.scss.js";
|
|
10
14
|
var k = Object.defineProperty, C = Object.getOwnPropertyDescriptor, a = (e, t, r, n) => {
|
|
@@ -52,15 +56,15 @@ let o = class extends c {
|
|
|
52
56
|
)}`;
|
|
53
57
|
}
|
|
54
58
|
render() {
|
|
55
|
-
return this.section?.links?.length ? L(this) :
|
|
59
|
+
return this.section?.links?.length ? L(this) : m;
|
|
56
60
|
}
|
|
57
61
|
};
|
|
58
62
|
o.styles = [b, f(v)];
|
|
59
63
|
a([
|
|
60
|
-
|
|
64
|
+
d({ attribute: !1 })
|
|
61
65
|
], o.prototype, "section", 2);
|
|
62
66
|
a([
|
|
63
|
-
|
|
67
|
+
h()
|
|
64
68
|
], o.prototype, "_activeLink", 2);
|
|
65
69
|
a([
|
|
66
70
|
g("dialog")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legals-section.js","sources":["../../../../../src/components/os-leaderboard-casino/sections/legals-section/legals-section.ts"],"sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, state, query } from 'lit/decorators.js';\nimport { Component } from '@oddsmith/lib/lit/component.js';\nimport { scss } from '@oddsmith/lib/lit/scss.js';\nimport { OS_LEADERBOARD_CASINO_LEGALS } from '@os-leaderboard-casino/constants/tags.js';\nimport { osLeaderboardCasinoTheme } from '@os-leaderboard-casino/theme/index.js';\nimport type {\n OsLeaderboardCasinoLegalLink,\n OsLeaderboardCasinoLegalsSection,\n} from '@os-leaderboard-casino/types/sections.js';\nimport type { LegalsSectionHost } from './legals-section.host.js';\nimport renderTemplate from './legals-section.html?lit-html';\nimport styles from './legals-section.scss?inline';\n\nconst DEFAULT_DIALOG_CONTENT =\n 'This promotion is open to all registered players aged 18 or over. Participation is subject to the standard Terms & Conditions applicable to all promotions. Prize winnings are credited as bonus funds and are subject to a 20× wagering requirement before withdrawal. The leaderboard is updated in real time and rankings are final at the time the campaign ends. The operator reserves the right to amend or cancel this promotion at any time without prior notice. Responsible gambling tools are available in your account settings at all times.';\n\n@Component({ selector: OS_LEADERBOARD_CASINO_LEGALS })\nexport class OsLeaderboardCasinoLegals\n extends LitElement\n implements LegalsSectionHost\n{\n static styles = [osLeaderboardCasinoTheme, scss(styles)];\n\n @property({ attribute: false })\n section!: OsLeaderboardCasinoLegalsSection;\n\n @state()\n private _activeLink: OsLeaderboardCasinoLegalLink | null = null;\n\n @query('dialog')\n private _dialog!: HTMLDialogElement;\n\n get dialogTitle(): string {\n return this._activeLink?.label ?? '';\n }\n\n get dialogContent(): string {\n return this._activeLink?.content ?? DEFAULT_DIALOG_CONTENT;\n }\n\n renderDialogContent() {\n return this.dialogContent.split(/<br\\s*\\/?>/).flatMap((part, i, arr) =>\n i < arr.length - 1 ? [part, html`<br />`] : [part],\n );\n }\n\n protected updated(changedProps: Map<string, unknown>): void {\n super.updated(changedProps);\n if (changedProps.has('_activeLink')) {\n const dialog = this._dialog;\n if (!dialog) return;\n if (this._activeLink && !dialog.open) {\n dialog.showModal();\n } else if (!this._activeLink && dialog.open) {\n dialog.close();\n }\n }\n }\n\n readonly onDialogClose = () => {\n this._activeLink = null;\n };\n\n readonly onDialogClick = (e: MouseEvent) => {\n if (e.target === this._dialog) {\n this._activeLink = null;\n }\n };\n\n private _onLinkClick(link: OsLeaderboardCasinoLegalLink): void {\n if (link.type === 'external') {\n window.open(link.href ?? 'https://www.google.com', '_blank', 'noopener,noreferrer');\n } else {\n this._activeLink = link;\n }\n }\n\n renderLinks() {\n return html`${this.section.links.map(\n (link) =>\n html`<button\n class=\"legal-link\"\n type=\"button\"\n @click=${() => this._onLinkClick(link)}\n >${link.label}</button>`,\n )}`;\n }\n\n render() {\n if (!this.section?.links?.length) return nothing;\n return renderTemplate(this);\n }\n}\n"],"names":["DEFAULT_DIALOG_CONTENT","OsLeaderboardCasinoLegals","LitElement","part","i","arr","html","changedProps","dialog","link","renderTemplate","nothing","osLeaderboardCasinoTheme","scss","styles","__decorateClass","property","state","query","Component","OS_LEADERBOARD_CASINO_LEGALS"],"mappings":"
|
|
1
|
+
{"version":3,"file":"legals-section.js","sources":["../../../../../src/components/os-leaderboard-casino/sections/legals-section/legals-section.ts"],"sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, state, query } from 'lit/decorators.js';\nimport { Component } from '@oddsmith/lib/lit/component.js';\nimport { scss } from '@oddsmith/lib/lit/scss.js';\nimport { OS_LEADERBOARD_CASINO_LEGALS } from '@os-leaderboard-casino/constants/tags.js';\nimport { osLeaderboardCasinoTheme } from '@os-leaderboard-casino/theme/index.js';\nimport type {\n OsLeaderboardCasinoLegalLink,\n OsLeaderboardCasinoLegalsSection,\n} from '@os-leaderboard-casino/types/sections.js';\nimport type { LegalsSectionHost } from './legals-section.host.js';\nimport renderTemplate from './legals-section.html?lit-html';\nimport styles from './legals-section.scss?inline';\n\nconst DEFAULT_DIALOG_CONTENT =\n 'This promotion is open to all registered players aged 18 or over. Participation is subject to the standard Terms & Conditions applicable to all promotions. Prize winnings are credited as bonus funds and are subject to a 20× wagering requirement before withdrawal. The leaderboard is updated in real time and rankings are final at the time the campaign ends. The operator reserves the right to amend or cancel this promotion at any time without prior notice. Responsible gambling tools are available in your account settings at all times.';\n\n@Component({ selector: OS_LEADERBOARD_CASINO_LEGALS })\nexport class OsLeaderboardCasinoLegals\n extends LitElement\n implements LegalsSectionHost\n{\n static styles = [osLeaderboardCasinoTheme, scss(styles)];\n\n @property({ attribute: false })\n section!: OsLeaderboardCasinoLegalsSection;\n\n @state()\n private _activeLink: OsLeaderboardCasinoLegalLink | null = null;\n\n @query('dialog')\n private _dialog!: HTMLDialogElement;\n\n get dialogTitle(): string {\n return this._activeLink?.label ?? '';\n }\n\n get dialogContent(): string {\n return this._activeLink?.content ?? DEFAULT_DIALOG_CONTENT;\n }\n\n renderDialogContent() {\n return this.dialogContent.split(/<br\\s*\\/?>/).flatMap((part, i, arr) =>\n i < arr.length - 1 ? [part, html`<br />`] : [part],\n );\n }\n\n protected updated(changedProps: Map<string, unknown>): void {\n super.updated(changedProps);\n if (changedProps.has('_activeLink')) {\n const dialog = this._dialog;\n if (!dialog) return;\n if (this._activeLink && !dialog.open) {\n dialog.showModal();\n } else if (!this._activeLink && dialog.open) {\n dialog.close();\n }\n }\n }\n\n readonly onDialogClose = () => {\n this._activeLink = null;\n };\n\n readonly onDialogClick = (e: MouseEvent) => {\n if (e.target === this._dialog) {\n this._activeLink = null;\n }\n };\n\n private _onLinkClick(link: OsLeaderboardCasinoLegalLink): void {\n if (link.type === 'external') {\n window.open(link.href ?? 'https://www.google.com', '_blank', 'noopener,noreferrer');\n } else {\n this._activeLink = link;\n }\n }\n\n renderLinks() {\n return html`${this.section.links.map(\n (link) =>\n html`<button\n class=\"legal-link\"\n type=\"button\"\n @click=${() => this._onLinkClick(link)}\n >${link.label}</button>`,\n )}`;\n }\n\n render() {\n if (!this.section?.links?.length) return nothing;\n return renderTemplate(this);\n }\n}\n"],"names":["DEFAULT_DIALOG_CONTENT","OsLeaderboardCasinoLegals","LitElement","part","i","arr","html","changedProps","dialog","link","renderTemplate","nothing","osLeaderboardCasinoTheme","scss","styles","__decorateClass","property","state","query","Component","OS_LEADERBOARD_CASINO_LEGALS"],"mappings":";;;;;;;;;;;;;;;;;;AAcA,MAAMA,IACJ;AAGK,IAAMC,IAAN,cACGC,EAEV;AAAA,EAHO,cAAA;AAAA,UAAA,GAAA,SAAA,GAUL,KAAQ,cAAmD,MAgC3D,KAAS,gBAAgB,MAAM;AAC7B,WAAK,cAAc;AAAA,IACrB,GAEA,KAAS,gBAAgB,CAAC,MAAkB;AAC1C,MAAI,EAAE,WAAW,KAAK,YACpB,KAAK,cAAc;AAAA,IAEvB;AAAA,EAAA;AAAA,EAnCA,IAAI,cAAsB;AACxB,WAAO,KAAK,aAAa,SAAS;AAAA,EACpC;AAAA,EAEA,IAAI,gBAAwB;AAC1B,WAAO,KAAK,aAAa,WAAWF;AAAA,EACtC;AAAA,EAEA,sBAAsB;AACpB,WAAO,KAAK,cAAc,MAAM,YAAY,EAAE;AAAA,MAAQ,CAACG,GAAMC,GAAGC,MAC9DD,IAAIC,EAAI,SAAS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
|
-
import
|
|
2
|
-
|
|
1
|
+
import "../../../../shared/vendor/lit-reactive-element-reactive-element.js";
|
|
2
|
+
import { html as r } from "../../../../shared/vendor/lit-html-lit-html.js";
|
|
3
|
+
import "../../../../shared/vendor/lit-element-lit-element.js";
|
|
4
|
+
function n(e) {
|
|
3
5
|
return r`<div
|
|
4
6
|
class="marquee"
|
|
5
7
|
style="--speed: ${e.speedSec}s"
|
|
@@ -12,6 +14,6 @@ function d(e) {
|
|
|
12
14
|
`;
|
|
13
15
|
}
|
|
14
16
|
export {
|
|
15
|
-
|
|
17
|
+
n as default
|
|
16
18
|
};
|
|
17
19
|
//# sourceMappingURL=marquee-section.html.js.map
|
package/dist/components/os-leaderboard-casino/sections/marquee-section/marquee-section.html.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marquee-section.html.js","sources":["../../../../../src/components/os-leaderboard-casino/sections/marquee-section/marquee-section.html?lit-html"],"sourcesContent":["\nimport { html } from 'lit';\n\nexport default function render(host) {\n return html`<div\n class=\"marquee\"\n style=\"--speed: ${host.speedSec}s\"\n role=\"region\"\n aria-label=\"Recent winners\"\n>\n ${host.renderHudLabel()}\n <div class=\"track\">${host.renderTrack()}</div>\n</div>\n`;\n}\n"],"names":["render","host","html"],"mappings":"
|
|
1
|
+
{"version":3,"file":"marquee-section.html.js","sources":["../../../../../src/components/os-leaderboard-casino/sections/marquee-section/marquee-section.html?lit-html"],"sourcesContent":["\nimport { html } from 'lit';\n\nexport default function render(host) {\n return html`<div\n class=\"marquee\"\n style=\"--speed: ${host.speedSec}s\"\n role=\"region\"\n aria-label=\"Recent winners\"\n>\n ${host.renderHudLabel()}\n <div class=\"track\">${host.renderTrack()}</div>\n</div>\n`;\n}\n"],"names":["render","host","html"],"mappings":";;;AAGe,SAASA,EAAOC,GAAM;AACnC,SAAOC;AAAAA;AAAAA,oBAEWD,EAAK,QAAQ;AAAA;AAAA;AAAA;AAAA,IAI7BA,EAAK,eAAc,CAAE;AAAA,uBACFA,EAAK,aAAa;AAAA;AAAA;AAGzC;"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import "../../../../shared/vendor/lit-reactive-element-reactive-element.js";
|
|
2
|
+
import { html as t, nothing as i } from "../../../../shared/vendor/lit-html-lit-html.js";
|
|
3
|
+
import { LitElement as f } from "../../../../shared/vendor/lit-element-lit-element.js";
|
|
4
|
+
import { keyed as $ } from "../../../../shared/vendor/lit-html-keyed.js";
|
|
5
|
+
import { repeat as g } from "../../../../shared/vendor/lit-html-repeat.js";
|
|
6
|
+
import { property as h } from "../../../../shared/vendor/lit-reactive-element-property.js";
|
|
7
|
+
import { state as v } from "../../../../shared/vendor/lit-reactive-element-state.js";
|
|
5
8
|
import { Component as I } from "../../../../shared/lib/lit/component.js";
|
|
6
9
|
import { scss as b } from "../../../../shared/lib/lit/scss.js";
|
|
7
10
|
import { OS_LEADERBOARD_CASINO_MARQUEE as y } from "../../constants/tags.js";
|
|
@@ -9,8 +12,8 @@ import { osLeaderboardCasinoTheme as T } from "../../theme/styles.js";
|
|
|
9
12
|
import { renderPlayerName as C } from "../../theme/vip-mark.js";
|
|
10
13
|
import { iconService as u } from "../../services/icon.service.js";
|
|
11
14
|
import { winIcon as R } from "./components/win-icons.js";
|
|
12
|
-
import { parseMarqueeItem as m, formatWinAmount as
|
|
13
|
-
import { ACTIVE_MARQUEE_VARIANT as
|
|
15
|
+
import { parseMarqueeItem as m, formatWinAmount as p } from "./marquee-item.js";
|
|
16
|
+
import { ACTIVE_MARQUEE_VARIANT as A, isMarqueeVariant as q } from "./marquee-variants.js";
|
|
14
17
|
import S from "./marquee-section.html.js";
|
|
15
18
|
import x from "./marquee-section.scss.js";
|
|
16
19
|
var M = Object.defineProperty, V = Object.getOwnPropertyDescriptor, c = (e, s, r, a) => {
|
|
@@ -18,9 +21,9 @@ var M = Object.defineProperty, V = Object.getOwnPropertyDescriptor, c = (e, s, r
|
|
|
18
21
|
(l = e[d]) && (n = (a ? l(s, r, n) : l(n)) || n);
|
|
19
22
|
return a && n && M(s, r, n), n;
|
|
20
23
|
};
|
|
21
|
-
let
|
|
24
|
+
let o = class extends f {
|
|
22
25
|
constructor() {
|
|
23
|
-
super(...arguments), this.variant =
|
|
26
|
+
super(...arguments), this.variant = A, this.hudIndex = 0, this.feedRows = [], this.feedCursor = 0, this.feedKey = 0;
|
|
24
27
|
}
|
|
25
28
|
get speedSec() {
|
|
26
29
|
return this.section?.speedSec ?? 30;
|
|
@@ -35,7 +38,7 @@ let p = class extends f {
|
|
|
35
38
|
this.stopVariantTimers(), super.disconnectedCallback();
|
|
36
39
|
}
|
|
37
40
|
syncVariantAttribute() {
|
|
38
|
-
const e =
|
|
41
|
+
const e = q(this.variant) ? this.variant : "classic";
|
|
39
42
|
this.dataset.variant = e;
|
|
40
43
|
}
|
|
41
44
|
parsedWins() {
|
|
@@ -65,7 +68,7 @@ let p = class extends f {
|
|
|
65
68
|
this.feedRows = e ? [a, ...this.feedRows].slice(0, 4) : [a, ...this.feedRows];
|
|
66
69
|
}
|
|
67
70
|
formatAmount(e) {
|
|
68
|
-
return
|
|
71
|
+
return p(e.amount ?? null, e.currency ?? "USD");
|
|
69
72
|
}
|
|
70
73
|
renderSeparator() {
|
|
71
74
|
return t`<span class="sep" aria-hidden="true">·</span>`;
|
|
@@ -119,7 +122,7 @@ let p = class extends f {
|
|
|
119
122
|
return i;
|
|
120
123
|
}
|
|
121
124
|
renderTickerWin(e) {
|
|
122
|
-
const s =
|
|
125
|
+
const s = p(e.amount, e.currency);
|
|
123
126
|
return t`
|
|
124
127
|
<span class="win ${e.big ? "big" : ""}">
|
|
125
128
|
<span class="chip">${this.renderItemIcon(e)}</span>
|
|
@@ -158,7 +161,7 @@ let p = class extends f {
|
|
|
158
161
|
${e.map(
|
|
159
162
|
(s) => t`
|
|
160
163
|
<span class="win ${s.vip ? "vip" : ""}">
|
|
161
|
-
${this.renderItemIcon(s)}${this.renderMarqueeUser(s.user, s.vip)}<span class="amt">${
|
|
164
|
+
${this.renderItemIcon(s)}${this.renderMarqueeUser(s.user, s.vip)}<span class="amt">${p(s.amount, s.currency)}</span
|
|
162
165
|
><span class="sep-inline">/</span><span class="game">${s.game}</span>
|
|
163
166
|
</span>
|
|
164
167
|
`
|
|
@@ -183,7 +186,7 @@ let p = class extends f {
|
|
|
183
186
|
this.hudIndex,
|
|
184
187
|
t`<span class="info">
|
|
185
188
|
<span class="who">${this.renderMarqueeUser(s.user, s.vip)}</span>
|
|
186
|
-
<span class="val">${
|
|
189
|
+
<span class="val">${p(s.amount, s.currency)}</span>
|
|
187
190
|
</span>`
|
|
188
191
|
)}
|
|
189
192
|
</div>
|
|
@@ -201,7 +204,7 @@ let p = class extends f {
|
|
|
201
204
|
<span class="chip">${this.renderItemIcon(s)}</span>
|
|
202
205
|
${this.renderMarqueeUser(s.user, s.vip)}
|
|
203
206
|
<span class="game">${s.game}</span>
|
|
204
|
-
<span class="amt">+${
|
|
207
|
+
<span class="amt">+${p(s.amount, s.currency)}</span>
|
|
205
208
|
</span>
|
|
206
209
|
`
|
|
207
210
|
)}
|
|
@@ -240,7 +243,7 @@ let p = class extends f {
|
|
|
240
243
|
<span class="game-line">on ${e.game}</span>
|
|
241
244
|
</span>
|
|
242
245
|
<span class="amt"
|
|
243
|
-
>+${
|
|
246
|
+
>+${p(e.amount, e.currency)}</span
|
|
244
247
|
>
|
|
245
248
|
</div>
|
|
246
249
|
`
|
|
@@ -265,23 +268,23 @@ let p = class extends f {
|
|
|
265
268
|
}
|
|
266
269
|
}
|
|
267
270
|
};
|
|
268
|
-
|
|
271
|
+
o.styles = [T, b(x)];
|
|
269
272
|
c([
|
|
270
273
|
h({ attribute: !1 })
|
|
271
|
-
],
|
|
274
|
+
], o.prototype, "section", 2);
|
|
272
275
|
c([
|
|
273
276
|
h({ attribute: "variant" })
|
|
274
|
-
],
|
|
277
|
+
], o.prototype, "variant", 2);
|
|
275
278
|
c([
|
|
276
279
|
v()
|
|
277
|
-
],
|
|
280
|
+
], o.prototype, "hudIndex", 2);
|
|
278
281
|
c([
|
|
279
282
|
v()
|
|
280
|
-
],
|
|
281
|
-
|
|
283
|
+
], o.prototype, "feedRows", 2);
|
|
284
|
+
o = c([
|
|
282
285
|
I({ selector: y })
|
|
283
|
-
],
|
|
286
|
+
], o);
|
|
284
287
|
export {
|
|
285
|
-
|
|
288
|
+
o as OsLeaderboardCasinoMarquee
|
|
286
289
|
};
|
|
287
290
|
//# sourceMappingURL=marquee-section.js.map
|