@streamlayer/react-ui 0.24.3 → 0.25.1

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 (83) hide show
  1. package/lib/{icon-exit-d3f9fc80.js → icon-exit-6a55bb8f.js} +1 -1
  2. package/lib/{index-d5620d2c.js → index-7045fbb2.js} +1 -1
  3. package/lib/index.js +84 -70
  4. package/lib/ui/demo/Gamification.js +113 -0
  5. package/lib/{lib → ui}/demo/Highlights.js +9 -5
  6. package/lib/{lib → ui}/demo/components/Insight.js +1 -1
  7. package/lib/ui/demo/components/Leaderboard.js +48 -0
  8. package/lib/{lib → ui}/demo/components/Question.js +2 -2
  9. package/lib/ui/demo/components/UserSummary.js +23 -0
  10. package/lib/{lib → ui}/demo/components/index.js +24 -14
  11. package/lib/{lib → ui}/demo/index.js +51 -39
  12. package/lib/{lib → ui}/demo/styles.js +1 -1
  13. package/lib/{lib → ui}/gamification/common-header/index.js +8 -8
  14. package/lib/{lib → ui}/gamification/detailed-insight/index.js +1 -1
  15. package/lib/ui/gamification/leaderboard-invite-link/index.js +15 -0
  16. package/lib/ui/gamification/leaderboard-invite-link/styles.js +59 -0
  17. package/lib/ui/gamification/leaderboard-item/index.js +18 -0
  18. package/lib/ui/gamification/leaderboard-item/styles.js +80 -0
  19. package/lib/ui/gamification/leaderboard-item-detail/index.js +20 -0
  20. package/lib/ui/gamification/leaderboard-item-detail/styles.js +7 -0
  21. package/lib/ui/gamification/leaderboard-list/index.js +16 -0
  22. package/lib/ui/gamification/leaderboard-list/styles.js +18 -0
  23. package/lib/ui/gamification/navigation/index.js +34 -0
  24. package/lib/ui/gamification/navigation/styles.js +26 -0
  25. package/lib/{lib → ui}/gamification/onboarding/index.js +18 -18
  26. package/lib/{lib → ui}/gamification/user-statistics/index.js +16 -16
  27. package/lib/{lib → ui}/gamification/user-statistics/styles.js +6 -6
  28. package/lib/{lib → ui}/gamification/vote/components/voting-header/index.js +1 -1
  29. package/lib/{lib → ui}/gamification/vote/components/voting-option/index.js +1 -1
  30. package/lib/{lib → ui}/gamification/vote/index.js +1 -1
  31. package/lib/{lib → ui}/notifications/decorator.js +1 -1
  32. package/lib/{lib → ui}/notifications/index.js +1 -1
  33. package/lib/{lib → ui}/notifications/notification/index.js +1 -1
  34. package/lib/{lib → ui}/notifications/notification/question-inapp/index.js +8 -8
  35. package/lib/{lib → ui}/theme/constants.js +3 -2
  36. package/lib/{lib → ui}/theme/theme.js +4 -2
  37. package/lib/utils/decorators/container.js +3 -3
  38. package/package.json +9 -9
  39. package/lib/lib/demo/Gamification.js +0 -95
  40. package/lib/lib/demo/components/UserSummary.js +0 -32
  41. /package/lib/{lib → ui}/demo/Login.js +0 -0
  42. /package/lib/{lib → ui}/demo/components/EventProvider.js +0 -0
  43. /package/lib/{lib → ui}/demo/components/Insights.js +0 -0
  44. /package/lib/{lib → ui}/demo/components/QuestionsList.js +0 -0
  45. /package/lib/{lib → ui}/gamification/common-header/styles.js +0 -0
  46. /package/lib/{lib → ui}/gamification/detailed-insight/styles.js +0 -0
  47. /package/lib/{lib → ui}/gamification/insight/index.js +0 -0
  48. /package/lib/{lib → ui}/gamification/insight/styles.js +0 -0
  49. /package/lib/{lib → ui}/gamification/insight-list/index.js +0 -0
  50. /package/lib/{lib → ui}/gamification/insight-list/styles.js +0 -0
  51. /package/lib/{lib → ui}/gamification/onboarding/components/onboarding-slides/onboarding-instructions/index.js +0 -0
  52. /package/lib/{lib → ui}/gamification/onboarding/components/onboarding-slides/onboarding-instructions/styles.js +0 -0
  53. /package/lib/{lib → ui}/gamification/onboarding/components/onboarding-slides/onboarding-invite-card/index.js +0 -0
  54. /package/lib/{lib → ui}/gamification/onboarding/components/onboarding-slides/onboarding-invite-card/styles.js +0 -0
  55. /package/lib/{lib → ui}/gamification/onboarding/components/onboarding-slides/onboarding-rules/index.js +0 -0
  56. /package/lib/{lib → ui}/gamification/onboarding/components/onboarding-slides/onboarding-rules/styles.js +0 -0
  57. /package/lib/{lib → ui}/gamification/onboarding/styles.js +0 -0
  58. /package/lib/{lib → ui}/gamification/question/index.js +0 -0
  59. /package/lib/{lib → ui}/gamification/question/styles.js +0 -0
  60. /package/lib/{lib → ui}/gamification/question-list/index.js +0 -0
  61. /package/lib/{lib → ui}/gamification/question-list/styles.js +0 -0
  62. /package/lib/{lib → ui}/gamification/user-statistics/components/rank/index.js +0 -0
  63. /package/lib/{lib → ui}/gamification/user-statistics/components/rank/styles.js +0 -0
  64. /package/lib/{lib → ui}/gamification/user-statistics/components/statistics/index.js +0 -0
  65. /package/lib/{lib → ui}/gamification/user-statistics/components/statistics/styles.js +0 -0
  66. /package/lib/{lib → ui}/gamification/vote/components/voting-header/components/points/index.js +0 -0
  67. /package/lib/{lib → ui}/gamification/vote/components/voting-header/components/points/styles.js +0 -0
  68. /package/lib/{lib → ui}/gamification/vote/components/voting-header/components/timer/index.js +0 -0
  69. /package/lib/{lib → ui}/gamification/vote/components/voting-header/components/timer/styles.js +0 -0
  70. /package/lib/{lib → ui}/gamification/vote/components/voting-header/styles.js +0 -0
  71. /package/lib/{lib → ui}/gamification/vote/components/voting-option/styles.js +0 -0
  72. /package/lib/{lib → ui}/gamification/vote/styles.js +0 -0
  73. /package/lib/{lib → ui}/gamification/vote/types.d.js +0 -0
  74. /package/lib/{lib → ui}/login/index.js +0 -0
  75. /package/lib/{lib → ui}/login/styles.js +0 -0
  76. /package/lib/{lib → ui}/notifications/notification/onboarding-inapp/index.js +0 -0
  77. /package/lib/{lib → ui}/notifications/notification/onboarding-inapp/styles.js +0 -0
  78. /package/lib/{lib → ui}/notifications/notification/question-inapp/styles.js +0 -0
  79. /package/lib/{lib → ui}/notifications/notification/styles.js +0 -0
  80. /package/lib/{lib → ui}/notifications/styles.js +0 -0
  81. /package/lib/{lib → ui}/theme/index.js +0 -0
  82. /package/lib/{lib → ui}/user-account/index.js +0 -0
  83. /package/lib/{lib → ui}/user-account/styles.js +0 -0
