@streamlayer/react-ui 0.5.8 → 0.23.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.
- package/README.md +1 -1
- package/lib/icon-chevron-138a557c.js +4 -0
- package/lib/icon-exit-d3f9fc80.js +4 -0
- package/lib/index-d5620d2c.js +71 -0
- package/lib/index.js +91 -0
- package/lib/lib/demo/Gamification.js +95 -0
- package/lib/lib/demo/Highlights.js +59 -0
- package/lib/lib/demo/Login.js +25 -0
- package/lib/lib/demo/components/EventProvider.js +5 -0
- package/lib/lib/demo/components/Insight.js +31 -0
- package/lib/lib/demo/components/Insights.js +16 -0
- package/lib/lib/demo/components/Question.js +101 -0
- package/lib/lib/demo/components/QuestionsList.js +16 -0
- package/lib/lib/demo/components/UserSummary.js +32 -0
- package/lib/lib/demo/components/index.js +59 -0
- package/lib/lib/demo/index.js +126 -0
- package/lib/lib/demo/styles.js +58 -0
- package/lib/lib/gamification/common-header/index.js +14 -0
- package/lib/lib/gamification/common-header/styles.js +31 -0
- package/lib/lib/gamification/detailed-insight/index.js +29 -0
- package/lib/lib/gamification/detailed-insight/styles.js +62 -0
- package/lib/lib/gamification/insight/index.js +26 -0
- package/lib/lib/gamification/insight/styles.js +65 -0
- package/lib/lib/gamification/insight-list/index.js +11 -0
- package/lib/lib/gamification/insight-list/styles.js +20 -0
- package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-instructions/index.js +10 -0
- package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-instructions/styles.js +30 -0
- package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-invite-card/index.js +17 -0
- package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-invite-card/styles.js +55 -0
- package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-rules/index.js +13 -0
- package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-rules/styles.js +43 -0
- package/lib/lib/gamification/onboarding/index.js +66 -0
- package/lib/lib/gamification/onboarding/styles.js +69 -0
- package/lib/lib/gamification/question/index.js +39 -0
- package/{src → lib}/lib/gamification/question/styles.js +30 -28
- package/lib/lib/gamification/question-list/index.js +14 -0
- package/{src → lib}/lib/gamification/question-list/styles.js +11 -9
- package/lib/lib/gamification/user-statistics/components/rank/index.js +10 -0
- package/{src → lib}/lib/gamification/user-statistics/components/rank/styles.js +9 -7
- package/lib/lib/gamification/user-statistics/components/statistics/index.js +10 -0
- package/{src → lib}/lib/gamification/user-statistics/components/statistics/styles.js +7 -5
- package/lib/lib/gamification/user-statistics/index.js +57 -0
- package/{src → lib}/lib/gamification/user-statistics/styles.js +52 -37
- package/lib/lib/gamification/vote/components/voting-header/components/points/index.js +13 -0
- package/{src → lib}/lib/gamification/vote/components/voting-header/components/points/styles.js +13 -11
- package/lib/lib/gamification/vote/components/voting-header/components/timer/index.js +28 -0
- package/lib/lib/gamification/vote/components/voting-header/components/timer/styles.js +8 -0
- package/lib/lib/gamification/vote/components/voting-header/index.js +44 -0
- package/{src → lib}/lib/gamification/vote/components/voting-header/styles.js +22 -19
- package/lib/lib/gamification/vote/components/voting-option/index.js +8 -0
- package/lib/lib/gamification/vote/components/voting-option/styles.js +96 -0
- package/lib/lib/gamification/vote/index.js +51 -0
- package/{src → lib}/lib/gamification/vote/styles.js +21 -19
- package/lib/lib/gamification/vote/types.d.js +1 -0
- package/lib/lib/login/index.js +70 -0
- package/{src/lib/gamification → lib/lib}/login/styles.js +24 -20
- package/lib/lib/notifications/decorator.js +64 -0
- package/lib/lib/notifications/index.js +28 -0
- package/lib/lib/notifications/notification/index.js +36 -0
- package/lib/lib/notifications/notification/onboarding-inapp/index.js +25 -0
- package/lib/lib/notifications/notification/onboarding-inapp/styles.js +77 -0
- package/lib/lib/notifications/notification/question-inapp/index.js +23 -0
- package/lib/lib/notifications/notification/question-inapp/styles.js +61 -0
- package/lib/lib/notifications/notification/styles.js +32 -0
- package/lib/lib/notifications/styles.js +15 -0
- package/lib/lib/theme/constants.js +38 -0
- package/lib/lib/theme/index.js +8 -0
- package/lib/lib/theme/theme.js +27 -0
- package/lib/lib/user-account/index.js +27 -0
- package/lib/lib/user-account/styles.js +80 -0
- package/lib/utils/common.js +4 -0
- package/lib/utils/components/bypassLogin.js +63 -0
- package/lib/utils/components/developer.js +76 -0
- package/lib/utils/components/eventInput.js +56 -0
- package/lib/utils/createDemo.js +46 -0
- package/lib/utils/decorators/container.js +11 -0
- package/lib/utils/decorators/styles.js +27 -0
- package/lib/utils/login.js +25 -0
- package/lib/utils/storage.js +36 -0
- package/lib/utils/useStreamLayerApp.js +25 -0
- package/package.json +49 -23
- package/src/assets/demo-bg.webp +0 -0
- package/src/assets/icons/fedex.svg +0 -7
- package/src/assets/icons/icon-check-green.svg +0 -5
- package/src/assets/icons/icon-check-white.svg +0 -5
- package/src/assets/icons/icon-check.svg +0 -5
- package/src/assets/icons/icon-chevron.svg +0 -5
- package/src/assets/icons/icon-circle-arrow-right.svg +0 -4
- package/src/assets/icons/icon-close.svg +0 -5
- package/src/assets/icons/icon-cross.svg +0 -6
- package/src/assets/icons/icon-exit.svg +0 -5
- package/src/assets/icons/icon-poll.svg +0 -5
- package/src/assets/icons/icon-prediction.svg +0 -5
- package/src/assets/icons/icon-thumb-down.svg +0 -3
- package/src/assets/icons/icon-trivia.svg +0 -5
- package/src/assets/icons/icon-trophy-green.svg +0 -5
- package/src/assets/icons/icon-trophy.svg +0 -5
- package/src/index.d.ts +0 -10
- package/src/index.js +0 -11
- package/src/index.js.map +0 -1
- package/src/lib/demo/Gamification.d.ts +0 -7
- package/src/lib/demo/Gamification.js +0 -30
- package/src/lib/demo/Gamification.js.map +0 -1
- package/src/lib/demo/Login.d.ts +0 -5
- package/src/lib/demo/Login.js +0 -15
- package/src/lib/demo/Login.js.map +0 -1
- package/src/lib/demo/components/InPlayGame.d.ts +0 -6
- package/src/lib/demo/components/InPlayGame.js +0 -6
- package/src/lib/demo/components/InPlayGame.js.map +0 -1
- package/src/lib/demo/components/Notifications.d.ts +0 -6
- package/src/lib/demo/components/Notifications.js +0 -37
- package/src/lib/demo/components/Notifications.js.map +0 -1
- package/src/lib/demo/components/Question.d.ts +0 -7
- package/src/lib/demo/components/Question.js +0 -61
- package/src/lib/demo/components/Question.js.map +0 -1
- package/src/lib/demo/components/QuestionsList.d.ts +0 -6
- package/src/lib/demo/components/QuestionsList.js +0 -13
- package/src/lib/demo/components/QuestionsList.js.map +0 -1
- package/src/lib/demo/components/UserSummary.d.ts +0 -5
- package/src/lib/demo/components/UserSummary.js +0 -11
- package/src/lib/demo/components/UserSummary.js.map +0 -1
- package/src/lib/demo/components/index.d.ts +0 -5
- package/src/lib/demo/components/index.js +0 -6
- package/src/lib/demo/components/index.js.map +0 -1
- package/src/lib/demo/index.d.ts +0 -5
- package/src/lib/demo/index.js +0 -26
- package/src/lib/demo/index.js.map +0 -1
- package/src/lib/demo/styles.d.ts +0 -13
- package/src/lib/demo/styles.js +0 -14
- package/src/lib/demo/styles.js.map +0 -1
- package/src/lib/gamification/inapp/index.d.ts +0 -13
- package/src/lib/gamification/inapp/index.js +0 -12
- package/src/lib/gamification/inapp/index.js.map +0 -1
- package/src/lib/gamification/inapp/styles.d.ts +0 -37
- package/src/lib/gamification/inapp/styles.js +0 -74
- package/src/lib/gamification/inapp/styles.js.map +0 -1
- package/src/lib/gamification/login/index.d.ts +0 -7
- package/src/lib/gamification/login/index.js +0 -54
- package/src/lib/gamification/login/index.js.map +0 -1
- package/src/lib/gamification/login/styles.d.ts +0 -29
- package/src/lib/gamification/login/styles.js.map +0 -1
- package/src/lib/gamification/onboarding/index.d.ts +0 -6
- package/src/lib/gamification/onboarding/index.js +0 -4
- package/src/lib/gamification/onboarding/index.js.map +0 -1
- package/src/lib/gamification/onboarding/styles.d.ts +0 -21
- package/src/lib/gamification/onboarding/styles.js +0 -41
- package/src/lib/gamification/onboarding/styles.js.map +0 -1
- package/src/lib/gamification/question/index.d.ts +0 -5
- package/src/lib/gamification/question/index.js +0 -28
- package/src/lib/gamification/question/index.js.map +0 -1
- package/src/lib/gamification/question/styles.d.ts +0 -45
- package/src/lib/gamification/question/styles.js.map +0 -1
- package/src/lib/gamification/question-list/index.d.ts +0 -8
- package/src/lib/gamification/question-list/index.js +0 -7
- package/src/lib/gamification/question-list/index.js.map +0 -1
- package/src/lib/gamification/question-list/styles.d.ts +0 -13
- package/src/lib/gamification/question-list/styles.js.map +0 -1
- package/src/lib/gamification/user-statistics/components/rank/index.d.ts +0 -7
- package/src/lib/gamification/user-statistics/components/rank/index.js +0 -4
- package/src/lib/gamification/user-statistics/components/rank/index.js.map +0 -1
- package/src/lib/gamification/user-statistics/components/rank/styles.d.ts +0 -13
- package/src/lib/gamification/user-statistics/components/rank/styles.js.map +0 -1
- package/src/lib/gamification/user-statistics/components/statistics/index.d.ts +0 -7
- package/src/lib/gamification/user-statistics/components/statistics/index.js +0 -4
- package/src/lib/gamification/user-statistics/components/statistics/index.js.map +0 -1
- package/src/lib/gamification/user-statistics/components/statistics/styles.d.ts +0 -9
- package/src/lib/gamification/user-statistics/components/statistics/styles.js.map +0 -1
- package/src/lib/gamification/user-statistics/index.d.ts +0 -15
- package/src/lib/gamification/user-statistics/index.js +0 -14
- package/src/lib/gamification/user-statistics/index.js.map +0 -1
- package/src/lib/gamification/user-statistics/styles.d.ts +0 -57
- package/src/lib/gamification/user-statistics/styles.js.map +0 -1
- package/src/lib/gamification/vote/components/voting-header/components/points/index.d.ts +0 -6
- package/src/lib/gamification/vote/components/voting-header/components/points/index.js +0 -4
- package/src/lib/gamification/vote/components/voting-header/components/points/index.js.map +0 -1
- package/src/lib/gamification/vote/components/voting-header/components/points/styles.d.ts +0 -21
- package/src/lib/gamification/vote/components/voting-header/components/points/styles.js.map +0 -1
- package/src/lib/gamification/vote/components/voting-header/components/timer/index.d.ts +0 -8
- package/src/lib/gamification/vote/components/voting-header/components/timer/index.js +0 -19
- package/src/lib/gamification/vote/components/voting-header/components/timer/index.js.map +0 -1
- package/src/lib/gamification/vote/components/voting-header/components/timer/styles.d.ts +0 -7
- package/src/lib/gamification/vote/components/voting-header/components/timer/styles.js +0 -6
- package/src/lib/gamification/vote/components/voting-header/components/timer/styles.js.map +0 -1
- package/src/lib/gamification/vote/components/voting-header/index.d.ts +0 -12
- package/src/lib/gamification/vote/components/voting-header/index.js +0 -17
- package/src/lib/gamification/vote/components/voting-header/index.js.map +0 -1
- package/src/lib/gamification/vote/components/voting-header/styles.d.ts +0 -35
- package/src/lib/gamification/vote/components/voting-header/styles.js.map +0 -1
- package/src/lib/gamification/vote/components/voting-option/index.d.ts +0 -17
- package/src/lib/gamification/vote/components/voting-option/index.js +0 -14
- package/src/lib/gamification/vote/components/voting-option/index.js.map +0 -1
- package/src/lib/gamification/vote/components/voting-option/styles.d.ts +0 -49
- package/src/lib/gamification/vote/components/voting-option/styles.js +0 -85
- package/src/lib/gamification/vote/components/voting-option/styles.js.map +0 -1
- package/src/lib/gamification/vote/index.d.ts +0 -13
- package/src/lib/gamification/vote/index.js +0 -22
- package/src/lib/gamification/vote/index.js.map +0 -1
- package/src/lib/gamification/vote/styles.d.ts +0 -33
- package/src/lib/gamification/vote/styles.js.map +0 -1
- package/src/lib/theme/index.d.ts +0 -4
- package/src/lib/theme/index.js +0 -5
- package/src/lib/theme/index.js.map +0 -1
- package/src/lib/theme/theme.d.ts +0 -41
- package/src/lib/theme/theme.js +0 -35
- package/src/lib/theme/theme.js.map +0 -1
- package/src/utils/login.d.ts +0 -3
- package/src/utils/login.js +0 -28
- package/src/utils/login.js.map +0 -1
package/{src → lib}/lib/gamification/vote/components/voting-header/components/points/styles.js
RENAMED
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import { styled as i } from "@linaria/react";
|
|
2
|
+
const n = i.div`
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
align-items: flex-end;
|
|
6
6
|
margin-right: 10px;
|
|
7
7
|
font-weight: 700;
|
|
8
|
-
|
|
9
|
-
export const Title = styled.div `
|
|
8
|
+
`, e = i.div`
|
|
10
9
|
color: rgba(255, 255, 255, 0.8);
|
|
11
10
|
font-size: 8px;
|
|
12
11
|
line-height: 12px;
|
|
13
12
|
text-align: right;
|
|
14
|
-
|
|
15
|
-
export const PointContainer = styled.div `
|
|
13
|
+
`, o = i.div`
|
|
16
14
|
text-align: right;
|
|
17
|
-
|
|
18
|
-
export const Point = styled.span `
|
|
15
|
+
`, l = i.span`
|
|
19
16
|
color: rgba(255, 255, 255, 0.9);
|
|
20
17
|
font-size: 14px;
|
|
21
18
|
line-height: 16px;
|
|
22
19
|
margin-right: 2px;
|
|
23
|
-
|
|
24
|
-
export const PointLabel = styled.span `
|
|
20
|
+
`, r = i.span`
|
|
25
21
|
color: white;
|
|
26
22
|
font-size: 10px;
|
|
27
23
|
font-weight: 600;
|
|
28
24
|
line-height: 16px;
|
|
29
25
|
`;
|
|
30
|
-
|
|
26
|
+
export {
|
|
27
|
+
n as Container,
|
|
28
|
+
l as Point,
|
|
29
|
+
o as PointContainer,
|
|
30
|
+
r as PointLabel,
|
|
31
|
+
e as Title
|
|
32
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as R } from "react";
|
|
3
|
+
import { CountdownCircleTimer as m } from "react-countdown-circle-timer";
|
|
4
|
+
import { COLORS as r } from "../../../../../../theme/constants.js";
|
|
5
|
+
import { RemainingTime as s } from "./styles.js";
|
|
6
|
+
import "@linaria/react";
|
|
7
|
+
const E = [r.BLUE_PRIMARY, r.GREEN_1, r.RED_1], T = [10, 6, 0], _ = 30, l = 32, I = 4, O = 0, h = ({ isPlaying: i = !0, duration: n = _, setTimeToExpire: o }) => {
|
|
8
|
+
const c = ({ remainingTime: t }) => /* @__PURE__ */ e(s, { style: { color: t ? "inherit" : void 0 }, children: t });
|
|
9
|
+
return R(() => {
|
|
10
|
+
o(!1);
|
|
11
|
+
}, [o]), /* @__PURE__ */ e(
|
|
12
|
+
m,
|
|
13
|
+
{
|
|
14
|
+
isPlaying: i,
|
|
15
|
+
duration: n,
|
|
16
|
+
colors: E,
|
|
17
|
+
colorsTime: T,
|
|
18
|
+
size: l,
|
|
19
|
+
strokeWidth: I,
|
|
20
|
+
trailStrokeWidth: O,
|
|
21
|
+
onComplete: () => o(!0),
|
|
22
|
+
children: c
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
h as Timer
|
|
28
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsxs as N, jsx as M, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import { QuestionType as j } from "@streamlayer/sdk-web-types";
|
|
3
|
+
import { c as E } from "../../../../../icon-exit-d3f9fc80.js";
|
|
4
|
+
import { Timer as k } from "./components/timer/index.js";
|
|
5
|
+
import { Container as C, RightBlock as w, Interactive as Y, ReactionIconWrap as c, ReactionIcon as y, ExitBtn as o, ExitIcon as r, Logo as a } from "./styles.js";
|
|
6
|
+
import { Points as z } from "./components/points/index.js";
|
|
7
|
+
import "react";
|
|
8
|
+
import "react-countdown-circle-timer";
|
|
9
|
+
import "../../../../theme/constants.js";
|
|
10
|
+
import "./components/timer/styles.js";
|
|
11
|
+
import "@linaria/react";
|
|
12
|
+
import "./components/points/styles.js";
|
|
13
|
+
const n = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGlkPSJUcm9waHkiPgogICAgICA8cGF0aCBpZD0iQ29tYmluZWQgU2hhcGUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi43NjkxNiAzLjUwMDAyQzIuNzY5MTYgNC40OTc4NiAyLjk0NzA1IDU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Q4IDkuOTU1IDIwLjA3ODQgMTAuMzIyQzIxLjE0OTIgMTAuMzk0MSAyMiAxMS4yNzkzIDIyIDEyLjM3MDdaIiBmaWxsPSJ3aGl0ZSIvPgogIDwvc3ZnPgo=", R = ({
|
|
14
|
+
logo: g,
|
|
15
|
+
points: T,
|
|
16
|
+
questionAnswered: D,
|
|
17
|
+
questionAnsweredCorrectly: A,
|
|
18
|
+
questionType: I,
|
|
19
|
+
closeQuestion: L,
|
|
20
|
+
setTimeToExpire: i
|
|
21
|
+
}) => {
|
|
22
|
+
const x = !D && I !== j.PREDICTION, u = D && I === j.TRIVIA, S = u && A, Q = u && !A, U = D && I === j.PREDICTION;
|
|
23
|
+
return /* @__PURE__ */ N(C, { children: [
|
|
24
|
+
/* @__PURE__ */ N(w, { children: [
|
|
25
|
+
/* @__PURE__ */ N(Y, { children: [
|
|
26
|
+
x && /* @__PURE__ */ M(k, { setTimeToExpire: i }),
|
|
27
|
+
S && /* @__PURE__ */ N(O, { children: [
|
|
28
|
+
/* @__PURE__ */ M(z, { points: T }),
|
|
29
|
+
/* @__PURE__ */ M(c, { isSuccess: !0, children: /* @__PURE__ */ M(y, { alt: "reaction-icon", src: n }) })
|
|
30
|
+
] }),
|
|
31
|
+
Q && /* @__PURE__ */ N(O, { children: [
|
|
32
|
+
/* @__PURE__ */ M(z, { points: 0 }),
|
|
33
|
+
/* @__PURE__ */ M(c, { isSuccess: !1, children: /* @__PURE__ */ M(y, { alt: "reaction-icon", src: t }) })
|
|
34
|
+
] }),
|
|
35
|
+
U && /* @__PURE__ */ M(z, { points: T })
|
|
36
|
+
] }),
|
|
37
|
+
/* @__PURE__ */ M(o, { onClick: L, children: /* @__PURE__ */ M(r, { alt: "exit-icon", src: E }) })
|
|
38
|
+
] }),
|
|
39
|
+
g && /* @__PURE__ */ M(a, { src: g })
|
|
40
|
+
] });
|
|
41
|
+
};
|
|
42
|
+
export {
|
|
43
|
+
R as VotingHeader
|
|
44
|
+
};
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import { styled as t } from "@linaria/react";
|
|
2
|
+
const n = t.div`
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
background-color: transparent;
|
|
5
|
-
color:
|
|
5
|
+
color: var(--color-white);
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: row-reverse;
|
|
8
8
|
justify-content: space-between;
|
|
9
9
|
padding: 0px 16px;
|
|
10
10
|
align-items: center;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
min-height: 40px;
|
|
12
|
+
`, o = t.img`
|
|
13
13
|
width: 60px;
|
|
14
14
|
height: 80%;
|
|
15
|
-
|
|
16
|
-
export const RightBlock = styled.div `
|
|
15
|
+
`, r = t.div`
|
|
17
16
|
display: flex;
|
|
18
17
|
align-items: center;
|
|
19
|
-
|
|
20
|
-
export const ExitBtn = styled.button `
|
|
18
|
+
`, c = t.button`
|
|
21
19
|
border: none;
|
|
22
20
|
outline: none;
|
|
23
21
|
background-color: transparent;
|
|
@@ -27,28 +25,33 @@ export const ExitBtn = styled.button `
|
|
|
27
25
|
height: 24px;
|
|
28
26
|
margin-left: 25px;
|
|
29
27
|
cursor: pointer;
|
|
30
|
-
|
|
31
|
-
export const ExitIcon = styled.img `
|
|
28
|
+
`, d = t.img`
|
|
32
29
|
width: 24px;
|
|
33
30
|
height: 24px;
|
|
34
|
-
|
|
35
|
-
export const Interactive = styled.div `
|
|
31
|
+
`, p = t.div`
|
|
36
32
|
display: flex;
|
|
37
33
|
align-items: center;
|
|
38
34
|
padding: 4px 0px;
|
|
39
35
|
margin-left: 10px;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
background-color: ${(props) => (props.isSuccess ? '#f1be1c' : '#da3732')};
|
|
36
|
+
`, a = t.div`
|
|
37
|
+
background-color: ${(e) => e.isSuccess ? "#f1be1c" : "#da3732"};
|
|
43
38
|
width: 32px;
|
|
44
39
|
height: 32px;
|
|
45
40
|
border-radius: 50%;
|
|
46
41
|
display: flex;
|
|
47
42
|
justify-content: center;
|
|
48
43
|
align-items: center;
|
|
49
|
-
|
|
50
|
-
export const ReactionIcon = styled.img `
|
|
44
|
+
`, s = t.img`
|
|
51
45
|
width: 20px;
|
|
52
46
|
height: 20px;
|
|
53
47
|
`;
|
|
54
|
-
|
|
48
|
+
export {
|
|
49
|
+
n as Container,
|
|
50
|
+
c as ExitBtn,
|
|
51
|
+
d as ExitIcon,
|
|
52
|
+
p as Interactive,
|
|
53
|
+
o as Logo,
|
|
54
|
+
s as ReactionIcon,
|
|
55
|
+
a as ReactionIconWrap,
|
|
56
|
+
r as RightBlock
|
|
57
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { styled as r } from "@linaria/react";
|
|
2
|
+
const o = r.div`
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
border-radius: 4px;
|
|
5
|
+
background-color: var(--color-bg-transparent-item-vote);
|
|
6
|
+
border: 2px solid transparent;
|
|
7
|
+
position: relative;
|
|
8
|
+
|
|
9
|
+
&[data-questionAnswered='false'] {
|
|
10
|
+
&:hover {
|
|
11
|
+
border-color: inherit;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`, t = r(o)`
|
|
15
|
+
border: 2px solid;
|
|
16
|
+
|
|
17
|
+
&[data-answeredCorrect='true'] {
|
|
18
|
+
background-color: var(--color-transparent-item-success);
|
|
19
|
+
border-color: var(--color-blue-primary);
|
|
20
|
+
|
|
21
|
+
&:hover {
|
|
22
|
+
border-color: var(--color-blue-primary);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&[data-answeredCorrect='false'] {
|
|
27
|
+
background-color: var(--color-transparent-item-error);
|
|
28
|
+
border-color: var(--color-red-primary);
|
|
29
|
+
|
|
30
|
+
&:hover {
|
|
31
|
+
border-color: var(--color-red-primary);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
`, i = r.div`
|
|
35
|
+
position: absolute;
|
|
36
|
+
left: 0;
|
|
37
|
+
border-radius: 2px;
|
|
38
|
+
z-index: 0;
|
|
39
|
+
height: 100%;
|
|
40
|
+
background-color: inherit;
|
|
41
|
+
transition: all 1s ease-in;
|
|
42
|
+
`, n = r.button`
|
|
43
|
+
border-radius: 20px;
|
|
44
|
+
position: relative;
|
|
45
|
+
background-color: transparent;
|
|
46
|
+
padding: 0px 16px;
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
border: none;
|
|
50
|
+
outline: none;
|
|
51
|
+
width: 100%;
|
|
52
|
+
color: var(--color-white);
|
|
53
|
+
font-weight: 700;
|
|
54
|
+
font-size: 14px;
|
|
55
|
+
height: 100%;
|
|
56
|
+
border-radius: 2px;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
|
|
59
|
+
&:disabled {
|
|
60
|
+
cursor: default;
|
|
61
|
+
}
|
|
62
|
+
`, a = r.img`
|
|
63
|
+
width: 32px;
|
|
64
|
+
height: 32px;
|
|
65
|
+
border-radius: 50%;
|
|
66
|
+
margin-right: 8px;
|
|
67
|
+
`, d = r.span`
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
word-break: break-all;
|
|
70
|
+
padding: 12px 0px;
|
|
71
|
+
flex: 1;
|
|
72
|
+
text-align: left;
|
|
73
|
+
`, s = r.span`
|
|
74
|
+
display: flex;
|
|
75
|
+
`, c = r.div`
|
|
76
|
+
width: 16px;
|
|
77
|
+
height: 16px;
|
|
78
|
+
margin-left: 8px;
|
|
79
|
+
`, l = r.div`
|
|
80
|
+
margin-left: 12px;
|
|
81
|
+
`, p = r.img`
|
|
82
|
+
width: 16px;
|
|
83
|
+
height: 16px;
|
|
84
|
+
`;
|
|
85
|
+
export {
|
|
86
|
+
t as AnsweredContainer,
|
|
87
|
+
n as Button,
|
|
88
|
+
i as ButtonPct,
|
|
89
|
+
p as CheckIcon,
|
|
90
|
+
c as CheckIconWrap,
|
|
91
|
+
o as Container,
|
|
92
|
+
a as Icon,
|
|
93
|
+
s as Indicators,
|
|
94
|
+
l as Percentage,
|
|
95
|
+
d as Title
|
|
96
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsxs as e, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { QuestionType as b } from "@streamlayer/sdk-web-types";
|
|
3
|
+
import { useState as N, useCallback as s, useEffect as S } from "react";
|
|
4
|
+
import { V as D, c as j } from "../../../index-d5620d2c.js";
|
|
5
|
+
import { Container as p, Title as M, Options as h, Loader as Z, Feedback as u, FeedbackIcon as L, FeedbackTitle as z, FeedbackDescription as G } from "./styles.js";
|
|
6
|
+
import "./components/voting-option/styles.js";
|
|
7
|
+
import "@linaria/react";
|
|
8
|
+
const A = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeT0iMC4wMDE5NTMxMiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiByeD0iMTIiIGZpbGw9IiNGODAwMjIiLz4KPHJlY3QgeD0iOC4yNSIgeT0iNy4wMDE5NSIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcuMDAxOTUpIiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB4PSI3IiB5PSIxNS43NTIiIHdpZHRoPSIxMi4zNzQ0IiBoZWlnaHQ9IjEuNzY3NzciIHJ4PSIwLjg4Mzg4NCIgdHJhbnNmb3JtPSJyb3RhdGUoLTQ1IDcgMTUuNzUyKSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==", x = ({
|
|
9
|
+
title: a,
|
|
10
|
+
questionId: g,
|
|
11
|
+
options: t,
|
|
12
|
+
questionAnswered: l,
|
|
13
|
+
feedbackMessages: I,
|
|
14
|
+
questionAnsweredCorrectly: d,
|
|
15
|
+
questionType: n
|
|
16
|
+
}) => {
|
|
17
|
+
const [m, r] = N(!1), o = s(
|
|
18
|
+
(c) => {
|
|
19
|
+
r(c);
|
|
20
|
+
},
|
|
21
|
+
[r]
|
|
22
|
+
);
|
|
23
|
+
return S(() => {
|
|
24
|
+
o(!1);
|
|
25
|
+
}, [t, o]), /* @__PURE__ */ e(p, { children: [
|
|
26
|
+
/* @__PURE__ */ i(M, { children: a }),
|
|
27
|
+
/* @__PURE__ */ e(h, { children: [
|
|
28
|
+
m && /* @__PURE__ */ i(Z, { children: "Loading..." }),
|
|
29
|
+
t.map((c) => /* @__PURE__ */ i(
|
|
30
|
+
D,
|
|
31
|
+
{
|
|
32
|
+
toggleIsLoadingSubmitAnswer: o,
|
|
33
|
+
questionId: g,
|
|
34
|
+
questionType: n,
|
|
35
|
+
...c
|
|
36
|
+
},
|
|
37
|
+
c.id
|
|
38
|
+
))
|
|
39
|
+
] }),
|
|
40
|
+
l && n === b.TRIVIA && /* @__PURE__ */ e(u, { children: [
|
|
41
|
+
/* @__PURE__ */ i(L, { alt: "reaction-to-answer", src: d ? j : A }),
|
|
42
|
+
/* @__PURE__ */ e("div", { children: [
|
|
43
|
+
/* @__PURE__ */ i(z, { children: d ? I.correctFeedback.title : I.incorrectFeedback.title }),
|
|
44
|
+
/* @__PURE__ */ i(G, { children: d ? I.correctFeedback.description : I.incorrectFeedback.description })
|
|
45
|
+
] })
|
|
46
|
+
] })
|
|
47
|
+
] });
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
x as Vote
|
|
51
|
+
};
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import { styled as t } from "@linaria/react";
|
|
2
|
+
const e = t.div`
|
|
3
3
|
padding: 16px;
|
|
4
|
-
color:
|
|
4
|
+
color: var(--color-white);
|
|
5
5
|
font-weight: 700;
|
|
6
6
|
font-size: 14px;
|
|
7
7
|
|
|
8
8
|
& > div:not(:last-child) {
|
|
9
9
|
margin-bottom: 16px;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
export const Title = styled.div `
|
|
11
|
+
`, o = t.div`
|
|
13
12
|
font-size: 16px;
|
|
14
|
-
|
|
15
|
-
export const Options = styled.div `
|
|
13
|
+
`, n = t.div`
|
|
16
14
|
overflow-y: auto;
|
|
17
15
|
max-height: 220px;
|
|
18
16
|
position: relative;
|
|
@@ -20,37 +18,32 @@ export const Options = styled.div `
|
|
|
20
18
|
& > div:not(:last-child) {
|
|
21
19
|
margin-bottom: 12px;
|
|
22
20
|
}
|
|
23
|
-
|
|
24
|
-
export const Loader = styled.div `
|
|
21
|
+
`, a = t.div`
|
|
25
22
|
position: absolute;
|
|
26
23
|
left: 0px;
|
|
27
|
-
background-color:
|
|
24
|
+
background-color: var(--color-transparent-vote-container);
|
|
28
25
|
width: 100%;
|
|
29
26
|
height: 100%;
|
|
30
27
|
z-index: 1;
|
|
31
28
|
display: flex;
|
|
32
29
|
justify-content: center;
|
|
33
30
|
align-items: center;
|
|
34
|
-
|
|
35
|
-
export const Feedback = styled.div `
|
|
31
|
+
`, l = t.div`
|
|
36
32
|
padding: 14px 12px 14px 16px;
|
|
37
33
|
display: flex;
|
|
38
34
|
align-items: center;
|
|
39
|
-
|
|
40
|
-
export const FeedbackIcon = styled.img `
|
|
35
|
+
`, r = t.img`
|
|
41
36
|
width: 24px;
|
|
42
37
|
height: 24px;
|
|
43
38
|
margin-right: 12px;
|
|
44
|
-
|
|
45
|
-
export const FeedbackTitle = styled.div `
|
|
39
|
+
`, d = t.div`
|
|
46
40
|
overflow: hidden;
|
|
47
41
|
text-overflow: ellipsis;
|
|
48
42
|
white-space: nowrap;
|
|
49
43
|
font-size: 16;
|
|
50
44
|
font-weight: 700;
|
|
51
45
|
margin-bottom: 10px;
|
|
52
|
-
|
|
53
|
-
export const FeedbackDescription = styled.div `
|
|
46
|
+
`, p = t.div`
|
|
54
47
|
display: -webkit-box;
|
|
55
48
|
-webkit-box-orient: vertical;
|
|
56
49
|
-webkit-line-clamp: 4;
|
|
@@ -59,4 +52,13 @@ export const FeedbackDescription = styled.div `
|
|
|
59
52
|
font-size: 14;
|
|
60
53
|
font-weight: 500;
|
|
61
54
|
`;
|
|
62
|
-
|
|
55
|
+
export {
|
|
56
|
+
e as Container,
|
|
57
|
+
l as Feedback,
|
|
58
|
+
p as FeedbackDescription,
|
|
59
|
+
r as FeedbackIcon,
|
|
60
|
+
d as FeedbackTitle,
|
|
61
|
+
a as Loader,
|
|
62
|
+
n as Options,
|
|
63
|
+
o as Title
|
|
64
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as a } from "react";
|
|
3
|
+
import w, { isValidPhoneNumber as P, formatPhoneNumberIntl as F } from "react-phone-number-input";
|
|
4
|
+
import v from "react-auth-code-input";
|
|
5
|
+
import { requestLoginCode as D, register as I, login as k } from "../../utils/login.js";
|
|
6
|
+
import { Timer as x } from "../gamification/vote/components/voting-header/components/timer/index.js";
|
|
7
|
+
import { Panel as E, Form as p, FormTitle as u, FormDescription as d, FormInputContainer as S, FormSubmit as m, Digits as T } from "./styles.js";
|
|
8
|
+
import "@connectrpc/connect-web";
|
|
9
|
+
import "@connectrpc/connect";
|
|
10
|
+
import "@streamlayer/sl-eslib/users/users_connect";
|
|
11
|
+
import "react-countdown-circle-timer";
|
|
12
|
+
import "../theme/constants.js";
|
|
13
|
+
import "../gamification/vote/components/voting-header/components/timer/styles.js";
|
|
14
|
+
import "@linaria/react";
|
|
15
|
+
const Q = ({ login: s, anonymousLogin: h, host: c }) => {
|
|
16
|
+
const [n, g] = a(""), [i, b] = a(""), [l, f] = a(""), y = async (o) => {
|
|
17
|
+
o.preventDefault();
|
|
18
|
+
try {
|
|
19
|
+
const r = n.replaceAll("+", "");
|
|
20
|
+
try {
|
|
21
|
+
await D(c, r);
|
|
22
|
+
} catch {
|
|
23
|
+
await I(c, r);
|
|
24
|
+
}
|
|
25
|
+
b(r);
|
|
26
|
+
} catch (r) {
|
|
27
|
+
window.alert(r);
|
|
28
|
+
}
|
|
29
|
+
}, C = async (o) => {
|
|
30
|
+
if (o.preventDefault(), i && l)
|
|
31
|
+
try {
|
|
32
|
+
const r = await k(c, i, l);
|
|
33
|
+
r && s ? await s(r) : console.log("token", r);
|
|
34
|
+
} catch (r) {
|
|
35
|
+
window.alert(r);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ t(E, { children: [
|
|
39
|
+
!i && /* @__PURE__ */ t("div", { children: [
|
|
40
|
+
/* @__PURE__ */ t(p, { onSubmit: y, children: [
|
|
41
|
+
/* @__PURE__ */ e(u, { children: "Enter your phone number" }),
|
|
42
|
+
/* @__PURE__ */ e(d, { children: "Enter your phone up for number to log in or sign an account." }),
|
|
43
|
+
/* @__PURE__ */ e(S, { children: /* @__PURE__ */ e(w, { value: n, onChange: (o) => g(`${o}`) }) }),
|
|
44
|
+
/* @__PURE__ */ e(m, { disabled: !P(n), type: "submit", children: "request code" })
|
|
45
|
+
] }),
|
|
46
|
+
h && /* @__PURE__ */ e(m, { style: { display: "block", margin: "auto" }, onClick: h, children: "anonymous login" })
|
|
47
|
+
] }),
|
|
48
|
+
i && /* @__PURE__ */ t(p, { onSubmit: C, children: [
|
|
49
|
+
/* @__PURE__ */ e(u, { children: "Enter Verification Code" }),
|
|
50
|
+
/* @__PURE__ */ t(d, { children: [
|
|
51
|
+
"Please enter the verification code ",
|
|
52
|
+
/* @__PURE__ */ e("br", {}),
|
|
53
|
+
"sent to ",
|
|
54
|
+
/* @__PURE__ */ e("b", { children: F(n) })
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ e(T, { children: /* @__PURE__ */ e(v, { autoFocus: !0, allowedCharacters: "numeric", length: 4, onChange: f }) }),
|
|
57
|
+
/* @__PURE__ */ e(m, { disabled: l.length !== 4, type: "submit", children: "login" }),
|
|
58
|
+
/* @__PURE__ */ t(d, { children: [
|
|
59
|
+
"Didn't get 59 the code? ",
|
|
60
|
+
/* @__PURE__ */ e("br", {}),
|
|
61
|
+
"Resend Code in",
|
|
62
|
+
/* @__PURE__ */ e(x, { duration: 30, setTimeToExpire: () => {
|
|
63
|
+
}, isPlaying: !0 })
|
|
64
|
+
] })
|
|
65
|
+
] })
|
|
66
|
+
] });
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
Q as Login
|
|
70
|
+
};
|
|
@@ -1,33 +1,29 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import { styled as o } from "@linaria/react";
|
|
2
|
+
const n = o.div`
|
|
3
3
|
border-radius: 8px;
|
|
4
4
|
padding: 0 12px;
|
|
5
|
-
background-color:
|
|
5
|
+
background-color: var(--color-transparent-item);
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: center;
|
|
8
8
|
height: 100%;
|
|
9
|
-
|
|
10
|
-
export const Form = styled.form `
|
|
9
|
+
`, r = o.form`
|
|
11
10
|
display: flex;
|
|
12
11
|
margin: auto;
|
|
13
12
|
flex-direction: column;
|
|
14
13
|
align-items: center;
|
|
15
14
|
text-align: center;
|
|
16
|
-
|
|
17
|
-
export const FormTitle = styled.div `
|
|
15
|
+
`, i = o.div`
|
|
18
16
|
margin-bottom: 20px;
|
|
19
17
|
font-size: 18px;
|
|
20
|
-
|
|
21
|
-
export const FormDescription = styled.div `
|
|
18
|
+
`, e = o.div`
|
|
22
19
|
margin-bottom: 10px;
|
|
23
20
|
font-size: 14px;
|
|
24
21
|
|
|
25
22
|
display: flex;
|
|
26
23
|
align-items: center;
|
|
27
24
|
flex-direction: column;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
background-color: ${(props) => props.theme.COLORS.BLUE_QUESTION_ACTION_BTN};
|
|
25
|
+
`, a = o.button`
|
|
26
|
+
background-color: var(--color-blue-question-action-btn);
|
|
31
27
|
border: none;
|
|
32
28
|
border-radius: 2px;
|
|
33
29
|
padding: 6px;
|
|
@@ -40,8 +36,7 @@ export const FormSubmit = styled.button `
|
|
|
40
36
|
cursor: default;
|
|
41
37
|
}
|
|
42
38
|
margin-bottom: 20px;
|
|
43
|
-
|
|
44
|
-
export const FormInputContainer = styled.div `
|
|
39
|
+
`, p = o.div`
|
|
45
40
|
input {
|
|
46
41
|
font-size: 20px;
|
|
47
42
|
background: transparent;
|
|
@@ -52,11 +47,12 @@ export const FormInputContainer = styled.div `
|
|
|
52
47
|
|
|
53
48
|
margin-bottom: 40px;
|
|
54
49
|
border-bottom: 1px solid white;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
`, d = o.div`
|
|
51
|
+
> div {
|
|
52
|
+
display: flex;
|
|
53
|
+
gap: 10px;
|
|
54
|
+
margin-bottom: 20px;
|
|
55
|
+
}
|
|
60
56
|
|
|
61
57
|
input {
|
|
62
58
|
width: 20px;
|
|
@@ -64,4 +60,12 @@ export const Digits = styled.div `
|
|
|
64
60
|
font-size: 40px;
|
|
65
61
|
}
|
|
66
62
|
`;
|
|
67
|
-
|
|
63
|
+
export {
|
|
64
|
+
d as Digits,
|
|
65
|
+
r as Form,
|
|
66
|
+
e as FormDescription,
|
|
67
|
+
p as FormInputContainer,
|
|
68
|
+
a as FormSubmit,
|
|
69
|
+
i as FormTitle,
|
|
70
|
+
n as Panel
|
|
71
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsxs as p, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { NotificationType as o, Notifications as m } from "@streamlayer/sdk-web-notifications";
|
|
3
|
+
import { styled as b } from "@linaria/react";
|
|
4
|
+
import { useMemo as f, useRef as a } from "react";
|
|
5
|
+
import { Notifications as l } from "./index.js";
|
|
6
|
+
import "@nanostores/react";
|
|
7
|
+
import "./notification/index.js";
|
|
8
|
+
import "./notification/onboarding-inapp/index.js";
|
|
9
|
+
import "./notification/onboarding-inapp/styles.js";
|
|
10
|
+
import "./notification/question-inapp/index.js";
|
|
11
|
+
import "../../icon-exit-d3f9fc80.js";
|
|
12
|
+
import "./notification/question-inapp/styles.js";
|
|
13
|
+
import "./notification/styles.js";
|
|
14
|
+
import "./styles.js";
|
|
15
|
+
const c = b.button`
|
|
16
|
+
border: none;
|
|
17
|
+
outline: none;
|
|
18
|
+
background-color: var(--color-green-primary-btn);
|
|
19
|
+
color: var(--color-white);
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
padding: 5px;
|
|
22
|
+
min-width: 50px;
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
align-items: center;
|
|
26
|
+
border-radius: 8px;
|
|
27
|
+
margin-top: 10px;
|
|
28
|
+
`, u = {
|
|
29
|
+
[o.QUESTION]: {
|
|
30
|
+
icon: "https://static-next.streamlayer.io/1a0525a58e123d342ed43ebdf5bacc9c/f2147312-357a-4cb6-a6fa-879472609344/e675f428-d234-40fd-95db-e09bc2143852.png"
|
|
31
|
+
},
|
|
32
|
+
[o.ONBOARDING]: {
|
|
33
|
+
header: "Header",
|
|
34
|
+
subtitle: "Free to Play Interactive game",
|
|
35
|
+
graphicBg: "https://storage.googleapis.com/cdn.streamlayer.io/organization/studioicons/oval.png",
|
|
36
|
+
icon: "https://static-next.streamlayer.io/1a0525a58e123d342ed43ebdf5bacc9c/6bde38a5-d5da-4f8d-b491-601370372695/6996bc2d-a8b0-4b93-82d6-015bc981e666.png",
|
|
37
|
+
sponsorLogo: "https://static-next.streamlayer.io/1a0525a58e123d342ed43ebdf5bacc9c/95da4770-fb56-4bb7-bba6-94f97e6f1fea/8c6a2184-453e-47d2-aa77-5478da0ebb51.png",
|
|
38
|
+
primaryColor: "#9c0061"
|
|
39
|
+
}
|
|
40
|
+
}, R = (g, { args: t }) => {
|
|
41
|
+
console.log("NotificationsList", t);
|
|
42
|
+
const e = f(
|
|
43
|
+
() => new m({ concurrency: t.concurrency || 1, animationDelay: 300 }),
|
|
44
|
+
[t.concurrency]
|
|
45
|
+
), d = a(0), s = a(0), r = (i) => {
|
|
46
|
+
e.add({
|
|
47
|
+
type: i,
|
|
48
|
+
autoHideDuration: 5e3,
|
|
49
|
+
id: Date.now().toString(),
|
|
50
|
+
data: {
|
|
51
|
+
...u[i],
|
|
52
|
+
title: i === o.ONBOARDING ? `Onboarding ${++s.current}` : `Question ${++d.current}`
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
return /* @__PURE__ */ p("div", { children: [
|
|
57
|
+
/* @__PURE__ */ n(l, { notificationsStore: e.getQueueStore() }),
|
|
58
|
+
/* @__PURE__ */ n(c, { onClick: () => r(o.QUESTION), children: "Add question" }),
|
|
59
|
+
/* @__PURE__ */ n(c, { onClick: () => r(o.ONBOARDING), children: "Add onboarding" })
|
|
60
|
+
] });
|
|
61
|
+
};
|
|
62
|
+
export {
|
|
63
|
+
R as NotificationsList
|
|
64
|
+
};
|