@streamlayer/react-ui 1.19.0 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/lib/app/app/Advertisement/index.js +74 -72
  2. package/lib/app/app/Points/index.js +21 -14
  3. package/lib/app/app/index.js +79 -89
  4. package/lib/app/app/useApp.d.ts +2 -1
  5. package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/index.d.ts +1 -0
  6. package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/index.js +10 -9
  7. package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.d.ts +1 -0
  8. package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +22 -18
  9. package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/index.d.ts +1 -0
  10. package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/index.js +7 -7
  11. package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.d.ts +2 -1
  12. package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.js +31 -22
  13. package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.d.ts +1 -0
  14. package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.js +11 -11
  15. package/lib/app/masters/BetPack/BetPackContent/index.js +45 -37
  16. package/lib/app/masters/BetPack/BetPackOverlay/index.d.ts +1 -1
  17. package/lib/app/masters/BetPack/index.js +80 -77
  18. package/lib/app/masters/Points/index.js +24 -18
  19. package/lib/app/masters/masters.js +75 -87
  20. package/lib/app/masters/useSdkResponsive.d.ts +2 -0
  21. package/lib/app/masters/useSdkResponsive.js +3 -1
  22. package/lib/app/masters/useSdkScroll.js +1 -1
  23. package/lib/app/useSdkResponsive.js +1 -1
  24. package/lib/app/useSdkScroll.js +1 -1
  25. package/lib/assets/style.css +1 -1
  26. package/lib/hooks/analytics.js +17 -42
  27. package/lib/index-CLJzLXks.js +64 -0
  28. package/lib/reset.css +1 -1
  29. package/lib/ui/advertisement/notification/index.js +8 -8
  30. package/lib/ui/advertisement/overlay/externalAd/index.js +40306 -94
  31. package/lib/ui/close-btn/index.d.ts +2 -0
  32. package/lib/ui/close-btn/index.js +40 -32
  33. package/lib/ui/gamification/question/inapp/prediction-result/frames/content.js +48 -33
  34. package/lib/ui/gamification/vote/feedback/index.js +30 -30
  35. package/lib/ui/gamification/vote/vote-option/index.js +51 -53
  36. package/lib/ui/icons/index.d.ts +3 -0
  37. package/lib/ui/icons/index.js +75 -54
  38. package/lib/ui/modal/index.js +36 -32
  39. package/lib/ui/show-in/index.js +26 -26
  40. package/lib/ui/theme/masters-theme.js +12 -4
  41. package/lib/ui/theme/theme.js +9 -5
  42. package/package.json +22 -16
  43. package/lib/index-BEm7B1u1.js +0 -72