@@ -23,14 +23,14 @@ const t = e.div`
23
23
  column-gap: 8px;
24
24
  flex: 1;
25
25
  overflow: hidden;
26
- `, a = e.img`
27
- width: 100%;
28
- height: 100%;
26
+ `, p = e.img`
27
+ width: 48px;
28
+ height: 48px;
29
29
  border-radius: 50%;
30
30
  object-fit: cover;
31
31
  object-position: center;
32
32
  flex-shrink: 0;
33
- `, p = e.div`
33
+ `, a = e.div`
34
34
  padding-top: 4px;
35
35
  display: flex;
36
36
  flex-direction: column;
@@ -95,7 +95,7 @@ const t = e.div`
95
95
  max-height: 48px;
96
96
  `;
97
97
  export {
98
- a as Avatar,
98
+ p as Avatar,
99
99
  h as AvatarPlaceholder,
100
100
  i as BottomInfo,
101
101
  t as Container,
@@ -107,7 +107,7 @@ export {
107
107
  c as TrophyIcon,
108
108
  n as User,
109
109
  m as UserAccountBtn,
110
- p as UserInfo,
110
+ a as UserInfo,
111
111
  s as UserName,
112
112
  d as UserRating
113
113
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as N, jsx as M, Fragment as O } from "react/jsx-runtime";
2
2
  import { QuestionType as j } from "@streamlayer/sdk-web-types";
3
- import { c as E } from "../../../../../icon-exit-d3f9fc80.js";
3
+ import { i as E } from "../../../../../icon-exit-6a55bb8f.js";
4
4
  import { Timer as k } from "./components/timer/index.js";
5
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
6
  import { Points as z } from "./components/points/index.js";
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@streamlayer/sdk-web-types";
3
- import { V as n } from "../../../../../index-d5620d2c.js";
3
+ import { V as n } from "../../../../../index-7045fbb2.js";
4
4
  import "./styles.js";
5
5
  import "@linaria/react";
6
6
  export {
@@ -1,7 +1,7 @@
1
1
  import { jsxs as e, jsx as i } from "react/jsx-runtime";
2
2
  import { QuestionType as b } from "@streamlayer/sdk-web-types";
3
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";
4
+ import { V as D, c as j } from "../../../index-7045fbb2.js";
5
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
6
  import "./components/voting-option/styles.js";
7
7
  import "@linaria/react";
@@ -8,7 +8,7 @@ import "./notification/index.js";
8
8
  import "./notification/onboarding-inapp/index.js";
9
9
  import "./notification/onboarding-inapp/styles.js";
10
10
  import "./notification/question-inapp/index.js";
11
- import "../../icon-exit-d3f9fc80.js";
11
+ import "../../icon-exit-6a55bb8f.js";
12
12
  import "./notification/question-inapp/styles.js";
13
13
  import "./notification/styles.js";
14
14
  import "./styles.js";
@@ -8,7 +8,7 @@ import "./notification/onboarding-inapp/index.js";
8
8
  import "./notification/onboarding-inapp/styles.js";
9
9
  import "@linaria/react";
10
10
  import "./notification/question-inapp/index.js";
11
- import "../../icon-exit-d3f9fc80.js";
11
+ import "../../icon-exit-6a55bb8f.js";
12
12
  import "./notification/question-inapp/styles.js";
13
13
  import "./notification/styles.js";
14
14
  const S = ({ notificationsStore: i }) => {
@@ -6,7 +6,7 @@ import { QuestionInApp as e } from "./question-inapp/index.js";
6
6
  import { NotificationContainer as a } from "./styles.js";
7
7
  import "./onboarding-inapp/styles.js";
8
8
  import "@linaria/react";
9
- import "../../../icon-exit-d3f9fc80.js";
9
+ import "../../../icon-exit-6a55bb8f.js";
10
10
  import "./question-inapp/styles.js";
11
11
  const l = {
12
12
  [i.ONBOARDING]: N,
@@ -1,19 +1,19 @@
1
1
  import { jsxs as t, jsx as n } from "react/jsx-runtime";
2
- import { useCallback as a } from "react";
3
- import { c as s } from "../../../../icon-exit-d3f9fc80.js";
2
+ import { useCallback as c } from "react";
3
+ import { i as s } from "../../../../icon-exit-6a55bb8f.js";
4
4
  import { Container as d, IconWrap as m, Icon as C, Content as h, TitleWrap as I, Title as f, CloseBtnWrap as k, CloseBtn as u, CloseIcon as x } from "./styles.js";
5
5
  import "@linaria/react";
6
- const B = ({ close: o, action: p, data: { color: r, icon: i, title: c } }) => {
7
- const e = a(
6
+ const B = ({ close: i, action: p, data: { color: r, icon: o, title: a } }) => {
7
+ const e = c(
8
8
  (l) => {
9
- l.stopPropagation(), o == null || o();
9
+ l.stopPropagation(), i == null || i();
10
10
  },
11
- [o]
11
+ [i]
12
12
  );
13
13
  return /* @__PURE__ */ t(d, { onClick: p, children: [
14
- /* @__PURE__ */ n(m, { style: r ? { backgroundColor: r } : {}, children: i && /* @__PURE__ */ n(C, { alt: "in-app-icon", src: i }) }),
14
+ /* @__PURE__ */ n(m, { style: r ? { backgroundColor: r } : {}, children: o && /* @__PURE__ */ n(C, { alt: "in-app-icon", src: o }) }),
15
15
  /* @__PURE__ */ t(h, { children: [
16
- /* @__PURE__ */ n(I, { children: /* @__PURE__ */ n(f, { id: "in-app-title", children: c || "" }) }),
16
+ /* @__PURE__ */ n(I, { children: /* @__PURE__ */ n(f, { id: "in-app-title", children: a || "" }) }),
17
17
  /* @__PURE__ */ n(k, { children: /* @__PURE__ */ n(u, { onClick: e, children: /* @__PURE__ */ n(x, { alt: "close-in-app-icon", src: s }) }) })
18
18
  ] })
19
19
  ] });
@@ -10,6 +10,7 @@ const R = {
10
10
  BG_TRANSPARENT_VOTE_PROGRESS_ERROR: "rgba(205, 37, 37, 0.5)",
11
11
  BG_TRANSPARENT_USER_CONTAINER: "rgba(255, 255, 255, 0.05)",
12
12
  BG_TRANSPARENT_ONBOARDING_INAPP: "rgba(138, 159, 182, 0.2)",
13
+ LEADERBOARD_UNIT: "rgba(255, 255, 255, 0.5)",
13
14
  BLUE_PRIMARY: "#1589EE",
14
15
  RED_PRIMARY: "#CD2525",
15
16
  RED_SECONDARY: "#EB5757",
@@ -28,11 +29,11 @@ const R = {
28
29
  DIVIDER_COLOR_PRIMARY: "#2d3135",
29
30
  DIVIDER_COLOR_SECONDARY: "#53565a",
30
31
  GREEN_PRIMARY_BTN: "#009B77"
31
- }, _ = {
32
+ }, E = {
32
33
  FAMILY: "Roboto, sans-serif",
33
34
  COLOR: "#fff"
34
35
  };
35
36
  export {
36
37
  R as COLORS,
37
- _ as FONT
38
+ E as FONT
38
39
  };
@@ -1,6 +1,6 @@
1
1
  import { css as R } from "@linaria/core";
2
2
  import { COLORS as r, FONT as o } from "./constants.js";
3
- const _ = R`
3
+ const n = R`
4
4
  --color-bg-transparent: ${r.BG_TRANSPARENT};
5
5
  --color-transparent-vote-container: ${r.BG_TRANSPARENT_VOTE_CONTAINER};
6
6
  --color-transparent-item: ${r.BG_TRANSPARENT_ITEM};
@@ -9,6 +9,7 @@ const _ = R`
9
9
  --color-bg-transparent-item-vote: ${r.BG_TRANSPARENT_ITEM_VOTE};
