@streamlayer/react-ui 1.22.3 → 1.22.5

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 (47) hide show
  1. package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/styles.js +1 -1
  2. package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +7 -7
  3. package/lib/app/masters/BetPack/BetPackContent/EndScreen/styles.js +1 -1
  4. package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/index.d.ts +0 -1
  5. package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/index.js +3 -3
  6. package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.d.ts +4 -3
  7. package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.js +17 -18
  8. package/lib/app/masters/BetPack/BetPackContent/index.js +335 -87
  9. package/lib/app/masters/BetPack/BetPackContent/styles.d.ts +95 -3
  10. package/lib/app/masters/BetPack/BetPackContent/styles.js +11 -57
  11. package/lib/app/masters/Features/Gamification/index.d.ts +1 -0
  12. package/lib/app/masters/Features/Gamification/index.js +36 -30
  13. package/lib/app/masters/Features/index.d.ts +1 -0
  14. package/lib/app/masters/Features/index.js +13 -12
  15. package/lib/app/masters/Notifications/index.d.ts +1 -0
  16. package/lib/app/masters/Notifications/index.js +97 -94
  17. package/lib/app/masters/Points/index.js +16 -25
  18. package/lib/app/masters/masters.d.ts +1 -0
  19. package/lib/app/masters/masters.js +71 -60
  20. package/lib/app/masters/story/index.d.ts +0 -1
  21. package/lib/app/masters/story/index.js +25 -37
  22. package/lib/app/masters/styles.d.ts +1 -0
  23. package/lib/app/masters/styles.js +16 -15
  24. package/lib/app/masters/useSdkResponsive.js +20 -19
  25. package/lib/app/masters/useSdkScroll.d.ts +1 -1
  26. package/lib/app/masters/useSdkScroll.js +33 -33
  27. package/lib/assets/style.css +1 -1
  28. package/lib/styles-BfnMua4o.js +2841 -0
  29. package/lib/ui/advertisement/overlay/externalAd/index.js +49 -41
  30. package/lib/ui/advertisement/overlay/externalAd/styles.d.ts +11 -2
  31. package/lib/ui/advertisement/overlay/externalAd/styles.js +55 -38
  32. package/lib/ui/gamification/question/notification/prediction-result/index.js +43 -43
  33. package/lib/ui/modal/index.d.ts +1 -0
  34. package/lib/ui/modal/index.js +36 -31
  35. package/lib/ui/questions/insight/index.js +24 -16
  36. package/lib/ui/questions/insight/styles.d.ts +1 -0
  37. package/lib/ui/questions/insight/styles.js +14 -13
  38. package/lib/ui/theme/constants.d.ts +2 -0
  39. package/lib/ui/theme/constants.js +6 -4
  40. package/lib/ui/theme/masters-theme.js +7 -4
  41. package/lib/ui/theme/theme.js +3 -0
  42. package/lib/ui/video-player/index.d.ts +1 -0
  43. package/lib/ui/video-player/index.js +29 -28
  44. package/package.json +16 -17
  45. package/lib/app/masters/BetPack/BetPackContent/constants.d.ts +0 -13
  46. package/lib/app/masters/BetPack/BetPackContent/constants.js +0 -22
  47. package/lib/app/masters/BetPack/typings.d.js +0 -1