@@ -1,58 +1,62 @@
1
- import { jsxs as p, jsx as i } from "react/jsx-runtime";
2
- import { styled as w } from "@linaria/react";
3
- import { useState as c, useEffect as d } from "react";
4
- import { r as a } from "../../index-DALxy-8N.js";
5
- import { BREAKPOINTS as u } from "../theme/constants.js";
6
- const h = /* @__PURE__ */ w("div")({
1
+ import { jsxs as c, Fragment as h, jsx as l } from "react/jsx-runtime";
2
+ import { styled as y } from "@linaria/react";
3
+ import { useState as d, useEffect as a } from "react";
4
+ import { r as u } from "../../index-DALxy-8N.js";
5
+ import { BREAKPOINTS as m } from "../theme/constants.js";
6
+ const O = /* @__PURE__ */ y("div")({
7
7
  name: "StaticContainer",
8
8
  class: "svm502q",
9
9
  propsAsIs: !1
10
- }), y = `
10
+ }), f = `
11
11
  .sl-hide-on-modal {
12
12
  height: 0 !important;
13
13
  opacity: 0 !important;
14
14
  overflow: hidden !important;
15
15
  }
16
- `, O = `
16
+ `, S = `
17
17
  .sl-pill-button {
18
18
  display: none !important;
19
19
  }
20
- `, m = () => window.innerWidth >= u.lg && window.innerWidth < u.xl ? 76 : 53, f = (o) => {
21
- var e;
22
- const t = m();
23
- return Math.round((((e = o.current) == null ? void 0 : e.getBoundingClientRect().y) || 0) - t) <= 0;
20
+ `, w = () => window.innerWidth >= m.lg && window.innerWidth < m.xl ? 76 : 53, p = (e) => {
21
+ var n;
22
+ const t = w();
23
+ return Math.round((((n = e.current) == null ? void 0 : n.getBoundingClientRect().y) || 0) - t) <= 0;
24
24
  }, x = ({
25
- children: o,
25
+ children: e,
26
26
  container: t,
27
- useContainer: e
27
+ useContainer: n
28
28
  }) => {
29
- const [l] = c(() => f(t)), [n, s] = c(!1);
30
- return d(() => {
31
- if (!t.current || !l)
32
- return s(!0), () => {
29
+ const [s] = d(() => p(t)), [r, i] = d(!1);
30
+ return a(() => {
31
+ if (!t.current || !s)
32
+ return i(!0), () => {
33
33
  };
34
- const r = window.scrollY;
35
- return s(!0), () => {
36
- f(t) && window.scrollTo({
37
- top: r,
34
+ const o = window.scrollY;
35
+ return i(!0), () => {
36
+ p(t) && window.scrollTo({
37
+ top: o,
38
38
  behavior: "instant"
39
39
  });
40
40
  };
41
- }, []), d(() => {
42
- if (n && t.current && l) {
43
- const r = m();
41
+ }, []), a(() => {
42
+ if (r && t.current && s) {
43
+ const o = w();
44
44
  window.scrollTo({
45
- top: t.current.offsetTop - r,
45
+ top: t.current.offsetTop - o,
46
46
  behavior: "instant"
47
47
  });
48
48
  }
49
- }, [n]), !t.current || !n ? null : e ? a.createPortal(/* @__PURE__ */ p(h, {
50
- children: [o, /* @__PURE__ */ i("style", {
51
- children: y
52
- }), /* @__PURE__ */ i("style", {
53
- children: O
49
+ }, [r]), !t.current || !r ? null : n ? u.createPortal(/* @__PURE__ */ c(O, {
50
+ children: [e, /* @__PURE__ */ l("style", {
51
+ children: f
52
+ }), /* @__PURE__ */ l("style", {
53
+ children: S
54
54
  })]
55
- }), t.current, "modal-node") : a.createPortal(o, t.current, "modal-node");
55
+ }), t.current, "modal-node") : u.createPortal(/* @__PURE__ */ c(h, {
56
+ children: [/* @__PURE__ */ l("style", {
57
+ children: f
58
+ }), e]
59
+ }), t.current, "modal-node");
56
60
  };
57
61
  export {
58
62
  x as ModalPortal
@@ -1,54 +1,54 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
- import { cx as h } from "@linaria/core";
2
+ import { cx as g } from "@linaria/core";
3
3
  import { styled as p } from "@linaria/react";
4
- import { useRef as l, useMemo as a } from "react";
5
- const w = /* @__PURE__ */ p("div")({
4
+ import { useRef as l } from "react";
5
+ const u = /* @__PURE__ */ p("div")({
6
6
  name: "Container",
7
7
  class: "c1pgyo67",
8
8
  propsAsIs: !1
9
- }), f = "sx17qu6", d = "h1692c5m", x = ({
9
+ }), h = "sx17qu6", w = "h1692c5m", f = ({
10
10
  children: r,
11
11
  style: e,
12
- className: n,
13
- enabled: o = !0,
12
+ className: o,
13
+ enabled: t = !0,
14
14
  hiding: s,
15
- onAnimationEnd: t
16
- }) => /* @__PURE__ */ c(w, {
15
+ onAnimationEnd: n
16
+ }) => /* @__PURE__ */ c(u, {
17
17
  style: e,
18
- className: h(n, o && f, o && s && d),
19
- onAnimationEnd: t,
18
+ className: g(o, t && h, t && s && w),
19
+ onAnimationEnd: n,
20
20
  children: r
21
- }), y = () => x, C = /* @__PURE__ */ p(y())({
21
+ }), d = () => f, y = /* @__PURE__ */ p(d())({
22
22
  name: "GrowingContainer",
23
23
  class: "gck55ev",
24
24
  propsAsIs: !0
25
- }), G = ({
25
+ }), v = ({
26
26
  children: r,
27
27
  style: e,
28
- enabled: n,
29
- animate: o,
28
+ enabled: o,
29
+ animate: t,
30
30
  ...s
31
31
  }) => {
32
- const t = l(null), u = a(() => {
33
- const m = t == null ? void 0 : t.current, i = m && window.getComputedStyle(m), g = i == null ? void 0 : i.getPropertyValue("height");
34
- return n ? {
35
- height: o ? g : 0
36
- } : {};
37
- }, [n, o]);
38
- return /* @__PURE__ */ c(C, {
32
+ const n = l(null);
33
+ return /* @__PURE__ */ c(y, {
39
34
  ...s,
40
- enabled: n && o,
35
+ enabled: o && t,
41
36
  style: {
42
37
  ...e,
43
- ...u
38
+ ...(() => {
39
+ const m = n == null ? void 0 : n.current, i = m && window.getComputedStyle(m), a = i == null ? void 0 : i.getPropertyValue("height");
40
+ return o ? {
41
+ height: t ? a : 0
42
+ } : {};
43
+ })()
44
44
  },
45
45
  children: /* @__PURE__ */ c("div", {
46
- ref: t,
46
+ ref: n,
47
47
  children: r
48
48
  })
49
49
  });
50
50
  };
51
51
  export {
52
- G as GrowingShowIn,
53
- x as ShowIn
52
+ v as GrowingShowIn,
53
+ f as ShowIn
54
54
  };
@@ -1,7 +1,7 @@
1
1
  import { breakpoints as n } from "./breakpoints.js";
2
- import { COLORS as i, FONT as t } from "./constants.js";
2
+ import { COLORS as r, FONT as t } from "./constants.js";
3
3
  const c = {
4
- ...i,
4
+ ...r,
5
5
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
6
6
  // @ts-expect-error
7
7
  BG_TRANSPARENT: "rgba(0,0,0, .8)",
@@ -73,9 +73,9 @@ const c = {
73
73
  SERIF1: "'Tiempos', 'Tiempos Headline', Times New Roman, serif",
74
74
  COLOR: "#fff",
75
75
  WEIGHT_DEFAULT: "500"
76
- }, f = Object.entries(c).reduce((o, [a, r]) => `
76
+ }, f = Object.entries(c).reduce((o, [a, i]) => `
77
77
  ${o}
78
- --color-${a.toLowerCase().replaceAll("_", "-")}: ${r};
78
+ --color-${a.toLowerCase().replaceAll("_", "-")}: ${i};
79
79
  `, ""), _ = `
80
80
  ${f}
81
81
  --font-family: ${e.REGULAR};
@@ -179,6 +179,7 @@ const c = {
179
179
  --path-fill-vote-answer-indicator: #107D57;
180
180
  --font-weight-percentage: normal;
181
181
  --margin-left-percentage: 8px;
182
+ --question-content-max-width: unset;
182
183
  --line-height-percentage: 17px;
183
184
  --line-height-percentage: 1.55em;
184
185
  --border-color-btn-correct: #107D57;
@@ -189,6 +190,9 @@ const c = {
189
190
  --vote-options-margin-bottom: 0px;
190
191
  --fw-feedback: inherit;
191
192
  --letter-spacing-question-title: normal;
193
+ --margin-left-pts: 0px;
194
+ --display-question-container: initial;
195
+ --justify-content-question-container: initial;
192
196
 
193
197
  .betPack {
194
198
  --padding-question-content: 0.8em 0.8em 0em 0.8em;
@@ -228,6 +232,7 @@ const c = {
228
232
  --path-fill-vote-answer-indicator: #fff;
229
233
  --font-weight-percentage: 500;
230
234
  --margin-left-percentage: 0.72em;
235
+ --question-content-max-width: 500px;
231
236
  --line-height-percentage: 1.55em;
232
237
  --border-color-btn-correct: #fff;
233
238
  --border-color-btn-voted: #fff;
@@ -244,6 +249,9 @@ const c = {
244
249
  --vote-options-margin-bottom: 0.5em;
245
250
  --fw-feedback: 600;
246
251
  --letter-spacing-question-title: -0.03em;
252
+ --margin-left-pts: 0.72em;
253
+ --display-question-container: flex;
254
+ --justify-content-question-container: center;
247
255
  }
248
256
  `, p = "m1ojpy2l";
249
257
  export {
@@ -1,5 +1,5 @@
1
1
  import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
- import { breakpoints as n } from "./breakpoints.js";
2
+ import { breakpoints as a } from "./breakpoints.js";
3
3
  import { colors as p, colorsAdvertisement as s, FONT as e } from "./constants.js";
4
4
  const l = `
5
5
  ${p}
@@ -54,11 +54,11 @@ const l = `
54
54
  --promo-animation-duration: 0.5s;
55
55
  --promo-animation-function: ease-in;
56
56
 
57
- ${n.down("xl")`
57
+ ${a.down("xl")`
58
58
  --header-offset: 0px;
59
59
  `}
60
60
 
61
- ${n.intermediate("xl", "lg")`
61
+ ${a.intermediate("xl", "lg")`
62
62
  --header-offset: 0px;
63
63
  `}
64
64
 
@@ -129,6 +129,7 @@ const l = `
129
129
  --path-fill-vote-answer-indicator: #107D57;
130
130
  --font-weight-percentage: normal;
131
131
  --margin-left-percentage: 8px;
132
+ --question-content-max-width: unset;
132
133
  --line-height-percentage: 17px;
133
134
  --line-height-percentage: 1.55em;
134
135
  --border-color-btn-correct: #107D57;
@@ -139,7 +140,10 @@ const l = `
139
140
  --vote-options-margin-bottom: 0px;
140
141
  --fw-feedback: inherit;
141
142
  --letter-spacing-question-title: normal;
143
+ --margin-left-pts: 0px;
142
144
 
145
+ --display-question-container: initial;
146
+ --justify-content-question-container: initial;
143
147
  `, h = "StreamLayerCSSReset", m = "ttkj0ah", g = () => /* @__PURE__ */ t("table", {
144
148
  children: /* @__PURE__ */ i("table", {
145
149
  children: [/* @__PURE__ */ t("thead", {
@@ -152,14 +156,14 @@ const l = `
152
156
  })
153
157
  }), /* @__PURE__ */ t("tbody", {
154
158
  children: l.split(";").map((o) => {
155
- const a = o.trim(), [r, d] = a.split(":");
159
+ const n = o.trim(), [r, d] = n.split(":");
156
160
  return /* @__PURE__ */ i("tr", {
157
161
  children: [/* @__PURE__ */ t("td", {
158
162
  children: r
159
163
  }), /* @__PURE__ */ t("td", {
160
164
  children: d
161
165
  })]
162
- }, a);
166
+ }, n);
163
167
  })
164
168
  })]
165
169
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -64,24 +64,24 @@
64
64
  "@streamlayer/sl-eslib": "^5.149.1",
65
65
  "@types/lodash.throttle": "^4.1.9",
66
66
  "lodash.throttle": "^4.1.1",
67
- "nanoid": "3.3.7",
68
67
  "react-infinite-scroller": "^1.2.6",
69
68
  "react-virtualized-auto-sizer": "^1.0.24",
70
69
  "react-window": "^1.8.10",
71
70
  "react-window-infinite-loader": "^1.0.9",
72
- "@streamlayer/feature-gamification": "^1.15.0",
73
- "@streamlayer/sdk-web": "^1.9.0",
74
- "@streamlayer/sdk-web-analytics": "^1.6.2",
75
- "@streamlayer/sdk-web-anonymous-auth": "^1.1.24",
76
- "@streamlayer/sdk-web-core": "^1.11.0",
77
- "@streamlayer/sdk-web-api": "^1.7.2",
78
- "@streamlayer/sdk-web-features": "^1.0.45",
79
- "@streamlayer/react-polyfills": "^0.1.5",
80
- "@streamlayer/sdk-web-interfaces": "^1.4.11",
81
- "@streamlayer/sdk-web-logger": "^1.0.45",
82
- "@streamlayer/sdk-web-notifications": "^1.3.7",
83
- "@streamlayer/sdk-web-storage": "^1.0.45",
84
- "@streamlayer/sdk-web-types": "^1.10.2"
71
+ "uuid": "^11.1.0",
72
+ "@streamlayer/feature-gamification": "^1.16.0",
73
+ "@streamlayer/react-polyfills": "^0.1.7",
74
+ "@streamlayer/sdk-web": "^1.10.0",
75
+ "@streamlayer/sdk-web-analytics": "^1.7.0",
76
+ "@streamlayer/sdk-web-anonymous-auth": "^1.1.26",
77
+ "@streamlayer/sdk-web-api": "^1.8.0",
78
+ "@streamlayer/sdk-web-core": "^1.11.2",
79
+ "@streamlayer/sdk-web-features": "^1.0.47",
80
+ "@streamlayer/sdk-web-interfaces": "^1.4.13",
81
+ "@streamlayer/sdk-web-logger": "^1.0.47",
82
+ "@streamlayer/sdk-web-notifications": "^1.3.9",
83
+ "@streamlayer/sdk-web-storage": "^1.0.47",
84
+ "@streamlayer/sdk-web-types": "^1.10.4"
85
85
  },
86
86
  "nx": {
87
87
  "implicitDependencies": [
@@ -123,6 +123,12 @@
123
123
  "vite-plugin-svgr": "^4.2.0",
124
124
  "vite-svg-loader": "^5.1.0",
125
125
  "vite-tsconfig-paths": "^5.0.1",
126
- "@streamlayer/react": "^1.13.0"
126
+ "@streamlayer/react": "^1.14.0"
127
+ },
128
+ "dependencies": {
129
+ "@dailymotion/vast-client": "^6.2.0",
130
+ "video.js": "^8.21.0",
131
+ "videojs-contrib-ads": "^7.5.2",
132
+ "vpaid-html5-client": "^0.1.14"
127
133
  }
128
134
  }
@@ -1,72 +0,0 @@
1
- let t = [], v = (r, u) => {
2
- let i = [], e = {
3
- get() {
4
- return e.lc || e.listen(() => {
5
- })(), e.value;
6
- },
7
- l: u || 0,
8
- lc: 0,
9
- listen(n, f) {
10
- return e.lc = i.push(n, f || e.l) / 2, () => {
11
- let a = i.indexOf(n);
12
- ~a && (i.splice(a, 2), --e.lc || e.off());
13
- };
14
- },
15
- notify(n, f) {
16
- let a = !t.length;
17
- for (let l = 0; l < i.length; l += 2)
18
- t.push(
19
- i[l],
20
- i[l + 1],
21
- e.value,
22
- n,
23
- f
24
- );
25
- if (a) {
26
- for (let l = 0; l < t.length; l += 5) {
27
- let o;
28
- for (let s = l + 1; !o && (s += 5) < t.length; )
29
- t[s] < t[l + 1] && (o = t.push(
30
- t[l],
31
- t[l + 1],
32
- t[l + 2],
33
- t[l + 3],
34
- t[l + 4]
35
- ));
36
- o || t[l](
37
- t[l + 2],
38
- t[l + 3],
39
- t[l + 4]
40
- );
41
- }
42
- t.length = 0;
43
- }
44
- },
45
- /* It will be called on last listener unsubscribing.
46
- We will redefine it in onMount and onStop. */
47
- off() {
48
- },
49
- set(n) {
50
- let f = e.value;
51
- f !== n && (e.value = n, e.notify(f));
52
- },
53
- subscribe(n, f) {
54
- let a = e.listen(n, f);
55
- return n(e.value), a;
56
- },
57
- value: r
58
- };
59
- return e;
60
- }, p = (r = {}) => {
61
- let u = v(r);
62
- return u.setKey = function(i, e) {
63
- let n = u.value;
64
- typeof e > "u" && i in u.value ? (u.value = { ...u.value }, delete u.value[i], u.notify(n, i)) : u.value[i] !== e && (u.value = {
65
- ...u.value,
66
- [i]: e
67
- }, u.notify(n, i));
68
- }, u;
69
- };
70
- export {
71
- p as m
72
- };