10
10
  --color-transparent-user-container: ${r.BG_TRANSPARENT_USER_CONTAINER};
11
11
  --color-transparent-onboarding-inapp: ${r.BG_TRANSPARENT_ONBOARDING_INAPP};
12
+ --color-leaderboard-unit: ${r.LEADERBOARD_UNIT};
12
13
  --color-blue-primary: ${r.BLUE_PRIMARY};
13
14
  --color-red-primary: ${r.RED_PRIMARY};
14
15
  --color-red-secondary: ${r.RED_SECONDARY};
@@ -16,6 +17,7 @@ const _ = R`
16
17
  --color-white: ${r.WHITE};
17
18
  --color-red-2: ${r.RED_2};
18
19
  --color-grey-primary: ${r.GREY_PRIMARY};
20
+ --color-grey-primary-onboarding-inapp: ${r.GREY_PRIMARY_ONBOARDING_INAPP};
19
21
  --color-divider-color-primary: ${r.DIVIDER_COLOR_PRIMARY};
20
22
  --color-divider-color-secondary: ${r.DIVIDER_COLOR_SECONDARY};
21
23
  --color-green-primary-btn: ${r.GREEN_PRIMARY_BTN};
@@ -23,5 +25,5 @@ const _ = R`
23
25
  --font-color: ${o.COLOR};
