@streamlayer/react-ui 1.31.6 → 1.31.7
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/lib/app/app/Notifications/index.js +34 -34
- package/lib/app/masters/Notifications/index.js +40 -40
- package/lib/app/useClipboardCopy.js +8 -8
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +6 -6
- package/lib/ui/modal/index.js +16 -16
- package/package.json +17 -16
- package/lib/index-DALxy-8N.js +0 -5437
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { jsxs as w, Fragment as b, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { cx as
|
|
2
|
+
import { cx as D } from "@linaria/core";
|
|
3
3
|
import { useAppContext as O } from "../useAppContext.js";
|
|
4
4
|
import { scrollIntoAppView as T } from "../../useSdkScroll.js";
|
|
5
|
-
import { useState as k, useMemo as
|
|
6
|
-
import {
|
|
5
|
+
import { useState as k, useMemo as V, useEffect as h, useRef as q, useCallback as I } from "react";
|
|
6
|
+
import { createPortal as E } from "react-dom";
|
|
7
7
|
import { useStore as y } from "@streamlayer/react-polyfills";
|
|
8
8
|
import { eventBus as R } from "@streamlayer/sdk-web-interfaces";
|
|
9
9
|
import { NotificationType as p } from "@streamlayer/sdk-web-notifications";
|
|
10
10
|
import { QuestionTypeData as A } from "../../../ui/gamification/constants.js";
|
|
11
11
|
import { Notification as N } from "../../../ui/gamification/question/notification/index.js";
|
|
12
12
|
import { PredictionResult as C } from "../../../ui/gamification/question/notification/prediction-result/index.js";
|
|
13
|
-
import { Onboarding as
|
|
14
|
-
import { HiddenContainer as
|
|
15
|
-
const v = (
|
|
16
|
-
const [e, d] = k(0), i =
|
|
13
|
+
import { Onboarding as P } from "./Onboarding/index.js";
|
|
14
|
+
import { HiddenContainer as x, Container as z, InnerContainer as B, NotificationRefreshing as H, Pill as S } from "./styles.js";
|
|
15
|
+
const v = (r) => {
|
|
16
|
+
const [e, d] = k(0), i = q(null), l = V(() => new ResizeObserver((n) => {
|
|
17
17
|
window.requestAnimationFrame(() => {
|
|
18
18
|
var f;
|
|
19
|
-
if (Array.isArray(
|
|
20
|
-
for (const c of
|
|
19
|
+
if (Array.isArray(n)) {
|
|
20
|
+
for (const c of n)
|
|
21
21
|
if (c.contentBoxSize) {
|
|
22
22
|
const o = (f = i.current) == null ? void 0 : f.getBoundingClientRect();
|
|
23
23
|
o && d(o.height);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
-
}), []), s = I((
|
|
28
|
-
i.current =
|
|
29
|
-
}, []), a = I((
|
|
30
|
-
d(
|
|
27
|
+
}), []), s = I((n) => {
|
|
28
|
+
i.current = n;
|
|
29
|
+
}, []), a = I((n) => {
|
|
30
|
+
d(n);
|
|
31
31
|
}, []);
|
|
32
32
|
return h(() => {
|
|
33
|
-
const
|
|
34
|
-
return
|
|
35
|
-
l.unobserve(
|
|
33
|
+
const n = i.current;
|
|
34
|
+
return n ? (l.observe(n), () => {
|
|
35
|
+
l.unobserve(n);
|
|
36
36
|
}) : () => {
|
|
37
37
|
};
|
|
38
|
-
}, [
|
|
38
|
+
}, [r]), h(() => () => {
|
|
39
39
|
l.disconnect();
|
|
40
40
|
}), [s, e, a];
|
|
41
41
|
}, Q = ({
|
|
42
|
-
sdk:
|
|
42
|
+
sdk: r,
|
|
43
43
|
notification: e,
|
|
44
44
|
appNode: d,
|
|
45
45
|
responsiveStore: i,
|
|
@@ -52,11 +52,11 @@ const v = (n) => {
|
|
|
52
52
|
keys: ["sdkInDesktopView"]
|
|
53
53
|
}), {
|
|
54
54
|
sdk: a
|
|
55
|
-
} = O(), [
|
|
55
|
+
} = O(), [n, f, c] = v(e.id);
|
|
56
56
|
let o = f;
|
|
57
57
|
return l || (o = "auto"), e.type === p.QUESTION ? /* @__PURE__ */ w(b, {
|
|
58
|
-
children: [/* @__PURE__ */ u(
|
|
59
|
-
ref:
|
|
58
|
+
children: [/* @__PURE__ */ u(x, {
|
|
59
|
+
ref: n,
|
|
60
60
|
children: /* @__PURE__ */ u(N, {
|
|
61
61
|
...e
|
|
62
62
|
})
|
|
@@ -83,19 +83,19 @@ const v = (n) => {
|
|
|
83
83
|
close: e.close,
|
|
84
84
|
hiding: e.hiding,
|
|
85
85
|
...e.data.question
|
|
86
|
-
}) : e.type === p.ONBOARDING ? /* @__PURE__ */ u(
|
|
86
|
+
}) : e.type === p.ONBOARDING ? /* @__PURE__ */ u(P, {
|
|
87
87
|
style: {
|
|
88
88
|
height: e.hiding ? 0 : o
|
|
89
89
|
},
|
|
90
90
|
saveHeight: c,
|
|
91
|
-
sdk:
|
|
91
|
+
sdk: r,
|
|
92
92
|
notification: e,
|
|
93
93
|
sdkInDesktopView: s,
|
|
94
94
|
appNode: d,
|
|
95
95
|
responsiveStore: i
|
|
96
96
|
}) : null;
|
|
97
97
|
}, F = "p7vfi6t", U = ({
|
|
98
|
-
pill:
|
|
98
|
+
pill: r,
|
|
99
99
|
setPill: e,
|
|
100
100
|
appNode: d,
|
|
101
101
|
headerNode: i,
|
|
@@ -105,7 +105,7 @@ const v = (n) => {
|
|
|
105
105
|
}) => {
|
|
106
106
|
var t, m;
|
|
107
107
|
const {
|
|
108
|
-
screen:
|
|
108
|
+
screen: n
|
|
109
109
|
} = y(s, {
|
|
110
110
|
keys: ["screen"]
|
|
111
111
|
}), {
|
|
@@ -118,22 +118,22 @@ const v = (n) => {
|
|
|
118
118
|
s.get().sdkInDesktopView ? c < 50 && e(null) : c > -50 && e(null);
|
|
119
119
|
}, [c, s, e]);
|
|
120
120
|
const o = s.get().sdkInDesktopView ? d : i;
|
|
121
|
-
return !
|
|
122
|
-
title:
|
|
121
|
+
return !r || !o.current ? null : E(/* @__PURE__ */ u(S, {
|
|
122
|
+
title: r.type === p.QUESTION_RESOLVED ? "Prediction result" : `New ${((m = A[(t = r.data) == null ? void 0 : t.questionType]) == null ? void 0 : m.label) || "notification"}`,
|
|
123
123
|
"data-a": "intr",
|
|
124
124
|
onClick: () => {
|
|
125
125
|
var g;
|
|
126
126
|
s.get().sdkInDesktopView ? (g = l.current) == null || g.scrollTo({
|
|
127
127
|
top: 0,
|
|
128
128
|
behavior: "smooth"
|
|
129
|
-
}) : T(d,
|
|
129
|
+
}) : T(d, n.size, {
|
|
130
130
|
behavior: "smooth"
|
|
131
131
|
}), e(null);
|
|
132
132
|
},
|
|
133
|
-
className:
|
|
133
|
+
className: D(f && F, "sl-pill-button")
|
|
134
134
|
}), o.current);
|
|
135
|
-
},
|
|
136
|
-
sdk:
|
|
135
|
+
}, ne = ({
|
|
136
|
+
sdk: r,
|
|
137
137
|
headerNode: e,
|
|
138
138
|
scrollNode: d,
|
|
139
139
|
responsiveStore: i,
|
|
@@ -141,7 +141,7 @@ const v = (n) => {
|
|
|
141
141
|
scrollStore: s,
|
|
142
142
|
hasActiveFeature: a
|
|
143
143
|
}) => {
|
|
144
|
-
const [
|
|
144
|
+
const [n] = k(r.getNotificationsStore()), f = y(n), [c, o] = k(null), t = V(() => r.getActiveNotification(), [r, f]);
|
|
145
145
|
return h(() => {
|
|
146
146
|
t && R.emit("notification", {
|
|
147
147
|
action: "rendered",
|
|
@@ -163,7 +163,7 @@ const v = (n) => {
|
|
|
163
163
|
}, [t]), /* @__PURE__ */ w(b, {
|
|
164
164
|
children: [!c && t && /* @__PURE__ */ u(Q, {
|
|
165
165
|
appNode: l,
|
|
166
|
-
sdk:
|
|
166
|
+
sdk: r,
|
|
167
167
|
hasActiveFeature: a,
|
|
168
168
|
notification: t,
|
|
169
169
|
responsiveStore: i
|
|
@@ -180,5 +180,5 @@ const v = (n) => {
|
|
|
180
180
|
});
|
|
181
181
|
};
|
|
182
182
|
export {
|
|
183
|
-
|
|
183
|
+
ne as SDKNotifications
|
|
184
184
|
};
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { jsxs as f, Fragment as D, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { cx as T } from "@linaria/core";
|
|
3
3
|
import { useMastersContext as q } from "../useMastersContext.js";
|
|
4
|
-
import { scrollIntoAppView as
|
|
5
|
-
import { useState as p, useMemo as
|
|
6
|
-
import {
|
|
4
|
+
import { scrollIntoAppView as O } from "../useSdkScroll.js";
|
|
5
|
+
import { useState as p, useMemo as b, useEffect as g, useRef as E, useCallback as N } from "react";
|
|
6
|
+
import { createPortal as R } from "react-dom";
|
|
7
7
|
import { useStore as y } from "@streamlayer/react-polyfills";
|
|
8
8
|
import { eventBus as C } from "@streamlayer/sdk-web-interfaces";
|
|
9
|
-
import { NotificationType as
|
|
9
|
+
import { NotificationType as a } from "@streamlayer/sdk-web-notifications";
|
|
10
10
|
import { QuestionTypeData as P } from "../../../ui/gamification/constants.js";
|
|
11
11
|
import { Notification as V } from "../../../ui/gamification/question/notification/index.js";
|
|
12
12
|
import { PredictionResult as x } from "../../../ui/gamification/question/notification/prediction-result/index.js";
|
|
13
13
|
import { Onboarding as A } from "./Onboarding/index.js";
|
|
14
14
|
import { HiddenContainer as B, Container as H, InnerContainer as Q, NotificationRefreshing as U, Pill as j } from "./styles.js";
|
|
15
|
-
const z = (
|
|
16
|
-
const [t, c] = p(0), u =
|
|
17
|
-
u.current =
|
|
15
|
+
const z = (o) => {
|
|
16
|
+
const [t, c] = p(0), u = E(null), e = N((n) => {
|
|
17
|
+
u.current = n;
|
|
18
18
|
}, []);
|
|
19
|
-
|
|
19
|
+
g(() => {
|
|
20
20
|
var s;
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
}, [
|
|
24
|
-
const r = N((
|
|
25
|
-
c(
|
|
21
|
+
const n = (s = u.current) == null ? void 0 : s.getBoundingClientRect();
|
|
22
|
+
n && c(n.height);
|
|
23
|
+
}, [o]);
|
|
24
|
+
const r = N((n) => {
|
|
25
|
+
c(n);
|
|
26
26
|
}, []);
|
|
27
27
|
return [e, t, r];
|
|
28
28
|
}, F = ({
|
|
29
|
-
sdk:
|
|
29
|
+
sdk: o,
|
|
30
30
|
notification: t,
|
|
31
31
|
appNode: c,
|
|
32
32
|
responsiveStore: u
|
|
@@ -34,8 +34,8 @@ const z = (n) => {
|
|
|
34
34
|
var h, d;
|
|
35
35
|
const {
|
|
36
36
|
sdk: e
|
|
37
|
-
} = q(), [r,
|
|
38
|
-
return t.type ===
|
|
37
|
+
} = q(), [r, n, s] = z(t.id);
|
|
38
|
+
return t.type === a.QUESTION ? /* @__PURE__ */ f(D, {
|
|
39
39
|
children: [/* @__PURE__ */ l(B, {
|
|
40
40
|
ref: r,
|
|
41
41
|
children: /* @__PURE__ */ l(V, {
|
|
@@ -43,7 +43,7 @@ const z = (n) => {
|
|
|
43
43
|
})
|
|
44
44
|
}), /* @__PURE__ */ f(H, {
|
|
45
45
|
style: {
|
|
46
|
-
height: t.hiding ? 0 :
|
|
46
|
+
height: t.hiding ? 0 : n
|
|
47
47
|
},
|
|
48
48
|
hiding: t.hiding,
|
|
49
49
|
children: [/* @__PURE__ */ l(Q, {
|
|
@@ -56,33 +56,33 @@ const z = (n) => {
|
|
|
56
56
|
})
|
|
57
57
|
}), /* @__PURE__ */ l(U, {}, t.id)]
|
|
58
58
|
})]
|
|
59
|
-
}) : t.type ===
|
|
59
|
+
}) : t.type === a.QUESTION_RESOLVED && ((d = (h = t.data) == null ? void 0 : h.question) != null && d.predictionResult) ? /* @__PURE__ */ l(x, {
|
|
60
60
|
style: {
|
|
61
|
-
height: t.hiding ? 0 :
|
|
61
|
+
height: t.hiding ? 0 : n
|
|
62
62
|
},
|
|
63
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 ===
|
|
68
|
+
}) : t.type === a.ONBOARDING ? /* @__PURE__ */ l(A, {
|
|
69
69
|
style: {
|
|
70
|
-
height: t.hiding ? 0 :
|
|
70
|
+
height: t.hiding ? 0 : n
|
|
71
71
|
},
|
|
72
72
|
saveHeight: s,
|
|
73
|
-
sdk:
|
|
73
|
+
sdk: o,
|
|
74
74
|
notification: t,
|
|
75
75
|
appNode: c,
|
|
76
76
|
responsiveStore: u
|
|
77
77
|
}) : null;
|
|
78
78
|
}, L = "p1co32q0", M = ({
|
|
79
|
-
pill:
|
|
79
|
+
pill: o,
|
|
80
80
|
setPill: t,
|
|
81
81
|
appNode: c,
|
|
82
82
|
headerNode: u,
|
|
83
83
|
scrollNode: e,
|
|
84
84
|
responsiveStore: r,
|
|
85
|
-
scrollStore:
|
|
85
|
+
scrollStore: n,
|
|
86
86
|
useContainer: s
|
|
87
87
|
}) => {
|
|
88
88
|
var I, k;
|
|
@@ -93,37 +93,37 @@ const z = (n) => {
|
|
|
93
93
|
}), {
|
|
94
94
|
tabsShown: d,
|
|
95
95
|
scrollPosition: m
|
|
96
|
-
} = y(
|
|
96
|
+
} = y(n, {
|
|
97
97
|
keys: ["tabsShown", "scrollPosition"]
|
|
98
98
|
});
|
|
99
|
-
|
|
99
|
+
g(() => {
|
|
100
100
|
r.get().sdkInDesktopView || s ? m < 50 && t(null) : m > -50 && t(null);
|
|
101
101
|
}, [m, r, t, s]);
|
|
102
102
|
const i = r.get().sdkInDesktopView ? c : u;
|
|
103
|
-
return !
|
|
104
|
-
title:
|
|
103
|
+
return !o || !i.current ? null : R(/* @__PURE__ */ l(j, {
|
|
104
|
+
title: o.type === a.QUESTION_RESOLVED ? "Prediction result" : `New ${((k = P[(I = o.data) == null ? void 0 : I.questionType]) == null ? void 0 : k.label) || "notification"}`,
|
|
105
105
|
onClick: () => {
|
|
106
106
|
var w;
|
|
107
107
|
r.get().sdkInDesktopView ? (w = e.current) == null || w.scrollTo({
|
|
108
108
|
top: 0,
|
|
109
109
|
behavior: "smooth"
|
|
110
|
-
}) :
|
|
110
|
+
}) : O(e, h.size, {
|
|
111
111
|
behavior: "smooth"
|
|
112
112
|
}), t(null);
|
|
113
113
|
},
|
|
114
114
|
className: T(d && L, "sl-pill-button")
|
|
115
115
|
}), i.current);
|
|
116
|
-
},
|
|
117
|
-
sdk:
|
|
116
|
+
}, nt = ({
|
|
117
|
+
sdk: o,
|
|
118
118
|
headerNode: t,
|
|
119
119
|
scrollNode: c,
|
|
120
120
|
useContainer: u,
|
|
121
121
|
responsiveStore: e,
|
|
122
122
|
appNode: r,
|
|
123
|
-
scrollStore:
|
|
123
|
+
scrollStore: n
|
|
124
124
|
}) => {
|
|
125
|
-
const [s] = p(
|
|
126
|
-
return
|
|
125
|
+
const [s] = p(o.getNotificationsStore()), h = y(s), [d, m] = p(null), i = b(() => o.getActiveNotification(), [o, h]);
|
|
126
|
+
return g(() => {
|
|
127
127
|
i && C.emit("notification", {
|
|
128
128
|
action: "rendered",
|
|
129
129
|
payload: {
|
|
@@ -131,17 +131,17 @@ const z = (n) => {
|
|
|
131
131
|
questionType: i.data.questionType
|
|
132
132
|
}
|
|
133
133
|
});
|
|
134
|
-
}, [i]),
|
|
134
|
+
}, [i]), g(() => {
|
|
135
135
|
i && (e.get().sdkInDesktopView || e.get().sdkInView) && (!e.get().sdkInDesktopView && e.get().sdkInView && m(i), e.get().sdkInDesktopView && window.requestAnimationFrame(() => {
|
|
136
|
-
|
|
136
|
+
n.get().scrollPosition !== 0 && m(i);
|
|
137
137
|
}));
|
|
138
|
-
}, [i]),
|
|
138
|
+
}, [i]), g(() => {
|
|
139
139
|
i || m(null);
|
|
140
140
|
}, [i]), /* @__PURE__ */ f(D, {
|
|
141
141
|
children: [!d && i && /* @__PURE__ */ l(F, {
|
|
142
142
|
headerNode: t,
|
|
143
143
|
appNode: r,
|
|
144
|
-
sdk:
|
|
144
|
+
sdk: o,
|
|
145
145
|
notification: i,
|
|
146
146
|
responsiveStore: e
|
|
147
147
|
}), d && /* @__PURE__ */ l(M, {
|
|
@@ -151,12 +151,12 @@ const z = (n) => {
|
|
|
151
151
|
notification: i,
|
|
152
152
|
headerNode: t,
|
|
153
153
|
scrollNode: c,
|
|
154
|
-
scrollStore:
|
|
154
|
+
scrollStore: n,
|
|
155
155
|
useContainer: u,
|
|
156
156
|
responsiveStore: e
|
|
157
157
|
})]
|
|
158
158
|
});
|
|
159
159
|
};
|
|
160
160
|
export {
|
|
161
|
-
|
|
161
|
+
nt as SDKNotifications
|
|
162
162
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as l, useState as s, useCallback as
|
|
3
|
-
import {
|
|
2
|
+
import { useRef as l, useState as s, useCallback as f, useEffect as p } from "react";
|
|
3
|
+
import { createPortal as m } from "react-dom";
|
|
4
4
|
import { CopyNotification as b } from "../ui/gamification/copyNotification/index.js";
|
|
5
5
|
const T = (r) => {
|
|
6
|
-
const t = l(), [
|
|
6
|
+
const t = l(), [c, o] = s(null), a = f(
|
|
7
7
|
async (e) => {
|
|
8
|
-
var
|
|
9
|
-
if (e && ((
|
|
8
|
+
var i;
|
|
9
|
+
if (e && ((i = navigator == null ? void 0 : navigator.clipboard) != null && i.writeText)) {
|
|
10
10
|
t.current && (clearTimeout(t.current), o(null));
|
|
11
11
|
try {
|
|
12
|
-
await navigator.clipboard.writeText(e), r.current && (o(m
|
|
12
|
+
await navigator.clipboard.writeText(e), r.current && (o(m(/* @__PURE__ */ u(b, {}), r.current)), t.current = setTimeout(() => {
|
|
13
13
|
o(null);
|
|
14
14
|
}, 1e3));
|
|
15
15
|
} catch (n) {
|
|
@@ -19,9 +19,9 @@ const T = (r) => {
|
|
|
19
19
|
},
|
|
20
20
|
[r]
|
|
21
21
|
);
|
|
22
|
-
return
|
|
22
|
+
return p(() => () => {
|
|
23
23
|
clearTimeout(t.current);
|
|
24
|
-
}, []), [a,
|
|
24
|
+
}, []), [a, c];
|
|
25
25
|
};
|
|
26
26
|
export {
|
|
27
27
|
T as useClipboardCopy
|
|
@@ -3,7 +3,8 @@ import { useRef as Qr, useCallback as Ui, useEffect as js } from "react";
|
|
|
3
3
|
import { D as gg } from "../../../../../index-l-eyvmpL.js";
|
|
4
4
|
import { useVastAds as mg } from "./useVastAds.js";
|
|
5
5
|
import { m as _g } from "../../../../../index-DSi8Qgfs.js";
|
|
6
|
-
|
|
6
|
+
const tn = globalThis || void 0 || self;
|
|
7
|
+
var sn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
7
8
|
function nr(s) {
|
|
8
9
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
9
10
|
}
|
|
@@ -26,15 +27,14 @@ function yg(s) {
|
|
|
26
27
|
});
|
|
27
28
|
}), t;
|
|
28
29
|
}
|
|
29
|
-
const sn = globalThis || void 0 || self;
|
|
30
30
|
var Hs;
|
|
31
|
-
typeof window < "u" ? Hs = window : typeof
|
|
31
|
+
typeof window < "u" ? Hs = window : typeof sn < "u" ? Hs = sn : typeof self < "u" ? Hs = self : Hs = {};
|
|
32
32
|
var In = Hs;
|
|
33
33
|
const A = /* @__PURE__ */ nr(In), Tg = {}, bg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
34
34
|
__proto__: null,
|
|
35
35
|
default: Tg
|
|
36
36
|
}, Symbol.toStringTag, { value: "Module" })), vg = /* @__PURE__ */ yg(bg);
|
|
37
|
-
var Xl = typeof
|
|
37
|
+
var Xl = typeof sn < "u" ? sn : typeof window < "u" ? window : {}, xg = vg, Vs;
|
|
38
38
|
typeof document < "u" ? Vs = document : (Vs = Xl["__GLOBAL_DOCUMENT_CACHE@4"], Vs || (Vs = Xl["__GLOBAL_DOCUMENT_CACHE@4"] = xg));
|
|
39
39
|
var dc = Vs;
|
|
40
40
|
const W = /* @__PURE__ */ nr(dc);
|
|
@@ -21683,7 +21683,7 @@ browserWorkerPolyFill(self);
|
|
|
21683
21683
|
}, Od = function(s) {
|
|
21684
21684
|
return s.toString().replace(/^function.+?{/, "").slice(0, -1);
|
|
21685
21685
|
}, ST = Ld(Od(function() {
|
|
21686
|
-
var s = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof
|
|
21686
|
+
var s = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof tn < "u" ? tn : typeof self < "u" ? self : {}, e = function() {
|
|
21687
21687
|
this.init = function() {
|
|
21688
21688
|
var o = {};
|
|
21689
21689
|
this.on = function(u, c) {
|
|
@@ -30187,7 +30187,7 @@ const Ab = Ld(Od(function() {
|
|
|
30187
30187
|
};
|
|
30188
30188
|
}
|
|
30189
30189
|
}
|
|
30190
|
-
var f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof
|
|
30190
|
+
var f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof tn < "u" ? tn : typeof self < "u" ? self : {}, g;
|
|
30191
30191
|
typeof window < "u" ? g = window : typeof f < "u" ? g = f : typeof self < "u" ? g = self : g = {};
|
|
30192
30192
|
var T = g, w = function(M) {
|
|
30193
30193
|
return ArrayBuffer.isView === "function" ? ArrayBuffer.isView(M) : M && M.buffer instanceof ArrayBuffer;
|
package/lib/ui/modal/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as c, Fragment as h, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { styled as y } from "@linaria/react";
|
|
3
|
-
import { useState as d, useEffect as
|
|
4
|
-
import {
|
|
5
|
-
import { BREAKPOINTS as
|
|
3
|
+
import { useState as d, useEffect as u } from "react";
|
|
4
|
+
import { createPortal as a } from "react-dom";
|
|
5
|
+
import { BREAKPOINTS as f } from "../theme/constants.js";
|
|
6
6
|
import { hideContentStyles as O } from "../theme/utils.js";
|
|
7
7
|
const S = /* @__PURE__ */ y("div")({
|
|
8
8
|
name: "StaticContainer",
|
|
@@ -12,49 +12,49 @@ const S = /* @__PURE__ */ y("div")({
|
|
|
12
12
|
.sl-pill-button {
|
|
13
13
|
display: none !important;
|
|
14
14
|
}
|
|
15
|
-
`, p = () => window.innerWidth >=
|
|
16
|
-
var
|
|
15
|
+
`, p = () => window.innerWidth >= f.md && window.innerWidth < f.lg ? 76 : 53, m = (e) => {
|
|
16
|
+
var n;
|
|
17
17
|
const t = p();
|
|
18
|
-
return Math.round((((
|
|
19
|
-
},
|
|
18
|
+
return Math.round((((n = e.current) == null ? void 0 : n.getBoundingClientRect().y) || 0) - t) <= 0;
|
|
19
|
+
}, T = ({
|
|
20
20
|
children: e,
|
|
21
21
|
container: t,
|
|
22
|
-
useContainer:
|
|
22
|
+
useContainer: n,
|
|
23
23
|
staticStyles: w
|
|
24
24
|
}) => {
|
|
25
|
-
const [s] = d(() =>
|
|
26
|
-
return
|
|
25
|
+
const [s] = d(() => m(t)), [r, i] = d(!1);
|
|
26
|
+
return u(() => {
|
|
27
27
|
if (!t.current || !s)
|
|
28
28
|
return i(!0), () => {
|
|
29
29
|
};
|
|
30
30
|
const o = window.scrollY;
|
|
31
31
|
return i(!0), () => {
|
|
32
|
-
|
|
32
|
+
m(t) && window.scrollTo({
|
|
33
33
|
top: o,
|
|
34
34
|
behavior: "instant"
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
-
}, []),
|
|
38
|
-
if (
|
|
37
|
+
}, []), u(() => {
|
|
38
|
+
if (r && t.current && s) {
|
|
39
39
|
const o = p();
|
|
40
40
|
window.scrollTo({
|
|
41
41
|
top: t.current.offsetTop - o,
|
|
42
42
|
behavior: "instant"
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
}, [
|
|
45
|
+
}, [r]), !t.current || !r ? null : n ? a(/* @__PURE__ */ c(S, {
|
|
46
46
|
className: "StaticContainer",
|
|
47
47
|
children: [e, /* @__PURE__ */ l("style", {
|
|
48
48
|
children: O
|
|
49
49
|
}), /* @__PURE__ */ l("style", {
|
|
50
50
|
children: C
|
|
51
51
|
})]
|
|
52
|
-
}), t.current, "modal-node") :
|
|
52
|
+
}), t.current, "modal-node") : a(/* @__PURE__ */ c(h, {
|
|
53
53
|
children: [e, /* @__PURE__ */ l("style", {
|
|
54
54
|
children: w
|
|
55
55
|
})]
|
|
56
56
|
}), t.current, "modal-node");
|
|
57
57
|
};
|
|
58
58
|
export {
|
|
59
|
-
|
|
59
|
+
T as ModalPortal
|
|
60
60
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "1.31.
|
|
3
|
+
"version": "1.31.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
],
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@lottiefiles/react-lottie-player": "^3.5.4",
|
|
79
|
-
"@streamlayer/sl-eslib": "^5.
|
|
79
|
+
"@streamlayer/sl-eslib": "^5.221.0",
|
|
80
80
|
"@types/lodash.throttle": "^4.1.9",
|
|
81
81
|
"lodash.throttle": "^4.1.1",
|
|
82
82
|
"react-infinite-scroller": "^1.2.6",
|
|
@@ -85,19 +85,19 @@
|
|
|
85
85
|
"@noriginmedia/norigin-spatial-navigation": "^2.3.0",
|
|
86
86
|
"react-window-infinite-loader": "^1.0.9",
|
|
87
87
|
"uuid": "^11.1.0",
|
|
88
|
-
"@streamlayer/feature-gamification": "^1.22.
|
|
89
|
-
"@streamlayer/react-polyfills": "^0.1.
|
|
90
|
-
"@streamlayer/sdk-web": "^1.15.
|
|
91
|
-
"@streamlayer/sdk-web-analytics": "^1.12.
|
|
92
|
-
"@streamlayer/sdk-web-anonymous-auth": "^1.2.
|
|
93
|
-
"@streamlayer/sdk-web-api": "^1.13.
|
|
94
|
-
"@streamlayer/sdk-web-core": "^1.16.
|
|
95
|
-
"@streamlayer/sdk-web-features": "^1.0.
|
|
96
|
-
"@streamlayer/sdk-web-
|
|
97
|
-
"@streamlayer/sdk-web-
|
|
98
|
-
"@streamlayer/sdk-web-notifications": "^1.3.
|
|
99
|
-
"@streamlayer/sdk-web-storage": "^1.0.
|
|
100
|
-
"@streamlayer/sdk-web-types": "^1.15.
|
|
88
|
+
"@streamlayer/feature-gamification": "^1.22.9",
|
|
89
|
+
"@streamlayer/react-polyfills": "^0.1.44",
|
|
90
|
+
"@streamlayer/sdk-web": "^1.15.9",
|
|
91
|
+
"@streamlayer/sdk-web-analytics": "^1.12.9",
|
|
92
|
+
"@streamlayer/sdk-web-anonymous-auth": "^1.2.9",
|
|
93
|
+
"@streamlayer/sdk-web-api": "^1.13.9",
|
|
94
|
+
"@streamlayer/sdk-web-core": "^1.16.9",
|
|
95
|
+
"@streamlayer/sdk-web-features": "^1.0.84",
|
|
96
|
+
"@streamlayer/sdk-web-interfaces": "^1.7.17",
|
|
97
|
+
"@streamlayer/sdk-web-logger": "^1.0.84",
|
|
98
|
+
"@streamlayer/sdk-web-notifications": "^1.3.46",
|
|
99
|
+
"@streamlayer/sdk-web-storage": "^1.0.84",
|
|
100
|
+
"@streamlayer/sdk-web-types": "^1.15.9"
|
|
101
101
|
},
|
|
102
102
|
"nx": {
|
|
103
103
|
"implicitDependencies": [
|
|
@@ -126,6 +126,7 @@
|
|
|
126
126
|
"glob": "^11.0.0",
|
|
127
127
|
"hls.js": "^1.6.13",
|
|
128
128
|
"react": "18.3.1",
|
|
129
|
+
"react-dom": "18.3.1",
|
|
129
130
|
"react-auth-code-input": "^3.2.1",
|
|
130
131
|
"react-countdown-circle-timer": "^3.2.1",
|
|
131
132
|
"react-countup": "^6.5.3",
|
|
@@ -138,7 +139,7 @@
|
|
|
138
139
|
"vite-plugin-svgr": "^4.2.0",
|
|
139
140
|
"vite-svg-loader": "^5.1.0",
|
|
140
141
|
"vite-tsconfig-paths": "^5.0.1",
|
|
141
|
-
"@streamlayer/react": "^1.20.
|
|
142
|
+
"@streamlayer/react": "^1.20.7"
|
|
142
143
|
},
|
|
143
144
|
"dependencies": {
|
|
144
145
|
"@dailymotion/vast-client": "^6.4.2",
|