@@ -1,6 +1,98 @@
1
- export declare const Carousel: any;
2
- export declare const Dot: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
- export declare const Dots: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
1
+ export declare const Carousel: {
2
+ __wyw_meta: unknown;
3
+ } & import('react').FunctionComponent<import('react').RefAttributes<import('swiper/react').SwiperRef> & Omit<import('react').HTMLAttributes<HTMLElement>, "onClick" | "onProgress" | "onTouchEnd" | "onTouchMove" | "onTouchStart" | "onTransitionEnd" | "onKeyPress" | "onDoubleClick" | "onScroll" | "onResize"> & import('swiper/types').SwiperOptions & {
4
+ tag?: string;
5
+ wrapperTag?: string;
6
+ onSwiper?: (swiper: import('swiper/types').Swiper) => void;
7
+ onAutoplayStart?: (swiper: import('swiper/types').Swiper) => void;
8
+ onAutoplayStop?: (swiper: import('swiper/types').Swiper) => void;
9
+ onAutoplayPause?: (swiper: import('swiper/types').Swiper) => void;
10
+ onAutoplayResume?: (swiper: import('swiper/types').Swiper) => void;
11
+ onAutoplayTimeLeft?: (swiper: import('swiper/types').Swiper, timeLeft: number, percentage: number) => void;
12
+ onAutoplay?: (swiper: import('swiper/types').Swiper) => void;
13
+ onHashChange?: (swiper: import('swiper/types').Swiper) => void;
14
+ onHashSet?: (swiper: import('swiper/types').Swiper) => void;
15
+ onScroll?: (swiper: import('swiper/types').Swiper, event: WheelEvent) => void;
16
+ onKeyPress?: (swiper: import('swiper/types').Swiper, keyCode: string) => void;
17
+ onNavigationHide?: (swiper: import('swiper/types').Swiper) => void;
18
+ onNavigationShow?: (swiper: import('swiper/types').Swiper) => void;
19
+ onNavigationPrev?: (swiper: import('swiper/types').Swiper) => void;
20
+ onNavigationNext?: (swiper: import('swiper/types').Swiper) => void;
21
+ onPaginationRender?: (swiper: import('swiper/types').Swiper, paginationEl: HTMLElement) => void;
22
+ onPaginationUpdate?: (swiper: import('swiper/types').Swiper, paginationEl: HTMLElement) => void;
23
+ onPaginationHide?: (swiper: import('swiper/types').Swiper) => void;
24
+ onPaginationShow?: (swiper: import('swiper/types').Swiper) => void;
25
+ onScrollbarDragStart?: (swiper: import('swiper/types').Swiper, event: MouseEvent | TouchEvent | PointerEvent) => void;
26
+ onScrollbarDragMove?: (swiper: import('swiper/types').Swiper, event: MouseEvent | TouchEvent | PointerEvent) => void;
27
+ onScrollbarDragEnd?: (swiper: import('swiper/types').Swiper, event: MouseEvent | TouchEvent | PointerEvent) => void;
28
+ onZoomChange?: (swiper: import('swiper/types').Swiper, scale: number, imageEl: HTMLElement, slideEl: HTMLElement) => void;
29
+ onInit?: (swiper: import('swiper/types').Swiper) => any;
30
+ onBeforeDestroy?: (swiper: import('swiper/types').Swiper) => void;
31
+ onSlidesUpdated?: (swiper: import('swiper/types').Swiper) => void;
32
+ onSlideChange?: (swiper: import('swiper/types').Swiper) => void;
33
+ onSlideChangeTransitionStart?: (swiper: import('swiper/types').Swiper) => void;
34
+ onSlideChangeTransitionEnd?: (swiper: import('swiper/types').Swiper) => void;
35
+ onSlideNextTransitionStart?: (swiper: import('swiper/types').Swiper) => void;
36
+ onSlideNextTransitionEnd?: (swiper: import('swiper/types').Swiper) => void;
37
+ onSlidePrevTransitionStart?: (swiper: import('swiper/types').Swiper) => void;
38
+ onSlidePrevTransitionEnd?: (swiper: import('swiper/types').Swiper) => void;
39
+ onTransitionStart?: (swiper: import('swiper/types').Swiper) => void;
40
+ onTransitionEnd?: (swiper: import('swiper/types').Swiper) => void;
41
+ onTouchStart?: (swiper: import('swiper/types').Swiper, event: MouseEvent | TouchEvent | PointerEvent) => void;
42
+ onTouchMove?: (swiper: import('swiper/types').Swiper, event: MouseEvent | TouchEvent | PointerEvent) => void;
43
+ onTouchMoveOpposite?: (swiper: import('swiper/types').Swiper, event: MouseEvent | TouchEvent | PointerEvent) => void;
44
+ onSliderMove?: (swiper: import('swiper/types').Swiper, event: MouseEvent | TouchEvent | PointerEvent) => void;
45
+ onTouchEnd?: (swiper: import('swiper/types').Swiper, event: MouseEvent | TouchEvent | PointerEvent) => void;
46
+ onClick?: (swiper: import('swiper/types').Swiper, event: MouseEvent | TouchEvent | PointerEvent) => void;
47
+ onTap?: (swiper: import('swiper/types').Swiper, event: MouseEvent | TouchEvent | PointerEvent) => void;
48
+ onDoubleTap?: (swiper: import('swiper/types').Swiper, event: MouseEvent | TouchEvent | PointerEvent) => void;
49
+ onProgress?: (swiper: import('swiper/types').Swiper, progress: number) => void;
50
+ onReachBeginning?: (swiper: import('swiper/types').Swiper) => void;
51
+ onReachEnd?: (swiper: import('swiper/types').Swiper) => void;
52
+ onToEdge?: (swiper: import('swiper/types').Swiper) => void;
53
+ onFromEdge?: (swiper: import('swiper/types').Swiper) => void;
54
+ onSetTranslate?: (swiper: import('swiper/types').Swiper, translate: number) => void;
55
+ onSetTransition?: (swiper: import('swiper/types').Swiper, transition: number) => void;
56
+ onResize?: (swiper: import('swiper/types').Swiper) => void;
57
+ onObserverUpdate?: (swiper: import('swiper/types').Swiper) => void;
58
+ onBeforeLoopFix?: (swiper: import('swiper/types').Swiper) => void;
59
+ onLoopFix?: (swiper: import('swiper/types').Swiper) => void;
60
+ onBreakpoint?: (swiper: import('swiper/types').Swiper, breakpointParams: import('swiper/types').SwiperOptions) => void;
61
+ _beforeBreakpoint?: (swiper: import('swiper/types').Swiper, breakpointParams: import('swiper/types').SwiperOptions) => void;
62
+ _containerClasses?: (swiper: import('swiper/types').Swiper, classNames: string) => void;
63
+ _slideClass?: (swiper: import('swiper/types').Swiper, slideEl: HTMLElement, classNames: string) => void;
64
+ _slideClasses?: (swiper: import('swiper/types').Swiper, slides: {
65
+ slideEl: HTMLElement;
66
+ classNames: string;
67
+ index: number;
68
+ }[]) => void;
69
+ _swiper?: (swiper: import('swiper/types').Swiper) => void;
70
+ _freeModeNoMomentumRelease?: (swiper: import('swiper/types').Swiper) => void;
71
+ onActiveIndexChange?: (swiper: import('swiper/types').Swiper) => void;
72
+ onSnapIndexChange?: (swiper: import('swiper/types').Swiper) => void;
73
+ onRealIndexChange?: (swiper: import('swiper/types').Swiper) => void;
74
+ onAfterInit?: (swiper: import('swiper/types').Swiper) => void;
75
+ onBeforeInit?: (swiper: import('swiper/types').Swiper) => void;
76
+ onBeforeResize?: (swiper: import('swiper/types').Swiper) => void;
77
+ onBeforeSlideChangeStart?: (swiper: import('swiper/types').Swiper) => void;
78
+ onBeforeTransitionStart?: (swiper: import('swiper/types').Swiper, speed: number, internal: any) => void;
79
+ onChangeDirection?: (swiper: import('swiper/types').Swiper) => void;
80
+ onDoubleClick?: (swiper: import('swiper/types').Swiper, event: MouseEvent | TouchEvent | PointerEvent) => void;
81
+ onDestroy?: (swiper: import('swiper/types').Swiper) => void;
82
+ onMomentumBounce?: (swiper: import('swiper/types').Swiper) => void;
83
+ onOrientationchange?: (swiper: import('swiper/types').Swiper) => void;
84
+ onSlideResetTransitionStart?: (swiper: import('swiper/types').Swiper) => void;
85
+ onSlideResetTransitionEnd?: (swiper: import('swiper/types').Swiper) => void;
86
+ onSliderFirstMove?: (swiper: import('swiper/types').Swiper, event: TouchEvent) => void;
87
+ onSlidesLengthChange?: (swiper: import('swiper/types').Swiper) => void;
88
+ onSlidesGridLengthChange?: (swiper: import('swiper/types').Swiper) => void;
89
+ onSnapGridLengthChange?: (swiper: import('swiper/types').Swiper) => void;
90
+ onUpdate?: (swiper: import('swiper/types').Swiper) => void;
91
+ onLock?: (swiper: import('swiper/types').Swiper) => void;
92
+ onUnlock?: (swiper: import('swiper/types').Swiper) => void;
93
+ } & {
94
+ children?: import('react').ReactNode | undefined;
95
+ }>;
4
96
  export declare const ScreenWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
5
97
  export declare const SponsorIcon: React.FC<{
6
98
  style?: React.CSSProperties;
@@ -1,59 +1,13 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { styled as s } from "@linaria/react";
3
- import r from "react-slick";
4
- import { SvgIcon as c } from "../../../../ui/icons/index.js";
5
- const t = () => r, S = /* @__PURE__ */ s(t())({
6
- name: "Carousel",
7
- class: "c1f9jjsn",
8
- propsAsIs: !0
9
- }), d = /* @__PURE__ */ s("div")({
10
- name: "Dot",
11
- class: "d25r51y",
12
- propsAsIs: !1
13
- }), f = /* @__PURE__ */ s("div")({
14
- name: "Dots",
15
- class: "d1lvrmx8",
16
- propsAsIs: !1
17
- }), v = /* @__PURE__ */ s("div")({
18
- name: "ScreenWrap",
19
- class: "s11xps29",
20
- propsAsIs: !1
21
- }), p = () => c, a = /* @__PURE__ */ s(p())({
22
- name: "SponsorIconI",
23
- class: "s14qstuv",
24
- propsAsIs: !0
25
- }), A = ({
26
- style: o,
27
- className: e
28
- }) => /* @__PURE__ */ n(a, {
29
- className: e,
30
- style: o,
31
- name: "icon-masters-logo"
32
- }), u = /* @__PURE__ */ s("div")({
33
- name: "ScreenTextBlock",
34
- class: "s14mdh2e",
35
- propsAsIs: !1
36
- }), x = /* @__PURE__ */ s("div")({
37
- name: "ScreenTitle",
38
- class: "sqtjig9",
39
- propsAsIs: !1
40
- }), D = /* @__PURE__ */ s("div")({
41
- name: "ScreenDescription",
42
- class: "ss0mt",
43
- propsAsIs: !1
44
- }), j = /* @__PURE__ */ s("button")({
45
- name: "ScreenButton",
46
- class: "s10dmski",
47
- propsAsIs: !1
48
- });
1
+ import "react/jsx-runtime";
2
+ import "@linaria/react";
3
+ import { C as c, d as n, c as t, a as p, b as S, S as i, e as m } from "../../../../styles-BfnMua4o.js";
4
+ import "../../../../ui/icons/index.js";
49
5
  export {
50
- S as Carousel,
51
- d as Dot,
52
- f as Dots,
53
- j as ScreenButton,
54
- D as ScreenDescription,
55
- u as ScreenTextBlock,
56
- x as ScreenTitle,
57
- v as ScreenWrap,
58
- A as SponsorIcon
6
+ c as Carousel,
7
+ n as ScreenButton,
8
+ t as ScreenDescription,
9
+ p as ScreenTextBlock,
10
+ S as ScreenTitle,
11
+ i as ScreenWrap,
12
+ m as SponsorIcon
59
13
  };
@@ -14,4 +14,5 @@ export declare const GamificationOverlayStandalone: React.FC<{
14
14
  className?: string;
15
15
  responsiveStore: ResponsiveStore;
16
16
  appNode: AppNodeRef;
17
+ useContainer?: boolean;
17
18
  }>;
@@ -1,49 +1,55 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { styled as u } from "@linaria/react";
3
- import { useHideTransition as c } from "../../../../hooks/showIn.js";
4
- import { useStore as t } from "@streamlayer/react-polyfills";
5
- import { ModalPortal as d } from "../../../../ui/modal/index.js";
6
- import { ShowIn as l } from "../../../../ui/show-in/index.js";
7
- import { Question as f } from "./Question.js";
8
- import { Tabs as k } from "./Tabs.js";
9
- const h = () => l, y = /* @__PURE__ */ u(h())({
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { styled as l } from "@linaria/react";
3
+ import { useHideTransition as d } from "../../../../hooks/showIn.js";
4
+ import { useStore as i } from "@streamlayer/react-polyfills";
5
+ import { ModalPortal as f } from "../../../../ui/modal/index.js";
6
+ import { ShowIn as u } from "../../../../ui/show-in/index.js";
7
+ import { Question as y } from "./Question.js";
8
+ import { Tabs as S } from "./Tabs.js";
9
+ const k = () => u, h = /* @__PURE__ */ l(k())({
10
10
  name: "OpenedContainer",
11
11
  class: "o1seszvt",
12
12
  propsAsIs: !0
13
- }), A = ({
13
+ }), C = ({
14
14
  gamification: o,
15
- className: e
16
- }) => /* @__PURE__ */ n(k, {
17
- className: e,
15
+ className: n
16
+ }) => /* @__PURE__ */ t(S, {
17
+ className: n,
18
18
  gamification: o
19
- }), D = ({
19
+ }), I = `
20
+ .SDKContainer {
21
+ position: static !important;
22
+ }
23
+ `, G = ({
20
24
  gamification: o,
21
- responsiveStore: e,
22
- className: i,
25
+ responsiveStore: n,
26
+ useContainer: e,
27
+ className: s,
23
28
  appNode: r
24
29
  }) => {
25
- const s = t(o.openedQuestion.$store), {
30
+ const a = i(o.openedQuestion.$store), {
26
31
  sdkInDesktopView: m
27
- } = t(e, {
32
+ } = i(n, {
28
33
  keys: ["sdkInDesktopView"]
29
34
  }), {
30
- hiding: a,
31
- onAnimationEnd: p
32
- } = c();
33
- return !r.current || !s ? null : /* @__PURE__ */ n(d, {
35
+ hiding: p,
36
+ onAnimationEnd: c
37
+ } = d();
38
+ return !r.current || !a ? null : /* @__PURE__ */ t(f, {
34
39
  container: r,
35
- useContainer: !m,
36
- children: /* @__PURE__ */ n(y, {
37
- className: i,
38
- hiding: a,
39
- onAnimationEnd: p,
40
- children: /* @__PURE__ */ n(f, {
40
+ useContainer: typeof e == "boolean" ? !e : !m,
41
+ staticStyles: typeof e == "boolean" ? I : "",
42
+ children: /* @__PURE__ */ t(h, {
43
+ className: s,
44
+ hiding: p,
45
+ onAnimationEnd: c,
46
+ children: /* @__PURE__ */ t(y, {
41
47
  gamification: o
42
48
  })
43
49
  })
44
50
  });
45
51
  };
46
52
  export {
47
- A as GamificationOverlay,
48
- D as GamificationOverlayStandalone
53
+ C as GamificationOverlay,
54
+ G as GamificationOverlayStandalone
49
55
  };
@@ -15,4 +15,5 @@ export declare const StandaloneFeature: React.FC<{
15
15
  appNode: AppNodeRef;
16
16
  responsiveStore: ResponsiveStore;
17
17
  className?: string;
18
+ useContainer?: boolean;
18
19
  }>;
@@ -1,27 +1,28 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { lazy as l, useMemo as a, Suspense as m } from "react";
2
+ import { lazy as a, useMemo as m, Suspense as u } from "react";
3
3
  import { FeatureType as o } from "@streamlayer/sdk-web-types";
4
- import { FeatureProvider as u } from "./FeatureProvider.js";
5
- import { GamificationOverlayStandalone as f } from "./Gamification/index.js";
6
- const c = l(() => import("./Gamification/gamification-feature.js")), h = ({ sdk: e, feature: t, className: i }) => {
7
- const n = a(() => t && t.featureConfig.get().type === o.GAMES ? /* @__PURE__ */ r(u, { className: i, sdk: e, feature: t, children: /* @__PURE__ */ r(c, { className: i, gamification: t }) }) : null, [e, t, i]);
4
+ import { FeatureProvider as f } from "./FeatureProvider.js";
5
+ import { GamificationOverlayStandalone as c } from "./Gamification/index.js";
6
+ const p = a(() => import("./Gamification/gamification-feature.js")), v = ({ sdk: e, feature: t, className: i }) => {
7
+ const n = m(() => t && t.featureConfig.get().type === o.GAMES ? /* @__PURE__ */ r(f, { className: i, sdk: e, feature: t, children: /* @__PURE__ */ r(p, { className: i, gamification: t }) }) : null, [e, t, i]);
8
8
  return /* @__PURE__ */ r(
9
- m,
9
+ u,
10
10
  {
11
11
  fallback: /* @__PURE__ */ r("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
12
12
  children: n
13
13
  }
14
14
  );
15
- }, v = ({ feature: e, className: t, appNode: i, responsiveStore: n }) => e && e.featureConfig.get().type === o.GAMES ? /* @__PURE__ */ r(
16
- f,
15
+ }, F = ({ feature: e, className: t, useContainer: i, appNode: n, responsiveStore: l }) => e && e.featureConfig.get().type === o.GAMES ? /* @__PURE__ */ r(
16
+ c,
17
17
  {
18
- responsiveStore: n,
18
+ responsiveStore: l,
19
19
  className: t,
20
- appNode: i,
20
+ appNode: n,
21
+ useContainer: i,
21
22
  gamification: e
22
23
  }
23
24
  ) : null;
24
25
  export {
25
- h as ActiveFeature,
26
- v as StandaloneFeature
26
+ v as ActiveFeature,
27
+ F as StandaloneFeature
27
28
  };
@@ -9,4 +9,5 @@ export declare const SDKNotifications: React.FC<{
9
9
  headerNode: HeaderNodeRef;
10
10
  scrollStore: ScrollStore;
11
11
  responsiveStore: ResponsiveStore;
12
+ useContainer?: boolean;
12
13
  }>;
@@ -1,159 +1,162 @@
1
- import { jsxs as g, Fragment as V, jsx as c } from "react/jsx-runtime";
2
- import { cx as D } from "@linaria/core";
3
- import { useMastersContext as T } from "../useMastersContext.js";
4
- import { scrollIntoAppView as q } from "../useSdkScroll.js";
5
- import { useState as f, useMemo as E, useEffect as h, useRef as O, useCallback as w } from "react";
6
- import { r as b } from "../../../index-DALxy-8N.js";
7
- import { useStore as p } from "@streamlayer/react-polyfills";
1
+ import { jsxs as f, Fragment as D, jsx as l } from "react/jsx-runtime";
2
+ import { cx as T } from "@linaria/core";
3
+ import { useMastersContext as q } from "../useMastersContext.js";
4
+ import { scrollIntoAppView as E } from "../useSdkScroll.js";
5
+ import { useState as p, useMemo as O, useEffect as a, useRef as b, useCallback as N } from "react";
6
+ import { r as R } from "../../../index-DALxy-8N.js";
7
+ import { useStore as y } from "@streamlayer/react-polyfills";
8
8
  import { eventBus as C } from "@streamlayer/sdk-web-interfaces";
9
- import { NotificationType as a } from "@streamlayer/sdk-web-notifications";
10
- import { QuestionTypeData as R } from "../../../ui/gamification/constants.js";
11
- import { Notification as N } from "../../../ui/gamification/question/notification/index.js";
12
- import { PredictionResult as P } from "../../../ui/gamification/question/notification/prediction-result/index.js";
13
- import { Onboarding as x } from "./Onboarding/index.js";
14
- import { HiddenContainer as A, Container as B, InnerContainer as H, NotificationRefreshing as Q, Pill as U } from "./styles.js";
15
- const j = (n) => {
16
- const [t, u] = f(0), i = O(null), l = w((o) => {
17
- i.current = o;
9
+ import { NotificationType as g } from "@streamlayer/sdk-web-notifications";
10
+ import { QuestionTypeData as P } from "../../../ui/gamification/constants.js";
11
+ import { Notification as V } from "../../../ui/gamification/question/notification/index.js";
12
+ import { PredictionResult as x } from "../../../ui/gamification/question/notification/prediction-result/index.js";
13
+ import { Onboarding as A } from "./Onboarding/index.js";
14
+ import { HiddenContainer as B, Container as H, InnerContainer as Q, NotificationRefreshing as U, Pill as j } from "./styles.js";
15
+ const z = (n) => {
16
+ const [t, c] = p(0), u = b(null), e = N((o) => {
17
+ u.current = o;
18
18
  }, []);
19
- h(() => {
20
- var d;
21
- const o = (d = i.current) == null ? void 0 : d.getBoundingClientRect();
22
- o && u(o.height);
19
+ a(() => {
20
+ var s;
21
+ const o = (s = u.current) == null ? void 0 : s.getBoundingClientRect();
22
+ o && c(o.height);
23
23
  }, [n]);
24
- const r = w((o) => {
25
- u(o);
24
+ const r = N((o) => {
25
+ c(o);
26
26
  }, []);
27
- return [l, t, r];
28
- }, z = ({
27
+ return [e, t, r];
28
+ }, F = ({
29
29
  sdk: n,
30
30
  notification: t,
31
- appNode: u,
32
- responsiveStore: i
31
+ appNode: c,
32
+ responsiveStore: u
33
33
  }) => {
34
- var m, s;
34
+ var h, d;
35
35
  const {
36
- sdk: l
37
- } = T(), [r, o, d] = j(t.id);
38
- return t.type === a.QUESTION ? /* @__PURE__ */ g(V, {
39
- children: [/* @__PURE__ */ c(A, {
36
+ sdk: e
37
+ } = q(), [r, o, s] = z(t.id);
38
+ return t.type === g.QUESTION ? /* @__PURE__ */ f(D, {
39
+ children: [/* @__PURE__ */ l(B, {
40
40
  ref: r,
41
- children: /* @__PURE__ */ c(N, {
41
+ children: /* @__PURE__ */ l(V, {
42
42
  ...t
43
43
  })
44
- }), /* @__PURE__ */ g(B, {
44
+ }), /* @__PURE__ */ f(H, {
45
45
  style: {
46
46
  height: t.hiding ? 0 : o
47
47
  },
48
48
  hiding: t.hiding,
49
- children: [/* @__PURE__ */ c(H, {
49
+ children: [/* @__PURE__ */ l(Q, {
50
50
  style: {
51
51
  height: "100%"
52
52
  },
53
- children: /* @__PURE__ */ c(N, {
53
+ children: /* @__PURE__ */ l(V, {
54
54
  ...t,
55
- controlVideo: l == null ? void 0 : l.controlVideoPlayer
55
+ controlVideo: e == null ? void 0 : e.controlVideoPlayer
56
56
  })
57
- }), /* @__PURE__ */ c(Q, {}, t.id)]
57
+ }), /* @__PURE__ */ l(U, {}, t.id)]
58
58
  })]
59
- }) : t.type === a.QUESTION_RESOLVED && ((s = (m = t.data) == null ? void 0 : m.question) != null && s.predictionResult) ? /* @__PURE__ */ c(P, {
59
+ }) : t.type === g.QUESTION_RESOLVED && ((d = (h = t.data) == null ? void 0 : h.question) != null && d.predictionResult) ? /* @__PURE__ */ l(x, {
60
60
  style: {
61
61
  height: t.hiding ? 0 : o
62
62
  },
63
- saveHeight: d,
63
+ saveHeight: s,
64
64
  close: t.close,
65
65
  hiding: t.hiding,
66
66
  ...t.data.question,
67
67
  mastersApp: !0
68
- }) : t.type === a.ONBOARDING ? /* @__PURE__ */ c(x, {
68
+ }) : t.type === g.ONBOARDING ? /* @__PURE__ */ l(A, {
69
69
  style: {
70
70
  height: t.hiding ? 0 : o
71
71
  },
72
- saveHeight: d,
72
+ saveHeight: s,
73
73
  sdk: n,
74
74
  notification: t,
75
- appNode: u,
76
- responsiveStore: i
75
+ appNode: c,
76
+ responsiveStore: u
77
77
  }) : null;
78
- }, F = "p1co32q0", L = ({
78
+ }, L = "p1co32q0", M = ({
79
79
  pill: n,
80
80
  setPill: t,
81
- appNode: u,
82
- headerNode: i,
83
- scrollNode: l,
81
+ appNode: c,
82
+ headerNode: u,
83
+ scrollNode: e,
84
84
  responsiveStore: r,
85
- scrollStore: o
85
+ scrollStore: o,
86
+ useContainer: s
86
87
  }) => {
87
- var y, I;
88
+ var I, k;
88
89
  const {
89
- screen: d
90
- } = p(r, {
90
+ screen: h
91
+ } = y(r, {
91
92
  keys: ["screen"]
92
93
  }), {
93
- tabsShown: m,
94
- scrollPosition: s
95
- } = p(o, {
94
+ tabsShown: d,
95
+ scrollPosition: m
96
+ } = y(o, {
96
97
  keys: ["tabsShown", "scrollPosition"]
97
98
  });
98
- h(() => {
99
- r.get().sdkInDesktopView ? s < 50 && t(null) : s > -50 && t(null);
100
- }, [s, r, t]);
101
- const e = r.get().sdkInDesktopView ? u : i;
102
- return !n || !e.current ? null : b.createPortal(/* @__PURE__ */ c(U, {
103
- title: n.type === a.QUESTION_RESOLVED ? "Prediction result" : `New ${((I = R[(y = n.data) == null ? void 0 : y.questionType]) == null ? void 0 : I.label) || "notification"}`,
99
+ a(() => {
100
+ r.get().sdkInDesktopView || s ? m < 50 && t(null) : m > -50 && t(null);
101
+ }, [m, r, t, s]);
102
+ const i = r.get().sdkInDesktopView ? c : u;
103
+ return !n || !i.current ? null : R.createPortal(/* @__PURE__ */ l(j, {
104
+ title: n.type === g.QUESTION_RESOLVED ? "Prediction result" : `New ${((k = P[(I = n.data) == null ? void 0 : I.questionType]) == null ? void 0 : k.label) || "notification"}`,
104
105
  onClick: () => {
105
- var k;
106
- r.get().sdkInDesktopView ? (k = l.current) == null || k.scrollTo({
106
+ var w;
107
+ r.get().sdkInDesktopView ? (w = e.current) == null || w.scrollTo({
107
108
  top: 0,
108
109
  behavior: "smooth"
109
- }) : q(u, d.size, {
110
+ }) : E(e, h.size, {
110
111
  behavior: "smooth"
111
112
  }), t(null);
112
113
  },
113
- className: D(m && F, "sl-pill-button")
114
- }), e.current);
115
- }, it = ({
114
+ className: T(d && L, "sl-pill-button")
115
+ }), i.current);
116
+ }, ot = ({
116
117
  sdk: n,
117
118
  headerNode: t,
118
- scrollNode: u,
119
- responsiveStore: i,
120
- appNode: l,
121
- scrollStore: r
119
+ scrollNode: c,
120
+ useContainer: u,
121
+ responsiveStore: e,
122
+ appNode: r,
123
+ scrollStore: o
122
124
  }) => {
123
- const [o] = f(n.getNotificationsStore()), d = p(o), [m, s] = f(null), e = E(() => n.getActiveNotification(), [n, d]);
124
- return h(() => {
125
- e && C.emit("notification", {
125
+ const [s] = p(n.getNotificationsStore()), h = y(s), [d, m] = p(null), i = O(() => n.getActiveNotification(), [n, h]);
126
+ return a(() => {
127
+ i && C.emit("notification", {
126
128
  action: "rendered",
127
129
  payload: {
128
- questionId: e.data.questionId,
129
- questionType: e.data.questionType
130
+ questionId: i.data.questionId,
131
+ questionType: i.data.questionType
130
132
  }
131
133
  });
132
- }, [e]), h(() => {
133
- e && (i.get().sdkInDesktopView || i.get().sdkInView) && (!i.get().sdkInDesktopView && i.get().sdkInView && s(e), i.get().sdkInDesktopView && window.requestAnimationFrame(() => {
134
- r.get().scrollPosition !== 0 && s(e);
134
+ }, [i]), a(() => {
135
+ i && (e.get().sdkInDesktopView || e.get().sdkInView) && (!e.get().sdkInDesktopView && e.get().sdkInView && m(i), e.get().sdkInDesktopView && window.requestAnimationFrame(() => {
136
+ o.get().scrollPosition !== 0 && m(i);
135
137
  }));
136
- }, [e]), h(() => {
137
- e || s(null);
138
- }, [e]), /* @__PURE__ */ g(V, {
139
- children: [!m && e && /* @__PURE__ */ c(z, {
138
+ }, [i]), a(() => {
139
+ i || m(null);
140
+ }, [i]), /* @__PURE__ */ f(D, {
141
+ children: [!d && i && /* @__PURE__ */ l(F, {
140
142
  headerNode: t,
141
- appNode: l,
143
+ appNode: r,
142
144
  sdk: n,
143
- notification: e,
144
- responsiveStore: i
145
- }), m && /* @__PURE__ */ c(L, {
146
- pill: m,
147
- setPill: s,
148
- appNode: l,
149
- notification: e,
145
+ notification: i,
146
+ responsiveStore: e
147
+ }), d && /* @__PURE__ */ l(M, {
148
+ pill: d,
149
+ setPill: m,
150
+ appNode: r,
151
+ notification: i,
150
152
  headerNode: t,
151
- scrollNode: u,
152
- scrollStore: r,
153
- responsiveStore: i
153
+ scrollNode: c,
154
+ scrollStore: o,
155
+ useContainer: u,
156
+ responsiveStore: e
154
157
  })]
155
158
  });
156
159
  };
157
160
  export {
158
- it as SDKNotifications
161
+ ot as SDKNotifications
159
162
  };
@@ -1,34 +1,25 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { useState as a, useEffect as c } from "react";
3
- import { useStore as l } from "@streamlayer/react-polyfills";
4
- import { FeatureStatus as u, eventBus as n } from "@streamlayer/sdk-web-interfaces";
5
- import { FeatureType as f } from "@streamlayer/sdk-web-types";
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { useState as m, useEffect as f } from "react";
3
+ import { useStore as c } from "@streamlayer/react-polyfills";
4
+ import { FeatureType as p } from "@streamlayer/sdk-web-types";
6
5
  import { Points as S } from "../../../ui/gamification/points/index.js";
7
- const y = ({ gamification: e }) => {
8
- const s = e.userSummary.$store, [t, p] = a(0);
9
- return c(() => {
10
- const i = s.subscribe((r) => {
11
- var o;
12
- (o = r == null ? void 0 : r.summary) != null && o.points && p(r.summary.points);
6
+ const a = ({ gamification: r }) => {
7
+ const o = r.userSummary.$store, [t, u] = m(0);
8
+ return f(() => {
9
+ const i = o.subscribe((e) => {
10
+ var s;
11
+ (s = e == null ? void 0 : e.summary) != null && s.points && u(e.summary.points);
13
12
  });
14
13
  return () => {
15
14
  i();
16
15
  };
17
- }, [s]), /* @__PURE__ */ m(S, { points: t, onClick: () => {
18
- e.status.get() === u.Suspended ? (e.openFeature(), n.emit("app", {
19
- action: "open",
20
- payload: {}
21
- })) : e.status.get() === u.Ready && (e.closeFeature(!1), n.emit("app", {
22
- action: "close",
23
- payload: {}
24
- }));
25
- } });
26
- }, k = ({ sdk: e }) => {
27
- if (!l(e.featuresList.getStore()))
16
+ }, [o]), /* @__PURE__ */ n(S, { points: t });
17
+ }, b = ({ sdk: r }) => {
18
+ if (!c(r.featuresList.getStore()))
28
19
  return null;
29
- const t = e.getFeature(f.GAMES);
30
- return t ? /* @__PURE__ */ m(y, { gamification: t }) : null;
20
+ const t = r.getFeature(p.GAMES);
21
+ return t ? /* @__PURE__ */ n(a, { gamification: t }) : null;
31
22
  };
32
23
  export {
33
- k as StreamLayerSDKPoints
24
+ b as StreamLayerSDKPoints
34
25
  };
@@ -8,5 +8,6 @@ export type MastersAppChildrenProps = {
8
8
  export type MastersAppProps = {
9
9
  sdk: StreamLayerSDK;
10
10
  betPack?: boolean;
11
+ useContainer?: boolean;
11
12
  };
12
13
  export declare const MastersApp: React.FC<MastersAppProps>;