24
26
  `;
25
27
  export {
26
- _ as theme
28
+ n as theme
27
29
  };
@@ -1,9 +1,9 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { StreamLayerThemeProvider as i } from "../../lib/theme/index.js";
2
+ import { StreamLayerThemeProvider as i } from "../../ui/theme/index.js";
3
3
  import { AppContainer as m } from "./styles.js";
4
- import "../../lib/theme/theme.js";
4
+ import "../../ui/theme/theme.js";
5
5
  import "@linaria/core";
6
- import "../../lib/theme/constants.js";
6
+ import "../../ui/theme/constants.js";
7
7
  import "@linaria/react";
8
8
  const h = (o) => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(m, { children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(o, {}) }) }) });
9
9
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "0.24.3",
3
+ "version": "0.25.1",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -22,16 +22,16 @@
22
22
  ],
23
23
  "peerDependencies": {
24
24
  "@streamlayer/sl-eslib": "^5.45.1",
25
- "@streamlayer/feature-gamification": "^0.14.2",
26
- "@streamlayer/sdk-web": "^0.26.2",
27
- "@streamlayer/sdk-web-anonymous-auth": "^0.10.2",
28
- "@streamlayer/sdk-web-core": "^0.11.2",
29
- "@streamlayer/sdk-web-features": "^0.9.2",
25
+ "@streamlayer/feature-gamification": "^0.15.0",
26
+ "@streamlayer/sdk-web": "^0.26.3",
27
+ "@streamlayer/sdk-web-anonymous-auth": "^0.10.3",
28
+ "@streamlayer/sdk-web-core": "^0.11.3",
29
+ "@streamlayer/sdk-web-features": "^0.9.3",
30
30
  "@streamlayer/sdk-web-api": "^0.1.0",
31
- "@streamlayer/sdk-web-interfaces": "^0.17.1",
32
- "@streamlayer/sdk-web-notifications": "^0.9.1",
31
+ "@streamlayer/sdk-web-interfaces": "^0.17.2",
32
+ "@streamlayer/sdk-web-notifications": "^0.9.2",
33
33
  "@streamlayer/sdk-web-storage": "^0.3.1",
34
- "@streamlayer/sdk-web-types": "^0.14.1"
34
+ "@streamlayer/sdk-web-types": "^0.15.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@connectrpc/connect": "^1.1.3",
@@ -1,95 +0,0 @@
1
- import { jsx as t, jsxs as T } from "react/jsx-runtime";
2
- import { FeatureStatus as z } from "@streamlayer/sdk-web-interfaces";
3
- import { useStore as i } from "@nanostores/react";
4
- import { UserSummary as H } from "./components/UserSummary.js";
5
- import { QuestionsList as J } from "./components/QuestionsList.js";
6
- import { Question as K } from "./components/Question.js";
7
- import { Onboarding as M } from "../gamification/onboarding/index.js";
8
- import "@streamlayer/sdk-web-types";
9
- import "../gamification/insight/styles.js";
10
- import "../gamification/insight-list/styles.js";
11
- import "../gamification/common-header/styles.js";
12
- import "../gamification/detailed-insight/styles.js";
13
- import { DemoContainer as n, UserStatisticsContainer as N, QuestionsContainer as P } from "./styles.js";
14
- import "../gamification/user-statistics/index.js";
15
- import "../../utils/common.js";
16
- import "../gamification/user-statistics/components/statistics/index.js";
17
- import "../gamification/user-statistics/components/statistics/styles.js";
18
- import "@linaria/react";
19
- import "../gamification/user-statistics/components/rank/index.js";
20
- import "../gamification/user-statistics/components/rank/styles.js";
21
- import "../gamification/user-statistics/styles.js";
22
- import "../gamification/question-list/index.js";
23
- import "../gamification/question/index.js";
24
- import "../../icon-chevron-138a557c.js";
25
- import "../gamification/question/styles.js";
26
- import "../gamification/question-list/styles.js";
27
- import "react";
28
- import "../gamification/vote/index.js";
29
- import "../../index-d5620d2c.js";
30
- import "../gamification/vote/components/voting-option/styles.js";
31
- import "../gamification/vote/styles.js";
32
- import "../gamification/vote/components/voting-header/index.js";
33
- import "../../icon-exit-d3f9fc80.js";
34
- import "../gamification/vote/components/voting-header/components/timer/index.js";
35
- import "react-countdown-circle-timer";
36
- import "../theme/constants.js";
37
- import "../gamification/vote/components/voting-header/components/timer/styles.js";
38
- import "../gamification/vote/components/voting-header/styles.js";
39
- import "../gamification/vote/components/voting-header/components/points/index.js";
40
- import "../gamification/vote/components/voting-header/components/points/styles.js";
41
- import "../gamification/onboarding/styles.js";
42
- import "../gamification/onboarding/components/onboarding-slides/onboarding-instructions/index.js";
43
- import "../gamification/onboarding/components/onboarding-slides/onboarding-instructions/styles.js";
44
- import "../gamification/onboarding/components/onboarding-slides/onboarding-rules/index.js";
45
- import "../gamification/onboarding/components/onboarding-slides/onboarding-rules/styles.js";
46
- import "../gamification/onboarding/components/onboarding-slides/onboarding-invite-card/index.js";
47
- import "../gamification/onboarding/components/onboarding-slides/onboarding-invite-card/styles.js";
48
- const zr = ({
49
- gamification: r,
50
- sdk: m
51
- }) => {
52
- var a, u, l, d, v, c, y, b, C, h, G, S, Q, L, g, w, x, f, F, j, q, B, E;
53
- const U = i(r.status), A = i(r.onboardingStatus), s = i(r.openedQuestion), { slStreamId: e } = i(m.sdkStore), o = i(r.featureSettings);
54
- if (U !== z.Ready)
55
- return /* @__PURE__ */ t("div", { children: "wait..." });
56
- if (e != null && e.loading)
57
- return /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t("div", { children: "Event is loading" }) });
58
- if (!(e != null && e.data))
59
- return /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t("div", { children: "Event is forbidden" }) });
60
- if (!A)
61
- return /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(
62
- M,
63
- {
64
- closeFeature: m.closeFeature,
65
- gamification: r,
66
- steps: (u = (a = o.inplayGame) == null ? void 0 : a.onboarding) == null ? void 0 : u.steps,
67
- gameIcon: (v = (d = (l = o.inplayGame) == null ? void 0 : l.overview) == null ? void 0 : d.media) == null ? void 0 : v.gameIcon,
68
- sponsorLogo: (b = (y = (c = o.inplayGame) == null ? void 0 : c.overview) == null ? void 0 : y.media) == null ? void 0 : b.sponsorLogo,
69
- rules: (h = (C = o.inplayGame) == null ? void 0 : C.rules) == null ? void 0 : h.rules,
70
- rulesBtnLabel: (S = (G = o.inplayGame) == null ? void 0 : G.rules) == null ? void 0 : S.buttonLabel,
71
- rulesTitle: (L = (Q = o.inplayGame) == null ? void 0 : Q.rules) == null ? void 0 : L.heading,
72
- primaryColor: (x = (w = (g = o.inplayGame) == null ? void 0 : g.overview) == null ? void 0 : w.appearance) == null ? void 0 : x.primaryColor,
73
- inviteCardTitle: (F = (f = o.inplayGame) == null ? void 0 : f.inviteCard) == null ? void 0 : F.heading,
74
- inviteCardSubtext: (q = (j = o.inplayGame) == null ? void 0 : j.inviteCard) == null ? void 0 : q.subtext,
75
- inviteCardBtnLabel: (E = (B = o.inplayGame) == null ? void 0 : B.inviteCard) == null ? void 0 : E.buttonLabel
76
- }
77
- ) });
78
- const D = (p) => {
79
- r.openQuestion(p);
80
- }, O = () => {
81
- r.closeQuestion();
82
- }, R = (p, k) => {
83
- r.submitAnswer(p, k);
84
- };
85
- return /* @__PURE__ */ T(n, { children: [
86
- /* @__PURE__ */ t(N, { children: r.userSummary && /* @__PURE__ */ t(H, { store: r.userSummary.getStore() }) }),
87
- /* @__PURE__ */ T(P, { children: [
88
- r.questions && /* @__PURE__ */ t(J, { openQuestion: D, store: r.questions.getStore() }),
89
- s && /* @__PURE__ */ t(K, { closeQuestion: O, vote: R, openedQuestion: s })
90
- ] })
91
- ] });
92
- };
93
- export {
94
- zr as GamificationComponent
95
- };
@@ -1,32 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { useStore as e } from "@nanostores/react";
3
- import { UserStatistics as s } from "../../gamification/user-statistics/index.js";
4
- import "../../../utils/common.js";
5
- import "../../gamification/user-statistics/components/statistics/index.js";
6
- import "../../gamification/user-statistics/components/statistics/styles.js";
7
- import "@linaria/react";
8
- import "../../gamification/user-statistics/components/rank/index.js";
9
- import "../../gamification/user-statistics/components/rank/styles.js";
10
- import "../../gamification/user-statistics/styles.js";
11
- const g = ({ store: t }) => {
12
- var m;
13
- const { data: r } = e(t);
14
- return r != null && r.summary ? /* @__PURE__ */ a(
15
- s,
16
- {
17
- avatar: r.summary.avatar,
18
- name: r.summary.name,
19
- points: r.summary.points,
20
- grade: "0",
21
- friendsRank: r.summary.friendsRank,
22
- globalRank: r.summary.rank,
23
- winStreak: r.summary.streak,
24
- correct: r.summary.correct,
25
- incorrect: r.summary.incorrect,
26
- successRate: (m = r.percentage) == null ? void 0 : m.average
27
- }
28
- ) : /* @__PURE__ */ a("div", { children: "wait user..." });
29
- };
30
- export {
31
- g as UserSummary
32
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes